Changeset 988456
- Timestamp:
- 09/12/2014 05:42:36 PM (11 years ago)
- Location:
- proper-contact-form
- Files:
-
- 4 edited
-
assets/banner-772x250.png (modified) (previous)
-
trunk/inc/settings.php (modified) (7 diffs)
-
trunk/proper-contact-form.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
proper-contact-form/trunk/inc/settings.php
r967417 r988456 72 72 ), 73 73 'propercfp_email' => array( 74 ' Default contact submissionemail',75 'Email to use for the sender and receiver of the contact form',76 ' text',74 'Contact notification sender email', 75 'Email to use for the sender of the contact form emails both to the recipients below and the contact form submitter (if this is activated below). The domain for this email address should match your site\'s domain.', 76 'email', 77 77 get_bloginfo( 'admin_email' ) 78 78 ), 79 79 'propercfp_reply_to_admin' => array( 80 80 'Use the email address above as notification sender', 81 'When this is off, the for submitter\'s email is used to send the notification to the email above, making it 82 easy to reply directly. This might cause your emails to be caught by your spam filter, though. If you are 83 having trouble receiving emails from form submissions, try turning this on.', 81 'When this is on, the notification emails sent from your site will come from the email address above. When this is off, the emails will come from the form submitter, making it easy to reply. If you are not receiving notifications from the site, then turn this option off as your email server might be marking them as spam.', 84 82 'checkbox', 85 83 '', 84 ), 85 'propercfp_email_recipients' => array( 86 'Contact submission recipients', 87 'Email address(es) to receive contact submission notifications. You can separate multiple emails with a comma.', 88 'text', 89 proper_contact_get_key( 'propercfp_email' ) ? 90 proper_contact_get_key( 'propercfp_email' ) : 91 get_bloginfo( 'admin_email' ) 86 92 ), 87 93 'propercfp_result_url' => array( … … 232 238 if ( 233 239 // On the right page 234 array_key_exists( 'page', $_GET ) &&235 $_GET['page'] === 'pcfp-admin' &&236 // We're saving options237 array_key_exists( 'action', $_REQUEST ) &&238 $_REQUEST['action'] == 'save' &&239 // This action is authorized240 current_user_can( 'manage_options' ) &&241 wp_verify_nonce( $_POST['proper_nonce'], $current_user->user_email )240 array_key_exists( 'page', $_GET ) && 241 $_GET['page'] === 'pcfp-admin' && 242 // We're saving options 243 array_key_exists( 'action', $_REQUEST ) && 244 $_REQUEST['action'] == 'save' && 245 // This action is authorized 246 current_user_can( 'manage_options' ) && 247 wp_verify_nonce( $_POST['proper_nonce'], $current_user->user_email ) 242 248 ) { 243 249 … … 289 295 <div class="postbox" style="margin-top: 20px; padding: 0 20px"> 290 296 291 <p>Simply configure the form below, save your changes, then add292 <code>[proper_contact_form]</code> to any page or post. You can also add a293 <a href="<?php echo admin_url( 'widgets.php' ); ?>">widget</a>.<br>294 If you're adding this to a theme file, add295 <code><?php echo do_shortcode( '[proper_contact_form]' ) ?></code>296 </p>297 <p>Simply configure the form below, save your changes, then add 298 <code>[proper_contact_form]</code> to any page or post. You can also add a 299 <a href="<?php echo admin_url( 'widgets.php' ); ?>">widget</a>.<br> 300 If you're adding this to a theme file, add 301 <code><?php echo do_shortcode( '[proper_contact_form]' ) ?></code> 302 </p> 297 303 298 304 </div> … … 306 312 <?php endif ?> 307 313 308 <form method="post"> 314 <div class="proper_contact_promo_sidebar"> 315 <p>I hope you are using and loving the PROPER Contact Form! This plugin was brought to you by:</p> 316 <p> 317 <a href="http://theproperweb.com/?ref=pcf-settings" target="_blank"> 318 <img src="<?php echo PROPER_CONTACT_URL . 'images/proper-logo.png' ?>" class="aligncenter"> 319 </a> 320 </p> 321 <p>If you use and enjoy the plugin, you can show support by 322 <a href="http://theproperweb.com/product/proper-contact-form/" target="_blank">donating</a> or 323 <a href="https://wordpress.org/support/view/plugin-reviews/proper-contact-form?filter=5#postform" target="_blank">giving it a positive review</a> on WordPress.org. If you're having any trouble, 324 <a href="https://wordpress.org/support/plugin/proper-contact-form" target="_blank">post a support request here</a>. 325 </p> 326 <hr> 327 <p>Like what you see and want more?</p> 328 329 <p><strong>Premium Themes and Plugins:</strong></p> 330 <ul> 331 <li><a href="http://wpdrudge.com/?ref=pcf-settings" target="_blank">WP-Drudge curation theme</a></li> 332 <li><a href="http://www.wpwritersblock.com/?ref=pcf-settings" target="_blank">WP Writer's Block writer's theme</a></li> 333 <li><a href="http://theproperweb.com/product/google-news-wordpress/?ref=pcf-settings" target="_blank">Google News for WordPress</a></li> 334 </ul> 335 <p><strong>Free Plugins:</strong></p> 336 <ul> 337 <li><a href="https://wordpress.org/plugins/proper-widgets/" target="_blank">PROPER Widgets</a></li> 338 <li><a href="https://wordpress.org/plugins/proper-shortcodes/" target="_blank">PROPER Shortcodes</a></li> 339 </ul> 340 <hr> 341 <p> 342 By the way, I'm Josh, the developer of this plugin. Nice to meet you!</p> 343 <p> 344 <a href="https://twitter.com/joshcanhelp" class="twitter-follow-button" data-show-count="false" data-dnt="true">Follow @joshcanhelp</a> 345 <script>!function (d, s, id) { 346 var js, fjs = d.getElementsByTagName(s)[0], p = /^http:/.test(d.location) ? 'http' : 'https'; 347 if (!d.getElementById(id)) { 348 js = d.createElement(s); 349 js.id = id; 350 js.src = p + '://platform.twitter.com/widgets.js'; 351 fjs.parentNode.insertBefore(js, fjs); 352 } 353 }(document, 'script', 'twitter-wjs');</script></p> 354 355 </div> 356 357 <form method="post" class="proper_contact_settings_form"> 309 358 <table class="form-table"> 310 359 <tr> … … 363 412 </tr> 364 413 365 <?php366 367 // Displays correct inputs for "text" type414 <?php 415 416 // Displays correct inputs for "text" type 368 417 elseif ( $opt_type == 'text' || $opt_type == 'number' || $opt_type == 'email' || $opt_type == 'url' ) : 369 418 ?> … … 374 423 </th> 375 424 <td> 376 <input name="<?php echo $opt_id ?>" id="<?php echo $opt_id ?>" type="<?php echo $opt_type ?>" value="<?php echo stripslashes( $opt_val ) ?>" class=" regular-text">425 <input name="<?php echo $opt_id ?>" id="<?php echo $opt_id ?>" type="<?php echo $opt_type ?>" value="<?php echo stripslashes( $opt_val ) ?>" class="widefat"> 377 426 378 427 <p class="description"><?php _e( $opt_desc, 'proper-contact' ) ?></p> … … 554 603 add_filter( 'plugin_action_links_proper-contact-form/proper-contact-form.php', 555 604 'proper_contact_form_plugin_links', 10, 2 ); 605 606 /** 607 * Enqueue CSS and JS needed in the admin 608 */ 609 function proper_contact_admin_css_js() { 610 global $pagenow; 611 612 if ( 613 ( $pagenow == 'options-general.php' || $pagenow == 'admin.php' ) 614 && isset( $_GET['page'] ) && $_GET['page'] == 'pcfp-admin' 615 ) { 616 wp_enqueue_style( 'proper-contact', PROPER_CONTACT_URL . 'css/wp-admin.css' ); 617 } 618 } 619 620 add_action( 'admin_enqueue_scripts', 'proper_contact_admin_css_js' ); -
proper-contact-form/trunk/proper-contact-form.php
r967417 r988456 5 5 Plugin URI: http://theproperweb.com/shipped/wp/proper-contact-form 6 6 Description: A better contact form processor 7 Version: 0.9.8. 47 Version: 0.9.8.5 8 8 Author: PROPER Web Development 9 9 Author URI: http://theproperweb.com … … 18 18 19 19 // Important constants 20 define( 'PROPER_CONTACT_VERSION', '0.9.8. 4' );20 define( 'PROPER_CONTACT_VERSION', '0.9.8.5' ); 21 21 define( 'PROPER_CONTACT_URL', plugin_dir_url( __FILE__ ) ); 22 22 … … 408 408 $site_name = htmlspecialchars_decode( get_bloginfo( 'name' ) ); 409 409 410 // No name? Use the email address, if one is present 410 // Notification recipients 411 $site_recipients = sanitize_text_field( proper_contact_get_key( 'propercfp_email_recipients' ) ); 412 $site_recipients = explode(',', $site_recipients); 413 $site_recipients = array_map( 'trim', $site_recipients ); 414 $site_recipients = array_map( 'sanitize_email', $site_recipients ); 415 $site_recipients = implode( ',', $site_recipients ); 416 417 // No name? Use the submitter email address, if one is present 411 418 if ( empty( $contact_name ) ) { 412 419 $contact_name = ! empty( $contact_email ) ? $contact_email : '[None given]'; … … 414 421 415 422 // Need an email address for the email notification 416 $send_from = ! empty( $contact_email ) ? $contact_email : $site_email;417 423 if ( proper_contact_get_key( 'propercfp_reply_to_admin' ) == 'yes' ) { 418 424 $send_from = $site_email; 425 $send_from_name = $site_name; 426 } else { 427 $send_from = ! empty( $contact_email ) ? $contact_email : $site_email; 428 $send_from_name = $contact_name; 419 429 } 420 430 421 431 // Sent an email notification to the correct address 422 $headers = array(); 423 424 $headers[] = "From: $contact_name <$send_from>"; 425 $headers[] = "Reply-To: $contact_name <$send_from>"; 426 427 wp_mail( $site_email, 'Contact on ' . $site_name, $body, $headers ); 428 429 432 $headers = "From: $send_from_name <$send_from>\r\nReply-To: $send_from_name <$send_from>"; 433 434 wp_mail( $site_recipients, 'Contact on ' . $site_name, $body, $headers ); 435 430 436 // Should a confirm email be sent? 431 437 $confirm_body = stripslashes( trim( proper_contact_get_key( 'propercfp_confirm_email' ) ) ); … … 437 443 $confirm_body = str_replace( ''', "'", $confirm_body ); 438 444 439 // Send the email 440 $headers = array(); 441 $headers[] = "From: $site_name <$site_email>"; 442 $headers[] = "Reply-To: $site_email"; 443 wp_mail( $contact_email, proper_contact_get_key( 'propercfp_label_submit' ) . ' - ' . $site_name, 444 $confirm_body, $headers ); 445 $headers = "From: $site_name <$site_email>\r\nReply-To: $site_name <$site_email>"; 446 447 wp_mail( 448 $contact_email, 449 proper_contact_get_key( 'propercfp_label_submit' ) . ' - ' . $site_name, 450 $confirm_body, 451 $headers 452 ); 445 453 } 446 454 -
proper-contact-form/trunk/readme.txt
r967417 r988456 5 5 Requires at least: 3.0 6 6 Tested up to: 4.0 7 Stable tag: 0.9.8. 47 Stable tag: 0.9.8.5 8 8 9 9 Creates a flexible, secure contact form on your WP site … … 49 49 == Changelog == 50 50 51 = 0.9.8.5 = 52 * Added a settings field for submission notification emails 53 51 54 = 0.9.8.4 = 52 55 * Changed capability required for the settings page to `manage_options` from `edit_themes` … … 55 58 * Upgraded PhpFormBuilder class to latest version; added check to make sure the class doesn't exist 56 59 * Added an option to send notification emails from a different address 57 * Removed id array element, using ar ay key instead60 * Removed id array element, using array key instead 58 61 59 62 = 0.9.8.2 =
Note: See TracChangeset
for help on using the changeset viewer.