Make WordPress Core

Changeset 33805


Ignore:
Timestamp:
08/29/2015 07:58:13 PM (9 years ago)
Author:
boonebgorges
Message:

Pass taxonomy name to filters in get_adjacent_post().

Props sboisvert.
Fixes #33568.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/link-template.php

    r33736 r33805  
    15711571     *
    15721572     * @since 2.5.0
     1573     * @since 4.4.0 Added the `$taxonomy` parameter.
    15731574     *
    15741575     * @param string $join           The JOIN clause in the SQL.
    15751576     * @param bool   $in_same_term   Whether post should be in a same taxonomy term.
    15761577     * @param array  $excluded_terms Array of excluded term IDs.
    1577      */
    1578     $join  = apply_filters( "get_{$adjacent}_post_join", $join, $in_same_term, $excluded_terms );
     1578     * @param string $taxonomy       Taxonomy. Used to identify the term used when `$in_same_term` is true.
     1579     */
     1580    $join = apply_filters( "get_{$adjacent}_post_join", $join, $in_same_term, $excluded_terms, $taxonomy );
    15791581
    15801582    /**
     
    15851587     *
    15861588     * @since 2.5.0
     1589     * @since 4.4.0 Added the `$taxonomy` parameter.
    15871590     *
    15881591     * @param string $where          The `WHERE` clause in the SQL.
    15891592     * @param bool   $in_same_term   Whether post should be in a same taxonomy term.
    15901593     * @param array  $excluded_terms Array of excluded term IDs.
    1591      */
    1592     $where = apply_filters( "get_{$adjacent}_post_where", $wpdb->prepare( "WHERE p.post_date $op %s AND p.post_type = %s $where", $current_post_date, $post->post_type ), $in_same_term, $excluded_terms );
     1594     * @param string $taxonomy       Taxonomy. Used to identify the term used when `$in_same_term` is true.
     1595     */
     1596    $where = apply_filters( "get_{$adjacent}_post_where", $wpdb->prepare( "WHERE p.post_date $op %s AND p.post_type = %s $where", $current_post_date, $post->post_type ), $in_same_term, $excluded_terms, $taxonomy );
    15931597
    15941598    /**
Note: See TracChangeset for help on using the changeset viewer.