I’m currently working on a wordpress 2.9.2 plugin (my first) that creates additional custom fields that will later be read from the template. The plugin adds an additional meta box to the “Edit Post” screen which is responsible for manipulating these values.
My problem is that the custom fields generated by the plugin also show up in the “Custom Fields” box. Ideally I would like for the custom fields generated by the plugin to be managed separately from any other custom fields for that same post/page.
Is there a way that I can filter fields specific to my plugin to prevent them from being displayed in the “Custom Fields” box? I have yet to locate any action or filter that will let me capture and manipulate those values before they are rendered on “Edit Post”.
Additionally, if you prefix your custom fields with and underscore “_” it will be hidden from the custom fields section.
Also, check out my WPalchemy Meta Box PHP Class which will help you create meta boxes with ease.
If you take a look inside the function
_list_meta_row()
(around line 2500 inwp-admin/includes/template.php
), you’ll see it skips post meta that is a serialized array or object.So, if you can see fit to store your plugin post meta as an array or object, it shouldn’t show in the Custom Fields box.