Created
November 21, 2017 18:57
-
-
Save khripunovpp/466d43bfd6ad85caf1d6804e444f867d to your computer and use it in GitHub Desktop.
WP wp_enqueue_scripts action
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
add_action( 'wp_enqueue_scripts', 'my_scripts_method' ); | |
function my_scripts_method(){ | |
wp_enqueue_style( 'style', get_stylesheet_uri(), array(), hash_file('crc32', get_stylesheet_uri())); | |
wp_enqueue_script('libs', get_template_directory_uri() . '/js/libs.js', array(), hash_file('crc32', get_template_directory_uri() . '/js/libs.js'), true); | |
wp_enqueue_script('custom', get_template_directory_uri() . '/js/common.js', array(), hash_file('crc32', get_template_directory_uri() . '/js/common.js'), true); | |
wp_deregister_script( 'jquery-core' ); | |
wp_register_script( 'jquery-core', '//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'); | |
wp_enqueue_script( 'jquery' ); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment