[wp-trac] [WordPress Trac] #12741: Plugin Editor Allows editing active plugins; Plugin listing doesnt list Edit for active plugins

WordPress Trac wp-trac at lists.automattic.com
Mon Mar 29 10:06:22 UTC 2010


#12741: Plugin Editor Allows editing active plugins; Plugin listing doesnt list
Edit for active plugins
--------------------------+-------------------------------------------------
 Reporter:  dd32          |        Owner:  westi   
     Type:  defect (bug)  |       Status:  reopened
 Priority:  normal        |    Milestone:  3.0     
Component:  Plugins       |      Version:  3.0     
 Severity:  normal        |   Resolution:          
 Keywords:                |  
--------------------------+-------------------------------------------------

Comment(by dd32):

 Another option, given the small number of items here, Is to leave the
 if($is_active).. branch for Activation/Deactivation only, and change it to
 as such:

 {{{
                         } // end if $is_active

                         if ( current_user_can('edit_plugins') &&
 is_writable(WP_PLUGIN_DIR . '/' . $plugin_file) )
                                 $actions[] = '<a href="plugin-
 editor.php?file=' . $plugin_file . '" title="' . __('Open this file in the
 Plugin Editor') . '" class="edit">' . __('Edit') . '</a>';

                         if ( !$is_active &&
 current_user_can('delete_plugins') )
                                 $actions[] = '<a href="' .
 wp_nonce_url('plugins.php?action=delete-selected&amp;checked[]=' .
 $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page,
 'bulk-manage-plugins') . '" title="' . __('Delete this plugin') . '"
 class="delete">' . __('Delete') . '</a>';
                 } // end if $context
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/12741#comment:12>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list