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