get_background_image(): string
- Since
- 3.0.0
- Source
wp-includes/theme.php:1840
Retrieves background image for custom background.
Return
string
Uses · 2
- get_theme_mod()Retrieves theme modification value for the active theme.
- get_theme_support()Gets the theme support arguments passed when registering that support.
Used by · 8
- Custom_Background::admin_page()Displays the custom background page.
- _custom_background_cb()Default custom background callback.
- _delete_attachment_theme_mod()Checks an attachment being deleted to see if it's a header or background image.
- background_image()Displays background image path.
- get_body_class()Retrieves an array of the class names for the body element.
- get_media_states()Retrieves an array of media states from an attachment.
- twentysixteen_body_classes()Adds custom classes to the array of body classes.
- twentytwelve_body_class()Extends the default WordPress body classes.
Source
function get_background_image() { return get_theme_mod( 'background_image', get_theme_support( 'custom-background', 'default-image' ) );}History
Introduced in 3.0.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, from
src/wp-includes/theme.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. - Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.