Ticket #29540: 29540.diff
| File 29540.diff, 5.8 KB (added by , 11 years ago) |
|---|
-
new file src/wp-content/plugins/hello-dolly/hello.php
diff --git a/src/wp-content/plugins/hello-dolly/hello.php b/src/wp-content/plugins/hello-dolly/hello.php new file mode 100644 index 0000000..2a4e150
- + 1 <?php 2 /** 3 * @package Hello_Dolly 4 * @version 1.6 5 */ 6 /* 7 Plugin Name: Hello Dolly 8 Plugin URI: http://wordpress.org/extend/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.6 12 Author URI: http://ma.tt/ 13 */ 14 15 function hello_dolly_get_lyric() { 16 /** These are the lyrics to Hello Dolly */ 17 $lyrics = "Hello, Dolly 18 Well, hello, Dolly 19 It's so nice to have you back where you belong 20 You're lookin' swell, Dolly 21 I can tell, Dolly 22 You're still glowin', you're still crowin' 23 You're still goin' strong 24 We feel the room swayin' 25 While the band's playin' 26 One of your old favourite songs from way back when 27 So, take her wrap, fellas 28 Find her an empty lap, fellas 29 Dolly'll never go away again 30 Hello, Dolly 31 Well, hello, Dolly 32 It's so nice to have you back where you belong 33 You're lookin' swell, Dolly 34 I can tell, Dolly 35 You're still glowin', you're still crowin' 36 You're still goin' strong 37 We feel the room swayin' 38 While the band's playin' 39 One of your old favourite songs from way back when 40 Golly, gee, fellas 41 Find her a vacant knee, fellas 42 Dolly'll never go away 43 Dolly'll never go away 44 Dolly'll never go away again"; 45 46 // Here we split it into lines 47 $lyrics = explode( "\n", $lyrics ); 48 49 // And then randomly choose a line 50 return wptexturize( $lyrics[ mt_rand( 0, count( $lyrics ) - 1 ) ] ); 51 } 52 53 // This just echoes the chosen line, we'll position it later 54 function hello_dolly() { 55 $chosen = hello_dolly_get_lyric(); 56 echo "<p id='dolly'>$chosen</p>"; 57 } 58 59 // Now we set that function up to execute when the admin_notices action is called 60 add_action( 'admin_notices', 'hello_dolly' ); 61 62 // We need some CSS to position the paragraph 63 function dolly_css() { 64 // This makes sure that the positioning is also good for right-to-left languages 65 $x = is_rtl() ? 'left' : 'right'; 66 67 echo " 68 <style type='text/css'> 69 #dolly { 70 float: $x; 71 padding-$x: 15px; 72 padding-top: 5px; 73 margin: 0; 74 font-size: 11px; 75 } 76 </style> 77 "; 78 } 79 80 add_action( 'admin_head', 'dolly_css' ); 81 82 ?> 83 No newline at end of file -
new file src/wp-content/plugins/hello-dolly/readme.txt
diff --git a/src/wp-content/plugins/hello-dolly/readme.txt b/src/wp-content/plugins/hello-dolly/readme.txt new file mode 100644 index 0000000..f4f18af
- + 1 === Hello Dolly === 2 Contributors: matt 3 Requires at least: 3.0 4 Stable tag: 1.6 5 Tested up to: 4.0 6 7 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. 8 9 == Description == 10 11 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. -
deleted file src/wp-content/plugins/hello.php
diff --git a/src/wp-content/plugins/hello.php b/src/wp-content/plugins/hello.php deleted file mode 100644 index 2b1e07b..0000000
+ - 1 <?php2 /**3 * @package Hello_Dolly4 * @version 1.65 */6 /*7 Plugin Name: Hello Dolly8 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 Mullenweg11 Version: 1.612 Author URI: http://ma.tt/13 */14 15 function hello_dolly_get_lyric() {16 /** These are the lyrics to Hello Dolly */17 $lyrics = "Hello, Dolly18 Well, hello, Dolly19 It's so nice to have you back where you belong20 You're lookin' swell, Dolly21 I can tell, Dolly22 You're still glowin', you're still crowin'23 You're still goin' strong24 We feel the room swayin'25 While the band's playin'26 One of your old favourite songs from way back when27 So, take her wrap, fellas28 Find her an empty lap, fellas29 Dolly'll never go away again30 Hello, Dolly31 Well, hello, Dolly32 It's so nice to have you back where you belong33 You're lookin' swell, Dolly34 I can tell, Dolly35 You're still glowin', you're still crowin'36 You're still goin' strong37 We feel the room swayin'38 While the band's playin'39 One of your old favourite songs from way back when40 Golly, gee, fellas41 Find her a vacant knee, fellas42 Dolly'll never go away43 Dolly'll never go away44 Dolly'll never go away again";45 46 // Here we split it into lines47 $lyrics = explode( "\n", $lyrics );48 49 // And then randomly choose a line50 return wptexturize( $lyrics[ mt_rand( 0, count( $lyrics ) - 1 ) ] );51 }52 53 // This just echoes the chosen line, we'll position it later54 function hello_dolly() {55 $chosen = hello_dolly_get_lyric();56 echo "<p id='dolly'>$chosen</p>";57 }58 59 // Now we set that function up to execute when the admin_notices action is called60 add_action( 'admin_notices', 'hello_dolly' );61 62 // We need some CSS to position the paragraph63 function dolly_css() {64 // This makes sure that the positioning is also good for right-to-left languages65 $x = is_rtl() ? 'left' : 'right';66 67 echo "68 <style type='text/css'>69 #dolly {70 float: $x;71 padding-$x: 15px;72 padding-top: 5px;73 margin: 0;74 font-size: 11px;75 }76 </style>77 ";78 }79 80 add_action( 'admin_head', 'dolly_css' );81 82 ?>