Make WordPress Core


Ignore:
Timestamp:
12/12/2015 04:15:07 PM (8 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve documentation for request_filesystem_credentials() and the corresponding filter.

Props swissspidy, danhgilmore, slushman.
Fixes #34858.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/file.php

    r35885 r35888  
    10121012 * @since 2.5.
    10131013 *
    1014  * @todo Properly mark optional arguments as such
    1015  *
    10161014 * @global string $pagenow
    10171015 *
    1018  * @param string $form_post    the URL to post the form to
    1019  * @param string $type         the chosen Filesystem method in use
    1020  * @param bool   $error        if the current request has failed to connect
    1021  * @param string $context      The directory which is needed access to, The write-test will be performed on this directory by get_filesystem_method()
    1022  * @param array  $extra_fields Extra POST fields which should be checked for to be included in the post.
    1023  * @param bool   $allow_relaxed_file_ownership Whether to allow Group/World writable.
    1024  * @return bool False on failure. True on success.
    1025  */
    1026 function request_filesystem_credentials($form_post, $type = '', $error = false, $context = false, $extra_fields = null, $allow_relaxed_file_ownership = false ) {
     1016 * @param string $form_post                    The URL to post the form to.
     1017 * @param string $type                         Optional. Chosen type of filesystem. Default empty.
     1018 * @param bool   $error                        Optional. Whether the current request has failed to connect.
     1019 *                                             Default false.
     1020 * @param string $context                      Optional. Full path to the directory that is tested
     1021 *                                             for being writable. Default false.
     1022 * @param array  $extra_fields                 Optional. Extra POST fields which should be checked for
     1023 *                                             to be included in the post. Default null.
     1024 * @param bool   $allow_relaxed_file_ownership Optional. Whether to allow Group/World writable.
     1025 *                                             Default false.
     1026 *
     1027 * @return bool False on failure, true on success.
     1028 */
     1029function request_filesystem_credentials( $form_post, $type = '', $error = false, $context = false, $extra_fields = null, $allow_relaxed_file_ownership = false ) {
    10271030    global $pagenow;
    10281031
     
    10351038     * @since 2.5.0
    10361039     *
    1037      * @param mixed  $output       Form output to return instead. Default empty.
    1038      * @param string $form_post    URL to POST the form to.
    1039      * @param string $type         Chosen type of filesystem.
    1040      * @param bool   $error        Whether the current request has failed to connect.
    1041      *                             Default false.
    1042      * @param string $context      Full path to the directory that is tested for
    1043      *                             being writable.
    1044      * @param bool $allow_relaxed_file_ownership Whether to allow Group/World writable.
    1045      * @param array  $extra_fields Extra POST fields.
     1040     * @param mixed  $output                       Form output to return instead. Default empty.
     1041     * @param string $form_post                    The URL to post the form to.
     1042     * @param string $type                         Chosen type of filesystem.
     1043     * @param bool   $error                        Whether the current request has failed to connect.
     1044     *                                             Default false.
     1045     * @param string $context                      Full path to the directory that is tested for
     1046     *                                             being writable.
     1047     * @param bool   $allow_relaxed_file_ownership Whether to allow Group/World writable.
     1048     *                                             Default false.
     1049     * @param array  $extra_fields                 Extra POST fields.
    10461050     */
    10471051    $req_cred = apply_filters( 'request_filesystem_credentials', '', $form_post, $type, $error, $context, $extra_fields, $allow_relaxed_file_ownership );
Note: See TracChangeset for help on using the changeset viewer.