cart->get_cart_subtotal() ); ?> cart->get_cart_contents_count(), 'storefront' ), WC()->cart->get_cart_contents_count() ) );?>
'; } } if ( ! function_exists( 'storefront_sorting_wrapper_close' ) ) { /** * Sorting wrapper close * * @since 1.4.3 * @return void */ function storefront_sorting_wrapper_close() { echo ''; } } if ( ! function_exists( 'storefront_product_columns_wrapper' ) ) { /** * Product columns wrapper * * @since 2.2.0 * @return void */ function storefront_product_columns_wrapper() { $columns = storefront_loop_columns(); echo '
'; } } if ( ! function_exists( 'storefront_loop_columns' ) ) { /** * Default loop columns on product archives * * @return integer products per row * @since 1.0.0 */ function storefront_loop_columns() { $columns = 3; // 3 products per row if ( function_exists( 'wc_get_default_products_per_row' ) ) { $columns = wc_get_default_products_per_row(); } return apply_filters( 'storefront_loop_columns', $columns ); } } if ( ! function_exists( 'storefront_product_columns_wrapper_close' ) ) { /** * Product columns wrapper close * * @since 2.2.0 * @return void */ function storefront_product_columns_wrapper_close() { echo '
'; } } if ( ! function_exists( 'storefront_shop_messages' ) ) { /** * Storefront shop messages * * @since 1.4.4 * @uses storefront_do_shortcode */ function storefront_shop_messages() { if ( ! is_checkout() ) { echo wp_kses_post( storefront_do_shortcode( 'woocommerce_messages' ) ); } } } if ( ! function_exists( 'storefront_woocommerce_pagination' ) ) { /** * Storefront WooCommerce Pagination * WooCommerce disables the product pagination inside the woocommerce_product_subcategories() function * but since Storefront adds pagination before that function is excuted we need a separate function to * determine whether or not to display the pagination. * * @since 1.4.4 */ function storefront_woocommerce_pagination() { if ( woocommerce_products_will_display() ) { woocommerce_pagination(); } } } if ( ! function_exists( 'storefront_promoted_products' ) ) { /** * Featured and On-Sale Products * Check for featured products then on-sale products and use the appropiate shortcode. * If neither exist, it can fallback to show recently added products. * * @since 1.5.1 * @param integer $per_page total products to display. * @param integer $columns columns to arrange products in to. * @param boolean $recent_fallback Should the function display recent products as a fallback when there are no featured or on-sale products?. * @uses storefront_is_woocommerce_activated() * @uses wc_get_featured_product_ids() * @uses wc_get_product_ids_on_sale() * @uses storefront_do_shortcode() * @return void */ function storefront_promoted_products( $per_page = '2', $columns = '2', $recent_fallback = true ) { if ( storefront_is_woocommerce_activated() ) { if ( wc_get_featured_product_ids() ) { echo '

' . esc_html__( 'Featured Products', 'storefront' ) . '

'; echo storefront_do_shortcode( 'featured_products', array( 'per_page' => $per_page, 'columns' => $columns, ) ); } elseif ( wc_get_product_ids_on_sale() ) { echo '

' . esc_html__( 'On Sale Now', 'storefront' ) . '

'; echo storefront_do_shortcode( 'sale_products', array( 'per_page' => $per_page, 'columns' => $columns, ) ); } elseif ( $recent_fallback ) { echo '

' . esc_html__( 'New In Store', 'storefront' ) . '

'; echo storefront_do_shortcode( 'recent_products', array( 'per_page' => $per_page, 'columns' => $columns, ) ); } } } } if ( ! function_exists( 'storefront_handheld_footer_bar' ) ) { /** * Display a menu intended for use on handheld devices * * @since 2.0.0 */ function storefront_handheld_footer_bar() { $links = array( 'my-account' => array( 'priority' => 10, 'callback' => 'storefront_handheld_footer_bar_account_link', ), 'search' => array( 'priority' => 20, 'callback' => 'storefront_handheld_footer_bar_search', ), 'cart' => array( 'priority' => 30, 'callback' => 'storefront_handheld_footer_bar_cart_link', ), ); if ( wc_get_page_id( 'myaccount' ) === -1 ) { unset( $links['my-account'] ); } if ( wc_get_page_id( 'cart' ) === -1 ) { unset( $links['cart'] ); } $links = apply_filters( 'storefront_handheld_footer_bar_links', $links ); ?>
    $link ) : ?>
' . esc_attr__( 'Search', 'storefront' ) . ''; storefront_product_search(); } } if ( ! function_exists( 'storefront_handheld_footer_bar_cart_link' ) ) { /** * The cart callback function for the handheld footer bar * * @since 2.0.0 */ function storefront_handheld_footer_bar_cart_link() { ?> cart->get_cart_contents_count() );?> ' . esc_attr__( 'My Account', 'storefront' ) . ''; } }