Changeset 2661818
- Timestamp:
- 01/22/2022 06:08:13 PM (4 years ago)
- Location:
- wprequal/trunk
- Files:
-
- 4 edited
-
includes/classes/class.ContactForm.php (modified) (5 diffs)
-
includes/classes/class.SurveyForm.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
wprequal.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wprequal/trunk/includes/classes/class.ContactForm.php
r2654876 r2661818 147 147 'key' => '', 148 148 'placeholder' => '', 149 'required' => '',149 'required' => FALSE, 150 150 'value' => '', 151 151 'default_value' => '', … … 156 156 157 157 foreach ( $inputs as $input => $values ) { 158 159 foreach ( $defaults as $key => $default_value ) { 160 $inputs[ $input ][ $key ] = empty( $inputs[ $input ][ $key ] ) ? $default_value : $inputs[ $input ][ $key ]; 161 } 162 158 $inputs[ $input ] = wp_parse_args( $values, $defaults ); 163 159 } 164 160 … … 177 173 'label' => 'Full Name', 178 174 'type_label' => 'Full Name', 179 'required' => 'checked',175 'required' => FALSE, 180 176 'labels' => array( 181 177 'fname' => 'First', … … 197 193 'label' => 'Phone', 198 194 'type_label' => 'Phone', 199 'required' => 'checked',195 'required' => FALSE, 200 196 'placeholder' => '' 201 197 ) … … 253 249 public function form( $args ) { 254 250 255 $view = ( $args['type'] === 'contact' ) ? 'contact-form' : 'contact-inputs'; 256 257 $args = wp_parse_args( $args, self::form_defaults() ); 251 $view = ( $args['type'] === 'contact' ) ? 'contact-form' : 'contact-inputs'; 252 $contact_form_id = intval( $args['contact_form_id'] ); 258 253 259 254 view( 'contact/form', $view, [ 260 'inputs' => $this->get_inputs( $ args['contact_form_id']),261 'details' => self::get_details( $ args['contact_form_id']),255 'inputs' => $this->get_inputs( $contact_form_id ), 256 'details' => self::get_details( $contact_form_id ), 262 257 'type' => $args['type'], 263 258 'button_action' => $args['button_action'], 264 'contact_form_id' => $ args['contact_form_id']259 'contact_form_id' => $contact_form_id 265 260 ] ); 266 267 }268 269 /**270 * Form Defaults271 *272 * @return array273 */274 275 public static function form_defaults() {276 277 return array(278 'contact_form_id' => 0,279 'type' => 'survey',280 'button_action' => 'submit-button'281 );282 261 283 262 } -
wprequal/trunk/includes/classes/class.SurveyForm.php
r2659649 r2661818 160 160 public function contact_form( $slide ) { 161 161 162 $args = wp_parse_args( $slide, ContactForm::form_defaults() ); 163 $args['type'] = 'survey'; 162 $slide['type'] = 'survey'; 164 163 165 164 ob_start(); 166 do_action( 'wprequal_contact_form', $ args);165 do_action( 'wprequal_contact_form', $slide ); 167 166 return ob_get_clean(); 168 167 -
wprequal/trunk/readme.txt
r2659649 r2661818 164 164 == Change Log == 165 165 166 = 7.10.2 = 167 Bug Fix - Set contact form ID an int 168 166 169 = 7.10.1 = 167 170 Bug Fix - Set contact form type for survey -
wprequal/trunk/wprequal.php
r2659649 r2661818 4 4 Plugin URI: https://wprequal.com 5 5 Description: Mortgage and Real Estate Lead Capture System 6 Version: 7.10. 16 Version: 7.10.2 7 7 Author: WPrequal 8 8 Author URI: https://wprequal.com … … 44 44 45 45 $constants = array( 46 'WPREQUAL_VERSION' => '7.10. 1',46 'WPREQUAL_VERSION' => '7.10.2', 47 47 'WPREQOAL_PLUGIN' => plugin_basename( __FILE__ ), 48 48 'WPREQUAL_OPTIONS' => 'wprequal_options',
Note: See TracChangeset
for help on using the changeset viewer.