Version Description
- 2018-03-05
Download this release
Release Info
Developer | codeinwp |
Plugin | Contact Form & SMTP Plugin for WordPress by PirateForms |
Version | 2.3.5 |
Comparing to | |
See all releases |
Code changes from version 2.3.4 to 2.3.5
- CHANGELOG.md +15 -0
- admin/class-pirateforms-admin.php +20 -2
- includes/class-pirateforms-html.php +28 -5
- includes/class-pirateforms-phpformbuilder.php +13 -1
- includes/class-pirateforms-util.php +1 -1
- includes/class-pirateforms.php +1 -1
- pirate-forms.php +2 -2
- public/class-pirateforms-public.php +92 -10
- public/css/front.css +18 -2
- public/js/scripts-general.js +4 -1
- readme.md +82 -0
- readme.txt +89 -0
- themeisle-hash.json +1 -1
- vendor/autoload.php +1 -1
- vendor/autoload_52.php +1 -1
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-endpoints.php +2 -2
- vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-product.php +7 -0
- vendor/codeinwp/themeisle-sdk/load.php +1 -1
- vendor/composer/autoload_real.php +5 -5
- vendor/composer/autoload_real_52.php +3 -3
- vendor/composer/installed.json +4 -4
CHANGELOG.md
CHANGED
@@ -1,4 +1,19 @@
|
|
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
### v2.3.4 - 2018-02-15
|
3 |
**Changes:**
|
4 |
* Added missing Loader.gif file
|
1 |
|
2 |
+
### v2.3.5 - 2018-04-02
|
3 |
+
**Changes:**
|
4 |
+
* Improves compatibility with various themes.
|
5 |
+
* Adds support for two new custom fields.
|
6 |
+
* Adds filter for custom classes into form fields.
|
7 |
+
* Adds visual/text switch to form wyiwyg editor.
|
8 |
+
|
9 |
+
### v2.3.5 - 2018-03-05
|
10 |
+
**Changes:**
|
11 |
+
* Fix characters encoding issue in the subject field.
|
12 |
+
* Fix issue with spam label with two forms on the page.
|
13 |
+
* Allows zip files to be attached in forms.
|
14 |
+
* Adds a filter to dynamically change the subject.
|
15 |
+
* Adds options to send a copy of the email to the sender.
|
16 |
+
|
17 |
### v2.3.4 - 2018-02-15
|
18 |
**Changes:**
|
19 |
* Added missing Loader.gif file
|
admin/class-pirateforms-admin.php
CHANGED
@@ -319,7 +319,7 @@ class PirateForms_Admin {
|
|
319 |
'id' => 'pirateformsopt_nonce',
|
320 |
'type' => 'checkbox',
|
321 |
'label' => array(
|
322 |
-
'value' => __( 'Add a nonce to the contact form
|
323 |
'html' => '<span class="dashicons dashicons-editor-help"></span>',
|
324 |
'desc' => array(
|
325 |
'value' => __( 'Should the form use a WordPress nonce? This helps reduce spam by ensuring that the form submittor is on the site when submitting the form rather than submitting remotely. This could, however, cause problems with sites using a page caching plugin. Turn this off if you are getting complaints about forms not being able to be submitted with an error of "Nonce failed!"', 'pirate-forms' ),
|
@@ -353,6 +353,25 @@ class PirateForms_Admin {
|
|
353 |
'cols' => 70,
|
354 |
'rows' => 5,
|
355 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
356 |
array(
|
357 |
'id' => 'pirateformsopt_thank_you_url',
|
358 |
'type' => 'select',
|
@@ -629,7 +648,6 @@ class PirateForms_Admin {
|
|
629 |
'class' => 'pirate-forms-grouped',
|
630 |
),
|
631 |
'wysiwyg' => array(
|
632 |
-
'quicktags' => false,
|
633 |
'editor_class' => 'pirate-forms-wysiwyg',
|
634 |
'editor_height' => 500,
|
635 |
),
|
319 |
'id' => 'pirateformsopt_nonce',
|
320 |
'type' => 'checkbox',
|
321 |
'label' => array(
|
322 |
+
'value' => __( 'Add a nonce to the contact form', 'pirate-forms' ),
|
323 |
'html' => '<span class="dashicons dashicons-editor-help"></span>',
|
324 |
'desc' => array(
|
325 |
'value' => __( 'Should the form use a WordPress nonce? This helps reduce spam by ensuring that the form submittor is on the site when submitting the form rather than submitting remotely. This could, however, cause problems with sites using a page caching plugin. Turn this off if you are getting complaints about forms not being able to be submitted with an error of "Nonce failed!"', 'pirate-forms' ),
|
353 |
'cols' => 70,
|
354 |
'rows' => 5,
|
355 |
),
|
356 |
+
array(
|
357 |
+
'id' => 'pirateformsopt_copy_email',
|
358 |
+
'type' => 'checkbox',
|
359 |
+
'label' => array(
|
360 |
+
'value' => __( 'Add copy of mail to confirmation email', 'pirate-forms' ),
|
361 |
+
'html' => '<span class="dashicons dashicons-editor-help"></span>',
|
362 |
+
'desc' => array(
|
363 |
+
'value' => __( 'Should a copy of the email be appended to the confirmation email? Only the fields that are being displayed will be sent to the sender. Please note that this will only be appended if confirmation email text is provided above.', 'pirate-forms' ),
|
364 |
+
'class' => 'pirate_forms_option_description',
|
365 |
+
),
|
366 |
+
),
|
367 |
+
'default' => '',
|
368 |
+
'value' => PirateForms_Util::get_option( 'pirateformsopt_copy_email' ),
|
369 |
+
'wrap' => array(
|
370 |
+
'type' => 'div',
|
371 |
+
'class' => 'pirate-forms-grouped',
|
372 |
+
),
|
373 |
+
'options' => array( 'yes' => __( 'Yes', 'pirate-forms' ) ),
|
374 |
+
),
|
375 |
array(
|
376 |
'id' => 'pirateformsopt_thank_you_url',
|
377 |
'type' => 'select',
|
648 |
'class' => 'pirate-forms-grouped',
|
649 |
),
|
650 |
'wysiwyg' => array(
|
|
|
651 |
'editor_class' => 'pirate-forms-wysiwyg',
|
652 |
'editor_height' => 500,
|
653 |
),
|
includes/class-pirateforms-html.php
CHANGED
@@ -25,7 +25,12 @@ class PirateForms_HTML {
|
|
25 |
}
|
26 |
$html = $this->$type( $args );
|
27 |
} else {
|
28 |
-
throw
|
|
|
|
|
|
|
|
|
|
|
29 |
}
|
30 |
if ( ! $echo ) {
|
31 |
return $html;
|
@@ -303,10 +308,21 @@ class PirateForms_HTML {
|
|
303 |
private function select( $args ) {
|
304 |
$html = $this->get_label( $args );
|
305 |
|
306 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
307 |
if ( isset( $args['options'] ) && is_array( $args['options'] ) ) {
|
308 |
foreach ( $args['options'] as $key => $val ) {
|
309 |
-
$extra = $key == $args['value'] ? 'selected' : '';
|
310 |
$html .= '<option value="' . esc_attr( $key ) . '" ' . $extra . '>' . esc_html( $val ) . '</option>';
|
311 |
}
|
312 |
}
|
@@ -352,10 +368,9 @@ class PirateForms_HTML {
|
|
352 |
}
|
353 |
foreach ( $args['options'] as $key => $val ) {
|
354 |
$extra = isset( $args['value'] ) && $key == $args['value'] ? 'checked' : '';
|
355 |
-
$html .= '<input type="checkbox" ' . $extra . ' ' . $this->get_common( $args ) . ' value="' . esc_attr( $key ) . '">' . esc_attr( $val );
|
356 |
}
|
357 |
}
|
358 |
-
|
359 |
return $this->get_wrap( $args, $html );
|
360 |
}
|
361 |
|
@@ -393,4 +408,12 @@ class PirateForms_HTML {
|
|
393 |
return $this->get_wrap( $args, $html );
|
394 |
}
|
395 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
396 |
}
|
25 |
}
|
26 |
$html = $this->$type( $args );
|
27 |
} else {
|
28 |
+
// let's not throw an ugly exception. Let's instead inform the user that they might need to upgrade.
|
29 |
+
// @codingStandardsIgnoreStart
|
30 |
+
$msg = sprintf( 'Field type "%s" not defined. Have you upgraded to the latest version of %s?', $type, PIRATEFORMS_NAME );
|
31 |
+
error_log( $msg );
|
32 |
+
$html = $msg;
|
33 |
+
// @codingStandardsIgnoreEnd
|
34 |
}
|
35 |
if ( ! $echo ) {
|
36 |
return $html;
|
308 |
private function select( $args ) {
|
309 |
$html = $this->get_label( $args );
|
310 |
|
311 |
+
$extra = ' ';
|
312 |
+
if ( isset( $args['sub_type'] ) ) {
|
313 |
+
$extra .= $args['sub_type'] . ' ';
|
314 |
+
}
|
315 |
+
if ( isset( $args['required'] ) && $args['required'] ) {
|
316 |
+
$extra .= 'required ';
|
317 |
+
}
|
318 |
+
if ( isset( $args['required'] ) && $args['required'] && isset( $args['required_msg'] ) ) {
|
319 |
+
$extra .= 'oninvalid="this.setCustomValidity(\'' . esc_attr( $args['required_msg'] ) . '\')" onchange="this.setCustomValidity(\'\')" ';
|
320 |
+
}
|
321 |
+
|
322 |
+
$html .= '<select id="' . esc_attr( $args['id'] ) . '" name="' . esc_attr( $args['name'] ) . '" class="' . ( isset( $args['class'] ) ? esc_attr( $args['class'] ) : '' ) . '" ' . $extra . '>';
|
323 |
if ( isset( $args['options'] ) && is_array( $args['options'] ) ) {
|
324 |
foreach ( $args['options'] as $key => $val ) {
|
325 |
+
$extra = isset( $args['value'] ) && $key == $args['value'] ? 'selected' : '';
|
326 |
$html .= '<option value="' . esc_attr( $key ) . '" ' . $extra . '>' . esc_html( $val ) . '</option>';
|
327 |
}
|
328 |
}
|
368 |
}
|
369 |
foreach ( $args['options'] as $key => $val ) {
|
370 |
$extra = isset( $args['value'] ) && $key == $args['value'] ? 'checked' : '';
|
371 |
+
$html .= '<input type="checkbox" ' . $extra . ' ' . $this->get_common( $args ) . ' value="' . esc_attr( $key ) . '"><label for="' . esc_attr( $args['id'] ) . '" class="pf-checkbox-label"><span>' . esc_attr( $val ) . '</span></label>';
|
372 |
}
|
373 |
}
|
|
|
374 |
return $this->get_wrap( $args, $html );
|
375 |
}
|
376 |
|
408 |
return $this->get_wrap( $args, $html );
|
409 |
}
|
410 |
|
411 |
+
/**
|
412 |
+
* The label element.
|
413 |
+
*/
|
414 |
+
private function label( $args ) {
|
415 |
+
$html = $args['placeholder'];
|
416 |
+
return $this->get_wrap( $args, $html );
|
417 |
+
}
|
418 |
+
|
419 |
}
|
includes/class-pirateforms-phpformbuilder.php
CHANGED
@@ -35,12 +35,24 @@ class PirateForms_PhpFormBuilder {
|
|
35 |
|
36 |
$classes = array();
|
37 |
$classes[] = $from_widget ? 'widget-on' : '';
|
38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
|
40 |
$html_helper = new PirateForms_HTML();
|
41 |
$form_end = '';
|
42 |
$custom_fields = '';
|
43 |
foreach ( $elements as $val ) {
|
|
|
|
|
|
|
44 |
if ( isset( $val['is_custom'] ) && $val['is_custom'] ) {
|
45 |
// we will combine the HTML for all the custom fields and save it under one element name.
|
46 |
$custom_fields .= $html_helper->add( $val, false );
|
35 |
|
36 |
$classes = array();
|
37 |
$classes[] = $from_widget ? 'widget-on' : '';
|
38 |
+
|
39 |
+
// we will add an id to the form so that we can scroll to it.
|
40 |
+
$id = wp_create_nonce( sprintf( 'pf-%s-%s', $from_widget ? 1 : 0, isset( $pirate_forms_options['id'] ) ? $pirate_forms_options['id'] : 0 ) );
|
41 |
+
$elements[] = array(
|
42 |
+
'type' => 'hidden',
|
43 |
+
'id' => 'pirate_forms_from_form',
|
44 |
+
'value' => $id,
|
45 |
+
);
|
46 |
+
|
47 |
+
$form_start = '<form method="post" id="' . $id . '" enctype="' . $pirate_forms_enctype . '" class="pirate_forms ';
|
48 |
|
49 |
$html_helper = new PirateForms_HTML();
|
50 |
$form_end = '';
|
51 |
$custom_fields = '';
|
52 |
foreach ( $elements as $val ) {
|
53 |
+
if ( 'form_honeypot' !== $val['id'] && ! in_array( $val['type'], array( 'hidden', 'div' ) ) ) {
|
54 |
+
$val['class'] = apply_filters( 'pirate_forms_field_class', $val['class'], $val['id'] );
|
55 |
+
}
|
56 |
if ( isset( $val['is_custom'] ) && $val['is_custom'] ) {
|
57 |
// we will combine the HTML for all the custom fields and save it under one element name.
|
58 |
$custom_fields .= $html_helper->add( $val, false );
|
includes/class-pirateforms-util.php
CHANGED
@@ -329,7 +329,7 @@ class PirateForms_Util {
|
|
329 |
foreach ( $body['magic_tags'] as $tag => $value ) {
|
330 |
$from = htmlspecialchars( self::MAGIC_TAG_PREFIX . $tag . self::MAGIC_TAG_POSTFIX );
|
331 |
do_action( 'themeisle_log_event', PIRATEFORMS_NAME, "replacing $from with $value", 'debug', __FILE__, __LINE__ );
|
332 |
-
$html = str_replace( $from, $value, $html );
|
333 |
}
|
334 |
|
335 |
$html = apply_filters( 'pirate_forms_replace_magic_tags', $html, $body['magic_tags'] );
|
329 |
foreach ( $body['magic_tags'] as $tag => $value ) {
|
330 |
$from = htmlspecialchars( self::MAGIC_TAG_PREFIX . $tag . self::MAGIC_TAG_POSTFIX );
|
331 |
do_action( 'themeisle_log_event', PIRATEFORMS_NAME, "replacing $from with $value", 'debug', __FILE__, __LINE__ );
|
332 |
+
$html = str_replace( $from, stripslashes( $value ), $html );
|
333 |
}
|
334 |
|
335 |
$html = apply_filters( 'pirate_forms_replace_magic_tags', $html, $body['magic_tags'] );
|
includes/class-pirateforms.php
CHANGED
@@ -69,7 +69,7 @@ class PirateForms {
|
|
69 |
public function __construct() {
|
70 |
|
71 |
$this->plugin_name = 'pirateforms';
|
72 |
-
$this->version = '2.3.
|
73 |
|
74 |
$this->load_dependencies();
|
75 |
$this->set_locale();
|
69 |
public function __construct() {
|
70 |
|
71 |
$this->plugin_name = 'pirateforms';
|
72 |
+
$this->version = '2.3.5';
|
73 |
|
74 |
$this->load_dependencies();
|
75 |
$this->set_locale();
|
pirate-forms.php
CHANGED
@@ -16,7 +16,7 @@
|
|
16 |
* Plugin Name: Free & Simple Contact Form Plugin - Pirateforms
|
17 |
* Plugin URI: http://themeisle.com/plugins/pirate-forms/
|
18 |
* Description: Easily creates a nice looking, simple contact form on your WP site.
|
19 |
-
* Version: 2.3.
|
20 |
* Author: Themeisle
|
21 |
* Author URI: http://themeisle.com
|
22 |
* Text Domain: pirate-forms
|
@@ -36,7 +36,7 @@ if ( ! defined( 'WPINC' ) ) {
|
|
36 |
define( 'PIRATEFORMS_NAME', 'Pirate Forms' );
|
37 |
define( 'PIRATEFORMS_SLUG', 'pirate-forms' );
|
38 |
define( 'PIRATEFORMS_USELL_LINK', 'https://themeisle.com/plugins/pirate-forms-extended/' );
|
39 |
-
define( 'PIRATE_FORMS_VERSION', '2.3.
|
40 |
define( 'PIRATEFORMS_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) );
|
41 |
define( 'PIRATEFORMS_URL', plugin_dir_url( __FILE__ ) );
|
42 |
define( 'PIRATEFORMS_BASENAME', plugin_basename( __FILE__ ) );
|
16 |
* Plugin Name: Free & Simple Contact Form Plugin - Pirateforms
|
17 |
* Plugin URI: http://themeisle.com/plugins/pirate-forms/
|
18 |
* Description: Easily creates a nice looking, simple contact form on your WP site.
|
19 |
+
* Version: 2.3.5
|
20 |
* Author: Themeisle
|
21 |
* Author URI: http://themeisle.com
|
22 |
* Text Domain: pirate-forms
|
36 |
define( 'PIRATEFORMS_NAME', 'Pirate Forms' );
|
37 |
define( 'PIRATEFORMS_SLUG', 'pirate-forms' );
|
38 |
define( 'PIRATEFORMS_USELL_LINK', 'https://themeisle.com/plugins/pirate-forms-extended/' );
|
39 |
+
define( 'PIRATE_FORMS_VERSION', '2.3.5' );
|
40 |
define( 'PIRATEFORMS_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) );
|
41 |
define( 'PIRATEFORMS_URL', plugin_dir_url( __FILE__ ) );
|
42 |
define( 'PIRATEFORMS_BASENAME', plugin_basename( __FILE__ ) );
|
public/class-pirateforms-public.php
CHANGED
@@ -40,6 +40,45 @@ class PirateForms_Public {
|
|
40 |
*/
|
41 |
private $version;
|
42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
/**
|
44 |
* Initialize the class and set its properties.
|
45 |
*
|
@@ -545,6 +584,7 @@ class PirateForms_Public {
|
|
545 |
}
|
546 |
|
547 |
// Start the body of the contact email
|
|
|
548 |
$body = array();
|
549 |
$body['heading'] = sprintf( __( 'Contact form submission from %s', 'pirate-forms' ), get_bloginfo( 'name' ) . ' (' . site_url() . ')' );
|
550 |
$body['body'] = array();
|
@@ -576,6 +616,9 @@ class PirateForms_Public {
|
|
576 |
$body['body'][ __( 'IP address', 'pirate-forms' ) ] = $contact_ip;
|
577 |
$body['body'][ __( 'IP search', 'pirate-forms' ) ] = "http://whatismyipaddress.com/ip/$contact_ip";
|
578 |
$body['magic_tags'] += array( 'ip' => $contact_ip );
|
|
|
|
|
|
|
579 |
}
|
580 |
|
581 |
// Sanitize and prepare referrer;
|
@@ -583,6 +626,8 @@ class PirateForms_Public {
|
|
583 |
$page = sanitize_text_field( $_POST['pirate-forms-contact-referrer'] );
|
584 |
$body['body'][ __( 'Came from', 'pirate-forms' ) ] = $page;
|
585 |
$body['magic_tags'] += array( 'referer' => $page );
|
|
|
|
|
586 |
}
|
587 |
|
588 |
// Show the page this contact form was submitted on
|
@@ -590,6 +635,8 @@ class PirateForms_Public {
|
|
590 |
$body['body'][ __( 'Sent from page', 'pirate-forms' ) ] = $permalink;
|
591 |
$body['magic_tags'] += array( 'permalink' => $permalink );
|
592 |
|
|
|
|
|
593 |
// Check the blacklist
|
594 |
$blocked = PirateForms_Util::is_blacklisted( $error_key, $pirate_forms_contact_email, $contact_ip );
|
595 |
if ( $blocked ) {
|
@@ -598,7 +645,7 @@ class PirateForms_Public {
|
|
598 |
}
|
599 |
|
600 |
if ( $this->is_spam( $pirate_forms_options, $contact_ip, get_permalink( get_the_id() ), $msg ) ) {
|
601 |
-
$_SESSION[ $error_key ]['honeypot'] = __( 'Form submission failed
|
602 |
}
|
603 |
|
604 |
if ( ! empty( $_SESSION[ $error_key ] ) ) {
|
@@ -640,10 +687,11 @@ class PirateForms_Public {
|
|
640 |
|
641 |
$attachments = $this->get_attachments( $error_key, $pirate_forms_options, $body );
|
642 |
if ( is_bool( $attachments ) ) {
|
|
|
643 |
return false;
|
644 |
}
|
645 |
|
646 |
-
$subject = 'Contact on ' . htmlspecialchars_decode( get_bloginfo( 'name' ) );
|
647 |
if ( ! empty( $pirate_forms_contact_subject ) ) {
|
648 |
$subject = $pirate_forms_contact_subject;
|
649 |
}
|
@@ -684,6 +732,10 @@ class PirateForms_Public {
|
|
684 |
$headers = "From: $site_name <$send_from>\r\nReply-To: $site_name <$send_from>";
|
685 |
$subject = $pirate_forms_options['pirateformsopt_label_submit'] . ' - ' . $site_name;
|
686 |
|
|
|
|
|
|
|
|
|
687 |
do_action( 'pirate_forms_before_sending_confirm', $pirate_forms_contact_email, $pirate_forms_contact_email, $subject, $confirm_body, $headers );
|
688 |
do_action( 'themeisle_log_event', PIRATEFORMS_NAME, sprintf( 'before sending confirm email to = %s, subject = %s, body = %s, headers = %s', $pirate_forms_contact_email, $subject, $confirm_body, $headers ), 'debug', __FILE__, __LINE__ );
|
689 |
$response_confirm = $this->finally_send_mail( $pirate_forms_contact_email, $subject, $confirm_body, $headers, null, false );
|
@@ -731,6 +783,7 @@ class PirateForms_Public {
|
|
731 |
);
|
732 |
|
733 |
$redirect_to = null;
|
|
|
734 |
|
735 |
/* If a Thank you page is selected, redirect to that page */
|
736 |
if ( $pirate_forms_options['pirateformsopt_thank_you_url'] ) {
|
@@ -741,14 +794,21 @@ class PirateForms_Public {
|
|
741 |
}
|
742 |
} elseif ( $is_our_theme ) {
|
743 |
// the fragment identifier should always be the last argument, otherwise the thank you message will not show.
|
|
|
744 |
$redirect_to = add_query_arg(
|
745 |
array(
|
746 |
'done' => 'done',
|
747 |
-
'pcf' =>
|
748 |
), $_SERVER['HTTP_REFERER']
|
749 |
);
|
750 |
} elseif ( isset( $_SERVER['HTTP_REFERER'] ) ) {
|
751 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
752 |
}
|
753 |
|
754 |
if ( $redirect_to ) {
|
@@ -759,6 +819,27 @@ class PirateForms_Public {
|
|
759 |
}
|
760 |
}
|
761 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
762 |
/**
|
763 |
* Finally, really send email.
|
764 |
*
|
@@ -888,6 +969,10 @@ class PirateForms_Public {
|
|
888 |
* Check with akismet if the message is spam.
|
889 |
*/
|
890 |
function is_spam( $pirate_forms_options, $ip, $page_url, $msg ) {
|
|
|
|
|
|
|
|
|
891 |
// check if akismet is installed and key provided
|
892 |
$key = get_option( 'wordpress_api_key' );
|
893 |
if ( empty( $key ) ) {
|
@@ -947,13 +1032,10 @@ class PirateForms_Public {
|
|
947 |
continue;
|
948 |
}
|
949 |
/* Validate file type */
|
950 |
-
$
|
951 |
-
$pirate_forms_file_types_allowed = $
|
952 |
-
$pirate_forms_file_types_allowed = trim( $pirate_forms_file_types_allowed, '|' );
|
953 |
-
$pirate_forms_file_types_allowed = '(' . $pirate_forms_file_types_allowed . ')';
|
954 |
-
$pirate_forms_file_types_allowed = '/\.' . $pirate_forms_file_types_allowed . '$/i';
|
955 |
if ( ! preg_match( $pirate_forms_file_types_allowed, $file['name'] ) ) {
|
956 |
-
do_action( 'themeisle_log_event', PIRATEFORMS_NAME, sprintf( 'file invalid: expected %s got %s', $
|
957 |
$_SESSION[ $error_key ]['pirate-forms-upload-failed-type'] = sprintf( __( 'Uploaded file type is not allowed for %s', 'pirate-forms' ), $file['name'] );
|
958 |
|
959 |
return false;
|
40 |
*/
|
41 |
private $version;
|
42 |
|
43 |
+
/**
|
44 |
+
* The file types allowed to be uploaded. Can take a look at https://en.support.wordpress.com/accepted-filetypes/ for inspiration.
|
45 |
+
*
|
46 |
+
* @access private
|
47 |
+
* @var array $_file_types_allowed The file types allowed to be uploaded.
|
48 |
+
*/
|
49 |
+
private static $_file_types_allowed = array(
|
50 |
+
'3g2',
|
51 |
+
'3gp',
|
52 |
+
'avi',
|
53 |
+
'doc',
|
54 |
+
'docx',
|
55 |
+
'gif',
|
56 |
+
'jpeg',
|
57 |
+
'jpg',
|
58 |
+
'key',
|
59 |
+
'm4a',
|
60 |
+
'm4v',
|
61 |
+
'mov',
|
62 |
+
'mp3',
|
63 |
+
'mp4',
|
64 |
+
'mpg',
|
65 |
+
'odt',
|
66 |
+
'ogg',
|
67 |
+
'ogv',
|
68 |
+
'pdf',
|
69 |
+
'png',
|
70 |
+
'pps',
|
71 |
+
'ppsx',
|
72 |
+
'ppt',
|
73 |
+
'pptx',
|
74 |
+
'txt',
|
75 |
+
'wav',
|
76 |
+
'wmv',
|
77 |
+
'xls',
|
78 |
+
'xlsx',
|
79 |
+
'zip',
|
80 |
+
);
|
81 |
+
|
82 |
/**
|
83 |
* Initialize the class and set its properties.
|
84 |
*
|
584 |
}
|
585 |
|
586 |
// Start the body of the contact email
|
587 |
+
$private_fields = array();
|
588 |
$body = array();
|
589 |
$body['heading'] = sprintf( __( 'Contact form submission from %s', 'pirate-forms' ), get_bloginfo( 'name' ) . ' (' . site_url() . ')' );
|
590 |
$body['body'] = array();
|
616 |
$body['body'][ __( 'IP address', 'pirate-forms' ) ] = $contact_ip;
|
617 |
$body['body'][ __( 'IP search', 'pirate-forms' ) ] = "http://whatismyipaddress.com/ip/$contact_ip";
|
618 |
$body['magic_tags'] += array( 'ip' => $contact_ip );
|
619 |
+
|
620 |
+
$private_fields[] = __( 'IP address', 'pirate-forms' );
|
621 |
+
$private_fields[] = __( 'IP search', 'pirate-forms' );
|
622 |
}
|
623 |
|
624 |
// Sanitize and prepare referrer;
|
626 |
$page = sanitize_text_field( $_POST['pirate-forms-contact-referrer'] );
|
627 |
$body['body'][ __( 'Came from', 'pirate-forms' ) ] = $page;
|
628 |
$body['magic_tags'] += array( 'referer' => $page );
|
629 |
+
|
630 |
+
$private_fields[] = __( 'Came from', 'pirate-forms' );
|
631 |
}
|
632 |
|
633 |
// Show the page this contact form was submitted on
|
635 |
$body['body'][ __( 'Sent from page', 'pirate-forms' ) ] = $permalink;
|
636 |
$body['magic_tags'] += array( 'permalink' => $permalink );
|
637 |
|
638 |
+
$private_fields[] = __( 'Sent from page', 'pirate-forms' );
|
639 |
+
|
640 |
// Check the blacklist
|
641 |
$blocked = PirateForms_Util::is_blacklisted( $error_key, $pirate_forms_contact_email, $contact_ip );
|
642 |
if ( $blocked ) {
|
645 |
}
|
646 |
|
647 |
if ( $this->is_spam( $pirate_forms_options, $contact_ip, get_permalink( get_the_id() ), $msg ) ) {
|
648 |
+
$_SESSION[ $error_key ]['honeypot'] = __( 'Form submission failed!!', 'pirate-forms' );
|
649 |
}
|
650 |
|
651 |
if ( ! empty( $_SESSION[ $error_key ] ) ) {
|
687 |
|
688 |
$attachments = $this->get_attachments( $error_key, $pirate_forms_options, $body );
|
689 |
if ( is_bool( $attachments ) ) {
|
690 |
+
PirateForms_Util::save_error( $error_key, $nonce_append . '.' . $form_id );
|
691 |
return false;
|
692 |
}
|
693 |
|
694 |
+
$subject = apply_filters( 'pirate_forms_subject', 'Contact on ' . htmlspecialchars_decode( get_bloginfo( 'name' ) ) );
|
695 |
if ( ! empty( $pirate_forms_contact_subject ) ) {
|
696 |
$subject = $pirate_forms_contact_subject;
|
697 |
}
|
732 |
$headers = "From: $site_name <$send_from>\r\nReply-To: $site_name <$send_from>";
|
733 |
$subject = $pirate_forms_options['pirateformsopt_label_submit'] . ' - ' . $site_name;
|
734 |
|
735 |
+
if ( isset( $pirate_forms_options['pirateformsopt_copy_email'] ) && 'yes' === $pirate_forms_options['pirateformsopt_copy_email'] ) {
|
736 |
+
$confirm_body = $this->append_original_email( $confirm_body, $body, $private_fields );
|
737 |
+
}
|
738 |
+
|
739 |
do_action( 'pirate_forms_before_sending_confirm', $pirate_forms_contact_email, $pirate_forms_contact_email, $subject, $confirm_body, $headers );
|
740 |
do_action( 'themeisle_log_event', PIRATEFORMS_NAME, sprintf( 'before sending confirm email to = %s, subject = %s, body = %s, headers = %s', $pirate_forms_contact_email, $subject, $confirm_body, $headers ), 'debug', __FILE__, __LINE__ );
|
741 |
$response_confirm = $this->finally_send_mail( $pirate_forms_contact_email, $subject, $confirm_body, $headers, null, false );
|
783 |
);
|
784 |
|
785 |
$redirect_to = null;
|
786 |
+
$scroll_to = isset( $_POST['pirate_forms_from_form'] ) ? $_POST['pirate_forms_from_form'] : '';
|
787 |
|
788 |
/* If a Thank you page is selected, redirect to that page */
|
789 |
if ( $pirate_forms_options['pirateformsopt_thank_you_url'] ) {
|
794 |
}
|
795 |
} elseif ( $is_our_theme ) {
|
796 |
// the fragment identifier should always be the last argument, otherwise the thank you message will not show.
|
797 |
+
// the fragment identifier is called pcf here so that the URL can tell us if our theme was recognized.
|
798 |
$redirect_to = add_query_arg(
|
799 |
array(
|
800 |
'done' => 'done',
|
801 |
+
'pcf' => "#$scroll_to",
|
802 |
), $_SERVER['HTTP_REFERER']
|
803 |
);
|
804 |
} elseif ( isset( $_SERVER['HTTP_REFERER'] ) ) {
|
805 |
+
// the fragment identifier is called pf here so that the URL can tell us if this is a not-our theme case.
|
806 |
+
$redirect_to = add_query_arg(
|
807 |
+
array(
|
808 |
+
'done' => 'done',
|
809 |
+
'pf' => "#$scroll_to",
|
810 |
+
), $_SERVER['HTTP_REFERER']
|
811 |
+
);
|
812 |
}
|
813 |
|
814 |
if ( $redirect_to ) {
|
819 |
}
|
820 |
}
|
821 |
|
822 |
+
/**
|
823 |
+
* Appends the publicly displayed fields to the confirmation email.
|
824 |
+
*
|
825 |
+
* @param string $confirm_body The confirmation body.
|
826 |
+
* @param array $body The collected body fields.
|
827 |
+
* @param array $private_fields The private fields that should not be included from the body fields.
|
828 |
+
*/
|
829 |
+
private function append_original_email( $confirm_body, $body, $private_fields ) {
|
830 |
+
$lines = array();
|
831 |
+
$lines[] = '------ Original Email ------';
|
832 |
+
|
833 |
+
foreach ( $body['body'] as $field => $value ) {
|
834 |
+
if ( in_array( $field, $private_fields ) ) {
|
835 |
+
continue;
|
836 |
+
}
|
837 |
+
$lines[] = "$field : $value";
|
838 |
+
}
|
839 |
+
|
840 |
+
return $confirm_body . implode( '<br/>', $lines );
|
841 |
+
}
|
842 |
+
|
843 |
/**
|
844 |
* Finally, really send email.
|
845 |
*
|
969 |
* Check with akismet if the message is spam.
|
970 |
*/
|
971 |
function is_spam( $pirate_forms_options, $ip, $page_url, $msg ) {
|
972 |
+
if ( 'yes' !== PirateForms_Util::get_option( 'pirateformsopt_akismet' ) ) {
|
973 |
+
return false;
|
974 |
+
}
|
975 |
+
|
976 |
// check if akismet is installed and key provided
|
977 |
$key = get_option( 'wordpress_api_key' );
|
978 |
if ( empty( $key ) ) {
|
1032 |
continue;
|
1033 |
}
|
1034 |
/* Validate file type */
|
1035 |
+
$allowed = implode( '|', apply_filters( 'pirate_forms_allowed_file_types', self::$_file_types_allowed ) );
|
1036 |
+
$pirate_forms_file_types_allowed = '/\.(' . trim( $allowed, '|' ) . ')$/i';
|
|
|
|
|
|
|
1037 |
if ( ! preg_match( $pirate_forms_file_types_allowed, $file['name'] ) ) {
|
1038 |
+
do_action( 'themeisle_log_event', PIRATEFORMS_NAME, sprintf( 'file invalid: expected %s got %s', $allowed, $file['name'] ), 'error', __FILE__, __LINE__ );
|
1039 |
$_SESSION[ $error_key ]['pirate-forms-upload-failed-type'] = sprintf( __( 'Uploaded file type is not allowed for %s', 'pirate-forms' ), $file['name'] );
|
1040 |
|
1041 |
return false;
|
public/css/front.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/*
|
2 |
-
Version: 2.3.
|
3 |
*/
|
4 |
.pirate_forms_wrap .form_field_wrap,
|
5 |
.widget .pirate_forms_wrap .form_field_wrap {
|
@@ -70,7 +70,8 @@ Version: 2.3.4
|
|
70 |
margin: 0;
|
71 |
}
|
72 |
|
73 |
-
.pirate-forms-fields-container .form_field_wrap textarea
|
|
|
74 |
width: 100%;
|
75 |
max-width: 100%;
|
76 |
margin: 0;
|
@@ -96,6 +97,21 @@ Version: 2.3.4
|
|
96 |
padding-bottom: 10px;
|
97 |
}
|
98 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
@media (max-width: 480px) {
|
100 |
.pirate_forms_wrap .pirate-forms-footer .form_field_wrap,
|
101 |
.pirate_forms_wrap .form_field_wrap .pirate-forms-submit-button {
|
1 |
/*
|
2 |
+
Version: 2.3.5
|
3 |
*/
|
4 |
.pirate_forms_wrap .form_field_wrap,
|
5 |
.widget .pirate_forms_wrap .form_field_wrap {
|
70 |
margin: 0;
|
71 |
}
|
72 |
|
73 |
+
.pirate-forms-fields-container .form_field_wrap textarea,
|
74 |
+
.pirate-forms-fields-container .form_field_wrap select {
|
75 |
width: 100%;
|
76 |
max-width: 100%;
|
77 |
margin: 0;
|
97 |
padding-bottom: 10px;
|
98 |
}
|
99 |
|
100 |
+
.pirate_forms_wrap .pirate_forms_three_inputs_wrap input[type=checkbox] {
|
101 |
+
display: inline-block;
|
102 |
+
width: auto;
|
103 |
+
height: inherit;
|
104 |
+
}
|
105 |
+
|
106 |
+
.pf-checkbox-label {
|
107 |
+
display: inline;
|
108 |
+
cursor: pointer;
|
109 |
+
}
|
110 |
+
|
111 |
+
.pf-checkbox-label span {
|
112 |
+
margin-left: 5px;
|
113 |
+
}
|
114 |
+
|
115 |
@media (max-width: 480px) {
|
116 |
.pirate_forms_wrap .pirate-forms-footer .form_field_wrap,
|
117 |
.pirate_forms_wrap .form_field_wrap .pirate-forms-submit-button {
|
public/js/scripts-general.js
CHANGED
@@ -12,7 +12,10 @@ jQuery(document).ready(function() {
|
|
12 |
}
|
13 |
|
14 |
if(jQuery('.pirate-forms-maps-custom').length > 0){
|
15 |
-
jQuery('.pirate-forms-maps-custom').
|
|
|
|
|
|
|
16 |
}
|
17 |
|
18 |
});
|
12 |
}
|
13 |
|
14 |
if(jQuery('.pirate-forms-maps-custom').length > 0){
|
15 |
+
jQuery('.pirate-forms-maps-custom').each(function(i){
|
16 |
+
var $id = 'xobkcehc-' + i;
|
17 |
+
jQuery(this).html(jQuery('<input id="' + $id + '" name="xobkcehc" type="' + 'xobkcehc'.split('').reverse().join('') + '" value="' + pirateFormsObject.spam.value + '"><label for="' + $id + '"><span>' + pirateFormsObject.spam.label + '</span></label>'));
|
18 |
+
});
|
19 |
}
|
20 |
|
21 |
});
|
readme.md
CHANGED
@@ -88,6 +88,7 @@ This plugin started as a fork of https://wordpress.org/plugins/proper-contact-fo
|
|
88 |
|
89 |
|
90 |
|
|
|
91 |
### How I can get support for this contact form plugin ? ###
|
92 |
|
93 |
You can learn more about PirateForms and ask for help by <a href="https://themeisle.com/contact/" >visiting ThemeIsle website</a>.
|
@@ -166,6 +167,78 @@ You can follow the full documentation [here](http://docs.themeisle.com/article/4
|
|
166 |
= How to install and use extended version of Pirate Forms =
|
167 |
[http://docs.themeisle.com/article/787-how-to-install-and-use-extended-version-of-pirate-forms](http://docs.themeisle.com/article/787-how-to-install-and-use-extended-version-of-pirate-forms)
|
168 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
== Installation ==
|
170 |
|
171 |
Activating the Pirate Contact Form plugin is just like any other plugin. If you've uploaded the plugin package to your server already, skip to step 5 below:
|
@@ -187,6 +260,15 @@ Activating the Pirate Contact Form plugin is just like any other plugin. If you'
|
|
187 |
4. Screenshot 4. Enabling SMTP
|
188 |
|
189 |
## Changelog ##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
### 2.3.4 - 2018-02-15 ###
|
191 |
|
192 |
* Added missing Loader.gif file
|
88 |
|
89 |
|
90 |
|
91 |
+
|
92 |
### How I can get support for this contact form plugin ? ###
|
93 |
|
94 |
You can learn more about PirateForms and ask for help by <a href="https://themeisle.com/contact/" >visiting ThemeIsle website</a>.
|
167 |
= How to install and use extended version of Pirate Forms =
|
168 |
[http://docs.themeisle.com/article/787-how-to-install-and-use-extended-version-of-pirate-forms](http://docs.themeisle.com/article/787-how-to-install-and-use-extended-version-of-pirate-forms)
|
169 |
|
170 |
+
= Pirate Forms Documentation =
|
171 |
+
[https://docs.themeisle.com/article/436-pirate-forms-documentation](https://docs.themeisle.com/article/436-pirate-forms-documentation)
|
172 |
+
|
173 |
+
= How to Change Pirate Forms Submit Button Color =
|
174 |
+
[https://docs.themeisle.com/article/423-how-to-change-pirate-forms-submit-button-color](https://docs.themeisle.com/article/423-how-to-change-pirate-forms-submit-button-color)
|
175 |
+
|
176 |
+
= How to Center the Send Message button for Pirate Forms =
|
177 |
+
[https://docs.themeisle.com/article/427-how-to-center-the-send-message-button-for-pirate-forms](https://docs.themeisle.com/article/427-how-to-center-the-send-message-button-for-pirate-forms)
|
178 |
+
|
179 |
+
= How you can overwrite the default form template in Pirate Forms =
|
180 |
+
[https://docs.themeisle.com/article/664-how-you-can-overwrite-the-default-form-template-in-pirate-forms](https://docs.themeisle.com/article/664-how-you-can-overwrite-the-default-form-template-in-pirate-forms)
|
181 |
+
|
182 |
+
= How to change font in Pirate Forms =
|
183 |
+
[https://docs.themeisle.com/article/431-how-to-change-font-in-pirate-forms](https://docs.themeisle.com/article/431-how-to-change-font-in-pirate-forms)
|
184 |
+
|
185 |
+
= Why do I not receive any emails? - Pirate Forms =
|
186 |
+
[https://docs.themeisle.com/article/729-why-do-i-not-receive-any-emails---pirate-forms](https://docs.themeisle.com/article/729-why-do-i-not-receive-any-emails---pirate-forms)
|
187 |
+
|
188 |
+
= Emails are not being sent, what can i do ? =
|
189 |
+
[https://docs.themeisle.com/article/690-emails-are-not-being-sent-what-can-i-do](https://docs.themeisle.com/article/690-emails-are-not-being-sent-what-can-i-do)
|
190 |
+
|
191 |
+
= How to add reCaptcha to a form in Pirate Forms =
|
192 |
+
[https://docs.themeisle.com/article/731-how-to-add-recaptcha-to-a-form-in-pirate-forms](https://docs.themeisle.com/article/731-how-to-add-recaptcha-to-a-form-in-pirate-forms)
|
193 |
+
|
194 |
+
= What actions and filters are available in Pirate Forms =
|
195 |
+
[https://docs.themeisle.com/article/663-what-actions-and-filters-are-available-in-pirate-forms](https://docs.themeisle.com/article/663-what-actions-and-filters-are-available-in-pirate-forms)
|
196 |
+
|
197 |
+
= How can I change HTML of default form in Pirate Forms =
|
198 |
+
[https://docs.themeisle.com/article/745-how-can-i-change-html-of-default-form-in-pirate-forms](https://docs.themeisle.com/article/745-how-can-i-change-html-of-default-form-in-pirate-forms)
|
199 |
+
|
200 |
+
= How to add Dropdown menu in Subject Field in Pirate Forms =
|
201 |
+
[https://docs.themeisle.com/article/725-how-to-add-dropdown-menu-in-subject-field-in-pirate-forms](https://docs.themeisle.com/article/725-how-to-add-dropdown-menu-in-subject-field-in-pirate-forms)
|
202 |
+
|
203 |
+
= How to save contacts in Mailchimp list in Pirate Forms =
|
204 |
+
[https://docs.themeisle.com/article/722-how-to-save-contacts-in-mailchimp-list-in-pirate-forms](https://docs.themeisle.com/article/722-how-to-save-contacts-in-mailchimp-list-in-pirate-forms)
|
205 |
+
|
206 |
+
= How to add checkbox field in Pirate Forms =
|
207 |
+
[https://docs.themeisle.com/article/733-how-to-add-checkbox-field-in-pirate-forms](https://docs.themeisle.com/article/733-how-to-add-checkbox-field-in-pirate-forms)
|
208 |
+
|
209 |
+
= How to add a spam trap in a form in Pirate Forms =
|
210 |
+
[https://docs.themeisle.com/article/732-how-to-add-a-spam-trap-in-a-form-in-pirate-forms](https://docs.themeisle.com/article/732-how-to-add-a-spam-trap-in-a-form-in-pirate-forms)
|
211 |
+
|
212 |
+
= How to create multiple forms in Pirate Forms =
|
213 |
+
[https://docs.themeisle.com/article/730-how-to-create-multiple-forms-in-pirate-forms](https://docs.themeisle.com/article/730-how-to-create-multiple-forms-in-pirate-forms)
|
214 |
+
|
215 |
+
= How to create a Form Widget in Pirate Forms =
|
216 |
+
[https://docs.themeisle.com/article/723-how-to-create-a-form-widget-in-pirate-forms](https://docs.themeisle.com/article/723-how-to-create-a-form-widget-in-pirate-forms)
|
217 |
+
|
218 |
+
= How to change default confirmation email content in Pirate Forms =
|
219 |
+
[https://docs.themeisle.com/article/724-how-to-change-default-confirmation-email-content-in-pirate-forms](https://docs.themeisle.com/article/724-how-to-change-default-confirmation-email-content-in-pirate-forms)
|
220 |
+
|
221 |
+
= How to add attributes to form in Pirate Forms =
|
222 |
+
[https://docs.themeisle.com/article/752-how-to-add-attributes-to-form-in-pirate-forms](https://docs.themeisle.com/article/752-how-to-add-attributes-to-form-in-pirate-forms)
|
223 |
+
|
224 |
+
= How to change default email content in Pirate forms =
|
225 |
+
[https://docs.themeisle.com/article/779-how-to-change-default-email-content-in-pirate-forms](https://docs.themeisle.com/article/779-how-to-change-default-email-content-in-pirate-forms)
|
226 |
+
|
227 |
+
= How to add multiple upload fields in Pirate Forms =
|
228 |
+
[https://docs.themeisle.com/article/734-how-to-add-multiple-upload-fields-in-pirate-forms](https://docs.themeisle.com/article/734-how-to-add-multiple-upload-fields-in-pirate-forms)
|
229 |
+
|
230 |
+
= How to create a subscription form in Pirate Forms =
|
231 |
+
[https://docs.themeisle.com/article/721-how-to-create-a-subscription-form-in-pirate-forms](https://docs.themeisle.com/article/721-how-to-create-a-subscription-form-in-pirate-forms)
|
232 |
+
|
233 |
+
= How to change default email content per form in Pirate forms =
|
234 |
+
[https://docs.themeisle.com/article/780-how-to-change-default-email-content-per-form-in-pirate-forms](https://docs.themeisle.com/article/780-how-to-change-default-email-content-per-form-in-pirate-forms)
|
235 |
+
|
236 |
+
= How to install and use extended version of Pirate Forms =
|
237 |
+
[https://docs.themeisle.com/article/787-how-to-install-and-use-extended-version-of-pirate-forms](https://docs.themeisle.com/article/787-how-to-install-and-use-extended-version-of-pirate-forms)
|
238 |
+
|
239 |
+
= How to set a success page on successful form submission =
|
240 |
+
[https://docs.themeisle.com/article/836-how-to-set-a-success-page-on-successful-form-submission](https://docs.themeisle.com/article/836-how-to-set-a-success-page-on-successful-form-submission)
|
241 |
+
|
242 |
== Installation ==
|
243 |
|
244 |
Activating the Pirate Contact Form plugin is just like any other plugin. If you've uploaded the plugin package to your server already, skip to step 5 below:
|
260 |
4. Screenshot 4. Enabling SMTP
|
261 |
|
262 |
## Changelog ##
|
263 |
+
### 2.3.5 - 2018-03-05 ###
|
264 |
+
|
265 |
+
* Fix characters encoding issue in the subject field.
|
266 |
+
* Fix issue with spam label with two forms on the page.
|
267 |
+
* Allows zip files to be attached in forms.
|
268 |
+
* Adds a filter to dynamically change the subject.
|
269 |
+
* Adds options to send a copy of the email to the sender.
|
270 |
+
|
271 |
+
|
272 |
### 2.3.4 - 2018-02-15 ###
|
273 |
|
274 |
* Added missing Loader.gif file
|
readme.txt
CHANGED
@@ -88,6 +88,8 @@ This plugin started as a fork of https://wordpress.org/plugins/proper-contact-fo
|
|
88 |
|
89 |
|
90 |
|
|
|
|
|
91 |
= How I can get support for this contact form plugin ? =
|
92 |
|
93 |
You can learn more about PirateForms and ask for help by <a href="https://themeisle.com/contact/" >visiting ThemeIsle website</a>.
|
@@ -166,6 +168,84 @@ You can follow the full documentation [here](http://docs.themeisle.com/article/4
|
|
166 |
= How to install and use extended version of Pirate Forms =
|
167 |
[http://docs.themeisle.com/article/787-how-to-install-and-use-extended-version-of-pirate-forms](http://docs.themeisle.com/article/787-how-to-install-and-use-extended-version-of-pirate-forms)
|
168 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
== Installation ==
|
170 |
|
171 |
Activating the Pirate Contact Form plugin is just like any other plugin. If you've uploaded the plugin package to your server already, skip to step 5 below:
|
@@ -187,6 +267,15 @@ Activating the Pirate Contact Form plugin is just like any other plugin. If you'
|
|
187 |
4. Screenshot 4. Enabling SMTP
|
188 |
|
189 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
= 2.3.4 - 2018-02-15 =
|
191 |
|
192 |
* Added missing Loader.gif file
|
88 |
|
89 |
|
90 |
|
91 |
+
|
92 |
+
|
93 |
= How I can get support for this contact form plugin ? =
|
94 |
|
95 |
You can learn more about PirateForms and ask for help by <a href="https://themeisle.com/contact/" >visiting ThemeIsle website</a>.
|
168 |
= How to install and use extended version of Pirate Forms =
|
169 |
[http://docs.themeisle.com/article/787-how-to-install-and-use-extended-version-of-pirate-forms](http://docs.themeisle.com/article/787-how-to-install-and-use-extended-version-of-pirate-forms)
|
170 |
|
171 |
+
= Pirate Forms Documentation =
|
172 |
+
[https://docs.themeisle.com/article/436-pirate-forms-documentation](https://docs.themeisle.com/article/436-pirate-forms-documentation)
|
173 |
+
|
174 |
+
= How to Change Pirate Forms Submit Button Color =
|
175 |
+
[https://docs.themeisle.com/article/423-how-to-change-pirate-forms-submit-button-color](https://docs.themeisle.com/article/423-how-to-change-pirate-forms-submit-button-color)
|
176 |
+
|
177 |
+
= How to Center the Send Message button for Pirate Forms =
|
178 |
+
[https://docs.themeisle.com/article/427-how-to-center-the-send-message-button-for-pirate-forms](https://docs.themeisle.com/article/427-how-to-center-the-send-message-button-for-pirate-forms)
|
179 |
+
|
180 |
+
= How you can overwrite the default form template in Pirate Forms =
|
181 |
+
[https://docs.themeisle.com/article/664-how-you-can-overwrite-the-default-form-template-in-pirate-forms](https://docs.themeisle.com/article/664-how-you-can-overwrite-the-default-form-template-in-pirate-forms)
|
182 |
+
|
183 |
+
= How to change font in Pirate Forms =
|
184 |
+
[https://docs.themeisle.com/article/431-how-to-change-font-in-pirate-forms](https://docs.themeisle.com/article/431-how-to-change-font-in-pirate-forms)
|
185 |
+
|
186 |
+
= Why do I not receive any emails? - Pirate Forms =
|
187 |
+
[https://docs.themeisle.com/article/729-why-do-i-not-receive-any-emails---pirate-forms](https://docs.themeisle.com/article/729-why-do-i-not-receive-any-emails---pirate-forms)
|
188 |
+
|
189 |
+
= Emails are not being sent, what can i do ? =
|
190 |
+
[https://docs.themeisle.com/article/690-emails-are-not-being-sent-what-can-i-do](https://docs.themeisle.com/article/690-emails-are-not-being-sent-what-can-i-do)
|
191 |
+
|
192 |
+
= How to add reCaptcha to a form in Pirate Forms =
|
193 |
+
[https://docs.themeisle.com/article/731-how-to-add-recaptcha-to-a-form-in-pirate-forms](https://docs.themeisle.com/article/731-how-to-add-recaptcha-to-a-form-in-pirate-forms)
|
194 |
+
|
195 |
+
= What actions and filters are available in Pirate Forms =
|
196 |
+
[https://docs.themeisle.com/article/663-what-actions-and-filters-are-available-in-pirate-forms](https://docs.themeisle.com/article/663-what-actions-and-filters-are-available-in-pirate-forms)
|
197 |
+
|
198 |
+
= How can I change HTML of default form in Pirate Forms =
|
199 |
+
[https://docs.themeisle.com/article/745-how-can-i-change-html-of-default-form-in-pirate-forms](https://docs.themeisle.com/article/745-how-can-i-change-html-of-default-form-in-pirate-forms)
|
200 |
+
|
201 |
+
= How to add Dropdown menu in Subject Field in Pirate Forms =
|
202 |
+
[https://docs.themeisle.com/article/725-how-to-add-dropdown-menu-in-subject-field-in-pirate-forms](https://docs.themeisle.com/article/725-how-to-add-dropdown-menu-in-subject-field-in-pirate-forms)
|
203 |
+
|
204 |
+
= How to save contacts in Mailchimp list in Pirate Forms =
|
205 |
+
[https://docs.themeisle.com/article/722-how-to-save-contacts-in-mailchimp-list-in-pirate-forms](https://docs.themeisle.com/article/722-how-to-save-contacts-in-mailchimp-list-in-pirate-forms)
|
206 |
+
|
207 |
+
= How to add checkbox field in Pirate Forms =
|
208 |
+
[https://docs.themeisle.com/article/733-how-to-add-checkbox-field-in-pirate-forms](https://docs.themeisle.com/article/733-how-to-add-checkbox-field-in-pirate-forms)
|
209 |
+
|
210 |
+
= How to add a spam trap in a form in Pirate Forms =
|
211 |
+
[https://docs.themeisle.com/article/732-how-to-add-a-spam-trap-in-a-form-in-pirate-forms](https://docs.themeisle.com/article/732-how-to-add-a-spam-trap-in-a-form-in-pirate-forms)
|
212 |
+
|
213 |
+
= How to create multiple forms in Pirate Forms =
|
214 |
+
[https://docs.themeisle.com/article/730-how-to-create-multiple-forms-in-pirate-forms](https://docs.themeisle.com/article/730-how-to-create-multiple-forms-in-pirate-forms)
|
215 |
+
|
216 |
+
= How to create a Form Widget in Pirate Forms =
|
217 |
+
[https://docs.themeisle.com/article/723-how-to-create-a-form-widget-in-pirate-forms](https://docs.themeisle.com/article/723-how-to-create-a-form-widget-in-pirate-forms)
|
218 |
+
|
219 |
+
= How to change default confirmation email content in Pirate Forms =
|
220 |
+
[https://docs.themeisle.com/article/724-how-to-change-default-confirmation-email-content-in-pirate-forms](https://docs.themeisle.com/article/724-how-to-change-default-confirmation-email-content-in-pirate-forms)
|
221 |
+
|
222 |
+
= How to add attributes to form in Pirate Forms =
|
223 |
+
[https://docs.themeisle.com/article/752-how-to-add-attributes-to-form-in-pirate-forms](https://docs.themeisle.com/article/752-how-to-add-attributes-to-form-in-pirate-forms)
|
224 |
+
|
225 |
+
= How to change default email content in Pirate forms =
|
226 |
+
[https://docs.themeisle.com/article/779-how-to-change-default-email-content-in-pirate-forms](https://docs.themeisle.com/article/779-how-to-change-default-email-content-in-pirate-forms)
|
227 |
+
|
228 |
+
= How to add multiple upload fields in Pirate Forms =
|
229 |
+
[https://docs.themeisle.com/article/734-how-to-add-multiple-upload-fields-in-pirate-forms](https://docs.themeisle.com/article/734-how-to-add-multiple-upload-fields-in-pirate-forms)
|
230 |
+
|
231 |
+
= How to create a subscription form in Pirate Forms =
|
232 |
+
[https://docs.themeisle.com/article/721-how-to-create-a-subscription-form-in-pirate-forms](https://docs.themeisle.com/article/721-how-to-create-a-subscription-form-in-pirate-forms)
|
233 |
+
|
234 |
+
= How to change default email content per form in Pirate forms =
|
235 |
+
[https://docs.themeisle.com/article/780-how-to-change-default-email-content-per-form-in-pirate-forms](https://docs.themeisle.com/article/780-how-to-change-default-email-content-per-form-in-pirate-forms)
|
236 |
+
|
237 |
+
= How to install and use extended version of Pirate Forms =
|
238 |
+
[https://docs.themeisle.com/article/787-how-to-install-and-use-extended-version-of-pirate-forms](https://docs.themeisle.com/article/787-how-to-install-and-use-extended-version-of-pirate-forms)
|
239 |
+
|
240 |
+
= How to set a success page on successful form submission =
|
241 |
+
[https://docs.themeisle.com/article/836-how-to-set-a-success-page-on-successful-form-submission](https://docs.themeisle.com/article/836-how-to-set-a-success-page-on-successful-form-submission)
|
242 |
+
|
243 |
+
= Pirate Forms: How to change the default subject of email admin receives =
|
244 |
+
[https://docs.themeisle.com/article/838-pirate-forms-how-to-change-the-default-subject-of-email-admin-receives](https://docs.themeisle.com/article/838-pirate-forms-how-to-change-the-default-subject-of-email-admin-receives)
|
245 |
+
|
246 |
+
= How to send a copy of the sent email to the sender. =
|
247 |
+
[https://docs.themeisle.com/article/837-how-to-send-a-copy-of-the-sent-email-to-the-sender](https://docs.themeisle.com/article/837-how-to-send-a-copy-of-the-sent-email-to-the-sender)
|
248 |
+
|
249 |
== Installation ==
|
250 |
|
251 |
Activating the Pirate Contact Form plugin is just like any other plugin. If you've uploaded the plugin package to your server already, skip to step 5 below:
|
267 |
4. Screenshot 4. Enabling SMTP
|
268 |
|
269 |
== Changelog ==
|
270 |
+
= 2.3.5 - 2018-03-05 =
|
271 |
+
|
272 |
+
* Fix characters encoding issue in the subject field.
|
273 |
+
* Fix issue with spam label with two forms on the page.
|
274 |
+
* Allows zip files to be attached in forms.
|
275 |
+
* Adds a filter to dynamically change the subject.
|
276 |
+
* Adds options to send a copy of the email to the sender.
|
277 |
+
|
278 |
+
|
279 |
= 2.3.4 - 2018-02-15 =
|
280 |
|
281 |
* Added missing Loader.gif file
|
themeisle-hash.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"index.php":"39ab8276fb0e4bd3fcab3270822c5977","pirate-forms.php":"
|
1 |
+
{"index.php":"39ab8276fb0e4bd3fcab3270822c5977","pirate-forms.php":"ab428b23a35572d3893cffaa03af9cd9","uninstall.php":"9d936442a63521d971a6dbc28df9c0d1"}
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer' . '/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit703088648f00d6241ea3032c6eb23b8c::getLoader();
|
vendor/autoload_52.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInitba939108c9f9818edbbc3a372beab52e::getLoader();
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-endpoints.php
CHANGED
@@ -235,7 +235,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Endpoints' ) ) :
|
|
235 |
|
236 |
// fetch the calculated hashes.
|
237 |
if ( ! $wp_filesystem->is_readable( $path . '/' . self::HASH_FILE ) ) {
|
238 |
-
return new WP_Error( 'themeisle_sdk_hash_not_found', sprintf(
|
239 |
}
|
240 |
|
241 |
$hashes = json_decode( $wp_filesystem->get_contents( $path . '/' . self::HASH_FILE ), true );
|
@@ -296,7 +296,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Endpoints' ) ) :
|
|
296 |
$value = sanitize_text_field( $data[ $param ] );
|
297 |
if ( empty( $value ) ) {
|
298 |
return new WP_Error(
|
299 |
-
'themeisle_' . $param . '_invalid', sprintf(
|
300 |
'status' => 403,
|
301 |
)
|
302 |
);
|
235 |
|
236 |
// fetch the calculated hashes.
|
237 |
if ( ! $wp_filesystem->is_readable( $path . '/' . self::HASH_FILE ) ) {
|
238 |
+
return new WP_Error( 'themeisle_sdk_hash_not_found', sprintf( '%s not found', self::HASH_FILE ) );
|
239 |
}
|
240 |
|
241 |
$hashes = json_decode( $wp_filesystem->get_contents( $path . '/' . self::HASH_FILE ), true );
|
296 |
$value = sanitize_text_field( $data[ $param ] );
|
297 |
if ( empty( $value ) ) {
|
298 |
return new WP_Error(
|
299 |
+
'themeisle_' . $param . '_invalid', sprintf( 'Invalid %', $param ), array(
|
300 |
'status' => 403,
|
301 |
)
|
302 |
);
|
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-product.php
CHANGED
@@ -61,6 +61,10 @@ if ( ! class_exists( 'ThemeIsle_SDK_Product' ) ) :
|
|
61 |
* @var array $allowed_authors The allowed authors.
|
62 |
*/
|
63 |
private $allowed_authors = array( 'proteusthemes.com', 'anarieldesign.com', 'prothemedesign.com', 'cssigniter.com' );
|
|
|
|
|
|
|
|
|
64 |
/**
|
65 |
* @var bool $requires_license Either user needs to activate it with license.
|
66 |
*/
|
@@ -168,6 +172,9 @@ if ( ! class_exists( 'ThemeIsle_SDK_Product' ) ) :
|
|
168 |
if ( strpos( $this->author_url, $author ) !== false ) {
|
169 |
return true;
|
170 |
}
|
|
|
|
|
|
|
171 |
}
|
172 |
|
173 |
return false;
|
61 |
* @var array $allowed_authors The allowed authors.
|
62 |
*/
|
63 |
private $allowed_authors = array( 'proteusthemes.com', 'anarieldesign.com', 'prothemedesign.com', 'cssigniter.com' );
|
64 |
+
/**
|
65 |
+
* @var array $allowed_external_products The allowed external_products.
|
66 |
+
*/
|
67 |
+
private $allowed_products = array( 'zermatt', 'neto', 'olsen', 'benson', 'romero', 'carmack', 'puzzle', 'broadsheet', 'girlywp', 'veggie', 'zeko', 'maishawp', 'didi', 'liber', 'medicpress-pt', 'adrenaline-pt', 'consultpress-pt', 'legalpress-pt', 'gympress-pt', 'readable-pt', 'bolts-pt' );
|
68 |
/**
|
69 |
* @var bool $requires_license Either user needs to activate it with license.
|
70 |
*/
|
172 |
if ( strpos( $this->author_url, $author ) !== false ) {
|
173 |
return true;
|
174 |
}
|
175 |
+
if ( in_array( $this->get_slug(), $this->allowed_products ) ) {
|
176 |
+
return true;
|
177 |
+
}
|
178 |
}
|
179 |
|
180 |
return false;
|
vendor/codeinwp/themeisle-sdk/load.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
*/
|
12 |
|
13 |
// Current SDK version and path.
|
14 |
-
$themeisle_sdk_version = '2.1.
|
15 |
$themeisle_sdk_path = dirname( __FILE__ );
|
16 |
|
17 |
global $themeisle_sdk_max_version;
|
11 |
*/
|
12 |
|
13 |
// Current SDK version and path.
|
14 |
+
$themeisle_sdk_version = '2.1.2';
|
15 |
$themeisle_sdk_path = dirname( __FILE__ );
|
16 |
|
17 |
global $themeisle_sdk_max_version;
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit827b7f6ae2e6aa5ae9503153e0b8dd88
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
27 |
foreach ($map as $namespace => $path) {
|
@@ -42,14 +42,14 @@ class ComposerAutoloaderInit827b7f6ae2e6aa5ae9503153e0b8dd88
|
|
42 |
|
43 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
44 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
45 |
-
|
46 |
}
|
47 |
|
48 |
return $loader;
|
49 |
}
|
50 |
}
|
51 |
|
52 |
-
function
|
53 |
{
|
54 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
55 |
require $file;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit703088648f00d6241ea3032c6eb23b8c
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit703088648f00d6241ea3032c6eb23b8c', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit703088648f00d6241ea3032c6eb23b8c', 'loadClassLoader'));
|
25 |
|
26 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
27 |
foreach ($map as $namespace => $path) {
|
42 |
|
43 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
44 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
45 |
+
composerRequire703088648f00d6241ea3032c6eb23b8c($fileIdentifier, $file);
|
46 |
}
|
47 |
|
48 |
return $loader;
|
49 |
}
|
50 |
}
|
51 |
|
52 |
+
function composerRequire703088648f00d6241ea3032c6eb23b8c($fileIdentifier, $file)
|
53 |
{
|
54 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
55 |
require $file;
|
vendor/composer/autoload_real_52.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real_52.php generated by xrstf/composer-php52
|
4 |
|
5 |
-
class
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
@@ -19,9 +19,9 @@ class ComposerAutoloaderInitbe773d6b228b4c23ed753bd0428c6a8c {
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$vendorDir = dirname(dirname(__FILE__));
|
27 |
$baseDir = dirname($vendorDir);
|
2 |
|
3 |
// autoload_real_52.php generated by xrstf/composer-php52
|
4 |
|
5 |
+
class ComposerAutoloaderInitba939108c9f9818edbbc3a372beab52e {
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInitba939108c9f9818edbbc3a372beab52e', 'loadClassLoader'), true /*, true */);
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitba939108c9f9818edbbc3a372beab52e', 'loadClassLoader'));
|
25 |
|
26 |
$vendorDir = dirname(dirname(__FILE__));
|
27 |
$baseDir = dirname($vendorDir);
|
vendor/composer/installed.json
CHANGED
@@ -6,15 +6,15 @@
|
|
6 |
"source": {
|
7 |
"type": "git",
|
8 |
"url": "https://github.com/Codeinwp/themeisle-sdk.git",
|
9 |
-
"reference": "
|
10 |
},
|
11 |
"dist": {
|
12 |
"type": "zip",
|
13 |
-
"url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/
|
14 |
-
"reference": "
|
15 |
"shasum": ""
|
16 |
},
|
17 |
-
"time": "2018-
|
18 |
"type": "library",
|
19 |
"installation-source": "dist",
|
20 |
"autoload": {
|
6 |
"source": {
|
7 |
"type": "git",
|
8 |
"url": "https://github.com/Codeinwp/themeisle-sdk.git",
|
9 |
+
"reference": "18bcad4b82796f4b6996dea42832ce3518924f25"
|
10 |
},
|
11 |
"dist": {
|
12 |
"type": "zip",
|
13 |
+
"url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/18bcad4b82796f4b6996dea42832ce3518924f25",
|
14 |
+
"reference": "18bcad4b82796f4b6996dea42832ce3518924f25",
|
15 |
"shasum": ""
|
16 |
},
|
17 |
+
"time": "2018-03-19 21:12:50",
|
18 |
"type": "library",
|
19 |
"installation-source": "dist",
|
20 |
"autoload": {
|