Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#38503 closed defect (bug) (invalid)

{$taxonomy}_term_new_form_tag is suspicious.

Reported by: princepink Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.7
Component: General Keywords:
Focuses: Cc:


In the code view (edit-tags.php), this action is written in the <form> opening tag itself like attributes, but not the content of the tag for human.
Is this really intended to?

395 <form id="addtag" method="post" action="edit-tags.php" class="validate"
396 <?php
397 /
398 * Fires at the beginning of the Add Tag form.
399 *
400 * The dynamic portion of the hook name, $taxonomy, refers to the taxonomy slug.
401 *
402 * @since 3.7.0
403 */
404 do_action( "{$taxonomy}_term_new_form_tag" );
405 ?>>

Change History (4)

#1 follow-up: @dd32
4 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Welcome to Trac @princepink!

Yes, it's intended that the action is fired within the Tag, as it's purpose is to add extra attributes to the <form> opening tag itself.

You should look into the {$taxonomy}_add_form_fields action if you'd like to add extra fields to the new term form.

Last edited 4 years ago by dd32 (previous) (diff)

#2 follow-up: @boonebgorges
4 years ago

Hi @princepink - Welcome to WordPress Trac, and thanks for the ticket!

I was about to say what @dd32 said above :) For more background, see #15261 [25034].

#3 in reply to: ↑ 1 @princepink
4 years ago

Thanks @dd32, for quick react.
I knew for adding content in that form with {$taxonomy}_add_form_fields.
I suspected that because of the description in Code Reference says

Fires at the beginning of the Add Tag form.

this sentence is not understandable rightly, I think.
At least, it doesn't explain about to add attributes.


#4 in reply to: ↑ 2 @princepink
4 years ago

@boonebgorges Thank you too!

Note: See TracTickets for help on using tickets.