Template_Tag_Handler::__construct( string $slug, array $tags, array $tag_args_definition, array $groups = array() )

Constructor.

Description

Sets the template tag handler properties.

See also

Parameters

$slug

(string) (Required) Template tag handler slug.

$tags

(array) (Required) Template tags as an associative array of $slug => $data pairs.

$tag_args_definition

(array) (Required) Template tag callback arguments definition as an array of scalar $type values, where $type must either be a class name, or one out of 'string', 'int', 'float' or 'bool'.

$groups

(array) (Optional) Template tag groups.

Default value: array()

Source

File: src/components/template-tag-handler.php

	public function __construct( $slug, $tags, $tag_args_definition, $groups = array() ) {
		$this->slug                = $slug;
		$this->tags                = $this->validate_tags( $tags );
		$this->tag_args_definition = $this->validate_tag_args_definition( $tag_args_definition );
		$this->groups              = $groups;
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.