Make WordPress Core


Ignore:
Timestamp:
12/07/2010 02:28:40 PM (14 years ago)
Author:
westi
Message:

Introduce can_edit_site to replace inline checks on whether or not the site_id is for the current Network. See #15716.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-ms-users-list-table.php

    r16607 r16764  
    218218                            if ( is_array( $blogs ) ) {
    219219                                foreach ( (array) $blogs as $key => $val ) {
    220                                     if ( $current_site->id != $val->site_id ) continue;
    221                                    
    222                                         $path   = ( $val->path == '/' ) ? '' : $val->path;
     220                                    if ( !can_edit_site( $val->site_id ) )
     221                                        continue;
     222                                   
     223                                    $path   = ( $val->path == '/' ) ? '' : $val->path;
    223224                                    echo '<a href="'. esc_url( network_admin_url( 'site-info.php?id=' . $val->userblog_id ) ) .'">' . str_replace( '.' . $current_site->domain, '', $val->domain . $path ) . '</a>';
    224                                     echo ' <small class="row-actions">';
     225                                    echo ' <small class="row-actions site-' . $val->site_id . '">';
    225226                                    $actions = array();
    226227                                    $actions['edit'] = '<a href="'. esc_url( network_admin_url( 'site-info.php?id=' . $val->userblog_id ) ) .'">' . __( 'Edit' ) . '</a>';
Note: See TracChangeset for help on using the changeset viewer.