mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +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
|
||||
*
|
||||
@ -13,9 +13,13 @@
|
||||
* @param WP_Customize_Manager $wp_customize Theme Customizer object.
|
||||
*/
|
||||
function twentyseventeen_customize_register( $wp_customize ) {
|
||||
$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
|
||||
$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
|
||||
$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
|
||||
$postMessage_settings = array( 'blogname', 'blogdescription', 'header_textcolor' );
|
||||
foreach( $postMessage_settings as $postMessage_setting ) {
|
||||
$setting = $wp_customize->get_setting( $postMessage_setting );
|
||||
if ( $setting ) {
|
||||
$setting->transport = 'postMessage';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom colors.
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @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.
|
||||
|
Loading…
Reference in New Issue
Block a user