From a415c29efee45520ae252d2aa28f1083a521cd7b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 09:56:49 +0200 Subject: Adding upstream version 6.4.3+dfsg1. Signed-off-by: Daniel Baumann --- wp-includes/media-template.php | 1570 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1570 insertions(+) create mode 100644 wp-includes/media-template.php (limited to 'wp-includes/media-template.php') diff --git a/wp-includes/media-template.php b/wp-includes/media-template.php new file mode 100644 index 0000000..21adc09 --- /dev/null +++ b/wp-includes/media-template.php @@ -0,0 +1,1570 @@ + + + +<# var w_rule = '', classes = [], + w, h, settings = wp.media.view.settings, + isYouTube = isVimeo = false; + + if ( ! _.isEmpty( data.model.src ) ) { + isYouTube = data.model.src.match(/youtube|youtu\.be/); + isVimeo = -1 !== data.model.src.indexOf('vimeo'); + } + + if ( settings.contentWidth && data.model.width >= settings.contentWidth ) { + w = settings.contentWidth; + } else { + w = data.model.width; + } + + if ( w !== data.model.width ) { + h = Math.ceil( ( data.model.height * w ) / data.model.width ); + } else { + h = data.model.height; + } + + if ( w ) { + w_rule = 'width: ' + w + 'px; '; + } + + if ( isYouTube ) { + classes.push( 'youtube-video' ); + } + + if ( isVimeo ) { + classes.push( 'vimeo-video' ); + } + +#> +
+ +
+ Learn how to describe the purpose of the image%3$s. Leave empty if the image is purely decorative.' ), + esc_url( 'https://www.w3.org/WAI/tutorials/images/decision-tree' ), + 'target="_blank" rel="noopener"', + sprintf( + ' %s', + /* translators: Hidden accessibility text. */ + __( '(opens in a new tab)' ) + ) + ); + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +