X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/699231ae09f7057a4d0000cdf32e50a3df6a04ca..2329f698283944696a7076258cf816545970bb47:/wp-content/plugins/hello.php?ds=sidebyside diff --git a/wp-content/plugins/hello.php b/wp-content/plugins/hello.php index 2877f083..2b1e07b5 100644 --- a/wp-content/plugins/hello.php +++ b/wp-content/plugins/hello.php @@ -1,14 +1,14 @@ Hello, Dolly in the upper right of your admin screen on every page. Author: Matt Mullenweg -Version: 1.5.1 +Version: 1.6 Author URI: http://ma.tt/ */ @@ -44,10 +44,10 @@ Dolly'll never go away Dolly'll never go away again"; // Here we split it into lines - $lyrics = explode("\n", $lyrics); + $lyrics = explode( "\n", $lyrics ); // And then randomly choose a line - return wptexturize( $lyrics[ mt_rand(0, count($lyrics) - 1) ] ); + return wptexturize( $lyrics[ mt_rand( 0, count( $lyrics ) - 1 ) ] ); } // This just echoes the chosen line, we'll position it later @@ -56,28 +56,27 @@ function hello_dolly() { echo "

$chosen

"; } -// Now we set that function up to execute when the admin_footer action is called -add_action('admin_footer', 'hello_dolly'); +// Now we set that function up to execute when the admin_notices action is called +add_action( 'admin_notices', 'hello_dolly' ); // We need some CSS to position the paragraph function dolly_css() { - // This makes sure that the posinioning is also good for right-to-left languages - $x = ( is_rtl() ) ? 'left' : 'right'; + // This makes sure that the positioning is also good for right-to-left languages + $x = is_rtl() ? 'left' : 'right'; echo " "; } -add_action('admin_head', 'dolly_css'); +add_action( 'admin_head', 'dolly_css' ); ?>