Skip to content

Instantly share code, notes, and snippets.

View codemonkey-jack's full-sized avatar

Jack Kitterhing codemonkey-jack

  • United Kingdom
View GitHub Profile
(function($){
$(document).ready(function(){
$('#mailpoet_subscribe_on_comment').prop('checked', true);
});
})(window.jQuery);
@codemonkey-jack
codemonkey-jack / html5-checkboxvalid.html
Created March 8, 2018 21:11
Simple HMTL 5 checkbox validation
<input id="checkBox" type="checkbox" required><a href="#">You Agree To The Privacy Policy</a>
@codemonkey-jack
codemonkey-jack / no-products-found-text.php
Last active December 12, 2017 20:01
Changes the no products found text in WooCommerce
<?php
function x_no_products_found_text( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'No products were found matching your selection.' :
$translated_text = __( 'Your Custom Text here', 'woocommerce' );
break;
}
return $translated_text;
}
@codemonkey-jack
codemonkey-jack / remove-revisions.sql
Last active June 7, 2016 17:32
Remove revisions from posts
DELETE a,b,c FROM wp_posts a
LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id)
LEFT JOIN wp_postmeta c ON (a.ID = c.post_id)
WHERE a.post_type = 'revision'
@codemonkey-jack
codemonkey-jack / alter-db-engine
Created June 6, 2016 17:57
Alter Database engine type
ALTER TABLE table_name ENGINE=InnoDB;