Skip to content

Commit 07035a0

Browse files
chore: add script data using wp_add_inline_script
1 parent 3d91c4e commit 07035a0

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/class-loader.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,7 @@ function (Box $box) {
287287
$boxes
288288
),
289289
];
290-
291-
wp_localize_script('boxzilla', 'boxzilla_options', $data);
292-
290+
wp_add_inline_script('boxzilla', 'var boxzilla_options = ' . wp_json_encode($data) . ';', 'before');
293291
do_action('boxzilla_load_assets', $this);
294292
}
295293

0 commit comments

Comments
 (0)