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