PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-beta
Jetpack – WP Security, Backup, Speed, & Growth v16.3-beta
16.3-beta 16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 All 507 releases
← All changes | modules/tiled-gallery/tiled-gallery/templates/carousel-container.php +10 -3 12.5.2 → 16.3-beta View file →
@@ -1,16 +1,23 @@
1 1 <?php
2 2 /**
3 3 * Encode extra carousel container data.
4 4 *
5 + * @html-template Jetpack_Tiled_Gallery_Layout::template
5 6 * @package jetpack
6 7 */
7 8
9 +if ( ! defined( 'ABSPATH' ) ) {
10 + exit( 0 );
11 +}
12 +
13 +// phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable -- HTML template, let Phan handle it.
14 +
8 15 // Using JSON_HEX_AMP avoids breakage due to `esc_attr()` refusing to double-encode.
9 -$extra = wp_json_encode( $this->get_container_extra_data(), JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT ); // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable
16 +$extra = wp_json_encode( $this->get_container_extra_data(), JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT );
10 17 ?>
11 18 <div
12 - class="tiled-gallery type-<?php echo esc_html( $this->type ); // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable ?> tiled-gallery-unresized"
19 + class="tiled-gallery type-<?php echo esc_html( $this->type ); ?> tiled-gallery-unresized"
13 20 data-original-width="<?php echo esc_attr( Jetpack_Tiled_Gallery::get_content_width() ); ?>"
14 21 <?php if ( isset( $extra ) ) : ?>
15 22 data-carousel-extra='<?php echo esc_attr( $extra ); ?>'
16 23 <?php endif; ?>
@@ -15,6 +22,6 @@
15 22 data-carousel-extra='<?php echo esc_attr( $extra ); ?>'
16 23 <?php endif; ?>
17 24 itemscope itemtype="http://schema.org/ImageGallery"
18 25 >
19 - <?php $this->template( "$this->type-layout", $context ); // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable ?>
26 + <?php $this->template( "$this->type-layout", $context ); ?>
20 27 </div>