wp_insert_term_data

wp_insert_term_data

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.1

apply_filters('wp_insert_term_data') is found 1 times:

  • /wp-includes/taxonomy.php line 2571
    	 * @param array  $data     Term data to be inserted.
    	 * @param string $taxonomy Taxonomy slug.
    	 * @param array  $args     Arguments passed to wp_insert_term().
    	 */
    	$data = apply_filters( 'wp_insert_term_data', $data, $taxonomy, $args );
    
    	if ( false === $wpdb->insert( $wpdb->terms, $data ) ) {
    		return new WP_Error( 'db_insert_error', __( 'Could not insert term into the database.' ), $wpdb->last_error );
    	}
    
    	$term_id = (int) $wpdb->insert_id;
    

See this hook used in plugins: