WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (3 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/customize/selective-refresh.php

    r38858 r42343  
    143143        do_action( 'customize_register', $this->wp_customize );
    144144        $user->remove_cap( 'top_secret_clearance' );
    145         $this->wp_customize->add_setting( 'top_secret_message', array(
    146             'capability' => 'top_secret_clearance', // The administrator role lacks this.
    147         ) );
    148         $this->selective_refresh->add_partial( 'blogname', array(
    149             'selector' => '#site-title',
    150         ) );
    151         $this->selective_refresh->add_partial( 'top_secret_message', array(
    152             'settings' => array( 'top_secret_message' ),
    153         ) );
     145        $this->wp_customize->add_setting(
     146            'top_secret_message', array(
     147                'capability' => 'top_secret_clearance', // The administrator role lacks this.
     148            )
     149        );
     150        $this->selective_refresh->add_partial(
     151            'blogname', array(
     152                'selector' => '#site-title',
     153            )
     154        );
     155        $this->selective_refresh->add_partial(
     156            'top_secret_message', array(
     157                'settings' => array( 'top_secret_message' ),
     158            )
     159        );
    154160        ob_start();
    155161        $this->selective_refresh->export_preview_data();
Note: See TracChangeset for help on using the changeset viewer.