From 9431e5e912fd2369f733bbe78d88dfec5c5f8c1e Mon Sep 17 00:00:00 2001 From: Adrian Gordon Date: Mon, 15 Dec 2014 03:58:39 -0800 Subject: [PATCH 1/2] added native support for woocommerce --- functions.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/functions.php b/functions.php index 947daaaa..be0a7f17 100644 --- a/functions.php +++ b/functions.php @@ -582,10 +582,16 @@ function wp_bootstrap_theme_js(){ get_template_directory_uri() . '/bower_components/modernizer/modernizr.js', array('jquery'), '1.2' ); + + wp_register_script( 'app-js', + get_template_directory_uri() . '/js/app.js', + array('jquery'), + '1.2' ); wp_enqueue_script( 'bootstrap' ); wp_enqueue_script( 'wpbs-js' ); wp_enqueue_script( 'modernizr' ); + wp_enqueue_script( 'app-js' ); } } @@ -707,4 +713,24 @@ function wp_bootstrap_filter_ptags_on_images( $content ){ } add_filter( 'the_content', 'wp_bootstrap_filter_ptags_on_images' ); + +//------------------------------------------------------------------------ +// the following code adds suppport for woocomerce integeration +remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10); +remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10); + +add_action('woocommerce_before_main_content', 'wp_bootstrap_wrapper_start', 10); +add_action('woocommerce_after_main_content', 'wp_bootstrap_wrapper_end', 10); + +function wp_bootstrap_wrapper_start() { + echo '
'; +} + +function wp_bootstrap_wrapper_end() { + echo '
'; +} + +add_theme_support( 'woocommerce' ); +// ---------------------------------------------------------------------- + ?> From 4b7daeb4af83806d9b4f34f588aed562b77c640f Mon Sep 17 00:00:00 2001 From: Adrian Gordon Date: Mon, 15 Dec 2014 04:06:49 -0800 Subject: [PATCH 2/2] removed a custom js file that was registered in functions.php 'app.js' --- functions.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/functions.php b/functions.php index be0a7f17..210487eb 100644 --- a/functions.php +++ b/functions.php @@ -583,15 +583,9 @@ function wp_bootstrap_theme_js(){ array('jquery'), '1.2' ); - wp_register_script( 'app-js', - get_template_directory_uri() . '/js/app.js', - array('jquery'), - '1.2' ); - wp_enqueue_script( 'bootstrap' ); wp_enqueue_script( 'wpbs-js' ); wp_enqueue_script( 'modernizr' ); - wp_enqueue_script( 'app-js' ); } }