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;
	}

Changelog

Changelog
Version Description
2.1.0 Introduced.


User Contributed Notes

You must log in before being able to contribute a note or feedback.