On this page
get_background_color(): string
Retrieves value for custom background color.
Return
string
Source
File: wp-includes/theme.php. View all references
function get_background_color() {
return get_theme_mod( 'background_color', get_theme_support( 'custom-background', 'default-color' ) );
}
Related
Uses
| Uses | Description |
|---|---|
| get_theme_support() wp-includes/theme.php | Gets the theme support arguments passed when registering that support. |
| get_theme_mod() wp-includes/theme.php | Retrieves theme modification value for the active theme. |
Used By
| Used By | Description |
|---|---|
| Custom_Background::admin_page() wp-admin/includes/class-custom-background.php | Displays the custom background page. |
| background_color() wp-includes/theme.php | Displays background color value. |
| _custom_background_cb() wp-includes/theme.php | Default custom background callback. |
| get_body_class() wp-includes/post-template.php | Retrieves an array of the class names for the body element. |
Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_background_color