Created
May 2, 2019 10:52
-
-
Save mohammadkhoeini/6985ed2aed42bcaf39e7c5d06712f20c to your computer and use it in GitHub Desktop.
WP - Load Script with Variables For WordPress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wp_enqueue_script('SCRIPT_UNIQE_NAME', 'JSURL'); | |
wp_localize_script( 'SCRIPT_UNIQE_NAME', 'VARIABLE_NAME', array( | |
'ObjName' => get_theme_mod( 'Name' , '#000'), | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment