Last active
December 4, 2018 22:37
-
-
Save Danetag/e94f4038cd10ba5d17bf4e2a85e2edef to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| <? | |
| function register_scripts() { | |
| // include the base style in the header. | |
| $base_js = WP_DEBUG ? 'http://localhost:8080/bundle.js' : get_stylesheet_directory_uri() . ( '/static/app.js' ); | |
| wp_register_script( | |
| 'base-script', // handle name. | |
| $base_js, | |
| null, // an array of dependent styles. | |
| '1.0', // version number. | |
| false // CSS media type. | |
| ); | |
| wp_enqueue_script( 'base-script' ); | |
| // remove JS | |
| wp_deregister_script('jquery'); | |
| } | |
| add_action( 'wp_enqueue_scripts', "register_scripts"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment