Skip to content

Instantly share code, notes, and snippets.

Avatar
🤗
Help is on the way.

Luke Cavanagh lukecav

🤗
Help is on the way.
View GitHub Profile
@lukecav
lukecav / functions.php
Last active Nov 24, 2020
Disable auto-updates for WordPress core major versions by default in WordPress 5.6
View functions.php
add_filter( 'allow_major_auto_core_updates', '__return_false' );
@lukecav
lukecav / Links
Created Nov 20, 2020
Email undeliverable when using Cloudflare
View Links
@lukecav
lukecav / functions.php
Last active Nov 23, 2020
Disable trackbacks and pingbacks in WordPress 5.6
View functions.php
remove_action( 'do_all_pings', 'do_all_pingbacks' );
remove_action( 'do_all_pings', 'do_all_trackbacks' );
@lukecav
lukecav / functions.php
Created Nov 20, 2020
Disable new site emails being sent when a new subsite is added into a multisite in WordPress
View functions.php
add_filter( 'send_new_site_email return', '__return_false' );
@lukecav
lukecav / Files to delete
Created Nov 19, 2020
Pagely must-use plugin folders and file name
View Files to delete
Folders
pagely-app-stats
pagely-assets
pagely-cache-control
pagely-cache-purge
pagely-cdn
pagely-cli
pagely-plugin-upgrade-hooks
pagely-security-patches
pagely-site-health
@lukecav
lukecav / .htaccess
Created Nov 11, 2020
Fix CORS issues on the Nexcess CDN
View .htaccess
##
<FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js|html|json|gif)">
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Headers "Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With"
Header set Access-Control-Allow-Methods "POST, GET, OPTIONS"
</FilesMatch>
##
@lukecav
lukecav / style.css
Created Nov 11, 2020
Hide subtotal from showing on the cart page in WooCommerce
View style.css
.cart-subtotal {
display: none;
}
@lukecav
lukecav / functions.php
Created Nov 11, 2020
Hide tax on the cart page in WooCommerce
View functions.php
add_action( 'wp', function() {
if ( class_exists( 'woocommerce') ) {
if ( is_cart() ) {
add_filter( 'wc_tax_enabled', '__return_false' );
}
}
});
@lukecav
lukecav / wp-config.php
Created Nov 11, 2020
Enable white label when using the WP Rocket plugin
View wp-config.php
define ('WP_ROCKET_WHITE_LABEL_ACCOUNT', true);
View Links
You can’t perform that action at this time.