[wp-trac] [WordPress Trac] #20437: WP Upgrader filter to allow plugins to upload to existing directory
WordPress Trac
wp-trac at lists.automattic.com
Fri Apr 13 16:52:30 UTC 2012
#20437: WP Upgrader filter to allow plugins to upload to existing directory
-------------------------+-----------------------------
Reporter: usermrpapa | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Upload | Version: 3.3.1
Severity: normal | Keywords: has-patch
-------------------------+-----------------------------
Our plugin for WP uses various elements of the WP upgrader class to manage
plugins for our plugin. ;) This has worked great except when we went to
extend it further and allow uploading of plugins through the WP Upgrader
class much like you can with WP plugins.
The issue is that currently, the WP Upgrader class is coded to expect the
upload destination to be empty - EXCEPT if the upload destination (the
base directory) is one of these hard coded locations:
in_array( $destination, array(ABSPATH, WP_CONTENT_DIR, WP_PLUGIN_DIR,
WP_CONTENT_DIR . '/themes') )
So since our plugin storage location is not one of those, it fails since
there may already be some plugins there.
Sure would be nice if that array of locations that does not have to be
empty (the important base dirs which allow dropping down a directory
level)... a simple filter would accomplish this...
Hope its not too late in 4.3 for a simple filter...
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20437>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list