WordPress.org

Plugin Directory

Changeset 636731


Ignore:
Timestamp:
12/10/12 19:49:02 (17 months ago)
Author:
mitchoyoshitaka
Message:
  • clear cache on past_only change
  • only automatically display if is_main_query()
File:
1 edited

Legend:

Unmodified
Added
Removed
  • yet-another-related-posts-plugin/trunk/class-core.php

    r636660 r636731  
    141141     
    142142        // new in 3.1: clear cache when updating certain settings. 
    143         $clear_cache_options = array( 'show_pass_post' => 1, 'recent' => 1, 'threshold' => 1 ); 
     143        $clear_cache_options = array( 'show_pass_post' => 1, 'recent' => 1, 'threshold' => 1, 'past_only' => 1 ); 
    144144 
    145145        $relevant_options = array_intersect_key( $options, $clear_cache_options ); 
     
    10561056        if ( is_feed() ) 
    10571057            return $content; 
     1058        // @since 4.0.2: only filter on main query 
     1059        if ( !is_main_query() ) 
     1060            return $content; 
    10581061         
    10591062        $auto_display_post_types = $this->get_option( 'auto_display_post_types' ); 
Note: See TracChangeset for help on using the changeset viewer.