Version Description
- Released 9 July 2014
- Updates genesiswooc_content_product() to reflect WooC 2.1+ templates and correct handling of WooC's page title filter function
Download this release
Release Info
| Developer | nathanrice |
| Plugin | |
| Version | 0.9.8 |
| Comparing to | |
| See all releases | |
Code changes from version 0.9.7 to 0.9.8
- genesis-connect-woocommerce.php +1 -1
- lib/breadcrumb.php +1 -1
- lib/template-loader.php +70 -60
- readme.txt +6 -3
- sp-plugins-integration/genesis-simple-menus.php +1 -1
- sp-plugins-integration/genesis-simple-sidebars.php +1 -1
- templates/archive-product.php +1 -1
- templates/single-product.php +1 -1
- templates/taxonomy.php +1 -1
genesis-connect-woocommerce.php
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
/*
|
| 3 |
Plugin Name: Genesis Connect for WooCommerce
|
| 4 |
Plugin URI: http://www.studiopress.com/plugins/genesis-connect-woocommerce
|
| 5 |
-
Version: 0.9.
|
| 6 |
Author: StudioPress
|
| 7 |
Author URI: http://www.studiopress.com/
|
| 8 |
Description: Allows you to seamlessly integrate WooCommerce with the Genesis Framework and Genesis child themes.
|
| 2 |
/*
|
| 3 |
Plugin Name: Genesis Connect for WooCommerce
|
| 4 |
Plugin URI: http://www.studiopress.com/plugins/genesis-connect-woocommerce
|
| 5 |
+
Version: 0.9.8
|
| 6 |
Author: StudioPress
|
| 7 |
Author URI: http://www.studiopress.com/
|
| 8 |
Description: Allows you to seamlessly integrate WooCommerce with the Genesis Framework and Genesis child themes.
|
lib/breadcrumb.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
* This file contains functions related modifying Genesis Breadcrumb output
|
| 4 |
*
|
| 5 |
* @package genesis_connect_woocommerce
|
| 6 |
-
* @version 0.9.
|
| 7 |
*
|
| 8 |
* @since 0.9.0
|
| 9 |
*
|
| 3 |
* This file contains functions related modifying Genesis Breadcrumb output
|
| 4 |
*
|
| 5 |
* @package genesis_connect_woocommerce
|
| 6 |
+
* @version 0.9.8
|
| 7 |
*
|
| 8 |
* @since 0.9.0
|
| 9 |
*
|
lib/template-loader.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
* These functions manage loading of templates for WooCommerce
|
| 4 |
*
|
| 5 |
* @package genesis_connect_woocommerce
|
| 6 |
-
* @version 0.9.
|
| 7 |
*
|
| 8 |
* @since 0.9.0
|
| 9 |
*/
|
|
@@ -108,6 +108,9 @@ function gencwooc_template_loader( $template ) {
|
|
| 108 |
/**
|
| 109 |
* Shop Loop 'template part' loader
|
| 110 |
*
|
|
|
|
|
|
|
|
|
|
| 111 |
* Function looks for loop-shop.php in child theme's 'woocommerce' folder. If it doesn't exist,
|
| 112 |
* loads the default WooCommerce loop-shop.php file.
|
| 113 |
*
|
|
@@ -122,12 +125,10 @@ function gencwooc_template_loader( $template ) {
|
|
| 122 |
* Based on woocommerce_get_template_part()
|
| 123 |
*
|
| 124 |
* Note: updated v0.9.3 to reflect changes to woocommerce_get_template_part() introduced in
|
| 125 |
-
* WooC v1.4+
|
| 126 |
-
* Effectively, this function is a clone of woocommerce_get_template_part()
|
| 127 |
-
* and is ONLY RETAINED FOR BACKWARDS COMPATIBILITY for pre-0.9.2 custom templates which
|
| 128 |
-
* may use this function.
|
| 129 |
*
|
| 130 |
* @since 0.9.0
|
|
|
|
| 131 |
* @global object $woocommerce WooCommerce instance
|
| 132 |
*/
|
| 133 |
function gencwooc_get_template_part( $slug, $name = '' ) {
|
|
@@ -154,8 +155,8 @@ function gencwooc_template_loader( $template ) {
|
|
| 154 |
|
| 155 |
/**
|
| 156 |
* Display shop items
|
| 157 |
-
*
|
| 158 |
-
* pre-1.6.0
|
| 159 |
*
|
| 160 |
* Uses WooCommerce structure and contains all existing WooCommerce hooks
|
| 161 |
* Note that this will also display any content created in the Shop Page itself
|
|
@@ -199,8 +200,8 @@ function genesiswooc_product_archive() {
|
|
| 199 |
|
| 200 |
/**
|
| 201 |
* Displays shop items for the queried taxonomy term
|
| 202 |
-
*
|
| 203 |
-
* pre-1.6.0
|
| 204 |
*
|
| 205 |
* Uses WooCommerce structure and contains all existing WooCommerce hooks
|
| 206 |
*
|
|
@@ -225,76 +226,85 @@ function genesiswooc_product_taxonomy() {
|
|
| 225 |
|
| 226 |
/**
|
| 227 |
* Displays shop items for archives (taxonomy and main shop page)
|
|
|
|
| 228 |
* Only loaded if WooC 1.6.0+ is in use.
|
| 229 |
*
|
| 230 |
* Uses WooCommerce structure and contains all existing WooCommerce hooks
|
| 231 |
*
|
| 232 |
-
* Code based on WooCommerce 1.
|
| 233 |
*
|
| 234 |
*
|
| 235 |
* @since 0.9.4
|
| 236 |
-
* @updated 0.9.
|
| 237 |
*/
|
| 238 |
function genesiswooc_content_product() {
|
| 239 |
-
|
| 240 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 241 |
?>
|
| 242 |
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
if ( get_query_var( 'paged' ) )
|
| 248 |
-
printf( __( ' – Page %s', 'woocommerce' ), get_query_var( 'paged' ) );
|
| 249 |
-
?>
|
| 250 |
-
<?php elseif ( is_tax() ) : ?>
|
| 251 |
-
<?php echo single_term_title( "", false ); ?>
|
| 252 |
-
<?php else : ?>
|
| 253 |
-
<?php
|
| 254 |
-
$shop_page = get_post( woocommerce_get_page_id( 'shop' ) );
|
| 255 |
-
|
| 256 |
-
echo apply_filters( 'the_title', ( $shop_page_title = get_option( 'woocommerce_shop_page_title' ) ) ? $shop_page_title : $shop_page->post_title, $shop_page->ID );
|
| 257 |
-
?>
|
| 258 |
<?php endif; ?>
|
| 259 |
-
</h1>
|
| 260 |
|
| 261 |
-
|
| 262 |
-
<?php echo '<div class="term-description">' . wpautop( wptexturize( term_description() ) ) . '</div>'; ?>
|
| 263 |
-
<?php elseif ( ! is_search() && get_query_var( 'paged' ) == 0 && ! empty( $shop_page ) && is_object( $shop_page ) ) : ?>
|
| 264 |
-
<?php echo '<div class="page-description">' . apply_filters( 'the_content', $shop_page->post_content ) . '</div>'; ?>
|
| 265 |
-
<?php endif; ?>
|
| 266 |
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 272 |
|
| 273 |
-
<?php
|
| 274 |
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
<?php endwhile; // end of the loop. ?>
|
| 280 |
-
|
| 281 |
-
</ul>
|
| 282 |
|
| 283 |
-
|
| 284 |
-
|
| 285 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 286 |
|
| 287 |
-
<?php
|
| 288 |
-
|
| 289 |
-
|
| 290 |
-
|
| 291 |
<?php endif; ?>
|
| 292 |
|
| 293 |
-
<?php
|
| 294 |
-
|
| 295 |
-
|
| 296 |
-
|
| 297 |
-
|
|
|
|
|
|
|
|
|
|
| 298 |
|
| 299 |
-
|
| 300 |
}
|
| 3 |
* These functions manage loading of templates for WooCommerce
|
| 4 |
*
|
| 5 |
* @package genesis_connect_woocommerce
|
| 6 |
+
* @version 0.9.8
|
| 7 |
*
|
| 8 |
* @since 0.9.0
|
| 9 |
*/
|
| 108 |
/**
|
| 109 |
* Shop Loop 'template part' loader
|
| 110 |
*
|
| 111 |
+
* ONLY RETAINED FOR BACKWARDS COMPATIBILITY for GCW pre-0.9.2 custom templates which
|
| 112 |
+
* may use this function.
|
| 113 |
+
*
|
| 114 |
* Function looks for loop-shop.php in child theme's 'woocommerce' folder. If it doesn't exist,
|
| 115 |
* loads the default WooCommerce loop-shop.php file.
|
| 116 |
*
|
| 125 |
* Based on woocommerce_get_template_part()
|
| 126 |
*
|
| 127 |
* Note: updated v0.9.3 to reflect changes to woocommerce_get_template_part() introduced in
|
| 128 |
+
* WooC v1.4+ and, effectively, this function is a clone of woocommerce_get_template_part()
|
|
|
|
|
|
|
|
|
|
| 129 |
*
|
| 130 |
* @since 0.9.0
|
| 131 |
+
* @updated 0.9.8
|
| 132 |
* @global object $woocommerce WooCommerce instance
|
| 133 |
*/
|
| 134 |
function gencwooc_get_template_part( $slug, $name = '' ) {
|
| 155 |
|
| 156 |
/**
|
| 157 |
* Display shop items
|
| 158 |
+
*
|
| 159 |
+
* FOR BACKWARDS COMPATIBILITY with WooCommerce versions pre-1.6.0
|
| 160 |
*
|
| 161 |
* Uses WooCommerce structure and contains all existing WooCommerce hooks
|
| 162 |
* Note that this will also display any content created in the Shop Page itself
|
| 200 |
|
| 201 |
/**
|
| 202 |
* Displays shop items for the queried taxonomy term
|
| 203 |
+
*
|
| 204 |
+
* FOR BACKWARDS COMPATIBILITY with WooCommerce versions pre-1.6.0
|
| 205 |
*
|
| 206 |
* Uses WooCommerce structure and contains all existing WooCommerce hooks
|
| 207 |
*
|
| 226 |
|
| 227 |
/**
|
| 228 |
* Displays shop items for archives (taxonomy and main shop page)
|
| 229 |
+
*
|
| 230 |
* Only loaded if WooC 1.6.0+ is in use.
|
| 231 |
*
|
| 232 |
* Uses WooCommerce structure and contains all existing WooCommerce hooks
|
| 233 |
*
|
| 234 |
+
* Code based on WooCommerce 2.1.12 templates/archive-product.php
|
| 235 |
*
|
| 236 |
*
|
| 237 |
* @since 0.9.4
|
| 238 |
+
* @updated 0.9.8
|
| 239 |
*/
|
| 240 |
function genesiswooc_content_product() {
|
| 241 |
+
?>
|
| 242 |
+
<?php
|
| 243 |
+
/**
|
| 244 |
+
* woocommerce_before_main_content hook
|
| 245 |
+
*
|
| 246 |
+
* @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
|
| 247 |
+
* @hooked woocommerce_breadcrumb - 20
|
| 248 |
+
*/
|
| 249 |
+
do_action( 'woocommerce_before_main_content' );
|
| 250 |
?>
|
| 251 |
|
| 252 |
+
<?php if ( apply_filters( 'woocommerce_show_page_title', true ) ) : ?>
|
| 253 |
+
|
| 254 |
+
<h1 class="page-title"><?php woocommerce_page_title(); ?></h1>
|
| 255 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 256 |
<?php endif; ?>
|
|
|
|
| 257 |
|
| 258 |
+
<?php do_action( 'woocommerce_archive_description' ); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 259 |
|
| 260 |
+
<?php if ( have_posts() ) : ?>
|
| 261 |
+
|
| 262 |
+
<?php
|
| 263 |
+
/**
|
| 264 |
+
* woocommerce_before_shop_loop hook
|
| 265 |
+
*
|
| 266 |
+
* @hooked woocommerce_result_count - 20
|
| 267 |
+
* @hooked woocommerce_catalog_ordering - 30
|
| 268 |
+
*/
|
| 269 |
+
do_action( 'woocommerce_before_shop_loop' );
|
| 270 |
+
?>
|
| 271 |
|
| 272 |
+
<?php woocommerce_product_loop_start(); ?>
|
| 273 |
|
| 274 |
+
<?php woocommerce_product_subcategories(); ?>
|
| 275 |
+
|
| 276 |
+
|
| 277 |
+
<?php while ( have_posts() ) : the_post(); ?>
|
|
|
|
|
|
|
|
|
|
| 278 |
|
| 279 |
+
<?php wc_get_template_part( 'content', 'product' ); ?>
|
| 280 |
+
|
| 281 |
+
<?php endwhile; // end of the loop. ?>
|
| 282 |
+
|
| 283 |
+
<?php woocommerce_product_loop_end(); ?>
|
| 284 |
+
|
| 285 |
+
<?php
|
| 286 |
+
/**
|
| 287 |
+
* woocommerce_after_shop_loop hook
|
| 288 |
+
*
|
| 289 |
+
* @hooked woocommerce_pagination - 10
|
| 290 |
+
*/
|
| 291 |
+
do_action( 'woocommerce_after_shop_loop' );
|
| 292 |
+
?>
|
| 293 |
|
| 294 |
+
<?php elseif ( ! woocommerce_product_subcategories( array( 'before' => woocommerce_product_loop_start( false ), 'after' => woocommerce_product_loop_end( false ) ) ) ) : ?>
|
| 295 |
+
|
| 296 |
+
<?php wc_get_template( 'loop/no-products-found.php' ); ?>
|
| 297 |
+
|
| 298 |
<?php endif; ?>
|
| 299 |
|
| 300 |
+
<?php
|
| 301 |
+
/**
|
| 302 |
+
* woocommerce_after_main_content hook
|
| 303 |
+
*
|
| 304 |
+
* @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content)
|
| 305 |
+
*/
|
| 306 |
+
do_action( 'woocommerce_after_main_content' );
|
| 307 |
+
?>
|
| 308 |
|
| 309 |
+
<?php
|
| 310 |
}
|
readme.txt
CHANGED
|
@@ -2,8 +2,8 @@
|
|
| 2 |
Contributors: nathanrice, studiopress, studiograsshopper
|
| 3 |
Tags: genesis, genesiswp, studiopress, woocommerce
|
| 4 |
Requires at least: 3.3
|
| 5 |
-
Tested up to:
|
| 6 |
-
Stable tag: 0.9.
|
| 7 |
|
| 8 |
This plugin allows you to seamlessly integrate WooCommerce with the Genesis Framework and Genesis child themes.
|
| 9 |
|
|
@@ -15,7 +15,7 @@ To allow easy customization of these templates, and ensure that you do not lose
|
|
| 15 |
|
| 16 |
Additionally, the plugin makes [Genesis Simple Sidebars](http://wordpress.org/extend/plugins/genesis-simple-sidebars/) and [Genesis Simple Menus](http://wordpress.org/extend/plugins/genesis-simple-menus/) compatible with WooCommerce.
|
| 17 |
|
| 18 |
-
**This version is compatible with WooCommerce 2.
|
| 19 |
|
| 20 |
== Installation ==
|
| 21 |
|
|
@@ -141,6 +141,9 @@ For the benefit of theme developers and customizers, here is a summary of possib
|
|
| 141 |
|
| 142 |
== Changelog ==
|
| 143 |
|
|
|
|
|
|
|
|
|
|
| 144 |
|
| 145 |
= 0.9.7 =
|
| 146 |
* Released 22 December 2013
|
| 2 |
Contributors: nathanrice, studiopress, studiograsshopper
|
| 3 |
Tags: genesis, genesiswp, studiopress, woocommerce
|
| 4 |
Requires at least: 3.3
|
| 5 |
+
Tested up to: 4.6.1
|
| 6 |
+
Stable tag: 0.9.8
|
| 7 |
|
| 8 |
This plugin allows you to seamlessly integrate WooCommerce with the Genesis Framework and Genesis child themes.
|
| 9 |
|
| 15 |
|
| 16 |
Additionally, the plugin makes [Genesis Simple Sidebars](http://wordpress.org/extend/plugins/genesis-simple-sidebars/) and [Genesis Simple Menus](http://wordpress.org/extend/plugins/genesis-simple-menus/) compatible with WooCommerce.
|
| 17 |
|
| 18 |
+
**This version is compatible with WooCommerce 2.1+**
|
| 19 |
|
| 20 |
== Installation ==
|
| 21 |
|
| 141 |
|
| 142 |
== Changelog ==
|
| 143 |
|
| 144 |
+
= 0.9.8 =
|
| 145 |
+
* Released 9 July 2014
|
| 146 |
+
* Updates genesiswooc_content_product() to reflect WooC 2.1+ templates and correct handling of WooC's page title filter function
|
| 147 |
|
| 148 |
= 0.9.7 =
|
| 149 |
* Released 22 December 2013
|
sp-plugins-integration/genesis-simple-menus.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
* Integration - Genesis Simple Menus
|
| 4 |
*
|
| 5 |
* @package genesis_connect_woocommerce
|
| 6 |
-
* @version 0.9.
|
| 7 |
|
| 8 |
*
|
| 9 |
* @since 0.9.0
|
| 3 |
* Integration - Genesis Simple Menus
|
| 4 |
*
|
| 5 |
* @package genesis_connect_woocommerce
|
| 6 |
+
* @version 0.9.8
|
| 7 |
|
| 8 |
*
|
| 9 |
* @since 0.9.0
|
sp-plugins-integration/genesis-simple-sidebars.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
* Integration - Genesis Simple Sidebars
|
| 4 |
*
|
| 5 |
* @package genesis_connect_woocommerce
|
| 6 |
-
* @version 0.9.
|
| 7 |
*
|
| 8 |
* @since 0.9.0
|
| 9 |
*
|
| 3 |
* Integration - Genesis Simple Sidebars
|
| 4 |
*
|
| 5 |
* @package genesis_connect_woocommerce
|
| 6 |
+
* @version 0.9.8
|
| 7 |
*
|
| 8 |
* @since 0.9.0
|
| 9 |
*
|
templates/archive-product.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
* This template displays the archive for Products
|
| 4 |
*
|
| 5 |
* @package genesis_connect_woocommerce
|
| 6 |
-
* @version 0.9.
|
| 7 |
*
|
| 8 |
* Note for customisers/users: Do not edit this file!
|
| 9 |
* ==================================================
|
| 3 |
* This template displays the archive for Products
|
| 4 |
*
|
| 5 |
* @package genesis_connect_woocommerce
|
| 6 |
+
* @version 0.9.8
|
| 7 |
*
|
| 8 |
* Note for customisers/users: Do not edit this file!
|
| 9 |
* ==================================================
|
templates/single-product.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
* This template displays the single Product
|
| 4 |
*
|
| 5 |
* @package genesis_connect_woocommerce
|
| 6 |
-
* @version 0.9.
|
| 7 |
*
|
| 8 |
* Note for customisers/users: Do not edit this file!
|
| 9 |
* ==================================================
|
| 3 |
* This template displays the single Product
|
| 4 |
*
|
| 5 |
* @package genesis_connect_woocommerce
|
| 6 |
+
* @version 0.9.8
|
| 7 |
*
|
| 8 |
* Note for customisers/users: Do not edit this file!
|
| 9 |
* ==================================================
|
templates/taxonomy.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
* This template displays the Product Category and Tag taxonomy term archives
|
| 4 |
*
|
| 5 |
* @package genesis_connect_woocommerce
|
| 6 |
-
* @version 0.9.
|
| 7 |
*
|
| 8 |
* Note for customisers/users: Do not edit this file!
|
| 9 |
* ==================================================
|
| 3 |
* This template displays the Product Category and Tag taxonomy term archives
|
| 4 |
*
|
| 5 |
* @package genesis_connect_woocommerce
|
| 6 |
+
* @version 0.9.8
|
| 7 |
*
|
| 8 |
* Note for customisers/users: Do not edit this file!
|
| 9 |
* ==================================================
|
