| @@ -539,8 +539,21 @@ | ||
| 539 | 539 | $this->secure_request( 'mainwp_notice_status_update' ); |
| 540 | 540 | |
| 541 | 541 | // phpcs:disable WordPress.Security.NonceVerification,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized |
| 542 | 542 | $no_id = isset( $_POST['notice_id'] ) ? sanitize_text_field( wp_unslash( $_POST['notice_id'] ) ) : false; |
| 543 | + | |
| 544 | + if ( ! empty( $_POST['short_term'] ) ) { | |
| 545 | + if ( empty( $no_id ) ) { | |
| 546 | + die( 'invalid' ); | |
| 547 | + } | |
| 548 | + | |
| 549 | + $keys = explode( ';', $no_id ); | |
| 550 | + foreach ( $keys as $key ) { | |
| 551 | + MainWP_Utility::dismiss_short_term_notice( $key ); | |
| 552 | + } | |
| 553 | + die( 'dismissed' ); | |
| 554 | + } | |
| 555 | + | |
| 543 | 556 | if ( 'mail_failed' === $no_id ) { |
| 544 | 557 | MainWP_Utility::update_option( 'mainwp_notice_wp_mail_failed', 'hide' ); |
| 545 | 558 | die( 'ok' ); |
| 546 | 559 | } |