| @@ -2,13 +2,12 @@ | ||
| 2 | 2 | |
| 3 | 3 | namespace Elementor\Core\Admin\Menu; |
| 4 | 4 | |
| 5 | 5 | use Elementor\Core\Admin\Menu\Interfaces\Admin_Menu_Item; |
| 6 | -use Elementor\Core\Admin\Menu\Interfaces\Admin_Menu_Item_Has_Position; | |
| 7 | 6 | use Elementor\Core\Admin\Menu\Interfaces\Admin_Menu_Item_With_Page; |
| 8 | 7 | |
| 9 | 8 | if ( ! defined( 'ABSPATH' ) ) { |
| 10 | - exit; // Exit if accessed directly. | |
| 9 | + exit; // Exit if accessed directly | |
| 11 | 10 | } |
| 12 | 11 | |
| 13 | 12 | class Admin_Menu_Manager { |
| 14 | 13 | |
| @@ -66,13 +65,11 @@ | ||
| 66 | 65 | } |
| 67 | 66 | |
| 68 | 67 | private function register_top_level_menu( $item_slug, Admin_Menu_Item $item ) { |
| 69 | 68 | $has_page = ( $item instanceof Admin_Menu_Item_With_Page ); |
| 70 | - $has_position = ( $item instanceof Admin_Menu_Item_Has_Position ); | |
| 71 | 69 | |
| 72 | 70 | $page_title = $has_page ? $item->get_page_title() : ''; |
| 73 | 71 | $callback = $has_page ? [ $item, 'render' ] : ''; |
| 74 | - $position = $has_position ? $item->get_position() : null; | |
| 75 | 72 | |
| 76 | 73 | return add_menu_page( |
| 77 | 74 | $page_title, |
| 78 | 75 | $item->get_label(), |
| @@ -77,11 +74,9 @@ | ||
| 77 | 74 | $page_title, |
| 78 | 75 | $item->get_label(), |
| 79 | 76 | $item->get_capability(), |
| 80 | 77 | $item_slug, |
| 81 | - $callback, | |
| 82 | - '', | |
| 83 | - $position | |
| 78 | + $callback | |
| 84 | 79 | ); |
| 85 | 80 | } |
| 86 | 81 | |
| 87 | 82 | private function register_sub_menu( $item_slug, Admin_Menu_Item $item ) { |