Created
January 3, 2019 16:17
-
-
Save kostasx/19edd83f4cc259258375a8a1d1540de0 to your computer and use it in GitHub Desktop.
WordPress Localized Scripts: Pass PHP data to JavaScript - The JavaScript code.
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
// Paste this code in a file inside your child theme's folder: /js/custom.js | |
jQuery(function($) { | |
alert( php_data.message ); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment