Make WordPress Core


Ignore:
Timestamp:
01/08/2010 08:29:56 PM (17 years ago)
Author:
ryan
Message:

Use is_super_admin() instead of is_site_admin(). Props GIGALinux see #11644

File:
1 edited

Legend:

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

    r12670 r12672  
    577577
    578578function check_import_new_users( $permission ) {
    579         if ( !is_site_admin() )
     579        if ( !is_super_admin() )
    580580                return false;
    581581        return true;
    … …  
    649649/* Warn the admin if SECRET SALT information is missing from wp-config.php */
    650650function secret_salt_warning() {
    651         if( !is_site_admin() )
     651        if( !is_super_admin() )
    652652                return;
    653653        $secret_keys = array( 'NONCE_KEY', 'AUTH_KEY', 'AUTH_SALT', 'LOGGED_IN_KEY', 'LOGGED_IN_SALT', 'SECURE_AUTH_KEY', 'SECURE_AUTH_SALT' );
    … …  
    715715                $msg .= "<p>" . $content . " <a href='$link'>" . __( 'Read More' ) . "</a> <a href='index.php?feed_dismiss=" . md5( $item[ 'title' ] ) . "'>" . __( "Dismiss" ) . "</a></p>";
    716716                echo "<div class='updated fade'>$msg</div>";
    717         } elseif( is_site_admin() ) {
     717        } elseif( is_super_admin() ) {
    718718                printf("<div id='update-nag'>" . __("Your feed at %s is empty.") . "</div>", wp_specialchars( $url ));
    719719        }
    … …  
    723723function site_admin_notice() {
    724724        global $current_user, $wp_db_version;
    725         if( !is_site_admin() )
     725        if( !is_super_admin() )
    726726                return false;
    727727        printf("<div id='update-nag'>" . __("Hi %s! You're logged in as a site administrator.") . "</div>", $current_user->user_login);
    … …  
    813813 */
    814814function add_sitewide_activate_row( $file, $plugin_data, $context ) {
    815         if ( !is_site_admin() )
     815        if ( !is_super_admin() )
    816816                return false;
    817817
    … …  
    860860        $all_plugins = get_plugins();
    861861
    862         if ( !is_site_admin() )
     862        if ( !is_super_admin() )
    863863                return false;
    864864
    … …  
    964964
    965965        /* Now unset any sitewide only plugins if the user is not a site admin */
    966         if ( !is_site_admin() ) {
     966        if ( !is_super_admin() ) {
    967967                foreach ( $inactive_plugins as $plugin_name => $activated_time ) {
    968968                        if ( is_wpmu_sitewide_plugin( $plugin_name ) )
    … …  
    10071007
    10081008                /* Silently activate because the activate_* hook has already run. */
    1009                 if ( is_site_admin() ) {
     1009                if ( is_super_admin() ) {
    10101010                        $_GET['sitewide'] = true;
    10111011                        activate_sitewide_plugin( $_GET['plugin'], true );
    … …  
    10251025                                deactivate_plugins( $plugin );
    10261026
    1027                                 if ( is_site_admin() )
     1027                                if ( is_super_admin() )
    10281028                                        activate_sitewide_plugin( $plugin );
    10291029                        }
    … …  
    10911091
    10921092        if ( strpos( $_SERVER['PHP_SELF'], 'user-new.php' ) && !get_site_option( 'add_new_users' ) ) {
    1093                 if ( is_site_admin() ) {
     1093                if ( is_super_admin() ) {
    10941094                        $messages[] = '<div id="message" class="updated fade"><p>' . __( 'Warning! Only site administrators may see this page. Everyone else will see a <em>page disabled</em> message. Enable it again on <a href="ms-options.php#addnewusers">the options page</a>.' ) . '</p></div>';
    10951095                } else {
    … …  
    11071107        $pages = array( 'theme-install.php', 'plugin-install.php' );
    11081108        foreach( $pages as $page ) {
    1109                 if ( strpos( $_SERVER['PHP_SELF'], $page ) && !is_site_admin() ) {
     1109                if ( strpos( $_SERVER['PHP_SELF'], $page ) && !is_super_admin() ) {
    11101110                        wp_die( __( "Sorry, you're not allowed here." ) );
    11111111                }
    … …  
    12481248
    12491249function show_post_thumbnail_warning() {
    1250         if ( false == is_site_admin() ) {
     1250        if ( false == is_super_admin() ) {
    12511251                return;
    12521252        }
Note: See TracChangeset for help on using the changeset viewer.