Skip to content

Commit

Permalink
1.0.9 preparation
Browse files Browse the repository at this point in the history
  • Loading branch information
javiercasares committed Jul 28, 2023
1 parent 3cb3027 commit e13a499
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 78 deletions.
39 changes: 0 additions & 39 deletions changelog.txt

This file was deleted.

60 changes: 30 additions & 30 deletions noindex-seo.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
Plugin Name: noindex SEO
Plugin URI: https://wordpress.org/plugins/noindex-seo/
Description: Allows to add a meta-tag for robots noindex in some parts of your WordPress site.
Version: 1.0.7
Requires at least: 4.9
Tested: 6.1
Requires PHP: 5.6.20
Tested PHP: 8.1
Version: 1.0.9
Requires at least: 5.2
Tested: 6.3
Requires PHP: 7.0
Tested PHP: 8.3
Author: Javier Casares
Author URI: https://www.javiercasares.com/
License: EUPL 1.2
Expand Down Expand Up @@ -51,12 +51,12 @@ function noindex_seo_show()
/*
GLOBAL IMPORTANT PAGES
*/
if( $enter && $noindex_seo_values['front_page'] && is_front_page() )
if( $enter && $noindex_seo_values['front_page'] && function_exists( 'is_front_page' ) && is_front_page() )
{
noindex_seo_metarobots();
$enter = false;
}
if( $enter && $noindex_seo_values['home'] && is_home() )
if( $enter && $noindex_seo_values['home'] && function_exists( 'is_home' ) && is_home() )
{
noindex_seo_metarobots();
$enter = false;
Expand All @@ -65,22 +65,22 @@ function noindex_seo_show()
/*
PAGES / POSTS
*/
if( $enter && $noindex_seo_values['page'] && is_page() )
if( $enter && $noindex_seo_values['page'] && function_exists( 'is_page' ) && is_page() )
{
noindex_seo_metarobots();
$enter = false;
}
if( $enter && $noindex_seo_values['privacy_policy'] && is_privacy_policy() )
if( $enter && $noindex_seo_values['privacy_policy'] && function_exists( 'is_privacy_policy' ) && is_privacy_policy() )
{
noindex_seo_metarobots();
$enter = false;
}
if( $enter && $noindex_seo_values['single'] && is_single() )
if( $enter && $noindex_seo_values['single'] && function_exists( 'is_single' ) && is_single() )
{
noindex_seo_metarobots();
$enter = false;
}
if( $enter && $noindex_seo_values['singular'] && is_singular() )
if( $enter && $noindex_seo_values['singular'] && function_exists( 'is_singular' ) && is_singular() )
{
noindex_seo_metarobots();
$enter = false;
Expand All @@ -89,12 +89,12 @@ function noindex_seo_show()
/*
CATEGORIES / TAGS
*/
if( $enter && $noindex_seo_values['category'] && is_category() )
if( $enter && $noindex_seo_values['category'] && function_exists( 'is_category' ) && is_category() )
{
noindex_seo_metarobots();
$enter = false;
}
if( $enter && $noindex_seo_values['tag'] && is_tag() )
if( $enter && $noindex_seo_values['tag'] && function_exists( 'is_tag' ) && is_tag() )
{
noindex_seo_metarobots();
$enter = false;
Expand All @@ -103,27 +103,27 @@ function noindex_seo_show()
/*
DATES
*/
if( $enter && $noindex_seo_values['date'] && is_date() )
if( $enter && $noindex_seo_values['date'] && function_exists( 'is_date' ) && is_date() )
{
noindex_seo_metarobots();
$enter = false;
}
if( $enter && $noindex_seo_values['day'] && is_day() )
if( $enter && $noindex_seo_values['day'] && function_exists( 'is_day' ) && is_day() )
{
noindex_seo_metarobots();
$enter = false;
}
if( $enter && $noindex_seo_values['month'] && is_month() )
if( $enter && $noindex_seo_values['month'] && function_exists( 'is_month' ) && is_month() )
{
noindex_seo_metarobots();
$enter = false;
}
if( $enter && $noindex_seo_values['time'] && is_time() )
if( $enter && $noindex_seo_values['time'] && function_exists( 'is_time' ) && is_time() )
{
noindex_seo_metarobots();
$enter = false;
}
if( $enter && $noindex_seo_values['year'] && is_year() )
if( $enter && $noindex_seo_values['year'] && function_exists( 'is_year' ) && is_year() )
{
noindex_seo_metarobots();
$enter = false;
Expand All @@ -132,17 +132,17 @@ function noindex_seo_show()
/*
ARCHIVE
*/
if( $enter && $noindex_seo_values['archive'] && is_archive() )
if( $enter && $noindex_seo_values['archive'] && function_exists( 'is_archive' ) && is_archive() )
{
noindex_seo_metarobots();
$enter = false;
}
if( $enter && $noindex_seo_values['author'] && is_author() )
if( $enter && $noindex_seo_values['author'] && function_exists( 'is_author' ) && is_author() )
{
noindex_seo_metarobots();
$enter = false;
}
if( $enter && $noindex_seo_values['post_type_archive'] && is_post_type_archive() )
if( $enter && $noindex_seo_values['post_type_archive'] && function_exists( 'is_post_type_archive' ) && is_post_type_archive() )
{
noindex_seo_metarobots();
$enter = false;
Expand All @@ -151,7 +151,7 @@ function noindex_seo_show()
/*
PAGINATION
*/
if( $enter && $noindex_seo_values['paged'] && is_paged() )
if( $enter && $noindex_seo_values['paged'] && function_exists( 'is_paged' ) && is_paged() )
{
noindex_seo_metarobots();
$enter = false;
Expand All @@ -160,7 +160,7 @@ function noindex_seo_show()
/*
SEARCH
*/
if( $enter && $noindex_seo_values['search'] && is_search() )
if( $enter && $noindex_seo_values['search'] && function_exists( 'is_search' ) && is_search() )
{
noindex_seo_metarobots();
$enter = false;
Expand All @@ -169,7 +169,7 @@ function noindex_seo_show()
/*
ATTACHMENT
*/
if( $enter && $noindex_seo_values['attachment'] && is_attachment() )
if( $enter && $noindex_seo_values['attachment'] && function_exists( 'is_attachment' ) && is_attachment() )
{
noindex_seo_metarobots();
$enter = false;
Expand All @@ -178,12 +178,12 @@ function noindex_seo_show()
/*
PREVIEW
*/
if( $enter && $noindex_seo_values['customize_preview'] && is_customize_preview() )
if( $enter && $noindex_seo_values['customize_preview'] && function_exists( 'is_customize_preview' ) && is_customize_preview() )
{
noindex_seo_metarobots();
$enter = false;
}
if( $enter && $noindex_seo_values['preview'] && is_preview() )
if( $enter && $noindex_seo_values['preview'] && function_exists( 'is_preview' ) && is_preview() )
{
noindex_seo_metarobots();
$enter = false;
Expand All @@ -192,7 +192,7 @@ function noindex_seo_show()
/*
ERROR
*/
if( $enter && $noindex_seo_values['error'] && is_404() )
if( $enter && $noindex_seo_values['error'] && function_exists( 'is_404' ) && is_404() )
{
noindex_seo_metarobots();
$enter = false;
Expand All @@ -202,14 +202,14 @@ function noindex_seo_show()
FEED
*/
/*
if( $enter && $noindex_seo_values['comment_feed'] && is_comment_feed() )
if( $enter && $noindex_seo_values['comment_feed'] && function_exists( 'is_comment_feed' ) && is_comment_feed() )
{
add_action( 'wp_headers', 'noindex_seo_xrobots' );
$enter = false;
}
*/
/*
if( $enter && $noindex_seo_values['feed'] && is_feed() )
if( $enter && $noindex_seo_values['feed'] && function_exists( 'is_feed' ) && is_feed() )
{
add_action( 'wp_headers', 'noindex_seo_xrobots' );
$enter = false;
Expand All @@ -220,7 +220,7 @@ function noindex_seo_show()
ROBOTS
*/
/*
if( $enter && $noindex_seo_values['robots'] && is_robots() )
if( $enter && $noindex_seo_values['robots'] && function_exists( 'is_robots' ) && is_robots() )
{
add_action( 'do_robotstxt', 'noindex_seo_xrobots' );
$enter = false;
Expand Down
43 changes: 34 additions & 9 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,83 +1,108 @@
=== noindex SEO ===
Contributors: javiercasares
Tags: seo, noindex
Requires at least: 4.9
Tested: 6.1
Requires PHP: 5.6.20
Tested PHP: 8.1
Stable tag: 1.0.7
Requires at least: 5.2
Tested: 6.3
Requires PHP: 7.0
Tested PHP: 8.3
Stable tag: 1.0.9
License: EUPL 1.2
License URI: https://eupl.eu/1.2/en/

Allows to add a meta-tag for robots noindex in some parts of your WordPress site.

== Description ==

Allows to add a meta-tag for robots noindex in some parts of your WordPress site.

Main pages

* Front Page: Block the indexing of the site's front page.
* Home: Block the indexing of the site's home page.

Pages and Posts

* Page: Block the indexing of the site's pages.
* Privacy Policy: Block the indexing of the site's privacy policy page.
* Single: Block the indexing of a post on the site.
* Singular: Block the indexing of a post or a page of the site.

Taxonomies

* Category: Block the indexing of the site categories. The lists where the posts appear.
* Tag: Block the indexing of the site's tags. The lists where the posts appear.

Dates

* Date: Block the indexing when any date-based archive page (i.e. a monthly, yearly, daily or time-based archive) of the site. The lists where the posts appear.
* Day: Block the indexing when a daily archive of the site. The lists where the posts appear.
* Month: Block the indexing when a monthly archive of the site. The lists where the posts appear.
* Time: Block the indexing when an hourly, "minutely", or "secondly" archive of the site. The lists where the posts appear.
* Year: Block the indexing when a yearly archive of the site. The lists where the posts appear.

Archives

* Archive: Block the indexing of any type of Archive page. Category, Tag, Author and Date based pages are all types of Archives. The lists where the posts appear.
* Author: Block the indexing of the author's page, where the author's publications appear.
* Post Type Archive: Block the indexing of any post type page.

Pagination

* Pagination: Block the indexing of the pagination, i.e. all pages other than the main page of an archive.

Search

* Search: Block the indexing of the internal search result pages.

Attachments

* Attachment: Block the indexing of an attachment document to a post or page. An attachment is an image or other file uploaded through the post editor's upload utility. Attachments can be displayed on their own "page" or template. This will not cause the indexing of the image or file to be blocked.

Previews

* Customize Preview: Block the indexing when a content is being displayed in customize mode.
* Preview: Block the indexing when a single post is being displayed in draft mode.

Error Page

* Error 404: This will cause an error page to be blocked from being indexed. As it is an error page, it should not be indexed per se, but just in case.

Important note: if you have any doubt about any of the following items it is best not to activate the option as you could lose results in the search engines.

== Installation ==

1. Use the Add New Plugin in the WordPress Admin area
2. Activate the plugin through the Plugins menu in WordPress
3. You can find the settings and documentation under Settings -> noindex

== Changelog ==

= 1.0.9 =
* 2023-07-28
* Improved functions checking.
* Compatibility: WordPress 5.2 - WordPress 6.3.
* Compatibility: PHP 7.0 - PHP 8.3.

= 1.0.8 =
* 2023-02-20
* Compatibility: WordPress 5.2 - WordPress 6.2
* Compatibility: PHP 7.2 - PHP 8.1

= 1.0.7 =
* 2022-09-11
* Compatibility: WordPress 6.1
* Compatibility: WordPress 4.9 - WordPress 6.1
* Compatibility: PHP 5.6.20 - PHP 8.1
* Minor refactoring

= 1.0.6 =
* 2022-05-06
* Compatibility: WordPress 6.0
* Compatibility: WordPress 4.9 - WordPress 6.0
* Compatibility: PHP 5.6.20 - PHP 8.1

= 1.0.5 =
* 2021-11-05
* Update the Plugin URI for WordPress 5.8
* Compatibility: PHP 8.1
* Compatibility: WordPress 4.9 - WordPress 5.9
* Compatibility: PHP 5.6.20 - PHP 8.1

= 1.0.4 =
* 2021-06-23
Expand Down

0 comments on commit e13a499

Please sign in to comment.