[wp-hackers] Howdy Don't plugin (was Decision time in re: admin rework)

Ozh ozh at planetozh.com
Wed Dec 26 20:05:07 GMT 2007


On Dec 26, 2007 7:34 PM, spencerp <spencerp1 at gmail.com> wrote:
> I like this Plugin, too bad it don't work for us that have "English" set
> sigh.. Want to change it to "Hello", "Hello Prick" lmao.. or.. if there
> was a way to remove it totally.. that'd be awesome. =D


<?php
/*
Plugin Name: No Howdy
Plugin URI: http://planetozh.com/blog/
Description: Don't like <em>Howdy</em>? Change.
Author: Ozh
Version: 1.0
Author URI: http://planetozh.com/blog/
*/

// Customize:
$nohowdy = "Bonjour";

// Hook in
if (is_admin()) {
	add_action('init', 'ozh_nohowdy_h');
	add_action('admin_footer', 'ozh_nohowdy_f');
}

// Load jQuery
function ozh_nohowdy_h() {
	wp_enqueue_script('jquery');
}

// Modify
function ozh_nohowdy_f() {
global $nohowdy;
echo <<<JS
<script type="text/javascript">
//<![CDATA[
var nohowdy = "$nohowdy";
jQuery('#user_info p')
	.html(
	jQuery('#user_info p')
		.html()
		.replace(/Howdy/,nohowdy)
	);
//]]>
JS;
}

?>

Or, if formatting screws up although I tried to keep everything under
80 columns, <http://planetozh.com/temp/no_howdy_plugin.php.txt>

May we now never hear again about this "Howdy" problem ? :P

-- 
http://FrenchFragFactory.net ~ Daily Quake News
http://planetOzh.com ~ Blog and WordPress Stuff


More information about the wp-hackers mailing list