1 | <?php |
---|
2 | /* Plugin Name: Ticket 17090 |
---|
3 | * Plugin URL: http://core.trac.wordpress.org/ticket/17090 |
---|
4 | */ |
---|
5 | |
---|
6 | if ( isset( $_GET['debug'] ) ) |
---|
7 | add_action( 'admin_init', 'debug_ticket_17090' ); |
---|
8 | function debug_ticket_17090() { |
---|
9 | global $current_site, $current_blog, $blog_id; |
---|
10 | echo '<pre>'; |
---|
11 | echo "Attempted URL: " . $_SERVER['HTTP_HOST'] . remove_query_arg( 'debug', $_SERVER['REQUEST_URI'] ) . "\n"; |
---|
12 | echo "Network admin: " . ( is_network_admin() ? 'true' : 'false' ) . "\n"; |
---|
13 | echo "Main site: " . ( is_main_site() ? 'true' : 'false' ) . "\n"; |
---|
14 | print_r( $current_site ); |
---|
15 | print_r( $current_blog ); |
---|
16 | echo '</pre>'; |
---|
17 | die(); |
---|
18 | } |
---|