Astra_Docs_Loader::get_url()

Get the local URL which contains the styles.


Description

Fallback to the remote URL if we were unable to write the file locally.


Return

(string)


Source

File: inc/lib/docs/class-astra-docs-loader.php

	public function get_url() {

		// Check if the local stylesheet exists.
		if ( $this->local_file_exists() ) {

			// Attempt to update the stylesheet. Return the local URL on success.
			if ( $this->write_json() ) {
				return $this->get_local_docs_json_url();
			}
		}

		$astra_docs_url = file_exists( $this->get_local_docs_file_path() ) ? $this->get_local_docs_json_url() : $this->remote_url;

		return $astra_docs_url;
	}

Changelog

Changelog
Version Description
4.6.0 Introduced.


User Contributed Notes

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