Changeset 863331
- Timestamp:
- 02/23/2014 12:05:51 AM (12 years ago)
- Location:
- proper-contact-form/trunk
- Files:
-
- 1 added
- 1 deleted
- 2 edited
-
icon.png (deleted)
-
images/person-3point8.png (added)
-
proper-contact-form.php (modified) (8 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
proper-contact-form/trunk/proper-contact-form.php
r838169 r863331 4 4 Plugin URI: http://theproperweb.com/shipped/wp/proper-contact-form 5 5 Description: A better contact form processor 6 Version: 0.9. 76 Version: 0.9.8 7 7 Author: PROPER Development 8 8 Author URI: http://theproperweb.com 9 9 License: GPL2 10 10 */ 11 12 11 13 12 // Make sure we don't expose any info if called directly … … 39 38 40 39 // Looking for a submitted form if not redirect 41 if ( isset( $_SESSION['propercfp_sent'] ) && $_SESSION['propercfp_sent'] === 'yes' ) { 42 unset( $_SESSION['propercfp_sent'] ); 40 if ( isset( $_GET['pcf'] ) && $_GET['pcf'] == 1 ) { 43 41 return ' 44 <div class="proper_contact_ form_wrap">42 <div class="proper_contact_thankyou_wrap"> 45 43 <h2>' . sanitize_text_field( proper_contact_get_key( 'propercfp_label_submit' ) ) . '</h2> 46 44 </div>'; … … 403 401 404 402 $site_email = proper_contact_get_key( 'propercfp_email' ); 405 $site_name = get_bloginfo( 'name');403 $site_name = htmlspecialchars_decode( get_bloginfo( 'name' ) ); 406 404 407 405 // No name? Use the email address, if one is present … … 429 427 $confirm_body = stripslashes( trim( proper_contact_get_key( 'propercfp_confirm_email' ) ) ); 430 428 if ( ! empty( $confirm_body ) && ! empty( $contact_email ) ) { 429 430 // Removing entities 431 $confirm_body = htmlspecialchars_decode( $confirm_body ); 432 $confirm_body = html_entity_decode( $confirm_body ); 433 $confirm_body = str_replace( ''', "'", $confirm_body ); 434 435 // Send the email 431 436 $headers = array(); 432 437 $headers[] = "From: $site_name <$site_email>"; … … 434 439 wp_mail( 435 440 $contact_email, 436 proper_contact_get_key( 'propercfp_label_submit' ) . ' - ' . get_bloginfo( 'name' ),441 proper_contact_get_key( 'propercfp_label_submit' ) . ' - ' . $site_name, 437 442 $confirm_body, 438 443 $headers … … 461 466 $redirect_id = proper_contact_get_key( 'propercfp_result_url' ); 462 467 $redirect = get_permalink( $redirect_id ); 463 wp_redirect( $redirect );464 468 } 465 469 else { 466 $_SESSION['propercfp_sent'] = 'yes'; 467 } 470 $redirect = home_url( $_SERVER['REQUEST_URI'] ) . ( strpos( $_SERVER['REQUEST_URI'], '?' ) === FALSE ? '?' : '&' ) 471 . 'pcf=' . 1; 472 } 473 474 wp_safe_redirect( $redirect ); 468 475 469 476 } … … 493 500 add_action( 'init', 'proper_contact_content_type' ); 494 501 function proper_contact_content_type() { 502 503 // Adding a lighter icon for 3.8 and higher 504 if ( version_compare( $GLOBALS['wp_version'], '3.8', '>=' ) ) 505 $icon_file = 'person-3point8.png'; 506 else 507 $icon_file = 'person.png'; 508 495 509 $labels = array( 496 510 'name' => __( 'Contacts', 'proper-contact' ), 'post type general name', … … 513 527 'hierarchical' => FALSE, 514 528 'menu_position' => 27, 515 'menu_icon' => PROPER_CONTACT_URL . '/images/ person.png',529 'menu_icon' => PROPER_CONTACT_URL . '/images/' . $icon_file, 516 530 'supports' => array( 'title', 'editor', 'custom-fields' ) 517 531 ); -
proper-contact-form/trunk/readme.txt
r838169 r863331 4 4 Tags: contact, contact form, contact form widget 5 5 Requires at least: 3.0 6 Tested up to: 3. 67 Stable tag: 0.9. 76 Tested up to: 3.8.1 7 Stable tag: 0.9.8 8 8 9 9 Creates a flexible, secure contact form on your WP site … … 49 49 == Changelog == 50 50 51 = 0.9.8 = 52 * Added a redirect back to the same page to avoid duplicate form submissions 53 * Fixed issue with HTML special characters in email subject line 54 * Fixed the wp-admin icon for new 3.8 dashboard 55 51 56 = 0.9.7 = 52 57 * Fixed issue with widget not displaying text above the form
Note: See TracChangeset
for help on using the changeset viewer.