Changeset 1534
- Timestamp:
- 05/02/2015 12:51:04 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/wcorg-json-api.php
r1533 r1534 235 235 236 236 if ( $session_ids ) { 237 add_filter( 'json_query_vars', 'wcorg_json_allow_post_in' ); 237 238 $sessions = $wp_json_posts->get_posts( 238 239 array( … … 245 246 'wcb_session' 246 247 ); 248 remove_filter( 'json_query_vars', 'wcorg_json_allow_post_in' ); 247 249 } 248 250 249 251 return $sessions; 252 } 253 254 /** 255 * Allow the `post_in` query var in `WP_JSON_Posts::get_post()` queries, even if the user is unauthenticated. 256 * 257 * @param array $query_vars 258 * 259 * @return array 260 */ 261 function wcorg_json_allow_post_in( $query_vars ) { 262 $query_vars[] = 'post__in'; 263 264 return $query_vars; 250 265 } 251 266
Note: See TracChangeset
for help on using the changeset viewer.