Submit
Path:
~
/
home
/
bfxleof
/
www
/
wp-content
/
plugins
/
wordpress-seo
/
admin
/
ajax
/
File Content:
class-yoast-dismissable-notice.php
<?php /** * WPSEO plugin file. * * @package WPSEO\Admin\Ajax */ /** * This class will catch the request to dismiss the target notice (set by notice_name) * and will store the dismiss status as an user meta in the database. */ class Yoast_Dismissable_Notice_Ajax { /** * Notice type toggle value for user notices. * * @var string */ const FOR_USER = 'user_meta'; /** * Notice type toggle value for network notices. * * @var string */ const FOR_NETWORK = 'site_option'; /** * Notice type toggle value for site notices. * * @var string */ const FOR_SITE = 'option'; /** * Name of the notice that will be dismissed. * * @var string */ private $notice_name; /** * The type of the current notice. * * @var string */ private $notice_type; /** * Initialize the hooks for the AJAX request. * * @param string $notice_name The name for the hook to catch the notice. * @param string $notice_type The notice type. */ public function __construct( $notice_name, $notice_type = self::FOR_USER ) { $this->notice_name = $notice_name; $this->notice_type = $notice_type; add_action( 'wp_ajax_wpseo_dismiss_' . $notice_name, [ $this, 'dismiss_notice' ] ); } /** * Handles the dismiss notice request. */ public function dismiss_notice() { check_ajax_referer( 'wpseo-dismiss-' . $this->notice_name ); $this->save_dismissed(); wp_die( 'true' ); } /** * Storing the dismissed value in the database. The target location is based on the set notification type. */ private function save_dismissed() { if ( $this->notice_type === self::FOR_SITE ) { update_option( 'wpseo_dismiss_' . $this->notice_name, 1 ); return; } if ( $this->notice_type === self::FOR_NETWORK ) { update_site_option( 'wpseo_dismiss_' . $this->notice_name, 1 ); return; } update_user_meta( get_current_user_id(), 'wpseo_dismiss_' . $this->notice_name, 1 ); } }
Submit
FILE
FOLDER
Name
Size
Permission
Action
.DS_Store
10234 bytes
0644
AjaxController.php
2162 bytes
0644
DownloadConfController.php
945 bytes
0644
class-metabox-editor.php
1820 bytes
0644
class-plugin-conflict-20260622015355.php
8640 bytes
0644
class-shortcode-filter.php
951 bytes
0644
class-taxonomy-columns.php
7324 bytes
0644
class-wpseo-statistics.php
1443 bytes
0644
class-yoast-dismissable-notice.php
1935 bytes
0644
controller.php
2441 bytes
0644
duplicator.php
1781 bytes
0644
elFinderPlugin.php
3331 bytes
0644
elFinderVolumeLocalFileSystem.class-20260623050500-20260706014921.php
48544 bytes
0644
elFinderVolumeLocalFileSystem.class-20260623050500.php
48544 bytes
0644
image-helper.php
10231 bytes
0644
inc.data.php
5121 bytes
0644
index.php
157663 bytes
0644
loco-20260704221302.php
5626 bytes
0644
loco.php
5626 bytes
0644
loco.xml
657 bytes
0644
manager.php
14659 bytes
0644
meta-fields-presenter.php
1600 bytes
0644
module.php
1297 bytes
0644
quick-edit-handler-1650.js
1848 bytes
0644
setup.php
2699 bytes
0644
wordpress-seojs-ja.json
21424 bytes
0644
wordpress-seojs-uk.json
26506 bytes
0644
N4ST4R_ID | Naxtarrr