Make WordPress Core

Ticket #32512: 32512.diff

File 32512.diff, 8.4 KB (added by jeremyfelt, 10 years ago)
  • src/wp-admin/includes/class-wp-ms-sites-list-table.php

     
    214214
    215215                        $blog_states = array();
    216216                        foreach ( $status_list as $status => $col ) {
    217                                 if ( get_blog_status( $blog['blog_id'], $status ) == 1 ) {
     217                                if ( $blog[ $status ] == 1 ) {
    218218                                        $class = " class='{$col[0]}'";
    219219                                        $blog_states[] = $col[1];
    220220                                }
     
    283283                                                        $actions['edit']        = '<span class="edit"><a href="' . esc_url( network_admin_url( 'site-info.php?id=' . $blog['blog_id'] ) ) . '">' . __( 'Edit' ) . '</a></span>';
    284284                                                        $actions['backend']     = "<span class='backend'><a href='" . esc_url( get_admin_url( $blog['blog_id'] ) ) . "' class='edit'>" . __( 'Dashboard' ) . '</a></span>';
    285285                                                        if ( get_current_site()->blog_id != $blog['blog_id'] ) {
    286                                                                 if ( get_blog_status( $blog['blog_id'], 'deleted' ) == '1' )
    287                                                                         $actions['activate']    = '<span class="activate"><a href="' . esc_url( wp_nonce_url( network_admin_url( 'sites.php?action=confirm&amp;action2=activateblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to activate the site %s' ), $blogname ) ) ), 'confirm' ) ) . '">' . __( 'Activate' ) . '</a></span>';
    288                                                                 else
    289                                                                         $actions['deactivate']  = '<span class="activate"><a href="' . esc_url( wp_nonce_url( network_admin_url( 'sites.php?action=confirm&amp;action2=deactivateblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to deactivate the site %s' ), $blogname ) ) ), 'confirm') ) . '">' . __( 'Deactivate' ) . '</a></span>';
     286                                                                if ( $blog['deleted'] == '1' ) {
     287                                                                        $actions['activate']   = '<span class="activate"><a href="' . esc_url( wp_nonce_url( network_admin_url( 'sites.php?action=confirm&amp;action2=activateblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to activate the site %s' ), $blogname ) ) ), 'confirm' ) ) . '">' . __( 'Activate' ) . '</a></span>';
     288                                                                } else {
     289                                                                        $actions['deactivate'] = '<span class="activate"><a href="' . esc_url( wp_nonce_url( network_admin_url( 'sites.php?action=confirm&amp;action2=deactivateblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to deactivate the site %s' ), $blogname ) ) ), 'confirm' ) ) . '">' . __( 'Deactivate' ) . '</a></span>';
     290                                                                }
    290291
    291                                                                 if ( get_blog_status( $blog['blog_id'], 'archived' ) == '1' )
    292                                                                         $actions['unarchive']   = '<span class="archive"><a href="' . esc_url( wp_nonce_url( network_admin_url( 'sites.php?action=confirm&amp;action2=unarchiveblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to unarchive the site %s.' ), $blogname ) ) ), 'confirm') ) . '">' . __( 'Unarchive' ) . '</a></span>';
    293                                                                 else
    294                                                                         $actions['archive']     = '<span class="archive"><a href="' . esc_url( wp_nonce_url( network_admin_url( 'sites.php?action=confirm&amp;action2=archiveblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to archive the site %s.' ), $blogname ) ) ), 'confirm') ) . '">' . _x( 'Archive', 'verb; site' ) . '</a></span>';
     292                                                                if ( $blog['archived'] == '1' ) {
     293                                                                        $actions['unarchive'] = '<span class="archive"><a href="' . esc_url( wp_nonce_url( network_admin_url( 'sites.php?action=confirm&amp;action2=unarchiveblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to unarchive the site %s.' ), $blogname ) ) ), 'confirm' ) ) . '">' . __( 'Unarchive' ) . '</a></span>';
     294                                                                } else {
     295                                                                        $actions['archive']   = '<span class="archive"><a href="' . esc_url( wp_nonce_url( network_admin_url( 'sites.php?action=confirm&amp;action2=archiveblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to archive the site %s.' ), $blogname ) ) ), 'confirm' ) ) . '">' . _x( 'Archive', 'verb; site' ) . '</a></span>';
     296                                                                }
    295297
    296                                                                 if ( get_blog_status( $blog['blog_id'], 'spam' ) == '1' )
    297                                                                         $actions['unspam']      = '<span class="spam"><a href="' . esc_url( wp_nonce_url( network_admin_url( 'sites.php?action=confirm&amp;action2=unspamblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to unspam the site %s.' ), $blogname ) ) ), 'confirm') ) . '">' . _x( 'Not Spam', 'site' ) . '</a></span>';
    298                                                                 else
    299                                                                         $actions['spam']        = '<span class="spam"><a href="' . esc_url( wp_nonce_url( network_admin_url( 'sites.php?action=confirm&amp;action2=spamblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to mark the site %s as spam.' ), $blogname ) ) ), 'confirm') ) . '">' . _x( 'Spam', 'site' ) . '</a></span>';
     298                                                                if ( $blog['spam'] == '1' ) {
     299                                                                        $actions['unspam'] = '<span class="spam"><a href="' . esc_url( wp_nonce_url( network_admin_url( 'sites.php?action=confirm&amp;action2=unspamblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to unspam the site %s.' ), $blogname ) ) ), 'confirm' ) ) . '">' . _x( 'Not Spam', 'site' ) . '</a></span>';
     300                                                                } else {
     301                                                                        $actions['spam']   = '<span class="spam"><a href="' . esc_url( wp_nonce_url( network_admin_url( 'sites.php?action=confirm&amp;action2=spamblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to mark the site %s as spam.' ), $blogname ) ) ), 'confirm' ) ) . '">' . _x( 'Spam', 'site' ) . '</a></span>';
     302                                                                }
    300303
    301                                                                 if ( current_user_can( 'delete_site', $blog['blog_id'] ) )
    302                                                                         $actions['delete']      = '<span class="delete"><a href="' . esc_url( wp_nonce_url( network_admin_url( 'sites.php?action=confirm&amp;action2=deleteblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to delete the site %s.' ), $blogname ) ) ), 'confirm') ) . '">' . __( 'Delete' ) . '</a></span>';
     304                                                                if ( current_user_can( 'delete_site', $blog['blog_id'] ) ) {
     305                                                                        $actions['delete'] = '<span class="delete"><a href="' . esc_url( wp_nonce_url( network_admin_url( 'sites.php?action=confirm&amp;action2=deleteblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to delete the site %s.' ), $blogname ) ) ), 'confirm' ) ) . '">' . __( 'Delete' ) . '</a></span>';
     306                                                                }
    303307                                                        }
    304308
    305309                                                        $actions['visit']       = "<span class='view'><a href='" . esc_url( get_home_url( $blog['blog_id'], '/' ) ) . "' rel='permalink'>" . __( 'Visit' ) . '</a></span>';
  • src/wp-admin/includes/class-wp-ms-users-list-table.php

     
    252252                                                                        $actions['edit'] = '<a href="'. esc_url( network_admin_url( 'site-info.php?id=' . $val->userblog_id ) ) .'">' . __( 'Edit' ) . '</a>';
    253253
    254254                                                                        $class = '';
    255                                                                         if ( get_blog_status( $val->userblog_id, 'spam' ) == 1 )
     255                                                                        if ( $val->spam == 1 ) {
    256256                                                                                $class .= 'site-spammed ';
    257                                                                         if ( get_blog_status( $val->userblog_id, 'mature' ) == 1 )
     257                                                                        }
     258                                                                        if ( $val->mature == 1 ) {
    258259                                                                                $class .= 'site-mature ';
    259                                                                         if ( get_blog_status( $val->userblog_id, 'deleted' ) == 1 )
     260                                                                        }
     261                                                                        if ( $val->deleted == 1 ) {
    260262                                                                                $class .= 'site-deleted ';
    261                                                                         if ( get_blog_status( $val->userblog_id, 'archived' ) == 1 )
     263                                                                        }
     264                                                                        if ( $val->archived == 1 ) {
    262265                                                                                $class .= 'site-archived ';
     266                                                                        }
    263267
    264268                                                                        $actions['view'] = '<a class="' . $class . '" href="' . esc_url( get_home_url( $val->userblog_id ) ) . '">' . __( 'View' ) . '</a>';
    265269
  • src/wp-includes/user.php

     
    11761176                                'site_id'     => $blog->site_id,
    11771177                                'siteurl'     => $blog->siteurl,
    11781178                                'archived'    => $blog->archived,
     1179                                'mature'      => $blog->mature,
    11791180                                'spam'        => $blog->spam,
    11801181                                'deleted'     => $blog->deleted,
    11811182                        );
     
    12051206                                'site_id'     => $blog->site_id,
    12061207                                'siteurl'     => $blog->siteurl,
    12071208                                'archived'    => $blog->archived,
     1209                                'mature'      => $blog->mature,
    12081210                                'spam'        => $blog->spam,
    12091211                                'deleted'     => $blog->deleted,
    12101212                        );