Make WordPress Core


Ignore:
Timestamp:
09/17/2019 09:02:22 PM (5 years ago)
Author:
johnbillion
Message:

Docs: Improve docs for upload and wp_die() related functions.

See #47110

File:
1 edited

Legend:

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

    r46126 r46162  
    21592159
    21602160/**
    2161  * Get an array containing the current upload directory's path and url.
     2161 * Returns an array containing the current upload directory's path and URL.
    21622162 *
    21632163 * Checks the 'upload_path' option, which should be from the web root folder,
     
    21772177 * directory is not writable by the server.
    21782178 *
    2179  * On success, the returned array will have many indices:
    2180  * 'path' - base directory and sub directory or full path to upload directory.
    2181  * 'url' - base url and sub directory or absolute URL to upload directory.
    2182  * 'subdir' - sub directory if uploads use year/month folders option is on.
    2183  * 'basedir' - path without subdir.
    2184  * 'baseurl' - URL path without subdir.
    2185  * 'error' - false or error message.
    2186  *
    21872179 * @since 2.0.0
    21882180 * @uses _wp_upload_dir()
     
    21952187 *                           Default true for backward compatibility.
    21962188 * @param bool   $refresh_cache Optional. Whether to refresh the cache. Default false.
    2197  * @return array See above for description.
     2189 * @return array {
     2190 *     Array of information about the upload directory.
     2191 *
     2192 *     @type string       $path    Base directory and subdirectory or full path to upload directory.
     2193 *     @type string       $url     Base URL and subdirectory or absolute URL to upload directory.
     2194 *     @type string       $subdir  Subdirectory if uploads use year/month folders option is on.
     2195 *     @type string       $basedir Path without subdir.
     2196 *     @type string       $baseurl URL path without subdir.
     2197 *     @type string|false $error   False or error message.
     2198 * }
    21982199 */
    21992200function wp_upload_dir( $time = null, $create_dir = true, $refresh_cache = false ) {
     
    22112212     * @since 2.0.0
    22122213     *
    2213      * @param array $uploads Array of upload directory data with keys of 'path',
    2214      *                       'url', 'subdir, 'basedir', and 'error'.
     2214     * @param array $uploads {
     2215     *     Array of information about the upload directory.
     2216     *
     2217     *     @type string       $path    Base directory and subdirectory or full path to upload directory.
     2218     *     @type string       $url     Base URL and subdirectory or absolute URL to upload directory.
     2219     *     @type string       $subdir  Subdirectory if uploads use year/month folders option is on.
     2220     *     @type string       $basedir Path without subdir.
     2221     *     @type string       $baseurl URL path without subdir.
     2222     *     @type string|false $error   False or error message.
     2223     * }
    22152224     */
    22162225    $uploads = apply_filters( 'upload_dir', $cache[ $key ] );
     
    36123621 * @access private
    36133622 *
    3614  * @param string       $message Error message.
    3615  * @param string       $title   Optional. Error title. Default empty.
    3616  * @param string|array $args    Optional. Arguments to control behavior. Default empty array.
    3617  * @return array List of processed $message string, $title string, and $args array.
     3623 * @param string|WP_Error $message Error message or WP_Error object.
     3624 * @param string          $title   Optional. Error title. Default empty.
     3625 * @param string|array    $args    Optional. Arguments to control behavior. Default empty array.
     3626 * @return array {
     3627 *     Processed arguments.
     3628 *
     3629 *     @type string $0 Error message.
     3630 *     @type string $1 Error title.
     3631 *     @type array  $2 Arguments to control behavior.
     3632 * }
    36183633 */
    36193634function _wp_die_process_input( $message, $title = '', $args = array() ) {
Note: See TracChangeset for help on using the changeset viewer.