Changeset 5706 for sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/jetpack-tweaks/miscellaneous.php
- Timestamp:
- 07/19/2017 10:47:02 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/jetpack-tweaks/miscellaneous.php
r5560 r5706 25 25 26 26 add_action( 'plugins_loaded', __NAMESPACE__ . '\modify_hooks_after_jetpack_init' ); 27 28 /** 29 * Filter the post types Jetpack has access to, and can synchronize with WordPress.com. 30 * 31 * @see Jetpack's WPCOM_JSON_API_ENDPOINT::_get_whitelisted_post_types(); 32 * 33 * @param array $allowed_types Array of whitelisted post types. 34 * 35 * @return array Modified array of whitelisted post types. 36 */ 37 function add_post_types_to_rest_api( $allowed_types ) { 38 $allowed_types += array( 'wcb_speaker', 'wcb_session', 'wcb_sponsor' ); 39 40 return $allowed_types; 41 } 42 43 add_filter( 'rest_api_allowed_post_types', __NAMESPACE__ . '\add_post_types_to_rest_api' );
Note: See TracChangeset
for help on using the changeset viewer.