| @@ -35,17 +35,13 @@ | ||
| 35 | 35 | * |
| 36 | 36 | * @return void |
| 37 | 37 | */ |
| 38 | 38 | public function initiate_trustedlogin() { |
| 39 | - $license = $this->container->get( 'license' ); | |
| 40 | - $license_key = is_object( $license ) && method_exists( $license, 'get_license_key' ) | |
| 41 | - ? $license->get_license_key() | |
| 42 | - : ''; | |
| 43 | 39 | |
| 44 | 40 | $config = [ |
| 45 | 41 | 'auth' => [ |
| 46 | 42 | 'api_key' => 'f97f5be6e02d1565', |
| 47 | - 'license_key' => $license_key, | |
| 43 | + 'license_key' => $this->container->get( 'license' )->get_license_key(), | |
| 48 | 44 | ], |
| 49 | 45 | 'vendor' => [ |
| 50 | 46 | 'namespace' => 'content-control', |
| 51 | 47 | 'title' => 'Content Control', |
| @@ -100,13 +96,12 @@ | ||
| 100 | 96 | * |
| 101 | 97 | * @return void |
| 102 | 98 | */ |
| 103 | 99 | public function admin_menu() { |
| 104 | - // phpcs:disable WordPress.Security.NonceVerification.Recommended -- Read-only routing check. | |
| 105 | - if ( ! isset( $_GET['page'] ) || ! is_string( $_GET['page'] ) || 'grant-content-control-access' !== sanitize_key( wp_unslash( $_GET['page'] ) ) ) { | |
| 100 | + // phpcs:ignore WordPress.Security.NonceVerification.Recommended | |
| 101 | + if ( ! isset( $_GET['page'] ) || 'grant-content-control-access' !== $_GET['page'] ) { | |
| 106 | 102 | return; |
| 107 | 103 | } |
| 108 | - // phpcs:enable WordPress.Security.NonceVerification.Recommended | |
| 109 | 104 | |
| 110 | 105 | add_options_page( |
| 111 | 106 | __( 'Content Control Support Access', 'content-control' ), |
| 112 | 107 | __( 'Content Control Support Access', 'content-control' ), |