Making WordPress.org

Changeset 13139


Ignore:
Timestamp:
01/22/2024 06:00:48 AM (14 months ago)
Author:
dd32
Message:

Plugin Directory: Limit the 'Beta' listing to plugins updated within 12 months.

Fixes #6316.

File:
1 edited

Legend:

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

    r13138 r13139  
    765765                $wp_query->query_vars['orderby']  = 'meta_value';
    766766                $wp_query->query_vars['order']    = 'DESC';
     767
     768                // Limit the Beta tab to plugins updated within 12 months.
     769                $meta_query                = $wp_query->get( 'meta_query' ) ?: [];
     770                $meta_query['updated-12m'] = [
     771                    'key'     => 'last_updated',
     772                    'value'   => gmdate( 'Y-m-d H:i:s', time() - YEAR_IN_SECONDS ),
     773                    'compare' => '>',
     774                ];
     775                $wp_query->set( 'meta_query', $meta_query );
     776
    767777                break;
    768778
Note: See TracChangeset for help on using the changeset viewer.