Customize: Ensure `header_image_data` setting exists before attempting to use it.
Amends [27497]. Props Collizo4sky. Fixes #41007. Built from https://develop.svn.wordpress.org/trunk@40935 git-svn-id: http://core.svn.wordpress.org/trunk@40785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
332884f8dc
commit
980f342ad6
|
@ -1321,7 +1321,12 @@ wp_nonce_field( 'custom-header-options', '_wpnonce-custom-header-options' ); ?>
|
|||
* @param WP_Customize_Manager $wp_customize Customize manager.
|
||||
*/
|
||||
public function customize_set_last_used( $wp_customize ) {
|
||||
$data = $wp_customize->get_setting( 'header_image_data' )->post_value();
|
||||
|
||||
$header_image_data_setting = $wp_customize->get_setting( 'header_image_data' );
|
||||
if ( ! $header_image_data_setting ) {
|
||||
return;
|
||||
}
|
||||
$data = $header_image_data_setting->post_value();
|
||||
|
||||
if ( ! isset( $data['attachment_id'] ) ) {
|
||||
return;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.9-alpha-40934';
|
||||
$wp_version = '4.9-alpha-40935';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue