Changeset 39237
- Timestamp:
- 11/15/2016 03:46:14 AM (7 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/customize-controls.js
r39199 r39237 5285 5285 } ); 5286 5286 5287 // Toggle visibility of Header Video notice when active state change. 5288 api.control( 'header_video', function( headerVideoControl ) { 5289 headerVideoControl.deferred.embedded.done( function() { 5290 var toggleNotice = function() { 5291 var section = api.section( headerVideoControl.section() ), notice; 5292 if ( ! section ) { 5293 return; 5294 } 5295 notice = section.container.find( '.header-video-not-currently-previewable:first' ); 5296 if ( headerVideoControl.active.get() ) { 5297 notice.stop().slideUp( 'fast' ); 5298 } else { 5299 notice.stop().slideDown( 'fast' ); 5300 } 5301 }; 5302 toggleNotice(); 5303 headerVideoControl.active.bind( toggleNotice ); 5304 } ); 5305 } ); 5306 5287 5307 // Update the setting validities. 5288 5308 api.previewer.bind( 'selective-refresh-setting-validities', function handleSelectiveRefreshedSettingValidities( settingValidities ) { -
trunk/src/wp-includes/class-wp-customize-manager.php
r39234 r39237 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 3412 // @todo Customizer sections should support having notifications just like controls do. See <https://core.trac.wordpress.org/ticket/38794>. 3413 $description .= '<div class="customize-control-notifications-container header-video-not-currently-previewable" style="display: none"><ul>'; 3414 $description .= '<li class="notice notice-info">' . __( 'This theme doesn\'t support video headers on this page. Navigate to the front page or another page that supports video headers.' ) . '</li>'; 3415 $description .= '</ul></div>'; 3411 3416 $width = absint( get_theme_support( 'custom-header', 'width' ) ); 3412 3417 $height = absint( get_theme_support( 'custom-header', 'height' ) ); … … 3479 3484 'section' => 'header_image', 3480 3485 'mime_type' => 'video', 3486 // @todo These button_labels can be removed once WP_Customize_Media_Control provides mime_type-specific labels automatically. See <https://core.trac.wordpress.org/ticket/38796>. 3481 3487 'button_labels' => array( 3482 3488 'select' => __( 'Select Video' ), … … 3485 3491 'frame_title' => __( 'Select Video' ), 3486 3492 'frame_button' => __( 'Choose Video' ), 3487 ) 3493 ), 3494 'active_callback' => 'is_front_page', 3488 3495 ) ) ); 3489 3496 … … 3493 3500 'description' => __( 'Or, enter a YouTube URL:' ), 3494 3501 'section' => 'header_image', 3502 'active_callback'=> 'is_front_page', 3495 3503 ) ); 3496 3504
Note: See TracChangeset
for help on using the changeset viewer.