Twitter - Version 2.0.2

Version Description

  • Support 280 characters
  • Add support for WordPress 4.8 and 4.9
  • Remove support for WordPress 4.6 and below
Download this release

Release Info

Developer Twitter
Plugin Icon 128x128 Twitter
Version 2.0.2
Comparing to
See all releases

Code changes from version 2.0.1 to 2.0.2

Files changed (54) hide show
  1. .travis.yml +60 -0
  2. index.php +0 -0
  3. readme.txt +23 -19
  4. src/Twitter/Helpers/Validators/WebsiteTag.php +0 -0
  5. src/Twitter/Intents/Traits/Related.php +0 -0
  6. src/Twitter/Widgets/Base.php +0 -0
  7. src/Twitter/Widgets/Buttons/Follow.php +0 -0
  8. src/Twitter/Widgets/Buttons/Periscope/OnAir.php +0 -0
  9. src/Twitter/Widgets/Buttons/Tweet.php +0 -0
  10. src/Twitter/Widgets/Embeds/Moment.php +0 -0
  11. src/Twitter/Widgets/Embeds/Theme.php +0 -0
  12. src/Twitter/Widgets/Embeds/Timeline.php +0 -0
  13. src/Twitter/Widgets/Embeds/Timeline/Collection.php +0 -0
  14. src/Twitter/Widgets/Embeds/Timeline/Profile.php +0 -0
  15. src/Twitter/Widgets/Embeds/Timeline/Search.php +0 -0
  16. src/Twitter/Widgets/Embeds/Timeline/TwitterList.php +0 -0
  17. src/Twitter/Widgets/Embeds/Tweet.php +0 -0
  18. src/Twitter/Widgets/Embeds/Tweet/Base.php +0 -0
  19. src/Twitter/Widgets/Embeds/Tweet/Video.php +0 -0
  20. src/Twitter/Widgets/Embeds/Vine.php +0 -0
  21. src/Twitter/WordPress/Admin/Post/TweetIntent.php +1 -1
  22. src/Twitter/WordPress/Admin/Settings/Buttons/Tweet.php +0 -0
  23. src/Twitter/WordPress/Admin/Settings/Cards/SiteAttribution.php +0 -0
  24. src/Twitter/WordPress/Admin/Settings/Embeds/Theme.php +0 -0
  25. src/Twitter/WordPress/Content/Buttons/Tweet.php +0 -0
  26. src/Twitter/WordPress/PluginLoader.php +1 -1
  27. src/Twitter/WordPress/Shortcodes/Advertising/Tracking.php +0 -0
  28. src/Twitter/WordPress/Shortcodes/AuthorContext.php +0 -0
  29. src/Twitter/WordPress/Shortcodes/Buttons/Follow.php +0 -0
  30. src/Twitter/WordPress/Shortcodes/Buttons/Periscope/OnAir.php +0 -0
  31. src/Twitter/WordPress/Shortcodes/Buttons/Share.php +0 -0
  32. src/Twitter/WordPress/Shortcodes/Embeds/Moment.php +0 -0
  33. src/Twitter/WordPress/Shortcodes/Embeds/Timeline.php +0 -0
  34. src/Twitter/WordPress/Shortcodes/Embeds/Timeline/Collection.php +0 -0
  35. src/Twitter/WordPress/Shortcodes/Embeds/Timeline/CollectionGrid.php +0 -0
  36. src/Twitter/WordPress/Shortcodes/Embeds/Timeline/Profile.php +0 -0
  37. src/Twitter/WordPress/Shortcodes/Embeds/Timeline/Search.php +0 -0
  38. src/Twitter/WordPress/Shortcodes/Embeds/Timeline/TwitterList.php +0 -0
  39. src/Twitter/WordPress/Shortcodes/Embeds/Tweet.php +0 -0
  40. src/Twitter/WordPress/Shortcodes/Embeds/Tweet/Video.php +0 -0
  41. src/Twitter/WordPress/Shortcodes/Embeds/Vine.php +0 -0
  42. src/Twitter/WordPress/Shortcodes/Helpers/Attributes.php +0 -0
  43. src/Twitter/WordPress/Widgets/Advertising/Tracking.php +0 -0
  44. src/Twitter/WordPress/Widgets/Buttons/Follow.php +0 -0
  45. src/Twitter/WordPress/Widgets/Buttons/Periscope/OnAir.php +0 -0
  46. src/Twitter/WordPress/Widgets/Embeds/Timeline.php +0 -0
  47. src/Twitter/WordPress/Widgets/Embeds/Timeline/Collection.php +0 -0
  48. src/Twitter/WordPress/Widgets/Embeds/Timeline/Profile.php +0 -0
  49. src/Twitter/WordPress/Widgets/Embeds/Timeline/Search.php +0 -0
  50. src/Twitter/WordPress/Widgets/Embeds/Timeline/TwitterList.php +0 -0
  51. src/Twitter/WordPress/Widgets/Widget.php +0 -0
  52. src/Twitter/WordPress/Widgets/WidgetInterface.php +0 -0
  53. static/css/admin/post/edit.scss +37 -0
  54. twitter.php +2 -2
