Skip to content

Commit

Permalink
Post states reflection on new options.
Browse files Browse the repository at this point in the history
  • Loading branch information
sybrew committed Aug 28, 2017
1 parent 70da9e6 commit c263aea
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion autodescription.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: The SEO Framework
* Plugin URI: https://theseoframework.com/
* Description: An automated, advanced, accessible, unbranded and extremely fast SEO solution for any WordPress website.
* Version: 2.9.4-dev-2017.08.28.3
* Version: 2.9.4-dev-2017.08.28.4
* Author: Sybre Waaijer
* Author URI: https://theseoframework.com/
* License: GPLv3
Expand Down
2 changes: 1 addition & 1 deletion inc/classes/deprecated.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ public function search_filter( $query ) {
}

/**
* Fetches posts with exclude_local_search option on
* Fetches posts with exclude_local_search option on.
*
* @since 2.7.0
* @since 2.7.0 No longer used.
Expand Down
5 changes: 3 additions & 2 deletions inc/classes/doing-it-right.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public function post_state() {
* Adds post states in post/page edit.php query
*
* @since 2.1.0
* @since 2.9.4 Now listens to `alter_search_query` and `alter_archive_query` options.
*
* @param array $states The current post states array
* @param object $post The Post Object.
Expand All @@ -76,8 +77,8 @@ public function add_post_state( $states = array(), $post ) {
$post_id = isset( $post->ID ) ? $post->ID : false;

if ( $post_id ) {
$search_exclude = (bool) $this->get_custom_field( 'exclude_local_search', $post_id );
$archive_exclude = (bool) $this->get_custom_field( 'exclude_from_archive', $post_id );
$search_exclude = $this->get_option( 'alter_search_query' ) && $this->get_custom_field( 'exclude_local_search', $post_id );
$archive_exclude = $this->get_option( 'alter_archive_query' ) && $this->get_custom_field( 'exclude_from_archive', $post_id );

if ( $search_exclude )
$states[] = \esc_html__( 'No Search', 'autodescription' );
Expand Down

0 comments on commit c263aea

Please sign in to comment.