Form::__construct( string $form_name, array $args )

Description #

Initialize the class.

Parameters #

  • $form_name
    string (Required) Name of form.
  • $args
    array (Required) Arguments for form.

Source #

File: lib/class-form.php

	public function __construct( $form_name, $args ) {
		$this->form_name = $form_name;
		$this->args      = wp_parse_args(
			$args,
			array(
				'form_tag'      => true,
				'submit_button' => true,
				'submit_label'  => __( 'Submit', 'anspress-question-answer' ),
				'editing'       => false,
				'editing_id'    => 0,
			)
		);

		$this->editing    = $this->args['editing'];
		$this->editing_id = $this->args['editing_id'];
	}

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