Commit 9465a32b authored by Andrei Mondoc's avatar Andrei Mondoc

ensure civi wp_head action is present when in block editor

parent 9c84f121
......@@ -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 );
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment