Make WordPress Core

Changeset 18869


Ignore:
Timestamp:
10/03/2011 02:35:43 PM (15 years ago)
Author:
ryan
Message:

Implement bulk update for network/themes.php. Props ocean90. fixes #18687

File:
1 edited

Legend:

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

    r18867 r18869  
    7575                        update_site_option( 'allowedthemes', $allowed_themes );
    7676                        wp_redirect( add_query_arg( 'disabled', count( $themes ), $referer ) );
     77                        exit;
     78                        break;
     79                case 'update-selected' :
     80                        check_admin_referer( 'bulk-themes' );
     81
     82                        if ( isset( $_GET['themes'] ) )
     83                                $themes = explode( ',', $_GET['themes'] );
     84                        elseif ( isset( $_POST['checked'] ) )
     85                                $themes = (array) $_POST['checked'];
     86                        else
     87                                $themes = array();
     88
     89                        $title = __( 'Update Themes' );
     90                        $parent_file = 'themes.php';
     91
     92                        require_once(ABSPATH . 'wp-admin/admin-header.php');
     93
     94                        echo '<div class="wrap">';
     95                        screen_icon();
     96                        echo '<h2>' . esc_html( $title ) . '</h2>';
     97
     98
     99                        $url = self_admin_url('update.php?action=update-selected-themes&amp;themes=' . urlencode( join(',', $themes) ));
     100                        $url = wp_nonce_url($url, 'bulk-update-themes');
     101
     102                        echo "<iframe src='$url' style='width: 100%; height:100%; min-height:850px;'></iframe>";
     103                        echo '</div>';
     104                        require_once(ABSPATH . 'wp-admin/admin-footer.php');
    77105                        exit;
    78106                        break;
Note: See TracChangeset for help on using the changeset viewer.