Filter hook 'pre_insert_term'

in WP Core File wp-includes/taxonomy.php at line 2423

Description

Filters a term before it is sanitized and inserted into the database.

Occurrences

Filename Line Number
wp-includes/taxonomy.php 2423

Parameters

Type Name Description
string|WP_Error $term The term name to add, or a WP_Error object if there's an error.
string $taxonomy Taxonomy slug.
array|string $args Array or query string of arguments passed to wp_insert_term().

PHP Doc

/**
	 * Filters a term before it is sanitized and inserted into the database.
	 *
	 * @since 3.0.0
	 * @since 6.1.0 The `$args` parameter was added.
	 *
	 * @param string|WP_Error $term     The term name to add, or a WP_Error object if there's an error.
	 * @param string          $taxonomy Taxonomy slug.
	 * @param array|string    $args     Array or query string of arguments passed to wp_insert_term().
	 */