X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/4f4e083f6f77639c41e2b1ddb200de8e34301cee..3194d1bb103c2d8db4f44feeced5e58ee2756658:/wp-content/plugins/hello.php diff --git a/wp-content/plugins/hello.php b/wp-content/plugins/hello.php index a80b1ea2..2b1e07b5 100644 --- a/wp-content/plugins/hello.php +++ b/wp-content/plugins/hello.php @@ -1,15 +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/ */ @@ -45,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 @@ -57,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 = ( 'rtl' == get_bloginfo( 'text_direction' ) ) ? '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' ); ?>