REST API controller for bbPress post types.

since 2.7.0
package bbPress

 Methods

Checks if a post can be read.

check_read_permission(\WP_Post $post) : boolean
since 2.7.0

Parameters

$post

\WP_Post

Post object.

Returns

booleanWhether the post can be read.

Checks if a post can be updated.

update_item_permissions_check(\WP_REST_Request $request) : true | \WP_Error
since 2.7.0

Parameters

$request

\WP_REST_Request

Full details about the request.

Returns

true\WP_ErrorTrue if the request has access to update the item, WP_Error object otherwise.

Checks if a post type is allowed for permission checks.

check_is_post_type_allowed(\WP_Post_Type|string $post_type) : boolean

bbPress posts may be attachment parents even when their own REST routes are disabled.

since 2.7.0

Parameters

$post_type

\WP_Post_Typestring

Post type object or name.

Returns

booleanWhether the post type is allowed.