WordPress.org

Plugin Directory

Changeset 530055


Ignore:
Timestamp:
04/11/12 20:22:55 (2 years ago)
Author:
josephscott
Message:

Basic support for subject fields

File:
1 edited

Legend:

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

    r530009 r530055  
    364364            $comment_author_url = $contact_form_values[ $id ]; 
    365365            $comment_author_url_label = $field['label']; 
     366        } elseif ( $field['type'] == 'subject' && !isset( $contact_form_subject ) ) { 
     367            $contact_form_subject = $contact_form_values[$id]; 
     368            $contact_form_subject_label = $field['label']; 
    366369        } elseif ( $field['type'] == 'textarea' && !isset( $comment_content ) ) { 
    367370            $comment_content = $contact_form_values[ $id ]; 
     
    406409 
    407410    if ( empty( $contact_form_subject ) ) 
    408         $contact_form_subject = $subject; 
     411        $contact_form_subject = trim( wp_kses( $subject, array() ) ); 
    409412    else 
    410413        $contact_form_subject = trim( wp_kses( $contact_form_subject, array() ) ); 
     
    480483    if ( !empty( $comment_author_url ) ) 
    481484        $contact_form_message .= wp_kses( $comment_author_url_label, array() ) . ": " . wp_kses( $comment_author_url, array() ) . "<br />"; 
     485    if ( !empty( $contact_form_subject_label ) ) { 
     486        $contact_form_message .= wp_kses( $contact_form_subject_label, array() ) . ": " . wp_kses( $contact_form_subject, array() ) . "<br />"; 
     487    } 
    482488    if (isset($comment_content_label)) 
    483489        $contact_form_message .= wp_kses( $comment_content_label, array() ) . ": " . wp_kses( $comment_content, array() ) . "<br />"; 
Note: See TracChangeset for help on using the changeset viewer.