register_block_core_comment_template

函数
register_block_core_comment_template ( No parameters )

register_block_core_comment_template: 这个函数注册了一个显示评论表格模板的块。它包括自定义表格显示的选项,如表格中的字段和提交按钮的文本。

在服务器上注册`core/comment-template`块。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function register_block_core_comment_template() {
register_block_type_from_metadata(
__DIR__ . '/comment-template',
array(
'render_callback' => 'render_block_core_comment_template',
'skip_inner_blocks' => true,
)
);
}
function register_block_core_comment_template() { register_block_type_from_metadata( __DIR__ . '/comment-template', array( 'render_callback' => 'render_block_core_comment_template', 'skip_inner_blocks' => true, ) ); }
function register_block_core_comment_template() {
	register_block_type_from_metadata(
		__DIR__ . '/comment-template',
		array(
			'render_callback'   => 'render_block_core_comment_template',
			'skip_inner_blocks' => true,
		)
	);
}

常见问题

FAQs
查看更多 >