| @@ -3,8 +3,12 @@ | ||
| 3 | 3 | use Automattic\Jetpack\Assets; |
| 4 | 4 | use Automattic\Jetpack\Image_CDN\Image_CDN; |
| 5 | 5 | use Automattic\Jetpack\Status; |
| 6 | 6 | |
| 7 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 8 | + exit( 0 ); | |
| 9 | +} | |
| 10 | + | |
| 7 | 11 | // Include the class file containing methods for rounding constrained array elements. |
| 8 | 12 | // Here the constrained array element is the dimension of a row, group or an image in the tiled gallery. |
| 9 | 13 | require_once __DIR__ . '/math/class-constrained-array-rounding.php'; |
| 10 | 14 | |
| @@ -67,9 +71,9 @@ | ||
| 67 | 71 | $this->atts = shortcode_atts( |
| 68 | 72 | array( |
| 69 | 73 | 'order' => 'ASC', |
| 70 | 74 | 'orderby' => 'menu_order ID', |
| 71 | - 'id' => isset( $post->ID ) ? $post->ID : 0, | |
| 75 | + 'id' => $post->ID ?? 0, | |
| 72 | 76 | 'include' => '', |
| 73 | 77 | 'exclude' => '', |
| 74 | 78 | 'type' => '', |
| 75 | 79 | 'grayscale' => false, |
| @@ -181,9 +185,12 @@ | ||
| 181 | 185 | 'modules/tiled-gallery/tiled-gallery/tiled-gallery.js' |
| 182 | 186 | ), |
| 183 | 187 | array(), |
| 184 | 188 | JETPACK__VERSION, |
| 185 | - false | |
| 189 | + array( | |
| 190 | + 'in_footer' => true, | |
| 191 | + 'strategy' => 'defer', | |
| 192 | + ) | |
| 186 | 193 | ); |
| 187 | 194 | wp_enqueue_style( 'tiled-gallery', plugins_url( 'tiled-gallery/tiled-gallery.css', __FILE__ ), array(), '2023-08-21' ); |
| 188 | 195 | wp_style_add_data( 'tiled-gallery', 'rtl', 'replace' ); |
| 189 | 196 | } |