_access_denied_splash [ WordPress Function ]
_access_denied_splash ( No parameters )
| Defined at: |
|
Benzer Fonksiyonlar: wp_widgets_access_body_class, url_is_accessable_via_ssl, deslash, wp_kses_js_entities
No description yet.
Source
<?php
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( __( '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 = '<p>' . sprintf( __( '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 ) . '</p>';
$output .= '<p>' . __( '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.' ) . '</p>';
$output .= '<h3>' . __('Your Sites') . '</h3>';
$output .= '<table>';
foreach ( $blogs as $blog ) {
$output .= "<tr>";
$output .= "<td valign='top'>";
$output .= "{$blog->blogname}";
$output .= "</td>";
$output .= "<td valign='top'>";
$output .= "<a href='" . esc_url( get_admin_url( $blog->userblog_id ) ) . "'>" . __( 'Visit Dashboard' ) . "</a> | <a href='" . esc_url( get_home_url( $blog->userblog_id ) ). "'>" . __( 'View Site' ) . "</a>" ;
$output .= "</td>";
$output .= "</tr>";
}
$output .= '</table>';
wp_die( $output );
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- #17511 (_access_denied_splash() doesn't account for the network ...
You attempted to access the "Foo" dashboard, but you do not currently have privileges on this site. If you believe you should be able to access the "Foo" ...
core.trac.wordpress.org - #17514 (_access_denied_splash() wording doesn't account for ...
You do not have sufficient permissions to access this page. whereas in 3.2 it is now: You attempted to access the "Foo" dashboard, but you do not currently have ...
core.trac.wordpress.org - _access_denied_splash | A HitchHackers guide through WordPress
Jul 5, 2011 ... function _access_denied_splash() { if ( ! is_user_logged_in() || is_network_admin() ) return; $blogs = get_blogs_of_user( get_current_user_id() ) ...
hitchhackerguide.com - PHPXRef 0.7 : WordPress : /wp-admin/includes/ms.php source
"</tr>"; 479 } 480 $output .= '</table>'; 481 482 wp_die( $output ); 483 } 484 add_action( 'admin_page_access_denied', '_access_denied_splash', 99 ); 485 486 ...
phpxref.ftwr.co.uk