Wp_Fusion_Helpers::fusion_tags( string $label = '', string $trigger_meta = '' )


Parameters Parameters

$label

(string) (Optional)

Default value: ''

$trigger_meta

(string) (Optional)

Default value: ''


Top ↑

Return Return

(mixed)


Source Source

File: src/integrations/wp-fusion/helpers/wp-fusion-helpers.php

	public static function fusion_tags( $label = '', $trigger_meta = '' ) {

		if ( empty( $label ) ) {
			$label = __( 'Tag', 'uncanny-automator' );
		}

		$tags    = wp_fusion()->settings->get( 'available_tags' );
		$options = array();
		if ( $tags ) {
			foreach ( $tags as $t_id => $tag ) {
				if ( is_array( $tag ) && isset( $tag['label'] ) ) {
					$options[ $t_id ] = $tag['label'];
				} else {
					$options[ $t_id ] = $tag;
				}
			}
		}

		$option = array(
			'option_code' => $trigger_meta,
			'label'       => $label,
			'input_type'  => 'select',
			'required'    => true,
			'options'     => $options,
		);

		return apply_filters( 'uap_option_wp_fusion_tags', $option );
	}