diff --git a/src/wp-content/plugins/hello.php b/src/wp-content/plugins/hello.php
index 34e3b68..d35fee7 100644
|
a
|
b
|
Dolly'll never go away again"; |
| 52 | 52 | // This just echoes the chosen line, we'll position it later |
| 53 | 53 | function hello_dolly() { |
| 54 | 54 | $chosen = hello_dolly_get_lyric(); |
| 55 | | echo "<p id='dolly'>$chosen</p>"; |
| | 55 | $lang = ""; |
| | 56 | if ( false === strpos( get_user_locale(), 'en_' ) ) { |
| | 57 | $lang = "lang='en'"; |
| | 58 | } |
| | 59 | echo "<p id='dolly' $lang><span class='screen-reader-text'>Quote from Hello Dolly song:</span>$chosen</p>"; |
| 56 | 60 | } |
| 57 | 61 | |
| 58 | 62 | // Now we set that function up to execute when the admin_notices action is called |
| … |
… |
add_action( 'admin_notices', 'hello_dolly' ); |
| 60 | 64 | |
| 61 | 65 | // We need some CSS to position the paragraph |
| 62 | 66 | 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 | 67 | echo " |
| 67 | 68 | <style type='text/css'> |
| 68 | 69 | #dolly { |
| 69 | | float: $x; |
| 70 | | padding-$x: 15px; |
| 71 | | padding-top: 5px; |
| | 70 | float: right; |
| | 71 | padding: 6px 10px 4px 0; |
| 72 | 72 | margin: 0; |
| | 73 | line-height: 1.7; |
| 73 | 74 | font-size: 11px; |
| 74 | 75 | } |
| | 76 | body.rtl #dolly { |
| | 77 | float: left; |
| | 78 | padding: 6px 0 4px 10px; |
| | 79 | } |
| | 80 | @media screen and (max-width: 782px) { |
| | 81 | #dolly { |
| | 82 | float: none; |
| | 83 | } |
| | 84 | } |
| 75 | 85 | </style> |
| 76 | 86 | "; |
| 77 | 87 | } |
| 78 | 88 | |
| 79 | 89 | add_action( 'admin_head', 'dolly_css' ); |
| 80 | | |
| 81 | | |