[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:27:57 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 DD32):

 > 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?

 Correct. The plugin upgrader currently will delete the entire folder if a
 plugin is inside it too. So if a plugin is in great-plugins/plugin-
 name.php the folder great-plugins will be deleted upon a plugin upgrade,
 or clicking the delete button.

 > 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.

 Correct, However, The plugin upgrader will *allways* place upgraded
 plugins into a folder, That's the "prefered" way as far as the plugin
 setups currently go, Folder per plugin, one plugin per folder

 > would be that before a plugin is deleted, it's folder location is
 checked against the other plugins.
 That would indeed be possibly useful, If multiple plugins are detected in
 a folder, then do not delete the entire folder, Sounds like a plausable
 solution for the delete button '''however''' it will not affect the plugin
 upgrader, Due to the fact that WordPress cannot know what files (other
 than the main plugin php file) belong to that plugin, or other plugins,
 Given that the upgrader is in the wild now, It seems like a step in the
 wrong direction to disable it for certain folder setups.

 > **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.
 I can see the same happening, However, it is a very edge case. Developers
 should try and keep plugins in seperate folders though, if not only just
 to allow them to use Source Control applications such as SVN on them.

 I'll be adding a confirmation dialoge on the delete function, I'll make it
 spell out the files its deleting, And the plugins which it'll affect.
 [[BR]]
 That should give users an extra warning of "Are you sure you *really*
 wanted to do that, And if so, here are the files that *will* be removed,
 Continue?"

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


More information about the wp-trac mailing list