Make WordPress Core

Ticket #22957: get_boundary_post.diff

File get_boundary_post.diff, 1.1 KB (added by pathawks, 9 years ago)
  • wp-includes/deprecated.php

    diff --git wp-includes/deprecated.php wp-includes/deprecated.php
    index 582b2fd..a255015 100644
    function get_boundary_post_rel_link($title = '%title', $in_same_cat = false, $ex 
    26342634
    26352635        $posts = get_boundary_post($in_same_cat, $excluded_categories, $start);
    26362636        // If there is no post stop.
    2637         if ( empty($posts) )
     2637        if ( empty($posts) || ! is_single() || is_attachment() )
    26382638                return;
    26392639
    26402640        // Even though we limited get_posts to return only 1 item it still returns an array of objects.
  • wp-includes/link-template.php

    diff --git wp-includes/link-template.php wp-includes/link-template.php
    index 656313e..6fdfef6 100644
    function prev_post_rel_link( $title = '%title', $in_same_term = false, $excluded 
    17531753 */
    17541754function get_boundary_post( $in_same_term = false, $excluded_terms = '', $start = true, $taxonomy = 'category' ) {
    17551755        $post = get_post();
    1756         if ( ! $post || ! is_single() || is_attachment() || ! taxonomy_exists( $taxonomy ) )
     1756        if ( ! taxonomy_exists( $taxonomy ) )
    17571757                return null;
    17581758
    17591759        $query_args = array(