wp_get_script_polyfill

SummerySummery

Returns contents of an inline script used in appending polyfill scripts for browsers which fail the provided tests. The provided array is a mapping from a condition to verify feature support to its polyfill script handle.

Syntax

wp_get_script_polyfill( WP_Scripts $scripts, array $tests )

ParametersParameters

$scripts

(WP_Scripts) (Required) WP_Scripts object.

$tests

(array) (Required) Features to detect.

ReturnReturn

(string) Conditional polyfill inline script.

SourceSource

File: wp-includes/script-loader.php


			

ChangelogChangelog

Changelog
Version Description
5.0.0 Introduced.
Scroll to Top