Make WordPress Core

Changeset 40327 for branches/4.7


Ignore:
Timestamp:
03/24/2017 06:49:07 PM (9 years ago)
Author:
swissspidy
Message:

List Tables: After [38703], [38706], and [40118], adjust the jQuery selector to make the selection of a range of checkboxes work again.

Unprop afercia.
Fixes #40056.

Merges [40268] to the 4.7 branch.

Location:
branches/4.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.7

  • branches/4.7/tests/phpunit/tests/query/results.php

    r38398 r40327  
    367367
    368368        /**
     369         * @ticket 39055
     370         */
     371        function test_query_orderby_post__in_with_no_order_specified() {
     372                $post__in_array = array( self::$post_ids[2], self::$post_ids[0], self::$post_ids[1] );
     373                $expected_returned_array = array( self::$post_ids[2], self::$post_ids[0], self::$post_ids[1] );
     374
     375                $q = new WP_Query( array(
     376                        'post__in' => $post__in_array,
     377                        'orderby'  => 'post__in',
     378                        'fields'   => 'ids'
     379                ) );
     380
     381                // Expect post ids in the same order as post__in array when no 'order' param is passed in
     382                $this->assertSame( $expected_returned_array, $q->posts );
     383        }
     384
     385        /**
     386         * @ticket 39055
     387         */
     388        function test_query_orderby_post__in_with_order_asc() {
     389                $post__in_array = array( self::$post_ids[2], self::$post_ids[0], self::$post_ids[1] );
     390                $expected_returned_array = array( self::$post_ids[2], self::$post_ids[0], self::$post_ids[1] );
     391
     392                $q = new WP_Query( array(
     393                        'post__in' => $post__in_array,
     394                        'orderby'  => 'post__in',
     395                        'order'    => 'asc',
     396                        'fields'   => 'ids'
     397                ) );
     398
     399                // Expect post ids in the same order as post__in array when order=asc is passed in
     400                $this->assertSame( $expected_returned_array, $q->posts );
     401         }
     402
     403        /**
     404         * @ticket 39055
     405         */
     406        function test_query_orderby_post__in_with_order_desc() {
     407                $post__in_array = array( self::$post_ids[1], self::$post_ids[2], self::$post_ids[0] );
     408                $expected_returned_array = array( self::$post_ids[1], self::$post_ids[2], self::$post_ids[0] );
     409
     410                $q = new WP_Query( array(
     411                        'post__in' => $post__in_array,
     412                        'orderby'  => 'post__in',
     413                        'order'    => 'desc',
     414                        'fields'   => 'ids'
     415                ) );
     416
     417                // Note that results are returned in the order specified in the post__in array
     418                // Order=desc does not have an effect on the order of returned results
     419                $this->assertSame( $expected_returned_array, $q->posts );
     420        }
     421
     422        /**
    369423         * @ticket 27252
    370424         * @ticket 31194
Note: See TracChangeset for help on using the changeset viewer.