Hooks::filter_include_templates( TECEventsEditorFull_SiteWP_Block_Template[] $query_result, array $query,  $template_type )

Adds the archive template to the array of block templates.


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.


Top ↑

Return #

(array) The modified $query.


Top ↑

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 );
	}

Top ↑

Changelog #

Changelog
Version Description
5.14.2 Introduced.