_restore_wpautop_hook
函数
_restore_wpautop_hook ( $content )
- Access
- Private
- 参数
-
-
(string)
$content
The post content running through this filter.- Required: 是
-
(string)
- 返回值
-
- (string) The unmodified content.
- 定义位置
-
-
wp-includes/blocks.php
, line 1112
-
wp-includes/blocks.php
- 引入
- 5.0.0
- 弃用
- –
If do_blocks() needs to remove wpautop() from the `the_content` filter, this re-adds it afterwards,
for subsequent `the_content` usage.
function _restore_wpautop_hook( $content ) { $current_priority = has_filter( 'the_content', '_restore_wpautop_hook' ); add_filter( 'the_content', 'wpautop', $current_priority - 1 ); remove_filter( 'the_content', '_restore_wpautop_hook', $current_priority ); return $content; }
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。