rest_after_insert_{$this->post_type}

rest_after_insert_{$this->post_type}

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action

See hook in core

Displaying hooks found in version: wordpress-6.7.1

do_action('rest_after_insert_{$this->post_type}') is found 4 times:

  • /wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php line 838
    		 * @param WP_Post         $post     Inserted or updated post object.
    		 * @param WP_REST_Request $request  Request object.
    		 * @param bool            $creating True when creating a post, false when updating.
    		 */
    		do_action( "rest_after_insert_{$this->post_type}", $post, $request, true );
    
    		wp_after_insert_post( $post, false, null );
    
    		$response = $this->prepare_item_for_response( $post, $request );
    		$response = rest_ensure_response( $response );
    
    
  • /wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php line 1014
    			return rest_ensure_response( $response );
    		}
    
    		/** This action is documented in wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php */
    		do_action( "rest_after_insert_{$this->post_type}", $post, $request, false );
    
    		wp_after_insert_post( $post, true, $post_before );
    
    		$response = $this->prepare_item_for_response( $post, $request );
    
    		return rest_ensure_response( $response );
    
  • /wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php line 414
    		$request->set_param( 'context', 'edit' );
    
    		$post = get_post( $template->wp_id );
    		/** This action is documented in wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php */
    		do_action( "rest_after_insert_{$this->post_type}", $post, $request, false );
    
    		wp_after_insert_post( $post, $update, $post_before );
    
    		$response = $this->prepare_item_for_response( $template, $request );
    
    		return rest_ensure_response( $response );
    
  • /wp-includes/rest-api/endpoints/class-wp-rest-templates-controller.php line 474
    			return $fields_update;
    		}
    
    		/** This action is documented in wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php */
    		do_action( "rest_after_insert_{$this->post_type}", $post, $request, true );
    
    		wp_after_insert_post( $post, false, null );
    
    		$response = $this->prepare_item_for_response( $template, $request );
    		$response = rest_ensure_response( $response );