Changeset 39227 for trunk/src/wp-includes/theme.php
- Timestamp:
- 11/14/2016 06:40:08 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/theme.php
r39209 r39227 1411 1411 * Retrieve the markup for a custom header. 1412 1412 * 1413 * The container div will always be returned in the Customizer preview. 1414 * 1413 1415 * @since 4.7.0 1414 1416 * 1415 * @return string |false The markup for a custom header on success. False if not.1417 * @return string The markup for a custom header on success. 1416 1418 */ 1417 1419 function get_custom_header_markup() { 1418 if ( ! has_custom_header() ) {1419 return false;1420 if ( ! has_custom_header() && ! is_customize_preview() ) { 1421 return ''; 1420 1422 } 1421 1423 … … 1429 1431 * Print the markup for a custom header. 1430 1432 * 1433 * A container div will always be printed in the Customizer preview. 1434 * 1431 1435 * @since 4.7.0 1432 1436 */ 1433 1437 function the_custom_header_markup() { 1434 if ( ! $custom_header = get_custom_header_markup() ) { 1438 $custom_header = get_custom_header_markup(); 1439 if ( empty( $custom_header ) ) { 1435 1440 return; 1436 1441 } 1442 1437 1443 echo $custom_header; 1438 1444 1439 if ( has_header_video() && is_front_page() ) {1445 if ( is_front_page() && ( has_header_video() || is_customize_preview() ) ) { 1440 1446 wp_enqueue_script( 'wp-custom-header' ); 1441 1447 wp_localize_script( 'wp-custom-header', '_wpCustomHeaderSettings', get_header_video_settings() );
Note: See TracChangeset
for help on using the changeset viewer.