diff --git src/wp-admin/js/customize-controls.js src/wp-admin/js/customize-controls.js
index 17159a0..4661017 100644
|
|
|
5284 | 5284 | } ); |
5285 | 5285 | } ); |
5286 | 5286 | |
| 5287 | // Toggle visibility of Header Video notice when active state change. |
| 5288 | api.control( 'header_image', 'header_video', function( headerImageControl, headerVideoControl ) { |
| 5289 | var toggleNotice = function() { |
| 5290 | var code = 'header_video_unpreviewable', notification; |
| 5291 | if ( ! headerVideoControl.active.get() && ! headerImageControl.notifications.has( code ) ) { |
| 5292 | notification = new api.Notification( code, { message: api.l10n.headerVideoNotice, type: 'info' } ); |
| 5293 | headerImageControl.notifications.add( code, notification ); |
| 5294 | } else if ( headerVideoControl.active.get() && headerImageControl.notifications.has( code ) ) { |
| 5295 | headerImageControl.notifications.remove( code ); |
| 5296 | } |
| 5297 | }; |
| 5298 | headerVideoControl.active.bind( toggleNotice ); |
| 5299 | toggleNotice(); |
| 5300 | } ); |
| 5301 | |
5287 | 5302 | // Update the setting validities. |
5288 | 5303 | api.previewer.bind( 'selective-refresh-setting-validities', function handleSelectiveRefreshedSettingValidities( settingValidities ) { |
5289 | 5304 | api._handleSettingValidities( { |
diff --git src/wp-includes/class-wp-customize-manager.php src/wp-includes/class-wp-customize-manager.php
index 34aeba7..9f411d3 100644
|
|
final class WP_Customize_Manager { |
3407 | 3407 | |
3408 | 3408 | if ( current_theme_supports( 'custom-header', 'video' ) ) { |
3409 | 3409 | $title = __( 'Header Media' ); |
3410 | | $description = __( 'If you add a video, the image will be used as a fallback while the video loads.' ); |
| 3410 | $description = __( '<p>If you add a video, the image will be used as a fallback while the video loads.</p>' ); |
| 3411 | $description .= '<p class="header-video-not-currently-previewable notice notice-info">' . __( 'Note: This theme doesn\'t support video headers on this page. Navigate to the front page or another page that does.' ) . '</p>'; |
3411 | 3412 | $width = absint( get_theme_support( 'custom-header', 'width' ) ); |
3412 | 3413 | $height = absint( get_theme_support( 'custom-header', 'height' ) ); |
3413 | 3414 | if ( $width && $height ) { |
… |
… |
final class WP_Customize_Manager { |
3484 | 3485 | 'placeholder' => __( 'No video selected' ), |
3485 | 3486 | 'frame_title' => __( 'Select Video' ), |
3486 | 3487 | 'frame_button' => __( 'Choose Video' ), |
3487 | | ) |
| 3488 | ), |
| 3489 | 'active_callback' => 'is_front_page', |
3488 | 3490 | ) ) ); |
3489 | 3491 | |
3490 | 3492 | $this->add_control( 'external_header_video', array( |
… |
… |
final class WP_Customize_Manager { |
3492 | 3494 | 'type' => 'url', |
3493 | 3495 | 'description' => __( 'Or, enter a YouTube URL:' ), |
3494 | 3496 | 'section' => 'header_image', |
| 3497 | 'active_callback'=> 'is_front_page', |
3495 | 3498 | ) ); |
3496 | 3499 | |
3497 | 3500 | $this->add_control( new WP_Customize_Header_Image_Control( $this ) ); |
diff --git src/wp-includes/script-loader.php src/wp-includes/script-loader.php
index fadfb28..9ad7f90 100644
|
|
function wp_default_scripts( &$scripts ) { |
472 | 472 | 'untitledBlogName' => __( '(Untitled)' ), |
473 | 473 | // Used for overriding the file types allowed in plupload. |
474 | 474 | 'allowedFiles' => __( 'Allowed Files' ), |
| 475 | 'headerVideoNotice' => __( 'Note: This theme doesn\'t support video headers on this page. Navigate to the front page or another page that does.' ), |
475 | 476 | ) ); |
476 | 477 | $scripts->add( 'customize-selective-refresh', "/wp-includes/js/customize-selective-refresh$suffix.js", array( 'jquery', 'wp-util', 'customize-preview' ), false, 1 ); |
477 | 478 | |