%2$s'; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string = ''; } $time_string = sprintf( $time_string, esc_attr( get_the_date( DATE_W3C ) ), esc_html( get_the_date() ), esc_attr( get_the_modified_date( DATE_W3C ) ), esc_html( get_the_modified_date() ) ); $posted_on = sprintf( /* translators: %s: post date. */ esc_html_x( 'Posted on %s', 'post date', 'aytias' ), '' . $time_string . '' ); echo '' . $posted_on . ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } endif; if ( ! function_exists( 'aytias_posted_by' ) ) : /** * Prints HTML with meta information for the current author. */ function aytias_posted_by() { $byline = sprintf( /* translators: %s: post author. */ esc_html_x( 'by %s', 'post author', 'aytias' ), '' ); echo ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } endif; if ( ! function_exists( 'aytias_get_single_post_metas' ) ) : /** * Get allowed single post meta based on post meta/customizer */ function aytias_get_single_post_metas($post_id) { // Check if the metas are overridden in post meta $override_post_metas = get_post_meta($post_id, 'aytias_override_post_metas', true ); if($override_post_metas){ $enabled_post_meta = get_post_meta($post_id, 'aytias_single_post_metas', true ); }else{ $enabled_post_meta = aytias_get_option('single_post_meta'); } // Return an empty array if all options are unchecked if($enabled_post_meta){ return $enabled_post_meta; }else{ return array(); } } endif; if ( ! function_exists( 'aytias_show_author_info' ) ) : /** * Get if author info is enabled based on post meta/customizer */ function aytias_show_author_info($post_id) { $show_author_info = get_post_meta($post_id, 'aytias_show_author_info', true ); if( "0" == $show_author_info ){ $show_author_info = false; }elseif( "1" == $show_author_info ){ $show_author_info = true; }else{ $show_author_info = aytias_get_option('show_author_info'); } return $show_author_info; } endif; if ( ! function_exists( 'aytias_show_related_posts' ) ) : /** * Get if related posts are enabled based on post meta/customizer */ function aytias_show_related_posts($post_id) { $show_related_posts = get_post_meta($post_id, 'aytias_show_related_posts', true ); if( "0" == $show_related_posts ){ $show_related_posts = false; }elseif( "1" == $show_related_posts ){ $show_related_posts = true; }else{ $show_related_posts = aytias_get_option('show_related_posts'); } return $show_related_posts; } endif; if ( ! function_exists( 'aytias_show_author_posts' ) ) : /** * Get if author posts are enabled based on post meta/customizer */ function aytias_show_author_posts($post_id) { $show_author_posts = get_post_meta($post_id, 'aytias_show_author_posts', true ); if( "0" == $show_author_posts ){ $show_author_posts = false; }elseif( "1" == $show_author_posts ){ $show_author_posts = true; }else{ $show_author_posts = aytias_get_option('show_author_posts'); } return $show_author_posts; } endif; if ( ! function_exists( 'aytias_post_meta_info' ) ) : /** * Display post meta info. * * @param boolean $author Show author * @param boolean $comment Show read time * @param boolean $date Show date * * @since 1.0.0 */ function aytias_post_meta_info( $enabled_post_meta = array() ) { ?>
' ); } } edit_post_link( sprintf( wp_kses( /* translators: %s: Name of current post. Only visible to screen readers */ __( 'Edit %s', 'aytias' ), array( 'span' => array( 'class' => array(), ), ) ), wp_kses_post( get_the_title() ) ), ''.aytias_get_theme_svg( 'edit' ), '' ); } endif; if ( ! function_exists( 'aytias_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. */ function aytias_post_thumbnail() { if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) { return; } if ( is_singular() ) : ?>