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

返回介绍

get_dashboard_blog()

发布于 2017-09-10 字数1422 浏览 784 评论 0

Warning: This function has been deprecated. Use get_site() instead.

get_dashboard_blog()

Get the “dashboard blog”, the blog where users without a blog edit their profile data.


描述

Dashboard blog functionality was removed in WordPress 3.1, replaced by the user admin.


返回值

(WP_Site) Current site object.


源代码

File: wp-includes/ms-deprecated.php

function get_dashboard_blog() {
    _deprecated_function( __FUNCTION__, '3.1.0' );
    if ( $blog = get_site_option( 'dashboard_blog' ) ) {
	    return get_site( $blog );
    }

    return get_site( get_network()->site_id );
}

更新日志

Version 描述
3.1.0 Use get_site()
MU Introduced.

相关函数

Uses

  • wp-includes/ms-blogs.php:
    get_network()
  • wp-includes/ms-blogs.php:
    get_site()
  • wp-includes/functions.php:
    _deprecated_function()
  • wp-includes/option.php:
    get_site_option()

User Contributed Notes

上一篇:get_custom_logo()

下一篇:get_dashboard_url()

发布评论

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

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