wpseek.com
WordPress开发者和主题制作者的搜索引擎



enqueue_legacy_post_comments_block_styles › WordPress Function

Sincen/a
已弃用n/a
enqueue_legacy_post_comments_block_styles ( $block_name )
参数:
  • (string) $block_name Name of the new block type.
    Required: Yes
定义在:
文档:

Enqueues styles from the legacy `core/post-comments` block. These styles are required only by the block's fallback.



源码

function enqueue_legacy_post_comments_block_styles( $block_name ) {
	static $are_styles_enqueued = false;

	if ( ! $are_styles_enqueued ) {
		$handles = array(
			'wp-block-post-comments',
			'wp-block-buttons',
			'wp-block-button',
		);
		foreach ( $handles as $handle ) {
			wp_enqueue_block_style( $block_name, array( 'handle' => $handle ) );
		}
		$are_styles_enqueued = true;
	}
}