Automatically Select Parent Category Plugin for wordpress

Hello all,

I’m trying to get this plugin to hook into “The Events Calendar”. They pointed me to their hook to save events

tribe_aggregator_before_save_event

I’m importing events from google calendar and what I need is for their plugin to select the parent category when creating the new event. I tried simply hooking into the plugin I downloaded that does seem to do this when you select the events’ categories but it breaks the import functionality when I try to use the hook. Any ideas? Is there an easier way of doing this? Could you all suggest PHP that could accomplish this? I’m a PHP noob so don’t expect me to know anything about this.

Here is the code from the plugin

function super_category_toggler() {

$taxonomies = apply_filters(‘super_category_toggler’,array());
for($x=0;$x<count($taxonomies);$x++)
{
$taxonomies[$x] = ‘#’.$taxonomies[$x].‘div .selectit input’;
}
$selector = implode(’,’,$taxonomies);
if($selector == ‘’) $selector = ‘.selectit input’;

echo ’

';

}
add_action(‘admin_footer-post.php’, ‘super_category_toggler’);
add_action(‘admin_footer-post-new.php’, ‘super_category_toggler’);
?>

Thank you for your help!

Sponsor our Newsletter | Privacy Policy | Terms of Service