Added block template support to Varia. (#4250)
This commit is contained in:
parent
5946e68dca
commit
5870dcd995
1 changed files with 10 additions and 0 deletions
|
@ -223,6 +223,16 @@ if ( ! function_exists( 'varia_setup' ) ) :
|
|||
)
|
||||
);
|
||||
|
||||
// Add support for block templates (default template is content-only)
|
||||
add_theme_support( 'block-templates' );
|
||||
add_filter(
|
||||
'block_editor_settings_all',
|
||||
function( $settings ) {
|
||||
$settings['defaultBlockTemplate'] = '<!-- wp:post-content /-->';
|
||||
return $settings;
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
endif;
|
||||
add_action( 'after_setup_theme', 'varia_setup' );
|
||||
|
|
Loading…
Reference in a new issue