Action hook '{$taxonomy}_edit_form_fields'

in WP Core File wp-admin/edit-tag-form.php at line 259

View Source

{$taxonomy}_edit_form_fields

Action Hook
Description
Fires after the Edit Term form fields are displayed. The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug. Possible hook names include: - `category_edit_form_fields` - `post_tag_edit_form_fields`

Hook Information

File Location wp-admin/edit-tag-form.php View on GitHub
Hook Type Action
Line Number 259

Hook Parameters

Type Name Description
WP_Term $tag Current taxonomy term object.
string $taxonomy Current taxonomy slug.

Usage Examples

Basic Usage
<?php
// Hook into {$taxonomy}_edit_form_fields
add_action('{$taxonomy}_edit_form_fields', 'my_custom_function', 10, 2);

function my_custom_function($tag, $taxonomy) {
    // Your custom code here
}

Source Code Context

wp-admin/edit-tag-form.php:259 - How this hook is used in WordPress core
<?php
 254  		 * @since 3.0.0
 255  		 *
 256  		 * @param WP_Term $tag      Current taxonomy term object.
 257  		 * @param string  $taxonomy Current taxonomy slug.
 258  		 */
 259  		do_action( "{$taxonomy}_edit_form_fields", $tag, $taxonomy );
 260  		?>
 261  	</table>
 262  <?php
 263  // Back compat hooks.
 264  if ( 'category' === $taxonomy ) {

PHP Documentation

<?php
/**
		 * Fires after the Edit Term form fields are displayed.
		 *
		 * The dynamic portion of the hook name, `$taxonomy`, refers to
		 * the taxonomy slug.
		 *
		 * Possible hook names include:
		 *
		 *  - `category_edit_form_fields`
		 *  - `post_tag_edit_form_fields`
		 *
		 * @since 3.0.0
		 *
		 * @param WP_Term $tag      Current taxonomy term object.
		 * @param string  $taxonomy Current taxonomy slug.
		 */
Quick Info
  • Hook Type: Action
  • Parameters: 2
  • File: wp-admin/edit-tag-form.php
Related Hooks

Related hooks will be displayed here in future updates.