Completed
Push — master ( 7984ea...f8c9c5 )
by SILENT
02:05 queued 11s
created

strip_term_description()   A

Complexity

Conditions 6
Paths 2

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 6
eloc 4
c 1
b 0
f 0
nc 2
nop 0
dl 0
loc 6
rs 9.2222
1
<?php
2
/**
3
 * Custom template tags for this theme
4
 *
5
 * Eventually, some of the functionality here could be replaced by core features.
6
 *
7
 * @package WordPress
8
 * @subpackage Strip
9
 */
10
11
/**
12
 * Add custom header image to header area
13
 */
14
function strip_header_background() {
15
	if ( get_header_image() ) {
0 ignored issues
show
Bug introduced by
The function get_header_image was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

15
	if ( /** @scrutinizer ignore-call */ get_header_image() ) {
Loading history...
16
		$css = '.site-branding { background-image: url(' . esc_url( get_header_image() ) . '); }';
0 ignored issues
show
Bug introduced by
The function esc_url was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

16
		$css = '.site-branding { background-image: url(' . /** @scrutinizer ignore-call */ esc_url( get_header_image() ) . '); }';
Loading history...
17
		wp_add_inline_style( 'strip-style', $css );
0 ignored issues
show
Bug introduced by
The function wp_add_inline_style was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

17
		/** @scrutinizer ignore-call */ 
18
  wp_add_inline_style( 'strip-style', $css );
Loading history...
18
	}
19
}
20
add_action( 'wp_enqueue_scripts', 'strip_header_background', 11 );
0 ignored issues
show
Bug introduced by
The function add_action was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

20
/** @scrutinizer ignore-call */ 
21
add_action( 'wp_enqueue_scripts', 'strip_header_background', 11 );
Loading history...
21
22
if ( ! function_exists( 'strip_entry_meta' ) ) :
23
	/**
24
	 * Prints HTML with meta information for the current post-date/time and author.
25
	 */
26
	function strip_entry_meta() {
27
		if ( is_sticky() && is_home() ) {
0 ignored issues
show
Bug introduced by
The function is_home was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

27
		if ( is_sticky() && /** @scrutinizer ignore-call */ is_home() ) {
Loading history...
Bug introduced by
The function is_sticky was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

27
		if ( /** @scrutinizer ignore-call */ is_sticky() && is_home() ) {
Loading history...
28
			printf(
29
				wp_kses( '<span class="featured-post"><a href="%1$s" title="%2$s" rel="bookmark">Sticky</a></span>', 'strip' ),
0 ignored issues
show
Bug introduced by
The function wp_kses was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

29
				/** @scrutinizer ignore-call */ 
30
    wp_kses( '<span class="featured-post"><a href="%1$s" title="%2$s" rel="bookmark">Sticky</a></span>', 'strip' ),
Loading history...
30
				esc_url( get_permalink() ),
0 ignored issues
show
Bug introduced by
The function esc_url was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

30
				/** @scrutinizer ignore-call */ 
31
    esc_url( get_permalink() ),
Loading history...
Bug introduced by
The function get_permalink was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

30
				esc_url( /** @scrutinizer ignore-call */ get_permalink() ),
Loading history...
31
				esc_attr( get_the_time() )
0 ignored issues
show
Bug introduced by
The function esc_attr was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

31
				/** @scrutinizer ignore-call */ 
32
    esc_attr( get_the_time() )
Loading history...
Bug introduced by
The function get_the_time was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

31
				esc_attr( /** @scrutinizer ignore-call */ get_the_time() )
Loading history...
32
			);
33
		}
34
35
		if ( 'post' === get_post_type() ) {
0 ignored issues
show
Bug introduced by
The function get_post_type was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

35
		if ( 'post' === /** @scrutinizer ignore-call */ get_post_type() ) {
Loading history...
36
			printf(
37
				wp_kses_post( '<span class="entry-date"><a href="%1$s" title="%2$s" rel="bookmark"><time datetime="%3$s">%4$s</time></a></span><span class="author vcard"><a class="url fn n" href="%5$s" title="%6$s" rel="author">%7$s</a></span>', 'strip' ),
0 ignored issues
show
Bug introduced by
The function wp_kses_post was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

37
				/** @scrutinizer ignore-call */ 
38
    wp_kses_post( '<span class="entry-date"><a href="%1$s" title="%2$s" rel="bookmark"><time datetime="%3$s">%4$s</time></a></span><span class="author vcard"><a class="url fn n" href="%5$s" title="%6$s" rel="author">%7$s</a></span>', 'strip' ),
Loading history...
38
				esc_url( get_permalink() ),
39
				esc_attr( get_the_time() ),
40
				esc_attr( get_the_date( 'c' ) ),
0 ignored issues
show
Bug introduced by
The function get_the_date was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

40
				esc_attr( /** @scrutinizer ignore-call */ get_the_date( 'c' ) ),
Loading history...
41
				get_the_date(),
42
				esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
0 ignored issues
show
Bug introduced by
The function get_author_posts_url was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

42
				esc_url( /** @scrutinizer ignore-call */ get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
Loading history...
Bug introduced by
The function get_the_author_meta was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

42
				esc_url( get_author_posts_url( /** @scrutinizer ignore-call */ get_the_author_meta( 'ID' ) ) ),
Loading history...
43
				esc_attr( sprintf( __( 'View all posts by %s', 'strip' ), get_the_author() ) ),
0 ignored issues
show
Bug introduced by
The function __ was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

43
				esc_attr( sprintf( /** @scrutinizer ignore-call */ __( 'View all posts by %s', 'strip' ), get_the_author() ) ),
Loading history...
Bug introduced by
The function get_the_author was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

43
				esc_attr( sprintf( __( 'View all posts by %s', 'strip' ), /** @scrutinizer ignore-call */ get_the_author() ) ),
Loading history...
44
				get_the_author()
45
			);
46
		}
47
48
		$tags_list = get_the_tag_list( '', _x( ', ', 'Used between list items, there is a space after the comma.', 'strip' ) );
0 ignored issues
show
Bug introduced by
The function get_the_tag_list was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

48
		$tags_list = /** @scrutinizer ignore-call */ get_the_tag_list( '', _x( ', ', 'Used between list items, there is a space after the comma.', 'strip' ) );
Loading history...
Bug introduced by
The function _x was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

48
		$tags_list = get_the_tag_list( '', /** @scrutinizer ignore-call */ _x( ', ', 'Used between list items, there is a space after the comma.', 'strip' ) );
Loading history...
49
		if ( $tags_list ) {
50
			printf( '<span class="tags-links">' . esc_html( '%1$s', 'strip' ) . '</span>', $tags_list ); // WPCS: XSS OK.
0 ignored issues
show
Bug introduced by
The function esc_html was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

50
			printf( '<span class="tags-links">' . /** @scrutinizer ignore-call */ esc_html( '%1$s', 'strip' ) . '</span>', $tags_list ); // WPCS: XSS OK.
Loading history...
51
		}
52
	}
53
endif;
54
55
if ( ! function_exists( 'strip_term_description' ) ) :
56
	/**
57
	 * Display optional term description for category, tag and custom taxonomy pages.
58
	 *
59
	 * @since Strip 1.0
60
	 */
61
	function strip_term_description() {
62
		// Show an optional term description.
63
		$term_description = term_description();
0 ignored issues
show
Bug introduced by
The function term_description was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

63
		$term_description = /** @scrutinizer ignore-call */ term_description();
Loading history...
64
65
		if ( is_post_type_archive( 'comic' ) || is_category() || is_tag() || is_tax( 'story' ) && ! empty( $term_description ) ) :
0 ignored issues
show
Bug introduced by
The function is_tax was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

65
		if ( is_post_type_archive( 'comic' ) || is_category() || is_tag() || /** @scrutinizer ignore-call */ is_tax( 'story' ) && ! empty( $term_description ) ) :
Loading history...
Bug introduced by
The function is_category was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

65
		if ( is_post_type_archive( 'comic' ) || /** @scrutinizer ignore-call */ is_category() || is_tag() || is_tax( 'story' ) && ! empty( $term_description ) ) :
Loading history...
Bug introduced by
The function is_tag was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

65
		if ( is_post_type_archive( 'comic' ) || is_category() || /** @scrutinizer ignore-call */ is_tag() || is_tax( 'story' ) && ! empty( $term_description ) ) :
Loading history...
Bug introduced by
The function is_post_type_archive was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

65
		if ( /** @scrutinizer ignore-call */ is_post_type_archive( 'comic' ) || is_category() || is_tag() || is_tax( 'story' ) && ! empty( $term_description ) ) :
Loading history...
66
			printf( '<div class="taxonomy-description">%s</div>', $term_description, 'strip' ); // WPCS: XSS OK.
67
			endif;
68
	}
69
endif; // ends check for strip_term_description.
70
71
/**
72
 * Returns true if a blog has more than 1 category.
73
 *
74
 * @return bool
75
 */
76
function strip_categorized_blog() {
77
	$category_count = get_transient( 'strip_categories' );
0 ignored issues
show
Bug introduced by
The function get_transient was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

77
	$category_count = /** @scrutinizer ignore-call */ get_transient( 'strip_categories' );
Loading history...
78
79
	if ( false === $category_count ) {
80
		// Create an array of all the categories that are attached to posts.
81
		$categories = get_categories( array(
0 ignored issues
show
Bug introduced by
The function get_categories was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

81
		$categories = /** @scrutinizer ignore-call */ get_categories( array(
Loading history...
82
			'fields'     => 'ids',
83
			'hide_empty' => 1,
84
			// We only need to know if there is more than one category.
85
			'number'     => 2,
86
		) );
87
88
		// Count the number of categories that are attached to the posts.
89
		$category_count = count( $categories );
90
91
		set_transient( 'strip_categories', $category_count );
0 ignored issues
show
Bug introduced by
The function set_transient was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

91
		/** @scrutinizer ignore-call */ 
92
  set_transient( 'strip_categories', $category_count );
Loading history...
92
	}
93
94
	// Allow viewing case of 0 or 1 categories in post preview.
95
	if ( is_preview() ) {
0 ignored issues
show
Bug introduced by
The function is_preview was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

95
	if ( /** @scrutinizer ignore-call */ is_preview() ) {
Loading history...
96
		return true;
97
	}
98
99
	return $category_count > 1;
100
}
101
102
/**
103
 * Flush out the transients used in strip_categorized_blog.
104
 */
105
function strip_category_transient_flusher() {
106
	if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
0 ignored issues
show
Bug introduced by
The constant DOING_AUTOSAVE was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
107
		return;
108
	}
109
	// Like, beat it. Dig?
110
	delete_transient( 'strip_categories' );
0 ignored issues
show
Bug introduced by
The function delete_transient was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

110
	/** @scrutinizer ignore-call */ 
111
 delete_transient( 'strip_categories' );
Loading history...
111
}
112
add_action( 'edit_category', 'strip_category_transient_flusher' );
113
add_action( 'save_post',     'strip_category_transient_flusher' );
114
115
if ( ! function_exists( 'strip_the_custom_logo' ) ) :
116
	/**
117
	 * Displays the optional custom logo.
118
	 *
119
	 * Does nothing if the custom logo is not available.
120
	 *
121
	 * @since strip 1.0
122
	 */
123
	function strip_the_custom_logo() {
124
		if ( function_exists( 'the_custom_logo' ) ) {
125
			the_custom_logo();
126
		}
127
	}
128
endif;
129
130
/**
131
 * Display navigation to next/previous pages when applicable
132
 * TO DO clean up
133
 */
134
if ( $wp_query->max_num_pages > 1 && ( is_home() || is_archive() || is_post_type_archive( 'comic' ) || is_search() ) ) : // navigation links for home, archive, and search pages
0 ignored issues
show
Bug introduced by
The function is_home was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

134
if ( $wp_query->max_num_pages > 1 && ( /** @scrutinizer ignore-call */ is_home() || is_archive() || is_post_type_archive( 'comic' ) || is_search() ) ) : // navigation links for home, archive, and search pages
Loading history...
Bug introduced by
The function is_search was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

134
if ( $wp_query->max_num_pages > 1 && ( is_home() || is_archive() || is_post_type_archive( 'comic' ) || /** @scrutinizer ignore-call */ is_search() ) ) : // navigation links for home, archive, and search pages
Loading history...
Bug introduced by
The function is_post_type_archive was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

134
if ( $wp_query->max_num_pages > 1 && ( is_home() || is_archive() || /** @scrutinizer ignore-call */ is_post_type_archive( 'comic' ) || is_search() ) ) : // navigation links for home, archive, and search pages
Loading history...
Bug introduced by
The function is_archive was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

134
if ( $wp_query->max_num_pages > 1 && ( is_home() || /** @scrutinizer ignore-call */ is_archive() || is_post_type_archive( 'comic' ) || is_search() ) ) : // navigation links for home, archive, and search pages
Loading history...
135
136
			the_posts_pagination( array(
0 ignored issues
show
Bug introduced by
The function the_posts_pagination was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

136
			/** @scrutinizer ignore-call */ 
137
   the_posts_pagination( array(
Loading history...
137
						'prev_text' => _x( '&#8592;', 'Previous page link', 'strip' ) . '<span class="screen-reader-text">' . __( 'Previous page', 'strip' ) . '</span>',
0 ignored issues
show
Bug introduced by
The function _x was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

137
						'prev_text' => /** @scrutinizer ignore-call */ _x( '&#8592;', 'Previous page link', 'strip' ) . '<span class="screen-reader-text">' . __( 'Previous page', 'strip' ) . '</span>',
Loading history...
Bug introduced by
The function __ was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

137
						'prev_text' => _x( '&#8592;', 'Previous page link', 'strip' ) . '<span class="screen-reader-text">' . /** @scrutinizer ignore-call */ __( 'Previous page', 'strip' ) . '</span>',
Loading history...
introduced by
Expected a sanitizing function (see Codex for 'Data Validation'), but instead saw '__'
Loading history...
138
						'next_text' => '<span class="screen-reader-text">' . __( 'Next page', 'strip' ) . '</span>' . _x( '&#8594;', 'Next post link', 'strip' ),
0 ignored issues
show
introduced by
Expected a sanitizing function (see Codex for 'Data Validation'), but instead saw '__'
Loading history...
introduced by
Expected a sanitizing function (see Codex for 'Data Validation'), but instead saw '_x'
Loading history...
139
						'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'strip' ) . ' </span>',
0 ignored issues
show
introduced by
Expected a sanitizing function (see Codex for 'Data Validation'), but instead saw '__'
Loading history...
140
					) ); 
0 ignored issues
show
Coding Style introduced by
This line of the multi-line function call does not seem to be indented correctly. Expected 12 spaces, but found 20.
Loading history...
141
		 endif;
142
143
/**
144
 * Get the first and last custom type post using get_boundary_post()
145
 *
146
 * @link https://core.trac.wordpress.org/ticket/27094
147
 *
148
 * @param bool   $in_same_term   Optional. Whether returned post should be in a same taxonomy term.
149
 * @param bool   $start          Optional. Whether to retrieve first or last post.
150
 * @param string $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
151
 * @return mixed Array containing the boundary post object if successful, null otherwise.
152
 */
153
function get_comic_boundary_post( $in_same_term, $start, $taxonomy ) {
154
	global $post;
155
	setup_postdata( $post );
0 ignored issues
show
Bug introduced by
The function setup_postdata was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

155
	/** @scrutinizer ignore-call */ 
156
 setup_postdata( $post );
Loading history...
156
	if ( ! taxonomy_exists( $taxonomy ) ) {
0 ignored issues
show
Bug introduced by
The function taxonomy_exists was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

156
	if ( ! /** @scrutinizer ignore-call */ taxonomy_exists( $taxonomy ) ) {
Loading history...
157
		return null;
158
	}
159
160
	$query_args = array(
161
		'post_type'              => 'comic',
162
		'posts_per_page'         => 1,
163
		'order'                  => $start ? 'ASC' : 'DESC',
164
		/*'no_found_rows'          => true,*/
165
		'update_post_term_cache' => false,
166
		'update_post_meta_cache' => false,
167
	);
168
169
	$term_array = array();
170
	if ( $in_same_term ) {
171
		if ( $in_same_term ) {
0 ignored issues
show
introduced by
The condition $in_same_term is always true.
Loading history...
172
			$term_array = wp_get_object_terms( $post->ID, $taxonomy, array( 'fields' => 'ids' ) );
0 ignored issues
show
Bug introduced by
The function wp_get_object_terms was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

172
			$term_array = /** @scrutinizer ignore-call */ wp_get_object_terms( $post->ID, $taxonomy, array( 'fields' => 'ids' ) );
Loading history...
173
		}
174
		$query_args['tax_query'] = array( array(
0 ignored issues
show
introduced by
Detected usage of tax_query, possible slow query.
Loading history...
introduced by
The first value in a multi-value array must be on a new line
Loading history...
175
			'taxonomy' => $taxonomy,
176
			'terms' => array_merge( $term_array ),
177
		),
178
		);
179
	}
180
181
	$get_posts = new wp_query;
0 ignored issues
show
Bug introduced by
The type wp_query was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
182
	return $get_posts -> query( $query_args );
183
}
184
185
/**
186
 * Link to the first comic post in same term
187
 */
188
function first_comic_link() {
189
	$first = get_comic_boundary_post( true, true, 'story' );
190
	apply_filters( 'the_title', $first[0]->post_title );
0 ignored issues
show
Bug introduced by
The function apply_filters was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

190
	/** @scrutinizer ignore-call */ 
191
 apply_filters( 'the_title', $first[0]->post_title );
Loading history...
191
192
	echo esc_html( get_permalink( $first[0]->ID ) );
0 ignored issues
show
Bug introduced by
The function esc_html was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

192
	echo /** @scrutinizer ignore-call */ esc_html( get_permalink( $first[0]->ID ) );
Loading history...
Bug introduced by
The function get_permalink was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

192
	echo esc_html( /** @scrutinizer ignore-call */ get_permalink( $first[0]->ID ) );
Loading history...
193
}
194
195
/**
196
 * Link to the last comic post in same term
197
 */
198
function last_comic_link() {
199
	$last = get_comic_boundary_post( true, false, 'story' );
200
	apply_filters( 'the_title', $last[0]->post_title );
0 ignored issues
show
Bug introduced by
The function apply_filters was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

200
	/** @scrutinizer ignore-call */ 
201
 apply_filters( 'the_title', $last[0]->post_title );
Loading history...
201
202
	echo esc_html( get_permalink( $last[0]->ID ) );
0 ignored issues
show
Bug introduced by
The function esc_html was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

202
	echo /** @scrutinizer ignore-call */ esc_html( get_permalink( $last[0]->ID ) );
Loading history...
Bug introduced by
The function get_permalink was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

202
	echo esc_html( /** @scrutinizer ignore-call */ get_permalink( $last[0]->ID ) );
Loading history...
203
}
204