PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3
Jetpack – WP Security, Backup, Speed, & Growth v16.3
16.3 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 All 508 releases
← All changes | modules/tiled-gallery/tiled-gallery/tiled-gallery-shape.php +21 -2 12.0.3 → 16.3 View file →
@@ -1,5 +1,10 @@
1 1 <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
2 +
3 +if ( ! defined( 'ABSPATH' ) ) {
4 + exit( 0 );
5 +}
6 +
2 7 // phpcs:disable Generic.Files.OneObjectStructurePerFile.MultipleFound
3 8 /**
4 9 * Jetpack tiled gallery shape class.
5 10 */
@@ -12,15 +17,29 @@
12 17 */
13 18 public static $shapes_used = array();
14 19
15 20 /**
21 + * The images to include in gallery.
22 + *
23 + * @var object[]
24 + */
25 + protected $images;
26 +
27 + /**
28 + * How many images are left after each row.
29 + *
30 + * @var int
31 + */
32 + protected $images_left;
33 +
34 + /**
16 35 * Constructor class.
17 36 *
18 - * @param object $images - the images.
37 + * @param object[] $images - the images.
19 38 */
20 39 public function __construct( $images ) {
21 40 $this->images = $images;
22 - $this->images_left = count( $images );
41 + $this->images_left = is_countable( $images ) ? count( $images ) : 0;
23 42 }
24 43
25 44 /**
26 45 * Return the sum of ratio images.