diff --git a/src/wp-admin/js/customize-controls.js b/src/wp-admin/js/customize-controls.js index 17159a0964..ab834680ec 100644 --- a/src/wp-admin/js/customize-controls.js +++ b/src/wp-admin/js/customize-controls.js @@ -5284,6 +5284,26 @@ } ); } ); + // Toggle visibility of Header Video notice when active state change. + api.control( 'header_video', function( headerVideoControl ) { + headerVideoControl.deferred.embedded.done( function() { + var toggleNotice = function() { + var section = api.section( headerVideoControl.section() ), notice; + if ( ! section ) { + return; + } + notice = section.container.find( '.header-video-not-currently-previewable:first' ); + if ( headerVideoControl.active.get() ) { + notice.stop().slideUp( 'fast' ); + } else { + notice.stop().slideDown( 'fast' ); + } + }; + toggleNotice(); + headerVideoControl.active.bind( toggleNotice ); + } ); + } ); + // Update the setting validities. api.previewer.bind( 'selective-refresh-setting-validities', function handleSelectiveRefreshedSettingValidities( settingValidities ) { api._handleSettingValidities( { diff --git a/src/wp-includes/class-wp-customize-manager.php b/src/wp-includes/class-wp-customize-manager.php index 34aeba767d..54c3f0eac1 100644 --- a/src/wp-includes/class-wp-customize-manager.php +++ b/src/wp-includes/class-wp-customize-manager.php @@ -3407,7 +3407,12 @@ final class WP_Customize_Manager { if ( current_theme_supports( 'custom-header', 'video' ) ) { $title = __( 'Header Media' ); - $description = __( 'If you add a video, the image will be used as a fallback while the video loads.' ); + $description = '
' . __( 'If you add a video, the image will be used as a fallback while the video loads.' ) . '
'; + + // @todo Customizer sections should support having notifications just like controls do. See