register_block_core_latest_comments

函数
register_block_core_latest_comments ( No parameters )

register_block_core_latest_comments: 此函数用于注册Gutenberg编辑器的”最新评论”块。该块显示文章或页面上的最新评论。

注册`core/latest-comments`区块。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function register_block_core_latest_comments() {
register_block_type_from_metadata(
__DIR__ . '/latest-comments',
array(
'render_callback' => 'render_block_core_latest_comments',
)
);
}
function register_block_core_latest_comments() { register_block_type_from_metadata( __DIR__ . '/latest-comments', array( 'render_callback' => 'render_block_core_latest_comments', ) ); }
function register_block_core_latest_comments() {
	register_block_type_from_metadata(
		__DIR__ . '/latest-comments',
		array(
			'render_callback' => 'render_block_core_latest_comments',
		)
	);
}

常见问题

FAQs
查看更多 >