Codex

Function Reference/add custom background

Contents

Description

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.

Usage

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

Parameters

$header_callback
(callback) (optional) Call on 'wp_head' action.
Default: ''
$admin_header_callback
(callback) (optional) Call on custom background administration screen.
Default: ''
$admin_image_div_callback
(callback) (optional) Output a custom background image div on the custom background administration screen. Optional.
Default: ''

Return Values

(void) 
This function does not return a value.

Examples

Notes

  • Uses: Custom_Background Sets up for $admin_header_callback for administration panel display.

Change Log

Since: 3.0.0

Source File

add_custom_background() is located in wp-includes/theme.php.

Related

Theme Support: add_theme_support(), remove_theme_support(), current_theme_supports() add_editor_style()
Theme Features: Post Thumbnails, Navigation Menus, Widgets API, Post Formats, Custom Backgrounds, Custom Headers

Further Reading - External Resources

See also index of Function Reference and index of Template Tags.