register_block_core_comments

函数
register_block_core_comments ( No parameters )

register_block_core_comments: 这是一个WordPress函数,用于在块编辑器中注册”评论”块。这个块可以被添加到一个文章或页面,以允许用户在内容中添加评论。

在服务器上注册”core/comments”块。

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

常见问题

FAQs
查看更多 >