Hello World!
This file contains 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_World | |
* @version 0.1 | |
* | |
* Plugin Name: Hello World! | |
* Plugin URI: https://gist.github.com/rnagle/d561bd58504a644e9657 | |
* Description: Just a simple WordPress plugin that prints "Hello world!" in the top corner of the WordPress dashboard. | |
* Author: Ryan Nagle | |
* Version: 0.1 | |
**/ | |
function hello_world() { | |
return "Hello world!"; | |
} | |
function hello_world_markup() { | |
echo "<p id='hello-world'>" . hello_world() . "</p>"; | |
} | |
add_action('admin_notices', 'hello_world_markup'); | |
function hello_world_css() { | |
$x = is_rtl() ? 'left' : 'right'; | |
echo " | |
<style type='text/css'> | |
#hello-world { | |
float: $x; | |
padding-$x: 15px; | |
padding-top: 5px; | |
margin: 0; | |
font-size: 11px; | |
} | |
</style> | |
"; | |
} | |
add_action('admin_head', 'hello_world_css'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment