Skip to:
Content

BuddyPress.org

Ticket #4981: 4981.01.patch

File 4981.01.patch, 1004 bytes (added by r-a-y, 5 years ago)
  • src/bp-core/bp-core-functions.php

     
    17021702}
    17031703add_action( 'wp_footer', 'bp_core_print_generation_time' );
    17041704
     1705/**
     1706 * Remove "prev" and "next" relational links from <head> on BuddyPress pages.
     1707 *
     1708 * WordPress automatically generates these relational links to the current
     1709 * page.  However, BuddyPress doesn't adhere to these links.  In this
     1710 * function, we remove these links when on a BuddyPress page.  This also
     1711 * prevents additional, unnecessary queries from running.
     1712 *
     1713 * @since BuddyPress (2.1.0)
     1714 */
     1715function bp_remove_adjacent_posts_rel_link() {
     1716        if ( ! is_buddypress() ) {
     1717                return;
     1718        }
     1719
     1720        remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 );
     1721}
     1722add_action( 'bp_init', 'bp_remove_adjacent_posts_rel_link' );
     1723
    17051724/** Nav Menu ******************************************************************/
    17061725
    17071726/**