1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- <?php
- function hello_dolly_get_lyric() {
-
- $lyrics = "Hello, Dolly
- Well, hello, Dolly
- It's so nice to have you back where you belong
- You're lookin' swell, Dolly
- I can tell, Dolly
- You're still glowin', you're still crowin'
- You're still goin' strong
- We feel the room swayin'
- While the band's playin'
- One of your old favourite songs from way back when
- So, take her wrap, fellas
- Find her an empty lap, fellas
- Dolly'll never go away again
- Hello, Dolly
- Well, hello, Dolly
- It's so nice to have you back where you belong
- You're lookin' swell, Dolly
- I can tell, Dolly
- You're still glowin', you're still crowin'
- You're still goin' strong
- We feel the room swayin'
- While the band's playin'
- One of your old favourite songs from way back when
- Golly, gee, fellas
- Find her a vacant knee, fellas
- Dolly'll never go away
- Dolly'll never go away
- Dolly'll never go away again";
-
- $lyrics = explode( "\n", $lyrics );
-
- return wptexturize( $lyrics[ mt_rand( 0, count( $lyrics ) - 1 ) ] );
- }
- function hello_dolly() {
- $chosen = hello_dolly_get_lyric();
- echo "<p id='dolly'>$chosen</p>";
- }
- add_action( 'admin_notices', 'hello_dolly' );
- function dolly_css() {
-
- $x = is_rtl() ? 'left' : 'right';
- echo "
- <style type='text/css'>
- #dolly {
- float: $x;
- padding-$x: 15px;
- padding-top: 5px;
- margin: 0;
- font-size: 11px;
- }
- </style>
- ";
- }
- add_action( 'admin_head', 'dolly_css' );
- ?>
|