Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins
File: hello.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* @package Hello_Dolly
[2] Fix | Delete
* @version 1.7.2
[3] Fix | Delete
*/
[4] Fix | Delete
/*
[5] Fix | Delete
Plugin Name: Hello Dolly
[6] Fix | Delete
Plugin URI: http://wordpress.org/plugins/hello-dolly/
[7] Fix | Delete
Description: This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong: Hello, Dolly. When activated you will randomly see a lyric from <cite>Hello, Dolly</cite> in the upper right of your admin screen on every page.
[8] Fix | Delete
Author: Matt Mullenweg
[9] Fix | Delete
Version: 1.7.2
[10] Fix | Delete
Author URI: http://ma.tt/
[11] Fix | Delete
*/
[12] Fix | Delete
[13] Fix | Delete
function hello_dolly_get_lyric() {
[14] Fix | Delete
/** These are the lyrics to Hello Dolly */
[15] Fix | Delete
$lyrics = "Hello, Dolly
[16] Fix | Delete
Well, hello, Dolly
[17] Fix | Delete
It's so nice to have you back where you belong
[18] Fix | Delete
You're lookin' swell, Dolly
[19] Fix | Delete
I can tell, Dolly
[20] Fix | Delete
You're still glowin', you're still crowin'
[21] Fix | Delete
You're still goin' strong
[22] Fix | Delete
I feel the room swayin'
[23] Fix | Delete
While the band's playin'
[24] Fix | Delete
One of our old favorite songs from way back when
[25] Fix | Delete
So, take her wrap, fellas
[26] Fix | Delete
Dolly, never go away again
[27] Fix | Delete
Hello, Dolly
[28] Fix | Delete
Well, hello, Dolly
[29] Fix | Delete
It's so nice to have you back where you belong
[30] Fix | Delete
You're lookin' swell, Dolly
[31] Fix | Delete
I can tell, Dolly
[32] Fix | Delete
You're still glowin', you're still crowin'
[33] Fix | Delete
You're still goin' strong
[34] Fix | Delete
I feel the room swayin'
[35] Fix | Delete
While the band's playin'
[36] Fix | Delete
One of our old favorite songs from way back when
[37] Fix | Delete
So, golly, gee, fellas
[38] Fix | Delete
Have a little faith in me, fellas
[39] Fix | Delete
Dolly, never go away
[40] Fix | Delete
Promise, you'll never go away
[41] Fix | Delete
Dolly'll never go away again";
[42] Fix | Delete
[43] Fix | Delete
// Here we split it into lines.
[44] Fix | Delete
$lyrics = explode( "\n", $lyrics );
[45] Fix | Delete
[46] Fix | Delete
// And then randomly choose a line.
[47] Fix | Delete
return wptexturize( $lyrics[ mt_rand( 0, count( $lyrics ) - 1 ) ] );
[48] Fix | Delete
}
[49] Fix | Delete
[50] Fix | Delete
// This just echoes the chosen line, we'll position it later.
[51] Fix | Delete
function hello_dolly() {
[52] Fix | Delete
$chosen = hello_dolly_get_lyric();
[53] Fix | Delete
$lang = '';
[54] Fix | Delete
if ( 'en_' !== substr( get_user_locale(), 0, 3 ) ) {
[55] Fix | Delete
$lang = ' lang="en"';
[56] Fix | Delete
}
[57] Fix | Delete
[58] Fix | Delete
printf(
[59] Fix | Delete
'<p id="dolly"><span class="screen-reader-text">%s </span><span dir="ltr"%s>%s</span></p>',
[60] Fix | Delete
__( 'Quote from Hello Dolly song, by Jerry Herman:' ),
[61] Fix | Delete
$lang,
[62] Fix | Delete
$chosen
[63] Fix | Delete
);
[64] Fix | Delete
}
[65] Fix | Delete
[66] Fix | Delete
// Now we set that function up to execute when the admin_notices action is called.
[67] Fix | Delete
add_action( 'admin_notices', 'hello_dolly' );
[68] Fix | Delete
[69] Fix | Delete
// We need some CSS to position the paragraph.
[70] Fix | Delete
function dolly_css() {
[71] Fix | Delete
echo "
[72] Fix | Delete
<style type='text/css'>
[73] Fix | Delete
#dolly {
[74] Fix | Delete
float: right;
[75] Fix | Delete
padding: 5px 10px;
[76] Fix | Delete
margin: 0;
[77] Fix | Delete
font-size: 12px;
[78] Fix | Delete
line-height: 1.6666;
[79] Fix | Delete
}
[80] Fix | Delete
.rtl #dolly {
[81] Fix | Delete
float: left;
[82] Fix | Delete
}
[83] Fix | Delete
.block-editor-page #dolly {
[84] Fix | Delete
display: none;
[85] Fix | Delete
}
[86] Fix | Delete
@media screen and (max-width: 782px) {
[87] Fix | Delete
#dolly,
[88] Fix | Delete
.rtl #dolly {
[89] Fix | Delete
float: none;
[90] Fix | Delete
padding-left: 0;
[91] Fix | Delete
padding-right: 0;
[92] Fix | Delete
}
[93] Fix | Delete
}
[94] Fix | Delete
</style>
[95] Fix | Delete
";
[96] Fix | Delete
}
[97] Fix | Delete
[98] Fix | Delete
add_action( 'admin_head', 'dolly_css' );
[99] Fix | Delete
[100] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function