pre_insert_term WordPress Filter Hook

The pre_insert_term hook is called before a new term is inserted into the database. It allows you to modify the term before it is stored.

apply_filters( 'pre_insert_term', string|WP_Error $term, string $taxonomy ) #

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


Parameters

$term

(string|WP_Error)The term name to add, or a WP_Error object if there's an error.

$taxonomy

(string)Taxonomy slug.


Top ↑

Source

File: wp-includes/taxonomy.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More