Skip to content

Instantly share code, notes, and snippets.

View itsHall's full-sized avatar
💭
Living

Tyler Hall itsHall

💭
Living
View GitHub Profile
@itsHall
itsHall / functions.php
Last active November 2, 2021 21:33
Use CDN jQuery | WP
<?php
//----------------------------------------//
// Making jQuery load from Google Library //
//----------------------------------------//
add_filter( 'init', 'replace_default_jquery_with_fallback');
function replace_default_jquery_with_fallback() {
if (is_admin()) {
return;
@itsHall
itsHall / gulpfile.js
Last active September 27, 2019 20:57
Gulpfile with Sourcemaps and File Minification
'use strict';
var config = {
project: 'bta',
stylePaths: [
'./scss/style.scss'
],
jsPaths: [
'./js/*'
]
@itsHall
itsHall / functions.php
Last active October 7, 2021 14:07
Remove WP Injected Links/Scripts
<?php
//--------------------------------//
// Remove Unnecessary Header Code //
//--------------------------------//
remove_action('wp_head', 'wp_generator');
remove_action('wp_head', 'wlwmanifest_link');
remove_action('wp_head', 'rsd_link');
remove_action('wp_head', 'wp_shortlink_wp_head');
remove_action('wp_head', 'print_emoji_detection_script', 7 );
@itsHall
itsHall / functions.php
Last active October 7, 2021 14:07
Removes WP Injected Jquery (jquery + migrate)
<?php
//------------------//
// Remove WP Jquery //
//------------------//
function change_default_jquery( ){
wp_dequeue_script( 'jquery');
wp_deregister_script( 'jquery');
}
add_filter( 'wp_enqueue_scripts', 'change_default_jquery', PHP_INT_MAX );