terms_to_edit WordPress Filter Hook

The terms_to_edit hook allows you to modify the terms before they are edited. This hook is useful for cases where you need to modify the terms before they are saved to the database.

apply_filters( 'terms_to_edit', string $terms_to_edit, string $taxonomy ) #

Filters the comma-separated list of terms available to edit.


Description

Top ↑

See also


Top ↑

Parameters

$terms_to_edit

(string)A comma-separated list of term names.

$taxonomy

(string)The taxonomy name for which to retrieve terms.


Top ↑

More Information

  • This filter is used to modify the CSV of terms that is used to show active terms in the taxonomy sidebars on the edit post screen.
  • This is primarily of use if you need to visually modify the appearance of an active term (such as prefixing an asterisk) without changing its behavior. Note that the returned CSV is filtered using JavaScript and is rendered in plain text, so wrapping terms in HTML will not work (any HTML will be rendered as text).

Top ↑

Source

File: wp-admin/includes/taxonomy.php

View on Trac



Top ↑

Changelog

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