Astra_Cache_Base::enqueue_styles( string $type )
Enqueue CSS files.
Description
Parameters
- $type
-
(string) (Required) Gets the type theme/addon.
Return
(void)
Source
File: classes/cache/class-astra-cache-base.php
public function enqueue_styles( $type ) {
if ( self::inline_assets() ) {
wp_add_inline_style( 'astra-' . $type . '-css', $this->get_dynamic_css() );
} else {
$assets_info = $this->get_asset_info( $type );
$post_timestamp = $this->get_post_timestamp( $assets_info );
if ( isset( $this->uploads_dir['url'] ) ) {
wp_enqueue_style( 'astra-' . $type . '-dynamic', $this->uploads_dir['url'] . 'astra-' . $type . '-dynamic-css-' . $this->asset_slug . '.css', array( 'astra-' . $type . '-css' ), $post_timestamp['timestamp'] );
}
}
}
Expand full source code Collapse full source code View on Trac
Changelog
| Version | Description |
|---|---|
| 2.1.0 | Introduced. |