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

WooThemes' ); ?>
' . $logo . '' : $logo; } elseif ( function_exists( 'jetpack_has_site_logo' ) && jetpack_has_site_logo() ) { jetpack_the_site_logo(); } else { $tag = is_front_page() ? 'h1' : 'div'; echo '<' . esc_attr( $tag ) . ' class="beta site-title">' . esc_attr( get_bloginfo( 'name' ) ) . ''; if ( '' != get_bloginfo( 'description' ) ) { ?>

', '' ); ?>
'', ) ); ?>
', '' ); } else { if ( 'post' == get_post_type() ) { storefront_posted_on(); } the_title( sprintf( '

', esc_url( get_permalink() ) ), '

' ); } ?>
' . get_the_title() . '' ) ); 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' => '%title', 'prev_text' => '%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 ( 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' ), ) ); echo '
'; do_action( 'storefront_homepage_before_product_categories' ); echo '

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

'; do_action( 'storefront_homepage_after_product_categories_title' ); echo storefront_do_shortcode( 'product_categories', array( 'number' => intval( $args['limit'] ), 'columns' => intval( $args['columns'] ), 'orderby' => esc_attr( $args['orderby'] ), 'parent' => esc_attr( $args['child_categories'] ), ) ); 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 ( is_woocommerce_activated() ) { $args = apply_filters( 'storefront_recent_products_args', array( 'limit' => 4, 'columns' => 4, 'title' => __( 'New In', 'storefront' ), ) ); echo '
'; do_action( 'storefront_homepage_before_recent_products' ); echo '

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

'; do_action( 'storefront_homepage_after_recent_products_title' ); echo storefront_do_shortcode( 'recent_products', array( 'per_page' => intval( $args['limit'] ), 'columns' => intval( $args['columns'] ), ) ); 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 ( is_woocommerce_activated() ) { $args = apply_filters( 'storefront_featured_products_args', array( 'limit' => 4, 'columns' => 4, 'orderby' => 'date', 'order' => 'desc', 'title' => __( 'We Recommend', 'storefront' ), ) ); 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 ( is_woocommerce_activated() ) { $args = apply_filters( 'storefront_popular_products_args', array( 'limit' => 4, 'columns' => 4, 'title' => __( 'Fan Favorites', 'storefront' ), ) ); 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 ( is_woocommerce_activated() ) { $args = apply_filters( 'storefront_on_sale_products_args', array( 'limit' => 4, 'columns' => 4, 'title' => __( 'On Sale', 'storefront' ), ) ); 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 storefront_do_shortcode( 'sale_products', array( 'per_page' => intval( $args['limit'] ), 'columns' => intval( $args['columns'] ), ) ); 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 ( is_woocommerce_activated() ) { $args = apply_filters( 'storefront_best_selling_products_args', array( 'limit' => 4, 'columns' => 4, 'title' => esc_attr__( 'Best Sellers', 'storefront' ), ) ); 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 storefront_do_shortcode( 'best_selling_products', array( 'per_page' => intval( $args['limit'] ), 'columns' => intval( $args['columns'] ), ) ); 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', 'page' ); } // 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 ) { 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_init_structured_data' ) ) { /** * Generate the structured data... * Initialize Storefront::$structured_data via Storefront::set_structured_data()... * Hooked into: * `storefront_loop_post` * `storefront_single_post` * `storefront_page` * Apply `storefront_structured_data` filter hook for structured data customization :) */ function storefront_init_structured_data() { if ( is_home() || is_category() || is_date() || is_search() || is_single() && ( is_woocommerce_activated() && ! is_woocommerce() ) ) { $image = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'normal' ); $logo = wp_get_attachment_image_src( get_theme_mod( 'custom_logo' ), 'full' ); $json['@type'] = 'BlogPosting'; $json['mainEntityOfPage'] = array( '@type' => 'webpage', '@id' => get_the_permalink(), ); $json['image'] = array( '@type' => 'ImageObject', 'url' => $image[0], 'width' => $image[1], 'height' => $image[2], ); $json['publisher'] = array( '@type' => 'organization', 'name' => get_bloginfo( 'name' ), 'logo' => array( '@type' => 'ImageObject', 'url' => $logo[0], 'width' => $logo[1], 'height' => $logo[2], ), ); $json['author'] = array( '@type' => 'person', 'name' => get_the_author(), ); $json['datePublished'] = get_post_time( 'c' ); $json['dateModified'] = get_the_modified_date( 'c' ); $json['name'] = get_the_title(); $json['headline'] = get_the_title(); $json['description'] = get_the_excerpt(); } elseif ( is_page() ) { $json['@type'] = 'WebPage'; $json['url'] = get_the_permalink(); $json['name'] = get_the_title(); $json['description'] = get_the_excerpt(); } if ( isset( $json ) ) { Storefront::set_structured_data( apply_filters( 'storefront_structured_data', $json ) ); } } }