diff --git src/wp-includes/link-template.php src/wp-includes/link-template.php
index 365b14b..13619d2 100644
|
|
function get_adjacent_post( $in_same_term = false, $excluded_terms = '', $previo |
1682 | 1682 | $where = ''; |
1683 | 1683 | $adjacent = $previous ? 'previous' : 'next'; |
1684 | 1684 | |
| 1685 | if ( ! empty( $excluded_terms ) && ! is_array( $excluded_terms ) ) { |
| 1686 | // back-compat, $excluded_terms used to be $excluded_terms with IDs separated by " and " |
| 1687 | if ( false !== strpos( $excluded_terms, ' and ' ) ) { |
| 1688 | _deprecated_argument( __FUNCTION__, '3.3.0', sprintf( __( 'Use commas instead of %s to separate excluded terms.' ), "'and'" ) ); |
| 1689 | $excluded_terms = explode( ' and ', $excluded_terms ); |
| 1690 | } else { |
| 1691 | $excluded_terms = explode( ',', $excluded_terms ); |
| 1692 | } |
| 1693 | |
| 1694 | $excluded_terms = array_map( 'intval', $excluded_terms ); |
| 1695 | } |
| 1696 | |
1685 | 1697 | /** |
1686 | 1698 | * Filters the IDs of terms excluded from adjacent post queries. |
1687 | 1699 | * |
… |
… |
function get_adjacent_post( $in_same_term = false, $excluded_terms = '', $previo |
1695 | 1707 | $excluded_terms = apply_filters( "get_{$adjacent}_post_excluded_terms", $excluded_terms ); |
1696 | 1708 | |
1697 | 1709 | if ( $in_same_term || ! empty( $excluded_terms ) ) { |
1698 | | if ( ! empty( $excluded_terms ) && ! is_array( $excluded_terms ) ) { |
1699 | | // back-compat, $excluded_terms used to be $excluded_terms with IDs separated by " and " |
1700 | | if ( false !== strpos( $excluded_terms, ' and ' ) ) { |
1701 | | _deprecated_argument( __FUNCTION__, '3.3.0', sprintf( __( 'Use commas instead of %s to separate excluded terms.' ), "'and'" ) ); |
1702 | | $excluded_terms = explode( ' and ', $excluded_terms ); |
1703 | | } else { |
1704 | | $excluded_terms = explode( ',', $excluded_terms ); |
1705 | | } |
1706 | | |
1707 | | $excluded_terms = array_map( 'intval', $excluded_terms ); |
1708 | | } |
1709 | | |
1710 | 1710 | if ( $in_same_term ) { |
1711 | 1711 | $join .= " INNER JOIN $wpdb->term_relationships AS tr ON p.ID = tr.object_id INNER JOIN $wpdb->term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id"; |
1712 | 1712 | $where .= $wpdb->prepare( 'AND tt.taxonomy = %s', $taxonomy ); |