< id="comment-">
%s', 'storefront' ), get_comment_author_link() ); ?>
comment_approved ) : ?>
' . get_comment_date() . ''; ?>
$add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
>

' . esc_html__( 'Built with Storefront & WooCommerce', 'storefront' ) . '' ?>
' . $logo . '' : $logo; } elseif ( function_exists( 'jetpack_has_site_logo' ) && jetpack_has_site_logo() ) { // Copied from jetpack_the_site_logo() function. $logo = site_logo()->logo; $logo_id = get_theme_mod( 'custom_logo' ); // Check for WP 4.5 Site Logo $logo_id = $logo_id ? $logo_id : $logo['id']; // Use WP Core logo if present, otherwise use Jetpack's. $size = site_logo()->theme_size(); $html = sprintf( '', esc_url( home_url( '/' ) ), wp_get_attachment_image( $logo_id, $size, false, array( 'class' => 'site-logo attachment-' . $size, 'data-size' => $size, 'itemprop' => 'logo' ) ) ); $html = apply_filters( 'jetpack_the_site_logo', $html, $logo, $size ); } else { $tag = is_front_page() ? 'h1' : 'div'; $html = '<' . esc_attr( $tag ) . ' class="beta site-title">' . esc_html( get_bloginfo( 'name' ) ) . ''; if ( '' !== get_bloginfo( 'description' ) ) { $html .= '

' . esc_html( get_bloginfo( 'description', 'display' ) ) . '

'; } } if ( ! $echo ) { return $html; } echo $html; } } if ( ! function_exists( 'storefront_primary_navigation' ) ) { /** * Display Primary Navigation * * @since 1.0.0 * @return void */ function storefront_primary_navigation() { ?>
', '' ); ?>
', '' ); ?>
'', ) ); ?>
', '' ); } else { if ( 'post' == get_post_type() ) { storefront_posted_on(); } the_title( sprintf( '

', esc_url( get_permalink() ) ), '

