Make WordPress Core

Changeset 16607


Ignore:
Timestamp:
11/29/2010 01:31:42 PM (16 years ago)
Author:
westi
Message:

Make the list of actions that can be performed on a site in the User List in Network admin filterable.
Add classes for all core site status types to the view url.
Move the CSS to a css file rather than including it inline.
See #15558

Location:
trunk
Files:
4 edited

Legend:

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

    r15048 r16607  
    1 #dashboard_right_now p.musub{margin-top:12px;border-top:1px solid #ececec;padding-left:16px;position:static;}#dashboard_right_now td.b a.musublink{font-size:16px;}#dashboard_right_now div.musubtable{border-top:none;}#dashboard_right_now div.musubtable .t{white-space:normal;}.ms-sites-php .postbox h3{cursor:auto;}.ms-sites-php .postbox .description{margin:10px 0 0;padding:0 10px 10px;border-bottom:1px solid #DFDFDF;}tr.site-deleted{background:#ff8573;}tr.site-spammed{background:#faa;}tr.site-archived{background:#ffebe8;}tr.site-mature{background:#fecac2;}
     1#dashboard_right_now p.musub{margin-top:12px;border-top:1px solid #ececec;padding-left:16px;position:static;}#dashboard_right_now td.b a.musublink{font-size:16px;}#dashboard_right_now div.musubtable{border-top:none;}#dashboard_right_now div.musubtable .t{white-space:normal;}.ms-sites-php .postbox h3{cursor:auto;}.ms-sites-php .postbox .description{margin:10px 0 0;padding:0 10px 10px;border-bottom:1px solid #DFDFDF;}tr.site-deleted,a.site-deleted{background:#ff8573;}tr.site-spammed,a.site-spammed{background:#faa;}tr.site-archived,a.site-archived{background:#ffebe8;}tr.site-mature,a.site-mature{background:#fecac2;}
  • trunk/wp-admin/css/ms.dev.css

    r15048 r16607  
    3131
    3232/* Background Color for Site Status */
    33 tr.site-deleted {
     33tr.site-deleted, a.site-deleted {
    3434        background: #ff8573;
    3535}
    36 tr.site-spammed {
     36tr.site-spammed, a.site-spammed {
    3737        background: #faa;
    3838}
    39 tr.site-archived {
     39tr.site-archived, a.site-archived {
    4040        background:#ffebe8;
    4141}
    42 tr.site-mature {
     42tr.site-mature, a.site-mature {
    4343        background: #fecac2;
    4444}
     45
  • trunk/wp-admin/includes/class-wp-ms-users-list-table.php

    r16601 r16607  
    218218                                                        if ( is_array( $blogs ) ) {
    219219                                                                foreach ( (array) $blogs as $key => $val ) {
    220                                                                         $path   = ( $val->path == '/' ) ? '' : $val->path;
     220                                                                        if ( $current_site->id != $val->site_id ) continue;
     221                                                                       
     222                                                                                $path   = ( $val->path == '/' ) ? '' : $val->path;
    221223                                                                        echo '<a href="'. esc_url( network_admin_url( 'site-info.php?id=' . $val->userblog_id ) ) .'">' . str_replace( '.' . $current_site->domain, '', $val->domain . $path ) . '</a>';
    222224                                                                        echo ' <small class="row-actions">';
    223 
    224                                                                         // Edit
    225                                                                         echo '<a href="'. esc_url( network_admin_url( 'site-info.php?id=' . $val->userblog_id ) ) .'">' . __( 'Edit' ) . '</a> | ';
    226 
    227                                                                         // View
    228                                                                         echo '<a ';
     225                                                                        $actions = array();
     226                                                                        $actions['edit'] = '<a href="'. esc_url( network_admin_url( 'site-info.php?id=' . $val->userblog_id ) ) .'">' . __( 'Edit' ) . '</a>';
     227                                                                       
     228                                                                        $class = '';
    229229                                                                        if ( get_blog_status( $val->userblog_id, 'spam' ) == 1 )
    230                                                                                 echo 'style="background-color: #faa" ';
    231                                                                         echo 'href="' .  esc_url( get_home_url( $val->userblog_id ) )  . '">' . __( 'View' ) . '</a>';
    232 
    233                                                                         echo '</small><br />';
     230                                                                                $class .= 'site-spammed ';
     231                                                                        if ( get_blog_status( $val->userblog_id, 'mature' ) == 1 )
     232                                                                                $class .= 'site-mature ';
     233                                                                        if ( get_blog_status( $val->userblog_id, 'deleted' ) == 1 )
     234                                                                                $class .= 'site-deleted ';
     235                                                                        if ( get_blog_status( $val->userblog_id, 'archived' ) == 1 )
     236                                                                                $class .= 'site-archived ';
     237                                                                       
     238                                                                        $actions['view'] = '<a class="' . $class . '" href="' .  esc_url( get_home_url( $val->userblog_id ) )  . '">' . __( 'View' ) . '</a>';
     239                                                                       
     240                                                                        $actions = apply_filters('ms_user_list_site_actions', $actions, $val->userblog_id);
     241                                                                       
     242                                                                        $i=0;
     243                                                                        $action_count = count( $actions );
     244                                                                        foreach ( $actions as $action => $link ) {
     245                                                                                ++$i;
     246                                                                                ( $i == $action_count ) ? $sep = '' : $sep = ' | ';
     247                                                                                echo "<span class='$action'>$link$sep</span>";
     248                                                                        }
     249                                                                        echo '</small><br/>';
    234250                                                                }
    235251                                                        }
  • trunk/wp-includes/script-loader.php

    r16602 r16607  
    501501        $styles->add( 'colors-classic', "/wp-admin/css/colors-classic$suffix.css", array(), $colors_version );
    502502
    503         $styles->add( 'ms', "/wp-admin/css/ms$suffix.css", array(), '20100528' );
     503        $styles->add( 'ms', "/wp-admin/css/ms$suffix.css", array(), '20101129' );
    504504        $styles->add( 'global', "/wp-admin/css/global$suffix.css", array(), '20101105' );
    505505        $styles->add( 'media', "/wp-admin/css/media$suffix.css", array(), '20101020' );
Note: See TracChangeset for help on using the changeset viewer.