jetpack_json_api_comment_types
jetpack_json_api_comment_types
Hook Type: filter
Displaying hooks found in version: jetpack.14.5apply_filters('jetpack_json_api_comment_types') is found 1 times:
- /json-endpoints/class.wpcom-json-api-comment-endpoint.php line 837980818283848586878889
* @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 );
}