Version Description
- Fixed issue related to XSS vulnerability and security checks.
Download this release
Release Info
Developer | amarsib |
Plugin | SendinBlue Subscribe Form And WP SMTP |
Version | 3.1.27 |
Comparing to | |
See all releases |
Code changes from version 3.1.26 to 3.1.27
- inc/SendinblueApiClient.php +1 -1
- inc/sendinblue.php +8 -8
- inc/sib-api-manager.php +14 -14
- inc/sib-form-preview.php +4 -4
- inc/table-forms.php +21 -21
- lang/{sib_lang-fr_FR.mo → mailin-fr_FR.mo} +0 -0
- lang/{sib_lang-fr_FR.po → mailin-fr_FR.po} +0 -0
- model/model-forms.php +6 -6
- page/page-form.php +120 -120
- page/page-home.php +99 -99
- page/page-scenarios.php +21 -21
- page/page-statistics.php +35 -35
- readme.txt +3 -0
- sendinblue.php +16 -16
- widget/widget_form.php +3 -3
inc/SendinblueApiClient.php
CHANGED
@@ -14,7 +14,7 @@ class SendinblueApiClient
|
|
14 |
const RESPONSE_CODE_CREATED = 201;
|
15 |
const RESPONSE_CODE_ACCEPTED = 202;
|
16 |
const RESPONSE_CODE_UNAUTHORIZED = 401;
|
17 |
-
const PLUGIN_VERSION = '3.1.
|
18 |
const USER_AGENT = 'sendinblue_plugins/wordpress';
|
19 |
|
20 |
private $apiKey;
|
14 |
const RESPONSE_CODE_CREATED = 201;
|
15 |
const RESPONSE_CODE_ACCEPTED = 202;
|
16 |
const RESPONSE_CODE_UNAUTHORIZED = 401;
|
17 |
+
const PLUGIN_VERSION = '3.1.27';
|
18 |
const USER_AGENT = 'sendinblue_plugins/wordpress';
|
19 |
|
20 |
private $apiKey;
|
inc/sendinblue.php
CHANGED
@@ -49,7 +49,7 @@
|
|
49 |
$data['url'] = $url;
|
50 |
}
|
51 |
if (isset($_COOKIE['session_id']) && $_COOKIE['session_id'] != '') {
|
52 |
-
$data['session_id'] = $_COOKIE['session_id'];
|
53 |
}
|
54 |
$parsed = parse_url($url);
|
55 |
$host_parts = explode('.', $parsed['host']);
|
@@ -76,10 +76,10 @@
|
|
76 |
//get email cookie
|
77 |
|
78 |
if (isset($_COOKIE['email_id']) && $_COOKIE['email_id'] != '') {
|
79 |
-
$data['email_id'] = $_COOKIE['email_id'];
|
80 |
}
|
81 |
if (isset($_COOKIE['session_id']) && $_COOKIE['session_id'] != '') {
|
82 |
-
$data['session_id'] = $_COOKIE['session_id'];
|
83 |
}
|
84 |
|
85 |
//store email cookie
|
@@ -89,7 +89,7 @@
|
|
89 |
$host_parts = explode('.', $parsed['host']);
|
90 |
$domain = implode('.', array_slice($host_parts, count($host_parts)-2));
|
91 |
//store email_id cookie
|
92 |
-
setcookie("email_id",$_COOKIE['email_id'] = $obj['email_id'],time() + 86400,"/",$domain);
|
93 |
}
|
94 |
}
|
95 |
public function page($data)
|
@@ -101,10 +101,10 @@
|
|
101 |
}
|
102 |
//get email cookie
|
103 |
if (isset($_COOKIE['email_id']) && $_COOKIE['email_id'] != '') {
|
104 |
-
$data['email_id'] = $_COOKIE['email_id'];
|
105 |
}
|
106 |
if (isset($_COOKIE['session_id']) && $_COOKIE['session_id'] != '') {
|
107 |
-
$data['session_id'] = $_COOKIE['session_id'];
|
108 |
}
|
109 |
//referrer
|
110 |
if (!array_key_exists('referrer',$data) && array_key_exists('HTTP_REFERER',$_SERVER)) {
|
@@ -135,10 +135,10 @@
|
|
135 |
$data['sib_type'] = 'trackLink';
|
136 |
//get email cookie
|
137 |
if (isset($_COOKIE['email_id']) && $_COOKIE['email_id'] != '') {
|
138 |
-
$data['email_id'] = $_COOKIE['email_id'];
|
139 |
}
|
140 |
if (isset($_COOKIE['session_id']) && $_COOKIE['session_id'] != '') {
|
141 |
-
$data['session_id'] = $_COOKIE['session_id'];
|
142 |
}
|
143 |
$url = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
144 |
if (!array_key_exists('url',$data)) {
|
49 |
$data['url'] = $url;
|
50 |
}
|
51 |
if (isset($_COOKIE['session_id']) && $_COOKIE['session_id'] != '') {
|
52 |
+
$data['session_id'] = sanitize_text_field( $_COOKIE['session_id'] );
|
53 |
}
|
54 |
$parsed = parse_url($url);
|
55 |
$host_parts = explode('.', $parsed['host']);
|
76 |
//get email cookie
|
77 |
|
78 |
if (isset($_COOKIE['email_id']) && $_COOKIE['email_id'] != '') {
|
79 |
+
$data['email_id'] = sanitize_email( $_COOKIE['email_id'] );
|
80 |
}
|
81 |
if (isset($_COOKIE['session_id']) && $_COOKIE['session_id'] != '') {
|
82 |
+
$data['session_id'] = sanitize_text_field( $_COOKIE['session_id'] );
|
83 |
}
|
84 |
|
85 |
//store email cookie
|
89 |
$host_parts = explode('.', $parsed['host']);
|
90 |
$domain = implode('.', array_slice($host_parts, count($host_parts)-2));
|
91 |
//store email_id cookie
|
92 |
+
setcookie("email_id",$_COOKIE['email_id'] = $obj['email_id'],time() + 86400,"/",$domain);
|
93 |
}
|
94 |
}
|
95 |
public function page($data)
|
101 |
}
|
102 |
//get email cookie
|
103 |
if (isset($_COOKIE['email_id']) && $_COOKIE['email_id'] != '') {
|
104 |
+
$data['email_id'] = sanitize_email( $_COOKIE['email_id'] );
|
105 |
}
|
106 |
if (isset($_COOKIE['session_id']) && $_COOKIE['session_id'] != '') {
|
107 |
+
$data['session_id'] = sanitize_text_field( $_COOKIE['session_id'] );
|
108 |
}
|
109 |
//referrer
|
110 |
if (!array_key_exists('referrer',$data) && array_key_exists('HTTP_REFERER',$_SERVER)) {
|
135 |
$data['sib_type'] = 'trackLink';
|
136 |
//get email cookie
|
137 |
if (isset($_COOKIE['email_id']) && $_COOKIE['email_id'] != '') {
|
138 |
+
$data['email_id'] = sanitize_email( $_COOKIE['email_id'] );
|
139 |
}
|
140 |
if (isset($_COOKIE['session_id']) && $_COOKIE['session_id'] != '') {
|
141 |
+
$data['session_id'] = sanitize_text_field( $_COOKIE['session_id'] );
|
142 |
}
|
143 |
$url = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
144 |
if (!array_key_exists('url',$data)) {
|
inc/sib-api-manager.php
CHANGED
@@ -507,9 +507,9 @@ if ( ! class_exists( 'SIB_API_Manager' ) ) {
|
|
507 |
|
508 |
// set subject info.
|
509 |
if ( 'confirm' == $type ) {
|
510 |
-
$subject = __( 'Subscription confirmed', '
|
511 |
} elseif ( 'double-optin' == $type ) {
|
512 |
-
$subject = __( 'Please confirm subscription', '
|
513 |
}
|
514 |
|
515 |
// get sender info.
|
@@ -522,8 +522,8 @@ if ( ! class_exists( 'SIB_API_Manager' ) ) {
|
|
522 |
$sender_name = trim( get_bloginfo( 'name' ) );
|
523 |
}
|
524 |
if ( '' == $sender_email ) {
|
525 |
-
$sender_email = __( 'no-reply@sendinblue.com', '
|
526 |
-
$sender_name = __( 'Sendinblue', '
|
527 |
}
|
528 |
|
529 |
$template_contents = self::get_email_template( $type );
|
@@ -660,12 +660,12 @@ if ( ! class_exists( 'SIB_API_Manager' ) ) {
|
|
660 |
if ( SendinblueApiClient::RESPONSE_CODE_ACCEPTED == $client->getLastResponseCode() ) {
|
661 |
$response = array(
|
662 |
'code' => 'success',
|
663 |
-
'message' => __( 'Contact synchronization has started.', '
|
664 |
);
|
665 |
} else {
|
666 |
$response = array(
|
667 |
'code' => 'failed',
|
668 |
-
'message' => __( 'Something went wrong. PLease try again.', '
|
669 |
);
|
670 |
}
|
671 |
return $response;
|
@@ -716,7 +716,7 @@ if ( ! class_exists( 'SIB_API_Manager' ) ) {
|
|
716 |
*/
|
717 |
function unsubscribe() {
|
718 |
$mailin = new SendinblueApiClient();
|
719 |
-
$code = isset( $_GET['code'] ) ?
|
720 |
$list_id = isset( $_GET['li'] ) ? intval( esc_attr( $_GET['li'] ) ) : '' ;
|
721 |
|
722 |
$email = base64_decode( strtr( $code, '-_', '+/' ) );
|
@@ -762,7 +762,7 @@ if ( ! class_exists( 'SIB_API_Manager' ) ) {
|
|
762 |
<td style="line-height:0; font-size:0;" height="20">
|
763 |
<div
|
764 |
style="font-family:arial,sans-serif; color:#61a6f3; font-size:20px; font-weight:bold; line-height:28px;">
|
765 |
-
<?php esc_attr_e( 'Unsubscribe', '
|
766 |
</td>
|
767 |
</tr>
|
768 |
</tbody>
|
@@ -782,9 +782,9 @@ if ( ! class_exists( 'SIB_API_Manager' ) ) {
|
|
782 |
<div
|
783 |
style="font-family:arial,sans-serif; font-size:14px; margin:0; line-height:24px; color:#555555;">
|
784 |
<br>
|
785 |
-
<?php esc_attr_e( 'Your request has been taken into account.', '
|
786 |
<br>
|
787 |
-
<?php esc_attr_e( 'The user has been unsubscribed', '
|
788 |
<br>
|
789 |
-Sendinblue
|
790 |
</div>
|
@@ -869,9 +869,9 @@ if ( ! class_exists( 'SIB_API_Manager' ) ) {
|
|
869 |
style="font-family:arial,sans-serif; color:#61a6f3; font-size:20px; font-weight:bold; line-height:28px;">
|
870 |
<?php
|
871 |
if ( 'Subscribe' === $type ) {
|
872 |
-
esc_attr_e( 'Thank you for subscribing', '
|
873 |
} elseif ( 'Bot Event' === $type ) {
|
874 |
-
esc_attr_e( 'Please Try Again', '
|
875 |
}
|
876 |
?>
|
877 |
</div>
|
@@ -896,10 +896,10 @@ if ( ! class_exists( 'SIB_API_Manager' ) ) {
|
|
896 |
<br>
|
897 |
<?php
|
898 |
if ( 'Subscribe' === $type ) {
|
899 |
-
echo esc_attr__( 'You have just subscribed to the newsletter of ', '
|
900 |
?>
|
901 |
<br><br>
|
902 |
-
<?php esc_attr_e( '-Sendinblue', '
|
903 |
</td>
|
904 |
</tr>
|
905 |
</tbody>
|
507 |
|
508 |
// set subject info.
|
509 |
if ( 'confirm' == $type ) {
|
510 |
+
$subject = __( 'Subscription confirmed', 'mailin' );
|
511 |
} elseif ( 'double-optin' == $type ) {
|
512 |
+
$subject = __( 'Please confirm subscription', 'mailin' );
|
513 |
}
|
514 |
|
515 |
// get sender info.
|
522 |
$sender_name = trim( get_bloginfo( 'name' ) );
|
523 |
}
|
524 |
if ( '' == $sender_email ) {
|
525 |
+
$sender_email = __( 'no-reply@sendinblue.com', 'mailin' );
|
526 |
+
$sender_name = __( 'Sendinblue', 'mailin' );
|
527 |
}
|
528 |
|
529 |
$template_contents = self::get_email_template( $type );
|
660 |
if ( SendinblueApiClient::RESPONSE_CODE_ACCEPTED == $client->getLastResponseCode() ) {
|
661 |
$response = array(
|
662 |
'code' => 'success',
|
663 |
+
'message' => __( 'Contact synchronization has started.', 'mailin' )
|
664 |
);
|
665 |
} else {
|
666 |
$response = array(
|
667 |
'code' => 'failed',
|
668 |
+
'message' => __( 'Something went wrong. PLease try again.', 'mailin' )
|
669 |
);
|
670 |
}
|
671 |
return $response;
|
716 |
*/
|
717 |
function unsubscribe() {
|
718 |
$mailin = new SendinblueApiClient();
|
719 |
+
$code = isset( $_GET['code'] ) ? sanitize_text_field( $_GET['code'] ) : '' ;
|
720 |
$list_id = isset( $_GET['li'] ) ? intval( esc_attr( $_GET['li'] ) ) : '' ;
|
721 |
|
722 |
$email = base64_decode( strtr( $code, '-_', '+/' ) );
|
762 |
<td style="line-height:0; font-size:0;" height="20">
|
763 |
<div
|
764 |
style="font-family:arial,sans-serif; color:#61a6f3; font-size:20px; font-weight:bold; line-height:28px;">
|
765 |
+
<?php esc_attr_e( 'Unsubscribe', 'mailin' ); ?></div>
|
766 |
</td>
|
767 |
</tr>
|
768 |
</tbody>
|
782 |
<div
|
783 |
style="font-family:arial,sans-serif; font-size:14px; margin:0; line-height:24px; color:#555555;">
|
784 |
<br>
|
785 |
+
<?php esc_attr_e( 'Your request has been taken into account.', 'mailin' ); ?><br>
|
786 |
<br>
|
787 |
+
<?php esc_attr_e( 'The user has been unsubscribed', 'mailin' ); ?><br>
|
788 |
<br>
|
789 |
-Sendinblue
|
790 |
</div>
|
869 |
style="font-family:arial,sans-serif; color:#61a6f3; font-size:20px; font-weight:bold; line-height:28px;">
|
870 |
<?php
|
871 |
if ( 'Subscribe' === $type ) {
|
872 |
+
esc_attr_e( 'Thank you for subscribing', 'mailin' );
|
873 |
} elseif ( 'Bot Event' === $type ) {
|
874 |
+
esc_attr_e( 'Please Try Again', 'mailin' );
|
875 |
}
|
876 |
?>
|
877 |
</div>
|
896 |
<br>
|
897 |
<?php
|
898 |
if ( 'Subscribe' === $type ) {
|
899 |
+
echo esc_attr__( 'You have just subscribed to the newsletter of ', 'mailin' ) . esc_attr( $site_domain ) . ' .'; }
|
900 |
?>
|
901 |
<br><br>
|
902 |
+
<?php esc_attr_e( '-Sendinblue', 'mailin' ); ?></div>
|
903 |
</td>
|
904 |
</tr>
|
905 |
</tbody>
|
inc/sib-form-preview.php
CHANGED
@@ -3,8 +3,8 @@
|
|
3 |
* Page to preview form
|
4 |
*/
|
5 |
|
6 |
-
$sib_form_id = isset($_GET['sib_form']) ?
|
7 |
-
$sib_preview = isset($_GET['action']) ?
|
8 |
|
9 |
wp_head();
|
10 |
|
@@ -27,7 +27,7 @@ wp_head();
|
|
27 |
<script type="text/javascript">
|
28 |
var onloadSibCallback = function() {
|
29 |
grecaptcha.render('sib_captcha',{
|
30 |
-
'sitekey' : '<?php echo $formData["gCaptcha_site"] ?>'
|
31 |
});
|
32 |
};
|
33 |
</script>
|
@@ -39,7 +39,7 @@ wp_head();
|
|
39 |
var onloadSibCallback = function() {
|
40 |
var element = document.getElementsByClassName('sib-default-btn');
|
41 |
grecaptcha.render(element[0],{
|
42 |
-
'sitekey' : '<?php echo $formData["gCaptcha_site"] ?>',
|
43 |
'callback' : sibVerifyCallback
|
44 |
});
|
45 |
};
|
3 |
* Page to preview form
|
4 |
*/
|
5 |
|
6 |
+
$sib_form_id = isset($_GET['sib_form']) ? sanitize_text_field($_GET['sib_form']) : '';
|
7 |
+
$sib_preview = isset($_GET['action']) ? sanitize_text_field($_GET['action']) : '';
|
8 |
|
9 |
wp_head();
|
10 |
|
27 |
<script type="text/javascript">
|
28 |
var onloadSibCallback = function() {
|
29 |
grecaptcha.render('sib_captcha',{
|
30 |
+
'sitekey' : '<?php echo esc_attr( $formData["gCaptcha_site"] ) ?>'
|
31 |
});
|
32 |
};
|
33 |
</script>
|
39 |
var onloadSibCallback = function() {
|
40 |
var element = document.getElementsByClassName('sib-default-btn');
|
41 |
grecaptcha.render(element[0],{
|
42 |
+
'sitekey' : '<?php echo esc_attr( $formData["gCaptcha_site"] ) ?>',
|
43 |
'callback' : sibVerifyCallback
|
44 |
});
|
45 |
};
|
inc/table-forms.php
CHANGED
@@ -12,8 +12,8 @@ class SIB_Forms_List extends WP_List_Table {
|
|
12 |
public function __construct() {
|
13 |
|
14 |
parent::__construct(
|
15 |
-
array('singular' => __( 'Form', '
|
16 |
-
'plural' => __( 'Forms', '
|
17 |
'ajax' => false) //does this table support ajax?
|
18 |
);
|
19 |
|
@@ -47,7 +47,7 @@ class SIB_Forms_List extends WP_List_Table {
|
|
47 |
}
|
48 |
/** Text displayed when no customer data is available */
|
49 |
public function no_items() {
|
50 |
-
_e( 'No forms avaliable.', '
|
51 |
}
|
52 |
/**
|
53 |
* Render a column when no column specific method exist.
|
@@ -99,9 +99,9 @@ class SIB_Forms_List extends WP_List_Table {
|
|
99 |
$title = '<strong>' . $item['title'] . '</strong>';
|
100 |
|
101 |
$actions = array(
|
102 |
-
'edit' => sprintf( '<a href="?page=%s&action=%s&id=%s">Edit</a>',
|
103 |
-
'duplicate' => sprintf( '<a href="?page=%s&action=%s&id=%s">Duplicate</a>',
|
104 |
-
'delete' => sprintf( '<a class="sib-form-delete" href="?page=%s&action=%s&id=%s&_wpnonce=%s">Delete</a>',
|
105 |
);
|
106 |
|
107 |
return $title . $this->row_actions( $actions );
|
@@ -121,12 +121,12 @@ class SIB_Forms_List extends WP_List_Table {
|
|
121 |
{
|
122 |
$img_src = plugins_url('img/add_translation.png', dirname(__FILE__));
|
123 |
|
124 |
-
$href = sprintf( '<a href="?page=%s&action=%s&pid=%s&lang=%s" style="width: 20px; text-align: center;padding: 2px 1px;">',
|
125 |
$results .= $href .'<img src="'.$img_src.'" style="margin:2px;"></a>';
|
126 |
}
|
127 |
else{
|
128 |
$img_src = plugins_url('img/edit_translation.png', dirname(__FILE__));
|
129 |
-
$href = sprintf( '<a href="?page=%s&action=%s&id=%s&pid=%s&lang=%s" style="width: 20px; text-align: center;padding: 2px 1px;">',
|
130 |
$results .= $href .'<img src="'.$img_src.'" style="margin:2px;"></a>';
|
131 |
}
|
132 |
|
@@ -143,11 +143,11 @@ class SIB_Forms_List extends WP_List_Table {
|
|
143 |
function get_columns() {
|
144 |
$columns = array(
|
145 |
'cb' => '<input type="checkbox" />',
|
146 |
-
'title' => __( 'Form Name', '
|
147 |
-
'id' => __( 'Shortcode', '
|
148 |
-
'attributes' => __( 'Visible attributes', '
|
149 |
-
'listName' => __( 'Linked List', '
|
150 |
-
'date' => __( 'Last Update', '
|
151 |
);
|
152 |
if(function_exists('icl_plugin_action_links'))
|
153 |
{
|
@@ -223,14 +223,14 @@ class SIB_Forms_List extends WP_List_Table {
|
|
223 |
if ( 'delete' === $this->current_action() ) {
|
224 |
|
225 |
// In our file that handles the request, verify the nonce.
|
226 |
-
$nonce =
|
227 |
|
228 |
if ( ! wp_verify_nonce( $nonce, 'sib_delete_form' ) ) {
|
229 |
die( 'Go get a life script kiddies' );
|
230 |
}
|
231 |
else {
|
232 |
-
SIB_Forms::deleteForm( absint(
|
233 |
-
SIB_Forms_Lang::remove_trans( absint(
|
234 |
wp_redirect(add_query_arg('page', SIB_Page_Form::PAGE_ID, admin_url('admin.php'))); exit;
|
235 |
}
|
236 |
|
@@ -253,15 +253,15 @@ class SIB_Forms_List extends WP_List_Table {
|
|
253 |
}
|
254 |
}
|
255 |
public function pagination($which){
|
256 |
-
echo '<a href="'.add_query_arg(array('page' => 'sib_page_form','action'=>'edit'/*,'id'=>'new'*/), admin_url('admin.php')).'" class="btn btn-primary" style="float:right; margin: 2px 1px 8px 15px;" >'.__("Add New Form", "
|
257 |
parent::pagination($which);
|
258 |
}
|
259 |
|
260 |
static function usort_reorder( $a, $b ) {
|
261 |
// If no sort, default to title
|
262 |
-
$orderby = ( ! empty( $_GET['orderby'] ) ) ?
|
263 |
// If no order, default to asc
|
264 |
-
$order = ( ! empty($_GET['order'] ) ) ?
|
265 |
// Determine sort order
|
266 |
$result = strcmp( $a[$orderby], $b[$orderby] );
|
267 |
// Send final sort direction to usort
|
@@ -269,7 +269,7 @@ class SIB_Forms_List extends WP_List_Table {
|
|
269 |
}
|
270 |
|
271 |
function admin_header() {
|
272 |
-
$page = ( isset($_GET['page'] ) ) ?
|
273 |
if( 'sib_page_form' != $page )
|
274 |
return;
|
275 |
|
@@ -277,4 +277,4 @@ class SIB_Forms_List extends WP_List_Table {
|
|
277 |
echo '.wp-list-table .column-date { width: 150px; }';
|
278 |
echo '</style>';
|
279 |
}
|
280 |
-
}
|
12 |
public function __construct() {
|
13 |
|
14 |
parent::__construct(
|
15 |
+
array('singular' => __( 'Form', 'mailin' ), //singular name of the listed records
|
16 |
+
'plural' => __( 'Forms', 'mailin' ), //plural name of the listed records
|
17 |
'ajax' => false) //does this table support ajax?
|
18 |
);
|
19 |
|
47 |
}
|
48 |
/** Text displayed when no customer data is available */
|
49 |
public function no_items() {
|
50 |
+
_e( 'No forms avaliable.', 'mailin' );
|
51 |
}
|
52 |
/**
|
53 |
* Render a column when no column specific method exist.
|
99 |
$title = '<strong>' . $item['title'] . '</strong>';
|
100 |
|
101 |
$actions = array(
|
102 |
+
'edit' => sprintf( '<a href="?page=%s&action=%s&id=%s">Edit</a>', sanitize_text_field( $_REQUEST['page'] ), 'edit', absint( $item['id'] ) ),
|
103 |
+
'duplicate' => sprintf( '<a href="?page=%s&action=%s&id=%s">Duplicate</a>', sanitize_text_field( $_REQUEST['page'] ), 'duplicate', absint( $item['id'] ) ),
|
104 |
+
'delete' => sprintf( '<a class="sib-form-delete" href="?page=%s&action=%s&id=%s&_wpnonce=%s">Delete</a>', sanitize_text_field( $_REQUEST['page'] ), 'delete', absint( $item['id'] ), $delete_nonce )
|
105 |
);
|
106 |
|
107 |
return $title . $this->row_actions( $actions );
|
121 |
{
|
122 |
$img_src = plugins_url('img/add_translation.png', dirname(__FILE__));
|
123 |
|
124 |
+
$href = sprintf( '<a href="?page=%s&action=%s&pid=%s&lang=%s" style="width: 20px; text-align: center;padding: 2px 1px;">', sanitize_text_field( $_REQUEST['page'] ), 'edit', absint( $item['id'] ), sanitize_text_field( $language['language_code'] ) );
|
125 |
$results .= $href .'<img src="'.$img_src.'" style="margin:2px;"></a>';
|
126 |
}
|
127 |
else{
|
128 |
$img_src = plugins_url('img/edit_translation.png', dirname(__FILE__));
|
129 |
+
$href = sprintf( '<a href="?page=%s&action=%s&id=%s&pid=%s&lang=%s" style="width: 20px; text-align: center;padding: 2px 1px;">', sanitize_text_field( $_REQUEST['page'] ), 'edit', absint( $exist ) , absint( $item['id']), sanitize_text_field( $language['language_code'] ) );
|
130 |
$results .= $href .'<img src="'.$img_src.'" style="margin:2px;"></a>';
|
131 |
}
|
132 |
|
143 |
function get_columns() {
|
144 |
$columns = array(
|
145 |
'cb' => '<input type="checkbox" />',
|
146 |
+
'title' => __( 'Form Name', 'mailin' ),
|
147 |
+
'id' => __( 'Shortcode', 'mailin' ),
|
148 |
+
'attributes' => __( 'Visible attributes', 'mailin' ),
|
149 |
+
'listName' => __( 'Linked List', 'mailin' ),
|
150 |
+
'date' => __( 'Last Update', 'mailin' )
|
151 |
);
|
152 |
if(function_exists('icl_plugin_action_links'))
|
153 |
{
|
223 |
if ( 'delete' === $this->current_action() ) {
|
224 |
|
225 |
// In our file that handles the request, verify the nonce.
|
226 |
+
$nonce = sanitize_text_field( $_REQUEST['_wpnonce'] );
|
227 |
|
228 |
if ( ! wp_verify_nonce( $nonce, 'sib_delete_form' ) ) {
|
229 |
die( 'Go get a life script kiddies' );
|
230 |
}
|
231 |
else {
|
232 |
+
SIB_Forms::deleteForm( absint( sanitize_text_field($_GET['id']) ) );
|
233 |
+
SIB_Forms_Lang::remove_trans( absint( sanitize_text_field($_GET['id']) ) );
|
234 |
wp_redirect(add_query_arg('page', SIB_Page_Form::PAGE_ID, admin_url('admin.php'))); exit;
|
235 |
}
|
236 |
|
253 |
}
|
254 |
}
|
255 |
public function pagination($which){
|
256 |
+
echo '<a href="'.add_query_arg(array('page' => 'sib_page_form','action'=>'edit'/*,'id'=>'new'*/), admin_url('admin.php')).'" class="btn btn-primary" style="float:right; margin: 2px 1px 8px 15px;" >'.__("Add New Form", "mailin").'</a>';
|
257 |
parent::pagination($which);
|
258 |
}
|
259 |
|
260 |
static function usort_reorder( $a, $b ) {
|
261 |
// If no sort, default to title
|
262 |
+
$orderby = ( ! empty( $_GET['orderby'] ) ) ? sanitize_text_field($_GET['orderby']) : 'title'; // by title
|
263 |
// If no order, default to asc
|
264 |
+
$order = ( ! empty($_GET['order'] ) ) ? sanitize_text_field($_GET['order']) : 'ask';
|
265 |
// Determine sort order
|
266 |
$result = strcmp( $a[$orderby], $b[$orderby] );
|
267 |
// Send final sort direction to usort
|
269 |
}
|
270 |
|
271 |
function admin_header() {
|
272 |
+
$page = ( isset($_GET['page'] ) ) ? sanitize_text_field( $_GET['page'] ) : false;
|
273 |
if( 'sib_page_form' != $page )
|
274 |
return;
|
275 |
|
277 |
echo '.wp-list-table .column-date { width: 150px; }';
|
278 |
echo '</style>';
|
279 |
}
|
280 |
+
}
|
lang/{sib_lang-fr_FR.mo → mailin-fr_FR.mo}
RENAMED
File without changes
|
lang/{sib_lang-fr_FR.po → mailin-fr_FR.po}
RENAMED
File without changes
|
model/model-forms.php
CHANGED
@@ -283,7 +283,7 @@ if ( ! class_exists( 'SIB_Forms' ) ) {
|
|
283 |
$attributes = 'email,NAME';
|
284 |
global $wpdb;
|
285 |
$query = 'INSERT INTO ' . $wpdb->prefix . self::TABLE_NAME . ' ';
|
286 |
-
$deafult_form_name = esc_attr( __( 'Default Form', '
|
287 |
$query .= '(title,html,css,listID,dependTheme,successMsg,errorMsg,existMsg,invalidMsg,requiredMsg,attributes,date,isDefault) ';
|
288 |
$query .= "VALUES ('{$deafult_form_name}','{$html}','{$css}','{$list}','1','{$formData['successMsg']}','{$formData['errorMsg']}','{$formData['existMsg']}','{$formData['invalidMsg']}','{$formData['requiredMsg']}','{$attributes}','{$current_date}','1')";
|
289 |
$wpdb->query( $query ); // db call ok; no-cache ok.
|
@@ -348,11 +348,11 @@ EOD;
|
|
348 |
$result = array(
|
349 |
'html' => $html,
|
350 |
'css' => $css,
|
351 |
-
'successMsg' => esc_attr( __( 'Thank you, you have successfully registered !', '
|
352 |
-
'errorMsg' => esc_attr( __( 'Something wrong occured', '
|
353 |
-
'existMsg' => esc_attr( __( 'You have already registered', '
|
354 |
-
'invalidMsg' => esc_attr( __( 'Your email address is invalid', '
|
355 |
-
'requiredMsg' => esc_attr(__('Please fill out this field', '
|
356 |
);
|
357 |
return $result;
|
358 |
}
|
283 |
$attributes = 'email,NAME';
|
284 |
global $wpdb;
|
285 |
$query = 'INSERT INTO ' . $wpdb->prefix . self::TABLE_NAME . ' ';
|
286 |
+
$deafult_form_name = esc_attr( __( 'Default Form', 'mailin' ) );
|
287 |
$query .= '(title,html,css,listID,dependTheme,successMsg,errorMsg,existMsg,invalidMsg,requiredMsg,attributes,date,isDefault) ';
|
288 |
$query .= "VALUES ('{$deafult_form_name}','{$html}','{$css}','{$list}','1','{$formData['successMsg']}','{$formData['errorMsg']}','{$formData['existMsg']}','{$formData['invalidMsg']}','{$formData['requiredMsg']}','{$attributes}','{$current_date}','1')";
|
289 |
$wpdb->query( $query ); // db call ok; no-cache ok.
|
348 |
$result = array(
|
349 |
'html' => $html,
|
350 |
'css' => $css,
|
351 |
+
'successMsg' => esc_attr( __( 'Thank you, you have successfully registered !', 'mailin' ) ),
|
352 |
+
'errorMsg' => esc_attr( __( 'Something wrong occured', 'mailin' ) ),
|
353 |
+
'existMsg' => esc_attr( __( 'You have already registered', 'mailin' ) ),
|
354 |
+
'invalidMsg' => esc_attr( __( 'Your email address is invalid', 'mailin' ) ),
|
355 |
+
'requiredMsg' => esc_attr(__('Please fill out this field', 'mailin'))
|
356 |
);
|
357 |
return $result;
|
358 |
}
|
page/page-form.php
CHANGED
@@ -48,8 +48,8 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
48 |
*/
|
49 |
function __construct() {
|
50 |
$title = get_bloginfo('name');
|
51 |
-
$this->defaultComplianceNote = sprintf( esc_attr('Your e-mail address is only used to send you our newsletter and information about the activities of %s. You can always use the unsubscribe link included in the newsletter.', '
|
52 |
-
$this->page_hook = add_submenu_page( SIB_Page_Home::PAGE_ID, __( 'Forms', '
|
53 |
add_action( 'admin_print_scripts-' . $this->page_hook, array( $this, 'enqueue_scripts' ) );
|
54 |
add_action( 'admin_print_styles-' . $this->page_hook, array( $this, 'enqueue_styles' ) );
|
55 |
add_action( 'load-' . $this->page_hook, array( &$this, 'init' ) );
|
@@ -105,7 +105,7 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
105 |
$return_btn = 'inline-block';
|
106 |
}
|
107 |
?>
|
108 |
-
<a href="<?php echo esc_url( add_query_arg( 'page', self::PAGE_ID, admin_url( 'admin.php' ) ) ); ?>" class="button" style="margin-top: 6px; display: <?php echo esc_attr( $return_btn ); ?>;"><?php esc_attr_e( 'Back to form\'s list' ,'
|
109 |
</h1>
|
110 |
<div id="wrap-left" class="box-border-box col-md-9 ">
|
111 |
<input type="hidden" class="sib-dateformat" value="<?php echo esc_attr( 'yyyy-mm-dd' ); ?>">
|
@@ -134,15 +134,15 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
134 |
<div class="modal-content">
|
135 |
<div class="modal-header">
|
136 |
<button type="button" class="close" data-dismiss="modal">×</button>
|
137 |
-
<h4><?php esc_attr_e( 'You are about to change the language', '
|
138 |
</div>
|
139 |
<div class="modal-body">
|
140 |
-
<p><?php esc_attr_e( "Please make sure that you've saved all the changes. We will have to reload the page.", '
|
141 |
-
<p><?php esc_attr_e( 'Do you want to continue?', '
|
142 |
</div>
|
143 |
<div class="modal-footer">
|
144 |
-
<button type="button" class="btn btn-default" id="sib_modal_ok"><?php esc_attr_e( 'Ok', '
|
145 |
-
<button type="button" class="btn btn-default" id="sib_modal_cancel"><?php esc_attr_e( 'Cancel', '
|
146 |
</div>
|
147 |
</div>
|
148 |
</div>
|
@@ -154,10 +154,10 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
154 |
?>
|
155 |
<div id="main-content" class="sib-content">
|
156 |
<div class="panel panel-default row sib-small-content">
|
157 |
-
<div class="page-header"><strong><?php esc_attr_e( 'Forms', '
|
158 |
|
159 |
<form method="post" class="sib-forms-wrapper" style="padding:20px;min-height: 500px;">
|
160 |
-
<i style="font-size: 13px;"><?php esc_attr_e( "Note: Forms created in Sendinblue plugin for WordPress won't be displayed in Forms section in Sendinblue application", '
|
161 |
<?php
|
162 |
$this->forms->display();
|
163 |
?>
|
@@ -172,7 +172,7 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
172 |
$formData = SIB_Forms::getForm( $this->formID );
|
173 |
$invisibleCaptcha = '1';
|
174 |
if ( ! empty( $formData ) ) {
|
175 |
-
if ( isset( $_GET['action'] ) && 'duplicate' ===
|
176 |
$this->formID = 'new';
|
177 |
$formData['title'] = '';
|
178 |
}
|
@@ -205,8 +205,8 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
205 |
<div id="main-content" class="sib-content">
|
206 |
<form action="admin.php" class="" method="post" role="form">
|
207 |
<input type="hidden" name="action" value="sib_setting_subscription">
|
208 |
-
<input type="hidden" name="sib_form_id" value="<?php echo esc_attr( $this->formID ); ?>">
|
209 |
-
<input type="hidden" id="is_smtp_activated" value="<?php echo esc_attr( $is_activated_smtp ); ?>">
|
210 |
<?php
|
211 |
if ( isset( $_GET['pid'] ) ) {
|
212 |
?>
|
@@ -223,13 +223,13 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
223 |
<!-- Subscription form -->
|
224 |
<div class="panel panel-default row sib-small-content">
|
225 |
<div class="page-header">
|
226 |
-
<strong><?php esc_attr_e( 'Subscription form', '
|
227 |
id="sib_setting_form_spin" class="fa fa-spinner fa-spin fa-fw fa-lg fa-2x"></i>
|
228 |
</div>
|
229 |
<div id="sib_setting_form_body" class="panel-body">
|
230 |
<div class="row <!--small-content-->">
|
231 |
<div style="margin: 12px 0 34px 20px;">
|
232 |
-
<b><?php esc_attr_e( 'Form Name : ', '
|
233 |
name="sib_form_name"
|
234 |
value="<?php echo esc_attr( $formData['title'] ); ?>"
|
235 |
style="width: 60%;"
|
@@ -258,7 +258,7 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
258 |
|
259 |
<p>
|
260 |
<?php
|
261 |
-
esc_attr_e( 'Use the shortcode', '
|
262 |
if ( isset( $_GET['pid'] ) ) {
|
263 |
$id = sanitize_text_field( $_GET['pid'] );
|
264 |
} else {
|
@@ -268,17 +268,17 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
268 |
<i style="background-color: #eee;padding: 3px;">[sibwp_form
|
269 |
id=<?php echo esc_attr( $id ); ?>]</i>
|
270 |
<?php
|
271 |
-
esc_attr_e( 'inside a post, page or text widget to display your sign-up form.', '
|
272 |
?>
|
273 |
-
<b><?php esc_attr_e( 'Do not copy and paste the above form mark up, that will not work', '
|
274 |
</p>
|
275 |
<div id="sib-field-form" class="panel panel-default row form-field"
|
276 |
style="padding-bottom: 20px;">
|
277 |
|
278 |
<div class="row small-content2"
|
279 |
style="margin-top: 15px;margin-bottom: 15px;">
|
280 |
-
<b><?php esc_attr_e( 'Add a new Field', '
|
281 |
-
<?php SIB_Page_Home::get_narration_script( __( 'Add a New Field', '
|
282 |
</div>
|
283 |
<div id="sib_sel_attribute_area" class="row small-content2"
|
284 |
style="margin-top: 20px;">
|
@@ -287,43 +287,43 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
287 |
<div style="margin-top: 30px;">
|
288 |
<div class="sib-attr-normal sib-attr-category row small-content2"
|
289 |
style="margin-top: 10px;" id="sib_field_label_area">
|
290 |
-
<?php esc_attr_e( 'Label', '
|
291 |
-
<small>(<?php esc_attr_e( 'Optional', '
|
292 |
<input type="text" class="col-md-12 sib_field_changes" id="sib_field_label">
|
293 |
</div>
|
294 |
<div class="sib-attr-normal row small-content2"
|
295 |
style="margin-top: 10px;" id="sib_field_placeholder_area">
|
296 |
-
<span><?php esc_attr_e( 'Place holder', '
|
297 |
-
<small>(<?php esc_attr_e( 'Optional', '
|
298 |
</small> </span>
|
299 |
<input type="text" class="col-md-12 sib_field_changes" id="sib_field_placeholder">
|
300 |
</div>
|
301 |
<div class="sib-attr-normal row small-content2"
|
302 |
style="margin-top: 10px;" id="sib_field_initial_area">
|
303 |
-
<span><?php esc_attr_e( 'Initial value', '
|
304 |
-
<small>(<?php esc_attr_e( 'Optional', '
|
305 |
</small> </span>
|
306 |
<input type="text" class="col-md-12 sib_field_changes" id="sib_field_initial">
|
307 |
</div>
|
308 |
<div class="sib-attr-other row small-content2"
|
309 |
style="margin-top: 10px;" id="sib_field_button_text_area">
|
310 |
-
<span><?php esc_attr_e( 'Button Text', '
|
311 |
<input type="text" class="col-md-12 sib_field_changes" id="sib_field_button_text">
|
312 |
</div>
|
313 |
</div>
|
314 |
<div style="margin-top: 20px;">
|
315 |
|
316 |
<div class="sib-attr-normal sib-attr-category row small-content2" style="margin-top: 5px;" id="sib_field_required_area">
|
317 |
-
<label style="font-weight: normal;"><input type="checkbox" class="sib_field_changes" id="sib_field_required"> <?php esc_attr_e( 'Required field ?', '
|
318 |
</label>
|
319 |
</div>
|
320 |
<div class="sib-attr-category row small-content2"
|
321 |
style="margin-top: 5px;" id="sib_field_type_area">
|
322 |
<label style="font-weight: normal;"><input type="radio" class="sib_field_changes" name="sib_field_type" value="select"
|
323 |
-
checked> <?php esc_attr_e( 'Drop-down List', '
|
324 |
</label>
|
325 |
<label style="font-weight: normal;"><input type="radio" class="sib_field_changes" name="sib_field_type"
|
326 |
-
value="radio"> <?php esc_attr_e( 'Radio List', '
|
327 |
</label>
|
328 |
</div>
|
329 |
</div>
|
@@ -331,13 +331,13 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
331 |
id="sib_field_add_area">
|
332 |
<button type="button" id="sib_add_to_form_btn"
|
333 |
class="btn btn-default sib-add-to-form"><span
|
334 |
-
class="sib-large-icon"><</span> <?php esc_attr_e( 'Add to form', '
|
335 |
</button>
|
336 |
-
<?php SIB_Page_Home::get_narration_script( __( 'Add to form', '
|
337 |
</div>
|
338 |
<div class="row small-content2" style="margin-top: 20px;"
|
339 |
id="sib_field_html_area">
|
340 |
-
<span><?php esc_attr_e( 'Generated HTML', '
|
341 |
<textarea class="col-md-12" style="height: 140px;"
|
342 |
id="sib_field_html"></textarea>
|
343 |
</div>
|
@@ -349,13 +349,13 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
349 |
|
350 |
<div class="row small-content2"
|
351 |
style="margin-top: 15px;margin-bottom: 15px;">
|
352 |
-
<b><?php esc_attr_e( 'Add Multi-List Subscription', '
|
353 |
-
<?php SIB_Page_Home::get_narration_script( __( 'Add Multi-List Subscription', '
|
354 |
</div>
|
355 |
<div id="sib_sel_multi_list_area" class="row small-content2"
|
356 |
style="margin-top: 20px;">
|
357 |
<input type="hidden" id="sib_selected_multi_list_id" value="">
|
358 |
-
<select data-placeholder="<?php esc_attr_e( 'Please select the lists', '
|
359 |
class="col-md-12 chosen-select" name="multi_list_ids[]" multiple=""
|
360 |
tabindex="-1"></select>
|
361 |
</div>
|
@@ -363,14 +363,14 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
363 |
<div style="margin-top: 30px;">
|
364 |
<div class="sib-attr-normal sib-attr-category row small-content2"
|
365 |
style="margin-top: 10px;" id="sib_multi_field_label_area">
|
366 |
-
<?php esc_attr_e( 'Label', '
|
367 |
-
<small>(<?php esc_attr_e( 'Optional', '
|
368 |
<input type="text" class="col-md-12 sib_field_changes" id="sib_multi_field_label">
|
369 |
</div>
|
370 |
</div>
|
371 |
<div style="margin-top: 20px;">
|
372 |
<div class="sib-attr-normal sib-attr-category row small-content2" style="margin-top: 5px;" id="sib_multi_field_required_area">
|
373 |
-
<label style="font-weight: normal;"><input type="checkbox" class="sib_field_changes" id="sib_multi_field_required"> <?php esc_attr_e( 'Required field ?', '
|
374 |
</label>
|
375 |
</div>
|
376 |
</div>
|
@@ -378,13 +378,13 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
378 |
id="sib_multi_field_add_area">
|
379 |
<button type="button" id="sib_multi_lists_add_form_btn"
|
380 |
class="btn btn-default sib-add-to-form"><span
|
381 |
-
class="sib-large-icon"><</span> <?php esc_attr_e( 'Add to form', '
|
382 |
</button>
|
383 |
-
<?php SIB_Page_Home::get_narration_script( __( 'Add to form', '
|
384 |
</div>
|
385 |
<div class="row small-content2" style="margin-top: 20px;"
|
386 |
id="sib_field_html_area">
|
387 |
-
<span><?php esc_attr_e( 'Generated HTML', '
|
388 |
<textarea class="col-md-12" style="height: 140px;"
|
389 |
id="sib_multi_field_html"></textarea>
|
390 |
</div>
|
@@ -394,23 +394,23 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
394 |
<div id="sib-gdpr-block" class="panel panel-default row form-field" style="padding-bottom: 20px;">
|
395 |
<div class="row small-content2"
|
396 |
style="margin-top: 15px;margin-bottom: 15px;">
|
397 |
-
<b><?php esc_attr_e( 'Compliance Note', '
|
398 |
-
<?php SIB_Page_Home::get_narration_script( __( 'Add compliance note', '
|
399 |
</div>
|
400 |
<div class="row small-content2" style="margin-top: 0px;">
|
401 |
-
<input type="radio" name="sib_add_compliant_note" class="sib-add-compliant-note" value="1" ><label class="sib-radio-label"> <?php esc_attr_e( 'Yes', '
|
402 |
-
<input type="radio" name="sib_add_compliant_note" class="sib-add-compliant-note" value="0" checked><label class="sib-radio-label"> <?php esc_attr_e( 'No', '
|
403 |
</div>
|
404 |
<div class="row small-content2 sib-gdpr-block-area" style="display: none;">
|
405 |
<textarea id="sib_gdpr_text" class="col-md-12" rows="5"><?php echo trim( $this->defaultComplianceNote ); ?></textarea>
|
406 |
-
<label id="set_gdpr_default"><?php esc_attr_e('Reset to Default', '
|
407 |
</div>
|
408 |
<div class="row small-content2 sib-gdpr-block-btn" style="display: none;">
|
409 |
<button type="button" id="sib_add_compliance_note"
|
410 |
class="btn btn-default sib-add-to-form"><span
|
411 |
-
class="sib-large-icon"><</span> <?php esc_attr_e( 'Add to form', '
|
412 |
</button>
|
413 |
-
<?php SIB_Page_Home::get_narration_script( __( 'Add to form', '
|
414 |
</div>
|
415 |
</div>
|
416 |
|
@@ -419,12 +419,12 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
419 |
style="padding-bottom: 20px;">
|
420 |
<div class="alert alert-danger" style="margin:5px;display: none;"></div>
|
421 |
<div class="row small-content2" style="margin-top: 15px;margin-bottom: 15px;">
|
422 |
-
<b><?php esc_attr_e( 'Add Captcha', '
|
423 |
-
<?php SIB_Page_Home::get_narration_script( __( 'Add Captcha', '
|
424 |
</div>
|
425 |
<div class="row small-content2" style="margin-top: 0px;">
|
426 |
-
<input type="radio" name="sib_add_captcha" class="sib-add-captcha" value="1" <?php checked( $gCaptcha, '1' ); ?>><label class="sib-radio-label"> <?php esc_attr_e( 'Yes', '
|
427 |
-
<input type="radio" name="sib_add_captcha" class="sib-add-captcha" value="0" <?php checked( $gCaptcha, '0' ); ?>><label class="sib-radio-label"> <?php esc_attr_e( 'No', '
|
428 |
</div>
|
429 |
<div class="row small-content2 sib-captcha-key"
|
430 |
<?php
|
@@ -432,7 +432,7 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
432 |
echo("style='display: none;'");}
|
433 |
?>
|
434 |
>
|
435 |
-
<i><?php esc_attr_e( 'Site Key', '
|
436 |
<input type="text" class="col-md-12" id="sib_captcha_site" name="sib_captcha_site" value="<?php
|
437 |
if ( isset( $formData['gCaptcha_site'] ) && ! empty( $formData['gCaptcha_site'] ) ) {
|
438 |
echo esc_attr( $formData['gCaptcha_site'] );
|
@@ -447,7 +447,7 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
447 |
echo("style='display: none;'");}
|
448 |
?>
|
449 |
>
|
450 |
-
<i><?php esc_attr_e( 'Secret Key', '
|
451 |
<input type="text" class="col-md-12" id="sib_captcha_secret" name="sib_captcha_secret" value="<?php
|
452 |
if ( isset( $formData['gCaptcha_secret'] ) && ! empty( $formData['gCaptcha_secret'] ) ) {
|
453 |
echo esc_attr( $formData['gCaptcha_secret'] );
|
@@ -462,8 +462,8 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
462 |
echo("style='display: none;'");}
|
463 |
?>
|
464 |
>
|
465 |
-
<input type="radio" name="sib_recaptcha_type" class="sib-captcha-type" value="0" <?php checked( $invisibleCaptcha, '0' ); ?>><label class="sib-radio-label"> <?php esc_attr_e( 'Google Captcha', '
|
466 |
-
<input type="radio" name="sib_recaptcha_type" class="sib-captcha-type" value="1" <?php checked( $invisibleCaptcha, '1' ); ?>><label class="sib-radio-label"> <?php esc_attr_e( 'Google Invisible Captcha', '
|
467 |
</div>
|
468 |
<div class="row small-content2 sib-captcha-key"
|
469 |
<?php
|
@@ -473,9 +473,9 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
473 |
>
|
474 |
<button type="button" id="sib_add_captcha_btn"
|
475 |
class="btn btn-default sib-add-to-form"><span
|
476 |
-
class="sib-large-icon"><</span> <?php esc_attr_e( 'Add to form', '
|
477 |
</button>
|
478 |
-
<?php SIB_Page_Home::get_narration_script( __( 'Add Captcha', '
|
479 |
</div>
|
480 |
</div>
|
481 |
<div id="sib_form_terms" class="panel panel-default row form-field"
|
@@ -483,12 +483,12 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
483 |
<div class="alert alert-danger" style="margin:5px;display: none;"></div>
|
484 |
<!-- for terms -->
|
485 |
<div class="row small-content2" style="margin-top: 15px;margin-bottom: 15px;">
|
486 |
-
<b><?php esc_attr_e( 'Add a Term acceptance checkbox', '
|
487 |
-
<?php SIB_Page_Home::get_narration_script( __( 'Add a Term acceptance checkbox', '
|
488 |
</div>
|
489 |
<div class="row small-content2" style="margin-top: 0px;">
|
490 |
-
<input type="radio" name="sib_add_terms" class="sib-add-terms" value="1" <?php checked( $formData['termAccept'], '1' ); ?>><label class="sib-radio-label"> <?php esc_attr_e( 'Yes', '
|
491 |
-
<input type="radio" name="sib_add_terms" class="sib-add-terms" value="0" <?php checked( $formData['termAccept'], '0' ); ?>><label class="sib-radio-label"> <?php esc_attr_e( 'No', '
|
492 |
</div>
|
493 |
<div class="row small-content2 sib-terms-url"
|
494 |
<?php
|
@@ -496,7 +496,7 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
496 |
echo("style='display: none;'");}
|
497 |
?>
|
498 |
>
|
499 |
-
<i><?php esc_attr_e( 'URL to terms and conditions', '
|
500 |
<input type="text" class="col-md-12" id="sib_terms_url" name="sib_terms_url" value="<?php
|
501 |
if ( isset( $formData['termsURL'] ) && ! empty( $formData['termsURL'] ) ) {
|
502 |
echo esc_attr( $formData['termsURL'] );
|
@@ -513,22 +513,22 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
513 |
>
|
514 |
<button type="button" id="sib_add_termsUrl_btn"
|
515 |
class="btn btn-default sib-add-to-form"><span
|
516 |
-
class="sib-large-icon"><</span> <?php esc_attr_e( 'Add to form', '
|
517 |
</button>
|
518 |
-
<?php SIB_Page_Home::get_narration_script( __( 'Add Terms URL', '
|
519 |
</div>
|
520 |
|
521 |
</div>
|
522 |
<!-- use css of custom or theme -->
|
523 |
<div class="panel panel-default row form-field">
|
524 |
<div class="row small-content2" style="margin-top: 15px;margin-bottom: 10px;">
|
525 |
-
<b><?php esc_attr_e( 'Form Style', '
|
526 |
-
<?php SIB_Page_Home::get_narration_script( __( 'Form Style', '
|
527 |
</div>
|
528 |
<div id="sib_form_css_area" class="row small-content2" style="margin-bottom: 15px;">
|
529 |
-
<label style="font-weight: normal;"><input type="radio" name="sib_css_type" value="1" <?php checked( $formData['dependTheme'], '1' ); ?>> <?php esc_attr_e( 'Current Theme', '
|
530 |
</label>
|
531 |
-
<label style="font-weight: normal;"><input type="radio" name="sib_css_type" value="0" <?php checked( $formData['dependTheme'], '0' ); ?>> <?php esc_attr_e( 'Custom style', '
|
532 |
</label>
|
533 |
<textarea class="widefat" cols="60" rows="10" id="sibcssmarkup" style="width: 100%; margin-top: 10px; font-size: 13px; display: <?php echo '0' == $formData['dependTheme'] ? 'block' : 'none'; ?>;"
|
534 |
name="sib_form_css"><?php echo esc_textarea( $formData['css'] ); ?></textarea>
|
@@ -540,25 +540,25 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
540 |
<div class="col-md-6">
|
541 |
<!-- hidden fields for attributes -->
|
542 |
<input type="hidden" id="sib_hidden_email" data-type="email" data-name="email"
|
543 |
-
data-text="<?php esc_attr_e( 'Email Address', '
|
544 |
<input type="hidden" id="sib_hidden_submit" data-type="submit"
|
545 |
-
data-name="submit" data-text="<?php esc_attr_e( 'Subscribe', '
|
546 |
<input type="hidden" id="sib_hidden_message_1"
|
547 |
-
value="<?php esc_attr_e( 'Select Sendinblue Attribute', '
|
548 |
<input type="hidden" id="sib_hidden_message_2"
|
549 |
-
value="<?php esc_attr_e( 'Sendinblue merge fields : Normal', '
|
550 |
<input type="hidden" id="sib_hidden_message_3"
|
551 |
-
value="<?php esc_attr_e( 'Sendinblue merge fields : Category', '
|
552 |
<input type="hidden" id="sib_hidden_message_4"
|
553 |
-
value="<?php esc_attr_e( 'Other', '
|
554 |
<input type="hidden" id="sib_hidden_message_5"
|
555 |
-
value="<?php esc_attr_e( 'Submit Button', '
|
556 |
|
557 |
<!-- preview field -->
|
558 |
|
559 |
<div class="panel panel-default row form-field">
|
560 |
<div class="row small-content2" style="margin-top: 15px;margin-bottom: 15px;">
|
561 |
-
<b><?php esc_attr_e( 'Preview', '
|
562 |
<span id="sib-preview-form-refresh"
|
563 |
class="glyphicon glyphicon-refresh"
|
564 |
style="cursor:pointer"></span></b>
|
@@ -571,7 +571,7 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
571 |
</div>
|
572 |
<div class="row sib-small-content" style="margin-top: 30px;">
|
573 |
<div class="col-md-3">
|
574 |
-
<button class="btn btn-primary"><?php esc_attr_e( 'Save', '
|
575 |
</div>
|
576 |
</div>
|
577 |
</div>
|
@@ -583,25 +583,25 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
583 |
|
584 |
<!-- Adding security through hidden referrer field -->
|
585 |
<div class="page-header">
|
586 |
-
<strong><?php esc_attr_e( 'Sign up process', '
|
587 |
id="sib_setting_signup_spin" class="fa fa-spinner fa-spin fa-fw fa-lg fa-2x"></i>
|
588 |
</div>
|
589 |
<div id="sib_setting_signup_body" class="panel-body">
|
590 |
<div id="sib_form_alert_message" class="alert alert-danger alert-dismissable fade in"
|
591 |
role="alert" style="display: none;">
|
592 |
<span id="sib_disclaim_smtp"
|
593 |
-
style="display: none;"><?php _e( 'Confirmation emails will be sent through your own email server, but you have no guarantees on their deliverability. <br/> <a href="https://app-smtp.sendinblue.com/" target="_blank">Click here</a> to send your emails through Sendinblue in order to improve your deliverability and get statistics', '
|
594 |
<span id="sib_disclaim_do_template"
|
595 |
-
style="display: none;"><?php _e( 'The template you selected does not include a link [DOUBLEOPTIN] to allow subscribers to confirm their subscription. <br/> Please edit the template to include a link with [DOUBLEOPTIN] as URL.', '
|
596 |
<span id="sib_disclaim_confirm_template"
|
597 |
-
style="display: none;"><?php _e( 'You cannot select a template with the tag [DOUBLEOPTIN]', '
|
598 |
</div>
|
599 |
|
600 |
<!-- Linked List -->
|
601 |
<div class="row sib-small-content">
|
602 |
<span class="col-md-3">
|
603 |
-
<?php esc_attr_e( 'Linked List', '
|
604 |
-
<?php SIB_Page_Home::get_narration_script( __( 'Linked List', '
|
605 |
</span>
|
606 |
<div id="sib_select_list_area" class="col-md-4">
|
607 |
|
@@ -612,29 +612,29 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
612 |
</div>
|
613 |
<div class="col-md-5">
|
614 |
<small
|
615 |
-
style="font-style: italic;"><?php esc_attr_e( 'You can use Marketing Automation to create specific workflow when a user is added to the list.', '
|
616 |
</div>
|
617 |
|
618 |
</div>
|
619 |
<!-- confirmation email -->
|
620 |
<div class="row small-content">
|
621 |
-
<span class="col-md-3"><?php esc_attr_e( 'Send a confirmation email', '
|
622 |
|
623 |
<div class="col-md-4">
|
624 |
<label class="col-md-6" style="font-weight: normal;"><input type="radio"
|
625 |
id="is_confirm_email_yes"
|
626 |
name="is_confirm_email"
|
627 |
-
value="1" <?php checked( $formData['isOpt'], '1' ); ?>> <?php esc_attr_e( 'Yes', '
|
628 |
</label>
|
629 |
<label class="col-md-6" style="font-weight: normal;"><input type="radio"
|
630 |
id="is_confirm_email_no"
|
631 |
name="is_confirm_email"
|
632 |
-
value="0" <?php checked( $formData['isOpt'], '0' ); ?>> <?php esc_attr_e( 'No', '
|
633 |
</label>
|
634 |
</div>
|
635 |
<div class="col-md-5">
|
636 |
<small
|
637 |
-
style="font-style: italic;"><?php esc_attr_e( 'Select "Yes" if you want your subscribers to receive a confirmation email', '
|
638 |
</div>
|
639 |
</div>
|
640 |
<!-- select template id for confirmation email -->
|
@@ -642,37 +642,37 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
642 |
<input type="hidden" id="sib_selected_template_id"
|
643 |
value="<?php echo esc_attr( $formData['templateID'] ); ?>">
|
644 |
<input type="hidden" id="sib_default_template_name"
|
645 |
-
value="<?php esc_attr_e( 'Default', '
|
646 |
|
647 |
<div class="col-md-3" id="sib_template_id_area">
|
648 |
</div>
|
649 |
<div class="col-md-4">
|
650 |
<a href="https://my.sendinblue.com/camp/lists/template" class="col-md-12"
|
651 |
target="_blank"><i
|
652 |
-
class="fa fa-angle-right"></i> <?php esc_attr_e( 'Set up my templates', '
|
653 |
</a>
|
654 |
</div>
|
655 |
</div>
|
656 |
<!-- double optin confirmation email -->
|
657 |
<div class="row sib-small-content">
|
658 |
<span
|
659 |
-
class="col-md-3"><?php esc_attr_e( 'Double Opt-In', '
|
660 |
|
661 |
<div class="col-md-4">
|
662 |
<label class="col-md-6" style="font-weight: normal;"><input type="radio"
|
663 |
id="is_double_optin_yes"
|
664 |
name="is_double_optin"
|
665 |
-
value="1" <?php checked( $formData['isDopt'], '1' ); ?>> <?php esc_attr_e( 'Yes', '
|
666 |
</label>
|
667 |
<label class="col-md-6" style="font-weight: normal;"><input type="radio"
|
668 |
id="is_double_optin_no"
|
669 |
name="is_double_optin"
|
670 |
-
value="0" <?php checked( $formData['isDopt'], '0' ); ?>> <?php esc_attr_e( 'No', '
|
671 |
</label>
|
672 |
</div>
|
673 |
<div class="col-md-5">
|
674 |
<small
|
675 |
-
style="font-style: italic;"><?php esc_attr_e( 'Select "Yes" if you want your subscribers to confirm their email address', '
|
676 |
</div>
|
677 |
</div>
|
678 |
<!-- select template id for double optin confirmation email -->
|
@@ -683,20 +683,20 @@ if ( ! class_exists( 'SIB_Page_Form' ) ) {
|
|
683 |
<div class="col-md-4">
|
684 |
<a href="https://my.sendinblue.com/camp/lists/template"
|
685 |
class="col-md-12" target="_blank"><i
|
686 |
-
class="fa fa-angle-right"></i> <?php esc_attr_e( 'Set up my templates', '
|
687 |
</a>
|
688 |
</div>
|
689 |
</div>
|
690 |
<div class="row sib-small-content" id="sib_double_redirect_area">
|
691 |
-
<span class="col-md-3"><?php esc_attr_e( 'Redirect to this URL after clicking in the email', '
|
692 |
|
693 |
<div class="col-md-8">
|
694 |
<input type="url" class="col-md-11" name="redirect_url" value="<?php echo esc_attr( $formData['redirectInEmail'] ); ?>">
|
695 |
</div>
|
696 |
</div>
|
697 |
<div class="row sib-small-content" id="sib_final_confirm_template_area">
|
698 |
-
<span class="col-md-3"><?php esc_attr_e( 'Select final confirmation email template', '
|
699 |
-
For your information, you cannot select a template with the tag [DOUBLEOPTIN].', '
|
700 |
<div class="col-md-8">
|
701 |
<input type="hidden" id="sib_selected_confirm_template_id" value="<?php echo esc_attr( $formData['confirmID'] );?>">
|
702 |
<div class="col-md-5" id="sib_final_confirm_template_id_area">
|
@@ -704,7 +704,7 @@ For your information, you cannot select a template with the tag [DOUBLEOPTIN].',
|
|
704 |
<div class="col-md-4">
|
705 |
<a href="https://my.sendinblue.com/camp/lists/template"
|
706 |
class="col-md-12" target="_blank"><i
|
707 |
-
class="fa fa-angle-right"></i> <?php esc_attr_e( 'Set up my templates', '
|
708 |
</a>
|
709 |
</div>
|
710 |
</div>
|
@@ -712,24 +712,24 @@ For your information, you cannot select a template with the tag [DOUBLEOPTIN].',
|
|
712 |
|
713 |
<div class="row sib-small-content">
|
714 |
<span
|
715 |
-
class="col-md-3"><?php esc_attr_e( 'Redirect to this URL after subscription', '
|
716 |
|
717 |
<div class="col-md-4">
|
718 |
<label class="col-md-6" style="font-weight: normal;"><input type="radio"
|
719 |
id="is_redirect_url_click_yes"
|
720 |
name="is_redirect_url_click"
|
721 |
-
value="1" checked> <?php esc_attr_e( 'Yes', '
|
722 |
</label>
|
723 |
<label class="col-md-6" style="font-weight: normal;"><input type="radio"
|
724 |
id="is_redirect_url_click_no"
|
725 |
name="is_redirect_url_click"
|
726 |
-
value="0" <?php checked( $formData['redirectInForm'], '' ); ?>> <?php esc_attr_e( 'No', '
|
727 |
</label>
|
728 |
|
729 |
</div>
|
730 |
<div class="col-md-5">
|
731 |
<small
|
732 |
-
style="font-style: italic;"><?php esc_attr_e( 'Select "Yes" if you want to redirect your subscribers to a specific page after they fullfill the form', '
|
733 |
</div>
|
734 |
</div>
|
735 |
<div class="row" style="margin-top: 10px;
|
@@ -749,7 +749,7 @@ For your information, you cannot select a template with the tag [DOUBLEOPTIN].',
|
|
749 |
|
750 |
<div class="row sib-small-content" style="margin-top: 30px;">
|
751 |
<div class="col-md-3">
|
752 |
-
<button class="btn btn-primary"><?php esc_attr_e( 'Save', '
|
753 |
</div>
|
754 |
</div>
|
755 |
|
@@ -759,59 +759,59 @@ For your information, you cannot select a template with the tag [DOUBLEOPTIN].',
|
|
759 |
<!-- Confirmation message form -->
|
760 |
<div class="panel panel-default row sib-small-content">
|
761 |
<div class="page-header">
|
762 |
-
<strong><?php esc_attr_e( 'Confirmation message', '
|
763 |
</div>
|
764 |
<div class="panel-body">
|
765 |
<div class="row sib-small-content">
|
766 |
-
<span class="col-md-3"><?php esc_attr_e( 'Success message', '
|
767 |
|
768 |
<div class="col-md-8">
|
769 |
<input type="text" class="col-md-11" name="alert_success_message"
|
770 |
value="<?php echo esc_attr( $formData['successMsg'] ); ?>" required>
|
771 |
-
<?php echo esc_html( SIB_Page_Home::get_narration_script( __( 'Success message', '
|
772 |
</div>
|
773 |
</div>
|
774 |
<div class="row sib-small-content">
|
775 |
-
<span class="col-md-3"><?php esc_attr_e( 'General error message', '
|
776 |
|
777 |
<div class="col-md-8">
|
778 |
<input type="text" class="col-md-11" name="alert_error_message"
|
779 |
value="<?php echo esc_attr( $formData['errorMsg'] ); ?>" required>
|
780 |
-
<?php echo esc_html( SIB_Page_Home::get_narration_script( __( 'General message error', '
|
781 |
</div>
|
782 |
</div>
|
783 |
<!--
|
784 |
<div class="row sib-small-content">
|
785 |
-
<span class="col-md-3"><?php esc_attr_e( 'Existing subscribers', '
|
786 |
|
787 |
<div class="col-md-8">
|
788 |
<input type="text" class="col-md-11" name="alert_exist_subscriber"
|
789 |
value="<?php echo esc_attr( $formData['existMsg'] ); ?>" required>
|
790 |
-
<?php echo esc_html( SIB_Page_Home::get_narration_script( __( 'Existing Suscribers', '
|
791 |
</div>
|
792 |
</div>
|
793 |
-->
|
794 |
<div class="row sib-small-content">
|
795 |
-
<span class="col-md-3"><?php esc_attr_e( 'Invalid email address', '
|
796 |
|
797 |
<div class="col-md-8">
|
798 |
<input type="text" class="col-md-11" name="alert_invalid_email"
|
799 |
value="<?php echo esc_attr( $formData['invalidMsg'] ); ?>" required>
|
800 |
-
<?php echo esc_html( SIB_Page_Home::get_narration_script( __( 'Invalid email address', '
|
801 |
</div>
|
802 |
</div>
|
803 |
<div class="row sib-small-content">
|
804 |
-
<span class="col-md-3"><?php esc_attr_e( 'Required Field', '
|
805 |
|
806 |
<div class="col-md-8">
|
807 |
<input type="text" class="col-md-11" name="alert_required_message"
|
808 |
value="<?php echo esc_attr( $formData['requiredMsg'] ); ?>" required>
|
809 |
-
<?php echo esc_html( SIB_Page_Home::get_narration_script( __( 'Required Field', '
|
810 |
</div>
|
811 |
</div>
|
812 |
<div class="row sib-small-content" style="margin-top: 30px;">
|
813 |
<div class="col-md-3">
|
814 |
-
<button class="btn btn-primary"><?php esc_attr_e( 'Save', '
|
815 |
</div>
|
816 |
</div>
|
817 |
</div>
|
@@ -836,10 +836,10 @@ For your information, you cannot select a template with the tag [DOUBLEOPTIN].',
|
|
836 |
<div id="main-content" class="sib-content">
|
837 |
<div class="panel panel-default row sib-small-content">
|
838 |
<div class="page-header">
|
839 |
-
<strong><?php esc_attr_e( 'Subscription form', '
|
840 |
</div>
|
841 |
<div style="padding: 24px 32px; margin-bottom: 12px;">
|
842 |
-
<?php esc_attr_e( 'Sorry, you selected invalid form ID. Please check again if the ID is right', '
|
843 |
</div>
|
844 |
</div>
|
845 |
</div>
|
48 |
*/
|
49 |
function __construct() {
|
50 |
$title = get_bloginfo('name');
|
51 |
+
$this->defaultComplianceNote = sprintf( esc_attr('Your e-mail address is only used to send you our newsletter and information about the activities of %s. You can always use the unsubscribe link included in the newsletter.', 'mailin'), $title);
|
52 |
+
$this->page_hook = add_submenu_page( SIB_Page_Home::PAGE_ID, __( 'Forms', 'mailin' ), __( 'Forms', 'mailin' ), 'manage_options', self::PAGE_ID, array( &$this, 'generate' ) );
|
53 |
add_action( 'admin_print_scripts-' . $this->page_hook, array( $this, 'enqueue_scripts' ) );
|
54 |
add_action( 'admin_print_styles-' . $this->page_hook, array( $this, 'enqueue_styles' ) );
|
55 |
add_action( 'load-' . $this->page_hook, array( &$this, 'init' ) );
|
105 |
$return_btn = 'inline-block';
|
106 |
}
|
107 |
?>
|
108 |
+
<a href="<?php echo esc_url( add_query_arg( 'page', self::PAGE_ID, admin_url( 'admin.php' ) ) ); ?>" class="button" style="margin-top: 6px; display: <?php echo esc_attr( $return_btn ); ?>;"><?php esc_attr_e( 'Back to form\'s list' ,'mailin' ); ?></a>
|
109 |
</h1>
|
110 |
<div id="wrap-left" class="box-border-box col-md-9 ">
|
111 |
<input type="hidden" class="sib-dateformat" value="<?php echo esc_attr( 'yyyy-mm-dd' ); ?>">
|
134 |
<div class="modal-content">
|
135 |
<div class="modal-header">
|
136 |
<button type="button" class="close" data-dismiss="modal">×</button>
|
137 |
+
<h4><?php esc_attr_e( 'You are about to change the language', 'mailin' ); ?></h4>
|
138 |
</div>
|
139 |
<div class="modal-body">
|
140 |
+
<p><?php esc_attr_e( "Please make sure that you've saved all the changes. We will have to reload the page.", 'mailin' ); ?></p>
|
141 |
+
<p><?php esc_attr_e( 'Do you want to continue?', 'mailin' ); ?></p>
|
142 |
</div>
|
143 |
<div class="modal-footer">
|
144 |
+
<button type="button" class="btn btn-default" id="sib_modal_ok"><?php esc_attr_e( 'Ok', 'mailin' ); ?></button>
|
145 |
+
<button type="button" class="btn btn-default" id="sib_modal_cancel"><?php esc_attr_e( 'Cancel', 'mailin' ); ?></button>
|
146 |
</div>
|
147 |
</div>
|
148 |
</div>
|
154 |
?>
|
155 |
<div id="main-content" class="sib-content">
|
156 |
<div class="panel panel-default row sib-small-content">
|
157 |
+
<div class="page-header"><strong><?php esc_attr_e( 'Forms', 'mailin' ); ?></strong></div>
|
158 |
|
159 |
<form method="post" class="sib-forms-wrapper" style="padding:20px;min-height: 500px;">
|
160 |
+
<i style="font-size: 13px;"><?php esc_attr_e( "Note: Forms created in Sendinblue plugin for WordPress won't be displayed in Forms section in Sendinblue application", 'mailin' ); ?></i>
|
161 |
<?php
|
162 |
$this->forms->display();
|
163 |
?>
|
172 |
$formData = SIB_Forms::getForm( $this->formID );
|
173 |
$invisibleCaptcha = '1';
|
174 |
if ( ! empty( $formData ) ) {
|
175 |
+
if ( isset( $_GET['action'] ) && 'duplicate' === sanitize_text_field($_GET['action']) ) {
|
176 |
$this->formID = 'new';
|
177 |
$formData['title'] = '';
|
178 |
}
|
205 |
<div id="main-content" class="sib-content">
|
206 |
<form action="admin.php" class="" method="post" role="form">
|
207 |
<input type="hidden" name="action" value="sib_setting_subscription">
|
208 |
+
<input type="hidden" name="sib_form_id" value="<?php echo esc_attr( $this->formID ) ; ?>">
|
209 |
+
<input type="hidden" id="is_smtp_activated" value="<?php echo esc_attr( $is_activated_smtp ) ; ?>">
|
210 |
<?php
|
211 |
if ( isset( $_GET['pid'] ) ) {
|
212 |
?>
|
223 |
<!-- Subscription form -->
|
224 |
<div class="panel panel-default row sib-small-content">
|
225 |
<div class="page-header">
|
226 |
+
<strong><?php esc_attr_e( 'Subscription form', 'mailin' ); ?></strong> <i
|
227 |
id="sib_setting_form_spin" class="fa fa-spinner fa-spin fa-fw fa-lg fa-2x"></i>
|
228 |
</div>
|
229 |
<div id="sib_setting_form_body" class="panel-body">
|
230 |
<div class="row <!--small-content-->">
|
231 |
<div style="margin: 12px 0 34px 20px;">
|
232 |
+
<b><?php esc_attr_e( 'Form Name : ', 'mailin' ); ?></b> <input type="text"
|
233 |
name="sib_form_name"
|
234 |
value="<?php echo esc_attr( $formData['title'] ); ?>"
|
235 |
style="width: 60%;"
|
258 |
|
259 |
<p>
|
260 |
<?php
|
261 |
+
esc_attr_e( 'Use the shortcode', 'mailin' );
|
262 |
if ( isset( $_GET['pid'] ) ) {
|
263 |
$id = sanitize_text_field( $_GET['pid'] );
|
264 |
} else {
|
268 |
<i style="background-color: #eee;padding: 3px;">[sibwp_form
|
269 |
id=<?php echo esc_attr( $id ); ?>]</i>
|
270 |
<?php
|
271 |
+
esc_attr_e( 'inside a post, page or text widget to display your sign-up form.', 'mailin' );
|
272 |
?>
|
273 |
+
<b><?php esc_attr_e( 'Do not copy and paste the above form mark up, that will not work', 'mailin' ); ?></b>
|
274 |
</p>
|
275 |
<div id="sib-field-form" class="panel panel-default row form-field"
|
276 |
style="padding-bottom: 20px;">
|
277 |
|
278 |
<div class="row small-content2"
|
279 |
style="margin-top: 15px;margin-bottom: 15px;">
|
280 |
+
<b><?php esc_attr_e( 'Add a new Field', 'mailin' ); ?></b>
|
281 |
+
<?php SIB_Page_Home::get_narration_script( __( 'Add a New Field', 'mailin' ), __( 'Choose an attribute and add it to the subscription form of your Website', 'mailin' ) ); ?>
|
282 |
</div>
|
283 |
<div id="sib_sel_attribute_area" class="row small-content2"
|
284 |
style="margin-top: 20px;">
|
287 |
<div style="margin-top: 30px;">
|
288 |
<div class="sib-attr-normal sib-attr-category row small-content2"
|
289 |
style="margin-top: 10px;" id="sib_field_label_area">
|
290 |
+
<?php esc_attr_e( 'Label', 'mailin' ); ?>
|
291 |
+
<small>(<?php esc_attr_e( 'Optional', 'mailin' ); ?>)</small>
|
292 |
<input type="text" class="col-md-12 sib_field_changes" id="sib_field_label">
|
293 |
</div>
|
294 |
<div class="sib-attr-normal row small-content2"
|
295 |
style="margin-top: 10px;" id="sib_field_placeholder_area">
|
296 |
+
<span><?php esc_attr_e( 'Place holder', 'mailin' ); ?>
|
297 |
+
<small>(<?php esc_attr_e( 'Optional', 'mailin' ); ?>)
|
298 |
</small> </span>
|
299 |
<input type="text" class="col-md-12 sib_field_changes" id="sib_field_placeholder">
|
300 |
</div>
|
301 |
<div class="sib-attr-normal row small-content2"
|
302 |
style="margin-top: 10px;" id="sib_field_initial_area">
|
303 |
+
<span><?php esc_attr_e( 'Initial value', 'mailin' ); ?>
|
304 |
+
<small>(<?php esc_attr_e( 'Optional', 'mailin' ); ?>)
|
305 |
</small> </span>
|
306 |
<input type="text" class="col-md-12 sib_field_changes" id="sib_field_initial">
|
307 |
</div>
|
308 |
<div class="sib-attr-other row small-content2"
|
309 |
style="margin-top: 10px;" id="sib_field_button_text_area">
|
310 |
+
<span><?php esc_attr_e( 'Button Text', 'mailin' ); ?></span>
|
311 |
<input type="text" class="col-md-12 sib_field_changes" id="sib_field_button_text">
|
312 |
</div>
|
313 |
</div>
|
314 |
<div style="margin-top: 20px;">
|
315 |
|
316 |
<div class="sib-attr-normal sib-attr-category row small-content2" style="margin-top: 5px;" id="sib_field_required_area">
|
317 |
+
<label style="font-weight: normal;"><input type="checkbox" class="sib_field_changes" id="sib_field_required"> <?php esc_attr_e( 'Required field ?', 'mailin' ); ?>
|
318 |
</label>
|
319 |
</div>
|
320 |
<div class="sib-attr-category row small-content2"
|
321 |
style="margin-top: 5px;" id="sib_field_type_area">
|
322 |
<label style="font-weight: normal;"><input type="radio" class="sib_field_changes" name="sib_field_type" value="select"
|
323 |
+
checked> <?php esc_attr_e( 'Drop-down List', 'mailin' ); ?>
|
324 |
</label>
|
325 |
<label style="font-weight: normal;"><input type="radio" class="sib_field_changes" name="sib_field_type"
|
326 |
+
value="radio"> <?php esc_attr_e( 'Radio List', 'mailin' ); ?>
|
327 |
</label>
|
328 |
</div>
|
329 |
</div>
|
331 |
id="sib_field_add_area">
|
332 |
<button type="button" id="sib_add_to_form_btn"
|
333 |
class="btn btn-default sib-add-to-form"><span
|
334 |
+
class="sib-large-icon"><</span> <?php esc_attr_e( 'Add to form', 'mailin' ); ?>
|
335 |
</button>
|
336 |
+
<?php SIB_Page_Home::get_narration_script( __( 'Add to form', 'mailin' ), __( 'Please click where you want to insert the field and click on this button. By default, the new field will be added at top.', 'mailin' ) ); ?>
|
337 |
</div>
|
338 |
<div class="row small-content2" style="margin-top: 20px;"
|
339 |
id="sib_field_html_area">
|
340 |
+
<span><?php esc_attr_e( 'Generated HTML', 'mailin' ); ?></span>
|
341 |
<textarea class="col-md-12" style="height: 140px;"
|
342 |
id="sib_field_html"></textarea>
|
343 |
</div>
|
349 |
|
350 |
<div class="row small-content2"
|
351 |
style="margin-top: 15px;margin-bottom: 15px;">
|
352 |
+
<b><?php esc_attr_e( 'Add Multi-List Subscription', 'mailin' ); ?></b>
|
353 |
+
<?php SIB_Page_Home::get_narration_script( __( 'Add Multi-List Subscription', 'mailin' ), __( 'Enable your contacts to subscribe to content based on specific interests or preferences. Create a contact list for each interest and allow them to subscribe using this field', 'mailin' ) ); ?>
|
354 |
</div>
|
355 |
<div id="sib_sel_multi_list_area" class="row small-content2"
|
356 |
style="margin-top: 20px;">
|
357 |
<input type="hidden" id="sib_selected_multi_list_id" value="">
|
358 |
+
<select data-placeholder="<?php esc_attr_e( 'Please select the lists', 'mailin' ); ?>" id="sib_select_multi_list"
|
359 |
class="col-md-12 chosen-select" name="multi_list_ids[]" multiple=""
|
360 |
tabindex="-1"></select>
|
361 |
</div>
|
363 |
<div style="margin-top: 30px;">
|
364 |
<div class="sib-attr-normal sib-attr-category row small-content2"
|
365 |
style="margin-top: 10px;" id="sib_multi_field_label_area">
|
366 |
+
<?php esc_attr_e( 'Label', 'mailin' ); ?>
|
367 |
+
<small>(<?php esc_attr_e( 'Optional', 'mailin' ); ?>)</small>
|
368 |
<input type="text" class="col-md-12 sib_field_changes" id="sib_multi_field_label">
|
369 |
</div>
|
370 |
</div>
|
371 |
<div style="margin-top: 20px;">
|
372 |
<div class="sib-attr-normal sib-attr-category row small-content2" style="margin-top: 5px;" id="sib_multi_field_required_area">
|
373 |
+
<label style="font-weight: normal;"><input type="checkbox" class="sib_field_changes" id="sib_multi_field_required"> <?php esc_attr_e( 'Required field ?', 'mailin' ); ?>
|
374 |
</label>
|
375 |
</div>
|
376 |
</div>
|
378 |
id="sib_multi_field_add_area">
|
379 |
<button type="button" id="sib_multi_lists_add_form_btn"
|
380 |
class="btn btn-default sib-add-to-form"><span
|
381 |
+
class="sib-large-icon"><</span> <?php esc_attr_e( 'Add to form', 'mailin' ); ?>
|
382 |
</button>
|
383 |
+
<?php SIB_Page_Home::get_narration_script( __( 'Add to form', 'mailin' ), __( 'Please click where you want to insert the field and click on this button. By default, the new field will be added at top.', 'mailin' ) ); ?>
|
384 |
</div>
|
385 |
<div class="row small-content2" style="margin-top: 20px;"
|
386 |
id="sib_field_html_area">
|
387 |
+
<span><?php esc_attr_e( 'Generated HTML', 'mailin' ); ?></span>
|
388 |
<textarea class="col-md-12" style="height: 140px;"
|
389 |
id="sib_multi_field_html"></textarea>
|
390 |
</div>
|
394 |
<div id="sib-gdpr-block" class="panel panel-default row form-field" style="padding-bottom: 20px;">
|
395 |
<div class="row small-content2"
|
396 |
style="margin-top: 15px;margin-bottom: 15px;">
|
397 |
+
<b><?php esc_attr_e( 'Compliance Note', 'mailin' ); ?></b>
|
398 |
+
<?php SIB_Page_Home::get_narration_script( __( 'Add compliance note', 'mailin' ), __( 'Create GDPR-compliant subscription forms for collecting email addresses.', 'mailin' ) ); ?>
|
399 |
</div>
|
400 |
<div class="row small-content2" style="margin-top: 0px;">
|
401 |
+
<input type="radio" name="sib_add_compliant_note" class="sib-add-compliant-note" value="1" ><label class="sib-radio-label"> <?php esc_attr_e( 'Yes', 'mailin');?></label>
|
402 |
+
<input type="radio" name="sib_add_compliant_note" class="sib-add-compliant-note" value="0" checked><label class="sib-radio-label"> <?php esc_attr_e( 'No', 'mailin');?></label>
|
403 |
</div>
|
404 |
<div class="row small-content2 sib-gdpr-block-area" style="display: none;">
|
405 |
<textarea id="sib_gdpr_text" class="col-md-12" rows="5"><?php echo trim( $this->defaultComplianceNote ); ?></textarea>
|
406 |
+
<label id="set_gdpr_default"><?php esc_attr_e('Reset to Default', 'mailin');?> <i class="fa fa-refresh"></i></label>
|
407 |
</div>
|
408 |
<div class="row small-content2 sib-gdpr-block-btn" style="display: none;">
|
409 |
<button type="button" id="sib_add_compliance_note"
|
410 |
class="btn btn-default sib-add-to-form"><span
|
411 |
+
class="sib-large-icon"><</span> <?php esc_attr_e( 'Add to form', 'mailin' ); ?>
|
412 |
</button>
|
413 |
+
<?php SIB_Page_Home::get_narration_script( __( 'Add to form', 'mailin' ), __( 'Please click where you want to insert the field and click on this button. By default, the new field will be added at top.', 'mailin' ) ); ?>
|
414 |
</div>
|
415 |
</div>
|
416 |
|
419 |
style="padding-bottom: 20px;">
|
420 |
<div class="alert alert-danger" style="margin:5px;display: none;"></div>
|
421 |
<div class="row small-content2" style="margin-top: 15px;margin-bottom: 15px;">
|
422 |
+
<b><?php esc_attr_e( 'Add Captcha', 'mailin' ); ?></b>
|
423 |
+
<?php SIB_Page_Home::get_narration_script( __( 'Add Captcha', 'mailin' ), __( 'We are using Google reCaptcha for this form. To use Google reCaptcha on this form, you should input site key and secret key.' , 'mailin' ) ); ?>
|
424 |
</div>
|
425 |
<div class="row small-content2" style="margin-top: 0px;">
|
426 |
+
<input type="radio" name="sib_add_captcha" class="sib-add-captcha" value="1" <?php checked( $gCaptcha, '1' ); ?>><label class="sib-radio-label"> <?php esc_attr_e( 'Yes', 'mailin' ); ?></label>
|
427 |
+
<input type="radio" name="sib_add_captcha" class="sib-add-captcha" value="0" <?php checked( $gCaptcha, '0' ); ?>><label class="sib-radio-label"> <?php esc_attr_e( 'No', 'mailin' ); ?></label>
|
428 |
</div>
|
429 |
<div class="row small-content2 sib-captcha-key"
|
430 |
<?php
|
432 |
echo("style='display: none;'");}
|
433 |
?>
|
434 |
>
|
435 |
+
<i><?php esc_attr_e( 'Site Key', 'mailin' ); ?></i>
|
436 |
<input type="text" class="col-md-12" id="sib_captcha_site" name="sib_captcha_site" value="<?php
|
437 |
if ( isset( $formData['gCaptcha_site'] ) && ! empty( $formData['gCaptcha_site'] ) ) {
|
438 |
echo esc_attr( $formData['gCaptcha_site'] );
|
447 |
echo("style='display: none;'");}
|
448 |
?>
|
449 |
>
|
450 |
+
<i><?php esc_attr_e( 'Secret Key', 'mailin' ); ?></i>
|
451 |
<input type="text" class="col-md-12" id="sib_captcha_secret" name="sib_captcha_secret" value="<?php
|
452 |
if ( isset( $formData['gCaptcha_secret'] ) && ! empty( $formData['gCaptcha_secret'] ) ) {
|
453 |
echo esc_attr( $formData['gCaptcha_secret'] );
|
462 |
echo("style='display: none;'");}
|
463 |
?>
|
464 |
>
|
465 |
+
<input type="radio" name="sib_recaptcha_type" class="sib-captcha-type" value="0" <?php checked( $invisibleCaptcha, '0' ); ?>><label class="sib-radio-label"> <?php esc_attr_e( 'Google Captcha', 'mailin');?></label>
|
466 |
+
<input type="radio" name="sib_recaptcha_type" class="sib-captcha-type" value="1" <?php checked( $invisibleCaptcha, '1' ); ?>><label class="sib-radio-label"> <?php esc_attr_e( 'Google Invisible Captcha', 'mailin');?></label>
|
467 |
</div>
|
468 |
<div class="row small-content2 sib-captcha-key"
|
469 |
<?php
|
473 |
>
|
474 |
<button type="button" id="sib_add_captcha_btn"
|
475 |
class="btn btn-default sib-add-to-form"><span
|
476 |
+
class="sib-large-icon"><</span> <?php esc_attr_e( 'Add to form', 'mailin' ); ?>
|
477 |
</button>
|
478 |
+
<?php SIB_Page_Home::get_narration_script( __( 'Add Captcha', 'mailin' ), __( 'Please click where you want to insert the field and click on this button. By default, the new field will be added at top.', 'mailin' ) ); ?>
|
479 |
</div>
|
480 |
</div>
|
481 |
<div id="sib_form_terms" class="panel panel-default row form-field"
|
483 |
<div class="alert alert-danger" style="margin:5px;display: none;"></div>
|
484 |
<!-- for terms -->
|
485 |
<div class="row small-content2" style="margin-top: 15px;margin-bottom: 15px;">
|
486 |
+
<b><?php esc_attr_e( 'Add a Term acceptance checkbox', 'mailin' ); ?></b>
|
487 |
+
<?php SIB_Page_Home::get_narration_script( __( 'Add a Term acceptance checkbox', 'mailin' ), __( 'If the terms and condition checkbox is added to the form, the field will be mandatory for subscription.' , 'mailin' ) ); ?>
|
488 |
</div>
|
489 |
<div class="row small-content2" style="margin-top: 0px;">
|
490 |
+
<input type="radio" name="sib_add_terms" class="sib-add-terms" value="1" <?php checked( $formData['termAccept'], '1' ); ?>><label class="sib-radio-label"> <?php esc_attr_e( 'Yes', 'mailin');?></label>
|
491 |
+
<input type="radio" name="sib_add_terms" class="sib-add-terms" value="0" <?php checked( $formData['termAccept'], '0' ); ?>><label class="sib-radio-label"> <?php esc_attr_e( 'No', 'mailin');?></label>
|
492 |
</div>
|
493 |
<div class="row small-content2 sib-terms-url"
|
494 |
<?php
|
496 |
echo("style='display: none;'");}
|
497 |
?>
|
498 |
>
|
499 |
+
<i><?php esc_attr_e( 'URL to terms and conditions', 'mailin' ); ?></i>
|
500 |
<input type="text" class="col-md-12" id="sib_terms_url" name="sib_terms_url" value="<?php
|
501 |
if ( isset( $formData['termsURL'] ) && ! empty( $formData['termsURL'] ) ) {
|
502 |
echo esc_attr( $formData['termsURL'] );
|
513 |
>
|
514 |
<button type="button" id="sib_add_termsUrl_btn"
|
515 |
class="btn btn-default sib-add-to-form"><span
|
516 |
+
class="sib-large-icon"><</span> <?php esc_attr_e( 'Add to form', 'mailin' ); ?>
|
517 |
</button>
|
518 |
+
<?php SIB_Page_Home::get_narration_script( __( 'Add Terms URL', 'mailin' ), __( 'Please click where you want to insert the field and click on this button. By default, the new field will be added at top.', 'mailin' ) ); ?>
|
519 |
</div>
|
520 |
|
521 |
</div>
|
522 |
<!-- use css of custom or theme -->
|
523 |
<div class="panel panel-default row form-field">
|
524 |
<div class="row small-content2" style="margin-top: 15px;margin-bottom: 10px;">
|
525 |
+
<b><?php esc_attr_e( 'Form Style', 'mailin' ); ?> </b>
|
526 |
+
<?php SIB_Page_Home::get_narration_script( __( 'Form Style', 'mailin' ), __( 'Select the style you favorite. Your custom css will be applied to form only.', 'mailin' ) ); ?>
|
527 |
</div>
|
528 |
<div id="sib_form_css_area" class="row small-content2" style="margin-bottom: 15px;">
|
529 |
+
<label style="font-weight: normal;"><input type="radio" name="sib_css_type" value="1" <?php checked( $formData['dependTheme'], '1' ); ?>> <?php esc_attr_e( 'Current Theme', 'mailin' ); ?>
|
530 |
</label>
|
531 |
+
<label style="font-weight: normal;"><input type="radio" name="sib_css_type" value="0" <?php checked( $formData['dependTheme'], '0' ); ?>> <?php esc_attr_e( 'Custom style', 'mailin' ); ?>
|
532 |
</label>
|
533 |
<textarea class="widefat" cols="60" rows="10" id="sibcssmarkup" style="width: 100%; margin-top: 10px; font-size: 13px; display: <?php echo '0' == $formData['dependTheme'] ? 'block' : 'none'; ?>;"
|
534 |
name="sib_form_css"><?php echo esc_textarea( $formData['css'] ); ?></textarea>
|
540 |
<div class="col-md-6">
|
541 |
<!-- hidden fields for attributes -->
|
542 |
<input type="hidden" id="sib_hidden_email" data-type="email" data-name="email"
|
543 |
+
data-text="<?php esc_attr_e( 'Email Address', 'mailin' ); ?>">
|
544 |
<input type="hidden" id="sib_hidden_submit" data-type="submit"
|
545 |
+
data-name="submit" data-text="<?php esc_attr_e( 'Subscribe', 'mailin' ); ?>">
|
546 |
<input type="hidden" id="sib_hidden_message_1"
|
547 |
+
value="<?php esc_attr_e( 'Select Sendinblue Attribute', 'mailin' ); ?>">
|
548 |
<input type="hidden" id="sib_hidden_message_2"
|
549 |
+
value="<?php esc_attr_e( 'Sendinblue merge fields : Normal', 'mailin' ); ?>">
|
550 |
<input type="hidden" id="sib_hidden_message_3"
|
551 |
+
value="<?php esc_attr_e( 'Sendinblue merge fields : Category', 'mailin' ); ?>">
|
552 |
<input type="hidden" id="sib_hidden_message_4"
|
553 |
+
value="<?php esc_attr_e( 'Other', 'mailin' ); ?>">
|
554 |
<input type="hidden" id="sib_hidden_message_5"
|
555 |
+
value="<?php esc_attr_e( 'Submit Button', 'mailin' ); ?>">
|
556 |
|
557 |
<!-- preview field -->
|
558 |
|
559 |
<div class="panel panel-default row form-field">
|
560 |
<div class="row small-content2" style="margin-top: 15px;margin-bottom: 15px;">
|
561 |
+
<b><?php esc_attr_e( 'Preview', 'mailin' ); ?>
|
562 |
<span id="sib-preview-form-refresh"
|
563 |
class="glyphicon glyphicon-refresh"
|
564 |
style="cursor:pointer"></span></b>
|
571 |
</div>
|
572 |
<div class="row sib-small-content" style="margin-top: 30px;">
|
573 |
<div class="col-md-3">
|
574 |
+
<button class="btn btn-primary"><?php esc_attr_e( 'Save', 'mailin' ); ?></button>
|
575 |
</div>
|
576 |
</div>
|
577 |
</div>
|
583 |
|
584 |
<!-- Adding security through hidden referrer field -->
|
585 |
<div class="page-header">
|
586 |
+
<strong><?php esc_attr_e( 'Sign up process', 'mailin' ); ?></strong> <i
|
587 |
id="sib_setting_signup_spin" class="fa fa-spinner fa-spin fa-fw fa-lg fa-2x"></i>
|
588 |
</div>
|
589 |
<div id="sib_setting_signup_body" class="panel-body">
|
590 |
<div id="sib_form_alert_message" class="alert alert-danger alert-dismissable fade in"
|
591 |
role="alert" style="display: none;">
|
592 |
<span id="sib_disclaim_smtp"
|
593 |
+
style="display: none;"><?php _e( 'Confirmation emails will be sent through your own email server, but you have no guarantees on their deliverability. <br/> <a href="https://app-smtp.sendinblue.com/" target="_blank">Click here</a> to send your emails through Sendinblue in order to improve your deliverability and get statistics', 'mailin' ); ?></span>
|
594 |
<span id="sib_disclaim_do_template"
|
595 |
+
style="display: none;"><?php _e( 'The template you selected does not include a link [DOUBLEOPTIN] to allow subscribers to confirm their subscription. <br/> Please edit the template to include a link with [DOUBLEOPTIN] as URL.', 'mailin' ); ?></span>
|
596 |
<span id="sib_disclaim_confirm_template"
|
597 |
+
style="display: none;"><?php _e( 'You cannot select a template with the tag [DOUBLEOPTIN]', 'mailin' ); ?></span>
|
598 |
</div>
|
599 |
|
600 |
<!-- Linked List -->
|
601 |
<div class="row sib-small-content">
|
602 |
<span class="col-md-3">
|
603 |
+
<?php esc_attr_e( 'Linked List', 'mailin' ); ?>
|
604 |
+
<?php SIB_Page_Home::get_narration_script( __( 'Linked List', 'mailin' ), __( 'Select the list where you want to add your new subscribers', 'mailin' ) ); ?>
|
605 |
</span>
|
606 |
<div id="sib_select_list_area" class="col-md-4">
|
607 |
|
612 |
</div>
|
613 |
<div class="col-md-5">
|
614 |
<small
|
615 |
+
style="font-style: italic;"><?php esc_attr_e( 'You can use Marketing Automation to create specific workflow when a user is added to the list.', 'mailin' ); ?></small>
|
616 |
</div>
|
617 |
|
618 |
</div>
|
619 |
<!-- confirmation email -->
|
620 |
<div class="row small-content">
|
621 |
+
<span class="col-md-3"><?php esc_attr_e( 'Send a confirmation email', 'mailin' ); ?><?php echo esc_html( SIB_Page_Home::get_narration_script( __( 'Confirmation message', 'mailin' ), __( 'You can choose to send a confirmation email. You will be able to set up the template that will be sent to your new suscribers', 'mailin' ) ) ); ?></span>
|
622 |
|
623 |
<div class="col-md-4">
|
624 |
<label class="col-md-6" style="font-weight: normal;"><input type="radio"
|
625 |
id="is_confirm_email_yes"
|
626 |
name="is_confirm_email"
|
627 |
+
value="1" <?php checked( $formData['isOpt'], '1' ); ?>> <?php esc_attr_e( 'Yes', 'mailin' ); ?>
|
628 |
</label>
|
629 |
<label class="col-md-6" style="font-weight: normal;"><input type="radio"
|
630 |
id="is_confirm_email_no"
|
631 |
name="is_confirm_email"
|
632 |
+
value="0" <?php checked( $formData['isOpt'], '0' ); ?>> <?php esc_attr_e( 'No', 'mailin' ); ?>
|
633 |
</label>
|
634 |
</div>
|
635 |
<div class="col-md-5">
|
636 |
<small
|
637 |
+
style="font-style: italic;"><?php esc_attr_e( 'Select "Yes" if you want your subscribers to receive a confirmation email', 'mailin' ); ?></small>
|
638 |
</div>
|
639 |
</div>
|
640 |
<!-- select template id for confirmation email -->
|
642 |
<input type="hidden" id="sib_selected_template_id"
|
643 |
value="<?php echo esc_attr( $formData['templateID'] ); ?>">
|
644 |
<input type="hidden" id="sib_default_template_name"
|
645 |
+
value="<?php esc_attr_e( 'Default', 'mailin' ); ?>">
|
646 |
|
647 |
<div class="col-md-3" id="sib_template_id_area">
|
648 |
</div>
|
649 |
<div class="col-md-4">
|
650 |
<a href="https://my.sendinblue.com/camp/lists/template" class="col-md-12"
|
651 |
target="_blank"><i
|
652 |
+
class="fa fa-angle-right"></i> <?php esc_attr_e( 'Set up my templates', 'mailin' ); ?>
|
653 |
</a>
|
654 |
</div>
|
655 |
</div>
|
656 |
<!-- double optin confirmation email -->
|
657 |
<div class="row sib-small-content">
|
658 |
<span
|
659 |
+
class="col-md-3"><?php esc_attr_e( 'Double Opt-In', 'mailin' ); ?><?php echo esc_html( SIB_Page_Home::get_narration_script( __( 'Double Opt-In', 'mailin' ), __( 'Your subscribers will receive an email inviting them to confirm their subscription. Be careful, your subscribers are not saved in your list before confirming their subscription.', 'mailin' ) ) ); ?></span>
|
660 |
|
661 |
<div class="col-md-4">
|
662 |
<label class="col-md-6" style="font-weight: normal;"><input type="radio"
|
663 |
id="is_double_optin_yes"
|
664 |
name="is_double_optin"
|
665 |
+
value="1" <?php checked( $formData['isDopt'], '1' ); ?>> <?php esc_attr_e( 'Yes', 'mailin' ); ?>
|
666 |
</label>
|
667 |
<label class="col-md-6" style="font-weight: normal;"><input type="radio"
|
668 |
id="is_double_optin_no"
|
669 |
name="is_double_optin"
|
670 |
+
value="0" <?php checked( $formData['isDopt'], '0' ); ?>> <?php esc_attr_e( 'No', 'mailin' ); ?>
|
671 |
</label>
|
672 |
</div>
|
673 |
<div class="col-md-5">
|
674 |
<small
|
675 |
+
style="font-style: italic;"><?php esc_attr_e( 'Select "Yes" if you want your subscribers to confirm their email address', 'mailin' ); ?></small>
|
676 |
</div>
|
677 |
</div>
|
678 |
<!-- select template id for double optin confirmation email -->
|
683 |
<div class="col-md-4">
|
684 |
<a href="https://my.sendinblue.com/camp/lists/template"
|
685 |
class="col-md-12" target="_blank"><i
|
686 |
+
class="fa fa-angle-right"></i> <?php esc_attr_e( 'Set up my templates', 'mailin' ); ?>
|
687 |
</a>
|
688 |
</div>
|
689 |
</div>
|
690 |
<div class="row sib-small-content" id="sib_double_redirect_area">
|
691 |
+
<span class="col-md-3"><?php esc_attr_e( 'Redirect to this URL after clicking in the email', 'mailin' ); ?></span>
|
692 |
|
693 |
<div class="col-md-8">
|
694 |
<input type="url" class="col-md-11" name="redirect_url" value="<?php echo esc_attr( $formData['redirectInEmail'] ); ?>">
|
695 |
</div>
|
696 |
</div>
|
697 |
<div class="row sib-small-content" id="sib_final_confirm_template_area">
|
698 |
+
<span class="col-md-3"><?php esc_attr_e( 'Select final confirmation email template', 'mailin' ); ?><?php echo esc_html( SIB_Page_Home::get_narration_script( __( 'Final confirmation', 'mailin' ), __( 'This is the final confirmation email your contacts will receive once they click on the double opt-in confirmation link. You can select one of the default templates we have created for you, e.g. \'Default template - Final confirmation\'.
|
699 |
+
For your information, you cannot select a template with the tag [DOUBLEOPTIN].', 'mailin' ) ) ); ?></span>
|
700 |
<div class="col-md-8">
|
701 |
<input type="hidden" id="sib_selected_confirm_template_id" value="<?php echo esc_attr( $formData['confirmID'] );?>">
|
702 |
<div class="col-md-5" id="sib_final_confirm_template_id_area">
|
704 |
<div class="col-md-4">
|
705 |
<a href="https://my.sendinblue.com/camp/lists/template"
|
706 |
class="col-md-12" target="_blank"><i
|
707 |
+
class="fa fa-angle-right"></i> <?php esc_attr_e( 'Set up my templates', 'mailin' ); ?>
|
708 |
</a>
|
709 |
</div>
|
710 |
</div>
|
712 |
|
713 |
<div class="row sib-small-content">
|
714 |
<span
|
715 |
+
class="col-md-3"><?php esc_attr_e( 'Redirect to this URL after subscription', 'mailin' ); ?></span>
|
716 |
|
717 |
<div class="col-md-4">
|
718 |
<label class="col-md-6" style="font-weight: normal;"><input type="radio"
|
719 |
id="is_redirect_url_click_yes"
|
720 |
name="is_redirect_url_click"
|
721 |
+
value="1" checked> <?php esc_attr_e( 'Yes', 'mailin' ); ?>
|
722 |
</label>
|
723 |
<label class="col-md-6" style="font-weight: normal;"><input type="radio"
|
724 |
id="is_redirect_url_click_no"
|
725 |
name="is_redirect_url_click"
|
726 |
+
value="0" <?php checked( $formData['redirectInForm'], '' ); ?>> <?php esc_attr_e( 'No', 'mailin' ); ?>
|
727 |
</label>
|
728 |
|
729 |
</div>
|
730 |
<div class="col-md-5">
|
731 |
<small
|
732 |
+
style="font-style: italic;"><?php esc_attr_e( 'Select "Yes" if you want to redirect your subscribers to a specific page after they fullfill the form', 'mailin' ); ?></small>
|
733 |
</div>
|
734 |
</div>
|
735 |
<div class="row" style="margin-top: 10px;
|
749 |
|
750 |
<div class="row sib-small-content" style="margin-top: 30px;">
|
751 |
<div class="col-md-3">
|
752 |
+
<button class="btn btn-primary"><?php esc_attr_e( 'Save', 'mailin' ); ?></button>
|
753 |
</div>
|
754 |
</div>
|
755 |
|
759 |
<!-- Confirmation message form -->
|
760 |
<div class="panel panel-default row sib-small-content">
|
761 |
<div class="page-header">
|
762 |
+
<strong><?php esc_attr_e( 'Confirmation message', 'mailin' ); ?></strong>
|
763 |
</div>
|
764 |
<div class="panel-body">
|
765 |
<div class="row sib-small-content">
|
766 |
+
<span class="col-md-3"><?php esc_attr_e( 'Success message', 'mailin' ); ?></span>
|
767 |
|
768 |
<div class="col-md-8">
|
769 |
<input type="text" class="col-md-11" name="alert_success_message"
|
770 |
value="<?php echo esc_attr( $formData['successMsg'] ); ?>" required>
|
771 |
+
<?php echo esc_html( SIB_Page_Home::get_narration_script( __( 'Success message', 'mailin' ), __( 'Set up the success message that will appear when one of your visitors surccessfully signs up', 'mailin' ) ) ); ?>
|
772 |
</div>
|
773 |
</div>
|
774 |
<div class="row sib-small-content">
|
775 |
+
<span class="col-md-3"><?php esc_attr_e( 'General error message', 'mailin' ); ?></span>
|
776 |
|
777 |
<div class="col-md-8">
|
778 |
<input type="text" class="col-md-11" name="alert_error_message"
|
779 |
value="<?php echo esc_attr( $formData['errorMsg'] ); ?>" required>
|
780 |
+
<?php echo esc_html( SIB_Page_Home::get_narration_script( __( 'General message error', 'mailin' ), __( 'Set up the message that will appear when an error occurs during the subscritpion process', 'mailin' ) ) ); ?>
|
781 |
</div>
|
782 |
</div>
|
783 |
<!--
|
784 |
<div class="row sib-small-content">
|
785 |
+
<span class="col-md-3"><?php esc_attr_e( 'Existing subscribers', 'mailin' ); ?></span>
|
786 |
|
787 |
<div class="col-md-8">
|
788 |
<input type="text" class="col-md-11" name="alert_exist_subscriber"
|
789 |
value="<?php echo esc_attr( $formData['existMsg'] ); ?>" required>
|
790 |
+
<?php echo esc_html( SIB_Page_Home::get_narration_script( __( 'Existing Suscribers', 'mailin' ), __( 'Set up the message that will appear when a suscriber is already in your database', 'mailin' ) ) ); ?>
|
791 |
</div>
|
792 |
</div>
|
793 |
-->
|
794 |
<div class="row sib-small-content">
|
795 |
+
<span class="col-md-3"><?php esc_attr_e( 'Invalid email address', 'mailin' ); ?></span>
|
796 |
|
797 |
<div class="col-md-8">
|
798 |
<input type="text" class="col-md-11" name="alert_invalid_email"
|
799 |
value="<?php echo esc_attr( $formData['invalidMsg'] ); ?>" required>
|
800 |
+
<?php echo esc_html( SIB_Page_Home::get_narration_script( __( 'Invalid email address', 'mailin' ), __( 'Set up the message that will appear when the email address used to sign up is not valid', 'mailin' ) ) ); ?>
|
801 |
</div>
|
802 |
</div>
|
803 |
<div class="row sib-small-content">
|
804 |
+
<span class="col-md-3"><?php esc_attr_e( 'Required Field', 'mailin' ); ?></span>
|
805 |
|
806 |
<div class="col-md-8">
|
807 |
<input type="text" class="col-md-11" name="alert_required_message"
|
808 |
value="<?php echo esc_attr( $formData['requiredMsg'] ); ?>" required>
|
809 |
+
<?php echo esc_html( SIB_Page_Home::get_narration_script( __( 'Required Field', 'mailin' ), __( 'Set up the message that will appear when the required field is empty', 'mailin' ) ) ); ?>
|
810 |
</div>
|
811 |
</div>
|
812 |
<div class="row sib-small-content" style="margin-top: 30px;">
|
813 |
<div class="col-md-3">
|
814 |
+
<button class="btn btn-primary"><?php esc_attr_e( 'Save', 'mailin' ); ?></button>
|
815 |
</div>
|
816 |
</div>
|
817 |
</div>
|
836 |
<div id="main-content" class="sib-content">
|
837 |
<div class="panel panel-default row sib-small-content">
|
838 |
<div class="page-header">
|
839 |
+
<strong><?php esc_attr_e( 'Subscription form', 'mailin' ); ?></strong>
|
840 |
</div>
|
841 |
<div style="padding: 24px 32px; margin-bottom: 12px;">
|
842 |
+
<?php esc_attr_e( 'Sorry, you selected invalid form ID. Please check again if the ID is right', 'mailin' ); ?>
|
843 |
</div>
|
844 |
</div>
|
845 |
</div>
|
page/page-home.php
CHANGED
@@ -36,8 +36,8 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
36 |
* Constructs new page object and adds entry to WordPress admin menu
|
37 |
*/
|
38 |
function __construct() {
|
39 |
-
add_menu_page( __( 'Sendinblue', '
|
40 |
-
$this->page_hook = add_submenu_page( self::PAGE_ID, __( 'Home', '
|
41 |
add_action( 'load-' . $this->page_hook, array( &$this, 'init' ) );
|
42 |
add_action( 'admin_print_scripts-' . $this->page_hook, array( $this, 'enqueue_scripts' ) );
|
43 |
add_action( 'admin_print_styles-' . $this->page_hook, array( $this, 'enqueue_styles' ) );
|
@@ -47,7 +47,7 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
47 |
* Init Process
|
48 |
*/
|
49 |
function Init() {
|
50 |
-
if ( ( isset( $_GET['sib_action'] ) ) && ( 'logout' ===
|
51 |
$this->logout();
|
52 |
}
|
53 |
}
|
@@ -112,44 +112,44 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
112 |
<input type="hidden" id="cur_refer_url" value="<?php echo esc_url( add_query_arg( array( 'page' => 'sib_page_home' ), admin_url( 'admin.php' ) ) ); ?> ">
|
113 |
<div class="panel panel-default row sib-small-content">
|
114 |
<div class="page-header">
|
115 |
-
<span style="color: #777777;"><?php esc_attr_e( 'Step', '
|
116 |
</div>
|
117 |
<div class="panel-body">
|
118 |
<div class="col-md-9 row">
|
119 |
-
<p><?php esc_attr_e( 'By creating a free Sendinblue account, you will be able to send confirmation emails and:', '
|
120 |
<ul class="sib-home-feature">
|
121 |
-
<li><span class="glyphicon glyphicon-ok" style="font-size: 12px;"></span> <?php esc_attr_e( 'Collect your contacts and upload your lists', '
|
122 |
-
<li><span class="glyphicon glyphicon-ok" style="font-size: 12px;"></span> <?php esc_attr_e( 'Use Sendinblue SMTP to send your transactional emails', '
|
123 |
-
<li class="home-read-more-content"><span class="glyphicon glyphicon-ok" style="font-size: 12px;"></span> <?php esc_attr_e( 'Email marketing builders', '
|
124 |
-
<li class="home-read-more-content"><span class="glyphicon glyphicon-ok" style="font-size: 12px;"></span> <?php esc_attr_e( 'Create and schedule your email marketing campaigns', '
|
125 |
-
<li class="home-read-more-content"><span class="glyphicon glyphicon-ok" style="font-size: 12px;"></span> <?php esc_attr_e( 'Try all of', '
|
126 |
</ul>
|
127 |
-
<a href="https://www.sendinblue.com/users/signup?utm_source=wordpress_plugin&utm_medium=plugin&utm_campaign=module_link" class="btn btn-primary" target="_blank" style="margin-top: 10px;"><?php esc_attr_e( 'Create an account', '
|
128 |
</div>
|
129 |
</div>
|
130 |
</div>
|
131 |
<div class="panel panel-default row sib-small-content">
|
132 |
<div class="page-header">
|
133 |
-
<span style="color: #777777;"><?php esc_attr_e( 'Step', '
|
134 |
</div>
|
135 |
<div class="panel-body">
|
136 |
<div class="col-md-9 row">
|
137 |
-
<div id="success-alert" class="alert alert-success" role="alert" style="display: none;"><?php esc_attr_e( 'You successfully activate your account.', '
|
138 |
-
<input type="hidden" id="general_error" value="<?php esc_attr_e( 'Please input a valid API v3 key', '
|
139 |
-
<input type="hidden" id="curl_no_exist_error" value="<?php esc_attr_e( 'Please install curl on site to use sendinblue plugin.', '
|
140 |
-
<input type="hidden" id="curl_error" value="<?php esc_attr_e( 'Curl error.', '
|
141 |
-
<div id="failure-alert" class="alert alert-danger" role="alert" style="display: none;"><?php esc_attr_e( 'Please input a valid API v3 key.', '
|
142 |
<p>
|
143 |
-
<?php esc_attr_e( 'Once you have created a Sendinblue account, activate this plugin to send all of your transactional emails via Sendinblue SMTP. Sendinblue optimizes email delivery to ensure emails reach the inbox.', '
|
144 |
-
<?php esc_attr_e( 'To activate your plugin, enter your API v3 Access key.', '
|
145 |
</p>
|
146 |
<p>
|
147 |
-
<a href="https://my.sendinblue.com/advanced/apikey/?utm_source=wordpress_plugin&utm_medium=plugin&utm_campaign=module_link" target="_blank"><i class="fa fa-angle-right"></i> <?php esc_attr_e( 'Get your API key from your account', '
|
148 |
</p>
|
149 |
<p>
|
150 |
<div class="col-md-7 row">
|
151 |
<p class="col-md-12 row"><input id="sib_access_key" type="text" class="col-md-10" style="margin-top: 10px;" placeholder="xkeysib-xxxxxx"></p>
|
152 |
-
<p class="col-md-12 row"><button type="button" id="sib_validate_btn" class="col-md-4 btn btn-primary"><span class="sib-spin"><i class="fa fa-circle-o-notch fa-spin fa-lg"></i> </span><?php esc_attr_e( 'Login', '
|
153 |
</div>
|
154 |
</p>
|
155 |
</div>
|
@@ -191,9 +191,9 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
191 |
if ( $isSynced != $currentUsers ) {
|
192 |
$isEnableSync = '1';
|
193 |
/* translators: %s: total users */
|
194 |
-
$desc = sprintf( esc_attr__( 'You have %s existing users. Do you want to add them to Sendinblue?', '
|
195 |
} else {
|
196 |
-
$desc = esc_attr__( 'All your users have been added to a Sendinblue list.','
|
197 |
}
|
198 |
self::print_sync_popup();
|
199 |
?>
|
@@ -203,10 +203,10 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
203 |
<!-- Account Info -->
|
204 |
<div class="panel panel-default row sib-small-content">
|
205 |
<div class="page-header">
|
206 |
-
<strong><?php esc_attr_e( 'My Account', '
|
207 |
</div>
|
208 |
<div class="panel-body">
|
209 |
-
<span class="col-md-12"><b><?php esc_attr_e( 'You are currently logged in as : ', '
|
210 |
<div class="col-md-8 row" style="margin-bottom: 10px;">
|
211 |
<p class="col-md-12" style="margin-top: 5px;">
|
212 |
<?php echo esc_attr( $account_user_name ); ?> - <?php echo esc_attr( $account_email ); ?><br>
|
@@ -215,29 +215,29 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
215 |
for ( $i = 0; $i < $count; $i ++ ) {
|
216 |
if ( isset($account_data[$i]['type']) )
|
217 |
{
|
218 |
-
echo esc_attr( $account_data[ $i ]['type'] ) . ' - ' . esc_attr( $account_data[ $i ]['credits'] ) . ' ' . esc_attr__( 'credits', '
|
219 |
}
|
220 |
}
|
221 |
?>
|
222 |
-
<a href="<?php echo esc_url( add_query_arg( 'sib_action', 'logout' ) ); ?>"><i class="fa fa-angle-right"></i> <?php esc_attr_e( 'Log out', '
|
223 |
</p>
|
224 |
</div>
|
225 |
|
226 |
-
<span class="col-md-12"><b><?php esc_attr_e( 'Contacts', '
|
227 |
<div class="col-md-12 row" style="padding-top: 10px;">
|
228 |
<div class="col-md-6" style="margin-bottom: 10px;">
|
229 |
<p style="margin-top: 5px;">
|
230 |
-
<a id="sib_list_link" href="https://my.sendinblue.com/users/list/?utm_source=wordpress_plugin&utm_medium=plugin&utm_campaign=module_link" target="_blank"><i class="fa fa-angle-right"></i> <?php esc_attr_e( 'Access to the list of all my contacts', '
|
231 |
</p>
|
232 |
</div>
|
233 |
|
234 |
<div class="col-md-6 row" style="margin-bottom: 10px;">
|
235 |
<p class="col-md-8" style="margin-top: 5px;">
|
236 |
-
<b><?php echo esc_attr__( 'Users Synchronisation', '
|
237 |
<?php echo esc_attr( $desc ); ?><br>
|
238 |
</p>
|
239 |
<div class="col-md-4">
|
240 |
-
<a <?php echo '1' === $isEnableSync ? '' : 'disabled'; ?> id="sib-sync-btn" class="btn btn-primary" style="margin-top: 28px; " name="<?php echo esc_attr__( 'Users Synchronisation', '
|
241 |
</div>
|
242 |
|
243 |
</div>
|
@@ -247,20 +247,20 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
247 |
<!-- Transactional Email -->
|
248 |
<div class="panel panel-default row sib-small-content">
|
249 |
<div class="page-header">
|
250 |
-
<strong><?php esc_attr_e( 'Transactional emails', '
|
251 |
</div>
|
252 |
<div class="panel-body">
|
253 |
<?php
|
254 |
if ( 'disabled' == $smtp_status ) :
|
255 |
?>
|
256 |
-
<div id="smtp-failure-alert" class="col-md-12 sib_alert alert alert-danger" role="alert"><?php esc_attr_e( 'Unfortunately, your "Transactional emails" are not activated because your Sendinblue SMTP account is not active. Please send an email to contact@sendinblue.com in order to ask for SMTP account activation', '
|
257 |
<?php
|
258 |
endif;
|
259 |
?>
|
260 |
-
<div id="success-alert" class="col-md-12 sib_alert alert alert-success" role="alert" style="display: none;"><?php esc_attr_e( 'Mail Sent.', '
|
261 |
-
<div id="failure-alert" class="col-md-12 sib_alert alert alert-danger" role="alert" style="display: none;"><?php esc_attr_e( 'Please input valid email.', '
|
262 |
<div class="row">
|
263 |
-
<p class="col-md-4 text-left"><?php esc_attr_e( 'Activate email through Sendinblue', '
|
264 |
<div class="col-md-3">
|
265 |
<label class="col-md-6"><input type="radio" name="activate_email" id="activate_email_radio_yes" value="yes"
|
266 |
<?php
|
@@ -269,11 +269,11 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
269 |
echo ' disabled';
|
270 |
}
|
271 |
?>
|
272 |
-
> <?php esc_attr_e( 'Yes', '
|
273 |
-
<label class="col-md-6"><input type="radio" name="activate_email" id="activate_email_radio_no" value="no" <?php checked( $home_settings['activate_email'], 'no' ); ?>> <?php esc_attr_e( 'No', '
|
274 |
</div>
|
275 |
<div class="col-md-5">
|
276 |
-
<small style="font-style: italic;"><?php esc_attr_e( 'Choose "Yes" if you want to use Sendinblue SMTP to send transactional emails', '
|
277 |
</div>
|
278 |
</div>
|
279 |
<div class="row" id="email_send_field"
|
@@ -284,7 +284,7 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
284 |
?>
|
285 |
>
|
286 |
<div class="row" style="margin-left: 0px;margin-bottom: 10px;">
|
287 |
-
<p class="col-md-4 text-left"><?php esc_attr_e( 'Choose your sender', '
|
288 |
<div class="col-md-3">
|
289 |
<select id="sender_list" class="col-md-12">
|
290 |
<?php
|
@@ -296,17 +296,17 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
296 |
</select>
|
297 |
</div>
|
298 |
<div class="col-md-5">
|
299 |
-
<a href="https://account.sendinblue.com/senders/" style="font-style: italic;" target="_blank" ><i class="fa fa-angle-right"></i> <?php esc_attr_e( 'Create a new sender', '
|
300 |
</div>
|
301 |
</div>
|
302 |
<div class="row" style="margin-left: 0px;">
|
303 |
-
<p class="col-md-4 text-left"><?php esc_attr_e( 'Enter email to send a test', '
|
304 |
<div class="col-md-3">
|
305 |
<input id="activate_email" type="email" class="col-md-12">
|
306 |
-
<button type="button" id="send_email_btn" class="col-md-12 btn btn-primary"><span class="sib-spin"><i class="fa fa-circle-o-notch fa-spin fa-lg"></i> </span><?php esc_attr_e( 'Send email', '
|
307 |
</div>
|
308 |
<div class="col-md-5">
|
309 |
-
<small style="font-style: italic;"><?php esc_attr_e( 'Select here the email address you want to send a test email to.', '
|
310 |
</div>
|
311 |
</div>
|
312 |
</div>
|
@@ -315,31 +315,31 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
315 |
<!-- Marketing Automation -->
|
316 |
<div class="panel panel-default row sib-small-content">
|
317 |
<div class="page-header">
|
318 |
-
<strong><?php esc_attr_e( 'Automation', '
|
319 |
</div>
|
320 |
<div class="panel-body">
|
321 |
-
<div class="sib-ma-alert sib-ma-active alert alert-success" role="alert" style="display: none;"><?php esc_attr_e( 'Your Marketing Automation script is installed correctly.', '
|
322 |
-
<div class="sib-ma-alert sib-ma-inactive alert alert-danger" role="alert" style="display: none;"><?php esc_attr_e( 'Your Marketing Automation script has been uninstalled', '
|
323 |
-
<div class="sib-ma-alert sib-ma-disabled alert alert-danger" role="alert" style="display: none;"><?php esc_attr_e( 'To activate Marketing Automation, please go to your Sendinblue\'s account or contact us at contact@sendinblue.com', '
|
324 |
-
<input type="hidden" id="sib-ma-unistall" value="<?php esc_attr_e( 'Your Marketing Automation script will be uninstalled, you won\'t have access to any Marketing Automation data and workflows', '
|
325 |
<div class="row">
|
326 |
-
<p class="col-md-4 text-left"><?php esc_attr_e( 'Activate Marketing Automation through Sendinblue', '
|
327 |
<div class="col-md-3">
|
328 |
<label class="col-md-6"><input type="radio" name="activate_ma" id="activate_ma_radio_yes" value="yes"
|
329 |
<?php
|
330 |
checked( $home_settings['activate_ma'], 'yes' );
|
331 |
?>
|
332 |
-
> <?php esc_attr_e( 'Yes', '
|
333 |
-
<label class="col-md-6"><input type="radio" name="activate_ma" id="activate_ma_radio_no" value="no" <?php checked( $home_settings['activate_ma'], 'no' ); ?>> <?php esc_attr_e( 'No', '
|
334 |
</div>
|
335 |
<div class="col-md-5">
|
336 |
-
<small style="font-style: italic;"><?php esc_attr_e( 'Choose "Yes" if you want to use Sendinblue Automation to track your website activity', '
|
337 |
</div>
|
338 |
</div>
|
339 |
<div class="row" style="">
|
340 |
-
<p class="col-md-4 text-left" style="font-size: 13px; font-style: italic;"><?php printf( esc_attr__( '%s Explore our resource %s to learn more about Sendinblue Automation', '
|
341 |
<div class="col-md-3">
|
342 |
-
<button type="button" id="validate_ma_btn" class="col-md-12 btn btn-primary"><span class="sib-spin"><i class="fa fa-circle-o-notch fa-spin fa-lg"></i> </span><?php esc_attr_e( 'Activate', '
|
343 |
</div>
|
344 |
<div class="col-md-5">
|
345 |
</div>
|
@@ -359,40 +359,40 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
359 |
?>
|
360 |
|
361 |
<div class="panel panel-default text-left box-border-box sib-small-content">
|
362 |
-
<div class="panel-heading"><strong><?php esc_attr_e( 'About Sendinblue', '
|
363 |
<div class="panel-body">
|
364 |
-
<p><?php esc_attr_e( 'Sendinblue is an online software that helps you build and grow relationships through marketing and transactional emails, marketing automation, and text messages.', '
|
365 |
<ul class="sib-widget-menu">
|
366 |
<li>
|
367 |
-
<a href="https://www.sendinblue.com/about/?utm_source=wordpress_plugin&utm_medium=plugin&utm_campaign=module_link" target="_blank"><i class="fa fa-angle-right"></i> <?php esc_attr_e( 'Who we are', '
|
368 |
</li>
|
369 |
<li>
|
370 |
-
<a href="https://www.sendinblue.com/pricing/?utm_source=wordpress_plugin&utm_medium=plugin&utm_campaign=module_link" target="_blank"><i class="fa fa-angle-right"></i> <?php esc_attr_e( 'Pricing', '
|
371 |
</li>
|
372 |
<li>
|
373 |
-
<a href="https://www.sendinblue.com/features/?utm_source=wordpress_plugin&utm_medium=plugin&utm_campaign=module_link" target="_blank"><i class="fa fa-angle-right"></i> <?php esc_attr_e( 'Features', '
|
374 |
</li>
|
375 |
</ul>
|
376 |
</div>
|
377 |
|
378 |
</div>
|
379 |
<div class="panel panel-default text-left box-border-box sib-small-content">
|
380 |
-
<div class="panel-heading"><strong><?php esc_attr_e( 'Need Help?', '
|
381 |
<div class="panel-body">
|
382 |
-
<p><?php esc_attr_e( 'Do you have a question or need more information?', '
|
383 |
<ul class="sib-widget-menu">
|
384 |
-
<li><a href="https://help.sendinblue.com/hc/en-us/sections/202171729/?utm_source=wordpress_plugin&utm_medium=plugin&utm_campaign=module_link" target="_blank"><i class="fa fa-angle-right"></i> <?php esc_attr_e( 'Tutorials', '
|
385 |
-
<li><a href="https://resources.sendinblue.com/category/faq/?utm_source=wordpress_plugin&utm_medium=plugin&utm_campaign=module_link" target="_blank"><i class="fa fa-angle-right"></i> <?php esc_attr_e( 'FAQ', '
|
386 |
</ul>
|
387 |
<hr>
|
388 |
</div>
|
389 |
</div>
|
390 |
<div class="panel panel-default text-left box-border-box sib-small-content">
|
391 |
-
<div class="panel-heading"><strong><?php esc_attr_e( 'Recommend this plugin', '
|
392 |
<div class="panel-body">
|
393 |
-
<p><?php esc_attr_e( 'Let everyone know you like this plugin through a review!' ,'
|
394 |
<ul class="sib-widget-menu">
|
395 |
-
<li><a href="http://wordpress.org/support/view/plugin-reviews/mailin" target="_blank"><i class="fa fa-angle-right"></i> <?php esc_attr_e( 'Recommend the Sendinblue plugin', '
|
396 |
</ul>
|
397 |
</div>
|
398 |
</div>
|
@@ -419,24 +419,24 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
419 |
<div class="modal-content">
|
420 |
<div class="modal-header">
|
421 |
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true" style="font-size: 22px;">×</span><span class="sr-only">Close</span></button>
|
422 |
-
<h4 class="modal-title"><?php esc_attr_e( 'Sendinblue','
|
423 |
</div>
|
424 |
<div class="modal-body" style="padding: 30px;">
|
425 |
<p>
|
426 |
-
<?php esc_attr_e( 'You are currently not logged in. Create an account or log in to benefit from all of Sendinblue\'s features an your WordPress site.', '
|
427 |
</p>
|
428 |
<ul>
|
429 |
-
<li> <span class="glyphicon glyphicon-ok" style="font-size: 12px;"></span> <?php esc_attr_e( 'Collect and manage your contacts', '
|
430 |
-
<li> <span class="glyphicon glyphicon-ok" style="font-size: 12px;"></span> <?php esc_attr_e( 'Send transactional emails via SMTP or API', '
|
431 |
-
<li> <span class="glyphicon glyphicon-ok" style="font-size: 12px;"></span> <?php esc_attr_e( 'Real time statistics and email tracking', '
|
432 |
-
<li> <span class="glyphicon glyphicon-ok" style="font-size: 12px;"></span> <?php esc_attr_e( 'Edit and send email marketing', '
|
433 |
</ul>
|
434 |
<div class="row" style="margin-top: 40px;">
|
435 |
<div class="col-md-6">
|
436 |
-
<a href="https://www.sendinblue.com/users/login/" target="_blank"><i><?php esc_attr_e( 'Have an account?', '
|
437 |
</div>
|
438 |
<div class="col-md-6">
|
439 |
-
<a href="https://www.sendinblue.com/users/signup/" target="_blank" class="btn btn-default"><i class="fa fa-angle-double-right"></i> <?php esc_attr_e( 'Free Subscribe Now', '
|
440 |
</div>
|
441 |
</div>
|
442 |
</div>
|
@@ -467,26 +467,26 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
467 |
<div class="modal-content">
|
468 |
<div class="modal-header">
|
469 |
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true" style="font-size: 22px;">×</span><span class="sr-only">Close</span></button>
|
470 |
-
<h4 class="modal-title"><?php esc_attr_e( 'Users Synchronisation','
|
471 |
</div>
|
472 |
<div class="modal-body sync-modal-body" style="padding: 10px;">
|
473 |
<div id="sync-failure" class="sib_alert alert alert-danger" style="margin-bottom: 0px;display: none;"></div>
|
474 |
<form id="sib-sync-form">
|
475 |
<!-- roles -->
|
476 |
<div class="row sync-row" style="margin-top: 0;">
|
477 |
-
<b><p><?php esc_attr_e( 'Roles to sync', '
|
478 |
<?php foreach ( wp_roles()->roles as $role_name => $role_info ) : ?>
|
479 |
<div class="col-md-6">
|
480 |
-
<span class="" style="display: block;float:left;padding-left: 16px;"><input type="checkbox" id="<?php echo esc_attr( $role_name ); ?>" value="<?php echo esc_attr( $role_name ); ?>" name="sync_role" checked><label for="<?php echo esc_attr( $role_name ); ?>" style="margin: 4px 24px 0 7px;font-weight: normal;"><?php esc_attr_e( ucfirst($role_name), '
|
481 |
</div>
|
482 |
<?php endforeach; ?>
|
483 |
</div>
|
484 |
<!-- lists -->
|
485 |
<?php $lists = SIB_API_Manager::get_lists(); ?>
|
486 |
<div class="row sync-row">
|
487 |
-
<b><p><?php esc_attr_e( 'Sync Lists', '
|
488 |
<div class="col-md-6">
|
489 |
-
<p><?php esc_attr_e( 'Choose the Sendinblue list in which you want to add your existing customers:', '
|
490 |
</div>
|
491 |
<div class="col-md-6">
|
492 |
<select data-placeholder="Please select the list" id="sib_select_list" name="list_id" multiple="true">
|
@@ -500,28 +500,28 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
500 |
<?php
|
501 |
// available WordPress attributes.
|
502 |
$wpAttrs = array(
|
503 |
-
'first_name' => __( 'First Name','
|
504 |
-
'last_name' => __( 'Last Name','
|
505 |
-
'user_url' => __( 'Website URL','
|
506 |
-
'roles' => __( 'User Role','
|
507 |
-
'user_login' => __( 'Username','
|
508 |
-
'nickname' => __( 'Nickname','
|
509 |
-
'user_registered' => __( 'User Registration Date','
|
510 |
-
'display_name' => __( 'Display Name','
|
511 |
-
'description' => __( 'Description about user','
|
512 |
);
|
513 |
// available sendinblue attributes.
|
514 |
$sibAllAttrs = SIB_API_Manager::get_attributes();
|
515 |
$sibAttrs = $sibAllAttrs['attributes']['normal_attributes'];
|
516 |
?>
|
517 |
<div class="row sync-row" id="sync-attr-area">
|
518 |
-
<b><p><?php esc_attr_e( 'Match Attributes', '
|
519 |
<div class="col-md-11" style="padding: 5px;border-bottom: dotted 1px #dedede;">
|
520 |
<div class="col-md-6">
|
521 |
-
<p><?php esc_attr_e( 'WordPress Users Attributes', '
|
522 |
</div>
|
523 |
<div class="col-md-6">
|
524 |
-
<p><?php esc_attr_e( 'Sendinblue Contact Attributes', '
|
525 |
</div>
|
526 |
</div>
|
527 |
|
@@ -554,7 +554,7 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
554 |
</div>
|
555 |
<!-- Apply button -->
|
556 |
<div class="row" style="">
|
557 |
-
<a href="javascript:void(0)" id="sib_sync_users_btn" class="btn btn-primary" style="float: right;"><?php esc_attr_e( 'Apply', '
|
558 |
</div>
|
559 |
</form>
|
560 |
</div>
|
@@ -642,15 +642,15 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
642 |
public static function ajax_send_email() {
|
643 |
check_ajax_referer( 'ajax_sib_admin_nonce', 'security' );
|
644 |
|
645 |
-
$subject = __( '[Sendinblue SMTP] test email', '
|
646 |
// Get sender info.
|
647 |
$home_settings = get_option( SIB_Manager::HOME_OPTION_NAME );
|
648 |
if ( isset( $home_settings['sender'] ) ) {
|
649 |
$fromname = $home_settings['from_name'];
|
650 |
$from_email = $home_settings['from_email'];
|
651 |
} else {
|
652 |
-
$from_email = __( 'no-reply@sendinblue.com', '
|
653 |
-
$fromname = __( 'Sendinblue', '
|
654 |
}
|
655 |
|
656 |
$from = array( $from_email, $fromname );
|
@@ -697,14 +697,14 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
697 |
wp_send_json(
|
698 |
array(
|
699 |
'code' => 'empty_role',
|
700 |
-
'message' => __( 'Please select a user role.','
|
701 |
)
|
702 |
);}
|
703 |
if ( isset( $postData['errAttr'] ) ) {
|
704 |
wp_send_json(
|
705 |
array(
|
706 |
'code' => 'attr_duplicated',
|
707 |
-
'message' => sprintf( esc_attr__( 'The attribute %s is duplicated. You can select one at a time.','
|
708 |
)
|
709 |
);}
|
710 |
|
@@ -753,7 +753,7 @@ if ( ! class_exists( 'SIB_Page_Home' ) ) {
|
|
753 |
wp_send_json(
|
754 |
array(
|
755 |
'code' => 'empty_users',
|
756 |
-
'message' => __( 'There is not any user in the roles.','
|
757 |
)
|
758 |
);}
|
759 |
|
36 |
* Constructs new page object and adds entry to WordPress admin menu
|
37 |
*/
|
38 |
function __construct() {
|
39 |
+
add_menu_page( __( 'Sendinblue', 'mailin' ), __( 'Sendinblue', 'mailin' ), 'manage_options', self::PAGE_ID, array( &$this, 'generate' ), SIB_Manager::$plugin_url . '/img/favicon.ico' );
|
40 |
+
$this->page_hook = add_submenu_page( self::PAGE_ID, __( 'Home', 'mailin' ), __( 'Home', 'mailin' ), 'manage_options', self::PAGE_ID, array( &$this, 'generate' ) );
|
41 |
add_action( 'load-' . $this->page_hook, array( &$this, 'init' ) );
|
42 |
add_action( 'admin_print_scripts-' . $this->page_hook, array( $this, 'enqueue_scripts' ) );
|
43 |
add_action( 'admin_print_styles-' . $this->page_hook, array( $this, 'enqueue_styles' ) );
|
47 |
* Init Process
|
48 |
*/
|
49 |
function Init() {
|
50 |
+
if ( ( isset( $_GET['sib_action'] ) ) && ( 'logout' === sanitize_text_field($_GET['sib_action'] )) ) {
|
51 |
$this->logout();
|
52 |
}
|
53 |
}
|
112 |
<input type="hidden" id="cur_refer_url" value="<?php echo esc_url( add_query_arg( array( 'page' => 'sib_page_home' ), admin_url( 'admin.php' ) ) ); ?> ">
|
113 |
<div class="panel panel-default row sib-small-content">
|
114 |
<div class="page-header">
|
115 |
+
<span style="color: #777777;"><?php esc_attr_e( 'Step', 'mailin' ); ?> 1 | </span><strong><?php esc_attr_e( 'Create a Sendinblue Account', 'mailin' ); ?></strong>
|
116 |
</div>
|
117 |
<div class="panel-body">
|
118 |
<div class="col-md-9 row">
|
119 |
+
<p><?php esc_attr_e( 'By creating a free Sendinblue account, you will be able to send confirmation emails and:', 'mailin' ); ?></p>
|
120 |
<ul class="sib-home-feature">
|
121 |
+
<li><span class="glyphicon glyphicon-ok" style="font-size: 12px;"></span> <?php esc_attr_e( 'Collect your contacts and upload your lists', 'mailin' ); ?></li>
|
122 |
+
<li><span class="glyphicon glyphicon-ok" style="font-size: 12px;"></span> <?php esc_attr_e( 'Use Sendinblue SMTP to send your transactional emails', 'mailin' ); ?></li>
|
123 |
+
<li class="home-read-more-content"><span class="glyphicon glyphicon-ok" style="font-size: 12px;"></span> <?php esc_attr_e( 'Email marketing builders', 'mailin' ); ?></li>
|
124 |
+
<li class="home-read-more-content"><span class="glyphicon glyphicon-ok" style="font-size: 12px;"></span> <?php esc_attr_e( 'Create and schedule your email marketing campaigns', 'mailin' ); ?></li>
|
125 |
+
<li class="home-read-more-content"><span class="glyphicon glyphicon-ok" style="font-size: 12px;"></span> <?php esc_attr_e( 'Try all of', 'mailin' ); ?> <a href="https://www.sendinblue.com/features/?utm_source=wordpress_plugin&utm_medium=plugin&utm_campaign=module_link" target="_blank"><?php esc_attr_e( 'Sendinblue\'s features', 'mailin' ); ?></a></li>
|
126 |
</ul>
|
127 |
+
<a href="https://www.sendinblue.com/users/signup?utm_source=wordpress_plugin&utm_medium=plugin&utm_campaign=module_link" class="btn btn-primary" target="_blank" style="margin-top: 10px;"><?php esc_attr_e( 'Create an account', 'mailin' ); ?></a>
|
128 |
</div>
|
129 |
</div>
|
130 |
</div>
|
131 |
<div class="panel panel-default row sib-small-content">
|
132 |
<div class="page-header">
|
133 |
+
<span style="color: #777777;"><?php esc_attr_e( 'Step', 'mailin' ); ?> 2 | </span><strong><?php esc_attr_e( 'Activate your account with your API key v3', 'mailin' ); ?></strong>
|
134 |
</div>
|
135 |
<div class="panel-body">
|
136 |
<div class="col-md-9 row">
|
137 |
+
<div id="success-alert" class="alert alert-success" role="alert" style="display: none;"><?php esc_attr_e( 'You successfully activate your account.', 'mailin' ); ?></div>
|
138 |
+
<input type="hidden" id="general_error" value="<?php esc_attr_e( 'Please input a valid API v3 key', 'mailin' ); ?>">
|
139 |
+
<input type="hidden" id="curl_no_exist_error" value="<?php esc_attr_e( 'Please install curl on site to use sendinblue plugin.', 'mailin' ); ?>">
|
140 |
+
<input type="hidden" id="curl_error" value="<?php esc_attr_e( 'Curl error.', 'mailin' ); ?>">
|
141 |
+
<div id="failure-alert" class="alert alert-danger" role="alert" style="display: none;"><?php esc_attr_e( 'Please input a valid API v3 key.', 'mailin' ); ?></div>
|
142 |
<p>
|
143 |
+
<?php esc_attr_e( 'Once you have created a Sendinblue account, activate this plugin to send all of your transactional emails via Sendinblue SMTP. Sendinblue optimizes email delivery to ensure emails reach the inbox.', 'mailin' ); ?><br>
|
144 |
+
<?php esc_attr_e( 'To activate your plugin, enter your API v3 Access key.', 'mailin' ); ?><br>
|
145 |
</p>
|
146 |
<p>
|
147 |
+
<a href="https://my.sendinblue.com/advanced/apikey/?utm_source=wordpress_plugin&utm_medium=plugin&utm_campaign=module_link" target="_blank"><i class="fa fa-angle-right"></i> <?php esc_attr_e( 'Get your API key from your account', 'mailin' ); ?></a>
|
148 |
</p>
|
149 |
<p>
|
150 |
<div class="col-md-7 row">
|
151 |
<p class="col-md-12 row"><input id="sib_access_key" type="text" class="col-md-10" style="margin-top: 10px;" placeholder="xkeysib-xxxxxx"></p>
|
152 |
+
<p class="col-md-12 row"><button type="button" id="sib_validate_btn" class="col-md-4 btn btn-primary"><span class="sib-spin"><i class="fa fa-circle-o-notch fa-spin fa-lg"></i> </span><?php esc_attr_e( 'Login', 'mailin' ); ?></button></p>
|
153 |
</div>
|
154 |
</p>
|
155 |
</div>
|
191 |
if ( $isSynced != $currentUsers ) {
|
192 |
$isEnableSync = '1';
|
193 |
/* translators: %s: total users */
|
194 |
+
$desc = sprintf( esc_attr__( 'You have %s existing users. Do you want to add them to Sendinblue?', 'mailin' ), $currentUsers['total_users'] );
|
195 |
} else {
|
196 |
+
$desc = esc_attr__( 'All your users have been added to a Sendinblue list.','mailin' );
|
197 |
}
|
198 |
self::print_sync_popup();
|
199 |
?>
|
203 |
<!-- Account Info -->
|
204 |
<div class="panel panel-default row sib-small-content">
|
205 |
<div class="page-header">
|
206 |
+
<strong><?php esc_attr_e( 'My Account', 'mailin' ); ?></strong>
|
207 |
</div>
|
208 |
<div class="panel-body">
|
209 |
+
<span class="col-md-12"><b><?php esc_attr_e( 'You are currently logged in as : ', 'mailin' ); ?></b></span>
|
210 |
<div class="col-md-8 row" style="margin-bottom: 10px;">
|
211 |
<p class="col-md-12" style="margin-top: 5px;">
|
212 |
<?php echo esc_attr( $account_user_name ); ?> - <?php echo esc_attr( $account_email ); ?><br>
|
215 |
for ( $i = 0; $i < $count; $i ++ ) {
|
216 |
if ( isset($account_data[$i]['type']) )
|
217 |
{
|
218 |
+
echo esc_attr( $account_data[ $i ]['type'] ) . ' - ' . esc_attr( $account_data[ $i ]['credits'] ) . ' ' . esc_attr__( 'credits', 'mailin' ) . '<br>';
|
219 |
}
|
220 |
}
|
221 |
?>
|
222 |
+
<a href="<?php echo esc_url( add_query_arg( 'sib_action', 'logout' ) ); ?>"><i class="fa fa-angle-right"></i> <?php esc_attr_e( 'Log out', 'mailin' ); ?></a>
|
223 |
</p>
|
224 |
</div>
|
225 |
|
226 |
+
<span class="col-md-12"><b><?php esc_attr_e( 'Contacts', 'mailin' ); ?></b></span>
|
227 |
<div class="col-md-12 row" style="padding-top: 10px;">
|
228 |
<div class="col-md-6" style="margin-bottom: 10px;">
|
229 |
<p style="margin-top: 5px;">
|
230 |
+
<a id="sib_list_link" href="https://my.sendinblue.com/users/list/?utm_source=wordpress_plugin&utm_medium=plugin&utm_campaign=module_link" target="_blank"><i class="fa fa-angle-right"></i> <?php esc_attr_e( 'Access to the list of all my contacts', 'mailin' ); ?></a>
|
231 |
</p>
|
232 |
</div>
|
233 |
|
234 |
<div class="col-md-6 row" style="margin-bottom: 10px;">
|
235 |
<p class="col-md-8" style="margin-top: 5px;">
|
236 |
+
<b><?php echo esc_attr__( 'Users Synchronisation', 'mailin' ); ?></b><br>
|
237 |
<?php echo esc_attr( $desc ); ?><br>
|
238 |
</p>
|
239 |
<div class="col-md-4">
|
240 |
+
<a <?php echo '1' === $isEnableSync ? '' : 'disabled'; ?> id="sib-sync-btn" class="btn btn-primary" style="margin-top: 28px; " name="<?php echo esc_attr__( 'Users Synchronisation', 'mailin' ); ?>" href="#"><?php esc_attr_e( 'Sync my users', 'mailin' ); ?></a>
|
241 |
</div>
|
242 |
|
243 |
</div>
|
247 |
<!-- Transactional Email -->
|
248 |
<div class="panel panel-default row sib-small-content">
|
249 |
<div class="page-header">
|
250 |
+
<strong><?php esc_attr_e( 'Transactional emails', 'mailin' ); ?></strong>
|
251 |
</div>
|
252 |
<div class="panel-body">
|
253 |
<?php
|
254 |
if ( 'disabled' == $smtp_status ) :
|
255 |
?>
|
256 |
+
<div id="smtp-failure-alert" class="col-md-12 sib_alert alert alert-danger" role="alert"><?php esc_attr_e( 'Unfortunately, your "Transactional emails" are not activated because your Sendinblue SMTP account is not active. Please send an email to contact@sendinblue.com in order to ask for SMTP account activation', 'mailin' ); ?></div>
|
257 |
<?php
|
258 |
endif;
|
259 |
?>
|
260 |
+
<div id="success-alert" class="col-md-12 sib_alert alert alert-success" role="alert" style="display: none;"><?php esc_attr_e( 'Mail Sent.', 'mailin' ); ?></div>
|
261 |
+
<div id="failure-alert" class="col-md-12 sib_alert alert alert-danger" role="alert" style="display: none;"><?php esc_attr_e( 'Please input valid email.', 'mailin' ); ?></div>
|
262 |
<div class="row">
|
263 |
+
<p class="col-md-4 text-left"><?php esc_attr_e( 'Activate email through Sendinblue', 'mailin' ); ?></p>
|
264 |
<div class="col-md-3">
|
265 |
<label class="col-md-6"><input type="radio" name="activate_email" id="activate_email_radio_yes" value="yes"
|
266 |
<?php
|
269 |
echo ' disabled';
|
270 |
}
|
271 |
?>
|
272 |
+
> <?php esc_attr_e( 'Yes', 'mailin' ); ?></label>
|
273 |
+
<label class="col-md-6"><input type="radio" name="activate_email" id="activate_email_radio_no" value="no" <?php checked( $home_settings['activate_email'], 'no' ); ?>> <?php esc_attr_e( 'No', 'mailin' ); ?></label>
|
274 |
</div>
|
275 |
<div class="col-md-5">
|
276 |
+
<small style="font-style: italic;"><?php esc_attr_e( 'Choose "Yes" if you want to use Sendinblue SMTP to send transactional emails', 'mailin' ); ?></small>
|
277 |
</div>
|
278 |
</div>
|
279 |
<div class="row" id="email_send_field"
|
284 |
?>
|
285 |
>
|
286 |
<div class="row" style="margin-left: 0px;margin-bottom: 10px;">
|
287 |
+
<p class="col-md-4 text-left"><?php esc_attr_e( 'Choose your sender', 'mailin' ); ?></p>
|
288 |
<div class="col-md-3">
|
289 |
<select id="sender_list" class="col-md-12">
|
290 |
<?php
|
296 |
</select>
|
297 |
</div>
|
298 |
<div class="col-md-5">
|
299 |
+
<a href="https://account.sendinblue.com/senders/" style="font-style: italic;" target="_blank" ><i class="fa fa-angle-right"></i> <?php esc_attr_e( 'Create a new sender', 'mailin' ); ?></a>
|
300 |
</div>
|
301 |
</div>
|
302 |
<div class="row" style="margin-left: 0px;">
|
303 |
+
<p class="col-md-4 text-left"><?php esc_attr_e( 'Enter email to send a test', 'mailin' ); ?></p>
|
304 |
<div class="col-md-3">
|
305 |
<input id="activate_email" type="email" class="col-md-12">
|
306 |
+
<button type="button" id="send_email_btn" class="col-md-12 btn btn-primary"><span class="sib-spin"><i class="fa fa-circle-o-notch fa-spin fa-lg"></i> </span><?php esc_attr_e( 'Send email', 'mailin' ); ?></button>
|
307 |
</div>
|
308 |
<div class="col-md-5">
|
309 |
+
<small style="font-style: italic;"><?php esc_attr_e( 'Select here the email address you want to send a test email to.', 'mailin' ); ?></small>
|
310 |
</div>
|
311 |
</div>
|
312 |
</div>
|
315 |
<!-- Marketing Automation -->
|
316 |
<div class="panel panel-default row sib-small-content">
|
317 |
<div class="page-header">
|
318 |
+
<strong><?php esc_attr_e( 'Automation', 'mailin' ); ?></strong>
|
319 |
</div>
|
320 |
<div class="panel-body">
|
321 |
+
<div class="sib-ma-alert sib-ma-active alert alert-success" role="alert" style="display: none;"><?php esc_attr_e( 'Your Marketing Automation script is installed correctly.', 'mailin' ); ?></div>
|
322 |
+
<div class="sib-ma-alert sib-ma-inactive alert alert-danger" role="alert" style="display: none;"><?php esc_attr_e( 'Your Marketing Automation script has been uninstalled', 'mailin' ); ?></div>
|
323 |
+
<div class="sib-ma-alert sib-ma-disabled alert alert-danger" role="alert" style="display: none;"><?php esc_attr_e( 'To activate Marketing Automation, please go to your Sendinblue\'s account or contact us at contact@sendinblue.com', 'mailin' ); ?></div>
|
324 |
+
<input type="hidden" id="sib-ma-unistall" value="<?php esc_attr_e( 'Your Marketing Automation script will be uninstalled, you won\'t have access to any Marketing Automation data and workflows', 'mailin' ); ?>">
|
325 |
<div class="row">
|
326 |
+
<p class="col-md-4 text-left"><?php esc_attr_e( 'Activate Marketing Automation through Sendinblue', 'mailin' ); ?></p>
|
327 |
<div class="col-md-3">
|
328 |
<label class="col-md-6"><input type="radio" name="activate_ma" id="activate_ma_radio_yes" value="yes"
|
329 |
<?php
|
330 |
checked( $home_settings['activate_ma'], 'yes' );
|
331 |
?>
|
332 |
+
> <?php esc_attr_e( 'Yes', 'mailin' ); ?></label>
|
333 |
+
<label class="col-md-6"><input type="radio" name="activate_ma" id="activate_ma_radio_no" value="no" <?php checked( $home_settings['activate_ma'], 'no' ); ?>> <?php esc_attr_e( 'No', 'mailin' ); ?></label>
|
334 |
</div>
|
335 |
<div class="col-md-5">
|
336 |
+
<small style="font-style: italic;"><?php esc_attr_e( 'Choose "Yes" if you want to use Sendinblue Automation to track your website activity', 'mailin' ); ?></small>
|
337 |
</div>
|
338 |
</div>
|
339 |
<div class="row" style="">
|
340 |
+
<p class="col-md-4 text-left" style="font-size: 13px; font-style: italic;"><?php printf( esc_attr__( '%s Explore our resource %s to learn more about Sendinblue Automation', 'mailin' ), '<a href="https://help.sendinblue.com/hc/en-us/articles/208775609/?utm_source=wordpress_plugin&utm_medium=plugin&utm_campaign=module_link" target="_blank">', '</a>' ); ?></p>
|
341 |
<div class="col-md-3">
|
342 |
+
<button type="button" id="validate_ma_btn" class="col-md-12 btn btn-primary"><span class="sib-spin"><i class="fa fa-circle-o-notch fa-spin fa-lg"></i> </span><?php esc_attr_e( 'Activate', 'mailin' ); ?></button>
|
343 |
</div>
|
344 |
<div class="col-md-5">
|
345 |
</div>
|
359 |
?>
|
360 |
|
361 |
<div class="panel panel-default text-left box-border-box sib-small-content">
|
362 |
+
<div class="panel-heading"><strong><?php esc_attr_e( 'About Sendinblue', 'mailin' ); ?></strong></div>
|
363 |
<div class="panel-body">
|
364 |
+
<p><?php esc_attr_e( 'Sendinblue is an online software that helps you build and grow relationships through marketing and transactional emails, marketing automation, and text messages.', 'mailin' ); ?></p>
|
365 |
<ul class="sib-widget-menu">
|
366 |
<li>
|
367 |
+
<a href="https://www.sendinblue.com/about/?utm_source=wordpress_plugin&utm_medium=plugin&utm_campaign=module_link" target="_blank"><i class="fa fa-angle-right"></i> <?php esc_attr_e( 'Who we are', 'mailin' ); ?></a>
|
368 |
</li>
|
369 |
<li>
|
370 |
+
<a href="https://www.sendinblue.com/pricing/?utm_source=wordpress_plugin&utm_medium=plugin&utm_campaign=module_link" target="_blank"><i class="fa fa-angle-right"></i> <?php esc_attr_e( 'Pricing', 'mailin' ); ?></a>
|
371 |
</li>
|
372 |
<li>
|
373 |
+
<a href="https://www.sendinblue.com/features/?utm_source=wordpress_plugin&utm_medium=plugin&utm_campaign=module_link" target="_blank"><i class="fa fa-angle-right"></i> <?php esc_attr_e( 'Features', 'mailin' ); ?></a>
|
374 |
</li>
|
375 |
</ul>
|
376 |
</div>
|
377 |
|
378 |
</div>
|
379 |
<div class="panel panel-default text-left box-border-box sib-small-content">
|
380 |
+
<div class="panel-heading"><strong><?php esc_attr_e( 'Need Help?', 'mailin' ); ?></strong></div>
|
381 |
<div class="panel-body">
|
382 |
+
<p><?php esc_attr_e( 'Do you have a question or need more information?', 'mailin' ); ?></p>
|
383 |
<ul class="sib-widget-menu">
|
384 |
+
<li><a href="https://help.sendinblue.com/hc/en-us/sections/202171729/?utm_source=wordpress_plugin&utm_medium=plugin&utm_campaign=module_link" target="_blank"><i class="fa fa-angle-right"></i> <?php esc_attr_e( 'Tutorials', 'mailin' ); ?></a></li>
|
385 |
+
<li><a href="https://resources.sendinblue.com/category/faq/?utm_source=wordpress_plugin&utm_medium=plugin&utm_campaign=module_link" target="_blank"><i class="fa fa-angle-right"></i> <?php esc_attr_e( 'FAQ', 'mailin' ); ?></a></li>
|
386 |
</ul>
|
387 |
<hr>
|
388 |
</div>
|
389 |
</div>
|
390 |
<div class="panel panel-default text-left box-border-box sib-small-content">
|
391 |
+
<div class="panel-heading"><strong><?php esc_attr_e( 'Recommend this plugin', 'mailin' ); ?></strong></div>
|
392 |
<div class="panel-body">
|
393 |
+
<p><?php esc_attr_e( 'Let everyone know you like this plugin through a review!' ,'mailin' ); ?></p>
|
394 |
<ul class="sib-widget-menu">
|
395 |
+
<li><a href="http://wordpress.org/support/view/plugin-reviews/mailin" target="_blank"><i class="fa fa-angle-right"></i> <?php esc_attr_e( 'Recommend the Sendinblue plugin', 'mailin' ); ?></a></li>
|
396 |
</ul>
|
397 |
</div>
|
398 |
</div>
|
419 |
<div class="modal-content">
|
420 |
<div class="modal-header">
|
421 |
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true" style="font-size: 22px;">×</span><span class="sr-only">Close</span></button>
|
422 |
+
<h4 class="modal-title"><?php esc_attr_e( 'Sendinblue','mailin' ); ?></h4>
|
423 |
</div>
|
424 |
<div class="modal-body" style="padding: 30px;">
|
425 |
<p>
|
426 |
+
<?php esc_attr_e( 'You are currently not logged in. Create an account or log in to benefit from all of Sendinblue\'s features an your WordPress site.', 'mailin' ); ?>
|
427 |
</p>
|
428 |
<ul>
|
429 |
+
<li> <span class="glyphicon glyphicon-ok" style="font-size: 12px;"></span> <?php esc_attr_e( 'Collect and manage your contacts', 'mailin' ); ?></li>
|
430 |
+
<li> <span class="glyphicon glyphicon-ok" style="font-size: 12px;"></span> <?php esc_attr_e( 'Send transactional emails via SMTP or API', 'mailin' ); ?></li>
|
431 |
+
<li> <span class="glyphicon glyphicon-ok" style="font-size: 12px;"></span> <?php esc_attr_e( 'Real time statistics and email tracking', 'mailin' ); ?></li>
|
432 |
+
<li> <span class="glyphicon glyphicon-ok" style="font-size: 12px;"></span> <?php esc_attr_e( 'Edit and send email marketing', 'mailin' ); ?></li>
|
433 |
</ul>
|
434 |
<div class="row" style="margin-top: 40px;">
|
435 |
<div class="col-md-6">
|
436 |
+
<a href="https://www.sendinblue.com/users/login/" target="_blank"><i><?php esc_attr_e( 'Have an account?', 'mailin' ); ?></i></a>
|
437 |
</div>
|
438 |
<div class="col-md-6">
|
439 |
+
<a href="https://www.sendinblue.com/users/signup/" target="_blank" class="btn btn-default"><i class="fa fa-angle-double-right"></i> <?php esc_attr_e( 'Free Subscribe Now', 'mailin' ); ?> <i class="fa fa-angle-double-left"></i></a>
|
440 |
</div>
|
441 |
</div>
|
442 |
</div>
|
467 |
<div class="modal-content">
|
468 |
<div class="modal-header">
|
469 |
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true" style="font-size: 22px;">×</span><span class="sr-only">Close</span></button>
|
470 |
+
<h4 class="modal-title"><?php esc_attr_e( 'Users Synchronisation','mailin' ); ?></h4>
|
471 |
</div>
|
472 |
<div class="modal-body sync-modal-body" style="padding: 10px;">
|
473 |
<div id="sync-failure" class="sib_alert alert alert-danger" style="margin-bottom: 0px;display: none;"></div>
|
474 |
<form id="sib-sync-form">
|
475 |
<!-- roles -->
|
476 |
<div class="row sync-row" style="margin-top: 0;">
|
477 |
+
<b><p><?php esc_attr_e( 'Roles to sync', 'mailin' ); ?></p></b>
|
478 |
<?php foreach ( wp_roles()->roles as $role_name => $role_info ) : ?>
|
479 |
<div class="col-md-6">
|
480 |
+
<span class="" style="display: block;float:left;padding-left: 16px;"><input type="checkbox" id="<?php echo esc_attr( $role_name ); ?>" value="<?php echo esc_attr( $role_name ); ?>" name="sync_role" checked><label for="<?php echo esc_attr( $role_name ); ?>" style="margin: 4px 24px 0 7px;font-weight: normal;"><?php esc_attr_e( ucfirst($role_name), 'mailin' ); ?></label></span>
|
481 |
</div>
|
482 |
<?php endforeach; ?>
|
483 |
</div>
|
484 |
<!-- lists -->
|
485 |
<?php $lists = SIB_API_Manager::get_lists(); ?>
|
486 |
<div class="row sync-row">
|
487 |
+
<b><p><?php esc_attr_e( 'Sync Lists', 'mailin' ); ?></p></b>
|
488 |
<div class="col-md-6">
|
489 |
+
<p><?php esc_attr_e( 'Choose the Sendinblue list in which you want to add your existing customers:', 'mailin' ); ?></p>
|
490 |
</div>
|
491 |
<div class="col-md-6">
|
492 |
<select data-placeholder="Please select the list" id="sib_select_list" name="list_id" multiple="true">
|
500 |
<?php
|
501 |
// available WordPress attributes.
|
502 |
$wpAttrs = array(
|
503 |
+
'first_name' => __( 'First Name','mailin' ),
|
504 |
+
'last_name' => __( 'Last Name','mailin' ),
|
505 |
+
'user_url' => __( 'Website URL','mailin' ),
|
506 |
+
'roles' => __( 'User Role','mailin' ),
|
507 |
+
'user_login' => __( 'Username','mailin' ),
|
508 |
+
'nickname' => __( 'Nickname','mailin' ),
|
509 |
+
'user_registered' => __( 'User Registration Date','mailin' ),
|
510 |
+
'display_name' => __( 'Display Name','mailin' ),
|
511 |
+
'description' => __( 'Description about user','mailin' ),
|
512 |
);
|
513 |
// available sendinblue attributes.
|
514 |
$sibAllAttrs = SIB_API_Manager::get_attributes();
|
515 |
$sibAttrs = $sibAllAttrs['attributes']['normal_attributes'];
|
516 |
?>
|
517 |
<div class="row sync-row" id="sync-attr-area">
|
518 |
+
<b><p><?php esc_attr_e( 'Match Attributes', 'mailin' ); ?></p></b>
|
519 |
<div class="col-md-11" style="padding: 5px;border-bottom: dotted 1px #dedede;">
|
520 |
<div class="col-md-6">
|
521 |
+
<p><?php esc_attr_e( 'WordPress Users Attributes', 'mailin' ); ?></p>
|
522 |
</div>
|
523 |
<div class="col-md-6">
|
524 |
+
<p><?php esc_attr_e( 'Sendinblue Contact Attributes', 'mailin' ); ?></p>
|
525 |
</div>
|
526 |
</div>
|
527 |
|
554 |
</div>
|
555 |
<!-- Apply button -->
|
556 |
<div class="row" style="">
|
557 |
+
<a href="javascript:void(0)" id="sib_sync_users_btn" class="btn btn-primary" style="float: right;"><?php esc_attr_e( 'Apply', 'mailin' ); ?></a>
|
558 |
</div>
|
559 |
</form>
|
560 |
</div>
|
642 |
public static function ajax_send_email() {
|
643 |
check_ajax_referer( 'ajax_sib_admin_nonce', 'security' );
|
644 |
|
645 |
+
$subject = __( '[Sendinblue SMTP] test email', 'mailin' );
|
646 |
// Get sender info.
|
647 |
$home_settings = get_option( SIB_Manager::HOME_OPTION_NAME );
|
648 |
if ( isset( $home_settings['sender'] ) ) {
|
649 |
$fromname = $home_settings['from_name'];
|
650 |
$from_email = $home_settings['from_email'];
|
651 |
} else {
|
652 |
+
$from_email = __( 'no-reply@sendinblue.com', 'mailin' );
|
653 |
+
$fromname = __( 'Sendinblue', 'mailin' );
|
654 |
}
|
655 |
|
656 |
$from = array( $from_email, $fromname );
|
697 |
wp_send_json(
|
698 |
array(
|
699 |
'code' => 'empty_role',
|
700 |
+
'message' => __( 'Please select a user role.','mailin' ),
|
701 |
)
|
702 |
);}
|
703 |
if ( isset( $postData['errAttr'] ) ) {
|
704 |
wp_send_json(
|
705 |
array(
|
706 |
'code' => 'attr_duplicated',
|
707 |
+
'message' => sprintf( esc_attr__( 'The attribute %s is duplicated. You can select one at a time.','mailin' ), '<b>' . $postData['errAttr'] . '</b>' ),
|
708 |
)
|
709 |
);}
|
710 |
|
753 |
wp_send_json(
|
754 |
array(
|
755 |
'code' => 'empty_users',
|
756 |
+
'message' => __( 'There is not any user in the roles.','mailin' ),
|
757 |
)
|
758 |
);}
|
759 |
|
page/page-scenarios.php
CHANGED
@@ -36,7 +36,7 @@ if ( ! class_exists( 'SIB_Page_Scenarios' ) ) {
|
|
36 |
* Constructs new page object and adds entry to WordPress admin menu
|
37 |
*/
|
38 |
function __construct() {
|
39 |
-
$this->page_hook = add_submenu_page( SIB_Page_Home::PAGE_ID, __( 'Workflows', '
|
40 |
add_action( 'load-' . $this->page_hook, array( &$this, 'init' ) );
|
41 |
add_action( 'admin_print_scripts-' . $this->page_hook, array( $this, 'enqueue_scripts' ) );
|
42 |
add_action( 'admin_print_styles-' . $this->page_hook, array( $this, 'enqueue_styles' ) );
|
@@ -111,103 +111,103 @@ if ( ! class_exists( 'SIB_Page_Scenarios' ) ) {
|
|
111 |
$ma_logs_link = 'https://automation.sendinblue.com/log/scenarios/?utm_source=wordpress_plugin&utm_medium=plugin&utm_campaign=module_link';
|
112 |
|
113 |
?>
|
114 |
-
<h2 style="text-align: center;"><?php esc_attr_e( 'Create your workflow', '
|
115 |
<div class="sib-scenarios">
|
116 |
<div class="col-md-4 ">
|
117 |
<a class="sib-scenario-link" href="<?php echo esc_url( $ma_link ); ?>" target="_blank">
|
118 |
<div class="thumbnail thumbanail_focus">
|
119 |
-
<h4 class="text-center"><?php esc_attr_e( 'Custom workflow','
|
120 |
<p class="text-center">
|
121 |
<img class="" src="<?php echo esc_url( SIB_Manager::$plugin_url . '/img/custom.png' ); ?>" height="70px">
|
122 |
</p>
|
123 |
-
<p class="text-center"><?php esc_attr_e( 'Mix and match triggers, conditions, and actions to create a custom workflow.', '
|
124 |
</div>
|
125 |
</a>
|
126 |
</div>
|
127 |
<div class="col-md-4">
|
128 |
<a class="sib-scenario-link" href="<?php echo esc_url( $ma_link ); ?>" target="_blank">
|
129 |
<div class="thumbnail thumbanail_focus">
|
130 |
-
<h4 class="text-center"><?php esc_attr_e( 'Welcome Message','
|
131 |
<p class="text-center">
|
132 |
<img class="" src="<?php echo esc_url( SIB_Manager::$plugin_url . '/img/welcome_message.png' ); ?>" height="70px">
|
133 |
</p>
|
134 |
-
<p class="text-center"><?php esc_attr_e( 'Send a welcome email after a subscriber joins your list.', '
|
135 |
</div>
|
136 |
</a>
|
137 |
</div>
|
138 |
<div class="col-md-4">
|
139 |
<a class="sib-scenario-link" href="<?php echo esc_url( $ma_link ); ?>" target="_blank">
|
140 |
<div class="thumbnail thumbanail_focus">
|
141 |
-
<h4 class="text-center"><?php esc_attr_e( 'Anniversary Date','
|
142 |
<p class="text-center">
|
143 |
<img class="" src="<?php echo esc_url( SIB_Manager::$plugin_url . '/img/anniversary_of_date.png' ); ?>" height="70px">
|
144 |
</p>
|
145 |
-
<p class="text-center"><?php esc_attr_e( 'Send an annual email or series of emails based on a special event or birthday.', '
|
146 |
</div>
|
147 |
</a>
|
148 |
</div>
|
149 |
<div class="col-md-4">
|
150 |
<a class="sib-scenario-link" href="<?php echo esc_url( $ma_link ); ?>" target="_blank">
|
151 |
<div class="thumbnail thumbanail_focus">
|
152 |
-
<h4 class="text-center"><?php esc_attr_e( 'Page Visit','
|
153 |
<p class="text-center">
|
154 |
<img class="" src="<?php echo esc_url( SIB_Manager::$plugin_url . '/img/page_visit.png' ); ?>" height="70px">
|
155 |
</p>
|
156 |
-
<p class="text-center"><?php esc_attr_e( 'Send emails after a contact visits a specific page on your website.', '
|
157 |
</div>
|
158 |
</a>
|
159 |
</div>
|
160 |
<div class="col-md-4">
|
161 |
<a class="sib-scenario-link" href="<?php echo esc_url( $ma_link ); ?>" target="_blank">
|
162 |
<div class="thumbnail thumbanail_focus">
|
163 |
-
<h4 class="text-center"><?php esc_attr_e( 'Website Event','
|
164 |
<p class="text-center">
|
165 |
<img class="" src="<?php echo esc_url( SIB_Manager::$plugin_url . '/img/website_event.png' ); ?>" height="70px">
|
166 |
</p>
|
167 |
-
<p class="text-center"><?php esc_attr_e( 'Send emails after a contact performs a specific action on your website.', '
|
168 |
</div>
|
169 |
</a>
|
170 |
</div>
|
171 |
<div class="col-md-4">
|
172 |
<a class="sib-scenario-link" href="<?php echo esc_url( $ma_link ); ?>" target="_blank">
|
173 |
<div class="thumbnail thumbanail_focus">
|
174 |
-
<h4 class="text-center"><?php esc_attr_e( 'Product Purchase','
|
175 |
<p class="text-center">
|
176 |
<img class="" src="<?php echo esc_url( SIB_Manager::$plugin_url . '/img/product_purchase.png' ); ?>" height="70px">
|
177 |
</p>
|
178 |
-
<p class="text-center"><?php esc_attr_e( 'Send emails when a product is purchased on your website.', '
|
179 |
</div>
|
180 |
</a>
|
181 |
</div>
|
182 |
<div class="col-md-4">
|
183 |
<a class="sib-scenario-link" href="<?php echo esc_url( $ma_link ); ?>" target="_blank">
|
184 |
<div class="thumbnail thumbanail_focus">
|
185 |
-
<h4 class="text-center"><?php esc_attr_e( 'Marketing Activity','
|
186 |
<p class="text-center">
|
187 |
<img class="" src="<?php echo esc_url( SIB_Manager::$plugin_url . '/img/newsletter_activity.png' ); ?>" height="70px">
|
188 |
</p>
|
189 |
-
<p class="text-center"><?php esc_attr_e( 'Send emails based on whether contacts open or click on an email campaign.', '
|
190 |
</div>
|
191 |
</a>
|
192 |
</div>
|
193 |
<div class="col-md-4">
|
194 |
<a class="sib-scenario-link" href="<?php echo esc_url( $ma_link ); ?>" target="_blank">
|
195 |
<div class="thumbnail thumbanail_focus">
|
196 |
-
<h4 class="text-center"><?php esc_attr_e( 'Transactional Activity','
|
197 |
<p class="text-center">
|
198 |
<img class="" src="<?php echo esc_url( SIB_Manager::$plugin_url . '/img/transactional_activity.png' ); ?>" height="70px">
|
199 |
</p>
|
200 |
-
<p class="text-center"><?php esc_attr_e( 'Send an email based whether contacts open or click on transactional emails.', '
|
201 |
</div>
|
202 |
</a>
|
203 |
</div>
|
204 |
</div>
|
205 |
|
206 |
<div class="col-md-6" style="text-align: right;padding: 0 50px;">
|
207 |
-
<a href="<?php echo esc_url( $ma_exist_link ); ?>" class="button" target="_blank" style="width: 200px;text-align: center;"><?php esc_attr_e( 'View my existing workflows', '
|
208 |
</div>
|
209 |
<div class="col-md-6" style="text-align: left;padding: 0 50px;">
|
210 |
-
<a href="<?php echo esc_url( $ma_logs_link ); ?>" class="button" target="_blank" style="width: 200px;text-align: center;"><?php esc_attr_e( 'View logs', '
|
211 |
</div>
|
212 |
|
213 |
<?php
|
@@ -223,4 +223,4 @@ if ( ! class_exists( 'SIB_Page_Scenarios' ) ) {
|
|
223 |
}
|
224 |
|
225 |
}
|
226 |
-
}
|
36 |
* Constructs new page object and adds entry to WordPress admin menu
|
37 |
*/
|
38 |
function __construct() {
|
39 |
+
$this->page_hook = add_submenu_page( SIB_Page_Home::PAGE_ID, __( 'Workflows', 'mailin' ), __( 'Workflows', 'mailin' ), 'manage_options', self::PAGE_ID, array( &$this, 'generate' ) );
|
40 |
add_action( 'load-' . $this->page_hook, array( &$this, 'init' ) );
|
41 |
add_action( 'admin_print_scripts-' . $this->page_hook, array( $this, 'enqueue_scripts' ) );
|
42 |
add_action( 'admin_print_styles-' . $this->page_hook, array( $this, 'enqueue_styles' ) );
|
111 |
$ma_logs_link = 'https://automation.sendinblue.com/log/scenarios/?utm_source=wordpress_plugin&utm_medium=plugin&utm_campaign=module_link';
|
112 |
|
113 |
?>
|
114 |
+
<h2 style="text-align: center;"><?php esc_attr_e( 'Create your workflow', 'mailin' ); ?></h2>
|
115 |
<div class="sib-scenarios">
|
116 |
<div class="col-md-4 ">
|
117 |
<a class="sib-scenario-link" href="<?php echo esc_url( $ma_link ); ?>" target="_blank">
|
118 |
<div class="thumbnail thumbanail_focus">
|
119 |
+
<h4 class="text-center"><?php esc_attr_e( 'Custom workflow','mailin' ); ?></h4>
|
120 |
<p class="text-center">
|
121 |
<img class="" src="<?php echo esc_url( SIB_Manager::$plugin_url . '/img/custom.png' ); ?>" height="70px">
|
122 |
</p>
|
123 |
+
<p class="text-center"><?php esc_attr_e( 'Mix and match triggers, conditions, and actions to create a custom workflow.', 'mailin' ); ?></p>
|
124 |
</div>
|
125 |
</a>
|
126 |
</div>
|
127 |
<div class="col-md-4">
|
128 |
<a class="sib-scenario-link" href="<?php echo esc_url( $ma_link ); ?>" target="_blank">
|
129 |
<div class="thumbnail thumbanail_focus">
|
130 |
+
<h4 class="text-center"><?php esc_attr_e( 'Welcome Message','mailin' ); ?></h4>
|
131 |
<p class="text-center">
|
132 |
<img class="" src="<?php echo esc_url( SIB_Manager::$plugin_url . '/img/welcome_message.png' ); ?>" height="70px">
|
133 |
</p>
|
134 |
+
<p class="text-center"><?php esc_attr_e( 'Send a welcome email after a subscriber joins your list.', 'mailin' ); ?></p>
|
135 |
</div>
|
136 |
</a>
|
137 |
</div>
|
138 |
<div class="col-md-4">
|
139 |
<a class="sib-scenario-link" href="<?php echo esc_url( $ma_link ); ?>" target="_blank">
|
140 |
<div class="thumbnail thumbanail_focus">
|
141 |
+
<h4 class="text-center"><?php esc_attr_e( 'Anniversary Date','mailin' ); ?></h4>
|
142 |
<p class="text-center">
|
143 |
<img class="" src="<?php echo esc_url( SIB_Manager::$plugin_url . '/img/anniversary_of_date.png' ); ?>" height="70px">
|
144 |
</p>
|
145 |
+
<p class="text-center"><?php esc_attr_e( 'Send an annual email or series of emails based on a special event or birthday.', 'mailin' ); ?></p>
|
146 |
</div>
|
147 |
</a>
|
148 |
</div>
|
149 |
<div class="col-md-4">
|
150 |
<a class="sib-scenario-link" href="<?php echo esc_url( $ma_link ); ?>" target="_blank">
|
151 |
<div class="thumbnail thumbanail_focus">
|
152 |
+
<h4 class="text-center"><?php esc_attr_e( 'Page Visit','mailin' ); ?></h4>
|
153 |
<p class="text-center">
|
154 |
<img class="" src="<?php echo esc_url( SIB_Manager::$plugin_url . '/img/page_visit.png' ); ?>" height="70px">
|
155 |
</p>
|
156 |
+
<p class="text-center"><?php esc_attr_e( 'Send emails after a contact visits a specific page on your website.', 'mailin' ); ?></p>
|
157 |
</div>
|
158 |
</a>
|
159 |
</div>
|
160 |
<div class="col-md-4">
|
161 |
<a class="sib-scenario-link" href="<?php echo esc_url( $ma_link ); ?>" target="_blank">
|
162 |
<div class="thumbnail thumbanail_focus">
|
163 |
+
<h4 class="text-center"><?php esc_attr_e( 'Website Event','mailin' ); ?></h4>
|
164 |
<p class="text-center">
|
165 |
<img class="" src="<?php echo esc_url( SIB_Manager::$plugin_url . '/img/website_event.png' ); ?>" height="70px">
|
166 |
</p>
|
167 |
+
<p class="text-center"><?php esc_attr_e( 'Send emails after a contact performs a specific action on your website.', 'mailin' ); ?></p>
|
168 |
</div>
|
169 |
</a>
|
170 |
</div>
|
171 |
<div class="col-md-4">
|
172 |
<a class="sib-scenario-link" href="<?php echo esc_url( $ma_link ); ?>" target="_blank">
|
173 |
<div class="thumbnail thumbanail_focus">
|
174 |
+
<h4 class="text-center"><?php esc_attr_e( 'Product Purchase','mailin' ); ?></h4>
|
175 |
<p class="text-center">
|
176 |
<img class="" src="<?php echo esc_url( SIB_Manager::$plugin_url . '/img/product_purchase.png' ); ?>" height="70px">
|
177 |
</p>
|
178 |
+
<p class="text-center"><?php esc_attr_e( 'Send emails when a product is purchased on your website.', 'mailin' ); ?></p>
|
179 |
</div>
|
180 |
</a>
|
181 |
</div>
|
182 |
<div class="col-md-4">
|
183 |
<a class="sib-scenario-link" href="<?php echo esc_url( $ma_link ); ?>" target="_blank">
|
184 |
<div class="thumbnail thumbanail_focus">
|
185 |
+
<h4 class="text-center"><?php esc_attr_e( 'Marketing Activity','mailin' ); ?></h4>
|
186 |
<p class="text-center">
|
187 |
<img class="" src="<?php echo esc_url( SIB_Manager::$plugin_url . '/img/newsletter_activity.png' ); ?>" height="70px">
|
188 |
</p>
|
189 |
+
<p class="text-center"><?php esc_attr_e( 'Send emails based on whether contacts open or click on an email campaign.', 'mailin' ); ?></p>
|
190 |
</div>
|
191 |
</a>
|
192 |
</div>
|
193 |
<div class="col-md-4">
|
194 |
<a class="sib-scenario-link" href="<?php echo esc_url( $ma_link ); ?>" target="_blank">
|
195 |
<div class="thumbnail thumbanail_focus">
|
196 |
+
<h4 class="text-center"><?php esc_attr_e( 'Transactional Activity','mailin' ); ?></h4>
|
197 |
<p class="text-center">
|
198 |
<img class="" src="<?php echo esc_url( SIB_Manager::$plugin_url . '/img/transactional_activity.png' ); ?>" height="70px">
|
199 |
</p>
|
200 |
+
<p class="text-center"><?php esc_attr_e( 'Send an email based whether contacts open or click on transactional emails.', 'mailin' ); ?></p>
|
201 |
</div>
|
202 |
</a>
|
203 |
</div>
|
204 |
</div>
|
205 |
|
206 |
<div class="col-md-6" style="text-align: right;padding: 0 50px;">
|
207 |
+
<a href="<?php echo esc_url( $ma_exist_link ); ?>" class="button" target="_blank" style="width: 200px;text-align: center;"><?php esc_attr_e( 'View my existing workflows', 'mailin' ); ?></a>
|
208 |
</div>
|
209 |
<div class="col-md-6" style="text-align: left;padding: 0 50px;">
|
210 |
+
<a href="<?php echo esc_url( $ma_logs_link ); ?>" class="button" target="_blank" style="width: 200px;text-align: center;"><?php esc_attr_e( 'View logs', 'mailin' ); ?></a>
|
211 |
</div>
|
212 |
|
213 |
<?php
|
223 |
}
|
224 |
|
225 |
}
|
226 |
+
}
|
page/page-statistics.php
CHANGED
@@ -39,7 +39,7 @@ if ( ! class_exists( 'SIB_Page_Statistics' ) ) {
|
|
39 |
* Constructs new page object and adds entry to WordPress admin menu
|
40 |
*/
|
41 |
function __construct() {
|
42 |
-
$this->page_hook = add_submenu_page( SIB_Page_Home::PAGE_ID, __( 'Statistics', '
|
43 |
add_action( 'load-' . $this->page_hook, array( &$this, 'init' ) );
|
44 |
add_action( 'admin_print_scripts-' . $this->page_hook, array( $this, 'enqueue_scripts' ) );
|
45 |
add_action( 'admin_print_styles-' . $this->page_hook, array( $this, 'enqueue_styles' ) );
|
@@ -128,13 +128,13 @@ if ( ! class_exists( 'SIB_Page_Statistics' ) ) {
|
|
128 |
<h3><?php _e('Statistics', 'wc_sendinblue'); ?></h3>
|
129 |
<div id="sib-statistics-date-container">
|
130 |
<form method="POST" id="sib-statistics-form">
|
131 |
-
<label for="sib-statistics-date"><?php esc_attr_e( 'Date', '
|
132 |
<?php if (strtotime($date['statisticsDate']) !== false) { ?>
|
133 |
-
<input id="sib-statistics-date" name="sib-statistics-date" value="<?php echo $date['statisticsDate']; ?>" autocomplete="off" class="button show-settings">
|
134 |
<?php } else { ?>
|
135 |
<input id="sib-statistics-date" name="sib-statistics-date" value="<?php echo date('Y-m-d'); ?>" autocomplete="off" class="button show-settings">
|
136 |
<?php } ?>
|
137 |
-
<button id="apply-date-range" class="button action"><?php esc_attr_e( 'Apply', '
|
138 |
<span class="sib-spinner spinner"></span>
|
139 |
</form>
|
140 |
</div>
|
@@ -143,20 +143,20 @@ if ( ! class_exists( 'SIB_Page_Statistics' ) ) {
|
|
143 |
<thead>
|
144 |
<tr>
|
145 |
<th class="sort"> </th>
|
146 |
-
<th class=""><?php esc_attr_e( 'Name', '
|
147 |
-
<th class=""><?php esc_attr_e('Recipients','
|
148 |
-
<th class=""><?php esc_attr_e('Deliverability Rate','
|
149 |
-
<th class=""><?php esc_attr_e('Opens','
|
150 |
-
<th class=""><?php esc_attr_e('Clicks','
|
151 |
-
<th class=""><?php esc_attr_e('Unsubscriptions','
|
152 |
-
<th class=""><?php esc_attr_e('Bounces','
|
153 |
-
<th class=""><?php esc_attr_e('Date','
|
154 |
</tr>
|
155 |
</thead>
|
156 |
<tbody class="ui-sortable">
|
157 |
|
158 |
<div>
|
159 |
-
<h3 class="title"><?php esc_attr_e( 'Email Campaigns', '
|
160 |
</div>
|
161 |
<?php
|
162 |
if (!empty($emailCampaigns)) {
|
@@ -165,18 +165,18 @@ if ( ! class_exists( 'SIB_Page_Statistics' ) ) {
|
|
165 |
<td width="1%" class="sort ui-sortable-handle">
|
166 |
<input type="hidden" name="method_order[flat_rate]" value="">
|
167 |
</td>
|
168 |
-
<td class=""><?php echo $campaign['name'];?></td>
|
169 |
-
<td class="sib-statistics-data-value"><?php echo $campaign['statistics']['globalStats']['sent'];?></td>
|
170 |
<td class="sib-statistics-data-value"><?php echo empty($campaign['statistics']['globalStats']['sent']) ? 0 : round($campaign['statistics']['globalStats']['delivered'] * 100 / $campaign['statistics']['globalStats']['sent'], 2);?>%</td>
|
171 |
-
<td class="sib-statistics-data-value"><?php echo !empty($campaign['statistics']['globalStats']['viewed']) ? $campaign['statistics']['globalStats']['viewed'] : 0;?></td>
|
172 |
-
<td class="sib-statistics-data-value"><?php echo !empty($campaign['statistics']['globalStats']['clickers']) ? $campaign['statistics']['globalStats']['clickers'] : 0;?></td>
|
173 |
-
<td class="sib-statistics-data-value"><?php echo !empty($campaign['statistics']['globalStats']['unsubscriptions']) ? $campaign['statistics']['globalStats']['unsubscriptions'] : 0; ?></td>
|
174 |
-
<td class="sib-statistics-data-value"><?php echo $campaign['statistics']['globalStats']['softBounces'] + $campaign['statistics']['globalStats']['hardBounces'];?></td>
|
175 |
<td class="sib-statistics-data-value sib-last-column-value"><?php echo (new DateTime($campaign['sentDate']))->format('Y-m-d H:i:s');?></td>
|
176 |
</tr>
|
177 |
<?php } ?>
|
178 |
<?php } else { ?>
|
179 |
-
<tr> <td colspan="9" style="text-align:center;"><?php esc_attr_e( 'No Stats Found', '
|
180 |
<?php } ?>
|
181 |
</tbody>
|
182 |
</table>
|
@@ -184,19 +184,19 @@ if ( ! class_exists( 'SIB_Page_Statistics' ) ) {
|
|
184 |
<thead>
|
185 |
<tr>
|
186 |
<th class="sort"> </th>
|
187 |
-
<th class=""><?php esc_attr_e( 'Name', '
|
188 |
-
<th class=""><?php esc_attr_e('Recipients','
|
189 |
-
<th class=""><?php esc_attr_e('Deliverability Rate','
|
190 |
-
<th class=""><?php esc_attr_e('Answeres','
|
191 |
-
<th class=""><?php esc_attr_e('Unsubscriptions','
|
192 |
-
<th class=""><?php esc_attr_e('Bounces','
|
193 |
-
<th class=""><?php esc_attr_e('Date','
|
194 |
</tr>
|
195 |
</thead>
|
196 |
<tbody class="ui-sortable">
|
197 |
|
198 |
<div>
|
199 |
-
<h3 class="title"><?php esc_attr_e( 'SMS Campaigns', '
|
200 |
</div>
|
201 |
<?php
|
202 |
if (!empty($smsCampaigns)) {
|
@@ -205,17 +205,17 @@ if ( ! class_exists( 'SIB_Page_Statistics' ) ) {
|
|
205 |
<td width="1%" class="sort ui-sortable-handle">
|
206 |
<input type="hidden" name="method_order[flat_rate]" value="">
|
207 |
</td>
|
208 |
-
<td class=""><?php echo $smsCampaign['name'];?></td>
|
209 |
-
<td class="sib-statistics-data-value"><?php echo $smsCampaign['statistics']['sent'];?></td>
|
210 |
<td class="sib-statistics-data-value"><?php echo empty($smsCampaign['statistics']['sent']) ? 0 : round($smsCampaign['statistics']['delivered'] * 100 / $smsCampaign['statistics']['sent'], 2);?>%</td>
|
211 |
-
<td class="sib-statistics-data-value"><?php echo !empty($smsCampaign['statistics']['answered']) ? $smsCampaign['statistics']['answered'] : 0;?></td>
|
212 |
-
<td class="sib-statistics-data-value"><?php echo !empty($smsCampaign['statistics']['unsubscriptions']) ? $smsCampaign['statistics']['unsubscriptions'] : 0;?></td>
|
213 |
-
<td class="sib-statistics-data-value"><?php echo $smsCampaign['statistics']['softBounces'] + $
|
214 |
<td class="sib-statistics-data-value sib-last-column-value"><?php echo (new DateTime($smsCampaign['sentDate']))->format('Y-m-d H:i:s');?></td>
|
215 |
</tr>
|
216 |
<?php } ?>
|
217 |
<?php } else { ?>
|
218 |
-
<tr> <td colspan="9" style="text-align:center;"><?php esc_attr_e( 'No Stats Found', '
|
219 |
<?php } ?>
|
220 |
</tbody>
|
221 |
</table>
|
@@ -237,7 +237,7 @@ if ( ! class_exists( 'SIB_Page_Statistics' ) ) {
|
|
237 |
if (empty($_POST['sib-statistics-date'])) {
|
238 |
$statisticsDate = date('Y-m-d');
|
239 |
} else {
|
240 |
-
$statisticsDate =
|
241 |
$date = explode(' - ', $statisticsDate);
|
242 |
|
243 |
if (count($date) === 1) {
|
39 |
* Constructs new page object and adds entry to WordPress admin menu
|
40 |
*/
|
41 |
function __construct() {
|
42 |
+
$this->page_hook = add_submenu_page( SIB_Page_Home::PAGE_ID, __( 'Statistics', 'mailin' ), __( 'Statistics', 'mailin' ), 'manage_options', self::PAGE_ID, array( &$this, 'generate' ) );
|
43 |
add_action( 'load-' . $this->page_hook, array( &$this, 'init' ) );
|
44 |
add_action( 'admin_print_scripts-' . $this->page_hook, array( $this, 'enqueue_scripts' ) );
|
45 |
add_action( 'admin_print_styles-' . $this->page_hook, array( $this, 'enqueue_styles' ) );
|
128 |
<h3><?php _e('Statistics', 'wc_sendinblue'); ?></h3>
|
129 |
<div id="sib-statistics-date-container">
|
130 |
<form method="POST" id="sib-statistics-form">
|
131 |
+
<label for="sib-statistics-date"><?php esc_attr_e( 'Date', 'mailin' );?>: </label>
|
132 |
<?php if (strtotime($date['statisticsDate']) !== false) { ?>
|
133 |
+
<input id="sib-statistics-date" name="sib-statistics-date" value="<?php echo esc_attr( $date['statisticsDate'] ); ?>" autocomplete="off" class="button show-settings">
|
134 |
<?php } else { ?>
|
135 |
<input id="sib-statistics-date" name="sib-statistics-date" value="<?php echo date('Y-m-d'); ?>" autocomplete="off" class="button show-settings">
|
136 |
<?php } ?>
|
137 |
+
<button id="apply-date-range" class="button action"><?php esc_attr_e( 'Apply', 'mailin'); ?></button>
|
138 |
<span class="sib-spinner spinner"></span>
|
139 |
</form>
|
140 |
</div>
|
143 |
<thead>
|
144 |
<tr>
|
145 |
<th class="sort"> </th>
|
146 |
+
<th class=""><?php esc_attr_e( 'Name', 'mailin' );?></th>
|
147 |
+
<th class=""><?php esc_attr_e('Recipients','mailin');?></th>
|
148 |
+
<th class=""><?php esc_attr_e('Deliverability Rate','mailin');?></th>
|
149 |
+
<th class=""><?php esc_attr_e('Opens','mailin');?></th>
|
150 |
+
<th class=""><?php esc_attr_e('Clicks','mailin');?></th>
|
151 |
+
<th class=""><?php esc_attr_e('Unsubscriptions','mailin');?></th>
|
152 |
+
<th class=""><?php esc_attr_e('Bounces','mailin');?></th>
|
153 |
+
<th class=""><?php esc_attr_e('Date','mailin');?></th>
|
154 |
</tr>
|
155 |
</thead>
|
156 |
<tbody class="ui-sortable">
|
157 |
|
158 |
<div>
|
159 |
+
<h3 class="title"><?php esc_attr_e( 'Email Campaigns', 'mailin' );?></h3>
|
160 |
</div>
|
161 |
<?php
|
162 |
if (!empty($emailCampaigns)) {
|
165 |
<td width="1%" class="sort ui-sortable-handle">
|
166 |
<input type="hidden" name="method_order[flat_rate]" value="">
|
167 |
</td>
|
168 |
+
<td class=""><?php echo esc_attr( $campaign['name'] );?></td>
|
169 |
+
<td class="sib-statistics-data-value"><?php echo esc_attr( $campaign['statistics']['globalStats']['sent'] );?></td>
|
170 |
<td class="sib-statistics-data-value"><?php echo empty($campaign['statistics']['globalStats']['sent']) ? 0 : round($campaign['statistics']['globalStats']['delivered'] * 100 / $campaign['statistics']['globalStats']['sent'], 2);?>%</td>
|
171 |
+
<td class="sib-statistics-data-value"><?php echo !empty($campaign['statistics']['globalStats']['viewed']) ? esc_attr( $campaign['statistics']['globalStats']['viewed'] ) : 0;?></td>
|
172 |
+
<td class="sib-statistics-data-value"><?php echo !empty($campaign['statistics']['globalStats']['clickers']) ? esc_attr( $campaign['statistics']['globalStats']['clickers'] ) : 0;?></td>
|
173 |
+
<td class="sib-statistics-data-value"><?php echo !empty($campaign['statistics']['globalStats']['unsubscriptions']) ? esc_attr( $campaign['statistics']['globalStats']['unsubscriptions'] ) : 0; ?></td>
|
174 |
+
<td class="sib-statistics-data-value"><?php echo esc_attr( $campaign['statistics']['globalStats']['softBounces'] ) + esc_attr( $campaign['statistics']['globalStats']['hardBounces'] );?></td>
|
175 |
<td class="sib-statistics-data-value sib-last-column-value"><?php echo (new DateTime($campaign['sentDate']))->format('Y-m-d H:i:s');?></td>
|
176 |
</tr>
|
177 |
<?php } ?>
|
178 |
<?php } else { ?>
|
179 |
+
<tr> <td colspan="9" style="text-align:center;"><?php esc_attr_e( 'No Stats Found', 'mailin' ); ?></td></tr>
|
180 |
<?php } ?>
|
181 |
</tbody>
|
182 |
</table>
|
184 |
<thead>
|
185 |
<tr>
|
186 |
<th class="sort"> </th>
|
187 |
+
<th class=""><?php esc_attr_e( 'Name', 'mailin' );?></th>
|
188 |
+
<th class=""><?php esc_attr_e('Recipients','mailin');?></th>
|
189 |
+
<th class=""><?php esc_attr_e('Deliverability Rate','mailin');?></th>
|
190 |
+
<th class=""><?php esc_attr_e('Answeres','mailin');?></th>
|
191 |
+
<th class=""><?php esc_attr_e('Unsubscriptions','mailin');?></th>
|
192 |
+
<th class=""><?php esc_attr_e('Bounces','mailin');?></th>
|
193 |
+
<th class=""><?php esc_attr_e('Date','mailin');?></th>
|
194 |
</tr>
|
195 |
</thead>
|
196 |
<tbody class="ui-sortable">
|
197 |
|
198 |
<div>
|
199 |
+
<h3 class="title"><?php esc_attr_e( 'SMS Campaigns', 'mailin' );?></h3>
|
200 |
</div>
|
201 |
<?php
|
202 |
if (!empty($smsCampaigns)) {
|
205 |
<td width="1%" class="sort ui-sortable-handle">
|
206 |
<input type="hidden" name="method_order[flat_rate]" value="">
|
207 |
</td>
|
208 |
+
<td class=""><?php echo esc_attr( $smsCampaign['name'] );?></td>
|
209 |
+
<td class="sib-statistics-data-value"><?php echo esc_attr( $smsCampaign['statistics']['sent'] );?></td>
|
210 |
<td class="sib-statistics-data-value"><?php echo empty($smsCampaign['statistics']['sent']) ? 0 : round($smsCampaign['statistics']['delivered'] * 100 / $smsCampaign['statistics']['sent'], 2);?>%</td>
|
211 |
+
<td class="sib-statistics-data-value"><?php echo !empty($smsCampaign['statistics']['answered']) ? esc_attr( $smsCampaign['statistics']['answered'] ) : 0;?></td>
|
212 |
+
<td class="sib-statistics-data-value"><?php echo !empty($smsCampaign['statistics']['unsubscriptions']) ? esc_attr( $smsCampaign['statistics']['unsubscriptions'] ) : 0;?></td>
|
213 |
+
<td class="sib-statistics-data-value"><?php echo esc_attr( $smsCampaign['statistics']['softBounces'] ) + esc_attr( $smsCampaign['statistics']['hardBounces'] );?></td>
|
214 |
<td class="sib-statistics-data-value sib-last-column-value"><?php echo (new DateTime($smsCampaign['sentDate']))->format('Y-m-d H:i:s');?></td>
|
215 |
</tr>
|
216 |
<?php } ?>
|
217 |
<?php } else { ?>
|
218 |
+
<tr> <td colspan="9" style="text-align:center;"><?php esc_attr_e( 'No Stats Found', 'mailin' ); ?></td></tr>
|
219 |
<?php } ?>
|
220 |
</tbody>
|
221 |
</table>
|
237 |
if (empty($_POST['sib-statistics-date'])) {
|
238 |
$statisticsDate = date('Y-m-d');
|
239 |
} else {
|
240 |
+
$statisticsDate = sanitize_text_field($_POST['sib-statistics-date']);
|
241 |
$date = explode(' - ', $statisticsDate);
|
242 |
|
243 |
if (count($date) === 1) {
|
readme.txt
CHANGED
@@ -116,6 +116,9 @@ In order to create a signup form, you need to:
|
|
116 |
|
117 |
== Changelog ==
|
118 |
|
|
|
|
|
|
|
119 |
= 3.1.26 =
|
120 |
* Fixed an issue related to XSS reflected Vulnerability.
|
121 |
|
116 |
|
117 |
== Changelog ==
|
118 |
|
119 |
+
= 3.1.27 =
|
120 |
+
* Fixed issue related to XSS vulnerability and security checks.
|
121 |
+
|
122 |
= 3.1.26 =
|
123 |
* Fixed an issue related to XSS reflected Vulnerability.
|
124 |
|
sendinblue.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Newsletter, SMTP, Email marketing and Subscribe forms by Sendinblue
|
4 |
* Plugin URI: https://www.sendinblue.com/?r=wporg
|
5 |
* Description: Manage your contact lists, subscription forms and all email and marketing-related topics from your wp panel, within one single plugin
|
6 |
-
* Version: 3.1.
|
7 |
* Author: Sendinblue
|
8 |
* Author URI: https://www.sendinblue.com/?r=wporg
|
9 |
* License: GPLv2 or later
|
@@ -371,10 +371,10 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
371 |
wp_enqueue_style( 'sib-front-css', self::$plugin_url.'/css/mailin-front.css', array(), array(), 'all');
|
372 |
wp_localize_script(
|
373 |
'sib-front-js', 'sibErrMsg', array(
|
374 |
-
'invalidMail' => __( 'Please fill out valid email address', '
|
375 |
-
'requiredField' => __( 'Please fill out required fields', '
|
376 |
-
'invalidDateFormat' => __( 'Please fill out valid date format', '
|
377 |
-
'invalidSMSFormat' => __( 'Please fill out valid phone number', '
|
378 |
)
|
379 |
);
|
380 |
wp_localize_script(
|
@@ -1132,11 +1132,11 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
1132 |
*/
|
1133 |
static function LoadTextDomain() {
|
1134 |
// Load lang file.
|
1135 |
-
$i18n_file_name = '
|
1136 |
$locale = apply_filters( 'plugin_locale', get_locale(), $i18n_file_name );
|
1137 |
// $locale = 'fr_FR';
|
1138 |
$filename = plugin_dir_path( __FILE__ ) . '/lang/' . $i18n_file_name . '-' . $locale . '.mo';
|
1139 |
-
load_textdomain( '
|
1140 |
}
|
1141 |
|
1142 |
/**
|
@@ -1159,7 +1159,7 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
1159 |
*/
|
1160 |
static function wpMailNotices() {
|
1161 |
if ( self::$wp_mail_conflict ) {
|
1162 |
-
echo ( '<div class="error"><p>' . __( 'You cannot use Sendinblue SMTP now because wp_mail has been declared by another process or plugin. ', '
|
1163 |
}
|
1164 |
}
|
1165 |
|
@@ -1225,10 +1225,10 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
1225 |
if ( 'sib_page_form' === $page && 'edit' === $action ) {
|
1226 |
?>
|
1227 |
<div class="panel panel-default text-left box-border-box sib-small-content">
|
1228 |
-
<div class="panel-heading"><strong><?php esc_attr_e( 'About Sendinblue', '
|
1229 |
<div class="panel-body">
|
1230 |
<p>
|
1231 |
-
<label for='sib_form_language'><?php esc_attr_e( 'Language of this form:', '
|
1232 |
<select id="sib_form_lang" name="sib_form_lang" data-selected="">
|
1233 |
<?php
|
1234 |
foreach ( $languages as $language ) {
|
@@ -1241,7 +1241,7 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
1241 |
if ( null === $exist ) {
|
1242 |
continue;
|
1243 |
} else {
|
1244 |
-
$option_text = ( 'selected' === $selected ) ? sprintf( '<option value="" selected>%s</option>', $language['native_name'] ) : sprintf( '<option value="?page=%s&action=%s&pid=%s&lang=%s" %s >%s</option>',
|
1245 |
}
|
1246 |
}
|
1247 |
echo $option_text ;
|
@@ -1251,7 +1251,7 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
1251 |
</p>
|
1252 |
<div class="sib_form_translate">
|
1253 |
<p>
|
1254 |
-
<label><?php esc_attr_e( 'Translate this form', '
|
1255 |
</p>
|
1256 |
<table width="100%" class="sib_form_trans_table" style="border: 1px solid #8cceea;">
|
1257 |
<tr>
|
@@ -1286,7 +1286,7 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
1286 |
$td = $href . '<img src="' . $img_src . '" style="margin:2px;"></a>';
|
1287 |
} else {
|
1288 |
$img_src = plugins_url( 'img/edit_translation.png', __FILE__ );
|
1289 |
-
$href = sprintf( '<a class="sib-form-redirect" href="?page=%s&action=%s&id=%s&pid=%s&lang=%s" style="width: 20px; text-align: center;padding: 2px 1px;">',
|
1290 |
$td = $href . '<img src="' . $img_src . '" style="margin:2px;"></a>';
|
1291 |
}
|
1292 |
}
|
@@ -1300,12 +1300,12 @@ if ( ! class_exists( 'SIB_Manager' ) ) {
|
|
1300 |
</div>
|
1301 |
<?php if ( isset( $_GET['pid'] ) ) { ?>
|
1302 |
<div class="sib-form-duplicate">
|
1303 |
-
<button class="btn btn-default sib-duplicate-btn"><?php esc_attr_e( 'Copy content from origin form', '
|
1304 |
<span class="sib-spin"><i
|
1305 |
class="fa fa-circle-o-notch fa-spin fa-lg"></i> </span>
|
1306 |
-
<i title="<?php echo esc_attr_e( 'Copy content from origin form', '
|
1307 |
data-container="body" data-toggle="popover" data-placement="left"
|
1308 |
-
data-content="<?php echo esc_attr_e( 'You can copy contents from origin form. You need to translate the contents by this language.', '
|
1309 |
data-html="true" class="fa fa-question-circle popover-help-form"></i>
|
1310 |
</div>
|
1311 |
<?php } ?>
|
3 |
* Plugin Name: Newsletter, SMTP, Email marketing and Subscribe forms by Sendinblue
|
4 |
* Plugin URI: https://www.sendinblue.com/?r=wporg
|
5 |
* Description: Manage your contact lists, subscription forms and all email and marketing-related topics from your wp panel, within one single plugin
|
6 |
+
* Version: 3.1.27
|
7 |
* Author: Sendinblue
|
8 |
* Author URI: https://www.sendinblue.com/?r=wporg
|
9 |
* License: GPLv2 or later
|
371 |
wp_enqueue_style( 'sib-front-css', self::$plugin_url.'/css/mailin-front.css', array(), array(), 'all');
|
372 |
wp_localize_script(
|
373 |
'sib-front-js', 'sibErrMsg', array(
|
374 |
+
'invalidMail' => __( 'Please fill out valid email address', 'mailin' ),
|
375 |
+
'requiredField' => __( 'Please fill out required fields', 'mailin' ),
|
376 |
+
'invalidDateFormat' => __( 'Please fill out valid date format', 'mailin' ),
|
377 |
+
'invalidSMSFormat' => __( 'Please fill out valid phone number', 'mailin' ),
|
378 |
)
|
379 |
);
|
380 |
wp_localize_script(
|
1132 |
*/
|
1133 |
static function LoadTextDomain() {
|
1134 |
// Load lang file.
|
1135 |
+
$i18n_file_name = 'mailin';
|
1136 |
$locale = apply_filters( 'plugin_locale', get_locale(), $i18n_file_name );
|
1137 |
// $locale = 'fr_FR';
|
1138 |
$filename = plugin_dir_path( __FILE__ ) . '/lang/' . $i18n_file_name . '-' . $locale . '.mo';
|
1139 |
+
load_textdomain( 'mailin', $filename );
|
1140 |
}
|
1141 |
|
1142 |
/**
|
1159 |
*/
|
1160 |
static function wpMailNotices() {
|
1161 |
if ( self::$wp_mail_conflict ) {
|
1162 |
+
echo ( '<div class="error"><p>' . __( 'You cannot use Sendinblue SMTP now because wp_mail has been declared by another process or plugin. ', 'mailin' ) . '</p></div>' );
|
1163 |
}
|
1164 |
}
|
1165 |
|
1225 |
if ( 'sib_page_form' === $page && 'edit' === $action ) {
|
1226 |
?>
|
1227 |
<div class="panel panel-default text-left box-border-box sib-small-content">
|
1228 |
+
<div class="panel-heading"><strong><?php esc_attr_e( 'About Sendinblue', 'mailin' ); ?></strong></div>
|
1229 |
<div class="panel-body">
|
1230 |
<p>
|
1231 |
+
<label for='sib_form_language'><?php esc_attr_e( 'Language of this form:', 'mailin' ); ?> </label>
|
1232 |
<select id="sib_form_lang" name="sib_form_lang" data-selected="">
|
1233 |
<?php
|
1234 |
foreach ( $languages as $language ) {
|
1241 |
if ( null === $exist ) {
|
1242 |
continue;
|
1243 |
} else {
|
1244 |
+
$option_text = ( 'selected' === $selected ) ? sprintf( '<option value="" selected>%s</option>', $language['native_name'] ) : sprintf( '<option value="?page=%s&action=%s&pid=%s&lang=%s" %s >%s</option>', sanitize_text_field( $_REQUEST['page'] ), 'edit', absint( $pID ), $language['language_code'], $selected, $language['native_name'] );
|
1245 |
}
|
1246 |
}
|
1247 |
echo $option_text ;
|
1251 |
</p>
|
1252 |
<div class="sib_form_translate">
|
1253 |
<p>
|
1254 |
+
<label><?php esc_attr_e( 'Translate this form', 'mailin' ); ?></label>
|
1255 |
</p>
|
1256 |
<table width="100%" class="sib_form_trans_table" style="border: 1px solid #8cceea;">
|
1257 |
<tr>
|
1286 |
$td = $href . '<img src="' . $img_src . '" style="margin:2px;"></a>';
|
1287 |
} else {
|
1288 |
$img_src = plugins_url( 'img/edit_translation.png', __FILE__ );
|
1289 |
+
$href = sprintf( '<a class="sib-form-redirect" href="?page=%s&action=%s&id=%s&pid=%s&lang=%s" style="width: 20px; text-align: center;padding: 2px 1px;">', sanitize_text_field( $_REQUEST['page'] ), 'edit', absint( $exist ), absint( $pID ), $language['language_code'] );
|
1290 |
$td = $href . '<img src="' . $img_src . '" style="margin:2px;"></a>';
|
1291 |
}
|
1292 |
}
|
1300 |
</div>
|
1301 |
<?php if ( isset( $_GET['pid'] ) ) { ?>
|
1302 |
<div class="sib-form-duplicate">
|
1303 |
+
<button class="btn btn-default sib-duplicate-btn"><?php esc_attr_e( 'Copy content from origin form', 'mailin' ); ?></button>
|
1304 |
<span class="sib-spin"><i
|
1305 |
class="fa fa-circle-o-notch fa-spin fa-lg"></i> </span>
|
1306 |
+
<i title="<?php echo esc_attr_e( 'Copy content from origin form', 'mailin' ); ?>"
|
1307 |
data-container="body" data-toggle="popover" data-placement="left"
|
1308 |
+
data-content="<?php echo esc_attr_e( 'You can copy contents from origin form. You need to translate the contents by this language.', 'mailin' ); ?>"
|
1309 |
data-html="true" class="fa fa-question-circle popover-help-form"></i>
|
1310 |
</div>
|
1311 |
<?php } ?>
|
widget/widget_form.php
CHANGED
@@ -35,7 +35,7 @@ class SIB_Widget_Subscribe extends WP_Widget {
|
|
35 |
if ( isset( $instance['widget_title'] ) && '' !== $instance['widget_title'] ) {
|
36 |
$widget_title = esc_attr( $instance['widget_title'] );
|
37 |
} else {
|
38 |
-
$widget_title = __( 'Sendinblue Newsletter', '
|
39 |
}
|
40 |
if ( isset( $instance['sib_form_list'] ) ) {
|
41 |
$sib_form_list = esc_attr( $instance['sib_form_list'] );
|
@@ -47,13 +47,13 @@ class SIB_Widget_Subscribe extends WP_Widget {
|
|
47 |
?>
|
48 |
<p>
|
49 |
<label for="<?php echo esc_attr( $this->get_field_id( 'widget_title' ) ); ?>">
|
50 |
-
<?php echo esc_attr_e( 'Widget Title', '
|
51 |
</label>
|
52 |
<input type="text" class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'widget_title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'widget_title' ) ); ?>" value="<?php echo esc_attr( $widget_title ); ?>" />
|
53 |
</p>
|
54 |
<p>
|
55 |
<label for="<?php echo esc_attr( $this->get_field_id( 'sib_form_list' ) ); ?>">
|
56 |
-
<?php echo esc_attr_e( 'Form to use', '
|
57 |
</label>
|
58 |
<select class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'sib_form_list' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'sib_form_list' ) ); ?>">
|
59 |
<?php
|
35 |
if ( isset( $instance['widget_title'] ) && '' !== $instance['widget_title'] ) {
|
36 |
$widget_title = esc_attr( $instance['widget_title'] );
|
37 |
} else {
|
38 |
+
$widget_title = __( 'Sendinblue Newsletter', 'mailin' );
|
39 |
}
|
40 |
if ( isset( $instance['sib_form_list'] ) ) {
|
41 |
$sib_form_list = esc_attr( $instance['sib_form_list'] );
|
47 |
?>
|
48 |
<p>
|
49 |
<label for="<?php echo esc_attr( $this->get_field_id( 'widget_title' ) ); ?>">
|
50 |
+
<?php echo esc_attr_e( 'Widget Title', 'mailin' ) . ':'; ?>
|
51 |
</label>
|
52 |
<input type="text" class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'widget_title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'widget_title' ) ); ?>" value="<?php echo esc_attr( $widget_title ); ?>" />
|
53 |
</p>
|
54 |
<p>
|
55 |
<label for="<?php echo esc_attr( $this->get_field_id( 'sib_form_list' ) ); ?>">
|
56 |
+
<?php echo esc_attr_e( 'Form to use', 'mailin' ) . ':'; ?>
|
57 |
</label>
|
58 |
<select class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'sib_form_list' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'sib_form_list' ) ); ?>">
|
59 |
<?php
|