WordPress.org

Make WordPress Core

Ticket #38778: 38778.0.diff

File 38778.0.diff, 1.4 KB (added by westonruter, 3 years ago)
  • src/wp-includes/class-wp-customize-manager.php

    diff --git src/wp-includes/class-wp-customize-manager.php src/wp-includes/class-wp-customize-manager.php
    index 81bd4d1..14f8ab8 100644
    final class WP_Customize_Manager { 
    34073407
    34083408                if ( current_theme_supports( 'custom-header', 'video' ) ) {
    34093409                        $title = __( 'Header Media' );
    3410                         $description = __( 'If you add a video, the image will be used as a fallback while the video loads.' );
     3410                        $description = __( 'If you add a video, the image will be used as a fallback while the video loads. Videos only appear on the front page.' );
    34113411                        $width = absint( get_theme_support( 'custom-header', 'width' ) );
    34123412                        $height = absint( get_theme_support( 'custom-header', 'height' ) );
    34133413                        if ( $width && $height ) {
    final class WP_Customize_Manager { 
    34743474                        'description'    => $control_description,
    34753475                        'section'        => 'header_image',
    34763476                        'mime_type'      => 'video',
     3477                        'active_callback'=> 'is_front_page',
    34773478                ) ) );
    34783479
    34793480                $this->add_control( 'external_header_video', array(
    final class WP_Customize_Manager { 
    34813482                        'type'           => 'url',
    34823483                        'description'    => __( 'Or, enter a YouTube URL:' ),
    34833484                        'section'        => 'header_image',
     3485                        'active_callback'=> 'is_front_page',
    34843486                ) );
    34853487
    34863488                $this->add_control( new WP_Customize_Header_Image_Control( $this ) );