add_custom_background
函数
add_custom_background ( $wp_head_callback = '', $admin_head_callback = '', $admin_preview_callback = '' )
- 参数
-
-
(callable)
$wp_head_callback
Call on the {@see ‘wp_head’} action.- Required: 否
- Default: (empty)
-
(callable)
$admin_head_callback
Call on custom background administration screen.- Required: 否
- Default: (empty)
-
(callable)
$admin_preview_callback
Output a custom background image div on the custom background administration screen. Optional.- Required: 否
- Default: (empty)
-
(callable)
- 相关
-
- add_theme_support()
- 定义位置
-
-
wp-includes/deprecated.php
, line 3031
-
wp-includes/deprecated.php
- 引入
- 3.0.0
- 弃用
- 3.4.0
Add callbacks for background image display.
function add_custom_background( $wp_head_callback = '', $admin_head_callback = '', $admin_preview_callback = '' ) { _deprecated_function( __FUNCTION__, '3.4.0', 'add_theme_support( 'custom-background', $args )' ); $args = array(); if ( $wp_head_callback ) $args['wp-head-callback'] = $wp_head_callback; if ( $admin_head_callback ) $args['admin-head-callback'] = $admin_head_callback; if ( $admin_preview_callback ) $args['admin-preview-callback'] = $admin_preview_callback; return add_theme_support( 'custom-background', $args ); }
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。