diff options
author | Yury German <blueknight@gentoo.org> | 2022-01-23 18:37:36 -0500 |
---|---|---|
committer | Yury German <blueknight@gentoo.org> | 2022-01-23 18:37:36 -0500 |
commit | f18b23a3a9378fb0a98856d436aa9ebf94e47429 (patch) | |
tree | e418433e22854ebd2d77eaa869d5d0470a973317 /plugins/jetpack/modules/shortcodes/archiveorg.php | |
parent | Add classic-editor 1.5 (diff) | |
download | blogs-gentoo-f18b23a3a9378fb0a98856d436aa9ebf94e47429.tar.gz blogs-gentoo-f18b23a3a9378fb0a98856d436aa9ebf94e47429.tar.bz2 blogs-gentoo-f18b23a3a9378fb0a98856d436aa9ebf94e47429.zip |
Updating Classic Editor, Google Authenticatior, Jetpack, Public Post Preview, Table of Contents, Wordpress Importer
Signed-off-by: Yury German <blueknight@gentoo.org>
Diffstat (limited to 'plugins/jetpack/modules/shortcodes/archiveorg.php')
-rw-r--r-- | plugins/jetpack/modules/shortcodes/archiveorg.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/plugins/jetpack/modules/shortcodes/archiveorg.php b/plugins/jetpack/modules/shortcodes/archiveorg.php index f3e0e2af..122ae820 100644 --- a/plugins/jetpack/modules/shortcodes/archiveorg.php +++ b/plugins/jetpack/modules/shortcodes/archiveorg.php @@ -9,7 +9,7 @@ * <iframe src="http://archive.org/embed/Experime1940&autoplay=1&poster=http://archive.org/images/map.png" width="640" height="480" frameborder="0" webkitallowfullscreen="true" mozallowfullscreen="true" allowfullscreen></iframe> * - * @package Jetpack + * @package automattic/jetpack */ /** @@ -69,13 +69,13 @@ function jetpack_archiveorg_shortcode( $atts ) { if ( ! $atts['width'] ) { $width = absint( $content_width ); } else { - $width = intval( $atts['width'] ); + $width = (int) $atts['width']; } if ( ! $atts['height'] ) { $height = round( ( $width / 640 ) * 360 ); } else { - $height = intval( $atts['height'] ); + $height = (int) $atts['height']; } if ( $atts['autoplay'] ) { @@ -90,13 +90,13 @@ function jetpack_archiveorg_shortcode( $atts ) { $poster = ''; } - $url = esc_url( "https://archive.org/embed/{$id}{$autoplay}{$poster}" ); - - $title = esc_html__( 'Archive.org', 'jetpack' ); - - $html = "<div class='embed-archiveorg' style='text-align:center;'><iframe title='$title' src='$url' width='$width' height='$height' style='border:0;' webkitallowfullscreen='true' mozallowfullscreen='true' allowfullscreen></iframe></div>"; - - return $html; + return sprintf( + '<div class="embed-archiveorg" style="text-align:center;"><iframe title="%s" src="%s" width="%s" height="%s" style="border:0;" webkitallowfullscreen="true" mozallowfullscreen="true" allowfullscreen></iframe></div>', + esc_attr__( 'Archive.org', 'jetpack' ), + esc_url( "https://archive.org/embed/{$id}{$autoplay}{$poster}" ), + esc_attr( $width ), + esc_attr( $height ) + ); } add_shortcode( 'archiveorg', 'jetpack_archiveorg_shortcode' ); |