Ticket #30353: 30353.patch
File 30353.patch, 12.3 KB (added by , 11 years ago) |
---|
-
wp-content/plugins/hello/.gitignore
1 /.idea -
wp-content/plugins/hello/.travis.yml
1 language: php 2 3 php: 4 - 5.3 5 - 5.4 6 7 env: 8 - WP_VERSION=latest WP_MULTISITE=0 9 - WP_VERSION=latest WP_MULTISITE=1 10 - WP_VERSION=3.8 WP_MULTISITE=0 11 - WP_VERSION=3.8 WP_MULTISITE=1 12 13 before_script: 14 - bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION 15 16 script: phpunit -
wp-content/plugins/hello/hello.php
1 <?php 2 /** 3 * @package Hello_Dolly 4 * @version 1.7 5 */ 6 /* 7 * Plugin Name: Hello Dolly 8 * Plugin URI: http://wordpress.org/plugins/hello-dolly/ 9 * Description: This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong: Hello, Dolly. When activated you will randomly see a lyric from <cite>Hello, Dolly</cite> in the upper right of your admin screen on every page. 10 * Author: Matt Mullenweg 11 * Version: 1.7 12 * Author URI: http://ma.tt/ 13 * Text Domain: hello-dolly 14 */ 15 16 17 // load langauge 18 load_plugin_textdomain('hello-dolly', false, basename( dirname( __FILE__ ) ) . '/languages' ); 19 20 21 /** 22 * @return string 23 */ 24 function hello_dolly_get_lyric() { 25 /** These are the lyrics to Hello Dolly */ 26 $lyrics = _x( "Hello, Dolly 27 Well, hello, Dolly 28 It's so nice to have you back where you belong 29 You're lookin' swell, Dolly 30 I can tell, Dolly 31 You're still glowin', you're still crowin' 32 You're still goin' strong 33 We feel the room swayin' 34 While the band's playin' 35 One of your old favourite songs from way back when 36 So, take her wrap, fellas 37 Find her an empty lap, fellas 38 Dolly'll never go away again 39 Hello, Dolly 40 Well, hello, Dolly 41 It's so nice to have you back where you belong 42 You're lookin' swell, Dolly 43 I can tell, Dolly 44 You're still glowin', you're still crowin' 45 You're still goin' strong 46 We feel the room swayin' 47 While the band's playin' 48 One of your old favourite songs from way back when 49 Golly, gee, fellas 50 Find her a vacant knee, fellas 51 Dolly'll never go away 52 Dolly'll never go away 53 Dolly'll never go away again", 'hello-dolly', 'lyrics: Hello, Dolly by Louis Armstrong' ); 54 55 // Here we split it into lines 56 $lyrics = explode( "\n", $lyrics ); 57 58 // And then randomly choose a line 59 return wptexturize( $lyrics[ mt_rand( 0, count( $lyrics ) - 1 ) ] ); 60 } 61 62 63 64 /** 65 * This just echoes the chosen line, we'll position it later 66 */ 67 function hello_dolly() { 68 $chosen = hello_dolly_get_lyric(); 69 printf( '<p id="dolly"><span class="screen-reader-text">%s </span>%s</p>', 70 _x( 'A random lyric from Hello, Dolly by Louis Armstrong: ','hello-dolly', 'a11n aria-label' ), 71 esc_html( $chosen ) ); 72 } 73 74 // Now we set that function up to execute when the admin_notices action is called 75 add_action( 'admin_notices', 'hello_dolly' ); 76 77 78 /** 79 * We need some CSS to position the paragraph 80 */ 81 function dolly_css() { 82 // This makes sure that the positioning is also good for right-to-left languages 83 $x = is_rtl() ? 'left' : 'right'; 84 85 printf(' 86 <style type="text/css"> 87 #dolly { 88 float: %1$s; 89 padding-%1$s: 15px; 90 padding-top: 5px; 91 margin: 0; 92 font-size: 11px; 93 } 94 </style> 95 ', esc_attr( $x ) ); 96 } 97 98 add_action( 'admin_head', 'dolly_css' ); 99 100 ?> -
wp-content/plugins/hello/phpunit.xml
1 <phpunit 2 bootstrap="tests/bootstrap.php" 3 backupGlobals="false" 4 colors="true" 5 convertErrorsToExceptions="true" 6 convertNoticesToExceptions="true" 7 convertWarningsToExceptions="true" 8 > 9 <testsuites> 10 <testsuite> 11 <directory prefix="test-" suffix=".php">./tests/</directory> 12 </testsuite> 13 </testsuites> 14 </phpunit> -
wp-content/plugins/hello/readme.txt
1 === Hello Dolly === 2 Contributors: matt 3 Requires at least: 3.0 4 Stable tag: 1.6 5 Tested up to: 4.0 6 License: GPLv2 or later 7 License URI: http://www.gnu.org/licenses/gpl-2.0.html 8 Contributors: matt 9 10 This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong. 11 12 == Description == 13 This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong: Hello, Dolly. When activated you will randomly see a lyric from Hello, Dolly in the upper right of your admin screen on every page. 14 15 16 == Installation == 17 Hello Dolly is installed as part of core. If you have deleted it you can reinstall Hello Dolly using the built in WordPress plugin installer. If you download BuddyPress manually, make sure it is uploaded to \"/wp-content/plugins/buddypress/\". 18 19 Activate Hello Dolly in the \"Plugins\" admin panel using the \"Activate\" link. If you\'re using WordPress Multisite, you can choose to activate BuddyPress network wide for full integration with all of your site. 20 21 22 == Changelog == 23 == 1.8 == 24 Added late escaping 25 Added support on i8n 26 Added Unit tests 27 update readme 28 version bump 29 @props WordCamp Toronto 2014 30 31 == 1.7 == 32 Version bump 33 34 ==1.6== 35 Version bump 36 37 == 1.5 == 38 New URL 39 40 == Upgrade Notice == 41 n/a 42 No newline at end of file -
wp-content/plugins/hello/.gitignore
1 /.idea -
wp-content/plugins/hello/.travis.yml
1 language: php 2 3 php: 4 - 5.3 5 - 5.4 6 7 env: 8 - WP_VERSION=latest WP_MULTISITE=0 9 - WP_VERSION=latest WP_MULTISITE=1 10 - WP_VERSION=3.8 WP_MULTISITE=0 11 - WP_VERSION=3.8 WP_MULTISITE=1 12 13 before_script: 14 - bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION 15 16 script: phpunit -
wp-content/plugins/hello/hello.php
1 <?php 2 /** 3 * @package Hello_Dolly 4 * @version 1.7 5 */ 6 /* 7 * Plugin Name: Hello Dolly 8 * Plugin URI: http://wordpress.org/plugins/hello-dolly/ 9 * Description: This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong: Hello, Dolly. When activated you will randomly see a lyric from <cite>Hello, Dolly</cite> in the upper right of your admin screen on every page. 10 * Author: Matt Mullenweg 11 * Version: 1.7 12 * Author URI: http://ma.tt/ 13 * Text Domain: hello-dolly 14 */ 15 16 17 // load langauge 18 load_plugin_textdomain('hello-dolly', false, basename( dirname( __FILE__ ) ) . '/languages' ); 19 20 21 /** 22 * @return string 23 */ 24 function hello_dolly_get_lyric() { 25 /** These are the lyrics to Hello Dolly */ 26 $lyrics = _x( "Hello, Dolly 27 Well, hello, Dolly 28 It's so nice to have you back where you belong 29 You're lookin' swell, Dolly 30 I can tell, Dolly 31 You're still glowin', you're still crowin' 32 You're still goin' strong 33 We feel the room swayin' 34 While the band's playin' 35 One of your old favourite songs from way back when 36 So, take her wrap, fellas 37 Find her an empty lap, fellas 38 Dolly'll never go away again 39 Hello, Dolly 40 Well, hello, Dolly 41 It's so nice to have you back where you belong 42 You're lookin' swell, Dolly 43 I can tell, Dolly 44 You're still glowin', you're still crowin' 45 You're still goin' strong 46 We feel the room swayin' 47 While the band's playin' 48 One of your old favourite songs from way back when 49 Golly, gee, fellas 50 Find her a vacant knee, fellas 51 Dolly'll never go away 52 Dolly'll never go away 53 Dolly'll never go away again", 'hello-dolly', 'lyrics: Hello, Dolly by Louis Armstrong' ); 54 55 // Here we split it into lines 56 $lyrics = explode( "\n", $lyrics ); 57 58 // And then randomly choose a line 59 return wptexturize( $lyrics[ mt_rand( 0, count( $lyrics ) - 1 ) ] ); 60 } 61 62 63 64 /** 65 * This just echoes the chosen line, we'll position it later 66 */ 67 function hello_dolly() { 68 $chosen = hello_dolly_get_lyric(); 69 printf( '<p id="dolly"><span class="screen-reader-text">%s </span>%s</p>', 70 _x( 'A random lyric from Hello, Dolly by Louis Armstrong: ','hello-dolly', 'a11n aria-label' ), 71 esc_html( $chosen ) ); 72 } 73 74 // Now we set that function up to execute when the admin_notices action is called 75 add_action( 'admin_notices', 'hello_dolly' ); 76 77 78 /** 79 * We need some CSS to position the paragraph 80 */ 81 function dolly_css() { 82 // This makes sure that the positioning is also good for right-to-left languages 83 $x = is_rtl() ? 'left' : 'right'; 84 85 printf(' 86 <style type="text/css"> 87 #dolly { 88 float: %1$s; 89 padding-%1$s: 15px; 90 padding-top: 5px; 91 margin: 0; 92 font-size: 11px; 93 } 94 </style> 95 ', esc_attr( $x ) ); 96 } 97 98 add_action( 'admin_head', 'dolly_css' ); 99 100 ?> -
wp-content/plugins/hello/phpunit.xml
1 <phpunit 2 bootstrap="tests/bootstrap.php" 3 backupGlobals="false" 4 colors="true" 5 convertErrorsToExceptions="true" 6 convertNoticesToExceptions="true" 7 convertWarningsToExceptions="true" 8 > 9 <testsuites> 10 <testsuite> 11 <directory prefix="test-" suffix=".php">./tests/</directory> 12 </testsuite> 13 </testsuites> 14 </phpunit> -
wp-content/plugins/hello/readme.txt
1 === Hello Dolly === 2 Contributors: matt 3 Requires at least: 3.0 4 Stable tag: 1.6 5 Tested up to: 4.0 6 License: GPLv2 or later 7 License URI: http://www.gnu.org/licenses/gpl-2.0.html 8 Contributors: matt 9 10 This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong. 11 12 == Description == 13 This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong: Hello, Dolly. When activated you will randomly see a lyric from Hello, Dolly in the upper right of your admin screen on every page. 14 15 16 == Installation == 17 Hello Dolly is installed as part of core. If you have deleted it you can reinstall Hello Dolly using the built in WordPress plugin installer. If you download BuddyPress manually, make sure it is uploaded to \"/wp-content/plugins/buddypress/\". 18 19 Activate Hello Dolly in the \"Plugins\" admin panel using the \"Activate\" link. If you\'re using WordPress Multisite, you can choose to activate BuddyPress network wide for full integration with all of your site. 20 21 22 == Changelog == 23 == 1.8 == 24 Added late escaping 25 Added support on i8n 26 Added Unit tests 27 update readme 28 version bump 29 @props WordCamp Toronto 2014 30 31 == 1.7 == 32 Version bump 33 34 ==1.6== 35 Version bump 36 37 == 1.5 == 38 New URL 39 40 == Upgrade Notice == 41 n/a 42 No newline at end of file