Changeset 6855
- Timestamp:
- 03/10/2018 02:26:02 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
r6801 r6855 41 41 add_filter( 'pre_update_option_jetpack_options', array( $this, 'filter_jetpack_options' ) ); 42 42 add_action( 'template_redirect', array( $this, 'prevent_canonical_for_plugins' ), 9 ); 43 add_action( 'template_redirect', array( $this, 'custom_redirects' ) );43 add_action( 'template_redirect', array( $this, 'custom_redirects' ), 1 ); 44 44 add_filter( 'query_vars', array( $this, 'filter_query_vars' ) ); 45 45 add_filter( 'single_term_title', array( $this, 'filter_single_term_title' ) ); … … 516 516 remove_action( 'template_redirect', 'wp_redirect_admin_locations', 1000 ); 517 517 518 // disable feeds 519 remove_action( 'wp_head', 'feed_links', 2 ); 520 remove_action( 'wp_head', 'feed_links_extra', 3 ); 521 518 522 add_filter( 'get_term', array( __NAMESPACE__ . '\I18n', 'translate_term' ) ); 519 523 add_filter( 'the_content', array( $this, 'translate_post_content' ), 1, 2 ); … … 1176 1180 if ( get_query_var( 's' ) && isset( $_GET['s'] ) ) { 1177 1181 wp_safe_redirect( site_url( '/search/' . urlencode( get_query_var( 's' ) ) . '/' ) ); 1182 die(); 1183 } 1184 1185 // disable feeds 1186 if ( is_feed() ) { 1187 if( isset( $_GET['feed'] ) ) { 1188 wp_redirect( esc_url_raw( remove_query_arg( 'feed' ) ), 301 ); 1189 die(); 1190 } 1191 set_query_var( 'feed', '' ); 1192 redirect_canonical(); 1193 die(); 1194 } 1195 1196 if ( is_comment_feed() ) { 1197 wp_redirect( 'https://wordpress.org/plugins/', 301 ); 1178 1198 die(); 1179 1199 }
Note: See TracChangeset
for help on using the changeset viewer.