Docs: Improve documentation for `wp_lazy_loading_enabled()` per the documentation standards.

See #50768.

git-svn-id: https://develop.svn.wordpress.org/trunk@48855 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-08-24 22:14:17 +00:00
parent 4869de2a1c
commit 8e7e3c5b72
1 changed files with 6 additions and 4 deletions

View File

@ -1684,12 +1684,13 @@ function wp_image_add_srcset_and_sizes( $image, $image_meta, $attachment_id ) {
} }
/** /**
* Determine whether to add the `loading` attribute to the specified tag in the specified context. * Determines whether to add the `loading` attribute to the specified tag in the specified context.
* *
* @since 5.5.0 * @since 5.5.0
* *
* @param string $tag_name The tag name. * @param string $tag_name The tag name.
* @param string $context Additional context, like the current filter name or the function name from where this was called. * @param string $context Additional context, like the current filter name
* or the function name from where this was called.
* @return bool Whether to add the attribute. * @return bool Whether to add the attribute.
*/ */
function wp_lazy_loading_enabled( $tag_name, $context ) { function wp_lazy_loading_enabled( $tag_name, $context ) {
@ -1704,7 +1705,8 @@ function wp_lazy_loading_enabled( $tag_name, $context ) {
* *
* @param bool $default Default value. * @param bool $default Default value.
* @param string $tag_name The tag name. * @param string $tag_name The tag name.
* @param string $context Additional context, like the current filter name or the function name from where this was called. * @param string $context Additional context, like the current filter name
* or the function name from where this was called.
*/ */
return (bool) apply_filters( 'wp_lazy_loading_enabled', $default, $tag_name, $context ); return (bool) apply_filters( 'wp_lazy_loading_enabled', $default, $tag_name, $context );
} }
@ -1817,7 +1819,7 @@ function wp_img_tag_add_loading_attr( $image, $context ) {
* @since 5.5.0 * @since 5.5.0
* *
* @param string|bool $value The `loading` attribute value. Returning a falsey value will result in * @param string|bool $value The `loading` attribute value. Returning a falsey value will result in
* the attribute being omitted for the image. Default is `lazy`. * the attribute being omitted for the image. Default 'lazy'.
* @param string $image The HTML `img` tag to be filtered. * @param string $image The HTML `img` tag to be filtered.
* @param string $context Additional context about how the function was called or where the img tag is. * @param string $context Additional context about how the function was called or where the img tag is.
*/ */