Make WordPress Core


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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.