Hooks::filter_include_templates( TECEventsEditorFull_SiteWP_Block_Template[] $query_result, array $query, $template_type )
Adds the archive template to the array of block templates.
Contents
Parameters
- $query_result
-
(TECEventsEditorFull_SiteWP_Block_Template[]) (Required) Array of found block templates.
- $query
-
(array) (Optional) Arguments to retrieve templates.
- 'slug__in'
(array) List of slugs to include. - 'wp_id'
(int) Post ID of customized template.
- 'slug__in'
Return
(array) The modified $query.
Source
File: src/Events/Editor/Full_Site/Hooks.php
public function filter_include_templates( $query_result, $query, $template_type ) { // Don't load this template in the admin - so it's not editable by users. if ( is_admin() ) { return $query_result; } return $this->container->make( Templates::class )->add_events_archive( $query_result, $query, $template_type ); }
Changelog
Version | Description |
---|---|
5.14.2 | Introduced. |