Tag Info

New answers tagged

0

Registering dependencies WordPress uses the Dependency API for that. It's fairly simple: Register & enqueue a script, then pass data that you want to pass from WP/PHP to JS using wp_localize_script(), which adds a <script> tag containing an Array to your DOM (exactly before your script gets added to it): add_action( 'wp_enqueue_scripts', ...



Top 50 recent answers are included