Make WordPress Core

Changeset 14019


Ignore:
Timestamp:
04/06/2010 03:06:42 PM (15 years ago)
Author:
ryan
Message:

Trigger adjacent_posts_rel_link() from wp_head only for single post pages to avoid unnecessary queries. see #10867

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/default-filters.php

    r13733 r14019  
    183183add_action( 'wp_head',             'parent_post_rel_link',          10, 0 );
    184184add_action( 'wp_head',             'start_post_rel_link',           10, 0 );
    185 add_action( 'wp_head',             'adjacent_posts_rel_link',      10, 0 );
     185add_action( 'wp_head',             'adjacent_posts_rel_link_wp_head', 10, 0 );
    186186add_action( 'wp_head',             'locale_stylesheet'                    );
    187187add_action( 'publish_future_post', 'check_and_publish_future_post', 10, 1 );
  • trunk/wp-includes/link-template.php

    r13978 r14019  
    10961096
    10971097/**
     1098 * Display relational links for the posts adjacent to the current post for single post pages.
     1099 *
     1100 * This is meant to be attached to actions like 'wp_head'.  Do not call this directly in plugins or theme templates.
     1101 * @since 3.0.0
     1102 *
     1103 */
     1104function adjacent_posts_rel_link_wp_head() {
     1105    if ( !is_singular() || is_attachment() )
     1106        return;
     1107    adjacent_posts_rel_link();
     1108}
     1109
     1110/**
    10981111 * Display relational link for the next post adjacent to the current post.
    10991112 *
Note: See TracChangeset for help on using the changeset viewer.