API_Action::api_structure()

Returns the API structure this action uses.

Description

The API structure is not scoped for the plugin. If you need the configured variant of the API, use the api() method. If you don’t though, this method is more efficient to use then.

See also

Return

(APIAPI\Core\Structures\Structure) The API structure.

Source

File: src/modules/actions/api-action.php

	protected function api_structure() {
		if ( null === $this->lazyloaded_api_structure ) {
			$this->lazyloaded_api_structure = apiapi_manager()->structures()->get( $this->api_structure_name );
		}

		return $this->lazyloaded_api_structure;
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.