diff --git a/src/wp-content/plugins/hello.php b/src/wp-content/plugins/hello.php
index 189653b..bf8040c 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.1 |
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"%s><span class="screen-reader-text">%s </span><span>%s</span></p>', |
| 63 | $lang, |
| 64 | __( 'Quote from Hello Dolly song, by Jerry Herman:', 'hello-dolly' ), |
| 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 | } |
75 | 87 | .block-editor-page #dolly { |
76 | 88 | display: none; |
77 | 89 | } |
| 90 | @media screen and (max-width: 782px) { |
| 91 | #dolly { |
| 92 | float: none; |
| 93 | } |
| 94 | } |
78 | 95 | </style> |
79 | 96 | "; |
80 | 97 | } |