Sean Hayes on "[Plugin: The Events Calendar] 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.

https://wordpress.org/plugins/the-events-calendar/

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 68 تاريخ : يکشنبه 22 فروردين 1395 ساعت: 23:48