Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

wp_get_loading_optimization_attributes()

3 tags 1 category

wp_get_loading_optimization_attributes() — Gets loading optimization attributes. This function returns an array of attributes that should be merged into the given attributes array to optimize loading performance. Potential attributes returned by this function are: loading attribute with a value of “lazy” fetchpriority attribute with a value of “high” decoding attribute with a value of “async” If any of these attributes are already present in the given attributes, they will not be modified. Note that no element should have both loading=”lazy” and fetchpriority=”high”, so the function will trigger a warning in case both attributes are present with those values.

Inputs: $tag_name (string): The tag name. $attr (array): Array of the attributes for the tag. $context (string): Context for the element for which the loading optimization attribute is requested.

Returns array: Loading optimization attributes.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…