Changeset 13953 for trunk/wp-admin/ms-sites.php
- Timestamp:
- 04/03/2010 12:10:44 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/ms-sites.php
r13918 r13953 5 5 wp_die( __( 'Multisite support is not enabled.' ) ); 6 6 7 if ( ! current_user_can( 'manage_sites' ) ) 8 wp_die( __( 'You do not have permission to access this page.' ) ); 9 7 10 $title = __( 'Sites' ); 8 11 $parent_file = 'ms-admin.php'; … … 11 14 12 15 require_once( './admin-header.php' ); 13 14 if ( ! current_user_can( 'manage_sites' ) )15 wp_die( __( 'You do not have permission to access this page.' ) );16 16 17 17 $id = isset( $_GET['id'] ) ? intval( $_GET['id'] ) : 0; … … 23 23 switch ( $_GET['action'] ) { 24 24 case 'all_notspam': 25 _e( 'Sites mark as notspam.' );25 _e( 'Sites removed from spam.' ); 26 26 break; 27 27 case 'all_spam': 28 _e( 'Sites mark as spam.' );28 _e( 'Sites marked as spam.' ); 29 29 break; 30 30 case 'all_delete': … … 50 50 break; 51 51 case 'unspam': 52 _e( 'Site mark as notspam.' );52 _e( 'Site removed from spam.' ); 53 53 break; 54 54 case 'spam': 55 _e( 'Site mark as spam.' );55 _e( 'Site marked as spam.' ); 56 56 break; 57 57 case 'unmature': 58 _e( 'Site mark as not mature.' );58 _e( 'Site marked as not mature.' ); 59 59 break; 60 60 case 'mature': 61 _e( 'Site mark as mature.' );61 _e( 'Site marked as mature.' ); 62 62 break; 63 63 default: … … 126 126 </td> 127 127 </tr> 128 <?php if ( ! $is_main_site ) { ?> 128 129 <tr class="form-field"> 129 130 <th scope="row"><?php _e( 'Archived' ); ?></th> … … 134 135 </tr> 135 136 <tr class="form-field"> 136 <th scope="row"><?php _e( 'Mature' ); ?></th>137 <td>138 <label><input type="radio" style="width:20px;" name="blog[mature]" value="1" <?php checked( $details->mature, 1 ); ?> /> <?php _e( 'Yes' ) ?></label>139 <label><input type="radio" style="width:20px;" name="blog[mature]" value="0" <?php checked( $details->mature, 0); ?> /> <?php _e( 'No' ) ?></label>140 </td>141 </tr>142 <tr class="form-field">143 137 <th scope="row"><?php _e( 'Spam' ); ?></th> 144 138 <td> … … 154 148 </td> 155 149 </tr> 150 <tr class="form-field"> 151 <th scope="row"><?php _e( 'Mature' ); ?></th> 152 <td> 153 <label><input type="radio" style="width:20px;" name="blog[mature]" value="1" <?php checked( $details->mature, 1 ); ?> /> <?php _e( 'Yes' ) ?></label> 154 <label><input type="radio" style="width:20px;" name="blog[mature]" value="0" <?php checked( $details->mature, 0); ?> /> <?php _e( 'No' ) ?></label> 155 </td> 156 </tr> 157 <?php } ?> 156 158 </table> 157 159 <p class="submit" style="text-align:center;"><input type="submit" name="Submit" value="<?php esc_attr_e( 'Update Options' ) ?>" /></p> … … 550 552 echo '<p>' . sprintf( _x( '%1$s – <em>%2$s', '%1$s: site name. %2$s: site tagline.' ), get_blog_option( $blog['blog_id'], 'blogname' ), get_blog_option( $blog['blog_id'], 'blogdescription ' ) ) . '</em></p>'; 551 553 552 $actions = array(); 553 $actions[] = '<span class="edit"><a href="' . esc_url( admin_url( 'ms-sites.php?action=editblog&id=' . $blog['blog_id'] ) ) . '">' . __( 'Edit' ) . '</a><span>'; 554 $actions[] = "<span class='backend'><a href='" . esc_url( get_admin_url($blog['blog_id']) ) . "' class='edit'>" . __( 'Backend' ) . '</a></span>'; 554 // Preordered. 555 $actions = array( 556 'edit' => '', 'backend' => '', 557 'activate' => '', 'deactivate' => '', 558 'archive' => '', 'unarchive' => '', 559 'spam' => '', 'unspam' => '', 560 'delete' => '', 561 'visit' => '', 562 ); 563 564 $actions['edit'] = '<span class="edit"><a href="' . esc_url( admin_url( 'ms-sites.php?action=editblog&id=' . $blog['blog_id'] ) ) . '">' . __( 'Edit' ) . '</a><span>'; 565 $actions['backend'] = "<span class='backend'><a href='" . esc_url( get_admin_url($blog['blog_id']) ) . "' class='edit'>" . __( 'Backend' ) . '</a></span>'; 555 566 if ( $current_site->blog_id != $blog['blog_id'] ) { 556 567 if ( get_blog_status( $blog['blog_id'], 'deleted' ) == '1' ) 557 $actions[ ] = '<span class="activate"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&action2=activateblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to activate the site %s" ), $blogname ) ) ) ) . '">' . __( 'Activate' ) . '</a></span>';568 $actions['activate'] = '<span class="activate"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&action2=activateblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to activate the site %s" ), $blogname ) ) ) ) . '">' . __( 'Activate' ) . '</a></span>'; 558 569 else 559 $actions[ ] = '<span class="activate"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&action2=deactivateblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to deactivate the site %s" ), $blogname ) ) ) ) . '">' . __( 'Deactivate' ) . '</a></span>';560 570 $actions['deactivate'] = '<span class="activate"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&action2=deactivateblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to deactivate the site %s" ), $blogname ) ) ) ) . '">' . __( 'Deactivate' ) . '</a></span>'; 571 561 572 if ( get_blog_status( $blog['blog_id'], 'archived' ) == '1' ) 562 $actions[ ] = '<span class="archive"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&action2=unarchiveblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to unarchive the site %s." ), $blogname ) ) ) ) . '">' . __( 'Unarchive' ) . '</a></span>';573 $actions['unarchive'] = '<span class="archive"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&action2=unarchiveblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to unarchive the site %s." ), $blogname ) ) ) ) . '">' . __( 'Unarchive' ) . '</a></span>'; 563 574 else 564 $actions[ ] = '<span class="archive"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&action2=archiveblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to archive the site %s." ), $blogname ) ) ) ) . '">' . __( 'Archive' ) . '</a></span>';565 575 $actions['archive'] = '<span class="archive"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&action2=archiveblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to archive the site %s." ), $blogname ) ) ) ) . '">' . __( 'Archive' ) . '</a></span>'; 576 566 577 if ( get_blog_status( $blog['blog_id'], 'spam' ) == '1' ) 567 $actions[ ] = '<span class="spam"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&action2=unspamblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to unspam the site %s." ), $blogname ) ) ) ) . '">' . __( 'Not Spam' ) . '</a></span>';578 $actions['unspam'] = '<span class="spam"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&action2=unspamblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to unspam the site %s." ), $blogname ) ) ) ) . '">' . __( 'Not Spam' ) . '</a></span>'; 568 579 else 569 $actions[] = '<span class="spam"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&action2=spamblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to mark the site %s as spam." ), $blogname ) ) ) ) . '">' . __( 'Spam' ) . '</a></span>'; 570 571 if ( get_blog_status( $blog['blog_id'], 'mature' ) == '1' ) 572 $actions[] = '<span class="mature"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&action2=unmatureblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to unmature the site %s." ), $blogname ) ) ) ) . '">' . __( 'Not Mature' ) . '</a></span>'; 573 else 574 $actions[] = '<span class="mature"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&action2=matureblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to mark the site %s as mature." ), $blogname ) ) ) ) . '">' . __( 'Mature' ) . '</a></span>'; 575 576 $actions[] = '<span class="delete"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&action2=deleteblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to delete the site %s." ), $blogname ) ) ) ) . '">' . __( 'Delete' ) . '</a></span>'; 580 $actions['spam'] = '<span class="spam"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&action2=spamblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to mark the site %s as spam." ), $blogname ) ) ) ) . '">' . __( 'Spam' ) . '</a></span>'; 581 582 $actions['delete'] = '<span class="delete"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&action2=deleteblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to delete the site %s." ), $blogname ) ) ) ) . '">' . __( 'Delete' ) . '</a></span>'; 577 583 } 578 584 579 $actions[ ] = "<span class='view'><a href='" . esc_url( get_home_url( $blog['blog_id'] ) ) . "' rel='permalink'>" . __( 'Visit' ) . '</a>';580 585 $actions['visit'] = "<span class='view'><a href='" . esc_url( get_home_url( $blog['blog_id'] ) ) . "' rel='permalink'>" . __( 'Visit' ) . '</a>'; 586 $actions = array_filter( $actions ); 581 587 if ( count( $actions ) ) : ?> 582 588 <div class="row-actions"> … … 601 607 case 'registered': ?> 602 608 <td valign="top"> 603 <?php 609 <?php 604 610 if ( $blog['registered'] == '0000-00-00 00:00:00' ) 605 611 echo '—';
Note: See TracChangeset
for help on using the changeset viewer.