get_error_message() ); wp_redirect('plugins.php?activate=true'); // overrides the ?error=true one above } elseif ( 'error_scrape' == $_GET['action'] ) { check_admin_referer('plugin-activation-error_' . $plugin); $valid = validate_plugin($plugin); if ( is_wp_error($valid) ) wp_die($valid); error_reporting( E_ALL ^ E_NOTICE ); @ini_set('display_errors', true); //Ensure that Fatal errors are displayed. include(WP_PLUGIN_DIR . '/' . $plugin); } elseif ( 'deactivate' == $_GET['action'] ) { check_admin_referer('deactivate-plugin_' . $_GET['plugin']); deactivate_plugins($_GET['plugin']); wp_redirect('plugins.php?deactivate=true'); } elseif ( 'deactivate-all' == $_GET['action'] ) { check_admin_referer('deactivate-all'); deactivate_all_plugins(); wp_redirect('plugins.php?deactivate-all=true'); } elseif ('reactivate-all' == $_GET['action']) { check_admin_referer('reactivate-all'); reactivate_all_plugins('plugins.php?errors=true'); wp_redirect('plugins.php?reactivate-all=true'); // overrides the ?error=true one above } exit; } $title = __('Manage Plugins'); require_once('admin-header.php'); validate_active_plugins(); ?>

fatal error.') ?>

fatal error.') ?>

activated.') ?>

deactivated.') ?>

deactivated.'); ?>

reactivated.'); ?>

'; _e("Couldn’t open plugins directory or there are no plugins available."); // TODO: make more helpful echo '

'; } else { ?>


$plugin_data) { $action_links = array(); $style = ''; if ( is_plugin_active($plugin_file) ) { $action_links[] = "".__('Deactivate').""; $style = 'active'; } else { $action_links[] = "".__('Activate').""; } if ( current_user_can('edit_plugins') && is_writable(WP_PLUGIN_DIR . '/' . $plugin_file) ) $action_links[] = "".__('Edit').""; $plugins_allowedtags = array('a' => array('href' => array(),'title' => array()),'abbr' => array('title' => array()),'acronym' => array('title' => array()),'code' => array(),'em' => array(),'strong' => array()); // Sanitize all displayed data $plugin_data['Title'] = wp_kses($plugin_data['Title'], $plugins_allowedtags); $plugin_data['Version'] = wp_kses($plugin_data['Version'], $plugins_allowedtags); $plugin_data['Description'] = wp_kses($plugin_data['Description'], $plugins_allowedtags); $plugin_data['Author'] = wp_kses($plugin_data['Author'], $plugins_allowedtags); $author = ( empty($plugin_data['Author']) ) ? '' : ' ' . sprintf( __('By %s'), $plugin_data['Author'] ) . '.'; if ( $style != '' ) $style = ' class="' . $style . '"'; $action_links = apply_filters('plugin_action_links', $action_links, $plugin_file, $plugin_info); echo " "; do_action( 'after_plugin_row', $plugin_file ); } ?>
{$plugin_data['Title']} {$plugin_data['Version']}

{$plugin_data['Description']}$author

"; if ( is_plugin_active($plugin_file) ) echo __('Active'); else _e('Inactive'); echo "

%s directory and it will be automatically deactivated.'), WP_PLUGIN_DIR); ?>

WordPress plugin directory.'); ?>

%s directory. Once a plugin is uploaded, you may activate it here.'), WP_PLUGIN_DIR); ?>