| @@ -26,9 +26,9 @@ | ||
| 26 | 26 | * @var string |
| 27 | 27 | */ |
| 28 | 28 | static $parent_menu_hook = ''; |
| 29 | 29 | |
| 30 | - // private $menu_link_part; | |
| 30 | + //private $menu_link_part; | |
| 31 | 31 | |
| 32 | 32 | use SingletonTrait; |
| 33 | 33 | |
| 34 | 34 | public function __construct() { |
| @@ -93,18 +93,12 @@ | ||
| 93 | 93 | self::MENU_CAPABILITY, |
| 94 | 94 | 'rtsb-get-help', |
| 95 | 95 | [ $this, 'get_help_page' ], |
| 96 | 96 | ); |
| 97 | - add_submenu_page( | |
| 98 | - self::MENU_PAGE_SLUG, | |
| 99 | - esc_html__( 'Themes', 'shopbuilder' ), | |
| 100 | - esc_html__( 'Themes', 'shopbuilder' ), | |
| 101 | - self::MENU_CAPABILITY, | |
| 102 | - 'rtsb-themes', | |
| 103 | - [ $this, 'get_themes_page' ], | |
| 104 | - ); | |
| 105 | - do_action( 'rtsb/add/more/submenu', self::MENU_PAGE_SLUG, self::MENU_CAPABILITY ); | |
| 97 | + do_action( 'rtsb/add/more/submenu', self::MENU_PAGE_SLUG, self::MENU_CAPABILITY ); | |
| 106 | 98 | |
| 99 | + | |
| 100 | + | |
| 107 | 101 | // Remove Parent Submenu |
| 108 | 102 | remove_submenu_page( self::MENU_PAGE_SLUG, self::MENU_PAGE_SLUG ); |
| 109 | 103 | } |
| 110 | 104 | |
| @@ -114,11 +108,11 @@ | ||
| 114 | 108 | |
| 115 | 109 | |
| 116 | 110 | public function settings_page() { |
| 117 | 111 | ?> |
| 118 | - <div class="wrap rtsb-admin-wrap"> | |
| 119 | - <div id="rtsb-admin-app"></div> | |
| 120 | - </div> | |
| 112 | + <div class="wrap rtsb-admin-wrap"> | |
| 113 | + <div id="rtsb-admin-app"></div> | |
| 114 | + </div> | |
| 121 | 115 | <?php |
| 122 | 116 | } |
| 123 | 117 | |
| 124 | 118 | public function get_help_page() { |
| @@ -124,12 +118,8 @@ | ||
| 124 | 118 | public function get_help_page() { |
| 125 | 119 | Fns::renderView( 'help' ); |
| 126 | 120 | } |
| 127 | 121 | |
| 128 | - public function get_themes_page() { | |
| 129 | - Fns::renderView( 'themes' ); | |
| 130 | - } | |
| 131 | - | |
| 132 | 122 | /** |
| 133 | 123 | * Remove admin notices |
| 134 | 124 | */ |
| 135 | 125 | public function remove_all_notices() { |
| @@ -136,14 +126,9 @@ | ||
| 136 | 126 | add_action( |
| 137 | 127 | 'in_admin_header', |
| 138 | 128 | function () { |
| 139 | 129 | $screen = get_current_screen(); |
| 140 | - | |
| 141 | - if ( in_array( | |
| 142 | - $screen->base, | |
| 143 | - [ 'shopbuilder_page_rtsb-settings', 'shopbuilder_page_rtsb-license', 'shopbuilder_page_rtsb-themes' ], | |
| 144 | - true | |
| 145 | - ) ) { | |
| 130 | + if ( in_array( $screen->base, [ 'shopbuilder_page_rtsb-settings', 'shopbuilder_page_rtsb-license' ]) ) { | |
| 146 | 131 | remove_all_actions( 'admin_notices' ); |
| 147 | 132 | remove_all_actions( 'all_admin_notices' ); |
| 148 | 133 | } |
| 149 | 134 | }, |
| @@ -149,5 +134,6 @@ | ||
| 149 | 134 | }, |
| 150 | 135 | 1000 |
| 151 | 136 | ); |
| 152 | 137 | } |
| 138 | + | |
| 153 | 139 | } |