%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() ) ); ?> ' . esc_html( get_the_author() ) . '' ); echo ' ' . $byline . ''; // WPCS: XSS OK. } endif; if ( ! function_exists( 'blog_tale_entry_footer' ) ) : /** * Prints HTML with meta information for the categories, tags and comments. * * @since 1.0.0 * * @param boolean $cat * @param boolean $tag * @param boolean $comment */ function blog_tale_entry_footer($cat = true, $tag = true, $comment = true) { // Hide category and tag text for pages. if ( 'post' === get_post_type() ) { if(true == $cat){ $categories = wp_get_post_categories(get_the_ID()); if(!empty($categories)){ ?> term_id, 'category_color', true); if($color){ $style = "background-color:".esc_attr($color); } ?> cat_name);?> '; comments_popup_link( sprintf( wp_kses( /* translators: %s: post title */ __( 'Leave a Comment on %s', 'blog-tale' ), array( 'span' => array( 'class' => array(), ), ) ), get_the_title() ) ); echo ''; } } edit_post_link( sprintf( wp_kses( /* translators: %s: Name of current post. Only visible to screen readers */ __( 'Edit %s', 'blog-tale' ), array( 'span' => array( 'class' => array(), ), ) ), get_the_title() ), '', '' ); } endif; if ( ! function_exists( 'blog_tale_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 blog_tale_post_thumbnail() { if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) { return; } if ( is_singular() ) : ?>
show_toggles ) && $args->show_toggles ) { // Wrap the menu item link contents in a div, used for positioning. $args->before = '
'; $args->after = ''; // Add a toggle to items with children. if ( in_array( 'menu-item-has-children', $item->classes, true ) ) { $toggle_target_string = '.menu-modal .menu-item-' . $item->ID . ' > .sub-menu'; $toggle_duration = blog_tale_toggle_duration(); // Add the sub menu toggle. $args->after .= ''; } // Close the wrapper. $args->after .= '
'; // Add sub menu icons to the primary menu without toggles. } elseif ( 'primary-menu' === $args->theme_location ) { if ( in_array( 'menu-item-has-children', $item->classes, true ) ) { $args->after = ''; } else { $args->after = ''; } } return $args; } add_filter( 'nav_menu_item_args', 'blog_tale_add_sub_toggles_to_main_menu', 10, 3 ); /** * Displays SVG icons in social links menu. * * @since Blog Tale 1.0 * * @param string $item_output The menu item's starting HTML output. * @param WP_Post $item Menu item data object. * @param int $depth Depth of the menu. Used for padding. * @param stdClass $args An object of wp_nav_menu() arguments. * @return string The menu item output with social icon. */ function blog_tale_nav_menu_social_icons( $item_output, $item, $depth, $args ) { // Change SVG icon inside social links menu if there is supported URL. if ( 'social-menu' === $args->theme_location ) { $svg = BlogTale_SVG_Icons::get_social_link_svg( $item->url ); if ( empty( $svg ) ) { $svg = blog_tale_get_theme_svg( 'link' ); } $item_output = str_replace( $args->link_after, '' . $svg, $item_output ); } return $item_output; } add_filter( 'walker_nav_menu_start_el', 'blog_tale_nav_menu_social_icons', 10, 4 ); /** * Toggles animation duration in milliseconds. * * @since Blog Tale 1.0 * * @return int Duration in milliseconds */ function blog_tale_toggle_duration() { /** * Filters the animation duration/speed used usually for submenu toggles. * * @since Blog Tale 1.0 * * @param int $duration Duration in milliseconds. */ $duration = apply_filters( 'blog_tale_toggle_duration', 250 ); return $duration; }