is_random_header_image()
is_random_header_image( string $type = ‘any’ )
检查是否正在使用随机头图像。
Check if random header image is in use.
说明(Description)
如果用户在Appearance>Header中明确选择了选项,则始终为true。如果主题注册了多个标题图像,则不选择特定的标题图像,并且主题使用add_theme_support()打开随机标题。
参数(Parameters)
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
$type | (string) | 可选 | 要使用的随机池。任何|默认|已上载 |
返回(Return)
(bool)
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
3.2.0 | wp-includes/theme.php:1242 | 4 | 3 |
is_random_header_image() 为WP2原创文章,链接:https://www.wp2.cn/functions/is_random_header_image/