' ); } ?>
' . get_the_title() . '' ) ); do_action( 'storefront_post_content_after' ); wp_link_pages( array( 'before' => '', ) ); ?>
'list', 'next_text' => _x( 'Next', 'Next post', 'storefront' ), 'prev_text' => _x( 'Previous', 'Previous post', 'storefront' ), ); the_posts_pagination( $args ); } } if ( ! function_exists( 'storefront_post_nav' ) ) { /** * Display navigation to next/previous post when applicable. */ function storefront_post_nav() { $args = array( 'next_text' => '' . esc_html__( 'Next post:', 'storefront' ) . ' %title', 'prev_text' => '' . esc_html__( 'Previous post:', 'storefront' ) . ' %title', ); the_post_navigation( $args ); } } if ( ! function_exists( 'storefront_posted_on' ) ) { /** * Prints HTML with meta information for the current post-date/time and author. */ function storefront_posted_on() { $time_string = ''; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string = ' '; } $time_string = sprintf( $time_string, esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ) ); $posted_on = sprintf( _x( 'Posted on %s', 'post date', 'storefront' ), '' . $time_string . '' ); echo wp_kses( apply_filters( 'storefront_single_post_posted_on_html', '' . $posted_on . '', $posted_on ), array( 'span' => array( 'class' => array(), ), 'a' => array( 'href' => array(), 'title' => array(), 'rel' => array(), ), 'time' => array( 'datetime' => array(), 'class' => array(), ), ) ); } } if ( ! function_exists( 'storefront_product_categories' ) ) { /** * Display Product Categories * Hooked into the `homepage` action in the homepage template * * @since 1.0.0 * @param array $args the product section args. * @return void */ function storefront_product_categories( $args ) { if ( storefront_is_woocommerce_activated() ) { $args = apply_filters( 'storefront_product_categories_args', array( 'limit' => 3, 'columns' => 3, 'child_categories' => 0, 'orderby' => 'name', 'title' => __( 'Shop by Category', 'storefront' ), ) ); $shortcode_content = storefront_do_shortcode( 'product_categories', apply_filters( 'storefront_product_categories_shortcode_args', array( 'number' => intval( $args['limit'] ), 'columns' => intval( $args['columns'] ), 'orderby' => esc_attr( $args['orderby'] ), 'parent' => esc_attr( $args['child_categories'] ), ) ) ); /** * Only display the section if the shortcode returns product categories */ if ( false !== strpos( $shortcode_content, 'product-category' ) ) { echo '
'; do_action( 'storefront_homepage_before_product_categories' ); echo '

' . wp_kses_post( $args['title'] ) . '

'; do_action( 'storefront_homepage_after_product_categories_title' ); echo $shortcode_content; do_action( 'storefront_homepage_after_product_categories' ); echo '
'; } } } } if ( ! function_exists( 'storefront_recent_products' ) ) { /** * Display Recent Products * Hooked into the `homepage` action in the homepage template * * @since 1.0.0 * @param array $args the product section args. * @return void */ function storefront_recent_products( $args ) { if ( storefront_is_woocommerce_activated() ) { $args = apply_filters( 'storefront_recent_products_args', array( 'limit' => 4, 'columns' => 4, 'title' => __( 'New In', 'storefront' ), ) ); $shortcode_content = storefront_do_shortcode( 'recent_products', apply_filters( 'storefront_recent_products_shortcode_args', array( 'per_page' => intval( $args['limit'] ), 'columns' => intval( $args['columns'] ), ) ) ); /** * Only display the section if the shortcode returns products */ if ( false !== strpos( $shortcode_content, 'product' ) ) { echo '
'; do_action( 'storefront_homepage_before_recent_products' ); echo '

' . wp_kses_post( $args['title'] ) . '

'; do_action( 'storefront_homepage_after_recent_products_title' ); echo $shortcode_content; do_action( 'storefront_homepage_after_recent_products' ); echo '
'; } } } } if ( ! function_exists( 'storefront_featured_products' ) ) { /** * Display Featured Products * Hooked into the `homepage` action in the homepage template * * @since 1.0.0 * @param array $args the product section args. * @return void */ function storefront_featured_products( $args ) { if ( storefront_is_woocommerce_activated() ) { $args = apply_filters( 'storefront_featured_products_args', array( 'limit' => 4, 'columns' => 4, 'orderby' => 'date', 'order' => 'desc', 'title' => __( 'We Recommend', 'storefront' ), ) ); $shortcode_content = storefront_do_shortcode( 'featured_products', apply_filters( 'storefront_featured_products_shortcode_args', array( 'per_page' => intval( $args['limit'] ), 'columns' => intval( $args['columns'] ), 'orderby' => esc_attr( $args['orderby'] ), 'order' => esc_attr( $args['order'] ), ) ) ); /** * Only display the section if the shortcode returns products */ if ( false !== strpos( $shortcode_content, 'product' ) ) { echo ''; } } } } if ( ! function_exists( 'storefront_popular_products' ) ) { /** * Display Popular Products * Hooked into the `homepage` action in the homepage template * * @since 1.0.0 * @param array $args the product section args. * @return void */ function storefront_popular_products( $args ) { if ( storefront_is_woocommerce_activated() ) { $args = apply_filters( 'storefront_popular_products_args', array( 'limit' => 4, 'columns' => 4, 'title' => __( 'Fan Favorites', 'storefront' ), ) ); $shortcode_content = storefront_do_shortcode( 'top_rated_products', apply_filters( 'storefront_popular_products_shortcode_args', array( 'per_page' => intval( $args['limit'] ), 'columns' => intval( $args['columns'] ), ) ) ); /** * Only display the section if the shortcode returns products */ if ( false !== strpos( $shortcode_content, 'product' ) ) { echo ''; } } } } if ( ! function_exists( 'storefront_on_sale_products' ) ) { /** * Display On Sale Products * Hooked into the `homepage` action in the homepage template * * @param array $args the product section args. * @since 1.0.0 * @return void */ function storefront_on_sale_products( $args ) { if ( storefront_is_woocommerce_activated() ) { $args = apply_filters( 'storefront_on_sale_products_args', array( 'limit' => 4, 'columns' => 4, 'title' => __( 'On Sale', 'storefront' ), ) ); $shortcode_content = storefront_do_shortcode( 'sale_products', apply_filters( 'storefront_on_sale_products_shortcode_args', array( 'per_page' => intval( $args['limit'] ), 'columns' => intval( $args['columns'] ), ) ) ); /** * Only display the section if the shortcode returns products */ if ( false !== strpos( $shortcode_content, 'product' ) ) { echo '
'; do_action( 'storefront_homepage_before_on_sale_products' ); echo '

' . wp_kses_post( $args['title'] ) . '

'; do_action( 'storefront_homepage_after_on_sale_products_title' ); echo $shortcode_content; do_action( 'storefront_homepage_after_on_sale_products' ); echo '
'; } } } } if ( ! function_exists( 'storefront_best_selling_products' ) ) { /** * Display Best Selling Products * Hooked into the `homepage` action in the homepage template * * @since 2.0.0 * @param array $args the product section args. * @return void */ function storefront_best_selling_products( $args ) { if ( storefront_is_woocommerce_activated() ) { $args = apply_filters( 'storefront_best_selling_products_args', array( 'limit' => 4, 'columns' => 4, 'title' => esc_attr__( 'Best Sellers', 'storefront' ), ) ); $shortcode_content = storefront_do_shortcode( 'best_selling_products', apply_filters( 'storefront_best_selling_products_shortcode_args', array( 'per_page' => intval( $args['limit'] ), 'columns' => intval( $args['columns'] ), ) ) ); /** * Only display the section if the shortcode returns products */ if ( false !== strpos( $shortcode_content, 'product' ) ) { echo '
'; do_action( 'storefront_homepage_before_best_selling_products' ); echo '

' . wp_kses_post( $args['title'] ) . '

'; do_action( 'storefront_homepage_after_best_selling_products_title' ); echo $shortcode_content; do_action( 'storefront_homepage_after_best_selling_products' ); echo '
'; } } } } if ( ! function_exists( 'storefront_homepage_content' ) ) { /** * Display homepage content * Hooked into the `homepage` action in the homepage template * * @since 1.0.0 * @return void */ function storefront_homepage_content() { while ( have_posts() ) { the_post(); get_template_part( 'content', 'homepage' ); } // end of the loop. } } if ( ! function_exists( 'storefront_social_icons' ) ) { /** * Display social icons * If the subscribe and connect plugin is active, display the icons. * * @link http://wordpress.org/plugins/subscribe-and-connect/ * @since 1.0.0 */ function storefront_social_icons() { if ( class_exists( 'Subscribe_And_Connect' ) ) { echo '
'; subscribe_and_connect_connect(); echo '
'; } } } if ( ! function_exists( 'storefront_get_sidebar' ) ) { /** * Display storefront sidebar * * @uses get_sidebar() * @since 1.0.0 */ function storefront_get_sidebar() { get_sidebar(); } } if ( ! function_exists( 'storefront_post_thumbnail' ) ) { /** * Display post thumbnail * * @var $size thumbnail size. thumbnail|medium|large|full|$custom * @uses has_post_thumbnail() * @uses the_post_thumbnail * @param string $size the post thumbnail size. * @since 1.5.0 */ function storefront_post_thumbnail( $size = 'full' ) { if ( has_post_thumbnail() ) { the_post_thumbnail( $size ); } } } if ( ! function_exists( 'storefront_primary_navigation_wrapper' ) ) { /** * The primary navigation wrapper */ function storefront_primary_navigation_wrapper() { echo '
'; } } if ( ! function_exists( 'storefront_primary_navigation_wrapper_close' ) ) { /** * The primary navigation wrapper close */ function storefront_primary_navigation_wrapper_close() { echo '
'; } } if ( ! function_exists( 'storefront_header_container' ) ) { /** * The header container */ function storefront_header_container() { echo '
'; } } if ( ! function_exists( 'storefront_header_container_close' ) ) { /** * The header container close */ function storefront_header_container_close() { echo '
'; } }