Making WordPress.org


Ignore:
Timestamp:
03/04/2015 12:29:20 PM (10 years ago)
Author:
obenland
Message:

WP.org Themes: Only return themes that were updated in the last two years for
all 'browse' requests.

See https://wordpress.slack.com/archives/meta/p1425471717001102

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/theme-directory.php

    r1332 r1376  
    115115
    116116            case 'popular':
    117                 add_filter( 'posts_clauses',  'wporg_themes_popular_posts_clauses' );
     117                add_filter( 'posts_clauses', 'wporg_themes_popular_posts_clauses' );
    118118                break;
    119119
     
    121121                // Nothing to do here.
    122122                break;
     123
    123124        }
     125
     126        // Only return themes that were updated in the last two years for all 'browse' requests.
     127        $wp_query->set( 'date_query', array(
     128            array(
     129                'column' => 'post_modified_gmt',
     130                'after'  => '-2 years',
     131            ),
     132        ) );
     133
    124134    }
    125135
Note: See TracChangeset for help on using the changeset viewer.