| @@ -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() { |
| @@ -57,10 +57,10 @@ | ||
| 57 | 57 | * @return void |
| 58 | 58 | */ |
| 59 | 59 | public function upgrade() { |
| 60 | 60 | Notice\Upgrade::instance(); |
| 61 | + Notice\BFDiscount::instance(); | |
| 61 | 62 | Notice\Review::instance(); |
| 62 | - Notice\EarlyBirdDiscount::instance(); | |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | public function init() { |
| 66 | 66 | add_action( 'admin_menu', [ $this, 'add_menu' ], 25 ); |
| @@ -93,12 +93,18 @@ | ||
| 93 | 93 | self::MENU_CAPABILITY, |
| 94 | 94 | 'rtsb-get-help', |
| 95 | 95 | [ $this, 'get_help_page' ], |
| 96 | 96 | ); |
| 97 | - do_action( 'rtsb/add/more/submenu', self::MENU_PAGE_SLUG, self::MENU_CAPABILITY ); | |
| 97 | + add_submenu_page( | |
| 98 | + self::MENU_PAGE_SLUG, | |
| 99 | + esc_html__( 'Themes & Apps', 'shopbuilder' ), | |
| 100 | + esc_html__( 'Themes & Apps', '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 ); | |
| 98 | 106 | |
| 99 | - | |
| 100 | - | |
| 101 | 107 | // Remove Parent Submenu |
| 102 | 108 | remove_submenu_page( self::MENU_PAGE_SLUG, self::MENU_PAGE_SLUG ); |
| 103 | 109 | } |
| 104 | 110 | |
| @@ -108,11 +114,11 @@ | ||
| 108 | 114 | |
| 109 | 115 | |
| 110 | 116 | public function settings_page() { |
| 111 | 117 | ?> |
| 112 | - <div class="wrap rtsb-admin-wrap"> | |
| 113 | - <div id="rtsb-admin-app"></div> | |
| 114 | - </div> | |
| 118 | + <div class="wrap rtsb-admin-wrap"> | |
| 119 | + <div id="rtsb-admin-app"></div> | |
| 120 | + </div> | |
| 115 | 121 | <?php |
| 116 | 122 | } |
| 117 | 123 | |
| 118 | 124 | public function get_help_page() { |
| @@ -118,8 +124,12 @@ | ||
| 118 | 124 | public function get_help_page() { |
| 119 | 125 | Fns::renderView( 'help' ); |
| 120 | 126 | } |
| 121 | 127 | |
| 128 | + public function get_themes_page() { | |
| 129 | + Fns::renderView( 'themes' ); | |
| 130 | + } | |
| 131 | + | |
| 122 | 132 | /** |
| 123 | 133 | * Remove admin notices |
| 124 | 134 | */ |
| 125 | 135 | public function remove_all_notices() { |
| @@ -126,9 +136,14 @@ | ||
| 126 | 136 | add_action( |
| 127 | 137 | 'in_admin_header', |
| 128 | 138 | function () { |
| 129 | 139 | $screen = get_current_screen(); |
| 130 | - if ( in_array( $screen->base, [ 'shopbuilder_page_rtsb-settings', 'shopbuilder_page_rtsb-license' ]) ) { | |
| 140 | + | |
| 141 | + if ( in_array( | |
| 142 | + $screen->base, | |
| 143 | + [ 'shopbuilder_page_rtsb-settings', 'shopbuilder_page_rtsb-license', 'shopbuilder_page_rtsb-themes' ], | |
| 144 | + true | |
| 145 | + ) ) { | |
| 131 | 146 | remove_all_actions( 'admin_notices' ); |
| 132 | 147 | remove_all_actions( 'all_admin_notices' ); |
| 133 | 148 | } |
| 134 | 149 | }, |
| @@ -134,6 +149,5 @@ | ||
| 134 | 149 | }, |
| 135 | 150 | 1000 |
| 136 | 151 | ); |
| 137 | 152 | } |
| 138 | - | |
| 139 | 153 | } |