Make WordPress Core

Changeset 49020


Ignore:
Timestamp:
09/20/2020 03:53:52 PM (4 years ago)
Author:
johnbillion
Message:

Docs: Inline documentation improvements for media related functions and hooks.

See #47364, #50768

Location:
trunk/src
Files:
4 edited

Legend:

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

    r49017 r49020  
    967967
    968968/**
    969  * Retrieve the path or url of an attachment's attached file.
     969 * Retrieve the path or URL of an attachment's attached file.
    970970 *
    971971 * If the attached file is not present on the local filesystem (usually due to replication plugins),
    972  * then the url of the file is returned if url fopen is supported.
     972 * then the URL of the file is returned if `allow_url_fopen` is supported.
    973973 *
    974974 * @since 3.4.0
     
    990990
    991991                /**
    992                  * Filters the path to the current image.
     992                 * Filters the path to an attachment's file when editing the image.
    993993                 *
    994994                 * The filter is evaluated for all image sizes except 'full'.
     
    10051005    } elseif ( function_exists( 'fopen' ) && ini_get( 'allow_url_fopen' ) ) {
    10061006        /**
    1007          * Filters the image URL if not in the local filesystem.
    1008          *
    1009          * The filter is only evaluated if fopen is enabled on the server.
     1007         * Filters the path to an attachment's URL when editing the image.
     1008         *
     1009         * The filter is only evaluated if the file isn't stored locally and `allow_url_fopen` is enabled on the server.
    10101010         *
    10111011         * @since 3.1.0
  • trunk/src/wp-admin/includes/media.php

    r48684 r49020  
    182182 * @param string  $align   Image CSS alignment property.
    183183 * @param string  $url     Image source URL (not used).
    184  * @param string  $size    Image size (`thumbnail`, `medium`, `large`, `full`, or added with `add_image_size()`) (not used).
     184 * @param string  $size    Image size (not used).
    185185 * @param string  $alt     Image `alt` attribute (not used).
    186186 * @return string The image HTML markup with caption shortcode.
  • trunk/src/wp-includes/media.php

    r49012 r49020  
    750750 * @return array|false {
    751751 *     Array of file relative path, width, and height on success. Additionally includes absolute
    752  *     path and URL if registered size is passed to $size parameter. False on failure.
    753  *
    754  *     @type string $file   Image's path relative to uploads directory
    755  *     @type int    $width  Width of image
    756  *     @type int    $height Height of image
    757  *     @type string $path   Image's absolute filesystem path.
    758  *     @type string $url    Image's URL.
     752 *     path and URL if registered size is passed to `$size` parameter. False on failure.
     753 *
     754 *     @type string $file   Path of image relative to uploads directory.
     755 *     @type int    $width  Width of image in pixels.
     756 *     @type int    $height Height of image in pixels.
     757 *     @type string $path   Absolute filesystem path of image.
     758 *     @type string $url    URL of image.
    759759 * }
    760760 */
     
    11541154 * @access private
    11551155 *
    1156  * @param string $size_name  Image size. Accepts any valid image size name ('thumbnail', 'medium', etc.).
     1156 * @param string $size_name  Image size. Accepts any registered image size name.
    11571157 * @param array  $image_meta The image meta data.
    1158  * @return array|bool The image meta data as returned by `wp_get_attachment_metadata()`.
     1158 * @return array|false {
     1159 *     Array of width and height or false if the size isn't present in the meta data.
     1160 *
     1161 *     @type int $0 Image width.
     1162 *     @type int $1 Image height.
     1163 * }
    11591164 */
    11601165function _wp_get_image_size_from_meta( $size_name, $image_meta ) {
  • trunk/src/wp-includes/post-template.php

    r48991 r49020  
    16461646     *                                Default 'thumbnail'.
    16471647     * @param bool         $permalink Whether to add permalink to image. Default false.
    1648      * @param bool         $icon      Whether to include an icon. Default false.
    1649      * @param string|bool  $text      If string, will be link text. Default false.
    1650      * @param array|string $attr      Array or string of attributes. Default empty.
     1648     * @param bool         $icon      Whether to include an icon.
     1649     * @param string|bool  $text      If string, will be link text.
     1650     * @param array|string $attr      Array or string of attributes.
    16511651     */
    16521652    return apply_filters( 'wp_get_attachment_link', "<a href='" . esc_url( $url ) . "'>$link_text</a>", $id, $size, $permalink, $icon, $text, $attr );
Note: See TracChangeset for help on using the changeset viewer.