Astra_Cache_Base::get_asset_info( string $type )
Returns an array of paths for the CSS assets of the current post.
Description
Parameters
- $type
-
(string) (Required) Gets the type theme/addon.
Return
(array)
Source
File: classes/cache/class-astra-cache-base.php
public function get_asset_info( $type ) {
$css_suffix = 'astra-' . $type . '-dynamic-css';
$css_suffix = 'astra-' . $type . '-dynamic-css';
$info = array();
if ( ! isset( $this->uploads_dir['path'] ) || ! isset( $this->uploads_dir['url'] ) ) {
return $info;
}
$info['path'] = $this->uploads_dir['path'] . $css_suffix . '-' . $this->asset_slug . '.css';
$info['css_url'] = $this->uploads_dir['url'] . $css_suffix . '-' . $this->asset_slug . '.css';
return $info;
}
Expand full source code Collapse full source code View on Trac
Changelog
| Version | Description |
|---|---|
| 2.1.0 | Introduced. |