introducing block editor adjustement script
This commit is contained in:
parent
0c796d4d22
commit
a5149a055f
24
index.php
24
index.php
|
|
@ -133,6 +133,7 @@ function add_type_attribute($tag, $handle, $src)
|
|||
return $tag;
|
||||
}
|
||||
add_filter('script_loader_tag', 'add_type_attribute', 10, 3);
|
||||
|
||||
/* ---------------------------
|
||||
ALLOWED BLOCKS
|
||||
---------------------------*/
|
||||
|
|
@ -202,3 +203,26 @@ function homegrade_allowed_block_types_all($block_editor_context, $editor_contex
|
|||
POST TYPE TEMPLATES
|
||||
-------------------------------------*/
|
||||
include_once('templates.php');
|
||||
|
||||
|
||||
|
||||
|
||||
/* -------------------------------------
|
||||
CORE BLOCKS ADJUSTMENTS
|
||||
-------------------------------------*/
|
||||
function enqueue_block_editor_adjustments()
|
||||
{
|
||||
|
||||
wp_register_script(
|
||||
'block_editor_adjustments',
|
||||
plugin_dir_url(__FILE__) . 'block_editor_adjustments.js',
|
||||
['wp-blocks', 'wp-dom', 'wp-dom-ready', 'wp-edit-post'],
|
||||
filemtime(plugin_dir_path(__FILE__) . 'block_editor_adjustments.js')
|
||||
|
||||
);
|
||||
|
||||
wp_enqueue_script('block_editor_adjustments');
|
||||
}
|
||||
|
||||
|
||||
// add_action('enqueue_block_editor_assets', 'enqueue_block_editor_adjustments');
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user