Safe way to use Tribe Functions Post date Home › Forums › Calendar Products › Events Calendar PRO › Safe way to use Tribe Functions This topic has 1 reply, 2 voices, and was last updated 10 years, 11 months ago by Brian. Viewing 2 posts - 1 through 2 (of 2 total) Author Posts May 7, 2015 at 6:39 am #961109 DAVEParticipant Hi guys, When we write functions within a conditional like below it is fine, if however we deactivate the plugin, how is best to safeguard against errors? if( tribe_is_upcoming() || tribe_is_past() || tribe_is_map() || tribe_is_photo() ) {} Thanks. May 7, 2015 at 11:14 am #961250 BrianMember Hi Again, I can help out here. You can wrap your coding in checks such as this for The Events Calendar: if ( class_exists( 'TribeEvents' ) ) { //enter coding here } and for Pro: if ( class_exists( 'TribeEventsPro' ) ) { //enter coding here } That will only run only if those classes are active. Please note in 3.10 those classes will change to to Tribe__Events__Main and Tribe__Events__Pro__Main Let me know if that works for you. Thanks Author Posts Viewing 2 posts - 1 through 2 (of 2 total) The topic ‘Safe way to use Tribe Functions’ is closed to new replies. → Please verify your API key is correctly entered on the settings