diff --git a/src/wp-content/plugins/hello.php b/src/wp-content/plugins/hello.php
index 34e3b68..f59c9bc 100644
|
a
|
b
|
Description: This is not just a plugin, it symbolizes the hope and enthusiasm of |
| 10 | 10 | Author: Matt Mullenweg |
| 11 | 11 | Version: 1.7 |
| 12 | 12 | Author URI: http://ma.tt/ |
| | 13 | Text Domain: hello-dolly |
| 13 | 14 | */ |
| 14 | 15 | |
| 15 | 16 | function hello_dolly_get_lyric() { |
| … |
… |
Dolly'll never go away again"; |
| 52 | 53 | // This just echoes the chosen line, we'll position it later |
| 53 | 54 | function hello_dolly() { |
| 54 | 55 | $chosen = hello_dolly_get_lyric(); |
| 55 | | echo "<p id='dolly'>$chosen</p>"; |
| | 56 | $lang = ''; |
| | 57 | if ( 'en_' === substr( get_user_locale(), 0, 3 ) ) { |
| | 58 | $lang = " lang='en'"; |
| | 59 | } |
| | 60 | |
| | 61 | printf( |
| | 62 | "<p id='dolly'><span class='screen-reader-text'>%s </span><span%s>%s</span></p>", |
| | 63 | __( 'Quote from Hello Dolly song:', 'hello-dolly' ), |
| | 64 | $lang, |
| | 65 | $chosen |
| | 66 | ); |
| 56 | 67 | } |
| 57 | 68 | |
| 58 | 69 | // Now we set that function up to execute when the admin_notices action is called |
| … |
… |
add_action( 'admin_notices', 'hello_dolly' ); |
| 60 | 71 | |
| 61 | 72 | // We need some CSS to position the paragraph |
| 62 | 73 | function dolly_css() { |
| 63 | | // This makes sure that the positioning is also good for right-to-left languages |
| 64 | | $x = is_rtl() ? 'left' : 'right'; |
| 65 | | |
| 66 | 74 | echo " |
| 67 | 75 | <style type='text/css'> |
| 68 | 76 | #dolly { |
| 69 | | float: $x; |
| 70 | | padding-$x: 15px; |
| 71 | | padding-top: 5px; |
| | 77 | float: right; |
| | 78 | padding: 6px 10px 4px 0; |
| 72 | 79 | margin: 0; |
| | 80 | line-height: 1.7; |
| 73 | 81 | font-size: 11px; |
| 74 | 82 | } |
| | 83 | body.rtl #dolly { |
| | 84 | float: left; |
| | 85 | padding: 6px 0 4px 10px; |
| | 86 | } |
| | 87 | @media screen and (max-width: 782px) { |
| | 88 | #dolly { |
| | 89 | float: none; |
| | 90 | } |
| | 91 | } |
| 75 | 92 | </style> |
| 76 | 93 | "; |
| 77 | 94 | } |
| 78 | 95 | |
| 79 | 96 | add_action( 'admin_head', 'dolly_css' ); |
| 80 | | |
| 81 | | |