1. 首页
  2. WordPress 函数手册

block_version()

block_version( string $content )

返回内容字符串使用的块格式的当前版本。
Returns the current version of the block format that the content string is using.

目录锚点:#说明#参数#返回#源码


说明(Description)

如果字符串不包含块,则返回0。


参数(Parameters)

参数 类型 必填 说明
$content (string) 必需 要测试的内容。

返回(Return)

(int)如果内容包含一个或多个块,则块格式版本为1,否则为0。


源码(Source)


更新版本 源码位置 使用 被使用
5.0.0 wp-includes/blocks.php:580 1 function 1 function

block_version() 为WP2原创文章,链接:https://www.wp2.cn/functions/block_version/