From 9c3f80eccb19afb5668ed57d408ade9f729e4881 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Wed, 10 Nov 2010 12:43:04 +0000 Subject: [PATCH] Hello Dolly 1.6. fixes typo, props sbressler, fixes #15229. Removes absolute from positioning, props kapeels, fixes #15228. Add some whitespace. git-svn-id: https://develop.svn.wordpress.org/trunk@16270 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-content/plugins/hello.php | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/wp-content/plugins/hello.php b/wp-content/plugins/hello.php index 2877f08346..d2287e2425 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' ); ?>