|
@@ -41,7 +41,6 @@ function boot23_setup() {
|
|
'caption',
|
|
'caption',
|
|
));
|
|
));
|
|
add_theme_support( 'customize-selective-refresh-widgets' );
|
|
add_theme_support( 'customize-selective-refresh-widgets' );
|
|
- add_theme_support( 'editor-styles' );
|
|
|
|
}
|
|
}
|
|
add_action( 'after_setup_theme', 'boot23_setup' );
|
|
add_action( 'after_setup_theme', 'boot23_setup' );
|
|
|
|
|
|
@@ -95,23 +94,19 @@ add_action( 'widgets_init', 'boot23_widgets_init' );
|
|
######## Gutenberg Editor #########
|
|
######## Gutenberg Editor #########
|
|
***********************************/
|
|
***********************************/
|
|
|
|
|
|
-function boot23_add_editor_styles() {
|
|
|
|
- add_editor_style([
|
|
|
|
- 'css/custom.css',
|
|
|
|
- 'style.css'
|
|
|
|
- ] );
|
|
|
|
-}
|
|
|
|
-add_action( 'admin_init', 'boot23_add_editor_styles' );
|
|
|
|
-
|
|
|
|
function boot23_gutenberg_scripts() {
|
|
function boot23_gutenberg_scripts() {
|
|
wp_enqueue_script( 'hp-editor', get_stylesheet_directory_uri() . '/js/editor.js', array( 'wp-blocks', 'wp-dom' ), filemtime( get_stylesheet_directory() . '/js/editor.js' ), true );
|
|
wp_enqueue_script( 'hp-editor', get_stylesheet_directory_uri() . '/js/editor.js', array( 'wp-blocks', 'wp-dom' ), filemtime( get_stylesheet_directory() . '/js/editor.js' ), true );
|
|
}
|
|
}
|
|
add_action( 'enqueue_block_editor_assets', 'boot23_gutenberg_scripts' );
|
|
add_action( 'enqueue_block_editor_assets', 'boot23_gutenberg_scripts' );
|
|
|
|
|
|
-function boot23_gutenberg_style() {
|
|
|
|
- echo '<style>.wp-block{max-width:992px;}.wp-block[data-align="wide"]{}.wp-block[data-align="full"]{max-width:none;}.editor-post-title__block .editor-post-title__input,.edit-post-visual-editor, .edit-post-visual-editor p{font-family: Helvetica, Arial, sans-serif;}</style>';
|
|
|
|
|
|
+function boot23_add_editor_styles() {
|
|
|
|
+ add_theme_support( 'editor-styles' );
|
|
|
|
+ add_editor_style([
|
|
|
|
+ 'css/custom.css',
|
|
|
|
+ 'style.css'
|
|
|
|
+ ]);
|
|
}
|
|
}
|
|
-add_action('admin_head', 'boot23_gutenberg_style');
|
|
|
|
|
|
+add_action( 'after_setup_theme', 'boot23_add_editor_styles' );
|
|
|
|
|
|
function boot23_gutenberg_filter_block( $block_content, $block ) {
|
|
function boot23_gutenberg_filter_block( $block_content, $block ) {
|
|
$block_content = str_replace(
|
|
$block_content = str_replace(
|