| @@ -4,8 +4,9 @@ | ||
| 4 | 4 | use Elementor\Core\Base\App as BaseApp; |
| 5 | 5 | use Elementor\Core\Settings\Manager as SettingsManager; |
| 6 | 6 | use Elementor\Plugin; |
| 7 | 7 | use Elementor\TemplateLibrary\Source_Local; |
| 8 | +use Elementor\Utils; | |
| 8 | 9 | |
| 9 | 10 | if ( ! defined( 'ABSPATH' ) ) { |
| 10 | 11 | exit; // Exit if accessed directly. |
| 11 | 12 | } |
| @@ -89,8 +90,9 @@ | ||
| 89 | 90 | return [ |
| 90 | 91 | 'menu_url' => $this->get_base_url() . '#site-editor/promotion', |
| 91 | 92 | 'assets_url' => ELEMENTOR_ASSETS_URL, |
| 92 | 93 | 'return_url' => isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : admin_url(), |
| 94 | + 'hasPro' => Utils::has_pro(), | |
| 93 | 95 | ]; |
| 94 | 96 | } |
| 95 | 97 | |
| 96 | 98 | private function render() { |
| @@ -153,12 +155,20 @@ | ||
| 153 | 155 | [], |
| 154 | 156 | ELEMENTOR_VERSION |
| 155 | 157 | ); |
| 156 | 158 | |
| 159 | + wp_register_style( | |
| 160 | + 'select2', | |
| 161 | + ELEMENTOR_ASSETS_URL . 'lib/e-select2/css/e-select2.css', | |
| 162 | + [], | |
| 163 | + '4.0.6-rc.1' | |
| 164 | + ); | |
| 165 | + | |
| 157 | 166 | wp_enqueue_style( |
| 158 | 167 | 'elementor-app', |
| 159 | 168 | $this->get_css_assets_url( 'app', null, 'default', true ), |
| 160 | 169 | [ |
| 170 | + 'select2', | |
| 161 | 171 | 'elementor-icons', |
| 162 | 172 | 'elementor-common', |
| 163 | 173 | 'select2', |
| 164 | 174 | ], |
| @@ -222,8 +232,12 @@ | ||
| 222 | 232 | } |
| 223 | 233 | |
| 224 | 234 | public function __construct() { |
| 225 | 235 | $this->add_component( 'site-editor', new Modules\SiteEditor\Module() ); |
| 236 | + | |
| 237 | + if ( current_user_can( 'manage_options' ) && Plugin::$instance->experiments->is_feature_active( 'e_import_export' ) ) { | |
| 238 | + $this->add_component( 'import-export', new Modules\ImportExport\Module() ); | |
| 239 | + } | |
| 226 | 240 | |
| 227 | 241 | add_action( 'admin_menu', [ $this, 'register_admin_menu' ], 21 /* after Elementor page */ ); |
| 228 | 242 | |
| 229 | 243 | // Happens after WP plugin page validation. |