register_block_core_post_template

函数
register_block_core_post_template ( No parameters )

register_block_core_post_template: 这个函数用来注册一个新的核心文章模板块。文章模板是为一个文章预定义的布局,可以在多个文章中重复使用。它需要一个设置数组作为参数,以定义该块的行为和外观。

在服务器上注册”core/post-template”块。

function register_block_core_post_template() {
	register_block_type_from_metadata(
		__DIR__ . '/post-template',
		array(
			'render_callback'   => 'render_block_core_post_template',
			'skip_inner_blocks' => true,
		)
	);
}

常见问题

FAQs
查看更多 >
闪电伯伯

(工作日 10:00 - 18:30 为您服务)

2025-11-14 11:25:39

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: