protected _get_whitelisted_post_types ( ) : array | ||
return | array | Whitelisted post types. |
protected function _get_whitelisted_post_types()
{
$allowed_types = array('post', 'page', 'revision');
/**
* Filter the post types Jetpack has access to, and can synchronize with WordPress.com.
*
* @module json-api
*
* @since 2.2.3
*
* @param array $allowed_types Array of whitelisted post types. Default to `array( 'post', 'page', 'revision' )`.
*/
$allowed_types = apply_filters('rest_api_allowed_post_types', $allowed_types);
return array_unique($allowed_types);
}