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:
@@ -21,6 +21,8 @@ class WPSEO_Shortcode_Filter {
|
||||
|
||||
/**
|
||||
* Parse the shortcodes.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function do_filter() {
|
||||
check_ajax_referer( 'wpseo-filter-shortcodes', 'nonce' );
|
||||
|
||||
@@ -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 ) {
|
||||
|
||||
@@ -33,6 +33,8 @@ class Yoast_Plugin_Conflict_Ajax {
|
||||
|
||||
/**
|
||||
* Handles the dismiss notice request.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function dismiss_notice() {
|
||||
check_ajax_referer( 'dismiss-plugin-conflict' );
|
||||
@@ -89,6 +91,8 @@ class Yoast_Plugin_Conflict_Ajax {
|
||||
* Storing the conflicting plugins as an user option in the database.
|
||||
*
|
||||
* @param string $plugin_section Plugin conflict type (such as Open Graph or sitemap).
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function save_dismissed_conflicts( $plugin_section ) {
|
||||
$dismissed_conflicts = $this->get_dismissed_option();
|
||||
@@ -102,6 +106,8 @@ class Yoast_Plugin_Conflict_Ajax {
|
||||
* Loop through the plugins to compare them with the already stored dismissed plugin conflicts.
|
||||
*
|
||||
* @param array $posted_plugins Plugin set to check.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function compare_plugins( array $posted_plugins ) {
|
||||
foreach ( $posted_plugins as $posted_plugin ) {
|
||||
@@ -113,6 +119,8 @@ class Yoast_Plugin_Conflict_Ajax {
|
||||
* Check if plugin is already dismissed, if not store it in the array that will be saved later.
|
||||
*
|
||||
* @param string $posted_plugin Plugin to check against dismissed conflicts.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function compare_plugin( $posted_plugin ) {
|
||||
if ( ! in_array( $posted_plugin, $this->dismissed_conflicts, true ) ) {
|
||||
|
||||
Reference in New Issue
Block a user