Added block template support to Varia. (#4250)

This commit is contained in:
Jason Crist 2021-07-21 09:47:30 -04:00 committed by GitHub
parent 5946e68dca
commit 5870dcd995
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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' );