jetpack_json_api_comment_types

jetpack_json_api_comment_types

Hook Type: filter

See hook in core

Displaying hooks found in version: jetpack.15.0

apply_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 );
    		}