1 | | In 18179.php, I've added a register_meta() method to WP_Meta_Box, which can be called for any meta field associated with the meta box, and will store it in an instance array variable. I've created an optional array of arguments, one of them which is "default_display," which defaults to true. This will output a standard form field for the meta entry, and can be easily overridden by setting this option to false, and implementing your own form field rendering. I devved out just a basic text field for now, as I'm not sure how we want to build custom HTML elements and how much control should be in the API. I was thinking an array parameter 'attrs' which would build the attributes for the form field element. |
| 1 | In 18179.php, I've added a register_meta() method to WP_Meta_Box, which can be called for any meta field associated with the meta box, and will store it in an instance array variable for displaying, saving, and sanitization/auth callbacks. I've created an optional array of arguments, one of them which is "default_display," which defaults to true. This will output a standard form field for the meta entry, and can be easily overridden by setting this option to false, and implementing your own form field rendering. I devved out just a basic text field for now, as I'm not sure how we want to build custom HTML elements and how much control should be in the API. I was thinking an array parameter 'attrs' which would build the attributes for the form field element. |