| @@ 120-146 (lines=27) @@ | ||
| 117 | wp_redirect( self_admin_url("plugins.php?activate-multi=true&plugin_status=$status&paged=$page&s=$s") ); |
|
| 118 | exit; |
|
| 119 | ||
| 120 | case 'update-selected' : |
|
| 121 | ||
| 122 | check_admin_referer( 'bulk-plugins' ); |
|
| 123 | ||
| 124 | if ( isset( $_GET['plugins'] ) ) |
|
| 125 | $plugins = explode( ',', $_GET['plugins'] ); |
|
| 126 | elseif ( isset( $_POST['checked'] ) ) |
|
| 127 | $plugins = (array) $_POST['checked']; |
|
| 128 | else |
|
| 129 | $plugins = array(); |
|
| 130 | ||
| 131 | $title = __( 'Update Plugins' ); |
|
| 132 | $parent_file = 'plugins.php'; |
|
| 133 | ||
| 134 | wp_enqueue_script( 'updates' ); |
|
| 135 | require_once(ABSPATH . 'wp-admin/admin-header.php'); |
|
| 136 | ||
| 137 | echo '<div class="wrap">'; |
|
| 138 | echo '<h1>' . esc_html( $title ) . '</h1>'; |
|
| 139 | ||
| 140 | $url = self_admin_url('update.php?action=update-selected&plugins=' . urlencode( join(',', $plugins) )); |
|
| 141 | $url = wp_nonce_url($url, 'bulk-update-plugins'); |
|
| 142 | ||
| 143 | echo "<iframe src='$url' style='width: 100%; height:100%; min-height:850px;'></iframe>"; |
|
| 144 | echo '</div>'; |
|
| 145 | require_once(ABSPATH . 'wp-admin/admin-footer.php'); |
|
| 146 | exit; |
|
| 147 | ||
| 148 | case 'error_scrape': |
|
| 149 | if ( ! current_user_can('activate_plugins') ) |
|
| @@ 63-87 (lines=25) @@ | ||
| 60 | WP_Theme::network_disable_theme( (array) $themes ); |
|
| 61 | wp_safe_redirect( add_query_arg( 'disabled', count( $themes ), $referer ) ); |
|
| 62 | exit; |
|
| 63 | case 'update-selected' : |
|
| 64 | check_admin_referer( 'bulk-themes' ); |
|
| 65 | ||
| 66 | if ( isset( $_GET['themes'] ) ) |
|
| 67 | $themes = explode( ',', $_GET['themes'] ); |
|
| 68 | elseif ( isset( $_POST['checked'] ) ) |
|
| 69 | $themes = (array) $_POST['checked']; |
|
| 70 | else |
|
| 71 | $themes = array(); |
|
| 72 | ||
| 73 | $title = __( 'Update Themes' ); |
|
| 74 | $parent_file = 'themes.php'; |
|
| 75 | ||
| 76 | require_once(ABSPATH . 'wp-admin/admin-header.php'); |
|
| 77 | ||
| 78 | echo '<div class="wrap">'; |
|
| 79 | echo '<h1>' . esc_html( $title ) . '</h1>'; |
|
| 80 | ||
| 81 | $url = self_admin_url('update.php?action=update-selected-themes&themes=' . urlencode( join(',', $themes) )); |
|
| 82 | $url = wp_nonce_url($url, 'bulk-update-themes'); |
|
| 83 | ||
| 84 | echo "<iframe src='$url' style='width: 100%; height:100%; min-height:850px;'></iframe>"; |
|
| 85 | echo '</div>'; |
|
| 86 | require_once(ABSPATH . 'wp-admin/admin-footer.php'); |
|
| 87 | exit; |
|
| 88 | case 'delete-selected': |
|
| 89 | if ( ! current_user_can( 'delete_themes' ) ) { |
|
| 90 | wp_die( __('Sorry, you are not allowed to delete themes for this site.') ); |
|