add_action('save_post') priorities
-
I am trying to add some functionality and save some custom meta fields I have added to the TEC post type. I have add the following to my plugin code:
add_action( 'save_post', 'swsctp_save_tribe_data'); //Save Tribe Events Additional Meta-Data
The function executes, however, it does not execute in the order that I need. Some of the functions called within the
swsctp_save_tribe_data()
method needs the standard TEC meta data to already be saved.To try to change the order in which the actions are executed, I added the priority to the actions:
add_action( 'save_post', 'swsctp_save_tribe_data', 16); //Save Tribe Events Additional Meta-Data
I looked to see what actions were registered, and the highest priority that TEC uses on the
save_post
appears to be 15. When I set the priority to 16, the function never executes. If I set the priority lower than 15, it executes, but still can pull the TEC meta data.Is there another action that I can hook to that is built into TEC for saving post information that would execute following the meta data save?
Thanks in advance.
- The topic ‘add_action('save_post') priorities’ is closed to new replies.