Astra_Starter_Content::get_customizer_json()

Get customizer json


Description


Source

File: inc/compatibility/class-astra-starter-content.php

	public function get_customizer_json() {
		try {
			$request = wp_remote_get( ASTRA_THEME_URI . 'inc/compatibility/starter-content/astra-settings-export.json' );
		} catch ( Exception $ex ) {
			$request = null;
		}

		if ( is_wp_error( $request ) ) {
			return false; // Bail early.
		}
		
		// @codingStandardsIgnoreStart
		/**
		 * @psalm-suppress PossiblyNullReference
		 * @psalm-suppress UndefinedMethod
		 * @psalm-suppress PossiblyNullArrayAccess
		 * @psalm-suppress PossiblyNullArgument
		 * @psalm-suppress InvalidScalarArgument
		 */
		return json_decode( $request['body'], 1 );
		// @codingStandardsIgnoreEnd
	}

Changelog

Changelog
Version Description
4.0.0 Introduced.


User Contributed Notes

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