Skip to content

Instantly share code, notes, and snippets.

View ValenDigital's full-sized avatar
🎯
Focusing

Valen Digital ValenDigital

🎯
Focusing
View GitHub Profile
@ValenDigital
ValenDigital / woocommerce-optimize-scripts.php
Created December 7, 2019 22:43 — forked from DevinWalker/woocommerce-optimize-scripts.php
Only load WooCommerce scripts on shop pages and checkout + cart
/**
* Optimize WooCommerce Scripts
* Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages.
*/
add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 );
function child_manage_woocommerce_styles() {
//remove generator meta tag
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) );
@ValenDigital
ValenDigital / add-rel-nofollow-checkbox.php
Created May 8, 2019 17:42 — forked from bueltge/add-rel-nofollow-checkbox.php
Add a 'Add rel="nofollow" to link' checkbox to the WordPress link editor
<?php
/**
* Add a 'Add rel="nofollow" to link' checkbox to the WordPress link editor
*
* @see https://danielbachhuber.com/tip/rel-nofollow-link-modal/
*/
add_action( 'after_wp_tiny_mce', function(){
?>
<script>