| 1 |
<?php |
| 2 |
defined( 'ABSPATH' ) || exit; |
| 3 |
|
| 4 |
add_filter('ultp_addons_config', 'ultp_elementor_config'); |
| 5 |
function ultp_elementor_config( $config ) { |
| 6 |
$configuration = array( |
| 7 |
'name' => __( 'Elementor', 'ultimate-post' ), |
| 8 |
'desc' => __( 'It lets you use PostX’s Gutenberg blocks in the Elementor Builder by using the Saved Template Addon.', 'ultimate-post' ), |
| 9 |
'img' => ULTP_URL.'/assets/img/addons/elementor-icon.svg', |
| 10 |
'is_pro' => false, |
| 11 |
'live' => 'https://www.wpxpo.com/postx/addons/elementor/live_demo_args', |
| 12 |
'docs' => 'https://wpxpo.com/docs/postx/add-on/elementor-addon/', |
| 13 |
'video' => 'https://www.youtube.com/watch?v=GJEa2_Tow58', |
| 14 |
'position' => 20, |
| 15 |
'integration' => true |
| 16 |
); |
| 17 |
$arr['ultp_elementor'] = $configuration; |
| 18 |
return $arr + $config; |
| 19 |
} |
| 20 |
|
| 21 |
add_action('plugins_loaded', 'ultp_elementor_init'); |
| 22 |
function ultp_elementor_init() { |
| 23 |
$settings = ultimate_post()->get_setting('ultp_elementor'); |
| 24 |
if ($settings == 'true') { |
| 25 |
if (did_action( 'elementor/loaded' )) { |
| 26 |
require_once ULTP_PATH.'/addons/elementor/Elementor.php'; |
| 27 |
Elementor_ULTP_Extension::instance(); |
| 28 |
} |
| 29 |
} |
| 30 |
} |