Make WordPress Core

Ticket #38802: 38802.patch

File 38802.patch, 3.6 KB (added by ramiy, 7 years ago)
  • wp-includes/class-wp-customize-manager.php

     
    35523552                        $width = absint( get_theme_support( 'custom-header', 'width' ) );
    35533553                        $height = absint( get_theme_support( 'custom-header', 'height' ) );
    35543554                        if ( $width && $height ) {
    3555                                 /* translators: %s: header size in pixels */
    3556                                 $control_description = sprintf( __( 'Upload your video in <code>.mp4</code> format and minimize its file size for best results. Your theme recommends dimensions of %s pixels.' ),
     3555                                /* translators: 1: .mp4 2: header size in pixels */
     3556                                $control_description = sprintf( __( 'Upload your video in %1$s format and minimize its file size for best results. Your theme recommends dimensions of %2$s pixels.' ),
     3557                                        '<code>.mp4</code>',
    35573558                                        sprintf( '<strong>%s &times; %s</strong>', $width, $height )
    35583559                                );
    35593560                        } elseif ( $width ) {
    3560                                 /* translators: %s: header width in pixels */
    3561                                 $control_description = sprintf( __( 'Upload your video in <code>.mp4</code> format and minimize its file size for best results. Your theme recommends a width of %s pixels.' ),
     3561                                /* translators: 1: .mp4 2: header width in pixels */
     3562                                $control_description = sprintf( __( 'Upload your video in %1$s format and minimize its file size for best results. Your theme recommends a width of %2$s pixels.' ),
     3563                                        '<code>.mp4</code>',
    35623564                                        sprintf( '<strong>%s</strong>', $width )
    35633565                                );
    35643566                        } else {
    3565                                 /* translators: %s: header height in pixels */
    3566                                 $control_description = sprintf( __( 'Upload your video in <code>.mp4</code> format and minimize its file size for best results. Your theme recommends a height of %s pixels.' ),
     3567                                /* translators: 1: .mp4 2: header height in pixels */
     3568                                $control_description = sprintf( __( 'Upload your video in %1$s format and minimize its file size for best results. Your theme recommends a height of %2$s pixels.' ),
     3569                                        '<code>.mp4</code>',
    35673570                                        sprintf( '<strong>%s</strong>', $height )
    35683571                                );
    35693572                        }
     
    39723975                if ( $video ) {
    39733976                        $size = filesize( $video );
    39743977                        if ( 8 < $size / pow( 1024, 2 ) ) { // Check whether the size is larger than 8MB.
    3975                                 $validity->add( 'size_too_large', __( 'This video file is too large to use as a header video. Try a shorter video or optimize the compression settings and re-upload a file that is less than 8MB. Or, upload your video to YouTube and link it with the option below.' ) );
     3978                                $validity->add( 'size_too_large', __( 'This video file is too large to use as a header video. Try a shorter video or optimize the compression settings and re-upload a file that is less than 8MB. Or, upload your video to YouTube and link it with the option below.' )
     3979                                );
    39763980                        }
    39773981                        if ( '.mp4' !== substr( $video, -4 ) && '.mov' !== substr( $video, -4 ) ) { // Check for .mp4 or .mov format, which (assuming h.264 encoding) are the only cross-browser-supported formats.
    3978                                 $validity->add( 'invalid_file_type', __( 'Only <code>.mp4</code> or <code>.mov</code> files may be used for header video. Please convert your video file and try again, or, upload your video to YouTube and link it with the option below.' ) );
     3982                                $validity->add( 'invalid_file_type', sprintf(
     3983                                        /* translators: 1: .mp4 2: .mov */
     3984                                        __( 'Only %1$s or %2$s files may be used for header video. Please convert your video file and try again, or, upload your video to YouTube and link it with the option below.' ),
     3985                                        '<code>.mp4</code>',
     3986                                        '<code>.mov</code>'
     3987                                ) );
    39793988                        }
    39803989                }
    39813990                return $validity;