How to use conditional add_action for WordPress

just check inside the action ^^

add_action( 'vc_before_init', 'vc_master_home_slider' );

function vc_master_home_slider(){
  if(is_plugin_active('some-plugin.php'){
    //Do stuff.
  }
}

Leave a Comment