Make WordPress Core


Ignore:
Timestamp:
11/06/2014 08:11:34 PM (12 years ago)
Author:
boonebgorges
Message:

In get_adjacent_post(), $excluded_terms should check term_id rather than term_taxonom_id.

See #29663, #22112.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/link.php

    r29248 r30263  
    191191
    192192        /**
    193         * @ticket 22112
    194         */
     193         * @ticket 22112
     194         */
    195195        function test_get_adjacent_post_exclude_self_term() {
    196                 $include = $this->factory->category->create();
     196                // Bump term_taxonomy to mimic shared term offsets.
     197                global $wpdb;
     198                $wpdb->insert( $wpdb->term_taxonomy, array( 'taxonomy' => 'foo', 'term_id' => 12345 ) );
     199
     200                $include = $this->factory->term->create( array(
     201                        'taxonomy' => 'category',
     202                        'name' => 'Include',
     203                ) );
    197204                $exclude = $this->factory->category->create();
    198205
Note: See TracChangeset for help on using the changeset viewer.