layerslider.php 697 B

12345678910111213141516171819
  1. <?php
  2. if ( ! defined( 'ABSPATH' ) ) {
  3. die( '-1' );
  4. }
  5. /**
  6. * @since 4.4 vendors initialization moved to hooks in autoload/vendors.
  7. *
  8. * Used to initialize plugin layerslider vendor.
  9. */
  10. add_action( 'plugins_loaded', 'vc_init_vendor_layerslider' );
  11. function vc_init_vendor_layerslider() {
  12. include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); // Require class-vc-wxr-parser-plugin.php to use is_plugin_active() below
  13. if ( is_plugin_active( 'LayerSlider/layerslider.php' ) || class_exists( 'LS_Sliders' ) || defined( 'LS_ROOT_PATH' ) ) {
  14. require_once vc_path_dir( 'VENDORS_DIR', 'plugins/class-vc-vendor-layerslider.php' );
  15. $vendor = new Vc_Vendor_Layerslider();
  16. $vendor->load();
  17. }
  18. }