Version Description
- New: Add support for GDPR fields (Age consent, terms of service and tracking option)
- Fix: Update text domain to match plugin slug.
- Tweak: Update translation functions and regenerate translations.
Download this release
Release Info
Developer | eherman24 |
Plugin | GoDaddy Email Marketing |
Version | 1.3.0 |
Comparing to | |
See all releases |
Code changes from version 1.2.1 to 1.3.0
- godaddy-email-marketing.php +25 -22
- includes/class-dispatcher.php +18 -17
- includes/class-shortcode.php +9 -9
- includes/render.php +98 -34
- includes/settings.php +112 -102
- includes/widget.php +23 -17
- js/gem.js +4 -0
- js/gem.min.js +1 -1
- languages/{godaddy-email-marketing-da_DK.mo → godaddy-email-marketing-sign-up-forms-da_DK.mo} +0 -0
- languages/{godaddy-email-marketing-de_DE.mo → godaddy-email-marketing-sign-up-forms-de_DE.mo} +0 -0
- languages/{godaddy-email-marketing-el.mo → godaddy-email-marketing-sign-up-forms-el.mo} +0 -0
- languages/{godaddy-email-marketing-es_ES.mo → godaddy-email-marketing-sign-up-forms-es_ES.mo} +0 -0
- languages/{godaddy-email-marketing-es_MX.mo → godaddy-email-marketing-sign-up-forms-es_MX.mo} +0 -0
- languages/{godaddy-email-marketing-fi.mo → godaddy-email-marketing-sign-up-forms-fi.mo} +0 -0
- languages/{godaddy-email-marketing-fr_FR.mo → godaddy-email-marketing-sign-up-forms-fr_FR.mo} +0 -0
- languages/{godaddy-email-marketing-hi_IN.mo → godaddy-email-marketing-sign-up-forms-hi_IN.mo} +0 -0
- languages/{godaddy-email-marketing-id_ID.mo → godaddy-email-marketing-sign-up-forms-id_ID.mo} +0 -0
- languages/{godaddy-email-marketing-it_IT.mo → godaddy-email-marketing-sign-up-forms-it_IT.mo} +0 -0
- languages/{godaddy-email-marketing-ja.mo → godaddy-email-marketing-sign-up-forms-ja.mo} +0 -0
- languages/{godaddy-email-marketing-ko_KR.mo → godaddy-email-marketing-sign-up-forms-ko_KR.mo} +0 -0
- languages/{godaddy-email-marketing-mr.mo → godaddy-email-marketing-sign-up-forms-mr.mo} +0 -0
- languages/{godaddy-email-marketing-ms_MY.mo → godaddy-email-marketing-sign-up-forms-ms_MY.mo} +0 -0
- languages/{godaddy-email-marketing-nb_NO.mo → godaddy-email-marketing-sign-up-forms-nb_NO.mo} +0 -0
- languages/{godaddy-email-marketing-nl_NL.mo → godaddy-email-marketing-sign-up-forms-nl_NL.mo} +0 -0
- languages/{godaddy-email-marketing-pl_PL.mo → godaddy-email-marketing-sign-up-forms-pl_PL.mo} +0 -0
- languages/{godaddy-email-marketing-pt_BR.mo → godaddy-email-marketing-sign-up-forms-pt_BR.mo} +0 -0
- languages/{godaddy-email-marketing-pt_PT.mo → godaddy-email-marketing-sign-up-forms-pt_PT.mo} +0 -0
- languages/{godaddy-email-marketing-ru_RU.mo → godaddy-email-marketing-sign-up-forms-ru_RU.mo} +0 -0
- languages/{godaddy-email-marketing-sv_SE.mo → godaddy-email-marketing-sign-up-forms-sv_SE.mo} +0 -0
- languages/{godaddy-email-marketing-th.mo → godaddy-email-marketing-sign-up-forms-th.mo} +0 -0
- languages/{godaddy-email-marketing-tl.mo → godaddy-email-marketing-sign-up-forms-tl.mo} +0 -0
- languages/{godaddy-email-marketing-tr_TR.mo → godaddy-email-marketing-sign-up-forms-tr_TR.mo} +0 -0
- languages/{godaddy-email-marketing-uk.mo → godaddy-email-marketing-sign-up-forms-uk.mo} +0 -0
- languages/{godaddy-email-marketing-vi.mo → godaddy-email-marketing-sign-up-forms-vi.mo} +0 -0
- languages/{godaddy-email-marketing-zh_CN.mo → godaddy-email-marketing-sign-up-forms-zh_CN.mo} +0 -0
- languages/{godaddy-email-marketing-zh_HK.mo → godaddy-email-marketing-sign-up-forms-zh_HK.mo} +0 -0
- languages/{godaddy-email-marketing-zh_TW.mo → godaddy-email-marketing-sign-up-forms-zh_TW.mo} +0 -0
- languages/{godaddy-email-marketing.pot → godaddy-email-marketing-sign-up-forms.pot} +110 -104
- readme.txt +7 -2
godaddy-email-marketing.php
CHANGED
@@ -3,12 +3,12 @@
|
|
3 |
* Plugin Name: GoDaddy Email Marketing
|
4 |
* Plugin URI: https://gem.godaddy.com/
|
5 |
* Description: Add the GoDaddy Email Marketing signup form to your WordPress site! Easy to set up, the plugin allows your site visitors to subscribe to your email lists.
|
6 |
-
* Version: 1.
|
7 |
* Author: GoDaddy
|
8 |
* Author URI: https://gem.godaddy.com/
|
9 |
* License: GPL-2.0
|
10 |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
-
* Text Domain: godaddy-email-marketing
|
12 |
* Domain Path: /languages
|
13 |
*
|
14 |
* This plugin, like WordPress, is licensed under the GPL.
|
@@ -76,14 +76,14 @@ class GEM_Official {
|
|
76 |
*/
|
77 |
private function setup_actions() {
|
78 |
add_action( 'plugins_loaded', array( $this, 'i18n' ) );
|
79 |
-
add_action( 'init',
|
80 |
-
add_action( 'widgets_init',
|
81 |
-
add_action( 'init',
|
82 |
-
add_action( 'admin_notices',
|
83 |
|
84 |
add_filter( 'plugin_action_links_' . self::$basename, array( $this, 'action_links' ), 10 );
|
85 |
|
86 |
-
register_activation_hook( __FILE__,
|
87 |
register_deactivation_hook( __FILE__, array( $this, 'deactivate' ) );
|
88 |
}
|
89 |
|
@@ -108,10 +108,10 @@ class GEM_Official {
|
|
108 |
|
109 |
// Plugin's main directory.
|
110 |
defined( 'GEM_VERSION' )
|
111 |
-
or define( 'GEM_VERSION', '1.
|
112 |
|
113 |
// Set up the base name.
|
114 |
-
isset( self::$basename )
|
115 |
}
|
116 |
|
117 |
/**
|
@@ -142,7 +142,7 @@ class GEM_Official {
|
|
142 |
* Load translations.
|
143 |
*/
|
144 |
public function i18n() {
|
145 |
-
load_plugin_textdomain( 'godaddy-email-marketing', false, basename( dirname( self::$basename ) ) . '/languages' );
|
146 |
}
|
147 |
|
148 |
/**
|
@@ -198,11 +198,12 @@ class GEM_Official {
|
|
198 |
|
199 |
// Help strings.
|
200 |
wp_localize_script( 'gem-main', 'GEM', array(
|
201 |
-
'thankyou'
|
202 |
-
'thankyou_suppressed' => __( 'Thank you for signing up! Please check your email to confirm your subscription.', 'godaddy-email-marketing' ),
|
203 |
-
'oops'
|
204 |
-
'email'
|
205 |
-
|
|
|
206 |
) );
|
207 |
}
|
208 |
|
@@ -216,7 +217,7 @@ class GEM_Official {
|
|
216 |
public function action_links( $actions ) {
|
217 |
return array_merge(
|
218 |
array(
|
219 |
-
'settings' => sprintf( '<a href="%s">%s</a>', menu_page_url( 'gem-settings', false ), __( 'Settings', 'godaddy-email-marketing' ) ),
|
220 |
),
|
221 |
$actions
|
222 |
);
|
@@ -246,8 +247,9 @@ class GEM_Official {
|
|
246 |
<p>
|
247 |
<?php
|
248 |
printf(
|
249 |
-
|
250 |
-
|
|
|
251 |
);
|
252 |
?>
|
253 |
</p>
|
@@ -264,16 +266,17 @@ class GEM_Official {
|
|
264 |
return;
|
265 |
}
|
266 |
|
267 |
-
$version
|
268 |
$settings = get_option( 'gem-settings' );
|
269 |
|
270 |
if ( ! $version && ( empty( $settings['username'] ) || empty( $settings['api-key'] ) ) ) {
|
271 |
-
update_option( 'gem-version', GEM_VERSION );
|
|
|
272 |
|
273 |
<div class="updated fade">
|
274 |
<p>
|
275 |
-
<strong><?php esc_html_e( 'GoDaddy Email Marketing is almost ready.', 'godaddy-email-marketing' ); ?></strong> <?php esc_html_e( 'You must enter your username & API key for it to work.', 'godaddy-email-marketing' ); ?>
|
276 |
-
<a class="button" href="<?php menu_page_url( 'gem-settings' ); ?>"><?php esc_html_e( "Let's do it!", 'godaddy-email-marketing' ); ?></a>
|
277 |
</p>
|
278 |
</div>
|
279 |
|
3 |
* Plugin Name: GoDaddy Email Marketing
|
4 |
* Plugin URI: https://gem.godaddy.com/
|
5 |
* Description: Add the GoDaddy Email Marketing signup form to your WordPress site! Easy to set up, the plugin allows your site visitors to subscribe to your email lists.
|
6 |
+
* Version: 1.3.0
|
7 |
* Author: GoDaddy
|
8 |
* Author URI: https://gem.godaddy.com/
|
9 |
* License: GPL-2.0
|
10 |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
+
* Text Domain: godaddy-email-marketing-sign-up-forms
|
12 |
* Domain Path: /languages
|
13 |
*
|
14 |
* This plugin, like WordPress, is licensed under the GPL.
|
76 |
*/
|
77 |
private function setup_actions() {
|
78 |
add_action( 'plugins_loaded', array( $this, 'i18n' ) );
|
79 |
+
add_action( 'init', array( $this, 'init' ) );
|
80 |
+
add_action( 'widgets_init', array( $this, 'register_widget' ) );
|
81 |
+
add_action( 'init', array( $this, 'register_shortcode' ), 20 );
|
82 |
+
add_action( 'admin_notices', array( $this, 'action_admin_notices' ) );
|
83 |
|
84 |
add_filter( 'plugin_action_links_' . self::$basename, array( $this, 'action_links' ), 10 );
|
85 |
|
86 |
+
register_activation_hook( __FILE__, array( $this, 'activate' ) );
|
87 |
register_deactivation_hook( __FILE__, array( $this, 'deactivate' ) );
|
88 |
}
|
89 |
|
108 |
|
109 |
// Plugin's main directory.
|
110 |
defined( 'GEM_VERSION' )
|
111 |
+
or define( 'GEM_VERSION', '1.3.0' );
|
112 |
|
113 |
// Set up the base name.
|
114 |
+
self::$basename = isset( self::$basename ) ? self::$basename : plugin_basename( __FILE__ );
|
115 |
}
|
116 |
|
117 |
/**
|
142 |
* Load translations.
|
143 |
*/
|
144 |
public function i18n() {
|
145 |
+
load_plugin_textdomain( 'godaddy-email-marketing-sign-up-forms', false, basename( dirname( self::$basename ) ) . '/languages' );
|
146 |
}
|
147 |
|
148 |
/**
|
198 |
|
199 |
// Help strings.
|
200 |
wp_localize_script( 'gem-main', 'GEM', array(
|
201 |
+
'thankyou' => __( 'Thank you for signing up!', 'godaddy-email-marketing-sign-up-forms' ),
|
202 |
+
'thankyou_suppressed' => __( 'Thank you for signing up! Please check your email to confirm your subscription.', 'godaddy-email-marketing-sign-up-forms' ),
|
203 |
+
'oops' => __( 'Oops! There was a problem. Please try again.', 'godaddy-email-marketing-sign-up-forms' ),
|
204 |
+
'email' => __( 'Please enter a valid email address.', 'godaddy-email-marketing-sign-up-forms' ),
|
205 |
+
/* translators: %s: Name of required field */
|
206 |
+
'required' => __( '%s is a required field.', 'godaddy-email-marketing-sign-up-forms' ),
|
207 |
) );
|
208 |
}
|
209 |
|
217 |
public function action_links( $actions ) {
|
218 |
return array_merge(
|
219 |
array(
|
220 |
+
'settings' => sprintf( '<a href="%s">%s</a>', menu_page_url( 'gem-settings', false ), __( 'Settings', 'godaddy-email-marketing-sign-up-forms' ) ),
|
221 |
),
|
222 |
$actions
|
223 |
);
|
247 |
<p>
|
248 |
<?php
|
249 |
printf(
|
250 |
+
/* translators: %1$s: Link to plugin settings page with text 'Learn More'. */
|
251 |
+
__( 'Your website has a superpower: Email marketing. %1$s.', 'godaddy-email-marketing-sign-up-forms' ),
|
252 |
+
'<a href="' . admin_url( 'options-general.php?page=gem-settings' ) . '">' . __( 'Learn More', 'godaddy-email-marketing-sign-up-forms' ) . '</a>'
|
253 |
);
|
254 |
?>
|
255 |
</p>
|
266 |
return;
|
267 |
}
|
268 |
|
269 |
+
$version = get_option( 'gem-version' );
|
270 |
$settings = get_option( 'gem-settings' );
|
271 |
|
272 |
if ( ! $version && ( empty( $settings['username'] ) || empty( $settings['api-key'] ) ) ) {
|
273 |
+
update_option( 'gem-version', GEM_VERSION );
|
274 |
+
?>
|
275 |
|
276 |
<div class="updated fade">
|
277 |
<p>
|
278 |
+
<strong><?php esc_html_e( 'GoDaddy Email Marketing is almost ready.', 'godaddy-email-marketing-sign-up-forms' ); ?></strong> <?php esc_html_e( 'You must enter your username & API key for it to work.', 'godaddy-email-marketing-sign-up-forms' ); ?>
|
279 |
+
<a class="button" href="<?php menu_page_url( 'gem-settings' ); ?>"><?php esc_html_e( "Let's do it!", 'godaddy-email-marketing-sign-up-forms' ); ?></a>
|
280 |
</p>
|
281 |
</div>
|
282 |
|
includes/class-dispatcher.php
CHANGED
@@ -83,14 +83,14 @@ class GEM_Dispatcher {
|
|
83 |
|
84 |
// Prepare the URL that includes our credentials.
|
85 |
$response = wp_remote_post( self::get_api_base_url( 'api/v3/signupForms' ), array(
|
86 |
-
'method'
|
87 |
'timeout' => 10,
|
88 |
-
'body'
|
89 |
-
'username'
|
90 |
-
'api_key'
|
91 |
-
'name'
|
92 |
-
'integration'
|
93 |
-
'hidden'
|
94 |
'subscriberListName' => 'WordPress',
|
95 |
),
|
96 |
) );
|
@@ -114,8 +114,8 @@ class GEM_Dispatcher {
|
|
114 |
if ( ! $username ) {
|
115 |
return false;
|
116 |
}
|
117 |
-
|
118 |
-
if ( false ===
|
119 |
$data = self::fetch_forms();
|
120 |
}
|
121 |
|
@@ -129,7 +129,8 @@ class GEM_Dispatcher {
|
|
129 |
* @return false|object The form fields JSON object or false.
|
130 |
*/
|
131 |
public static function get_fields( $form_id ) {
|
132 |
-
|
|
|
133 |
|
134 |
// Fields are not cached. fetch and cache.
|
135 |
$response = wp_remote_get( self::get_method_url( 'fields', array(
|
@@ -160,9 +161,9 @@ class GEM_Dispatcher {
|
|
160 |
if ( ! $username ) {
|
161 |
return false;
|
162 |
}
|
163 |
-
|
164 |
-
if ( false ===
|
165 |
-
$data
|
166 |
$request = wp_remote_get( self::get_method_url( 'account' ) );
|
167 |
|
168 |
// If the request has failed for whatever reason.
|
@@ -219,20 +220,20 @@ class GEM_Dispatcher {
|
|
219 |
public static function get_method_url( $method, $params = array(), $auth = false ) {
|
220 |
$auth = $auth ? $auth : array(
|
221 |
'username' => GEM_Settings_Controls::get_option( 'username' ),
|
222 |
-
'api_key'
|
223 |
);
|
224 |
|
225 |
$path = '';
|
226 |
|
227 |
switch ( $method ) {
|
228 |
|
229 |
-
case 'forms'
|
230 |
$path = add_query_arg( $auth, 'signups.json' );
|
231 |
break;
|
232 |
-
case 'fields'
|
233 |
$path = add_query_arg( $auth, 'signups/' . $params['id'] . '.json' );
|
234 |
break;
|
235 |
-
case 'account'
|
236 |
$path = add_query_arg( $auth, 'user/account_status' );
|
237 |
break;
|
238 |
}
|
83 |
|
84 |
// Prepare the URL that includes our credentials.
|
85 |
$response = wp_remote_post( self::get_api_base_url( 'api/v3/signupForms' ), array(
|
86 |
+
'method' => 'POST',
|
87 |
'timeout' => 10,
|
88 |
+
'body' => array(
|
89 |
+
'username' => $username,
|
90 |
+
'api_key' => $api_key,
|
91 |
+
'name' => 'Signup Form',
|
92 |
+
'integration' => 'WordPress',
|
93 |
+
'hidden' => false,
|
94 |
'subscriberListName' => 'WordPress',
|
95 |
),
|
96 |
) );
|
114 |
if ( ! $username ) {
|
115 |
return false;
|
116 |
}
|
117 |
+
$data = get_transient( 'gem-' . $username . '-lists' );
|
118 |
+
if ( false === $data ) {
|
119 |
$data = self::fetch_forms();
|
120 |
}
|
121 |
|
129 |
* @return false|object The form fields JSON object or false.
|
130 |
*/
|
131 |
public static function get_fields( $form_id ) {
|
132 |
+
$data = get_transient( 'gem-form-' . $form_id );
|
133 |
+
if ( false === $data ) {
|
134 |
|
135 |
// Fields are not cached. fetch and cache.
|
136 |
$response = wp_remote_get( self::get_method_url( 'fields', array(
|
161 |
if ( ! $username ) {
|
162 |
return false;
|
163 |
}
|
164 |
+
$data = get_transient( 'gem-' . $username . '-account' );
|
165 |
+
if ( false === $data ) {
|
166 |
+
$data = false;
|
167 |
$request = wp_remote_get( self::get_method_url( 'account' ) );
|
168 |
|
169 |
// If the request has failed for whatever reason.
|
220 |
public static function get_method_url( $method, $params = array(), $auth = false ) {
|
221 |
$auth = $auth ? $auth : array(
|
222 |
'username' => GEM_Settings_Controls::get_option( 'username' ),
|
223 |
+
'api_key' => GEM_Settings_Controls::get_option( 'api-key' ),
|
224 |
);
|
225 |
|
226 |
$path = '';
|
227 |
|
228 |
switch ( $method ) {
|
229 |
|
230 |
+
case 'forms':
|
231 |
$path = add_query_arg( $auth, 'signups.json' );
|
232 |
break;
|
233 |
+
case 'fields':
|
234 |
$path = add_query_arg( $auth, 'signups/' . $params['id'] . '.json' );
|
235 |
break;
|
236 |
+
case 'account':
|
237 |
$path = add_query_arg( $auth, 'user/account_status' );
|
238 |
break;
|
239 |
}
|
includes/class-shortcode.php
CHANGED
@@ -20,15 +20,15 @@ class GEM_Shortcode {
|
|
20 |
* @return string|void
|
21 |
*/
|
22 |
public function render( $atts ) {
|
23 |
-
|
24 |
'id' => false,
|
25 |
-
), $atts )
|
26 |
|
27 |
-
if ( ! $id ) {
|
28 |
return;
|
29 |
}
|
30 |
|
31 |
-
return gem_form( $id, false );
|
32 |
}
|
33 |
|
34 |
/**
|
@@ -47,12 +47,12 @@ class GEM_Shortcode {
|
|
47 |
reset( $options );
|
48 |
|
49 |
$args = array(
|
50 |
-
'label'
|
51 |
'listItemImage' => 'dashicons-feedback',
|
52 |
-
'attrs'
|
53 |
array(
|
54 |
-
'label' => esc_html__( 'Signup Forms', 'godaddy-email-marketing' ),
|
55 |
-
'description' => esc_html__( 'Choose one of the available forms.', 'godaddy-email-marketing' ),
|
56 |
'attr' => 'id',
|
57 |
'encode' => false,
|
58 |
'type' => 'select',
|
@@ -81,7 +81,7 @@ class GEM_Shortcode {
|
|
81 |
function gem_form( $id, $echo = true ) {
|
82 |
if ( class_exists( 'GEM_Form_Renderer', false ) ) {
|
83 |
$renderer = new GEM_Form_Renderer();
|
84 |
-
$form
|
85 |
|
86 |
if ( ! $echo ) {
|
87 |
return $form;
|
20 |
* @return string|void
|
21 |
*/
|
22 |
public function render( $atts ) {
|
23 |
+
$atts = shortcode_atts( array(
|
24 |
'id' => false,
|
25 |
+
), $atts );
|
26 |
|
27 |
+
if ( ! $atts['id'] ) {
|
28 |
return;
|
29 |
}
|
30 |
|
31 |
+
return gem_form( $atts['id'], false );
|
32 |
}
|
33 |
|
34 |
/**
|
47 |
reset( $options );
|
48 |
|
49 |
$args = array(
|
50 |
+
'label' => esc_html__( 'GoDaddy Email Marketing', 'godaddy-email-marketing-sign-up-forms' ),
|
51 |
'listItemImage' => 'dashicons-feedback',
|
52 |
+
'attrs' => array(
|
53 |
array(
|
54 |
+
'label' => esc_html__( 'Signup Forms', 'godaddy-email-marketing-sign-up-forms' ),
|
55 |
+
'description' => esc_html__( 'Choose one of the available forms.', 'godaddy-email-marketing-sign-up-forms' ),
|
56 |
'attr' => 'id',
|
57 |
'encode' => false,
|
58 |
'type' => 'select',
|
81 |
function gem_form( $id, $echo = true ) {
|
82 |
if ( class_exists( 'GEM_Form_Renderer', false ) ) {
|
83 |
$renderer = new GEM_Form_Renderer();
|
84 |
+
$form = $renderer->process( $id, false );
|
85 |
|
86 |
if ( ! $echo ) {
|
87 |
return $form;
|
includes/render.php
CHANGED
@@ -28,8 +28,8 @@ class GEM_Form_Renderer {
|
|
28 |
* @return string
|
29 |
*/
|
30 |
public function process( $form_id, $echo = false ) {
|
31 |
-
$form
|
32 |
-
$forms
|
33 |
$form_ids = array();
|
34 |
|
35 |
if ( ! empty( $forms->signups ) ) {
|
@@ -63,12 +63,16 @@ class GEM_Form_Renderer {
|
|
63 |
<span class="gem-spinner"></span>
|
64 |
</p>
|
65 |
|
66 |
-
<?php
|
67 |
|
68 |
-
|
|
|
|
|
|
|
|
|
69 |
|
70 |
<p>
|
71 |
-
<a href="https://www.godaddy.com/online-marketing/email-marketing" rel="nofollow" target="_blank"><?php esc_html_e( 'Powered by GoDaddy', 'godaddy-email-marketing' ); ?></a>
|
72 |
</p>
|
73 |
|
74 |
<?php endif; ?>
|
@@ -76,7 +80,9 @@ class GEM_Form_Renderer {
|
|
76 |
</form>
|
77 |
</div>
|
78 |
|
79 |
-
<?php
|
|
|
|
|
80 |
|
81 |
if ( $echo ) {
|
82 |
echo $output; // xss ok
|
@@ -116,6 +122,10 @@ class GEM_Form_Fields {
|
|
116 |
self::$cycle = absint( $cycle );
|
117 |
|
118 |
if ( ! is_null( $field->field_type ) ) {
|
|
|
|
|
|
|
|
|
119 |
call_user_func( array( __CLASS__, $field->field_type ), $field );
|
120 |
} else {
|
121 |
call_user_func( array( __CLASS__, $field->type ), $field );
|
@@ -176,6 +186,7 @@ class GEM_Form_Fields {
|
|
176 |
* @param array $args Settings field arguments.
|
177 |
*/
|
178 |
public static function checkbox( $args ) {
|
|
|
179 |
$field_classes = array( 'gem-checkbox' );
|
180 |
|
181 |
// Is this field required?
|
@@ -188,7 +199,7 @@ class GEM_Form_Fields {
|
|
188 |
|
189 |
<label for="<?php echo esc_attr( self::get_form_id( $args->name ) . $args->value ); ?>">
|
190 |
|
191 |
-
<input type="checkbox" value="<?php echo esc_attr( $args->value ); ?>" name="<?php echo esc_attr( $args->name ); ?>" id="<?php echo esc_attr( self::get_form_id( $args->name ) . $args->value ); ?>" class="<?php echo esc_attr( join( ' ', $field_classes ) ); ?>" />
|
192 |
|
193 |
<?php echo esc_html( $args->display ); ?>
|
194 |
|
@@ -220,16 +231,17 @@ class GEM_Form_Fields {
|
|
220 |
|
221 |
<?php
|
222 |
$trim_values = array( '[', ']' );
|
223 |
-
$options
|
224 |
foreach ( $trim_values as $trim ) {
|
225 |
$options = trim( $options, $trim );
|
226 |
}
|
227 |
|
228 |
$trimmed_options = array();
|
229 |
-
$options
|
230 |
$trimmed_options = explode( ',', $options );
|
231 |
|
232 |
-
foreach ( $trimmed_options as $key => $value ) :
|
|
|
233 |
<input type="checkbox" data-id="<?php echo esc_attr( self::get_form_id( $args->name ) ); ?>" data-name="<?php echo esc_attr( $args->name ); ?>" value="<?php echo esc_attr( $value ); ?>" /> <?php echo esc_attr( $value ); ?><br>
|
234 |
<?php endforeach; ?>
|
235 |
|
@@ -255,16 +267,18 @@ class GEM_Form_Fields {
|
|
255 |
</br>
|
256 |
<select id="<?php echo esc_attr( self::get_form_id( $args->name ) ); ?>" name="<?php echo esc_attr( $args->name ); ?>" class="<?php echo $args->required ? 'gem-required' : ''; ?>" data-label="<?php echo esc_attr( $args->display ); ?>">
|
257 |
|
258 |
-
<?php
|
259 |
-
$
|
|
|
260 |
foreach ( $trim_values as $trim ) {
|
261 |
$options = trim( $options, $trim );
|
262 |
}
|
263 |
$trimmed_options = array();
|
264 |
-
$options
|
265 |
$trimmed_options = explode( ',', $options );
|
266 |
|
267 |
-
foreach ( $trimmed_options as $dropdown_options ) :
|
|
|
268 |
<option value="<?php echo esc_attr( $dropdown_options ); ?>"> <?php echo esc_html( $dropdown_options ); ?><br>
|
269 |
<?php endforeach; ?>
|
270 |
</select>
|
@@ -288,19 +302,22 @@ class GEM_Form_Fields {
|
|
288 |
</label>
|
289 |
</br>
|
290 |
|
291 |
-
<?php
|
292 |
-
$
|
|
|
293 |
foreach ( $trim_values as $trim ) {
|
294 |
$options = trim( $options, $trim );
|
295 |
}
|
296 |
|
297 |
$trimmed_options = array();
|
298 |
-
$options
|
299 |
$trimmed_options = explode( ',', $options );
|
300 |
|
301 |
-
foreach ( $trimmed_options as $key => $value ) :
|
|
|
302 |
<input type="radio" id="<?php echo esc_attr( self::get_form_id( $args->name ) ); ?>" name="<?php echo esc_attr( $args->name ); ?>" value="<?php echo esc_attr( $value ); ?>" /> <?php echo esc_html( $value ); ?><br>
|
303 |
-
|
|
|
304 |
}
|
305 |
|
306 |
/**
|
@@ -323,24 +340,24 @@ class GEM_Form_Fields {
|
|
323 |
|
324 |
<span class="third">
|
325 |
<select fingerprint="date" data-id="<?php echo esc_attr( self::get_form_id( $args->name ) ); ?>" data-name="<?php echo esc_attr( $args->name ); ?>">
|
326 |
-
<option value=""> <?php esc_html_e( 'Month', 'godaddy-email-marketing' ) ?> </option>
|
327 |
-
<option value="<?php esc_attr_e( 'January', 'godaddy-email-marketing' ) ?>"> <?php esc_html_e( 'January', 'godaddy-email-marketing' ) ?> </option>
|
328 |
-
<option value="<?php esc_attr_e( 'Febuary', 'godaddy-email-marketing' ) ?>"> <?php esc_html_e( 'Febuary', 'godaddy-email-marketing' ) ?> </option>
|
329 |
-
<option value="<?php esc_attr_e( 'March', 'godaddy-email-marketing' ) ?>"> <?php esc_html_e( 'March', 'godaddy-email-marketing' ) ?> </option>
|
330 |
-
<option value="<?php esc_attr_e( 'April', 'godaddy-email-marketing' ) ?>"> <?php esc_html_e( 'April', 'godaddy-email-marketing' ) ?> </option>
|
331 |
-
<option value="<?php esc_attr_e( 'May', 'godaddy-email-marketing' ) ?>"> <?php esc_html_e( 'May', 'godaddy-email-marketing' ) ?> </option>
|
332 |
-
<option value="<?php esc_attr_e( 'June', 'godaddy-email-marketing' ) ?>"> <?php esc_html_e( 'June', 'godaddy-email-marketing' ) ?> </option>
|
333 |
-
<option value="<?php esc_attr_e( 'July', 'godaddy-email-marketing' ) ?>"> <?php esc_html_e( 'July', 'godaddy-email-marketing' ) ?> </option>
|
334 |
-
<option value="<?php esc_attr_e( 'August', 'godaddy-email-marketing' ) ?>"> <?php esc_html_e( 'August', 'godaddy-email-marketing' ) ?> </option>
|
335 |
-
<option value="<?php esc_attr_e( 'September', 'godaddy-email-marketing' ) ?>"> <?php esc_html_e( 'September', 'godaddy-email-marketing' ) ?> </option>
|
336 |
-
<option value="<?php esc_attr_e( 'October', 'godaddy-email-marketing' ) ?>"> <?php esc_html_e( 'October', 'godaddy-email-marketing' ) ?> </option>
|
337 |
-
<option value="<?php esc_attr_e( 'November', 'godaddy-email-marketing' ) ?>"> <?php esc_html_e( 'November', 'godaddy-email-marketing' ) ?> </option>
|
338 |
-
<option value="<?php esc_attr_e( 'December', 'godaddy-email-marketing' ) ?>"> <?php esc_html_e( 'December', 'godaddy-email-marketing' ) ?> </option>
|
339 |
</select>
|
340 |
</span>
|
341 |
<span class="third">
|
342 |
<select fingerprint="date" data-id="<?php echo esc_attr( self::get_form_id( $args->name ) ); ?>" data-name="<?php echo esc_attr( $args->name ); ?>">
|
343 |
-
<option value=""> <?php esc_html_e( 'Day', 'godaddy-email-marketing' ) ?> </option>
|
344 |
<?php for ( $i = 1; $i < 32; $i++ ) : ?>
|
345 |
<option value="<?php echo strlen( $i ) < 2 ? '0' . esc_attr( $i ) : esc_attr( $i ); ?>"> <?php echo esc_attr( $i ); ?> </option>
|
346 |
<?php endfor; ?>
|
@@ -348,7 +365,7 @@ class GEM_Form_Fields {
|
|
348 |
</span>
|
349 |
<span class="third">
|
350 |
<select fingerprint="date" data-id="<?php echo esc_attr( self::get_form_id( $args->name ) ); ?>" data-name="<?php echo esc_attr( $args->name ); ?>">
|
351 |
-
<option value=""> <?php esc_html_e( 'Year', 'godaddy-email-marketing' ) ?> </option>
|
352 |
<?php for ( $x = $current_year + 5 ; $x > $current_year - 81 ; $x-- ) : ?>
|
353 |
<option value="<?php echo absint( $x ); ?>"> <?php echo absint( $x ); ?> </option>
|
354 |
<?php endfor; ?>
|
@@ -390,4 +407,51 @@ class GEM_Form_Fields {
|
|
390 |
|
391 |
<?php
|
392 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
393 |
}
|
28 |
* @return string
|
29 |
*/
|
30 |
public function process( $form_id, $echo = false ) {
|
31 |
+
$form = GEM_Dispatcher::get_fields( (int) $form_id );
|
32 |
+
$forms = GEM_Dispatcher::get_forms();
|
33 |
$form_ids = array();
|
34 |
|
35 |
if ( ! empty( $forms->signups ) ) {
|
63 |
<span class="gem-spinner"></span>
|
64 |
</p>
|
65 |
|
66 |
+
<?php
|
67 |
|
68 |
+
$show_powered_by = GEM_Settings_Controls::get_option( 'display_powered_by' ) ? true : false;
|
69 |
+
|
70 |
+
if ( $show_powered_by ) :
|
71 |
+
|
72 |
+
?>
|
73 |
|
74 |
<p>
|
75 |
+
<a href="https://www.godaddy.com/online-marketing/email-marketing" rel="nofollow" target="_blank"><?php esc_html_e( 'Powered by GoDaddy', 'godaddy-email-marketing-sign-up-forms' ); ?></a>
|
76 |
</p>
|
77 |
|
78 |
<?php endif; ?>
|
80 |
</form>
|
81 |
</div>
|
82 |
|
83 |
+
<?php
|
84 |
+
|
85 |
+
$output = ob_get_clean();
|
86 |
|
87 |
if ( $echo ) {
|
88 |
echo $output; // xss ok
|
122 |
self::$cycle = absint( $cycle );
|
123 |
|
124 |
if ( ! is_null( $field->field_type ) ) {
|
125 |
+
$field = self::adjust_field_type( $field );
|
126 |
+
if ( ! method_exists( __CLASS__, $field->field_type ) ) {
|
127 |
+
return;
|
128 |
+
}
|
129 |
call_user_func( array( __CLASS__, $field->field_type ), $field );
|
130 |
} else {
|
131 |
call_user_func( array( __CLASS__, $field->type ), $field );
|
186 |
* @param array $args Settings field arguments.
|
187 |
*/
|
188 |
public static function checkbox( $args ) {
|
189 |
+
|
190 |
$field_classes = array( 'gem-checkbox' );
|
191 |
|
192 |
// Is this field required?
|
199 |
|
200 |
<label for="<?php echo esc_attr( self::get_form_id( $args->name ) . $args->value ); ?>">
|
201 |
|
202 |
+
<input type="checkbox" value="<?php echo esc_attr( $args->value ); ?>" name="<?php echo esc_attr( $args->name ); ?>" id="<?php echo esc_attr( self::get_form_id( $args->name ) . $args->value ); ?>" class="<?php echo esc_attr( join( ' ', $field_classes ) ); ?>" data-label="<?php echo esc_attr( $args->display ); ?>" />
|
203 |
|
204 |
<?php echo esc_html( $args->display ); ?>
|
205 |
|
231 |
|
232 |
<?php
|
233 |
$trim_values = array( '[', ']' );
|
234 |
+
$options = $args->options;
|
235 |
foreach ( $trim_values as $trim ) {
|
236 |
$options = trim( $options, $trim );
|
237 |
}
|
238 |
|
239 |
$trimmed_options = array();
|
240 |
+
$options = str_replace( '"', '', $options );
|
241 |
$trimmed_options = explode( ',', $options );
|
242 |
|
243 |
+
foreach ( $trimmed_options as $key => $value ) :
|
244 |
+
?>
|
245 |
<input type="checkbox" data-id="<?php echo esc_attr( self::get_form_id( $args->name ) ); ?>" data-name="<?php echo esc_attr( $args->name ); ?>" value="<?php echo esc_attr( $value ); ?>" /> <?php echo esc_attr( $value ); ?><br>
|
246 |
<?php endforeach; ?>
|
247 |
|
267 |
</br>
|
268 |
<select id="<?php echo esc_attr( self::get_form_id( $args->name ) ); ?>" name="<?php echo esc_attr( $args->name ); ?>" class="<?php echo $args->required ? 'gem-required' : ''; ?>" data-label="<?php echo esc_attr( $args->display ); ?>">
|
269 |
|
270 |
+
<?php
|
271 |
+
$trim_values = array( '[', ']' );
|
272 |
+
$options = $args->options;
|
273 |
foreach ( $trim_values as $trim ) {
|
274 |
$options = trim( $options, $trim );
|
275 |
}
|
276 |
$trimmed_options = array();
|
277 |
+
$options = str_replace( '"', '', $options );
|
278 |
$trimmed_options = explode( ',', $options );
|
279 |
|
280 |
+
foreach ( $trimmed_options as $dropdown_options ) :
|
281 |
+
?>
|
282 |
<option value="<?php echo esc_attr( $dropdown_options ); ?>"> <?php echo esc_html( $dropdown_options ); ?><br>
|
283 |
<?php endforeach; ?>
|
284 |
</select>
|
302 |
</label>
|
303 |
</br>
|
304 |
|
305 |
+
<?php
|
306 |
+
$trim_values = array( '[', ']' );
|
307 |
+
$options = $args->options;
|
308 |
foreach ( $trim_values as $trim ) {
|
309 |
$options = trim( $options, $trim );
|
310 |
}
|
311 |
|
312 |
$trimmed_options = array();
|
313 |
+
$options = str_replace( '"', '', $options );
|
314 |
$trimmed_options = explode( ',', $options );
|
315 |
|
316 |
+
foreach ( $trimmed_options as $key => $value ) :
|
317 |
+
?>
|
318 |
<input type="radio" id="<?php echo esc_attr( self::get_form_id( $args->name ) ); ?>" name="<?php echo esc_attr( $args->name ); ?>" value="<?php echo esc_attr( $value ); ?>" /> <?php echo esc_html( $value ); ?><br>
|
319 |
+
<?php
|
320 |
+
endforeach;
|
321 |
}
|
322 |
|
323 |
/**
|
340 |
|
341 |
<span class="third">
|
342 |
<select fingerprint="date" data-id="<?php echo esc_attr( self::get_form_id( $args->name ) ); ?>" data-name="<?php echo esc_attr( $args->name ); ?>">
|
343 |
+
<option value=""> <?php esc_html_e( 'Month', 'godaddy-email-marketing-sign-up-forms' ); ?> </option>
|
344 |
+
<option value="<?php esc_attr_e( 'January', 'godaddy-email-marketing-sign-up-forms' ); ?>"> <?php esc_html_e( 'January', 'godaddy-email-marketing-sign-up-forms' ); ?> </option>
|
345 |
+
<option value="<?php esc_attr_e( 'Febuary', 'godaddy-email-marketing-sign-up-forms' ); ?>"> <?php esc_html_e( 'Febuary', 'godaddy-email-marketing-sign-up-forms' ); ?> </option>
|
346 |
+
<option value="<?php esc_attr_e( 'March', 'godaddy-email-marketing-sign-up-forms' ); ?>"> <?php esc_html_e( 'March', 'godaddy-email-marketing-sign-up-forms' ); ?> </option>
|
347 |
+
<option value="<?php esc_attr_e( 'April', 'godaddy-email-marketing-sign-up-forms' ); ?>"> <?php esc_html_e( 'April', 'godaddy-email-marketing-sign-up-forms' ); ?> </option>
|
348 |
+
<option value="<?php esc_attr_e( 'May', 'godaddy-email-marketing-sign-up-forms' ); ?>"> <?php esc_html_e( 'May', 'godaddy-email-marketing-sign-up-forms' ); ?> </option>
|
349 |
+
<option value="<?php esc_attr_e( 'June', 'godaddy-email-marketing-sign-up-forms' ); ?>"> <?php esc_html_e( 'June', 'godaddy-email-marketing-sign-up-forms' ); ?> </option>
|
350 |
+
<option value="<?php esc_attr_e( 'July', 'godaddy-email-marketing-sign-up-forms' ); ?>"> <?php esc_html_e( 'July', 'godaddy-email-marketing-sign-up-forms' ); ?> </option>
|
351 |
+
<option value="<?php esc_attr_e( 'August', 'godaddy-email-marketing-sign-up-forms' ); ?>"> <?php esc_html_e( 'August', 'godaddy-email-marketing-sign-up-forms' ); ?> </option>
|
352 |
+
<option value="<?php esc_attr_e( 'September', 'godaddy-email-marketing-sign-up-forms' ); ?>"> <?php esc_html_e( 'September', 'godaddy-email-marketing-sign-up-forms' ); ?> </option>
|
353 |
+
<option value="<?php esc_attr_e( 'October', 'godaddy-email-marketing-sign-up-forms' ); ?>"> <?php esc_html_e( 'October', 'godaddy-email-marketing-sign-up-forms' ); ?> </option>
|
354 |
+
<option value="<?php esc_attr_e( 'November', 'godaddy-email-marketing-sign-up-forms' ); ?>"> <?php esc_html_e( 'November', 'godaddy-email-marketing-sign-up-forms' ); ?> </option>
|
355 |
+
<option value="<?php esc_attr_e( 'December', 'godaddy-email-marketing-sign-up-forms' ); ?>"> <?php esc_html_e( 'December', 'godaddy-email-marketing-sign-up-forms' ); ?> </option>
|
356 |
</select>
|
357 |
</span>
|
358 |
<span class="third">
|
359 |
<select fingerprint="date" data-id="<?php echo esc_attr( self::get_form_id( $args->name ) ); ?>" data-name="<?php echo esc_attr( $args->name ); ?>">
|
360 |
+
<option value=""> <?php esc_html_e( 'Day', 'godaddy-email-marketing-sign-up-forms' ); ?> </option>
|
361 |
<?php for ( $i = 1; $i < 32; $i++ ) : ?>
|
362 |
<option value="<?php echo strlen( $i ) < 2 ? '0' . esc_attr( $i ) : esc_attr( $i ); ?>"> <?php echo esc_attr( $i ); ?> </option>
|
363 |
<?php endfor; ?>
|
365 |
</span>
|
366 |
<span class="third">
|
367 |
<select fingerprint="date" data-id="<?php echo esc_attr( self::get_form_id( $args->name ) ); ?>" data-name="<?php echo esc_attr( $args->name ); ?>">
|
368 |
+
<option value=""> <?php esc_html_e( 'Year', 'godaddy-email-marketing-sign-up-forms' ); ?> </option>
|
369 |
<?php for ( $x = $current_year + 5 ; $x > $current_year - 81 ; $x-- ) : ?>
|
370 |
<option value="<?php echo absint( $x ); ?>"> <?php echo absint( $x ); ?> </option>
|
371 |
<?php endfor; ?>
|
407 |
|
408 |
<?php
|
409 |
}
|
410 |
+
|
411 |
+
/**
|
412 |
+
* Displays the "Terms of Service" field.
|
413 |
+
*
|
414 |
+
* @param array $args Settings field arguments.
|
415 |
+
*/
|
416 |
+
public static function tos_link( $args ) {
|
417 |
+
|
418 |
+
$field_classes = array( 'gem-field' );
|
419 |
+
|
420 |
+
// Is this field required?
|
421 |
+
if ( $args->required ) {
|
422 |
+
$field_classes[] = 'gem-required';
|
423 |
+
}
|
424 |
+
|
425 |
+
$field_classes = (array) apply_filters( 'gem_required_field_class', $field_classes, $args );
|
426 |
+
$field_options = ! empty( $args->options ) ? json_decode( $args->options ) : false;
|
427 |
+
$tos_link = isset( $field_options->link ) ? $field_options->link : false;
|
428 |
+
?>
|
429 |
+
|
430 |
+
<label for="<?php echo esc_attr( self::get_form_id( $args->name ) ); ?>">
|
431 |
+
|
432 |
+
<a href="<?php echo esc_url( $tos_link ); ?>" target="_blank"><?php echo esc_html( $args->display ); ?></a>
|
433 |
+
|
434 |
+
</label>
|
435 |
+
|
436 |
+
<?php
|
437 |
+
|
438 |
+
}
|
439 |
+
|
440 |
+
/**
|
441 |
+
* Adjust a field type to reuse existing methods.
|
442 |
+
*
|
443 |
+
* @return string Field type
|
444 |
+
*/
|
445 |
+
private static function adjust_field_type( $field ) {
|
446 |
+
|
447 |
+
if ( in_array( $field->field_type, [ 'tracking_option', 'age_check' ], true ) ) {
|
448 |
+
|
449 |
+
$field->value = $field->display;
|
450 |
+
$field->field_type = 'checkbox';
|
451 |
+
|
452 |
+
}
|
453 |
+
|
454 |
+
return $field;
|
455 |
+
|
456 |
+
}
|
457 |
}
|
includes/settings.php
CHANGED
@@ -56,11 +56,12 @@ class GEM_Settings {
|
|
56 |
* @action admin_menu
|
57 |
*/
|
58 |
public function action_admin_menu() {
|
|
|
59 |
$this->hook = add_options_page(
|
60 |
-
__( 'GoDaddy Email Marketing Signup Forms', 'godaddy-email-marketing' ),
|
61 |
-
__( 'GoDaddy Email Marketing', 'godaddy-email-marketing' ),
|
62 |
'manage_options',
|
63 |
-
$this->slug
|
64 |
array( $this, 'display_settings_page' )
|
65 |
);
|
66 |
|
@@ -93,7 +94,7 @@ class GEM_Settings {
|
|
93 |
|
94 |
// Strings.
|
95 |
wp_localize_script( 'gem-admin', 'GEMAdmin', array(
|
96 |
-
'copyFailed' => _x( 'Please press Ctrl/Cmd+C to copy.', 'failed copy response', 'godaddy-email-marketing' ),
|
97 |
) );
|
98 |
|
99 |
wp_enqueue_script(
|
@@ -134,7 +135,8 @@ class GEM_Settings {
|
|
134 |
$settings = get_option( $this->slug );
|
135 |
|
136 |
switch ( $_GET['action'] ) {
|
137 |
-
|
|
|
138 |
if ( ! $this->gem->debug ) {
|
139 |
return;
|
140 |
}
|
@@ -168,7 +170,8 @@ class GEM_Settings {
|
|
168 |
// @codeCoverageIgnoreEnd
|
169 |
|
170 |
break;
|
171 |
-
|
|
|
172 |
if ( ! $this->gem->debug ) {
|
173 |
return;
|
174 |
}
|
@@ -199,8 +202,8 @@ class GEM_Settings {
|
|
199 |
}
|
200 |
|
201 |
break;
|
202 |
-
case 'refresh' :
|
203 |
|
|
|
204 |
check_admin_referer( 'gem_settings_refresh_nonce' );
|
205 |
|
206 |
if ( isset( $settings['username'] ) ) {
|
@@ -238,32 +241,32 @@ class GEM_Settings {
|
|
238 |
if ( get_transient( 'debug-reset' ) ) {
|
239 |
|
240 |
// All data reset.
|
241 |
-
$this->add_settings_error( $this->slug, 'debug-reset', __( 'All data has been removed.', 'godaddy-email-marketing' ), 'updated' );
|
242 |
} elseif ( get_transient( 'debug-reset-transients' ) ) {
|
243 |
|
244 |
// Transients reset.
|
245 |
-
$this->add_settings_error( $this->slug, 'debug-reset-transients', __( 'All transients were removed.', 'godaddy-email-marketing' ), 'updated' );
|
246 |
} elseif ( get_transient( 'gem-refresh' ) ) {
|
247 |
|
248 |
// Form refresh.
|
249 |
-
$this->add_settings_error( $this->slug, 'gem-refresh', __( 'Forms list was successfully updated.', 'godaddy-email-marketing' ), 'updated' );
|
250 |
} elseif ( get_transient( 'gem-invalid-creds' ) ) {
|
251 |
|
252 |
// Invalid credentials.
|
253 |
-
$this->add_settings_error( $this->slug, 'gem-invalid-creds', __( 'The credentials are incorrect! Please verify that you have entered them correctly.', 'godaddy-email-marketing' ) );
|
254 |
} elseif ( get_transient( 'gem-valid-creds' ) ) {
|
255 |
|
256 |
// Valid credentials.
|
257 |
-
$this->add_settings_error( $this->slug, 'gem-valid-creds', __( 'Connection with GoDaddy Email Marketing has been established! You\'re all set!', 'godaddy-email-marketing' ), 'updated' );
|
258 |
|
259 |
} elseif ( get_transient( 'gem-settings-updated' ) ) {
|
260 |
|
261 |
// Settings updated.
|
262 |
-
$this->add_settings_error( $this->slug, 'gem-settings-updated', __( 'Settings have been updated.', 'godaddy-email-marketing' ), 'updated' );
|
263 |
} elseif ( get_transient( 'gem-empty-creds' ) ) {
|
264 |
|
265 |
// Empty credentials.
|
266 |
-
$this->add_settings_error( $this->slug, 'gem-empty-creds', __( 'Please fill in the username and the API key first.', 'godaddy-email-marketing' ) );
|
267 |
}
|
268 |
|
269 |
// Set up the help tabs.
|
@@ -295,19 +298,21 @@ class GEM_Settings {
|
|
295 |
|
296 |
// @todo Remove HTML from the translation strings.
|
297 |
$screen->add_help_tab( array(
|
298 |
-
'title' => __( 'Overview', 'godaddy-email-marketing' ),
|
299 |
'id' => 'gem-overview',
|
300 |
'content' => sprintf(
|
301 |
'<h3>%s</h3><p>%s</p><ul><li>%s</li><li>%s</li><li>%s</li></ul>',
|
302 |
-
esc_html__( 'Instructions', 'godaddy-email-marketing' ),
|
303 |
sprintf(
|
304 |
-
|
|
|
305 |
'<a href="https://gem.godaddy.com/user/edit" target="_blank">https://gem.godaddy.com/user/edit</a>'
|
306 |
),
|
307 |
-
__( '<strong>Widget:</strong> Go to Appearance → widgets and find the widget called “GoDaddy Email Marketing Form” and drag it into the widget area of your choice. You can then add a title and select a form!', 'godaddy-email-marketing' ),
|
308 |
-
__( '<strong>Shortcode:</strong> You can add a form to any post or page by adding the shortcode (ex. <code>[gem id=80326]</code>) in the page/post editor.', 'godaddy-email-marketing' ),
|
309 |
sprintf(
|
310 |
-
|
|
|
311 |
'<?php gem_form( $form_id ); ?>',
|
312 |
'<?php gem_form( 91 ); ?>'
|
313 |
)
|
@@ -317,10 +322,10 @@ class GEM_Settings {
|
|
317 |
$screen->set_help_sidebar(
|
318 |
sprintf(
|
319 |
'<p><strong>%s</strong></p><p><a href="https://godaddy.com" target="_blank">%s</a></p><p><a href="https://support.godaddy.com/" target="_blank">%s</a></p><p><a href="https://support.godaddy.com/" target="_blank" class="button">%s</a></p>',
|
320 |
-
esc_html__( 'For more information:', 'godaddy-email-marketing' ),
|
321 |
-
esc_html__( 'GoDaddy', 'godaddy-email-marketing' ),
|
322 |
-
esc_html__( 'GoDaddy Help', 'godaddy-email-marketing' ),
|
323 |
-
esc_html__( 'Contact GoDaddy', 'godaddy-email-marketing' )
|
324 |
)
|
325 |
);
|
326 |
}
|
@@ -345,70 +350,70 @@ class GEM_Settings {
|
|
345 |
// First, we register a section. This is necessary since all future options must belong to one.
|
346 |
add_settings_section(
|
347 |
'general_settings_section',
|
348 |
-
__( 'Account Details', 'godaddy-email-marketing' ),
|
349 |
array( 'GEM_Settings_Controls', 'description' ),
|
350 |
$this->slug
|
351 |
);
|
352 |
|
353 |
add_settings_field(
|
354 |
'username',
|
355 |
-
__( 'Username', 'godaddy-email-marketing' ),
|
356 |
array( 'GEM_Settings_Controls', 'text' ),
|
357 |
$this->slug,
|
358 |
'general_settings_section',
|
359 |
array(
|
360 |
-
'id'
|
361 |
-
'page'
|
362 |
'description' => '',
|
363 |
-
'label_for'
|
364 |
)
|
365 |
);
|
366 |
|
367 |
add_settings_field(
|
368 |
'api-key',
|
369 |
-
__( 'API Key', 'godaddy-email-marketing' ),
|
370 |
array( 'GEM_Settings_Controls', 'text' ),
|
371 |
$this->slug,
|
372 |
'general_settings_section',
|
373 |
array(
|
374 |
-
'id'
|
375 |
-
'page'
|
376 |
'description' => '',
|
377 |
-
'label_for'
|
378 |
)
|
379 |
);
|
380 |
|
381 |
add_settings_field(
|
382 |
'display_powered_by',
|
383 |
-
__( 'Footer Link', 'godaddy-email-marketing' ),
|
384 |
array( 'GEM_Settings_Controls', 'checkbox' ),
|
385 |
$this->slug,
|
386 |
'general_settings_section',
|
387 |
array(
|
388 |
-
'id'
|
389 |
-
'page'
|
390 |
-
'label' => __( 'Display "Powered by GoDaddy"?', 'godaddy-email-marketing' ),
|
391 |
)
|
392 |
);
|
393 |
|
394 |
// Add the debugging section.
|
395 |
add_settings_section(
|
396 |
'debugging_section',
|
397 |
-
__( 'Debugging', 'godaddy-email-marketing' ),
|
398 |
array( 'GEM_Settings_Controls', 'debugging' ),
|
399 |
$this->slug
|
400 |
);
|
401 |
|
402 |
add_settings_field(
|
403 |
'debug',
|
404 |
-
__( 'Debug Mode', 'godaddy-email-marketing' ),
|
405 |
array( 'GEM_Settings_Controls', 'checkbox' ),
|
406 |
$this->slug,
|
407 |
'debugging_section',
|
408 |
array(
|
409 |
-
'id'
|
410 |
-
'page'
|
411 |
-
'label' => __( 'Activated', 'godaddy-email-marketing' ),
|
412 |
)
|
413 |
);
|
414 |
|
@@ -416,33 +421,33 @@ class GEM_Settings {
|
|
416 |
|
417 |
add_settings_field(
|
418 |
'erase_transients',
|
419 |
-
__( 'Cache Reset', 'godaddy-email-marketing' ),
|
420 |
array( 'GEM_Settings_Controls', 'button' ),
|
421 |
$this->slug,
|
422 |
'debugging_section',
|
423 |
array(
|
424 |
-
'url'
|
425 |
'action' => 'debug-reset-transients',
|
426 |
'_wpnonce' => wp_create_nonce( 'gem_settings_reset_transients_nonce' ),
|
427 |
) ),
|
428 |
-
'label'
|
429 |
-
'description' => __( 'Purges only the cached data associated with this plugin, and should be attempted before a hard reset.', 'godaddy-email-marketing' ),
|
430 |
)
|
431 |
);
|
432 |
|
433 |
add_settings_field(
|
434 |
'erase_all_data',
|
435 |
-
__( 'Hard Reset', 'godaddy-email-marketing' ),
|
436 |
array( 'GEM_Settings_Controls', 'button' ),
|
437 |
$this->slug,
|
438 |
'debugging_section',
|
439 |
array(
|
440 |
-
'url'
|
441 |
'action' => 'debug-reset',
|
442 |
'_wpnonce' => wp_create_nonce( 'gem_settings_hard_reset_nonce' ),
|
443 |
) ),
|
444 |
-
'label'
|
445 |
-
'description' => __( 'Purges all saved data associated with this plugin.', 'godaddy-email-marketing' ),
|
446 |
)
|
447 |
);
|
448 |
}
|
@@ -486,7 +491,7 @@ class GEM_Settings {
|
|
486 |
$class = 'col col-' . $index;
|
487 |
if ( $columns === $index ) {
|
488 |
$class .= ' last';
|
489 |
-
$index
|
490 |
}
|
491 |
?>
|
492 |
<div class="<?php echo esc_attr( $class ); ?>">
|
@@ -497,7 +502,8 @@ class GEM_Settings {
|
|
497 |
if ( ! empty( $section['callback'] ) ) {
|
498 |
call_user_func( $section['callback'], $section );
|
499 |
}
|
500 |
-
if ( isset( $wp_settings_fields ) ) {
|
|
|
501 |
<table class="form-table">
|
502 |
<?php do_settings_fields( $page, $section['id'] ); ?>
|
503 |
</table>
|
@@ -523,28 +529,22 @@ class GEM_Settings {
|
|
523 |
// Overrides
|
524 |
switch ( $subdomain ) {
|
525 |
|
526 |
-
case ''
|
527 |
-
|
528 |
$subdomain = 'www'; // Default
|
529 |
-
|
530 |
break;
|
531 |
|
532 |
-
case 'uk'
|
533 |
-
|
534 |
$subdomain = 'ua'; // Ukrainian (Українська)
|
535 |
-
|
536 |
break;
|
537 |
|
538 |
-
case 'el'
|
539 |
-
|
540 |
$subdomain = 'gr'; // Greek (Ελληνικά)
|
541 |
-
|
542 |
break;
|
543 |
|
544 |
}
|
545 |
|
546 |
?>
|
547 |
-
<iframe src="<?php echo esc_url( "https://{$subdomain}.godaddy.com/help/godaddy-email-marketing-1000013" ) ?>" frameborder="0" scrolling="no"></iframe>
|
548 |
|
549 |
<script type="text/javascript">
|
550 |
iFrameResize( {
|
@@ -563,8 +563,8 @@ class GEM_Settings {
|
|
563 |
* @todo Move this into a view file and include.
|
564 |
*/
|
565 |
public function display_settings_page() {
|
566 |
-
$tab
|
567 |
-
$forms
|
568 |
$valid_creds = (bool) get_option( 'gem-valid-creds' );
|
569 |
|
570 |
// Create a default form.
|
@@ -580,23 +580,23 @@ class GEM_Settings {
|
|
580 |
<div class="wrap about-wrap">
|
581 |
<div class="intro">
|
582 |
<h1>
|
583 |
-
<?php esc_html_e( 'GoDaddy Email Marketing Signup Forms', 'godaddy-email-marketing' ); ?>
|
584 |
<sup><?php echo esc_html( GEM_VERSION ); ?></sup>
|
585 |
</h1>
|
586 |
|
587 |
<?php if ( empty( $forms->signups ) ) : ?>
|
588 |
|
589 |
<div class="gem-identity updated notice">
|
590 |
-
<p><?php echo esc_html_x( 'Enjoy the GoDaddy Email Marketing Experience.', 'gem header note', 'godaddy-email-marketing' ); ?></p>
|
591 |
|
592 |
-
<p><?php echo esc_html_x( 'Add your GoDaddy Email Marketing signup form to your WordPress site! Easy to set up, the GoDaddy Email Marketing plugin allows your site visitors to subscribe to your email list.', 'header note', 'godaddy-email-marketing' ); ?></p>
|
593 |
|
594 |
<p class="description">
|
595 |
<?php if ( true === $valid_creds ) : ?>
|
596 |
-
<?php echo esc_html_x( 'You don\'t have any forms yet.', 'header note', 'godaddy-email-marketing' ); ?>
|
597 |
<?php $this->signups_button(); ?>
|
598 |
<?php else : ?>
|
599 |
-
<?php echo sprintf( esc_html_x( 'New to GoDaddy? Create an account to get started today. %s', 'Sign up button', 'godaddy-email-marketing' ), sprintf( '<a target="_blank" href="%s" class="button">%s</a>', 'https://sso.godaddy.com/account/create?path=/wordpress_plugin&app=gem&realm=idp&ssoreturnpath=/%3Fpath%3D%2Fwordpress_plugin%26app%3Dgem%26realm%3Didp', esc_html_x( 'Sign Up Now', 'header button', 'godaddy-email-marketing' ) ) ); ?>
|
600 |
<?php endif; ?>
|
601 |
</p>
|
602 |
</div>
|
@@ -606,62 +606,63 @@ class GEM_Settings {
|
|
606 |
<form method="post" action="options.php">
|
607 |
<h2 class="nav-tab-wrapper">
|
608 |
<?php if ( ! empty( $forms->signups ) ) : ?>
|
609 |
-
<a href="#forms" class="nav-tab <?php echo esc_attr( 'forms' === $tab ? 'nav-tab-active' : '' ); ?>"><?php esc_html_e( 'Forms', 'godaddy-email-marketing' ); ?></a>
|
610 |
<?php endif; ?>
|
611 |
-
<a href="#settings" class="nav-tab <?php echo esc_attr( 'settings' === $tab || empty( $tab ) ? 'nav-tab-active' : '' ); ?>"><?php esc_html_e( 'Settings', 'godaddy-email-marketing' ); ?></a>
|
612 |
-
<a href="#help" class="nav-tab <?php echo esc_attr( 'help' === $tab ? 'nav-tab-active' : '' ); ?>"><?php esc_html_e( 'Help', 'godaddy-email-marketing' ); ?></a>
|
613 |
</h2>
|
614 |
|
615 |
<div id="setting-errors"></div>
|
616 |
|
617 |
<?php if ( ! empty( $forms->signups ) ) : ?>
|
618 |
<div id="forms" class="panel">
|
619 |
-
<h3><?php esc_html_e( 'Reach Your Fans', 'godaddy-email-marketing' ); ?></h3>
|
620 |
<p><?php
|
621 |
printf(
|
622 |
-
|
|
|
623 |
'<a href="https://gem.godaddy.com" target="_blank">',
|
624 |
'</a>'
|
625 |
);
|
626 |
?>
|
627 |
</p>
|
628 |
-
<h3><?php esc_html_e( 'Available Signup Forms', 'godaddy-email-marketing' ); ?></h3>
|
629 |
<table class="wp-list-table widefat fixed striped">
|
630 |
<thead>
|
631 |
<tr>
|
632 |
-
<th scope="col" class="manage-column column-primary"><?php esc_html_e( 'Form Name', 'godaddy-email-marketing' ); ?></th>
|
633 |
-
<th scope="col" class="manage-column"><?php esc_html_e( 'Form ID', 'godaddy-email-marketing' ); ?></th>
|
634 |
-
<th scope="col" class="manage-column"><?php esc_html_e( 'Shortcode', 'godaddy-email-marketing' ); ?></th>
|
635 |
</tr>
|
636 |
</thead>
|
637 |
<tfoot>
|
638 |
<tr>
|
639 |
-
<th scope="col" class="manage-column column-primary"><?php esc_html_e( 'Form Name', 'godaddy-email-marketing' ); ?></th>
|
640 |
-
<th scope="col" class="manage-column"><?php esc_html_e( 'Form ID', 'godaddy-email-marketing' ); ?></th>
|
641 |
-
<th scope="col" class="manage-column"><?php esc_html_e( 'Shortcode', 'godaddy-email-marketing' ); ?></th>
|
642 |
</tr>
|
643 |
</tfoot>
|
644 |
<tbody>
|
645 |
<?php foreach ( $forms->signups as $form ) : ?>
|
646 |
<tr>
|
647 |
-
<td class="has-row-actions column-primary" data-colname="<?php esc_html_e( 'Form Name', 'godaddy-email-marketing' ); ?>">
|
648 |
<strong class="row-title"><?php echo esc_html( $form->name ); ?></strong>
|
649 |
<div class="row-actions">
|
650 |
<span class="edit">
|
651 |
-
<a target="_blank" href="<?php echo esc_url( "https://gem.godaddy.com/signups/{$form->id}/edit" ); ?>" title="<?php esc_attr_e( 'Opens in a new window', 'godaddy-email-marketing' ); ?>"><?php esc_html_e( 'Edit form in GoDaddy Email Marketing', 'godaddy-email-marketing' ); ?></a> |
|
652 |
</span>
|
653 |
<span class="view">
|
654 |
-
<a target="_blank" href="<?php echo esc_url( $form->url ); ?>"><?php esc_html_e( 'Preview', 'godaddy-email-marketing' ); ?></a>
|
655 |
</span>
|
656 |
</div>
|
657 |
<button type="button" class="toggle-row">
|
658 |
<span class="screen-reader-text">Show more details</span>
|
659 |
</button>
|
660 |
</td>
|
661 |
-
<td data-colname="<?php esc_html_e( 'Form ID', 'godaddy-email-marketing' ); ?>">
|
662 |
<code class="gem-form-id"><?php echo absint( $form->id ); ?></code>
|
663 |
</td>
|
664 |
-
<td data-colname="<?php esc_html_e( 'Shortcode', 'godaddy-email-marketing' ); ?>">
|
665 |
<input type="text" id="form-<?php echo absint( $form->id ); ?>" class="code clipboard-value" value="[gem id=<?php echo absint( $form->id ); ?>]" readonly />
|
666 |
<button data-copytarget="#form-<?php echo absint( $form->id ); ?>" class="button copy-to-clipboard">
|
667 |
<img src="<?php echo esc_url( plugins_url( 'images/clippy.svg', GEM_PLUGIN_BASE ) ); ?>" width="14" alt="Copy to clipboard">
|
@@ -674,7 +675,7 @@ class GEM_Settings {
|
|
674 |
|
675 |
<br style="clear:both" />
|
676 |
<p class="description">
|
677 |
-
<?php esc_html_e( 'Not seeing your form?', 'godaddy-email-marketing' ); ?> <?php $this->refresh_button( true ); ?>
|
678 |
<?php
|
679 |
if ( true === $valid_creds ) {
|
680 |
$this->signups_button();
|
@@ -693,7 +694,7 @@ class GEM_Settings {
|
|
693 |
<br style="clear:both" />
|
694 |
<p class="submit">
|
695 |
<?php
|
696 |
-
submit_button( _x( 'Save Settings', 'save settings button', 'godaddy-email-marketing' ), 'primary', 'submit', false );
|
697 |
if ( empty( $forms->signups ) && true === $valid_creds ) {
|
698 |
$this->refresh_button();
|
699 |
}
|
@@ -738,21 +739,21 @@ class GEM_Settings {
|
|
738 |
remove_query_arg( 'tab' )
|
739 |
)
|
740 |
);
|
741 |
-
$this->link_button( __( 'Refresh Forms', 'godaddy-email-marketing' ), $url );
|
742 |
}
|
743 |
|
744 |
/**
|
745 |
* Signup button for a new form.
|
746 |
*/
|
747 |
public function signups_button() {
|
748 |
-
$this->link_button( __( 'Create a New Signup Form', 'godaddy-email-marketing' ), 'https://gem.godaddy.com/signups', true );
|
749 |
}
|
750 |
|
751 |
/**
|
752 |
* Button for a new campaign.
|
753 |
*/
|
754 |
public function campaign_button() {
|
755 |
-
$this->link_button( __( 'Create a New Campaign', 'godaddy-email-marketing' ), 'https://gem.godaddy.com/promotions', true );
|
756 |
}
|
757 |
|
758 |
/**
|
@@ -838,7 +839,7 @@ final class GEM_Settings_Controls {
|
|
838 |
public static function debugging() {
|
839 |
printf(
|
840 |
'<p>%s</p>',
|
841 |
-
esc_html__( 'If you are experiencing issues and are unsure of the cause, you may want to activate debug mode, which displays additional options.', 'godaddy-email-marketing' )
|
842 |
);
|
843 |
}
|
844 |
|
@@ -848,7 +849,8 @@ final class GEM_Settings_Controls {
|
|
848 |
public static function description() {
|
849 |
printf(
|
850 |
'<p>%s</p>',
|
851 |
-
|
|
|
852 |
);
|
853 |
}
|
854 |
|
@@ -860,7 +862,8 @@ final class GEM_Settings_Controls {
|
|
860 |
public static function select( $args ) {
|
861 |
if ( empty( $args['options'] ) || empty( $args['id'] ) || empty( $args['page'] ) ) {
|
862 |
return;
|
863 |
-
}
|
|
|
864 |
|
865 |
<select id="<?php echo esc_attr( $args['id'] ); ?>" name="<?php echo esc_attr( sprintf( '%s[%s]', $args['page'], $args['id'] ) ); ?>">
|
866 |
|
@@ -891,9 +894,10 @@ final class GEM_Settings_Controls {
|
|
891 |
$value = self::get_option( $args['id'] );
|
892 |
?>
|
893 |
|
894 |
-
<input type="text" name="<?php echo esc_attr( $name ); ?>" id="<?php echo esc_attr( $id ) ?>" value="<?php echo esc_attr( $value ); ?>" class="widefat code" />
|
895 |
|
896 |
-
<?php
|
|
|
897 |
}
|
898 |
|
899 |
/**
|
@@ -906,15 +910,18 @@ final class GEM_Settings_Controls {
|
|
906 |
return;
|
907 |
}
|
908 |
|
909 |
-
$name
|
910 |
-
$label = isset( $args['label'] ) ? $args['label'] : '';
|
|
|
|
|
911 |
|
912 |
<label for="<?php echo esc_attr( $name ); ?>">
|
913 |
<input type="checkbox" name="<?php echo esc_attr( $name ); ?>" id="<?php echo esc_attr( $name ); ?>" value="1" <?php checked( self::get_option( $args['id'] ) ); ?> />
|
914 |
<?php echo esc_html( $label ); ?>
|
915 |
</label>
|
916 |
|
917 |
-
<?php
|
|
|
918 |
}
|
919 |
|
920 |
/**
|
@@ -932,7 +939,8 @@ final class GEM_Settings_Controls {
|
|
932 |
<a href="<?php echo esc_url( $args['url'] ); ?>" class="button-secondary"><?php echo esc_html( $args['label'] ); ?></a>
|
933 |
</p>
|
934 |
|
935 |
-
<?php
|
|
|
936 |
}
|
937 |
|
938 |
/**
|
@@ -941,11 +949,13 @@ final class GEM_Settings_Controls {
|
|
941 |
* @param array $args Settings field arguments.
|
942 |
*/
|
943 |
public static function show_description( $args ) {
|
944 |
-
if ( isset( $args['description'] ) ) :
|
|
|
945 |
|
946 |
<p class="description"><?php echo wp_kses_post( $args['description'] ); ?></p>
|
947 |
|
948 |
-
|
|
|
949 |
}
|
950 |
|
951 |
/**
|
56 |
* @action admin_menu
|
57 |
*/
|
58 |
public function action_admin_menu() {
|
59 |
+
$this->slug = self::SLUG;
|
60 |
$this->hook = add_options_page(
|
61 |
+
__( 'GoDaddy Email Marketing Signup Forms', 'godaddy-email-marketing-sign-up-forms' ),
|
62 |
+
__( 'GoDaddy Email Marketing', 'godaddy-email-marketing-sign-up-forms' ),
|
63 |
'manage_options',
|
64 |
+
$this->slug,
|
65 |
array( $this, 'display_settings_page' )
|
66 |
);
|
67 |
|
94 |
|
95 |
// Strings.
|
96 |
wp_localize_script( 'gem-admin', 'GEMAdmin', array(
|
97 |
+
'copyFailed' => _x( 'Please press Ctrl/Cmd+C to copy.', 'failed copy response', 'godaddy-email-marketing-sign-up-forms' ),
|
98 |
) );
|
99 |
|
100 |
wp_enqueue_script(
|
135 |
$settings = get_option( $this->slug );
|
136 |
|
137 |
switch ( $_GET['action'] ) {
|
138 |
+
|
139 |
+
case 'debug-reset':
|
140 |
if ( ! $this->gem->debug ) {
|
141 |
return;
|
142 |
}
|
170 |
// @codeCoverageIgnoreEnd
|
171 |
|
172 |
break;
|
173 |
+
|
174 |
+
case 'debug-reset-transients':
|
175 |
if ( ! $this->gem->debug ) {
|
176 |
return;
|
177 |
}
|
202 |
}
|
203 |
|
204 |
break;
|
|
|
205 |
|
206 |
+
case 'refresh':
|
207 |
check_admin_referer( 'gem_settings_refresh_nonce' );
|
208 |
|
209 |
if ( isset( $settings['username'] ) ) {
|
241 |
if ( get_transient( 'debug-reset' ) ) {
|
242 |
|
243 |
// All data reset.
|
244 |
+
$this->add_settings_error( $this->slug, 'debug-reset', __( 'All data has been removed.', 'godaddy-email-marketing-sign-up-forms' ), 'updated' );
|
245 |
} elseif ( get_transient( 'debug-reset-transients' ) ) {
|
246 |
|
247 |
// Transients reset.
|
248 |
+
$this->add_settings_error( $this->slug, 'debug-reset-transients', __( 'All transients were removed.', 'godaddy-email-marketing-sign-up-forms' ), 'updated' );
|
249 |
} elseif ( get_transient( 'gem-refresh' ) ) {
|
250 |
|
251 |
// Form refresh.
|
252 |
+
$this->add_settings_error( $this->slug, 'gem-refresh', __( 'Forms list was successfully updated.', 'godaddy-email-marketing-sign-up-forms' ), 'updated' );
|
253 |
} elseif ( get_transient( 'gem-invalid-creds' ) ) {
|
254 |
|
255 |
// Invalid credentials.
|
256 |
+
$this->add_settings_error( $this->slug, 'gem-invalid-creds', __( 'The credentials are incorrect! Please verify that you have entered them correctly.', 'godaddy-email-marketing-sign-up-forms' ) );
|
257 |
} elseif ( get_transient( 'gem-valid-creds' ) ) {
|
258 |
|
259 |
// Valid credentials.
|
260 |
+
$this->add_settings_error( $this->slug, 'gem-valid-creds', __( 'Connection with GoDaddy Email Marketing has been established! You\'re all set!', 'godaddy-email-marketing-sign-up-forms' ), 'updated' );
|
261 |
|
262 |
} elseif ( get_transient( 'gem-settings-updated' ) ) {
|
263 |
|
264 |
// Settings updated.
|
265 |
+
$this->add_settings_error( $this->slug, 'gem-settings-updated', __( 'Settings have been updated.', 'godaddy-email-marketing-sign-up-forms' ), 'updated' );
|
266 |
} elseif ( get_transient( 'gem-empty-creds' ) ) {
|
267 |
|
268 |
// Empty credentials.
|
269 |
+
$this->add_settings_error( $this->slug, 'gem-empty-creds', __( 'Please fill in the username and the API key first.', 'godaddy-email-marketing-sign-up-forms' ) );
|
270 |
}
|
271 |
|
272 |
// Set up the help tabs.
|
298 |
|
299 |
// @todo Remove HTML from the translation strings.
|
300 |
$screen->add_help_tab( array(
|
301 |
+
'title' => __( 'Overview', 'godaddy-email-marketing-sign-up-forms' ),
|
302 |
'id' => 'gem-overview',
|
303 |
'content' => sprintf(
|
304 |
'<h3>%s</h3><p>%s</p><ul><li>%s</li><li>%s</li><li>%s</li></ul>',
|
305 |
+
esc_html__( 'Instructions', 'godaddy-email-marketing-sign-up-forms' ),
|
306 |
sprintf(
|
307 |
+
/* translators: %s: link to GoDaddy Email Marketing account page */
|
308 |
+
esc_html__( 'Once the plugin is activated, you will be able to select and insert any of your GoDaddy Email Marketing webforms right into your site. Setup is easy. Below, simply enter your account email address and API key (found in your GoDaddy Email Marketing account [%s] area). Here are the 3 ways you can display a webform on your site:', 'godaddy-email-marketing-sign-up-forms' ),
|
309 |
'<a href="https://gem.godaddy.com/user/edit" target="_blank">https://gem.godaddy.com/user/edit</a>'
|
310 |
),
|
311 |
+
__( '<strong>Widget:</strong> Go to Appearance → widgets and find the widget called “GoDaddy Email Marketing Form” and drag it into the widget area of your choice. You can then add a title and select a form!', 'godaddy-email-marketing-sign-up-forms' ),
|
312 |
+
__( '<strong>Shortcode:</strong> You can add a form to any post or page by adding the shortcode (ex. <code>[gem id=80326]</code>) in the page/post editor.', 'godaddy-email-marketing-sign-up-forms' ),
|
313 |
sprintf(
|
314 |
+
/* translators: %1$s: <?php gem_form( $form_id ); ?>, %2$s: <?php gem_form( 91 ); ?> */
|
315 |
+
__( '<strong>Template Tag:</strong> You can add the following template tag into any WordPress file: <code>%1$s</code>. Ex. <code>%2$s</code>', 'godaddy-email-marketing-sign-up-forms' ),
|
316 |
'<?php gem_form( $form_id ); ?>',
|
317 |
'<?php gem_form( 91 ); ?>'
|
318 |
)
|
322 |
$screen->set_help_sidebar(
|
323 |
sprintf(
|
324 |
'<p><strong>%s</strong></p><p><a href="https://godaddy.com" target="_blank">%s</a></p><p><a href="https://support.godaddy.com/" target="_blank">%s</a></p><p><a href="https://support.godaddy.com/" target="_blank" class="button">%s</a></p>',
|
325 |
+
esc_html__( 'For more information:', 'godaddy-email-marketing-sign-up-forms' ),
|
326 |
+
esc_html__( 'GoDaddy', 'godaddy-email-marketing-sign-up-forms' ),
|
327 |
+
esc_html__( 'GoDaddy Help', 'godaddy-email-marketing-sign-up-forms' ),
|
328 |
+
esc_html__( 'Contact GoDaddy', 'godaddy-email-marketing-sign-up-forms' )
|
329 |
)
|
330 |
);
|
331 |
}
|
350 |
// First, we register a section. This is necessary since all future options must belong to one.
|
351 |
add_settings_section(
|
352 |
'general_settings_section',
|
353 |
+
__( 'Account Details', 'godaddy-email-marketing-sign-up-forms' ),
|
354 |
array( 'GEM_Settings_Controls', 'description' ),
|
355 |
$this->slug
|
356 |
);
|
357 |
|
358 |
add_settings_field(
|
359 |
'username',
|
360 |
+
__( 'Username', 'godaddy-email-marketing-sign-up-forms' ),
|
361 |
array( 'GEM_Settings_Controls', 'text' ),
|
362 |
$this->slug,
|
363 |
'general_settings_section',
|
364 |
array(
|
365 |
+
'id' => 'username',
|
366 |
+
'page' => $this->slug,
|
367 |
'description' => '',
|
368 |
+
'label_for' => $this->slug . '-username',
|
369 |
)
|
370 |
);
|
371 |
|
372 |
add_settings_field(
|
373 |
'api-key',
|
374 |
+
__( 'API Key', 'godaddy-email-marketing-sign-up-forms' ),
|
375 |
array( 'GEM_Settings_Controls', 'text' ),
|
376 |
$this->slug,
|
377 |
'general_settings_section',
|
378 |
array(
|
379 |
+
'id' => 'api-key',
|
380 |
+
'page' => $this->slug,
|
381 |
'description' => '',
|
382 |
+
'label_for' => $this->slug . '-api-key',
|
383 |
)
|
384 |
);
|
385 |
|
386 |
add_settings_field(
|
387 |
'display_powered_by',
|
388 |
+
__( 'Footer Link', 'godaddy-email-marketing-sign-up-forms' ),
|
389 |
array( 'GEM_Settings_Controls', 'checkbox' ),
|
390 |
$this->slug,
|
391 |
'general_settings_section',
|
392 |
array(
|
393 |
+
'id' => 'display_powered_by',
|
394 |
+
'page' => $this->slug,
|
395 |
+
'label' => __( 'Display "Powered by GoDaddy"?', 'godaddy-email-marketing-sign-up-forms' ),
|
396 |
)
|
397 |
);
|
398 |
|
399 |
// Add the debugging section.
|
400 |
add_settings_section(
|
401 |
'debugging_section',
|
402 |
+
__( 'Debugging', 'godaddy-email-marketing-sign-up-forms' ),
|
403 |
array( 'GEM_Settings_Controls', 'debugging' ),
|
404 |
$this->slug
|
405 |
);
|
406 |
|
407 |
add_settings_field(
|
408 |
'debug',
|
409 |
+
__( 'Debug Mode', 'godaddy-email-marketing-sign-up-forms' ),
|
410 |
array( 'GEM_Settings_Controls', 'checkbox' ),
|
411 |
$this->slug,
|
412 |
'debugging_section',
|
413 |
array(
|
414 |
+
'id' => 'debug',
|
415 |
+
'page' => $this->slug,
|
416 |
+
'label' => __( 'Activated', 'godaddy-email-marketing-sign-up-forms' ),
|
417 |
)
|
418 |
);
|
419 |
|
421 |
|
422 |
add_settings_field(
|
423 |
'erase_transients',
|
424 |
+
__( 'Cache Reset', 'godaddy-email-marketing-sign-up-forms' ),
|
425 |
array( 'GEM_Settings_Controls', 'button' ),
|
426 |
$this->slug,
|
427 |
'debugging_section',
|
428 |
array(
|
429 |
+
'url' => add_query_arg( array(
|
430 |
'action' => 'debug-reset-transients',
|
431 |
'_wpnonce' => wp_create_nonce( 'gem_settings_reset_transients_nonce' ),
|
432 |
) ),
|
433 |
+
'label' => __( 'Erase Transients', 'godaddy-email-marketing-sign-up-forms' ),
|
434 |
+
'description' => __( 'Purges only the cached data associated with this plugin, and should be attempted before a hard reset.', 'godaddy-email-marketing-sign-up-forms' ),
|
435 |
)
|
436 |
);
|
437 |
|
438 |
add_settings_field(
|
439 |
'erase_all_data',
|
440 |
+
__( 'Hard Reset', 'godaddy-email-marketing-sign-up-forms' ),
|
441 |
array( 'GEM_Settings_Controls', 'button' ),
|
442 |
$this->slug,
|
443 |
'debugging_section',
|
444 |
array(
|
445 |
+
'url' => add_query_arg( array(
|
446 |
'action' => 'debug-reset',
|
447 |
'_wpnonce' => wp_create_nonce( 'gem_settings_hard_reset_nonce' ),
|
448 |
) ),
|
449 |
+
'label' => __( 'Erase All Data', 'godaddy-email-marketing-sign-up-forms' ),
|
450 |
+
'description' => __( 'Purges all saved data associated with this plugin.', 'godaddy-email-marketing-sign-up-forms' ),
|
451 |
)
|
452 |
);
|
453 |
}
|
491 |
$class = 'col col-' . $index;
|
492 |
if ( $columns === $index ) {
|
493 |
$class .= ' last';
|
494 |
+
$index = 0;
|
495 |
}
|
496 |
?>
|
497 |
<div class="<?php echo esc_attr( $class ); ?>">
|
502 |
if ( ! empty( $section['callback'] ) ) {
|
503 |
call_user_func( $section['callback'], $section );
|
504 |
}
|
505 |
+
if ( isset( $wp_settings_fields ) ) {
|
506 |
+
?>
|
507 |
<table class="form-table">
|
508 |
<?php do_settings_fields( $page, $section['id'] ); ?>
|
509 |
</table>
|
529 |
// Overrides
|
530 |
switch ( $subdomain ) {
|
531 |
|
532 |
+
case '':
|
|
|
533 |
$subdomain = 'www'; // Default
|
|
|
534 |
break;
|
535 |
|
536 |
+
case 'uk':
|
|
|
537 |
$subdomain = 'ua'; // Ukrainian (Українська)
|
|
|
538 |
break;
|
539 |
|
540 |
+
case 'el':
|
|
|
541 |
$subdomain = 'gr'; // Greek (Ελληνικά)
|
|
|
542 |
break;
|
543 |
|
544 |
}
|
545 |
|
546 |
?>
|
547 |
+
<iframe src="<?php echo esc_url( "https://{$subdomain}.godaddy.com/help/godaddy-email-marketing-1000013" ); ?>" frameborder="0" scrolling="no"></iframe>
|
548 |
|
549 |
<script type="text/javascript">
|
550 |
iFrameResize( {
|
563 |
* @todo Move this into a view file and include.
|
564 |
*/
|
565 |
public function display_settings_page() {
|
566 |
+
$tab = isset( $_GET['tab'] ) ? sanitize_key( wp_unslash( $_GET['tab'] ) ) : '';
|
567 |
+
$forms = GEM_Dispatcher::get_forms();
|
568 |
$valid_creds = (bool) get_option( 'gem-valid-creds' );
|
569 |
|
570 |
// Create a default form.
|
580 |
<div class="wrap about-wrap">
|
581 |
<div class="intro">
|
582 |
<h1>
|
583 |
+
<?php esc_html_e( 'GoDaddy Email Marketing Signup Forms', 'godaddy-email-marketing-sign-up-forms' ); ?>
|
584 |
<sup><?php echo esc_html( GEM_VERSION ); ?></sup>
|
585 |
</h1>
|
586 |
|
587 |
<?php if ( empty( $forms->signups ) ) : ?>
|
588 |
|
589 |
<div class="gem-identity updated notice">
|
590 |
+
<p><?php echo esc_html_x( 'Enjoy the GoDaddy Email Marketing Experience.', 'gem header note', 'godaddy-email-marketing-sign-up-forms' ); ?></p>
|
591 |
|
592 |
+
<p><?php echo esc_html_x( 'Add your GoDaddy Email Marketing signup form to your WordPress site! Easy to set up, the GoDaddy Email Marketing plugin allows your site visitors to subscribe to your email list.', 'header note', 'godaddy-email-marketing-sign-up-forms' ); ?></p>
|
593 |
|
594 |
<p class="description">
|
595 |
<?php if ( true === $valid_creds ) : ?>
|
596 |
+
<?php echo esc_html_x( 'You don\'t have any forms yet.', 'header note', 'godaddy-email-marketing-sign-up-forms' ); ?>
|
597 |
<?php $this->signups_button(); ?>
|
598 |
<?php else : ?>
|
599 |
+
<?php echo /* translators: %s: Sign Up Now button */ sprintf( esc_html_x( 'New to GoDaddy? Create an account to get started today. %s', 'Sign up button', 'godaddy-email-marketing-sign-up-forms' ), sprintf( '<a target="_blank" href="%s" class="button">%s</a>', 'https://sso.godaddy.com/account/create?path=/wordpress_plugin&app=gem&realm=idp&ssoreturnpath=/%3Fpath%3D%2Fwordpress_plugin%26app%3Dgem%26realm%3Didp', esc_html_x( 'Sign Up Now', 'header button', 'godaddy-email-marketing-sign-up-forms' ) ) ); ?>
|
600 |
<?php endif; ?>
|
601 |
</p>
|
602 |
</div>
|
606 |
<form method="post" action="options.php">
|
607 |
<h2 class="nav-tab-wrapper">
|
608 |
<?php if ( ! empty( $forms->signups ) ) : ?>
|
609 |
+
<a href="#forms" class="nav-tab <?php echo esc_attr( 'forms' === $tab ? 'nav-tab-active' : '' ); ?>"><?php esc_html_e( 'Forms', 'godaddy-email-marketing-sign-up-forms' ); ?></a>
|
610 |
<?php endif; ?>
|
611 |
+
<a href="#settings" class="nav-tab <?php echo esc_attr( 'settings' === $tab || empty( $tab ) ? 'nav-tab-active' : '' ); ?>"><?php esc_html_e( 'Settings', 'godaddy-email-marketing-sign-up-forms' ); ?></a>
|
612 |
+
<a href="#help" class="nav-tab <?php echo esc_attr( 'help' === $tab ? 'nav-tab-active' : '' ); ?>"><?php esc_html_e( 'Help', 'godaddy-email-marketing-sign-up-forms' ); ?></a>
|
613 |
</h2>
|
614 |
|
615 |
<div id="setting-errors"></div>
|
616 |
|
617 |
<?php if ( ! empty( $forms->signups ) ) : ?>
|
618 |
<div id="forms" class="panel">
|
619 |
+
<h3><?php esc_html_e( 'Reach Your Fans', 'godaddy-email-marketing-sign-up-forms' ); ?></h3>
|
620 |
<p><?php
|
621 |
printf(
|
622 |
+
/* translators: %1$s: <a href="https://gem.godaddy.com">, %2$s: </a> */
|
623 |
+
esc_html__( 'Email marketing makes it easier than ever to turn casual visits into lasting relationship. You\'re already collecting subscribers, now you just need to start emailing them. It only takes a few moments to %1$screate an email marketing campaign%2$s.', 'godaddy-email-marketing-sign-up-forms' ),
|
624 |
'<a href="https://gem.godaddy.com" target="_blank">',
|
625 |
'</a>'
|
626 |
);
|
627 |
?>
|
628 |
</p>
|
629 |
+
<h3><?php esc_html_e( 'Available Signup Forms', 'godaddy-email-marketing-sign-up-forms' ); ?></h3>
|
630 |
<table class="wp-list-table widefat fixed striped">
|
631 |
<thead>
|
632 |
<tr>
|
633 |
+
<th scope="col" class="manage-column column-primary"><?php esc_html_e( 'Form Name', 'godaddy-email-marketing-sign-up-forms' ); ?></th>
|
634 |
+
<th scope="col" class="manage-column"><?php esc_html_e( 'Form ID', 'godaddy-email-marketing-sign-up-forms' ); ?></th>
|
635 |
+
<th scope="col" class="manage-column"><?php esc_html_e( 'Shortcode', 'godaddy-email-marketing-sign-up-forms' ); ?></th>
|
636 |
</tr>
|
637 |
</thead>
|
638 |
<tfoot>
|
639 |
<tr>
|
640 |
+
<th scope="col" class="manage-column column-primary"><?php esc_html_e( 'Form Name', 'godaddy-email-marketing-sign-up-forms' ); ?></th>
|
641 |
+
<th scope="col" class="manage-column"><?php esc_html_e( 'Form ID', 'godaddy-email-marketing-sign-up-forms' ); ?></th>
|
642 |
+
<th scope="col" class="manage-column"><?php esc_html_e( 'Shortcode', 'godaddy-email-marketing-sign-up-forms' ); ?></th>
|
643 |
</tr>
|
644 |
</tfoot>
|
645 |
<tbody>
|
646 |
<?php foreach ( $forms->signups as $form ) : ?>
|
647 |
<tr>
|
648 |
+
<td class="has-row-actions column-primary" data-colname="<?php esc_html_e( 'Form Name', 'godaddy-email-marketing-sign-up-forms' ); ?>">
|
649 |
<strong class="row-title"><?php echo esc_html( $form->name ); ?></strong>
|
650 |
<div class="row-actions">
|
651 |
<span class="edit">
|
652 |
+
<a target="_blank" href="<?php echo esc_url( "https://gem.godaddy.com/signups/{$form->id}/edit" ); ?>" title="<?php esc_attr_e( 'Opens in a new window', 'godaddy-email-marketing-sign-up-forms' ); ?>"><?php esc_html_e( 'Edit form in GoDaddy Email Marketing', 'godaddy-email-marketing-sign-up-forms' ); ?></a> |
|
653 |
</span>
|
654 |
<span class="view">
|
655 |
+
<a target="_blank" href="<?php echo esc_url( $form->url ); ?>"><?php esc_html_e( 'Preview', 'godaddy-email-marketing-sign-up-forms' ); ?></a>
|
656 |
</span>
|
657 |
</div>
|
658 |
<button type="button" class="toggle-row">
|
659 |
<span class="screen-reader-text">Show more details</span>
|
660 |
</button>
|
661 |
</td>
|
662 |
+
<td data-colname="<?php esc_html_e( 'Form ID', 'godaddy-email-marketing-sign-up-forms' ); ?>">
|
663 |
<code class="gem-form-id"><?php echo absint( $form->id ); ?></code>
|
664 |
</td>
|
665 |
+
<td data-colname="<?php esc_html_e( 'Shortcode', 'godaddy-email-marketing-sign-up-forms' ); ?>">
|
666 |
<input type="text" id="form-<?php echo absint( $form->id ); ?>" class="code clipboard-value" value="[gem id=<?php echo absint( $form->id ); ?>]" readonly />
|
667 |
<button data-copytarget="#form-<?php echo absint( $form->id ); ?>" class="button copy-to-clipboard">
|
668 |
<img src="<?php echo esc_url( plugins_url( 'images/clippy.svg', GEM_PLUGIN_BASE ) ); ?>" width="14" alt="Copy to clipboard">
|
675 |
|
676 |
<br style="clear:both" />
|
677 |
<p class="description">
|
678 |
+
<?php esc_html_e( 'Not seeing your form?', 'godaddy-email-marketing-sign-up-forms' ); ?> <?php $this->refresh_button( true ); ?>
|
679 |
<?php
|
680 |
if ( true === $valid_creds ) {
|
681 |
$this->signups_button();
|
694 |
<br style="clear:both" />
|
695 |
<p class="submit">
|
696 |
<?php
|
697 |
+
submit_button( _x( 'Save Settings', 'save settings button', 'godaddy-email-marketing-sign-up-forms' ), 'primary', 'submit', false );
|
698 |
if ( empty( $forms->signups ) && true === $valid_creds ) {
|
699 |
$this->refresh_button();
|
700 |
}
|
739 |
remove_query_arg( 'tab' )
|
740 |
)
|
741 |
);
|
742 |
+
$this->link_button( __( 'Refresh Forms', 'godaddy-email-marketing-sign-up-forms' ), $url );
|
743 |
}
|
744 |
|
745 |
/**
|
746 |
* Signup button for a new form.
|
747 |
*/
|
748 |
public function signups_button() {
|
749 |
+
$this->link_button( __( 'Create a New Signup Form', 'godaddy-email-marketing-sign-up-forms' ), 'https://gem.godaddy.com/signups', true );
|
750 |
}
|
751 |
|
752 |
/**
|
753 |
* Button for a new campaign.
|
754 |
*/
|
755 |
public function campaign_button() {
|
756 |
+
$this->link_button( __( 'Create a New Campaign', 'godaddy-email-marketing-sign-up-forms' ), 'https://gem.godaddy.com/promotions', true );
|
757 |
}
|
758 |
|
759 |
/**
|
839 |
public static function debugging() {
|
840 |
printf(
|
841 |
'<p>%s</p>',
|
842 |
+
esc_html__( 'If you are experiencing issues and are unsure of the cause, you may want to activate debug mode, which displays additional options.', 'godaddy-email-marketing-sign-up-forms' )
|
843 |
);
|
844 |
}
|
845 |
|
849 |
public static function description() {
|
850 |
printf(
|
851 |
'<p>%s</p>',
|
852 |
+
/* translators: 1. Sign in here link, 2. Sign up here link */
|
853 |
+
sprintf( esc_html__( 'For this plugin to work, it needs to access your GoDaddy Email Marketing account. %1$s to get your username and API key. Copy and paste them below; then click "Save Settings." If you don\'t have a GoDaddy Email Marketing account, %2$s.', 'godaddy-email-marketing-sign-up-forms' ), sprintf( '<a target="_blank" href="%s">%s</a>', 'https://sso.godaddy.com/?realm=idp&app=gem&path=/wordpress_plugin', /* translators: account details link */ esc_html__( 'Sign in here', 'godaddy-email-marketing-sign-up-forms' ) ), sprintf( '<a target="_blank" href="%s">%s</a>', 'https://sso.godaddy.com/account/create?path=/wordpress_plugin&app=gem&realm=idp&ssoreturnpath=/%3Fpath%3D%2Fwordpress_plugin%26app%3Dgem%26realm%3Didp', esc_html_x( 'sign up here', 'account details link', 'godaddy-email-marketing-sign-up-forms' ) ) )
|
854 |
);
|
855 |
}
|
856 |
|
862 |
public static function select( $args ) {
|
863 |
if ( empty( $args['options'] ) || empty( $args['id'] ) || empty( $args['page'] ) ) {
|
864 |
return;
|
865 |
+
}
|
866 |
+
?>
|
867 |
|
868 |
<select id="<?php echo esc_attr( $args['id'] ); ?>" name="<?php echo esc_attr( sprintf( '%s[%s]', $args['page'], $args['id'] ) ); ?>">
|
869 |
|
894 |
$value = self::get_option( $args['id'] );
|
895 |
?>
|
896 |
|
897 |
+
<input type="text" name="<?php echo esc_attr( $name ); ?>" id="<?php echo esc_attr( $id ); ?>" value="<?php echo esc_attr( $value ); ?>" class="widefat code" />
|
898 |
|
899 |
+
<?php
|
900 |
+
self::show_description( $args );
|
901 |
}
|
902 |
|
903 |
/**
|
910 |
return;
|
911 |
}
|
912 |
|
913 |
+
$name = sprintf( '%s[%s]', $args['page'], $args['id'] );
|
914 |
+
$label = isset( $args['label'] ) ? $args['label'] : '';
|
915 |
+
|
916 |
+
?>
|
917 |
|
918 |
<label for="<?php echo esc_attr( $name ); ?>">
|
919 |
<input type="checkbox" name="<?php echo esc_attr( $name ); ?>" id="<?php echo esc_attr( $name ); ?>" value="1" <?php checked( self::get_option( $args['id'] ) ); ?> />
|
920 |
<?php echo esc_html( $label ); ?>
|
921 |
</label>
|
922 |
|
923 |
+
<?php
|
924 |
+
self::show_description( $args );
|
925 |
}
|
926 |
|
927 |
/**
|
939 |
<a href="<?php echo esc_url( $args['url'] ); ?>" class="button-secondary"><?php echo esc_html( $args['label'] ); ?></a>
|
940 |
</p>
|
941 |
|
942 |
+
<?php
|
943 |
+
self::show_description( $args );
|
944 |
}
|
945 |
|
946 |
/**
|
949 |
* @param array $args Settings field arguments.
|
950 |
*/
|
951 |
public static function show_description( $args ) {
|
952 |
+
if ( isset( $args['description'] ) ) :
|
953 |
+
?>
|
954 |
|
955 |
<p class="description"><?php echo wp_kses_post( $args['description'] ); ?></p>
|
956 |
|
957 |
+
<?php
|
958 |
+
endif;
|
959 |
}
|
960 |
|
961 |
/**
|
includes/widget.php
CHANGED
@@ -18,10 +18,10 @@ class GEM_Form_Widget extends WP_Widget {
|
|
18 |
public function __construct() {
|
19 |
parent::__construct(
|
20 |
'gem-form',
|
21 |
-
__( 'GoDaddy Email Marketing Form', 'godaddy-email-marketing' ),
|
22 |
array(
|
23 |
'classname' => 'gem-form',
|
24 |
-
'description' => _x( 'Embed GoDaddy Email Marketing signup forms in the sidebar.', 'widget description', 'godaddy-email-marketing' ),
|
25 |
)
|
26 |
);
|
27 |
|
@@ -41,7 +41,7 @@ class GEM_Form_Widget extends WP_Widget {
|
|
41 |
|
42 |
// Set the initial form ID value if one exists.
|
43 |
if ( empty( $instance['form'] ) ) {
|
44 |
-
$forms
|
45 |
$valid_creds = (bool) get_option( 'gem-valid-creds' );
|
46 |
|
47 |
// Create a default form.
|
@@ -56,6 +56,7 @@ class GEM_Form_Widget extends WP_Widget {
|
|
56 |
|
57 |
// Update widget instance with new form ID
|
58 |
$settings = $this->get_settings();
|
|
|
59 |
$settings[ $this->number ] = $instance;
|
60 |
$this->save_settings( $settings );
|
61 |
}
|
@@ -113,7 +114,7 @@ class GEM_Form_Widget extends WP_Widget {
|
|
113 |
'form' => 0,
|
114 |
) );
|
115 |
|
116 |
-
$forms
|
117 |
$valid_creds = (bool) get_option( 'gem-valid-creds' );
|
118 |
|
119 |
// Create a default form.
|
@@ -125,13 +126,13 @@ class GEM_Form_Widget extends WP_Widget {
|
|
125 |
?>
|
126 |
|
127 |
<p>
|
128 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php esc_html_e( 'Title:', 'godaddy-email-marketing' ); ?></label>
|
129 |
<br/>
|
130 |
-
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $instance['title'] ) ?>" />
|
131 |
</p>
|
132 |
|
133 |
<p>
|
134 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'text' ) ); ?>"><?php esc_html_e( 'Additional Text:', 'godaddy-email-marketing' ); ?></label>
|
135 |
<br/>
|
136 |
<textarea class="widefat" rows="3" id="<?php echo esc_attr( $this->get_field_id( 'text' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'text' ) ); ?>"><?php echo esc_textarea( $instance['text'] ); ?></textarea>
|
137 |
</p>
|
@@ -140,9 +141,9 @@ class GEM_Form_Widget extends WP_Widget {
|
|
140 |
|
141 |
<?php if ( ! empty( $forms->signups ) ) : ?>
|
142 |
|
143 |
-
<label for="<?php echo esc_attr( $this->get_field_id( 'form' ) ); ?>"><?php esc_html_e( 'Form:', 'godaddy-email-marketing' ); ?></label>
|
144 |
<br/>
|
145 |
-
<select name="<?php echo esc_attr( $this->get_field_name( 'form' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'form' ) ); ?>" class="widefat" value="<?php echo esc_attr( $instance['form'] ) ?>">
|
146 |
|
147 |
<?php foreach ( $forms->signups as $form ) : ?>
|
148 |
<option value="<?php echo esc_attr( $form->id ); ?>" <?php selected( $instance['form'], $form->id ); ?>><?php echo esc_html( $form->name ); ?></option>
|
@@ -152,14 +153,19 @@ class GEM_Form_Widget extends WP_Widget {
|
|
152 |
|
153 |
<?php else : ?>
|
154 |
|
155 |
-
<span
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
|
|
|
|
|
|
|
|
|
|
163 |
|
164 |
<?php endif; ?>
|
165 |
|
18 |
public function __construct() {
|
19 |
parent::__construct(
|
20 |
'gem-form',
|
21 |
+
__( 'GoDaddy Email Marketing Form', 'godaddy-email-marketing-sign-up-forms' ),
|
22 |
array(
|
23 |
'classname' => 'gem-form',
|
24 |
+
'description' => _x( 'Embed GoDaddy Email Marketing signup forms in the sidebar.', 'widget description', 'godaddy-email-marketing-sign-up-forms' ),
|
25 |
)
|
26 |
);
|
27 |
|
41 |
|
42 |
// Set the initial form ID value if one exists.
|
43 |
if ( empty( $instance['form'] ) ) {
|
44 |
+
$forms = GEM_Dispatcher::get_forms();
|
45 |
$valid_creds = (bool) get_option( 'gem-valid-creds' );
|
46 |
|
47 |
// Create a default form.
|
56 |
|
57 |
// Update widget instance with new form ID
|
58 |
$settings = $this->get_settings();
|
59 |
+
|
60 |
$settings[ $this->number ] = $instance;
|
61 |
$this->save_settings( $settings );
|
62 |
}
|
114 |
'form' => 0,
|
115 |
) );
|
116 |
|
117 |
+
$forms = GEM_Dispatcher::get_forms();
|
118 |
$valid_creds = (bool) get_option( 'gem-valid-creds' );
|
119 |
|
120 |
// Create a default form.
|
126 |
?>
|
127 |
|
128 |
<p>
|
129 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php esc_html_e( 'Title:', 'godaddy-email-marketing-sign-up-forms' ); ?></label>
|
130 |
<br/>
|
131 |
+
<input class="widefat" id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $instance['title'] ); ?>" />
|
132 |
</p>
|
133 |
|
134 |
<p>
|
135 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'text' ) ); ?>"><?php esc_html_e( 'Additional Text:', 'godaddy-email-marketing-sign-up-forms' ); ?></label>
|
136 |
<br/>
|
137 |
<textarea class="widefat" rows="3" id="<?php echo esc_attr( $this->get_field_id( 'text' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'text' ) ); ?>"><?php echo esc_textarea( $instance['text'] ); ?></textarea>
|
138 |
</p>
|
141 |
|
142 |
<?php if ( ! empty( $forms->signups ) ) : ?>
|
143 |
|
144 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'form' ) ); ?>"><?php esc_html_e( 'Form:', 'godaddy-email-marketing-sign-up-forms' ); ?></label>
|
145 |
<br/>
|
146 |
+
<select name="<?php echo esc_attr( $this->get_field_name( 'form' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'form' ) ); ?>" class="widefat" value="<?php echo esc_attr( $instance['form'] ); ?>">
|
147 |
|
148 |
<?php foreach ( $forms->signups as $form ) : ?>
|
149 |
<option value="<?php echo esc_attr( $form->id ); ?>" <?php selected( $instance['form'], $form->id ); ?>><?php echo esc_html( $form->name ); ?></option>
|
153 |
|
154 |
<?php else : ?>
|
155 |
|
156 |
+
<span>
|
157 |
+
<?php
|
158 |
+
printf(
|
159 |
+
/* translators: %s: link to settings page */
|
160 |
+
esc_html__( 'Please set up your GoDaddy Email Marketing account in the %s.', 'godaddy-email-marketing-sign-up-forms' ),
|
161 |
+
sprintf(
|
162 |
+
'<a href="%s">%s</a>',
|
163 |
+
esc_url( admin_url( 'options-general.php?page=gem-settings' ) ),
|
164 |
+
esc_html__( 'settings page', 'godaddy-email-marketing-sign-up-forms' )
|
165 |
+
)
|
166 |
+
);
|
167 |
+
?>
|
168 |
+
</span>
|
169 |
|
170 |
<?php endif; ?>
|
171 |
|
js/gem.js
CHANGED
@@ -97,6 +97,10 @@
|
|
97 |
|
98 |
// Empty required field.
|
99 |
invalidElements.push( $( this ) );
|
|
|
|
|
|
|
|
|
100 |
} else if ( $( this ).is( 'label' ) ) {
|
101 |
|
102 |
// Empty radio.
|
97 |
|
98 |
// Empty required field.
|
99 |
invalidElements.push( $( this ) );
|
100 |
+
} else if ( $( this ).is( 'input[type="checkbox"]' ) && ! $( this ).is( ':checked' ) ) {
|
101 |
+
|
102 |
+
// Empty checkbox.
|
103 |
+
invalidElements.push( $( this ) );
|
104 |
} else if ( $( this ).is( 'label' ) ) {
|
105 |
|
106 |
// Empty radio.
|
js/gem.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){"use strict";var
|
1 |
+
!function(e){"use strict";var i=window.GEM||{};i.DEBUG_FLAG=!0,i.init=function(){e("form.gem-form").submit(function(t){var a,s,n,r,u,h=e(this),c=e(".gem-spinner",h),d=h.find(".gem-error, .gem-info"),o=[],l=[];t.preventDefault(),e(this).find("input[type=checkbox]").each(function(){var i=e(this).data("name");s!==i&&(s=i,n=e('input:checkbox[data-name="'+i+'"]:checked').map(function(){return this.value}).get().join(", "),e('input[name="'+i+'"]').val(n))}),e(this).find("[fingerprint=date]").each(function(){var i=e(this).data("name");r!==i&&(r=i,e('select[data-name="'+i+'"]').each(function(){var i=e(this).val();i&&l.push(i)}),3===l.length&&(u=l[0]+" "+l[1]+", "+l[2],e('input[name="'+i+'"]').val(u)))}),a=e(this).serialize(),h.find("input.gem-invalid").removeClass("gem-invalid"),e(this).find(".gem-required").each(function(){var t=e(this).val();"signup[email]"!==e(this).attr("name")||i.isEmail(t)?""===t&&e(this).is("input")?o.push(e(this)):e(this).is('input[type="checkbox"]')&&!e(this).is(":checked")?o.push(e(this)):e(this).is("label")&&void 0===e('input:radio[name="'+e(this).data("name")+'"]:checked').val()&&o.push(e(this)):o.push(e(this))}),0===o.length?(c.css("display","inline-block"),e.post(h.attr("action")+".json",a,function(e){h.fadeOut("fast",function(){var t;e.success?(t=e.result.audience_member.suppressed,e.result.has_redirect&&(window.location.href=e.result.redirect),h.html(i.addMessage(t?["suppressed","success"]:["info","success"],t?i.thankyou_suppressed:i.thankyou)).fadeIn("fast")):h.html(i.addMessage("info",i.oops)).fadeIn("fast")})},"jsonp")):(0!==d.length&&d.remove(),e(o.reverse()).each(function(){var t="";e(this).addClass("gem-invalid"),"signup[email]"===e(this).attr("name")?t=""===e(this).val()?i.required.replace("%s",e(this).data("label")):i.email:e(this).data("label")&&(t=i.required.replace("%s",e(this).data("label"))),t&&h.prepend(i.addMessage("error",t))}))})},i.addMessage=function(i,t){var a=[];return e.isArray(i)?e.each(i,function(e,i){a.push("gem-"+i)}):a.push("gem-"+i.toString()),e("<p/>",{class:a.join(" ")}).text(t)},i.isEmail=function(e){return/^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(e)},e(document).ready(i.init)}(jQuery);
|
languages/{godaddy-email-marketing-da_DK.mo → godaddy-email-marketing-sign-up-forms-da_DK.mo}
RENAMED
File without changes
|
languages/{godaddy-email-marketing-de_DE.mo → godaddy-email-marketing-sign-up-forms-de_DE.mo}
RENAMED
File without changes
|
languages/{godaddy-email-marketing-el.mo → godaddy-email-marketing-sign-up-forms-el.mo}
RENAMED
File without changes
|
languages/{godaddy-email-marketing-es_ES.mo → godaddy-email-marketing-sign-up-forms-es_ES.mo}
RENAMED
File without changes
|
languages/{godaddy-email-marketing-es_MX.mo → godaddy-email-marketing-sign-up-forms-es_MX.mo}
RENAMED
File without changes
|
languages/{godaddy-email-marketing-fi.mo → godaddy-email-marketing-sign-up-forms-fi.mo}
RENAMED
File without changes
|
languages/{godaddy-email-marketing-fr_FR.mo → godaddy-email-marketing-sign-up-forms-fr_FR.mo}
RENAMED
File without changes
|
languages/{godaddy-email-marketing-hi_IN.mo → godaddy-email-marketing-sign-up-forms-hi_IN.mo}
RENAMED
File without changes
|
languages/{godaddy-email-marketing-id_ID.mo → godaddy-email-marketing-sign-up-forms-id_ID.mo}
RENAMED
File without changes
|
languages/{godaddy-email-marketing-it_IT.mo → godaddy-email-marketing-sign-up-forms-it_IT.mo}
RENAMED
File without changes
|
languages/{godaddy-email-marketing-ja.mo → godaddy-email-marketing-sign-up-forms-ja.mo}
RENAMED
File without changes
|
languages/{godaddy-email-marketing-ko_KR.mo → godaddy-email-marketing-sign-up-forms-ko_KR.mo}
RENAMED
File without changes
|
languages/{godaddy-email-marketing-mr.mo → godaddy-email-marketing-sign-up-forms-mr.mo}
RENAMED
File without changes
|
languages/{godaddy-email-marketing-ms_MY.mo → godaddy-email-marketing-sign-up-forms-ms_MY.mo}
RENAMED
File without changes
|
languages/{godaddy-email-marketing-nb_NO.mo → godaddy-email-marketing-sign-up-forms-nb_NO.mo}
RENAMED
File without changes
|
languages/{godaddy-email-marketing-nl_NL.mo → godaddy-email-marketing-sign-up-forms-nl_NL.mo}
RENAMED
File without changes
|
languages/{godaddy-email-marketing-pl_PL.mo → godaddy-email-marketing-sign-up-forms-pl_PL.mo}
RENAMED
File without changes
|
languages/{godaddy-email-marketing-pt_BR.mo → godaddy-email-marketing-sign-up-forms-pt_BR.mo}
RENAMED
File without changes
|
languages/{godaddy-email-marketing-pt_PT.mo → godaddy-email-marketing-sign-up-forms-pt_PT.mo}
RENAMED
File without changes
|
languages/{godaddy-email-marketing-ru_RU.mo → godaddy-email-marketing-sign-up-forms-ru_RU.mo}
RENAMED
File without changes
|
languages/{godaddy-email-marketing-sv_SE.mo → godaddy-email-marketing-sign-up-forms-sv_SE.mo}
RENAMED
File without changes
|
languages/{godaddy-email-marketing-th.mo → godaddy-email-marketing-sign-up-forms-th.mo}
RENAMED
File without changes
|
languages/{godaddy-email-marketing-tl.mo → godaddy-email-marketing-sign-up-forms-tl.mo}
RENAMED
File without changes
|
languages/{godaddy-email-marketing-tr_TR.mo → godaddy-email-marketing-sign-up-forms-tr_TR.mo}
RENAMED
File without changes
|
languages/{godaddy-email-marketing-uk.mo → godaddy-email-marketing-sign-up-forms-uk.mo}
RENAMED
File without changes
|
languages/{godaddy-email-marketing-vi.mo → godaddy-email-marketing-sign-up-forms-vi.mo}
RENAMED
File without changes
|
languages/{godaddy-email-marketing-zh_CN.mo → godaddy-email-marketing-sign-up-forms-zh_CN.mo}
RENAMED
File without changes
|
languages/{godaddy-email-marketing-zh_HK.mo → godaddy-email-marketing-sign-up-forms-zh_HK.mo}
RENAMED
File without changes
|
languages/{godaddy-email-marketing-zh_TW.mo → godaddy-email-marketing-sign-up-forms-zh_TW.mo}
RENAMED
File without changes
|
languages/{godaddy-email-marketing.pot → godaddy-email-marketing-sign-up-forms.pot}
RENAMED
@@ -1,20 +1,20 @@
|
|
1 |
-
# Copyright (c)
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
-
"Project-Id-Version: GoDaddy Email Marketing 1.2.
|
5 |
"Report-Msgid-Bugs-To: "
|
6 |
"https://github.com/godaddy/wp-godaddy-email-marketing/issues\n"
|
7 |
-
"POT-Creation-Date:
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
-
"PO-Revision-Date:
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
"X-Poedit-KeywordsList: "
|
15 |
"__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_"
|
16 |
"attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;\n"
|
17 |
-
"X-Generator: grunt-wp-i18n1.0.
|
18 |
|
19 |
#: godaddy-email-marketing.php:201
|
20 |
msgid "Thank you for signing up!"
|
@@ -34,27 +34,33 @@ msgstr ""
|
|
34 |
msgid "Please enter a valid email address."
|
35 |
msgstr ""
|
36 |
|
37 |
-
#: godaddy-email-marketing.php:
|
|
|
|
|
|
|
|
|
|
|
38 |
msgid "Settings"
|
39 |
msgstr ""
|
40 |
|
41 |
-
#: godaddy-email-marketing.php:
|
|
|
42 |
msgid "Your website has a superpower: Email marketing. %1$s."
|
43 |
msgstr ""
|
44 |
|
45 |
-
#: godaddy-email-marketing.php:
|
46 |
msgid "Learn More"
|
47 |
msgstr ""
|
48 |
|
49 |
-
#: godaddy-email-marketing.php:
|
50 |
msgid "GoDaddy Email Marketing is almost ready."
|
51 |
msgstr ""
|
52 |
|
53 |
-
#: godaddy-email-marketing.php:
|
54 |
msgid "You must enter your username & API key for it to work."
|
55 |
msgstr ""
|
56 |
|
57 |
-
#: godaddy-email-marketing.php:
|
58 |
msgid "Let's do it!"
|
59 |
msgstr ""
|
60 |
|
@@ -70,115 +76,116 @@ msgstr ""
|
|
70 |
msgid "Choose one of the available forms."
|
71 |
msgstr ""
|
72 |
|
73 |
-
#: includes/render.php:
|
74 |
msgid "Powered by GoDaddy"
|
75 |
msgstr ""
|
76 |
|
77 |
-
#: includes/render.php:
|
78 |
msgid "Month"
|
79 |
msgstr ""
|
80 |
|
81 |
-
#: includes/render.php:
|
82 |
msgid "January"
|
83 |
msgstr ""
|
84 |
|
85 |
-
#: includes/render.php:
|
86 |
msgid "Febuary"
|
87 |
msgstr ""
|
88 |
|
89 |
-
#: includes/render.php:
|
90 |
msgid "March"
|
91 |
msgstr ""
|
92 |
|
93 |
-
#: includes/render.php:
|
94 |
msgid "April"
|
95 |
msgstr ""
|
96 |
|
97 |
-
#: includes/render.php:
|
98 |
msgid "May"
|
99 |
msgstr ""
|
100 |
|
101 |
-
#: includes/render.php:
|
102 |
msgid "June"
|
103 |
msgstr ""
|
104 |
|
105 |
-
#: includes/render.php:
|
106 |
msgid "July"
|
107 |
msgstr ""
|
108 |
|
109 |
-
#: includes/render.php:
|
110 |
msgid "August"
|
111 |
msgstr ""
|
112 |
|
113 |
-
#: includes/render.php:
|
114 |
msgid "September"
|
115 |
msgstr ""
|
116 |
|
117 |
-
#: includes/render.php:
|
118 |
msgid "October"
|
119 |
msgstr ""
|
120 |
|
121 |
-
#: includes/render.php:
|
122 |
msgid "November"
|
123 |
msgstr ""
|
124 |
|
125 |
-
#: includes/render.php:
|
126 |
msgid "December"
|
127 |
msgstr ""
|
128 |
|
129 |
-
#: includes/render.php:
|
130 |
msgid "Day"
|
131 |
msgstr ""
|
132 |
|
133 |
-
#: includes/render.php:
|
134 |
msgid "Year"
|
135 |
msgstr ""
|
136 |
|
137 |
-
#: includes/settings.php:
|
138 |
msgid "GoDaddy Email Marketing Signup Forms"
|
139 |
msgstr ""
|
140 |
|
141 |
-
#: includes/settings.php:
|
142 |
msgid "All data has been removed."
|
143 |
msgstr ""
|
144 |
|
145 |
-
#: includes/settings.php:
|
146 |
msgid "All transients were removed."
|
147 |
msgstr ""
|
148 |
|
149 |
-
#: includes/settings.php:
|
150 |
msgid "Forms list was successfully updated."
|
151 |
msgstr ""
|
152 |
|
153 |
-
#: includes/settings.php:
|
154 |
msgid ""
|
155 |
"The credentials are incorrect! Please verify that you have entered them "
|
156 |
"correctly."
|
157 |
msgstr ""
|
158 |
|
159 |
-
#: includes/settings.php:
|
160 |
msgid ""
|
161 |
"Connection with GoDaddy Email Marketing has been established! You're all "
|
162 |
"set!"
|
163 |
msgstr ""
|
164 |
|
165 |
-
#: includes/settings.php:
|
166 |
msgid "Settings have been updated."
|
167 |
msgstr ""
|
168 |
|
169 |
-
#: includes/settings.php:
|
170 |
msgid "Please fill in the username and the API key first."
|
171 |
msgstr ""
|
172 |
|
173 |
-
#: includes/settings.php:
|
174 |
msgid "Overview"
|
175 |
msgstr ""
|
176 |
|
177 |
-
#: includes/settings.php:
|
178 |
msgid "Instructions"
|
179 |
msgstr ""
|
180 |
|
181 |
-
#: includes/settings.php:
|
|
|
182 |
msgid ""
|
183 |
"Once the plugin is activated, you will be able to select and insert any of "
|
184 |
"your GoDaddy Email Marketing webforms right into your site. Setup is easy. "
|
@@ -187,27 +194,29 @@ msgid ""
|
|
187 |
"display a webform on your site:"
|
188 |
msgstr ""
|
189 |
|
190 |
-
#: includes/settings.php:
|
191 |
msgid ""
|
192 |
"<strong>Widget:</strong> Go to Appearance → widgets and find the "
|
193 |
"widget called “GoDaddy Email Marketing Form” and drag it into the widget "
|
194 |
"area of your choice. You can then add a title and select a form!"
|
195 |
msgstr ""
|
196 |
|
197 |
-
#: includes/settings.php:
|
198 |
msgid ""
|
199 |
"<strong>Shortcode:</strong> You can add a form to any post or page by "
|
200 |
"adding the shortcode (ex. <code>[gem id=80326]</code>) in the page/post "
|
201 |
"editor."
|
202 |
msgstr ""
|
203 |
|
204 |
-
#: includes/settings.php:
|
|
|
|
|
205 |
msgid ""
|
206 |
"<strong>Template Tag:</strong> You can add the following template tag into "
|
207 |
"any WordPress file: <code>%1$s</code>. Ex. <code>%2$s</code>"
|
208 |
msgstr ""
|
209 |
|
210 |
-
#: includes/settings.php:
|
211 |
msgid "For more information:"
|
212 |
msgstr ""
|
213 |
|
@@ -215,69 +224,69 @@ msgstr ""
|
|
215 |
msgid "GoDaddy"
|
216 |
msgstr ""
|
217 |
|
218 |
-
#: includes/settings.php:
|
219 |
msgid "GoDaddy Help"
|
220 |
msgstr ""
|
221 |
|
222 |
-
#: includes/settings.php:
|
223 |
msgid "Contact GoDaddy"
|
224 |
msgstr ""
|
225 |
|
226 |
-
#: includes/settings.php:
|
227 |
msgid "Account Details"
|
228 |
msgstr ""
|
229 |
|
230 |
-
#: includes/settings.php:
|
231 |
msgid "Username"
|
232 |
msgstr ""
|
233 |
|
234 |
-
#: includes/settings.php:
|
235 |
msgid "API Key"
|
236 |
msgstr ""
|
237 |
|
238 |
-
#: includes/settings.php:
|
239 |
msgid "Footer Link"
|
240 |
msgstr ""
|
241 |
|
242 |
-
#: includes/settings.php:
|
243 |
msgid "Display \"Powered by GoDaddy\"?"
|
244 |
msgstr ""
|
245 |
|
246 |
-
#: includes/settings.php:
|
247 |
msgid "Debugging"
|
248 |
msgstr ""
|
249 |
|
250 |
-
#: includes/settings.php:
|
251 |
msgid "Debug Mode"
|
252 |
msgstr ""
|
253 |
|
254 |
-
#: includes/settings.php:
|
255 |
msgid "Activated"
|
256 |
msgstr ""
|
257 |
|
258 |
-
#: includes/settings.php:
|
259 |
msgid "Cache Reset"
|
260 |
msgstr ""
|
261 |
|
262 |
-
#: includes/settings.php:
|
263 |
msgid "Erase Transients"
|
264 |
msgstr ""
|
265 |
|
266 |
-
#: includes/settings.php:
|
267 |
msgid ""
|
268 |
"Purges only the cached data associated with this plugin, and should be "
|
269 |
"attempted before a hard reset."
|
270 |
msgstr ""
|
271 |
|
272 |
-
#: includes/settings.php:
|
273 |
msgid "Hard Reset"
|
274 |
msgstr ""
|
275 |
|
276 |
-
#: includes/settings.php:
|
277 |
msgid "Erase All Data"
|
278 |
msgstr ""
|
279 |
|
280 |
-
#: includes/settings.php:
|
281 |
msgid "Purges all saved data associated with this plugin."
|
282 |
msgstr ""
|
283 |
|
@@ -293,7 +302,8 @@ msgstr ""
|
|
293 |
msgid "Reach Your Fans"
|
294 |
msgstr ""
|
295 |
|
296 |
-
#: includes/settings.php:
|
|
|
297 |
msgid ""
|
298 |
"Email marketing makes it easier than ever to turn casual visits into "
|
299 |
"lasting relationship. You're already collecting subscribers, now you just "
|
@@ -301,76 +311,95 @@ msgid ""
|
|
301 |
"email marketing campaign%2$s."
|
302 |
msgstr ""
|
303 |
|
304 |
-
#: includes/settings.php:
|
305 |
msgid "Available Signup Forms"
|
306 |
msgstr ""
|
307 |
|
308 |
-
#: includes/settings.php:
|
309 |
-
#: includes/settings.php:
|
310 |
msgid "Form Name"
|
311 |
msgstr ""
|
312 |
|
313 |
-
#: includes/settings.php:
|
314 |
-
#: includes/settings.php:
|
315 |
msgid "Form ID"
|
316 |
msgstr ""
|
317 |
|
318 |
-
#: includes/settings.php:
|
319 |
-
#: includes/settings.php:
|
320 |
msgid "Shortcode"
|
321 |
msgstr ""
|
322 |
|
323 |
-
#: includes/settings.php:
|
324 |
msgid "Opens in a new window"
|
325 |
msgstr ""
|
326 |
|
327 |
-
#: includes/settings.php:
|
328 |
msgid "Edit form in GoDaddy Email Marketing"
|
329 |
msgstr ""
|
330 |
|
331 |
-
#: includes/settings.php:
|
332 |
msgid "Preview"
|
333 |
msgstr ""
|
334 |
|
335 |
-
#: includes/settings.php:
|
336 |
msgid "Not seeing your form?"
|
337 |
msgstr ""
|
338 |
|
339 |
-
#: includes/settings.php:
|
340 |
msgid "Refresh Forms"
|
341 |
msgstr ""
|
342 |
|
343 |
-
#: includes/settings.php:
|
344 |
msgid "Create a New Signup Form"
|
345 |
msgstr ""
|
346 |
|
347 |
-
#: includes/settings.php:
|
348 |
msgid "Create a New Campaign"
|
349 |
msgstr ""
|
350 |
|
351 |
-
#: includes/settings.php:
|
352 |
msgid ""
|
353 |
"If you are experiencing issues and are unsure of the cause, you may want to "
|
354 |
"activate debug mode, which displays additional options."
|
355 |
msgstr ""
|
356 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
357 |
#: includes/widget.php:21
|
358 |
msgid "GoDaddy Email Marketing Form"
|
359 |
msgstr ""
|
360 |
|
361 |
-
#: includes/widget.php:
|
362 |
msgid "Title:"
|
363 |
msgstr ""
|
364 |
|
365 |
-
#: includes/widget.php:
|
366 |
msgid "Additional Text:"
|
367 |
msgstr ""
|
368 |
|
369 |
-
#: includes/widget.php:
|
370 |
msgid "Form:"
|
371 |
msgstr ""
|
372 |
|
373 |
#: includes/widget.php:160
|
|
|
|
|
|
|
|
|
|
|
374 |
msgid "settings page"
|
375 |
msgstr ""
|
376 |
|
@@ -385,12 +414,7 @@ msgid ""
|
|
385 |
"lists."
|
386 |
msgstr ""
|
387 |
|
388 |
-
#:
|
389 |
-
msgctxt "Name of required field"
|
390 |
-
msgid "%s is a required field."
|
391 |
-
msgstr ""
|
392 |
-
|
393 |
-
#: includes/settings.php:96
|
394 |
msgctxt "failed copy response"
|
395 |
msgid "Please press Ctrl/Cmd+C to copy."
|
396 |
msgstr ""
|
@@ -414,6 +438,7 @@ msgid "You don't have any forms yet."
|
|
414 |
msgstr ""
|
415 |
|
416 |
#: includes/settings.php:599
|
|
|
417 |
msgctxt "Sign up button"
|
418 |
msgid "New to GoDaddy? Create an account to get started today. %s"
|
419 |
msgstr ""
|
@@ -423,26 +448,12 @@ msgctxt "header button"
|
|
423 |
msgid "Sign Up Now"
|
424 |
msgstr ""
|
425 |
|
426 |
-
#: includes/settings.php:
|
427 |
msgctxt "save settings button"
|
428 |
msgid "Save Settings"
|
429 |
msgstr ""
|
430 |
|
431 |
-
#: includes/settings.php:
|
432 |
-
msgctxt "1. Sign-in link, 2. Sign-up link"
|
433 |
-
msgid ""
|
434 |
-
"For this plugin to work, it needs to access your GoDaddy Email Marketing "
|
435 |
-
"account. %1$s to get your username and API key. Copy and paste them below; "
|
436 |
-
"then click \"Save Settings.\" If you don't have a GoDaddy Email Marketing "
|
437 |
-
"account, %2$s."
|
438 |
-
msgstr ""
|
439 |
-
|
440 |
-
#: includes/settings.php:851
|
441 |
-
msgctxt "account details link"
|
442 |
-
msgid "Sign in here"
|
443 |
-
msgstr ""
|
444 |
-
|
445 |
-
#: includes/settings.php:851
|
446 |
msgctxt "account details link"
|
447 |
msgid "sign up here"
|
448 |
msgstr ""
|
@@ -450,9 +461,4 @@ msgstr ""
|
|
450 |
#: includes/widget.php:24
|
451 |
msgctxt "widget description"
|
452 |
msgid "Embed GoDaddy Email Marketing signup forms in the sidebar."
|
453 |
-
msgstr ""
|
454 |
-
|
455 |
-
#: includes/widget.php:156
|
456 |
-
msgctxt "link to settings page"
|
457 |
-
msgid "Please set up your GoDaddy Email Marketing account in the %s."
|
458 |
msgstr ""
|
1 |
+
# Copyright (c) 2018 GoDaddy Operating Company, LLC. All Rights Reserved.
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
+
"Project-Id-Version: GoDaddy Email Marketing 1.2.1\n"
|
5 |
"Report-Msgid-Bugs-To: "
|
6 |
"https://github.com/godaddy/wp-godaddy-email-marketing/issues\n"
|
7 |
+
"POT-Creation-Date: 2018-06-25 22:52:37+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2018-MO-DA HO:MI+ZONE\n"
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
"X-Poedit-KeywordsList: "
|
15 |
"__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_"
|
16 |
"attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;\n"
|
17 |
+
"X-Generator: grunt-wp-i18n1.0.2\n"
|
18 |
|
19 |
#: godaddy-email-marketing.php:201
|
20 |
msgid "Thank you for signing up!"
|
34 |
msgid "Please enter a valid email address."
|
35 |
msgstr ""
|
36 |
|
37 |
+
#: godaddy-email-marketing.php:206
|
38 |
+
#. translators: %s: Name of required field
|
39 |
+
msgid "%s is a required field."
|
40 |
+
msgstr ""
|
41 |
+
|
42 |
+
#: godaddy-email-marketing.php:220 includes/settings.php:611
|
43 |
msgid "Settings"
|
44 |
msgstr ""
|
45 |
|
46 |
+
#: godaddy-email-marketing.php:251
|
47 |
+
#. translators: %1$s: Link to plugin settings page with text 'Learn More'.
|
48 |
msgid "Your website has a superpower: Email marketing. %1$s."
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: godaddy-email-marketing.php:252
|
52 |
msgid "Learn More"
|
53 |
msgstr ""
|
54 |
|
55 |
+
#: godaddy-email-marketing.php:278
|
56 |
msgid "GoDaddy Email Marketing is almost ready."
|
57 |
msgstr ""
|
58 |
|
59 |
+
#: godaddy-email-marketing.php:278
|
60 |
msgid "You must enter your username & API key for it to work."
|
61 |
msgstr ""
|
62 |
|
63 |
+
#: godaddy-email-marketing.php:279
|
64 |
msgid "Let's do it!"
|
65 |
msgstr ""
|
66 |
|
76 |
msgid "Choose one of the available forms."
|
77 |
msgstr ""
|
78 |
|
79 |
+
#: includes/render.php:75
|
80 |
msgid "Powered by GoDaddy"
|
81 |
msgstr ""
|
82 |
|
83 |
+
#: includes/render.php:343
|
84 |
msgid "Month"
|
85 |
msgstr ""
|
86 |
|
87 |
+
#: includes/render.php:344
|
88 |
msgid "January"
|
89 |
msgstr ""
|
90 |
|
91 |
+
#: includes/render.php:345
|
92 |
msgid "Febuary"
|
93 |
msgstr ""
|
94 |
|
95 |
+
#: includes/render.php:346
|
96 |
msgid "March"
|
97 |
msgstr ""
|
98 |
|
99 |
+
#: includes/render.php:347
|
100 |
msgid "April"
|
101 |
msgstr ""
|
102 |
|
103 |
+
#: includes/render.php:348
|
104 |
msgid "May"
|
105 |
msgstr ""
|
106 |
|
107 |
+
#: includes/render.php:349
|
108 |
msgid "June"
|
109 |
msgstr ""
|
110 |
|
111 |
+
#: includes/render.php:350
|
112 |
msgid "July"
|
113 |
msgstr ""
|
114 |
|
115 |
+
#: includes/render.php:351
|
116 |
msgid "August"
|
117 |
msgstr ""
|
118 |
|
119 |
+
#: includes/render.php:352
|
120 |
msgid "September"
|
121 |
msgstr ""
|
122 |
|
123 |
+
#: includes/render.php:353
|
124 |
msgid "October"
|
125 |
msgstr ""
|
126 |
|
127 |
+
#: includes/render.php:354
|
128 |
msgid "November"
|
129 |
msgstr ""
|
130 |
|
131 |
+
#: includes/render.php:355
|
132 |
msgid "December"
|
133 |
msgstr ""
|
134 |
|
135 |
+
#: includes/render.php:360
|
136 |
msgid "Day"
|
137 |
msgstr ""
|
138 |
|
139 |
+
#: includes/render.php:368
|
140 |
msgid "Year"
|
141 |
msgstr ""
|
142 |
|
143 |
+
#: includes/settings.php:61 includes/settings.php:583
|
144 |
msgid "GoDaddy Email Marketing Signup Forms"
|
145 |
msgstr ""
|
146 |
|
147 |
+
#: includes/settings.php:244
|
148 |
msgid "All data has been removed."
|
149 |
msgstr ""
|
150 |
|
151 |
+
#: includes/settings.php:248
|
152 |
msgid "All transients were removed."
|
153 |
msgstr ""
|
154 |
|
155 |
+
#: includes/settings.php:252
|
156 |
msgid "Forms list was successfully updated."
|
157 |
msgstr ""
|
158 |
|
159 |
+
#: includes/settings.php:256
|
160 |
msgid ""
|
161 |
"The credentials are incorrect! Please verify that you have entered them "
|
162 |
"correctly."
|
163 |
msgstr ""
|
164 |
|
165 |
+
#: includes/settings.php:260
|
166 |
msgid ""
|
167 |
"Connection with GoDaddy Email Marketing has been established! You're all "
|
168 |
"set!"
|
169 |
msgstr ""
|
170 |
|
171 |
+
#: includes/settings.php:265
|
172 |
msgid "Settings have been updated."
|
173 |
msgstr ""
|
174 |
|
175 |
+
#: includes/settings.php:269
|
176 |
msgid "Please fill in the username and the API key first."
|
177 |
msgstr ""
|
178 |
|
179 |
+
#: includes/settings.php:301
|
180 |
msgid "Overview"
|
181 |
msgstr ""
|
182 |
|
183 |
+
#: includes/settings.php:305
|
184 |
msgid "Instructions"
|
185 |
msgstr ""
|
186 |
|
187 |
+
#: includes/settings.php:308
|
188 |
+
#. translators: %s: link to GoDaddy Email Marketing account page
|
189 |
msgid ""
|
190 |
"Once the plugin is activated, you will be able to select and insert any of "
|
191 |
"your GoDaddy Email Marketing webforms right into your site. Setup is easy. "
|
194 |
"display a webform on your site:"
|
195 |
msgstr ""
|
196 |
|
197 |
+
#: includes/settings.php:311
|
198 |
msgid ""
|
199 |
"<strong>Widget:</strong> Go to Appearance → widgets and find the "
|
200 |
"widget called “GoDaddy Email Marketing Form” and drag it into the widget "
|
201 |
"area of your choice. You can then add a title and select a form!"
|
202 |
msgstr ""
|
203 |
|
204 |
+
#: includes/settings.php:312
|
205 |
msgid ""
|
206 |
"<strong>Shortcode:</strong> You can add a form to any post or page by "
|
207 |
"adding the shortcode (ex. <code>[gem id=80326]</code>) in the page/post "
|
208 |
"editor."
|
209 |
msgstr ""
|
210 |
|
211 |
+
#: includes/settings.php:315
|
212 |
+
#. translators: %1$s: <?php gem_form( $form_id ); ?>, %2$s: <?php
|
213 |
+
#. gem_form( 91 ); ?>
|
214 |
msgid ""
|
215 |
"<strong>Template Tag:</strong> You can add the following template tag into "
|
216 |
"any WordPress file: <code>%1$s</code>. Ex. <code>%2$s</code>"
|
217 |
msgstr ""
|
218 |
|
219 |
+
#: includes/settings.php:325
|
220 |
msgid "For more information:"
|
221 |
msgstr ""
|
222 |
|
224 |
msgid "GoDaddy"
|
225 |
msgstr ""
|
226 |
|
227 |
+
#: includes/settings.php:327
|
228 |
msgid "GoDaddy Help"
|
229 |
msgstr ""
|
230 |
|
231 |
+
#: includes/settings.php:328
|
232 |
msgid "Contact GoDaddy"
|
233 |
msgstr ""
|
234 |
|
235 |
+
#: includes/settings.php:353
|
236 |
msgid "Account Details"
|
237 |
msgstr ""
|
238 |
|
239 |
+
#: includes/settings.php:360
|
240 |
msgid "Username"
|
241 |
msgstr ""
|
242 |
|
243 |
+
#: includes/settings.php:374
|
244 |
msgid "API Key"
|
245 |
msgstr ""
|
246 |
|
247 |
+
#: includes/settings.php:388
|
248 |
msgid "Footer Link"
|
249 |
msgstr ""
|
250 |
|
251 |
+
#: includes/settings.php:395
|
252 |
msgid "Display \"Powered by GoDaddy\"?"
|
253 |
msgstr ""
|
254 |
|
255 |
+
#: includes/settings.php:402
|
256 |
msgid "Debugging"
|
257 |
msgstr ""
|
258 |
|
259 |
+
#: includes/settings.php:409
|
260 |
msgid "Debug Mode"
|
261 |
msgstr ""
|
262 |
|
263 |
+
#: includes/settings.php:416
|
264 |
msgid "Activated"
|
265 |
msgstr ""
|
266 |
|
267 |
+
#: includes/settings.php:424
|
268 |
msgid "Cache Reset"
|
269 |
msgstr ""
|
270 |
|
271 |
+
#: includes/settings.php:433
|
272 |
msgid "Erase Transients"
|
273 |
msgstr ""
|
274 |
|
275 |
+
#: includes/settings.php:434
|
276 |
msgid ""
|
277 |
"Purges only the cached data associated with this plugin, and should be "
|
278 |
"attempted before a hard reset."
|
279 |
msgstr ""
|
280 |
|
281 |
+
#: includes/settings.php:440
|
282 |
msgid "Hard Reset"
|
283 |
msgstr ""
|
284 |
|
285 |
+
#: includes/settings.php:449
|
286 |
msgid "Erase All Data"
|
287 |
msgstr ""
|
288 |
|
289 |
+
#: includes/settings.php:450
|
290 |
msgid "Purges all saved data associated with this plugin."
|
291 |
msgstr ""
|
292 |
|
302 |
msgid "Reach Your Fans"
|
303 |
msgstr ""
|
304 |
|
305 |
+
#: includes/settings.php:623
|
306 |
+
#. translators: %1$s: <a href="https:gem.godaddy.com">, %2$s: </a>
|
307 |
msgid ""
|
308 |
"Email marketing makes it easier than ever to turn casual visits into "
|
309 |
"lasting relationship. You're already collecting subscribers, now you just "
|
311 |
"email marketing campaign%2$s."
|
312 |
msgstr ""
|
313 |
|
314 |
+
#: includes/settings.php:629
|
315 |
msgid "Available Signup Forms"
|
316 |
msgstr ""
|
317 |
|
318 |
+
#: includes/settings.php:633 includes/settings.php:640
|
319 |
+
#: includes/settings.php:648
|
320 |
msgid "Form Name"
|
321 |
msgstr ""
|
322 |
|
323 |
+
#: includes/settings.php:634 includes/settings.php:641
|
324 |
+
#: includes/settings.php:662
|
325 |
msgid "Form ID"
|
326 |
msgstr ""
|
327 |
|
328 |
+
#: includes/settings.php:635 includes/settings.php:642
|
329 |
+
#: includes/settings.php:665
|
330 |
msgid "Shortcode"
|
331 |
msgstr ""
|
332 |
|
333 |
+
#: includes/settings.php:652
|
334 |
msgid "Opens in a new window"
|
335 |
msgstr ""
|
336 |
|
337 |
+
#: includes/settings.php:652
|
338 |
msgid "Edit form in GoDaddy Email Marketing"
|
339 |
msgstr ""
|
340 |
|
341 |
+
#: includes/settings.php:655
|
342 |
msgid "Preview"
|
343 |
msgstr ""
|
344 |
|
345 |
+
#: includes/settings.php:678
|
346 |
msgid "Not seeing your form?"
|
347 |
msgstr ""
|
348 |
|
349 |
+
#: includes/settings.php:742
|
350 |
msgid "Refresh Forms"
|
351 |
msgstr ""
|
352 |
|
353 |
+
#: includes/settings.php:749
|
354 |
msgid "Create a New Signup Form"
|
355 |
msgstr ""
|
356 |
|
357 |
+
#: includes/settings.php:756
|
358 |
msgid "Create a New Campaign"
|
359 |
msgstr ""
|
360 |
|
361 |
+
#: includes/settings.php:842
|
362 |
msgid ""
|
363 |
"If you are experiencing issues and are unsure of the cause, you may want to "
|
364 |
"activate debug mode, which displays additional options."
|
365 |
msgstr ""
|
366 |
|
367 |
+
#: includes/settings.php:853
|
368 |
+
#. translators: 1. Sign in here link, 2. Sign up here link
|
369 |
+
msgid ""
|
370 |
+
"For this plugin to work, it needs to access your GoDaddy Email Marketing "
|
371 |
+
"account. %1$s to get your username and API key. Copy and paste them below; "
|
372 |
+
"then click \"Save Settings.\" If you don't have a GoDaddy Email Marketing "
|
373 |
+
"account, %2$s."
|
374 |
+
msgstr ""
|
375 |
+
|
376 |
+
#: includes/settings.php:853
|
377 |
+
#. translators: account details link
|
378 |
+
msgid "Sign in here"
|
379 |
+
msgstr ""
|
380 |
+
|
381 |
#: includes/widget.php:21
|
382 |
msgid "GoDaddy Email Marketing Form"
|
383 |
msgstr ""
|
384 |
|
385 |
+
#: includes/widget.php:129
|
386 |
msgid "Title:"
|
387 |
msgstr ""
|
388 |
|
389 |
+
#: includes/widget.php:135
|
390 |
msgid "Additional Text:"
|
391 |
msgstr ""
|
392 |
|
393 |
+
#: includes/widget.php:144
|
394 |
msgid "Form:"
|
395 |
msgstr ""
|
396 |
|
397 |
#: includes/widget.php:160
|
398 |
+
#. translators: %s: link to settings page
|
399 |
+
msgid "Please set up your GoDaddy Email Marketing account in the %s."
|
400 |
+
msgstr ""
|
401 |
+
|
402 |
+
#: includes/widget.php:164
|
403 |
msgid "settings page"
|
404 |
msgstr ""
|
405 |
|
414 |
"lists."
|
415 |
msgstr ""
|
416 |
|
417 |
+
#: includes/settings.php:97
|
|
|
|
|
|
|
|
|
|
|
418 |
msgctxt "failed copy response"
|
419 |
msgid "Please press Ctrl/Cmd+C to copy."
|
420 |
msgstr ""
|
438 |
msgstr ""
|
439 |
|
440 |
#: includes/settings.php:599
|
441 |
+
#. translators: %s: Sign Up Now button
|
442 |
msgctxt "Sign up button"
|
443 |
msgid "New to GoDaddy? Create an account to get started today. %s"
|
444 |
msgstr ""
|
448 |
msgid "Sign Up Now"
|
449 |
msgstr ""
|
450 |
|
451 |
+
#: includes/settings.php:697
|
452 |
msgctxt "save settings button"
|
453 |
msgid "Save Settings"
|
454 |
msgstr ""
|
455 |
|
456 |
+
#: includes/settings.php:853
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
457 |
msgctxt "account details link"
|
458 |
msgid "sign up here"
|
459 |
msgstr ""
|
461 |
#: includes/widget.php:24
|
462 |
msgctxt "widget description"
|
463 |
msgid "Embed GoDaddy Email Marketing signup forms in the sidebar."
|
|
|
|
|
|
|
|
|
|
|
464 |
msgstr ""
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: godaddy, fjarrett, jonathanbardo, eherman24, susanygodaddy, madmim
|
|
3 |
Tags: email, forms, godaddy, mailing list, marketing, newsletter, opt-in, signup, subscribe, widget, contacts
|
4 |
Requires at least: 3.8
|
5 |
Tested up to: 4.9
|
6 |
-
Stable tag: 1.
|
7 |
License: GPL-2.0
|
8 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -115,12 +115,17 @@ You can find your **Secret API Key** in the [Settings section](https://gem.godad
|
|
115 |
|
116 |
== Changelog ==
|
117 |
|
|
|
|
|
|
|
|
|
|
|
118 |
= 1.2.1 =
|
119 |
* Fix: Switch `wp_nonce` to `_wpnonce`, fixing the ability to refresh GEM forms.
|
120 |
|
121 |
= 1.2.0 =
|
122 |
* New: Help tab on the Settings screen
|
123 |
-
* New:
|
124 |
|
125 |
= 1.1.4 =
|
126 |
* Tweak: Indicate support for WordPress 4.7
|
3 |
Tags: email, forms, godaddy, mailing list, marketing, newsletter, opt-in, signup, subscribe, widget, contacts
|
4 |
Requires at least: 3.8
|
5 |
Tested up to: 4.9
|
6 |
+
Stable tag: 1.3.0
|
7 |
License: GPL-2.0
|
8 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
115 |
|
116 |
== Changelog ==
|
117 |
|
118 |
+
= 1.3.0 =
|
119 |
+
* New: Add support for GDPR fields (Age consent, terms of service and tracking option)
|
120 |
+
* Fix: Update text domain to match plugin slug.
|
121 |
+
* Tweak: Update translation functions and regenerate translations.
|
122 |
+
|
123 |
= 1.2.1 =
|
124 |
* Fix: Switch `wp_nonce` to `_wpnonce`, fixing the ability to refresh GEM forms.
|
125 |
|
126 |
= 1.2.0 =
|
127 |
* New: Help tab on the Settings screen
|
128 |
+
* New: Dismissible admin notice after on-boarding
|
129 |
|
130 |
= 1.1.4 =
|
131 |
* Tweak: Indicate support for WordPress 4.7
|