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
Commits
4e9512c4
Commit
4e9512c4
authored
6 years ago
by
Grzegorz Rola
Browse files
Options
Downloads
Patches
Plain Diff
init
parent
35ba5983
No related branches found
No related tags found
No related merge requests found
Pipeline
#6349
passed with warnings
6 years ago
Stage: tools
Stage: tests
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
assets/js/notice.js
+17
-1
17 additions, 1 deletion
assets/js/notice.js
assets/js/notice.min.js
+1
-1
1 addition, 1 deletion
assets/js/notice.min.js
src/WPDesk/Notice/AjaxHandler.php
+1
-1
1 addition, 1 deletion
src/WPDesk/Notice/AjaxHandler.php
with
19 additions
and
3 deletions
assets/js/notice.js
+
17
−
1
View file @
4e9512c4
alert
(
1
);
jQuery
(
document
).
on
(
'
click
'
,
'
.notice-dismiss
'
,
function
()
{
var
notice_name
=
jQuery
(
this
).
closest
(
'
div.notice
'
).
data
(
'
notice-name
'
);
console
.
log
(
notice_name
);
if
(
''
!==
notice_name
)
{
jQuery
.
ajax
({
url
:
ajaxurl
,
type
:
'
post
'
,
data
:
{
action
:
'
wpdesk_notice_dismiss
'
,
notice_name
:
notice_name
},
success
:
function
(
response
)
{
}
});
}
});
This diff is collapsed.
Click to expand it.
assets/js/notice.min.js
+
1
−
1
View file @
4e9512c4
alert
(
1
);
jQuery
(
document
).
on
(
"
click
"
,
"
.notice-dismiss
"
,
function
(){
var
a
=
jQuery
(
this
).
closest
(
"
div.notice
"
).
data
(
"
notice-name
"
);
console
.
log
(
a
);
if
(
""
!==
a
){
jQuery
.
ajax
({
url
:
ajaxurl
,
type
:
"
post
"
,
data
:{
action
:
"
wpdesk_notice_dismiss
"
,
notice_name
:
a
},
success
:
function
(
b
){}})}});
\ No newline at end of file
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/WPDesk/Notice/AjaxHandler.php
+
1
−
1
View file @
4e9512c4
...
@@ -17,7 +17,7 @@ class AjaxHandler implements HookablePluginDependant
...
@@ -17,7 +17,7 @@ class AjaxHandler implements HookablePluginDependant
const
POST_FIELD_NOTICE_NAME
=
'notice-name'
;
const
POST_FIELD_NOTICE_NAME
=
'notice-name'
;
const
SCRIPTS_VERSION
=
'
1
'
;
const
SCRIPTS_VERSION
=
'
2
'
;
const
SCRIPT_HANDLE
=
'wpdesk_notice'
;
const
SCRIPT_HANDLE
=
'wpdesk_notice'
;
/**
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment