diff --git a/Herbert/Framework/Enqueue.php b/Herbert/Framework/Enqueue.php index 4602740..160a960 100644 --- a/Herbert/Framework/Enqueue.php +++ b/Herbert/Framework/Enqueue.php @@ -73,6 +73,10 @@ public function buildInclude($attrs, $footer) else { wp_enqueue_script($attrs['as'], $attrs['src'], [], false, $footer); + + if(isset($attrs['localize'])) { + wp_localize_script( $attrs['as'], $attrs['as'], $attrs['localize'] ); + } } }