sc0ttkclark / wordpress-fields-api

The 2024 Fields API proposal for WordPress Core
https://make.wordpress.org/core/tag/fields-api/
361 stars 42 forks source link

initial attempt at nav_menu_item implementation #41

Closed lucyllewy closed 8 years ago

lucyllewy commented 8 years ago

This doesn't touch the wp-customize code! I also have no idea whether it actually works :-p ref: #34

sc0ttkclark commented 8 years ago

Oh wow, you put this together pretty quickly! Any notes you'd like to give me on your experience with working with the Fields API as you were building this? Any things that could be better for you or confusion with naming of things?

lucyllewy commented 8 years ago

the only thing that comes to mind as something that might be able to be improved is that I had to write a save routine which was almost a complete carbon-copy of the same function from the user profile class. I think if it's likely to be the same for every other implementation then it might be better to abstract that so that saving is handled by a central function which is wired-up automatically when the fields are displayed. This function would need to either be replaceable per screen or have ample hooks in-place to customise its behaviour, but I do think there's mileage in moving it out of each implementation's remit by default.

sc0ttkclark commented 8 years ago

Related: #34

sc0ttkclark commented 8 years ago

Going to close this one due to the problems with including it in WP core (too many fields on a page), we can open a new PR for this if a solution gets figured out.

Otherwise, I'd say let's focus only on the Customizer Menu editor side of this.

sc0ttkclark commented 8 years ago

Looks like they solved it in core https://core.trac.wordpress.org/changeset/36510

sc0ttkclark commented 8 years ago

Closing in favor of #68