rest_insert_{$this->taxonomy}

rest_insert_{$this->taxonomy}

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

See hook in core

Displaying hooks found in version: wordpress-6.5.2

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

  • /wp-includes/rest-api/endpoints/class-wp-rest-menus-controller.php line 240
     
    		$term = $this->get_term( $term );
    
    		/** This action is documented in wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php */
    		do_action( "rest_insert_{$this->taxonomy}", $term, $request, true );
    
    		$schema = $this->get_item_schema();
    		if ( ! empty( $schema['properties']['meta'] ) && isset( $request['meta'] ) ) {
    			$meta_update = $this->meta->update_value( $request['meta'], $term->term_id );
    
    			if ( is_wp_error( $meta_update ) ) {
    
  • /wp-includes/rest-api/endpoints/class-wp-rest-menus-controller.php line 324
     
    		$term = get_term( $term->term_id, $this->taxonomy );
    
    		/** 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();
    		if ( ! empty( $schema['properties']['meta'] ) && isset( $request['meta'] ) ) {
    			$meta_update = $this->meta->update_value( $request['meta'], $term->term_id );
    
    			if ( is_wp_error( $meta_update ) ) {
    
  • /wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php line 559
    		 * @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_insert_{$this->taxonomy}", $term, $request, true );
    
    		$schema = $this->get_item_schema();
    		if ( ! empty( $schema['properties']['meta'] ) && isset( $request['meta'] ) ) {
    			$meta_update = $this->meta->update_value( $request['meta'], $term->term_id );
    
    			if ( is_wp_error( $meta_update ) ) {
    
  • /wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php line 679
     
    		$term = get_term( $term->term_id, $this->taxonomy );
    
    		/** 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();
    		if ( ! empty( $schema['properties']['meta'] ) && isset( $request['meta'] ) ) {
    			$meta_update = $this->meta->update_value( $request['meta'], $term->term_id );
    
    			if ( is_wp_error( $meta_update ) ) {