You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.
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.
The text was updated successfully, but these errors were encountered:
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 aWP_Customize_Post_Field_Setting
class.The text was updated successfully, but these errors were encountered: