Code Duplication    Length = 59-59 lines in 2 locations

inc/template-tags.php 1 location

@@ 44-102 (lines=59) @@
41
	}
42
endif;
43
44
if ( ! function_exists( 'bitsy_entry_footer' ) ) :
45
	/**
46
	 * Prints HTML with meta information for the categories, tags and comments.
47
	 */
48
	function bitsy_entry_footer() {
49
		// Hide category and tag text for pages.
50
		if ( 'post' === get_post_type() ) {
51
			/* translators: used between list items, there is a space after the comma */
52
			$categories_list = get_the_category_list( esc_html__( ', ', 'bitsy' ) );
53
			if ( $categories_list ) {
54
				/* translators: 1: list of categories. */
55
				printf( '<span class="cat-links">' . esc_html__( 'Posted in %1$s', 'bitsy' ) . '</span>', $categories_list ); // WPCS: XSS OK.
56
			}
57
58
			/* translators: used between list items, there is a space after the comma */
59
			$tags_list = get_the_tag_list( '', esc_html_x( ', ', 'list item separator', 'bitsy' ) );
60
			if ( $tags_list ) {
61
				/* translators: 1: list of tags. */
62
				printf( '<span class="tags-links">' . esc_html__( 'Tagged %1$s', 'bitsy' ) . '</span>', $tags_list ); // WPCS: XSS OK.
63
			}
64
		}
65
66
		if ( ! isbitsyingle() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
67
			echo '<span class="comments-link">';
68
			comments_popup_link(
69
				sprintf(
70
					wp_kses(
71
						/* translators: %s: post title */
72
						__( 'Leave a Comment<span class="screen-reader-text"> on %s</span>', 'bitsy' ),
73
						array(
74
							'span' => array(
75
								'class' => array(),
76
							),
77
						)
78
					),
79
					get_the_title()
80
				)
81
			);
82
			echo '</span>';
83
		}
84
85
		edit_post_link(
86
			sprintf(
87
				wp_kses(
88
					/* translators: %s: Name of current post. Only visible to screen readers */
89
					__( 'Edit <span class="screen-reader-text">%s</span>', 'bitsy' ),
90
					array(
91
						'span' => array(
92
							'class' => array(),
93
						),
94
					)
95
				),
96
				get_the_title()
97
			),
98
			'<span class="edit-link">',
99
			'</span>'
100
		);
101
	}
102
endif;
103

template-tags.php 1 location

@@ 44-102 (lines=59) @@
41
	}
42
endif;
43
44
if ( ! function_exists( '_s_entry_footer' ) ) :
45
	/**
46
	 * Prints HTML with meta information for the categories, tags and comments.
47
	 */
48
	function _s_entry_footer() {
49
		// Hide category and tag text for pages.
50
		if ( 'post' === get_post_type() ) {
51
			/* translators: used between list items, there is a space after the comma */
52
			$categories_list = get_the_category_list( esc_html__( ', ', '_s' ) );
53
			if ( $categories_list ) {
54
				/* translators: 1: list of categories. */
55
				printf( '<span class="cat-links">' . esc_html__( 'Posted in %1$s', '_s' ) . '</span>', $categories_list ); // WPCS: XSS OK.
56
			}
57
58
			/* translators: used between list items, there is a space after the comma */
59
			$tags_list = get_the_tag_list( '', esc_html_x( ', ', 'list item separator', '_s' ) );
60
			if ( $tags_list ) {
61
				/* translators: 1: list of tags. */
62
				printf( '<span class="tags-links">' . esc_html__( 'Tagged %1$s', '_s' ) . '</span>', $tags_list ); // WPCS: XSS OK.
63
			}
64
		}
65
66
		if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
67
			echo '<span class="comments-link">';
68
			comments_popup_link(
69
				sprintf(
70
					wp_kses(
71
						/* translators: %s: post title */
72
						__( 'Leave a Comment<span class="screen-reader-text"> on %s</span>', '_s' ),
73
						array(
74
							'span' => array(
75
								'class' => array(),
76
							),
77
						)
78
					),
79
					get_the_title()
80
				)
81
			);
82
			echo '</span>';
83
		}
84
85
		edit_post_link(
86
			sprintf(
87
				wp_kses(
88
					/* translators: %s: Name of current post. Only visible to screen readers */
89
					__( 'Edit <span class="screen-reader-text">%s</span>', '_s' ),
90
					array(
91
						'span' => array(
92
							'class' => array(),
93
						),
94
					)
95
				),
96
				get_the_title()
97
			),
98
			'<span class="edit-link">',
99
			'</span>'
100
		);
101
	}
102
endif;
103