Extracting jQuery from theme.min.js
Just one JS file caused some trouble. Theme loads the WP jQuery file as extra file again
This commit is contained in:
parent
d6c8bc4284
commit
5d6e139c7e
|
@ -57,7 +57,6 @@ gulp.task('cleancss', function() {
|
||||||
// Uglifies and concat all JS files into one
|
// Uglifies and concat all JS files into one
|
||||||
gulp.task('scripts', function() {
|
gulp.task('scripts', function() {
|
||||||
gulp.src([
|
gulp.src([
|
||||||
basePaths.dev + 'js/jquery.min.js',
|
|
||||||
basePaths.dev + 'js/bootstrap3/bootstrap.min.js', //<--------- Change from /bootstrap3 to /bootstrap4 Watch out! just for testing in the moment!
|
basePaths.dev + 'js/bootstrap3/bootstrap.min.js', //<--------- Change from /bootstrap3 to /bootstrap4 Watch out! just for testing in the moment!
|
||||||
basePaths.dev + 'js/owl.carousel.min.js',
|
basePaths.dev + 'js/owl.carousel.min.js',
|
||||||
basePaths.dev + 'js/skip-link-focus-fix.js'
|
basePaths.dev + 'js/skip-link-focus-fix.js'
|
||||||
|
|
|
@ -7,11 +7,7 @@
|
||||||
|
|
||||||
function understrap_scripts() {
|
function understrap_scripts() {
|
||||||
wp_enqueue_style( 'understrap-theme', get_stylesheet_directory_uri() . '/css/theme.min.css', array(), '0.3.8');
|
wp_enqueue_style( 'understrap-theme', get_stylesheet_directory_uri() . '/css/theme.min.css', array(), '0.3.8');
|
||||||
|
wp_enqueue_script('jquery');
|
||||||
// Unregister the default jQuery
|
|
||||||
wp_deregister_script('jquery');
|
|
||||||
|
|
||||||
|
|
||||||
wp_enqueue_script( 'understrap-main', get_template_directory_uri() . '/js/theme.min.js', array(), '0.3.8', true );
|
wp_enqueue_script( 'understrap-main', get_template_directory_uri() . '/js/theme.min.js', array(), '0.3.8', true );
|
||||||
|
|
||||||
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
|
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
|
||||||
|
@ -21,6 +17,7 @@ function understrap_scripts() {
|
||||||
|
|
||||||
add_action( 'wp_enqueue_scripts', 'understrap_scripts' );
|
add_action( 'wp_enqueue_scripts', 'understrap_scripts' );
|
||||||
|
|
||||||
|
|
||||||
// Removing the fuc!?$% emoji´s
|
// Removing the fuc!?$% emoji´s
|
||||||
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
|
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
|
||||||
remove_action( 'wp_print_styles', 'print_emoji_styles' );
|
remove_action( 'wp_print_styles', 'print_emoji_styles' );
|
||||||
|
|
File diff suppressed because one or more lines are too long
Reference in New Issue