%2$s'; $posted_updated = esc_html__( 'Published: ', 'boyo' ); if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string = ''; $posted_updated = esc_html__( 'Last Updated: ', 'boyo' ); } $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 = $posted_updated . '' . $time_string . ''; echo '' . $posted_on . ''; // WPCS: XSS OK. } endif; if ( ! function_exists( 'boyo_posted_by' ) ) : /** * Prints HTML with meta information for the current author. */ function boyo_posted_by() { if ( function_exists( 'get_coauthors' ) ) { $coauthors = get_coauthors(); if ( ! empty( $coauthors ) ) { $byline = ''; } } else { $byline = '' . get_avatar( get_the_author_meta( 'ID' ), 48 ) . '' . esc_html( get_the_author() ) . ''; } echo '
' . $byline . '
'; // WPCS: XSS OK. } endif; if ( ! function_exists( 'boyo_entry_footer' ) ) : /** * Prints HTML with meta information for the categories, tags and comments. */ function boyo_entry_footer() { // Hide category and tag text for pages. if ( 'post' === get_post_type() ) { boyo_the_tags(); } edit_post_link( sprintf( wp_kses( /* translators: %s: Name of current post. Only visible to screen readers */ __( 'Edit %s', 'boyo' ), array( 'span' => array( 'class' => array(), ), ) ), get_the_title() ), '', '' ); } endif; if ( ! function_exists( 'boyo_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 boyo_post_thumbnail() { if ( post_password_required() || is_attachment() ) { return; } if ( is_singular() ) : if ( has_post_thumbnail() && ! get_post_format() ) : ?>
post_excerpt ); } endif; if ( ! function_exists( 'boyo_the_post_format_icon' ) ) : /** * Display icons in post formats. * * @param string $post_format post format name. * @return string */ function boyo_the_post_format_icon( $post_format = '' ) { if ( ! in_array( $post_format, array( 'gallery', 'audio', 'video', 'link' ) ) ) { return; } switch ( $post_format ) { case 'link': $icon = ' '; break; case 'gallery': $icon = ' '; break; case 'audio': $icon = ' '; break; case 'video': $icon = ' '; break; } ?> ' . $category_list . '
'; // WPCS: XSS OK. } } endif; if ( ! function_exists( 'boyo_the_tags' ) ) : /** * Displays tags. */ function boyo_the_tags() { $posttags = get_the_tags(); if ( $posttags ) { foreach ( $posttags as $tag ) { echo ' #' . esc_html( $tag->name ) . ''; } } } endif; if ( ! function_exists( 'boyo_the_authors' ) ) : /** * Displays authors. */ function boyo_the_authors() { $title_string = ''; $authors = array(); if ( function_exists( 'get_coauthors' ) ) { $authors_objects = get_coauthors(); foreach ( $authors_objects as $author ) { $authors[] = $author->get( 'ID' ); } $title_string = esc_html__( 'About authors', 'boyo' ); } if ( 2 > count( $authors ) ) { $authors = (array) get_the_author_meta( 'ID' ); $title_string = esc_html__( 'About author', 'boyo' ); } $output = ''; if ( ! empty( $authors ) ) { $output .= '

' . $title_string . '

'; $output .= ''; } echo $output; // WPCS: XSS OK. } endif; if ( ! function_exists( 'boyo_customize_css' ) ) : /** * Custom css header output */ function boyo_customize_css() { $base_css = '@media (min-width: 961px) { .main-menu .current-menu-ancestor > a::after { border-bottom: 4px solid ' . esc_attr( get_theme_mod( 'menu_underline_color', '#ffd73e' ) ) . ';}}'; $base_css .= '.main-menu .menu-item > a:active::after, .main-menu .menu-item > a:hover::after, .main-menu .current-menu-item > a::after { border-bottom: 4px solid ' . esc_attr( get_theme_mod( 'menu_underline_color', '#ffd73e' ) ) . ';}'; wp_add_inline_style( 'boyo-base', $base_css ); $archive_css = '.site-main, .main-navigation { background-color: ' . esc_attr( get_theme_mod( 'main_home_content_bg_color', '#f8f8f8' ) ) . '; }'; $archive_css .= '.link-post-format-wrapper .entry-header, .link-post-format-wrapper .entry-content { background-color: ' . esc_attr( get_theme_mod( 'link_format_bg_color', '#edf7fa' ) ) . '; }'; $archive_css .= '.quote-post-format-wrapper .entry-header, .quote-post-format-wrapper .entry-content { background-color: ' . esc_attr( get_theme_mod( 'quote_format_bg_color', '#fef0f0' ) ) . '; }'; $archive_css .= '.format-aside .aside-content-wrapper { background-color: ' . esc_attr( get_theme_mod( 'aside_format_bg_color', '#c1e4de' ) ) . '; }'; $archive_css .= '@media (min-width: 961px) { .sticky .entry-header { background-color: ' . esc_attr( get_theme_mod( 'main_home_content_bg_color', '#f8f8f8' ) ) . '; }}'; wp_add_inline_style( 'boyo-archive', $archive_css ); } add_action( 'wp_enqueue_scripts', 'boyo_customize_css' ); endif;