enqueue_legacy_post_comments_block_styles
函数
enqueue_legacy_post_comments_block_styles ( $block_name )
- 参数
-
-
(string)
$block_name
Name of the new block type.- Required: 是
-
(string)
- 定义位置
-
-
wp-includes/blocks/comments.php
, line 126
-
wp-includes/blocks/comments.php
- 引入
- –
- 弃用
- –
从传统的`core/post-comments’区块中提取样式。这些样式只被该区块的回退所需要。
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; } }
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。