Skip to content

Commit

Permalink
fix: redirect to wizard with menus hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
squigglybob committed Dec 18, 2024
1 parent c1b1f2b commit fad3dc6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions dt-core/admin/menu/menu-setup-wizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,18 @@ public function content() {
body {
margin: 0;
}
html.wp-toolbar {
padding-top: 0;
}
#adminmenuback,
#adminmenuwrap,
#wpadminbar {
display: none;
}
#wpcontent {
margin-left: 0;
padding-left: 0;
}
</style>

<setup-wizard></setup-wizard>
Expand Down
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public function __construct() {

$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' ) );
wp_redirect( admin_url( 'admin.php?page=dt_setup_wizard' ) );
}

require_once( 'dt-core/libraries/posts-to-posts/posts-to-posts.php' ); // P2P library/plugin. Required before DT instance
Expand Down

0 comments on commit fad3dc6

Please sign in to comment.