Last active
November 3, 2017 10:37
-
-
Save pinalj/a0908c532cc8706d7eecbebba7c03c81 to your computer and use it in GitHub Desktop.
Include JS file
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 | |
add_action( 'admin_enqueue_scripts', 'add_script' ); | |
function add_script() { | |
wp_register_script( 'notice-update', plugins_url() . '/add-notices/js/update-notice.js','','1.0', false ); | |
wp_localize_script( 'notice-update', 'notice_params', array( | |
ajaxurl => get_admin_url() . 'admin-ajax.php', | |
)); | |
wp_enqueue_script( 'notice-update' ); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment