Help with creating meta data plugin
-
Hi. I’m trying to understand how functions are called from a plugin and I’m a bit of a newbie (sorry).
I’m trying to create a plugin that will allow users to associate posts from a particular category with a post they’re editing. I’m doing this with custom field by storing the id of the associated post as a meta value.
I have several php functions to check and list appropriate meta data all called by a ‘master’ function, jm_insert_fields.
I can’t put the other functions in the add_action because they should only be executed by a call from jm_insert_fields but if I while they just sit in my plugin file they’re not being executed at all. If I put them in edit_form_advanced.php directly they’re executed happily but I really want to keep my code separate.
How do I get these functions to execute?
If it helps, here’s an outline of the code in my plugin file:
`add_action( ‘edit_form_advanced’, ‘jm_insert_gensurgeon_fields’ );
- The topic ‘Help with creating meta data plugin’ is closed to new replies.