' . esc_html( get_bloginfo( 'name' ) ) . ''; $description = get_bloginfo( 'description', 'display' ); if ( $description || is_customize_preview() ) { $html .= '

' . esc_html( $description ) . '

'; } } if ( ! $echo ) { return $html; } echo $html; } } if ( ! function_exists( 'shapla_primary_navigation' ) ) { /** * Display Primary Navigation * * @since 1.0.0 * @return void */ function shapla_primary_navigation() { $dropdown_direction = get_theme_mod( 'dropdown_direction', 'ltr' ); $nav_class = 'main-navigation'; $nav_class .= $dropdown_direction == 'rtl' ? ' dropdown-rtl' : ' dropdown-ltr'; ?>

Search

the_title_attribute( 'echo=0' ) ) ); ?> '; // Hide category and tag text for pages. if ( 'post' === get_post_type() ) { if ( $show_author_avatar || $show_author_name ) { echo '
'; if ( $show_author_avatar ) { echo '
' . get_avatar( get_the_author_meta( 'ID' ), 96 ) . '
'; } if ( $show_author_name ) { echo '
' . esc_attr( __( 'Posted by ', 'shapla' ) ) . '
'; echo '' . esc_html( get_the_author() ) . ''; } echo '
'; } if ( $show_date ) { $time_string = ''; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string = ''; } $blog_date_format = get_theme_mod( 'blog_date_format', 'human' ); if ( $blog_date_format == 'human' ) { $_created_time = sprintf( '%s ago', human_time_diff( get_the_date( 'U' ) ) ); $_modified_time = sprintf( '%s ago', human_time_diff( get_the_modified_date( 'U' ) ) ); } else { $_created_time = get_the_date(); $_modified_time = get_the_modified_date(); } $time_string = sprintf( $time_string, esc_attr( get_the_date( 'c' ) ), esc_html( $_created_time ), esc_attr( get_the_modified_date( 'c' ) ), esc_html( $_modified_time ) ); echo '
' . esc_html__( 'Posted on ', 'shapla' ) . '
' . $time_string . '
'; } if ( $show_category_list ) { /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list( esc_html__( ' ', 'shapla' ) ); if ( $categories_list ) { printf( '', $categories_list ); // WPCS: XSS OK. } } if ( $show_tag_list ) { /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list( '', esc_html__( ', ', 'shapla' ) ); if ( $tags_list ) { printf( '', $tags_list ); // WPCS: XSS OK. } } } if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) { if ( $show_comments_link ) { echo ''; } } edit_post_link( sprintf( /* translators: %s: Name of current post */ esc_html__( 'Edit %s', 'shapla' ), the_title( '"', '"', false ) ), '' ); echo ''; } endif; if ( ! function_exists( 'shapla_page_header' ) ): /** * Display the page header with a link to the single post * * @since 1.0.0 */ function shapla_page_header() { global $post; $title = get_the_title(); if ( is_search() ) { $title = sprintf( esc_html__( 'Search Results for: %s', 'shapla' ), '' . get_search_query() . '' ); } if ( is_archive() ) { $title = get_the_archive_title(); } if ( is_404() ) { $title = esc_html__( 'Page not found.', 'shapla' ); } if ( is_page() && $post instanceof \WP_Post ) { $options = get_post_meta( $post->ID, '_shapla_page_options', true ); $hide_page_title = isset( $options['hide_page_title'] ) ? esc_attr( $options['hide_page_title'] ) : ''; if ( 'on' == $hide_page_title ) { return; } /** * @deprecated 1.4.2 */ if ( empty( $hide_page_title ) && 'on' == get_post_meta( $post->ID, '_shapla_hide_page_title', true ) ) { return; } } // Blog page (with the latest posts) if ( is_home() && ! is_front_page() ) { if ( ! get_theme_mod( 'show_blog_page_title', true ) ) { return; } $title = get_the_title( get_option( 'page_for_posts' ) ); } // Default homepage (with the latest posts) if ( is_front_page() && is_home() ) { if ( ! get_theme_mod( 'show_blog_page_title', true ) ) { return; } $title = get_theme_mod( 'blog_page_title', esc_html__( 'Blog', 'shapla' ) ); } if ( shapla_is_woocommerce_activated() ) { if ( is_search() || is_tax() || is_shop() ) { $title = woocommerce_page_title( false ); } if ( is_page() && is_wc_endpoint_url() ) { $endpoint = WC()->query->get_current_endpoint(); if ( $endpoint_title = WC()->query->get_endpoint_title( $endpoint ) ) { $title = $endpoint_title; } } } $class = 'page-title-bar clear'; $alignment = get_theme_mod( 'page_title_bar_text_alignment', 'left' ); if ( ! empty( $alignment ) ) { $class .= ' page-title-bar-' . $alignment; } ?>

