Version Description
- Default value for notification sender email
Download this release
Release Info
Developer | codeinwp |
Plugin | Contact Form & SMTP Plugin for WordPress by PirateForms |
Version | 1.0.4 |
Comparing to | |
See all releases |
Code changes from version 1.0.3 to 1.0.4
- inc/settings.php +71 -51
- pirate-forms.php +8 -8
- readme.txt +22 -10
inc/settings.php
CHANGED
@@ -1,4 +1,28 @@
|
|
1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
/*
|
3 |
*
|
4 |
* OPTIONS
|
@@ -50,9 +74,50 @@ function pirate_forms_plugin_options() {
|
|
50 |
$pirate_forms_contactus_email = $zerif_contactus_email;
|
51 |
elseif( !empty($zerif_email) ):
|
52 |
$pirate_forms_contactus_email = $zerif_email;
|
|
|
|
|
53 |
endif;
|
54 |
-
|
55 |
return array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
'first_tab' => array(
|
57 |
'header_fields' => array(
|
58 |
__( 'Fields','pirate-forms' ),
|
@@ -207,51 +272,6 @@ function pirate_forms_plugin_options() {
|
|
207 |
__( 'Thanks, your email was sent successfully!','pirate-forms' )
|
208 |
)
|
209 |
),
|
210 |
-
'fourth_tab' => array(
|
211 |
-
'header_options' => array(
|
212 |
-
__( 'Form processing options','pirate-forms' ),
|
213 |
-
'',
|
214 |
-
'title',
|
215 |
-
'',
|
216 |
-
),
|
217 |
-
'pirateformsopt_email' => array(
|
218 |
-
__( 'Contact notification sender email','pirate-forms' ),
|
219 |
-
__( '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.',
|
220 |
-
'email','pirate-forms' ),
|
221 |
-
'text',
|
222 |
-
$pirate_forms_contactus_email
|
223 |
-
),
|
224 |
-
'pirateformsopt_reply_to_admin' => array(
|
225 |
-
__( 'Use the email address above as notification sender','pirate-forms' ),
|
226 |
-
__( '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.','pirate-forms' ),
|
227 |
-
'checkbox',
|
228 |
-
'',
|
229 |
-
),
|
230 |
-
'pirateformsopt_email_recipients' => array(
|
231 |
-
__( 'Contact submission recipients','pirate-forms' ),
|
232 |
-
__( 'Email address(es) to receive contact submission notifications. You can separate multiple emails with a comma.','pirate-forms' ),
|
233 |
-
'text',
|
234 |
-
pirate_forms_get_key( 'pirateformsopt_email' ) ? pirate_forms_get_key( 'pirateformsopt_email' ) : $pirate_forms_contactus_email
|
235 |
-
),
|
236 |
-
'pirateformsopt_store' => array(
|
237 |
-
__( 'Store submissions in the database','pirate-forms' ),
|
238 |
-
__( 'Should the submissions be stored in the admin area? If chosen, contact form submissions will be saved in Contacts on the left (appears after this option is activated).','pirate-forms' ),
|
239 |
-
'checkbox',
|
240 |
-
'',
|
241 |
-
),
|
242 |
-
'pirateformsopt_blacklist' => array(
|
243 |
-
__( 'Use the comments blacklist to restrict submissions','pirate-forms' ),
|
244 |
-
__( 'Should form submission IP and email addresses be compared against the Comment Blacklist, found in','pirate-forms').'<strong>'.__('wp-admin > Settings > Discussion > Comment Blacklist?','pirate-forms').'</strong>',
|
245 |
-
'checkbox',
|
246 |
-
'yes',
|
247 |
-
),
|
248 |
-
'pirateformsopt_confirm_email' => array(
|
249 |
-
__( 'Send email confirmation to form submitter','pirate-forms' ),
|
250 |
-
__( 'Adding text here will send an email to the form submitter. The email uses the "Text to show when form is submitted..." field below as the subject line. Plain text only here, no HTML.','pirate-forms' ),
|
251 |
-
'text',
|
252 |
-
'',
|
253 |
-
)
|
254 |
-
),
|
255 |
'fifth_tab' => array(
|
256 |
'pirateformsopt_use_smtp' => array(
|
257 |
__( 'Use SMTP to send emails?','pirate-forms' ),
|
@@ -401,10 +421,10 @@ function pirate_forms_admin() {
|
|
401 |
|
402 |
<ul class="pirate-forms-nav-tabs" role="tablist">
|
403 |
<li role="presentation" class="active"><a href="#0" aria-controls="how_to_use" role="tab" data-toggle="tab"><?php esc_html_e( 'How to use','pirate-forms'); ?></a></li>
|
404 |
-
<li role="presentation"><a href="#1" aria-controls="
|
405 |
-
<li role="presentation"><a href="#2" aria-controls="
|
406 |
-
<li role="presentation"><a href="#3" aria-controls="
|
407 |
-
<li role="presentation"><a href="#4" aria-controls="
|
408 |
<li role="presentation"><a href="#5" aria-controls="smtp" role="tab" data-toggle="tab"><?php esc_html_e( 'SMTP','pirate-forms'); ?></a></li>
|
409 |
</ul>
|
410 |
|
@@ -413,7 +433,7 @@ function pirate_forms_admin() {
|
|
413 |
<div id="0" class="pirate-forms-tab-pane active">
|
414 |
|
415 |
<p><?php esc_html_e( 'Welcome to Pirate Forms!','pirate-forms' ); ?><p>
|
416 |
-
<p><?php esc_html_e( 'To get started, just configure all the options you need, hit save and start using the created form.','pirate-forms' ); ?><p>
|
417 |
|
418 |
<hr>
|
419 |
|
1 |
<?php
|
2 |
+
function pirate_forms_is_localhost() {
|
3 |
+
$server_name = strtolower( $_SERVER['SERVER_NAME'] );
|
4 |
+
return in_array( $server_name, array( 'localhost', '127.0.0.1' ) );
|
5 |
+
}
|
6 |
+
function pirate_forms_from_email() {
|
7 |
+
|
8 |
+
$admin_email = get_option( 'admin_email' );
|
9 |
+
$sitename = strtolower( $_SERVER['SERVER_NAME'] );
|
10 |
+
|
11 |
+
if ( pirate_forms_is_localhost() ) {
|
12 |
+
return $admin_email;
|
13 |
+
}
|
14 |
+
|
15 |
+
if ( substr( $sitename, 0, 4 ) == 'www.' ) {
|
16 |
+
$sitename = substr( $sitename, 4 );
|
17 |
+
}
|
18 |
+
|
19 |
+
if ( strpbrk( $admin_email, '@' ) == '@' . $sitename ) {
|
20 |
+
return $admin_email;
|
21 |
+
}
|
22 |
+
|
23 |
+
return 'wordpress@' . $sitename;
|
24 |
+
}
|
25 |
+
|
26 |
/*
|
27 |
*
|
28 |
* OPTIONS
|
74 |
$pirate_forms_contactus_email = $zerif_contactus_email;
|
75 |
elseif( !empty($zerif_email) ):
|
76 |
$pirate_forms_contactus_email = $zerif_email;
|
77 |
+
else:
|
78 |
+
$pirate_forms_contactus_email = get_bloginfo( 'admin_email' );
|
79 |
endif;
|
80 |
+
|
81 |
return array(
|
82 |
+
'fourth_tab' => array(
|
83 |
+
'header_options' => array(
|
84 |
+
__( 'Form processing options','pirate-forms' ),
|
85 |
+
'',
|
86 |
+
'title',
|
87 |
+
'',
|
88 |
+
),
|
89 |
+
'pirateformsopt_email' => array(
|
90 |
+
__( 'Contact notification sender email','pirate-forms' ),
|
91 |
+
__( '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.',
|
92 |
+
'email','pirate-forms' ),
|
93 |
+
'text',
|
94 |
+
pirate_forms_from_email()
|
95 |
+
),
|
96 |
+
'pirateformsopt_email_recipients' => array(
|
97 |
+
__( 'Contact submission recipients','pirate-forms' ),
|
98 |
+
__( 'Email address(es) to receive contact submission notifications. You can separate multiple emails with a comma.','pirate-forms' ),
|
99 |
+
'text',
|
100 |
+
pirate_forms_get_key( 'pirateformsopt_email' ) ? pirate_forms_get_key( 'pirateformsopt_email' ) : $pirate_forms_contactus_email
|
101 |
+
),
|
102 |
+
'pirateformsopt_store' => array(
|
103 |
+
__( 'Store submissions in the database','pirate-forms' ),
|
104 |
+
__( 'Should the submissions be stored in the admin area? If chosen, contact form submissions will be saved in Contacts on the left (appears after this option is activated).','pirate-forms' ),
|
105 |
+
'checkbox',
|
106 |
+
'',
|
107 |
+
),
|
108 |
+
'pirateformsopt_blacklist' => array(
|
109 |
+
__( 'Use the comments blacklist to restrict submissions','pirate-forms' ),
|
110 |
+
__( 'Should form submission IP and email addresses be compared against the Comment Blacklist, found in','pirate-forms').'<strong>'.__('wp-admin > Settings > Discussion > Comment Blacklist?','pirate-forms').'</strong>',
|
111 |
+
'checkbox',
|
112 |
+
'yes',
|
113 |
+
),
|
114 |
+
'pirateformsopt_confirm_email' => array(
|
115 |
+
__( 'Send email confirmation to form submitter','pirate-forms' ),
|
116 |
+
__( 'Adding text here will send an email to the form submitter. The email uses the "Text to show when form is submitted..." field below as the subject line. Plain text only here, no HTML.','pirate-forms' ),
|
117 |
+
'text',
|
118 |
+
'',
|
119 |
+
)
|
120 |
+
),
|
121 |
'first_tab' => array(
|
122 |
'header_fields' => array(
|
123 |
__( 'Fields','pirate-forms' ),
|
272 |
__( 'Thanks, your email was sent successfully!','pirate-forms' )
|
273 |
)
|
274 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
275 |
'fifth_tab' => array(
|
276 |
'pirateformsopt_use_smtp' => array(
|
277 |
__( 'Use SMTP to send emails?','pirate-forms' ),
|
421 |
|
422 |
<ul class="pirate-forms-nav-tabs" role="tablist">
|
423 |
<li role="presentation" class="active"><a href="#0" aria-controls="how_to_use" role="tab" data-toggle="tab"><?php esc_html_e( 'How to use','pirate-forms'); ?></a></li>
|
424 |
+
<li role="presentation"><a href="#1" aria-controls="options" role="tab" data-toggle="tab"><?php esc_html_e( 'Options','pirate-forms'); ?></a></li>
|
425 |
+
<li role="presentation"><a href="#2" aria-controls="fields" role="tab" data-toggle="tab"><?php esc_html_e( 'Fields','pirate-forms'); ?></a></li>
|
426 |
+
<li role="presentation"><a href="#3" aria-controls="labels" role="tab" data-toggle="tab"><?php esc_html_e( 'Labels','pirate-forms'); ?></a></li>
|
427 |
+
<li role="presentation"><a href="#4" aria-controls="messages" role="tab" data-toggle="tab"><?php esc_html_e( 'Messages','pirate-forms'); ?></a></li>
|
428 |
<li role="presentation"><a href="#5" aria-controls="smtp" role="tab" data-toggle="tab"><?php esc_html_e( 'SMTP','pirate-forms'); ?></a></li>
|
429 |
</ul>
|
430 |
|
433 |
<div id="0" class="pirate-forms-tab-pane active">
|
434 |
|
435 |
<p><?php esc_html_e( 'Welcome to Pirate Forms!','pirate-forms' ); ?><p>
|
436 |
+
<p><?php esc_html_e( 'To get started, just ','pirate-forms'); ?><b><?php esc_html_e( 'configure all the options ','pirate-forms'); ?></b><?php esc_html_e( 'you need, hit save and start using the created form.','pirate-forms' ); ?><p>
|
437 |
|
438 |
<hr>
|
439 |
|
pirate-forms.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Plugin Name: Pirate Forms
|
4 |
Plugin URI: http://themeisle.com/plugins/pirate-forms/
|
5 |
Description: Easily creates a nice looking, simple contact form on your WP site.
|
6 |
-
Version: 1.0.
|
7 |
Author: Themeisle
|
8 |
Author URI: http://themeisle.com
|
9 |
Text Domain: pirate-forms
|
@@ -511,13 +511,13 @@ function pirate_forms_process_contact() {
|
|
511 |
}
|
512 |
|
513 |
// Need an email address for the email notification
|
514 |
-
if
|
515 |
$send_from = $site_email;
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
|
522 |
// Sent an email notification to the correct address
|
523 |
$headers = "From: $send_from_name <$send_from>\r\nReply-To: $send_from_name <$send_from>";
|
1 |
<?php
|
2 |
/*
|
3 |
+
Plugin Name: Pirate Forms - Contact form and SMTP Plugin
|
4 |
Plugin URI: http://themeisle.com/plugins/pirate-forms/
|
5 |
Description: Easily creates a nice looking, simple contact form on your WP site.
|
6 |
+
Version: 1.0.4
|
7 |
Author: Themeisle
|
8 |
Author URI: http://themeisle.com
|
9 |
Text Domain: pirate-forms
|
511 |
}
|
512 |
|
513 |
// Need an email address for the email notification
|
514 |
+
if( !empty($site_email) ):
|
515 |
$send_from = $site_email;
|
516 |
+
else:
|
517 |
+
$send_from = pirate_forms_from_email();
|
518 |
+
endif;
|
519 |
+
$send_from_name = $site_name;
|
520 |
+
|
521 |
|
522 |
// Sent an email notification to the correct address
|
523 |
$headers = "From: $send_from_name <$send_from>\r\nReply-To: $send_from_name <$send_from>";
|
readme.txt
CHANGED
@@ -1,16 +1,17 @@
|
|
1 |
-
=== Pirate Forms ===
|
2 |
Contributors: themeisle, codeinwp
|
3 |
-
Tags: contact, contact form, contact form
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 4.3
|
|
|
6 |
License: GPLv2 or later
|
7 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
|
9 |
-
Makes your contact page more engaging by creating a good-looking contact form on your website. The interaction with your visitors was never easier.
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
-
Stay in touch with your visitors very easily. Pirate Forms offers you a great and friendly contact form for your website.
|
14 |
This is an easy-to-use WordPress contact form plugin. To create a contact form you just need to use the [pirate_forms] shortcode or the 'Pirate Forms' widget.
|
15 |
This plugin is a fork of https://wordpress.org/plugins/proper-contact-form/
|
16 |
|
@@ -22,7 +23,7 @@ Pirate Forms is very easy to set up. You can quickly create an engaging contact
|
|
22 |
|
23 |
- It's fully customizable
|
24 |
|
25 |
-
Pirate
|
26 |
|
27 |
- Provides reCaptcha
|
28 |
|
@@ -34,7 +35,7 @@ With the SMTP option, you can be sure you won’t miss any e-mail from your visi
|
|
34 |
|
35 |
- Stores contacts in special databases
|
36 |
|
37 |
-
You can keep all the contacts in an archive by saving their e-mail addresses. Pirate
|
38 |
|
39 |
A simple to use WordPress plugin for creating a contact form using the [pirate_forms] shortcode or the 'Pirate Forms' widget.
|
40 |
|
@@ -48,7 +49,7 @@ Features:
|
|
48 |
|
49 |
== Installation ==
|
50 |
|
51 |
-
Activating the Pirate
|
52 |
|
53 |
1. In your WordPress admin, go to **Plugins > Add New**
|
54 |
2. In the Search field type "pirate forms"
|
@@ -60,7 +61,18 @@ Activating the Pirate Forms plugin is just like any other plugin. If you've uplo
|
|
60 |
|
61 |
== Screenshots ==
|
62 |
|
63 |
-
1. Screenshot 1. How to use in posts/pages
|
64 |
-
2. Screenshot 2. How to customize labels
|
65 |
3. Screenshot 3. How to use reCaptcha
|
66 |
-
4. Screenshot 4. Enabling SMTP
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Pirate Forms - Contact Form and SMTP Plugin ===
|
2 |
Contributors: themeisle, codeinwp
|
3 |
+
Tags: Attachment, cnotact, conact, contact, contact button, contact form, contact form plugin, contact me, contacts, contacts form plugin, contatc, copy, email submit form, email subscription, feedback, feedback form, form, insert the shortcode, message form, post feedback, request, send, send copy, send messages, shortcode, text, web-page feedback,smtp,recaptcha
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 4.3
|
6 |
+
Stable tag: trunk
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
10 |
+
Makes your contact form page more engaging by creating a good-looking contact form on your website. The interaction with your visitors was never easier.
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
+
Stay in touch with your visitors very easily. Pirate Contact Forms offers you a great and friendly contact form for your website.
|
15 |
This is an easy-to-use WordPress contact form plugin. To create a contact form you just need to use the [pirate_forms] shortcode or the 'Pirate Forms' widget.
|
16 |
This plugin is a fork of https://wordpress.org/plugins/proper-contact-form/
|
17 |
|
23 |
|
24 |
- It's fully customizable
|
25 |
|
26 |
+
Pirate Contact Form plugin allows you to customize everything you want. You can change the field labels and decide what message to tell your visitors when an error shows up. You can also decide which fields are required and which are not.
|
27 |
|
28 |
- Provides reCaptcha
|
29 |
|
35 |
|
36 |
- Stores contacts in special databases
|
37 |
|
38 |
+
You can keep all the contacts in an archive by saving their e-mail addresses. Pirate Contact Form allows you to do that by providing contact databases.
|
39 |
|
40 |
A simple to use WordPress plugin for creating a contact form using the [pirate_forms] shortcode or the 'Pirate Forms' widget.
|
41 |
|
49 |
|
50 |
== Installation ==
|
51 |
|
52 |
+
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:
|
53 |
|
54 |
1. In your WordPress admin, go to **Plugins > Add New**
|
55 |
2. In the Search field type "pirate forms"
|
61 |
|
62 |
== Screenshots ==
|
63 |
|
64 |
+
1. Screenshot 1. How to use contact form in posts/pages
|
65 |
+
2. Screenshot 2. How to customize contact form labels
|
66 |
3. Screenshot 3. How to use reCaptcha
|
67 |
+
4. Screenshot 4. Enabling SMTP
|
68 |
+
|
69 |
+
== Changelog ==
|
70 |
+
|
71 |
+
= 1.0.4 =
|
72 |
+
* Default value for notification sender email
|
73 |
+
|
74 |
+
= 1.0.3 =
|
75 |
+
* Spanish translations and layout fixes
|
76 |
+
|
77 |
+
= 1.0.0 =
|
78 |
+
* The first version of the plugin was implemented.
|