Changeset 2245
- Timestamp:
- 01/04/2016 03:47:12 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/wcorg-json-api.php
r2241 r2245 14 14 */ 15 15 16 add_filter( 'json_endpoints', 'wcorg_json_whitelist_endpoints', 999 ); 17 add_filter( 'json_prepare_post', 'wcorg_json_expose_whitelisted_meta_data', 997, 3 ); 18 add_filter( 'json_prepare_post', 'wcorg_json_expose_additional_post_data', 998, 3 ); // after `wcorg_json_expose_whitelisted_meta_data()`, because anything added before that method gets wiped out 19 add_filter( 'json_prepare_post', 'wcorg_json_embed_related_posts', 999, 3 ); // after `wcorg_json_expose_additional_post_data()` 20 add_action( 'wp_json_server_before_serve', 'wcorg_json_avoid_nested_callback_conflicts', 11 ); // after the default endpoints are added in `json_api_default_filters()` 21 add_filter( 'wp_cache_eof_tags', 'wcorg_json_cache_requests' ); 16 22 17 23 /** … … 71 77 return $whitelisted_endpoints; 72 78 } 73 add_filter( 'json_endpoints', 'wcorg_json_whitelist_endpoints', 999 );74 79 75 80 /** … … 125 130 return $prepared_post; 126 131 } 127 add_filter( 'json_prepare_post', 'wcorg_json_expose_whitelisted_meta_data', 997, 3 );128 132 129 133 /** … … 153 157 return $prepared_post; 154 158 } 155 add_filter( 'json_prepare_post', 'wcorg_json_expose_additional_post_data', 998, 3 ); // after `wcorg_json_expose_whitelisted_meta_data()`, because anything added before that method gets wiped out156 159 157 160 /** … … 214 217 return $prepared_post; 215 218 } 216 add_filter( 'json_prepare_post', 'wcorg_json_embed_related_posts', 999, 3 ); // after `wcorg_json_expose_additional_post_data()`217 219 218 220 /** … … 303 305 remove_filter( 'json_prepare_post', array( $wp_json_media, 'add_thumbnail_data' ), 10, 3 ); 304 306 } 305 add_action( 'wp_json_server_before_serve', 'wcorg_json_avoid_nested_callback_conflicts', 11 ); // after the default endpoints are added in `json_api_default_filters()`306 307 307 308 /** … … 332 333 return $eof_pattern; 333 334 } 334 add_filter( 'wp_cache_eof_tags', 'wcorg_json_cache_requests' );
Note: See TracChangeset
for help on using the changeset viewer.