[wp-trac] Re: [WordPress Trac] #7091: Allow plugins to be deleted via the WordPress admin interface / Group plugins by status

WordPress Trac wp-trac at lists.automattic.com
Fri Jun 6 15:13:32 GMT 2008


#7091: Allow plugins to be deleted via the WordPress admin interface / Group
plugins by status
-------------------------------------+--------------------------------------
 Reporter:  DD32                     |        Owner:  DD32    
     Type:  enhancement              |       Status:  assigned
 Priority:  normal                   |    Milestone:  2.6     
Component:  Administration           |      Version:  2.6     
 Severity:  normal                   |   Resolution:          
 Keywords:  has-patch needs-testing  |  
-------------------------------------+--------------------------------------
Comment (by scribblerguy):

 Exception Handling Issue: Multiple plugins in the same subfolder (sub-
 directory)

 If a plugin file is in a subfolder of the plugins directory, then the
 entire folder gets deleted, correct?

 (Subfolder = a directory under the wp-content/plugins directory)

 For example, Lester Chan's WP-PostRatings plugin
 ([http://wordpress.org/extend/plugins/wp-postratings/]) consists of two
 separate plugins, the main plugin plus a ratings widget which is a
 separate file. If I go to delete either one, the entire folder is deleted.
 I also tried this by randomly putting one plugin file into the subfolder
 of another plugin. If I delete that random plugin, then the subfolder is
 deleted.

 If the main wp-postratings plugin is active, I can still delete the widget
 plugin, which deletes the entire folder.

 Deleting a single file plugin (e.g., the hello.php file) that is in the
 main plugins directory works okay.

 From this page ([http://codex.wordpress.org/Writing_a_Plugin]), it looks
 like the "preferred" locations for plugins are (1) the main plugin
 directory, if the plugin only has a single file; or (2) a subfolder, if
 the plugin has multiple files.

 Even if plugin authors are not following that the preferred folder
 conventions,** I think the safe course* would be that before a plugin is
 deleted, it's folder location is checked against the other plugins. If two
 plugins share the same subfolder, then the plugin should not be deleted
 through the WP interface. Some sort of error message should appear: "This
 plugin is in the same directory as (plugin names listed). For your
 protection, automatic deletion cannot continue on this plugin. Please
 delete manually."

 *Who is the end-user going to blame? The user selects a plugin to delete.
 In the mind of the typical user, that should only delete the plugin and
 nothing else. Other plugins should be left alone. The end-user did not
 authorize the other plugin(s) to be deleted, just the one that they
 checked. The user is going to blame WP for creating a confusing UI, not
 the plugin author for failing to follow some design convention that the
 user doesn't know about and should have no reason to know about.

 **I could see web design professionals putting multiple single-file
 plugins into the same subfolder for organizational purposes, especially if
 those were a suite of custom plugins. And, I'm sure that there are some
 good reasons for organizing multiple plugins under the same subfolder
 rather than having them all in the main plugins folder (a developer with a
 test folder where they dump any little plugin they are working on, and so
 forth).

-- 
Ticket URL: <http://trac.wordpress.org/ticket/7091#comment:10>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list