Repository::filter_repository_args( array $repository_args, Tribe__Context|null $context = null )
Filters a View repository args to add the virtual ones.
Contents
Parameters
- $repository_args
-
(array) (Required) The current repository args.
- $context
-
(Tribe__Context|null) (Optional) An instance of the context the View is using or
nullto use the global Context.Default value: null
Return
(array) The filtered repository args.
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;
}
Changelog
| Version | Description |
|---|---|
| 1.0.1 | Introduced. |