Last active
June 15, 2016 18:33
-
-
Save jaygidwitz/aceebc3f1d9817518afeceeb86703df9 to your computer and use it in GitHub Desktop.
Hello, Lovecraft. Displays quote by H. P. Lovecraft in the upper right hand corner of the wordpress admin. Created for http://necronomicon-providence.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=== Hello Lovecraft === | |
Contributors: Studio Issa / Matt Mullenweg | |
Requires at least: 3.0 | |
Stable tag: 1.6 | |
Tested up to: 4.1 | |
This is not just a plugin, it symbolizes the despair and cosmic horror of an entire species summed up by H. P. Lovecraft. | |
== Description == | |
This is not just a plugin, it symbolizes the despair and cosmic horror of an entire species summed up by H. P. Lovecraft: "Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn”. When activated you will randomly see quote from <cite>Lovecraft</cite> in the upper right of your admin screen on every page. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @package Hello_Lovecraft | |
* @version 1.6 | |
*/ | |
/* | |
Plugin Name: Hello Lovecraft | |
Plugin URI: http://wordpress.org/extend/plugins/hello-lovecraft/ | |
Description: This is not just a plugin, it symbolizes the despair and cosmic horror of an entire species summed up by H. P. Lovecraft: "Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn”. When activated you will randomly see quote from <cite>Lovecraft</cite> in the upper right of your admin screen on every page. | |
Author: Studio Issa | |
Version: 1.6 | |
Author URI: http://studioissa.com/ | |
*/ | |
function hello_lovecraft_get_quote() { | |
/** These are the Quotes of Lovecraft */ | |
$quote = "The world is indeed comic, but the joke is on mankind. | |
Pleasure to me is wonder—the unexplored, the unexpected, the thing that is hidden and the changeless thing that lurks behind superficial mutability. | |
Almost nobody dances sober, unless they happen to be insane. | |
From even the greatest of horrors irony is seldom absent. | |
The oldest and strongest emotion of mankind is fear, and the oldest and strongest kind of fear is fear of the unknown. | |
I couldn't live a week without a private library - indeed, I'd part with all my furniture and squat and sleep on the floor before I'd let go of the 1500 or so books I possess. | |
The most merciful thing in the world, I think, is the inability of the human mind to correlate all its contents. We live on a placid island of ignorance in the midst of black seas of the infinity, and it was not meant that we should voyage far. | |
That is not dead which can eternal lie, And with strange aeons even death may die. | |
some day the piecing together of dissociated knowledge will open up such terrifying vistas of reality, and of our frightful position therein, that we shall either go mad from the revelation or flee from the light into the peace and safety of a new Dark Age. | |
Never Explain Anything. | |
To be bitter is to attribute intent and personality to the formless, infinite, unchanging and unchangeable void. We drift on a chartless, resistless sea. Let us sing when we can, and forget the rest. | |
At night, when the objective world has slunk back into its cavern and left dreamers to their own, there come inspirations and capabilities impossible at any less magical and quiet hour. No one knows whether or not he is a writer unless he has tried writing at night. | |
If I am mad, it is mercy! May the gods pity the man who in his callousness can remain sane to the hideous end! | |
I know always that I am an outsider; a stranger in this century and among those who are still men. | |
I have seen the dark universe yawning | |
Where the black planets roll without aim, | |
Where they roll in their horror unheeded, | |
Without knowledge, or lustre, or name. | |
Pleasure to me is wonder—the unexplored, the unexpected, the thing that is hidden and the changeless thing that lurks behind superficial mutability. To trace the remote in the immediate; the eternal in the ephemeral; the past in the present; the infinite in the finite; these are to me the springs of delight and beauty. | |
It is good to be a cynic — it is better to be a contented cat — and it is best not to exist at all. | |
Creative minds are uneven, and the best of fabrics have their dull spots. | |
I never ask a man what his business is, for it never interests me. What I ask him about are his thoughts and dreams. | |
Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn. | |
In his house at R'lyeh dead Cthulhu waits dreaming. | |
Contrary to what you may assume, I am not a pessimist but an indifferentist- that is, I don't make the mistake of thinking that the... cosmos... gives a damn one way or the other about the especial wants and ultimate welfare of mosquitoes, rats, lice, dogs, men, horses, pterodactyls, trees, fungi, dodos, or other forms of biological energy. | |
Ultimate horror often paralyses memory in a merciful way. | |
Searchers after horror haunt strange, far places. | |
The oldest and strongest emotion of mankind is fear. | |
The appeal of the spectrally macabre is generally narrow because it demands from the reader a certain degree of imagination and a capacity for detachment from everyday life. | |
The Old Ones were, the Old Ones are, and the Old Ones shall be. Not in the spaces we know, but between them. They walk serene and primal, undimensioned and to us unseen. | |
Unhappy is he to whom the memories of childhood bring only fear and sadness. | |
For I have always been a seeker, a dreamer, and a ponderer on seeking and dreaming... | |
Memories and possibilities are even more hideous than realities. | |
There are horrors beyond life's edge that we do not suspect, and once in a while man's evil prying calls them just within our range. | |
I could not help feeling that they were evil things -- mountains of madness whose farther slopes looked out over some accursed ultimate abyss. | |
Incurable lover of the grotesque | |
I felt myself on the edge of the world; peering over the rim into a fathomless chaos of eternal night. | |
I have harnessed the shadows that stride from world to world to sow death and madness. | |
Only poetry or madness could do justice to the noises... | |
No new horror can be more terrible than the daily torture of the commonplace."; | |
// Here we split it into lines | |
$quote = explode( "\n", $quote ); | |
// And then randomly choose a line | |
return wptexturize( $quote[ mt_rand( 0, count( $quote ) - 1 ) ] ); | |
} | |
// This just echoes the chosen line, we'll position it later | |
function hello_lovecraft() { | |
$chosen = hello_lovecraft_get_quote(); | |
echo "<p id='lovecraft'>$chosen</p>"; | |
} | |
// Now we set that function up to execute when the admin_notices action is called | |
add_action( 'admin_notices', 'hello_lovecraft' ); | |
// We need some CSS to position the paragraph | |
function lovecraft_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'> | |
#lovecraft { | |
float: $x; | |
padding-$x: 15px; | |
padding-top: 5px; | |
padding-bottom: 10px; | |
width: 40%; | |
margin: 0; | |
font-size: 11px; | |
} | |
</style> | |
"; | |
} | |
add_action( 'admin_head', 'lovecraft_css' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment