| @@ -1,8 +1,10 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | namespace Booktics\Onboard; |
| 4 | 4 | |
| 5 | +if ( ! defined( 'ABSPATH' ) ) exit; | |
| 6 | + | |
| 5 | 7 | use Booktics\Contracts\Hookable_Service_Contract; |
| 6 | 8 | |
| 7 | 9 | /** |
| 8 | 10 | * Handles initialization of onboarding process for first-time plugin installation |
| @@ -29,9 +31,9 @@ | ||
| 29 | 31 | public function init() { |
| 30 | 32 | $is_installed = get_option( 'booktics_is_installed', false ); |
| 31 | 33 | if ( ! $is_installed ) { |
| 32 | 34 | update_option( 'booktics_is_installed', true ); |
| 33 | - wp_redirect( admin_url( 'admin.php?page=booktics#/onboard' ) ); | |
| 35 | + wp_safe_redirect( admin_url( 'admin.php?page=booktics#/onboard' ) ); | |
| 34 | 36 | exit(); |
| 35 | 37 | } |
| 36 | 38 | } |
| 37 | 39 | } |