I am creating a WP plugin based around Custom Post Types (CPT), where you can dynamically specify a CPT, complete with any number of associated dynamic Meta Boxes and form elements such as radio buttons, textfields etc.., using the excellent Meta Box Script V3.1 from RilWis.
The issue I am having is that I need to recover the post ID of a CPT "post" in WP-admin before I issue the
add_action hook command to build the dynamic Meta Boxes.
It appears that WP only starts allowing the recovery of the post ID (in admin) from the
parse_query action hook command onwards in the firing sequence of WP. However the Meta Box script by Rilwis has a
save_post action command (naturally), which only triggers up until the
admin_init action hook.
This means there is no overlap in the WP admin firing sequence to allow the postID to be recovered (to find the data required to build further CPT's dynamically) before the call to build them is needed.
Short of abandoning Rilwis WP Meta Box class, and developing a Meta Box data save functionality of our own (or my lack of WP understanding), can anyone give me some thoughts on how I can recover the post ID earlier in the WP admin hook firing sequence? Or conversely whether we can trigger an action to save the Meta Box post data later in the WP firing sequence?