Changeset 10428 for sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-hooks.php
- Timestamp:
- 11/05/2020 02:21:34 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-hooks.php
r10299 r10428 20 20 add_action( 'template_redirect', array( $this, 'redirect_update_php_page' ) ); 21 21 add_action( 'template_redirect', array( $this, 'redirect_legacy_user_structure' ) ); 22 add_action( 'template_redirect', array( $this, 'redirect_ask_question_plugin_forum' ) ); 22 23 add_filter( 'wp_insert_post_data', array( $this, 'set_post_date_gmt_for_pending_posts' ) ); 23 24 add_action( 'wp_print_footer_scripts', array( $this, 'replace_quicktags_blockquote_button' ) ); … … 311 312 exit; 312 313 } 314 } 315 } 316 317 /** 318 * Redirect the defunct plugin 'ask-question' to the how to / troubleshooting forum 319 * as it's a better destination for the users reaching the plugin forum from search engines. 320 */ 321 public function redirect_ask_question_plugin_forum() { 322 if ( 323 'plugin' === get_query_var( 'bbp_view' ) && 324 'ask-question' === get_query_var( 'wporg_plugin' ) 325 ) { 326 wp_safe_redirect( home_url( '/forum/how-to-and-troubleshooting/' ) ); 327 exit; 313 328 } 314 329 }
Note: See TracChangeset
for help on using the changeset viewer.