urlencode( implode( '|', $font_families ) ), 'subset' => urlencode( 'latin,latin-ext' ), ); $fonts_url = add_query_arg( $query_args, '//fonts.googleapis.com/css' ); return $fonts_url; } } if ( ! function_exists( 'aqwa_the_posts_navigation' ) ) { /** * Print the next and previous posts navigation. * * @since Aqwa 1.0 * * @return void */ function aqwa_the_posts_navigation() { if( !paginate_links() ){ return; } $args = array( 'mid_size' => 2, 'prev_next' => true, 'prev_text' => __('','aqwa'), 'next_text' => __('','aqwa'), 'type' => 'list', ); echo '
'; the_posts_pagination( $args ); echo '
'; } } if ( ! function_exists( 'aqwa_post_thumbnail' ) ) { /** * Displays an optional post thumbnail. * * Wraps the post thumbnail in an anchor element on index views, or a div * element when on single views. * * @since Aqwa 1.0 * * @return void */ function aqwa_post_thumbnail() { if ( ! aqwa_can_show_post_thumbnail() ) { return; } ?>
false ) ); ?>
' . esc_html_x( 'Featured post', 'Label for sticky posts', 'aqwa' ) . '

'; } if ( has_category() || has_tag() ) { echo '
'; /* translators: used between list items, there is a space after the comma. */ $categories_list = get_the_category_list( __( ', ', 'aqwa' ) ); if ( $categories_list ) { echo sprintf( '%1$s', $categories_list ); } /* translators: used between list items, there is a space after the comma. */ $tags_list = get_the_tag_list( '', __( ', ', 'aqwa' ) ); if ( $tags_list ) { echo sprintf( '%1$s', $tags_list ); } echo '
'; } } else { if ( has_category() || has_tag() ) { echo '
'; /* translators: used between list items, there is a space after the comma. */ $categories_list = get_the_category_list( __( ', ', 'aqwa' ) ); if ( $categories_list ) { echo sprintf( '%1$s ', $categories_list ); } /* translators: used between list items, there is a space after the comma. */ $tags_list = get_the_tag_list( '', __( ', ', 'aqwa' ) ); if ( $tags_list ) { echo sprintf( '%1$s', $tags_list ); } echo '
'; } } } } if ( ! function_exists( 'aqwa_posted_on' ) ) { /** * Prints HTML with meta information for the current post-date/time. * */ function aqwa_posted_on() { $time_string = '
'; $time_string = sprintf( $time_string, esc_attr( get_the_date( DATE_W3C ) ), esc_html( get_the_date() ) ); printf( /* translators: %s: Publish date. */ esc_html__( '%s', 'aqwa' ), $time_string // phpcs:ignore WordPress.Security.EscapeOutput ); // author details aqwa_posted_by(); } } if ( ! function_exists( 'aqwa_posted_by' ) ) { /** * Prints HTML with meta information about theme author. * */ function aqwa_posted_by() { $user = wp_get_current_user(); echo sprintf( '%3$s', esc_url(get_author_posts_url( get_the_author_meta( 'ID' ) )), esc_url( get_avatar_url( $user->ID ) ), esc_html(get_the_author()) ); } } function aqwa_post_comments_count($post_id){ $args = array( 'post_id' => $post_id, // Use post_id, not post_ID 'count' => true // Return only the count ); $comments_count = get_comments( $args ); echo sprintf( ' %2$s', esc_url(get_permalink( $post_id )), esc_html($comments_count) ); } if ( ! function_exists( 'aqwa_the_page_breadcrumb' ) ) { /** * Prints HTML with meta information about theme author. * * @since aqwa 1.0 * * @return void */ function aqwa_the_page_breadcrumb(){ if( is_front_page()){ return; } $image = get_header_image() ? get_header_image() : get_template_directory_uri() . '/assets/images/header-image.jpg'; ?>

', '' ); elseif ( is_search() ) : ?>

' . esc_html__( 'Oops! That page can't be found.', 'aqwa' ) . ''; endif; } if ( ! function_exists( 'aqwa_the_post_navigation' ) ) { /** * Prints HTML with meta information about theme author. * */ function aqwa_the_post_navigation(){ $previous_post = get_previous_post(); $next_post = get_next_post(); ?>
sprintf( __( '
%2$s
%1$s
%3$s
', 'aqwa' ), '%title',get_the_post_thumbnail($previous_post->ID,'thumbnail'),mysql2date('d F Y', $previous_post->post_date, false) ), 'next_text' => '' ) ); } if($next_post){ the_post_navigation( array( 'prev_text' =>'', 'next_text' => sprintf( __( '
%1$s
%3$s
%2$s
', 'aqwa' ), '%title', get_the_post_thumbnail($next_post->ID,'thumbnail'),mysql2date('d F Y', $next_post->post_date, false) ) , ) ); } ?>
= $instances ) { break; } } } if ( $blocks_content ) { echo apply_filters( 'the_content', $blocks_content ); // phpcs:ignore WordPress.Security.EscapeOutput return true; } return false; }