WordPress.org

Making WordPress.org

Changeset 3505


Ignore:
Timestamp:
06/20/16 14:28:07 (18 months ago)
Author:
tellyworth
Message:

Search: improve [3504] by calculating the version cutoff as WP_CORE_STABLE_BRANCH minus 5 releases. Thanks @dd32.

See #1692

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/libs/site-search/jetpack-search.php

    r3504 r3505  
    253253        $date_cutoff = strftime( '%Y-%m-%d', strtotime( '-2 years' ) ); 
    254254        $date_today = strftime( '%Y-%m-%d' ); 
     255        $version_cutoff = ( defined('WP_CORE_STABLE_BRANCH') ? sprintf( '%0.1f', WP_CORE_STABLE_BRANCH - 0.5) : '4.0' ); 
    255256 
    256257        // Start building the WP-style search query args 
     
    264265            // plugin directory specific: 
    265266            'date_range'     =>  array( 'field' => 'modified', 'gte' => $date_cutoff, 'lte' => $date_today ), 
    266             'tested_range'   =>  array( 'field' => 'meta.tested.value', 'gte' => '4.0' ), 
     267            'tested_range'   =>  array( 'field' => 'meta.tested.value', 'gte' => $version_cutoff ), 
    267268        ); 
    268269 
Note: See TracChangeset for help on using the changeset viewer.