Hello Slayer

I modified the Hello Dolly plugin to use the lyrics of Slayer’s Raining Blood. Here’s the modified code:

 * @package Hello_Dolly
 * @version 1.6
Plugin Name: Hello Dolly
Original Plugin URI: http://wordpress.org/extend/plugins/hello-dolly/
Description: Modified plugin of Hello Dolly plugin using Slayer's Raining Blood
Author: Matt Mullenweg
Version: 1.6
Author URI: http://ma.tt/
function hello_dolly_get_lyric() {
/** These are the lyrics to Hello Dolly */
$lyrics = "Trapped in purgatory
A lifeless object, alive
Awaiting reprisal
Death will be their acquisition
The sky is turning red
Return to power draws near
Fall into me, the sky's crimson tears
Abolish the rules made of stone
Pierced from below, souls of my treacherous past
Betrayed by many, now ornaments dripping above
Awaiting the hour of reprisal
Your time slips away
Raining blood
From a lacerated sky
Bleeding its horror
Creating my structure
Now I shall reign in blood!";
// Here we split it into lines
 $lyrics = explode( "\n", $lyrics );
// And then randomly choose a line
 return wptexturize( $lyrics[ mt_rand( 0, count( $lyrics ) - 1 ) ] );
// This just echoes the chosen line, we'll position it later
function hello_dolly() {
 $chosen = hello_dolly_get_lyric();
 echo "<p id='dolly'>$chosen</p>";
// Now we set that function up to execute when the admin_notices action is called
add_action( 'admin_notices', 'hello_dolly' );
// We need some CSS to position the paragraph
function dolly_css() {
 // This makes sure that the positioning is also good for right-to-left languages
 $x = is_rtl() ? 'left' : 'right';
echo "
 <style type='text/css'>
 #dolly {
 float: $x;
 padding-$x: 15px;
 padding-top: 5px;
 margin: 0;
 font-size: 11px;
add_action( 'admin_head', 'dolly_css' );

Leave a comment

Your email address will not be published. Required fields are marked *

Connect with Facebook

This site uses Akismet to reduce spam. Learn how your comment data is processed.