term_id )) . '" title="' . sprintf( esc_html( "View all posts in %s", 'neira-lite' ), esc_html($category[0]->name )) . '" ' . '>' . esc_html($category[0]->name).' '; } } endif; /** * Filter the except length to 20 characters. * * @param int $length Excerpt length. * @return int (Maybe) modified excerpt length. */ if ( ! function_exists( 'neira_lite_custom_excerpt_length' ) ) : function neira_lite_custom_excerpt_length( $length ) { return get_theme_mod('neira_entry_excerpt', '45'); } add_filter( 'excerpt_length', 'neira_lite_custom_excerpt_length', 999 ); endif; /** * Customize excerpt more. */ if ( ! function_exists( 'neira_lite_excerpt_more' ) ) : function neira_lite_excerpt_more( $more ) { return '... '; } add_filter( 'excerpt_more', 'neira_lite_excerpt_more' ); endif; // Url Encode function neira_lite_url_encode($title) { $title = html_entity_decode($title); $title = urlencode($title); return $title; } if ( ! function_exists( 'neira_lite_posted_on' ) ) : /** * Prints HTML with meta information for the current post-date/time. */ function neira_lite_posted_on() { $time_string = ''; $time_string = sprintf( $time_string, esc_attr( get_the_date( get_option('date_format') ) ), esc_html( get_the_date(get_option('date_format')) ) ); $posted_on = sprintf( /* translators: %s: post date. */ esc_html( '%s', 'post date' ), '' .$time_string. '' ); echo '' . $posted_on . ''; // WPCS: XSS OK. } endif; if ( ! function_exists( 'neira_lite_posted_by' ) ) : /** * Prints HTML with meta information for the current author. */ function neira_lite_posted_by() { $byline = sprintf( /* translators: %s: post author. */ esc_html_x( 'by %s', 'post author', 'neira-lite' ), ' ' ); echo ' '; // WPCS: XSS OK. } endif; // Comment Layout function neira_lite_custom_comment($comment, $args, $depth) { if ( 'div' == $args['style'] ) { $tag = 'div'; $add_below = 'comment'; } else { $tag = 'li'; $add_below = 'div-comment'; } ?> < id="comment-">