← All changes
|
modules/editor-one/classes/menu-data-provider.php
+2
-25
4.2.1
→
3.35.0-dev2
View file →
| @@ -5,9 +5,8 @@ | ||
| 5 | 5 | use Elementor\Core\Admin\EditorOneMenu\Interfaces\Menu_Item_Interface; |
| 6 | 6 | use Elementor\Core\Admin\EditorOneMenu\Interfaces\Menu_Item_Third_Level_Interface; |
| 7 | 7 | use Elementor\Core\Admin\EditorOneMenu\Interfaces\Menu_Item_With_Custom_Url_Interface; |
| 8 | 8 | use Elementor\Plugin; |
| 9 | -use Elementor\Utils; | |
| 10 | 9 | |
| 11 | 10 | if ( ! defined( 'ABSPATH' ) ) { |
| 12 | 11 | exit; |
| 13 | 12 | } |
| @@ -292,29 +291,11 @@ | ||
| 292 | 291 | return $this->build_flyout_items( false ); |
| 293 | 292 | } |
| 294 | 293 | |
| 295 | 294 | private function build_flyout_items_with_expanded_third_party(): array { |
| 296 | - $items = $this->build_flyout_items( true ); | |
| 297 | - | |
| 298 | - if ( ! Utils::has_pro() ) { | |
| 299 | - $items[] = $this->build_theme_builder_flyout_item(); | |
| 300 | - } | |
| 301 | - | |
| 302 | - return $items; | |
| 295 | + return $this->build_flyout_items( true ); | |
| 303 | 296 | } |
| 304 | 297 | |
| 305 | - private function build_theme_builder_flyout_item(): array { | |
| 306 | - return [ | |
| 307 | - 'slug' => 'elementor-theme-builder', | |
| 308 | - 'label' => esc_html__( 'Theme Builder', 'elementor' ), | |
| 309 | - 'url' => $this->get_theme_builder_url(), | |
| 310 | - 'icon' => 'theme-builder', | |
| 311 | - 'group_id' => '', | |
| 312 | - 'priority' => 50, | |
| 313 | - 'has_divider_before' => false, | |
| 314 | - ]; | |
| 315 | - } | |
| 316 | - | |
| 317 | 298 | private function build_flyout_items( bool $expand_third_party ): array { |
| 318 | 299 | $items = []; |
| 319 | 300 | $existing_slugs = []; |
| 320 | 301 | $excluded_slugs = Menu_Config::get_excluded_level3_slugs(); |
| @@ -553,13 +534,9 @@ | ||
| 553 | 534 | } ); |
| 554 | 535 | } |
| 555 | 536 | |
| 556 | 537 | private function title_case( string $text ): string { |
| 557 | - if ( function_exists( 'mb_convert_case' ) ) { | |
| 558 | - return mb_convert_case( $text, MB_CASE_TITLE, 'UTF-8' ); | |
| 559 | - } | |
| 560 | - | |
| 561 | - return ucwords( strtolower( $text ) ); | |
| 538 | + return mb_convert_case( $text, MB_CASE_TITLE, 'UTF-8' ); | |
| 562 | 539 | } |
| 563 | 540 | |
| 564 | 541 | private function invalidate_cache(): void { |
| 565 | 542 | $this->cached_level3_sidebar_data = null; |