WordPress.org

Make WordPress Core

Changeset 12609


Ignore:
Timestamp:
01/06/2010 08:19:35 PM (9 years ago)
Author:
ryan
Message:

Introduce is_multisite(). see #11644

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/ms-admin.php

    r12605 r12609  
    11<?php
    22require_once('admin.php');
     3
     4if ( !is_multisite() )
     5    wp_die( __('Multisite support is not enabled.') );
    36
    47$title = __('WordPress MU &rsaquo; Admin');
     
    1215require_once('admin-header.php');
    1316
    14 if( is_site_admin() == false ) {
     17if ( is_site_admin() == false ) {
    1518    wp_die( __('You do not have permission to access this page.') );
    1619}
  • trunk/wp-admin/ms-edit.php

    r12605 r12609  
    11<?php
    22require_once('admin.php');
     3
     4if ( !is_multisite() )
     5    wp_die( __('Multisite support is not enabled.') );
     6
    37if( is_site_admin() == false ) {
    48    wp_die( __('You do not have permission to access this page.') );
  • trunk/wp-admin/ms-options.php

    r12605 r12609  
    11<?php
    22require_once('admin.php');
     3
     4if ( !is_multisite() )
     5    wp_die( __('Multisite support is not enabled.') );
     6
    37$title = __('WordPress MU &rsaquo; Admin &rsaquo; Site Options');
    48$parent_file = 'wpmu-admin.php';
  • trunk/wp-admin/ms-sites.php

    r12605 r12609  
    11<?php
    22require_once('admin.php');
     3
     4if ( !is_multisite() )
     5    wp_die( __('Multisite support is not enabled.') );
    36
    47$title = __('WordPress MU &rsaquo; Admin &rsaquo; Blogs');
  • trunk/wp-admin/ms-upgrade-site.php

    r12605 r12609  
    11<?php
    22require_once('admin.php');
     3
     4if ( !is_multisite() )
     5    wp_die( __('Multisite support is not enabled.') );
     6
    37require_once( ABSPATH . WPINC . '/http.php' );
    48
     
    711require_once('admin-header.php');
    812
    9 if( is_site_admin() == false ) {
     13if ( is_site_admin() == false ) {
    1014    wp_die( __('You do not have permission to access this page.') );
    1115}
  • trunk/wp-admin/ms-users.php

    r12605 r12609  
    11<?php
    22require_once('admin.php');
     3
     4if ( !is_multisite() )
     5    wp_die( __('Multisite support is not enabled.') );
    36
    47$title = __('WordPress MU &rsaquo; Admin &rsaquo; Users');
  • trunk/wp-settings.php

    r12393 r12609  
    321321    if ( defined('WP_ADMIN') )
    322322        return WP_ADMIN;
     323    return false;
     324}
     325
     326/**
     327 * Whether Multisite support is enabled
     328 *
     329 * @since 3.0
     330 *
     331 * @return bool True if multisite is enabled, false otherwise.
     332 */
     333function is_multisite() {
     334    if ( defined('MULTISITE') )
     335        return true;
     336
    323337    return false;
    324338}
     
    389403require (ABSPATH . WPINC . '/widgets.php');
    390404
     405if ( is_multisite() ) {
     406    require_once( ABSPATH . WPINC . '/ms-functions.php' );
     407    require_once( ABSPATH . WPINC . '/ms-default-filters.php' );
     408}
     409
    391410if ( !defined('WP_CONTENT_URL') )
    392411    define( 'WP_CONTENT_URL', get_option('siteurl') . '/wp-content'); // full url - WP_CONTENT_DIR is defined further up
Note: See TracChangeset for help on using the changeset viewer.