← All changes
|
modules/tiled-gallery/tiled-gallery/tiled-gallery-item.php
+6
-2
13.2.4
→
16.3
View file →
| @@ -1,8 +1,12 @@ | ||
| 1 | 1 | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName |
| 2 | 2 | |
| 3 | 3 | use Automattic\Jetpack\Image_CDN\Image_CDN_Core; |
| 4 | 4 | |
| 5 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 6 | + exit( 0 ); | |
| 7 | +} | |
| 8 | + | |
| 5 | 9 | /** |
| 6 | 10 | * Jetpack Tiled Gallery Item class. |
| 7 | 11 | */ |
| 8 | 12 | abstract class Jetpack_Tiled_Gallery_Item { |
| @@ -161,9 +165,9 @@ | ||
| 161 | 165 | * @return array|string |
| 162 | 166 | */ |
| 163 | 167 | public function medium_file() { |
| 164 | 168 | $medium_file_info = wp_get_attachment_image_src( $this->image->ID, 'medium' ); |
| 165 | - $medium_file = isset( $medium_file_info[0] ) ? $medium_file_info[0] : ''; | |
| 169 | + $medium_file = $medium_file_info[0] ?? ''; | |
| 166 | 170 | return $medium_file; |
| 167 | 171 | } |
| 168 | 172 | |
| 169 | 173 | /** |
| @@ -172,9 +176,9 @@ | ||
| 172 | 176 | * @return array|string |
| 173 | 177 | */ |
| 174 | 178 | public function large_file() { |
| 175 | 179 | $large_file_info = wp_get_attachment_image_src( $this->image->ID, 'large' ); |
| 176 | - $large_file = isset( $large_file_info[0] ) ? $large_file_info[0] : ''; | |
| 180 | + $large_file = $large_file_info[0] ?? ''; | |
| 177 | 181 | return $large_file; |
| 178 | 182 | } |
| 179 | 183 | } |
| 180 | 184 | |