Making WordPress.org

Changeset 10517


Ignore:
Timestamp:
12/15/2020 09:15:19 AM (6 years ago)
Author:
coffee2code
Message:

Plugin Directory: Only feature (on the front page) block-enabled plugins that are not outdated and that have at least 200 active installations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/front-page.php

    r9998 r10517  
    99
    1010namespace WordPressdotorg\Plugin_Directory\Theme;
     11
     12use WordPressdotorg\Plugin_Directory\Template;
    1113
    1214$sections = array(
    … …  
    4850                        } else if ( 'blocks' === $browse ) {
    4951                                $section_args['orderby'] = 'rand';
     52                                $section_args['meta_query'] = [
     53                                        [
     54                                                'key'     => '_active_installs',
     55                                                'value'   => 200,
     56                                                'type'    => 'numeric',
     57                                                'compare' => '>=',
     58                                        ],
     59                                        [
     60                                                'key'     => 'tested',
     61                                                'value'   => Template::get_current_major_wp_version() - 0.2,
     62                                                'compare' => '>=',
     63                                        ],
     64                                ];
    5065                        }
    5166
Note: See TracChangeset for help on using the changeset viewer.