Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/plugins/hello.php

    r14360 r16270  
    22/**
    33 * @package Hello_Dolly
    4  * @version 1.5.1
     4 * @version 1.6
    55 */
    66/*
    77Plugin Name: Hello Dolly
    8 Plugin URI: http://wordpress.org/#
     8Plugin URI: http://wordpress.org/extend/plugins/hello-dolly/
    99Description: 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.
    1010Author: Matt Mullenweg
    11 Version: 1.5.1
     11Version: 1.6
    1212Author URI: http://ma.tt/
    1313*/
     
    4545
    4646        // Here we split it into lines
    47         $lyrics = explode("\n", $lyrics);
     47        $lyrics = explode( "\n", $lyrics );
    4848
    4949        // And then randomly choose a line
    50         return wptexturize( $lyrics[ mt_rand(0, count($lyrics) - 1) ] );
     50        return wptexturize( $lyrics[ mt_rand( 0, count( $lyrics ) - 1 ) ] );
    5151}
    5252
     
    5757}
    5858
    59 // Now we set that function up to execute when the admin_footer action is called
    60 add_action('admin_footer', 'hello_dolly');
     59// Now we set that function up to execute when the admin_notices action is called
     60add_action( 'admin_notices', 'hello_dolly' );
    6161
    6262// We need some CSS to position the paragraph
    6363function dolly_css() {
    64         // This makes sure that the posinioning is also good for right-to-left languages
    65         $x = ( is_rtl() ) ? 'left' : 'right';
     64        // This makes sure that the positioning is also good for right-to-left languages
     65        $x = is_rtl() ? 'left' : 'right';
    6666
    6767        echo "
    6868        <style type='text/css'>
    6969        #dolly {
    70                 position: absolute;
    71                 top: 4.5em;
     70                float: $x;
     71                padding-$x: 15px;
     72                padding-top: 5px;               
    7273                margin: 0;
    73                 padding: 0;
    74                 $x: 215px;
    7574                font-size: 11px;
    7675        }
     
    7978}
    8079
    81 add_action('admin_head', 'dolly_css');
     80add_action( 'admin_head', 'dolly_css' );
    8281
    8382?>
Note: See TracChangeset for help on using the changeset viewer.