jtsternberg / Taxonomy_MetaData

WordPress Helper Class for saving pseudo-metadata for taxonomy terms
54 stars 10 forks source link

Disable metabox on "Add Term" screen. #19

Open billerickson opened 9 years ago

billerickson commented 9 years ago

Right now, if you register a metabox for a taxonomy, it appears both on the Edit Term screen and the Add Term screen. If there's a lot of fields (especially optional ones that won't be filled in most of the time), it clutters the Add Term screen and pushes down the Add New Term button.

Would it be possible to add a filter, or some other method to disable it from the Add Term screen? I'll do a quick pull request to illustrate how I'd do it.

billerickson commented 9 years ago

See: https://github.com/jtsternberg/Taxonomy_MetaData/pull/20

jtsternberg commented 9 years ago

Yes, that is a sane request. I think it's worth deliberation what is a better default.. to have the fields in the add-new area, or not? Re: filter, seems it would make sense for the filter to take an array of field ids (which would be what is shown).

billerickson commented 9 years ago

I think disabling by default is a better UX. Most other plugins that add taxonomy metadata ( like WordPress SEO) save it for the edit screen. And if you have a field you really want displayed, you can use the filter to get it back.

My only hesitation is it changes the default behavior, but since this isn't a publicly released plugin (clients won't click "Update" and have the functionality change) I don't think it's a big issue.

With regards to the field IDs, that sounds great to provide a more granular control over what is/isn't displayed.