Skip to content

Commit

Permalink
fix(onboarding): check when alerts onboarding should show
Browse files Browse the repository at this point in the history
  • Loading branch information
harunbleech committed Mar 12, 2024
1 parent c9ae705 commit c45a3e3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions includes/features/class-onboarding.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,11 @@ public function get_onboardings() {
* @return bool
*/
public function should_display_alerts_onboarding() {
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nonce verification is not required here.
if ( 'vrts-alerts' === $_GET['page'] ?? '' && 'edit' === $_GET['action'] ?? '' && isset( $_GET['alert_id'] ) ) {
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nonce verification is not required here.
$alert_id = sanitize_text_field( wp_unslash( $_GET['alert_id'] ) );
$page = sanitize_text_field( wp_unslash( $_GET['page'] ?? '' ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nonce verification is not required here.
$action = sanitize_text_field( wp_unslash( $_GET['action'] ?? '' ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nonce verification is not required here.
$alert_id = sanitize_text_field( wp_unslash( $_GET['alert_id'] ?? '' ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nonce verification is not required here.

if ( 'vrts-alerts' === $page && 'edit' === $action && '' !== $alert_id ) {
$alert = Alert::get_item( $alert_id );

// only if the alert has option to mark as false positive.
Expand Down

0 comments on commit c45a3e3

Please sign in to comment.