Ticket #3337: 3337.1.patch
File 3337.1.patch, 1.5 KB (added by , 5 years ago) |
---|
-
src/includes/core/actions.php
433 433 add_action( 'bbp_template_redirect', 'bbp_check_reply_edit', 10 ); 434 434 add_action( 'bbp_template_redirect', 'bbp_check_topic_tag_edit', 10 ); 435 435 436 // Must be after bbp_template_include_theme_compat 437 add_action( 'bbp_template_redirect', 'bbp_remove_adjacent_posts', 10 ); 438 436 439 // Theme-side POST requests 437 440 add_action( 'bbp_post_request', 'bbp_do_ajax', 1 ); 438 441 add_action( 'bbp_post_request', 'bbp_edit_topic_tag_handler', 1 ); -
src/includes/core/theme-compat.php
1026 1026 // Filter & return 1027 1027 return (bool) apply_filters( 'bbp_force_comment_status', $retval, $open, $post_id, $post_type ); 1028 1028 } 1029 1030 /** 1031 * Remove "prev" and "next" relational links from <head> on bbPress pages. 1032 * 1033 * WordPress automatically generates these relational links to the current 1034 * page, but bbPress does not use these links, nor would they work the same. 1035 * 1036 * In this function, we remove these links when on a bbPress page. This also 1037 * prevents additional, unnecessary queries from running. 1038 * 1039 * @since 2.6.0 bbPress (r7071) 1040 */ 1041 function bbp_remove_adjacent_posts() { 1042 1043 // Bail if not a bbPress page 1044 if ( ! is_bbpress() ) { 1045 return; 1046 } 1047 1048 // Remove the WordPress core action for adjacent posts 1049 remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10 ); 1050 }