| @@ -20,12 +20,8 @@ | ||
| 20 | 20 | const CATEGORY_ATOMIC_ELEMENTS = 'v4-elements'; |
| 21 | 21 | const CATEGORY_ATOMIC_FORM = 'atomic-form'; |
| 22 | 22 | const CATEGORY_FAVORITES = 'favorites'; |
| 23 | 23 | const CATEGORY_ANGIE_WIDGETS = 'angie-widgets'; |
| 24 | - const CATEGORY_CUSTOM_WIDGETS = 'custom-widgets'; | |
| 25 | - const CATEGORY_BASIC = 'basic'; | |
| 26 | - const CATEGORY_PRO_ELEMENTS = 'pro-elements'; | |
| 27 | - const CATEGORY_WORDPRESS = 'wordpress'; | |
| 28 | 24 | |
| 29 | 25 | /** |
| 30 | 26 | * Element types. |
| 31 | 27 | * |
| @@ -304,9 +300,9 @@ | ||
| 304 | 300 | 'basic' => [ |
| 305 | 301 | 'title' => esc_html__( 'Basic', 'elementor' ), |
| 306 | 302 | 'icon' => 'eicon-font', |
| 307 | 303 | ], |
| 308 | - self::CATEGORY_PRO_ELEMENTS => [ | |
| 304 | + 'pro-elements' => [ | |
| 309 | 305 | 'title' => esc_html__( 'Pro', 'elementor' ), |
| 310 | 306 | 'promotion' => [ |
| 311 | 307 | 'url' => esc_url( 'https://go.elementor.com/go-pro-section-pro-widget-panel/' ), |
| 312 | 308 | ], |
| @@ -338,24 +334,14 @@ | ||
| 338 | 334 | ], |
| 339 | 335 | ], |
| 340 | 336 | ]; |
| 341 | 337 | |
| 342 | - if ( Plugin::$instance->experiments->is_feature_active( 'e_atomic_elements' ) ) { | |
| 338 | + if ( Utils::has_pro() && Plugin::$instance->experiments->is_feature_active( 'e_pro_atomic_form' ) ) { | |
| 343 | 339 | $atomic_form_category = [ |
| 344 | 340 | 'title' => esc_html__( 'Atomic Form', 'elementor' ), |
| 341 | + 'hideIfEmpty' => true, | |
| 345 | 342 | ]; |
| 346 | 343 | |
| 347 | - if ( Utils::has_pro() && Plugin::$instance->experiments->is_feature_active( 'e_pro_atomic_form' ) ) { | |
| 348 | - $atomic_form_category['hideIfEmpty'] = true; | |
| 349 | - } elseif ( ! Utils::has_pro() ) { | |
| 350 | - $atomic_form_category['hideIfEmpty'] = false; | |
| 351 | - $atomic_form_category['promotion'] = [ | |
| 352 | - 'url' => esc_url( 'https://go.elementor.com/go-pro-atomic-form-section/' ), | |
| 353 | - ]; | |
| 354 | - } else { | |
| 355 | - $atomic_form_category['hideIfEmpty'] = true; | |
| 356 | - } | |
| 357 | - | |
| 358 | 344 | $this->categories = array_merge( |
| 359 | 345 | [ self::CATEGORY_ATOMIC_ELEMENTS => $this->categories[ self::CATEGORY_ATOMIC_ELEMENTS ] ], |
| 360 | 346 | [ self::CATEGORY_ATOMIC_FORM => $atomic_form_category ], |
| 361 | 347 | array_diff_key( $this->categories, [ self::CATEGORY_ATOMIC_ELEMENTS => true ] ) |
| @@ -386,23 +372,9 @@ | ||
| 386 | 372 | * @param Elements_Manager $this Elements manager instance. |
| 387 | 373 | */ |
| 388 | 374 | do_action( 'elementor/elements/categories_registered', $this ); |
| 389 | 375 | |
| 390 | - $after_candidates = Plugin::$instance->experiments->is_feature_active( 'e_atomic_elements' ) | |
| 391 | - ? [ self::CATEGORY_ATOMIC_FORM, self::CATEGORY_ATOMIC_ELEMENTS ] | |
| 392 | - : [ self::CATEGORY_BASIC ]; | |
| 393 | - | |
| 394 | - $this->promote_category_after( self::CATEGORY_ANGIE_WIDGETS, $after_candidates ); | |
| 395 | - $this->promote_category_after( self::CATEGORY_CUSTOM_WIDGETS, $after_candidates ); | |
| 396 | - | |
| 397 | - if ( ! Utils::has_pro() && Plugin::$instance->experiments->is_feature_active( 'e_atomic_elements' ) ) { | |
| 398 | - $this->promote_category_after( self::CATEGORY_PRO_ELEMENTS, [ | |
| 399 | - self::CATEGORY_CUSTOM_WIDGETS, | |
| 400 | - self::CATEGORY_ANGIE_WIDGETS, | |
| 401 | - self::CATEGORY_ATOMIC_FORM, | |
| 402 | - self::CATEGORY_ATOMIC_ELEMENTS, | |
| 403 | - ] ); | |
| 404 | - } | |
| 376 | + $this->promote_category_after( self::CATEGORY_ANGIE_WIDGETS, [ self::CATEGORY_ATOMIC_FORM, self::CATEGORY_ATOMIC_ELEMENTS ] ); | |
| 405 | 377 | |
| 406 | 378 | $this->categories['wordpress'] = [ |
| 407 | 379 | 'title' => esc_html__( 'WordPress', 'elementor' ), |
| 408 | 380 | 'icon' => 'eicon-wordpress', |