Plugin Directory

Changeset 652705


Ignore:
Timestamp:
01/15/2013 12:15:36 AM (13 years ago)
Author:
properwp
Message:

0.9.3 fixing name requirement issue

Location:
proper-contact-form/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • proper-contact-form/trunk/proper-contact-form.php

    r646683 r652705  
    1414require_once(WP_PLUGIN_DIR . '/' . basename(dirname(__FILE__)) . '/inc/helpers.php');
    1515
    16 function proper_contact_form($atts, $content = null) {
     16function proper_contact_form($atts, $content = NULL) {
    1717   
    1818    if (isset($_SESSION['propercfp_sent']) && $_SESSION['propercfp_sent'] === 'yes') :
     
    3535    // Add name field if selected on the settings page
    3636    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;
    3838        $form->add_input(stripslashes(proper_get_key('propercfp_label_name')), array(
    3939            'required' => $required,
     
    4444    // Add email field if selected on the settings page
    4545    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;
    4747        $form->add_input(stripslashes(proper_get_key('propercfp_label_email')), array(
    4848            'required' => $required,
     
    5454    // Add phone field if selected on the settings page
    5555    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;
    5757        $form->add_input(stripslashes(proper_get_key('propercfp_label_phone')), array(
    5858            'required' => $required
     
    7474    // Comment field
    7575    $form->add_input(stripslashes(proper_get_key('propercfp_label_comment')), array(
    76         'required' => true,
     76        'required' => TRUE,
    7777        'type' => 'textarea',
    7878        'wrap_class' => isset($_SESSION['cfp_contact_errors']['question-or-comment']) ? array('form_field_wrap', 'error') : array('form_field_wrap')
     
    107107    return '
    108108    <div class="proper_contact_form_wrap">
    109     ' . $errors . $form->build_form(false) . '
     109    ' . $errors . $form->build_form(FALSE) . '
    110110    </div>';
    111111   
     
    135135    // Sanitize and validate name
    136136    $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))
    138138        $_SESSION['cfp_contact_errors']['contact-name'] = 'Enter your name';
    139139    else
     
    284284  $args = array(
    285285    '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,
    290290    'has_archive' => 'string',
    291     'hierarchical' => false,
     291    'hierarchical' => FALSE,
    292292        'menu_position' => 27,
    293293        'menu_icon' => plugin_dir_url(__FILE__) . '/images/person.png',
  • proper-contact-form/trunk/readme.txt

    r646683 r652705  
    55Requires at least: 3.0
    66Tested up to: 3.5
    7 Stable tag: 0.9.2
     7Stable tag: 0.9.3
    88
    99Creates a flexible, secure contact form on your WP site
     
    4646== Changelog ==
    4747
     48= 0.9.3 =
     49* Fixed name requirement issue
     50
    4851= 0.9.2 =
    4952* Fixed default handling
Note: See TracChangeset for help on using the changeset viewer.