Last active
May 1, 2018 21:51
-
-
Save raiden808/ec60fedc6d23658593ac6565a091650e to your computer and use it in GitHub Desktop.
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
<?php | |
function enqueu_this_scipt(){ | |
wp_enqueue_script( 'script-name', get_template_directory_uri() . '/js/example.js', array(), '1.0.0', true ); | |
$translation = array( | |
'greetings'=> 'Hellow world!' | |
); | |
wp_localize_script( 'script-name', 'my_handler', $translation ); | |
} | |
add_action( 'wp_enqueue_scripts', 'enqueu_this_scipt' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment