Ticket #38802: 38802.patch
File 38802.patch, 3.6 KB (added by , 7 years ago) |
---|
-
wp-includes/class-wp-customize-manager.php
3552 3552 $width = absint( get_theme_support( 'custom-header', 'width' ) ); 3553 3553 $height = absint( get_theme_support( 'custom-header', 'height' ) ); 3554 3554 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>', 3557 3558 sprintf( '<strong>%s × %s</strong>', $width, $height ) 3558 3559 ); 3559 3560 } 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>', 3562 3564 sprintf( '<strong>%s</strong>', $width ) 3563 3565 ); 3564 3566 } 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>', 3567 3570 sprintf( '<strong>%s</strong>', $height ) 3568 3571 ); 3569 3572 } … … 3972 3975 if ( $video ) { 3973 3976 $size = filesize( $video ); 3974 3977 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 ); 3976 3980 } 3977 3981 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 ) ); 3979 3988 } 3980 3989 } 3981 3990 return $validity;