| 1 |
<?php |
| 2 |
/** |
| 3 |
* WP Bakery Integration |
| 4 |
* |
| 5 |
* @package wp-commerce7 |
| 6 |
*/ |
| 7 |
|
| 8 |
if ( ! defined( 'ABSPATH' ) ) { |
| 9 |
return; |
| 10 |
} |
| 11 |
|
| 12 |
if ( ! function_exists( 'vc_map' ) ) { |
| 13 |
return; |
| 14 |
} |
| 15 |
|
| 16 |
require_once C7WP_ROOT . '/includes/wpbakery/class-c7wp-wpbakery.php'; |
| 17 |
C7WP_Widgets::register_clubselector_assets( C7WP::getInstance() ); |
| 18 |
C7WP_Widgets::register_clubselector_v2_assets( C7WP::getInstance() ); |
| 19 |
|
| 20 |
add_action( 'admin_enqueue_scripts', array( 'C7WP_WPBakery', 'enqueue_assets' ) ); |
| 21 |
add_action( 'vc_backend_editor_enqueue_js_css', array( 'C7WP_WPBakery', 'enqueue_assets' ) ); |
| 22 |
add_action( 'vc_frontend_editor_enqueue_js_css', array( 'C7WP_WPBakery', 'enqueue_assets' ) ); |
| 23 |
|
| 24 |
require_once C7WP_ROOT . '/includes/wpbakery/wpbakery-legacy.php'; |
| 25 |
|
| 26 |
$elements = C7WP_Widgets::get_slugs_for_version( $this->widgetsver, 'wpbakery' ); |
| 27 |
|
| 28 |
foreach ( $elements as $element ) { |
| 29 |
require_once C7WP_ROOT . '/includes/wpbakery/wpbakery-' . $element . '.php'; |
| 30 |
} |
| 31 |
|