get_background_color() - WordPress 函数参考中文文档

返回介绍

get_background_color()

发布于 2017-09-10 字数1699 浏览 835 评论 0

get_background_color()

Retrieve value for custom background color.


描述


返回值

(string)


源代码

File: wp-includes/theme.php

function get_background_color() {
	return get_theme_mod('background_color', get_theme_support( 'custom-background', 'default-color' ) );
}

更新日志

Version 描述
3.0.0 Introduced.

相关函数

Uses

  • wp-includes/theme.php:
    get_theme_support()
  • wp-includes/theme.php:
    get_theme_mod()

Used By

  • wp-admin/custom-background.php:
    Custom_Background::admin_page()
  • wp-includes/theme.php:
    background_color()
  • wp-includes/theme.php:
    _custom_background_cb()
  • wp-includes/post-template.php:
    get_body_class()

User Contributed Notes

  1. Skip to note content

    You must log in to vote on the helpfulness of this noteVote results for this note: 0You must log in to vote on the helpfulness of this note

    Contributed by Codex

    Get background color

    $background_color = get_background_color();
    echo 'Current background color for your theme:

上一篇:get_avatar_url()

下一篇:get_background_image()

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!