Warning: This method has been deprecated. Use Automator()->helpers->recipe->field->int() instead.

Automator_Helpers_Recipe_Field::integer_field( string $option_code = 'INT', string $label = null, string $description = null, string $placeholder = null )


Parameters Parameters

$option_code

(string) (Optional)

Default value: 'INT'

$label

(string) (Optional)

Default value: null

$description

(string) (Optional)

Default value: null

$placeholder

(string) (Optional)

Default value: null


Top ↑

Return Return

(mixed)


Source Source

File: src/core/lib/helpers/class-automator-recipe-helpers-field.php

	public function integer_field( $option_code = 'INT', $label = null, $description = null, $placeholder = null ) {
		if ( defined( 'AUTOMATOR_DEBUG_MODE' ) && true === AUTOMATOR_DEBUG_MODE ) {
			_doing_it_wrong( 'Automator()->helpers->recipe->field->integer_field()', 'Use Automator()->helpers->recipe->field->int() instead.', '3.0' );
		}
		$option = array(
			'option_code' => $option_code,
			'label'       => $label,
			'description' => $description,
			'placeholder' => $placeholder,
			'input_type'  => 'int',
			'required'    => true,
		);

		$option = $this->int( $option );
		$option = apply_filters_deprecated( 'uap_option_integer_field', array( $option ), '3.0', 'automator_option_integer_field' );

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


Top ↑

Changelog Changelog

Changelog
Version Description
3.0 Introduced.