| @@ -15,9 +15,9 @@ | ||
| 15 | 15 | * |
| 16 | 16 | * WordPress counts all published REST post types without checking whether |
| 17 | 17 | * bbPress topics and replies belong to restricted forums. |
| 18 | 18 | * |
| 19 | - * @since 2.6.19 bbPress (r7709) | |
| 19 | + * @since 2.6.19 bbPress (r7710) | |
| 20 | 20 | * |
| 21 | 21 | * @param mixed $response Current REST response. |
| 22 | 22 | * @param array $handler Matched route handler. |
| 23 | 23 | * @param WP_REST_Request $request REST request. |
| @@ -55,9 +55,9 @@ | ||
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | 57 | * REST API controller for bbPress post types. |
| 58 | 58 | * |
| 59 | - * @since 2.7.0 bbPress (r7481) | |
| 59 | + * @since 2.6.17 bbPress (r7482) | |
| 60 | 60 | */ |
| 61 | 61 | class BBP_REST_Posts_Controller extends WP_REST_Posts_Controller { |
| 62 | 62 | |
| 63 | 63 | /** |
| @@ -62,9 +62,9 @@ | ||
| 62 | 62 | |
| 63 | 63 | /** |
| 64 | 64 | * Apply bbPress's strict block list before creating a topic or reply. |
| 65 | 65 | * |
| 66 | - * @since 2.6.19 bbPress (r7623) | |
| 66 | + * @since 2.6.19 bbPress (r7624) | |
| 67 | 67 | * |
| 68 | 68 | * @param WP_REST_Request $request Full details about the request. |
| 69 | 69 | * @return true|WP_Error True if the request has access, WP_Error otherwise. |
| 70 | 70 | */ |
| @@ -88,10 +88,10 @@ | ||
| 88 | 88 | |
| 89 | 89 | /** |
| 90 | 90 | * Checks if a post can be updated. |
| 91 | 91 | * |
| 92 | - * @since 2.7.0 bbPress (r7489) | |
| 93 | - * @since 2.6.19 bbPress (r7683) Check the topic forum on edits. | |
| 92 | + * @since 2.6.17 bbPress (r7490) | |
| 93 | + * @since 2.6.19 bbPress (r7684) Check the topic forum on edits. | |
| 94 | 94 | * |
| 95 | 95 | * @param WP_REST_Request $request Full details about the request. |
| 96 | 96 | * @return true|WP_Error True if the request has access to update the item, WP_Error object otherwise. |
| 97 | 97 | */ |
| @@ -202,9 +202,9 @@ | ||
| 202 | 202 | |
| 203 | 203 | /** |
| 204 | 204 | * Apply bbPress moderation to REST edits before WordPress saves the post. |
| 205 | 205 | * |
| 206 | - * @since 2.6.19 bbPress (r7613) | |
| 206 | + * @since 2.6.19 bbPress (r7614) | |
| 207 | 207 | * |
| 208 | 208 | * @param WP_REST_Request $request Full details about the request. |
| 209 | 209 | * @return WP_REST_Response|WP_Error Response or error from WordPress. |
| 210 | 210 | */ |
| @@ -225,9 +225,9 @@ | ||
| 225 | 225 | |
| 226 | 226 | /** |
| 227 | 227 | * Whether a post is a topic or reply. |
| 228 | 228 | * |
| 229 | - * @since 2.6.19 bbPress (r7613) | |
| 229 | + * @since 2.6.19 bbPress (r7614) | |
| 230 | 230 | * |
| 231 | 231 | * @param WP_Post $post Post to check. |
| 232 | 232 | * @return bool Whether this is forum content. |
| 233 | 233 | */ |
| @@ -237,9 +237,9 @@ | ||
| 237 | 237 | |
| 238 | 238 | /** |
| 239 | 239 | * Whether a REST request changes a topic or reply publication date. |
| 240 | 240 | * |
| 241 | - * @since 2.6.19 bbPress (r7613) | |
| 241 | + * @since 2.6.19 bbPress (r7614) | |
| 242 | 242 | * |
| 243 | 243 | * @param WP_REST_Request $request Full details about the request. |
| 244 | 244 | * @param WP_Post $post Existing post. |
| 245 | 245 | * @return bool Whether the date would change. |
| @@ -269,9 +269,9 @@ | ||
| 269 | 269 | |
| 270 | 270 | /** |
| 271 | 271 | * Get the title that bbPress moderation should check. |
| 272 | 272 | * |
| 273 | - * @since 2.6.19 bbPress (r7613) | |
| 273 | + * @since 2.6.19 bbPress (r7614) | |
| 274 | 274 | * |
| 275 | 275 | * @param WP_REST_Request $request Full details about the request. |
| 276 | 276 | * @param WP_Post|null $post Existing post, or null when creating. |
| 277 | 277 | * @return string Title to check. |
| @@ -290,9 +290,9 @@ | ||
| 290 | 290 | |
| 291 | 291 | /** |
| 292 | 292 | * Get the content that bbPress moderation should check. |
| 293 | 293 | * |
| 294 | - * @since 2.6.19 bbPress (r7613) | |
| 294 | + * @since 2.6.19 bbPress (r7614) | |
| 295 | 295 | * |
| 296 | 296 | * @param WP_REST_Request $request Full details about the request. |
| 297 | 297 | * @param WP_Post|null $post Existing post, or null when creating. |
| 298 | 298 | * @return string Content to check. |
| @@ -314,9 +314,9 @@ | ||
| 314 | 314 | * |
| 315 | 315 | * bbPress posts may be attachment parents even when their own REST routes |
| 316 | 316 | * are disabled. |
| 317 | 317 | * |
| 318 | - * @since 2.7.0 bbPress (r7481) | |
| 318 | + * @since 2.6.17 bbPress (r7482) | |
| 319 | 319 | * |
| 320 | 320 | * @param WP_Post_Type|string $post_type Post type object or name. |
| 321 | 321 | * @return bool Whether the post type is allowed. |
| 322 | 322 | */ |
| @@ -336,10 +336,10 @@ | ||
| 336 | 336 | |
| 337 | 337 | /** |
| 338 | 338 | * Checks if a post can be read. |
| 339 | 339 | * |
| 340 | - * @since 2.7.0 bbPress (r7481) | |
| 341 | - * @since 2.6.19 bbPress (r7681) Check the parent topic for replies. | |
| 340 | + * @since 2.6.17 bbPress (r7482) | |
| 341 | + * @since 2.6.19 bbPress (r7682) Check the parent topic for replies. | |
| 342 | 342 | * |
| 343 | 343 | * @param WP_Post $post Post object. |
| 344 | 344 | * @return bool Whether the post can be read. |
| 345 | 345 | */ |
| @@ -414,9 +414,9 @@ | ||
| 414 | 414 | |
| 415 | 415 | /** |
| 416 | 416 | * REST API controller for attachments to bbPress post types. |
| 417 | 417 | * |
| 418 | - * @since 2.7.0 bbPress (r7481) | |
| 418 | + * @since 2.6.17 bbPress (r7482) | |
| 419 | 419 | */ |
| 420 | 420 | class BBP_REST_Attachments_Controller extends WP_REST_Attachments_Controller { |
| 421 | 421 | |
| 422 | 422 | /** |
| @@ -421,9 +421,9 @@ | ||
| 421 | 421 | |
| 422 | 422 | /** |
| 423 | 423 | * Checks if an attachment can be read. |
| 424 | 424 | * |
| 425 | - * @since 2.7.0 bbPress (r7481) | |
| 425 | + * @since 2.6.17 bbPress (r7482) | |
| 426 | 426 | * |
| 427 | 427 | * @param WP_Post $post Attachment post object. |
| 428 | 428 | * @return bool Whether the attachment can be read. |
| 429 | 429 | */ |
| @@ -455,9 +455,9 @@ | ||
| 455 | 455 | |
| 456 | 456 | /** |
| 457 | 457 | * Use the bbPress controller for attachments when Core's is unchanged. |
| 458 | 458 | * |
| 459 | - * @since 2.7.0 bbPress (r7481) | |
| 459 | + * @since 2.6.17 bbPress (r7482) | |
| 460 | 460 | */ |
| 461 | 461 | function bbp_register_rest_attachment_controller() { |
| 462 | 462 | $post_type = get_post_type_object( 'attachment' ); |
| 463 | 463 | |