| @@ -5,10 +5,8 @@ | ||
| 5 | 5 | * @package Timetics |
| 6 | 6 | */ |
| 7 | 7 | namespace Timetics\Core\Staffs; |
| 8 | 8 | |
| 9 | -defined( 'ABSPATH' ) || exit; | |
| 10 | - | |
| 11 | 9 | use Timetics\Utils\Singleton; |
| 12 | 10 | |
| 13 | 11 | /** |
| 14 | 12 | * Onboard Class |
| @@ -40,25 +38,14 @@ | ||
| 40 | 38 | * |
| 41 | 39 | * @return void |
| 42 | 40 | */ |
| 43 | 41 | public function setup_onboard_page() { |
| 44 | - // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only page parameter check, no form processing | |
| 45 | - $page = isset( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : ''; | |
| 42 | + $page = isset( $_GET['page'] ) ? sanitize_text_field( $_GET['page'] ) : ''; | |
| 46 | 43 | |
| 47 | 44 | if ( 'staff-onboard' !== $page ) { |
| 48 | 45 | return; |
| 49 | 46 | } |
| 50 | - | |
| 51 | - $template = TIMETICS_PLUGIN_DIR . '/templates/staff/onboard.php'; | |
| 52 | - | |
| 53 | - if ( file_exists( $template ) ) { | |
| 54 | - include $template; | |
| 55 | - } | |
| 56 | - | |
| 57 | - $output = ob_get_clean(); | |
| 58 | - | |
| 59 | - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 60 | - echo $output; | |
| 61 | - | |
| 62 | - exit; | |
| 47 | + ob_start(); | |
| 48 | + include_once TIMETICS_PLUGIN_DIR . '/templates/staff/onboard.php'; | |
| 49 | + exit(); | |
| 63 | 50 | } |
| 64 | 51 | } |