get_background_image() WordPress Function
The get_background_image() function is used to retrieve the background image for a specific element on a WordPress site. This function can be used to get the background image for the entire site, or for a specific page or post. It can also be used to get the background image for a specific element on a page or post.
get_background_image() #
Retrieves background image for custom background.
Return
(string)
Source
File: wp-includes/theme.php
function get_background_image() {
return get_theme_mod( 'background_image', get_theme_support( 'custom-background', 'default-image' ) );
}
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |