mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-13 19:51:23 +01:00
Twenty Seventeen: Fix a PHP warning on fresh installs.
When setting the `transport` parameter on Customizer settings, we need to ensure the setting exists, particularly on new sites. See #38372. Built from https://develop.svn.wordpress.org/trunk@38837 git-svn-id: http://core.svn.wordpress.org/trunk@38780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e51531a425
commit
35186cff65
@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Twenty Seventeen: Theme Customizer
|
* Twenty Seventeen: Theme Customizer
|
||||||
*
|
*
|
||||||
@ -13,9 +13,13 @@
|
|||||||
* @param WP_Customize_Manager $wp_customize Theme Customizer object.
|
* @param WP_Customize_Manager $wp_customize Theme Customizer object.
|
||||||
*/
|
*/
|
||||||
function twentyseventeen_customize_register( $wp_customize ) {
|
function twentyseventeen_customize_register( $wp_customize ) {
|
||||||
$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
|
$postMessage_settings = array( 'blogname', 'blogdescription', 'header_textcolor' );
|
||||||
$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
|
foreach( $postMessage_settings as $postMessage_setting ) {
|
||||||
$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
|
$setting = $wp_customize->get_setting( $postMessage_setting );
|
||||||
|
if ( $setting ) {
|
||||||
|
$setting->transport = 'postMessage';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Custom colors.
|
* Custom colors.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.7-alpha-38836';
|
$wp_version = '4.7-alpha-38837';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user