这是块标题,您可以使用blocks.registerBlockType
filter in the block editor 更改块标题和其他设置。
例如,这会将标题更改为;我的标题:
function changeHeadingBlockTitle( settings, name ) {
if ( name !== \'core/heading\' ) {
return settings;
}
return lodash.assign( {}, settings, {
title: \'My Heading\',
} );
}
wp.hooks.addFilter(
\'blocks.registerBlockType\',
\'my-plugin/foo\',
changeHeadingBlockTitle
);