jetpack_json_api_comment_types

jetpack_json_api_comment_types

Hook Type: filter

See hook in core

Displaying hooks found in version: jetpack.14.5

apply_filters('jetpack_json_api_comment_types') is found 1 times:

  • /json-endpoints/class.wpcom-json-api-comment-endpoint.php line 83
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    * @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 );
    }