Make WordPress Core


Ignore:
Timestamp:
06/29/2023 05:32:35 PM (3 years ago)
Author:
flixos90
Message:

Media: Fix inconsistent docs for existing wp_img_tag_add_loading_attr filter and remove duplicate.

Follow-up to [56037].

Props thekt12.
See #58235.

File:
1 edited

Legend:

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

    r56037 r56112  
    19641964                /**
    19651965                 * Filters the `loading` attribute value to add to an image. Default `lazy`.
    1966                  * This filter is added in for backward compatibility.
    19671966                 *
    19681967                 * Returning `false` or an empty string will not add the attribute.
    19691968                 * Returning `true` will add the default value.
    1970                  * `true` and `false` usage supported for backward compatibility.
    19711969                 *
    19721970                 * @since 5.5.0
    19731971                 *
    1974                  * @param string|bool $loading Current value for `loading` attribute for the image.
     1972                 * @param string|bool $value   The `loading` attribute value. Returning a falsey value will result in
     1973                 *                             the attribute being omitted for the image.
    19751974                 * @param string      $image   The HTML `img` tag to be filtered.
    19761975                 * @param string      $context Additional context about how the function was called or where the img tag is.
Note: See TracChangeset for help on using the changeset viewer.