' . $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_home() ? '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( 'azonbooster_get_sidebar' ) ) { /** * Display azonbooster sidebar * * @uses get_sidebar() * @since 1.0.0 */ function azonbooster_get_sidebar() { get_sidebar(); } } if ( ! function_exists( 'azonbooster_page_header' ) ) { /** * Display the page header * * @since 1.0.0 */ function azonbooster_page_header() { ?>
', '' ); ?>
'', ) ); ?>
', '' ); do_action( 'azonbooster_post_meta' ); } else { the_title( sprintf( '

', esc_url( get_permalink() ) ), '

' ); do_action( 'azonbooster_post_meta' ); } ?>
' . get_the_title() . '' ) ); } do_action( 'azonbooster_post_content_after' ); wp_link_pages( array( 'before' => '', ) ); ?>
%3$s', $position, $link , $label); } } if ( ! function_exists( 'azonbooster_post_nav' ) ) { /** * Display navigation to next/previous post when applicable. */ function azonbooster_post_nav() { $show_post_nav = apply_filters('azonbooster_show_post_nav', true); if ( $show_post_nav ) { $args = array( 'next_text' => '%title', 'prev_text' => '%title', ); the_post_navigation( $args ); } } } if ( ! function_exists( 'azonbooster_paging_nav' ) ) { /** * Display navigation to next/previous set of posts when applicable. */ function azonbooster_paging_nav() { global $wp_query; $args = array( 'type' => 'list', 'next_text' => _x( 'Next', 'Next post', 'azonbooster' ), 'prev_text' => _x( 'Previous', 'Previous post', 'azonbooster' ), ); the_posts_pagination( $args ); } } if ( ! function_exists( 'azonbooster_footer_widgets' ) ) { /** * Display the footer widget regions. * * @since 1.0.0 * @return void */ function azonbooster_footer_widgets() { $rows = intval( apply_filters( 'azonbooster_footer_widget_rows', 2 ) ); $regions = intval( apply_filters( 'azonbooster_footer_widget_columns', 4 ) ); for ( $row = 1; $row <= $rows; $row++ ) : // Defines the number of active columns in this footer row. for ( $region = $regions; 0 < $region; $region-- ) { if ( is_active_sidebar( 'footer-' . strval( $region + $regions * ( $row - 1 ) ) ) ) { $columns = $region; break; } } if ( isset( $columns ) ) : ?>
>
'secondary', 'menu_id' => 'header-menu', 'menu_class' => 'header-menu', 'container_class' => 'header-menu-container' ) ); } } } if ( ! function_exists( 'azonbooster_footer_menu' ) ) { /** * Footer menu * * @since 1.2.1 * @return void */ function azonbooster_footer_menu() { wp_nav_menu( array( 'theme_location' => 'footer', 'menu_id' => 'footer-menu', 'menu_class' => 'footer-menu', 'container_class' => 'footer-menu-container' ) ); } } if ( ! function_exists( 'azonbooster_credit' ) ) { /** * Display the theme credit * * @since 1.0.0 * @return void */ function azonbooster_credit() { $credit_url = apply_filters('azonbooster_credit_link', azonbooster_credit_link() ); ?>
AzonBooster Designed by %2$s.', 'azonbooster' ), 'https://boosterwp.com', $credit_url ); ?>
'', 'modified' => __('Last updated', 'azonbooster'), 'author' => __('By ', 'azonbooster'), 'category' => '', 'comment' => '', 'tag' => '', )); $postmeta = ''; /** * Allow theme author enable or disable post meta data * * @var [type] */ $metadata = apply_filters('azonbooster_enable_post_metadata', array( 'date', 'author', 'category', 'tag', 'comment' )); foreach ( $metadata as $md) { switch ( $md ) { case 'date': $postmeta .= azonbooster_meta_date( $prefix ); break; case 'author': $postmeta .= azonbooster_meta_author( $prefix[$md] ); break; case 'category': $postmeta .= azonbooster_meta_category( $prefix[$md] ); break; case 'tag': $postmeta .= azonbooster_meta_tag( $prefix[$md] ); break; case 'comment': $postmeta .= azonbooster_meta_comments( $prefix[$md] ); break; } } if ( $postmeta ) { ?>
', '' ); ?>
'. $pre . ' ' : ''; if ( $modified ) { $time_string = sprintf( '', esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ) ); } else { $time_string = sprintf( '', esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ) ); } return '' . $pre . $time_string . ''; } endif; if ( ! function_exists( 'azonbooster_meta_author' ) ) : /** * Displays the post author */ function azonbooster_meta_author( $prefix = '' ) { $prefix = $prefix != '' ? ''. $prefix . '' : ''; $author_string = sprintf( '', esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_attr( sprintf( esc_html__( 'View all posts by %s', 'azonbooster' ), get_the_author() ) ), esc_html( get_the_author() ) ); return '' . $prefix . wp_kses_post($author_string) . ''; } endif; if ( ! function_exists( 'azonbooster_meta_category' ) ) : /** * Displays the category of posts */ function azonbooster_meta_category( $prefix = '' ) { $prefix = $prefix != '' ? ''. $prefix . '' : ''; $categories_list = get_the_category_list( ', ' ); if ( $categories_list ) { return ' ' . $prefix . wp_kses_post($categories_list) . ''; } } endif; if ( ! function_exists( 'azonbooster_meta_tag' ) ) : /** * Displays the category of posts */ function azonbooster_meta_tag( $prefix = '' ) { $prefix = $prefix != '' ? ''. $prefix . '' : ''; $tags_list = get_the_tag_list( '', __( ', ', 'azonbooster' ) ); if ( $tags_list && ! is_single() ) { return ' ' . $prefix . wp_kses_post( $tags_list ) . ''; } } endif; if ( ! function_exists( 'azonbooster_meta_comments' ) ) : /** * Displays the comment of posts */ function azonbooster_meta_comments( $prefix = '' ) { $prefix = $prefix != '' ? ''. $prefix . '' : ''; if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) { $txt_comment = ''.get_comments_number_text( __('Leave a Comment', 'azonbooster'), __('One Comment', 'azonbooster'), __('% Comments', 'azonbooster')) . ''; return '' . $prefix . $txt_comment . ''; } } endif; if ( ! function_exists( 'azonbooster_meta_edit_link' ) ) : /** * Displays the category of posts */ function azonbooster_meta_edit_link() { return ' ' . get_the_category_list( ', ' ) . ''; } endif; if ( ! function_exists( 'azonbooster_homepage_content' ) ) { /** * Display homepage content * Hooked into the `homepage` action in the homepage template * * @since 1.0.0 * @return void */ function azonbooster_homepage_content() { $content_page_show = apply_filters( 'azonbooster_homepage_content_show', true ); if ( ! $content_page_show ) return; while ( have_posts() ) { the_post(); ?>
', '' ); ?>
'', ) ); ?>
'webpage', '@id' => get_the_permalink(), ); $json['publisher'] = array( '@type' => 'organization', 'name' => get_bloginfo( 'name' ), ); if ( $logo ) { $json['publisher']['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 ) ) { AzonBooster::set_structured_data( apply_filters( 'azonbooster_structured_data', $json ) ); } } }