gazelle

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: Remove All Pro Widgets #972633
    gazelle
    Participant

    Sorry, I had it correct in my code but just copied it from my previous comment incorrectly. Got it to work by matching the priority on the remove action exactly as how tribe is adding it (100)

    
    add_action('widgets_init', array('theEventsCalendarYcCleanup', 'removeTribeEventsProWidgets'));
    
        class theEventsCalendarYcCleanup
        {
    
            static public function removeTribeEventsProWidgets()
            {
                if(class_exists('Tribe__Events__Pro__Main'))
                {
                    remove_action('widgets_init', array(Tribe__Events__Pro__Main::instance(), 'pro_widgets_init'), 100);
                }
            }
        }
    

    I have more functions within my class “theEventsCalendarYcCleanup” but only posted the relevant function.

    Thanks!

Viewing 1 post (of 1 total)