filter

rest_api_allowed_post_types

Filter the post types Jetpack has access to, and can synchronize with WordPress.com.

Parameters

$allowed_types
array

Array of whitelisted post types. Default to `array( 'post', 'page', 'revision' )`.

Changelog

How to use this hook

See “How to use actions and filters to customize Jetpack”.

Notes

You can use this filter to whitelist some of your Custom Post Types and access them from the WordPress.com REST API:
function jeherve_allow_my_post_types( $allowed_post_types ) {
	$allowed_post_types[] = 'my_post_type';
	return $allowed_post_types;
}
add_filter( 'rest_api_allowed_post_types', 'jeherve_allow_my_post_types');