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
!20
Feature/gutenberg
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Feature/gutenberg
feature/gutenberg
into
master
Overview
4
Commits
13
Pipelines
1
Changes
1
Merged
Krzysztof Dyszczyk
requested to merge
feature/gutenberg
into
master
3 years ago
Overview
4
Commits
13
Pipelines
1
Changes
1
0
0
Merge request reports
Viewing commit
696f8117
Prev
Next
Show latest version
1 file
+
9
−
7
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
696f8117
feature(js): support for gutenberg
· 696f8117
Grzegorz Rola
authored
3 years ago
src/WPDesk/Notice/Notice.php
+
9
−
7
View file @ 696f8117
Edit in single-file editor
Open in Web IDE
Show full file
@@ -211,7 +211,7 @@ class Notice
public
function
addGutenbergScript
()
{
if
(
$this
->
isBlockEditor
())
{
include_once
'
views/admin-head-js-gutenberg.php'
;
include_once
__DIR__
.
'/
views/admin-head-js-gutenberg.php'
;
}
}
@@ -233,21 +233,23 @@ class Notice
*/
protected
function
getNoticeClass
()
{
$notice_classes
=
[
'notice'
];
if
(
'updated'
===
$this
->
noticeType
)
{
$notice_class
=
'notice '
.
$this
->
noticeType
;
$notice_class
es
[]
=
$this
->
noticeType
;
}
else
{
$notice_class
=
'
notice
notice-'
.
$this
->
noticeType
;
$notice_class
es
[]
=
'notice-'
.
$this
->
noticeType
;
}
if
(
$this
->
dismissible
)
{
$notice_class
.
=
'
is-dismissible'
;
$notice_class
es
[]
=
'is-dismissible'
;
}
if
(
isset
(
$this
->
attributes
[
'class'
]))
{
$notice_class
.
=
' '
.
$this
->
attributes
[
'class'
];
$notice_class
es
[]
=
$this
->
attributes
[
'class'
];
}
if
(
$this
->
showInGutenberg
)
{
$notice_class
.
=
'
wpdesk-notice-gutenberg'
;
$notice_class
es
[]
=
'wpdesk-notice-gutenberg'
;
}
return
$notice_class
;
return
implode
(
' '
,
$notice_classes
);
}
/**
Loading