Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
WC_Frontend_Scripts::enqueue_style( string $handle, string $path = '', string[] $deps = array(), string $version = WC_VERSION, string $media = 'all', boolean $has_rtl = false )
Register and enqueue a styles for use.
Description Description
Parameters Parameters
- $handle
-
(Required) Name of the stylesheet. Should be unique.
- $path
-
(Optional) Full URL of the stylesheet, or path of the stylesheet relative to the WordPress root directory.
Default value: ''
- $deps
-
(Optional) An array of registered stylesheet handles this stylesheet depends on.
Default value: array()
- $version
-
(Optional) 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.
Default value: WC_VERSION
- $media
-
(Optional) 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)'.
Default value: 'all'
- $has_rtl
-
(Optional) If has RTL version to load too.
Default value: false
Source Source
File: includes/class-wc-frontend-scripts.php
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 ); }