Field::__construct( string $form_name, string $name, array $args )

Description #

Initialize the class.

Parameters #

  • $form_name
    string (Required) Name of parent form.
  • $name
    string (Required) Name of field.
  • $args
    array (Required) Field arguments.

Source #

File: lib/form/class-field.php

	public function __construct( $form_name, $name, $args ) {
		$this->original_name = $name;
		$this->field_name    = $form_name . '[' . $name . ']';
		$this->form_name     = $form_name;
		$this->args          = $args;
		$this->field_id      = $this->id();

		$this->prepare();
	}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment