register_block_core_post_featured_image

函数
register_block_core_post_featured_image ( No parameters )

register_block_core_post_featured_image: 该函数用于注册一个新的核心文章特色图片块。它需要一个设置数组作为参数,以定义该块的行为和外观。

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

function register_block_core_post_featured_image() {
	register_block_type_from_metadata(
		__DIR__ . '/post-featured-image',
		array(
			'render_callback' => 'render_block_core_post_featured_image',
		)
	);
}

常见问题

FAQs
查看更多 >