Make WordPress Core

Ticket #43555: 43555.diff

File 43555.diff, 1.9 KB (added by joemcgill, 6 years ago)
  • src/wp-content/plugins/hello.php

    diff --git src/wp-content/plugins/hello.php src/wp-content/plugins/hello.php
    index cd9b375689..3cf136f7bb 100644
    Author URI: http://ma.tt/ 
    1515function hello_dolly_get_lyric() {
    1616        /** These are the lyrics to Hello Dolly */
    1717        $lyrics = "Hello, Dolly
    18 Well, hello, Dolly
     18This is miss Dolly
    1919It's so nice to have you back where you belong
    2020You're lookin' swell, Dolly
    2121I can tell, Dolly
    2222You're still glowin', you're still crowin'
    2323You're still goin' strong
    24 We feel the room swayin'
     24I feel the room swayin'
    2525While the band's playin'
    26 One of your old favourite songs from way back when
     26One of our old favorite songs from way back when
    2727So, take her wrap, fellas
    2828Find her an empty lap, fellas
    29 Dolly'll never go away again
     29Dolly, never go away again
    3030Hello, Dolly
    3131Well, hello, Dolly
    3232It's so nice to have you back where you belong
    You're lookin' swell, Dolly 
    3434I can tell, Dolly
    3535You're still glowin', you're still crowin'
    3636You're still goin' strong
    37 We feel the room swayin'
     37I feel the room swayin'
    3838While the band's playin'
    39 One of your old favourite songs from way back when
    40 Golly, gee, fellas
    41 Find her a vacant knee, fellas
    42 Dolly'll never go away
    43 Dolly'll never go away
    44 Dolly'll never go away again";
     39One of our old favorite songs from way back when
     40So, golly, gee, fellas
     41Have a little faith in me, fellas
     42Dolly, never go away
     43Promise, you'll never go away
     44Dolly, never go away again";
    4545
    4646        // Here we split it into lines
    4747        $lyrics = explode( "\n", $lyrics );
    4848
     49        // Ensure certain lines aren't shown out of context.
     50        $unshown = array(
     51                'So, take her wrap, fellas',
     52                'Find her an empty lap, fellas',
     53        );
     54
     55        $lyrics = array_diff( $lyrics, $unshown );
     56
    4957        // And then randomly choose a line
    5058        return wptexturize( $lyrics[ mt_rand( 0, count( $lyrics ) - 1 ) ] );
    5159}