'', ) ); ?>
', '' ); ?>
→', 'shapla' ), array( 'span' => array( 'class' => array() ) ) ), the_title( '"', '"', false ) ) ); do_action( 'shapla_post_content_after' ); wp_link_pages( array( 'before' => '', ) ); ?>
__( '«', 'shapla' ), 'next_text' => __( '»', 'shapla' ) ) ); } endif; if ( ! function_exists( 'shapla_default_search' ) ) { /** * WooCommerce Product Search * * @since 1.3.0 * @return void */ function shapla_default_search() { if ( shapla_is_woocommerce_activated() ) { return; } $header_layout = get_theme_mod( 'header_layout', 'layout-1' ); if ( $header_layout != 'layout-3' ) { return; } ?> theme_location ) { return $items; } if ( $header_layout == 'layout-3' ) { return $items; } if ( shapla_is_woocommerce_activated() && $show_cart_icon ) { ob_start(); echo '
  • '; shapla_cart_link(); echo '
  • '; $items .= ob_get_clean(); } if ( $show_search_icon ) { ob_start(); ?> '', 'wrap_before' => '', 'before' => '
  • ', 'after' => '
  • ', 'home' => _x( 'Home', 'breadcrumb', 'shapla' ), ) ); // Implement Yoast SEO breadcrumbs if available if ( function_exists( 'yoast_breadcrumb' ) ) { $options = get_option( 'wpseo_internallinks' ); if ( $options['breadcrumbs-enable'] === true ) { yoast_breadcrumb( '', true ); return; } } // Implement WooCommerce breadcrumbs if available if ( function_exists( 'woocommerce_breadcrumb' ) ) { woocommerce_breadcrumb( $args ); return; } $breadcrumbs = new Shapla_Breadcrumb(); if ( ! empty( $args['home'] ) ) { $breadcrumbs->add_crumb( $args['home'], apply_filters( 'shapla_breadcrumb_home_url', home_url() ) ); } $args['breadcrumb'] = $breadcrumbs->generate(); /** * Shapla Breadcrumb hook * * @hooked Shapla_Structured_Data::generate_breadcrumb_data() - 10 */ do_action( 'shapla_breadcrumb', $breadcrumbs, $args ); if ( ! empty( $args['breadcrumb'] ) ) { echo $args['wrap_before']; foreach ( $args['breadcrumb'] as $key => $crumb ) { echo $args['before']; if ( ! empty( $crumb[1] ) && sizeof( $args['breadcrumb'] ) !== $key + 1 ) { echo '' . esc_html( $crumb[0] ) . ''; } else { echo esc_html( $crumb[0] ); } echo $args['after']; if ( sizeof( $args['breadcrumb'] ) !== $key + 1 ) { echo $args['delimiter']; } } echo $args['wrap_after']; } } } if ( ! function_exists( 'shapla_scroll_to_top_button' ) ) { /** * Display scroll to top button * * @since 1.4.1 */ function shapla_scroll_to_top_button() { if ( false === get_theme_mod( 'display_go_to_top_button', true ) ) { return; } ?>