Changeset 652705
- Timestamp:
- 01/15/2013 12:15:36 AM (13 years ago)
- Location:
- proper-contact-form/trunk
- Files:
-
- 2 edited
-
proper-contact-form.php (modified) (8 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
proper-contact-form/trunk/proper-contact-form.php
r646683 r652705 14 14 require_once(WP_PLUGIN_DIR . '/' . basename(dirname(__FILE__)) . '/inc/helpers.php'); 15 15 16 function proper_contact_form($atts, $content = null) {16 function proper_contact_form($atts, $content = NULL) { 17 17 18 18 if (isset($_SESSION['propercfp_sent']) && $_SESSION['propercfp_sent'] === 'yes') : … … 35 35 // Add name field if selected on the settings page 36 36 if( proper_get_key('propercfp_name_field') ) : 37 $required = proper_get_key('propercfp_name_field') === 'req' ? true : false;37 $required = proper_get_key('propercfp_name_field') === 'req' ? TRUE : FALSE; 38 38 $form->add_input(stripslashes(proper_get_key('propercfp_label_name')), array( 39 39 'required' => $required, … … 44 44 // Add email field if selected on the settings page 45 45 if( proper_get_key('propercfp_email_field') ) : 46 $required = proper_get_key('propercfp_email_field') === 'req' ? true : false;46 $required = proper_get_key('propercfp_email_field') === 'req' ? TRUE : FALSE; 47 47 $form->add_input(stripslashes(proper_get_key('propercfp_label_email')), array( 48 48 'required' => $required, … … 54 54 // Add phone field if selected on the settings page 55 55 if( proper_get_key('propercfp_phone_field') ) : 56 $required = proper_get_key('propercfp_phone_field') === 'req' ? true : false;56 $required = proper_get_key('propercfp_phone_field') === 'req' ? TRUE : FALSE; 57 57 $form->add_input(stripslashes(proper_get_key('propercfp_label_phone')), array( 58 58 'required' => $required … … 74 74 // Comment field 75 75 $form->add_input(stripslashes(proper_get_key('propercfp_label_comment')), array( 76 'required' => true,76 'required' => TRUE, 77 77 'type' => 'textarea', 78 78 'wrap_class' => isset($_SESSION['cfp_contact_errors']['question-or-comment']) ? array('form_field_wrap', 'error') : array('form_field_wrap') … … 107 107 return ' 108 108 <div class="proper_contact_form_wrap"> 109 ' . $errors . $form->build_form( false) . '109 ' . $errors . $form->build_form(FALSE) . ' 110 110 </div>'; 111 111 … … 135 135 // Sanitize and validate name 136 136 $contact_name = isset($_POST['contact-name']) ? sanitize_text_field(trim($_POST['contact-name'])) : ''; 137 if (proper_get_key('propercfp_ email_field') === 'req' && empty($contact_name))137 if (proper_get_key('propercfp_name_field') === 'req' && empty($contact_name)) 138 138 $_SESSION['cfp_contact_errors']['contact-name'] = 'Enter your name'; 139 139 else … … 284 284 $args = array( 285 285 'labels' => $labels, 286 'public' => false,287 'publicly_queryable' => false,288 'show_ui' => true,289 'show_in_menu' => true,286 'public' => FALSE, 287 'publicly_queryable' => FALSE, 288 'show_ui' => TRUE, 289 'show_in_menu' => TRUE, 290 290 'has_archive' => 'string', 291 'hierarchical' => false,291 'hierarchical' => FALSE, 292 292 'menu_position' => 27, 293 293 'menu_icon' => plugin_dir_url(__FILE__) . '/images/person.png', -
proper-contact-form/trunk/readme.txt
r646683 r652705 5 5 Requires at least: 3.0 6 6 Tested up to: 3.5 7 Stable tag: 0.9. 27 Stable tag: 0.9.3 8 8 9 9 Creates a flexible, secure contact form on your WP site … … 46 46 == Changelog == 47 47 48 = 0.9.3 = 49 * Fixed name requirement issue 50 48 51 = 0.9.2 = 49 52 * Fixed default handling
Note: See TracChangeset
for help on using the changeset viewer.