diff --git src/wp-includes/class-wp-customize-manager.php src/wp-includes/class-wp-customize-manager.php
index d65f82ad42..5be6043fd9 100644
|
|
final class WP_Customize_Manager { |
5316 | 5316 | ) |
5317 | 5317 | ); |
5318 | 5318 | |
| 5319 | /* |
| 5320 | * If there is no custom header theme mod saved (or added via a filter) |
| 5321 | * but a random header image is going to display on the frontend, set |
| 5322 | * the 'header_image' default to 'random-default-image' to reflect that. |
| 5323 | * See #46128. |
| 5324 | */ |
| 5325 | $header_image_default = sprintf( get_theme_support( 'custom-header', 'default-image' ), get_template_directory_uri(), get_stylesheet_directory_uri() ); |
| 5326 | if ( ! $header_image_default && is_random_header_image() ) { |
| 5327 | $header_image_default = 'random-default-image'; |
| 5328 | } |
| 5329 | |
5319 | 5330 | $this->add_setting( |
5320 | 5331 | new WP_Customize_Filter_Setting( |
5321 | 5332 | $this, |
5322 | 5333 | 'header_image', |
5323 | 5334 | array( |
5324 | | 'default' => sprintf( get_theme_support( 'custom-header', 'default-image' ), get_template_directory_uri(), get_stylesheet_directory_uri() ), |
| 5335 | 'default' => $header_image_default, |
5325 | 5336 | 'theme_supports' => 'custom-header', |
5326 | 5337 | ) |
5327 | 5338 | ) |