'; $defaults['wrap_after'] = ''; return $defaults; } /** * Custom markup tweaks * @return void */ public function custom_storefront_markup() { global $storefront_version; if ( version_compare( $storefront_version, '2.3.0', '>=' ) ) { if ( storefront_is_woocommerce_activated() ) { add_filter( 'woocommerce_breadcrumb_defaults', array( $this, 'change_breadcrumb_delimiter' ), 15 ); remove_action( 'storefront_before_content', 'woocommerce_breadcrumb', 10 ); add_action( 'storefront_content_top', 'woocommerce_breadcrumb', 10 ); } } } /** * Remove homepage sections from default location * * @return void */ public function remove_homepage_templates() { remove_action( 'homepage', 'storefront_featured_products', 40 ); remove_action( 'homepage', 'storefront_homepage_content', 10 ); } /** * Add homepage sections to new location * * @return void */ public function move_homepage_sections() { $homepage_content = true; $homepage_featured = true; // Compatibility with Storefront Powerpack if ( class_exists( 'Storefront_Powerpack' ) ) { $homepage_content = get_theme_mod( 'sp_homepage_content', true ); $homepage_featured = get_theme_mod( 'sp_homepage_featured', true ); } if ( false !== $homepage_content ) { add_action( 'boutique_before_homepage_content', 'storefront_homepage_content', 10 ); } if ( false !== $homepage_featured ) { add_action( 'boutique_before_homepage_content', 'storefront_featured_products', 20 ); } } /** * Primary navigation wrapper * @return void */ public function primary_navigation_wrapper() { echo '
'; } /** * Primary navigation wrapper close * @return void */ public function primary_navigation_wrapper_close() { echo '
'; } /** * Return args to set product display limit and column amount to 3 * @param array $args args passed to the filter * @return array the modified args */ public function product_columns_three( $args ) { $args['limit'] = 3; $args['columns'] = 3; return $args; } } } return new Boutique_Template();