Template_Tag_Handler::get_tag_labels( string|null $group = null )

Gets all available template tag labels for the handler.

Description

Parameters

$group

(string|null) (Optional) Group slug to only get tags of that group.

Default value: null

Return

(array) Array of template tag labels.

Source

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

	public function get_tag_labels( $group = null ) {
		$labels = array();

		foreach ( $this->tags as $slug => $data ) {
			if ( null !== $group && $data['group'] !== $group ) {
				continue;
			}

			$labels[ $slug ] = $data['label'];
		}

		return $labels;
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.