jetpack_json_api_comment_types
jetpack_json_api_comment_types
Appears in: jetpack.14.2.1, jetpack.14.3, jetpack.14.4.1, jetpack.14.5, jetpack.14.6, jetpack.14.7, jetpack.14.8, jetpack.14.9.1, jetpack.15.0
Hook Type: filter
Displaying hooks found in version: jetpack.15.0apply_filters('jetpack_json_api_comment_types') is found 1 times:
- /json-endpoints/class.wpcom-json-api-comment-endpoint.php line 88
* @module json-api * * @param array $types Array of comment types. */ $types = apply_filters( 'jetpack_json_api_comment_types', array( '', 'comment', 'pingback', 'trackback', 'review' ) ); // @todo - can we make this comparison strict without breaking anything? // phpcs:ignore WordPress.PHP.StrictInArray.MissingTrueStrict if ( ! in_array( $comment->comment_type, $types ) ) { return new WP_Error( 'unknown_comment', 'Unknown comment', 404 ); }