Changeset 3342 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
- Timestamp:
- 06/13/2016 05:46:40 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
r3338 r3342 253 253 * Setting up the site requires setting up the theme and proper 254 254 * rewrite permastructs. 255 * 256 * @global \WP_Rewrite $wp_rewrite WordPress rewrite component. 255 257 */ 256 258 public function activate() { 257 258 /**259 * @var \WP_Rewrite $wp_rewrite WordPress rewrite component.260 */261 259 global $wp_rewrite; 262 260 … … 432 430 433 431 case 'popular': 434 $wp_query->query_vars['orderby'] = 'meta_value_num';435 $wp_query->query_vars['meta_key'] = 'active_installs';436 437 432 add_filter( 'posts_where', array( $this, 'pre_get_posts_sql_browse_popular' ) ); 438 433 break; 434 } 435 436 if ( $wp_query->is_archive() && empty( $wp_query->query_vars['orderby'] ) ) { 437 $wp_query->query_vars['orderby'] = 'meta_value_num'; 438 $wp_query->query_vars['meta_key'] = 'active_installs'; 439 439 } 440 440 }
Note: See TracChangeset
for help on using the changeset viewer.