rest_after_insert_{$this->taxonomy}

rest_after_insert_{$this->taxonomy}

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

See hook in core

Displaying hooks found in version: wordpress-6.7.1

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

  • /wp-includes/rest-api/endpoints/class-wp-rest-menus-controller.php line 268
     
    		$request->set_param( 'context', 'view' );
    
    		/** This action is documented in wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php */
    		do_action( "rest_after_insert_{$this->taxonomy}", $term, $request, true );
    
    		$response = $this->prepare_item_for_response( $term, $request );
    		$response = rest_ensure_response( $response );
    
    		$response->set_status( 201 );
    		$response->header( 'Location', rest_url( $this->namespace . '/' . $this->rest_base . '/' . $term->term_id ) );
    
  • /wp-includes/rest-api/endpoints/class-wp-rest-menus-controller.php line 352
     
    		$request->set_param( 'context', 'view' );
    
    		/** This action is documented in wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php */
    		do_action( "rest_after_insert_{$this->taxonomy}", $term, $request, false );
    
    		$response = $this->prepare_item_for_response( $term, $request );
    
    		return rest_ensure_response( $response );
    	}
    
    
  • /wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php line 594
    		 * @param WP_Term         $term     Inserted or updated term object.
    		 * @param WP_REST_Request $request  Request object.
    		 * @param bool            $creating True when creating a term, false when updating.
    		 */
    		do_action( "rest_after_insert_{$this->taxonomy}", $term, $request, true );
    
    		$response = $this->prepare_item_for_response( $term, $request );
    		$response = rest_ensure_response( $response );
    
    		$response->set_status( 201 );
    		$response->header( 'Location', rest_url( $this->namespace . '/' . $this->rest_base . '/' . $term->term_id ) );
    
  • /wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php line 699
     
    		$request->set_param( 'context', 'edit' );
    
    		/** This action is documented in wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php */
    		do_action( "rest_after_insert_{$this->taxonomy}", $term, $request, false );
    
    		$response = $this->prepare_item_for_response( $term, $request );
    
    		return rest_ensure_response( $response );
    	}