Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r16270 r14360  
    22/**
    33 * @package Hello_Dolly
    4  * @version 1.6
     4 * @version 1.5.1
    55 */
    66/*
    77Plugin Name: Hello Dolly
    8 Plugin URI: http://wordpress.org/extend/plugins/hello-dolly/
     8Plugin URI: http://wordpress.org/#
    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.6
     11Version: 1.5.1
    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_notices action is called
    60 add_action( 'admin_notices', 'hello_dolly' );
     59// Now we set that function up to execute when the admin_footer action is called
     60add_action('admin_footer', 'hello_dolly');
    6161
    6262// We need some CSS to position the paragraph
    6363function dolly_css() {
    64     // This makes sure that the positioning is also good for right-to-left languages
    65     $x = is_rtl() ? 'left' : 'right';
     64    // This makes sure that the posinioning 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         float: $x;
    71         padding-$x: 15px;
    72         padding-top: 5px;       
     70        position: absolute;
     71        top: 4.5em;
    7372        margin: 0;
     73        padding: 0;
     74        $x: 215px;
    7475        font-size: 11px;
    7576    }
     
    7879}
    7980
    80 add_action( 'admin_head', 'dolly_css' );
     81add_action('admin_head', 'dolly_css');
    8182
    8283?>
Note: See TracChangeset for help on using the changeset viewer.