Skip to content

Commit

Permalink
feat: always redirect to setup-wizard with noheader on
Browse files Browse the repository at this point in the history
need to fix why the esutp-wizard doesn't load properly in noheader mode
  • Loading branch information
squigglybob committed Dec 18, 2024
1 parent 8bdf100 commit c1b1f2b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,17 @@ public function __construct() {
require_once( 'dt-core/multisite.php' );
require_once( 'dt-core/global-functions.php' );
require_once( 'dt-core/utilities/loader.php' );

$is_rest = dt_is_rest();
$url_path = dt_get_url_path();

$setup_wizard_completed = get_option( 'dt_setup_wizard_completed' );

$current_page = isset( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : '';
if ( !$is_rest && is_admin() && !$setup_wizard_completed && $current_page !== 'dt_setup_wizard' ) {
wp_redirect( admin_url( 'admin.php?page=dt_setup_wizard&noheader' ) );
}

require_once( 'dt-core/libraries/posts-to-posts/posts-to-posts.php' ); // P2P library/plugin. Required before DT instance
require_once( 'dt-core/libraries/wp-queue/wp-queue.php' ); //w
if ( !class_exists( 'Jwt_Auth' ) ) {
Expand Down

0 comments on commit c1b1f2b

Please sign in to comment.