Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#34770 closed feature request (wontfix)

Add ability to put term meta UX/UI anywhere on term edit screen

Reported by: themiked's profile theMikeD Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.4
Component: Taxonomy Keywords:
Focuses: ui, administration Cc:


Now that we have term meta it'd be great to be able to put a UX/UI element anywhere on the page. By way of example, under "Name" would be a great spot for "Plural name."

Browsing through edit-tag-form.php I see only the {$taxonomy}_edit_form_fields action as a way to add items to the tag edit screen. This limits us to putting term meta stuff at the end only, which is what I'm addressing with this ticket.

I see two solutions. Either add do_action calls after each stock form row, or put the form into an array instead of showing the HTML directly and filter the array at the end. The second option is probably better.


Change History (1)

#1 @boonebgorges
8 years ago

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

A better option still would be to build this page using the Settings API. Then plugins could do whatever they wanted with it. However, that's a big job, and I suppose we may completely rebuild wp-admin before it would ever happen.

A slightly (very slightly) smaller task would be metabox support on edit-tag-form.php.

In the meantime, I'm very wary of adding a bunch of new action hooks that we'll have to maintain for the rest of eternity. As you note, {$taxonomy}_edit_form_fields already exists. We also have {$taxonomy}_edit_form, which is outside of the table element. Furthermore, in #35252 I think we'll be adding term_edit_form_top, which will appear just after the header. If you want elements to appear somewhere else, you can add them at one of these actions, and move them around with JavaScript.

And the proposal that we build the page using an array of fields is interesting. But (a) we don't do this anywhere else in wp-admin; (b) passing arrays full of markup to filters is going to be a backward compatibility nightmare; and (c) this is basically what the Settings API does, so why not use that? :)

If one of the larger projects described above sounds fun to anyone, I'd suggest a new ticket for it. As for the current ticket, I am going to close it as wontfix (with a somewhat heavy heart).

Note: See TracTickets for help on using tickets.