AnsPress_Form::__construct( array $args = array() )
Description #
Initiate the class.
Parameters #
- $argsarray (Optional) Form arguments. Default value: array()
Source #
File: includes/class/form.php
public function __construct( $args = array() ) { // Default form arguments. $defaults = array( 'method' => 'POST', 'action' => '', 'is_ajaxified' => false, 'class' => 'ap-form', 'multipart' => false, 'submit_button' => __( 'Submit', 'anspress-question-answer' ), ); // Merge defaults args. $this->args = wp_parse_args( $args, $defaults ); // Set the name of the form. $this->name = $this->args['name']; global $ap_errors; $this->errors = $ap_errors; $this->add_default_in_field(); $this->order_fields(); }
Expand full source code Collapse full source code View on GitHub: includes/class/form.php:58
Add your comment