diff --git a/wp-includes/media.php b/wp-includes/media.php index e0f2154e0b..990aa272f4 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -5772,7 +5772,7 @@ function wp_get_loading_optimization_attributes( $tag_name, $attr, $context ) { if ( $increase_count ) { wp_increase_content_media_count(); } elseif ( $maybe_increase_count ) { - /** This filter is documented in wp-admin/includes/media.php */ + /** This filter is documented in wp-includes/media.php */ $wp_min_priority_img_pixels = apply_filters( 'wp_min_priority_img_pixels', 50000 ); if ( $wp_min_priority_img_pixels <= $attr['width'] * $attr['height'] ) { @@ -5862,6 +5862,7 @@ function wp_maybe_add_fetchpriority_high_attr( $loading_attrs, $tag_name, $attr $loading_attrs['fetchpriority'] = 'high'; wp_high_priority_element_flag( false ); } + return $loading_attrs; } @@ -5882,10 +5883,12 @@ function wp_maybe_add_fetchpriority_high_attr( $loading_attrs, $tag_name, $attr * @param int $threshold Minimum square-pixels threshold. Default 50000. */ $wp_min_priority_img_pixels = apply_filters( 'wp_min_priority_img_pixels', 50000 ); + if ( $wp_min_priority_img_pixels <= $attr['width'] * $attr['height'] ) { $loading_attrs['fetchpriority'] = 'high'; wp_high_priority_element_flag( false ); } + return $loading_attrs; } @@ -5904,5 +5907,6 @@ function wp_high_priority_element_flag( $value = null ) { if ( is_bool( $value ) ) { $high_priority_element = $value; } + return $high_priority_element; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 2bfff3d33c..83b0286e92 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.4-alpha-56385'; +$wp_version = '6.4-alpha-56386'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.