11<?php
2+
23/**
3- * @package Hello_Dolly
44 * @version 1.7.2
55 */
66/*
1212Author URI: http://ma.tt/
1313*/
1414
15- function hello_dolly_get_lyric () {
16- /** These are the lyrics to Hello Dolly */
17- $ lyrics = "Hello, Dolly
15+ function hello_dolly_get_lyric ()
16+ {
17+ /** These are the lyrics to Hello Dolly */
18+ $ lyrics = "Hello, Dolly
1819Well, hello, Dolly
1920It's so nice to have you back where you belong
2021You're lookin' swell, Dolly
@@ -42,35 +43,37 @@ function hello_dolly_get_lyric() {
4243Promise, you'll never go away
4344Dolly'll never go away again " ;
4445
45- // Here we split it into lines.
46- $ lyrics = explode ( "\n" , $ lyrics );
46+ // Here we split it into lines.
47+ $ lyrics = explode ("\n" , $ lyrics );
4748
48- // And then randomly choose a line.
49- return wptexturize ( $ lyrics [ mt_rand ( 0 , count ( $ lyrics ) - 1 ) ] );
49+ // And then randomly choose a line.
50+ return wptexturize ($ lyrics [mt_rand (0 , count ($ lyrics ) - 1 )] );
5051}
5152
5253// This just echoes the chosen line, we'll position it later.
53- function hello_dolly () {
54- $ chosen = hello_dolly_get_lyric ();
55- $ lang = '' ;
56- if ( 'en_ ' !== substr ( get_user_locale (), 0 , 3 ) ) {
57- $ lang = ' lang="en" ' ;
58- }
54+ function hello_dolly ()
55+ {
56+ $ chosen = hello_dolly_get_lyric ();
57+ $ lang = '' ;
58+ if (substr (get_user_locale (), 0 , 3 ) !== 'en_ ' ) {
59+ $ lang = ' lang="en" ' ;
60+ }
5961
60- printf (
61- '<p id="dolly"><span class="screen-reader-text">%s </span><span dir="ltr"%s>%s</span></p> ' ,
62- __ ( 'Quote from Hello Dolly song, by Jerry Herman: ' , 'hello-dolly ' ),
63- $ lang ,
64- $ chosen
65- );
62+ printf (
63+ '<p id="dolly"><span class="screen-reader-text">%s </span><span dir="ltr"%s>%s</span></p> ' ,
64+ __ ('Quote from Hello Dolly song, by Jerry Herman: ' , 'hello-dolly ' ),
65+ $ lang ,
66+ $ chosen
67+ );
6668}
6769
6870// Now we set that function up to execute when the admin_notices action is called.
69- add_action ( 'admin_notices ' , 'hello_dolly ' );
71+ add_action ('admin_notices ' , 'hello_dolly ' );
7072
7173// We need some CSS to position the paragraph.
72- function dolly_css () {
73- echo "
74+ function dolly_css ()
75+ {
76+ echo "
7477 <style type='text/css'>
7578 #dolly {
7679 float: right;
@@ -97,4 +100,4 @@ function dolly_css() {
97100 " ;
98101}
99102
100- add_action ( 'admin_head ' , 'dolly_css ' );
103+ add_action ('admin_head ' , 'dolly_css ' );
0 commit comments