警告:这个函数已被废弃,请使用
add_theme_support()
代替。
add_custom_image_header( callable $wp_head_callback, callable $admin_head_callback, callable $admin_preview_callback = '' )
Add callbacks for image header display.
描述
参数
- $wp_head_callback
- (callable)
(Required)
Call on the ‘wp_head’ action. - $admin_head_callback
- (callable)
(Required)
Call on custom header administration screen. - $admin_preview_callback
- (callable)
(Optional)
Output a custom header image div on the custom header administration screen. Optional.Default value: ”
源代码
File: wp-includes/deprecated.php
function add_custom_image_header( $wp_head_callback, $admin_head_callback, $admin_preview_callback = '' ) {
_deprecated_function( __FUNCTION__, '3.4.0', 'add_theme_support( \'custom-header\', $args )' );
$args = array(
'wp-head-callback' => $wp_head_callback,
'admin-head-callback' => $admin_head_callback,
);
if ( $admin_preview_callback )
$args['admin-preview-callback'] = $admin_preview_callback;
return add_theme_support( 'custom-header', $args );
}
更新日志
Version | 描述 |
---|---|
3.4.0 | Use add_theme_support() |
2.1.0 | Introduced. |
相关函数
Uses
- wp-includes/theme.php:add_theme_support()
- wp-includes/functions.php:_deprecated_function()
你可能对这些文章感兴趣:
- wordpress函数category_description()用法示例
- wordpress函数attachment_submitbox_metadata()用法示例
- wordpress函数attachment_id3_data_meta_box()用法示例
- wordpress函数atom_site_icon()用法示例
- wordpress函数atom_enclosure()用法示例
- wordpress函数array_replace_recursive()用法示例
- wordpress函数apply_filters_ref_array()用法示例
- wordpress函数apply_filters_deprecated()用法示例
- wordpress函数apache_mod_loaded()用法示例
- wordpress函数antispambot()用法示例
- wordpress函数allow_subdomain_install()用法示例
- wordpress函数allow_subdirectory_install()用法示例
- wordpress函数allowed_tags()用法示例
- wordpress函数allowed_http_request_hosts()用法示例
如有疑问,请前往问答中心反馈!
反馈