%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()) ); ?>
' . $time_string . '' ); echo $posted_on; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } ?>
'post-author-image')); $author_url = get_author_posts_url(get_the_author_meta('ID')); $author_name = get_the_author_meta('display_name'); ?>
' . esc_html($author_name) . '' ); } ?>
$limit ) { $categories = array_slice( $categories, 0, $limit ); } } if (null == $show_color) { $show_color = 'none'; } $wrapper_class = ' categories-' . $show_color; ?>
using_permalinks()) ? 'rel="category tag"' : 'rel="category"'; $separator = ' '; $cat_list = ''; $i = 0; foreach ($categories as $category) { $class = ''; if (0 < $i) { $cat_list .= $separator; } $build_style_attr = ''; if ('none' != $show_color) { $color = get_term_meta($category->term_id, 'category_color', true); if ($color) { $build_style_attr = str_replace('value', $color, $style_attr); } else { $build_style_attr = ''; } if ('has-text-color' == $show_color) : $class = ' class="has-text-color"'; endif; if ('has-background' == $show_color) : $class = ' class="has-background-color"'; endif; } $cat_list .= '' . $category->name . ''; ++$i; } echo $cat_list; ?>
' . esc_html__('Tagged %1$s', 'bloglex') . '', $tags_list); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } } if ((!is_single() && !post_password_required() && (comments_open() || get_comments_number())) && $show_comment) { echo ''; comments_popup_link( sprintf( wp_kses( /* translators: %s: post title */ __('Leave a Comment on %s', 'bloglex'), array( 'span' => array( 'class' => array(), ), ) ), wp_kses_post(get_the_title()) ) ); echo ''; } edit_post_link( sprintf( wp_kses( /* translators: %s: Name of current post. Only visible to screen readers */ __('Edit %s', 'bloglex'), array( 'span' => array( 'class' => array(), ), ) ), wp_kses_post(get_the_title()) ), '', '' ); } endif; if (!function_exists('bloglex_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 bloglex_post_thumbnail($image_class = null, $image_size = null) { 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 = bloglex_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' === $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', 'bloglex_add_sub_toggles_to_main_menu', 10, 2); /** * Displays SVG icons in social links menu. * * @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. * @since Bloglex 1.0 * */ function bloglex_nav_menu_social_icons($item_output, $item, $depth, $args) { // Change SVG icon inside social links menu if there is supported URL. if ('social' === $args->theme_location) { $svg = Bloglex_SVG_Icons::get_social_link_svg($item->url); if (empty($svg)) { $svg = bloglex_get_theme_svg('link'); } $item_output = str_replace($args->link_after, '' . $svg, $item_output); } return $item_output; } add_filter('walker_nav_menu_start_el', 'bloglex_nav_menu_social_icons', 10, 4); /** * Toggles animation duration in milliseconds. * * @return int Duration in milliseconds * @since Bloglex 1.0 * */ function bloglex_toggle_duration() { /** * Filters the animation duration/speed used usually for submenu toggles. * * @param int $duration Duration in milliseconds. * @since Bloglex 1.0 * */ $duration = apply_filters('bloglex_toggle_duration', 250); return $duration; }