Version Description
- 2017-10-20
Download this release
Release Info
Developer | codeinwp |
Plugin | Contact Form & SMTP Plugin for WordPress by PirateForms |
Version | 2.2.2 |
Comparing to | |
See all releases |
Code changes from version 2.2.1 to 2.2.2
- CHANGELOG.md +7 -0
- admin/class-pirateforms-admin.php +4 -1
- includes/class-pirateforms-html.php +1 -1
- includes/class-pirateforms-phpformbuilder.php +26 -2
- includes/class-pirateforms.php +2 -2
- pirate-forms.php +2 -2
- public/class-pirateforms-public.php +5 -6
- public/css/front.css +1 -1
- readme.md +8 -0
- readme.txt +8 -0
- vendor/autoload.php +1 -1
- vendor/autoload_52.php +1 -1
- vendor/composer/autoload_real.php +5 -5
- vendor/composer/autoload_real_52.php +3 -3
CHANGELOG.md
CHANGED
@@ -1,4 +1,11 @@
|
|
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
### v2.2.1 - 2017-10-10
|
3 |
**Changes:**
|
4 |
* Fix issue for multiple forms on the same page.
|
1 |
|
2 |
+
### v2.2.2 - 2017-10-20
|
3 |
+
**Changes:**
|
4 |
+
* Hide email entries in frontend queries.
|
5 |
+
* Adds filter for form attributes.
|
6 |
+
* Fix issue with attachment fields not working when spam trap is active.
|
7 |
+
* Adds support for more integrations in the pro version.
|
8 |
+
|
9 |
### v2.2.1 - 2017-10-10
|
10 |
**Changes:**
|
11 |
* Fix issue for multiple forms on the same page.
|
admin/class-pirateforms-admin.php
CHANGED
@@ -944,11 +944,14 @@ class PirateForms_Admin {
|
|
944 |
if ( $failed ) {
|
945 |
$reason = get_post_meta( $id, PIRATEFORMS_SLUG . 'mail-status-reason', true );
|
946 |
if ( ! empty( $reason ) ) {
|
947 |
-
echo '
|
948 |
}
|
949 |
}
|
950 |
break;
|
951 |
}
|
|
|
|
|
|
|
952 |
}
|
953 |
|
954 |
/**
|
944 |
if ( $failed ) {
|
945 |
$reason = get_post_meta( $id, PIRATEFORMS_SLUG . 'mail-status-reason', true );
|
946 |
if ( ! empty( $reason ) ) {
|
947 |
+
echo ' (' . $reason . ')';
|
948 |
}
|
949 |
}
|
950 |
break;
|
951 |
}
|
952 |
+
|
953 |
+
do_action( 'pirate_forms_listing_display', $column, $id );
|
954 |
+
|
955 |
}
|
956 |
|
957 |
/**
|
includes/class-pirateforms-html.php
CHANGED
@@ -192,7 +192,7 @@ class PirateForms_HTML {
|
|
192 |
unset( $args['required_msg'] );
|
193 |
}
|
194 |
|
195 |
-
$html = '<div class="pirate-forms-file-upload-wrapper"><input type="file" ' . $this->get_common( $args, array( 'value' ) ) . ' style="position: absolute; left: -9999px;" tabindex="-1"><button type="button" class="pirate-forms-file-upload-button" tabindex="-1">' . ( isset( $args['label']['value'] ) ? esc_attr( $args['label']['value'] ) : '' ) . '</button><input type="text" ' . $this->get_common( $text_args ) . '
|
196 |
|
197 |
return $this->get_wrap( $args, $html );
|
198 |
}
|
192 |
unset( $args['required_msg'] );
|
193 |
}
|
194 |
|
195 |
+
$html = '<div class="pirate-forms-file-upload-wrapper"><input type="file" ' . $this->get_common( $args, array( 'value' ) ) . ' style="position: absolute; left: -9999px;" tabindex="-1"><button type="button" class="pirate-forms-file-upload-button" tabindex="-1">' . ( isset( $args['label']['value'] ) ? esc_attr( $args['label']['value'] ) : '' ) . '</button><input type="text" ' . $this->get_common( $text_args ) . ' /></div>';
|
196 |
|
197 |
return $this->get_wrap( $args, $html );
|
198 |
}
|
includes/class-pirateforms-phpformbuilder.php
CHANGED
@@ -35,7 +35,7 @@ class PirateForms_PhpFormBuilder {
|
|
35 |
|
36 |
$classes = array();
|
37 |
$classes[] = $from_widget ? 'widget-on' : '';
|
38 |
-
$form_start = '<form method="post" enctype="' . $pirate_forms_enctype . '"
|
39 |
|
40 |
$html_helper = new PirateForms_HTML();
|
41 |
$form_end = '';
|
@@ -57,7 +57,31 @@ class PirateForms_PhpFormBuilder {
|
|
57 |
|
58 |
$this->set_element( 'custom_fields', $custom_fields );
|
59 |
|
60 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
$this->set_element( 'form_start', $form_start );
|
62 |
|
63 |
$form_end .= '</form>';
|
35 |
|
36 |
$classes = array();
|
37 |
$classes[] = $from_widget ? 'widget-on' : '';
|
38 |
+
$form_start = '<form method="post" enctype="' . $pirate_forms_enctype . '" class="pirate_forms ';
|
39 |
|
40 |
$html_helper = new PirateForms_HTML();
|
41 |
$form_end = '';
|
57 |
|
58 |
$this->set_element( 'custom_fields', $custom_fields );
|
59 |
|
60 |
+
$form_attributes = array_filter( apply_filters( 'pirate_forms_form_attributes', array( 'action' => '' ) ) );
|
61 |
+
if ( $form_attributes ) {
|
62 |
+
// if additiona classes are provided, add them to our classes.
|
63 |
+
if ( array_key_exists( 'class', $form_attributes ) ) {
|
64 |
+
$form_classes = explode( ' ', $form_attributes['class'] );
|
65 |
+
$classes = array_merge( $classes, $form_classes );
|
66 |
+
unset( $form_attributes['class'] );
|
67 |
+
}
|
68 |
+
|
69 |
+
// don't allow overriding of method or enctype.
|
70 |
+
if ( array_key_exists( 'method', $form_attributes ) ) {
|
71 |
+
unset( $form_attributes['method'] );
|
72 |
+
}
|
73 |
+
if ( array_key_exists( 'enctype', $form_attributes ) ) {
|
74 |
+
unset( $form_attributes['enctype'] );
|
75 |
+
}
|
76 |
+
}
|
77 |
+
|
78 |
+
$form_start .= implode( ' ', $classes ) . '"';
|
79 |
+
if ( $form_attributes ) {
|
80 |
+
foreach ( $form_attributes as $k => $v ) {
|
81 |
+
$form_start .= " $k=$v";
|
82 |
+
}
|
83 |
+
}
|
84 |
+
$form_start .= '>';
|
85 |
$this->set_element( 'form_start', $form_start );
|
86 |
|
87 |
$form_end .= '</form>';
|
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.2.
|
73 |
|
74 |
$this->load_dependencies();
|
75 |
$this->set_locale();
|
@@ -259,7 +259,7 @@ class PirateForms {
|
|
259 |
$args = array(
|
260 |
'labels' => $labels,
|
261 |
'description' => __( 'Entries from Pirate Forms', 'pirate-forms' ),
|
262 |
-
'public' =>
|
263 |
'publicly_queryable' => true,
|
264 |
'show_ui' => true,
|
265 |
'show_in_menu' => 'pirateforms-admin',
|
69 |
public function __construct() {
|
70 |
|
71 |
$this->plugin_name = 'pirateforms';
|
72 |
+
$this->version = '2.2.2';
|
73 |
|
74 |
$this->load_dependencies();
|
75 |
$this->set_locale();
|
259 |
$args = array(
|
260 |
'labels' => $labels,
|
261 |
'description' => __( 'Entries from Pirate Forms', 'pirate-forms' ),
|
262 |
+
'public' => false,
|
263 |
'publicly_queryable' => true,
|
264 |
'show_ui' => true,
|
265 |
'show_in_menu' => 'pirateforms-admin',
|
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.2.
|
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.2.
|
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.2.2
|
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.2.2' );
|
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
@@ -76,6 +76,7 @@ class PirateForms_Public {
|
|
76 |
/* style for frontpage contact */
|
77 |
wp_enqueue_style( 'pirate_forms_front_styles', PIRATEFORMS_URL . 'public/css/front.css', array(), $this->version );
|
78 |
/* recaptcha js */
|
|
|
79 |
$pirate_forms_options = get_option( 'pirate_forms_settings_array' );
|
80 |
if ( ! empty( $pirate_forms_options ) ) :
|
81 |
if ( ! empty( $pirate_forms_options['pirateformsopt_recaptcha_secretkey'] ) && ! empty( $pirate_forms_options['pirateformsopt_recaptcha_sitekey'] ) && 'yes' === $pirate_forms_options['pirateformsopt_recaptcha_field'] ) :
|
@@ -85,14 +86,12 @@ class PirateForms_Public {
|
|
85 |
$pirate_forms_contactus_language = get_locale();
|
86 |
}
|
87 |
wp_enqueue_script( 'recaptcha', 'https://www.google.com/recaptcha/api.js?hl=' . $pirate_forms_contactus_language . '' );
|
88 |
-
|
89 |
-
'pirate_forms_scripts', PIRATEFORMS_URL . 'public/js/scripts.js', array(
|
90 |
-
'jquery',
|
91 |
-
'recaptcha',
|
92 |
-
), $this->version
|
93 |
-
);
|
94 |
endif;
|
95 |
endif;
|
|
|
|
|
|
|
96 |
wp_enqueue_script( 'pirate_forms_scripts_general', PIRATEFORMS_URL . 'public/js/scripts-general.js', array( 'jquery' ), $this->version );
|
97 |
$pirate_forms_errors = '';
|
98 |
if ( ! empty( $_SESSION['pirate_forms_contact_errors'] ) ) :
|
76 |
/* style for frontpage contact */
|
77 |
wp_enqueue_style( 'pirate_forms_front_styles', PIRATEFORMS_URL . 'public/css/front.css', array(), $this->version );
|
78 |
/* recaptcha js */
|
79 |
+
$deps = array( 'jquery' );
|
80 |
$pirate_forms_options = get_option( 'pirate_forms_settings_array' );
|
81 |
if ( ! empty( $pirate_forms_options ) ) :
|
82 |
if ( ! empty( $pirate_forms_options['pirateformsopt_recaptcha_secretkey'] ) && ! empty( $pirate_forms_options['pirateformsopt_recaptcha_sitekey'] ) && 'yes' === $pirate_forms_options['pirateformsopt_recaptcha_field'] ) :
|
86 |
$pirate_forms_contactus_language = get_locale();
|
87 |
}
|
88 |
wp_enqueue_script( 'recaptcha', 'https://www.google.com/recaptcha/api.js?hl=' . $pirate_forms_contactus_language . '' );
|
89 |
+
$deps[] = 'recaptcha';
|
|
|
|
|
|
|
|
|
|
|
90 |
endif;
|
91 |
endif;
|
92 |
+
|
93 |
+
wp_enqueue_script( 'pirate_forms_scripts', PIRATEFORMS_URL . 'public/js/scripts.js', $deps, $this->version );
|
94 |
+
|
95 |
wp_enqueue_script( 'pirate_forms_scripts_general', PIRATEFORMS_URL . 'public/js/scripts-general.js', array( 'jquery' ), $this->version );
|
96 |
$pirate_forms_errors = '';
|
97 |
if ( ! empty( $_SESSION['pirate_forms_contact_errors'] ) ) :
|
public/css/front.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/*
|
2 |
-
Version: 2.2.
|
3 |
*/
|
4 |
.pirate_forms_wrap .form_field_wrap {
|
5 |
margin-bottom: 20px;
|
1 |
/*
|
2 |
+
Version: 2.2.2
|
3 |
*/
|
4 |
.pirate_forms_wrap .form_field_wrap {
|
5 |
margin-bottom: 20px;
|
readme.md
CHANGED
@@ -134,6 +134,14 @@ Activating the Pirate Contact Form plugin is just like any other plugin. If you'
|
|
134 |
4. Screenshot 4. Enabling SMTP
|
135 |
|
136 |
## Changelog ##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
### 2.2.1 - 2017-10-10 ###
|
138 |
|
139 |
* Fix issue for multiple forms on the same page.
|
134 |
4. Screenshot 4. Enabling SMTP
|
135 |
|
136 |
## Changelog ##
|
137 |
+
### 2.2.2 - 2017-10-20 ###
|
138 |
+
|
139 |
+
* Hide email entries in frontend queries.
|
140 |
+
* Adds filter for form attributes.
|
141 |
+
* Fix issue with attachment fields not working when spam trap is active.
|
142 |
+
* Adds support for more integrations in the pro version.
|
143 |
+
|
144 |
+
|
145 |
### 2.2.1 - 2017-10-10 ###
|
146 |
|
147 |
* Fix issue for multiple forms on the same page.
|
readme.txt
CHANGED
@@ -134,6 +134,14 @@ Activating the Pirate Contact Form plugin is just like any other plugin. If you'
|
|
134 |
4. Screenshot 4. Enabling SMTP
|
135 |
|
136 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
= 2.2.1 - 2017-10-10 =
|
138 |
|
139 |
* Fix issue for multiple forms on the same page.
|
134 |
4. Screenshot 4. Enabling SMTP
|
135 |
|
136 |
== Changelog ==
|
137 |
+
= 2.2.2 - 2017-10-20 =
|
138 |
+
|
139 |
+
* Hide email entries in frontend queries.
|
140 |
+
* Adds filter for form attributes.
|
141 |
+
* Fix issue with attachment fields not working when spam trap is active.
|
142 |
+
* Adds support for more integrations in the pro version.
|
143 |
+
|
144 |
+
|
145 |
= 2.2.1 - 2017-10-10 =
|
146 |
|
147 |
* Fix issue for multiple forms on the same page.
|
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 ComposerAutoloaderInit76139e0a99dd7565c21326150584317c::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 ComposerAutoloaderInit8c658c377f50ec1d91d09e0f12dba411::getLoader();
|
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 ComposerAutoloaderInitfe99c1f973ebd762d30dc8e02157f800
|
|
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 ComposerAutoloaderInitfe99c1f973ebd762d30dc8e02157f800
|
|
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 ComposerAutoloaderInit76139e0a99dd7565c21326150584317c
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit76139e0a99dd7565c21326150584317c', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit76139e0a99dd7565c21326150584317c', '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 |
+
composerRequire76139e0a99dd7565c21326150584317c($fileIdentifier, $file);
|
46 |
}
|
47 |
|
48 |
return $loader;
|
49 |
}
|
50 |
}
|
51 |
|
52 |
+
function composerRequire76139e0a99dd7565c21326150584317c($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 ComposerAutoloaderInit1c4c6bbd3dc3818cde598434582eb808 {
|
|
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 ComposerAutoloaderInit8c658c377f50ec1d91d09e0f12dba411 {
|
6 |
private static $loader;
|
7 |
|
8 |
public static function loadClassLoader($class) {
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit8c658c377f50ec1d91d09e0f12dba411', 'loadClassLoader'), true /*, true */);
|
23 |
self::$loader = $loader = new xrstf_Composer52_ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit8c658c377f50ec1d91d09e0f12dba411', 'loadClassLoader'));
|
25 |
|
26 |
$vendorDir = dirname(dirname(__FILE__));
|
27 |
$baseDir = dirname($vendorDir);
|