.travis.yml ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Travis CI Configuration file
2
+ # @link https://travis-ci.org/
3
+
4
+ # Use new Travis container-based infrastructure
5
+ # http://docs.travis-ci.com/user/workers/container-based-infrastructure/
6
+ sudo: false
7
+
8
+ # PHP
9
+ # @link http://docs.travis-ci.com/user/languages/php/
10
+ language: php
11
+
12
+ # Declare versions of PHP to test
13
+ php:
14
+ # aliased to a recent 7.1.x version
15
+ - 7.1
16
+ # aliased to a recent 7.0.x version
17
+ - 7.0
18
+ # aliased to a recent 5.6.x version
19
+ - 5.6
20
+ # aliased to a recent 5.5.x version
21
+ - 5.5
22
+ # aliased to a recent 5.4.x version
23
+ - 5.4
24
+
25
+ # WordPress comes from the Git mirror, where 'master' mirrors svn 'trunk' and
26
+ # x.y mirrors the latest from the x.y branch
27
+ env:
28
+ # WordPress 4.9
29
+ - WP_VERSION=4.9
30
+ # WordPress 4.8
31
+ - WP_VERSION=4.8
32
+ # WordPress 4.7
33
+ - WP_VERSION=4.7
34
+
35
+ matrix:
36
+ fast_finish: true
37
+
38
+ # before_install: Failures in this section will result in build status 'errored'
39
+ before_install:
40
+ # set up WP install
41
+ - export WP_DEVELOP_DIR=/tmp/wordpress/
42
+ - mkdir -p $WP_DEVELOP_DIR
43
+ - git clone --depth=1 --branch="$WP_VERSION" git://develop.git.wordpress.org/ $WP_DEVELOP_DIR
44
+ - plugin_slug=$(basename $(pwd))
45
+ - plugin_dir=$WP_DEVELOP_DIR/src/wp-content/plugins/$plugin_slug
46
+ - cd ..
47
+ - mv $plugin_slug $plugin_dir
48
+ # set up tests config
49
+ - cd $WP_DEVELOP_DIR
50
+ - echo $WP_DEVELOP_DIR
51
+ - cp wp-tests-config-sample.php wp-tests-config.php
52
+ - sed -i "s/youremptytestdbnamehere/wordpress_test/" wp-tests-config.php
53
+ - sed -i "s/yourusernamehere/travis/" wp-tests-config.php
54
+ - sed -i "s/yourpasswordhere//" wp-tests-config.php
55
+ # create database
56
+ - mysql -e 'CREATE DATABASE wordpress_test;' -uroot
57
+ # prepare for running the tests
58
+ - cd $plugin_dir
59
+
60
+ script: phpunit
index.php CHANGED
File without changes
readme.txt CHANGED
@@ -1,13 +1,13 @@
1
  === Plugin Name ===
