Constructor.
Description
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
Version | Description |
---|---|
1.0.0 | Introduced. |