From 866b3da665d53a5ccd070ec5d014322955b3bb6f Mon Sep 17 00:00:00 2001 From: Dennis Ploetner Date: Tue, 8 Oct 2024 14:56:24 +0200 Subject: [PATCH] Script defer --- MslsSelect.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/MslsSelect.php b/MslsSelect.php index 0445c5f..cabb6b4 100644 --- a/MslsSelect.php +++ b/MslsSelect.php @@ -74,7 +74,16 @@ public static function init(): self { * @return void */ public static function enqueue_scripts(): void { - wp_enqueue_script( 'mslsselect', plugins_url( '/js/mslsselect.min.js', __FILE__ ), [], self::VERSION, true ); + wp_enqueue_script( + 'mslsselect', + plugins_url( '/js/mslsselect.min.js', __FILE__ ), + array(), + self::VERSION, + array( + 'in_footer' => true, + 'strategy' => 'defer', + ) + ); } /**