Make WordPress Core

Opened 3 years ago

Closed 4 months ago

Last modified 4 months ago

#20735 closed enhancement (duplicate)

Adding tags to form element of categories.

Reported by: m.ibrahim Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.3.2
Component: Taxonomy Keywords: needs-patch good-first-bug needs-testing
Focuses: Cc:


Just like the post form in posts you can use the hook of "post_edit_form_tag" to add new tags to the form element of creating or editing new post.

but there is no hook for categories form to do that I think adding new element will be helpful feature.

Note: after some debugging I found that the hook can be add in:

#File: your wordpress directory/wp-admin/edit-tag-form.php

#Line: 33

# Find : <form name="edittag" id="edittag" method="post" action="edit-tags.php" class="validate">

# Relpace: <form name="edittag" id="edittag" method="post" action="edit-tags.php" class="validate"<?php do_action('categoery_edit_form_tag'); ?>>


Change History (6)

comment:1 @wonderboymusic2 years ago

  • Keywords needs-patch added

comment:2 @boonebgorges12 months ago

  • Keywords good-first-bug added
  • Milestone changed from Awaiting Review to Future Release

comment:3 @shaunmza12 months ago

Looks like this has been implemented already, ticket can be closed.

comment:4 @mdmcginn10 months ago

  • Keywords needs-testing added

Yes, do_action( "{$taxonomy}_term_edit_form_tag" ); was added in 3.7.0. Does that work?

comment:5 @neverything4 months ago

  • Resolution set to worksforme
  • Status changed from new to closed

Tested with the following code to add some output in 4.3-alpha-32280-src with the following code and it works as expected.

function _test_trac_20735_term_edit_form_tag_action() {
	echo ' enctype="multipart/form-data"';
add_action( 'category_term_edit_form_tag', '_test_trac_20735_term_edit_form_tag_action' );
add_action( 'post_tag_term_edit_form_tag', '_test_trac_20735_term_edit_form_tag_action' );

comment:6 @johnbillion4 months ago

  • Milestone Future Release deleted
  • Resolution changed from worksforme to duplicate
  • Type changed from feature request to enhancement

Duplicate of #15261.

Note: See TracTickets for help on using tickets.