' . 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() {
?>
'
' . __( 'Pages:', 'storefront' ),
'after' => '
',
) );
?>
' . get_the_title() . ''
)
);
do_action( 'storefront_post_content_after' );
wp_link_pages( array(
'before' => '
' . __( 'Pages:', 'storefront' ),
'after' => '
',
) );
?>
';
}
}
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' ) ) {
/**
* Generates structured data.
*
* Hooked into the following action hooks:
*
* - `storefront_loop_post`
* - `storefront_single_post`
* - `storefront_page`
*
* Applies `storefront_structured_data` filter hook for structured data customization :)
*/
function storefront_init_structured_data() {
// Post's 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['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(),
);
if ( $image ) {
$json['image'] = array(
'@type' => 'ImageObject',
'url' => $image[0],
'width' => $image[1],
'height' => $image[2],
);
}
$json['datePublished'] = get_post_time( 'c' );
$json['dateModified'] = get_the_modified_date( 'c' );
$json['name'] = get_the_title();
$json['headline'] = $json['name'];
$json['description'] = get_the_excerpt();
// Page's structured data.
} 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 ) );
}
}
}
' . get_comment_date() . ''; ?>