Open afercia opened 7 years ago
@afercia I completely agree, and there are more areas that are similar across all of these functions.
I think we should eventually create a base class and then individual classes for each field type. This would provide a much better and more reusable codebase, and would also allow us to set a proper visibility for utility methods such as what you're proposing.
I'd like to leave the code as is for now and not outsource such parts, so that we can focus on the markup/CSS/a11y challenges. Code quality can come after we know what exactly we wanna do and how we wanna do it. :)
Sure, this is a general consideration and not an immediate priority 🙂
The field description output does basically always the same thing and could be abstracted in a method. If I'm not wrong, it currently does a slightly different thing only in the case of
render_settings_field_radio()
andrender_settings_field_multibox()
.