Make WordPress Core

Changeset 56386


Ignore:
Timestamp:
08/11/2023 11:33:27 AM (9 months ago)
Author:
SergeyBiryukov
Message:

Docs: Correct duplicate hook reference for wp_min_priority_img_pixels.

The original filter location is wp_maybe_add_fetchpriority_high_attr() in wp-includes/media.php.

This commit updates the instance in wp_get_loading_optimization_attributes() to point to the correct file.

Follow-up to [56037], [56143], [56347].

Props tmatsuur, rajinsharwar, khokansardar.
Fixes #59067.

File:
1 edited

Legend:

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

    r56347 r56386  
    57735773        wp_increase_content_media_count();
    57745774    } elseif ( $maybe_increase_count ) {
    5775         /** This filter is documented in wp-admin/includes/media.php */
     5775        /** This filter is documented in wp-includes/media.php */
    57765776        $wp_min_priority_img_pixels = apply_filters( 'wp_min_priority_img_pixels', 50000 );
    57775777
     
    58635863            wp_high_priority_element_flag( false );
    58645864        }
     5865
    58655866        return $loading_attrs;
    58665867    }
     
    58835884     */
    58845885    $wp_min_priority_img_pixels = apply_filters( 'wp_min_priority_img_pixels', 50000 );
     5886
    58855887    if ( $wp_min_priority_img_pixels <= $attr['width'] * $attr['height'] ) {
    58865888        $loading_attrs['fetchpriority'] = 'high';
    58875889        wp_high_priority_element_flag( false );
    58885890    }
     5891
    58895892    return $loading_attrs;
    58905893}
     
    59055908        $high_priority_element = $value;
    59065909    }
     5910
    59075911    return $high_priority_element;
    59085912}
Note: See TracChangeset for help on using the changeset viewer.