Added support for the noarchive-tag.
authorHenryk Gerlach <hgerlach@gmx.de>
Thu, 03 Jul 2008 14:35:05 +0200
changeset 1a54fe2712ade
parent 0 1cb43ef2edd9
child 2 44a602ed5d39
Added support for the noarchive-tag.
.hgtags
readme.txt
robots-meta.php
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/.hgtags	Thu Jul 03 14:35:05 2008 +0200
     1.3 @@ -0,0 +1,1 @@
     1.4 +1cb43ef2edd94f9528b741b9bf9998f76cb7dda1 vanilla-3.0.2
     2.1 --- a/readme.txt	Thu Jul 03 13:38:46 2008 +0200
     2.2 +++ b/readme.txt	Thu Jul 03 14:35:05 2008 +0200
     2.3 @@ -24,6 +24,7 @@
     2.4  * Nofollow category listings on single pages and posts to prevent PageRank leakage.
     2.5  * Nofollow your login, register and admin links, because they really don't need PageRank.
     2.6  * Enforce a trailing slash on archives.
     2.7 +* Add the NOARCHIVE tag, to prevent archiving by archive.org or google-cache.
     2.8  * Edit your .htaccess and your robots.txt from within WordPress.
     2.9  * Assign robots meta tags to individual posts & pages.
    2.10  * Verify your site with Google Webmaster Tools and Yahoo! Site Explorer.
     3.1 --- a/robots-meta.php	Thu Jul 03 13:38:46 2008 +0200
     3.2 +++ b/robots-meta.php	Thu Jul 03 14:35:05 2008 +0200
     3.3 @@ -173,7 +173,13 @@
     3.4  				} else {
     3.5  					$options['noindextag'] = false;
     3.6  				}
     3.7 -				
     3.8 +
     3.9 +				if (isset($_POST['noarchive'])) {
    3.10 +					$options['noarchive'] = true;
    3.11 +				} else {
    3.12 +					$options['noarchive'] = false;
    3.13 +				}
    3.14 +
    3.15  				if (isset($_POST['nofollowcatsingle'])) {
    3.16  					$options['nofollowcatsingle'] = true;
    3.17  				} else {
    3.18 @@ -396,8 +402,16 @@
    3.19  									Read the categories explanation above for categories and switch the words category and tag around ;)
    3.20  								</p>
    3.21  								<?php } ?>
    3.22 +								<input type="checkbox" id="noarchive" name="noarchive" <?php if ( $options['noarchive'] == true ) echo ' checked="checked" '; ?>/>
    3.23 +								<label for="noarchive">Add <code>noarchive</code> meta tag</label><br/>
    3.24 +								<?php if (!$options['disableexplanation']) { ?>
    3.25 +								<p>
    3.26 +									Prevents archive.org and google to put copies of your pages into their archive/cache.to put copies of your pages into their archive/cache.
    3.27 +								</p>
    3.28 +								<?php } ?>
    3.29  							</td>
    3.30  						</tr>
    3.31 +
    3.32  						<tr valign="top">
    3.33  							<th scope="row">DMOZ<br/> and Yahoo! Directory</th>
    3.34  							<td>
    3.35 @@ -602,6 +616,12 @@
    3.36  		}
    3.37  		$meta .= "noydir";
    3.38  	}
    3.39 +	if ($options['noarchive']) {
    3.40 +		if ($meta != "") {
    3.41 +			$meta .= ",";
    3.42 +		}
    3.43 +		$meta .= "noarchive";
    3.44 +	}
    3.45  	if ($meta != "" && $meta != "index,follow") {
    3.46  		echo '<!--Meta tags added by Robots Meta: http://www.joostdevalk.nl/wordpress/meta-robots-wordpress-plugin/ -->'."\n";
    3.47  		echo '<meta name="robots" content="'.$meta.'" />'."\n";