Changeset 9996 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
- Timestamp:
- 07/02/2020 07:52:03 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
r9994 r9996 46 46 add_action( 'template_redirect', array( $this, 'custom_redirects' ), 1 ); 47 47 add_action( 'template_redirect', array( $this, 'geopattern_icon_route' ), 0 ); 48 add_filter( 'query_vars', array( $this, 'filter_query_vars' ) );48 add_filter( 'query_vars', array( $this, 'filter_query_vars' ), 1 ); 49 49 add_filter( 'single_term_title', array( $this, 'filter_single_term_title' ) ); 50 50 add_filter( 'the_content', array( $this, 'filter_rel_nofollow_ugc' ) ); … … 1158 1158 $vars[] = 'geopattern_icon'; 1159 1159 1160 return $vars; 1160 // Remove support for any query vars the Plugin Directory doesn't support/need. 1161 $not_needed = [ 1162 'm', 'w', 'year', 'monthnum', 'day', 'hour', 'minute', 'second', 1163 'posts', 'withcomments', 'withoutcomments', 'favicon', 'cpage', 1164 'search', 'exact', 'sentence', 'calendar', 'more', 'tb', 'pb', 1165 'attachment', 'attachment_id', 'subpost', 'subpost_id', 'preview', 1166 'post_format', 'cat', 'category_name', 'tag', // We use custom cats/tags. 1167 ]; 1168 1169 return array_diff( $vars, $not_needed ); 1161 1170 } 1162 1171 … … 1303 1312 ( is_tax() || is_category() || is_tag() ) && 1304 1313 ! have_posts() && 1305 ! is_tax( 'plugin_section' ) // All sections have something, or intentionall don't (favorites)1314 ! is_tax( 'plugin_section' ) // All sections have something, or intentionally don't (favorites) 1306 1315 ) { 1307 1316 // [1] => plugins [2] => tags [3] => example-plugin-name [4..] => random().
Note: See TracChangeset
for help on using the changeset viewer.