' . "\n", esc_url( get_bloginfo( 'pingback_url' ) ) ); } } /** * Schema for
tag. */ if ( ! function_exists( 'bstone_schema_body' ) ) : /** * Adds schema tags to the body classes. * * @since 1.0.0 */ function bstone_schema_body() { // Check conditions. $is_blog = ( is_home() || is_archive() || is_attachment() || is_tax() || is_single() ) ? true : false; // Set up default itemtype. $itemtype = 'WebPage'; // Get itemtype for the blog. $itemtype = ( $is_blog ) ? 'Blog' : $itemtype; // Get itemtype for search results. $itemtype = ( is_search() ) ? 'SearchResultsPage' : $itemtype; // Get the result. $result = apply_filters( 'bstone_schema_body_itemtype', $itemtype ); // Return our HTML. echo apply_filters( 'bstone_schema_body', "itemtype='http://schema.org/" . esc_html( $result ) . "' itemscope='itemscope'" ); } endif; /** * Function to get site Header */ if ( ! function_exists( 'bstone_header_markup' ) ) { /** * Site Header -' . esc_html( get_bloginfo( 'description' ) ) . '
'; } } $html = apply_filters( 'bstone_logo', $html, $display_site_tagline, $site_tagline ); /** * Echo or Return the Logo Markup */ if ( $echo ) { echo $html; } else { return $html; } } }// End if(). /** * Replace heade logo. */ if ( ! function_exists( 'bstone_replace_header_logo' ) ) : /** * Replace header logo. * * @param array $image Size. * @param int $attachment_id Image id. * @param sting $size Size name. * @param string $icon Icon. * * @return array Size of image */ function bstone_replace_header_logo( $image, $attachment_id, $size, $icon ) { $custom_logo_id = get_theme_mod( 'custom_logo' ); if ( ! is_customize_preview() && $custom_logo_id == $attachment_id && 'full' == $size ) { $data = wp_get_attachment_image_src( $attachment_id, 'bst-logo-size' ); if ( false != $data ) { $image = $data; } } return $image; } endif; // End if(). /** * Function to check if it is Internet Explorer */ if ( ! function_exists( 'bstone_replace_header_attr' ) ) : /** * Replace header logo. * * @param array $attr Image. * @param object $attachment Image obj. * @param sting $size Size name. * * @return array Image attr. */ function bstone_replace_header_attr( $attr, $attachment, $size ) { $custom_logo_id = get_theme_mod( 'custom_logo' ); if ( $custom_logo_id == $attachment->ID ) { if ( ! is_customize_preview() ) { $attach_data = wp_get_attachment_image_src( $attachment->ID, 'bst-logo-size' ); if ( isset( $attach_data[0] ) ) { $attr['src'] = $attach_data[0]; } } $retina_logo = bstone_options( 'bst-header-retina-logo' ); $attr['srcset'] = ''; if ( apply_filters( 'bstone_main_header_retina', true ) && '' !== $retina_logo ) { $cutom_logo = wp_get_attachment_image_src( $custom_logo_id , 'full' ); $cutom_logo_url = $cutom_logo[0]; if ( bstone_check_is_ie() ) { // Replace header logo url to retina logo url. $attr['src'] = $retina_logo; } $attr['srcset'] = $cutom_logo_url . ' 1x, ' . $retina_logo . ' 2x'; } } return $attr; } endif; // End if(). /** * Function to check if it is Internet Explorer */ if ( ! function_exists( 'bstone_check_is_ie' ) ) : /** * Function to check if it is Internet Explorer. * * @return true | false boolean */ function bstone_check_is_ie() { $is_ie = false; $ua = htmlentities( $_SERVER['HTTP_USER_AGENT'], ENT_QUOTES, 'UTF-8' ); if ( strpos( $ua, 'Trident/7.0' ) !== false ) { $is_ie = true; } return apply_filters( 'bstone_check_is_ie', $is_ie ); } endif; /** * Function to get Toggle Button Markup */ if ( ! function_exists( 'bstone_toggle_buttons_markup' ) ) { /** * Toggle Button Markup * * @since 1.0.0 */ function bstone_toggle_buttons_markup() { $disable_primary_navigation = bstone_options( 'disable-primary-nav' ); $custom_header_rt_section = bstone_options( 'header-main-rt-section' ); $custom_header_lt_section = bstone_options( 'header-main-lt-section' ); $bst_header_type = bstone_options( 'header-layouts' ); $menu_bottons = true; if( 'header-main-layout-1' == $bst_header_type && $disable_primary_navigation && 'none' == $custom_header_rt_section ) { $menu_bottons = false; } if ( 'header-main-layout-2' == $bst_header_type && $disable_primary_navigation && 'none' == $custom_header_rt_section && 'none' == $custom_header_lt_section ) { $menu_bottons = false; } if ( apply_filters( 'bstone_enable_mobile_menu_buttons', $menu_bottons ) ) { ?> '; return apply_filters( 'bstone_get_search', $search_html ); } } /** * Get custom HTML added by user. */ if ( ! function_exists( 'bstone_get_custom_html' ) ) { function bstone_get_custom_html( $option_name = '' ) { $custom_html = ''; $custom_html_content = bstone_options( $option_name ); if ( ! empty( $custom_html_content ) ) { $custom_html = '
$depth, 'max_depth' => $args['max_depth']))) ?>