This file contains hidden or 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
//Override woocommerce product categories widgets | |
add_action( 'widgets_init', 'floweb_override_woocommerce_widgets', 15 ); | |
function floweb_override_woocommerce_widgets() { | |
// Ensure our parent class exists to avoid fatal error | |
if ( class_exists( 'WC_Widget_Cart' ) ) { | |
unregister_widget( 'WC_Widget_Cart' ); | |
require get_template_directory() . '/functions/custom-widgets/floweb-class-wc-widget-cart.php'; | |
register_widget( 'Floweb_WC_Widget_Cart' ); | |
} | |
} |
This file contains hidden or 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
//Show on homepage | |
function show_on_homepage() { | |
$post_types = array('post', 'page'); | |
add_meta_box( | |
'meta-box-id', __( 'Show On Home Page', 'show_on_homepage' ), | |
'show_on_homepage_callback', | |
$post_types, | |
'side'); |
This file contains hidden or 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
var debug = process.env.NODE_ENV !== "production"; | |
var webpack = require('webpack'); | |
module.exports = { | |
context: __dirname, | |
devtool: debug ? "inline-sourcemap" : null, | |
entry: "./js/scripts.js", | |
output: { | |
path: __dirname + "/js", | |
filename: "scripts.min.js" |