Repository::filter_repository_args( array $repository_args, Tribe__Context|null $context = null )

Filters a View repository args to add the virtual ones.


Parameters

$repository_args

(array) (Required) The current repository args.

$context

(Tribe__Context|null) (Optional) An instance of the context the View is using or null to use the global Context.

Default value: null


Top ↑

Return

(array) The filtered repository args.


Top ↑

Source

File: src/Tribe/Views/V2/Repository.php

	public function filter_repository_args( array $repository_args, Context $context = null ) {
		$context = null !== $context ? $context : tribe_context();

		if ( $context->is( 'virtual' ) ) {
			$repository_args['virtual'] = true;
		}

		return $repository_args;
	}

Top ↑

Changelog

Changelog
Version Description
1.0.1 Introduced.