Skip to content

Commit bdd5ab7

Browse files
author
rclations
committed
Capital P, dangit
WordPress has both a capital W and capital P - see https://codex.wordpress.org/Function_Reference/capital_P_dangit left usage of “wordpress” alone, but changed all occurrences of “Wordpress”
1 parent a9a8b13 commit bdd5ab7

File tree

7 files changed

+21
-21
lines changed

7 files changed

+21
-21
lines changed

bootstrap.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/*
33
Plugin Name: Intercom
44
Plugin URI: https://wordpress.org/plugins/intercom
5-
Description: Official <a href="https://www.intercom.io">Intercom</a> support for Wordpress.
5+
Description: Official <a href="https://www.intercom.io">Intercom</a> support for WordPress.
66
Author: Bob Long
77
Author URI: https://www.intercom.io
88
Version: 2.2.2
@@ -81,8 +81,8 @@ public function dismissibleMessage($text)
8181
public function htmlUnclosed()
8282
{
8383
$settings = $this->getSettings();
84-
$app_id = WordpressEscaper::escAttr($settings['app_id']);
85-
$secret = WordpressEscaper::escAttr($settings['secret']);
84+
$app_id = WordPressEscaper::escAttr($settings['app_id']);
85+
$secret = WordPressEscaper::escAttr($settings['secret']);
8686

8787
if (empty($secret)) {
8888
$secret_row_style = 'display: none;';
@@ -98,7 +98,7 @@ public function htmlUnclosed()
9898
}
9999

100100
if ($_GET['appId']) {
101-
$app_id = WordpressEscaper::escAttr($_GET['appId']);
101+
$app_id = WordPressEscaper::escAttr($_GET['appId']);
102102
$dismissable_message = $this->dismissibleMessage('We’ve copied your new Intercom app ID below. Click to save changes and then close this window to finish signing up for Intercom.');
103103
}
104104

@@ -223,7 +223,7 @@ private function getRawData()
223223
private function mergeConstants($settings) {
224224
foreach($this->constants as $key => $value) {
225225
if (defined($key)) {
226-
$const_val = WordpressEscaper::escJS(constant($key));
226+
$const_val = WordPressEscaper::escJS(constant($key));
227227
$settings = array_merge($settings, array($value => $const_val));
228228
}
229229
}
@@ -239,7 +239,7 @@ private function validateRawData($raw_data)
239239
}
240240
}
241241

242-
class WordpressEscaper
242+
class WordPressEscaper
243243
{
244244
public static function escAttr($value)
245245
{
@@ -279,7 +279,7 @@ public function buildSettings()
279279
}
280280
if (!empty($this->wordpress_user->user_email))
281281
{
282-
$this->settings["email"] = WordpressEscaper::escJS($this->wordpress_user->user_email);
282+
$this->settings["email"] = WordPressEscaper::escJS($this->wordpress_user->user_email);
283283
}
284284
return $this->settings;
285285
}
@@ -324,8 +324,8 @@ function add_intercom_snippet()
324324
{
325325
$options = get_option('intercom');
326326
$snippet_settings = new SnippetSettings(
327-
array("app_id" => WordpressEscaper::escJS($options['app_id'])),
328-
WordpressEscaper::escJS($options['secret']),
327+
array("app_id" => WordPressEscaper::escJS($options['app_id'])),
328+
WordPressEscaper::escJS($options['secret']),
329329
wp_get_current_user()
330330
);
331331
$snippet = new Snippet($snippet_settings);

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<phpunit bootstrap="./bootstrap.php">
44
<testsuites>
5-
<testsuite name="Intercom Wordpress Testsuite">
5+
<testsuite name="Intercom WordPress Testsuite">
66
<directory>./test</directory>
77
</testsuite>
88
</testsuites>

readme.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Intercom / Wordpress
1+
# Intercom / WordPress
22

33
[![Build Status](https://travis-ci.org/intercom/intercom-wordpress.svg?branch=master)](https://travis-ci.org/intercom/intercom-wordpress)
44

55
# Beta
66

7-
This plugin for Wordpress is in active development.
7+
This plugin for WordPress is in active development.
88

99
# Local Testing
1010

@@ -26,7 +26,7 @@ Once filled out, the Intercom widget will automatically appear on your site.
2626

2727
If a `$current_user` is present, we use their email as an identifier in the widget.
2828

29-
Otherwise the widget operates in [Acquire mode](https://www.intercom.io/live-chat) (if available). This allows you to talk with anonymous visitors on your Wordpress site.
29+
Otherwise the widget operates in [Acquire mode](https://www.intercom.io/live-chat) (if available). This allows you to talk with anonymous visitors on your WordPress site.
3030

3131
# Contributing
3232

readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Official Intercom support for WordPress
99

1010
== Description ==
1111

12-
With the Intercom plugin for Wordpress, you can chat to both logged-in and anonymous users (using [Acquire](https://www.intercom.io/live-chat)).
12+
With the Intercom plugin for WordPress, you can chat to both logged-in and anonymous users (using [Acquire](https://www.intercom.io/live-chat)).
1313

1414
Installing this plugin provides a new Intercom settings page, which allows you to configure your app id and secure mode secret. Once filled out, the Intercom widget will automatically appear.
1515

test/SnippetSettingsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
class FakeWordpressUserForSnippetTest
2+
class FakeWordPressUserForSnippetTest
33
{
44
public $user_email = "foo@bar.com";
55
}
@@ -13,7 +13,7 @@ public function testJSONRendering()
1313
}
1414
public function testJSONRenderingWithSecureMode()
1515
{
16-
$snippet_settings = new SnippetSettings(array("app_id" => "bar"), "foo", new FakeWordpressUserForSnippetTest());
16+
$snippet_settings = new SnippetSettings(array("app_id" => "bar"), "foo", new FakeWordPressUserForSnippetTest());
1717
$this->assertEquals("{\"app_id\":\"bar\",\"email\":\"foo@bar.com\",\"user_hash\":\"a95b0a1ab461c0721d91fbe32a5f5f2a27ac0bfa4bfbcfced168173fa80d4e14\"}", $snippet_settings->json());
1818
}
1919

test/UserTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
2-
class FakeWordpressUser
2+
class FakeWordPressUser
33
{
44
public $user_email = "foo@bar.com";
55
}
6-
class FakeWordpressUserNoEmail
6+
class FakeWordPressUserNoEmail
77
{
88
public $user_email = NULL;
99
}
@@ -13,7 +13,7 @@ class UserTest extends PHPUnit_Framework_TestCase
1313
public function testEmail()
1414
{
1515
$settings = array();
16-
$user = new IntercomUser(new FakeWordpressUser(), $settings);
16+
$user = new IntercomUser(new FakeWordPressUser(), $settings);
1717
$built_settings = $user->buildSettings();
1818
$this->assertEquals("foo@bar.com", $built_settings["email"]);
1919
}
@@ -27,7 +27,7 @@ public function testNoUser()
2727
public function testNoUserEmail()
2828
{
2929
$settings = array();
30-
$user = new IntercomUser(new FakeWordpressUserNoEmail(), $settings);
30+
$user = new IntercomUser(new FakeWordPressUserNoEmail(), $settings);
3131
$built_settings = $user->buildSettings();
3232
$this->assertEquals(false, array_key_exists('email', $built_settings));
3333
}

test/ValidatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ class ValidatorTest extends PHPUnit_Framework_TestCase
33
{
44
public function testValidator()
55
{
6-
// Emulate the wordpress wp_kses function
6+
// Emulate the WordPress wp_kses function
77
$wp_kses = function($x) {
88
return str_replace("<script>", "", $x);
99
};

0 commit comments

Comments
 (0)