Make WordPress Core

Changeset 19323


Ignore:
Timestamp:
11/17/2011 06:52:58 PM (13 years ago)
Author:
ryan
Message:

Don't die in my-sites.php if the user has no sites. Intead, display message within admin chrome. Props trepmal. fixes #18935

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/my-sites.php

    r19121 r19323  
    1919
    2020$blogs = get_blogs_of_user( $current_user->ID );
    21 
    22 if ( empty( $blogs ) )
    23     wp_die( __( 'You must be a member of at least one site to use this page.' ) );
    2421
    2522$updated = false;
     
    5956<?php screen_icon(); ?>
    6057<h2><?php echo esc_html( $title ); ?></h2>
     58<?php
     59if ( empty( $blogs ) ) :
     60    echo '<p>';
     61    _e( 'You must be a member of at least one site to use this page.' );
     62    echo '</p>';
     63else :
     64?>
    6165<form id="myblogs" action="" method="post">
    6266    <?php
     
    108112    <?php submit_button(); ?>
    109113    </form>
     114<?php endif; ?>
    110115    </div>
    111116<?php
Note: See TracChangeset for help on using the changeset viewer.