- Timestamp:
- 02/25/2017 05:02:17 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
r40120 r40122 221 221 if ( isset( $registered['sticky'], $request['sticky'] ) ) { 222 222 $sticky_posts = get_option( 'sticky_posts', array() ); 223 if ( $sticky_posts && $request['sticky'] ) { 223 if ( ! is_array( $sticky_posts ) ) { 224 $sticky_posts = array(); 225 } 226 if ( $request['sticky'] ) { 224 227 /* 225 228 * As post__in will be used to only get sticky posts, … … 235 238 */ 236 239 if ( ! $args['post__in'] ) { 237 $args['post__in'] = array( -1);240 $args['post__in'] = array( 0 ); 238 241 } 239 242 } elseif ( $sticky_posts ) {
Note: See TracChangeset
for help on using the changeset viewer.