Copy the following program to "wordpress-version-spoof.php" within your "wp-content/plugins/" folder.
<?
/*
Plugin Name: WordPress Version Spoof
Plugin URI: http://www.seoegghead.com/software/wordpress-version-spoof.seo
Description: Modify or remove the meta generator tag on web pages and feeds.
Author: SEO Egghead, Inc.
Version: 1.0 for WP 2.x
Author URI: http://www.seoegghead.com/
*/
add_option('VS_metacontent', VS_generate_random_blogname());
function VS_custom_generator()
{
$meta = '';
if(get_option('VS_metacontent') != '') {
$meta = '<meta name="generator" content="'
. htmlspecialchars(get_option('VS_metacontent'),
ENT_QUOTES)
. '" />';
}
return $meta;
}
add_filter('the_generator', 'VS_custom_generator');
add_action('admin_menu', 'VS_admin_menu');
function VS_admin_menu() {
add_submenu_page('options-general.php', 'Version Spoof',
'Version Spoof', 10, __FILE__, 'VS_submenu');
}
function VS_submenu(){
global $wpdb;
if($_REQUEST['savemetatext']) {
update_option('VS_metacontent', $_REQUEST['metacontent']);
echo '<div class="updated fade">
<p><strong>Setting saved.</strong></p></div>';
}
?>
<div class="wrap">
<h2>WordPress Version Spoof:</h2>
<form name="get_meta_text" action="<?php echo $_SERVER['REQUEST_URI']; ?>"
method="post">
<br />
Blog Version:
<input type="text" size="20" name="metacontent" id="metacontent1"
value="<?=htmlspecialchars(get_option('VS_metacontent'), ENT_QUOTES)?>" >
<br /><br />
<input type="submit" name="savemetatext" value="Set Version Value">
</form>
<?
VS_show_link();
echo '</div>';
}
function VS_generate_random_blogname(){
return 'Blog ' . rand(1,9) . '.' . rand(0,9);
}
function VS_show_link() {
$result = preg_match('#MSIE#', $_SERVER['HTTP_USER_AGENT']);
?>
<div style="float:right; position:relative; top:-70px;">
<a href="http://www.seoegghead.com/software/wordpress-version-spoof.seo"
style="text-decoration:none;" target="_blank">
<?
if($result == 0) {
?>
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAAUCAMAAA
BxjAnBAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADBQTFRFz6Ol
opmRs21w48/P+Pb218bF9Orr6OTit7CpqVpdqaGZrmJlvYCD0ry769vc////wFM5SwAAAB
B0Uk5T////////////////////AOAjXRkAAAJLSURBVHjatFXtDiMhCERF3Q/R93/bGxDX
Xu5Pr2lJNk7pVHQYujS+FImov09Ng75VmM4zvU+V7xVu583vU7sVZo/CG7+kDRcL27qs4J
VWfJ+N/+GMzdi7cAQVhfm4PEJlcXjUkVf64CHxtogySnN8N64Ppn6erc10Gd3zERQn3DGN
ZIQGKq5LQ8ITnB+Y6073dK5oTBtDsxWUH3gmXGlF33nytFIFhfkKV68avSpOQDhLwhmk9t
6vECoKUEpJtHA8bwFWg5T7jHlifZSSsXnBORtwArWWZIEdREUBvYAK/1MJ4bC6aAhumRkQ
ResRLusW1oKmDJxBj1pMJ3OmCiET36Wdkadxon1XwNcc6+G76tTFfT+ptCWVkVAwGb7qFQ
5lQYRDm1JdRhTPy8Tz6EPNUvVsaqpoHbh5dqEVW+e5QC9KuY1KnK+nxTKfoCLg8rqTrmkW
xAZ/FfOjDxWhuxC2RuuI0oXcGTNldKfSGhuVVh8PXNz+iHS1Yj4Ubf+a/ZaquLgQKqd1w8
cIxSrGFHqR33Q4lbIHJIWsQeYn9fqBVWA3lauRBWNcb6ymOAootnO5jNregu/ipCfQDWIH
1c2wWk6Ze2oSP/CApx78Mh3McxXzj7cdLa0uo8qpV/KQsoes7Jk0Kh0rEvR98CjiMDMG3w
MKioFqhqWJo3qoWYtt9TyiD1mw8U7Psfjoj5m9X2Ob5b9fKp+9A1+KiU/zbwvn6ZqozpQH
958X3j6Ly2c2pj8vXB5/VLyCFi7j9zeWGQSvF/IP6ZMLjz8CDACmemOuUH7ZzQAAAABJRU
5ErkJggg==" />
<? } ?>
<br />
<small>Click here for plugin documentation.</small>
</a>
<br /><small>Got Questions or Feedback?
<a style="text-decoration:none;"
href="http://www.seoegghead.com/about/contact-us.seo?subject=Version+Spoof+Feedback"
target="_blank">Click here.</a></small>
<br /><small>By using this plugin you agree to
<a style="text-decoration:none;"
href="http://www.seoegghead.com/software/free-software-disclaimer.seo"
target="_blank">this simple disclaimer.</a></small>
</div>
<?
}