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

Break up post settings into post_field settings #346

Description

@westonruter

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions