| @@ -20,8 +20,12 @@ | ||
| 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'; | |
| 24 | 28 | |
| 25 | 29 | /** |
| 26 | 30 | * Element types. |
| 27 | 31 | * |
| @@ -300,9 +304,9 @@ | ||
| 300 | 304 | 'basic' => [ |
| 301 | 305 | 'title' => esc_html__( 'Basic', 'elementor' ), |
| 302 | 306 | 'icon' => 'eicon-font', |
| 303 | 307 | ], |
| 304 | - 'pro-elements' => [ | |
| 308 | + self::CATEGORY_PRO_ELEMENTS => [ | |
| 305 | 309 | 'title' => esc_html__( 'Pro', 'elementor' ), |
| 306 | 310 | 'promotion' => [ |
| 307 | 311 | 'url' => esc_url( 'https://go.elementor.com/go-pro-section-pro-widget-panel/' ), |
| 308 | 312 | ], |
| @@ -382,9 +386,23 @@ | ||
| 382 | 386 | * @param Elements_Manager $this Elements manager instance. |
| 383 | 387 | */ |
| 384 | 388 | do_action( 'elementor/elements/categories_registered', $this ); |
| 385 | 389 | |
| 386 | - $this->promote_category_after( self::CATEGORY_ANGIE_WIDGETS, [ self::CATEGORY_ATOMIC_FORM, self::CATEGORY_ATOMIC_ELEMENTS ] ); | |
| 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 | + } | |
| 387 | 405 | |
| 388 | 406 | $this->categories['wordpress'] = [ |
| 389 | 407 | 'title' => esc_html__( 'WordPress', 'elementor' ), |
| 390 | 408 | 'icon' => 'eicon-wordpress', |