'; ?> %2$s'; // Displays the different published and updated date if the post is updated. if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string = ''; } $time_string = sprintf( $time_string, esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ) ); printf( /* Translators: 1. Post link, 2. Post time, 3. Post date */ __( ' %3$s', 'colormag' ), esc_url( get_permalink() ), esc_attr( get_the_time() ), $time_string ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?> 0 Comments', 'colormag' ), __( ' 1 Comment', 'colormag' ), __( ' % Comments', 'colormag' ) ); } else { ?> ', __( ', ', 'colormag' ), '' ); if ( $tags_list ) { echo $tags_list; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped } } if ( $full_post_meta ) { edit_post_link( __( 'Edit', 'colormag' ), '', '' ); } echo ''; endif; } endif; if ( ! function_exists( 'wp_body_open' ) ) : /** * Adds backwards compatibility for wp_body_open() introduced with WordPress 5.2. * * @return void * @see https://developer.wordpress.org/reference/functions/wp_body_open/ */ function wp_body_open() { do_action( 'wp_body_open' ); } endif; if ( ! function_exists( 'colormag_category_color' ) ) : /** * Getting Category Color. * * @param int $wp_category_id Category id. * * @return string The category color. */ function colormag_category_color( $wp_category_id ) { $args = array( 'orderby' => 'id', 'hide_empty' => 0, ); $category = get_categories( $args ); foreach ( $category as $category_list ) { $color = get_theme_mod( 'colormag_category_color_' . $wp_category_id ); return $color; } } endif; if ( ! function_exists( 'colormag_colored_category' ) ) : /** * Category Color for widgets and other * * @param bool $echo Boolean value to echo or just return. * * @return mixed */ function colormag_colored_category( $echo = true ) { global $post; $categories = get_the_category(); $separator = ' '; $output = ''; if ( $categories ) { $output .= '
'; foreach ( $categories as $category ) { $color_code = colormag_category_color( get_cat_id( $category->cat_name ) ); if ( ! empty( $color_code ) ) { $output .= '' . $category->cat_name . '' . $separator; } else { $output .= '' . $category->cat_name . '' . $separator; } } $output .= '
'; if ( $echo ) { echo trim( $output, $separator ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped } else { return trim( $output, $separator ); } } } endif; if ( ! function_exists( 'colormag_sidebar_select' ) ) : /** * Function to display the sidebar selected. */ function colormag_sidebar_select() { global $post; if ( $post ) { $layout_meta = get_post_meta( $post->ID, 'colormag_page_layout', true ); } if ( is_home() ) { $queried_id = get_option( 'page_for_posts' ); $layout_meta = get_post_meta( $queried_id, 'colormag_page_layout', true ); } if ( empty( $layout_meta ) || is_archive() || is_search() ) { $layout_meta = 'default_layout'; } $colormag_default_layout = get_theme_mod( 'colormag_default_layout', 'right_sidebar' ); $colormag_default_page_layout = get_theme_mod( 'colormag_default_page_layout', 'right_sidebar' ); $colormag_default_post_layout = get_theme_mod( 'colormag_default_single_posts_layout', 'right_sidebar' ); if ( 'default_layout' === $layout_meta ) { if ( is_page() ) { colormag_get_sidebar( $colormag_default_page_layout ); } elseif ( is_single() ) { colormag_get_sidebar( $colormag_default_post_layout ); } else { colormag_get_sidebar( $colormag_default_layout ); } } else { colormag_get_sidebar( $layout_meta ); } } endif; if ( ! function_exists( 'colormag_social_links' ) ) : /** * Displays the social links. */ function colormag_social_links() { // Bail out if social links is not activated. if ( 0 == get_theme_mod( 'colormag_social_icons_activate', 0 ) ) { return; } $colormag_social_links = array( 'colormag_social_facebook' => 'Facebook', 'colormag_social_twitter' => 'Twitter', 'colormag_social_googleplus' => 'Google-Plus', 'colormag_social_instagram' => 'Instagram', 'colormag_social_pinterest' => 'Pinterest', 'colormag_social_youtube' => 'YouTube', ); ?>

comment_type ) : case 'pingback': case 'trackback': // Display trackbacks differently than normal comments. ?>
  • id="comment-">

    ', '' ); ?>

  • id="li-comment-">
    %1$s%2$s', get_comment_author_link(), // If current post author is also comment author, make it known visually. ( $comment->user_id === $post->post_author ) ? '' . esc_html__( 'Post author', 'colormag' ) . '' : '' ); printf( '
    %1$s
    ', sprintf( /* Translators: 1. Comment date, 2. Comment time */ esc_html__( '%1$s at %2$s', 'colormag' ), esc_html( get_comment_date() ), esc_html( get_comment_time() ) ) ); printf( '' . esc_html__( 'Permalink', 'colormag' ) . '', esc_url( get_comment_link( $comment->comment_ID ) ) ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped edit_comment_link(); ?>
    comment_approved ) : ?>

    esc_html__( 'Reply', 'colormag' ), 'after' => '', 'depth' => $depth, 'max_depth' => $args['max_depth'], ) ) ); ?>