Changeset 45671 for trunk/src/wp-includes/post.php
- Timestamp:
- 07/25/2019 01:35:52 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post.php
r45667 r45671 2214 2214 $stickies = get_option( 'sticky_posts' ); 2215 2215 2216 if ( ! is_array( $stickies ) ) { 2217 return false; 2218 } 2219 2220 if ( in_array( $post_id, $stickies ) ) { 2221 return true; 2222 } 2223 2224 return false; 2216 $is_sticky = is_array( $stickies ) && in_array( $post_id, $stickies ); 2217 2218 /** 2219 * Filters whether a post is sticky. 2220 * 2221 * @since 5.3.0 2222 * 2223 * @param bool $is_sticky Whether a post is sticky. 2224 * @param int $post_id Post ID. 2225 */ 2226 return apply_filters( 'is_sticky', $is_sticky, $post_id ); 2225 2227 } 2226 2228
Note: See TracChangeset
for help on using the changeset viewer.