self::ACTION, 'nonce' => $token ], $adminLink ); } public static function redirect() { if ( empty( $_GET['action'] ) || self::ACTION !== $_GET['action'] ) { return; } if ( empty( $_GET['nonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET['nonce'] ) ), self::NONCE_ACTION ) ) { Logger::log( 'Nonce error', 'getUrl : failed : ', 'GoToAdscale' ); return; } $url = self::getGoToAdscaleUrl(); if ( $url ) { Logger::log( $url, 'getUrl : success : ', 'GoToAdscale' ); Helper::safe_external_redirect($url); exit; } else { Logger::log( $url, 'getUrl : failed : ', 'GoToAdscale' ); return; } } }