#38104 closed defect (bug) (fixed)
form html tag is not properly closed, using {$taxonomy}_term_new_form_tag causes incorrect html output
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.7 | Priority: | normal |
Severity: | normal | Version: | 3.7 |
Component: | Taxonomy | Keywords: | |
Focuses: | Cc: |
Description
As you can see in edit-tags.php the html form tag is not properly closed:
<form id="addtag" method="post" action="edit-tags.php" class="validate" <?php /** * Fires at the beginning of the Add Tag form. * * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug. * * @since 3.7.0 */ do_action( "{$taxonomy}_term_new_form_tag" ); ?>>
This causes incorrect html output when using the {$taxonomy}_term_new_form_tag action.
Attachments (2)
Change History (11)
This ticket was mentioned in Slack in #core by bjornw. View the logs.
7 years ago
#3
follow-up:
↓ 4
@
7 years ago
This action is intended to be fired within the <form>
tag to allow developers to add element attributes, eg the form encoding. See #15261.
#4
in reply to:
↑ 3
@
7 years ago
Hi @ericlewis,
Thanks for clearing this up, although I find this approach a bit strange. At least the action name should indicate that it is intended to be for adding additional attributes. I'd expect the current name to be used for adding new form fields above the default ones. I've added a new patch which makes the use of the action a bit clearer.
Replying to ericlewis:
This action is intended to be fired within the
<form>
tag to allow developers to add element attributes, eg the form encoding. See #15261.
Patch which properly closes the form tag