Ticket #7091: 7091.diff
File 7091.diff, 25.2 KB (added by , 16 years ago) |
---|
-
wp-admin/css/colors-classic.css
415 415 background-color: #fff; 416 416 } 417 417 418 #plugins .active {418 .plugins .active { 419 419 background-color: #BBEEBB; 420 420 } 421 421 422 #plugins .togl {422 .plugins .togl { 423 423 border-right-color: #ccc; 424 424 } 425 425 … … 427 427 background-color: #ffffe0; 428 428 } 429 429 430 #plugins tr {430 .plugins tr { 431 431 background-color: #fff; 432 432 } 433 433 -
wp-admin/css/colors-fresh.css
384 384 background-color: #fff; 385 385 } 386 386 387 #plugins .active {387 .plugins .active { 388 388 background-color: #e7f7d3; 389 389 } 390 390 391 #plugins .togl {391 .plugins .togl { 392 392 border-right-color: #ccc; 393 393 } 394 394 … … 396 396 background-color: #ffffe0; 397 397 } 398 398 399 #plugins tr {399 .plugins tr { 400 400 background-color: #fff; 401 401 } 402 402 -
wp-admin/includes/plugin.php
132 132 update_option('active_plugins', $current); 133 133 } 134 134 135 function deactivate_all_plugins() { 136 $current = get_option('active_plugins'); 137 if ( empty($current) )138 return;135 //Replaces reactivate_all_plugins() / deactivate_all_plugins() = 'deactivated_plugins' is now useless 136 function activate_plugins($plugins, $redirect = '') { 137 if ( !is_array($plugins) ) 138 $plugins = array($plugins); 139 139 140 deactivate_plugins($current); 140 $errors = array(); 141 foreach ( (array) $plugins as $plugin ) { 142 if ( !empty($redirect) ) 143 $redirect = add_query_arg('plugin', $plugin, $redirect); 144 $result = activate_plugin($plugin, $redirect); 145 if ( is_wp_error($result) ) 146 $errors[$plugin] = $result; 147 } 141 148 142 update_option('deactivated_plugins', $current); 149 if ( !empty($errors) ) 150 return new WP_Error('plugins_invalid', __('One of the plugins is invalid.'), $errors); 151 152 return true; 143 153 } 144 154 145 function reactivate_all_plugins($redirect = '') {146 $plugins = get_option('deactivated_plugins');155 function delete_plugins($plugins, $redirect = '' ) { 156 global $wp_filesystem; 147 157 148 if ( empty($plugins) ) 158 if( empty($plugins) ) 159 return false; 160 161 $checked = array(); 162 foreach( $plugins as $plugin ) 163 $checked[] = 'checked[]=' . $plugin; 164 165 ob_start(); 166 $url = wp_nonce_url('plugins.php?action=delete-selected&' . implode('&', $checked), 'mass-manage-plugins'); 167 if ( false === ($credentials = request_filesystem_credentials($url)) ) { 168 $data = ob_get_contents(); 169 ob_end_clean(); 170 if( ! empty($data) ){ 171 include_once( ABSPATH . 'wp-admin/admin-header.php'); 172 echo $data; 173 include( ABSPATH . 'wp-admin/admin-footer.php'); 174 exit; 175 } 149 176 return; 177 } 150 178 151 if ( !empty($redirect) ) 152 wp_redirect(add_query_arg('_error_nonce', wp_create_nonce('plugin-activation-error_' . $plugin), $redirect)); 179 if ( ! WP_Filesystem($credentials) ) { 180 request_filesystem_credentials($url, '', true); //Failed to connect, Error and request again 181 $data = ob_get_contents(); 182 ob_end_clean(); 183 if( ! empty($data) ){ 184 include_once( ABSPATH . 'wp-admin/admin-header.php'); 185 echo $data; 186 include( ABSPATH . 'wp-admin/admin-footer.php'); 187 exit; 188 } 189 return; 190 } 153 191 154 $errors = array(); 155 foreach ( (array) $plugins as $plugin ) { 156 $result = activate_plugin($plugin); 157 if ( is_wp_error($result) ) 158 $errors[$plugin] = $result; 192 if ( $wp_filesystem->errors->get_error_code() ) { 193 return $wp_filesystem->errors; 159 194 } 160 195 161 delete_option('deactivated_plugins'); 196 if ( ! is_object($wp_filesystem) ) 197 return new WP_Error('fs_unavailable', __('Could not access filesystem.')); 162 198 163 if ( !empty($errors) )164 return new WP_Error(' plugins_invalid', __('One of the plugins is invalid.'), $errors);199 if ( $wp_filesystem->errors->get_error_code() ) 200 return new WP_Error('fs_error', __('Filesystem error'), $wp_filesystem->errors); 165 201 202 //Get the base plugin folder 203 $plugins_dir = $wp_filesystem->wp_plugins_dir(); 204 if ( empty($plugins_dir) ) 205 return new WP_Error('fs_no_plugins_dir', __('Unable to locate WordPress Plugin directory.')); 206 207 $plugins_dir = trailingslashit( $plugins_dir ); 208 209 $errors = array(); 210 211 foreach( $plugins as $plugin_file ) { 212 $this_plugin_dir = trailingslashit( dirname($plugins_dir . $plugin_file) ); 213 // If plugin is in its own directory, recursively delete the directory. 214 if ( strpos($plugin_file, '/') && $this_plugin_dir != $plugins_dir ) //base check on if plugin includes directory seperator AND that its not the root plugin folder 215 $deleted = $wp_filesystem->delete($this_plugin_dir, true); 216 else 217 $deleted = $wp_filesystem->delete($plugins_dir . $plugin_file); 218 219 if ( ! $deleted ) 220 $errors[] = $plugin_file; 221 } 222 223 if( ! empty($errors) ) 224 return new WP_Error('could_not_remove_plugin', sprintf(__('Could not fully remove the plugin(s) %s'), implode(', ', $errors)) ); 225 166 226 return true; 167 227 } 168 228 -
wp-admin/includes/update.php
118 118 } 119 119 add_action( 'load-plugins.php', 'wp_update_plugins' ); 120 120 121 function wp_plugin_update_row( $file ) { 122 global $plugin_data; 121 function wp_plugin_update_row( $file, $plugin_data ) { 123 122 $current = get_option( 'update_plugins' ); 124 123 if ( !isset( $current->response[ $file ] ) ) 125 124 return false; 126 125 127 126 $r = $current->response[ $file ]; 128 127 129 echo "<tr><td colspan='5' class='plugin-update'>";128 echo '<tr><td colspan="5" class="plugin-update">'; 130 129 if ( !current_user_can('edit_plugins') ) 131 130 printf( __('There is a new version of %1$s available. <a href="%2$s">Download version %3$s here</a>.'), $plugin_data['Name'], $r->url, $r->new_version); 132 131 else if ( empty($r->package) ) 133 132 printf( __('There is a new version of %1$s available. <a href="%2$s">Download version %3$s here</a> <em>automatic upgrade unavailable for this plugin</em>.'), $plugin_data['Name'], $r->url, $r->new_version); 134 133 else 135 printf( __('There is a new version of %1$s available. <a href="%2$s">Download version %3$s here</a> or <a href="%4$s">upgrade automatically</a>.'), $plugin_data['Name'], $r->url, $r->new_version, wp_nonce_url( "update.php?action=upgrade-plugin&plugin=$file", 'upgrade-plugin_' . $file) );134 printf( __('There is a new version of %1$s available. <a href="%2$s">Download version %3$s here</a> or <a href="%4$s">upgrade automatically</a>.'), $plugin_data['Name'], $r->url, $r->new_version, wp_nonce_url('update.php?action=upgrade-plugin&plugin=' . $file, 'upgrade-plugin_' . $file) ); 136 135 137 echo "</td></tr>";136 echo '</td></tr>'; 138 137 } 139 add_action( 'after_plugin_row', 'wp_plugin_update_row' );138 add_action( 'after_plugin_row', 'wp_plugin_update_row', 10, 2 ); 140 139 141 140 function wp_update_plugin($plugin, $feedback = '') { 142 141 global $wp_filesystem; -
wp-admin/menu-header.php
2 2 $self = preg_replace('|^.*/wp-admin/|i', '', $_SERVER['PHP_SELF']); 3 3 $self = preg_replace('|^.*/plugins/|i', '', $self); 4 4 5 global $menu, $submenu, $parent_file; //For when admin-header is included from within a function. 6 5 7 get_admin_page_parent(); 6 8 7 9 // We're going to do this loop three times -
wp-admin/plugins.php
1 1 <?php 2 2 require_once('admin.php'); 3 3 4 if ( isset($_GET['action']) ) { 5 if ( isset($_GET['plugin']) ) 6 $plugin = trim($_GET['plugin']); 4 $action = ''; 5 foreach( array('activate-selected', 'deactivate-selected', 'delete-selected') as $action_key ) { 6 if( isset($_POST[$action_key]) ) { 7 $action = $action_key; 8 break; 9 } 10 } 7 11 8 if ( 'activate' == $_GET['action'] ) { 9 check_admin_referer('activate-plugin_' . $_GET['plugin']); 10 $result = activate_plugin($_GET['plugin'], 'plugins.php?error=true&plugin=' . $plugin); 11 if ( is_wp_error( $result ) ) 12 wp_die( $result->get_error_message() ); 13 wp_redirect('plugins.php?activate=true'); // overrides the ?error=true one above 14 } elseif ( 'error_scrape' == $_GET['action'] ) { 15 check_admin_referer('plugin-activation-error_' . $plugin); 16 $valid = validate_plugin($plugin); 17 if ( is_wp_error($valid) ) 18 wp_die($valid); 19 error_reporting( E_ALL ^ E_NOTICE ); 20 @ini_set('display_errors', true); //Ensure that Fatal errors are displayed. 21 include(WP_PLUGIN_DIR . '/' . $plugin); 22 } elseif ( 'deactivate' == $_GET['action'] ) { 23 check_admin_referer('deactivate-plugin_' . $_GET['plugin']); 24 deactivate_plugins($_GET['plugin']); 25 wp_redirect('plugins.php?deactivate=true'); 26 } elseif ( 'deactivate-all' == $_GET['action'] ) { 27 check_admin_referer('deactivate-all'); 28 deactivate_all_plugins(); 29 wp_redirect('plugins.php?deactivate-all=true'); 30 } elseif ('reactivate-all' == $_GET['action']) { 31 check_admin_referer('reactivate-all'); 32 reactivate_all_plugins('plugins.php?errors=true'); 33 wp_redirect('plugins.php?reactivate-all=true'); // overrides the ?error=true one above 12 if( isset($_GET['action']) ) 13 $action = $_GET['action']; 14 15 $plugin = $_REQUEST['plugin']; 16 17 if( !empty($action) ) { 18 switch( $action ) { 19 case 'activate': 20 check_admin_referer('activate-plugin_' . $plugin); 21 $result = activate_plugin($plugin, 'plugins.php?error=true&plugin=' . $plugin); 22 if ( is_wp_error( $result ) ) 23 wp_die( $result->get_error_message() ); 24 $recent = (array)get_option('recently_activated'); 25 if( isset($recent[ $plugin ]) ){ 26 unset($recent[ $plugin ]); 27 update_option('recently_activated', $recent); 28 } 29 wp_redirect('plugins.php?activate=true'); // overrides the ?error=true one above 30 exit; 31 break; 32 case 'activate-selected': 33 check_admin_referer('mass-manage-plugins'); 34 activate_plugins($_POST['checked'], 'plugins.php?error=true'); 35 36 $recent = (array)get_option('recently_activated'); 37 foreach( (array)$_POST['checked'] as $plugin => $time) { 38 if( isset($recent[ $plugin ]) ) 39 unset($recent[ $plugin ]); 40 } 41 if( $recent != get_option('recently_activated') ) //If array changed, update it. 42 update_option('recently_activated', $recent); 43 44 wp_redirect('plugins.php?activate-multi=true'); 45 exit; 46 break; 47 case 'error_scrape': 48 check_admin_referer('plugin-activation-error_' . $plugin); 49 $valid = validate_plugin($plugin); 50 if ( is_wp_error($valid) ) 51 wp_die($valid); 52 error_reporting( E_ALL ^ E_NOTICE ); 53 @ini_set('display_errors', true); //Ensure that Fatal errors are displayed. 54 include(WP_PLUGIN_DIR . '/' . $plugin); 55 exit; 56 break; 57 case 'deactivate': 58 check_admin_referer('deactivate-plugin_' . $plugin); 59 deactivate_plugins($plugin); 60 update_option('recently_activated', array($plugin => time()) + (array)get_option('recently_activated')); 61 wp_redirect('plugins.php?deactivate=true'); 62 exit; 63 break; 64 case 'deactivate-selected': 65 check_admin_referer('mass-manage-plugins'); 66 deactivate_plugins($_POST['checked']); 67 $deactivated = array(); 68 foreach( (array)$_POST['checked'] as $plugin ) 69 $deactivated[ $plugin ] = time(); 70 update_option('recently_activated', $deactivated + (array)get_option('recently_activated')); 71 wp_redirect('plugins.php?deactivate-multi=true'); 72 exit; 73 break; 74 case 'delete-selected': 75 check_admin_referer('mass-manage-plugins'); 76 $plugins = $_REQUEST['checked']; 77 include(ABSPATH . 'wp-admin/update.php'); 78 79 $title = __('Delete Plugin'); 80 $parent_file = 'plugins.php'; 81 82 $delete_result = delete_plugins($plugins); 83 84 //HACK TIME! 85 // Proper way needed, perhaps get_plugins() to convert to wp_cache_get() any reason why it hasnt allready? 86 // This clears the cached plugin list 87 global $wp_plugins; 88 $wp_plugins = null; 89 90 91 92 //TODO: Implement!.. STAT! 93 break; 94 default: 95 var_dump("Unknown Action $action"); 34 96 } 35 36 exit;37 97 } 38 98 99 wp_enqueue_script('admin-forms'); 100 39 101 $title = __('Manage Plugins'); 40 102 require_once('admin-header.php'); 41 103 … … 46 108 <?php if ( isset($_GET['error']) ) : ?> 47 109 <div id="message" class="updated fade"><p><?php _e('Plugin could not be activated because it triggered a <strong>fatal error</strong>.') ?></p> 48 110 <?php 49 $plugin = trim($_GET['plugin']);50 111 if ( wp_verify_nonce($_GET['_error_nonce'], 'plugin-activation-error_' . $plugin) ) { ?> 51 <iframe style="border:0" width="100%" height="70px" src="<?php bloginfo('wpurl'); ?>/wp-admin/plugins.php?action=error_scrape&plugin=<?php echo attribute_escape($plugin); ?>&_wpnonce=<?php echo attribute_escape($_GET['_error_nonce']); ?>"></iframe>112 <iframe style="border:0" width="100%" height="70px" src="<?php echo admin_url('plugins.php?action=error_scrape&plugin=' . attribute_escape($plugin) . '&_wpnonce=' . attribute_escape($_GET['_error_nonce'])); ?>"></iframe> 52 113 <?php 53 114 } 54 115 ?> 55 116 </div> 56 <?php elseif ( isset($_GET['errors']) ) : ?> 57 <div id="message" class="updated fade"><p><?php _e('Some plugins could not be reactivated because they triggered a <strong>fatal error</strong>.') ?></p></div> 117 <?php elseif ( 'delete-selected' == $action ) : 118 if ( is_wp_error($delete_result) ) : ?> 119 <div id="message" class="updated fade"><p><?php printf( __('Plugin could not be deleted due to an error: %s'), $delete_result->get_error_message() ); ?></p></div> 120 <?php else : ?> 121 <div id="message" class="updated fade"><p><?php _e('The selected plugins have been <strong>deleted</strong>.'); ?></p></div> 122 <?php endif; ?> 58 123 <?php elseif ( isset($_GET['activate']) ) : ?> 59 124 <div id="message" class="updated fade"><p><?php _e('Plugin <strong>activated</strong>.') ?></p></div> 125 <?php elseif (isset($_GET['activate-multi'])) : ?> 126 <div id="message" class="updated fade"><p><?php _e('Selected plugins <strong>activated</strong>.'); ?></p></div> 60 127 <?php elseif ( isset($_GET['deactivate']) ) : ?> 61 128 <div id="message" class="updated fade"><p><?php _e('Plugin <strong>deactivated</strong>.') ?></p></div> 62 <?php elseif (isset($_GET['deactivate-all'])) : ?> 63 <div id="message" class="updated fade"><p><?php _e('All plugins <strong>deactivated</strong>.'); ?></p></div> 64 <?php elseif (isset($_GET['reactivate-all'])) : ?> 65 <div id="message" class="updated fade"><p><?php _e('Plugins <strong>reactivated</strong>.'); ?></p></div> 129 <?php elseif (isset($_GET['deactivate-multi'])) : ?> 130 <div id="message" class="updated fade"><p><?php _e('Selected plugins <strong>deactivated</strong>.'); ?></p></div> 66 131 <?php endif; ?> 67 132 68 133 <div class="wrap"> … … 70 135 <p><?php _e('Plugins extend and expand the functionality of WordPress. Once a plugin is installed, you may activate it or deactivate it here.'); ?></p> 71 136 <?php 72 137 73 $plugins = get_plugins(); 138 $active_plugins = array(); 139 $available_plugins = array(); 140 $recent_plugins = array(); 141 $recently_activated = (array)get_option('recently_activated'); 74 142 75 if (empty($plugins)) { 76 echo '<p>'; 77 _e("Couldn’t open plugins directory or there are no plugins available."); // TODO: make more helpful78 echo '</p>';79 } else { 80 ?> 143 //Clean out any plugins which were deactivated over a week ago. 144 foreach( $recently_activated as $key => $time ) 145 if( $time + (7*24*60*60) < time() ) //1 week 146 unset($recently_activated[ $key ]); 147 if( $recently_activated != get_option('recently_activated') ) //If array changed, update it. 148 update_option('recently_activated', $recently_activated); 81 149 82 <div class="tablenav"> 83 <div class="alignleft"> 84 <?php 85 $active = get_option('active_plugins'); 86 $inactive = get_option('deactivated_plugins'); 87 if ( !empty($active) ) { 88 ?> 89 <a class="button-secondary delete" href="<?php echo wp_nonce_url('plugins.php?action=deactivate-all', 'deactivate-all'); ?>"><?php _e('Deactivate All Plugins'); ?></a> 90 <?php 91 } elseif ( empty($active) && !empty($inactive) ) { 92 ?> 93 <a class="button-secondary delete" href="<?php echo wp_nonce_url('plugins.php?action=reactivate-all', 'reactivate-all'); ?>"><?php _e('Reactivate Plugins'); ?></a> 94 <?php 95 } // endif active/inactive plugin check 96 ?> 97 </div> 98 <br class="clear" /> 99 </div> 150 $all_plugins = get_plugins(); 100 151 101 <br class="clear" /> 152 $plugins_allowedtags = array('a' => array('href' => array(),'title' => array()),'abbr' => array('title' => array()),'acronym' => array('title' => array()),'code' => array(),'em' => array(),'strong' => array()); 102 153 103 <table class="widefat"> 154 foreach( (array)$all_plugins as $plugin_file => $plugin_data) { 155 156 // Sanitize all displayed data 157 $plugin_data['Title'] = wp_kses($plugin_data['Title'], $plugins_allowedtags); 158 $plugin_data['Version'] = wp_kses($plugin_data['Version'], $plugins_allowedtags); 159 $plugin_data['Description'] = wp_kses($plugin_data['Description'], $plugins_allowedtags); 160 $plugin_data['Author'] = wp_kses($plugin_data['Author'], $plugins_allowedtags); 161 if( ! empty($plugin_data['Author']) ) 162 $plugin_data['Description'] .= ' <cite>' . sprintf( __('By %s'), $plugin_data['Author'] ) . '.</cite>'; 163 164 if ( is_plugin_active($plugin_file) ) { 165 $active_plugins[ $plugin_file ] = $plugin_data; 166 } else { 167 if ( isset( $recently_activated[ $plugin_file ] ) ) //Was the plugin recently activated? 168 $recent_plugins[ $plugin_file ] = $plugin_data; 169 else 170 $available_plugins[ $plugin_file ] = $plugin_data; 171 } 172 } 173 174 ?> 175 176 <?php 177 function print_plugins_table($plugins, $context = '') { 178 ?> 179 <table class="widefat" id="<?php echo $context ?>-plugins-table"> 104 180 <thead> 105 181 <tr> 106 <th ><?php _e('Plugin'); ?></th>107 <th class="num"><?php _e('Version'); ?></th>108 <th ><?php _e('Description'); ?></th>109 <th class="status"><?php _e('Status')?></th>110 <th class="action-links"><?php _e('Action'); ?></th>182 <th scope="col" class="check-column"><input type="checkbox" /></th> 183 <th scope="col"><?php _e('Plugin'); ?></th> 184 <th scope="col" class="num"><?php _e('Version'); ?></th> 185 <th scope="col"><?php _e('Description'); ?></th> 186 <th scope="col" class="action-links"><?php _e('Action'); ?></th> 111 187 </tr> 112 188 </thead> 113 <tbody id="plugins">189 <tbody class="plugins"> 114 190 <?php 115 foreach($plugins as $plugin_file => $plugin_data) { 191 192 if( empty($plugins) ) { 193 echo '<tr> 194 <td colspan="6">' . __('No plugins to show') . '</td> 195 </tr>'; 196 } 197 foreach( (array)$plugins as $plugin_file => $plugin_data) { 116 198 $action_links = array(); 117 118 $style = '';119 199 120 if ( is_plugin_active($plugin_file) ) { 121 $action_links[] = "<a href='" . wp_nonce_url("plugins.php?action=deactivate&plugin=$plugin_file", 'deactivate-plugin_' . $plugin_file) . "' title='".__('Deactivate this plugin')."' class='delete'>".__('Deactivate')."</a>"; 122 $style = 'active'; 123 } else { 124 $action_links[] = "<a href='" . wp_nonce_url("plugins.php?action=activate&plugin=$plugin_file", 'activate-plugin_' . $plugin_file) . "' title='".__('Activate this plugin')."' class='edit'>".__('Activate')."</a>"; 125 } 200 if( 'active' == $context ) 201 $action_links[] = '<a href="' . wp_nonce_url('plugins.php?action=deactivate&plugin=' . $plugin_file, 'deactivate-plugin_' . $plugin_file) . '" title="' . __('Deactivate this plugin') . '" class="delete">' . __('Deactivate') . '</a>'; 202 else //Available or Recently deactivated 203 $action_links[] = '<a href="' . wp_nonce_url('plugins.php?action=activate&plugin=' . $plugin_file, 'activate-plugin_' . $plugin_file) . '" title="' . __('Activate this plugin') . '" class="edit">' . __('Activate') . '</a>'; 204 126 205 if ( current_user_can('edit_plugins') && is_writable(WP_PLUGIN_DIR . '/' . $plugin_file) ) 127 $action_links[] = "<a href='plugin-editor.php?file=$plugin_file' title='".__('Open this file in the Plugin Editor')."' class='edit'>".__('Edit')."</a>";206 $action_links[] = '<a href="plugin-editor.php?file=' . $plugin_file . '" title="' . __('Open this file in the Plugin Editor') . '" class="edit">' . __('Edit') . '</a>'; 128 207 129 $ plugins_allowedtags = array('a' => array('href' => array(),'title' => array()),'abbr' => array('title' => array()),'acronym' => array('title' => array()),'code' => array(),'em' => array(),'strong' => array());208 $action_links = apply_filters('plugin_action_links', $action_links, $plugin_file, $plugin_data, $context); 130 209 131 // Sanitize all displayed data132 $plugin_data['Title'] = wp_kses($plugin_data['Title'], $plugins_allowedtags);133 $plugin_data['Version'] = wp_kses($plugin_data['Version'], $plugins_allowedtags);134 $plugin_data['Description'] = wp_kses($plugin_data['Description'], $plugins_allowedtags);135 $plugin_data['Author'] = wp_kses($plugin_data['Author'], $plugins_allowedtags);136 $author = ( empty($plugin_data['Author']) ) ? '' : ' <cite>' . sprintf( __('By %s'), $plugin_data['Author'] ) . '.</cite>';137 138 if ( $style != '' )139 $style = ' class="' . $style . '"';140 141 $action_links = apply_filters('plugin_action_links', $action_links, $plugin_file, $plugin_info);142 143 210 echo " 144 <tr$style> 211 <tr class='$context'> 212 <th scope='row' class='check-column'><input type='checkbox' name='checked[]' value='" . attribute_escape($plugin_file) . "' /></th> 145 213 <td class='name'>{$plugin_data['Title']}</td> 146 214 <td class='vers'>{$plugin_data['Version']}</td> 147 <td class='desc'><p>{$plugin_data['Description']}$author</p></td> 148 <td class='status'>"; 149 if ( is_plugin_active($plugin_file) ) 150 echo __('<span class="active">Active</span>'); 151 else 152 _e('<span class="inactive">Inactive</span>'); 153 echo "</td> 154 <td class='togl action-links'>$toggle"; 215 <td class='desc'><p>{$plugin_data['Description']}</p></td> 216 <td class='togl action-links'>"; 155 217 if ( !empty($action_links) ) 156 218 echo implode(' | ', $action_links); 157 echo "</td>158 </tr> ";159 do_action( 'after_plugin_row', $plugin_file);219 echo '</td> 220 </tr>'; 221 do_action( 'after_plugin_row', $plugin_file, $plugin_data, $context ); 160 222 } 161 223 ?> 162 224 </tbody> 163 225 </table> 164 165 <?php 166 } 226 <?php 227 } //End print_plugins_table() 167 228 ?> 168 229 230 <h3 id="currently-active"><?php _e('Currently Active Plugins') ?></h3> 231 <form method="post" action="<?php echo admin_url('plugins.php') ?>"> 232 <?php wp_nonce_field('mass-manage-plugins') ?> 233 234 <div class="tablenav"> 235 <div class="alignleft"> 236 <input type="submit" name="deactivate-selected" value="<?php _e('Deactivate Selected') ?>" class="button-secondary" /> 237 </div> 238 </div> 239 <br class="clear" /> 240 <?php print_plugins_table($active_plugins, 'active') ?> 241 </form> 242 169 243 <p><?php printf(__('If something goes wrong with a plugin and you can’t use WordPress, delete or rename that file in the <code>%s</code> directory and it will be automatically deactivated.'), WP_PLUGIN_DIR); ?></p> 170 244 245 <?php if ( ! empty($recent_plugins) ) : ?> 246 <h3 id="recent-plugins"><?php _e('Recently Active Plugins') ?></h3> 247 <form method="post" action="<?php echo admin_url('plugins.php') ?>"> 248 <?php wp_nonce_field('mass-manage-plugins') ?> 249 250 <div class="tablenav"> 251 <div class="alignleft"> 252 <input type="submit" name="activate-selected" value="<?php _e('Activate Selected') ?>" class="button-secondary" /> 253 <?php if( current_user_can('edit_plugins') ) : ?> 254 <input type="submit" name="delete-selected" value="<?php _e('Delete Selected') ?>" class="button-secondary" /> 255 <?php endif; ?> 256 </div> 257 </div> 258 <br class="clear" /> 259 <?php print_plugins_table($recent_plugins, 'recent') ?> 260 </form> 261 <?php endif; ?> 262 263 <h3 id="available-plugins"><?php _e('Available Plugins') ?></h3> 264 <form method="post" action="<?php echo admin_url('plugins.php') ?>"> 265 <?php wp_nonce_field('mass-manage-plugins') ?> 266 267 <div class="tablenav"> 268 <div class="alignleft"> 269 <input type="submit" name="activate-selected" value="<?php _e('Activate Selected') ?>" class="button-secondary" /> 270 <?php if( current_user_can('edit_plugins') ) : ?> 271 <input type="submit" name="delete-selected" value="<?php _e('Delete Selected') ?>" class="button-secondary" /> 272 <?php endif; ?> 273 </div> 274 </div> 275 <br class="clear" /> 276 <?php print_plugins_table($available_plugins, 'available') ?> 277 </form> 278 171 279 <h2><?php _e('Get More Plugins'); ?></h2> 172 280 <p><?php _e('You can find additional plugins for your site in the <a href="http://wordpress.org/extend/plugins/">WordPress plugin directory</a>.'); ?></p> 173 281 <p><?php printf(__('To install a plugin you generally just need to upload the plugin file into your <code>%s</code> directory. Once a plugin is uploaded, you may activate it here.'), WP_PLUGIN_DIR); ?></p> -
wp-admin/wp-admin.css
1 #plugins .name {1 .plugins .name { 2 2 font-weight: bold; 3 3 } 4 4 5 #plugins p {5 .plugins p { 6 6 margin: 0 4px; 7 7 padding: 0; 8 8 } 9 9 10 #plugins .togl {10 .plugins .togl { 11 11 width: 150px; 12 12 border-right-width: 1px; 13 13 border-right-style: solid;