Skip to content

Commit

Permalink
INS-3071: Fixed devmode not working in staging (#51)
Browse files Browse the repository at this point in the history
* INS-3071: Fixed devmode not working in staging

* INS-3071: Fixed build issues
  • Loading branch information
rdom-si authored Jul 8, 2024
1 parent 0b8a8cc commit a2c9deb
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public function request_siteimprove_nonce() {
* Register section.
*/
public function register_section() {
$this->siteimprove_nonce = wp_create_nonce( 'siteimprove-options' );
// Register settings for siteimprove plugin settings page.
register_setting( 'siteimprove', 'siteimprove_token' );
register_setting( 'siteimprove', 'siteimprove_disable_new_version', 'Siteimprove_Admin_Settings::validate_siteimprove_disable_new_version' );
Expand Down Expand Up @@ -107,7 +108,7 @@ public function register_section() {
);

// Register a new section in the siteimprove page.
if ( isset( $_GET['devmode'] ) && ( isset( $_REQUEST['_wpnonce'] ) ) && wp_verify_nonce( sanitize_key( $_REQUEST['_wpnonce'] ), 'siteimprove-options' ) ) {
if ( isset( $_GET['devmode'] ) ) {
add_settings_section(
'siteimprove_dev_mode_section',
__( 'Dev Mode', 'siteimprove' ),
Expand Down Expand Up @@ -150,8 +151,6 @@ public function register_section() {
'Siteimprove_Admin_Settings::siteimprove_settings_section_title',
'siteimprove'
);

$this->siteimprove_nonce = wp_create_nonce( 'siteimprove_nonce' );
}

/**
Expand Down

0 comments on commit a2c9deb

Please sign in to comment.