alleyinteractive / alleyinteractive/wordpress-fieldmanager
Setup more flexible templates for groups, tabs, and repeatable fields
- 主要語言
- PHP
- 星號
- 563
- 分支
- 99
- PR 合併指標
- 30 天內沒有已合併 PR
描述
Logic and templates are too closely intertwined in a few places (e.g. [`Fieldmanager_Field::element_markup()`](https://github.com/alleyinteractive/wordpress-fieldmanager/blob/623340e9a2f8a51e6969423d9961c74207a34c3d/php/class-fieldmanager-field.php#L333-L427), [`Fieldmanager_Field:: single_element_markup()`](https://github.com/alleyinteractive/wordpress-fieldmanager/blob/623340e9a2f8a51e6969423d9961c74207a34c3d/php/class-fieldmanager-field.php#L429-L499) and [`Fieldmanager_Group::form_element()`](https://github.com/alleyinteractive/wordpress-fieldmanager/blob/623340e9a2f8a51e6969423d9961c74207a34c3d/php/class-fieldmanager-group.php#L112-L206)).
I propose that we move all the templating to `Fieldmanager_Context` and change these methods to return the data that they processed. This way, a context can more easily override the generated HTML to better suit the screen (e.g. term and user forms).
貢獻指南
評估
這個 Issue 還沒有評估資料。