Making WordPress.org

Changeset 3378


Ignore:
Timestamp:
06/15/2016 08:30:23 AM (10 years ago)
Author:
dd32
Message:

Plugin Directory: Sort by the raw active install count to ensure that we get a consistent ordering, this prevents something being on page x and page x+1 because the paginated query ordered the results differently.

See #1719

Location:
sites/trunk/wordpress.org/public_html/wp-content
Files:
2 edited

Legend:

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

    r3377 r3378  
    447447                if ( $wp_query->is_archive() && empty( $wp_query->query_vars['orderby'] ) ) {
    448448                        $wp_query->query_vars['orderby']  = 'meta_value_num';
    449                         $wp_query->query_vars['meta_key'] = 'active_installs';
     449                        $wp_query->query_vars['meta_key'] = '_active_installs';
    450450                }
    451451        }
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/front-page.php

    r3338 r3378  
    3333                        );
    3434
    35                         if ( 'popular' === $browse ) :
    36                                 $section_args['meta_key'] = 'active_installs';
     35                        if ( 'popular' === $browse ) {
     36                                $section_args['meta_key'] = '_active_installs';
    3737                                $section_args['orderby']  = 'meta_value_num';
    3838                                unset( $section_args['browse'] );
    39                         endif;
     39                        }
    4040
    4141                        $section_query = new \WP_Query( $section_args );
Note: See TracChangeset for help on using the changeset viewer.