This function’s access is marked private. This means it is not intended for use by other plugin or theme developers, only in this plugin itself. It is listed here for completeness.

Template_Tag_Handler::validate_tag_args_definition( array $tag_args_definition )

Validates a template tag arguments definition.

Description

Parameters

$tag_args_definition

(array) (Required) Template tag callback arguments definition as an array of scalar $type values.

Return

(array) Validated template tag callback arguments definition.

Source

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

	private function validate_tag_args_definition( $tag_args_definition ) {
		foreach ( $tag_args_definition as $type ) {
			switch ( $type ) {
				case 'string':
				case 'int':
				case 'float':
				case 'bool':
					break;
				default:
					if ( ! class_exists( $type ) && ! interface_exists( $type ) ) {
						/* translators: %s: template tag handler slug */
						throw new InvalidArgumentException( sprintf( __( 'Invalid template tag arguments definition for handler %s.', 'torro-forms' ), $this->slug ) );
					}
			}
		}

		return $tag_args_definition;
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.