edit_terms WordPress Action Hook

The edit_terms hook is a great way to add extra fields to the WordPress taxonomy editing screen. This hook allows you to add new fields to the taxonomy editing form, as well as modify existing fields. You can also use this hook to remove fields from the taxonomy editing form.

do_action( 'edit_terms', int $term_id, string $taxonomy ) #

Fires immediately before the given terms are edited.


Parameters

$term_id

(int)Term ID.

$taxonomy

(string)Taxonomy slug.


Top ↑

More Information

The edit_terms action is used to hook into code before a term is updated in the database.

A plugin (or theme) can register an action hook from the example below.


Top ↑

Source

File: wp-includes/taxonomy.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.9.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