PageRenderTime 50ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 1ms

/wp-admin/plugins.php

https://gitlab.com/webkod3r/tripolis
PHP | 529 lines | 411 code | 84 blank | 34 comment | 84 complexity | 9e3b41ec24c3fe40e052f215f8acfc09 MD5 | raw file
  1. <?php
  2. /**
  3. * Plugins administration panel.
  4. *
  5. * @package WordPress
  6. * @subpackage Administration
  7. */
  8. /** WordPress Administration Bootstrap */
  9. require_once( dirname( __FILE__ ) . '/admin.php' );
  10. if ( ! current_user_can('activate_plugins') )
  11. wp_die( __( 'You do not have sufficient permissions to manage plugins for this site.' ) );
  12. $wp_list_table = _get_list_table('WP_Plugins_List_Table');
  13. $pagenum = $wp_list_table->get_pagenum();
  14. $action = $wp_list_table->current_action();
  15. $plugin = isset($_REQUEST['plugin']) ? $_REQUEST['plugin'] : '';
  16. $s = isset($_REQUEST['s']) ? urlencode( wp_unslash( $_REQUEST['s'] ) ) : '';
  17. // Clean up request URI from temporary args for screen options/paging uri's to work as expected.
  18. $_SERVER['REQUEST_URI'] = remove_query_arg(array('error', 'deleted', 'activate', 'activate-multi', 'deactivate', 'deactivate-multi', '_error_nonce'), $_SERVER['REQUEST_URI']);
  19. wp_enqueue_script( 'updates' );
  20. if ( $action ) {
  21. switch ( $action ) {
  22. case 'activate':
  23. if ( ! current_user_can('activate_plugins') )
  24. wp_die(__('You do not have sufficient permissions to activate plugins for this site.'));
  25. if ( is_multisite() && ! is_network_admin() && is_network_only_plugin( $plugin ) ) {
  26. wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") );
  27. exit;
  28. }
  29. check_admin_referer('activate-plugin_' . $plugin);
  30. $result = activate_plugin($plugin, self_admin_url('plugins.php?error=true&plugin=' . $plugin), is_network_admin() );
  31. if ( is_wp_error( $result ) ) {
  32. if ( 'unexpected_output' == $result->get_error_code() ) {
  33. $redirect = self_admin_url('plugins.php?error=true&charsout=' . strlen($result->get_error_data()) . '&plugin=' . $plugin . "&plugin_status=$status&paged=$page&s=$s");
  34. wp_redirect(add_query_arg('_error_nonce', wp_create_nonce('plugin-activation-error_' . $plugin), $redirect));
  35. exit;
  36. } else {
  37. wp_die($result);
  38. }
  39. }
  40. if ( ! is_network_admin() ) {
  41. $recent = (array) get_option( 'recently_activated' );
  42. unset( $recent[ $plugin ] );
  43. update_option( 'recently_activated', $recent );
  44. } else {
  45. $recent = (array) get_site_option( 'recently_activated' );
  46. unset( $recent[ $plugin ] );
  47. update_site_option( 'recently_activated', $recent );
  48. }
  49. if ( isset($_GET['from']) && 'import' == $_GET['from'] ) {
  50. wp_redirect( self_admin_url("import.php?import=" . str_replace('-importer', '', dirname($plugin))) ); // overrides the ?error=true one above and redirects to the Imports page, stripping the -importer suffix
  51. } else {
  52. wp_redirect( self_admin_url("plugins.php?activate=true&plugin_status=$status&paged=$page&s=$s") ); // overrides the ?error=true one above
  53. }
  54. exit;
  55. case 'activate-selected':
  56. if ( ! current_user_can('activate_plugins') )
  57. wp_die(__('You do not have sufficient permissions to activate plugins for this site.'));
  58. check_admin_referer('bulk-plugins');
  59. $plugins = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
  60. if ( is_network_admin() ) {
  61. foreach ( $plugins as $i => $plugin ) {
  62. // Only activate plugins which are not already network activated.
  63. if ( is_plugin_active_for_network( $plugin ) ) {
  64. unset( $plugins[ $i ] );
  65. }
  66. }
  67. } else {
  68. foreach ( $plugins as $i => $plugin ) {
  69. // Only activate plugins which are not already active and are not network-only when on Multisite.
  70. if ( is_plugin_active( $plugin ) || ( is_multisite() && is_network_only_plugin( $plugin ) ) ) {
  71. unset( $plugins[ $i ] );
  72. }
  73. }
  74. }
  75. if ( empty($plugins) ) {
  76. wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") );
  77. exit;
  78. }
  79. activate_plugins($plugins, self_admin_url('plugins.php?error=true'), is_network_admin() );
  80. if ( ! is_network_admin() ) {
  81. $recent = (array) get_option('recently_activated' );
  82. } else {
  83. $recent = (array) get_site_option('recently_activated' );
  84. }
  85. foreach ( $plugins as $plugin ) {
  86. unset( $recent[ $plugin ] );
  87. }
  88. if ( ! is_network_admin() ) {
  89. update_option( 'recently_activated', $recent );
  90. } else {
  91. update_site_option( 'recently_activated', $recent );
  92. }
  93. wp_redirect( self_admin_url("plugins.php?activate-multi=true&plugin_status=$status&paged=$page&s=$s") );
  94. exit;
  95. case 'update-selected' :
  96. check_admin_referer( 'bulk-plugins' );
  97. if ( isset( $_GET['plugins'] ) )
  98. $plugins = explode( ',', $_GET['plugins'] );
  99. elseif ( isset( $_POST['checked'] ) )
  100. $plugins = (array) $_POST['checked'];
  101. else
  102. $plugins = array();
  103. $title = __( 'Update Plugins' );
  104. $parent_file = 'plugins.php';
  105. wp_enqueue_script( 'updates' );
  106. require_once(ABSPATH . 'wp-admin/admin-header.php');
  107. echo '<div class="wrap">';
  108. echo '<h1>' . esc_html( $title ) . '</h1>';
  109. $url = self_admin_url('update.php?action=update-selected&amp;plugins=' . urlencode( join(',', $plugins) ));
  110. $url = wp_nonce_url($url, 'bulk-update-plugins');
  111. echo "<iframe src='$url' style='width: 100%; height:100%; min-height:850px;'></iframe>";
  112. echo '</div>';
  113. require_once(ABSPATH . 'wp-admin/admin-footer.php');
  114. exit;
  115. case 'error_scrape':
  116. if ( ! current_user_can('activate_plugins') )
  117. wp_die(__('You do not have sufficient permissions to activate plugins for this site.'));
  118. check_admin_referer('plugin-activation-error_' . $plugin);
  119. $valid = validate_plugin($plugin);
  120. if ( is_wp_error($valid) )
  121. wp_die($valid);
  122. if ( ! WP_DEBUG ) {
  123. error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );
  124. }
  125. @ini_set('display_errors', true); //Ensure that Fatal errors are displayed.
  126. // Go back to "sandbox" scope so we get the same errors as before
  127. plugin_sandbox_scrape( $plugin );
  128. /** This action is documented in wp-admin/includes/plugin.php */
  129. do_action( "activate_{$plugin}" );
  130. exit;
  131. case 'deactivate':
  132. if ( ! current_user_can('activate_plugins') )
  133. wp_die(__('You do not have sufficient permissions to deactivate plugins for this site.'));
  134. check_admin_referer('deactivate-plugin_' . $plugin);
  135. if ( ! is_network_admin() && is_plugin_active_for_network( $plugin ) ) {
  136. wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") );
  137. exit;
  138. }
  139. deactivate_plugins( $plugin, false, is_network_admin() );
  140. if ( ! is_network_admin() ) {
  141. update_option( 'recently_activated', array( $plugin => time() ) + (array) get_option( 'recently_activated' ) );
  142. } else {
  143. update_site_option( 'recently_activated', array( $plugin => time() ) + (array) get_site_option( 'recently_activated' ) );
  144. }
  145. if ( headers_sent() )
  146. echo "<meta http-equiv='refresh' content='" . esc_attr( "0;url=plugins.php?deactivate=true&plugin_status=$status&paged=$page&s=$s" ) . "' />";
  147. else
  148. wp_redirect( self_admin_url("plugins.php?deactivate=true&plugin_status=$status&paged=$page&s=$s") );
  149. exit;
  150. case 'deactivate-selected':
  151. if ( ! current_user_can('activate_plugins') )
  152. wp_die(__('You do not have sufficient permissions to deactivate plugins for this site.'));
  153. check_admin_referer('bulk-plugins');
  154. $plugins = isset( $_POST['checked'] ) ? (array) $_POST['checked'] : array();
  155. // Do not deactivate plugins which are already deactivated.
  156. if ( is_network_admin() ) {
  157. $plugins = array_filter( $plugins, 'is_plugin_active_for_network' );
  158. } else {
  159. $plugins = array_filter( $plugins, 'is_plugin_active' );
  160. $plugins = array_diff( $plugins, array_filter( $plugins, 'is_plugin_active_for_network' ) );
  161. }
  162. if ( empty($plugins) ) {
  163. wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") );
  164. exit;
  165. }
  166. deactivate_plugins( $plugins, false, is_network_admin() );
  167. $deactivated = array();
  168. foreach ( $plugins as $plugin ) {
  169. $deactivated[ $plugin ] = time();
  170. }
  171. if ( ! is_network_admin() ) {
  172. update_option( 'recently_activated', $deactivated + (array) get_option( 'recently_activated' ) );
  173. } else {
  174. update_site_option( 'recently_activated', $deactivated + (array) get_site_option( 'recently_activated' ) );
  175. }
  176. wp_redirect( self_admin_url("plugins.php?deactivate-multi=true&plugin_status=$status&paged=$page&s=$s") );
  177. exit;
  178. case 'delete-selected':
  179. if ( ! current_user_can('delete_plugins') ) {
  180. wp_die(__('You do not have sufficient permissions to delete plugins for this site.'));
  181. }
  182. check_admin_referer('bulk-plugins');
  183. //$_POST = from the plugin form; $_GET = from the FTP details screen.
  184. $plugins = isset( $_REQUEST['checked'] ) ? (array) $_REQUEST['checked'] : array();
  185. if ( empty( $plugins ) ) {
  186. wp_redirect( self_admin_url("plugins.php?plugin_status=$status&paged=$page&s=$s") );
  187. exit;
  188. }
  189. $plugins = array_filter($plugins, 'is_plugin_inactive'); // Do not allow to delete Activated plugins.
  190. if ( empty( $plugins ) ) {
  191. wp_redirect( self_admin_url( "plugins.php?error=true&main=true&plugin_status=$status&paged=$page&s=$s" ) );
  192. exit;
  193. }
  194. include(ABSPATH . 'wp-admin/update.php');
  195. $parent_file = 'plugins.php';
  196. if ( ! isset($_REQUEST['verify-delete']) ) {
  197. wp_enqueue_script('jquery');
  198. require_once(ABSPATH . 'wp-admin/admin-header.php');
  199. ?>
  200. <div class="wrap">
  201. <?php
  202. $plugin_info = array();
  203. $have_non_network_plugins = false;
  204. foreach ( (array) $plugins as $plugin ) {
  205. $plugin_slug = dirname( $plugin );
  206. if ( '.' == $plugin_slug ) {
  207. if ( $data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin ) ) {
  208. $plugin_info[ $plugin ] = $data;
  209. $plugin_info[ $plugin ]['is_uninstallable'] = is_uninstallable_plugin( $plugin );
  210. if ( ! $plugin_info[ $plugin ]['Network'] ) {
  211. $have_non_network_plugins = true;
  212. }
  213. }
  214. } else {
  215. // Get plugins list from that folder.
  216. if ( $folder_plugins = get_plugins( '/' . $plugin_slug ) ) {
  217. foreach ( $folder_plugins as $plugin_file => $data ) {
  218. $plugin_info[ $plugin_file ] = _get_plugin_data_markup_translate( $plugin_file, $data );
  219. $plugin_info[ $plugin_file ]['is_uninstallable'] = is_uninstallable_plugin( $plugin );
  220. if ( ! $plugin_info[ $plugin_file ]['Network'] ) {
  221. $have_non_network_plugins = true;
  222. }
  223. }
  224. }
  225. }
  226. }
  227. $plugins_to_delete = count( $plugin_info );
  228. ?>
  229. <?php if ( 1 == $plugins_to_delete ) : ?>
  230. <h1><?php _e( 'Delete Plugin' ); ?></h1>
  231. <?php if ( $have_non_network_plugins && is_network_admin() ) : ?>
  232. <div class="error"><p><strong><?php _e( 'Caution:' ); ?></strong> <?php _e( 'This plugin may be active on other sites in the network.' ); ?></p></div>
  233. <?php endif; ?>
  234. <p><?php _e( 'You are about to remove the following plugin:' ); ?></p>
  235. <?php else: ?>
  236. <h1><?php _e( 'Delete Plugins' ); ?></h1>
  237. <?php if ( $have_non_network_plugins && is_network_admin() ) : ?>
  238. <div class="error"><p><strong><?php _e( 'Caution:' ); ?></strong> <?php _e( 'These plugins may be active on other sites in the network.' ); ?></p></div>
  239. <?php endif; ?>
  240. <p><?php _e( 'You are about to remove the following plugins:' ); ?></p>
  241. <?php endif; ?>
  242. <ul class="ul-disc">
  243. <?php
  244. $data_to_delete = false;
  245. foreach ( $plugin_info as $plugin ) {
  246. if ( $plugin['is_uninstallable'] ) {
  247. /* translators: 1: plugin name, 2: plugin author */
  248. echo '<li>', sprintf( __( '%1$s by %2$s (will also <strong>delete its data</strong>)' ), '<strong>' . $plugin['Name'] . '</strong>', '<em>' . $plugin['AuthorName'] . '</em>' ), '</li>';
  249. $data_to_delete = true;
  250. } else {
  251. /* translators: 1: plugin name, 2: plugin author */
  252. echo '<li>', sprintf( _x('%1$s by %2$s', 'plugin' ), '<strong>' . $plugin['Name'] . '</strong>', '<em>' . $plugin['AuthorName'] ) . '</em>', '</li>';
  253. }
  254. }
  255. ?>
  256. </ul>
  257. <p><?php
  258. if ( $data_to_delete )
  259. _e('Are you sure you wish to delete these files and data?');
  260. else
  261. _e('Are you sure you wish to delete these files?');
  262. ?></p>
  263. <form method="post" action="<?php echo esc_url($_SERVER['REQUEST_URI']); ?>" style="display:inline;">
  264. <input type="hidden" name="verify-delete" value="1" />
  265. <input type="hidden" name="action" value="delete-selected" />
  266. <?php
  267. foreach ( (array) $plugins as $plugin ) {
  268. echo '<input type="hidden" name="checked[]" value="' . esc_attr( $plugin ) . '" />';
  269. }
  270. ?>
  271. <?php wp_nonce_field('bulk-plugins') ?>
  272. <?php submit_button( $data_to_delete ? __( 'Yes, delete these files and data' ) : __( 'Yes, delete these files' ), 'button', 'submit', false ); ?>
  273. </form>
  274. <?php
  275. $referer = wp_get_referer();
  276. ?>
  277. <form method="post" action="<?php echo $referer ? esc_url( $referer ) : ''; ?>" style="display:inline;">
  278. <?php submit_button( __( 'No, return me to the plugin list' ), 'button', 'submit', false ); ?>
  279. </form>
  280. </div>
  281. <?php
  282. require_once(ABSPATH . 'wp-admin/admin-footer.php');
  283. exit;
  284. } else {
  285. $plugins_to_delete = count( $plugins );
  286. } // endif verify-delete
  287. $delete_result = delete_plugins( $plugins );
  288. set_transient('plugins_delete_result_' . $user_ID, $delete_result); //Store the result in a cache rather than a URL param due to object type & length
  289. wp_redirect( self_admin_url("plugins.php?deleted=$plugins_to_delete&plugin_status=$status&paged=$page&s=$s") );
  290. exit;
  291. case 'clear-recent-list':
  292. if ( ! is_network_admin() ) {
  293. update_option( 'recently_activated', array() );
  294. } else {
  295. update_site_option( 'recently_activated', array() );
  296. }
  297. break;
  298. }
  299. }
  300. $wp_list_table->prepare_items();
  301. wp_enqueue_script('plugin-install');
  302. add_thickbox();
  303. add_screen_option( 'per_page', array( 'default' => 999 ) );
  304. get_current_screen()->add_help_tab( array(
  305. 'id' => 'overview',
  306. 'title' => __('Overview'),
  307. 'content' =>
  308. '<p>' . __('Plugins extend and expand the functionality of WordPress. Once a plugin is installed, you may activate it or deactivate it here.') . '</p>' .
  309. '<p>' . sprintf(
  310. /* translators: 1: Plugin Browser/Installer URL, 2: WordPress Plugin Directory URL 3: local plugin directory */
  311. __( 'You can find additional plugins for your site by using the <a href="%1$s">Plugin Browser/Installer</a> functionality or by browsing the <a href="%2$s" target="_blank">WordPress Plugin Directory</a> directly and installing new plugins manually. To manually install a plugin you generally just need to upload the plugin file into your %3$s directory. Once a plugin has been installed, you can activate it here.' ),
  312. 'plugin-install.php',
  313. 'https://wordpress.org/plugins/',
  314. '<code>/wp-content/plugins</code>'
  315. ) . '</p>'
  316. ) );
  317. get_current_screen()->add_help_tab( array(
  318. 'id' => 'compatibility-problems',
  319. 'title' => __('Troubleshooting'),
  320. 'content' =>
  321. '<p>' . __('Most of the time, plugins play nicely with the core of WordPress and with other plugins. Sometimes, though, a plugin&#8217;s code will get in the way of another plugin, causing compatibility issues. If your site starts doing strange things, this may be the problem. Try deactivating all your plugins and re-activating them in various combinations until you isolate which one(s) caused the issue.') . '</p>' .
  322. '<p>' . sprintf(
  323. /* translators: WP_PLUGIN_DIR constant value */
  324. __( 'If something goes wrong with a plugin and you can&#8217;t use WordPress, delete or rename that file in the %s directory and it will be automatically deactivated.' ),
  325. '<code>' . WP_PLUGIN_DIR . '</code>'
  326. ) . '</p>'
  327. ) );
  328. get_current_screen()->set_help_sidebar(
  329. '<p><strong>' . __('For more information:') . '</strong></p>' .
  330. '<p>' . __('<a href="https://codex.wordpress.org/Managing_Plugins#Plugin_Management" target="_blank">Documentation on Managing Plugins</a>') . '</p>' .
  331. '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
  332. );
  333. get_current_screen()->set_screen_reader_content( array(
  334. 'heading_views' => __( 'Filter plugins list' ),
  335. 'heading_pagination' => __( 'Plugins list navigation' ),
  336. 'heading_list' => __( 'Plugins list' ),
  337. ) );
  338. $title = __('Plugins');
  339. $parent_file = 'plugins.php';
  340. require_once(ABSPATH . 'wp-admin/admin-header.php');
  341. $invalid = validate_active_plugins();
  342. if ( ! empty( $invalid ) ) {
  343. foreach ( $invalid as $plugin_file => $error ) {
  344. echo '<div id="message" class="error"><p>';
  345. printf(
  346. /* translators: 1: plugin file 2: error message */
  347. __( 'The plugin %1$s has been <strong>deactivated</strong> due to an error: %2$s' ),
  348. '<code>' . esc_html( $plugin_file ) . '</code>',
  349. $error->get_error_message() );
  350. echo '</p></div>';
  351. }
  352. }
  353. ?>
  354. <?php if ( isset($_GET['error']) ) :
  355. if ( isset( $_GET['main'] ) )
  356. $errmsg = __( 'You cannot delete a plugin while it is active on the main site.' );
  357. elseif ( isset($_GET['charsout']) )
  358. $errmsg = sprintf(__('The plugin generated %d characters of <strong>unexpected output</strong> during activation. If you notice &#8220;headers already sent&#8221; messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.'), $_GET['charsout']);
  359. else
  360. $errmsg = __('Plugin could not be activated because it triggered a <strong>fatal error</strong>.');
  361. ?>
  362. <div id="message" class="error"><p><?php echo $errmsg; ?></p>
  363. <?php
  364. if ( ! isset( $_GET['main'] ) && ! isset( $_GET['charsout'] ) && wp_verify_nonce( $_GET['_error_nonce'], 'plugin-activation-error_' . $plugin ) ) {
  365. $iframe_url = add_query_arg( array(
  366. 'action' => 'error_scrape',
  367. 'plugin' => urlencode( $plugin ),
  368. '_wpnonce' => urlencode( $_GET['_error_nonce'] ),
  369. ), admin_url( 'plugins.php' ) );
  370. ?>
  371. <iframe style="border:0" width="100%" height="70px" src="<?php echo esc_url( $iframe_url ); ?>"></iframe>
  372. <?php
  373. }
  374. ?>
  375. </div>
  376. <?php elseif ( isset($_GET['deleted']) ) :
  377. $delete_result = get_transient( 'plugins_delete_result_' . $user_ID );
  378. // Delete it once we're done.
  379. delete_transient( 'plugins_delete_result_' . $user_ID );
  380. if ( is_wp_error($delete_result) ) : ?>
  381. <div id="message" class="error notice is-dismissible"><p><?php printf( __('Plugin could not be deleted due to an error: %s'), $delete_result->get_error_message() ); ?></p></div>
  382. <?php else : ?>
  383. <div id="message" class="updated notice is-dismissible">
  384. <p>
  385. <?php
  386. if ( 1 == (int) $_GET['deleted'] ) {
  387. _e( 'The selected plugin has been <strong>deleted</strong>.' );
  388. } else {
  389. _e( 'The selected plugins have been <strong>deleted</strong>.' );
  390. }
  391. ?>
  392. </p>
  393. </div>
  394. <?php endif; ?>
  395. <?php elseif ( isset($_GET['activate']) ) : ?>
  396. <div id="message" class="updated notice is-dismissible"><p><?php _e('Plugin <strong>activated</strong>.') ?></p></div>
  397. <?php elseif (isset($_GET['activate-multi'])) : ?>
  398. <div id="message" class="updated notice is-dismissible"><p><?php _e('Selected plugins <strong>activated</strong>.'); ?></p></div>
  399. <?php elseif ( isset($_GET['deactivate']) ) : ?>
  400. <div id="message" class="updated notice is-dismissible"><p><?php _e('Plugin <strong>deactivated</strong>.') ?></p></div>
  401. <?php elseif (isset($_GET['deactivate-multi'])) : ?>
  402. <div id="message" class="updated notice is-dismissible"><p><?php _e('Selected plugins <strong>deactivated</strong>.'); ?></p></div>
  403. <?php elseif ( 'update-selected' == $action ) : ?>
  404. <div id="message" class="updated notice is-dismissible"><p><?php _e('All selected plugins are up to date.'); ?></p></div>
  405. <?php endif; ?>
  406. <div class="wrap">
  407. <h1><?php echo esc_html( $title );
  408. if ( ( ! is_multisite() || is_network_admin() ) && current_user_can('install_plugins') ) { ?>
  409. <a href="<?php echo self_admin_url( 'plugin-install.php' ); ?>" class="page-title-action"><?php echo esc_html_x('Add New', 'plugin'); ?></a>
  410. <?php
  411. }
  412. if ( strlen( $s ) ) {
  413. /* translators: %s: search keywords */
  414. printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_html( urldecode( $s ) ) );
  415. }
  416. ?>
  417. </h1>
  418. <?php
  419. /**
  420. * Fires before the plugins list table is rendered.
  421. *
  422. * This hook also fires before the plugins list table is rendered in the Network Admin.
  423. *
  424. * Please note: The 'active' portion of the hook name does not refer to whether the current
  425. * view is for active plugins, but rather all plugins actively-installed.
  426. *
  427. * @since 3.0.0
  428. *
  429. * @param array $plugins_all An array containing all installed plugins.
  430. */
  431. do_action( 'pre_current_active_plugins', $plugins['all'] );
  432. ?>
  433. <?php $wp_list_table->views(); ?>
  434. <form method="get">
  435. <?php $wp_list_table->search_box( __( 'Search Installed Plugins' ), 'plugin' ); ?>
  436. </form>
  437. <form method="post" id="bulk-action-form">
  438. <input type="hidden" name="plugin_status" value="<?php echo esc_attr($status) ?>" />
  439. <input type="hidden" name="paged" value="<?php echo esc_attr($page) ?>" />
  440. <?php $wp_list_table->display(); ?>
  441. </form>
  442. </div>
  443. <?php
  444. wp_print_request_filesystem_credentials_modal();
  445. include(ABSPATH . 'wp-admin/admin-footer.php');