Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
plugins
CiviCRM Gutenberg Blocks
Commits
9465a32b
Commit
9465a32b
authored
Dec 05, 2019
by
Andrei Mondoc
Browse files
ensure civi wp_head action is present when in block editor
parent
9c84f121
Changes
1
Hide whitespace changes
Inline
Side-by-side
civicrm-gutenberg-blocks.php
View file @
9465a32b
...
...
@@ -531,17 +531,8 @@ class CiviCRM_Gutenberg_Blocks {
if
(
!
$screen
->
is_block_editor
()
)
return
;
$actions
=
[
'load-post.php'
,
'load-post-new.php'
,
'load-page.php'
,
'load-page-new.php'
,
];
foreach
(
$actions
as
$action
)
{
if
(
!
has_action
(
$action
,
[
civi_wp
()
->
modal
,
'add_core_resources'
]
)
)
{
add_action
(
$action
,
[
civi_wp
()
->
modal
,
'add_core_resources'
]
);
}
if
(
!
has_action
(
'admin_head'
,
[
civi_wp
(),
'wp_head'
]
)
)
{
add_action
(
'admin_head'
,
[
civi_wp
(),
'wp_head'
],
50
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment