_access_denied_splash ( No parameters )
- Access
- Private
- 定义位置
-
-
wp-admin/includes/ms.php
, line 553
-
wp-admin/includes/ms.php
- 引入
- 3.2.0
- 弃用
- –
Displays an access denied message when a user tries to view a site’s dashboard they
do not have access to.
function _access_denied_splash() {
if ( ! is_user_logged_in() || is_network_admin() ) {
return;
}
$blogs = get_blogs_of_user( get_current_user_id() );
if ( wp_list_filter( $blogs, array( 'userblog_id' => get_current_blog_id() ) ) ) {
return;
}
$blog_name = get_bloginfo( 'name' );
if ( empty( $blogs ) ) {
wp_die(
sprintf(
/* translators: 1: Site title. */
__( 'You attempted to access the "%1$s" dashboard, but you do not currently have privileges on this site. If you believe you should be able to access the "%1$s" dashboard, please contact your network administrator.' ),
$blog_name
),
403
);
}
$output = '' . sprintf(
/* translators: 1: Site title. */
__( 'You attempted to access the "%1$s" dashboard, but you do not currently have privileges on this site. If you believe you should be able to access the "%1$s" dashboard, please contact your network administrator.' ),
$blog_name
) . '
';
$output .= '' . __( 'If you reached this screen by accident and meant to visit one of your own sites, here are some shortcuts to help you find your way.' ) . '
';
$output .= '' . __( 'Your Sites' ) . '
';
$output .= '
| {$blog->blogname} |
‘ . __( ‘Visit Dashboard’ ) . ‘ | ‘ . ” . __( ‘View Site’ ) . ‘ |
‘;
wp_die( $output, 403 );
}
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。


