Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Break up post settings into post_field settings #346

Open
westonruter opened this issue Feb 10, 2017 · 0 comments
Open

Break up post settings into post_field settings #346

westonruter opened this issue Feb 10, 2017 · 0 comments
Labels

Comments

@westonruter
Copy link
Contributor

Currently posts are modeled by WP_Customize_Post_Setting in a similar way to how nav menu items are modeled: all of the fields are stored in an object value. This has some advantages, especially in regard to handling saves, but it makes it a lot harder to work with in terms of re-using existing controls which expect settings with scalar values and routing notifications to specific controls, including for conflict resolution.

Splitting up the post into multiple settings has been implemented in the Customize Featured Content demo plugin, and overall it felt much less hacky. I think we should consider refactoring to do the same in Customize Posts, refactoring WP_Customize_Post into a WP_Customize_Post_Field_Setting class.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant