Mec_Event_Tokens::parse_tokens( mixed $value, mixed $pieces, mixed $recipe_id, mixed $trigger_data, mixed $user_id, mixed $replace_args )

Process the tokens.


Parameters Parameters

$value

(mixed) (Required) The value accepted from automator_maybe_parse_token.

$pieces

(mixed) (Required) The pieces accepted from automator_maybe_parse_token.

$recipe_id

(mixed) (Required) The recipe id accepted from automator_maybe_parse_token.

$trigger_data

(mixed) (Required) The trigger data accepted from automator_maybe_parse_token.

$user_id

(mixed) (Required) The user id accepted from automator_maybe_parse_token.

$replace_args

(mixed) (Required) The arguments accepted from automator_maybe_parse_token.


Top ↑

Return Return

(mixed) The token value to display.


Source Source

File: src/integrations/modern-events-calendar/tokens/mec-event-tokens.php

	public function parse_tokens( $value, $pieces, $recipe_id, $trigger_data, $user_id, $replace_args ) {

		$to_match = array(
			$this->token . 'EVENT_DATE',
			$this->token . 'EVENT_TIME',
			$this->token . 'EVENT_LOCATION',
			$this->token . 'EVENT_ORGANIZER',
			$this->token . 'EVENT_COST',
		);

		if ( $pieces ) {

			if ( array_intersect( $to_match, $pieces ) ) {

				$value = $this->replace_values( $value, $pieces, $recipe_id, $trigger_data, $user_id, $replace_args );

			}
		}

		return $value;

	}