WC_Frontend_Scripts::enqueue_style()private staticWC 1.0

Register and enqueue a styles for use.

Метод класса: WC_Frontend_Scripts{}

Хуков нет.


null. Ничего (null).


$result = WC_Frontend_Scripts::enqueue_style( $handle, $path, $deps, $version, $media, $has_rtl );
$handle(строка) (обязательный)
Name of the stylesheet. Should be unique.
Full URL of the stylesheet, or path of the stylesheet relative to the WordPress root directory.
По умолчанию: ''
An array of registered stylesheet handles this stylesheet depends on.
По умолчанию: array()
String specifying stylesheet version number, if it has one, which is added to the URL as a query string for cache busting purposes. If version is set to false, a version number is automatically added equal to current installed WordPress version. If set to null, no version is added.
По умолчанию: WC_VERSION
The media for which this stylesheet has been defined. Accepts media types like 'all', 'print' and 'screen', or media queries like '(orientation: portrait)' and '(max-width: 640px)'.
По умолчанию: 'all'
If has RTL version to load too.
По умолчанию: false

Код WC_Frontend_Scripts::enqueue_style() WC 9.1.2

private static function enqueue_style( $handle, $path = '', $deps = array(), $version = WC_VERSION, $media = 'all', $has_rtl = false ) {
	if ( ! in_array( $handle, self::$styles, true ) && $path ) {
		self::register_style( $handle, $path, $deps, $version, $media, $has_rtl );
	wp_enqueue_style( $handle );