Automator_Input_Parser::text( null $field_text = null, null $recipe_id = null, null $user_id = null, null $trigger_args = array() )


Parameters Parameters

$field_text

(null) (Optional)

Default value: null

$recipe_id

(null) (Optional)

Default value: null

$user_id

(null) (Optional)

Default value: null

$trigger_args

(null) (Optional)

Default value: array()


Top ↑

Return Return

(null|string)


Source Source

File: src/core/lib/utilities/class-automator-input-parser.php

	public function text( $field_text = null, $recipe_id = null, $user_id = null, $trigger_args = array() ) {
		// Sanity check that there was a $field_text passed
		if ( null === $field_text ) {
			return null;
		}
		$args = array(
			'field_text'  => $field_text,
			'meta_key'    => null,
			'user_id'     => $user_id,
			'action_data' => null,
			'recipe_id'   => $recipe_id,
		);

		if ( ! empty( $trigger_args['trigger_log_id'] ) ) {
			$args['trigger_log_id'] = $trigger_args['trigger_log_id'];
		}
		if ( ! empty( $trigger_args['trigger_log_id'] ) ) {
			$args['run_number'] = $trigger_args['run_number'];
		}

		$return = apply_filters( 'automator_text_field_parsed', $this->parse_vars( $args, $trigger_args ), $args );

		/**
		 * May be run a do_shortcode on the field itself if it contains a shortcode?
		 * Ticket# 22255
		 * @since 3.0
		 */
		return do_shortcode( stripslashes( $return ) );
	}