This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Bootstrap collapse slide effect | |
$('.collapse').on('show.bs.collapse', function(e) { | |
if( $('#'+this.id+'').hasClass('navbar-collapse') ){ | |
$(document).find('#'+this.id+'').slideDown(500); | |
} | |
}); | |
$('.collapse').on('hide.bs.collapse', function(e) { | |
if( $('#'+this.id+'').hasClass('navbar-collapse') ){ | |
$(document).find('#'+this.id+'').slideUp(500); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Add stock status to archive and single pages | |
* | |
* WooCommerce Hooks: Actions and filters - https://docs.woocommerce.com/document/introduction-to-hooks-actions-and-filters/# | |
* Action and Filter Hook Reference - https://docs.woocommerce.com/wc-apidocs/hook-docs.html | |
* | |
*/ | |
function woocommerce_stock_status() { | |
global $product; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Checkbox sanitization | |
* | |
* @param bool int $input Whether the checkbox is checked. | |
* @return int Whether the checkbox is checked. | |
*/ | |
function my_sanitize_checkbox( $input ) { | |
if( 1 == $input || true == $input ){ | |
return 1; | |
} else { |