It seems as though, with WordPress 3.0, the add_action function (in some cases) has become a little more strict. Tag Grouping has a call to save_post that worked perfectly in WordPress 2.9 and up but broke completely once WordPress 3.0 came out. After some research I found that you needed to pass in an array instead of just your function. The array I used consisted of a reference to the class containing the function I was going to use along with the function name, see below:
add_action ( ‘save_post’, Array(&$update, ‘update_group_posts’) );
Prior to WordPress 3.0 this same call looked like:
add_action ( ‘save_post’, ‘update_group_posts’ );
What I had to do in order to make this WordPress 3.0 compatible was wrap the functions I needed in a class. Instantiate that class inside the Main function of my plugin and then pass that instantiated name along with the function name to the save_post action.
Related posts: