Make WordPress Core


Ignore:
Timestamp:
10/21/2016 05:27:56 AM (8 years ago)
Author:
pento
Message:

Tests: Prevent Twenty Seventeen from interfering with Customizer tests.

This was previously fixed in [38837], but it wasn't really the correct answer, to fix it in the theme. So, [38837] is reverted in this commit, and the Twenty Seventeen actions causing problems are unhooked before tests are run.

See #38372.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyseventeen/inc/customizer.php

    r38841 r38850  
    1414 */
    1515function twentyseventeen_customize_register( $wp_customize ) {
    16     $postMessage_settings = array( 'blogname', 'blogdescription', 'header_textcolor' );
    17     foreach( $postMessage_settings as $postMessage_setting ) {
    18         $setting = $wp_customize->get_setting( $postMessage_setting );
    19         if ( $setting ) {
    20             $setting->transport = 'postMessage';
    21         }
    22     }
     16    $wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
     17    $wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';
     18    $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
    2319
    2420    /**
Note: See TracChangeset for help on using the changeset viewer.