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_post_comments_count' ) ) { // comments count 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_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()) ); } } if ( ! function_exists( 'aqwa_header_style' ) ) { /** * Theme header style * */ function aqwa_header_style() { get_template_part( 'template-parts/header/header-style-one' ); } } 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 ) ); ?>
2, 'prev_next' => true, 'prev_text' => __('','aqwa'), 'next_text' => __('','aqwa'), 'type' => 'list', ); echo '
'; the_posts_pagination( $args ); echo '
'; } } if ( ! function_exists( 'aqwa_entry_post_meta' ) ) { /** * Prints HTML with meta information for the categories, tags and comments. * Footer entry meta is displayed differently in archives and single posts. * * @since Aqwa 1.0 * * @return void */ function aqwa_entry_post_meta() { // Early exit if not a post. if ( 'post' !== get_post_type() ) { return; } // Hide meta information on pages. if ( ! is_single() ) { if ( is_sticky() ) { echo '

' . 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_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) ) , ) ); } ?>
date_i18n('Y'), '[site_title]' => get_bloginfo('name'), '[author_name]' => sprintf('%2$s', esc_url('https://amigothemes.com/'),esc_html__('Amigothemes','aqwa')) ); echo apply_filters('aqwa_copyright', sprintf('

%s

', wp_kses_post( str_replace(array_keys($copy_text), array_values($copy_text), $copyright_setting)))); } } } if ( ! function_exists( 'aqwa_dynamic_css' ) ) { /** * Aqwa dynamic CSS */ function aqwa_dynamic_css(){ $header_text_color = get_header_textcolor(); $header_bg_image = get_header_image() ? get_header_image() : ''; $breadcrumb_bg_img = get_theme_mod('aqwa_breadcrumb_bg_image',esc_url(get_template_directory_uri() .'/assets/images/breadcrumb.jpg')); $breadcrumb_min_height = get_theme_mod('aqwa_breadcrumb_min_height', '420'); $custom_css = "h1.site-title a,p.site-description{ color:#".$header_text_color."; }"; // header bg image $custom_css .= "#main-header{ background-image: url(".$header_bg_image."); }"; // breadcrumb bg $custom_css .= ".breadcrumb-section{ background-image: url(".$breadcrumb_bg_img."); min-height: ".$breadcrumb_min_height."px; }\n"; wp_add_inline_style( 'aqwa-style', $custom_css ); } add_action('wp_enqueue_scripts', 'aqwa_dynamic_css' ); }