Make WordPress Core


Ignore:
Timestamp:
11/30/2012 01:40:59 PM (12 years ago)
Author:
ryan
Message:

Scope button classes so they can be used on the frontend without interfering with theme styles.

Props helenyhou, koopersmith
fixes #22644

File:
1 edited

Legend:

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

    r22419 r22948  
    5454    if ( 'confirm' === $_GET['action'] ) {
    5555        check_admin_referer( 'confirm' );
    56        
     56
    5757        if ( ! headers_sent() ) {
    5858            nocache_headers();
     
    7373                ?>
    7474            </head>
    75             <body>
     75            <body class="wp-core-ui">
    7676                <h1 id="logo"><a href="<?php esc_attr_e( 'http://wordpress.org/' ); ?>"><?php _e( 'WordPress' ); ?></a></h1>
    7777                <form action="sites.php?action=<?php echo esc_attr( $_GET['action2'] ) ?>" method="post">
     
    8686        </html>
    8787        <?php
    88         exit(); 
    89     }
    90    
     88        exit();
     89    }
     90
    9191    $updated_action = '';
    92    
     92
    9393    $manage_actions = array( 'deleteblog', 'allblogs', 'archiveblog', 'unarchiveblog', 'activateblog', 'deactivateblog', 'unspamblog', 'spamblog', 'unmatureblog', 'matureblog' );
    94     if ( in_array( $_GET['action'], $manage_actions ) ) {       
     94    if ( in_array( $_GET['action'], $manage_actions ) ) {
    9595        $action = $_GET['action'];
    9696        if ( 'allblogs' === $action )
     
    9898
    9999        check_admin_referer( $action );
    100     } 
    101        
     100    }
     101
    102102    switch ( $_GET['action'] ) {
    103103
     
    109109            if ( $id != '0' && $id != $current_site->blog_id && current_user_can( 'delete_site', $id ) ) {
    110110                wpmu_delete_blog( $id, true );
    111                 $updated_action = 'delete'; 
     111                $updated_action = 'delete';
    112112            }
    113113        break;
     
    116116            if ( ( isset( $_POST['action'] ) || isset( $_POST['action2'] ) ) && isset( $_POST['allblogs'] ) ) {
    117117                $doaction = $_POST['action'] != -1 ? $_POST['action'] : $_POST['action2'];
    118                
     118
    119119                foreach ( (array) $_POST['allblogs'] as $key => $val ) {
    120120                    if ( $val != '0' && $val != $current_site->blog_id ) {
     
    123123                                if ( ! current_user_can( 'delete_site', $val ) )
    124124                                    wp_die( __( 'You are not allowed to delete the site.' ) );
    125                                
     125
    126126                                $updated_action = 'all_delete';
    127127                                wpmu_delete_blog( $val, true );
     
    163163            update_blog_status( $id, 'spam', ( 'spamblog' === $_GET['action'] ) ? '1' : '0' );
    164164        break;
    165    
     165
    166166        case 'unmatureblog':
    167167        case 'matureblog':
     
    169169        break;
    170170    }
    171    
     171
    172172    if ( empty( $updated_action ) && in_array( $_GET['action'], $manage_actions ) )
    173173        $updated_action = $_GET['action'];
    174    
     174
    175175    if ( ! empty( $updated_action ) ) {
    176176        wp_safe_redirect( add_query_arg( array( 'updated' => $updated_action ), wp_get_referer() ) );
     
    219219        break;
    220220    }
    221    
     221
    222222    if ( ! empty( $msg ) )
    223223        $msg = '<div class="updated" id="message"><p>' . $msg . '</p></div>';
     
    232232<?php screen_icon( 'ms-admin' ); ?>
    233233<h2><?php _e( 'Sites' ) ?>
    234    
     234
    235235<?php if ( current_user_can( 'create_sites') ) : ?>
    236236    <a href="<?php echo network_admin_url('site-new.php'); ?>" class="add-new-h2"><?php echo esc_html_x( 'Add New', 'site' ); ?></a>
     
    242242</h2>
    243243
    244 <?php echo $msg; ?> 
    245    
     244<?php echo $msg; ?>
     245
    246246<form action="" method="get" id="ms-search">
    247247<?php $wp_list_table->search_box( __( 'Search Sites' ), 'site' ); ?>
Note: See TracChangeset for help on using the changeset viewer.