Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (7 years ago)
Author:
pento
Message:

Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/xmlrpc/wp/restoreRevision.php

    r40417 r42343  
    1313        $this->post_id = self::factory()->post->create( array( 'post_content' => 'edit1' ) ); // Not saved as a revision
    1414        // First saved revision on update, see https://core.trac.wordpress.org/changeset/24650
    15         wp_insert_post( array( 'ID' => $this->post_id, 'post_content' => 'edit2' ) );
     15        wp_insert_post(
     16            array(
     17                'ID'           => $this->post_id,
     18                'post_content' => 'edit2',
     19            )
     20        );
    1621
    1722        $revisions = wp_get_post_revisions( $this->post_id );
    1823        //$revision = array_shift( $revisions ); // First revision is empty - https://core.trac.wordpress.org/changeset/23842
    1924        // First revision is NOT empty, see https://core.trac.wordpress.org/changeset/24650
    20         $revision = array_shift( $revisions );
     25        $revision          = array_shift( $revisions );
    2126        $this->revision_id = $revision->ID;
    2227    }
Note: See TracChangeset for help on using the changeset viewer.