Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
wp-notice
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wpdesk
wp-notice
Merge requests
!26
feature(ajax): added nonce
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
feature(ajax): added nonce
feature/dismiss-nonce
into
master
Overview
12
Commits
14
Pipelines
15
Changes
2
Merged
Grzegorz Rola
requested to merge
feature/dismiss-nonce
into
master
2 years ago
Overview
12
Commits
14
Pipelines
15
Changes
2
0
0
Merge request reports
Viewing commit
705c70a7
Prev
Next
Show latest version
2 files
+
18
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
705c70a7
feature(ajax): added nonce
· 705c70a7
Grzegorz Rola
authored
2 years ago
src/WPDesk/Notice/AjaxHandler.php
+
4
−
1
View file @ 705c70a7
Edit in single-file editor
Open in Web IDE
Show full file
@@ -94,10 +94,13 @@ class AjaxHandler implements HookablePluginDependant {
PermanentDismissibleNotice
::
OPTION_VALUE_DISMISSED
);
do_action
(
'wpdesk_notice_dismissed_notice'
,
$noticeName
,
$source
);
if
(
defined
(
'DOING_AJAX'
)
&&
DOING_AJAX
)
{
wp_send_json_success
();
}
}
}
if
(
defined
(
'DOING_AJAX'
)
&&
DOING_AJAX
)
{
die
();
wp_send_json_error
();
}
}
Loading