From 4dcd45c4bee7b17b707658bc7352ce5a9da14398 Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Tue, 7 Nov 2017 23:01:31 +0530 Subject: [PATCH 001/123] loading resources only when shortcode is being displayed --- public/class-pirateforms-public.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/public/class-pirateforms-public.php b/public/class-pirateforms-public.php index d60dcb8..c295c90 100644 --- a/public/class-pirateforms-public.php +++ b/public/class-pirateforms-public.php @@ -74,7 +74,7 @@ public function change_name( $name ) { public function enqueue_styles_and_scripts() { /* style for frontpage contact */ - wp_enqueue_style( 'pirate_forms_front_styles', PIRATEFORMS_URL . 'public/css/front.css', array(), $this->version ); + wp_register_style( 'pirate_forms_front_styles', PIRATEFORMS_URL . 'public/css/front.css', array(), $this->version ); /* recaptcha js */ $deps = array( 'jquery' ); $pirate_forms_options = get_option( 'pirate_forms_settings_array' ); @@ -85,14 +85,14 @@ public function enqueue_styles_and_scripts() { } else { $pirate_forms_contactus_language = get_locale(); } - wp_enqueue_script( 'recaptcha', 'https://www.google.com/recaptcha/api.js?hl=' . $pirate_forms_contactus_language . '' ); + wp_register_script( 'recaptcha', 'https://www.google.com/recaptcha/api.js?hl=' . $pirate_forms_contactus_language . '' ); $deps[] = 'recaptcha'; endif; endif; - wp_enqueue_script( 'pirate_forms_scripts', PIRATEFORMS_URL . 'public/js/scripts.js', $deps, $this->version ); + wp_register_script( 'pirate_forms_scripts', PIRATEFORMS_URL . 'public/js/scripts.js', $deps, $this->version ); - wp_enqueue_script( 'pirate_forms_scripts_general', PIRATEFORMS_URL . 'public/js/scripts-general.js', array( 'jquery' ), $this->version ); + wp_register_script( 'pirate_forms_scripts_general', PIRATEFORMS_URL . 'public/js/scripts-general.js', array( 'jquery' ), $this->version ); $pirate_forms_errors = ''; if ( ! empty( $_SESSION['pirate_forms_contact_errors'] ) ) : $pirate_forms_errors = $_SESSION['pirate_forms_contact_errors']; @@ -114,6 +114,10 @@ public function enqueue_styles_and_scripts() { * @since 1.0.0 */ public function display_form( $atts, $content = null ) { + wp_enqueue_script( 'pirate_forms_scripts' ); + wp_enqueue_script( 'pirate_forms_scripts_general' ); + wp_enqueue_style( 'pirate_forms_front_styles' ); + PirateForms_Util::session_start(); $atts = shortcode_atts( array( From 49f5dde6bf7cbc138ba5372825e8d6bbfd406ca5 Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Wed, 8 Nov 2017 10:08:44 +0530 Subject: [PATCH 002/123] grunt --- phpcs.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/phpcs.xml b/phpcs.xml index a8f9f0c..208e7c8 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -12,6 +12,8 @@ + + @@ -23,9 +25,11 @@ + + From 7db8f501736175c90f0e22d4a7a1ed8c852ac912 Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Thu, 9 Nov 2017 19:51:56 +0530 Subject: [PATCH 003/123] change error messages so that the type of error is obvious --- public/class-pirateforms-public.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/class-pirateforms-public.php b/public/class-pirateforms-public.php index d60dcb8..5be1734 100644 --- a/public/class-pirateforms-public.php +++ b/public/class-pirateforms-public.php @@ -790,7 +790,7 @@ function validate_spam( $error_key, $pirate_forms_options ) { $captcha = $_POST['g-recaptcha-response']; } if ( ! $captcha ) { - $_SESSION[ $error_key ]['pirate-forms-captcha'] = __( 'Wrong reCAPTCHA', 'pirate-forms' ); + $_SESSION[ $error_key ]['pirate-forms-captcha'] = __( 'Invalid CAPTCHA', 'pirate-forms' ); return false; } @@ -802,7 +802,7 @@ function validate_spam( $error_key, $pirate_forms_options ) { $result = json_decode( $response_body, true ); endif; if ( isset( $result['success'] ) && ( $result['success'] == false ) ) { - $_SESSION[ $error_key ]['pirate-forms-captcha'] = __( 'Wrong reCAPTCHA', 'pirate-forms' ); + $_SESSION[ $error_key ]['pirate-forms-captcha'] = __( 'Incorrect CAPTCHA', 'pirate-forms' ); return false; } From add7877c2218c88dbc990821ba49c59705fbbffa Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Fri, 10 Nov 2017 11:56:17 +0530 Subject: [PATCH 004/123] remove hide/show of recaptcha --- admin/class-pirateforms-admin.php | 4 ++-- public/class-pirateforms-public.php | 2 +- public/css/front.css | 4 ---- public/js/scripts.js | 20 -------------------- 4 files changed, 3 insertions(+), 27 deletions(-) diff --git a/admin/class-pirateforms-admin.php b/admin/class-pirateforms-admin.php index a983e88..d786a2d 100644 --- a/admin/class-pirateforms-admin.php +++ b/admin/class-pirateforms-admin.php @@ -207,7 +207,7 @@ function pirate_forms_plugin_options() { if ( isset( $zerif_contactus_recaptcha_show ) && ( $zerif_contactus_recaptcha_show == '1' ) ) : $pirate_forms_contactus_recaptcha_show = ''; else : - $pirate_forms_contactus_recaptcha_show = 'yes'; + $pirate_forms_contactus_recaptcha_show = 'custom'; endif; $zerif_contactus_button_label = get_theme_mod( 'zerif_contactus_button_label', __( 'Send Message', 'pirate-forms' ) ); if ( ! empty( $zerif_contactus_button_label ) ) : @@ -881,7 +881,7 @@ public function save_callback() { if ( isset( $params['pirateformsopt_email_recipients'] ) ) : $pirate_forms_zerif_lite_mods['zerif_contactus_email'] = $params['pirateformsopt_email_recipients']; endif; - if ( isset( $params['pirateformsopt_recaptcha_field'] ) && ( $params['pirateformsopt_recaptcha_field'] == 'yes' ) ) : + if ( isset( $params['pirateformsopt_recaptcha_field'] ) && ( $params['pirateformsopt_recaptcha_field'] == 'custom' ) ) : $pirate_forms_zerif_lite_mods['zerif_contactus_recaptcha_show'] = 0; else : $pirate_forms_zerif_lite_mods['zerif_contactus_recaptcha_show'] = 1; diff --git a/public/class-pirateforms-public.php b/public/class-pirateforms-public.php index d60dcb8..e445de6 100644 --- a/public/class-pirateforms-public.php +++ b/public/class-pirateforms-public.php @@ -326,7 +326,7 @@ public function display_form( $atts, $content = null ) { $elements[] = array( 'placeholder' => stripslashes( sanitize_text_field( $label ) ), 'type' => 'div', - 'class' => 'g-recaptcha pirate-forms-g-recaptcha', + 'class' => 'g-recaptcha pirate-forms-google-recaptcha', 'custom' => array( 'data-sitekey' => $pirateformsopt_recaptcha_sitekey ), 'id' => 'pirate-forms-captcha', 'wrap' => array( diff --git a/public/css/front.css b/public/css/front.css index 49cc9fe..1b03740 100644 --- a/public/css/front.css +++ b/public/css/front.css @@ -5,10 +5,6 @@ Version: 2.2.3 margin-bottom: 20px; } -.pirate-forms-g-recaptcha { - display: none; -} - .pirate_forms_wrap { float: left; width: 100%; diff --git a/public/js/scripts.js b/public/js/scripts.js index d31f14e..4ed5001 100644 --- a/public/js/scripts.js +++ b/public/js/scripts.js @@ -1,26 +1,6 @@ /* global jQuery */ jQuery(document).ready(function() { - /* show/hide reCaptcha */ - - var thisOpen = false; - jQuery('.pirate_forms .form-control').each(function(){ - if ( jQuery(this).val().length > 0 ){ - thisOpen = true; - jQuery('.zerif-g-recaptcha').css('display','block').delay(1000).css('opacity','1'); - return false; - } - }); - if ( thisOpen === false && (typeof jQuery('.pirate_forms textarea').val() !== 'undefined') && (jQuery('.pirate_forms textarea').val().length > 0) ) { - thisOpen = true; - jQuery('.pirate-forms-g-recaptcha').css('display','block').delay(1000).css('opacity','1'); - } - jQuery('.pirate_forms input, .pirate_forms textarea').focus(function(){ - if ( !jQuery('.pirate-forms-g-recaptcha').hasClass('recaptcha-display') ) { - jQuery('.pirate-forms-g-recaptcha').css('display','block').delay(1000).css('opacity','1'); - } - }); - jQuery('.pirate-forms-file-upload-button').on('click', function () { var $button = jQuery(this); $button.parent().find('input[type=file]').on('change', function(){ From 502735852ba29a4a07dce7188e20eefa01be1aca Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Fri, 10 Nov 2017 12:15:40 +0530 Subject: [PATCH 005/123] grunt --- phpcs.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/phpcs.xml b/phpcs.xml index a8f9f0c..75d95f1 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -12,6 +12,8 @@ + + @@ -26,6 +28,8 @@ + + From 646a76f622cbbd683a5ff6358f30f78be6056be3 Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Mon, 13 Nov 2017 14:09:21 +0530 Subject: [PATCH 006/123] toggle password field --- admin/class-pirateforms-admin.php | 2 +- admin/css/wp-admin.css | 4 ++++ admin/js/scripts-admin.js | 17 ++++++++++++++++- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/admin/class-pirateforms-admin.php b/admin/class-pirateforms-admin.php index a983e88..fe15e2f 100644 --- a/admin/class-pirateforms-admin.php +++ b/admin/class-pirateforms-admin.php @@ -532,7 +532,7 @@ function pirate_forms_plugin_options() { 'value' => PirateForms_Util::get_option( 'pirateformsopt_recaptcha_secretkey' ), 'wrap' => array( 'type' => 'div', - 'class' => 'pirate-forms-grouped pirateformsopt_recaptcha', + 'class' => 'pirate-forms-grouped pirateformsopt_recaptcha pirate-forms-password-toggle', ), ), ) diff --git a/admin/css/wp-admin.css b/admin/css/wp-admin.css index dbc4fa3..628dad2 100644 --- a/admin/css/wp-admin.css +++ b/admin/css/wp-admin.css @@ -368,3 +368,7 @@ input#save.pirate-forms-save-button { margin-right: 10px; margin-left: 5px; } + +.pirate-forms-password-toggle span.dashicons { + cursor: pointer; +} \ No newline at end of file diff --git a/admin/js/scripts-admin.js b/admin/js/scripts-admin.js index a44a44c..8569a46 100644 --- a/admin/js/scripts-admin.js +++ b/admin/js/scripts-admin.js @@ -2,6 +2,10 @@ /* global console */ jQuery(document).ready(function() { + initAll(); +}); + +function initAll(){ jQuery('.pirate-forms-nav-tabs a').click(function (event) { event.preventDefault(); jQuery(this).parent().addClass('active'); @@ -107,4 +111,15 @@ jQuery(document).ready(function() { } }); -}); + jQuery('.pirate-forms-password-toggle').append(''); + jQuery('.pirate-forms-password-toggle span').on('click', function(e){ + var span = jQuery(this); + if(span.hasClass('dashicons-visibility')){ + span.parent().find('input[type="password"]').attr('type', 'text'); + span.removeClass('dashicons-visibility').addClass('dashicons-hidden'); + }else{ + span.parent().find('input[type="text"]').attr('type', 'password'); + span.removeClass('dashicons-hidden').addClass('dashicons-visibility'); + } + }); +} \ No newline at end of file From 4b5ab4369a9d5f4cac2cd78a053091ca0adc0e00 Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Mon, 13 Nov 2017 14:15:31 +0530 Subject: [PATCH 007/123] grunt --- admin/js/scripts-admin.js | 1 + public/class-pirateforms-public.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/admin/js/scripts-admin.js b/admin/js/scripts-admin.js index 8569a46..1a154a6 100644 --- a/admin/js/scripts-admin.js +++ b/admin/js/scripts-admin.js @@ -111,6 +111,7 @@ function initAll(){ } }); + // add visibility toggle to password type fields jQuery('.pirate-forms-password-toggle').append(''); jQuery('.pirate-forms-password-toggle span').on('click', function(e){ var span = jQuery(this); diff --git a/public/class-pirateforms-public.php b/public/class-pirateforms-public.php index c295c90..7178f84 100644 --- a/public/class-pirateforms-public.php +++ b/public/class-pirateforms-public.php @@ -794,7 +794,7 @@ function validate_spam( $error_key, $pirate_forms_options ) { $captcha = $_POST['g-recaptcha-response']; } if ( ! $captcha ) { - $_SESSION[ $error_key ]['pirate-forms-captcha'] = __( 'Wrong reCAPTCHA', 'pirate-forms' ); + $_SESSION[ $error_key ]['pirate-forms-captcha'] = __( 'Invalid CAPTCHA', 'pirate-forms' ); return false; } @@ -806,7 +806,7 @@ function validate_spam( $error_key, $pirate_forms_options ) { $result = json_decode( $response_body, true ); endif; if ( isset( $result['success'] ) && ( $result['success'] == false ) ) { - $_SESSION[ $error_key ]['pirate-forms-captcha'] = __( 'Wrong reCAPTCHA', 'pirate-forms' ); + $_SESSION[ $error_key ]['pirate-forms-captcha'] = __( 'Incorrect CAPTCHA', 'pirate-forms' ); return false; } From 6ff4ccdbf21db38933f22e899bdfad1dc6de0f59 Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Mon, 13 Nov 2017 14:19:20 +0530 Subject: [PATCH 008/123] jshint --- admin/js/scripts-admin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/js/scripts-admin.js b/admin/js/scripts-admin.js index 1a154a6..ef3c1c5 100644 --- a/admin/js/scripts-admin.js +++ b/admin/js/scripts-admin.js @@ -113,7 +113,7 @@ function initAll(){ // add visibility toggle to password type fields jQuery('.pirate-forms-password-toggle').append(''); - jQuery('.pirate-forms-password-toggle span').on('click', function(e){ + jQuery('.pirate-forms-password-toggle span').on('click', function(){ var span = jQuery(this); if(span.hasClass('dashicons-visibility')){ span.parent().find('input[type="password"]').attr('type', 'text'); From b8ad499d94cc9c00393c1bf019d4d06ac0d6c720 Mon Sep 17 00:00:00 2001 From: selu91 Date: Mon, 13 Nov 2017 11:24:08 +0200 Subject: [PATCH 009/123] Bump version. --- .travis.yml | 2 +- includes/class-pirateforms.php | 2 +- package.json | 2 +- pirate-forms.php | 4 ++-- public/css/front.css | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 00b710e..0278caf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ matrix: - php: "5.6" install: true before_script: chmod +x bin/wraith.sh - env: TEST_SUITE=Wraith_Visual_Regression_Testing WRAITH_FAIL=2 + env: TEST_SUITE=Wraith_Visual_Regression_Testing WRAITH_FAIL=3 script: ./bin/wraith.sh - php: '5.3' dist: precise diff --git a/includes/class-pirateforms.php b/includes/class-pirateforms.php index 68670f9..3461dca 100644 --- a/includes/class-pirateforms.php +++ b/includes/class-pirateforms.php @@ -69,7 +69,7 @@ class PirateForms { public function __construct() { $this->plugin_name = 'pirateforms'; - $this->version = '2.2.3'; + $this->version = '2.2.4'; $this->load_dependencies(); $this->set_locale(); diff --git a/package.json b/package.json index 15b9ed3..29405f6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pirate-forms", - "version": "2.2.3", + "version": "2.2.4", "description": "Pirate Forms plugin", "repository": { "type": "git", diff --git a/pirate-forms.php b/pirate-forms.php index a51883f..7741cd4 100644 --- a/pirate-forms.php +++ b/pirate-forms.php @@ -16,7 +16,7 @@ * Plugin Name: Free & Simple Contact Form Plugin - Pirateforms * Plugin URI: http://themeisle.com/plugins/pirate-forms/ * Description: Easily creates a nice looking, simple contact form on your WP site. - * Version: 2.2.3 + * Version: 2.2.4 * Author: Themeisle * Author URI: http://themeisle.com * Text Domain: pirate-forms @@ -36,7 +36,7 @@ define( 'PIRATEFORMS_NAME', 'Pirate Forms' ); define( 'PIRATEFORMS_SLUG', 'pirate-forms' ); define( 'PIRATEFORMS_USELL_LINK', 'https://themeisle.com/plugins/pirate-forms-extended/' ); -define( 'PIRATE_FORMS_VERSION', '2.2.3' ); +define( 'PIRATE_FORMS_VERSION', '2.2.4' ); define( 'PIRATEFORMS_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) ); define( 'PIRATEFORMS_URL', plugin_dir_url( __FILE__ ) ); define( 'PIRATEFORMS_BASENAME', plugin_basename( __FILE__ ) ); diff --git a/public/css/front.css b/public/css/front.css index 1b03740..a74e7cf 100644 --- a/public/css/front.css +++ b/public/css/front.css @@ -1,5 +1,5 @@ /* -Version: 2.2.3 +Version: 2.2.4 */ .pirate_forms_wrap .form_field_wrap { margin-bottom: 20px; From 847af19de227eeba311395092677eaeb209bbd1e Mon Sep 17 00:00:00 2001 From: selu91 Date: Mon, 13 Nov 2017 11:33:31 +0200 Subject: [PATCH 010/123] Added mutiple integrations feature in upsell. --- ...e-forms-extended-mailchimp-integration.jpg | Bin 12530 -> 13349 bytes admin/partials/upsell.php | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/css/pirate-forms-extended-mailchimp-integration.jpg b/admin/css/pirate-forms-extended-mailchimp-integration.jpg index 6b2e8d2d08f36d5a2d7754e94697c16337402bb1..5b3f417bb5ed304c041dc87a67de52eef2aa5a6e 100644 GIT binary patch literal 13349 zcmb7q1yo$iw&1}-Ah^3*9@8|jFbpS&_MqUPhfdK%RmlyE71V{o1a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K zU;>@t|6I=54y|^2;qPtiS?ByUo z=Z<90;B0zK{Tv&F8N-;*oae^IZslE>)xvFcMiS_T6TfBdvO;1la&MDhD9MM0O|@rF;wPthuDqTS|Rp-HQKp`%V#J)s8w%8dt51_2z8FtD3fC6Ilu`FrzMWgs~J zGCqy&m$pgmXOZ{9IS@fz69UsRdek*h6dKCeP0^+*SJKUkXk*K&$kI`Reat2I(Tj%$ zA(SC+HR^`OhJDmdlVZy9vV@!8)-AuBPc+A0#5R_BO}=?&uz{Db?{_wyoP|et+piv* zZ<(hUH<%KxR?2IclV|mLU#2KUy?bW169FCsPK{vJ(PF(7>K-i+_Is&bf#a?+ z&Sf$oR;nGQ%SmhyZ+*3K5+(}c^ZMnMAWUC?rIlIH0H)U=?H{}%x45yEu`kZuOeBj1 zri*HhqV5j5f2>3oOlB`<9@ZwX&$217&j_ zknc-cwMxg+XlsZ)89o5FsSPz93zYPWT(<2Mz2(+9)&3&5*S5y**y4GKuErt;%c7Pt hFfy@6<9pq43g)TSlw^pRH!?IdR4UqF4|*Rf{|l0invDPe diff --git a/admin/partials/upsell.php b/admin/partials/upsell.php index 9702ae7..f6d1acd 100644 --- a/admin/partials/upsell.php +++ b/admin/partials/upsell.php @@ -26,8 +26,8 @@ class="dashicons dashicons-cart"> View features
-

MailChimp Integraton

-

Send your visitors details directly to MailChimp and connect with them via various emailing campaigns. +

Multiple Integratons

+

Send your visitors details directly to MailChimp, GetResponse, Aweber or Sendinblue and connect with them via various emailing campaigns.

From 11f026cd6586fa6d10a58158137fe3d971e3648e Mon Sep 17 00:00:00 2001 From: selu91 Date: Mon, 13 Nov 2017 12:42:40 +0200 Subject: [PATCH 011/123] Added faq builder task. [skip ci] --- Gruntfile.js | 1 + grunt/aliases.yaml | 2 ++ grunt/faq_builder.js | 14 ++++++++++++++ package.json | 3 ++- 4 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 grunt/aliases.yaml create mode 100644 grunt/faq_builder.js diff --git a/Gruntfile.js b/Gruntfile.js index 5a4baea..9b80ea5 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -8,5 +8,6 @@ module.exports = function (grunt) { config = config(); config.files.php.push( '!inc/PhpFormBuilder.php' ); config.files.php.push( '!mailin.php' ); + config.taskMap['faq_builder'] = 'grunt-helpscout-faq'; loader( grunt, config ).init(); }; \ No newline at end of file diff --git a/grunt/aliases.yaml b/grunt/aliases.yaml new file mode 100644 index 0000000..638108d --- /dev/null +++ b/grunt/aliases.yaml @@ -0,0 +1,2 @@ +deploy: + - 'faq_builder' \ No newline at end of file diff --git a/grunt/faq_builder.js b/grunt/faq_builder.js new file mode 100644 index 0000000..8f76be9 --- /dev/null +++ b/grunt/faq_builder.js @@ -0,0 +1,14 @@ +/** + * Faq builder for Grunt + */ +//jshint ignore: start +module.exports = { + options: { + filename: 'readme.txt', + api_key: process.env.DOCS_API, + collection_id: process.env.DOCS_COLLECTION, + category_id: process.env.DOCS_CATEGORY, + template: "= {article_title} = \n [{article_link}]({article_link}) \n\n ", + }, + helpscout: {}, +}; diff --git a/package.json b/package.json index 29405f6..a0a33c0 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,8 @@ "lasttranslator": "Themeisle Translate Team " }, "devDependencies": { - "grunt-plugin-fleet": "codeinwp/grunt-plugin-fleet", + "grunt-helpscout-faq": "~0.1.0", + "grunt-plugin-fleet": "github:codeinwp/grunt-plugin-fleet", "load-project-config": "~0.2.0" }, "wraithSlug": [ From eac968ce8e9d6b904a67bb19c3e37c5eb36f6d10 Mon Sep 17 00:00:00 2001 From: selu91 Date: Mon, 13 Nov 2017 12:44:40 +0200 Subject: [PATCH 012/123] Fix for typo in upsell. [skip ci] --- admin/partials/upsell.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/partials/upsell.php b/admin/partials/upsell.php index f6d1acd..6699eb5 100644 --- a/admin/partials/upsell.php +++ b/admin/partials/upsell.php @@ -26,7 +26,7 @@ class="dashicons dashicons-cart"> View features
-

Multiple Integratons

+

Multiple Integrations

Send your visitors details directly to MailChimp, GetResponse, Aweber or Sendinblue and connect with them via various emailing campaigns.

From 3a0b9a9529233b1448c7a5c93880aeb49995737b Mon Sep 17 00:00:00 2001 From: selul Date: Mon, 13 Nov 2017 12:31:30 +0000 Subject: [PATCH 013/123] [AUTO][skip ci] Updating changelog for v2.2.4 --- CHANGELOG.md | 8 ++++++++ readme.md | 9 +++++++++ readme.txt | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 70 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 636bf05..f643ad5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,12 @@ + ### v2.2.4 - 2017-11-13 + **Changes:** + * Improved assets loading, loading them only they are necessary. +* Remove hide/show effect for reCaptcha. +* Add toggle for password field. +* Add new docs, keeping them in sync with HelpScout . +* Adds more integration with the pro version. + ### v2.2.3 - 2017-10-24 **Changes:** * Improves compatibility with Hestia theme. diff --git a/readme.md b/readme.md index c47ace1..18d2160 100644 --- a/readme.md +++ b/readme.md @@ -134,6 +134,15 @@ Activating the Pirate Contact Form plugin is just like any other plugin. If you' 4. Screenshot 4. Enabling SMTP ## Changelog ## +### 2.2.4 - 2017-11-13 ### + +* Improved assets loading, loading them only they are necessary. +* Remove hide/show effect for reCaptcha. +* Add toggle for password field. +* Add new docs, keeping them in sync with HelpScout . +* Adds more integration with the pro version. + + ### 2.2.3 - 2017-10-24 ### * Improves compatibility with Hestia theme. diff --git a/readme.txt b/readme.txt index c8861f4..54f4b57 100644 --- a/readme.txt +++ b/readme.txt @@ -86,6 +86,7 @@ This plugin started as a fork of https://wordpress.org/plugins/proper-contact-fo == Frequently Asked Questions == + = How I can get support for this contact form plugin ? = You can learn more about PirateForms and ask for help by visiting ThemeIsle website. @@ -113,7 +114,49 @@ You can follow the full documentation [here](http://docs.themeisle.com/article/4 [http://docs.themeisle.com/article/663-what-actions-and-filters-are-available-in-pirate-forms](http://docs.themeisle.com/article/663-what-actions-and-filters-are-available-in-pirate-forms) -== Installation == += Emails are not being sent, what can i do ? = + [http://docs.themeisle.com/article/690-emails-are-not-being-sent-what-can-i-do](http://docs.themeisle.com/article/690-emails-are-not-being-sent-what-can-i-do) + + = Why do I not receive any emails? - Pirate Forms = + [http://docs.themeisle.com/article/729-why-do-i-not-receive-any-emails-pirate-forms](http://docs.themeisle.com/article/729-why-do-i-not-receive-any-emails-pirate-forms) + + = How to add reCaptcha to a form in Pirate Forms = + [http://docs.themeisle.com/article/731-how-to-add-recaptcha-to-a-form-in-pirate-forms](http://docs.themeisle.com/article/731-how-to-add-recaptcha-to-a-form-in-pirate-forms) + + = How to add Dropdown menu in Subject Field in Pirate Forms = + [http://docs.themeisle.com/article/725-how-to-add-dropdown-menu-in-subject-field-in-pirate-forms](http://docs.themeisle.com/article/725-how-to-add-dropdown-menu-in-subject-field-in-pirate-forms) + + = How to save contacts in Mailchimp list in Pirate Forms = + [http://docs.themeisle.com/article/722-pirate-forms-how-to-save-contacts-in-mailchimp-list](http://docs.themeisle.com/article/722-pirate-forms-how-to-save-contacts-in-mailchimp-list) + + = How to create a Form Widget in Pirate Forms = + [http://docs.themeisle.com/article/723-pirate-forms-how-to-create-a-form-widget](http://docs.themeisle.com/article/723-pirate-forms-how-to-create-a-form-widget) + + = How to create a subscription form in Pirate Forms = + [http://docs.themeisle.com/article/721-pirate-forms-how-to-create-a-subscription-form](http://docs.themeisle.com/article/721-pirate-forms-how-to-create-a-subscription-form) + + = How to create multiple forms in Pirate Forms = + [http://docs.themeisle.com/article/730-how-to-create-multiple-forms-in-pirate-forms](http://docs.themeisle.com/article/730-how-to-create-multiple-forms-in-pirate-forms) + + = How to add multiple upload fields in Pirate Forms = + [http://docs.themeisle.com/article/734-how-to-add-multiple-upload-fields-in-pirate-forms](http://docs.themeisle.com/article/734-how-to-add-multiple-upload-fields-in-pirate-forms) + + = How to add a spam trap in a form in Pirate Forms = + [http://docs.themeisle.com/article/732-how-to-add-a-spam-trap-in-a-form-in-pirate-forms](http://docs.themeisle.com/article/732-how-to-add-a-spam-trap-in-a-form-in-pirate-forms) + + = How to change default confirmation email content in Pirate Forms = + [http://docs.themeisle.com/article/724-how-to-change-default-email-content-in-pirate-forms](http://docs.themeisle.com/article/724-how-to-change-default-email-content-in-pirate-forms) + + = How to add checkbox field in Pirate Forms = + [http://docs.themeisle.com/article/733-how-to-add-checkbox-field-in-pirate-forms](http://docs.themeisle.com/article/733-how-to-add-checkbox-field-in-pirate-forms) + + = How can I change HTML of default form in Pirate Forms = + [http://docs.themeisle.com/article/745-how-can-i-change-html-of-default-form-in-pirate-forms](http://docs.themeisle.com/article/745-how-can-i-change-html-of-default-form-in-pirate-forms) + + = How to add attributes to form in Pirate Forms = + [http://docs.themeisle.com/article/752-how-to-add-attributes-to-form-in-pirate-forms](http://docs.themeisle.com/article/752-how-to-add-attributes-to-form-in-pirate-forms) + + == Installation == 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: @@ -134,6 +177,15 @@ Activating the Pirate Contact Form plugin is just like any other plugin. If you' 4. Screenshot 4. Enabling SMTP == Changelog == += 2.2.4 - 2017-11-13 = + +* Improved assets loading, loading them only they are necessary. +* Remove hide/show effect for reCaptcha. +* Add toggle for password field. +* Add new docs, keeping them in sync with HelpScout . +* Adds more integration with the pro version. + + = 2.2.3 - 2017-10-24 = * Improves compatibility with Hestia theme. From e0066a3135b443db207efb5d0e7f70b1c1b31958 Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Tue, 14 Nov 2017 15:01:00 +0530 Subject: [PATCH 014/123] add password toggle to smtp password field --- admin/class-pirateforms-admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/class-pirateforms-admin.php b/admin/class-pirateforms-admin.php index 1a831f3..2be26eb 100644 --- a/admin/class-pirateforms-admin.php +++ b/admin/class-pirateforms-admin.php @@ -808,7 +808,7 @@ function pirate_forms_plugin_options() { 'value' => PirateForms_Util::get_option( 'pirateformsopt_smtp_password' ), 'wrap' => array( 'type' => 'div', - 'class' => 'pirate-forms-grouped', + 'class' => 'pirate-forms-grouped pirate-forms-password-toggle', ), ), ) From 2e46bb0084f0ca77ab059e430345ff43df74c151 Mon Sep 17 00:00:00 2001 From: selu91 Date: Thu, 16 Nov 2017 12:30:35 +0200 Subject: [PATCH 015/123] Bump wordpress version. --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 54f4b57..1844982 100644 --- a/readme.txt +++ b/readme.txt @@ -2,7 +2,7 @@ Contributors: themeisle, codeinwp, rodicaelena, hardeepasrani, pirateforms, rozroz Tags: contact form, contact form plugin, forms, smtp, custom form, subscribe form, feedback form, wordpress contact form Requires at least: 3.0 -Tested up to: 4.8 +Tested up to: 4.9 Stable tag: trunk License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html From 3a9cc25f299e602bfecfba7098b1f5e25f380b0d Mon Sep 17 00:00:00 2001 From: selu91 Date: Thu, 16 Nov 2017 12:38:28 +0200 Subject: [PATCH 016/123] Bump wordpress version. --- Gruntfile.js | 2 +- includes/class-pirateforms.php | 2 +- package.json | 2 +- pirate-forms.php | 4 ++-- public/css/front.css | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 9b80ea5..cfad87e 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -8,6 +8,6 @@ module.exports = function (grunt) { config = config(); config.files.php.push( '!inc/PhpFormBuilder.php' ); config.files.php.push( '!mailin.php' ); - config.taskMap['faq_builder'] = 'grunt-helpscout-faq'; + config.taskMap.faq_builder = 'grunt-helpscout-faq'; loader( grunt, config ).init(); }; \ No newline at end of file diff --git a/includes/class-pirateforms.php b/includes/class-pirateforms.php index 3461dca..ac2ecb0 100644 --- a/includes/class-pirateforms.php +++ b/includes/class-pirateforms.php @@ -69,7 +69,7 @@ class PirateForms { public function __construct() { $this->plugin_name = 'pirateforms'; - $this->version = '2.2.4'; + $this->version = '2.2.5'; $this->load_dependencies(); $this->set_locale(); diff --git a/package.json b/package.json index a0a33c0..b92a893 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pirate-forms", - "version": "2.2.4", + "version": "2.2.5", "description": "Pirate Forms plugin", "repository": { "type": "git", diff --git a/pirate-forms.php b/pirate-forms.php index 7741cd4..7133b99 100644 --- a/pirate-forms.php +++ b/pirate-forms.php @@ -16,7 +16,7 @@ * Plugin Name: Free & Simple Contact Form Plugin - Pirateforms * Plugin URI: http://themeisle.com/plugins/pirate-forms/ * Description: Easily creates a nice looking, simple contact form on your WP site. - * Version: 2.2.4 + * Version: 2.2.5 * Author: Themeisle * Author URI: http://themeisle.com * Text Domain: pirate-forms @@ -36,7 +36,7 @@ define( 'PIRATEFORMS_NAME', 'Pirate Forms' ); define( 'PIRATEFORMS_SLUG', 'pirate-forms' ); define( 'PIRATEFORMS_USELL_LINK', 'https://themeisle.com/plugins/pirate-forms-extended/' ); -define( 'PIRATE_FORMS_VERSION', '2.2.4' ); +define( 'PIRATE_FORMS_VERSION', '2.2.5' ); define( 'PIRATEFORMS_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) ); define( 'PIRATEFORMS_URL', plugin_dir_url( __FILE__ ) ); define( 'PIRATEFORMS_BASENAME', plugin_basename( __FILE__ ) ); diff --git a/public/css/front.css b/public/css/front.css index a74e7cf..1220f26 100644 --- a/public/css/front.css +++ b/public/css/front.css @@ -1,5 +1,5 @@ /* -Version: 2.2.4 +Version: 2.2.5 */ .pirate_forms_wrap .form_field_wrap { margin-bottom: 20px; From 27bb9ea9c921d6e5789d6311321ea15a41a8d125 Mon Sep 17 00:00:00 2001 From: selul Date: Thu, 16 Nov 2017 11:01:25 +0000 Subject: [PATCH 017/123] [AUTO][skip ci] Updating changelog for v2.2.5 --- CHANGELOG.md | 5 +++++ readme.md | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++-- readme.txt | 6 ++++++ 3 files changed, 62 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f643ad5..9f17713 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ + ### v2.2.5 - 2017-11-16 + **Changes:** + * Adds compatibility with WordPress 4.9 +* Minor improvement for toggle the password in the admin form fields. + ### v2.2.4 - 2017-11-13 **Changes:** * Improved assets loading, loading them only they are necessary. diff --git a/readme.md b/readme.md index 18d2160..8991659 100644 --- a/readme.md +++ b/readme.md @@ -2,7 +2,7 @@ **Contributors:** [themeisle](https://profiles.wordpress.org/themeisle), [codeinwp](https://profiles.wordpress.org/codeinwp), [rodicaelena](https://profiles.wordpress.org/rodicaelena), [hardeepasrani](https://profiles.wordpress.org/hardeepasrani), [pirateforms](https://profiles.wordpress.org/pirateforms), [rozroz](https://profiles.wordpress.org/rozroz) **Tags:** contact form, contact form plugin, forms, smtp, custom form, subscribe form, feedback form, wordpress contact form **Requires at least:** 3.0 -**Tested up to:** 4.8 +**Tested up to:** 4.9 **Stable tag:** trunk **License:** GPLv2 or later **License URI:** http://www.gnu.org/licenses/gpl-2.0.html @@ -86,6 +86,7 @@ This plugin started as a fork of https://wordpress.org/plugins/proper-contact-fo ## Frequently Asked Questions ## + ### How I can get support for this contact form plugin ? ### You can learn more about PirateForms and ask for help by visiting ThemeIsle website. @@ -113,7 +114,49 @@ You can follow the full documentation [here](http://docs.themeisle.com/article/4 [http://docs.themeisle.com/article/663-what-actions-and-filters-are-available-in-pirate-forms](http://docs.themeisle.com/article/663-what-actions-and-filters-are-available-in-pirate-forms) -## Installation ## +### Emails are not being sent, what can i do ? ### + [http://docs.themeisle.com/article/690-emails-are-not-being-sent-what-can-i-do](http://docs.themeisle.com/article/690-emails-are-not-being-sent-what-can-i-do) + + = Why do I not receive any emails? - Pirate Forms = + [http://docs.themeisle.com/article/729-why-do-i-not-receive-any-emails-pirate-forms](http://docs.themeisle.com/article/729-why-do-i-not-receive-any-emails-pirate-forms) + + = How to add reCaptcha to a form in Pirate Forms = + [http://docs.themeisle.com/article/731-how-to-add-recaptcha-to-a-form-in-pirate-forms](http://docs.themeisle.com/article/731-how-to-add-recaptcha-to-a-form-in-pirate-forms) + + = How to add Dropdown menu in Subject Field in Pirate Forms = + [http://docs.themeisle.com/article/725-how-to-add-dropdown-menu-in-subject-field-in-pirate-forms](http://docs.themeisle.com/article/725-how-to-add-dropdown-menu-in-subject-field-in-pirate-forms) + + = How to save contacts in Mailchimp list in Pirate Forms = + [http://docs.themeisle.com/article/722-pirate-forms-how-to-save-contacts-in-mailchimp-list](http://docs.themeisle.com/article/722-pirate-forms-how-to-save-contacts-in-mailchimp-list) + + = How to create a Form Widget in Pirate Forms = + [http://docs.themeisle.com/article/723-pirate-forms-how-to-create-a-form-widget](http://docs.themeisle.com/article/723-pirate-forms-how-to-create-a-form-widget) + + = How to create a subscription form in Pirate Forms = + [http://docs.themeisle.com/article/721-pirate-forms-how-to-create-a-subscription-form](http://docs.themeisle.com/article/721-pirate-forms-how-to-create-a-subscription-form) + + = How to create multiple forms in Pirate Forms = + [http://docs.themeisle.com/article/730-how-to-create-multiple-forms-in-pirate-forms](http://docs.themeisle.com/article/730-how-to-create-multiple-forms-in-pirate-forms) + + = How to add multiple upload fields in Pirate Forms = + [http://docs.themeisle.com/article/734-how-to-add-multiple-upload-fields-in-pirate-forms](http://docs.themeisle.com/article/734-how-to-add-multiple-upload-fields-in-pirate-forms) + + = How to add a spam trap in a form in Pirate Forms = + [http://docs.themeisle.com/article/732-how-to-add-a-spam-trap-in-a-form-in-pirate-forms](http://docs.themeisle.com/article/732-how-to-add-a-spam-trap-in-a-form-in-pirate-forms) + + = How to change default confirmation email content in Pirate Forms = + [http://docs.themeisle.com/article/724-how-to-change-default-email-content-in-pirate-forms](http://docs.themeisle.com/article/724-how-to-change-default-email-content-in-pirate-forms) + + = How to add checkbox field in Pirate Forms = + [http://docs.themeisle.com/article/733-how-to-add-checkbox-field-in-pirate-forms](http://docs.themeisle.com/article/733-how-to-add-checkbox-field-in-pirate-forms) + + = How can I change HTML of default form in Pirate Forms = + [http://docs.themeisle.com/article/745-how-can-i-change-html-of-default-form-in-pirate-forms](http://docs.themeisle.com/article/745-how-can-i-change-html-of-default-form-in-pirate-forms) + + = How to add attributes to form in Pirate Forms = + [http://docs.themeisle.com/article/752-how-to-add-attributes-to-form-in-pirate-forms](http://docs.themeisle.com/article/752-how-to-add-attributes-to-form-in-pirate-forms) + + == Installation == 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: @@ -134,6 +177,12 @@ Activating the Pirate Contact Form plugin is just like any other plugin. If you' 4. Screenshot 4. Enabling SMTP ## Changelog ## +### 2.2.5 - 2017-11-16 ### + +* Adds compatibility with WordPress 4.9 +* Minor improvement for toggle the password in the admin form fields. + + ### 2.2.4 - 2017-11-13 ### * Improved assets loading, loading them only they are necessary. diff --git a/readme.txt b/readme.txt index 1844982..6e64a4b 100644 --- a/readme.txt +++ b/readme.txt @@ -177,6 +177,12 @@ Activating the Pirate Contact Form plugin is just like any other plugin. If you' 4. Screenshot 4. Enabling SMTP == Changelog == += 2.2.5 - 2017-11-16 = + +* Adds compatibility with WordPress 4.9 +* Minor improvement for toggle the password in the admin form fields. + + = 2.2.4 - 2017-11-13 = * Improved assets loading, loading them only they are necessary. From c79ffaa81fb466730a3b98d3d4ec11e93db543be Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Mon, 20 Nov 2017 14:08:29 +0530 Subject: [PATCH 018/123] add wysiwyg editor for email #231 --- admin/class-pirateforms-admin.php | 25 ++++++- admin/js/scripts-admin.js | 1 + includes/class-pirateforms-html.php | 14 +++- includes/class-pirateforms-util.php | 110 ++++++++++++++++++++++++++++ includes/class-pirateforms.php | 9 ++- public/class-pirateforms-public.php | 22 ++++-- 6 files changed, 171 insertions(+), 10 deletions(-) diff --git a/admin/class-pirateforms-admin.php b/admin/class-pirateforms-admin.php index 2be26eb..145527f 100644 --- a/admin/class-pirateforms-admin.php +++ b/admin/class-pirateforms-admin.php @@ -538,7 +538,7 @@ function pirate_forms_plugin_options() { ) ), ), - 'pirate_labels' => array( + 'pirate_labels pirate_dashicons' => array( 'heading' => __( 'Fields Labels', 'pirate-forms' ), 'controls' => apply_filters( 'pirate_forms_admin_controls_for_field_labels', array( @@ -607,6 +607,29 @@ function pirate_forms_plugin_options() { 'class' => 'pirate-forms-grouped', ), ), + array( + 'id' => 'pirateformsopt_email_content', + 'type' => 'wysiwyg', + 'label' => array( + 'value' => __( 'Email content', 'pirate-forms' ), + 'html' => '', + 'desc' => array( + 'value' => PirateForms_Util::get_magic_tags(), + 'class' => 'pirate_forms_option_description', + ), + ), + 'default' => PirateForms_Util::get_default_email_content(), + 'value' => PirateForms_Util::get_option( 'pirateformsopt_email_content' ), + 'wrap' => array( + 'type' => 'div', + 'class' => 'pirate-forms-grouped', + ), + 'wysiwyg' => array( + 'quicktags' => false, + 'editor_class' => 'pirate-forms-wysiwyg', + 'editor_height' => 500, + ), + ), ) ), ), diff --git a/admin/js/scripts-admin.js b/admin/js/scripts-admin.js index ef3c1c5..bd19800 100644 --- a/admin/js/scripts-admin.js +++ b/admin/js/scripts-admin.js @@ -17,6 +17,7 @@ function initAll(){ jQuery('.pirate-forms-save-button').click(function (e) { e.preventDefault(); + tinyMCE.triggerSave(); cwpTopUpdateForm(); return false; }); diff --git a/includes/class-pirateforms-html.php b/includes/class-pirateforms-html.php index c3825fe..684b0b5 100644 --- a/includes/class-pirateforms-html.php +++ b/includes/class-pirateforms-html.php @@ -85,7 +85,7 @@ private function get_label( $args ) { if ( isset( $args['label']['desc']['class'] ) ) { $html .= ' class="' . esc_attr( $args['label']['desc']['class'] ) . '"'; } - $html .= '>' . esc_html( $args['label']['desc']['value'] ) . '
'; + $html .= '>' . $args['label']['desc']['value'] . '
'; } $html .= ''; } @@ -374,4 +374,16 @@ private function button( $args ) { return $this->get_wrap( $args, $html ); } + /** + * The WYSIWYG element. + */ + private function wysiwyg( $args ) { + $html = $this->get_label( $args ); + $content = isset( $args['value'] ) && ! empty( $args['value'] ) ? $args['value'] : $args['default']; + ob_start(); + wp_editor( $content, $args['id'], $args['wysiwyg'] ); + $html .= ob_get_clean(); + return $this->get_wrap( $args, $html ); + } + } diff --git a/includes/class-pirateforms-util.php b/includes/class-pirateforms-util.php index 5167249..e1598bc 100644 --- a/includes/class-pirateforms-util.php +++ b/includes/class-pirateforms-util.php @@ -7,6 +7,9 @@ */ class PirateForms_Util { + const MAGIC_TAG_PREFIX = '{'; + const MAGIC_TAG_POSTFIX = '}'; + /** * Return the table. * @@ -228,4 +231,111 @@ public static function save_error( $error_key, $new_error_key ) { unset( $_SESSION[ $error_key ] ); return false; } + + /** + * The default email content. + */ + public static function get_default_email_content( $html = true, $id = null ) { + $body = array(); + $body['heading'] = sprintf( __( 'Contact form submission from %s', 'pirate-forms' ), get_bloginfo( 'name' ) . ' (' . site_url() . ')' ); + $body['body'] = array(); + $pirate_forms_options = PirateForms_Util::get_form_options( $id ); + + $elements = array( 'name', 'email', 'subject', 'message' ); + foreach ( $elements as $k ){ + $display = $pirate_forms_options[ 'pirateformsopt_' . $k . '_field' ]; + if ( empty( $display ) ) { + continue; + } + $val = $pirate_forms_options[ 'pirateformsopt_label_' . $k ]; + if ( empty( $val ) ) { + $val = ucwords( $k ); + } + $body['body'][ $val ] = self::MAGIC_TAG_PREFIX . $k . self::MAGIC_TAG_POSTFIX; + } + $body['body'][ __( 'IP address', 'pirate-forms' ) ] = self::MAGIC_TAG_PREFIX . 'ip' . self::MAGIC_TAG_POSTFIX; + $body['body'][ __( 'IP search', 'pirate-forms' ) ] = 'http://whatismyipaddress.com/ip/' . self::MAGIC_TAG_PREFIX . 'ip' . self::MAGIC_TAG_POSTFIX; + $body['body'][ __( 'Came from', 'pirate-forms' ) ] = self::MAGIC_TAG_PREFIX . 'referer' . self::MAGIC_TAG_POSTFIX; + $body['body'][ __( 'Sent from page', 'pirate-forms' ) ] = self::MAGIC_TAG_PREFIX . 'permalink' . self::MAGIC_TAG_POSTFIX; + + if ( ! empty( $id ) ) { + $fields = self::get_post_meta( $id, 'custom' ); + if ( $fields ) { + foreach ( $fields[0] as $custom ) { + if ( empty( $custom['label'] ) || empty( $custom['display'] ) ) { + continue; + } + // replace . and space with _ (PHP does not like dots in variable names so it automatically converts them to _). + $field = strtolower( str_replace( array( ' ', '.' ), '_', stripslashes( sanitize_text_field( $custom['label'] ) ) ) ); + $body['body'][ stripslashes( $custom['label'] ) ] = self::MAGIC_TAG_PREFIX . stripslashes( $custom['label'] ) . self::MAGIC_TAG_POSTFIX; + } + } + } + + if ( $html ) { + return self::get_table( $body ); + } + + return $body; + } + + /** + * Replace the magic tags with their values. + */ + public static function get_magic_tags( $id = null ) { + $pirate_forms_options = PirateForms_Util::get_form_options( $id ); + + $elements = array( 'name', 'email', 'subject', 'message' ); + foreach ( $elements as $k ){ + $val = $pirate_forms_options[ 'pirateformsopt_label_' . $k ]; + if ( empty( $val ) ) { + $val = ucwords( $k ); + } + $tags[ $k ] = $val; + } + + $tags += array( + 'ip' => __( 'IP address', 'pirate-forms' ), + 'referer' => __( 'Came from', 'pirate-forms' ), + 'permalink' => __( 'Sent from page', 'pirate-forms' ), + ); + if ( ! empty( $id ) ) { + $fields = self::get_post_meta( $id, 'custom' ); + if ( $fields ) { + foreach ( $fields[0] as $custom ) { + if ( empty( $custom['label'] ) ) { + continue; + } + // replace . and space with _ (PHP does not like dots in variable names so it automatically converts them to _). + $field = strtolower( str_replace( array( ' ', '.' ), '_', stripslashes( sanitize_text_field( $custom['label'] ) ) ) ); + $tags[ $field ] = stripslashes( $custom['label'] ); + } + } + } + + $tags = apply_filters( 'pirate_forms_register_magic_tags', $tags ); + $html = ''; + foreach ( $tags as $k => $v ) { + $html .= '' . self::MAGIC_TAG_PREFIX . $k . self::MAGIC_TAG_POSTFIX . ': ' . $v . '
'; + } + return $html; + } + + /** + * Replace the magic tags with their values. + */ + public static function replace_magic_tags( $content, $body ) { + $html = $content; + foreach ( $body['magic_tags'] as $tag => $value ) { + $html = str_replace( self::MAGIC_TAG_PREFIX . $tag . self::MAGIC_TAG_POSTFIX, $value, $html ); + } + + $html = apply_filters( 'pirate_forms_replace_magic_tags', $html, $body['magic_tags'] ); + + // any tags that are left, should be replaced with an empty string. + $html = preg_replace( "/\{.+\}/", "", $html ); + + do_action( 'themeisle_log_event', PIRATEFORMS_NAME, sprintf( 'replace tags in %s with %s to finally give %s', $content, print_r( $body['magic_tags'], true ), $html ), 'debug', __FILE__, __LINE__ ); + return $html; + } } diff --git a/includes/class-pirateforms.php b/includes/class-pirateforms.php index ac2ecb0..914d47f 100644 --- a/includes/class-pirateforms.php +++ b/includes/class-pirateforms.php @@ -129,9 +129,9 @@ private function set_locale() { */ private function define_common_hooks() { $this->loader->add_action( 'init', $this, 'register_content_type', 10 ); + $this->loader->add_filter( 'pirate_forms_version_supports', $this, 'version_supports' ); } - /** * Register all of the hooks related to the admin area functionality * of the plugin. @@ -277,4 +277,11 @@ public function register_content_type() { ); register_post_type( 'pf_contact', $args ); } + + /** + * Return the new features that have been introduced so that the pro plugin can take an action on the basis of that. + */ + public function version_supports( $null = null ) { + return array( 'wysiwyg' ); + } } diff --git a/public/class-pirateforms-public.php b/public/class-pirateforms-public.php index 2a6c28a..ae13786 100644 --- a/public/class-pirateforms-public.php +++ b/public/class-pirateforms-public.php @@ -377,7 +377,7 @@ public function display_form( $atts, $content = null ) { if ( ! empty( $_SERVER['HTTP_REFERER'] ) ) { $elements[] = array( 'type' => 'hidden', - 'id' => 'contact-referrer', + 'id' => 'pirate-forms-contact-referrer', 'value' => $_SERVER['HTTP_REFERER'], ); } @@ -544,6 +544,9 @@ public function send_email( $test = false ) { $body = array(); $body['heading'] = sprintf( __( 'Contact form submission from %s', 'pirate-forms' ), get_bloginfo( 'name' ) . ' (' . site_url() . ')' ); $body['body'] = array(); + // lets collect the values for ALL potential magic tags in the form $tag_name => $tag_value e.g. 'name' => 'some name'. + // the tag name should be without the curly braces. + $body['magic_tags'] = array(); list( $pirate_forms_contact_email, $pirate_forms_contact_name, $pirate_forms_contact_subject, $msg ) = $this->validate_request( $error_key, $pirate_forms_options, $body ); @@ -568,15 +571,20 @@ public function send_email( $test = false ) { if ( ! empty( $contact_ip ) ) { $body['body'][ __( 'IP address', 'pirate-forms' ) ] = $contact_ip; $body['body'][ __( 'IP search', 'pirate-forms' ) ] = "http://whatismyipaddress.com/ip/$contact_ip"; + $body['magic_tags'] += array( 'ip' => $contact_ip ); } // Sanitize and prepare referrer; if ( ! empty( $_POST['pirate-forms-contact-referrer'] ) ) { - $body['body'][ __( 'Came from', 'pirate-forms' ) ] = sanitize_text_field( $_POST['pirate-forms-contact-referrer'] ); + $page = sanitize_text_field( $_POST['pirate-forms-contact-referrer'] ); + $body['body'][ __( 'Came from', 'pirate-forms' ) ] = $page; + $body['magic_tags'] += array( 'referer' => $page ); } // Show the page this contact form was submitted on - $body['body'][ __( 'Sent from page', 'pirate-forms' ) ] = get_permalink( get_the_id() ); + $permalink = get_permalink( get_the_id() ); + $body['body'][ __( 'Sent from page', 'pirate-forms' ) ] = $permalink; + $body['magic_tags'] += array( 'permalink' => $permalink ); // Check the blacklist $blocked = PirateForms_Util::is_blacklisted( $error_key, $pirate_forms_contact_email, $contact_ip ); @@ -636,10 +644,8 @@ public function send_email( $test = false ) { $subject = $pirate_forms_contact_subject; } - $mail_body = apply_filters( 'pirate_forms_get_mail_body', $body ); - if ( is_array( $mail_body ) ) { - $mail_body = PirateForms_Util::get_table( $mail_body ); - } + $mail_body = ! empty( $pirate_forms_options['pirateformsopt_email_content'] ) ? $pirate_forms_options['pirateformsopt_email_content'] : PirateForms_Util::get_default_email_content( true, $form_id ); + $mail_body = PirateForms_Util::replace_magic_tags( $mail_body, $body ); do_action( 'pirate_forms_before_sending', $pirate_forms_contact_email, $site_recipients, $subject, $mail_body, $headers, $attachments ); do_action( 'themeisle_log_event', PIRATEFORMS_NAME, sprintf( 'before sending email to = %s, subject = %s, body = %s, headers = %s, attachments = %s', $site_recipients, $subject, $mail_body, $headers, print_r( $attachments, true ) ), 'debug', __FILE__, __LINE__ ); @@ -839,6 +845,7 @@ function validate_request( $error_key, $pirate_forms_options, &$body ) { foreach ( $fields as $field ) { $value = isset( $_POST[ 'pirate-forms-contact-' . $field ] ) ? sanitize_text_field( trim( $_POST[ 'pirate-forms-contact-' . $field ] ) ) : ''; + $body['magic_tags'] += array( $field => $value ); if ( 'req' === $pirate_forms_options[ 'pirateformsopt_' . $field . '_field' ] && empty( $value ) ) { $_SESSION[ $error_key ][ 'pirate-forms-contact-' . $field ] = $pirate_forms_options[ 'pirateformsopt_label_err_' . $field ]; } elseif ( ! empty( $value ) ) { @@ -982,6 +989,7 @@ function get_attachments( $error_key, $pirate_forms_options, &$body ) { $files[] = basename( $file ); } $body['body'][ __( 'Attachment', 'pirate-forms' ) ] = implode( ',', $files ); + $body['magic_tags'] += array( 'attachments' => implode( ',', $files ) ); } do_action( 'themeisle_log_event', PIRATEFORMS_NAME, sprintf( 'finally attaching attachment(s): %s', print_r( $attachments, true ) ), 'info', __FILE__, __LINE__ ); From d23337cca017c9c94d7cd5d1d1ae9d861b7787e5 Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Mon, 20 Nov 2017 14:19:34 +0530 Subject: [PATCH 019/123] grunt --- admin/class-pirateforms-admin.php | 10 ++--- includes/class-pirateforms-html.php | 2 +- includes/class-pirateforms-util.php | 60 ++++++++++++++--------------- public/class-pirateforms-public.php | 6 +-- 4 files changed, 39 insertions(+), 39 deletions(-) diff --git a/admin/class-pirateforms-admin.php b/admin/class-pirateforms-admin.php index 145527f..32a3c50 100644 --- a/admin/class-pirateforms-admin.php +++ b/admin/class-pirateforms-admin.php @@ -538,7 +538,7 @@ function pirate_forms_plugin_options() { ) ), ), - 'pirate_labels pirate_dashicons' => array( + 'pirate_labels pirate_dashicons' => array( 'heading' => __( 'Fields Labels', 'pirate-forms' ), 'controls' => apply_filters( 'pirate_forms_admin_controls_for_field_labels', array( @@ -624,10 +624,10 @@ function pirate_forms_plugin_options() { 'type' => 'div', 'class' => 'pirate-forms-grouped', ), - 'wysiwyg' => array( - 'quicktags' => false, - 'editor_class' => 'pirate-forms-wysiwyg', - 'editor_height' => 500, + 'wysiwyg' => array( + 'quicktags' => false, + 'editor_class' => 'pirate-forms-wysiwyg', + 'editor_height' => 500, ), ), ) diff --git a/includes/class-pirateforms-html.php b/includes/class-pirateforms-html.php index 684b0b5..3b7d1b3 100644 --- a/includes/class-pirateforms-html.php +++ b/includes/class-pirateforms-html.php @@ -379,7 +379,7 @@ private function button( $args ) { */ private function wysiwyg( $args ) { $html = $this->get_label( $args ); - $content = isset( $args['value'] ) && ! empty( $args['value'] ) ? $args['value'] : $args['default']; + $content = isset( $args['value'] ) && ! empty( $args['value'] ) ? $args['value'] : $args['default']; ob_start(); wp_editor( $content, $args['id'], $args['wysiwyg'] ); $html .= ob_get_clean(); diff --git a/includes/class-pirateforms-util.php b/includes/class-pirateforms-util.php index e1598bc..09a50e6 100644 --- a/includes/class-pirateforms-util.php +++ b/includes/class-pirateforms-util.php @@ -7,8 +7,8 @@ */ class PirateForms_Util { - const MAGIC_TAG_PREFIX = '{'; - const MAGIC_TAG_POSTFIX = '}'; + const MAGIC_TAG_PREFIX = '{'; + const MAGIC_TAG_POSTFIX = '}'; /** * Return the table. @@ -236,30 +236,30 @@ public static function save_error( $error_key, $new_error_key ) { * The default email content. */ public static function get_default_email_content( $html = true, $id = null ) { - $body = array(); - $body['heading'] = sprintf( __( 'Contact form submission from %s', 'pirate-forms' ), get_bloginfo( 'name' ) . ' (' . site_url() . ')' ); - $body['body'] = array(); + $body = array(); + $body['heading'] = sprintf( __( 'Contact form submission from %s', 'pirate-forms' ), get_bloginfo( 'name' ) . ' (' . site_url() . ')' ); + $body['body'] = array(); $pirate_forms_options = PirateForms_Util::get_form_options( $id ); - $elements = array( 'name', 'email', 'subject', 'message' ); - foreach ( $elements as $k ){ - $display = $pirate_forms_options[ 'pirateformsopt_' . $k . '_field' ]; + $elements = array( 'name', 'email', 'subject', 'message' ); + foreach ( $elements as $k ) { + $display = $pirate_forms_options[ 'pirateformsopt_' . $k . '_field' ]; if ( empty( $display ) ) { continue; } - $val = $pirate_forms_options[ 'pirateformsopt_label_' . $k ]; + $val = $pirate_forms_options[ 'pirateformsopt_label_' . $k ]; if ( empty( $val ) ) { - $val = ucwords( $k ); + $val = ucwords( $k ); } $body['body'][ $val ] = self::MAGIC_TAG_PREFIX . $k . self::MAGIC_TAG_POSTFIX; } $body['body'][ __( 'IP address', 'pirate-forms' ) ] = self::MAGIC_TAG_PREFIX . 'ip' . self::MAGIC_TAG_POSTFIX; $body['body'][ __( 'IP search', 'pirate-forms' ) ] = 'http://whatismyipaddress.com/ip/' . self::MAGIC_TAG_PREFIX . 'ip' . self::MAGIC_TAG_POSTFIX; - $body['body'][ __( 'Came from', 'pirate-forms' ) ] = self::MAGIC_TAG_PREFIX . 'referer' . self::MAGIC_TAG_POSTFIX; + $body['body'][ __( 'Came from', 'pirate-forms' ) ] = self::MAGIC_TAG_PREFIX . 'referer' . self::MAGIC_TAG_POSTFIX; $body['body'][ __( 'Sent from page', 'pirate-forms' ) ] = self::MAGIC_TAG_PREFIX . 'permalink' . self::MAGIC_TAG_POSTFIX; if ( ! empty( $id ) ) { - $fields = self::get_post_meta( $id, 'custom' ); + $fields = self::get_post_meta( $id, 'custom' ); if ( $fields ) { foreach ( $fields[0] as $custom ) { if ( empty( $custom['label'] ) || empty( $custom['display'] ) ) { @@ -285,22 +285,22 @@ public static function get_default_email_content( $html = true, $id = null ) { public static function get_magic_tags( $id = null ) { $pirate_forms_options = PirateForms_Util::get_form_options( $id ); - $elements = array( 'name', 'email', 'subject', 'message' ); - foreach ( $elements as $k ){ - $val = $pirate_forms_options[ 'pirateformsopt_label_' . $k ]; + $elements = array( 'name', 'email', 'subject', 'message' ); + foreach ( $elements as $k ) { + $val = $pirate_forms_options[ 'pirateformsopt_label_' . $k ]; if ( empty( $val ) ) { - $val = ucwords( $k ); + $val = ucwords( $k ); } - $tags[ $k ] = $val; + $tags[ $k ] = $val; } - $tags += array( - 'ip' => __( 'IP address', 'pirate-forms' ), - 'referer' => __( 'Came from', 'pirate-forms' ), - 'permalink' => __( 'Sent from page', 'pirate-forms' ), + $tags += array( + 'ip' => __( 'IP address', 'pirate-forms' ), + 'referer' => __( 'Came from', 'pirate-forms' ), + 'permalink' => __( 'Sent from page', 'pirate-forms' ), ); if ( ! empty( $id ) ) { - $fields = self::get_post_meta( $id, 'custom' ); + $fields = self::get_post_meta( $id, 'custom' ); if ( $fields ) { foreach ( $fields[0] as $custom ) { if ( empty( $custom['label'] ) ) { @@ -308,15 +308,15 @@ public static function get_magic_tags( $id = null ) { } // replace . and space with _ (PHP does not like dots in variable names so it automatically converts them to _). $field = strtolower( str_replace( array( ' ', '.' ), '_', stripslashes( sanitize_text_field( $custom['label'] ) ) ) ); - $tags[ $field ] = stripslashes( $custom['label'] ); + $tags[ $field ] = stripslashes( $custom['label'] ); } } } - $tags = apply_filters( 'pirate_forms_register_magic_tags', $tags ); - $html = ''; + $tags = apply_filters( 'pirate_forms_register_magic_tags', $tags ); + $html = ''; foreach ( $tags as $k => $v ) { - $html .= '' . self::MAGIC_TAG_PREFIX . $k . self::MAGIC_TAG_POSTFIX . ': ' . $v . '
'; + $html .= '' . self::MAGIC_TAG_PREFIX . $k . self::MAGIC_TAG_POSTFIX . ': ' . $v . '
'; } return $html; } @@ -325,15 +325,15 @@ public static function get_magic_tags( $id = null ) { * Replace the magic tags with their values. */ public static function replace_magic_tags( $content, $body ) { - $html = $content; + $html = $content; foreach ( $body['magic_tags'] as $tag => $value ) { - $html = str_replace( self::MAGIC_TAG_PREFIX . $tag . self::MAGIC_TAG_POSTFIX, $value, $html ); + $html = str_replace( self::MAGIC_TAG_PREFIX . $tag . self::MAGIC_TAG_POSTFIX, $value, $html ); } - $html = apply_filters( 'pirate_forms_replace_magic_tags', $html, $body['magic_tags'] ); + $html = apply_filters( 'pirate_forms_replace_magic_tags', $html, $body['magic_tags'] ); // any tags that are left, should be replaced with an empty string. - $html = preg_replace( "/\{.+\}/", "", $html ); + $html = preg_replace( '/\{.+\}/', '', $html ); do_action( 'themeisle_log_event', PIRATEFORMS_NAME, sprintf( 'replace tags in %s with %s to finally give %s', $content, print_r( $body['magic_tags'], true ), $html ), 'debug', __FILE__, __LINE__ ); return $html; diff --git a/public/class-pirateforms-public.php b/public/class-pirateforms-public.php index ae13786..8e991f6 100644 --- a/public/class-pirateforms-public.php +++ b/public/class-pirateforms-public.php @@ -576,13 +576,13 @@ public function send_email( $test = false ) { // Sanitize and prepare referrer; if ( ! empty( $_POST['pirate-forms-contact-referrer'] ) ) { - $page = sanitize_text_field( $_POST['pirate-forms-contact-referrer'] ); - $body['body'][ __( 'Came from', 'pirate-forms' ) ] = $page; + $page = sanitize_text_field( $_POST['pirate-forms-contact-referrer'] ); + $body['body'][ __( 'Came from', 'pirate-forms' ) ] = $page; $body['magic_tags'] += array( 'referer' => $page ); } // Show the page this contact form was submitted on - $permalink = get_permalink( get_the_id() ); + $permalink = get_permalink( get_the_id() ); $body['body'][ __( 'Sent from page', 'pirate-forms' ) ] = $permalink; $body['magic_tags'] += array( 'permalink' => $permalink ); From 702b44a47e3e6688c4ad1b6c0fbfdc42af40906e Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Mon, 20 Nov 2017 14:49:00 +0530 Subject: [PATCH 020/123] support templates --- tests/test-pirate-forms.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test-pirate-forms.php b/tests/test-pirate-forms.php index 1cb05ae..3e73957 100644 --- a/tests/test-pirate-forms.php +++ b/tests/test-pirate-forms.php @@ -28,6 +28,7 @@ public function test_wp_mail() { $settings['pirateformsopt_nonce'] = 'no'; $settings['pirateformsopt_recaptcha_field'] = 'no'; $settings['pirateformsopt_store'] = 'yes'; + $settings['pirateformsopt_email_content'] = '

Contact form submission from Test Blog (http://example.org)

Your Name:{name}
Your Email:{email}
Subject:{subject}
Your message:{message}
IP address:{ip}
IP search:http://whatismyipaddress.com/ip/{ip}
Sent from page:{permalink}
'; PirateForms_Util::set_option( $settings ); @@ -78,7 +79,8 @@ public function test_smtp( $host, $port, $user, $pass, $auth) { $settings['pirateformsopt_use_smtp_authentication'] = $auth ? 'yes' : 'no'; $settings['pirateformsopt_smtp_username'] = $user; $settings['pirateformsopt_smtp_password'] = $pass; - + $settings['pirateformsopt_email_content'] = '

Contact form submission from Test Blog (http://example.org)

Your Name:{name}
Your Email:{email}
Subject:{subject}
Your message:{message}
IP address:{ip}
IP search:http://whatismyipaddress.com/ip/{ip}
Sent from page:{permalink}
'; + $this->smpt_data = array( 'host' => $host, 'port' => $port, 'user' => $user, 'pass' => $pass, 'auth' => $auth ); PirateForms_Util::set_option( $settings ); From c5d03123b45255452451d345bbbe070f7ac7d1b0 Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Mon, 20 Nov 2017 14:59:01 +0530 Subject: [PATCH 021/123] jshint --- admin/js/scripts-admin.js | 1 + 1 file changed, 1 insertion(+) diff --git a/admin/js/scripts-admin.js b/admin/js/scripts-admin.js index bd19800..6a77f7e 100644 --- a/admin/js/scripts-admin.js +++ b/admin/js/scripts-admin.js @@ -1,5 +1,6 @@ /* global cwp_top_ajaxload */ /* global console */ +/* global tinyMCE */ jQuery(document).ready(function() { initAll(); From 739f328ddc9cec0e9ade0e4fbf8c631a19ee2ade Mon Sep 17 00:00:00 2001 From: Bogdan Date: Wed, 22 Nov 2017 16:01:07 +0200 Subject: [PATCH 022/123] #236 Fixed issue with name field --- public/class-pirateforms-public.php | 2 +- public/css/front.css | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/public/class-pirateforms-public.php b/public/class-pirateforms-public.php index 2a6c28a..b406028 100644 --- a/public/class-pirateforms-public.php +++ b/public/class-pirateforms-public.php @@ -367,7 +367,7 @@ public function display_form( $atts, $content = null ) { 'class' => 'pirate-forms-submit-button btn btn-primary', 'wrap' => array( 'type' => 'div', - 'class' => implode( ' ', apply_filters( 'pirateform_wrap_classes_submit', array( 'col-xs-12 col-sm-6 form_field_wrap contact_submit_wrap' ) ) ), + 'class' => implode( ' ', apply_filters( 'pirateform_wrap_classes_submit', array( 'col-xs-12 form_field_wrap contact_submit_wrap' ) ) ), ), 'value' => $pirateformsopt_label_submit_btn, ); diff --git a/public/css/front.css b/public/css/front.css index 1220f26..cd9c3b9 100644 --- a/public/css/front.css +++ b/public/css/front.css @@ -6,7 +6,6 @@ Version: 2.2.5 } .pirate_forms_wrap { - float: left; width: 100%; } From dab4bc0ec873ef73ac878bf1aa776501e5ae1f48 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Wed, 22 Nov 2017 17:30:03 +0200 Subject: [PATCH 023/123] #236 Added margin on spam trap text --- public/css/front.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/css/front.css b/public/css/front.css index cd9c3b9..520fdbe 100644 --- a/public/css/front.css +++ b/public/css/front.css @@ -89,3 +89,7 @@ Version: 2.2.5 -webkit-transition: all 0.2s ease-in; transition: all 0.2s ease-in; } + +.pirate-forms-maps-custom span { + margin-left: 10px; +} \ No newline at end of file From 4ec6dd29dfd2f769c9a14df40712265d66e39107 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Wed, 22 Nov 2017 17:30:58 +0200 Subject: [PATCH 024/123] #236 Added margin on spam trap text 2 --- public/css/front.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/css/front.css b/public/css/front.css index 520fdbe..69649bf 100644 --- a/public/css/front.css +++ b/public/css/front.css @@ -91,5 +91,5 @@ Version: 2.2.5 } .pirate-forms-maps-custom span { - margin-left: 10px; + margin-left: 5px; } \ No newline at end of file From 5b9e17180239204c1cc7c74131041ad631848104 Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Thu, 23 Nov 2017 19:43:47 +0530 Subject: [PATCH 025/123] spam try should be no by default --- admin/class-pirateforms-admin.php | 94 +++++++++++++++++-------------- 1 file changed, 53 insertions(+), 41 deletions(-) diff --git a/admin/class-pirateforms-admin.php b/admin/class-pirateforms-admin.php index 2be26eb..101400a 100644 --- a/admin/class-pirateforms-admin.php +++ b/admin/class-pirateforms-admin.php @@ -177,10 +177,53 @@ public function render_upsell() { function settings() { global $current_user; $pirate_forms_options = PirateForms_Util::get_option(); - $plugin_options = $this->pirate_forms_plugin_options(); + $plugin_options = $this->get_plugin_options(); include_once PIRATEFORMS_DIR . 'admin/partials/pirateforms-settings-display.php'; } + /** + * Get any options that might be configured through the theme. + */ + function get_theme_options() { + $recaptcha_show = ''; + $button_label = __( 'Send Message', 'pirate-forms' ); + $email = ''; + + $theme = strtolower( wp_get_theme()->__get('name') ); + + // Default values from Zerif Lite. + if ( strpos( $theme, 'zerif' ) === 0 ) { + $zerif_contactus_recaptcha_show = get_theme_mod( 'zerif_contactus_recaptcha_show' ); + if ( isset( $zerif_contactus_recaptcha_show ) && ( $zerif_contactus_recaptcha_show == '1' ) ) { + $recaptcha_show = ''; + } else { + $recaptcha_show = 'custom'; + } + + $zerif_contactus_button_label = get_theme_mod( 'zerif_contactus_button_label', __( 'Send Message', 'pirate-forms' ) ); + if ( ! empty( $zerif_contactus_button_label ) ) { + $button_label = $zerif_contactus_button_label; + } + + $zerif_contactus_email = get_theme_mod( 'zerif_contactus_email' ); + $zerif_email = get_theme_mod( 'zerif_email' ); + if ( ! empty( $zerif_contactus_email ) ) { + $email = $zerif_contactus_email; + } elseif ( ! empty( $zerif_email ) ) { + $email = $zerif_email; + } else { + $email = get_bloginfo( 'admin_email' ); + } + } + + return array( + $recaptcha_show, + $button_label, + $email, + ); + } + + /** * * OPTIONS @@ -188,43 +231,14 @@ function settings() { * @since 1.0.0 * name; id; desc; type; default; options */ - function pirate_forms_plugin_options() { - /** - ********** Default values from Zerif Lite */ - $zerif_contactus_sitekey = get_theme_mod( 'zerif_contactus_sitekey' ); - if ( ! empty( $zerif_contactus_sitekey ) ) : - $pirate_forms_contactus_sitekey = $zerif_contactus_sitekey; - else : - $pirate_forms_contactus_sitekey = ''; - endif; - $zerif_contactus_secretkey = get_theme_mod( 'zerif_contactus_secretkey' ); - if ( ! empty( $zerif_contactus_secretkey ) ) : - $pirate_forms_contactus_secretkey = $zerif_contactus_secretkey; - else : - $pirate_forms_contactus_secretkey = ''; - endif; - $zerif_contactus_recaptcha_show = get_theme_mod( 'zerif_contactus_recaptcha_show' ); - if ( isset( $zerif_contactus_recaptcha_show ) && ( $zerif_contactus_recaptcha_show == '1' ) ) : - $pirate_forms_contactus_recaptcha_show = ''; - else : - $pirate_forms_contactus_recaptcha_show = 'custom'; - endif; - $zerif_contactus_button_label = get_theme_mod( 'zerif_contactus_button_label', __( 'Send Message', 'pirate-forms' ) ); - if ( ! empty( $zerif_contactus_button_label ) ) : - $pirate_forms_contactus_button_label = $zerif_contactus_button_label; - else : - $pirate_forms_contactus_button_label = __( 'Send Message', 'pirate-forms' ); - endif; - $zerif_contactus_email = get_theme_mod( 'zerif_contactus_email' ); - $zerif_email = get_theme_mod( 'zerif_email' ); - $pirate_forms_contactus_email = ''; - if ( ! empty( $zerif_contactus_email ) ) : - $pirate_forms_contactus_email = $zerif_contactus_email; - elseif ( ! empty( $zerif_email ) ) : - $pirate_forms_contactus_email = $zerif_email; - else : - $pirate_forms_contactus_email = get_bloginfo( 'admin_email' ); - endif; + function get_plugin_options() { + list( + $pirate_forms_contactus_recaptcha_show, + $pirate_forms_contactus_button_label, + $pirate_forms_contactus_email + ) = $this->get_theme_options(); + +error_log("pirate_forms_contactus_recaptcha_show = $pirate_forms_contactus_recaptcha_show"); // check if akismet is installed $akismet_status = false; @@ -514,7 +528,6 @@ function pirate_forms_plugin_options() { 'class' => 'pirate_forms_option_description', ), ), - 'default' => $pirate_forms_contactus_sitekey, 'value' => PirateForms_Util::get_option( 'pirateformsopt_recaptcha_sitekey' ), 'wrap' => array( 'type' => 'div', @@ -528,7 +541,6 @@ function pirate_forms_plugin_options() { 'label' => array( 'value' => __( 'Secret key', 'pirate-forms' ), ), - 'default' => $pirate_forms_contactus_secretkey, 'value' => PirateForms_Util::get_option( 'pirateformsopt_recaptcha_secretkey' ), 'wrap' => array( 'type' => 'div', @@ -823,7 +835,7 @@ function pirate_forms_plugin_options() { public function settings_init() { if ( ! PirateForms_Util::get_option() ) { $new_opt = array(); - foreach ( $this->pirate_forms_plugin_options() as $tab => $array ) { + foreach ( $this->get_plugin_options() as $tab => $array ) { foreach ( $array['controls'] as $controls ) { $new_opt[ $controls['id'] ] = isset( $controls['default'] ) ? $controls['default'] : ''; } From b9ea0fc32ec9726243e11222f658ebebce6334ed Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Thu, 23 Nov 2017 21:45:39 +0530 Subject: [PATCH 026/123] grunt --- admin/class-pirateforms-admin.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/admin/class-pirateforms-admin.php b/admin/class-pirateforms-admin.php index 101400a..c2e2b84 100644 --- a/admin/class-pirateforms-admin.php +++ b/admin/class-pirateforms-admin.php @@ -185,11 +185,11 @@ function settings() { * Get any options that might be configured through the theme. */ function get_theme_options() { - $recaptcha_show = ''; - $button_label = __( 'Send Message', 'pirate-forms' ); - $email = ''; + $recaptcha_show = ''; + $button_label = __( 'Send Message', 'pirate-forms' ); + $email = ''; - $theme = strtolower( wp_get_theme()->__get('name') ); + $theme = strtolower( wp_get_theme()->__get( 'name' ) ); // Default values from Zerif Lite. if ( strpos( $theme, 'zerif' ) === 0 ) { @@ -204,7 +204,7 @@ function get_theme_options() { if ( ! empty( $zerif_contactus_button_label ) ) { $button_label = $zerif_contactus_button_label; } - + $zerif_contactus_email = get_theme_mod( 'zerif_contactus_email' ); $zerif_email = get_theme_mod( 'zerif_email' ); if ( ! empty( $zerif_contactus_email ) ) { @@ -238,8 +238,6 @@ function get_plugin_options() { $pirate_forms_contactus_email ) = $this->get_theme_options(); -error_log("pirate_forms_contactus_recaptcha_show = $pirate_forms_contactus_recaptcha_show"); - // check if akismet is installed $akismet_status = false; if ( is_plugin_active( 'akismet/akismet.php' ) ) { From dee6a3a41a952c070a5cb26d7c1f1b6151fab450 Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Thu, 23 Nov 2017 22:07:19 +0530 Subject: [PATCH 027/123] set default recipients --- admin/class-pirateforms-admin.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/admin/class-pirateforms-admin.php b/admin/class-pirateforms-admin.php index c2e2b84..33af9d3 100644 --- a/admin/class-pirateforms-admin.php +++ b/admin/class-pirateforms-admin.php @@ -187,7 +187,7 @@ function settings() { function get_theme_options() { $recaptcha_show = ''; $button_label = __( 'Send Message', 'pirate-forms' ); - $email = ''; + $email = get_bloginfo( 'admin_email' ); $theme = strtolower( wp_get_theme()->__get( 'name' ) ); @@ -211,8 +211,6 @@ function get_theme_options() { $email = $zerif_contactus_email; } elseif ( ! empty( $zerif_email ) ) { $email = $zerif_email; - } else { - $email = get_bloginfo( 'admin_email' ); } } From d96b18c0550c787b898786029c3c4a5c64e18d12 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Mon, 27 Nov 2017 17:08:12 +0200 Subject: [PATCH 028/123] Changed order of rendering captcha --- includes/class-pirateforms-phpformbuilder.php | 6 +++++- public/class-pirateforms-public.php | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/includes/class-pirateforms-phpformbuilder.php b/includes/class-pirateforms-phpformbuilder.php index 3d5c9b1..4c1356a 100644 --- a/includes/class-pirateforms-phpformbuilder.php +++ b/includes/class-pirateforms-phpformbuilder.php @@ -47,9 +47,13 @@ function build_form( $elements, $pirate_forms_options, $from_widget ) { $classes[] = $val['id'] . '-on'; } else { $element = $html_helper->add( $val, false ); - if ( 'form_honeypot' === $val['id'] || in_array( $val['type'], array( 'hidden', 'div' ) ) ) { + if ( ( 'form_honeypot' === $val['id'] || in_array( $val['type'], array( 'hidden', 'div' ) ) ) && $val['id'] !== 'pirate-forms-maps-custom' + ) { $form_end .= $element; } + if($val['id'] === 'pirate-forms-maps-custom'){ + $this->set_element('captcha',$element); + } $this->set_element( $val['id'], $element ); $classes[] = $val['id'] . '-on'; } diff --git a/public/class-pirateforms-public.php b/public/class-pirateforms-public.php index b406028..2a6c28a 100644 --- a/public/class-pirateforms-public.php +++ b/public/class-pirateforms-public.php @@ -367,7 +367,7 @@ public function display_form( $atts, $content = null ) { 'class' => 'pirate-forms-submit-button btn btn-primary', 'wrap' => array( 'type' => 'div', - 'class' => implode( ' ', apply_filters( 'pirateform_wrap_classes_submit', array( 'col-xs-12 form_field_wrap contact_submit_wrap' ) ) ), + 'class' => implode( ' ', apply_filters( 'pirateform_wrap_classes_submit', array( 'col-xs-12 col-sm-6 form_field_wrap contact_submit_wrap' ) ) ), ), 'value' => $pirateformsopt_label_submit_btn, ); From e8debed5736152f71c62c1f9f482b26228adeb4d Mon Sep 17 00:00:00 2001 From: Bogdan Date: Mon, 27 Nov 2017 17:35:58 +0200 Subject: [PATCH 029/123] Changed captcha structure to allow styling of checkbox --- public/js/scripts-general.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/scripts-general.js b/public/js/scripts-general.js index b10291c..c0a04d1 100644 --- a/public/js/scripts-general.js +++ b/public/js/scripts-general.js @@ -12,7 +12,7 @@ jQuery(document).ready(function() { } if(jQuery('.pirate-forms-maps-custom').length > 0){ - jQuery('.pirate-forms-maps-custom').html(jQuery('' + pirateFormsObject.spam.label + '')); + jQuery('.pirate-forms-maps-custom').html(jQuery('')); } }); From 25f20c07ab25aaa5080e7147520e891e55749bb3 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Mon, 27 Nov 2017 18:00:14 +0200 Subject: [PATCH 030/123] Grunt check --- admin/css/wp-admin.css | 2 +- includes/class-pirateforms-phpformbuilder.php | 4 +- languages/pirate-forms.pot | 45 ++++++++++--------- public/css/front.css | 2 +- 4 files changed, 28 insertions(+), 25 deletions(-) diff --git a/admin/css/wp-admin.css b/admin/css/wp-admin.css index 628dad2..36645e4 100644 --- a/admin/css/wp-admin.css +++ b/admin/css/wp-admin.css @@ -371,4 +371,4 @@ input#save.pirate-forms-save-button { .pirate-forms-password-toggle span.dashicons { cursor: pointer; -} \ No newline at end of file +} diff --git a/includes/class-pirateforms-phpformbuilder.php b/includes/class-pirateforms-phpformbuilder.php index 4c1356a..d797c23 100644 --- a/includes/class-pirateforms-phpformbuilder.php +++ b/includes/class-pirateforms-phpformbuilder.php @@ -51,8 +51,8 @@ function build_form( $elements, $pirate_forms_options, $from_widget ) { ) { $form_end .= $element; } - if($val['id'] === 'pirate-forms-maps-custom'){ - $this->set_element('captcha',$element); + if ( $val['id'] === 'pirate-forms-maps-custom' ) { + $this->set_element( 'captcha',$element ); } $this->set_element( $val['id'], $element ); $classes[] = $val['id'] . '-on'; diff --git a/languages/pirate-forms.pot b/languages/pirate-forms.pot index b14e3bc..7268a0d 100644 --- a/languages/pirate-forms.pot +++ b/languages/pirate-forms.pot @@ -2,9 +2,9 @@ # This file is distributed under the GPLv2. msgid "" msgstr "" -"Project-Id-Version: Free & Simple Contact Form Plugin - Pirateforms 2.2.2\n" +"Project-Id-Version: Free & Simple Contact Form Plugin - Pirateforms 2.2.5\n" "Report-Msgid-Bugs-To: https://github.com/Codeinwp/pirate-forms/issues\n" -"POT-Creation-Date: 2017-10-23 10:41:06+00:00\n" +"POT-Creation-Date: 2017-11-27 15:58:23+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -178,7 +178,7 @@ msgid "Message" msgstr "" #: admin/class-pirateforms-admin.php:473 -#: public/class-pirateforms-public.php:980 +#: public/class-pirateforms-public.php:984 msgid "Attachment" msgstr "" @@ -562,65 +562,68 @@ msgstr "" msgid "I'm human!" msgstr "" -#: public/class-pirateforms-public.php:358 +#: public/class-pirateforms-public.php:362 msgid "Submit" msgstr "" -#: public/class-pirateforms-public.php:458 +#: public/class-pirateforms-public.php:462 msgid "Sorry, an error occured." msgstr "" -#: public/class-pirateforms-public.php:520 +#: public/class-pirateforms-public.php:524 msgid "Nonce failed!" msgstr "" -#: public/class-pirateforms-public.php:528 -#: public/class-pirateforms-public.php:585 +#: public/class-pirateforms-public.php:532 +#: public/class-pirateforms-public.php:589 msgid "Form submission failed!" msgstr "" -#: public/class-pirateforms-public.php:541 +#: public/class-pirateforms-public.php:545 msgid "Contact form submission from %s" msgstr "" -#: public/class-pirateforms-public.php:550 +#: public/class-pirateforms-public.php:554 msgid "Please enter one or more Contact submission recipients" msgstr "" -#: public/class-pirateforms-public.php:565 +#: public/class-pirateforms-public.php:569 msgid "IP address" msgstr "" -#: public/class-pirateforms-public.php:566 +#: public/class-pirateforms-public.php:570 msgid "IP search" msgstr "" -#: public/class-pirateforms-public.php:571 +#: public/class-pirateforms-public.php:575 msgid "Came from" msgstr "" -#: public/class-pirateforms-public.php:575 +#: public/class-pirateforms-public.php:579 msgid "Sent from page" msgstr "" -#: public/class-pirateforms-public.php:793 -#: public/class-pirateforms-public.php:805 -msgid "Wrong reCAPTCHA" +#: public/class-pirateforms-public.php:797 +msgid "Invalid CAPTCHA" +msgstr "" + +#: public/class-pirateforms-public.php:809 +msgid "Incorrect CAPTCHA" msgstr "" -#: public/class-pirateforms-public.php:814 +#: public/class-pirateforms-public.php:818 msgid "Submission blocked!" msgstr "" -#: public/class-pirateforms-public.php:942 +#: public/class-pirateforms-public.php:946 msgid "Uploaded file type is not allowed for %s" msgstr "" -#: public/class-pirateforms-public.php:950 +#: public/class-pirateforms-public.php:954 msgid "Uploaded file is too large %s" msgstr "" -#: public/class-pirateforms-public.php:964 +#: public/class-pirateforms-public.php:968 msgid "There was an unknown error uploading the file %s" msgstr "" diff --git a/public/css/front.css b/public/css/front.css index 69649bf..5292acc 100644 --- a/public/css/front.css +++ b/public/css/front.css @@ -92,4 +92,4 @@ Version: 2.2.5 .pirate-forms-maps-custom span { margin-left: 5px; -} \ No newline at end of file +} From ba6a34a72779a766e361d21d2f3708d574960db3 Mon Sep 17 00:00:00 2001 From: selu91 Date: Mon, 27 Nov 2017 18:13:46 +0200 Subject: [PATCH 031/123] Fix sniffer. --- includes/class-pirateforms-phpformbuilder.php | 2 +- languages/pirate-forms.pot | 168 +++++++++--------- 2 files changed, 85 insertions(+), 85 deletions(-) diff --git a/includes/class-pirateforms-phpformbuilder.php b/includes/class-pirateforms-phpformbuilder.php index d797c23..c12322c 100644 --- a/includes/class-pirateforms-phpformbuilder.php +++ b/includes/class-pirateforms-phpformbuilder.php @@ -52,7 +52,7 @@ function build_form( $elements, $pirate_forms_options, $from_widget ) { $form_end .= $element; } if ( $val['id'] === 'pirate-forms-maps-custom' ) { - $this->set_element( 'captcha',$element ); + $this->set_element( 'captcha', $element ); } $this->set_element( $val['id'], $element ); $classes[] = $val['id'] . '-on'; diff --git a/languages/pirate-forms.pot b/languages/pirate-forms.pot index 7268a0d..2526874 100644 --- a/languages/pirate-forms.pot +++ b/languages/pirate-forms.pot @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: Free & Simple Contact Form Plugin - Pirateforms 2.2.5\n" "Report-Msgid-Bugs-To: https://github.com/Codeinwp/pirate-forms/issues\n" -"POT-Creation-Date: 2017-11-27 15:58:23+00:00\n" +"POT-Creation-Date: 2017-11-27 16:11:48+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -36,27 +36,27 @@ msgstr "" msgid "More Features" msgstr "" -#: admin/class-pirateforms-admin.php:212 admin/class-pirateforms-admin.php:216 +#: admin/class-pirateforms-admin.php:189 admin/class-pirateforms-admin.php:203 msgid "Send Message" msgstr "" -#: admin/class-pirateforms-admin.php:240 +#: admin/class-pirateforms-admin.php:250 msgid "To use this option, please ensure Akismet is activated with a valid key." msgstr "" -#: admin/class-pirateforms-admin.php:248 +#: admin/class-pirateforms-admin.php:258 msgid "Form processing options" msgstr "" -#: admin/class-pirateforms-admin.php:255 +#: admin/class-pirateforms-admin.php:265 msgid "Contact notification email address" msgstr "" -#: admin/class-pirateforms-admin.php:258 +#: admin/class-pirateforms-admin.php:268 msgid "Insert [email] to use the contact form submitter's email." msgstr "" -#: admin/class-pirateforms-admin.php:258 +#: admin/class-pirateforms-admin.php:268 msgid "" "The notification email will be sent from this address both to the " "recipients below and the contact form submitter (if this is activated below " @@ -64,38 +64,38 @@ msgid "" "should match your site's domain)." msgstr "" -#: admin/class-pirateforms-admin.php:274 +#: admin/class-pirateforms-admin.php:284 msgid "Contact submission recipients" msgstr "" -#: admin/class-pirateforms-admin.php:277 +#: admin/class-pirateforms-admin.php:287 msgid "" "Email address(es) to receive contact submission notifications. You can " "separate multiple emails with a comma." msgstr "" -#: admin/class-pirateforms-admin.php:293 +#: admin/class-pirateforms-admin.php:303 msgid "Store submissions in the database" msgstr "" -#: admin/class-pirateforms-admin.php:296 +#: admin/class-pirateforms-admin.php:306 msgid "" "Should the submissions be stored in the admin area? If chosen, contact form " "submissions will be saved under \"All Entries\" on the left (appears after " "this option is activated)." msgstr "" -#: admin/class-pirateforms-admin.php:306 admin/class-pirateforms-admin.php:325 -#: admin/class-pirateforms-admin.php:381 admin/class-pirateforms-admin.php:723 -#: admin/class-pirateforms-admin.php:766 +#: admin/class-pirateforms-admin.php:316 admin/class-pirateforms-admin.php:335 +#: admin/class-pirateforms-admin.php:391 admin/class-pirateforms-admin.php:731 +#: admin/class-pirateforms-admin.php:774 msgid "Yes" msgstr "" -#: admin/class-pirateforms-admin.php:312 +#: admin/class-pirateforms-admin.php:322 msgid "Add a nonce to the contact form:" msgstr "" -#: admin/class-pirateforms-admin.php:315 +#: admin/class-pirateforms-admin.php:325 msgid "" "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 " @@ -104,271 +104,271 @@ msgid "" "forms not being able to be submitted with an error of \"Nonce failed!\"" msgstr "" -#: admin/class-pirateforms-admin.php:331 +#: admin/class-pirateforms-admin.php:341 msgid "Send email confirmation to form submitter" msgstr "" -#: admin/class-pirateforms-admin.php:334 +#: admin/class-pirateforms-admin.php:344 msgid "" "Adding text here will send an email to the form submitter. The email uses " "the \"Successful form submission text\" field from the \"Alert Messages\" " "tab as the subject line. Plain text only here, no HTML." msgstr "" -#: admin/class-pirateforms-admin.php:350 +#: admin/class-pirateforms-admin.php:360 msgid "Success Page" msgstr "" -#: admin/class-pirateforms-admin.php:353 +#: admin/class-pirateforms-admin.php:363 msgid "" "Select the page that displays after a successful form submission. The page " "will be displayed without pausing on the email form, so please be sure to " "configure a relevant thank you message in this page." msgstr "" -#: admin/class-pirateforms-admin.php:368 +#: admin/class-pirateforms-admin.php:378 msgid "Integrate with Akismet?" msgstr "" -#: admin/class-pirateforms-admin.php:371 +#: admin/class-pirateforms-admin.php:381 msgid "" "Checking this option will verify the content of the message with Akismet to " "check if it's spam. If it is determined to be spam, the message will be " "blocked. %s" msgstr "" -#: admin/class-pirateforms-admin.php:389 +#: admin/class-pirateforms-admin.php:399 #: admin/partials/pirateforms-settings-display.php:31 msgid "Fields Settings" msgstr "" -#: admin/class-pirateforms-admin.php:397 admin/class-pirateforms-admin.php:549 +#: admin/class-pirateforms-admin.php:407 admin/class-pirateforms-admin.php:557 msgid "Name" msgstr "" -#: admin/class-pirateforms-admin.php:406 admin/class-pirateforms-admin.php:425 -#: admin/class-pirateforms-admin.php:444 admin/class-pirateforms-admin.php:463 -#: admin/class-pirateforms-admin.php:481 +#: admin/class-pirateforms-admin.php:416 admin/class-pirateforms-admin.php:435 +#: admin/class-pirateforms-admin.php:454 admin/class-pirateforms-admin.php:473 +#: admin/class-pirateforms-admin.php:491 msgid "Do not display" msgstr "" -#: admin/class-pirateforms-admin.php:407 admin/class-pirateforms-admin.php:426 -#: admin/class-pirateforms-admin.php:445 admin/class-pirateforms-admin.php:464 -#: admin/class-pirateforms-admin.php:482 +#: admin/class-pirateforms-admin.php:417 admin/class-pirateforms-admin.php:436 +#: admin/class-pirateforms-admin.php:455 admin/class-pirateforms-admin.php:474 +#: admin/class-pirateforms-admin.php:492 msgid "Display but not required" msgstr "" -#: admin/class-pirateforms-admin.php:408 admin/class-pirateforms-admin.php:427 -#: admin/class-pirateforms-admin.php:446 admin/class-pirateforms-admin.php:465 -#: admin/class-pirateforms-admin.php:483 +#: admin/class-pirateforms-admin.php:418 admin/class-pirateforms-admin.php:437 +#: admin/class-pirateforms-admin.php:456 admin/class-pirateforms-admin.php:475 +#: admin/class-pirateforms-admin.php:493 msgid "Required" msgstr "" -#: admin/class-pirateforms-admin.php:416 +#: admin/class-pirateforms-admin.php:426 msgid "Email address" msgstr "" -#: admin/class-pirateforms-admin.php:435 admin/class-pirateforms-admin.php:575 -#: admin/class-pirateforms-admin.php:577 +#: admin/class-pirateforms-admin.php:445 admin/class-pirateforms-admin.php:583 +#: admin/class-pirateforms-admin.php:585 msgid "Subject" msgstr "" -#: admin/class-pirateforms-admin.php:454 admin/class-pirateforms-admin.php:588 +#: admin/class-pirateforms-admin.php:464 admin/class-pirateforms-admin.php:596 msgid "Message" msgstr "" -#: admin/class-pirateforms-admin.php:473 +#: admin/class-pirateforms-admin.php:483 #: public/class-pirateforms-public.php:984 msgid "Attachment" msgstr "" -#: admin/class-pirateforms-admin.php:491 +#: admin/class-pirateforms-admin.php:501 msgid "Add a spam trap" msgstr "" -#: admin/class-pirateforms-admin.php:500 admin/class-pirateforms-admin.php:785 +#: admin/class-pirateforms-admin.php:510 admin/class-pirateforms-admin.php:793 msgid "No" msgstr "" -#: admin/class-pirateforms-admin.php:501 +#: admin/class-pirateforms-admin.php:511 msgid "Custom" msgstr "" -#: admin/class-pirateforms-admin.php:502 +#: admin/class-pirateforms-admin.php:512 msgid "Google reCAPTCHA" msgstr "" -#: admin/class-pirateforms-admin.php:510 +#: admin/class-pirateforms-admin.php:520 msgid "Site key" msgstr "" -#: admin/class-pirateforms-admin.php:513 +#: admin/class-pirateforms-admin.php:523 msgid "Create an account here " msgstr "" -#: admin/class-pirateforms-admin.php:513 +#: admin/class-pirateforms-admin.php:523 msgid "to get the Site key and the Secret key for the reCaptcha." msgstr "" -#: admin/class-pirateforms-admin.php:529 +#: admin/class-pirateforms-admin.php:538 msgid "Secret key" msgstr "" -#: admin/class-pirateforms-admin.php:542 +#: admin/class-pirateforms-admin.php:550 #: admin/partials/pirateforms-settings-display.php:34 msgid "Fields Labels" msgstr "" -#: admin/class-pirateforms-admin.php:551 +#: admin/class-pirateforms-admin.php:559 msgid "Your Name" msgstr "" -#: admin/class-pirateforms-admin.php:562 +#: admin/class-pirateforms-admin.php:570 msgid "Email" msgstr "" -#: admin/class-pirateforms-admin.php:564 +#: admin/class-pirateforms-admin.php:572 msgid "Your Email" msgstr "" -#: admin/class-pirateforms-admin.php:590 +#: admin/class-pirateforms-admin.php:598 msgid "Your message" msgstr "" -#: admin/class-pirateforms-admin.php:601 +#: admin/class-pirateforms-admin.php:609 msgid "Submit button" msgstr "" -#: admin/class-pirateforms-admin.php:614 +#: admin/class-pirateforms-admin.php:622 #: admin/partials/pirateforms-settings-display.php:37 msgid "Alert Messages" msgstr "" -#: admin/class-pirateforms-admin.php:621 +#: admin/class-pirateforms-admin.php:629 msgid "Name required and missing" msgstr "" -#: admin/class-pirateforms-admin.php:623 +#: admin/class-pirateforms-admin.php:631 msgid "Enter your name" msgstr "" -#: admin/class-pirateforms-admin.php:634 +#: admin/class-pirateforms-admin.php:642 msgid "E-mail required and missing" msgstr "" -#: admin/class-pirateforms-admin.php:636 +#: admin/class-pirateforms-admin.php:644 msgid "Enter valid email" msgstr "" -#: admin/class-pirateforms-admin.php:647 +#: admin/class-pirateforms-admin.php:655 msgid "Subject required and missing" msgstr "" -#: admin/class-pirateforms-admin.php:649 +#: admin/class-pirateforms-admin.php:657 msgid "Please enter a subject" msgstr "" -#: admin/class-pirateforms-admin.php:660 +#: admin/class-pirateforms-admin.php:668 msgid "Question/comment is missing" msgstr "" -#: admin/class-pirateforms-admin.php:662 +#: admin/class-pirateforms-admin.php:670 msgid "Enter your question or comment" msgstr "" -#: admin/class-pirateforms-admin.php:673 +#: admin/class-pirateforms-admin.php:681 msgid "Attachment is missing" msgstr "" -#: admin/class-pirateforms-admin.php:675 +#: admin/class-pirateforms-admin.php:683 msgid "Please add an attachment" msgstr "" -#: admin/class-pirateforms-admin.php:686 +#: admin/class-pirateforms-admin.php:694 msgid "Successful form submission text" msgstr "" -#: admin/class-pirateforms-admin.php:689 +#: admin/class-pirateforms-admin.php:697 msgid "" "This text is used on the page if no Success Page is chosen above. This is " "also used as the confirmation email title, if one is set to send out." msgstr "" -#: admin/class-pirateforms-admin.php:693 +#: admin/class-pirateforms-admin.php:701 msgid "Thanks, your email was sent successfully!" msgstr "" -#: admin/class-pirateforms-admin.php:704 +#: admin/class-pirateforms-admin.php:712 msgid "SMTP Options" msgstr "" -#: admin/class-pirateforms-admin.php:711 +#: admin/class-pirateforms-admin.php:719 msgid "Use SMTP to send emails?" msgstr "" -#: admin/class-pirateforms-admin.php:714 +#: admin/class-pirateforms-admin.php:722 msgid "Instead of PHP mail function" msgstr "" -#: admin/class-pirateforms-admin.php:729 +#: admin/class-pirateforms-admin.php:737 msgid "SMTP Host" msgstr "" -#: admin/class-pirateforms-admin.php:741 +#: admin/class-pirateforms-admin.php:749 msgid "SMTP Port" msgstr "" -#: admin/class-pirateforms-admin.php:753 +#: admin/class-pirateforms-admin.php:761 msgid "Use SMTP Authentication?" msgstr "" -#: admin/class-pirateforms-admin.php:756 admin/class-pirateforms-admin.php:775 +#: admin/class-pirateforms-admin.php:764 admin/class-pirateforms-admin.php:783 msgid "" "If you check this box, make sure the SMTP Username and SMTP Password are " "completed." msgstr "" -#: admin/class-pirateforms-admin.php:772 +#: admin/class-pirateforms-admin.php:780 msgid "Security?" msgstr "" -#: admin/class-pirateforms-admin.php:786 +#: admin/class-pirateforms-admin.php:794 msgid "SSL" msgstr "" -#: admin/class-pirateforms-admin.php:787 +#: admin/class-pirateforms-admin.php:795 msgid "TLS" msgstr "" -#: admin/class-pirateforms-admin.php:794 +#: admin/class-pirateforms-admin.php:802 msgid "SMTP Username" msgstr "" -#: admin/class-pirateforms-admin.php:806 +#: admin/class-pirateforms-admin.php:814 msgid "SMTP Password" msgstr "" -#: admin/class-pirateforms-admin.php:919 +#: admin/class-pirateforms-admin.php:927 msgid "Mail Status" msgstr "" -#: admin/class-pirateforms-admin.php:942 +#: admin/class-pirateforms-admin.php:950 msgid "Status not captured" msgstr "" -#: admin/class-pirateforms-admin.php:942 +#: admin/class-pirateforms-admin.php:950 msgid "Mail sending failed!" msgstr "" -#: admin/class-pirateforms-admin.php:942 +#: admin/class-pirateforms-admin.php:950 msgid "Mail sent successfully!" msgstr "" -#: admin/class-pirateforms-admin.php:991 +#: admin/class-pirateforms-admin.php:999 msgid "Sent email successfully!" msgstr "" -#: admin/class-pirateforms-admin.php:991 +#: admin/class-pirateforms-admin.php:999 msgid "Sent email failed!" msgstr "" From 202e2037b4ce702555471ace9c62e2f7df65c77c Mon Sep 17 00:00:00 2001 From: selu91 Date: Mon, 27 Nov 2017 18:32:35 +0200 Subject: [PATCH 032/123] Fix magic tags description --- admin/class-pirateforms-admin.php | 72 +++++++------- admin/css/wp-admin.css | 2 +- languages/pirate-forms.pot | 159 +++++++++++++++++------------- 3 files changed, 125 insertions(+), 108 deletions(-) diff --git a/admin/class-pirateforms-admin.php b/admin/class-pirateforms-admin.php index 32a3c50..bd494e4 100644 --- a/admin/class-pirateforms-admin.php +++ b/admin/class-pirateforms-admin.php @@ -70,9 +70,9 @@ public function enqueue_styles_and_scripts() { wp_enqueue_script( 'pirateforms_scripts_admin', PIRATEFORMS_URL . 'admin/js/scripts-admin.js', array( 'jquery' ), $this->version ); wp_localize_script( 'pirateforms_scripts_admin', 'cwp_top_ajaxload', array( - 'ajaxurl' => admin_url( 'admin-ajax.php' ), - 'nonce' => wp_create_nonce( PIRATEFORMS_SLUG ), - 'i10n' => array( + 'ajaxurl' => admin_url( 'admin-ajax.php' ), + 'nonce' => wp_create_nonce( PIRATEFORMS_SLUG ), + 'i10n' => array( 'recaptcha' => __( 'Please specify the Site Key and Secret Key.', 'pirate-forms' ), ), ) @@ -229,15 +229,15 @@ function pirate_forms_plugin_options() { // check if akismet is installed $akismet_status = false; if ( is_plugin_active( 'akismet/akismet.php' ) ) { - $akismet_key = get_option( 'wordpress_api_key' ); + $akismet_key = get_option( 'wordpress_api_key' ); if ( ! empty( $akismet_key ) ) { $akismet_status = true; } } - $akismet_msg = ''; + $akismet_msg = ''; if ( ! $akismet_status ) { - $akismet_msg = __( 'To use this option, please ensure Akismet is activated with a valid key.', 'pirate-forms' ); + $akismet_msg = __( 'To use this option, please ensure Akismet is activated with a valid key.', 'pirate-forms' ); } // the key(s) will be added to the div as class names @@ -362,9 +362,9 @@ function pirate_forms_plugin_options() { 'options' => PirateForms_Util::get_thank_you_pages(), ), array( - 'id' => 'pirateformsopt_akismet', - 'type' => 'checkbox', - 'label' => array( + 'id' => 'pirateformsopt_akismet', + 'type' => 'checkbox', + 'label' => array( 'value' => __( 'Integrate with Akismet?', 'pirate-forms' ), 'html' => '', 'desc' => array( @@ -372,12 +372,12 @@ function pirate_forms_plugin_options() { 'class' => 'pirate_forms_option_description', ), ), - 'value' => PirateForms_Util::get_option( 'pirateformsopt_akismet' ), - 'wrap' => array( + 'value' => PirateForms_Util::get_option( 'pirateformsopt_akismet' ), + 'wrap' => array( 'type' => 'div', 'class' => 'pirate-forms-grouped', ), - 'options' => array( + 'options' => array( 'yes' => __( 'Yes', 'pirate-forms' ), ), 'disabled' => ! empty( $akismet_msg ), @@ -497,9 +497,9 @@ function pirate_forms_plugin_options() { 'class' => 'pirate-forms-grouped', ), 'options' => array( - '' => __( 'No', 'pirate-forms' ), + '' => __( 'No', 'pirate-forms' ), 'custom' => __( 'Custom', 'pirate-forms' ), - 'yes' => __( 'Google reCAPTCHA', 'pirate-forms' ), + 'yes' => __( 'Google reCAPTCHA', 'pirate-forms' ), ), ), /* Site key */ @@ -538,7 +538,7 @@ function pirate_forms_plugin_options() { ) ), ), - 'pirate_labels pirate_dashicons' => array( + 'pirate_labels pirate_dashicons' => array( 'heading' => __( 'Fields Labels', 'pirate-forms' ), 'controls' => apply_filters( 'pirate_forms_admin_controls_for_field_labels', array( @@ -612,11 +612,7 @@ function pirate_forms_plugin_options() { 'type' => 'wysiwyg', 'label' => array( 'value' => __( 'Email content', 'pirate-forms' ), - 'html' => '', - 'desc' => array( - 'value' => PirateForms_Util::get_magic_tags(), - 'class' => 'pirate_forms_option_description', - ), + 'html' => '

' . esc_attr( __( 'You can use the next magic tags:', 'pirate-forms' ) ) . '
' . PirateForms_Util::get_magic_tags(), ), 'default' => PirateForms_Util::get_default_email_content(), 'value' => PirateForms_Util::get_option( 'pirateformsopt_email_content' ), @@ -624,10 +620,10 @@ function pirate_forms_plugin_options() { 'type' => 'div', 'class' => 'pirate-forms-grouped', ), - 'wysiwyg' => array( - 'quicktags' => false, - 'editor_class' => 'pirate-forms-wysiwyg', - 'editor_height' => 500, + 'wysiwyg' => array( + 'quicktags' => false, + 'editor_class' => 'pirate-forms-wysiwyg', + 'editor_height' => 500, ), ), ) @@ -960,12 +956,12 @@ public function manage_contact_posts_columns( $columns ) { public function manage_contact_posts_custom_column( $column, $id ) { switch ( $column ) { case 'pf_mailstatus': - $response = get_post_meta( $id, PIRATEFORMS_SLUG . 'mail-status', true ); - $failed = $response == 'false'; + $response = get_post_meta( $id, PIRATEFORMS_SLUG . 'mail-status', true ); + $failed = $response == 'false'; echo empty( $response ) ? __( 'Status not captured', 'pirate-forms' ) : ( $failed ? __( 'Mail sending failed!', 'pirate-forms' ) : __( 'Mail sent successfully!', 'pirate-forms' ) ); if ( $failed ) { - $reason = get_post_meta( $id, PIRATEFORMS_SLUG . 'mail-status-reason', true ); + $reason = get_post_meta( $id, PIRATEFORMS_SLUG . 'mail-status-reason', true ); if ( ! empty( $reason ) ) { echo ' (' . $reason . ')'; } @@ -983,15 +979,15 @@ public function manage_contact_posts_custom_column( $column, $id ) { public function test_email() { check_ajax_referer( PIRATEFORMS_SLUG, 'security' ); add_filter( 'pirateformpro_get_form_attributes', array( $this, 'test_configuration' ), 999, 2 ); - add_action( 'pirate_forms_after_processing', array( $this, 'test_result'), 10, 1 ); - add_filter( 'pirate_forms_validate_request', array( $this, 'test_alter_session'), 10, 3 ); - $_POST = array( - 'honeypot' => '', - 'pirate_forms_form_id' => isset( $_POST['pirate_forms_form_id'] ) ? $_POST['pirate_forms_form_id'] : '', - 'pirate-forms-contact-name' => 'Test Name', - 'pirate-forms-contact-email' => get_bloginfo( 'admin_email' ), - 'pirate-forms-contact-subject' => 'Test Email', - 'pirate-forms-contact-message' => 'This is a test.', + add_action( 'pirate_forms_after_processing', array( $this, 'test_result' ), 10, 1 ); + add_filter( 'pirate_forms_validate_request', array( $this, 'test_alter_session' ), 10, 3 ); + $_POST = array( + 'honeypot' => '', + 'pirate_forms_form_id' => isset( $_POST['pirate_forms_form_id'] ) ? $_POST['pirate_forms_form_id'] : '', + 'pirate-forms-contact-name' => 'Test Name', + 'pirate-forms-contact-email' => get_bloginfo( 'admin_email' ), + 'pirate-forms-contact-subject' => 'Test Email', + 'pirate-forms-contact-message' => 'This is a test.', ); do_action( 'pirate_forms_send_email', true ); } @@ -1001,9 +997,10 @@ public function test_email() { */ public function test_configuration( $options, $id ) { // disable captcha - $options['pirateformsopt_recaptcha_field'] = 'no'; + $options['pirateformsopt_recaptcha_field'] = 'no'; // disable attachments $options['pirateformsopt_attachment_field'] = 'no'; + return $options; } @@ -1019,6 +1016,7 @@ public function test_result( $response ) { */ public function test_alter_session( $body, $error_key, $pirate_forms_options ) { $_SESSION[ $error_key ] = ''; + return $body; } } diff --git a/admin/css/wp-admin.css b/admin/css/wp-admin.css index 628dad2..36645e4 100644 --- a/admin/css/wp-admin.css +++ b/admin/css/wp-admin.css @@ -371,4 +371,4 @@ input#save.pirate-forms-save-button { .pirate-forms-password-toggle span.dashicons { cursor: pointer; -} \ No newline at end of file +} diff --git a/languages/pirate-forms.pot b/languages/pirate-forms.pot index b14e3bc..105ea6f 100644 --- a/languages/pirate-forms.pot +++ b/languages/pirate-forms.pot @@ -2,9 +2,9 @@ # This file is distributed under the GPLv2. msgid "" msgstr "" -"Project-Id-Version: Free & Simple Contact Form Plugin - Pirateforms 2.2.2\n" +"Project-Id-Version: Free & Simple Contact Form Plugin - Pirateforms 2.2.5\n" "Report-Msgid-Bugs-To: https://github.com/Codeinwp/pirate-forms/issues\n" -"POT-Creation-Date: 2017-10-23 10:41:06+00:00\n" +"POT-Creation-Date: 2017-11-27 16:28:07+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -86,8 +86,8 @@ msgid "" msgstr "" #: admin/class-pirateforms-admin.php:306 admin/class-pirateforms-admin.php:325 -#: admin/class-pirateforms-admin.php:381 admin/class-pirateforms-admin.php:723 -#: admin/class-pirateforms-admin.php:766 +#: admin/class-pirateforms-admin.php:381 admin/class-pirateforms-admin.php:742 +#: admin/class-pirateforms-admin.php:785 msgid "Yes" msgstr "" @@ -178,7 +178,7 @@ msgid "Message" msgstr "" #: admin/class-pirateforms-admin.php:473 -#: public/class-pirateforms-public.php:980 +#: public/class-pirateforms-public.php:991 msgid "Attachment" msgstr "" @@ -186,7 +186,7 @@ msgstr "" msgid "Add a spam trap" msgstr "" -#: admin/class-pirateforms-admin.php:500 admin/class-pirateforms-admin.php:785 +#: admin/class-pirateforms-admin.php:500 admin/class-pirateforms-admin.php:804 msgid "No" msgstr "" @@ -240,135 +240,143 @@ msgid "Submit button" msgstr "" #: admin/class-pirateforms-admin.php:614 +msgid "Email content" +msgstr "" + +#: admin/class-pirateforms-admin.php:615 +msgid "You can the next magic tags:" +msgstr "" + +#: admin/class-pirateforms-admin.php:633 #: admin/partials/pirateforms-settings-display.php:37 msgid "Alert Messages" msgstr "" -#: admin/class-pirateforms-admin.php:621 +#: admin/class-pirateforms-admin.php:640 msgid "Name required and missing" msgstr "" -#: admin/class-pirateforms-admin.php:623 +#: admin/class-pirateforms-admin.php:642 msgid "Enter your name" msgstr "" -#: admin/class-pirateforms-admin.php:634 +#: admin/class-pirateforms-admin.php:653 msgid "E-mail required and missing" msgstr "" -#: admin/class-pirateforms-admin.php:636 +#: admin/class-pirateforms-admin.php:655 msgid "Enter valid email" msgstr "" -#: admin/class-pirateforms-admin.php:647 +#: admin/class-pirateforms-admin.php:666 msgid "Subject required and missing" msgstr "" -#: admin/class-pirateforms-admin.php:649 +#: admin/class-pirateforms-admin.php:668 msgid "Please enter a subject" msgstr "" -#: admin/class-pirateforms-admin.php:660 +#: admin/class-pirateforms-admin.php:679 msgid "Question/comment is missing" msgstr "" -#: admin/class-pirateforms-admin.php:662 +#: admin/class-pirateforms-admin.php:681 msgid "Enter your question or comment" msgstr "" -#: admin/class-pirateforms-admin.php:673 +#: admin/class-pirateforms-admin.php:692 msgid "Attachment is missing" msgstr "" -#: admin/class-pirateforms-admin.php:675 +#: admin/class-pirateforms-admin.php:694 msgid "Please add an attachment" msgstr "" -#: admin/class-pirateforms-admin.php:686 +#: admin/class-pirateforms-admin.php:705 msgid "Successful form submission text" msgstr "" -#: admin/class-pirateforms-admin.php:689 +#: admin/class-pirateforms-admin.php:708 msgid "" "This text is used on the page if no Success Page is chosen above. This is " "also used as the confirmation email title, if one is set to send out." msgstr "" -#: admin/class-pirateforms-admin.php:693 +#: admin/class-pirateforms-admin.php:712 msgid "Thanks, your email was sent successfully!" msgstr "" -#: admin/class-pirateforms-admin.php:704 +#: admin/class-pirateforms-admin.php:723 msgid "SMTP Options" msgstr "" -#: admin/class-pirateforms-admin.php:711 +#: admin/class-pirateforms-admin.php:730 msgid "Use SMTP to send emails?" msgstr "" -#: admin/class-pirateforms-admin.php:714 +#: admin/class-pirateforms-admin.php:733 msgid "Instead of PHP mail function" msgstr "" -#: admin/class-pirateforms-admin.php:729 +#: admin/class-pirateforms-admin.php:748 msgid "SMTP Host" msgstr "" -#: admin/class-pirateforms-admin.php:741 +#: admin/class-pirateforms-admin.php:760 msgid "SMTP Port" msgstr "" -#: admin/class-pirateforms-admin.php:753 +#: admin/class-pirateforms-admin.php:772 msgid "Use SMTP Authentication?" msgstr "" -#: admin/class-pirateforms-admin.php:756 admin/class-pirateforms-admin.php:775 +#: admin/class-pirateforms-admin.php:775 admin/class-pirateforms-admin.php:794 msgid "" "If you check this box, make sure the SMTP Username and SMTP Password are " "completed." msgstr "" -#: admin/class-pirateforms-admin.php:772 +#: admin/class-pirateforms-admin.php:791 msgid "Security?" msgstr "" -#: admin/class-pirateforms-admin.php:786 +#: admin/class-pirateforms-admin.php:805 msgid "SSL" msgstr "" -#: admin/class-pirateforms-admin.php:787 +#: admin/class-pirateforms-admin.php:806 msgid "TLS" msgstr "" -#: admin/class-pirateforms-admin.php:794 +#: admin/class-pirateforms-admin.php:813 msgid "SMTP Username" msgstr "" -#: admin/class-pirateforms-admin.php:806 +#: admin/class-pirateforms-admin.php:825 msgid "SMTP Password" msgstr "" -#: admin/class-pirateforms-admin.php:919 +#: admin/class-pirateforms-admin.php:938 msgid "Mail Status" msgstr "" -#: admin/class-pirateforms-admin.php:942 +#: admin/class-pirateforms-admin.php:961 msgid "Status not captured" msgstr "" -#: admin/class-pirateforms-admin.php:942 +#: admin/class-pirateforms-admin.php:961 msgid "Mail sending failed!" msgstr "" -#: admin/class-pirateforms-admin.php:942 +#: admin/class-pirateforms-admin.php:961 msgid "Mail sent successfully!" msgstr "" -#: admin/class-pirateforms-admin.php:991 +#: admin/class-pirateforms-admin.php:1011 msgid "Sent email successfully!" msgstr "" -#: admin/class-pirateforms-admin.php:991 +#: admin/class-pirateforms-admin.php:1011 msgid "Sent email failed!" msgstr "" @@ -496,14 +504,42 @@ msgstr "" msgid "Upload file" msgstr "" -#: includes/class-pirateforms-util.php:150 +#: includes/class-pirateforms-util.php:153 msgid "Form submission blocked!" msgstr "" -#: includes/class-pirateforms-util.php:166 +#: includes/class-pirateforms-util.php:169 msgid "None" msgstr "" +#: includes/class-pirateforms-util.php:240 +#: public/class-pirateforms-public.php:545 +msgid "Contact form submission from %s" +msgstr "" + +#: includes/class-pirateforms-util.php:256 +#: includes/class-pirateforms-util.php:298 +#: public/class-pirateforms-public.php:572 +msgid "IP address" +msgstr "" + +#: includes/class-pirateforms-util.php:257 +#: public/class-pirateforms-public.php:573 +msgid "IP search" +msgstr "" + +#: includes/class-pirateforms-util.php:258 +#: includes/class-pirateforms-util.php:299 +#: public/class-pirateforms-public.php:580 +msgid "Came from" +msgstr "" + +#: includes/class-pirateforms-util.php:259 +#: includes/class-pirateforms-util.php:300 +#: public/class-pirateforms-public.php:586 +msgid "Sent from page" +msgstr "" + #: includes/class-pirateforms-widget.php:97 msgid "Title" msgstr "" @@ -562,65 +598,48 @@ msgstr "" msgid "I'm human!" msgstr "" -#: public/class-pirateforms-public.php:358 +#: public/class-pirateforms-public.php:362 msgid "Submit" msgstr "" -#: public/class-pirateforms-public.php:458 +#: public/class-pirateforms-public.php:462 msgid "Sorry, an error occured." msgstr "" -#: public/class-pirateforms-public.php:520 +#: public/class-pirateforms-public.php:524 msgid "Nonce failed!" msgstr "" -#: public/class-pirateforms-public.php:528 -#: public/class-pirateforms-public.php:585 +#: public/class-pirateforms-public.php:532 +#: public/class-pirateforms-public.php:597 msgid "Form submission failed!" msgstr "" -#: public/class-pirateforms-public.php:541 -msgid "Contact form submission from %s" -msgstr "" - -#: public/class-pirateforms-public.php:550 +#: public/class-pirateforms-public.php:557 msgid "Please enter one or more Contact submission recipients" msgstr "" -#: public/class-pirateforms-public.php:565 -msgid "IP address" -msgstr "" - -#: public/class-pirateforms-public.php:566 -msgid "IP search" -msgstr "" - -#: public/class-pirateforms-public.php:571 -msgid "Came from" -msgstr "" - -#: public/class-pirateforms-public.php:575 -msgid "Sent from page" +#: public/class-pirateforms-public.php:803 +msgid "Invalid CAPTCHA" msgstr "" -#: public/class-pirateforms-public.php:793 -#: public/class-pirateforms-public.php:805 -msgid "Wrong reCAPTCHA" +#: public/class-pirateforms-public.php:815 +msgid "Incorrect CAPTCHA" msgstr "" -#: public/class-pirateforms-public.php:814 +#: public/class-pirateforms-public.php:824 msgid "Submission blocked!" msgstr "" -#: public/class-pirateforms-public.php:942 +#: public/class-pirateforms-public.php:953 msgid "Uploaded file type is not allowed for %s" msgstr "" -#: public/class-pirateforms-public.php:950 +#: public/class-pirateforms-public.php:961 msgid "Uploaded file is too large %s" msgstr "" -#: public/class-pirateforms-public.php:964 +#: public/class-pirateforms-public.php:975 msgid "There was an unknown error uploading the file %s" msgstr "" From ab1de79387e76f52f5141aa4cce38fe9d239807d Mon Sep 17 00:00:00 2001 From: selu91 Date: Mon, 27 Nov 2017 18:36:29 +0200 Subject: [PATCH 033/123] Fix readme upsell messages. --- admin/partials/pirateforms-settings-sidebar-subscribe.php | 3 +++ readme.txt | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/admin/partials/pirateforms-settings-sidebar-subscribe.php b/admin/partials/pirateforms-settings-sidebar-subscribe.php index 2b66be6..d6c2bb0 100644 --- a/admin/partials/pirateforms-settings-sidebar-subscribe.php +++ b/admin/partials/pirateforms-settings-sidebar-subscribe.php @@ -6,6 +6,9 @@
  • Multiple forms builder
  • MailChimp integration
  • +
  • Aweber integration
  • +
  • GetResponse integration
  • +
  • Sendinblue integration
  • Developer friendly
  • Custom fields
  • 12 months Support & Updates
  • diff --git a/readme.txt b/readme.txt index 6e64a4b..77c3f6c 100644 --- a/readme.txt +++ b/readme.txt @@ -17,7 +17,7 @@ This is an easy-to-use WordPress contact form with captcha plugin. To create a c > **Time-saving features available in the FULL version:** > > * Create multiple forms -> * Mailchimp Integration +> * Mailchimp, GetResponse, Aweber, Sendinblue Integration > * Custom fields > * Developer friendly > * 12 months Support & Updates From 74d60dbc6f6934d44c7ea6098687ca4512d259bc Mon Sep 17 00:00:00 2001 From: selu91 Date: Mon, 27 Nov 2017 18:53:45 +0200 Subject: [PATCH 034/123] Bump version[skip ci] --- includes/class-pirateforms.php | 2 +- package.json | 2 +- pirate-forms.php | 4 ++-- public/css/front.css | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/class-pirateforms.php b/includes/class-pirateforms.php index 914d47f..3bd54c6 100644 --- a/includes/class-pirateforms.php +++ b/includes/class-pirateforms.php @@ -69,7 +69,7 @@ class PirateForms { public function __construct() { $this->plugin_name = 'pirateforms'; - $this->version = '2.2.5'; + $this->version = '2.3.0'; $this->load_dependencies(); $this->set_locale(); diff --git a/package.json b/package.json index b92a893..67ee6cc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pirate-forms", - "version": "2.2.5", + "version": "2.3.0", "description": "Pirate Forms plugin", "repository": { "type": "git", diff --git a/pirate-forms.php b/pirate-forms.php index 7133b99..c8e8445 100644 --- a/pirate-forms.php +++ b/pirate-forms.php @@ -16,7 +16,7 @@ * Plugin Name: Free & Simple Contact Form Plugin - Pirateforms * Plugin URI: http://themeisle.com/plugins/pirate-forms/ * Description: Easily creates a nice looking, simple contact form on your WP site. - * Version: 2.2.5 + * Version: 2.3.0 * Author: Themeisle * Author URI: http://themeisle.com * Text Domain: pirate-forms @@ -36,7 +36,7 @@ define( 'PIRATEFORMS_NAME', 'Pirate Forms' ); define( 'PIRATEFORMS_SLUG', 'pirate-forms' ); define( 'PIRATEFORMS_USELL_LINK', 'https://themeisle.com/plugins/pirate-forms-extended/' ); -define( 'PIRATE_FORMS_VERSION', '2.2.5' ); +define( 'PIRATE_FORMS_VERSION', '2.3.0' ); define( 'PIRATEFORMS_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) ); define( 'PIRATEFORMS_URL', plugin_dir_url( __FILE__ ) ); define( 'PIRATEFORMS_BASENAME', plugin_basename( __FILE__ ) ); diff --git a/public/css/front.css b/public/css/front.css index 5292acc..4e8ec88 100644 --- a/public/css/front.css +++ b/public/css/front.css @@ -1,5 +1,5 @@ /* -Version: 2.2.5 +Version: 2.3.0 */ .pirate_forms_wrap .form_field_wrap { margin-bottom: 20px; From a647592b24dcd01e31da7ce3afd9379746cbd2e4 Mon Sep 17 00:00:00 2001 From: selul Date: Mon, 27 Nov 2017 16:58:23 +0000 Subject: [PATCH 035/123] [AUTO][skip ci] Updating changelog for v2.3.0 --- CHANGELOG.md | 5 +++++ readme.md | 8 +++++++- readme.txt | 6 ++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f17713..27d6c3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ + ### v2.3.0 - 2017-11-27 + **Changes:** + * Adds email content wysiwyg editor. +* Improves layout for custom spam trap. + ### v2.2.5 - 2017-11-16 **Changes:** * Adds compatibility with WordPress 4.9 diff --git a/readme.md b/readme.md index 8991659..f8a8ca2 100644 --- a/readme.md +++ b/readme.md @@ -17,7 +17,7 @@ This is an easy-to-use WordPress contact form with captcha plugin. To create a c > **Time-saving features available in the FULL version:** > > * Create multiple forms -> * Mailchimp Integration +> * Mailchimp, GetResponse, Aweber, Sendinblue Integration > * Custom fields > * Developer friendly > * 12 months Support & Updates @@ -177,6 +177,12 @@ Activating the Pirate Contact Form plugin is just like any other plugin. If you' 4. Screenshot 4. Enabling SMTP ## Changelog ## +### 2.3.0 - 2017-11-27 ### + +* Adds email content wysiwyg editor. +* Improves layout for custom spam trap. + + ### 2.2.5 - 2017-11-16 ### * Adds compatibility with WordPress 4.9 diff --git a/readme.txt b/readme.txt index 77c3f6c..98838b8 100644 --- a/readme.txt +++ b/readme.txt @@ -177,6 +177,12 @@ Activating the Pirate Contact Form plugin is just like any other plugin. If you' 4. Screenshot 4. Enabling SMTP == Changelog == += 2.3.0 - 2017-11-27 = + +* Adds email content wysiwyg editor. +* Improves layout for custom spam trap. + + = 2.2.5 - 2017-11-16 = * Adds compatibility with WordPress 4.9 From 0c25c8c34070e348a04f05039c248c079a6b9db3 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Tue, 28 Nov 2017 17:52:33 +0200 Subject: [PATCH 036/123] Added condition to check if spam is disabled --- languages/pirate-forms.pot | 2 +- public/class-pirateforms-public.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/languages/pirate-forms.pot b/languages/pirate-forms.pot index 7268a0d..8b56efe 100644 --- a/languages/pirate-forms.pot +++ b/languages/pirate-forms.pot @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: Free & Simple Contact Form Plugin - Pirateforms 2.2.5\n" "Report-Msgid-Bugs-To: https://github.com/Codeinwp/pirate-forms/issues\n" -"POT-Creation-Date: 2017-11-27 15:58:23+00:00\n" +"POT-Creation-Date: 2017-11-28 15:51:04+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/public/class-pirateforms-public.php b/public/class-pirateforms-public.php index 2a6c28a..55be20f 100644 --- a/public/class-pirateforms-public.php +++ b/public/class-pirateforms-public.php @@ -335,7 +335,7 @@ public function display_form( $atts, $content = null ) { 'id' => 'pirate-forms-captcha', 'wrap' => array( 'type' => 'div', - 'class' => implode( ' ', apply_filters( 'pirateform_wrap_classes_captcha', array( 'col-xs-12 col-sm-6 form_field_wrap form_captcha_wrap' ) ) ), + 'class' => implode( ' ', apply_filters( 'pirateform_wrap_classes_captcha', array( 'col-xs-12 ' . ( $pirate_forms_options['pirateformsopt_recaptcha_field'] !== 'yes' ? 'col-sm-6 ' : '' ) . 'form_field_wrap form_captcha_wrap' ) ) ), ), ); endif; @@ -367,7 +367,7 @@ public function display_form( $atts, $content = null ) { 'class' => 'pirate-forms-submit-button btn btn-primary', 'wrap' => array( 'type' => 'div', - 'class' => implode( ' ', apply_filters( 'pirateform_wrap_classes_submit', array( 'col-xs-12 col-sm-6 form_field_wrap contact_submit_wrap' ) ) ), + 'class' => implode( ' ', apply_filters( 'pirateform_wrap_classes_submit', array( 'col-xs-12 ' . ( ! empty( $pirate_forms_options['pirateformsopt_recaptcha_field'] && $pirate_forms_options['pirateformsopt_recaptcha_field'] !== 'yes' ) ? 'col-sm-6 ' : '' ) . 'form_field_wrap contact_submit_wrap' ) ) ), ), 'value' => $pirateformsopt_label_submit_btn, ); From c12c00ec4a393636a4bdcab86edf71b9f564093b Mon Sep 17 00:00:00 2001 From: Bogdan Date: Tue, 28 Nov 2017 17:58:11 +0200 Subject: [PATCH 037/123] Grunt check --- languages/pirate-forms.pot | 685 ++++++++++++++++++++++++++++++++++++- 1 file changed, 684 insertions(+), 1 deletion(-) diff --git a/languages/pirate-forms.pot b/languages/pirate-forms.pot index 0519ecb..cf7cba2 100644 --- a/languages/pirate-forms.pot +++ b/languages/pirate-forms.pot @@ -1 +1,684 @@ - \ No newline at end of file +# Copyright (C) 2017 Themeisle +# This file is distributed under the GPLv2. +msgid "" +msgstr "" +"Project-Id-Version: Free & Simple Contact Form Plugin - Pirateforms 2.3.0\n" +"Report-Msgid-Bugs-To: https://github.com/Codeinwp/pirate-forms/issues\n" +"POT-Creation-Date: 2017-11-28 15:57:17+00:00\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"PO-Revision-Date: 2017-MO-DA HO:MI+ZONE\n" +"Last-Translator: Themeisle Translate Team \n" +"Language-Team: Themeisle Translate \n" +"X-Generator: grunt-wp-i18n 0.5.4\n" +"X-Poedit-KeywordsList: " +"__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_" +"attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;\n" +"Language: en\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Poedit-Country: United States\n" +"X-Poedit-SourceCharset: UTF-8\n" +"X-Poedit-Basepath: ../\n" +"X-Poedit-SearchPath-0: .\n" +"X-Poedit-Bookmarks: \n" +"X-Textdomain-Support: yes\n" + +#: admin/class-pirateforms-admin.php:76 +msgid "Please specify the Site Key and Secret Key." +msgstr "" + +#: admin/class-pirateforms-admin.php:123 admin/class-pirateforms-admin.php:147 +msgid "Settings" +msgstr "" + +#: admin/class-pirateforms-admin.php:154 +msgid "More Features" +msgstr "" + +#: admin/class-pirateforms-admin.php:189 admin/class-pirateforms-admin.php:203 +msgid "Send Message" +msgstr "" + +#: admin/class-pirateforms-admin.php:250 +msgid "To use this option, please ensure Akismet is activated with a valid key." +msgstr "" + +#: admin/class-pirateforms-admin.php:258 +msgid "Form processing options" +msgstr "" + +#: admin/class-pirateforms-admin.php:265 +msgid "Contact notification email address" +msgstr "" + +#: admin/class-pirateforms-admin.php:268 +msgid "Insert [email] to use the contact form submitter's email." +msgstr "" + +#: admin/class-pirateforms-admin.php:268 +msgid "" +"The notification email will be sent from this address both to the " +"recipients below and the contact form submitter (if this is activated below " +"in email confirmation, in which case the domain for this email address " +"should match your site's domain)." +msgstr "" + +#: admin/class-pirateforms-admin.php:284 +msgid "Contact submission recipients" +msgstr "" + +#: admin/class-pirateforms-admin.php:287 +msgid "" +"Email address(es) to receive contact submission notifications. You can " +"separate multiple emails with a comma." +msgstr "" + +#: admin/class-pirateforms-admin.php:303 +msgid "Store submissions in the database" +msgstr "" + +#: admin/class-pirateforms-admin.php:306 +msgid "" +"Should the submissions be stored in the admin area? If chosen, contact form " +"submissions will be saved under \"All Entries\" on the left (appears after " +"this option is activated)." +msgstr "" + +#: admin/class-pirateforms-admin.php:316 admin/class-pirateforms-admin.php:335 +#: admin/class-pirateforms-admin.php:391 admin/class-pirateforms-admin.php:750 +#: admin/class-pirateforms-admin.php:793 +msgid "Yes" +msgstr "" + +#: admin/class-pirateforms-admin.php:322 +msgid "Add a nonce to the contact form:" +msgstr "" + +#: admin/class-pirateforms-admin.php:325 +msgid "" +"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!\"" +msgstr "" + +#: admin/class-pirateforms-admin.php:341 +msgid "Send email confirmation to form submitter" +msgstr "" + +#: admin/class-pirateforms-admin.php:344 +msgid "" +"Adding text here will send an email to the form submitter. The email uses " +"the \"Successful form submission text\" field from the \"Alert Messages\" " +"tab as the subject line. Plain text only here, no HTML." +msgstr "" + +#: admin/class-pirateforms-admin.php:360 +msgid "Success Page" +msgstr "" + +#: admin/class-pirateforms-admin.php:363 +msgid "" +"Select the page that displays after a successful form submission. The page " +"will be displayed without pausing on the email form, so please be sure to " +"configure a relevant thank you message in this page." +msgstr "" + +#: admin/class-pirateforms-admin.php:378 +msgid "Integrate with Akismet?" +msgstr "" + +#: admin/class-pirateforms-admin.php:381 +msgid "" +"Checking this option will verify the content of the message with Akismet to " +"check if it's spam. If it is determined to be spam, the message will be " +"blocked. %s" +msgstr "" + +#: admin/class-pirateforms-admin.php:399 +#: admin/partials/pirateforms-settings-display.php:31 +msgid "Fields Settings" +msgstr "" + +#: admin/class-pirateforms-admin.php:407 admin/class-pirateforms-admin.php:557 +msgid "Name" +msgstr "" + +#: admin/class-pirateforms-admin.php:416 admin/class-pirateforms-admin.php:435 +#: admin/class-pirateforms-admin.php:454 admin/class-pirateforms-admin.php:473 +#: admin/class-pirateforms-admin.php:491 +msgid "Do not display" +msgstr "" + +#: admin/class-pirateforms-admin.php:417 admin/class-pirateforms-admin.php:436 +#: admin/class-pirateforms-admin.php:455 admin/class-pirateforms-admin.php:474 +#: admin/class-pirateforms-admin.php:492 +msgid "Display but not required" +msgstr "" + +#: admin/class-pirateforms-admin.php:418 admin/class-pirateforms-admin.php:437 +#: admin/class-pirateforms-admin.php:456 admin/class-pirateforms-admin.php:475 +#: admin/class-pirateforms-admin.php:493 +msgid "Required" +msgstr "" + +#: admin/class-pirateforms-admin.php:426 +msgid "Email address" +msgstr "" + +#: admin/class-pirateforms-admin.php:445 admin/class-pirateforms-admin.php:583 +#: admin/class-pirateforms-admin.php:585 +msgid "Subject" +msgstr "" + +#: admin/class-pirateforms-admin.php:464 admin/class-pirateforms-admin.php:596 +msgid "Message" +msgstr "" + +#: admin/class-pirateforms-admin.php:483 +#: public/class-pirateforms-public.php:991 +msgid "Attachment" +msgstr "" + +#: admin/class-pirateforms-admin.php:501 +msgid "Add a spam trap" +msgstr "" + +#: admin/class-pirateforms-admin.php:510 admin/class-pirateforms-admin.php:812 +msgid "No" +msgstr "" + +#: admin/class-pirateforms-admin.php:511 +msgid "Custom" +msgstr "" + +#: admin/class-pirateforms-admin.php:512 +msgid "Google reCAPTCHA" +msgstr "" + +#: admin/class-pirateforms-admin.php:520 +msgid "Site key" +msgstr "" + +#: admin/class-pirateforms-admin.php:523 +msgid "Create an account here " +msgstr "" + +#: admin/class-pirateforms-admin.php:523 +msgid "to get the Site key and the Secret key for the reCaptcha." +msgstr "" + +#: admin/class-pirateforms-admin.php:538 +msgid "Secret key" +msgstr "" + +#: admin/class-pirateforms-admin.php:550 +#: admin/partials/pirateforms-settings-display.php:34 +msgid "Fields Labels" +msgstr "" + +#: admin/class-pirateforms-admin.php:559 +msgid "Your Name" +msgstr "" + +#: admin/class-pirateforms-admin.php:570 +msgid "Email" +msgstr "" + +#: admin/class-pirateforms-admin.php:572 +msgid "Your Email" +msgstr "" + +#: admin/class-pirateforms-admin.php:598 +msgid "Your message" +msgstr "" + +#: admin/class-pirateforms-admin.php:609 +msgid "Submit button" +msgstr "" + +#: admin/class-pirateforms-admin.php:622 +msgid "Email content" +msgstr "" + +#: admin/class-pirateforms-admin.php:623 +msgid "You can use the next magic tags:" +msgstr "" + +#: admin/class-pirateforms-admin.php:641 +#: admin/partials/pirateforms-settings-display.php:37 +msgid "Alert Messages" +msgstr "" + +#: admin/class-pirateforms-admin.php:648 +msgid "Name required and missing" +msgstr "" + +#: admin/class-pirateforms-admin.php:650 +msgid "Enter your name" +msgstr "" + +#: admin/class-pirateforms-admin.php:661 +msgid "E-mail required and missing" +msgstr "" + +#: admin/class-pirateforms-admin.php:663 +msgid "Enter valid email" +msgstr "" + +#: admin/class-pirateforms-admin.php:674 +msgid "Subject required and missing" +msgstr "" + +#: admin/class-pirateforms-admin.php:676 +msgid "Please enter a subject" +msgstr "" + +#: admin/class-pirateforms-admin.php:687 +msgid "Question/comment is missing" +msgstr "" + +#: admin/class-pirateforms-admin.php:689 +msgid "Enter your question or comment" +msgstr "" + +#: admin/class-pirateforms-admin.php:700 +msgid "Attachment is missing" +msgstr "" + +#: admin/class-pirateforms-admin.php:702 +msgid "Please add an attachment" +msgstr "" + +#: admin/class-pirateforms-admin.php:713 +msgid "Successful form submission text" +msgstr "" + +#: admin/class-pirateforms-admin.php:716 +msgid "" +"This text is used on the page if no Success Page is chosen above. This is " +"also used as the confirmation email title, if one is set to send out." +msgstr "" + +#: admin/class-pirateforms-admin.php:720 +msgid "Thanks, your email was sent successfully!" +msgstr "" + +#: admin/class-pirateforms-admin.php:731 +msgid "SMTP Options" +msgstr "" + +#: admin/class-pirateforms-admin.php:738 +msgid "Use SMTP to send emails?" +msgstr "" + +#: admin/class-pirateforms-admin.php:741 +msgid "Instead of PHP mail function" +msgstr "" + +#: admin/class-pirateforms-admin.php:756 +msgid "SMTP Host" +msgstr "" + +#: admin/class-pirateforms-admin.php:768 +msgid "SMTP Port" +msgstr "" + +#: admin/class-pirateforms-admin.php:780 +msgid "Use SMTP Authentication?" +msgstr "" + +#: admin/class-pirateforms-admin.php:783 admin/class-pirateforms-admin.php:802 +msgid "" +"If you check this box, make sure the SMTP Username and SMTP Password are " +"completed." +msgstr "" + +#: admin/class-pirateforms-admin.php:799 +msgid "Security?" +msgstr "" + +#: admin/class-pirateforms-admin.php:813 +msgid "SSL" +msgstr "" + +#: admin/class-pirateforms-admin.php:814 +msgid "TLS" +msgstr "" + +#: admin/class-pirateforms-admin.php:821 +msgid "SMTP Username" +msgstr "" + +#: admin/class-pirateforms-admin.php:833 +msgid "SMTP Password" +msgstr "" + +#: admin/class-pirateforms-admin.php:946 +msgid "Mail Status" +msgstr "" + +#: admin/class-pirateforms-admin.php:969 +msgid "Status not captured" +msgstr "" + +#: admin/class-pirateforms-admin.php:969 +msgid "Mail sending failed!" +msgstr "" + +#: admin/class-pirateforms-admin.php:969 +msgid "Mail sent successfully!" +msgstr "" + +#: admin/class-pirateforms-admin.php:1019 +msgid "Sent email successfully!" +msgstr "" + +#: admin/class-pirateforms-admin.php:1019 +msgid "Sent email failed!" +msgstr "" + +#: admin/partials/pirateforms-settings-display.php:20 +#: includes/class-pirateforms-widget.php:18 +#: includes/class-pirateforms-widget.php:21 +msgid "Pirate Forms" +msgstr "" + +#: admin/partials/pirateforms-settings-display.php:25 +msgid "How to use" +msgstr "" + +#: admin/partials/pirateforms-settings-display.php:28 +msgid "Options" +msgstr "" + +#: admin/partials/pirateforms-settings-display.php:40 +msgid "SMTP" +msgstr "" + +#: admin/partials/pirateforms-settings-display.php:47 +msgid "Welcome to Pirate Forms!" +msgstr "" + +#: admin/partials/pirateforms-settings-display.php:48 +msgid "To get started, just " +msgstr "" + +#: admin/partials/pirateforms-settings-display.php:49 +msgid "configure all the options " +msgstr "" + +#: admin/partials/pirateforms-settings-display.php:49 +msgid "you need, hit save and start using the created form." +msgstr "" + +#: admin/partials/pirateforms-settings-display.php:54 +msgid "There are 3 ways of using the newly created form:" +msgstr "" + +#: admin/partials/pirateforms-settings-display.php:56 +msgid "Add a " +msgstr "" + +#: admin/partials/pirateforms-settings-display.php:57 +msgid "widget" +msgstr "" + +#: admin/partials/pirateforms-settings-display.php:59 +#: admin/partials/pirateforms-settings-display.php:62 +msgid "Use the shortcode " +msgstr "" + +#: admin/partials/pirateforms-settings-display.php:60 +msgid " in any page or post." +msgstr "" + +#: admin/partials/pirateforms-settings-display.php:64 +msgid " in the theme's files." +msgstr "" + +#: admin/partials/pirateforms-settings-display.php:71 +msgid "" +"If you are using the default (non-SMTP) configuration which uses the WP/PHP " +"mail, mails might either land in the spam/junk folders or they might get " +"lost. So, you might not receive the email even if the status against an " +"entry reads the mail has been sent successfully. If you face this, please " +"contact your system administrator. If you continue to face this problem, " +"you can switch to the SMTP configuration to ensure email deliverability." +msgstr "" + +#: admin/partials/pirateforms-settings-display.php:76 +msgid "Are you enjoying Pirate Forms?" +msgstr "" + +#: admin/partials/pirateforms-settings-display.php:81 +#. translators: link to WordPress.org repo for PirateForms +msgid "Rate our plugin on %1$s WordPress.org %2$s. We'd really appreciate it!" +msgstr "" + +#: admin/partials/pirateforms-settings-display.php:95 +#. translators: link to blog article about contact form plugins +msgid "" +"If you want a more complex Contact Form Plugin please check %1$s this link " +"%2$s." +msgstr "" + +#: admin/partials/pirateforms-settings-display.php:129 +msgid "Save changes" +msgstr "" + +#: admin/partials/pirateforms-settings-display.php:138 +msgid "Send Test Email" +msgstr "" + +#: admin/partials/pirateforms-settings-sidebar-subscribe.php:5 +msgid "Extend to FULL version" +msgstr "" + +#: admin/partials/pirateforms-settings-sidebar-subscribe.php:18 +#: admin/partials/pirateforms-settings-sidebar-subscribe.php:19 +msgid "View more features" +msgstr "" + +#: admin/partials/pirateforms-settings-sidebar-subscribe.php:25 +msgid "Get Our Free Email Course" +msgstr "" + +#: admin/partials/pirateforms-settings-sidebar-subscribe.php:49 +msgid "" +"Ready to learn how to reduce your website loading times by half? Come and " +"join the 1st lesson here!" +msgstr "" + +#: admin/partials/pirateforms-settings-sidebar-subscribe.php:51 +msgid "" +"Thank you for subscribing! You have been added to the mailing list and will " +"receive the next email information in the coming weeks. If you ever wish to " +"unsubscribe, simply use the \"Unsubscribe\" link included in each " +"newsletter." +msgstr "" + +#: includes/class-pirateforms-html.php:183 +msgid "Upload file" +msgstr "" + +#: includes/class-pirateforms-util.php:153 +msgid "Form submission blocked!" +msgstr "" + +#: includes/class-pirateforms-util.php:169 +msgid "None" +msgstr "" + +#: includes/class-pirateforms-util.php:240 +#: public/class-pirateforms-public.php:545 +msgid "Contact form submission from %s" +msgstr "" + +#: includes/class-pirateforms-util.php:256 +#: includes/class-pirateforms-util.php:298 +#: public/class-pirateforms-public.php:572 +msgid "IP address" +msgstr "" + +#: includes/class-pirateforms-util.php:257 +#: public/class-pirateforms-public.php:573 +msgid "IP search" +msgstr "" + +#: includes/class-pirateforms-util.php:258 +#: includes/class-pirateforms-util.php:299 +#: public/class-pirateforms-public.php:580 +msgid "Came from" +msgstr "" + +#: includes/class-pirateforms-util.php:259 +#: includes/class-pirateforms-util.php:300 +#: public/class-pirateforms-public.php:586 +msgid "Sent from page" +msgstr "" + +#: includes/class-pirateforms-widget.php:97 +msgid "Title" +msgstr "" + +#: includes/class-pirateforms-widget.php:98 +msgid "Text above form" +msgstr "" + +#: includes/class-pirateforms-widget.php:101 +msgid "Title:" +msgstr "" + +#: includes/class-pirateforms-widget.php:107 +msgid "Subtext:" +msgstr "" + +#: includes/class-pirateforms-widget.php:112 +msgid "" +"Need more forms ? Check our extended " +"version for more features" +msgstr "" + +#: includes/class-pirateforms.php:251 +msgid "Edit Entry" +msgstr "" + +#: includes/class-pirateforms.php:252 +msgid "View Entry" +msgstr "" + +#: includes/class-pirateforms.php:253 +msgid "All Entries" +msgstr "" + +#: includes/class-pirateforms.php:254 +msgid "Search Entries" +msgstr "" + +#: includes/class-pirateforms.php:255 +msgid "Parent Entries:" +msgstr "" + +#: includes/class-pirateforms.php:256 +msgid "No entries found." +msgstr "" + +#: includes/class-pirateforms.php:257 +msgid "No entries found in Trash." +msgstr "" + +#: includes/class-pirateforms.php:261 +msgid "Entries from Pirate Forms" +msgstr "" + +#: public/class-pirateforms-public.php:104 +msgid "I'm human!" +msgstr "" + +#: public/class-pirateforms-public.php:362 +msgid "Submit" +msgstr "" + +#: public/class-pirateforms-public.php:462 +msgid "Sorry, an error occured." +msgstr "" + +#: public/class-pirateforms-public.php:524 +msgid "Nonce failed!" +msgstr "" + +#: public/class-pirateforms-public.php:532 +#: public/class-pirateforms-public.php:597 +msgid "Form submission failed!" +msgstr "" + +#: public/class-pirateforms-public.php:557 +msgid "Please enter one or more Contact submission recipients" +msgstr "" + +#: public/class-pirateforms-public.php:803 +msgid "Invalid CAPTCHA" +msgstr "" + +#: public/class-pirateforms-public.php:815 +msgid "Incorrect CAPTCHA" +msgstr "" + +#: public/class-pirateforms-public.php:824 +msgid "Submission blocked!" +msgstr "" + +#: public/class-pirateforms-public.php:953 +msgid "Uploaded file type is not allowed for %s" +msgstr "" + +#: public/class-pirateforms-public.php:961 +msgid "Uploaded file is too large %s" +msgstr "" + +#: public/class-pirateforms-public.php:975 +msgid "There was an unknown error uploading the file %s" +msgstr "" + +#. Plugin Name of the plugin/theme +msgid "Free & Simple Contact Form Plugin - Pirateforms" +msgstr "" + +#. Plugin URI of the plugin/theme +msgid "http://themeisle.com/plugins/pirate-forms/" +msgstr "" + +#. Description of the plugin/theme +msgid "Easily creates a nice looking, simple contact form on your WP site." +msgstr "" + +#. Author of the plugin/theme +msgid "Themeisle" +msgstr "" + +#. Author URI of the plugin/theme +msgid "http://themeisle.com" +msgstr "" + +#: includes/class-pirateforms.php:247 +msgctxt "post type general name" +msgid "Entries" +msgstr "" + +#: includes/class-pirateforms.php:248 +msgctxt "post type singular name" +msgid "Entry" +msgstr "" + +#: includes/class-pirateforms.php:249 +msgctxt "admin menu" +msgid "Entries" +msgstr "" + +#: includes/class-pirateforms.php:250 +msgctxt "add new on admin bar" +msgid "Entry" +msgstr "" \ No newline at end of file From 440ee2198b9d9cb0a7c8ebf746165fc07f08e1e4 Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Wed, 29 Nov 2017 16:28:17 +0530 Subject: [PATCH 038/123] custom fields with spaces are used incorrectly when email content is default and not customized --- includes/class-pirateforms-util.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-pirateforms-util.php b/includes/class-pirateforms-util.php index 09a50e6..6712c4b 100644 --- a/includes/class-pirateforms-util.php +++ b/includes/class-pirateforms-util.php @@ -267,7 +267,7 @@ public static function get_default_email_content( $html = true, $id = null ) { } // replace . and space with _ (PHP does not like dots in variable names so it automatically converts them to _). $field = strtolower( str_replace( array( ' ', '.' ), '_', stripslashes( sanitize_text_field( $custom['label'] ) ) ) ); - $body['body'][ stripslashes( $custom['label'] ) ] = self::MAGIC_TAG_PREFIX . stripslashes( $custom['label'] ) . self::MAGIC_TAG_POSTFIX; + $body['body'][ stripslashes( $custom['label'] ) ] = self::MAGIC_TAG_PREFIX . $field . self::MAGIC_TAG_POSTFIX; } } } From 65d4c190e994478fa4633860a10a51bf5be800d7 Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Mon, 4 Dec 2017 09:30:34 +0530 Subject: [PATCH 039/123] take care of characters such as & in the field name/magic tag --- includes/class-pirateforms-util.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-pirateforms-util.php b/includes/class-pirateforms-util.php index 09a50e6..61a0529 100644 --- a/includes/class-pirateforms-util.php +++ b/includes/class-pirateforms-util.php @@ -327,7 +327,7 @@ public static function get_magic_tags( $id = null ) { public static function replace_magic_tags( $content, $body ) { $html = $content; foreach ( $body['magic_tags'] as $tag => $value ) { - $html = str_replace( self::MAGIC_TAG_PREFIX . $tag . self::MAGIC_TAG_POSTFIX, $value, $html ); + $html = str_replace( htmlspecialchars( self::MAGIC_TAG_PREFIX . $tag . self::MAGIC_TAG_POSTFIX ), $value, $html ); } $html = apply_filters( 'pirate_forms_replace_magic_tags', $html, $body['magic_tags'] ); From 08b76f60c0d7afea454495289cebc2b4858bc63a Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Mon, 4 Dec 2017 09:48:47 +0530 Subject: [PATCH 040/123] grunt --- includes/class-pirateforms-util.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/class-pirateforms-util.php b/includes/class-pirateforms-util.php index 61a0529..72862db 100644 --- a/includes/class-pirateforms-util.php +++ b/includes/class-pirateforms-util.php @@ -327,7 +327,9 @@ public static function get_magic_tags( $id = null ) { public static function replace_magic_tags( $content, $body ) { $html = $content; foreach ( $body['magic_tags'] as $tag => $value ) { - $html = str_replace( htmlspecialchars( self::MAGIC_TAG_PREFIX . $tag . self::MAGIC_TAG_POSTFIX ), $value, $html ); + $from = htmlspecialchars( self::MAGIC_TAG_PREFIX . $tag . self::MAGIC_TAG_POSTFIX ); + do_action( 'themeisle_log_event', PIRATEFORMS_NAME, "replacing $from with $value", 'debug', __FILE__, __LINE__ ); + $html = str_replace( $from, $value, $html ); } $html = apply_filters( 'pirate_forms_replace_magic_tags', $html, $body['magic_tags'] ); From f15e18643f3f0c5d0bda36fb4e8bd53e88fcb3db Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Wed, 6 Dec 2017 11:03:28 +0530 Subject: [PATCH 041/123] can't click on label tooltip, isn't displayed where it should #243 --- admin/class-pirateforms-admin.php | 14 +++++----- admin/css/wp-admin.css | 41 ----------------------------- admin/js/scripts-admin.js | 9 +++++++ includes/class-pirateforms-html.php | 9 ++++++- 4 files changed, 24 insertions(+), 49 deletions(-) diff --git a/admin/class-pirateforms-admin.php b/admin/class-pirateforms-admin.php index 5e6c370..34d80fd 100644 --- a/admin/class-pirateforms-admin.php +++ b/admin/class-pirateforms-admin.php @@ -67,7 +67,7 @@ public function enqueue_styles_and_scripts() { && isset( $_GET['page'] ) && $_GET['page'] == 'pirateforms-admin' ) { wp_enqueue_style( 'pirateforms_admin_styles', PIRATEFORMS_URL . 'admin/css/wp-admin.css', array(), $this->version ); - wp_enqueue_script( 'pirateforms_scripts_admin', PIRATEFORMS_URL . 'admin/js/scripts-admin.js', array( 'jquery' ), $this->version ); + wp_enqueue_script( 'pirateforms_scripts_admin', PIRATEFORMS_URL . 'admin/js/scripts-admin.js', array( 'jquery', 'jquery-ui-tooltip' ), $this->version ); wp_localize_script( 'pirateforms_scripts_admin', 'cwp_top_ajaxload', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), @@ -251,10 +251,10 @@ function get_plugin_options() { } // the key(s) will be added to the div as class names - // to enable tooltip popup add 'pirate_dashicons' + // to enable tooltip popup add 'pirate_tooltip' return apply_filters( 'pirate_forms_admin_controls', array( - 'pirate_options pirate_dashicons' => array( + 'pirate_options pirate_tooltip' => array( 'heading' => __( 'Form processing options', 'pirate-forms' ), 'controls' => apply_filters( 'pirate_forms_admin_controls_for_options', array( @@ -395,7 +395,7 @@ function get_plugin_options() { ) ), ), - 'pirate_fields pirate_dashicons' => array( + 'pirate_fields pirate_tooltip' => array( 'heading' => __( 'Fields Settings', 'pirate-forms' ), 'controls' => apply_filters( 'pirate_forms_admin_controls_for_fields', array( @@ -546,7 +546,7 @@ function get_plugin_options() { ) ), ), - 'pirate_labels pirate_dashicons' => array( + 'pirate_labels pirate_tooltip' => array( 'heading' => __( 'Fields Labels', 'pirate-forms' ), 'controls' => apply_filters( 'pirate_forms_admin_controls_for_field_labels', array( @@ -637,7 +637,7 @@ function get_plugin_options() { ) ), ), - 'pirate_alerts pirate_dashicons' => array( + 'pirate_alerts pirate_tooltip' => array( 'heading' => __( 'Alert Messages', 'pirate-forms' ), 'controls' => apply_filters( 'pirate_forms_admin_controls_for_alerts', array( @@ -727,7 +727,7 @@ function get_plugin_options() { ) ), ), - 'pirate_smtp pirate_dashicons' => array( + 'pirate_smtp pirate_tooltip' => array( 'heading' => __( 'SMTP Options', 'pirate-forms' ), 'controls' => apply_filters( 'pirate_forms_admin_controls_for_smtp', array( diff --git a/admin/css/wp-admin.css b/admin/css/wp-admin.css index 36645e4..f7416af 100644 --- a/admin/css/wp-admin.css +++ b/admin/css/wp-admin.css @@ -170,47 +170,6 @@ margin-right: 0; } -div.pirate_dashicons > form > div > label > span.dashicons { - margin-left: 10px; - color: #888; -} - -div.pirate_dashicons > form > div > label > span.dashicons:after { - display: none; - position: absolute; - margin-left: 5px; - border-right: 5px solid transparent; - border-bottom: 5px solid black; - border-left: 5px solid transparent; - content: ""; -} - -div.pirate_dashicons > form > div > label > .pirate_forms_option_description { - display: none; - position: absolute; - z-index: 999; - width: 200px; - margin-top: 4px; - margin-left: 190px; - padding: 15px; - border-radius: 5px; - color: #fff; - background: rgba(0, 0, 0, 0.8); - font-size: 11px; - line-height: 16px; - text-align: left; -} - -div.pirate_dashicons > form > div > label > span.dashicons:hover + .pirate_forms_option_description, -div.pirate_dashicons > form > div > label > span.dashicons:hover::after { - display: block; -} - -div.pirate_dashicons > form > div > label { - width: 400px; - font-weight: normal; -} - .pirate_forms_contact_settings h3.title, .pirate_forms_welcome_text { margin: 10px 0 30px; diff --git a/admin/js/scripts-admin.js b/admin/js/scripts-admin.js index 6a77f7e..2ce6c42 100644 --- a/admin/js/scripts-admin.js +++ b/admin/js/scripts-admin.js @@ -125,4 +125,13 @@ function initAll(){ span.removeClass('dashicons-hidden').addClass('dashicons-visibility'); } }); + + // tootips in settings. + jQuery( document ).tooltip({ + items: '.dashicons-editor-help', + hide: 2000, + content: function(){ + return jQuery(this).find('div').html(); + } + }); } \ No newline at end of file diff --git a/includes/class-pirateforms-html.php b/includes/class-pirateforms-html.php index 3b7d1b3..0b640ef 100644 --- a/includes/class-pirateforms-html.php +++ b/includes/class-pirateforms-html.php @@ -78,7 +78,14 @@ private function get_label( $args ) { $html .= esc_html( $args['label']['value'] ); } if ( isset( $args['label']['html'] ) ) { - $html .= $args['label']['html']; + $span = $args['label']['html']; + if ( strpos( $span, 'dashicons-editor-help' ) !== false && isset( $args['label']['desc'] ) && isset( $args['label']['desc']['value'] ) ) { + $class = isset( $args['label']['desc']['class'] ) ? $args['label']['desc']['class'] : ''; + $span = str_replace( '> Date: Wed, 6 Dec 2017 11:09:59 +0530 Subject: [PATCH 042/123] grunt --- includes/class-pirateforms-html.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/class-pirateforms-html.php b/includes/class-pirateforms-html.php index 0b640ef..52093e3 100644 --- a/includes/class-pirateforms-html.php +++ b/includes/class-pirateforms-html.php @@ -78,10 +78,10 @@ private function get_label( $args ) { $html .= esc_html( $args['label']['value'] ); } if ( isset( $args['label']['html'] ) ) { - $span = $args['label']['html']; + $span = $args['label']['html']; if ( strpos( $span, 'dashicons-editor-help' ) !== false && isset( $args['label']['desc'] ) && isset( $args['label']['desc']['value'] ) ) { - $class = isset( $args['label']['desc']['class'] ) ? $args['label']['desc']['class'] : ''; - $span = str_replace( '> Date: Fri, 8 Dec 2017 16:21:32 +0200 Subject: [PATCH 043/123] Fix grunt --- tests/bootstrap.php | 6 +- tests/test-pirate-forms.php | 186 ++++++++++++++++++------------------ 2 files changed, 98 insertions(+), 94 deletions(-) diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 4c9aa14..d90862b 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -9,10 +9,10 @@ $_tests_dir = '/tmp/wordpress-tests-lib'; } -/************* contactashish13 test environment ************* +/************* For contactashish13 test environment ************* $_tests_dir = 'E:\work\apps\wordpress-dev\tests\phpunit'; $_core_dir = 'E:\work\apps\wordpress-dev\src\\'; -************* contactashish13 test environment *************/ +************* contactashish13 test environment */ /** * The path to the main file of the plugin to test. @@ -35,4 +35,4 @@ function _manually_load_plugin() { global $current_user; $current_user = new WP_User( 1 ); $current_user->set_role( 'administrator' ); -wp_update_user( array( 'ID' => 1, 'first_name' => 'Admin', 'last_name' => 'User' ) ); \ No newline at end of file +wp_update_user( array( 'ID' => 1, 'first_name' => 'Admin', 'last_name' => 'User' ) ); diff --git a/tests/test-pirate-forms.php b/tests/test-pirate-forms.php index 3e73957..61cfd2a 100644 --- a/tests/test-pirate-forms.php +++ b/tests/test-pirate-forms.php @@ -20,42 +20,44 @@ class Test_Pirate_Forms extends WP_UnitTestCase { * @access public */ public function test_wp_mail() { - do_action('admin_head'); - - $settings = PirateForms_Util::get_option(); - $this->assertEquals('yes', $settings['pirateformsopt_nonce']); - - $settings['pirateformsopt_nonce'] = 'no'; - $settings['pirateformsopt_recaptcha_field'] = 'no'; - $settings['pirateformsopt_store'] = 'yes'; - $settings['pirateformsopt_email_content'] = '

    Contact form submission from Test Blog (http://example.org)

    Your Name:{name}
    Your Email:{email}
    Subject:{subject}
    Your message:{message}
    IP address:{ip}
    IP search:http://whatismyipaddress.com/ip/{ip}
    Sent from page:{permalink}
    '; - - PirateForms_Util::set_option( $settings ); - - $settings = PirateForms_Util::get_option(); - - $this->assertEquals('no', $settings['pirateformsopt_nonce']); - $this->assertEquals('yes', $settings['pirateformsopt_store']); - - $_POST = array( - 'honeypot' => '', - 'pirate-forms-contact-name' => 'x', - 'pirate-forms-contact-email' => 'x@x.com', - 'pirate-forms-contact-subject' => 'x', - 'pirate-forms-contact-message' => 'x', - ); - add_action( 'phpmailer_init', array( $this, 'phpmailer_wp_mail' ), 999 ); - do_action('pirate_unittesting_template_redirect'); - - $posts = get_posts(array( - 'post_type' => 'pf_contact', - 'post_author' => 1, - 'post_status' => 'private', - 'numberposts' => 1, - 'fields' => 'ids', - )); - - $this->assertEquals(1, count($posts)); + do_action( 'admin_head' ); + + $settings = PirateForms_Util::get_option(); + $this->assertEquals( 'yes', $settings['pirateformsopt_nonce'] ); + + $settings['pirateformsopt_nonce'] = 'no'; + $settings['pirateformsopt_recaptcha_field'] = 'no'; + $settings['pirateformsopt_store'] = 'yes'; + $settings['pirateformsopt_email_content'] = '

    Contact form submission from Test Blog (http://example.org)

    Your Name:{name}
    Your Email:{email}
    Subject:{subject}
    Your message:{message}
    IP address:{ip}
    IP search:http://whatismyipaddress.com/ip/{ip}
    Sent from page:{permalink}
    '; + + PirateForms_Util::set_option( $settings ); + + $settings = PirateForms_Util::get_option(); + + $this->assertEquals( 'no', $settings['pirateformsopt_nonce'] ); + $this->assertEquals( 'yes', $settings['pirateformsopt_store'] ); + + $_POST = array( + 'honeypot' => '', + 'pirate-forms-contact-name' => 'x', + 'pirate-forms-contact-email' => 'x@x.com', + 'pirate-forms-contact-subject' => 'x', + 'pirate-forms-contact-message' => 'x', + ); + add_action( 'phpmailer_init', array( $this, 'phpmailer_wp_mail' ), 999 ); + do_action( 'pirate_unittesting_template_redirect' ); + + $posts = get_posts( + array( + 'post_type' => 'pf_contact', + 'post_author' => 1, + 'post_status' => 'private', + 'numberposts' => 1, + 'fields' => 'ids', + ) + ); + + $this->assertEquals( 1, count( $posts ) ); } @@ -65,51 +67,53 @@ public function test_wp_mail() { * @access public * @dataProvider smptProvider */ - public function test_smtp( $host, $port, $user, $pass, $auth) { - do_action('admin_head'); - - $settings = PirateForms_Util::get_option(); - $this->assertEquals('yes', $settings['pirateformsopt_nonce']); - $settings['pirateformsopt_nonce'] = 'no'; - $settings['pirateformsopt_recaptcha_field'] = 'no'; - $settings['pirateformsopt_store'] = 'yes'; - $settings['pirateformsopt_use_smtp'] = 'yes'; - $settings['pirateformsopt_smtp_host'] = $host; - $settings['pirateformsopt_smtp_port'] = $port; - $settings['pirateformsopt_use_smtp_authentication'] = $auth ? 'yes' : 'no'; - $settings['pirateformsopt_smtp_username'] = $user; - $settings['pirateformsopt_smtp_password'] = $pass; - $settings['pirateformsopt_email_content'] = '

    Contact form submission from Test Blog (http://example.org)

    Your Name:{name}
    Your Email:{email}
    Subject:{subject}
    Your message:{message}
    IP address:{ip}
    IP search:http://whatismyipaddress.com/ip/{ip}
    Sent from page:{permalink}
    '; - - $this->smpt_data = array( 'host' => $host, 'port' => $port, 'user' => $user, 'pass' => $pass, 'auth' => $auth ); - - PirateForms_Util::set_option( $settings ); - - $settings = PirateForms_Util::get_option(); - - $this->assertEquals('no', $settings['pirateformsopt_nonce']); - $this->assertEquals('yes', $settings['pirateformsopt_store']); - $this->assertEquals($host, $settings['pirateformsopt_smtp_host']); - - $_POST = array( - 'honeypot' => '', - 'pirate-forms-contact-name' => 'x', - 'pirate-forms-contact-email' => 'x@x.com', - 'pirate-forms-contact-subject' => 'x', - 'pirate-forms-contact-message' => 'x', - ); - add_action( 'phpmailer_init', array( $this, 'phpmailer_smtp_mail' ), 999 ); - do_action('pirate_unittesting_template_redirect'); - - $posts = get_posts(array( - 'post_type' => 'pf_contact', - 'post_author' => 1, - 'post_status' => 'private', - 'numberposts' => 1, - 'fields' => 'ids', - )); - - $this->assertEquals(1, count($posts)); + public function test_smtp( $host, $port, $user, $pass, $auth ) { + do_action( 'admin_head' ); + + $settings = PirateForms_Util::get_option(); + $this->assertEquals( 'yes', $settings['pirateformsopt_nonce'] ); + $settings['pirateformsopt_nonce'] = 'no'; + $settings['pirateformsopt_recaptcha_field'] = 'no'; + $settings['pirateformsopt_store'] = 'yes'; + $settings['pirateformsopt_use_smtp'] = 'yes'; + $settings['pirateformsopt_smtp_host'] = $host; + $settings['pirateformsopt_smtp_port'] = $port; + $settings['pirateformsopt_use_smtp_authentication'] = $auth ? 'yes' : 'no'; + $settings['pirateformsopt_smtp_username'] = $user; + $settings['pirateformsopt_smtp_password'] = $pass; + $settings['pirateformsopt_email_content'] = '

    Contact form submission from Test Blog (http://example.org)

    Your Name:{name}
    Your Email:{email}
    Subject:{subject}
    Your message:{message}
    IP address:{ip}
    IP search:http://whatismyipaddress.com/ip/{ip}
    Sent from page:{permalink}
    '; + + $this->smpt_data = array( 'host' => $host, 'port' => $port, 'user' => $user, 'pass' => $pass, 'auth' => $auth ); + + PirateForms_Util::set_option( $settings ); + + $settings = PirateForms_Util::get_option(); + + $this->assertEquals( 'no', $settings['pirateformsopt_nonce'] ); + $this->assertEquals( 'yes', $settings['pirateformsopt_store'] ); + $this->assertEquals( $host, $settings['pirateformsopt_smtp_host'] ); + + $_POST = array( + 'honeypot' => '', + 'pirate-forms-contact-name' => 'x', + 'pirate-forms-contact-email' => 'x@x.com', + 'pirate-forms-contact-subject' => 'x', + 'pirate-forms-contact-message' => 'x', + ); + add_action( 'phpmailer_init', array( $this, 'phpmailer_smtp_mail' ), 999 ); + do_action( 'pirate_unittesting_template_redirect' ); + + $posts = get_posts( + array( + 'post_type' => 'pf_contact', + 'post_author' => 1, + 'post_status' => 'private', + 'numberposts' => 1, + 'fields' => 'ids', + ) + ); + + $this->assertEquals( 1, count( $posts ) ); } @@ -118,22 +122,22 @@ public function test_smtp( $host, $port, $user, $pass, $auth) { * * @access public */ - public function phpmailer_wp_mail( $phpmailer ) { - $this->assertEquals('

    Contact form submission from Test Blog (http://example.org)

    Your Name:x
    Your Email:x@x.com
    Subject:x
    Your message:x
    IP address:127.0.0.1
    IP search:http://whatismyipaddress.com/ip/127.0.0.1
    Sent from page:
    ', $phpmailer->Body); - } + public function phpmailer_wp_mail( $phpmailer ) { + $this->assertEquals( '

    Contact form submission from Test Blog (http://example.org)

    Your Name:x
    Your Email:x@x.com
    Subject:x
    Your message:x
    IP address:127.0.0.1
    IP search:http://whatismyipaddress.com/ip/127.0.0.1
    Sent from page:
    ', $phpmailer->Body ); + } /** * Checking phpmailer for SMTP mail * * @access public */ - public function phpmailer_smtp_mail( $phpmailer ) { - $this->assertEquals('

    Contact form submission from Test Blog (http://example.org)

    Your Name:x
    Your Email:x@x.com
    Subject:x
    Your message:x
    IP address:127.0.0.1
    IP search:http://whatismyipaddress.com/ip/127.0.0.1
    Sent from page:
    ', $phpmailer->Body); - $this->assertEquals($this->smpt_data['host'], $phpmailer->Host); - $this->assertEquals($this->smpt_data['port'], $phpmailer->Port); - $this->assertEquals($this->smpt_data['user'], $phpmailer->Username); - $this->assertEquals($this->smpt_data['pass'], $phpmailer->Password); - } + public function phpmailer_smtp_mail( $phpmailer ) { + $this->assertEquals( '

    Contact form submission from Test Blog (http://example.org)

    Your Name:x
    Your Email:x@x.com
    Subject:x
    Your message:x
    IP address:127.0.0.1
    IP search:http://whatismyipaddress.com/ip/127.0.0.1
    Sent from page:
    ', $phpmailer->Body ); + $this->assertEquals( $this->smpt_data['host'], $phpmailer->Host ); + $this->assertEquals( $this->smpt_data['port'], $phpmailer->Port ); + $this->assertEquals( $this->smpt_data['user'], $phpmailer->Username ); + $this->assertEquals( $this->smpt_data['pass'], $phpmailer->Password ); + } /** * Provide the SMTP data From 4f1a06760f4c57a97b7ddd260c7885fdf55a84fb Mon Sep 17 00:00:00 2001 From: Bogdan Date: Fri, 8 Dec 2017 16:35:21 +0200 Subject: [PATCH 044/123] #222 Tested with ~30 themes and fixed common styling issues --- languages/pirate-forms.pot | 36 +++++------ public/class-pirateforms-public.php | 4 +- public/css/front.css | 95 +++++++++++++++++++++-------- 3 files changed, 92 insertions(+), 43 deletions(-) diff --git a/languages/pirate-forms.pot b/languages/pirate-forms.pot index cf7cba2..1a1033d 100644 --- a/languages/pirate-forms.pot +++ b/languages/pirate-forms.pot @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: Free & Simple Contact Form Plugin - Pirateforms 2.3.0\n" "Report-Msgid-Bugs-To: https://github.com/Codeinwp/pirate-forms/issues\n" -"POT-Creation-Date: 2017-11-28 15:57:17+00:00\n" +"POT-Creation-Date: 2017-12-08 14:32:44+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -178,7 +178,7 @@ msgid "Message" msgstr "" #: admin/class-pirateforms-admin.php:483 -#: public/class-pirateforms-public.php:991 +#: public/class-pirateforms-public.php:993 msgid "Attachment" msgstr "" @@ -513,30 +513,30 @@ msgid "None" msgstr "" #: includes/class-pirateforms-util.php:240 -#: public/class-pirateforms-public.php:545 +#: public/class-pirateforms-public.php:547 msgid "Contact form submission from %s" msgstr "" #: includes/class-pirateforms-util.php:256 #: includes/class-pirateforms-util.php:298 -#: public/class-pirateforms-public.php:572 +#: public/class-pirateforms-public.php:574 msgid "IP address" msgstr "" #: includes/class-pirateforms-util.php:257 -#: public/class-pirateforms-public.php:573 +#: public/class-pirateforms-public.php:575 msgid "IP search" msgstr "" #: includes/class-pirateforms-util.php:258 #: includes/class-pirateforms-util.php:299 -#: public/class-pirateforms-public.php:580 +#: public/class-pirateforms-public.php:582 msgid "Came from" msgstr "" #: includes/class-pirateforms-util.php:259 #: includes/class-pirateforms-util.php:300 -#: public/class-pirateforms-public.php:586 +#: public/class-pirateforms-public.php:588 msgid "Sent from page" msgstr "" @@ -602,44 +602,44 @@ msgstr "" msgid "Submit" msgstr "" -#: public/class-pirateforms-public.php:462 +#: public/class-pirateforms-public.php:464 msgid "Sorry, an error occured." msgstr "" -#: public/class-pirateforms-public.php:524 +#: public/class-pirateforms-public.php:526 msgid "Nonce failed!" msgstr "" -#: public/class-pirateforms-public.php:532 -#: public/class-pirateforms-public.php:597 +#: public/class-pirateforms-public.php:534 +#: public/class-pirateforms-public.php:599 msgid "Form submission failed!" msgstr "" -#: public/class-pirateforms-public.php:557 +#: public/class-pirateforms-public.php:559 msgid "Please enter one or more Contact submission recipients" msgstr "" -#: public/class-pirateforms-public.php:803 +#: public/class-pirateforms-public.php:805 msgid "Invalid CAPTCHA" msgstr "" -#: public/class-pirateforms-public.php:815 +#: public/class-pirateforms-public.php:817 msgid "Incorrect CAPTCHA" msgstr "" -#: public/class-pirateforms-public.php:824 +#: public/class-pirateforms-public.php:826 msgid "Submission blocked!" msgstr "" -#: public/class-pirateforms-public.php:953 +#: public/class-pirateforms-public.php:955 msgid "Uploaded file type is not allowed for %s" msgstr "" -#: public/class-pirateforms-public.php:961 +#: public/class-pirateforms-public.php:963 msgid "Uploaded file is too large %s" msgstr "" -#: public/class-pirateforms-public.php:975 +#: public/class-pirateforms-public.php:977 msgid "There was an unknown error uploading the file %s" msgstr "" diff --git a/public/class-pirateforms-public.php b/public/class-pirateforms-public.php index f51732a..bbe8316 100644 --- a/public/class-pirateforms-public.php +++ b/public/class-pirateforms-public.php @@ -415,7 +415,7 @@ public function display_form( $atts, $content = null ) { * @param PirateForms_PhpFormBuilder $form_builder The form builder object. */ public function render_fields( $form_builder ) { - echo '
    '; + echo '
    '; if ( isset( $form_builder->contact_name ) ) { echo $form_builder->contact_name; @@ -448,6 +448,8 @@ public function render_fields( $form_builder ) { } echo $form_builder->contact_submit; + + echo '
    '; } /** diff --git a/public/css/front.css b/public/css/front.css index 4e8ec88..fff939a 100644 --- a/public/css/front.css +++ b/public/css/front.css @@ -1,7 +1,8 @@ /* Version: 2.3.0 */ -.pirate_forms_wrap .form_field_wrap { +.pirate_forms_wrap .form_field_wrap, +.widget .pirate_forms_wrap .form_field_wrap { margin-bottom: 20px; } @@ -15,28 +16,23 @@ Version: 2.3.0 margin-bottom: 20px; } +.widget .form_field_wrap, .sidebar .form_field_wrap, .sidebar-wrap .form_field_wrap, #sidebar-secondary .form_field_wrap { width: 100%; + max-width: 100%; } -.sidebar .pirate-forms-submit-button, -.sidebar-wrap .pirate-forms-submit-button, -#sidebar-secondary .pirate-forms-submit-button { - float: left !important; - width: 100%; - margin-left: 0; -} - -.sidebar .pirate_forms_wrap label, -.sidebar-wrap .pirate_forms_wrap label, -#sidebar-secondary .pirate_forms_wrap label { - display: none; -} - -.pirate_forms_clearfix { +.pirate_forms_clearfix, +.pirate-forms-fields-container:after, +.pirate-forms-file-upload-wrapper:after { + display: block; + visibility: hidden; clear: both; + height: 0; + font-size: 0; + content: " "; } .contact_submit_wrap { @@ -62,17 +58,14 @@ Version: 2.3.0 .pirate-forms-file-upload-wrapper { position: relative; - margin-bottom: 5px; } -.pirate-forms-file-upload-input { +.pirate-forms-file-upload-input, +.pirate_forms_three_inputs_wrap .form_field_wrap input.pirate-forms-file-upload-input { float: left; - width: 70% !important; - border: none !important; - outline: none !important; + width: 70%; -webkit-transition: all 0.2s ease-in; transition: all 0.2s ease-in; - /* IE 9 Fix */ } .pirate-forms-file-upload-input:hover, @@ -83,13 +76,67 @@ Version: 2.3.0 .pirate-forms-file-upload-button { display: inline-block; float: left; - margin-left: -1px; + width: 30%; + margin-right: 0; + margin-left: 0; + text-align: center; + white-space: nowrap; cursor: pointer; - /* IE 9 Fix */ -webkit-transition: all 0.2s ease-in; transition: all 0.2s ease-in; } +.widget .pirate_forms_three_inputs_wrap .form_field_wrap input.pirate-forms-file-upload-input, +.widget .pirate-forms-file-upload-button { + width: 50%; +} + +.pirate-forms-maps-custom label { + display: inline-block; + cursor: pointer; +} + .pirate-forms-maps-custom span { margin-left: 5px; } + +.pirate-forms-fields-container { + margin-right: -15px; + margin-left: -15px; +} + +.pirate-forms-fields-container .form_field_wrap { + box-sizing: border-box; + padding-right: 15px; + padding-left: 15px; +} + +.pirate_forms_three_inputs_wrap .form_field_wrap input { + box-sizing: border-box; + width: 100%; + margin: 0; +} + +.pirate-forms-fields-container .form_field_wrap textarea { + width: 100%; + max-width: 100%; + margin: 0; +} + +.pirate_forms_wrap .form_field_wrap .pirate-forms-submit-button { + display: inline-block; + width: auto; + max-width: 100%; +} + +@media (max-width: 480px) { + .pirate_forms_wrap .form_field_wrap .pirate-forms-submit-button { + width: 100%; + } + + .pirate-forms-file-upload-input, + .pirate_forms_three_inputs_wrap .form_field_wrap input.pirate-forms-file-upload-input, + .pirate-forms-file-upload-button { + width: 50%; + } +} From 1397e66a576628f9311ec3935116f19b40631820 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Mon, 11 Dec 2017 12:39:04 +0200 Subject: [PATCH 045/123] #222 Removed extra code for input file --- includes/class-pirateforms-html.php | 2 +- public/css/front.css | 59 +---------------------------- 2 files changed, 2 insertions(+), 59 deletions(-) diff --git a/includes/class-pirateforms-html.php b/includes/class-pirateforms-html.php index 3b7d1b3..14fdd8e 100644 --- a/includes/class-pirateforms-html.php +++ b/includes/class-pirateforms-html.php @@ -197,7 +197,7 @@ private function file( $args ) { unset( $args['required_msg'] ); } - $html = '
    get_common( $args, array( 'value' ) ) . ' style="position: absolute; left: -9999px;" tabindex="-1">get_common( $text_args ) . ' />
    '; + $html = '
    get_common( $args, array( 'value' ) ) . ' tabindex="-1">
    '; return $this->get_wrap( $args, $html ); } diff --git a/public/css/front.css b/public/css/front.css index fff939a..bb63578 100644 --- a/public/css/front.css +++ b/public/css/front.css @@ -39,58 +39,6 @@ Version: 2.3.0 text-align: right; } -.pirate-forms-file-upload-hidden { - display: none; - visibility: hidden; - position: absolute; - left: -9999px; -} - -.pirate-forms-file-upload { - display: block; - width: auto; -} - -.pirate-forms-file-upload label { - display: block; - margin-bottom: 5px; -} - -.pirate-forms-file-upload-wrapper { - position: relative; -} - -.pirate-forms-file-upload-input, -.pirate_forms_three_inputs_wrap .form_field_wrap input.pirate-forms-file-upload-input { - float: left; - width: 70%; - -webkit-transition: all 0.2s ease-in; - transition: all 0.2s ease-in; -} - -.pirate-forms-file-upload-input:hover, -.pirate-forms-file-upload-input:focus { - outline: none; -} - -.pirate-forms-file-upload-button { - display: inline-block; - float: left; - width: 30%; - margin-right: 0; - margin-left: 0; - text-align: center; - white-space: nowrap; - cursor: pointer; - -webkit-transition: all 0.2s ease-in; - transition: all 0.2s ease-in; -} - -.widget .pirate_forms_three_inputs_wrap .form_field_wrap input.pirate-forms-file-upload-input, -.widget .pirate-forms-file-upload-button { - width: 50%; -} - .pirate-forms-maps-custom label { display: inline-block; cursor: pointer; @@ -115,6 +63,7 @@ Version: 2.3.0 box-sizing: border-box; width: 100%; margin: 0; + max-width: 100%; } .pirate-forms-fields-container .form_field_wrap textarea { @@ -133,10 +82,4 @@ Version: 2.3.0 .pirate_forms_wrap .form_field_wrap .pirate-forms-submit-button { width: 100%; } - - .pirate-forms-file-upload-input, - .pirate_forms_three_inputs_wrap .form_field_wrap input.pirate-forms-file-upload-input, - .pirate-forms-file-upload-button { - width: 50%; - } } From e59dd15cc88bccff6a6da60af47a39234f8eceaa Mon Sep 17 00:00:00 2001 From: Bogdan Date: Mon, 11 Dec 2017 13:41:47 +0200 Subject: [PATCH 046/123] #222 Changed subject class + grunt --- languages/pirate-forms.pot | 2 +- public/class-pirateforms-public.php | 6 +++--- public/css/front.css | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/languages/pirate-forms.pot b/languages/pirate-forms.pot index 1a1033d..cf3a97f 100644 --- a/languages/pirate-forms.pot +++ b/languages/pirate-forms.pot @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: Free & Simple Contact Form Plugin - Pirateforms 2.3.0\n" "Report-Msgid-Bugs-To: https://github.com/Codeinwp/pirate-forms/issues\n" -"POT-Creation-Date: 2017-12-08 14:32:44+00:00\n" +"POT-Creation-Date: 2017-12-11 11:40:30+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/public/class-pirateforms-public.php b/public/class-pirateforms-public.php index bbe8316..a0b05a7 100644 --- a/public/class-pirateforms-public.php +++ b/public/class-pirateforms-public.php @@ -193,7 +193,7 @@ public function display_form( $atts, $content = null ) { if ( ! empty( $field ) && ! empty( $label ) ) : $required = $field === 'req' ? true : false; $wrap_classes = array( - ( ! empty( $subjectField ) ? 'col-xs-12 col-sm-4' : 'col-xs-12 col-sm-6' ) . ' contact_name_wrap pirate_forms_three_inputs form_field_wrap', + ( ! empty( $subjectField ) ? 'col-xs-12 col-sm-6' : 'col-xs-12' ) . ' contact_name_wrap pirate_forms_three_inputs form_field_wrap', ); // If this field was submitted with invalid data if ( isset( $_SESSION[ $error_key ]['contact-name'] ) ) { @@ -222,7 +222,7 @@ public function display_form( $atts, $content = null ) { if ( ! empty( $field ) && ! empty( $label ) ) : $required = $field === 'req' ? true : false; $wrap_classes = array( - ( ! empty( $subjectField ) ? 'col-xs-12 col-sm-4' : 'col-xs-12 col-sm-6' ) . ' contact_email_wrap pirate_forms_three_inputs form_field_wrap', + ( ! empty( $subjectField ) ? 'col-xs-12 col-sm-6' : 'col-xs-12' ) . ' contact_email_wrap pirate_forms_three_inputs form_field_wrap', ); // If this field was submitted with invalid data if ( isset( $_SESSION[ $error_key ]['contact-email'] ) ) { @@ -251,7 +251,7 @@ public function display_form( $atts, $content = null ) { if ( ! empty( $field ) && ! empty( $label ) ) : $required = $field === 'req' ? true : false; $wrap_classes = array( - 'col-xs-12 col-sm-4 contact_subject_wrap pirate_forms_three_inputs form_field_wrap', + 'col-xs-12 contact_subject_wrap pirate_forms_three_inputs form_field_wrap', ); // If this field was submitted with invalid data if ( isset( $_SESSION[ $error_key ]['contact-subject'] ) ) { diff --git a/public/css/front.css b/public/css/front.css index bb63578..dc0a156 100644 --- a/public/css/front.css +++ b/public/css/front.css @@ -62,8 +62,8 @@ Version: 2.3.0 .pirate_forms_three_inputs_wrap .form_field_wrap input { box-sizing: border-box; width: 100%; + max-width: 100%; margin: 0; - max-width: 100%; } .pirate-forms-fields-container .form_field_wrap textarea { From 16454b4a688f1f26ec65bbcbda43002ef4d3b40f Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Wed, 20 Dec 2017 18:35:48 +0530 Subject: [PATCH 047/123] default form should contain basic information --- admin/class-pirateforms-admin.php | 2 +- includes/class-pirateforms-util.php | 4 ++-- public/class-pirateforms-public.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/admin/class-pirateforms-admin.php b/admin/class-pirateforms-admin.php index 5e6c370..474b407 100644 --- a/admin/class-pirateforms-admin.php +++ b/admin/class-pirateforms-admin.php @@ -622,7 +622,7 @@ function get_plugin_options() { 'value' => __( 'Email content', 'pirate-forms' ), 'html' => '

    ' . esc_attr( __( 'You can use the next magic tags:', 'pirate-forms' ) ) . '
    ' . PirateForms_Util::get_magic_tags(), ), - 'default' => PirateForms_Util::get_default_email_content(), + 'default' => PirateForms_Util::get_default_email_content( true, null, true ), 'value' => PirateForms_Util::get_option( 'pirateformsopt_email_content' ), 'wrap' => array( 'type' => 'div', diff --git a/includes/class-pirateforms-util.php b/includes/class-pirateforms-util.php index 09a50e6..15a4063 100644 --- a/includes/class-pirateforms-util.php +++ b/includes/class-pirateforms-util.php @@ -235,7 +235,7 @@ public static function save_error( $error_key, $new_error_key ) { /** * The default email content. */ - public static function get_default_email_content( $html = true, $id = null ) { + public static function get_default_email_content( $html = true, $id = null, $first_time = false ) { $body = array(); $body['heading'] = sprintf( __( 'Contact form submission from %s', 'pirate-forms' ), get_bloginfo( 'name' ) . ' (' . site_url() . ')' ); $body['body'] = array(); @@ -244,7 +244,7 @@ public static function get_default_email_content( $html = true, $id = null ) { $elements = array( 'name', 'email', 'subject', 'message' ); foreach ( $elements as $k ) { $display = $pirate_forms_options[ 'pirateformsopt_' . $k . '_field' ]; - if ( empty( $display ) ) { + if ( ! $first_time && empty( $display ) ) { continue; } $val = $pirate_forms_options[ 'pirateformsopt_label_' . $k ]; diff --git a/public/class-pirateforms-public.php b/public/class-pirateforms-public.php index 8e991f6..4ecbeae 100644 --- a/public/class-pirateforms-public.php +++ b/public/class-pirateforms-public.php @@ -644,7 +644,7 @@ public function send_email( $test = false ) { $subject = $pirate_forms_contact_subject; } - $mail_body = ! empty( $pirate_forms_options['pirateformsopt_email_content'] ) ? $pirate_forms_options['pirateformsopt_email_content'] : PirateForms_Util::get_default_email_content( true, $form_id ); + $mail_body = ! empty( $pirate_forms_options['pirateformsopt_email_content'] ) ? $pirate_forms_options['pirateformsopt_email_content'] : PirateForms_Util::get_default_email_content( true, $form_id, true ); $mail_body = PirateForms_Util::replace_magic_tags( $mail_body, $body ); do_action( 'pirate_forms_before_sending', $pirate_forms_contact_email, $site_recipients, $subject, $mail_body, $headers, $attachments ); From 7ab37e3955700fb62139fca668fd3241c164fb0a Mon Sep 17 00:00:00 2001 From: selu91 Date: Thu, 28 Dec 2017 15:32:14 +0200 Subject: [PATCH 048/123] Fix php lint error. --- .travis.yml | 2 ++ languages/pirate-forms.pot | 4 ++-- public/class-pirateforms-public.php | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0278caf..29a54a9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,6 +17,8 @@ matrix: script: ./bin/wraith.sh - php: '5.3' dist: precise + allow_failures: + - env: TEST_SUITE=Wraith_Visual_Regression_Testing WRAITH_FAIL=3 branches: except: - "/^*-v[0-9]/" diff --git a/languages/pirate-forms.pot b/languages/pirate-forms.pot index cf3a97f..66eb3c3 100644 --- a/languages/pirate-forms.pot +++ b/languages/pirate-forms.pot @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: Free & Simple Contact Form Plugin - Pirateforms 2.3.0\n" "Report-Msgid-Bugs-To: https://github.com/Codeinwp/pirate-forms/issues\n" -"POT-Creation-Date: 2017-12-11 11:40:30+00:00\n" +"POT-Creation-Date: 2017-12-28 13:28:25+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -500,7 +500,7 @@ msgid "" "newsletter." msgstr "" -#: includes/class-pirateforms-html.php:183 +#: includes/class-pirateforms-html.php:190 msgid "Upload file" msgstr "" diff --git a/public/class-pirateforms-public.php b/public/class-pirateforms-public.php index 0292c3d..e8a5a5e 100644 --- a/public/class-pirateforms-public.php +++ b/public/class-pirateforms-public.php @@ -367,7 +367,7 @@ public function display_form( $atts, $content = null ) { 'class' => 'pirate-forms-submit-button btn btn-primary', 'wrap' => array( 'type' => 'div', - 'class' => implode( ' ', apply_filters( 'pirateform_wrap_classes_submit', array( 'col-xs-12 ' . ( ! empty( $pirate_forms_options['pirateformsopt_recaptcha_field'] && $pirate_forms_options['pirateformsopt_recaptcha_field'] !== 'yes' ) ? 'col-sm-6 ' : '' ) . 'form_field_wrap contact_submit_wrap' ) ) ), + 'class' => implode( ' ', apply_filters( 'pirateform_wrap_classes_submit', array( 'col-xs-12 ' . ( ( ! empty( $pirate_forms_options['pirateformsopt_recaptcha_field'] ) && ( $pirate_forms_options['pirateformsopt_recaptcha_field'] !== 'yes' ) ) ? 'col-sm-6 ' : '' ) . 'form_field_wrap contact_submit_wrap' ) ) ), ), 'value' => $pirateformsopt_label_submit_btn, ); From 287ee3f51dd8d8de9e3f9104b45dfdb6efd462e2 Mon Sep 17 00:00:00 2001 From: selu91 Date: Thu, 28 Dec 2017 15:42:31 +0200 Subject: [PATCH 049/123] Bump version. --- includes/class-pirateforms.php | 2 +- package.json | 2 +- pirate-forms.php | 4 ++-- public/css/front.css | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/class-pirateforms.php b/includes/class-pirateforms.php index 3bd54c6..892c23e 100644 --- a/includes/class-pirateforms.php +++ b/includes/class-pirateforms.php @@ -69,7 +69,7 @@ class PirateForms { public function __construct() { $this->plugin_name = 'pirateforms'; - $this->version = '2.3.0'; + $this->version = '2.3.1'; $this->load_dependencies(); $this->set_locale(); diff --git a/package.json b/package.json index 67ee6cc..6b2d61b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pirate-forms", - "version": "2.3.0", + "version": "2.3.1", "description": "Pirate Forms plugin", "repository": { "type": "git", diff --git a/pirate-forms.php b/pirate-forms.php index c8e8445..c804ec1 100644 --- a/pirate-forms.php +++ b/pirate-forms.php @@ -16,7 +16,7 @@ * Plugin Name: Free & Simple Contact Form Plugin - Pirateforms * Plugin URI: http://themeisle.com/plugins/pirate-forms/ * Description: Easily creates a nice looking, simple contact form on your WP site. - * Version: 2.3.0 + * Version: 2.3.1 * Author: Themeisle * Author URI: http://themeisle.com * Text Domain: pirate-forms @@ -36,7 +36,7 @@ define( 'PIRATEFORMS_NAME', 'Pirate Forms' ); define( 'PIRATEFORMS_SLUG', 'pirate-forms' ); define( 'PIRATEFORMS_USELL_LINK', 'https://themeisle.com/plugins/pirate-forms-extended/' ); -define( 'PIRATE_FORMS_VERSION', '2.3.0' ); +define( 'PIRATE_FORMS_VERSION', '2.3.1' ); define( 'PIRATEFORMS_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) ); define( 'PIRATEFORMS_URL', plugin_dir_url( __FILE__ ) ); define( 'PIRATEFORMS_BASENAME', plugin_basename( __FILE__ ) ); diff --git a/public/css/front.css b/public/css/front.css index dc0a156..55c477d 100644 --- a/public/css/front.css +++ b/public/css/front.css @@ -1,5 +1,5 @@ /* -Version: 2.3.0 +Version: 2.3.1 */ .pirate_forms_wrap .form_field_wrap, .widget .pirate_forms_wrap .form_field_wrap { From fe70f19952417c2875508bdb41c67fb882450127 Mon Sep 17 00:00:00 2001 From: selul Date: Thu, 28 Dec 2017 13:55:58 +0000 Subject: [PATCH 050/123] [AUTO][skip ci] Updating changelog for v2.3.1 --- CHANGELOG.md | 6 ++++++ readme.md | 7 +++++++ readme.txt | 17 +++++++++++++++++ 3 files changed, 30 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27d6c3f..64fcc07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,10 @@ + ### v2.3.1 - 2017-12-28 + **Changes:** + * Improves layout and compatibility with various themes. +* Improves form default email format. +* Fix issues with various special characters in the magic tag fields. + ### v2.3.0 - 2017-11-27 **Changes:** * Adds email content wysiwyg editor. diff --git a/readme.md b/readme.md index f8a8ca2..3356f72 100644 --- a/readme.md +++ b/readme.md @@ -177,6 +177,13 @@ Activating the Pirate Contact Form plugin is just like any other plugin. If you' 4. Screenshot 4. Enabling SMTP ## Changelog ## +### 2.3.1 - 2017-12-28 ### + +* Improves layout and compatibility with various themes. +* Improves form default email format. +* Fix issues with various special characters in the magic tag fields. + + ### 2.3.0 - 2017-11-27 ### * Adds email content wysiwyg editor. diff --git a/readme.txt b/readme.txt index 98838b8..3214d41 100644 --- a/readme.txt +++ b/readme.txt @@ -87,6 +87,7 @@ This plugin started as a fork of https://wordpress.org/plugins/proper-contact-fo == Frequently Asked Questions == + = How I can get support for this contact form plugin ? = You can learn more about PirateForms and ask for help by visiting ThemeIsle website. @@ -156,6 +157,15 @@ You can follow the full documentation [here](http://docs.themeisle.com/article/4 = How to add attributes to form in Pirate Forms = [http://docs.themeisle.com/article/752-how-to-add-attributes-to-form-in-pirate-forms](http://docs.themeisle.com/article/752-how-to-add-attributes-to-form-in-pirate-forms) + = How to change default email content in Pirate forms = + [http://docs.themeisle.com/article/779-how-to-change-default-email-content-in-pirate-forms](http://docs.themeisle.com/article/779-how-to-change-default-email-content-in-pirate-forms) + + = How to change default email content per form in Pirate forms = + [http://docs.themeisle.com/article/780-how-to-change-default-email-content-per-form-in-pirate-forms](http://docs.themeisle.com/article/780-how-to-change-default-email-content-per-form-in-pirate-forms) + + = 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](http://docs.themeisle.com/article/787-how-to-install-and-use-extended-version-of-pirate-forms) + == Installation == 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: @@ -177,6 +187,13 @@ Activating the Pirate Contact Form plugin is just like any other plugin. If you' 4. Screenshot 4. Enabling SMTP == Changelog == += 2.3.1 - 2017-12-28 = + +* Improves layout and compatibility with various themes. +* Improves form default email format. +* Fix issues with various special characters in the magic tag fields. + + = 2.3.0 - 2017-11-27 = * Adds email content wysiwyg editor. From 49fed53a75e1c85d58ed0a46759b41d7822fa598 Mon Sep 17 00:00:00 2001 From: selu91 Date: Thu, 28 Dec 2017 17:46:52 +0200 Subject: [PATCH 051/123] Fix json hashes generation. --- .gitignore | 1 + grunt/aliases.yaml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3c52875..85eeb0f 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ vendor composer.lock bin/ package-lock.json +themeisle-hash.json diff --git a/grunt/aliases.yaml b/grunt/aliases.yaml index 638108d..22ed424 100644 --- a/grunt/aliases.yaml +++ b/grunt/aliases.yaml @@ -1,2 +1,2 @@ -deploy: +pre_deploy: - 'faq_builder' \ No newline at end of file From 765b7fde0f78beb4bc0b75a19d08d4a4d01ed8fd Mon Sep 17 00:00:00 2001 From: selu91 Date: Thu, 28 Dec 2017 18:23:59 +0200 Subject: [PATCH 052/123] Fix for tooltip styling #243 --- admin/css/wp-admin.css | 7 +++++++ admin/js/scripts-admin.js | 30 ++++++++++++++++++++++-------- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/admin/css/wp-admin.css b/admin/css/wp-admin.css index f7416af..0d808d1 100644 --- a/admin/css/wp-admin.css +++ b/admin/css/wp-admin.css @@ -331,3 +331,10 @@ input#save.pirate-forms-save-button { .pirate-forms-password-toggle span.dashicons { cursor: pointer; } +.toplevel_page_pirateforms-admin .ui-tooltip{ + background: #333; + color:#fff; + padding:5px; + width:300px; + border-radius: 5px; +} \ No newline at end of file diff --git a/admin/js/scripts-admin.js b/admin/js/scripts-admin.js index 2ce6c42..c2f6575 100644 --- a/admin/js/scripts-admin.js +++ b/admin/js/scripts-admin.js @@ -126,12 +126,26 @@ function initAll(){ } }); - // tootips in settings. - jQuery( document ).tooltip({ - items: '.dashicons-editor-help', - hide: 2000, - content: function(){ - return jQuery(this).find('div').html(); - } - }); + // tootips in settings. + jQuery(document).tooltip({ + items: '.dashicons-editor-help', + hide: 200, + position: {within: "#pirate-forms-main"}, + + content: function () { + return jQuery(this).find('div').html(); + }, + show: null, + close: function (event, ui) { + ui.tooltip.hover( + function () { + $(this).stop(true).fadeTo(400, 1); + }, + function () { + $(this).fadeOut("400", function () { + $(this).remove(); + }) + }); + } + }); } \ No newline at end of file From 1f0e7457452bc13509196f8c802eb1d41825639e Mon Sep 17 00:00:00 2001 From: selu91 Date: Thu, 28 Dec 2017 18:24:38 +0200 Subject: [PATCH 053/123] Bump version. --- includes/class-pirateforms.php | 2 +- package.json | 2 +- pirate-forms.php | 4 ++-- public/css/front.css | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/class-pirateforms.php b/includes/class-pirateforms.php index 892c23e..1a65f2f 100644 --- a/includes/class-pirateforms.php +++ b/includes/class-pirateforms.php @@ -69,7 +69,7 @@ class PirateForms { public function __construct() { $this->plugin_name = 'pirateforms'; - $this->version = '2.3.1'; + $this->version = '2.3.2'; $this->load_dependencies(); $this->set_locale(); diff --git a/package.json b/package.json index 6b2d61b..acd5d3f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pirate-forms", - "version": "2.3.1", + "version": "2.3.2", "description": "Pirate Forms plugin", "repository": { "type": "git", diff --git a/pirate-forms.php b/pirate-forms.php index c804ec1..2efe3b3 100644 --- a/pirate-forms.php +++ b/pirate-forms.php @@ -16,7 +16,7 @@ * Plugin Name: Free & Simple Contact Form Plugin - Pirateforms * Plugin URI: http://themeisle.com/plugins/pirate-forms/ * Description: Easily creates a nice looking, simple contact form on your WP site. - * Version: 2.3.1 + * Version: 2.3.2 * Author: Themeisle * Author URI: http://themeisle.com * Text Domain: pirate-forms @@ -36,7 +36,7 @@ define( 'PIRATEFORMS_NAME', 'Pirate Forms' ); define( 'PIRATEFORMS_SLUG', 'pirate-forms' ); define( 'PIRATEFORMS_USELL_LINK', 'https://themeisle.com/plugins/pirate-forms-extended/' ); -define( 'PIRATE_FORMS_VERSION', '2.3.1' ); +define( 'PIRATE_FORMS_VERSION', '2.3.2' ); define( 'PIRATEFORMS_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) ); define( 'PIRATEFORMS_URL', plugin_dir_url( __FILE__ ) ); define( 'PIRATEFORMS_BASENAME', plugin_basename( __FILE__ ) ); diff --git a/public/css/front.css b/public/css/front.css index 55c477d..eae74c5 100644 --- a/public/css/front.css +++ b/public/css/front.css @@ -1,5 +1,5 @@ /* -Version: 2.3.1 +Version: 2.3.2 */ .pirate_forms_wrap .form_field_wrap, .widget .pirate_forms_wrap .form_field_wrap { From 85c7c56d557173497ef560a8fe9cdb4525f5609a Mon Sep 17 00:00:00 2001 From: selu91 Date: Thu, 28 Dec 2017 18:53:54 +0200 Subject: [PATCH 054/123] Fix js issues. --- admin/js/scripts-admin.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/admin/js/scripts-admin.js b/admin/js/scripts-admin.js index c2f6575..b1135fa 100644 --- a/admin/js/scripts-admin.js +++ b/admin/js/scripts-admin.js @@ -130,7 +130,7 @@ function initAll(){ jQuery(document).tooltip({ items: '.dashicons-editor-help', hide: 200, - position: {within: "#pirate-forms-main"}, + position: {within: '#pirate-forms-main'}, content: function () { return jQuery(this).find('div').html(); @@ -139,12 +139,12 @@ function initAll(){ close: function (event, ui) { ui.tooltip.hover( function () { - $(this).stop(true).fadeTo(400, 1); + jQuery(this).stop(true).fadeTo(400, 1); }, function () { - $(this).fadeOut("400", function () { - $(this).remove(); - }) + jQuery(this).fadeOut('400', function () { + jQuery(this).remove(); + }); }); } }); From c5da75769a0214dab1bac0984d03c624206c32f5 Mon Sep 17 00:00:00 2001 From: selul Date: Thu, 28 Dec 2017 17:14:47 +0000 Subject: [PATCH 055/123] [AUTO][skip ci] Updating changelog for v2.3.2 --- CHANGELOG.md | 4 ++++ readme.md | 15 +++++++++++++++ readme.txt | 5 +++++ 3 files changed, 24 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64fcc07..4e5f96e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ + ### v2.3.2 - 2017-12-28 + **Changes:** + * Fix for tooltip admin behavior. + ### v2.3.1 - 2017-12-28 **Changes:** * Improves layout and compatibility with various themes. diff --git a/readme.md b/readme.md index 3356f72..cbe229c 100644 --- a/readme.md +++ b/readme.md @@ -87,6 +87,7 @@ This plugin started as a fork of https://wordpress.org/plugins/proper-contact-fo ## Frequently Asked Questions ## + ### How I can get support for this contact form plugin ? ### You can learn more about PirateForms and ask for help by visiting ThemeIsle website. @@ -156,6 +157,15 @@ You can follow the full documentation [here](http://docs.themeisle.com/article/4 = How to add attributes to form in Pirate Forms = [http://docs.themeisle.com/article/752-how-to-add-attributes-to-form-in-pirate-forms](http://docs.themeisle.com/article/752-how-to-add-attributes-to-form-in-pirate-forms) + = How to change default email content in Pirate forms = + [http://docs.themeisle.com/article/779-how-to-change-default-email-content-in-pirate-forms](http://docs.themeisle.com/article/779-how-to-change-default-email-content-in-pirate-forms) + + = How to change default email content per form in Pirate forms = + [http://docs.themeisle.com/article/780-how-to-change-default-email-content-per-form-in-pirate-forms](http://docs.themeisle.com/article/780-how-to-change-default-email-content-per-form-in-pirate-forms) + + = 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](http://docs.themeisle.com/article/787-how-to-install-and-use-extended-version-of-pirate-forms) + == Installation == 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: @@ -177,6 +187,11 @@ Activating the Pirate Contact Form plugin is just like any other plugin. If you' 4. Screenshot 4. Enabling SMTP ## Changelog ## +### 2.3.2 - 2017-12-28 ### + +* Fix for tooltip admin behavior. + + ### 2.3.1 - 2017-12-28 ### * Improves layout and compatibility with various themes. diff --git a/readme.txt b/readme.txt index 3214d41..f4abe8e 100644 --- a/readme.txt +++ b/readme.txt @@ -187,6 +187,11 @@ Activating the Pirate Contact Form plugin is just like any other plugin. If you' 4. Screenshot 4. Enabling SMTP == Changelog == += 2.3.2 - 2017-12-28 = + +* Fix for tooltip admin behavior. + + = 2.3.1 - 2017-12-28 = * Improves layout and compatibility with various themes. From a14c979a761853beb55ab3044db60a001d07a263 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Fri, 29 Dec 2017 14:31:09 +0200 Subject: [PATCH 056/123] Vertical aligned spam checkbox and submit btn --- admin/css/wp-admin.css | 13 +++++----- languages/pirate-forms.pot | 38 ++++++++++++++--------------- public/class-pirateforms-public.php | 4 ++- public/css/front.css | 20 +++++++++++++++ 4 files changed, 49 insertions(+), 26 deletions(-) diff --git a/admin/css/wp-admin.css b/admin/css/wp-admin.css index 0d808d1..7268220 100644 --- a/admin/css/wp-admin.css +++ b/admin/css/wp-admin.css @@ -331,10 +331,11 @@ input#save.pirate-forms-save-button { .pirate-forms-password-toggle span.dashicons { cursor: pointer; } -.toplevel_page_pirateforms-admin .ui-tooltip{ - background: #333; - color:#fff; - padding:5px; - width:300px; + +.toplevel_page_pirateforms-admin .ui-tooltip { + width: 300px; + padding: 5px; border-radius: 5px; -} \ No newline at end of file + color: #fff; + background: #333; +} diff --git a/languages/pirate-forms.pot b/languages/pirate-forms.pot index 66eb3c3..2aac6fb 100644 --- a/languages/pirate-forms.pot +++ b/languages/pirate-forms.pot @@ -2,9 +2,9 @@ # This file is distributed under the GPLv2. msgid "" msgstr "" -"Project-Id-Version: Free & Simple Contact Form Plugin - Pirateforms 2.3.0\n" +"Project-Id-Version: Free & Simple Contact Form Plugin - Pirateforms 2.3.2\n" "Report-Msgid-Bugs-To: https://github.com/Codeinwp/pirate-forms/issues\n" -"POT-Creation-Date: 2017-12-28 13:28:25+00:00\n" +"POT-Creation-Date: 2017-12-29 12:29:49+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -178,7 +178,7 @@ msgid "Message" msgstr "" #: admin/class-pirateforms-admin.php:483 -#: public/class-pirateforms-public.php:993 +#: public/class-pirateforms-public.php:995 msgid "Attachment" msgstr "" @@ -513,30 +513,30 @@ msgid "None" msgstr "" #: includes/class-pirateforms-util.php:240 -#: public/class-pirateforms-public.php:547 +#: public/class-pirateforms-public.php:549 msgid "Contact form submission from %s" msgstr "" #: includes/class-pirateforms-util.php:256 #: includes/class-pirateforms-util.php:298 -#: public/class-pirateforms-public.php:574 +#: public/class-pirateforms-public.php:576 msgid "IP address" msgstr "" #: includes/class-pirateforms-util.php:257 -#: public/class-pirateforms-public.php:575 +#: public/class-pirateforms-public.php:577 msgid "IP search" msgstr "" #: includes/class-pirateforms-util.php:258 #: includes/class-pirateforms-util.php:299 -#: public/class-pirateforms-public.php:582 +#: public/class-pirateforms-public.php:584 msgid "Came from" msgstr "" #: includes/class-pirateforms-util.php:259 #: includes/class-pirateforms-util.php:300 -#: public/class-pirateforms-public.php:588 +#: public/class-pirateforms-public.php:590 msgid "Sent from page" msgstr "" @@ -602,44 +602,44 @@ msgstr "" msgid "Submit" msgstr "" -#: public/class-pirateforms-public.php:464 +#: public/class-pirateforms-public.php:466 msgid "Sorry, an error occured." msgstr "" -#: public/class-pirateforms-public.php:526 +#: public/class-pirateforms-public.php:528 msgid "Nonce failed!" msgstr "" -#: public/class-pirateforms-public.php:534 -#: public/class-pirateforms-public.php:599 +#: public/class-pirateforms-public.php:536 +#: public/class-pirateforms-public.php:601 msgid "Form submission failed!" msgstr "" -#: public/class-pirateforms-public.php:559 +#: public/class-pirateforms-public.php:561 msgid "Please enter one or more Contact submission recipients" msgstr "" -#: public/class-pirateforms-public.php:805 +#: public/class-pirateforms-public.php:807 msgid "Invalid CAPTCHA" msgstr "" -#: public/class-pirateforms-public.php:817 +#: public/class-pirateforms-public.php:819 msgid "Incorrect CAPTCHA" msgstr "" -#: public/class-pirateforms-public.php:826 +#: public/class-pirateforms-public.php:828 msgid "Submission blocked!" msgstr "" -#: public/class-pirateforms-public.php:955 +#: public/class-pirateforms-public.php:957 msgid "Uploaded file type is not allowed for %s" msgstr "" -#: public/class-pirateforms-public.php:963 +#: public/class-pirateforms-public.php:965 msgid "Uploaded file is too large %s" msgstr "" -#: public/class-pirateforms-public.php:977 +#: public/class-pirateforms-public.php:979 msgid "There was an unknown error uploading the file %s" msgstr "" diff --git a/public/class-pirateforms-public.php b/public/class-pirateforms-public.php index e8a5a5e..20b37a9 100644 --- a/public/class-pirateforms-public.php +++ b/public/class-pirateforms-public.php @@ -443,13 +443,15 @@ public function render_fields( $form_builder ) { echo $form_builder->attachment; } + echo ''; + echo '
    '; } /** diff --git a/public/css/front.css b/public/css/front.css index eae74c5..3774075 100644 --- a/public/css/front.css +++ b/public/css/front.css @@ -78,8 +78,28 @@ Version: 2.3.2 max-width: 100%; } +.pirate_forms_wrap .pirate-forms-footer { + display: table; + float: left; + width: 100%; +} + +.pirate_forms_wrap .pirate-forms-footer .form_field_wrap { + display: table-cell; + float: none; + margin: 0; + vertical-align: middle; +} + @media (max-width: 480px) { + .pirate_forms_wrap .pirate-forms-footer .form_field_wrap, .pirate_forms_wrap .form_field_wrap .pirate-forms-submit-button { + display: block; width: 100%; } + + .pirate_forms_wrap .pirate-forms-footer .pirateform_wrap_classes_spam_wrap, + .pirate_forms_wrap .pirate-forms-footer .form_captcha_wrap { + margin-bottom: 20px; + } } From ff16a6e1bf4e427ae56d0bcf844aacd8ff2e2322 Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Sat, 6 Jan 2018 18:18:19 +0530 Subject: [PATCH 057/123] 2 google recaptchas --- includes/class-pirateforms-phpformbuilder.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/includes/class-pirateforms-phpformbuilder.php b/includes/class-pirateforms-phpformbuilder.php index c12322c..984fe8f 100644 --- a/includes/class-pirateforms-phpformbuilder.php +++ b/includes/class-pirateforms-phpformbuilder.php @@ -47,8 +47,7 @@ function build_form( $elements, $pirate_forms_options, $from_widget ) { $classes[] = $val['id'] . '-on'; } else { $element = $html_helper->add( $val, false ); - if ( ( 'form_honeypot' === $val['id'] || in_array( $val['type'], array( 'hidden', 'div' ) ) ) && $val['id'] !== 'pirate-forms-maps-custom' - ) { + if ( ( 'form_honeypot' === $val['id'] || in_array( $val['type'], array( 'hidden', 'div' ) ) ) && ! in_array( $val['id'], array( 'pirate-forms-maps-custom', 'pirate-forms-captcha' ) ) ) { $form_end .= $element; } if ( $val['id'] === 'pirate-forms-maps-custom' ) { From effea487d23d18f6c0424ec362adbcfd957c541d Mon Sep 17 00:00:00 2001 From: Marius Cristea Date: Sat, 6 Jan 2018 15:12:46 +0200 Subject: [PATCH 058/123] Bump version. --- includes/class-pirateforms.php | 2 +- package.json | 2 +- pirate-forms.php | 4 ++-- public/css/front.css | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/class-pirateforms.php b/includes/class-pirateforms.php index 1a65f2f..e4478e6 100644 --- a/includes/class-pirateforms.php +++ b/includes/class-pirateforms.php @@ -69,7 +69,7 @@ class PirateForms { public function __construct() { $this->plugin_name = 'pirateforms'; - $this->version = '2.3.2'; + $this->version = '2.3.3'; $this->load_dependencies(); $this->set_locale(); diff --git a/package.json b/package.json index acd5d3f..65189b9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pirate-forms", - "version": "2.3.2", + "version": "2.3.3", "description": "Pirate Forms plugin", "repository": { "type": "git", diff --git a/pirate-forms.php b/pirate-forms.php index 2efe3b3..b50b65f 100644 --- a/pirate-forms.php +++ b/pirate-forms.php @@ -16,7 +16,7 @@ * Plugin Name: Free & Simple Contact Form Plugin - Pirateforms * Plugin URI: http://themeisle.com/plugins/pirate-forms/ * Description: Easily creates a nice looking, simple contact form on your WP site. - * Version: 2.3.2 + * Version: 2.3.3 * Author: Themeisle * Author URI: http://themeisle.com * Text Domain: pirate-forms @@ -36,7 +36,7 @@ define( 'PIRATEFORMS_NAME', 'Pirate Forms' ); define( 'PIRATEFORMS_SLUG', 'pirate-forms' ); define( 'PIRATEFORMS_USELL_LINK', 'https://themeisle.com/plugins/pirate-forms-extended/' ); -define( 'PIRATE_FORMS_VERSION', '2.3.2' ); +define( 'PIRATE_FORMS_VERSION', '2.3.3' ); define( 'PIRATEFORMS_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) ); define( 'PIRATEFORMS_URL', plugin_dir_url( __FILE__ ) ); define( 'PIRATEFORMS_BASENAME', plugin_basename( __FILE__ ) ); diff --git a/public/css/front.css b/public/css/front.css index eae74c5..4136964 100644 --- a/public/css/front.css +++ b/public/css/front.css @@ -1,5 +1,5 @@ /* -Version: 2.3.2 +Version: 2.3.3 */ .pirate_forms_wrap .form_field_wrap, .widget .pirate_forms_wrap .form_field_wrap { From f4de2bbf34a473b1eb6926483481453f4da5e60a Mon Sep 17 00:00:00 2001 From: selul Date: Sat, 6 Jan 2018 13:30:56 +0000 Subject: [PATCH 059/123] [AUTO][skip ci] Updating changelog for v2.3.3 --- CHANGELOG.md | 5 +++++ readme.md | 6 ++++++ readme.txt | 6 ++++++ 3 files changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e5f96e..e647a04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ + ### v2.3.3 - 2018-01-06 + **Changes:** + * Fix double reCAPTCHA box bug. +* Fix custom spam trap alignement error. + ### v2.3.2 - 2017-12-28 **Changes:** * Fix for tooltip admin behavior. diff --git a/readme.md b/readme.md index cbe229c..8edc3bb 100644 --- a/readme.md +++ b/readme.md @@ -187,6 +187,12 @@ Activating the Pirate Contact Form plugin is just like any other plugin. If you' 4. Screenshot 4. Enabling SMTP ## Changelog ## +### 2.3.3 - 2018-01-06 ### + +* Fix double reCAPTCHA box bug. +* Fix custom spam trap alignement error. + + ### 2.3.2 - 2017-12-28 ### * Fix for tooltip admin behavior. diff --git a/readme.txt b/readme.txt index f4abe8e..3a3bd00 100644 --- a/readme.txt +++ b/readme.txt @@ -187,6 +187,12 @@ Activating the Pirate Contact Form plugin is just like any other plugin. If you' 4. Screenshot 4. Enabling SMTP == Changelog == += 2.3.3 - 2018-01-06 = + +* Fix double reCAPTCHA box bug. +* Fix custom spam trap alignement error. + + = 2.3.2 - 2017-12-28 = * Fix for tooltip admin behavior. From 9b0106195c41cedee174f54573b5688ca5c00e2b Mon Sep 17 00:00:00 2001 From: Rohit Motwani Date: Wed, 10 Jan 2018 02:19:53 +0530 Subject: [PATCH 060/123] SendInBlue API check --- admin/mailin.php | 867 ++++++++++++++++++ ...pirateforms-settings-sidebar-subscribe.php | 2 +- 2 files changed, 868 insertions(+), 1 deletion(-) create mode 100644 admin/mailin.php diff --git a/admin/mailin.php b/admin/mailin.php new file mode 100644 index 0000000..f8df9de --- /dev/null +++ b/admin/mailin.php @@ -0,0 +1,867 @@ +base_url = $base_url; + $this->api_key = $api_key; + } + /** + * Do CURL request with authorization + */ + private function do_request( $resource, $method, $input ) { + $called_url = $this->base_url . '/' . $resource; + $ch = curl_init( $called_url ); + $auth_header = 'api-key:' . $this->api_key; + $content_header = 'Content-Type:application/json'; + if ( strtoupper( substr( PHP_OS, 0, 3 ) ) === 'WIN' ) { + // Windows only over-ride + curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false ); + } + curl_setopt( $ch, CURLOPT_HTTPHEADER, array($auth_header, $content_header) ); + curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1 ); + curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, $method ); + curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 ); + curl_setopt( $ch, CURLOPT_HEADER, 0 ); + curl_setopt( $ch, CURLOPT_POSTFIELDS, $input ); + $data = curl_exec( $ch ); + if ( curl_errno( $ch ) ) { + echo 'Curl error: ' . curl_error( $ch ) . '\n'; + } + curl_close( $ch ); + return json_decode( $data, true ); + } + public function get( $resource, $input ) { + return $this->do_request( $resource, 'GET', $input ); + } + public function put( $resource, $input ) { + return $this->do_request( $resource, 'PUT', $input ); + } + public function post( $resource, $input ) { + return $this->do_request( $resource, 'POST', $input ); + } + public function delete( $resource, $input ) { + return $this->do_request( $resource, 'DELETE', $input ); + } + + /* + Get Account. + No input required + */ + public function get_account() { + return $this->get( 'account', '' ); + } + + /* + Get SMTP details. + No input required + */ + public function get_smtp_details() { + return $this->get( 'account/smtpdetail', '' ); + } + + /* + Create Child Account. + @param {Array} data contains php array with key value pair. + @options data {String} child_email: Email address of Reseller child [Mandatory] + @options data {String} password: Password of Reseller child to login [Mandatory] + @options data {String} company_org: Name of Reseller child’s company [Mandatory] + @options data {String} first_name: First name of Reseller child [Mandatory] + @options data {String} last_name: Last name of Reseller child [Mandatory] + @options data {Array} credits: Number of email & sms credits respectively, which will be assigned to the Reseller child’s account [Optional] + - email_credit {Integer} number of email credits + - sms_credit {Integer} Number of sms credts + @options data {Array} associate_ip: Associate dedicated IPs to reseller child. You can use commas to separate multiple IPs [Optional] + */ + public function create_child_account( $data ) { + return $this->post( 'account', json_encode( $data ) ); + } + + /* + Update Child Account. + @param {Array} data contains php array with key value pair. + @options data {String} auth_key: 16 character authorization key of Reseller child to be modified [Mandatory] + @options data {String} company_org: Name of Reseller child’s company [Optional] + @options data {String} first_name: First name of Reseller child [Optional] + @options data {String} last_name: Last name of Reseller child [Optional] + @options data {String} password: Password of Reseller child to login [Optional] + @options data {Array} associate_ip: Associate dedicated IPs to reseller child. You can use commas to separate multiple IPs [Optional] + @options data {Array} disassociate_ip: Disassociate dedicated IPs from reseller child. You can use commas to separate multiple IPs [Optional] + */ + public function update_child_account( $data ) { + return $this->put( 'account', json_encode( $data ) ); + } + + /* + Delete Child Account. + @param {Array} data contains php array with key value pair. + @options data {String} auth_key: 16 character authorization key of Reseller child to be deleted [Mandatory] + */ + public function delete_child_account( $data ) { + return $this->delete( 'account/' . $data['auth_key'], '' ); + } + + /* + Get Reseller child Account. + @param {Array} data contains php array with key value pair. + @options data {String} auth_key: 16 character authorization key of Reseller child. Example : To get the details of more than one child account, use, {"key1":"abC01De2fGHI3jkL","key2":"mnO45Pq6rSTU7vWX"} [Mandatory] + */ + public function get_reseller_child( $data ) { + return $this->post( 'account/getchildv2', json_encode( $data ) ); + } + + /* + Add/Remove Reseller child's Email/Sms credits. + @param {Array} data contains php array with key value pair. + @options data {String} auth_key: 16 character authorization key of Reseller child to modify credits [Mandatory] + @options data {Array} add_credit: Number of email & sms credits to be added. You can assign either email or sms credits, one at a time other will remain 0. [Mandatory: if rmv_credit is empty] + - email_credit {Integer} number of email credits + - sms_credit {Integer} Number of sms credts + @options data {Array} rmv_credit: Number of email & sms credits to be removed. You can assign either email or sms credits, one at a time other will remain 0. [Mandatory: if add_credits is empty] + - email_credit {Integer} number of email credits + - sms_credit {Integer} Number of sms credts + */ + public function add_remove_child_credits( $data ) { + return $this->post( 'account/addrmvcredit', json_encode( $data ) ); + } + + /* + Get a particular campaign detail. + @param {Array} data contains php array with key value pair. + @options data {Integer} id: Unique Id of the campaign [Mandatory] + */ + public function get_campaign_v2( $data ) { + return $this->get( 'campaign/' . $data['id'] . '/detailsv2', '' ); + } + + /* + Get all campaigns detail. + @param {Array} data contains php array with key value pair. + @options data {String} type: Type of campaign. Possible values – classic, trigger, sms, template ( case sensitive ) [Optional] + @options data {String} status: Status of campaign. Possible values – draft, sent, archive, queued, suspended, in_process, temp_active, temp_inactive ( case sensitive ) [Optional] + @options data {Integer} page: Maximum number of records per request is 500, if there are more than 500 campaigns then you can use this parameter to get next 500 results [Optional] + @options data {Integer} page_limit: This should be a valid number between 1-500 [Optional] + */ + public function get_campaigns_v2( $data ) { + return $this->get( 'campaign/detailsv2', json_encode( $data ) ); + } + + /* + Create and Schedule your campaigns. It returns the ID of the created campaign. + @param {Array} data contains php array with key value pair. + @options data {String} category: Tag name of the campaign [Optional] + @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists] + @options data {String} name: Name of the campaign [Mandatory] + @options data {String} bat: Email address for test mail [Optional] + @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty] + @options data {String} html_url: Url which content is the body of content [Mandatory: if html_content is empty] + @options data {Array} listid: These are the lists to which the campaign has been sent [Mandatory: if scheduled_date is not empty] + @options data {String} scheduled_date: The day on which the campaign is supposed to run[Optional] + @options data {String} subject: Subject of the campaign [Mandatory] + @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists] + @options data {String} reply_to: The reply to email in the campaign emails [Optional] + @options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM] To use the contact attributes here, these should already exist in SendinBlue account [Optional] + @options data {Array} exclude_list: These are the lists which must be excluded from the campaign [Optional] + @options data {String} attachment_url: Provide the absolute url of the attachment [Optional] + @options data {Integer} inline_image: Status of inline image. Possible values = 0 (default) & 1. inline_image = 0 means image can’t be embedded, & inline_image = 1 means image can be embedded, in the email [Optional] + @options data {Integer} mirror_active: Status of mirror links in campaign. Possible values = 0 & 1 (default). mirror_active = 0 means mirror links are deactivated, & mirror_active = 1 means mirror links are activated, in the campaign [Optional] + @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional] + + */ + public function create_campaign( $data ) { + return $this->post( 'campaign', json_encode( $data ) ); + } + + /* + Update your campaign. + @param {Array} data contains php array with key value pair. + @options data {Integer} id: Id of campaign to be modified [Mandatory] + @options data {String} category: Tag name of the campaign [Optional] + @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists] + @options data {String} name: Name of the campaign [Optional] + @options data {String} bat: Email address for test mail [Optional] + @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Optional] + @options data {String} html_url: Url which content is the body of content [Optional] + @options data {Array} listid These are the lists to which the campaign has been sent [Mandatory: if scheduled_date is not empty] + @options data {String} scheduled_date: The day on which the campaign is supposed to run[Optional] + @options data {String} subject: Subject of the campaign. + @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists] + @options data {String} reply_to: The reply to email in the campaign emails [Optional] + @options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in SendinBlue account [Optional] + @options data {Array} exclude_list: These are the lists which must be excluded from the campaign [Optional] + @options data {String} attachment_url: Provide the absolute url of the attachment [Optional] + @options data {Integer} inline_image: Status of inline image. Possible values = 0 (default) & 1. inline_image = 0 means image can’t be embedded, & inline_image = 1 means image can be embedded, in the email [Optional] + @options data {Integer} mirror_active: Status of mirror links in campaign. Possible values = 0 & 1 (default). mirror_active = 0 means mirror links are deactivated, & mirror_active = 1 means mirror links are activated, in the campaign [Optional] + @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional] + */ + public function update_campaign( $data ) { + $id = $data['id']; + unset( $data['id'] ); + return $this->put( 'campaign/' . $id, json_encode( $data ) ); + } + + /* + Delete your campaigns. + @param {Array} data contains php array with key value pair. + @options data {Integer} id: Id of campaign to be deleted [Mandatory] + */ + public function delete_campaign( $data ) { + return $this->delete( 'campaign/' . $data['id'], '' ); + } + + /* + Send report of Sent and Archived campaign. + @param {Array} data contains php array with key value pair. + @options data {Integer} id: Id of campaign to send its report [Mandatory] + @options data {String} lang: Language of email content. Possible values – fr (default), en, es, it & pt [Optional] + @options data {String} email_subject: Message subject [Mandatory] + @options data {Array} email_to: Email address of the recipient(s). Example: "test@example.net". You can use commas to separate multiple recipients [Mandatory] + @options data {String} email_content_type: Body of the message in text/HTML version. Possible values – text & html [Mandatory] + @options data {Array} email_bcc: Same as email_to but for Bcc [Optional] + @options data {Array} email_cc: Same as email_to but for Cc [Optional] + @options data {String} email_body: Body of the message [Mandatory] + */ + public function campaign_report_email( $data ) { + $id = $data['id']; + unset( $data['id'] ); + return $this->post( 'campaign/' . $id . '/report', json_encode( $data ) ); + } + + /* + Export the recipients of a specified campaign. + @param {Array} data contains php array with key value pair. + @options data {Integer} id: Id of campaign to export its recipients [Mandatory] + @options data {String} notify_url: URL that will be called once the export process is finished [Mandatory] + @options data {String} type: Type of recipients. Possible values – all, non_clicker, non_opener, clicker, opener, soft_bounces, hard_bounces & unsubscribes [Mandatory] + */ + public function campaign_recipients_export( $data ) { + $id = $data['id']; + unset( $data['id'] ); + return $this->post( 'campaign/' . $id . '/recipients', json_encode( $data ) ); + } + + /* + Get the Campaign name, subject and share link of the classic type campaigns only which are sent, for those which are not sent and the rest of campaign types like trigger, template & sms, will return an error message of share link not available. + @param {Array} data contains php array with key value pair. + @options data {Array} camp_ids: Id of campaign to get share link. You can use commas to separate multiple ids [Mandatory] + */ + + public function share_campaign( $data ) { + return $this->post( 'campaign/sharelinkv2', json_encode( $data ) ); + } + + /* + Send a Test Campaign. + @param {Array} data contains php array with key value pair. + @options data {Integer} id: Id of the campaign [Mandatory] + @options data {Array} emails: Email address of recipient(s) existing in the one of the lists & should not be blacklisted. Example: "test@example.net". You can use commas to separate multiple recipients [Mandatory] + */ + public function send_bat_email( $data ) { + $id = $data['id']; + unset( $data['id'] ); + return $this->post( 'campaign/' . $id . '/test', json_encode( $data ) ); + } + + /* + Update the Campaign status. + @param {Array} data contains php array with key value pair. + @options data {Integer} id: Id of campaign to update its status [Mandatory] + @options data {String} status: Types of status. Possible values – suspended, archive, darchive, sent, queued, replicate and replicate_template ( case sensitive ) [Mandatory] + */ + public function update_campaign_status( $data ) { + $id = $data['id']; + unset( $data['id'] ); + return $this->put( 'campaign/' . $id . '/updatecampstatus', json_encode( $data ) ); + } + + /* + Create and schedule your Trigger campaigns. + @param {Array} data contains php array with key value pair. + @options data {String} category: Tag name of the campaign [Optional] + @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists] + @options data {String} trigger_name: Name of the campaign [Mandatory] + @options data {String} bat: Email address for test mail [Optional] + @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty] + @options data {String} html_url: Url which content is the body of content [Mandatory: if html_content is empty] + @options data {Array} listid: These are the lists to which the campaign has been sent [Mandatory: if scheduled_date is not empty] + @options data {String} scheduled_date: The day on which the campaign is supposed to run[Optional] + @options data {String} subject: Subject of the campaign [Mandatory] + @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists] + @options data {String} reply_to: The reply to email in the campaign emails [Optional] + @options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in SendinBlue account [Optional] + @options data {Array} exclude_list: These are the lists which must be excluded from the campaign [Optional] + @options data {Integer} recurring: Type of trigger campaign. Possible values = 0 (default) & 1. recurring = 0 means contact can receive the same Trigger campaign only once, & recurring = 1 means contact can receive the same Trigger campaign several times [Optional] + @options data {String} attachment_url: Provide the absolute url of the attachment [Optional] + @options data {Integer} inline_image: Status of inline image. Possible values = 0 (default) & 1. inline_image = 0 means image can’t be embedded, & inline_image = 1 means image can be embedded, in the email [Optional] + @options data {Integer} mirror_active: Status of mirror links in campaign. Possible values = 0 & 1 (default). mirror_active = 0 means mirror links are deactivated, & mirror_active = 1 means mirror links are activated, in the campaign [Optional] + @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional] + */ + public function create_trigger_campaign( $data ) { + return $this->post( 'campaign', json_encode( $data ) ); + } + + /* + Update and schedule your Trigger campaigns. + @param {Array} data contains php array with key value pair. + @options data {Integer} id: Id of Trigger campaign to be modified [Mandatory] + @options data {String} category: Tag name of the campaign [Optional] + @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists] + @options data {String} trigger_name: Name of the campaign [Mandatory] + @options data {String} bat Email address for test mail [Optional] + @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty] + @options data {String} html_url: Url which content is the body of content [Mandatory: if html_content is empty] + @options data {Array} listid: These are the lists to which the campaign has been sent [Mandatory: if scheduled_date is not empty] + @options data {String} scheduled_date: The day on which the campaign is supposed to run[Optional] + @options data {String} subject: Subject of the campaign [Mandatory] + @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists] + @options data {String} reply_to: The reply to email in the campaign emails [Optional] + @options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in SendinBlue account [Optional] + @options data {Array} exclude_list: These are the lists which must be excluded from the campaign [Optional] + @options data {Integer} recurring: Type of trigger campaign. Possible values = 0 (default) & 1. recurring = 0 means contact can receive the same Trigger campaign only once, & recurring = 1 means contact can receive the same Trigger campaign several times [Optional] + @options data {String} attachment_url: Provide the absolute url of the attachment [Optional] + @options data {Integer} inline_image: Status of inline image. Possible values = 0 (default) & 1. inline_image = 0 means image can’t be embedded, & inline_image = 1 means image can be embedded, in the email [Optional] + @options data {Integer} mirror_active: Status of mirror links in campaign. Possible values = 0 & 1 (default). mirror_active = 0 means mirror links are deactivated, & mirror_active = 1 means mirror links are activated, in the campaign [Optional] + @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional] + */ + public function update_trigger_campaign( $data ) { + $id = $data['id']; + unset( $data['id'] ); + return $this->put( 'campaign/' . $id, json_encode( $data ) ); + } + + /* + Get all folders detail. + @param {Array} data contains php array with key value pair. + @options data {Integer} page: Maximum number of records per request is 50, if there are more than 50 folders then you can use this parameter to get next 50 results [Mandatory] + @options data {Integer} page_limit: This should be a valid number between 1-50 [Mandatory] + */ + public function get_folders( $data ) { + return $this->get( 'folder', json_encode( $data ) ); + } + + /* + Get a particular folder detail. + @param {Array} data contains php array with key value pair. + @options data {Integer} id: Id of folder to get details [Mandatory] + */ + public function get_folder( $data ) { + return $this->get( 'folder/' . $data['id'], '' ); + } + + /* + Create a new folder. + @param {Array} data contains php array with key value pair. + @options data {String} name: Desired name of the folder to be created [Mandatory] + */ + public function create_folder( $data ) { + return $this->post( 'folder', json_encode( $data ) ); + } + + /* + Delete a specific folder information. + @param {Array} data contains php array with key value pair. + @options data {Integer} id: Id of folder to be deleted [Mandatory] + */ + public function delete_folder( $data ) { + return $this->delete( 'folder/' . $data['id'], '' ); + } + + /* + Update an existing folder. + @param {Array} data contains php array with key value pair. + @options data {Integer} id: Id of folder to be modified [Mandatory] + @options data {String} name: Desired name of the folder to be modified [Mandatory] + */ + public function update_folder( $data ) { + $id = $data['id']; + unset( $data['id'] ); + return $this->put( 'folder/' . $id, json_encode( $data ) ); + } + + /* + Get all lists detail. + @param {Array} data contains php array with key value pair. + @options data {Integer} list_parent: This is the existing folder id & can be used to get all lists belonging to it [Optional] + @options data {Integer} page: Maximum number of records per request is 50, if there are more than 50 processes then you can use this parameter to get next 50 results [Mandatory] + @options data {Integer} page_limit: This should be a valid number between 1-50 [Mandatory] + */ + public function get_lists( $data ) { + return $this->get( 'list', json_encode( $data ) ); + } + + /* + Get a particular list detail. + @param {Array} data contains php array with key value pair. + @options data {Integer} id: Id of list to get details [Mandatory] + */ + public function get_list( $data ) { + return $this->get( 'list/' . $data['id'], '' ); + } + + /* + Create a new list. + @param {Array} data contains php array with key value pair. + @options data {String} list_name: Desired name of the list to be created [Mandatory] + @options data {Integer} list_parent: Folder ID [Mandatory] + */ + public function create_list( $data ) { + return $this->post( 'list', json_encode( $data ) ); + } + + /* + Update a list. + @param {Array} data contains php array with key value pair. + @options data {Integer} id: Id of list to be modified [Mandatory] + @options data {String} list_name: Desired name of the list to be modified [Optional] + @options data {Integer} list_parent: Folder ID [Mandatory] + */ + public function update_list( $data ) { + $id = $data['id']; + unset( $data['id'] ); + return $this->put( 'list/' . $id, json_encode( $data ) ); + } + + /* + Delete a specific list. + @param {Array} data contains php array with key value pair. + @options data {Integer} id: Id of list to be deleted [Mandatory] + */ + public function delete_list( $data ) { + return $this->delete( 'list/' . $data['id'], '' ); + } + + /* + Display details of all users for the given lists. + @param {Array} data contains php array with key value pair. + @options data {Array} listids: These are the list ids to get their data. The ids found will display records [Mandatory] + @options data {String} timestamp: This is date-time filter to fetch modified user records >= this time. Valid format Y-m-d H:i:s. Example: "2015-05-22 14:30:00" [Optional] + @options data {Integer} page: Maximum number of records per request is 500, if in your list there are more than 500 users then you can use this parameter to get next 500 results [Optional] + @options data {Integer} page_limit: This should be a valid number between 1-500 [Optional] + */ + public function display_list_users( $data ) { + return $this->post( 'list/display', json_encode( $data ) ); + } + + /* + Add already existing users in the SendinBlue contacts to the list. + @param {Array} data contains php array with key value pair. + @options data {Integer} id: Id of list to link users in it [Mandatory] + @options data {Array} users: Email address of the already existing user(s) in the SendinBlue contacts. Example: "test@example.net". You can use commas to separate multiple users [Mandatory] + */ + + public function add_users_list( $data ) { + $id = $data['id']; + unset( $data['id'] ); + return $this->post( 'list/' . $id . '/users', json_encode( $data ) ); + } + + /* + Delete already existing users in the SendinBlue contacts from the list. + @param {Array} data contains php array with key value pair. + @options data {Integer} id: Id of list to unlink users from it [Mandatory] + @options data {Array} users: Email address of the already existing user(s) in the SendinBlue contacts to be modified. Example: "test@example.net". You can use commas to separate multiple users [Mandatory] + */ + public function delete_users_list( $data ) { + $id = $data['id']; + unset( $data['id'] ); + return $this->delete( 'list/' . $id . '/delusers', json_encode( $data ) ); + } + + /* + Access all the attributes information under the account. + No input required + */ + public function get_attributes() { + return $this->get( 'attribute', '' ); + } + + /* + Access the specific type of attribute information. + @param {Array} data contains php array with key value pair. + @options data {String} type: Type of attribute. Possible values – normal, transactional, category, calculated & global [Optional] + */ + public function get_attribute( $data ) { + return $this->get( 'attribute/' . $data['type'], '' ); + } + + /* + Create an Attribute. + @param {Array} data contains php array with key value pair. + @options data {String} type: Type of attribute. Possible values – normal, transactional, category, calculated & global ( case sensitive ) [Mandatory] + @options data {Array} data: The name and data type of ‘normal’ & ‘transactional’ attribute to be created in your SendinBlue account. It should be sent as an associative array. Example: array(‘ATTRIBUTE_NAME1′ => ‘DATA_TYPE1′, ‘ATTRIBUTE_NAME2’=> ‘DATA_TYPE2′). + The name and data value of ‘category’, ‘calculated’ & ‘global’, should be sent as JSON string. Example: ‘[{ "name":"ATTRIBUTE_NAME1", "value":"Attribute_value1" }, { "name":"ATTRIBUTE_NAME2", "value":"Attribute_value2" }]’. You can use commas to separate multiple attributes [Mandatory] + */ + public function create_attribute( $data ) { + return $this->post( 'attribute/', json_encode( $data ) ); + } + + /* + Delete a specific type of attribute information. + @param {Array} data contains php array with key value pair. + @options data {Integer} type: Type of attribute to be deleted [Mandatory] + */ + public function delete_attribute( $type, $data ) { + $type = $data['type']; + unset( $data['type'] ); + return $this->post( 'attribute/' . $type, json_encode( $data ) ); + } + + /* + Create a new user if an email provided as input, doesn’t exists in the contact list of your SendinBlue account, otherwise it will update the existing user. + @param {Array} data contains php array with key value pair. + @options data {String} email: Email address of the user to be created in SendinBlue contacts. Already existing email address of user in the SendinBlue contacts to be modified [Mandatory] + @options data {Array} attributes: The name of attribute present in your SendinBlue account. It should be sent as an associative array. Example: array("NAME"=>"name"). You can use commas to separate multiple attributes [Optional] + @options data {Integer} blacklisted: This is used to blacklist/ Unblacklist a user. Possible values – 0 & 1. blacklisted = 1 means user has been blacklisted [Optional] + @options data {Array} listid: The list id(s) to be linked from user [Optional] + @options data {Array} listid_unlink: The list id(s) to be unlinked from user [Optional] + @options data {Array} blacklisted_sms: This is used to blacklist/ Unblacklist a user’s SMS number. Possible values – 0 & 1. blacklisted_sms = 1 means user’s SMS number has been blacklisted [Optional] + */ + public function create_update_user( $data ) { + return $this->post( 'user/createdituser', json_encode( $data ) ); + } + + /* + Get Access a specific user Information. + @param {Array} data contains php array with key value pair. + @options data {String} email: Email address of the already existing user in the SendinBlue contacts [Mandatory] + */ + public function get_user( $data ) { + return $this->get( 'user/' . $data['email'], '' ); + } + + /* + Unlink existing user from all lists. + @param {Array} data contains php array with key value pair. + @options data {String} email: Email address of the already existing user in the SendinBlue contacts to be unlinked from all lists [Mandatory] + */ + public function delete_user( $data ) { + return $this->delete( 'user/' . $data['email'], '' ); + } + + /* + Import Users Information. + @param {Array} data contains php array with key value pair. + @options data {String} url: The URL of the file to be imported. Possible file types – .txt, .csv [Mandatory: if body is empty] + @options data {String} body: The Body with csv content to be imported. Example: ‘NAME;SURNAME;EMAIL\n"Name1";"Surname1";"example1@example.net"\n"Name2";"Surname2";"example2@example.net"‘, where \n separates each user data. You can use semicolon to separate multiple attributes [Mandatory: if url is empty] + @options data {Array} listids: These are the list ids in which the the users will be imported [Mandatory: if name is empty] + @options data {String} notify_url: URL that will be called once the import process is finished [Optional] In notify_url, we are sending the content using POST method + @options data {String} name: This is new list name which will be created first & then users will be imported in it [Mandatory: if listids is empty] + @options data {Integer} list_parent: This is the existing folder id & can be used with name parameter to make newly created list’s desired parent [Optional] + */ + public function import_users( $data ) { + return $this->post( 'user/import', json_encode( $data ) ); + } + + /* + Export Users Information. + @param {Array} data contains php array with key value pair. + @options data {String} export_attrib: The name of attribute present in your SendinBlue account. You can use commas to separate multiple attributes. Example: "EMAIL,NAME,SMS" [Optional] + @options data {String} filter: Filter can be added to export users. Example: "{\"blacklisted\":1}", will export all blacklisted users [Mandatory] + @options data {String} notify_url: URL that will be called once the export process is finished [Optional] + */ + public function export_users( $data ) { + return $this->post( 'user/export', json_encode( $data ) ); + } + + /* + Get all the processes information under the account. + @param {Array} data contains php array with key value pair. + @options data {Integer} page: Maximum number of records per request is 50, if there are more than 50 processes then you can use this parameter to get next 50 results [Mandatory] + @options data {Integer} page_limit: This should be a valid number between 1-50 [Mandatory] + */ + public function get_processes( $data ) { + return $this->get( 'process', json_encode( $data ) ); + } + + /* + Get the process information. + @param {Array} data contains php array with key value pair. + @options data {Integer} id: Id of process to get details [Mandatory] + */ + public function get_process( $data ) { + return $this->get( 'process/' . $data['id'], '' ); + } + + /* + To retrieve details of all webhooks. + @param {Array} data contains php array with key value pair. + @options data {String} is_plat: Flag to get webhooks. Possible values – 0 & 1. Example: to get Transactional webhooks, use $is_plat=0, to get Marketing webhooks, use $is_plat=1, & to get all webhooks, use $is_plat="" [Optional] + */ + public function get_webhooks( $data ) { + return $this->get( 'webhook', json_encode( $data ) ); + } + + /* + To retrieve details of any particular webhook. + @param {Array} data contains php array with key value pair. + @options data {Integer} id: Id of webhook to get details [Mandatory] + */ + public function get_webhook( $data ) { + return $this->get( 'webhook/' . $data['id'], '' ); + } + + /* + Create a Webhook. + @param {Array} data contains php array with key value pair. + @options data {String} url: URL that will be triggered by a webhook [Mandatory] + @options data {String} description: Webook description [Optional] + @options data {Array} events: Set of events. You can use commas to separate multiple events. Possible values for Transcational webhook – request, delivered, hard_bounce, soft_bounce, blocked, spam, invalid_email, deferred, click, & opened and Possible Values for Marketing webhook – spam, opened, click, hard_bounce, unsubscribe, soft_bounce & list_addition ( case sensitive ) [Mandatory] + @options data {Integer} is_plat: Flag to create webhook type. Possible values – 0 (default) & 1. Example: to create Transactional webhooks, use $is_plat=0, & to create Marketing webhooks, use $is_plat=1 [Optional] + */ + public function create_webhook( $data ) { + return $this->post( 'webhook', json_encode( $data ) ); + } + + /* + Delete a webhook. + @param {Array} data contains php array with key value pair. + @options data {Integer} id: Id of webhook to be deleted [Mandatory] + */ + public function delete_webhook( $data ) { + return $this->delete( 'webhook/' . $data['id'], '' ); + } + + /* + Update a webhook. + @param {Array} data contains php array with key value pair. + @options data {Integer} id: Id of webhook to be modified [Mandatory] + @options data {String} url: URL that will be triggered by a webhook [Mandatory] + @options data {String} description: Webook description [Optional] + @options data {Array} events: Set of events. You can use commas to separate multiple events. Possible values for Transcational webhook – request, delivered, hard_bounce, soft_bounce, blocked, spam, invalid_email, deferred, click, & opened and Possible Values for Marketing webhook – spam, opened, click, hard_bounce, unsubscribe, soft_bounce & list_addition ( case sensitive ) [Mandatory] + */ + public function update_webhook( $data ) { + $id = $data['id']; + unset( $data['id'] ); + return $this->put( 'webhook/' . $id, json_encode( $data ) ); + } + + /* + Get Access of created senders information. + @param {Array} data contains php array with key value pair. + @options data {String} option: Options to get senders. Possible options – IP-wise, & Domain-wise ( only for dedicated IP clients ). Example: to get senders with specific IP, use $option=’1.2.3.4′, to get senders with specific domain use, $option=’domain.com’, & to get all senders, use $option="" [Optional] + */ + public function get_senders( $data ) { + return $this->get( 'advanced', json_encode( $data ) ); + } + + /* + Create your Senders. + @param {Array} data contains php array with key value pair. + @options data {String} name: Name of the sender [Mandatory] + @options data {String} email: Email address of the sender [Mandatory] + @options data {Array} ip_domain: Pass pipe ( | ) separated Dedicated IP and its associated Domain. Example: "1.2.3.4|mydomain.com". You can use commas to separate multiple ip_domain’s [Mandatory: Only for Dedicated IP clients, for Shared IP clients, it should be kept blank] + */ + public function create_sender( $data ) { + return $this->post( 'advanced', json_encode( $data ) ); + } + + /* + Update your Senders. + @param {Array} data contains php array with key value pair. + @options data {Integer} id: Id of sender to be modified [Mandatory] + @options data {String} name: Name of the sender [Mandatory] + @options data {Array} ip_domain: Pass pipe ( | ) separated Dedicated IP and its associated Domain. Example: "1.2.3.4|mydomain.com". You can use commas to separate multiple ip_domain’s [Mandatory: Only for Dedicated IP clients, for Shared IP clients, it should be kept blank] + */ + public function update_sender( $data ) { + $id = $data['id']; + unset( $data['id'] ); + return $this->put( 'advanced/' . $id, json_encode( $data ) ); + } + + /* + Delete your Sender Information. + @param {Array} data contains php array with key value pair. + @options data {Integer} id: Id of sender to be deleted [Mandatory] + */ + public function delete_sender( $data ) { + return $this->delete( 'advanced/' . $data['id'], '' ); + } + + /* + Send Transactional Email. + @param {Array} data contains php array with key value pair. + @options data {Array} to: Email address of the recipient(s). It should be sent as an associative array. Example: array("to@example.net"=>"to whom"). You can use commas to separate multiple recipients [Mandatory] + @options data {String} subject: Message subject [Mandatory] + @options data {Array} from Email address for From header. It should be sent as an array. Example: array("from@email.com","from email") [Mandatory] + @options data {String} html: Body of the message. (HTML version) [Mandatory]. To send inline images, use image, the 'src' attribute value inside {} (curly braces) should be same as the filename used in 'inline_image' parameter + @options data {String} text: Body of the message. (text version) [Optional] + @options data {Array} cc: Same as to but for Cc. Example: array("cc@example.net","cc whom") [Optional] + @options data {Array} bcc: Same as to but for Bcc. Example: array("bcc@example.net","bcc whom") [Optional] + @options data {Array} replyto: Same as from but for Reply To. Example: array("from@email.com","from email") [Optional] + @options data {Array} attachment: Provide the absolute url of the attachment/s. Possible extension values = gif, png, bmp, cgm, jpg, jpeg, txt, css, shtml, html, htm, csv, zip, pdf, xml, doc, xls, ppt, tar, and ez. To send attachment/s generated on the fly you have to pass your attachment/s filename & its base64 encoded chunk data as an associative array. Example: array("YourFileName.Extension"=>"Base64EncodedChunkData"). You can use commas to separate multiple attachments [Optional] + @options data {Array} headers: The headers will be sent along with the mail headers in original email. Example: array("Content-Type"=>"text/html; charset=iso-8859-1"). You can use commas to separate multiple headers [Optional] + @options data {Array} inline_image: Pass your inline image/s filename & its base64 encoded chunk data as an associative array. Example: array("YourFileName.Extension"=>"Base64EncodedChunkData"). You can use commas to separate multiple inline images [Optional] + */ + public function send_email( $data ) { + return $this->post( 'email', json_encode( $data ) ); + } + + /* + Aggregate / date-wise report of the SendinBlue SMTP account. + @param {Array} data contains php array with key value pair. + @options data {Integer} aggregate: This is used to indicate, you are interested in all-time totals. Possible values – 0 & 1. aggregate = 0 means it will not aggregate records, and will show stats per day/date wise [Optional] + @options data {String} start_date: The start date to look up statistics. Date must be in YYYY-MM-DD format and should be before the end_date [Optional] + @options data {String} end_date: The end date to look up statistics. Date must be in YYYY-MM-DD format and should be after the start_date [Optional] + @options data {Integer} days: Number of days in the past to include statistics ( Includes today ). It must be an integer greater than 0 [Optional] + @options data {String} tag: The tag you will specify to retrieve detailed stats. It must be an existing tag that has statistics [Optional] + */ + public function get_statistics( $data ) { + return $this->post( 'statistics', json_encode( $data ) ); + } + + /* + Get Email Event report. + @param {Array} data contains php array with key value pair. + @options data {Integer} limit: To limit the number of results returned. It should be an integer [Optional] + @options data {String} start_date: The start date to get report from. Date must be in YYYY-MM-DD format and should be before the end_date [Optional] + @options data {String} end_date: The end date to get report till date. Date must be in YYYY-MM-DD format and should be after the start_date [Optional] + @options data {Integer} offset: Beginning point in the list to retrieve from. It should be an integer [Optional] + @options data {String} date: Specific date to get its report. Date must be in YYYY-MM-DD format and should be earlier than todays date [Optional] + @options data {Integer} days: Number of days in the past (includes today). If specified, must be an integer greater than 0 [Optional] + @options data {String} email: Email address to search report for [Optional] + */ + public function get_report( $data ) { + return $this->post( 'report', json_encode( $data ) ); + } + + /* + Delete any hardbounce, which actually would have been blocked due to some temporary ISP failures. + @param {Array} data contains php array with key value pair. + @options data {String} start_date: The start date to get report from. Date must be in YYYY-MM-DD format and should be before the end_date [Optional] + @options data {String} end_date: The end date to get report till date. Date must be in YYYY-MM-DD format and should be after the start_date [Optional] + @options data {String} email: Email address to delete its bounces [Optional] + */ + public function delete_bounces( $data ) { + return $this->post( 'bounces', json_encode( $data ) ); + } + + /* + Send templates created on SendinBlue, through SendinBlue SMTP (transactional mails). + @param {Array} data contains php array with key value pair. + @options data {Integer} id: Id of the template created on SendinBlue account [Mandatory] + @options data {String} to: Email address of the recipient(s). You can use pipe ( | ) to separate multiple recipients. Example: "to-example@example.net|to2-example@example.net" [Mandatory] + @options data {String} cc: Same as to but for Cc [Optional] + @options data {String} bcc: Same as to but for Bcc [Optional] + @options data {Array} attrv The name of attribute present in your SendinBlue account. It should be sent as an associative array. Example: array("NAME"=>"name"). You can use commas to separate multiple attributes [Optional] + @options data {String} attachment_url: Provide the absolute url of the attachment. Url not allowed from local machine. File must be hosted somewhere [Optional] + @options data {Array} attachment: To send attachment/s generated on the fly you have to pass your attachment/s filename & its base64 encoded chunk data as an associative array [Optional] + */ + public function send_transactional_template( $data ) { + $id = $data['id']; + unset( $data['id'] ); + return $this->put( 'template/' . $id, json_encode( $data ) ); + } + + /* + Create a Template. + @param {Array} data contains php array with key value pair. + @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients & for Shared IP clients, if sender exists] + @options data {String} template_name: Name of the Template [Mandatory] + @options data {String} bat: Email address for test mail [Optional] + @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty] + @options data {String} html_url Url: which content is the body of content [Mandatory: if html_content is empty] + @options data {String} subject: Subject of the campaign [Mandatory] + @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients & for Shared IP clients, if sender exists] + @options data {String} reply_to: The reply to email in the campaign emails [Optional] + @options data {String} to_fieldv This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in SendinBlue account [Optional] + @options data {Integer} status: Status of template. Possible values = 0 (default) & 1. status = 0 means template is inactive, & status = 1 means template is active [Optional] + @options data {Integer} attachment: Status of attachment. Possible values = 0 (default) & 1. attach = 0 means an attachment can’t be sent, & attach = 1 means an attachment can be sent, in the email [Optional] + */ + public function create_template( $data ) { + return $this->post( 'template', json_encode( $data ) ); + } + + /* + Update a Template. + @param {Array} data contains php array with key value pair. + @options data {Integer} id: Id of Template to be modified [Mandatory] + @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients & for Shared IP clients, if sender exists] + @options data {String} template_name: Name of the Template [Mandatory] + @options data {String} bat: Email address for test mail [Optional] + @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty] + @options data {String} html_url: Url which content is the body of content [Mandatory: if html_content is empty] + @options data {String} subject: Subject of the campaign [Mandatory] + @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients & for Shared IP clients, if sender exists] + @options data {String} reply_to: The reply to email in the campaign emails [Optional] + @options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in SendinBlue account [Optional] + @options data {Integer} status: Status of template. Possible values = 0 (default) & 1. status = 0 means template is inactive, & status = 1 means template is active [Optional] + @options data {Integer} attachment: Status of attachment. Possible values = 0 (default) & 1. attach = 0 means an attachment can’t be sent, & attach = 1 means an attachment can be sent, in the email [Optional] + */ + public function update_template( $data ) { + $id = $data['id']; + unset( $data['id'] ); + return $this->put( 'template/' . $id, json_encode( $data ) ); + } + + /* + Send a transactional SMS. + @param {Array} data contains php array with key value pair. + @options data {String} to: The mobile number to send SMS to with country code [Mandatory] + @options data {String} from: The name of the sender. The number of characters is limited to 11 (alphanumeric format) [Mandatory] + @options data {String} text: The text of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS [Mandatory] + @options data {String} web_url: The web URL that can be called once the message is successfully delivered [Optional] + @options data {String} tag: The tag that you can associate with the message [Optional] + @options data {String} type: Type of message. Possible values – marketing (default) & transactional. You can use marketing for sending marketing SMS, & for sending transactional SMS, use transactional type [Optional] + */ + public function send_sms( $data ) { + return $this->post( 'sms', json_encode( $data ) ); + } + + /* + Create & Schedule your SMS campaigns. + @param {Array} data contains php array with key value pair. + @options data {String} name: Name of the SMS campaign [Mandatory] + @options data {String} sender: This allows you to customize the SMS sender. The number of characters is limited to 11 ( alphanumeric format ) [Optional] + @options data {String} content: Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS [Optional] + @options data {String} bat: Mobile number with the country code to send test SMS. The mobile number defined here should belong to one of your contacts in SendinBlue account and should not be blacklisted [Optional] + @options data {Array} listid: These are the list ids to which the SMS campaign is sent [Mandatory: if scheduled_date is not empty] + @options data {Array} exclude_list: These are the list ids which will be excluded from the SMS campaign [Optional] + @options data {String} scheduled_date: The day on which the SMS campaign is supposed to run [Optional] + @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional] + */ + public function create_sms_campaign( $data ) { + return $this->post( 'sms', json_encode( $data ) ); + } + + /* + Update your SMS campaigns. + @param {Array} data contains php array with key value pair. + @options data {Integer} id: Id of the SMS campaign [Mandatory] + @options data {String} name: Name of the SMS campaign [Optional] + @options data {String} sender: This allows you to customize the SMS sender. The number of characters is limited to 11 ( alphanumeric format ) [Optional] + @options data {String} content: Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS [Optional] + @options data {String} bat: Mobile number with the country code to send test SMS. The mobile number defined here should belong to one of your contacts in SendinBlue account and should not be blacklisted [Optional] + @options data {Array} listid: hese are the list ids to which the SMS campaign is sent [Mandatory: if scheduled_date is not empty] + @options data {Array} exclude_list: These are the list ids which will be excluded from the SMS campaign [Optional] + @options data {String} scheduled_date: The day on which the SMS campaign is supposed to run [Optional] + @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional] + */ + public function update_sms_campaign( $data ) { + $id = $data['id']; + unset( $data['id'] ); + return $this->put( 'sms/' . $id, json_encode( $data ) ); + } + + /* + Send a Test SMS. + @param {Array} data contains php array with key value pair. + @options data {Integer} id: Id of the SMS campaign [Mandatory] + @options data {String} to: Mobile number with the country code to send test SMS. The mobile number defined here should belong to one of your contacts in SendinBlue account and should not be blacklisted [Mandatory] + */ + public function send_bat_sms( $data ) { + $id = $data['id']; + unset( $data['id'] ); + return $this->get( 'sms/' . $id, json_encode( $data ) ); + } + +} diff --git a/admin/partials/pirateforms-settings-sidebar-subscribe.php b/admin/partials/pirateforms-settings-sidebar-subscribe.php index d6c2bb0..975e0e0 100644 --- a/admin/partials/pirateforms-settings-sidebar-subscribe.php +++ b/admin/partials/pirateforms-settings-sidebar-subscribe.php @@ -26,7 +26,7 @@ class="btn">
    Date: Tue, 23 Jan 2018 11:38:56 +0530 Subject: [PATCH 061/123] loader.gif was missing --- admin/img/loader.gif | Bin 0 -> 4592 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 admin/img/loader.gif diff --git a/admin/img/loader.gif b/admin/img/loader.gif new file mode 100644 index 0000000000000000000000000000000000000000..0250ac5e16cf437e2acf9d07d34484514e66eaea GIT binary patch literal 4592 zcmeH}SzMEMx`4lIWCfBCARu580tSp25H%Fkj}SsYDgjYIs7=_#E#MYgv{@lxk$?!O zfI&dix`f3M9dQx}ia<4>Ra_euE4Tt~RNLubk2B}z&0L+!^WA)R|BL7MJn#F4h4a_} zA~HY*-ZOxQ4Vd0v14FhprfN>@7}!% zh2q$;V|jUb>FMdWZrytG=FQcsS6{w-dHVEegTe6R$&-nRiP6!~p`js-M)U2r-=?Of zo;h=-y1IH~WaPnv2mAKzGnq_3{`g}{OG|lq`Sa(`mo8m;?%cV+z`zwNR%B#keD~dV zA3l6IeE6_Vr`xh+%i!SP?c2AvZ{NOg(-k$Zw?O+PfbmQhK6dj+Q!Dl zgoK36n>XLMapTdWM<573e*E~wixf69L&61p4B>_GtbV>gUk|0>jyB-TqYovDmIW%ZON+y5WtAD#^_B3gAoE; zS-~(L@`FB?p*GDGh-F>xa9)eJY}UO>p$2>X{CweWRK-*U%7LXj0|a4g-HGK3`65$( z1Lo8`Gn()`&Kw=5wJFd<*Ugw4Wa&B8_4c?YprUmuc@$lmlGKn-Ft z&20p7Lt(xK7WX?ywjiA`kW1QNDx|@H%J>S^Pi`(O^RTtQO4z0LLwNBsc=dM?r@TyYGR4_iEhhvVN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V!h{ZkjxubP%)AG}LU)gSoB2LNoCouum04_7|JiQgHV0 zB%zC7U4BT5FWKL9hQq@u7r8aCS-PW8M_2~4eR$D?jLh)9ED2U1m589tytSpBmK-H! zZEX1kjur5%-+gS3#0Y)}u`;>4NQOI8*1p!d`wJ)8|BUQ)hC%Vfb>1lSKPuKO2qb zG~Yx<961_7e@n=0Qisa~4(-v&#?;W-`TO}1+ORQj;le7`HM@a*5E!$f8_}qFt9l|#TAdgQ+cWdwkNIqxsLN{Y?Z)r@k{_vrZ9?@>(?%1O zKQg0z6A(dy<<#wC5t?L$-OPEAGK5g#rx(D7E4;A6R%w~en9fKfku6o+&F%{* zky#=jjZa39UwD_pY3%X|)K5w;QMMy^#LE z0|%~_yZ-N4V)dnM)}JmrO1T_mM>NSp>p09P2V5$fpa_vI5#W#0SjY+m>2E+gL#!#Y zMmCSJtLh7^RZG@8>x4424UE(p>l83)F<@7D3s?f(wY-BNi8hOcie3k~Q!IW6RB;fs zP_I;9-8KVI2tWS@MX{uF=Bz)@3}x$(@k(kMu>nx|d{c(<-K6ilQ;?tv5Z}TFQLxgE zJ%4)QnB*`KY{#=R-B>58y_dCJ`iZH(QSuOR$4I~_FxdKn$7%M!bh&%*9QWqf9&y(> z17l8>OHj2DwBKicbPSIYh8N#Sq%M?nX3MxhbOo+~b&z5|zr&iT&e3xUnjBkaTLgCg j{RRSa(y_m+uG8>hC6*ce3SU6-g71lWS#?(g0)hVmZ2o0F literal 0 HcmV?d00001 From 3e86cc3b626838dc397ceeb10268972505decbb3 Mon Sep 17 00:00:00 2001 From: Rodica-Elena Andronache Date: Wed, 31 Jan 2018 15:54:10 +0200 Subject: [PATCH 062/123] Fixed undefined notice popping sometimes --- public/class-pirateforms-public.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/class-pirateforms-public.php b/public/class-pirateforms-public.php index 20b37a9..bb4da72 100644 --- a/public/class-pirateforms-public.php +++ b/public/class-pirateforms-public.php @@ -79,7 +79,7 @@ public function enqueue_styles_and_scripts() { $deps = array( 'jquery' ); $pirate_forms_options = get_option( 'pirate_forms_settings_array' ); if ( ! empty( $pirate_forms_options ) ) : - if ( ! empty( $pirate_forms_options['pirateformsopt_recaptcha_secretkey'] ) && ! empty( $pirate_forms_options['pirateformsopt_recaptcha_sitekey'] ) && 'yes' === $pirate_forms_options['pirateformsopt_recaptcha_field'] ) : + if ( ! empty( $pirate_forms_options['pirateformsopt_recaptcha_secretkey'] ) && ! empty( $pirate_forms_options['pirateformsopt_recaptcha_sitekey'] ) && ! empty( $pirate_forms_options['pirateformsopt_recaptcha_field'] ) && ( 'yes' === $pirate_forms_options['pirateformsopt_recaptcha_field'] ) ) : if ( defined( 'POLYLANG_VERSION' ) && function_exists( 'pll_current_language' ) ) { $pirate_forms_contactus_language = pll_current_language(); } else { From 075660df7819f6a3a0bb14973a37d97ece58bf62 Mon Sep 17 00:00:00 2001 From: Rodica-Elena Andronache Date: Wed, 31 Jan 2018 16:33:12 +0200 Subject: [PATCH 063/123] Fixed notice --- public/class-pirateforms-public.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/class-pirateforms-public.php b/public/class-pirateforms-public.php index bb4da72..46db798 100644 --- a/public/class-pirateforms-public.php +++ b/public/class-pirateforms-public.php @@ -324,7 +324,7 @@ public function display_form( $atts, $content = null ) { endif; /** ******* ReCaptcha */ - if ( ! empty( $pirate_forms_options['pirateformsopt_recaptcha_secretkey'] ) && ! empty( $pirate_forms_options['pirateformsopt_recaptcha_sitekey'] ) && 'yes' === $pirate_forms_options['pirateformsopt_recaptcha_field'] ) : + if ( ! empty( $pirate_forms_options['pirateformsopt_recaptcha_secretkey'] ) && ! empty( $pirate_forms_options['pirateformsopt_recaptcha_sitekey'] ) && ! empty( $pirate_forms_options['pirateformsopt_recaptcha_field'] ) && ( 'yes' === $pirate_forms_options['pirateformsopt_recaptcha_field'] ) ) : $pirateformsopt_recaptcha_sitekey = $pirate_forms_options['pirateformsopt_recaptcha_sitekey']; $pirateformsopt_recaptcha_secretkey = $pirate_forms_options['pirateformsopt_recaptcha_secretkey']; $elements[] = array( @@ -340,7 +340,7 @@ public function display_form( $atts, $content = null ) { ); endif; - if ( 'custom' === $pirate_forms_options['pirateformsopt_recaptcha_field'] ) : + if ( ! empty( $pirate_forms_options['pirateformsopt_recaptcha_field'] ) && ( 'custom' === $pirate_forms_options['pirateformsopt_recaptcha_field'] ) ) : $elements[] = array( 'type' => 'div', 'class' => 'pirate-forms-maps-custom', // spam.reverse() = maps From d7675a4adae71fe2c6de1354c1f08edbcb3061bb Mon Sep 17 00:00:00 2001 From: Rohit Motwani Date: Thu, 1 Feb 2018 16:49:45 +0530 Subject: [PATCH 064/123] Author email ID corrections --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index a9dddcc..cd0f3d9 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ "authors": [ { "name": "ThemeIsle Team", - "email": "friends@themeisle.com.com", + "email": "friends@themeisle.com", "homepage": "https://themeisle.com" } ], @@ -36,4 +36,4 @@ "xrstf\\Composer52\\Generator::onPostInstallCmd" ] } -} \ No newline at end of file +} From 2559aa946d384714d9b54855daf462bfb2650a11 Mon Sep 17 00:00:00 2001 From: Rohit Motwani Date: Tue, 6 Feb 2018 01:26:38 +0530 Subject: [PATCH 065/123] Added Class check --- admin/mailin.php | 867 ------------------ ...pirateforms-settings-sidebar-subscribe.php | 4 +- composer.json | 3 +- 3 files changed, 5 insertions(+), 869 deletions(-) delete mode 100644 admin/mailin.php diff --git a/admin/mailin.php b/admin/mailin.php deleted file mode 100644 index f8df9de..0000000 --- a/admin/mailin.php +++ /dev/null @@ -1,867 +0,0 @@ -base_url = $base_url; - $this->api_key = $api_key; - } - /** - * Do CURL request with authorization - */ - private function do_request( $resource, $method, $input ) { - $called_url = $this->base_url . '/' . $resource; - $ch = curl_init( $called_url ); - $auth_header = 'api-key:' . $this->api_key; - $content_header = 'Content-Type:application/json'; - if ( strtoupper( substr( PHP_OS, 0, 3 ) ) === 'WIN' ) { - // Windows only over-ride - curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false ); - } - curl_setopt( $ch, CURLOPT_HTTPHEADER, array($auth_header, $content_header) ); - curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1 ); - curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, $method ); - curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 ); - curl_setopt( $ch, CURLOPT_HEADER, 0 ); - curl_setopt( $ch, CURLOPT_POSTFIELDS, $input ); - $data = curl_exec( $ch ); - if ( curl_errno( $ch ) ) { - echo 'Curl error: ' . curl_error( $ch ) . '\n'; - } - curl_close( $ch ); - return json_decode( $data, true ); - } - public function get( $resource, $input ) { - return $this->do_request( $resource, 'GET', $input ); - } - public function put( $resource, $input ) { - return $this->do_request( $resource, 'PUT', $input ); - } - public function post( $resource, $input ) { - return $this->do_request( $resource, 'POST', $input ); - } - public function delete( $resource, $input ) { - return $this->do_request( $resource, 'DELETE', $input ); - } - - /* - Get Account. - No input required - */ - public function get_account() { - return $this->get( 'account', '' ); - } - - /* - Get SMTP details. - No input required - */ - public function get_smtp_details() { - return $this->get( 'account/smtpdetail', '' ); - } - - /* - Create Child Account. - @param {Array} data contains php array with key value pair. - @options data {String} child_email: Email address of Reseller child [Mandatory] - @options data {String} password: Password of Reseller child to login [Mandatory] - @options data {String} company_org: Name of Reseller child’s company [Mandatory] - @options data {String} first_name: First name of Reseller child [Mandatory] - @options data {String} last_name: Last name of Reseller child [Mandatory] - @options data {Array} credits: Number of email & sms credits respectively, which will be assigned to the Reseller child’s account [Optional] - - email_credit {Integer} number of email credits - - sms_credit {Integer} Number of sms credts - @options data {Array} associate_ip: Associate dedicated IPs to reseller child. You can use commas to separate multiple IPs [Optional] - */ - public function create_child_account( $data ) { - return $this->post( 'account', json_encode( $data ) ); - } - - /* - Update Child Account. - @param {Array} data contains php array with key value pair. - @options data {String} auth_key: 16 character authorization key of Reseller child to be modified [Mandatory] - @options data {String} company_org: Name of Reseller child’s company [Optional] - @options data {String} first_name: First name of Reseller child [Optional] - @options data {String} last_name: Last name of Reseller child [Optional] - @options data {String} password: Password of Reseller child to login [Optional] - @options data {Array} associate_ip: Associate dedicated IPs to reseller child. You can use commas to separate multiple IPs [Optional] - @options data {Array} disassociate_ip: Disassociate dedicated IPs from reseller child. You can use commas to separate multiple IPs [Optional] - */ - public function update_child_account( $data ) { - return $this->put( 'account', json_encode( $data ) ); - } - - /* - Delete Child Account. - @param {Array} data contains php array with key value pair. - @options data {String} auth_key: 16 character authorization key of Reseller child to be deleted [Mandatory] - */ - public function delete_child_account( $data ) { - return $this->delete( 'account/' . $data['auth_key'], '' ); - } - - /* - Get Reseller child Account. - @param {Array} data contains php array with key value pair. - @options data {String} auth_key: 16 character authorization key of Reseller child. Example : To get the details of more than one child account, use, {"key1":"abC01De2fGHI3jkL","key2":"mnO45Pq6rSTU7vWX"} [Mandatory] - */ - public function get_reseller_child( $data ) { - return $this->post( 'account/getchildv2', json_encode( $data ) ); - } - - /* - Add/Remove Reseller child's Email/Sms credits. - @param {Array} data contains php array with key value pair. - @options data {String} auth_key: 16 character authorization key of Reseller child to modify credits [Mandatory] - @options data {Array} add_credit: Number of email & sms credits to be added. You can assign either email or sms credits, one at a time other will remain 0. [Mandatory: if rmv_credit is empty] - - email_credit {Integer} number of email credits - - sms_credit {Integer} Number of sms credts - @options data {Array} rmv_credit: Number of email & sms credits to be removed. You can assign either email or sms credits, one at a time other will remain 0. [Mandatory: if add_credits is empty] - - email_credit {Integer} number of email credits - - sms_credit {Integer} Number of sms credts - */ - public function add_remove_child_credits( $data ) { - return $this->post( 'account/addrmvcredit', json_encode( $data ) ); - } - - /* - Get a particular campaign detail. - @param {Array} data contains php array with key value pair. - @options data {Integer} id: Unique Id of the campaign [Mandatory] - */ - public function get_campaign_v2( $data ) { - return $this->get( 'campaign/' . $data['id'] . '/detailsv2', '' ); - } - - /* - Get all campaigns detail. - @param {Array} data contains php array with key value pair. - @options data {String} type: Type of campaign. Possible values – classic, trigger, sms, template ( case sensitive ) [Optional] - @options data {String} status: Status of campaign. Possible values – draft, sent, archive, queued, suspended, in_process, temp_active, temp_inactive ( case sensitive ) [Optional] - @options data {Integer} page: Maximum number of records per request is 500, if there are more than 500 campaigns then you can use this parameter to get next 500 results [Optional] - @options data {Integer} page_limit: This should be a valid number between 1-500 [Optional] - */ - public function get_campaigns_v2( $data ) { - return $this->get( 'campaign/detailsv2', json_encode( $data ) ); - } - - /* - Create and Schedule your campaigns. It returns the ID of the created campaign. - @param {Array} data contains php array with key value pair. - @options data {String} category: Tag name of the campaign [Optional] - @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists] - @options data {String} name: Name of the campaign [Mandatory] - @options data {String} bat: Email address for test mail [Optional] - @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty] - @options data {String} html_url: Url which content is the body of content [Mandatory: if html_content is empty] - @options data {Array} listid: These are the lists to which the campaign has been sent [Mandatory: if scheduled_date is not empty] - @options data {String} scheduled_date: The day on which the campaign is supposed to run[Optional] - @options data {String} subject: Subject of the campaign [Mandatory] - @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists] - @options data {String} reply_to: The reply to email in the campaign emails [Optional] - @options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM] To use the contact attributes here, these should already exist in SendinBlue account [Optional] - @options data {Array} exclude_list: These are the lists which must be excluded from the campaign [Optional] - @options data {String} attachment_url: Provide the absolute url of the attachment [Optional] - @options data {Integer} inline_image: Status of inline image. Possible values = 0 (default) & 1. inline_image = 0 means image can’t be embedded, & inline_image = 1 means image can be embedded, in the email [Optional] - @options data {Integer} mirror_active: Status of mirror links in campaign. Possible values = 0 & 1 (default). mirror_active = 0 means mirror links are deactivated, & mirror_active = 1 means mirror links are activated, in the campaign [Optional] - @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional] - - */ - public function create_campaign( $data ) { - return $this->post( 'campaign', json_encode( $data ) ); - } - - /* - Update your campaign. - @param {Array} data contains php array with key value pair. - @options data {Integer} id: Id of campaign to be modified [Mandatory] - @options data {String} category: Tag name of the campaign [Optional] - @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists] - @options data {String} name: Name of the campaign [Optional] - @options data {String} bat: Email address for test mail [Optional] - @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Optional] - @options data {String} html_url: Url which content is the body of content [Optional] - @options data {Array} listid These are the lists to which the campaign has been sent [Mandatory: if scheduled_date is not empty] - @options data {String} scheduled_date: The day on which the campaign is supposed to run[Optional] - @options data {String} subject: Subject of the campaign. - @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists] - @options data {String} reply_to: The reply to email in the campaign emails [Optional] - @options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in SendinBlue account [Optional] - @options data {Array} exclude_list: These are the lists which must be excluded from the campaign [Optional] - @options data {String} attachment_url: Provide the absolute url of the attachment [Optional] - @options data {Integer} inline_image: Status of inline image. Possible values = 0 (default) & 1. inline_image = 0 means image can’t be embedded, & inline_image = 1 means image can be embedded, in the email [Optional] - @options data {Integer} mirror_active: Status of mirror links in campaign. Possible values = 0 & 1 (default). mirror_active = 0 means mirror links are deactivated, & mirror_active = 1 means mirror links are activated, in the campaign [Optional] - @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional] - */ - public function update_campaign( $data ) { - $id = $data['id']; - unset( $data['id'] ); - return $this->put( 'campaign/' . $id, json_encode( $data ) ); - } - - /* - Delete your campaigns. - @param {Array} data contains php array with key value pair. - @options data {Integer} id: Id of campaign to be deleted [Mandatory] - */ - public function delete_campaign( $data ) { - return $this->delete( 'campaign/' . $data['id'], '' ); - } - - /* - Send report of Sent and Archived campaign. - @param {Array} data contains php array with key value pair. - @options data {Integer} id: Id of campaign to send its report [Mandatory] - @options data {String} lang: Language of email content. Possible values – fr (default), en, es, it & pt [Optional] - @options data {String} email_subject: Message subject [Mandatory] - @options data {Array} email_to: Email address of the recipient(s). Example: "test@example.net". You can use commas to separate multiple recipients [Mandatory] - @options data {String} email_content_type: Body of the message in text/HTML version. Possible values – text & html [Mandatory] - @options data {Array} email_bcc: Same as email_to but for Bcc [Optional] - @options data {Array} email_cc: Same as email_to but for Cc [Optional] - @options data {String} email_body: Body of the message [Mandatory] - */ - public function campaign_report_email( $data ) { - $id = $data['id']; - unset( $data['id'] ); - return $this->post( 'campaign/' . $id . '/report', json_encode( $data ) ); - } - - /* - Export the recipients of a specified campaign. - @param {Array} data contains php array with key value pair. - @options data {Integer} id: Id of campaign to export its recipients [Mandatory] - @options data {String} notify_url: URL that will be called once the export process is finished [Mandatory] - @options data {String} type: Type of recipients. Possible values – all, non_clicker, non_opener, clicker, opener, soft_bounces, hard_bounces & unsubscribes [Mandatory] - */ - public function campaign_recipients_export( $data ) { - $id = $data['id']; - unset( $data['id'] ); - return $this->post( 'campaign/' . $id . '/recipients', json_encode( $data ) ); - } - - /* - Get the Campaign name, subject and share link of the classic type campaigns only which are sent, for those which are not sent and the rest of campaign types like trigger, template & sms, will return an error message of share link not available. - @param {Array} data contains php array with key value pair. - @options data {Array} camp_ids: Id of campaign to get share link. You can use commas to separate multiple ids [Mandatory] - */ - - public function share_campaign( $data ) { - return $this->post( 'campaign/sharelinkv2', json_encode( $data ) ); - } - - /* - Send a Test Campaign. - @param {Array} data contains php array with key value pair. - @options data {Integer} id: Id of the campaign [Mandatory] - @options data {Array} emails: Email address of recipient(s) existing in the one of the lists & should not be blacklisted. Example: "test@example.net". You can use commas to separate multiple recipients [Mandatory] - */ - public function send_bat_email( $data ) { - $id = $data['id']; - unset( $data['id'] ); - return $this->post( 'campaign/' . $id . '/test', json_encode( $data ) ); - } - - /* - Update the Campaign status. - @param {Array} data contains php array with key value pair. - @options data {Integer} id: Id of campaign to update its status [Mandatory] - @options data {String} status: Types of status. Possible values – suspended, archive, darchive, sent, queued, replicate and replicate_template ( case sensitive ) [Mandatory] - */ - public function update_campaign_status( $data ) { - $id = $data['id']; - unset( $data['id'] ); - return $this->put( 'campaign/' . $id . '/updatecampstatus', json_encode( $data ) ); - } - - /* - Create and schedule your Trigger campaigns. - @param {Array} data contains php array with key value pair. - @options data {String} category: Tag name of the campaign [Optional] - @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists] - @options data {String} trigger_name: Name of the campaign [Mandatory] - @options data {String} bat: Email address for test mail [Optional] - @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty] - @options data {String} html_url: Url which content is the body of content [Mandatory: if html_content is empty] - @options data {Array} listid: These are the lists to which the campaign has been sent [Mandatory: if scheduled_date is not empty] - @options data {String} scheduled_date: The day on which the campaign is supposed to run[Optional] - @options data {String} subject: Subject of the campaign [Mandatory] - @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists] - @options data {String} reply_to: The reply to email in the campaign emails [Optional] - @options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in SendinBlue account [Optional] - @options data {Array} exclude_list: These are the lists which must be excluded from the campaign [Optional] - @options data {Integer} recurring: Type of trigger campaign. Possible values = 0 (default) & 1. recurring = 0 means contact can receive the same Trigger campaign only once, & recurring = 1 means contact can receive the same Trigger campaign several times [Optional] - @options data {String} attachment_url: Provide the absolute url of the attachment [Optional] - @options data {Integer} inline_image: Status of inline image. Possible values = 0 (default) & 1. inline_image = 0 means image can’t be embedded, & inline_image = 1 means image can be embedded, in the email [Optional] - @options data {Integer} mirror_active: Status of mirror links in campaign. Possible values = 0 & 1 (default). mirror_active = 0 means mirror links are deactivated, & mirror_active = 1 means mirror links are activated, in the campaign [Optional] - @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional] - */ - public function create_trigger_campaign( $data ) { - return $this->post( 'campaign', json_encode( $data ) ); - } - - /* - Update and schedule your Trigger campaigns. - @param {Array} data contains php array with key value pair. - @options data {Integer} id: Id of Trigger campaign to be modified [Mandatory] - @options data {String} category: Tag name of the campaign [Optional] - @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists] - @options data {String} trigger_name: Name of the campaign [Mandatory] - @options data {String} bat Email address for test mail [Optional] - @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty] - @options data {String} html_url: Url which content is the body of content [Mandatory: if html_content is empty] - @options data {Array} listid: These are the lists to which the campaign has been sent [Mandatory: if scheduled_date is not empty] - @options data {String} scheduled_date: The day on which the campaign is supposed to run[Optional] - @options data {String} subject: Subject of the campaign [Mandatory] - @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists] - @options data {String} reply_to: The reply to email in the campaign emails [Optional] - @options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in SendinBlue account [Optional] - @options data {Array} exclude_list: These are the lists which must be excluded from the campaign [Optional] - @options data {Integer} recurring: Type of trigger campaign. Possible values = 0 (default) & 1. recurring = 0 means contact can receive the same Trigger campaign only once, & recurring = 1 means contact can receive the same Trigger campaign several times [Optional] - @options data {String} attachment_url: Provide the absolute url of the attachment [Optional] - @options data {Integer} inline_image: Status of inline image. Possible values = 0 (default) & 1. inline_image = 0 means image can’t be embedded, & inline_image = 1 means image can be embedded, in the email [Optional] - @options data {Integer} mirror_active: Status of mirror links in campaign. Possible values = 0 & 1 (default). mirror_active = 0 means mirror links are deactivated, & mirror_active = 1 means mirror links are activated, in the campaign [Optional] - @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional] - */ - public function update_trigger_campaign( $data ) { - $id = $data['id']; - unset( $data['id'] ); - return $this->put( 'campaign/' . $id, json_encode( $data ) ); - } - - /* - Get all folders detail. - @param {Array} data contains php array with key value pair. - @options data {Integer} page: Maximum number of records per request is 50, if there are more than 50 folders then you can use this parameter to get next 50 results [Mandatory] - @options data {Integer} page_limit: This should be a valid number between 1-50 [Mandatory] - */ - public function get_folders( $data ) { - return $this->get( 'folder', json_encode( $data ) ); - } - - /* - Get a particular folder detail. - @param {Array} data contains php array with key value pair. - @options data {Integer} id: Id of folder to get details [Mandatory] - */ - public function get_folder( $data ) { - return $this->get( 'folder/' . $data['id'], '' ); - } - - /* - Create a new folder. - @param {Array} data contains php array with key value pair. - @options data {String} name: Desired name of the folder to be created [Mandatory] - */ - public function create_folder( $data ) { - return $this->post( 'folder', json_encode( $data ) ); - } - - /* - Delete a specific folder information. - @param {Array} data contains php array with key value pair. - @options data {Integer} id: Id of folder to be deleted [Mandatory] - */ - public function delete_folder( $data ) { - return $this->delete( 'folder/' . $data['id'], '' ); - } - - /* - Update an existing folder. - @param {Array} data contains php array with key value pair. - @options data {Integer} id: Id of folder to be modified [Mandatory] - @options data {String} name: Desired name of the folder to be modified [Mandatory] - */ - public function update_folder( $data ) { - $id = $data['id']; - unset( $data['id'] ); - return $this->put( 'folder/' . $id, json_encode( $data ) ); - } - - /* - Get all lists detail. - @param {Array} data contains php array with key value pair. - @options data {Integer} list_parent: This is the existing folder id & can be used to get all lists belonging to it [Optional] - @options data {Integer} page: Maximum number of records per request is 50, if there are more than 50 processes then you can use this parameter to get next 50 results [Mandatory] - @options data {Integer} page_limit: This should be a valid number between 1-50 [Mandatory] - */ - public function get_lists( $data ) { - return $this->get( 'list', json_encode( $data ) ); - } - - /* - Get a particular list detail. - @param {Array} data contains php array with key value pair. - @options data {Integer} id: Id of list to get details [Mandatory] - */ - public function get_list( $data ) { - return $this->get( 'list/' . $data['id'], '' ); - } - - /* - Create a new list. - @param {Array} data contains php array with key value pair. - @options data {String} list_name: Desired name of the list to be created [Mandatory] - @options data {Integer} list_parent: Folder ID [Mandatory] - */ - public function create_list( $data ) { - return $this->post( 'list', json_encode( $data ) ); - } - - /* - Update a list. - @param {Array} data contains php array with key value pair. - @options data {Integer} id: Id of list to be modified [Mandatory] - @options data {String} list_name: Desired name of the list to be modified [Optional] - @options data {Integer} list_parent: Folder ID [Mandatory] - */ - public function update_list( $data ) { - $id = $data['id']; - unset( $data['id'] ); - return $this->put( 'list/' . $id, json_encode( $data ) ); - } - - /* - Delete a specific list. - @param {Array} data contains php array with key value pair. - @options data {Integer} id: Id of list to be deleted [Mandatory] - */ - public function delete_list( $data ) { - return $this->delete( 'list/' . $data['id'], '' ); - } - - /* - Display details of all users for the given lists. - @param {Array} data contains php array with key value pair. - @options data {Array} listids: These are the list ids to get their data. The ids found will display records [Mandatory] - @options data {String} timestamp: This is date-time filter to fetch modified user records >= this time. Valid format Y-m-d H:i:s. Example: "2015-05-22 14:30:00" [Optional] - @options data {Integer} page: Maximum number of records per request is 500, if in your list there are more than 500 users then you can use this parameter to get next 500 results [Optional] - @options data {Integer} page_limit: This should be a valid number between 1-500 [Optional] - */ - public function display_list_users( $data ) { - return $this->post( 'list/display', json_encode( $data ) ); - } - - /* - Add already existing users in the SendinBlue contacts to the list. - @param {Array} data contains php array with key value pair. - @options data {Integer} id: Id of list to link users in it [Mandatory] - @options data {Array} users: Email address of the already existing user(s) in the SendinBlue contacts. Example: "test@example.net". You can use commas to separate multiple users [Mandatory] - */ - - public function add_users_list( $data ) { - $id = $data['id']; - unset( $data['id'] ); - return $this->post( 'list/' . $id . '/users', json_encode( $data ) ); - } - - /* - Delete already existing users in the SendinBlue contacts from the list. - @param {Array} data contains php array with key value pair. - @options data {Integer} id: Id of list to unlink users from it [Mandatory] - @options data {Array} users: Email address of the already existing user(s) in the SendinBlue contacts to be modified. Example: "test@example.net". You can use commas to separate multiple users [Mandatory] - */ - public function delete_users_list( $data ) { - $id = $data['id']; - unset( $data['id'] ); - return $this->delete( 'list/' . $id . '/delusers', json_encode( $data ) ); - } - - /* - Access all the attributes information under the account. - No input required - */ - public function get_attributes() { - return $this->get( 'attribute', '' ); - } - - /* - Access the specific type of attribute information. - @param {Array} data contains php array with key value pair. - @options data {String} type: Type of attribute. Possible values – normal, transactional, category, calculated & global [Optional] - */ - public function get_attribute( $data ) { - return $this->get( 'attribute/' . $data['type'], '' ); - } - - /* - Create an Attribute. - @param {Array} data contains php array with key value pair. - @options data {String} type: Type of attribute. Possible values – normal, transactional, category, calculated & global ( case sensitive ) [Mandatory] - @options data {Array} data: The name and data type of ‘normal’ & ‘transactional’ attribute to be created in your SendinBlue account. It should be sent as an associative array. Example: array(‘ATTRIBUTE_NAME1′ => ‘DATA_TYPE1′, ‘ATTRIBUTE_NAME2’=> ‘DATA_TYPE2′). - The name and data value of ‘category’, ‘calculated’ & ‘global’, should be sent as JSON string. Example: ‘[{ "name":"ATTRIBUTE_NAME1", "value":"Attribute_value1" }, { "name":"ATTRIBUTE_NAME2", "value":"Attribute_value2" }]’. You can use commas to separate multiple attributes [Mandatory] - */ - public function create_attribute( $data ) { - return $this->post( 'attribute/', json_encode( $data ) ); - } - - /* - Delete a specific type of attribute information. - @param {Array} data contains php array with key value pair. - @options data {Integer} type: Type of attribute to be deleted [Mandatory] - */ - public function delete_attribute( $type, $data ) { - $type = $data['type']; - unset( $data['type'] ); - return $this->post( 'attribute/' . $type, json_encode( $data ) ); - } - - /* - Create a new user if an email provided as input, doesn’t exists in the contact list of your SendinBlue account, otherwise it will update the existing user. - @param {Array} data contains php array with key value pair. - @options data {String} email: Email address of the user to be created in SendinBlue contacts. Already existing email address of user in the SendinBlue contacts to be modified [Mandatory] - @options data {Array} attributes: The name of attribute present in your SendinBlue account. It should be sent as an associative array. Example: array("NAME"=>"name"). You can use commas to separate multiple attributes [Optional] - @options data {Integer} blacklisted: This is used to blacklist/ Unblacklist a user. Possible values – 0 & 1. blacklisted = 1 means user has been blacklisted [Optional] - @options data {Array} listid: The list id(s) to be linked from user [Optional] - @options data {Array} listid_unlink: The list id(s) to be unlinked from user [Optional] - @options data {Array} blacklisted_sms: This is used to blacklist/ Unblacklist a user’s SMS number. Possible values – 0 & 1. blacklisted_sms = 1 means user’s SMS number has been blacklisted [Optional] - */ - public function create_update_user( $data ) { - return $this->post( 'user/createdituser', json_encode( $data ) ); - } - - /* - Get Access a specific user Information. - @param {Array} data contains php array with key value pair. - @options data {String} email: Email address of the already existing user in the SendinBlue contacts [Mandatory] - */ - public function get_user( $data ) { - return $this->get( 'user/' . $data['email'], '' ); - } - - /* - Unlink existing user from all lists. - @param {Array} data contains php array with key value pair. - @options data {String} email: Email address of the already existing user in the SendinBlue contacts to be unlinked from all lists [Mandatory] - */ - public function delete_user( $data ) { - return $this->delete( 'user/' . $data['email'], '' ); - } - - /* - Import Users Information. - @param {Array} data contains php array with key value pair. - @options data {String} url: The URL of the file to be imported. Possible file types – .txt, .csv [Mandatory: if body is empty] - @options data {String} body: The Body with csv content to be imported. Example: ‘NAME;SURNAME;EMAIL\n"Name1";"Surname1";"example1@example.net"\n"Name2";"Surname2";"example2@example.net"‘, where \n separates each user data. You can use semicolon to separate multiple attributes [Mandatory: if url is empty] - @options data {Array} listids: These are the list ids in which the the users will be imported [Mandatory: if name is empty] - @options data {String} notify_url: URL that will be called once the import process is finished [Optional] In notify_url, we are sending the content using POST method - @options data {String} name: This is new list name which will be created first & then users will be imported in it [Mandatory: if listids is empty] - @options data {Integer} list_parent: This is the existing folder id & can be used with name parameter to make newly created list’s desired parent [Optional] - */ - public function import_users( $data ) { - return $this->post( 'user/import', json_encode( $data ) ); - } - - /* - Export Users Information. - @param {Array} data contains php array with key value pair. - @options data {String} export_attrib: The name of attribute present in your SendinBlue account. You can use commas to separate multiple attributes. Example: "EMAIL,NAME,SMS" [Optional] - @options data {String} filter: Filter can be added to export users. Example: "{\"blacklisted\":1}", will export all blacklisted users [Mandatory] - @options data {String} notify_url: URL that will be called once the export process is finished [Optional] - */ - public function export_users( $data ) { - return $this->post( 'user/export', json_encode( $data ) ); - } - - /* - Get all the processes information under the account. - @param {Array} data contains php array with key value pair. - @options data {Integer} page: Maximum number of records per request is 50, if there are more than 50 processes then you can use this parameter to get next 50 results [Mandatory] - @options data {Integer} page_limit: This should be a valid number between 1-50 [Mandatory] - */ - public function get_processes( $data ) { - return $this->get( 'process', json_encode( $data ) ); - } - - /* - Get the process information. - @param {Array} data contains php array with key value pair. - @options data {Integer} id: Id of process to get details [Mandatory] - */ - public function get_process( $data ) { - return $this->get( 'process/' . $data['id'], '' ); - } - - /* - To retrieve details of all webhooks. - @param {Array} data contains php array with key value pair. - @options data {String} is_plat: Flag to get webhooks. Possible values – 0 & 1. Example: to get Transactional webhooks, use $is_plat=0, to get Marketing webhooks, use $is_plat=1, & to get all webhooks, use $is_plat="" [Optional] - */ - public function get_webhooks( $data ) { - return $this->get( 'webhook', json_encode( $data ) ); - } - - /* - To retrieve details of any particular webhook. - @param {Array} data contains php array with key value pair. - @options data {Integer} id: Id of webhook to get details [Mandatory] - */ - public function get_webhook( $data ) { - return $this->get( 'webhook/' . $data['id'], '' ); - } - - /* - Create a Webhook. - @param {Array} data contains php array with key value pair. - @options data {String} url: URL that will be triggered by a webhook [Mandatory] - @options data {String} description: Webook description [Optional] - @options data {Array} events: Set of events. You can use commas to separate multiple events. Possible values for Transcational webhook – request, delivered, hard_bounce, soft_bounce, blocked, spam, invalid_email, deferred, click, & opened and Possible Values for Marketing webhook – spam, opened, click, hard_bounce, unsubscribe, soft_bounce & list_addition ( case sensitive ) [Mandatory] - @options data {Integer} is_plat: Flag to create webhook type. Possible values – 0 (default) & 1. Example: to create Transactional webhooks, use $is_plat=0, & to create Marketing webhooks, use $is_plat=1 [Optional] - */ - public function create_webhook( $data ) { - return $this->post( 'webhook', json_encode( $data ) ); - } - - /* - Delete a webhook. - @param {Array} data contains php array with key value pair. - @options data {Integer} id: Id of webhook to be deleted [Mandatory] - */ - public function delete_webhook( $data ) { - return $this->delete( 'webhook/' . $data['id'], '' ); - } - - /* - Update a webhook. - @param {Array} data contains php array with key value pair. - @options data {Integer} id: Id of webhook to be modified [Mandatory] - @options data {String} url: URL that will be triggered by a webhook [Mandatory] - @options data {String} description: Webook description [Optional] - @options data {Array} events: Set of events. You can use commas to separate multiple events. Possible values for Transcational webhook – request, delivered, hard_bounce, soft_bounce, blocked, spam, invalid_email, deferred, click, & opened and Possible Values for Marketing webhook – spam, opened, click, hard_bounce, unsubscribe, soft_bounce & list_addition ( case sensitive ) [Mandatory] - */ - public function update_webhook( $data ) { - $id = $data['id']; - unset( $data['id'] ); - return $this->put( 'webhook/' . $id, json_encode( $data ) ); - } - - /* - Get Access of created senders information. - @param {Array} data contains php array with key value pair. - @options data {String} option: Options to get senders. Possible options – IP-wise, & Domain-wise ( only for dedicated IP clients ). Example: to get senders with specific IP, use $option=’1.2.3.4′, to get senders with specific domain use, $option=’domain.com’, & to get all senders, use $option="" [Optional] - */ - public function get_senders( $data ) { - return $this->get( 'advanced', json_encode( $data ) ); - } - - /* - Create your Senders. - @param {Array} data contains php array with key value pair. - @options data {String} name: Name of the sender [Mandatory] - @options data {String} email: Email address of the sender [Mandatory] - @options data {Array} ip_domain: Pass pipe ( | ) separated Dedicated IP and its associated Domain. Example: "1.2.3.4|mydomain.com". You can use commas to separate multiple ip_domain’s [Mandatory: Only for Dedicated IP clients, for Shared IP clients, it should be kept blank] - */ - public function create_sender( $data ) { - return $this->post( 'advanced', json_encode( $data ) ); - } - - /* - Update your Senders. - @param {Array} data contains php array with key value pair. - @options data {Integer} id: Id of sender to be modified [Mandatory] - @options data {String} name: Name of the sender [Mandatory] - @options data {Array} ip_domain: Pass pipe ( | ) separated Dedicated IP and its associated Domain. Example: "1.2.3.4|mydomain.com". You can use commas to separate multiple ip_domain’s [Mandatory: Only for Dedicated IP clients, for Shared IP clients, it should be kept blank] - */ - public function update_sender( $data ) { - $id = $data['id']; - unset( $data['id'] ); - return $this->put( 'advanced/' . $id, json_encode( $data ) ); - } - - /* - Delete your Sender Information. - @param {Array} data contains php array with key value pair. - @options data {Integer} id: Id of sender to be deleted [Mandatory] - */ - public function delete_sender( $data ) { - return $this->delete( 'advanced/' . $data['id'], '' ); - } - - /* - Send Transactional Email. - @param {Array} data contains php array with key value pair. - @options data {Array} to: Email address of the recipient(s). It should be sent as an associative array. Example: array("to@example.net"=>"to whom"). You can use commas to separate multiple recipients [Mandatory] - @options data {String} subject: Message subject [Mandatory] - @options data {Array} from Email address for From header. It should be sent as an array. Example: array("from@email.com","from email") [Mandatory] - @options data {String} html: Body of the message. (HTML version) [Mandatory]. To send inline images, use image, the 'src' attribute value inside {} (curly braces) should be same as the filename used in 'inline_image' parameter - @options data {String} text: Body of the message. (text version) [Optional] - @options data {Array} cc: Same as to but for Cc. Example: array("cc@example.net","cc whom") [Optional] - @options data {Array} bcc: Same as to but for Bcc. Example: array("bcc@example.net","bcc whom") [Optional] - @options data {Array} replyto: Same as from but for Reply To. Example: array("from@email.com","from email") [Optional] - @options data {Array} attachment: Provide the absolute url of the attachment/s. Possible extension values = gif, png, bmp, cgm, jpg, jpeg, txt, css, shtml, html, htm, csv, zip, pdf, xml, doc, xls, ppt, tar, and ez. To send attachment/s generated on the fly you have to pass your attachment/s filename & its base64 encoded chunk data as an associative array. Example: array("YourFileName.Extension"=>"Base64EncodedChunkData"). You can use commas to separate multiple attachments [Optional] - @options data {Array} headers: The headers will be sent along with the mail headers in original email. Example: array("Content-Type"=>"text/html; charset=iso-8859-1"). You can use commas to separate multiple headers [Optional] - @options data {Array} inline_image: Pass your inline image/s filename & its base64 encoded chunk data as an associative array. Example: array("YourFileName.Extension"=>"Base64EncodedChunkData"). You can use commas to separate multiple inline images [Optional] - */ - public function send_email( $data ) { - return $this->post( 'email', json_encode( $data ) ); - } - - /* - Aggregate / date-wise report of the SendinBlue SMTP account. - @param {Array} data contains php array with key value pair. - @options data {Integer} aggregate: This is used to indicate, you are interested in all-time totals. Possible values – 0 & 1. aggregate = 0 means it will not aggregate records, and will show stats per day/date wise [Optional] - @options data {String} start_date: The start date to look up statistics. Date must be in YYYY-MM-DD format and should be before the end_date [Optional] - @options data {String} end_date: The end date to look up statistics. Date must be in YYYY-MM-DD format and should be after the start_date [Optional] - @options data {Integer} days: Number of days in the past to include statistics ( Includes today ). It must be an integer greater than 0 [Optional] - @options data {String} tag: The tag you will specify to retrieve detailed stats. It must be an existing tag that has statistics [Optional] - */ - public function get_statistics( $data ) { - return $this->post( 'statistics', json_encode( $data ) ); - } - - /* - Get Email Event report. - @param {Array} data contains php array with key value pair. - @options data {Integer} limit: To limit the number of results returned. It should be an integer [Optional] - @options data {String} start_date: The start date to get report from. Date must be in YYYY-MM-DD format and should be before the end_date [Optional] - @options data {String} end_date: The end date to get report till date. Date must be in YYYY-MM-DD format and should be after the start_date [Optional] - @options data {Integer} offset: Beginning point in the list to retrieve from. It should be an integer [Optional] - @options data {String} date: Specific date to get its report. Date must be in YYYY-MM-DD format and should be earlier than todays date [Optional] - @options data {Integer} days: Number of days in the past (includes today). If specified, must be an integer greater than 0 [Optional] - @options data {String} email: Email address to search report for [Optional] - */ - public function get_report( $data ) { - return $this->post( 'report', json_encode( $data ) ); - } - - /* - Delete any hardbounce, which actually would have been blocked due to some temporary ISP failures. - @param {Array} data contains php array with key value pair. - @options data {String} start_date: The start date to get report from. Date must be in YYYY-MM-DD format and should be before the end_date [Optional] - @options data {String} end_date: The end date to get report till date. Date must be in YYYY-MM-DD format and should be after the start_date [Optional] - @options data {String} email: Email address to delete its bounces [Optional] - */ - public function delete_bounces( $data ) { - return $this->post( 'bounces', json_encode( $data ) ); - } - - /* - Send templates created on SendinBlue, through SendinBlue SMTP (transactional mails). - @param {Array} data contains php array with key value pair. - @options data {Integer} id: Id of the template created on SendinBlue account [Mandatory] - @options data {String} to: Email address of the recipient(s). You can use pipe ( | ) to separate multiple recipients. Example: "to-example@example.net|to2-example@example.net" [Mandatory] - @options data {String} cc: Same as to but for Cc [Optional] - @options data {String} bcc: Same as to but for Bcc [Optional] - @options data {Array} attrv The name of attribute present in your SendinBlue account. It should be sent as an associative array. Example: array("NAME"=>"name"). You can use commas to separate multiple attributes [Optional] - @options data {String} attachment_url: Provide the absolute url of the attachment. Url not allowed from local machine. File must be hosted somewhere [Optional] - @options data {Array} attachment: To send attachment/s generated on the fly you have to pass your attachment/s filename & its base64 encoded chunk data as an associative array [Optional] - */ - public function send_transactional_template( $data ) { - $id = $data['id']; - unset( $data['id'] ); - return $this->put( 'template/' . $id, json_encode( $data ) ); - } - - /* - Create a Template. - @param {Array} data contains php array with key value pair. - @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients & for Shared IP clients, if sender exists] - @options data {String} template_name: Name of the Template [Mandatory] - @options data {String} bat: Email address for test mail [Optional] - @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty] - @options data {String} html_url Url: which content is the body of content [Mandatory: if html_content is empty] - @options data {String} subject: Subject of the campaign [Mandatory] - @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients & for Shared IP clients, if sender exists] - @options data {String} reply_to: The reply to email in the campaign emails [Optional] - @options data {String} to_fieldv This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in SendinBlue account [Optional] - @options data {Integer} status: Status of template. Possible values = 0 (default) & 1. status = 0 means template is inactive, & status = 1 means template is active [Optional] - @options data {Integer} attachment: Status of attachment. Possible values = 0 (default) & 1. attach = 0 means an attachment can’t be sent, & attach = 1 means an attachment can be sent, in the email [Optional] - */ - public function create_template( $data ) { - return $this->post( 'template', json_encode( $data ) ); - } - - /* - Update a Template. - @param {Array} data contains php array with key value pair. - @options data {Integer} id: Id of Template to be modified [Mandatory] - @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients & for Shared IP clients, if sender exists] - @options data {String} template_name: Name of the Template [Mandatory] - @options data {String} bat: Email address for test mail [Optional] - @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty] - @options data {String} html_url: Url which content is the body of content [Mandatory: if html_content is empty] - @options data {String} subject: Subject of the campaign [Mandatory] - @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients & for Shared IP clients, if sender exists] - @options data {String} reply_to: The reply to email in the campaign emails [Optional] - @options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in SendinBlue account [Optional] - @options data {Integer} status: Status of template. Possible values = 0 (default) & 1. status = 0 means template is inactive, & status = 1 means template is active [Optional] - @options data {Integer} attachment: Status of attachment. Possible values = 0 (default) & 1. attach = 0 means an attachment can’t be sent, & attach = 1 means an attachment can be sent, in the email [Optional] - */ - public function update_template( $data ) { - $id = $data['id']; - unset( $data['id'] ); - return $this->put( 'template/' . $id, json_encode( $data ) ); - } - - /* - Send a transactional SMS. - @param {Array} data contains php array with key value pair. - @options data {String} to: The mobile number to send SMS to with country code [Mandatory] - @options data {String} from: The name of the sender. The number of characters is limited to 11 (alphanumeric format) [Mandatory] - @options data {String} text: The text of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS [Mandatory] - @options data {String} web_url: The web URL that can be called once the message is successfully delivered [Optional] - @options data {String} tag: The tag that you can associate with the message [Optional] - @options data {String} type: Type of message. Possible values – marketing (default) & transactional. You can use marketing for sending marketing SMS, & for sending transactional SMS, use transactional type [Optional] - */ - public function send_sms( $data ) { - return $this->post( 'sms', json_encode( $data ) ); - } - - /* - Create & Schedule your SMS campaigns. - @param {Array} data contains php array with key value pair. - @options data {String} name: Name of the SMS campaign [Mandatory] - @options data {String} sender: This allows you to customize the SMS sender. The number of characters is limited to 11 ( alphanumeric format ) [Optional] - @options data {String} content: Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS [Optional] - @options data {String} bat: Mobile number with the country code to send test SMS. The mobile number defined here should belong to one of your contacts in SendinBlue account and should not be blacklisted [Optional] - @options data {Array} listid: These are the list ids to which the SMS campaign is sent [Mandatory: if scheduled_date is not empty] - @options data {Array} exclude_list: These are the list ids which will be excluded from the SMS campaign [Optional] - @options data {String} scheduled_date: The day on which the SMS campaign is supposed to run [Optional] - @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional] - */ - public function create_sms_campaign( $data ) { - return $this->post( 'sms', json_encode( $data ) ); - } - - /* - Update your SMS campaigns. - @param {Array} data contains php array with key value pair. - @options data {Integer} id: Id of the SMS campaign [Mandatory] - @options data {String} name: Name of the SMS campaign [Optional] - @options data {String} sender: This allows you to customize the SMS sender. The number of characters is limited to 11 ( alphanumeric format ) [Optional] - @options data {String} content: Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS [Optional] - @options data {String} bat: Mobile number with the country code to send test SMS. The mobile number defined here should belong to one of your contacts in SendinBlue account and should not be blacklisted [Optional] - @options data {Array} listid: hese are the list ids to which the SMS campaign is sent [Mandatory: if scheduled_date is not empty] - @options data {Array} exclude_list: These are the list ids which will be excluded from the SMS campaign [Optional] - @options data {String} scheduled_date: The day on which the SMS campaign is supposed to run [Optional] - @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional] - */ - public function update_sms_campaign( $data ) { - $id = $data['id']; - unset( $data['id'] ); - return $this->put( 'sms/' . $id, json_encode( $data ) ); - } - - /* - Send a Test SMS. - @param {Array} data contains php array with key value pair. - @options data {Integer} id: Id of the SMS campaign [Mandatory] - @options data {String} to: Mobile number with the country code to send test SMS. The mobile number defined here should belong to one of your contacts in SendinBlue account and should not be blacklisted [Mandatory] - */ - public function send_bat_sms( $data ) { - $id = $data['id']; - unset( $data['id'] ); - return $this->get( 'sms/' . $id, json_encode( $data ) ); - } - -} diff --git a/admin/partials/pirateforms-settings-sidebar-subscribe.php b/admin/partials/pirateforms-settings-sidebar-subscribe.php index 975e0e0..5fb7a96 100644 --- a/admin/partials/pirateforms-settings-sidebar-subscribe.php +++ b/admin/partials/pirateforms-settings-sidebar-subscribe.php @@ -26,7 +26,9 @@ class="btn">
    Date: Tue, 6 Feb 2018 01:31:22 +0530 Subject: [PATCH 066/123] Grunt --- admin/partials/pirateforms-settings-sidebar-subscribe.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/partials/pirateforms-settings-sidebar-subscribe.php b/admin/partials/pirateforms-settings-sidebar-subscribe.php index 5fb7a96..84b0c4a 100644 --- a/admin/partials/pirateforms-settings-sidebar-subscribe.php +++ b/admin/partials/pirateforms-settings-sidebar-subscribe.php @@ -26,7 +26,7 @@ class="btn">
    Date: Tue, 6 Feb 2018 01:32:43 +0530 Subject: [PATCH 067/123] Corrected Email in Composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 6129efa..f3509a0 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ "authors": [ { "name": "ThemeIsle Team", - "email": "friends@themeisle.com.com", + "email": "friends@themeisle.com", "homepage": "https://themeisle.com" } ], From 61918069f402a86e812722d64c762c01592baadf Mon Sep 17 00:00:00 2001 From: Andrei Baicus Date: Wed, 7 Feb 2018 12:19:42 +0200 Subject: [PATCH 068/123] #265. Fixed issue with form footer size when ReCaptcha is enabled. --- public/css/front.css | 19 ++++++++++++------- public/js/scripts.js | 43 ++++++++++++++++++++++++++++--------------- 2 files changed, 40 insertions(+), 22 deletions(-) diff --git a/public/css/front.css b/public/css/front.css index 047a45e..bcbf444 100644 --- a/public/css/front.css +++ b/public/css/front.css @@ -39,8 +39,17 @@ Version: 2.3.3 text-align: right; } +.pirate-forms-maps-custom { + min-width: 150px; +} + +.pirate-forms-maps-custom input { + display: inline; + width: auto; +} + .pirate-forms-maps-custom label { - display: inline-block; + display: inline; cursor: pointer; } @@ -48,11 +57,6 @@ Version: 2.3.3 margin-left: 5px; } -.pirate-forms-fields-container { - margin-right: -15px; - margin-left: -15px; -} - .pirate-forms-fields-container .form_field_wrap { box-sizing: border-box; padding-right: 15px; @@ -75,7 +79,6 @@ Version: 2.3.3 .pirate_forms_wrap .form_field_wrap .pirate-forms-submit-button { display: inline-block; width: auto; - max-width: 100%; } .pirate_forms_wrap .pirate-forms-footer { @@ -85,10 +88,12 @@ Version: 2.3.3 } .pirate_forms_wrap .pirate-forms-footer .form_field_wrap { + width: auto; display: table-cell; float: none; margin: 0; vertical-align: middle; + padding-bottom: 10px; } @media (max-width: 480px) { diff --git a/public/js/scripts.js b/public/js/scripts.js index 4ed5001..91289e2 100644 --- a/public/js/scripts.js +++ b/public/js/scripts.js @@ -1,18 +1,31 @@ /* global jQuery */ -jQuery(document).ready(function() { +jQuery( document ).ready( function () { + 'use strict'; + jQuery( '.pirate-forms-file-upload-button' ).on( 'click', function () { + var $button = jQuery( this ); + $button.parent().find( 'input[type=file]' ).on( 'change', function () { + $button.parent().find( 'input[type=text]' ).val( jQuery( this ).val() ).change(); + } ); + $button.parent().find( 'input[type=file]' ).focus().click(); + } ); - jQuery('.pirate-forms-file-upload-button').on('click', function () { - var $button = jQuery(this); - $button.parent().find('input[type=file]').on('change', function(){ - $button.parent().find('input[type=text]').val(jQuery(this).val()).change(); - }); - $button.parent().find('input[type=file]').focus().click(); - }); + jQuery( '.pirate-forms-file-upload-input' ).on( 'click', function () { + jQuery( this ).parent().find( '.pirate-forms-file-upload-button' ).trigger( 'click' ); + } ); + jQuery( '.pirate-forms-file-upload-input' ).on( 'focus', function () { + jQuery( this ).blur(); + } ); +} ); - jQuery('.pirate-forms-file-upload-input').on('click', function(){ - jQuery(this).parent().find('.pirate-forms-file-upload-button').trigger('click'); - }); - jQuery('.pirate-forms-file-upload-input').on('focus', function(){ - jQuery(this).blur(); - }); -}); \ No newline at end of file +jQuery( window ).load( function () { + 'use strict'; + if ( jQuery( '.pirate_forms_wrap' ).length ) { + jQuery( '.pirate_forms_wrap' ).each( function () { + var formWidth = jQuery( this ).innerWidth(); + var footerWidth = jQuery( this ).find( '.pirate-forms-footer' ).innerWidth(); + if ( footerWidth > formWidth ) { + jQuery( this ).find( '.contact_submit_wrap, .form_captcha_wrap, .pirateform_wrap_classes_spam_wrap' ).css( {'text-align' : 'left', 'display' : 'block' } ); + } + } ); + } +} ); \ No newline at end of file From 1807926a3c9294605f80ea4fd55da26a06f603e3 Mon Sep 17 00:00:00 2001 From: Andrei Baicus Date: Wed, 7 Feb 2018 12:20:05 +0200 Subject: [PATCH 069/123] Version bump --- includes/class-pirateforms.php | 2 +- package.json | 2 +- pirate-forms.php | 4 ++-- public/css/front.css | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/class-pirateforms.php b/includes/class-pirateforms.php index e4478e6..b6a0867 100644 --- a/includes/class-pirateforms.php +++ b/includes/class-pirateforms.php @@ -69,7 +69,7 @@ class PirateForms { public function __construct() { $this->plugin_name = 'pirateforms'; - $this->version = '2.3.3'; + $this->version = '2.3.4'; $this->load_dependencies(); $this->set_locale(); diff --git a/package.json b/package.json index 65189b9..a06e937 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pirate-forms", - "version": "2.3.3", + "version": "2.3.4", "description": "Pirate Forms plugin", "repository": { "type": "git", diff --git a/pirate-forms.php b/pirate-forms.php index b50b65f..ea99f5a 100644 --- a/pirate-forms.php +++ b/pirate-forms.php @@ -16,7 +16,7 @@ * Plugin Name: Free & Simple Contact Form Plugin - Pirateforms * Plugin URI: http://themeisle.com/plugins/pirate-forms/ * Description: Easily creates a nice looking, simple contact form on your WP site. - * Version: 2.3.3 + * Version: 2.3.4 * Author: Themeisle * Author URI: http://themeisle.com * Text Domain: pirate-forms @@ -36,7 +36,7 @@ define( 'PIRATEFORMS_NAME', 'Pirate Forms' ); define( 'PIRATEFORMS_SLUG', 'pirate-forms' ); define( 'PIRATEFORMS_USELL_LINK', 'https://themeisle.com/plugins/pirate-forms-extended/' ); -define( 'PIRATE_FORMS_VERSION', '2.3.3' ); +define( 'PIRATE_FORMS_VERSION', '2.3.4' ); define( 'PIRATEFORMS_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) ); define( 'PIRATEFORMS_URL', plugin_dir_url( __FILE__ ) ); define( 'PIRATEFORMS_BASENAME', plugin_basename( __FILE__ ) ); diff --git a/public/css/front.css b/public/css/front.css index bcbf444..5cedc04 100644 --- a/public/css/front.css +++ b/public/css/front.css @@ -1,5 +1,5 @@ /* -Version: 2.3.3 +Version: 2.3.4 */ .pirate_forms_wrap .form_field_wrap, .widget .pirate_forms_wrap .form_field_wrap { From e9fcaf05cac61737918abf3850161849553feaa8 Mon Sep 17 00:00:00 2001 From: Andrei Baicus Date: Thu, 15 Feb 2018 12:37:25 +0200 Subject: [PATCH 070/123] PHPCS Fixes. --- public/class-pirateforms-public.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/class-pirateforms-public.php b/public/class-pirateforms-public.php index 46db798..4322bbc 100644 --- a/public/class-pirateforms-public.php +++ b/public/class-pirateforms-public.php @@ -324,7 +324,7 @@ public function display_form( $atts, $content = null ) { endif; /** ******* ReCaptcha */ - if ( ! empty( $pirate_forms_options['pirateformsopt_recaptcha_secretkey'] ) && ! empty( $pirate_forms_options['pirateformsopt_recaptcha_sitekey'] ) && ! empty( $pirate_forms_options['pirateformsopt_recaptcha_field'] ) && ( 'yes' === $pirate_forms_options['pirateformsopt_recaptcha_field'] ) ) : + if ( ! empty( $pirate_forms_options['pirateformsopt_recaptcha_secretkey'] ) && ! empty( $pirate_forms_options['pirateformsopt_recaptcha_sitekey'] ) && ! empty( $pirate_forms_options['pirateformsopt_recaptcha_field'] ) && ( 'yes' === $pirate_forms_options['pirateformsopt_recaptcha_field'] ) ) : $pirateformsopt_recaptcha_sitekey = $pirate_forms_options['pirateformsopt_recaptcha_sitekey']; $pirateformsopt_recaptcha_secretkey = $pirate_forms_options['pirateformsopt_recaptcha_secretkey']; $elements[] = array( @@ -340,7 +340,7 @@ public function display_form( $atts, $content = null ) { ); endif; - if ( ! empty( $pirate_forms_options['pirateformsopt_recaptcha_field'] ) && ( 'custom' === $pirate_forms_options['pirateformsopt_recaptcha_field'] ) ) : + if ( ! empty( $pirate_forms_options['pirateformsopt_recaptcha_field'] ) && ( 'custom' === $pirate_forms_options['pirateformsopt_recaptcha_field'] ) ) : $elements[] = array( 'type' => 'div', 'class' => 'pirate-forms-maps-custom', // spam.reverse() = maps From 849d6cb432d245fedce0e273d1a868fb6ff6727f Mon Sep 17 00:00:00 2001 From: selul Date: Thu, 15 Feb 2018 11:44:22 +0000 Subject: [PATCH 071/123] [AUTO][skip ci] Updating changelog for v2.3.4 --- CHANGELOG.md | 6 ++++++ readme.md | 7 +++++++ readme.txt | 7 +++++++ 3 files changed, 20 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e647a04..5ee6b7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,10 @@ + ### v2.3.4 - 2018-02-15 + **Changes:** + * Added missing Loader.gif file +* Fixed undefined notice +* Fix submit button leaving form when ReCaptcha is enabled + ### v2.3.3 - 2018-01-06 **Changes:** * Fix double reCAPTCHA box bug. diff --git a/readme.md b/readme.md index 8edc3bb..a8d82c4 100644 --- a/readme.md +++ b/readme.md @@ -187,6 +187,13 @@ Activating the Pirate Contact Form plugin is just like any other plugin. If you' 4. Screenshot 4. Enabling SMTP ## Changelog ## +### 2.3.4 - 2018-02-15 ### + +* Added missing Loader.gif file +* Fixed undefined notice +* Fix submit button leaving form when ReCaptcha is enabled + + ### 2.3.3 - 2018-01-06 ### * Fix double reCAPTCHA box bug. diff --git a/readme.txt b/readme.txt index 3a3bd00..f209ac0 100644 --- a/readme.txt +++ b/readme.txt @@ -187,6 +187,13 @@ Activating the Pirate Contact Form plugin is just like any other plugin. If you' 4. Screenshot 4. Enabling SMTP == Changelog == += 2.3.4 - 2018-02-15 = + +* Added missing Loader.gif file +* Fixed undefined notice +* Fix submit button leaving form when ReCaptcha is enabled + + = 2.3.3 - 2018-01-06 = * Fix double reCAPTCHA box bug. From b32b622b4e5ba49323d1d57a5216879254cf0e0c Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Sat, 24 Feb 2018 13:02:18 +0530 Subject: [PATCH 072/123] Send copy of email to sender #269 --- admin/class-pirateforms-admin.php | 21 +++++++++++++++- public/class-pirateforms-public.php | 39 ++++++++++++++++++++++++++++- 2 files changed, 58 insertions(+), 2 deletions(-) diff --git a/admin/class-pirateforms-admin.php b/admin/class-pirateforms-admin.php index d3acb39..6cd0aba 100644 --- a/admin/class-pirateforms-admin.php +++ b/admin/class-pirateforms-admin.php @@ -319,7 +319,7 @@ function get_plugin_options() { 'id' => 'pirateformsopt_nonce', 'type' => 'checkbox', 'label' => array( - 'value' => __( 'Add a nonce to the contact form:', 'pirate-forms' ), + 'value' => __( 'Add a nonce to the contact form', 'pirate-forms' ), 'html' => '', 'desc' => array( '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 @@ function get_plugin_options() { 'cols' => 70, 'rows' => 5, ), + array( + 'id' => 'pirateformsopt_copy_email', + 'type' => 'checkbox', + 'label' => array( + 'value' => __( 'Add copy of mail to confirmation email', 'pirate-forms' ), + 'html' => '', + 'desc' => array( + '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' ), + 'class' => 'pirate_forms_option_description', + ), + ), + 'default' => '', + 'value' => PirateForms_Util::get_option( 'pirateformsopt_copy_email' ), + 'wrap' => array( + 'type' => 'div', + 'class' => 'pirate-forms-grouped', + ), + 'options' => array( 'yes' => __( 'Yes', 'pirate-forms' ) ), + ), array( 'id' => 'pirateformsopt_thank_you_url', 'type' => 'select', diff --git a/public/class-pirateforms-public.php b/public/class-pirateforms-public.php index 20b37a9..1f73419 100644 --- a/public/class-pirateforms-public.php +++ b/public/class-pirateforms-public.php @@ -545,6 +545,7 @@ public function send_email( $test = false ) { } // Start the body of the contact email + $private_fields = array(); $body = array(); $body['heading'] = sprintf( __( 'Contact form submission from %s', 'pirate-forms' ), get_bloginfo( 'name' ) . ' (' . site_url() . ')' ); $body['body'] = array(); @@ -576,6 +577,9 @@ public function send_email( $test = false ) { $body['body'][ __( 'IP address', 'pirate-forms' ) ] = $contact_ip; $body['body'][ __( 'IP search', 'pirate-forms' ) ] = "http://whatismyipaddress.com/ip/$contact_ip"; $body['magic_tags'] += array( 'ip' => $contact_ip ); + + $private_fields[] = __( 'IP address', 'pirate-forms' ); + $private_fields[] = __( 'IP search', 'pirate-forms' ); } // Sanitize and prepare referrer; @@ -583,6 +587,8 @@ public function send_email( $test = false ) { $page = sanitize_text_field( $_POST['pirate-forms-contact-referrer'] ); $body['body'][ __( 'Came from', 'pirate-forms' ) ] = $page; $body['magic_tags'] += array( 'referer' => $page ); + + $private_fields[] = __( 'Came from', 'pirate-forms' ); } // Show the page this contact form was submitted on @@ -590,6 +596,8 @@ public function send_email( $test = false ) { $body['body'][ __( 'Sent from page', 'pirate-forms' ) ] = $permalink; $body['magic_tags'] += array( 'permalink' => $permalink ); + $private_fields[] = __( 'Sent from page', 'pirate-forms' ); + // Check the blacklist $blocked = PirateForms_Util::is_blacklisted( $error_key, $pirate_forms_contact_email, $contact_ip ); if ( $blocked ) { @@ -598,7 +606,7 @@ public function send_email( $test = false ) { } if ( $this->is_spam( $pirate_forms_options, $contact_ip, get_permalink( get_the_id() ), $msg ) ) { - $_SESSION[ $error_key ]['honeypot'] = __( 'Form submission failed!', 'pirate-forms' ); + $_SESSION[ $error_key ]['honeypot'] = __( 'Form submission failed!!', 'pirate-forms' ); } if ( ! empty( $_SESSION[ $error_key ] ) ) { @@ -684,6 +692,10 @@ public function send_email( $test = false ) { $headers = "From: $site_name <$send_from>\r\nReply-To: $site_name <$send_from>"; $subject = $pirate_forms_options['pirateformsopt_label_submit'] . ' - ' . $site_name; + if ( isset( $pirate_forms_options['pirateformsopt_copy_email'] ) && 'yes' === $pirate_forms_options['pirateformsopt_copy_email'] ) { + $confirm_body = $this->append_original_email( $confirm_body, $body, $private_fields ); + } + do_action( 'pirate_forms_before_sending_confirm', $pirate_forms_contact_email, $pirate_forms_contact_email, $subject, $confirm_body, $headers ); 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__ ); $response_confirm = $this->finally_send_mail( $pirate_forms_contact_email, $subject, $confirm_body, $headers, null, false ); @@ -759,6 +771,27 @@ public function send_email( $test = false ) { } } + /** + * Appends the publicly displayed fields to the confirmation email. + * + * @param string $confirm_body The confirmation body. + * @param array $body The collected body fields. + * @param array $private_fields The private fields that should not be included from the body fields. + */ + private function append_original_email( $confirm_body, $body, $private_fields ) { + $lines = array(); + $lines[] = '------ Original Email ------'; + + foreach ( $body['body'] as $field => $value ) { + if ( in_array( $field, $private_fields ) ) { + continue; + } + $lines[] = "$field : $value"; + } + + return $confirm_body . implode( '
    ', $lines ); + } + /** * Finally, really send email. * @@ -888,6 +921,10 @@ function validate_request( $error_key, $pirate_forms_options, &$body ) { * Check with akismet if the message is spam. */ function is_spam( $pirate_forms_options, $ip, $page_url, $msg ) { + if ( 'yes' !== PirateForms_Util::get_option( 'pirateformsopt_akismet' ) ) { + return false; + } + // check if akismet is installed and key provided $key = get_option( 'wordpress_api_key' ); if ( empty( $key ) ) { From 62b661b5385373f677a68d67fe0c8f9115e2529d Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Sat, 24 Feb 2018 13:07:16 +0530 Subject: [PATCH 073/123] grunt --- public/class-pirateforms-public.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/public/class-pirateforms-public.php b/public/class-pirateforms-public.php index 7c95e23..84728b4 100644 --- a/public/class-pirateforms-public.php +++ b/public/class-pirateforms-public.php @@ -545,7 +545,7 @@ public function send_email( $test = false ) { } // Start the body of the contact email - $private_fields = array(); + $private_fields = array(); $body = array(); $body['heading'] = sprintf( __( 'Contact form submission from %s', 'pirate-forms' ), get_bloginfo( 'name' ) . ' (' . site_url() . ')' ); $body['body'] = array(); @@ -578,8 +578,8 @@ public function send_email( $test = false ) { $body['body'][ __( 'IP search', 'pirate-forms' ) ] = "http://whatismyipaddress.com/ip/$contact_ip"; $body['magic_tags'] += array( 'ip' => $contact_ip ); - $private_fields[] = __( 'IP address', 'pirate-forms' ); - $private_fields[] = __( 'IP search', 'pirate-forms' ); + $private_fields[] = __( 'IP address', 'pirate-forms' ); + $private_fields[] = __( 'IP search', 'pirate-forms' ); } // Sanitize and prepare referrer; @@ -588,7 +588,7 @@ public function send_email( $test = false ) { $body['body'][ __( 'Came from', 'pirate-forms' ) ] = $page; $body['magic_tags'] += array( 'referer' => $page ); - $private_fields[] = __( 'Came from', 'pirate-forms' ); + $private_fields[] = __( 'Came from', 'pirate-forms' ); } // Show the page this contact form was submitted on @@ -596,7 +596,7 @@ public function send_email( $test = false ) { $body['body'][ __( 'Sent from page', 'pirate-forms' ) ] = $permalink; $body['magic_tags'] += array( 'permalink' => $permalink ); - $private_fields[] = __( 'Sent from page', 'pirate-forms' ); + $private_fields[] = __( 'Sent from page', 'pirate-forms' ); // Check the blacklist $blocked = PirateForms_Util::is_blacklisted( $error_key, $pirate_forms_contact_email, $contact_ip ); @@ -775,12 +775,12 @@ public function send_email( $test = false ) { * Appends the publicly displayed fields to the confirmation email. * * @param string $confirm_body The confirmation body. - * @param array $body The collected body fields. - * @param array $private_fields The private fields that should not be included from the body fields. + * @param array $body The collected body fields. + * @param array $private_fields The private fields that should not be included from the body fields. */ private function append_original_email( $confirm_body, $body, $private_fields ) { - $lines = array(); - $lines[] = '------ Original Email ------'; + $lines = array(); + $lines[] = '------ Original Email ------'; foreach ( $body['body'] as $field => $value ) { if ( in_array( $field, $private_fields ) ) { From 8dc3e643d88bfa97599e645e7f55f875d1382b3b Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Tue, 27 Feb 2018 12:03:07 +0530 Subject: [PATCH 074/123] test case --- tests/test-pirate-forms.php | 55 +++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/tests/test-pirate-forms.php b/tests/test-pirate-forms.php index 61cfd2a..7118d15 100644 --- a/tests/test-pirate-forms.php +++ b/tests/test-pirate-forms.php @@ -61,6 +61,44 @@ public function test_wp_mail() { } + /** + * Testing confirmation mail. + * + * @access public + */ + public function test_confirmation_mail() { + do_action( 'admin_head' ); + + $settings = PirateForms_Util::get_option(); + $this->assertEquals( 'yes', $settings['pirateformsopt_nonce'] ); + + $settings['pirateformsopt_nonce'] = 'no'; + $settings['pirateformsopt_recaptcha_field'] = 'no'; + $settings['pirateformsopt_store'] = 'no'; + $settings['pirateformsopt_confirm_email'] = 'yoyoyoyoyoyo'; + $settings['pirateformsopt_copy_email'] = 'yes'; + $settings['pirateformsopt_email_content'] = '

    Contact form submission from Test Blog (http://example.org)

    Your Name:{name}
    Your Email:{email}
    Subject:{subject}
    Your message:{message}
    IP address:{ip}
    IP search:http://whatismyipaddress.com/ip/{ip}
    Sent from page:{permalink}
    '; + + PirateForms_Util::set_option( $settings ); + + $settings = PirateForms_Util::get_option(); + + $this->assertEquals( 'no', $settings['pirateformsopt_nonce'] ); + $this->assertEquals( 'no', $settings['pirateformsopt_store'] ); + $this->assertEquals( 'yoyoyoyoyoyo', $settings['pirateformsopt_confirm_email'] ); + $this->assertEquals( 'yes', $settings['pirateformsopt_copy_email'] ); + + $_POST = array( + 'honeypot' => '', + 'pirate-forms-contact-name' => 'x', + 'pirate-forms-contact-email' => 'x@x.com', + 'pirate-forms-contact-subject' => 'x', + 'pirate-forms-contact-message' => 'x', + ); + add_action( 'phpmailer_init', array( $this, 'phpmailer_confirmation_mail' ), 999 ); + do_action( 'pirate_unittesting_template_redirect' ); + } + /** * Testing SMTP * @@ -117,6 +155,23 @@ public function test_smtp( $host, $port, $user, $pass, $auth ) { } + /** + * Checking phpmailer for confirmation mail. + * + * @access public + */ + public function phpmailer_confirmation_mail( $phpmailer ) { + // we want to check the email body only for the confirmation email. + if ( 1 === did_action( 'pirate_forms_before_sending_confirm' ) ) { + $this->assertContains( 'yoyoyoyoyoyo', $phpmailer->Body ); + $this->assertContains( 'Original Email', $phpmailer->Body ); + $this->assertContains( 'Your Name : x', $phpmailer->Body ); + $this->assertContains( 'Your Email : x@x.com', $phpmailer->Body ); + $this->assertContains( 'Subject : x', $phpmailer->Body ); + $this->assertContains( 'Your message : x', $phpmailer->Body ); + } + } + /** * Checking phpmailer for WP mail * From 861389e65370633a0bacab4a4696a4495dc8430e Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Tue, 27 Feb 2018 12:06:32 +0530 Subject: [PATCH 075/123] check phpmailer_init action --- tests/test-pirate-forms.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test-pirate-forms.php b/tests/test-pirate-forms.php index 7118d15..e07d43d 100644 --- a/tests/test-pirate-forms.php +++ b/tests/test-pirate-forms.php @@ -161,8 +161,8 @@ public function test_smtp( $host, $port, $user, $pass, $auth ) { * @access public */ public function phpmailer_confirmation_mail( $phpmailer ) { - // we want to check the email body only for the confirmation email. - if ( 1 === did_action( 'pirate_forms_before_sending_confirm' ) ) { + // we want to check the email body only for the confirmation email, so we need to check if this is second time 'phpmailer_init' is being fired. + if ( 2 === did_action( 'phpmailer_init' ) ) { $this->assertContains( 'yoyoyoyoyoyo', $phpmailer->Body ); $this->assertContains( 'Original Email', $phpmailer->Body ); $this->assertContains( 'Your Name : x', $phpmailer->Body ); From 1c03abadaa598443226fe23caf06a178c7cca31b Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Tue, 27 Feb 2018 15:05:57 +0530 Subject: [PATCH 076/123] Spam label issue on page with 2 forms #250 --- public/js/scripts-general.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/js/scripts-general.js b/public/js/scripts-general.js index c0a04d1..bf1a10e 100644 --- a/public/js/scripts-general.js +++ b/public/js/scripts-general.js @@ -12,7 +12,10 @@ jQuery(document).ready(function() { } if(jQuery('.pirate-forms-maps-custom').length > 0){ - jQuery('.pirate-forms-maps-custom').html(jQuery('')); + jQuery('.pirate-forms-maps-custom').each(function(i){ + $id = 'xobkcehc-' + i; + jQuery(this).html(jQuery('')); + }); } }); From 20eb2598a185874cdb960a577346fe46fb682b98 Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Tue, 27 Feb 2018 15:09:29 +0530 Subject: [PATCH 077/123] grunt --- public/js/scripts-general.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/scripts-general.js b/public/js/scripts-general.js index bf1a10e..bc0a31f 100644 --- a/public/js/scripts-general.js +++ b/public/js/scripts-general.js @@ -13,7 +13,7 @@ jQuery(document).ready(function() { if(jQuery('.pirate-forms-maps-custom').length > 0){ jQuery('.pirate-forms-maps-custom').each(function(i){ - $id = 'xobkcehc-' + i; + var $id = 'xobkcehc-' + i; jQuery(this).html(jQuery('')); }); } From 05f4dcff80fcd6473f1b06a441f9b2f87f0139ad Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Tue, 27 Feb 2018 16:11:26 +0530 Subject: [PATCH 078/123] Redirect to a certain area of the page #273 --- includes/class-pirateforms-phpformbuilder.php | 11 ++++++++++- public/class-pirateforms-public.php | 10 ++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/includes/class-pirateforms-phpformbuilder.php b/includes/class-pirateforms-phpformbuilder.php index 984fe8f..73da83b 100644 --- a/includes/class-pirateforms-phpformbuilder.php +++ b/includes/class-pirateforms-phpformbuilder.php @@ -35,7 +35,16 @@ function build_form( $elements, $pirate_forms_options, $from_widget ) { $classes = array(); $classes[] = $from_widget ? 'widget-on' : ''; - $form_start = '
    'done' ), $_SERVER['HTTP_REFERER'] ); + $redirect_to = add_query_arg( + array( + 'done' => 'done', + 'pf' => "#$scroll_to", + ), $_SERVER['HTTP_REFERER'] + ); } if ( $redirect_to ) { From 3edd814ff0631e7d3dae6779443c34d88d2a4f02 Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Tue, 27 Feb 2018 16:24:26 +0530 Subject: [PATCH 079/123] grunt --- includes/class-pirateforms-phpformbuilder.php | 2 +- public/class-pirateforms-public.php | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/includes/class-pirateforms-phpformbuilder.php b/includes/class-pirateforms-phpformbuilder.php index 73da83b..5878ee2 100644 --- a/includes/class-pirateforms-phpformbuilder.php +++ b/includes/class-pirateforms-phpformbuilder.php @@ -37,7 +37,7 @@ function build_form( $elements, $pirate_forms_options, $from_widget ) { $classes[] = $from_widget ? 'widget-on' : ''; // we will add an id to the form so that we can scroll to it. - $id = wp_create_nonce( sprintf( 'pf-%s-%s', $from_widget ? 1 : 0, isset( $pirate_forms_options['id'] ) ? $pirate_forms_options['id'] : 0 ) ); + $id = wp_create_nonce( sprintf( 'pf-%s-%s', $from_widget ? 1 : 0, isset( $pirate_forms_options['id'] ) ? $pirate_forms_options['id'] : 0 ) ); $elements[] = array( 'type' => 'hidden', 'id' => 'pirate_forms_from_form', diff --git a/public/class-pirateforms-public.php b/public/class-pirateforms-public.php index 4020817..343fba7 100644 --- a/public/class-pirateforms-public.php +++ b/public/class-pirateforms-public.php @@ -731,7 +731,7 @@ public function send_email( $test = false ) { ); $redirect_to = null; - $scroll_to = isset( $_POST['pirate_forms_from_form'] ) ? $_POST['pirate_forms_from_form'] : ''; + $scroll_to = isset( $_POST['pirate_forms_from_form'] ) ? $_POST['pirate_forms_from_form'] : ''; /* If a Thank you page is selected, redirect to that page */ if ( $pirate_forms_options['pirateformsopt_thank_you_url'] ) { @@ -742,6 +742,7 @@ public function send_email( $test = false ) { } } elseif ( $is_our_theme ) { // the fragment identifier should always be the last argument, otherwise the thank you message will not show. + // the fragment identifier is called pcf here so that the URL can tell us if our theme was recognized. $redirect_to = add_query_arg( array( 'done' => 'done', @@ -749,10 +750,11 @@ public function send_email( $test = false ) { ), $_SERVER['HTTP_REFERER'] ); } elseif ( isset( $_SERVER['HTTP_REFERER'] ) ) { + // the fragment identifier is called pf here so that the URL can tell us if this is a not-our theme case. $redirect_to = add_query_arg( array( 'done' => 'done', - 'pf' => "#$scroll_to", + 'pf' => "#$scroll_to", ), $_SERVER['HTTP_REFERER'] ); } From 88e379b542d7646befd2c75eaad6829a70593e22 Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Wed, 28 Feb 2018 10:34:31 +0530 Subject: [PATCH 080/123] Escaped characters in sent email #276 --- includes/class-pirateforms-util.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-pirateforms-util.php b/includes/class-pirateforms-util.php index 306dea6..54668dc 100644 --- a/includes/class-pirateforms-util.php +++ b/includes/class-pirateforms-util.php @@ -329,7 +329,7 @@ public static function replace_magic_tags( $content, $body ) { foreach ( $body['magic_tags'] as $tag => $value ) { $from = htmlspecialchars( self::MAGIC_TAG_PREFIX . $tag . self::MAGIC_TAG_POSTFIX ); do_action( 'themeisle_log_event', PIRATEFORMS_NAME, "replacing $from with $value", 'debug', __FILE__, __LINE__ ); - $html = str_replace( $from, $value, $html ); + $html = str_replace( $from, stripslashes( $value ), $html ); } $html = apply_filters( 'pirate_forms_replace_magic_tags', $html, $body['magic_tags'] ); From c14917e4a15673a477b79ccd3e642a2da7962803 Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Wed, 28 Feb 2018 11:58:08 +0530 Subject: [PATCH 081/123] Allow .zip attachments #271 --- public/class-pirateforms-public.php | 49 +++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 6 deletions(-) diff --git a/public/class-pirateforms-public.php b/public/class-pirateforms-public.php index 4322bbc..908b81a 100644 --- a/public/class-pirateforms-public.php +++ b/public/class-pirateforms-public.php @@ -40,6 +40,45 @@ class PirateForms_Public { */ private $version; + /** + * The file types allowed to be uploaded. + * + * @access private + * @var array $_file_types_allowed The file types allowed to be uploaded. + */ + private static $_file_types_allowed = array( + '3g2', + '3gp', + 'avi', + 'doc', + 'docx', + 'gif', + 'jpeg', + 'jpg', + 'key', + 'm4a', + 'm4v', + 'mov', + 'mp3', + 'mp4', + 'mpg', + 'odt', + 'ogg', + 'ogv', + 'pdf', + 'png', + 'pps', + 'ppsx', + 'ppt', + 'pptx', + 'txt', + 'wav', + 'wmv', + 'xls', + 'xlsx', + 'zip', + ); + /** * Initialize the class and set its properties. * @@ -640,6 +679,7 @@ public function send_email( $test = false ) { $attachments = $this->get_attachments( $error_key, $pirate_forms_options, $body ); if ( is_bool( $attachments ) ) { + PirateForms_Util::save_error( $error_key, $nonce_append . '.' . $form_id ); return false; } @@ -947,13 +987,10 @@ function get_attachments( $error_key, $pirate_forms_options, &$body ) { continue; } /* Validate file type */ - $file_types_allowed = implode( '|', apply_filters( 'pirate_forms_allowed_file_types', explode( '|', 'jpg|jpeg|png|gif|pdf|doc|docx|ppt|pptx|odt|avi|ogg|m4a|mov|mp3|mp4|mpg|wav|wmv|xls|xlsx|txt' ) ) ); - $pirate_forms_file_types_allowed = $file_types_allowed; - $pirate_forms_file_types_allowed = trim( $pirate_forms_file_types_allowed, '|' ); - $pirate_forms_file_types_allowed = '(' . $pirate_forms_file_types_allowed . ')'; - $pirate_forms_file_types_allowed = '/\.' . $pirate_forms_file_types_allowed . '$/i'; + $allowed = implode( '|', apply_filters( 'pirate_forms_allowed_file_types', self::$_file_types_allowed ) ); + $pirate_forms_file_types_allowed = '/\.(' . trim( $allowed, '|' ) . ')$/i'; if ( ! preg_match( $pirate_forms_file_types_allowed, $file['name'] ) ) { - do_action( 'themeisle_log_event', PIRATEFORMS_NAME, sprintf( 'file invalid: expected %s got %s', $file_types_allowed, $file['name'] ), 'error', __FILE__, __LINE__ ); + do_action( 'themeisle_log_event', PIRATEFORMS_NAME, sprintf( 'file invalid: expected %s got %s', $allowed, $file['name'] ), 'error', __FILE__, __LINE__ ); $_SESSION[ $error_key ]['pirate-forms-upload-failed-type'] = sprintf( __( 'Uploaded file type is not allowed for %s', 'pirate-forms' ), $file['name'] ); return false; From dc6dc6f75852e90e534067931e942af142b0d208 Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Wed, 28 Feb 2018 12:02:06 +0530 Subject: [PATCH 082/123] comment --- public/class-pirateforms-public.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/class-pirateforms-public.php b/public/class-pirateforms-public.php index 908b81a..6f95df9 100644 --- a/public/class-pirateforms-public.php +++ b/public/class-pirateforms-public.php @@ -41,7 +41,7 @@ class PirateForms_Public { private $version; /** - * The file types allowed to be uploaded. + * The file types allowed to be uploaded. Can take a look at https://en.support.wordpress.com/accepted-filetypes/ for inspiration. * * @access private * @var array $_file_types_allowed The file types allowed to be uploaded. From 44d68560faa890a5b64bfdffa6c29a83f814d3df Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Wed, 28 Feb 2018 19:32:16 +0530 Subject: [PATCH 083/123] Select field #52 --- includes/class-pirateforms-html.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/includes/class-pirateforms-html.php b/includes/class-pirateforms-html.php index e6cee8b..15c6ccb 100644 --- a/includes/class-pirateforms-html.php +++ b/includes/class-pirateforms-html.php @@ -303,10 +303,15 @@ private function textarea( $args ) { private function select( $args ) { $html = $this->get_label( $args ); - $html .= ''; if ( isset( $args['options'] ) && is_array( $args['options'] ) ) { foreach ( $args['options'] as $key => $val ) { - $extra = $key == $args['value'] ? 'selected' : ''; + $extra = isset( $args['value'] ) && $key == $args['value'] ? 'selected' : ''; $html .= ''; } } From 9b849c78ad844f9a4d8bb2649115223ccc64da33 Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Wed, 28 Feb 2018 19:38:29 +0530 Subject: [PATCH 084/123] grunt --- includes/class-pirateforms-html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-pirateforms-html.php b/includes/class-pirateforms-html.php index 15c6ccb..1d2a3aa 100644 --- a/includes/class-pirateforms-html.php +++ b/includes/class-pirateforms-html.php @@ -303,7 +303,7 @@ private function textarea( $args ) { private function select( $args ) { $html = $this->get_label( $args ); - $extra = ''; + $extra = ''; if ( isset( $args['required'] ) && $args['required'] && isset( $args['required_msg'] ) ) { $extra = ( isset( $args['required'] ) && $args['required'] ? 'required' : '' ) . ' oninvalid="this.setCustomValidity(\'' . esc_attr( $args['required_msg'] ) . '\')" onchange="this.setCustomValidity(\'\')"'; } From 529f3aba67b66fb44972c991984c15f3768a72b6 Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Wed, 28 Feb 2018 19:58:35 +0530 Subject: [PATCH 085/123] [Feature Request] Multiple choice field #31 --- includes/class-pirateforms-html.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/includes/class-pirateforms-html.php b/includes/class-pirateforms-html.php index 1d2a3aa..24ead21 100644 --- a/includes/class-pirateforms-html.php +++ b/includes/class-pirateforms-html.php @@ -303,9 +303,15 @@ private function textarea( $args ) { private function select( $args ) { $html = $this->get_label( $args ); - $extra = ''; + $extra = ' '; + if ( isset( $args['sub_type'] ) ) { + $extra .= $args['sub_type'] . ' '; + } + if ( isset( $args['required'] ) && $args['required'] ) { + $extra .= 'required '; + } if ( isset( $args['required'] ) && $args['required'] && isset( $args['required_msg'] ) ) { - $extra = ( isset( $args['required'] ) && $args['required'] ? 'required' : '' ) . ' oninvalid="this.setCustomValidity(\'' . esc_attr( $args['required_msg'] ) . '\')" onchange="this.setCustomValidity(\'\')"'; + $extra .= 'oninvalid="this.setCustomValidity(\'' . esc_attr( $args['required_msg'] ) . '\')" onchange="this.setCustomValidity(\'\')" '; } $html .= ''; From a39f57e802c9a8dc2c19ffc9e34c46e83225e88c Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Sun, 4 Mar 2018 14:55:38 +0530 Subject: [PATCH 087/123] filter to modify subject --- public/class-pirateforms-public.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/class-pirateforms-public.php b/public/class-pirateforms-public.php index 4322bbc..b519a4c 100644 --- a/public/class-pirateforms-public.php +++ b/public/class-pirateforms-public.php @@ -643,7 +643,7 @@ public function send_email( $test = false ) { return false; } - $subject = 'Contact on ' . htmlspecialchars_decode( get_bloginfo( 'name' ) ); + $subject = apply_filters( 'pirate_forms_subject', 'Contact on ' . htmlspecialchars_decode( get_bloginfo( 'name' ) ) ); if ( ! empty( $pirate_forms_contact_subject ) ) { $subject = $pirate_forms_contact_subject; } From 06a6d66dad7c1f6cb9999dcfd0cafa151965471e Mon Sep 17 00:00:00 2001 From: selu91 Date: Mon, 5 Mar 2018 11:34:46 +0200 Subject: [PATCH 088/123] Bump version. --- includes/class-pirateforms.php | 2 +- package.json | 2 +- pirate-forms.php | 4 ++-- public/css/front.css | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/class-pirateforms.php b/includes/class-pirateforms.php index b6a0867..d6c0858 100644 --- a/includes/class-pirateforms.php +++ b/includes/class-pirateforms.php @@ -69,7 +69,7 @@ class PirateForms { public function __construct() { $this->plugin_name = 'pirateforms'; - $this->version = '2.3.4'; + $this->version = '2.3.5'; $this->load_dependencies(); $this->set_locale(); diff --git a/package.json b/package.json index a06e937..c2bc340 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pirate-forms", - "version": "2.3.4", + "version": "2.3.5", "description": "Pirate Forms plugin", "repository": { "type": "git", diff --git a/pirate-forms.php b/pirate-forms.php index ea99f5a..9928fd8 100644 --- a/pirate-forms.php +++ b/pirate-forms.php @@ -16,7 +16,7 @@ * Plugin Name: Free & Simple Contact Form Plugin - Pirateforms * Plugin URI: http://themeisle.com/plugins/pirate-forms/ * Description: Easily creates a nice looking, simple contact form on your WP site. - * Version: 2.3.4 + * Version: 2.3.5 * Author: Themeisle * Author URI: http://themeisle.com * Text Domain: pirate-forms @@ -36,7 +36,7 @@ define( 'PIRATEFORMS_NAME', 'Pirate Forms' ); define( 'PIRATEFORMS_SLUG', 'pirate-forms' ); define( 'PIRATEFORMS_USELL_LINK', 'https://themeisle.com/plugins/pirate-forms-extended/' ); -define( 'PIRATE_FORMS_VERSION', '2.3.4' ); +define( 'PIRATE_FORMS_VERSION', '2.3.5' ); define( 'PIRATEFORMS_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) ); define( 'PIRATEFORMS_URL', plugin_dir_url( __FILE__ ) ); define( 'PIRATEFORMS_BASENAME', plugin_basename( __FILE__ ) ); diff --git a/public/css/front.css b/public/css/front.css index 5cedc04..1022134 100644 --- a/public/css/front.css +++ b/public/css/front.css @@ -1,5 +1,5 @@ /* -Version: 2.3.4 +Version: 2.3.5 */ .pirate_forms_wrap .form_field_wrap, .widget .pirate_forms_wrap .form_field_wrap { From 8148aa2e85d2d597e4d78660c8cb8cd2fc01ae73 Mon Sep 17 00:00:00 2001 From: selul Date: Mon, 5 Mar 2018 09:51:56 +0000 Subject: [PATCH 089/123] [AUTO][skip ci] Updating changelog for v2.3.5 --- CHANGELOG.md | 8 +++++ readme.md | 9 ++++++ readme.txt | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 99 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ee6b7a..0577071 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,12 @@ + ### v2.3.5 - 2018-03-05 + **Changes:** + * Fix characters encoding issue in the subject field. +* Fix issue with spam label with two forms on the page. +* Allows zip files to be attached in forms. +* Adds a filter to dynamically change the subject. +* Adds options to send a copy of the email to the sender. + ### v2.3.4 - 2018-02-15 **Changes:** * Added missing Loader.gif file diff --git a/readme.md b/readme.md index a8d82c4..7379e40 100644 --- a/readme.md +++ b/readme.md @@ -187,6 +187,15 @@ Activating the Pirate Contact Form plugin is just like any other plugin. If you' 4. Screenshot 4. Enabling SMTP ## Changelog ## +### 2.3.5 - 2018-03-05 ### + +* Fix characters encoding issue in the subject field. +* Fix issue with spam label with two forms on the page. +* Allows zip files to be attached in forms. +* Adds a filter to dynamically change the subject. +* Adds options to send a copy of the email to the sender. + + ### 2.3.4 - 2018-02-15 ### * Added missing Loader.gif file diff --git a/readme.txt b/readme.txt index f209ac0..8e95789 100644 --- a/readme.txt +++ b/readme.txt @@ -88,6 +88,7 @@ This plugin started as a fork of https://wordpress.org/plugins/proper-contact-fo + = How I can get support for this contact form plugin ? = You can learn more about PirateForms and ask for help by visiting ThemeIsle website. @@ -166,6 +167,78 @@ You can follow the full documentation [here](http://docs.themeisle.com/article/4 = 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](http://docs.themeisle.com/article/787-how-to-install-and-use-extended-version-of-pirate-forms) + = Pirate Forms Documentation = + [https://docs.themeisle.com/article/436-pirate-forms-documentation](https://docs.themeisle.com/article/436-pirate-forms-documentation) + + = How to Change Pirate Forms Submit Button Color = + [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) + + = 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](https://docs.themeisle.com/article/427-how-to-center-the-send-message-button-for-pirate-forms) + + = 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](https://docs.themeisle.com/article/664-how-you-can-overwrite-the-default-form-template-in-pirate-forms) + + = How to change font in Pirate Forms = + [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) + + = Why do I not receive any emails? - Pirate Forms = + [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) + + = Emails are not being sent, what can i do ? = + [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) + + = 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](https://docs.themeisle.com/article/731-how-to-add-recaptcha-to-a-form-in-pirate-forms) + + = What actions and filters are available in Pirate Forms = + [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) + + = 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](https://docs.themeisle.com/article/745-how-can-i-change-html-of-default-form-in-pirate-forms) + + = 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](https://docs.themeisle.com/article/725-how-to-add-dropdown-menu-in-subject-field-in-pirate-forms) + + = 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](https://docs.themeisle.com/article/722-how-to-save-contacts-in-mailchimp-list-in-pirate-forms) + + = How to add checkbox field in Pirate Forms = + [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) + + = 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](https://docs.themeisle.com/article/732-how-to-add-a-spam-trap-in-a-form-in-pirate-forms) + + = How to create multiple forms in Pirate Forms = + [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) + + = How to create a Form Widget in Pirate Forms = + [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) + + = 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](https://docs.themeisle.com/article/724-how-to-change-default-confirmation-email-content-in-pirate-forms) + + = How to add attributes to form in Pirate Forms = + [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) + + = How to change default email content in Pirate forms = + [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) + + = How to add multiple upload fields in Pirate Forms = + [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) + + = How to create a subscription form in Pirate Forms = + [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) + + = 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](https://docs.themeisle.com/article/780-how-to-change-default-email-content-per-form-in-pirate-forms) + + = 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](https://docs.themeisle.com/article/787-how-to-install-and-use-extended-version-of-pirate-forms) + + = 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](https://docs.themeisle.com/article/836-how-to-set-a-success-page-on-successful-form-submission) + == Installation == 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' 4. Screenshot 4. Enabling SMTP == Changelog == += 2.3.5 - 2018-03-05 = + +* Fix characters encoding issue in the subject field. +* Fix issue with spam label with two forms on the page. +* Allows zip files to be attached in forms. +* Adds a filter to dynamically change the subject. +* Adds options to send a copy of the email to the sender. + + = 2.3.4 - 2018-02-15 = * Added missing Loader.gif file From e33e71aa997e6255f38068906af19845d5fbab82 Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Thu, 8 Mar 2018 17:19:43 +0530 Subject: [PATCH 090/123] adds label customization for checkbox option #63 --- includes/class-pirateforms-html.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/includes/class-pirateforms-html.php b/includes/class-pirateforms-html.php index e6cee8b..169744c 100644 --- a/includes/class-pirateforms-html.php +++ b/includes/class-pirateforms-html.php @@ -25,7 +25,12 @@ public function add( $args, $echo = true ) { } $html = $this->$type( $args ); } else { - throw new Exception( "Method for $type not defined" ); + // let's not throw an ugly exception. Let's instead inform the user that they might need to upgrade. + // @codingStandardsIgnoreStart + $msg = sprintf( 'Field type "%s" not defined. Have you upgraded to the latest version of %s?', $type, PIRATEFORMS_NAME ); + error_log( $msg ); + return; + // @codingStandardsIgnoreEnd } if ( ! $echo ) { return $html; @@ -393,4 +398,12 @@ private function wysiwyg( $args ) { return $this->get_wrap( $args, $html ); } + /** + * The label element. + */ + private function label( $args ) { + $html = $args['placeholder']; + return $this->get_wrap( $args, $html ); + } + } From d5da945be5411c0cfdb028ee8effbc8819b85b9c Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Thu, 8 Mar 2018 17:53:59 +0530 Subject: [PATCH 091/123] show civilized error message instead of ugly exception --- includes/class-pirateforms-html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-pirateforms-html.php b/includes/class-pirateforms-html.php index 169744c..905b0c4 100644 --- a/includes/class-pirateforms-html.php +++ b/includes/class-pirateforms-html.php @@ -29,7 +29,7 @@ public function add( $args, $echo = true ) { // @codingStandardsIgnoreStart $msg = sprintf( 'Field type "%s" not defined. Have you upgraded to the latest version of %s?', $type, PIRATEFORMS_NAME ); error_log( $msg ); - return; + $html = $msg; // @codingStandardsIgnoreEnd } if ( ! $echo ) { From 5220e4d4f5aa65bbc1e58cf628c5ba338a7053e4 Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Mon, 19 Mar 2018 13:11:16 +0530 Subject: [PATCH 092/123] User should be provided the access to both visual and text editor tabs in default form #256 --- admin/class-pirateforms-admin.php | 1 - 1 file changed, 1 deletion(-) diff --git a/admin/class-pirateforms-admin.php b/admin/class-pirateforms-admin.php index 6cd0aba..8edc78e 100644 --- a/admin/class-pirateforms-admin.php +++ b/admin/class-pirateforms-admin.php @@ -648,7 +648,6 @@ function get_plugin_options() { 'class' => 'pirate-forms-grouped', ), 'wysiwyg' => array( - 'quicktags' => false, 'editor_class' => 'pirate-forms-wysiwyg', 'editor_height' => 500, ), From 3d84579b92ae4a2745070094c57fc618bba4f80b Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Sat, 24 Mar 2018 09:59:47 +0530 Subject: [PATCH 093/123] add filter to add classes to form fields --- includes/class-pirateforms-phpformbuilder.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/class-pirateforms-phpformbuilder.php b/includes/class-pirateforms-phpformbuilder.php index 5878ee2..5fcbc04 100644 --- a/includes/class-pirateforms-phpformbuilder.php +++ b/includes/class-pirateforms-phpformbuilder.php @@ -50,6 +50,9 @@ function build_form( $elements, $pirate_forms_options, $from_widget ) { $form_end = ''; $custom_fields = ''; foreach ( $elements as $val ) { + if ( 'form_honeypot' !== $val['id'] && ! in_array( $val['type'], array( 'hidden', 'div' ) ) ) { + $val['class'] = apply_filters( 'pirate_forms_field_class', $val['class'], $val['id'] ); + } if ( isset( $val['is_custom'] ) && $val['is_custom'] ) { // we will combine the HTML for all the custom fields and save it under one element name. $custom_fields .= $html_helper->add( $val, false ); From c52985dcd53889e2920846276aabf55255acba98 Mon Sep 17 00:00:00 2001 From: Andrei Baicus Date: Mon, 2 Apr 2018 17:31:18 +0300 Subject: [PATCH 094/123] Adapt to first 30-40 wp themes in popular. --- includes/class-pirateforms-html.php | 3 +-- public/css/front.css | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/includes/class-pirateforms-html.php b/includes/class-pirateforms-html.php index a353a33..c4375da 100644 --- a/includes/class-pirateforms-html.php +++ b/includes/class-pirateforms-html.php @@ -368,10 +368,9 @@ private function checkbox( $args ) { } foreach ( $args['options'] as $key => $val ) { $extra = isset( $args['value'] ) && $key == $args['value'] ? 'checked' : ''; - $html .= 'get_common( $args ) . ' value="' . esc_attr( $key ) . '">' . esc_attr( $val ); + $html .= 'get_common( $args ) . ' value="' . esc_attr( $key ) . '">'; } } - return $this->get_wrap( $args, $html ); } diff --git a/public/css/front.css b/public/css/front.css index 1022134..af7ea56 100644 --- a/public/css/front.css +++ b/public/css/front.css @@ -70,7 +70,8 @@ Version: 2.3.5 margin: 0; } -.pirate-forms-fields-container .form_field_wrap textarea { +.pirate-forms-fields-container .form_field_wrap textarea, +.pirate-forms-fields-container .form_field_wrap select { width: 100%; max-width: 100%; margin: 0; @@ -96,6 +97,21 @@ Version: 2.3.5 padding-bottom: 10px; } +.pirate_forms_wrap .pirate_forms_three_inputs_wrap input[type=checkbox] { + display: inline-block; + width: auto; + height: inherit; +} + +.pf-checkbox-label { + display: inline; + cursor: pointer; +} + +.pf-checkbox-label span { + margin-left: 5px; +} + @media (max-width: 480px) { .pirate_forms_wrap .pirate-forms-footer .form_field_wrap, .pirate_forms_wrap .form_field_wrap .pirate-forms-submit-button { From 050086cbcc0ffd76664f32896274eec1671de7a9 Mon Sep 17 00:00:00 2001 From: selu91 Date: Mon, 2 Apr 2018 17:44:31 +0300 Subject: [PATCH 095/123] Bump version. --- includes/class-pirateforms.php | 2 +- package.json | 2 +- pirate-forms.php | 4 ++-- public/css/front.css | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/class-pirateforms.php b/includes/class-pirateforms.php index d6c0858..2e3cbfe 100644 --- a/includes/class-pirateforms.php +++ b/includes/class-pirateforms.php @@ -69,7 +69,7 @@ class PirateForms { public function __construct() { $this->plugin_name = 'pirateforms'; - $this->version = '2.3.5'; + $this->version = '2.4.0'; $this->load_dependencies(); $this->set_locale(); diff --git a/package.json b/package.json index c2bc340..f7371ec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pirate-forms", - "version": "2.3.5", + "version": "2.4.0", "description": "Pirate Forms plugin", "repository": { "type": "git", diff --git a/pirate-forms.php b/pirate-forms.php index 9928fd8..1dfbb34 100644 --- a/pirate-forms.php +++ b/pirate-forms.php @@ -16,7 +16,7 @@ * Plugin Name: Free & Simple Contact Form Plugin - Pirateforms * Plugin URI: http://themeisle.com/plugins/pirate-forms/ * Description: Easily creates a nice looking, simple contact form on your WP site. - * Version: 2.3.5 + * Version: 2.4.0 * Author: Themeisle * Author URI: http://themeisle.com * Text Domain: pirate-forms @@ -36,7 +36,7 @@ define( 'PIRATEFORMS_NAME', 'Pirate Forms' ); define( 'PIRATEFORMS_SLUG', 'pirate-forms' ); define( 'PIRATEFORMS_USELL_LINK', 'https://themeisle.com/plugins/pirate-forms-extended/' ); -define( 'PIRATE_FORMS_VERSION', '2.3.5' ); +define( 'PIRATE_FORMS_VERSION', '2.4.0' ); define( 'PIRATEFORMS_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) ); define( 'PIRATEFORMS_URL', plugin_dir_url( __FILE__ ) ); define( 'PIRATEFORMS_BASENAME', plugin_basename( __FILE__ ) ); diff --git a/public/css/front.css b/public/css/front.css index af7ea56..e6da262 100644 --- a/public/css/front.css +++ b/public/css/front.css @@ -1,5 +1,5 @@ /* -Version: 2.3.5 +Version: 2.4.0 */ .pirate_forms_wrap .form_field_wrap, .widget .pirate_forms_wrap .form_field_wrap { From b0f3e5fa352f531217e596d82de694bae833ff76 Mon Sep 17 00:00:00 2001 From: selu91 Date: Mon, 2 Apr 2018 17:52:03 +0300 Subject: [PATCH 096/123] Trigger update. Improves compatibility with various themes. Adds support for two new custom fields. Adds filter for custom classes into form fields. Adds visual/text switch to form wyiwyg editor. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 29a54a9..20ae7f0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ matrix: - php: '5.3' dist: precise allow_failures: - - env: TEST_SUITE=Wraith_Visual_Regression_Testing WRAITH_FAIL=3 + - env: TEST_SUITE=Wraith_Visual_Regression_Testing WRAITH_FAIL=5 branches: except: - "/^*-v[0-9]/" From 3e495862e2ee3550285e73b2eca71de7c1768d2d Mon Sep 17 00:00:00 2001 From: selul Date: Mon, 2 Apr 2018 15:06:18 +0000 Subject: [PATCH 097/123] [AUTO][skip ci] Updating changelog for v2.4.0 --- CHANGELOG.md | 7 +++++ readme.md | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++ readme.txt | 15 ++++++++++ 3 files changed, 103 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0577071..cce8d24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,11 @@ + ### v2.4.0 - 2018-04-02 + **Changes:** + * Improves compatibility with various themes. +* Adds support for two new custom fields. +* Adds filter for custom classes into form fields. +* Adds visual/text switch to form wyiwyg editor. + ### v2.3.5 - 2018-03-05 **Changes:** * Fix characters encoding issue in the subject field. diff --git a/readme.md b/readme.md index 7379e40..24ca35b 100644 --- a/readme.md +++ b/readme.md @@ -88,6 +88,7 @@ This plugin started as a fork of https://wordpress.org/plugins/proper-contact-fo + ### How I can get support for this contact form plugin ? ### You can learn more about PirateForms and ask for help by visiting ThemeIsle website. @@ -166,6 +167,78 @@ You can follow the full documentation [here](http://docs.themeisle.com/article/4 = 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](http://docs.themeisle.com/article/787-how-to-install-and-use-extended-version-of-pirate-forms) + = Pirate Forms Documentation = + [https://docs.themeisle.com/article/436-pirate-forms-documentation](https://docs.themeisle.com/article/436-pirate-forms-documentation) + + = How to Change Pirate Forms Submit Button Color = + [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) + + = 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](https://docs.themeisle.com/article/427-how-to-center-the-send-message-button-for-pirate-forms) + + = 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](https://docs.themeisle.com/article/664-how-you-can-overwrite-the-default-form-template-in-pirate-forms) + + = How to change font in Pirate Forms = + [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) + + = Why do I not receive any emails? - Pirate Forms = + [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) + + = Emails are not being sent, what can i do ? = + [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) + + = 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](https://docs.themeisle.com/article/731-how-to-add-recaptcha-to-a-form-in-pirate-forms) + + = What actions and filters are available in Pirate Forms = + [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) + + = 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](https://docs.themeisle.com/article/745-how-can-i-change-html-of-default-form-in-pirate-forms) + + = 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](https://docs.themeisle.com/article/725-how-to-add-dropdown-menu-in-subject-field-in-pirate-forms) + + = 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](https://docs.themeisle.com/article/722-how-to-save-contacts-in-mailchimp-list-in-pirate-forms) + + = How to add checkbox field in Pirate Forms = + [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) + + = 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](https://docs.themeisle.com/article/732-how-to-add-a-spam-trap-in-a-form-in-pirate-forms) + + = How to create multiple forms in Pirate Forms = + [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) + + = How to create a Form Widget in Pirate Forms = + [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) + + = 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](https://docs.themeisle.com/article/724-how-to-change-default-confirmation-email-content-in-pirate-forms) + + = How to add attributes to form in Pirate Forms = + [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) + + = How to change default email content in Pirate forms = + [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) + + = How to add multiple upload fields in Pirate Forms = + [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) + + = How to create a subscription form in Pirate Forms = + [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) + + = 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](https://docs.themeisle.com/article/780-how-to-change-default-email-content-per-form-in-pirate-forms) + + = 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](https://docs.themeisle.com/article/787-how-to-install-and-use-extended-version-of-pirate-forms) + + = 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](https://docs.themeisle.com/article/836-how-to-set-a-success-page-on-successful-form-submission) + == Installation == 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,14 @@ Activating the Pirate Contact Form plugin is just like any other plugin. If you' 4. Screenshot 4. Enabling SMTP ## Changelog ## +### 2.4.0 - 2018-04-02 ### + +* Improves compatibility with various themes. +* Adds support for two new custom fields. +* Adds filter for custom classes into form fields. +* Adds visual/text switch to form wyiwyg editor. + + ### 2.3.5 - 2018-03-05 ### * Fix characters encoding issue in the subject field. diff --git a/readme.txt b/readme.txt index 8e95789..af2a66b 100644 --- a/readme.txt +++ b/readme.txt @@ -89,6 +89,7 @@ This plugin started as a fork of https://wordpress.org/plugins/proper-contact-fo + = How I can get support for this contact form plugin ? = You can learn more about PirateForms and ask for help by visiting ThemeIsle website. @@ -239,6 +240,12 @@ You can follow the full documentation [here](http://docs.themeisle.com/article/4 = 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](https://docs.themeisle.com/article/836-how-to-set-a-success-page-on-successful-form-submission) + = 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](https://docs.themeisle.com/article/838-pirate-forms-how-to-change-the-default-subject-of-email-admin-receives) + + = 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](https://docs.themeisle.com/article/837-how-to-send-a-copy-of-the-sent-email-to-the-sender) + == Installation == 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,6 +267,14 @@ Activating the Pirate Contact Form plugin is just like any other plugin. If you' 4. Screenshot 4. Enabling SMTP == Changelog == += 2.4.0 - 2018-04-02 = + +* Improves compatibility with various themes. +* Adds support for two new custom fields. +* Adds filter for custom classes into form fields. +* Adds visual/text switch to form wyiwyg editor. + + = 2.3.5 - 2018-03-05 = * Fix characters encoding issue in the subject field. From 14249a13bfb3c74d85aec17c2e68510e85134f86 Mon Sep 17 00:00:00 2001 From: contactashish13 Date: Mon, 30 Apr 2018 10:03:15 +0530 Subject: [PATCH 098/123] GDPR compliant #295 --- admin/class-pirateforms-admin.php | 75 ++++++++++++++++++++++++++++- includes/class-pirateforms-html.php | 4 ++ includes/class-pirateforms.php | 1 + public/class-pirateforms-public.php | 36 +++++++++++++- 4 files changed, 113 insertions(+), 3 deletions(-) diff --git a/admin/class-pirateforms-admin.php b/admin/class-pirateforms-admin.php index 8edc78e..38d5788 100644 --- a/admin/class-pirateforms-admin.php +++ b/admin/class-pirateforms-admin.php @@ -303,17 +303,18 @@ function get_plugin_options() { 'value' => __( 'Store submissions in the database', 'pirate-forms' ), 'html' => '', 'desc' => array( - 'value' => __( 'Should the submissions be stored in the admin area? If chosen, contact form submissions will be saved under "All Entries" on the left (appears after this option is activated).', 'pirate-forms' ), + 'value' => sprintf( '%s
    %s', __( 'Should the submissions be stored in the admin area? If chosen, contact form submissions will be saved under "All Entries" on the left (appears after this option is activated).', 'pirate-forms' ), __( 'According to GDPR we recommend you to ask for consent in order to store user data', 'pirate-forms' ) ), 'class' => 'pirate_forms_option_description', ), ), - 'default' => 'yes', + 'default' => 'no', 'value' => PirateForms_Util::get_option( 'pirateformsopt_store' ), 'wrap' => array( 'type' => 'div', 'class' => 'pirate-forms-grouped', ), 'options' => array( 'yes' => __( 'Yes', 'pirate-forms' ) ), + 'title' => __('According to GDPR we recommend you to ask for consent in order to store user data', 'pirate-forms' ), ), array( 'id' => 'pirateformsopt_nonce', @@ -512,6 +513,23 @@ function get_plugin_options() { 'req' => __( 'Required', 'pirate-forms' ), ), ), + array( + 'id' => 'pirateformsopt_checkbox_field', + 'type' => 'select', + 'label' => array( + 'value' => __( 'Checkbox', 'pirate-forms' ), + ), + 'value' => PirateForms_Util::get_option( 'pirateformsopt_checkbox_field' ), + 'wrap' => array( + 'type' => 'div', + 'class' => 'pirate-forms-grouped pirateformsopt_checkbox', + ), + 'options' => array( + '' => __( 'Do not display', 'pirate-forms' ), + 'yes' => __( 'Display but not required', 'pirate-forms' ), + 'req' => __( 'Required', 'pirate-forms' ), + ), + ), /* Recaptcha */ array( 'id' => 'pirateformsopt_recaptcha_field', @@ -634,6 +652,18 @@ function get_plugin_options() { 'class' => 'pirate-forms-grouped', ), ), + array( + 'id' => 'pirateformsopt_label_checkbox', + 'type' => 'text', + 'label' => array( + 'value' => __( 'Checkbox', 'pirate-forms' ), + ), + 'value' => PirateForms_Util::get_option( 'pirateformsopt_label_checkbox' ), + 'wrap' => array( + 'type' => 'div', + 'class' => 'pirate-forms-grouped', + ), + ), array( 'id' => 'pirateformsopt_email_content', 'type' => 'wysiwyg', @@ -724,6 +754,19 @@ function get_plugin_options() { 'class' => 'pirate-forms-grouped', ), ), + array( + 'id' => 'pirateformsopt_label_err_no_checkbox', + 'type' => 'text', + 'label' => array( + 'value' => __( 'Checkbox is not checked', 'pirate-forms' ), + ), + 'default' => __( 'Please select the checkbox', 'pirate-forms' ), + 'value' => PirateForms_Util::get_option( 'pirateformsopt_label_err_no_checkbox' ), + 'wrap' => array( + 'type' => 'div', + 'class' => 'pirate-forms-grouped', + ), + ), array( 'id' => 'pirateformsopt_label_submit', 'type' => 'text', @@ -1030,6 +1073,34 @@ public function test_configuration( $options, $id ) { return $options; } + /** + * Show admin notices. + */ + public function admin_notices() { + $screen = get_current_screen(); + if ( empty( $screen ) ) { + return; + } + if ( ! isset( $screen->base ) ) { + return; + } + + if ( ! in_array( $screen->id, array( 'toplevel_page_pirateforms-admin' ) ) ) { + return; + } + + $options = PirateForms_Util::get_option(); + + // check if store submissions is enabled without having a checkbox. + if ( 'yes' !== $options['pirateformsopt_store'] ) { + return; + } + + if ( empty( $options['pirateformsopt_checkbox_field'] ) ) { + echo sprintf( '

    %s

    ', __( 'According to GDPR we recommend you to ask for consent in order to store user data', 'pirate-forms' ) ); + } + } + /** * Hook into the sent result. */ diff --git a/includes/class-pirateforms-html.php b/includes/class-pirateforms-html.php index c4375da..0b0c278 100644 --- a/includes/class-pirateforms-html.php +++ b/includes/class-pirateforms-html.php @@ -124,6 +124,10 @@ private function get_common( $args, $additional = array() ) { $html .= ' disabled'; } + if ( isset( $args['title'] ) && !empty ( $args['title'] ) ) { + $html .= ' title="' . esc_attr( $args['title'] ) . '"'; + } + return $html; } diff --git a/includes/class-pirateforms.php b/includes/class-pirateforms.php index 2e3cbfe..07e6bb1 100644 --- a/includes/class-pirateforms.php +++ b/includes/class-pirateforms.php @@ -152,6 +152,7 @@ private function define_admin_hooks() { $this->loader->add_action( 'pirate_forms_load_sidebar', $plugin_admin, 'load_sidebar' ); $this->loader->add_action( 'pirate_forms_load_sidebar_theme', $plugin_admin, 'load_sidebar_theme' ); $this->loader->add_action( 'pirate_forms_load_sidebar_subscribe', $plugin_admin, 'load_sidebar_subscribe' ); + $this->loader->add_action( 'admin_notices', $plugin_admin, 'admin_notices' ); // this informs the pro whether the lite will implement the custom spam checkbox or not. add_filter( 'pirate_forms_support_custom_spam', '__return_true' ); diff --git a/public/class-pirateforms-public.php b/public/class-pirateforms-public.php index 2c02e14..1a5ddd9 100644 --- a/public/class-pirateforms-public.php +++ b/public/class-pirateforms-public.php @@ -341,7 +341,7 @@ public function display_form( $atts, $content = null ) { $field = $pirate_forms_options['pirateformsopt_attachment_field']; /** - ****** Message field */ + ****** Attachment field */ if ( ! empty( $field ) && 'no' !== $field ) : $required = $field === 'req' ? true : false; $wrap_classes = array( 'col-xs-12 form_field_wrap contact_attachment_wrap' ); @@ -361,6 +361,36 @@ public function display_form( $atts, $content = null ) { ), ); endif; + + $field = $pirate_forms_options['pirateformsopt_checkbox_field']; + $label = $pirate_forms_options['pirateformsopt_label_checkbox']; + + /** + ****** Message field */ + if ( ! empty( $field ) && ! empty( $label ) ) : + $required = $field === 'req' ? true : false; + $wrap_classes = array( 'col-xs-12 form_field_wrap contact_checkbox_wrap ' ); + // If this field was submitted with invalid data + if ( isset( $_SESSION[ $error_key ]['contact-checkbox'] ) ) { + $wrap_classes[] = 'error'; + } + $elements[] = array( + 'required' => $required, + 'required_msg' => $pirate_forms_options['pirateformsopt_label_err_no_checkbox'], + 'type' => 'checkbox', + 'class' => 'form-control', + 'id' => 'pirate-forms-contact-checkbox', + 'wrap' => array( + 'type' => 'div', + 'class' => implode( ' ', apply_filters( 'pirateform_wrap_classes_message', $wrap_classes ) ), + ), + 'value' => isset( $_REQUEST['pirate-forms-contact-checkbox'] ) ? $_REQUEST['pirate-forms-contact-checkbox'] : '', + 'options' => array( + 'yes' => stripslashes( sanitize_text_field( $label ) ), + ), + ); + endif; + /** ******* ReCaptcha */ if ( ! empty( $pirate_forms_options['pirateformsopt_recaptcha_secretkey'] ) && ! empty( $pirate_forms_options['pirateformsopt_recaptcha_sitekey'] ) && ! empty( $pirate_forms_options['pirateformsopt_recaptcha_field'] ) && ( 'yes' === $pirate_forms_options['pirateformsopt_recaptcha_field'] ) ) : @@ -482,6 +512,10 @@ public function render_fields( $form_builder ) { echo $form_builder->attachment; } + if ( isset( $form_builder->contact_checkbox ) ) { + echo $form_builder->contact_checkbox; + } + echo '