2
- Contributors: Twitter, niallkennedy
3
- Tags: twitter, embedded tweet, embedded timeline, twitter profile, twitter list, twitter moment, twitter video, twitter grid, vine, periscope, twitter cards, tweet button, follow button, twitter analytics, twitter ads
4
- Requires at least: 4.1
5
- Tested up to: 4.7
6
- Stable tag: 2.0.1
7
  License: MIT
8
  License URI: https://opensource.org/licenses/MIT
9
 
10
- Official Twitter, Periscope, and Vine plugin for WordPress. Embed content and grow your audience. Requires PHP 5.4 or greater.
11
 
12
  == Description ==
13
 
@@ -18,14 +18,13 @@ Requires PHP version 5.4 or greater.
18
  = Embed Twitter content =
19
  Embed Twitter content by pasting a URL, customizing a shortcode, or in a widget area.
20
 
21
- * [single Tweet](https://dev.twitter.com/web/embedded-tweets "single Tweet embed")
22
- * [single Tweet with video template](https://dev.twitter.com/web/embedded-video "single Tweet with video embed")
23
- * [profile timeline](https://dev.twitter.com/web/embedded-timelines/user "Twitter embedded profile timeline")
24
- * [list timeline](https://dev.twitter.com/web/embedded-timelines/list "Twitter embedded list timeline")
25
- * [search timeline](https://dev.twitter.com/web/embedded-timelines/search "Twitter embedded search timeline")
26
- * [collection](https://dev.twitter.com/web/embedded-timelines/collection "Twitter embedded collection")
27
- * [Moment](https://dev.twitter.com/web/embedded-moments "Twitter embedded Moment")
28
- * [Vine](https://dev.twitter.com/web/vine "Vine embed")
29
 
30
  Customize embed display to match your theme. Choose a light or dark background, customize link and border colors, and customize timeline template components through your site's WordPress administrative interface.
31
 
@@ -33,13 +32,13 @@ The plugin automatically customizes an embed's template text to match the locale
33
 
34
  = Grow your Twitter audience =
35
 
36
- Automatically generate link previews for your site's URLs shared on Twitter using [Twitter Cards markup](https://dev.twitter.com/cards/overview) . Easily identify your site and author Twitter accounts through your site and user administrative interfaces.
37
 
38
- Add a [Tweet button](https://dev.twitter.com/web/tweet-button) to public posts to encourage your visitors to share your content on Twitter. Visitors may see recommended accounts to follow after sharing your content including your site and its authors.
39
 
40
- Add a [Follow button](https://dev.twitter.com/web/follow-button) to convert your site visitors into Twitter subscribers.
41
 
42
- Add a [Periscope On Air button](https://www.periscope.tv/embed#on-air-button) to convert your site visitors into Periscope subscribers.
43
 
44
  = Improve Twitter advertising campaigns =
45
 
@@ -47,7 +46,7 @@ Easily add a Twitter website tag to your website to track the effectiveness and
47
 
48
  > <strong>Docs and active development</strong><br>
49
  > Contribute to the plugin, submit pull requests, or run test suites through the [Twitter plugin for WordPress GitHub repository](https://github.com/twitter/wordpress).
50
- > View [Twitter for WordPress documentation](https://dev.twitter.com/web/wordpress) to learn more about customization through WordPress filters.
51
 
52
  == Upgrade Notice ==
53
  = 2.0.0 =
@@ -72,6 +71,11 @@ Shortcode improvements for ajax-loaded posts. Remove photo, gallery, and product
72
  Display admin notice if current PHP version does not meet minimum requirements. Do not display Tweet button in auto-generated excerpt.
73
 
74
  == Changelog ==
 
 
 
 
 
75
  = 2.0.1 =
76
  * Enqueue Twitter widgets JavaScript and advertising JavaScript early in the page build process if a widget is active on the page
77
  * Tweet button: update expected length of a wrapped t.co URL with HTTP scheme
1
  === Plugin Name ===
2
+ Contributors: Twitter, niallkennedy, sobkowicz
3
+ Tags: twitter, embedded tweet, embedded timeline, twitter profile, twitter list, twitter moment, twitter video, twitter grid, periscope, twitter cards, tweet button, follow button, twitter analytics, twitter ads
4
+ Requires at least: 4.7
5
+ Tested up to: 4.9
6
+ Stable tag: 2.0.2
7
  License: MIT
8
  License URI: https://opensource.org/licenses/MIT
9
 
10
+ Official Twitter and Periscope plugin for WordPress. Embed content and grow your audience. Requires PHP 5.4 or greater.
11
 
12
  == Description ==
13
 
18
  = Embed Twitter content =
19
  Embed Twitter content by pasting a URL, customizing a shortcode, or in a widget area.
20
 
21
+ * [single Tweet](https://github.com/twitter/wordpress/wiki/Embedded-Tweet "single Tweet embed")
22
+ * [single Tweet with video template](https://github.com/twitter/wordpress/wiki/Embedded-Video "single Tweet with video embed")
23
+ * [profile timeline](https://github.com/twitter/wordpress/wiki/Embedded-Profile-Timeline "Twitter embedded profile timeline")
24
+ * [list timeline](https://github.com/twitter/wordpress/wiki/Embedded-List-Timeline "Twitter embedded list timeline")
25
+ * [search timeline](https://github.com/twitter/wordpress/wiki/Embedded-Search-Timeline "Twitter embedded search timeline")
26
+ * [collection](https://github.com/twitter/wordpress/wiki/Embedded-Collection-Timeline "Twitter embedded collection")
27
+ * [Moment](https://github.com/twitter/wordpress/wiki/Moments "Twitter embedded Moment")
 
28
 
29
  Customize embed display to match your theme. Choose a light or dark background, customize link and border colors, and customize timeline template components through your site's WordPress administrative interface.
30
 
32
 
33
  = Grow your Twitter audience =
34
 
35
+ Automatically generate link previews for your site's URLs shared on Twitter using [Twitter Cards markup](https://github.com/twitter/wordpress/wiki/Cards) . Easily identify your site and author Twitter accounts through your site and user administrative interfaces.
36
 
37
+ Add a [Tweet button](https://github.com/twitter/wordpress/wiki/Tweet-Button) to public posts to encourage your visitors to share your content on Twitter. Visitors may see recommended accounts to follow after sharing your content including your site and its authors.
38
 
39
+ Add a [Follow button](https://github.com/twitter/wordpress/wiki/Follow-Button) to convert your site visitors into Twitter subscribers.
40
 
41
+ Add a [Periscope On Air button](https://github.com/twitter/wordpress/wiki/Periscope-On-Air-Button) to convert your site visitors into Periscope subscribers.
42
 
43
  = Improve Twitter advertising campaigns =
44
 
46
 
47
  > <strong>Docs and active development</strong><br>
48
  > Contribute to the plugin, submit pull requests, or run test suites through the [Twitter plugin for WordPress GitHub repository](https://github.com/twitter/wordpress).
49
+ > View [Twitter for WordPress documentation](https://github.com/twitter/wordpress/wiki) to learn more about customization through WordPress filters.
50
 
51
  == Upgrade Notice ==
52
  = 2.0.0 =
71
  Display admin notice if current PHP version does not meet minimum requirements. Do not display Tweet button in auto-generated excerpt.
72
 
73
  == Changelog ==
74
+ = 2.0.2 =
75
+ * Support 280 characters
76
+ * Add support for WordPress 4.8 and 4.9
77
+ * Remove support for WordPress 4.6 and below
78
+
79
  = 2.0.1 =
80
  * Enqueue Twitter widgets JavaScript and advertising JavaScript early in the page build process if a widget is active on the page
81
  * Tweet button: update expected length of a wrapped t.co URL with HTTP scheme
src/Twitter/Helpers/Validators/WebsiteTag.php CHANGED
File without changes
src/Twitter/Intents/Traits/Related.php CHANGED
File without changes
src/Twitter/Widgets/Base.php CHANGED
File without changes
src/Twitter/Widgets/Buttons/Follow.php CHANGED
File without changes
src/Twitter/Widgets/Buttons/Periscope/OnAir.php CHANGED
File without changes
src/Twitter/Widgets/Buttons/Tweet.php CHANGED
File without changes
src/Twitter/Widgets/Embeds/Moment.php CHANGED
File without changes
src/Twitter/Widgets/Embeds/Theme.php CHANGED
File without changes
src/Twitter/Widgets/Embeds/Timeline.php CHANGED
File without changes
src/Twitter/Widgets/Embeds/Timeline/Collection.php CHANGED
File without changes
src/Twitter/Widgets/Embeds/Timeline/Profile.php CHANGED
File without changes
src/Twitter/Widgets/Embeds/Timeline/Search.php CHANGED
File without changes
src/Twitter/Widgets/Embeds/Timeline/TwitterList.php CHANGED
File without changes
src/Twitter/Widgets/Embeds/Tweet.php CHANGED
File without changes
src/Twitter/Widgets/Embeds/Tweet/Base.php CHANGED
File without changes
src/Twitter/Widgets/Embeds/Tweet/Video.php CHANGED
File without changes
src/Twitter/Widgets/Embeds/Vine.php CHANGED
File without changes
src/Twitter/WordPress/Admin/Post/TweetIntent.php CHANGED
@@ -149,7 +149,7 @@ class TweetIntent
149
  echo '<table id="tweet-intent">';
150
  echo '<thead><tr><th scope="col">' . esc_html( _x( 'Parameter', 'Customization or variable', 'twitter' ) ) . '</th><th scope="col">' . esc_html( _x( 'Value', 'Table column header: user-inputted value', 'twitter' ) ) . '</th></tr></thead><tbody>';
151
 
152
- $available_characters = 140;
153
  // t.co wrapped URL length
154
  $short_url_length = static::getShortURLLength();
155
  if ( $short_url_length ) {
149
  echo '<table id="tweet-intent">';
150
  echo '<thead><tr><th scope="col">' . esc_html( _x( 'Parameter', 'Customization or variable', 'twitter' ) ) . '</th><th scope="col">' . esc_html( _x( 'Value', 'Table column header: user-inputted value', 'twitter' ) ) . '</th></tr></thead><tbody>';
151
 
152
+ $available_characters = 280;
153
  // t.co wrapped URL length
154
  $short_url_length = static::getShortURLLength();
155
  if ( $short_url_length ) {
src/Twitter/WordPress/Admin/Settings/Buttons/Tweet.php CHANGED
File without changes
src/Twitter/WordPress/Admin/Settings/Cards/SiteAttribution.php CHANGED
File without changes
src/Twitter/WordPress/Admin/Settings/Embeds/Theme.php CHANGED
File without changes
src/Twitter/WordPress/Content/Buttons/Tweet.php CHANGED
File without changes
src/Twitter/WordPress/PluginLoader.php CHANGED
@@ -41,7 +41,7 @@ class PluginLoader
41
  *
42
  * @type string
43
  */
44
- const VERSION = '2.0.1';
45
 
46
  /**
47
  * Unique domain of the plugin's translated text
41
  *
42
  * @type string
43
  */
44
+ const VERSION = '2.0.2';
45
 
46
  /**
47
  * Unique domain of the plugin's translated text
src/Twitter/WordPress/Shortcodes/Advertising/Tracking.php CHANGED
File without changes
src/Twitter/WordPress/Shortcodes/AuthorContext.php CHANGED
File without changes
src/Twitter/WordPress/Shortcodes/Buttons/Follow.php CHANGED
File without changes
src/Twitter/WordPress/Shortcodes/Buttons/Periscope/OnAir.php CHANGED
File without changes
src/Twitter/WordPress/Shortcodes/Buttons/Share.php CHANGED
File without changes
src/Twitter/WordPress/Shortcodes/Embeds/Moment.php CHANGED
File without changes
src/Twitter/WordPress/Shortcodes/Embeds/Timeline.php CHANGED
File without changes
src/Twitter/WordPress/Shortcodes/Embeds/Timeline/Collection.php CHANGED
File without changes
src/Twitter/WordPress/Shortcodes/Embeds/Timeline/CollectionGrid.php CHANGED
File without changes
src/Twitter/WordPress/Shortcodes/Embeds/Timeline/Profile.php CHANGED
File without changes
src/Twitter/WordPress/Shortcodes/Embeds/Timeline/Search.php CHANGED
File without changes
src/Twitter/WordPress/Shortcodes/Embeds/Timeline/TwitterList.php CHANGED
File without changes
src/Twitter/WordPress/Shortcodes/Embeds/Tweet.php CHANGED
File without changes
src/Twitter/WordPress/Shortcodes/Embeds/Tweet/Video.php CHANGED
File without changes
src/Twitter/WordPress/Shortcodes/Embeds/Vine.php CHANGED
File without changes
src/Twitter/WordPress/Shortcodes/Helpers/Attributes.php CHANGED
File without changes
src/Twitter/WordPress/Widgets/Advertising/Tracking.php CHANGED
File without changes
src/Twitter/WordPress/Widgets/Buttons/Follow.php CHANGED
File without changes
src/Twitter/WordPress/Widgets/Buttons/Periscope/OnAir.php CHANGED
File without changes
src/Twitter/WordPress/Widgets/Embeds/Timeline.php CHANGED
File without changes
src/Twitter/WordPress/Widgets/Embeds/Timeline/Collection.php CHANGED
File without changes
src/Twitter/WordPress/Widgets/Embeds/Timeline/Profile.php CHANGED
File without changes
src/Twitter/WordPress/Widgets/Embeds/Timeline/Search.php CHANGED
File without changes
src/Twitter/WordPress/Widgets/Embeds/Timeline/TwitterList.php CHANGED
File without changes
src/Twitter/WordPress/Widgets/Widget.php CHANGED
File without changes
src/Twitter/WordPress/Widgets/WidgetInterface.php CHANGED
File without changes
static/css/admin/post/edit.scss ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // match #postcustomstuff custom field table styling
2
+ // see wp-admin/edit.css
3
+ #twitter-custom {
4
+ table {
5
+ margin: 0;
6
+ width: 100%;
7
+ border: 1px solid #dfdfdf;
8
+ border-spacing: 0;
9
+ background-color: #f9f9f9;
10
+ }
11
+
12
+ thead th {
13
+ padding: 5px 8px 8px;
14
+ background-color: #f1f1f1;
15
+ }
16
+
17
+ tbody th {
18
+ font-family: inherit;
19
+ font-size: inherit;
20
+ font-weight: inherit;
21
+ line-height: inherit;
22
+ text-align: inherit;
23
+ }
24
+
25
+ input {
26
+ width: 96%;
27
+ margin: 8px;
28
+ }
29
+ }
30
+
31
+ #tweet-intent {
32
+ width: 100%;
33
+ }
34
+
35
+ #twitter-card {
36
+ width: 100%;
37
+ }
twitter.php CHANGED
@@ -24,13 +24,13 @@ THE SOFTWARE.
24
  */
25
  /**
26
  * @package twitter
27
- * @version 2.0.1
28
  */
29
  /*
30
  Plugin Name: Twitter
31
  Plugin URI: http://wordpress.org/plugins/twitter/
32
  Description: Official Twitter plugin for WordPress. Embed Twitter content and grow your audience on Twitter. Requires PHP 5.4 or greater.
33
- Version: 2.0.1
34
  Author: Twitter
35
  Author URI: https://dev.twitter.com/
36
  License: MIT
24
  */
25
  /**
26
  * @package twitter
27
+ * @version 2.0.2
28
  */
29
  /*
30
  Plugin Name: Twitter
31
  Plugin URI: http://wordpress.org/plugins/twitter/
32
  Description: Official Twitter plugin for WordPress. Embed Twitter content and grow your audience on Twitter. Requires PHP 5.4 or greater.
33
+ Version: 2.0.2
34
  Author: Twitter
35
  Author URI: https://dev.twitter.com/
36
  License: MIT