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

See #50768.
Built from https://develop.svn.wordpress.org/trunk@48855


git-svn-id: http://core.svn.wordpress.org/trunk@48617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-08-24 22:16:06 +00:00
parent c3a7d6c379
commit 0c8644c071
2 changed files with 7 additions and 5 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
*
* @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.
*/
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 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 );
}
@ -1817,7 +1819,7 @@ function wp_img_tag_add_loading_attr( $image, $context ) {
* @since 5.5.0
*
* @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 $context Additional context about how the function was called or where the img tag is.
*/

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.6-alpha-48853';
$wp_version = '5.6-alpha-48855';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.