HEX
Server: nginx/1.27.1
System: Linux in-4 5.15.0-131-generic #141-Ubuntu SMP Fri Jan 10 21:18:28 UTC 2025 x86_64
User: ilikadirect (1186)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
Upload Files
File: /storage/v6964/gopalak/public_html/wp-content/plugins/jobboardwp/includes/ajax/class-notices.php
<?php
namespace jb\ajax;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

if ( ! class_exists( 'jb\ajax\Notices' ) ) {

	/**
	 * Class Notices
	 *
	 * @package jb\ajax
	 */
	class Notices {


		/**
		 * Notices constructor.
		 */
		public function __construct() {
		}


		/**
		 * AJAX dismiss notices
		 */
		public function dismiss_notice() {
			JB()->ajax()->check_nonce( 'jb-backend-nonce' );
			// phpcs:disable WordPress.Security.NonceVerification -- already verified here
			if ( empty( $_POST['key'] ) ) {
				wp_send_json_error( __( 'Wrong Data', 'jobboardwp' ) );
			}

			JB()->admin()->notices()->dismiss( sanitize_key( $_POST['key'] ) );
			wp_send_json_success();
			// phpcs:enable WordPress.Security.NonceVerification -- already verified here
		}
	}
}