Skip to content

Commit

Permalink
php cs fix - comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vraja-pro committed Jul 27, 2023
1 parent 75dfc00 commit 84a3978
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Whip_WPMessageDismissListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ public function __construct( Whip_MessageDismisser $dismisser ) {
*/
public function listen() {

// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nonce is verified in the dismisser.
$action = ( isset( $_GET['action'] ) && is_string( $_GET['action'] ) ) ? sanitize_text_field( wp_unslash( $_GET['action'] ) ) : null;
$nonce = ( isset( $_GET['nonce'] ) && is_string( $_GET['nonce'] ) ) ? sanitize_text_field( wp_unslash( $_GET['nonce'] ) ) : null;
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Nonce is verified in the dismisser.
$nonce = ( isset( $_GET['nonce'] ) && is_string( $_GET['nonce'] ) ) ? sanitize_text_field( wp_unslash( $_GET['nonce'] ) ) : null;

if ( $action === self::ACTION_NAME && $this->dismisser->verifyNonce( $nonce, self::ACTION_NAME ) ) {
$this->dismisser->dismiss();
Expand Down

0 comments on commit 84a3978

Please sign in to comment.