Astra_Addon_Cache::setup_cache()

Fetch theme CSS data to be added in the dynamic CSS file.


Description


Return

(void)


Source

File: classes/cache/class-astra-addon-cache.php

	public function setup_cache() {
		$assets_info = $this->get_asset_info( 'addon' );

		if ( array_key_exists( 'path', $assets_info ) && ! file_exists( $assets_info['path'] ) && ! self::inline_assets() ) {
			$astra_addon_css_data = $this->get_dynamic_css();

			// Return if there is no data to add in the css file.
			if ( empty( $astra_addon_css_data ) ) {
				return;
			}

			$this->write_assets( $astra_addon_css_data, 'addon' );
		}

		// Call enqueue styles function.
		$this->enqueue_styles( 'addon' );
	}

Changelog

Changelog
Version Description
2.1.0 Introduced.


User Contributed Notes

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