/** * Display On Sale Products * Hooked into the `homepage` action in the homepage template * @since 1.0.0 * @return void */ function storefront_on_sale_products($args) { if (is_woocommerce_activated()) { $args = apply_filters('storefront_on_sale_products_args', array('limit' => 4, 'columns' => 4, 'title' => __('On Sale', 'storefront'))); echo '<section class="storefront-product-section storefront-on-sale-products">'; do_action('storefront_homepage_before_on_sale_products'); echo '<h2 class="section-title">' . wp_kses_post($args['title']) . '</h2>'; echo do_shortcode_func('sale_products', array('per_page' => intval($args['limit']), 'columns' => intval($args['columns']))); do_action('storefront_homepage_after_on_sale_products'); echo '</section>'; } }
/** * Storefront shop messages * @since 1.4.4 * @uses do_shortcode */ function storefront_shop_messages() { if (!is_checkout()) { echo wp_kses_post(do_shortcode_func('woocommerce_messages')); } }