AnsPress_Form::form_head()
Description #
FORM element.
Source #
File: includes/class/form.php
private function form_head() { $attr = ''; if ( ! empty( $this->args['attr'] ) ) { $attr .= $this->args['attr']; } if ( $this->args['is_ajaxified'] ) { $attr .= ' data-action="ap_ajax_form"'; } if ( ! empty( $this->args['class'] ) ) { $attr .= ' class="' . $this->args['class'] . '"'; } ob_start(); /** * ACTION: ap_form_before_[form_name] * action for hooking before form. * * @since 2.0.1 */ do_action( 'ap_form_before_' . $this->name ); $this->output .= ob_get_clean(); // Add enctype if form is multipart. $multipart = $this->args['multipart'] ? ' enctype="multipart/form-data"' : ''; if ( ! isset( $this->args['hide_footer'] ) || false !== $this->args['hide_footer'] ) { $this->output .= '<form name="' . $this->args['name'] . '" id="' . $this->args['name'] . '" method="' . $this->args['method'] . '" action="' . $this->args['action'] . '"' . $attr . $multipart . '>'; } }
Expand full source code Collapse full source code View on GitHub: includes/class/form.php:144
Add your comment