Ticket #496: 496.2.diff
File 496.2.diff, 1.3 KB (added by , 8 years ago) |
---|
-
wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
669 669 670 670 // Unless otherwise specified, we start off by querying for publish'd plugins. 671 671 if ( empty( $wp_query->query_vars['pagename'] ) && ( empty( $wp_query->query_vars['post_type'] ) || 'post' == $wp_query->query_vars['post_type'] ) ) { 672 $wp_query->query_vars['post_type'] = array( 'plugin' );672 $wp_query->query_vars['post_type'] = 'plugin'; 673 673 $wp_query->query_vars['post_status'] = array( 'publish' ); 674 674 } 675 675 … … 813 813 * Stops search crawlers from paginating through the entire DB. 814 814 */ 815 815 public function filter_found_posts( $found_posts, $wp_query ) { 816 if ( isset( $wp_query->query['browse'] ) && $wp_query->query_vars['post_type'] == 'plugin') {816 if ( isset( $wp_query->query['browse'] ) && 'plugin' === $wp_query->query_vars['post_type'] ) { 817 817 return min( $found_posts, 99 * $wp_query->query_vars['posts_per_page'] ); // 99 pages 818 818 } 819 819