Changeset 9684

Show
Ignore:
Timestamp:
11/14/08 17:52:38 (2 months ago)
Author:
ryan
Message:

Hello Dolly update. Props zedlander and jacobsantos. fixes #8188

Files:

Legend:

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

    r9001 r9684  
    22/** 
    33 * @package Hello_Dolly 
     4 * @author Matt Mullenweg 
     5 * @version 1.5 
    46 */ 
    57/* 
     
    1214*/ 
    1315 
    14 /** These are the lyrics to Hello Dolly */ 
    15 $lyrics = "Hello, Dolly 
     16function hello_dolly_get_lyric() { 
     17    /** These are the lyrics to Hello Dolly */ 
     18    $lyrics = "Hello, Dolly 
    1619Well, hello, Dolly 
    1720It's so nice to have you back where you belong 
     
    4245Dolly'll never go away again"; 
    4346 
    44 // Here we split it into lines 
    45 $lyrics = explode("\n", $lyrics); 
    46 // And then randomly choose a line 
    47 $chosen = wptexturize( $lyrics[ mt_rand(0, count($lyrics) - 1) ] ); 
     47    // Here we split it into lines 
     48    $lyrics = explode("\n", $lyrics); 
     49 
     50    // And then randomly choose a line 
     51    return wptexturize( $lyrics[ mt_rand(0, count($lyrics) - 1) ] ); 
     52
    4853 
    4954// This just echoes the chosen line, we'll position it later 
    5055function hello_dolly() { 
    51     global $chosen
     56    $chosen = hello_dolly_get_lyric()
    5257    echo "<p id='dolly'>$chosen</p>"; 
    5358} 
     
    6267    #dolly { 
    6368        position: absolute; 
    64         top: 2.3em; 
     69        top: 4.5em; 
    6570        margin: 0; 
    6671        padding: 0; 
    67         right: 10px; 
    68         font-size: 16px; 
    69         color: #d54e21; 
     72        right: 215px; 
     73        font-size: 11px; 
    7074    } 
    7175    </style>