Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Robots tags conflicting with Yoast SEO. #53

Merged
merged 2 commits into from
Mar 25, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
**Tags:** post, unlist posts, hide posts,
**Requires at least:** 4.4
**Tested up to:** 5.7
**Stable tag:** 1.1.4
**Stable tag:** 1.1.5
**License:** GPLv2 or later
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -36,6 +36,8 @@ Need help with something? Have an issue to report? [Get in touch](https://github
Just select option "Unlist Post" in any post of any type and that post will be hidden from the whole site, it can be only accessed if you have the direct link to the post.

## Changelog ##
### 1.1.5 ###
- Fix: Robots tags conflicting with Yoast SEO.

### 1.1.4 ###
- Fix: Due to a bug unlisted posts were visible in the search results, which we have fixed now.
Expand Down
1 change: 1 addition & 0 deletions class-unlist-posts.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ public function no_robots_for_unlisted_posts( $robots ) {
$hidden_posts = get_option( 'unlist_posts', array() );

if ( in_array( get_the_ID(), $hidden_posts, true ) && false !== get_the_ID() ) {
add_filter( 'wpseo_robots_array', '__return_empty_array' );
Nikschavan marked this conversation as resolved.
Show resolved Hide resolved
return wp_robots_no_robots( $robots );
}
return $robots;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hide-post",
"version": "1.1.4",
"version": "1.1.5",
"main": "Gruntfile.js",
"author": "Nikhil Chavan",
"devDependencies": {
Expand Down
4 changes: 3 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: https://www.paypal.me/BrainstormForce
Tags: post, unlist posts, hide posts,
Requires at least: 4.4
Tested up to: 5.7
Stable tag: 1.1.4
Stable tag: 1.1.5
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -36,6 +36,8 @@ Need help with something? Have an issue to report? [Get in touch](https://github
Just select option "Unlist Post" in any post of any type and that post will be hidden from the whole site, it can be only accessed if you have the direct link to the post.

== Changelog ==
= 1.1.5 =
- Fix: Robots tags conflicting with Yoast SEO.
Nikschavan marked this conversation as resolved.
Show resolved Hide resolved

= 1.1.4 =
- Fix: Due to a bug unlisted posts were visible in the search results, which we have fixed now.
Expand Down
4 changes: 2 additions & 2 deletions unlist-posts.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Author URI: https://www.nikhilchavan.com/
* Text Domain: unlist-posts
* Domain Path: /languages
* Version: 1.1.4
* Version: 1.1.5
*
* @package Hide_Post
*/
Expand All @@ -16,6 +16,6 @@

define( 'UNLIST_POSTS_DIR', plugin_dir_path( __FILE__ ) );
define( 'UNLIST_POSTS_URI', plugins_url( '/', __FILE__ ) );
define( 'UNLIST_POSTS_VER', '1.1.4' );
define( 'UNLIST_POSTS_VER', '1.1.5' );

require_once UNLIST_POSTS_DIR . 'class-unlist-posts.php';