[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

title

Body

[close]

/wp-admin/network/ -> admin.php (source)

   1  <?php
   2  /**
   3   * WordPress Network Administration Bootstrap
   4   *
   5   * @package WordPress
   6   * @subpackage Multisite
   7   * @since 3.1.0
   8   */
   9  
  10  define( 'WP_NETWORK_ADMIN', true );
  11  
  12  /** Load WordPress Administration Bootstrap */
  13  require_once( dirname( dirname( __FILE__ ) ) . '/admin.php' );
  14  
  15  // Do not remove this check. It is required by individual network admin pages.
  16  if ( ! is_multisite() ) {
  17      wp_die( __( 'Multisite support is not enabled.' ) );
  18  }
  19  
  20  $redirect_network_admin_request = 0 !== strcasecmp( $current_blog->domain, $current_site->domain ) || 0 !== strcasecmp( $current_blog->path, $current_site->path );
  21  
  22  /**
  23   * Filters whether to redirect the request to the Network Admin.
  24   *
  25   * @since 3.2.0
  26   *
  27   * @param bool $redirect_network_admin_request Whether the request should be redirected.
  28   */
  29  $redirect_network_admin_request = apply_filters( 'redirect_network_admin_request', $redirect_network_admin_request );
  30  if ( $redirect_network_admin_request ) {
  31      wp_redirect( network_admin_url() );
  32      exit;
  33  }
  34  unset( $redirect_network_admin_request );


Generated: Sat Nov 23 20:47:33 2019 Cross-referenced by PHPXref 0.7