Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/remove role from sso field defaults #2280

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: don't run front end classes if it's a rest request
  • Loading branch information
squigglybob committed Nov 27, 2023
commit 0059926c2fabcf45002d6be3540d41948d6b3c9a
4 changes: 4 additions & 0 deletions dt-core/admin/menu/tabs/tab-sso-login.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ public static function instance() {
* @since 0.1.0
*/
public function __construct() {
if ( dt_is_rest() ) {
return;
}

if ( !current_user_can( 'manage_dt' ) ){
return;
}
Expand Down
4 changes: 4 additions & 0 deletions dt-login/login-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ public static function instance() {
} // End instance()

public function __construct() {
if ( dt_is_rest() ) {
return;
}

parent::__construct();

$url = dt_get_url_path();
Expand Down
4 changes: 4 additions & 0 deletions dt-login/pages/privacy-policy.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ public static function instance() {
} // End instance()

public function __construct() {
if ( dt_is_rest() ) {
return;
}

parent::__construct();

$url = dt_get_url_path();
Expand Down
4 changes: 4 additions & 0 deletions dt-login/pages/terms-of-service.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ public static function instance() {
} // End instance()

public function __construct() {
if ( dt_is_rest() ) {
return;
}

parent::__construct();

$url = dt_get_url_path();
Expand Down
Loading