Filter hook 'edit_term_{$field}'

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

View Source

edit_term_{$field}

Filter Hook
Description
Filters a term field to edit before it is sanitized. The dynamic portion of the hook name, `$field`, refers to the term field.

Hook Information

File Location wp-includes/taxonomy.php View on GitHub
Hook Type Filter
Line Number 1795

Hook Parameters

Type Name Description
mixed $value Value of the term field.
int $term_id Term ID.
string $taxonomy Taxonomy slug.

Usage Examples

Basic Usage
<?php
// Hook into edit_term_{$field}
add_filter('edit_term_{$field}', 'my_custom_filter', 10, 3);

function my_custom_filter($value, $term_id, $taxonomy) {
    // Your custom filtering logic here
    return $value;
}

Source Code Context

wp-includes/taxonomy.php:1795 - How this hook is used in WordPress core
<?php
1790  		 *
1791  		 * @param mixed $value     Value of the term field.
1792  		 * @param int   $term_id   Term ID.
1793  		 * @param string $taxonomy Taxonomy slug.
1794  		 */
1795  		$value = apply_filters( "edit_term_{$field}", $value, $term_id, $taxonomy );
1796  
1797  		/**
1798  		 * Filters the taxonomy field to edit before it is sanitized.
1799  		 *
1800  		 * The dynamic portions of the filter name, `$taxonomy` and `$field`, refer

PHP Documentation

<?php
/**
		 * Filters a term field to edit before it is sanitized.
		 *
		 * The dynamic portion of the hook name, `$field`, refers to the term field.
		 *
		 * @since 2.3.0
		 *
		 * @param mixed $value     Value of the term field.
		 * @param int   $term_id   Term ID.
		 * @param string $taxonomy Taxonomy slug.
		 */
Quick Info
  • Hook Type: Filter
  • Parameters: 3
  • File: wp-includes/taxonomy.php
Related Hooks

Related hooks will be displayed here in future updates.