Merged in feature/314-dev-dev01 (pull request #24)
auto-patch 314-dev-dev01-2024-01-25T04_09_02 * auto-patch 314-dev-dev01-2024-01-25T04_09_02
This commit is contained in:
@@ -16,21 +16,21 @@ class Yoast_Dismissable_Notice_Ajax {
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const FOR_USER = 'user_meta';
|
||||
public const FOR_USER = 'user_meta';
|
||||
|
||||
/**
|
||||
* Notice type toggle value for network notices.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const FOR_NETWORK = 'site_option';
|
||||
public const FOR_NETWORK = 'site_option';
|
||||
|
||||
/**
|
||||
* Notice type toggle value for site notices.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const FOR_SITE = 'option';
|
||||
public const FOR_SITE = 'option';
|
||||
|
||||
/**
|
||||
* Name of the notice that will be dismissed.
|
||||
@@ -61,6 +61,8 @@ class Yoast_Dismissable_Notice_Ajax {
|
||||
|
||||
/**
|
||||
* Handles the dismiss notice request.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function dismiss_notice() {
|
||||
check_ajax_referer( 'wpseo-dismiss-' . $this->notice_name );
|
||||
@@ -72,6 +74,8 @@ class Yoast_Dismissable_Notice_Ajax {
|
||||
|
||||
/**
|
||||
* Storing the dismissed value in the database. The target location is based on the set notification type.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function save_dismissed() {
|
||||
if ( $this->notice_type === self::FOR_SITE ) {
|
||||
|
||||
Reference in New Issue
Block a user