| @@ -1,29 +1,22 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | namespace MaxButtons; |
| 3 | -exit('XXIT'); | |
| 4 | - | |
| 5 | 3 | defined('ABSPATH') or die('No direct access permitted'); |
| 6 | 4 | |
| 7 | 5 | if (isset($_GET['action']) && $_GET['action'] != '') { |
| 8 | - // extra safety. | |
| 9 | - $action = sanitize_text_field($_GET['action']); | |
| 10 | - | |
| 6 | + // extra safety. | |
| 7 | + $action = sanitize_text_field($_GET['action']); | |
| 8 | + | |
| 11 | 9 | switch ($action) { |
| 12 | 10 | case 'button': |
| 13 | - case 'edit': | |
| 14 | - //include_once 'maxbuttons-button.php'; | |
| 15 | - $_GET['page'] = 'maxbuttons-button'; | |
| 16 | - MB()->loadAdminPage(); | |
| 11 | + case 'edit': | |
| 12 | + include_once 'maxbuttons-button.php'; | |
| 17 | 13 | break; |
| 18 | 14 | default: |
| 19 | - //include_once 'maxbuttons-list.php'; | |
| 20 | - $_GET['page'] = 'maxbuttons-list'; | |
| 21 | - MB()->loadAdminPage(); | |
| 22 | - break; | |
| 23 | - | |
| 15 | + include_once 'maxbuttons-list.php'; | |
| 16 | + break; | |
| 24 | 17 | } |
| 25 | 18 | |
| 26 | 19 | } else { |
| 27 | - $_GET['page'] = 'maxbuttons-list'; | |
| 28 | - MB()->loadAdminPage(); | |
| 20 | + include_once 'maxbuttons-list.php'; | |
| 29 | 21 | } |
| 22 | + | |