[wp-trac] [WordPress Trac] #19643: Allow array for $extra_fields in request_filesystem_credentials
WordPress Trac
wp-trac at lists.automattic.com
Mon Sep 10 22:39:05 UTC 2012
#19643: Allow array for $extra_fields in request_filesystem_credentials
-------------------------------------------------+-------------------------
Reporter: griffinjt | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
Component: Filesystem | Review
Severity: normal | Version: 3.3
Keywords: has-patch needs-testing dev- | Resolution:
feedback |
-------------------------------------------------+-------------------------
Changes (by kurtpayne):
* cc: kurtpayne (added)
Comment:
Submitting an alternate patch. This will handle multi-dimensional arrays,
too. E.g.
{{{
<input type="hidden" name="field1[]" value="value1" />
<input type="hidden" name="field1[]" value="value2" />
<input type="hidden" name="field1[]" value="value3" />
<input type="hidden" name="field2[deep][array][value]" value="value4" />
<input type="hidden" name="field3[][][]" value="value5" />
<input type="hidden" name="field4" value="value6" />
}}}
And the corresponding php:
{{{
$form_fields = array ( 'field1', 'field2', 'field3', 'field4' );
request_filesystem_credentials($url, $method, false, false, $form_fields)
);
}}}
I'm testing this with [http://ottopress.com/2011/tutorial-using-the-
wp_filesystem/ Otto's test filesystem plugin].
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19643#comment:14>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list