WordPress函数文档add_custom_background()

自定义背景 描述 Add callbacks for background image display. Th…

自定义背景

描述

Add callbacks for background image display.

The parameter $header_callback callback will be required to display the content for the ‘wp_head‘ action. The parameter $admin_header_callback callback will be added to Custom_Background class and that will be added to the ‘admin_menu‘ action.

用法

<?php add_custom_background$header_callback$admin_header_callback$admin_image_div_callback ?>

参数

$header_callback

(callback) (可选) Call on ‘wp_head‘ action.

默认值: ”

$admin_header_callback

(callback) (可选) Call on custom background administration screen.

默认值: ”

$admin_image_div_callback

(callback) (可选) Output a custom background image div on the custom background administration screen. Optional.

默认值: ”

返回值

(void) 

This function does not return a value.

注意

  • 使用到: Custom_Background Sets up for $admin_header_callback for administration panel display.

历史

  • Deprecated: 3.4.0
  • 添加于 版本: 3.0.0

源文件

add_custom_background() 函数的代码位于 wp-includes/deprecated.php.

相关

  • Theme Review – Guidelines (recommended)

Theme Support:
add_theme_support(),
remove_theme_support(),
current_theme_supports()

Theme Features:
sidebar,
menus,
post-formats,
title-tag,
custom-background,
custom-header,
post-thumbnails,
automatic-feed-links,
html5,
editor-style,
content_width

Further Reading – External Resources

  • Apply custom background on other element rather than <body> element
  • 原文:http://codex.wordpress.org/Function_Reference/add_custom_background
类别:WordPress函数文档

本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。

评论 (0)COMMENT