Changeset 7072
- Timestamp:
- 02/10/2020 08:53:17 PM (5 years ago)
- Location:
- trunk/src/includes/core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/core/actions.php
r6923 r7072 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 ); -
trunk/src/includes/core/theme-compat.php
r7006 r7072 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 }
Note: See TracChangeset
for help on using the changeset viewer.