| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* Assist admin page. |
| 5 |
*/ |
| 6 |
|
| 7 |
namespace Extendify\Assist; |
| 8 |
|
| 9 |
defined('ABSPATH') || die('No direct access.'); |
| 10 |
|
| 11 |
/** |
| 12 |
* This class handles the Assist admin page. |
| 13 |
*/ |
| 14 |
|
| 15 |
class AdminPage |
| 16 |
{ |
| 17 |
/** |
| 18 |
* The admin page slug |
| 19 |
* |
| 20 |
* @var $string |
| 21 |
*/ |
| 22 |
public $slug = 'extendify-assist'; |
| 23 |
|
| 24 |
/** |
| 25 |
* Adds various actions to set up the page |
| 26 |
* |
| 27 |
* @return void |
| 28 |
*/ |
| 29 |
public function __construct() |
| 30 |
{ |
| 31 |
\add_action( |
| 32 |
'in_admin_header', |
| 33 |
function () { |
| 34 |
// phpcs:ignore WordPress.Security.NonceVerification |
| 35 |
if (isset($_GET['page']) && $_GET['page'] === 'extendify-assist') { |
| 36 |
\remove_all_actions('admin_notices'); |
| 37 |
\remove_all_actions('all_admin_notices'); |
| 38 |
} |
| 39 |
}, |
| 40 |
1000 |
| 41 |
); |
| 42 |
} |
| 43 |
|
| 44 |
/** |
| 45 |
* Settings page output |
| 46 |
* |
| 47 |
* @since 1.0.0 |
| 48 |
* |
| 49 |
* @return void |
| 50 |
*/ |
| 51 |
public function pageContent() |
| 52 |
{ |
| 53 |
?> |
| 54 |
<div |
| 55 |
id="extendify-assist-landing-page" |
| 56 |
class="extendify-assist" |
| 57 |
data-test="assist-landing"> |
| 58 |
</div> |
| 59 |
<?php |
| 60 |
} |
| 61 |
} |
| 62 |
|