Docs: Correct rest_insert_*
duplicate hook references in REST API.
Props keesiemeijer. Fixes #39371. git-svn-id: https://develop.svn.wordpress.org/trunk@39671 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
10fbee7158
commit
7bd9bc5208
@ -225,7 +225,7 @@ class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller {
|
||||
|
||||
$attachment = get_post( $request['id'] );
|
||||
|
||||
/* This action is documented in wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php */
|
||||
/** This action is documented in wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php */
|
||||
do_action( 'rest_insert_attachment', $data, $request, false );
|
||||
|
||||
$fields_update = $this->update_additional_fields_for_object( $attachment, $request );
|
||||
|
@ -708,7 +708,7 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
|
||||
$comment = get_comment( $id );
|
||||
|
||||
/* This action is documented in lib/endpoints/class-wp-rest-comments-controller.php */
|
||||
/** This action is documented in wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php */
|
||||
do_action( 'rest_insert_comment', $comment, $request, false );
|
||||
|
||||
$schema = $this->get_item_schema();
|
||||
|
@ -651,7 +651,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
|
||||
$post = get_post( $post_id );
|
||||
|
||||
/* This action is documented in lib/endpoints/class-wp-rest-controller.php */
|
||||
/** This action is documented in wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php */
|
||||
do_action( "rest_insert_{$this->post_type}", $post, $request, false );
|
||||
|
||||
$schema = $this->get_item_schema();
|
||||
|
@ -500,7 +500,7 @@ class WP_REST_Terms_Controller extends WP_REST_Controller {
|
||||
|
||||
$term = get_term( (int) $request['id'], $this->taxonomy );
|
||||
|
||||
/* This action is documented in lib/endpoints/class-wp-rest-terms-controller.php */
|
||||
/** This action is documented in wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php */
|
||||
do_action( "rest_insert_{$this->taxonomy}", $term, $request, false );
|
||||
|
||||
$schema = $this->get_item_schema();
|
||||
|
@ -606,7 +606,7 @@ class WP_REST_Users_Controller extends WP_REST_Controller {
|
||||
|
||||
$user = get_user_by( 'id', $user_id );
|
||||
|
||||
/* This action is documented in lib/endpoints/class-wp-rest-users-controller.php */
|
||||
/** This action is documented in wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php */
|
||||
do_action( 'rest_insert_user', $user, $request, false );
|
||||
|
||||
if ( is_multisite() && ! is_user_member_of_blog( $id ) ) {
|
||||
|
Loading…
Reference in New Issue
Block a user