Skip to content

Instantly share code, notes, and snippets.

@enejb
Created October 30, 2012 17:19
Show Gist options
  • Save enejb/3981652 to your computer and use it in GitHub Desktop.
Save enejb/3981652 to your computer and use it in GitHub Desktop.
WordPress Plugin that lets you know that you are on the verification server
<?php
/*
Plugin Name: You are on verf
Plugin URI:
Description: Lets you know that you are on the verification server
Author: Enej
Version: 0.5
Author URI:
*/
/**
* youareonverf function.
*
* @access public
* @return void
*/
function eb_you_are_on_verf() {
$color = ( defined('VERF_COLOUR') ? VERF_COLOUR :'#4C6D84' );
$where = ( defined('VERF_WHERE') ? VERF_WHERE :'Verf' );
echo '<div style="position:fixed; top:0px; z-index:999999;left:50%; width:auto; background:'.$color.'; color:#FFF; padding:7px 13px 6px;; font-size:12px; text-transform: uppercase;">You are on '.$where.'</div>';
echo '<style> #wpadminbar{ border-top:3px solid '.$color.'; } #wpadminbar #wp-admin-bar-wp-logo{ background:'.$color.'; }</style>';
}
add_action('wp_footer', 'eb_you_are_on_verf' );
add_action('admin_footer', 'eb_you_are_on_verf' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment