+
+ if ( ! current_user_can( 'update_plugins' ) )
+ wp_die( __( 'You do not have sufficient permissions to update this site.' ) );
+
+ check_admin_referer('upgrade-core');
+
+ if ( isset( $_GET['plugins'] ) ) {
+ $plugins = explode( ',', $_GET['plugins'] );
+ } elseif ( isset( $_POST['checked'] ) ) {
+ $plugins = (array) $_POST['checked'];
+ } else {
+ wp_redirect( admin_url('update-core.php') );
+ exit;
+ }
+
+ $url = 'update.php?action=update-selected&plugins=' . urlencode(implode(',', $plugins));
+ $url = wp_nonce_url($url, 'bulk-update-plugins');
+
+ $title = __('Update Plugins');
+
+ require_once(ABSPATH . 'wp-admin/admin-header.php');
+ echo '<div class="wrap">';
+ screen_icon('plugins');
+ echo '<h2>' . esc_html__('Update Plugins') . '</h2>';
+ echo "<iframe src='$url' style='width: 100%; height: 100%; min-height: 750px;' frameborder='0'></iframe>";
+ echo '</div>';
+
+} elseif ( 'do-theme-upgrade' == $action ) {
+
+ if ( ! current_user_can( 'update_themes' ) )
+ wp_die( __( 'You do not have sufficient permissions to update this site.' ) );
+