Formidable Forms – Form Builder for WordPress - Version 3.04.02

Version Description

  • New: When HTML5 is used, auto add the http in a url field if it is omitted by the user
Download this release

Release Info

Developer sswells
Plugin Icon 128x128 Formidable Forms – Form Builder for WordPress
Version 3.04.02
Comparing to
See all releases

Code changes from version 3.04.01 to 3.04.02

classes/controllers/FrmAddonsController.php CHANGED
@@ -16,7 +16,7 @@ class FrmAddonsController {
16
  $addons = self::get_api_addons();
17
  self::prepare_addons( $addons );
18
 
19
- $site_url = 'https://formidableforms.com/';
20
 
21
  include( FrmAppHelper::plugin_path() . '/classes/views/addons/list.php' );
22
  }
@@ -52,6 +52,33 @@ class FrmAddonsController {
52
  }
53
 
54
  private static function get_api_addons() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  $addons = array(
56
  'formidable-pro' => array(
57
  'title' => 'Formidable Pro',
@@ -75,13 +102,13 @@ class FrmAddonsController {
75
  ),
76
  'stripe' => array(
77
  'title' => 'Stripe Forms',
78
- 'docs' => 'stripe/',
79
  'excerpt' => 'Any Formidable forms on your site can accept credit card payments without users ever leaving your site.',
80
  ),
81
  'authorize-net' => array(
82
  'title' => 'Authorize.net AIM Forms',
83
  'link' => 'downloads/authorize-net-aim/',
84
- 'docs' => 'authorize-net-aim/',
85
  'excerpt' => 'Accept one-time payments directly on your site, using Authorize.net AIM.',
86
  ),
87
  'woocommerce' => array(
@@ -90,13 +117,13 @@ class FrmAddonsController {
90
  ),
91
  'autoresponder' => array(
92
  'title' => 'Form Action Automation',
93
- 'docs' => 'schedule-autoresponder/',
94
  'excerpt' => 'Schedule email notifications, SMS messages, and API actions.',
95
  ),
96
  'modal' => array(
97
  'title' => 'Bootstrap Modal Forms',
98
  'link' => 'downloads/bootstrap-modal/',
99
- 'docs' => 'bootstrap-modal/',
100
  'excerpt' => 'Open a view or form in a Bootstrap popup.',
101
  ),
102
  'bootstrap' => array(
@@ -118,35 +145,9 @@ class FrmAddonsController {
118
  ),
119
  'twilio' => array(
120
  'title' => 'Twilio SMS Forms',
121
- 'docs' => 'twilio-add-on/',
122
  'excerpt' => 'Allow users to text their votes for polls created by Formidable Forms, or send SMS notifications when entries are submitted or updated.',
123
  ),
124
- 'aweber' => array(
125
- 'title' => 'AWeber Forms',
126
- 'excerpt' => 'Subscribe users to an AWeber mailing list when they submit a form. AWeber is a powerful email marketing service.',
127
- ),
128
- 'highrise' => array(
129
- 'title' => 'Highrise Forms',
130
- 'excerpt' => 'Add your leads to your Highrise CRM account any time a Formidable form is submitted.',
131
- ),
132
- 'wpml' => array(
133
- 'title' => 'WP Multilingual Forms',
134
- 'link' => 'downloads/wp-multilingual/',
135
- 'docs' => 'formidable-multi-language/',
136
- 'excerpt' => 'Translate your forms into multiple languages using the Formidable-integrated WPML plugin.',
137
- ),
138
- 'polylang' => array(
139
- 'title' => 'Polylang Forms',
140
- 'excerpt' => 'Create bilingual or multilingual forms with help from Polylang.',
141
- ),
142
- 'locations' => array(
143
- 'title' => 'Locations',
144
- 'excerpt' => 'Populate fields with Countries, States/Provinces, U.S. Counties, and U.S. Cities. This data can then be used in dependent Data from Entries fields.',
145
- ),
146
- 'user-tracking' => array(
147
- 'title' => 'User Tracking',
148
- 'excerpt' => 'Track which pages a user visits prior to submitting a form.',
149
- ),
150
  );
151
 
152
  return $addons;
@@ -159,7 +160,13 @@ class FrmAddonsController {
159
  }
160
 
161
  $loop_addons = $addons;
162
- foreach ( $loop_addons as $slug => $addon ) {
 
 
 
 
 
 
163
  if ( isset( $addon['file'] ) ) {
164
  $base_file = $addon['file'];
165
  } else {
@@ -185,15 +192,71 @@ class FrmAddonsController {
185
  }
186
 
187
  if ( ! isset( $addon['docs'] ) ) {
188
- $addon['docs'] = 'formidable-' . $slug . '/';
189
  }
 
190
 
191
  if ( ! isset( $addon['link'] ) ) {
192
  $addon['link'] = 'downloads/' . $slug . '/';
193
  }
194
- $addon['link'] = FrmAppHelper::make_affiliate_url( $addon['link'] );
195
 
196
- $addons[ $slug ] = $addon;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
197
  }
198
  }
199
 
@@ -319,4 +382,104 @@ class FrmAddonsController {
319
 
320
  return $filename;
321
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
322
  }
16
  $addons = self::get_api_addons();
17
  self::prepare_addons( $addons );
18
 
19
+ $pricing = FrmAppHelper::admin_upgrade_link( 'addons' );
20
 
21
  include( FrmAppHelper::plugin_path() . '/classes/views/addons/list.php' );
22
  }
52
  }
53
 
54
  private static function get_api_addons() {
55
+ $addons = array();
56
+ $url = 'https://formidableforms.com/wp-json/s11edd/v1/updates/';
57
+ if ( FrmAppHelper::pro_is_installed() ) {
58
+ $edd_update = new FrmProEddController();
59
+ $license = $edd_update->get_license();
60
+ if ( ! empty( $license ) ) {
61
+ $url .= '?l=' . urlencode( base64_encode( $license ) );
62
+ }
63
+ }
64
+
65
+ $response = wp_remote_get( $url );
66
+ if ( is_array( $response ) && ! is_wp_error( $response ) ) {
67
+ $addons = $response['body'];
68
+ }
69
+
70
+ if ( ! empty( $addons ) ) {
71
+ $addons = json_decode( $addons, true );
72
+ $skip_categories = array( 'WordPress Form Templates', 'WordPress Form Style Templates' );
73
+ foreach ( $addons as $k => $addon ) {
74
+ $cats = array_intersect( $skip_categories, $addon['categories'] );
75
+ if ( empty( $addon['excerpt'] ) || ! empty( $cats ) ) {
76
+ unset( $addons[ $k ] );
77
+ }
78
+ }
79
+ return $addons;
80
+ }
81
+
82
  $addons = array(
83
  'formidable-pro' => array(
84
  'title' => 'Formidable Pro',
102
  ),
103
  'stripe' => array(
104
  'title' => 'Stripe Forms',
105
+ 'docs' => 'knowledgebase/stripe/',
106
  'excerpt' => 'Any Formidable forms on your site can accept credit card payments without users ever leaving your site.',
107
  ),
108
  'authorize-net' => array(
109
  'title' => 'Authorize.net AIM Forms',
110
  'link' => 'downloads/authorize-net-aim/',
111
+ 'docs' => 'knowledgebase/authorize-net-aim/',
112
  'excerpt' => 'Accept one-time payments directly on your site, using Authorize.net AIM.',
113
  ),
114
  'woocommerce' => array(
117
  ),
118
  'autoresponder' => array(
119
  'title' => 'Form Action Automation',
120
+ 'docs' => 'knowledgebase/schedule-autoresponder/',
121
  'excerpt' => 'Schedule email notifications, SMS messages, and API actions.',
122
  ),
123
  'modal' => array(
124
  'title' => 'Bootstrap Modal Forms',
125
  'link' => 'downloads/bootstrap-modal/',
126
+ 'docs' => 'knowledgebase/bootstrap-modal/',
127
  'excerpt' => 'Open a view or form in a Bootstrap popup.',
128
  ),
129
  'bootstrap' => array(
145
  ),
146
  'twilio' => array(
147
  'title' => 'Twilio SMS Forms',
148
+ 'docs' => 'knowledgebase/twilio-add-on/',
149
  'excerpt' => 'Allow users to text their votes for polls created by Formidable Forms, or send SMS notifications when entries are submitted or updated.',
150
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
151
  );
152
 
153
  return $addons;
160
  }
161
 
162
  $loop_addons = $addons;
163
+ foreach ( $loop_addons as $id => $addon ) {
164
+ if ( is_numeric( $id ) ) {
165
+ $slug = str_replace( array( '-wordpress-plugin', '-wordpress' ), '', $addon['slug'] );
166
+ self::prepare_folder_name( $addon );
167
+ } else {
168
+ $slug = $id;
169
+ }
170
  if ( isset( $addon['file'] ) ) {
171
  $base_file = $addon['file'];
172
  } else {
192
  }
193
 
194
  if ( ! isset( $addon['docs'] ) ) {
195
+ $addon['docs'] = 'knowledgebase/formidable-' . $slug . '/';
196
  }
197
+ self::prepare_addon_link( $addon['docs'] );
198
 
199
  if ( ! isset( $addon['link'] ) ) {
200
  $addon['link'] = 'downloads/' . $slug . '/';
201
  }
202
+ self::prepare_addon_link( $addon['link'] );
203
 
204
+ self::set_addon_status( $addon );
205
+ $addons[ $id ] = $addon;
206
+ }
207
+ }
208
+
209
+ /**
210
+ * @since 3.04.02
211
+ */
212
+ private static function prepare_folder_name( &$addon ) {
213
+ if ( isset( $addon['url'] ) ) {
214
+ $url = explode( '?', $addon['url'] );
215
+ $file = explode( '/', $url[0] );
216
+ $file = end( $file );
217
+ $addon['file'] = str_replace( '-' . $addon['version'] . '.zip', '', $file );
218
+ }
219
+ }
220
+
221
+ /**
222
+ * @since 3.04.02
223
+ */
224
+ private static function prepare_addon_link( &$link ) {
225
+ $site_url = 'https://formidableforms.com/';
226
+ if ( strpos( $link, 'http' ) !== 0 ) {
227
+ $link = $site_url . $link;
228
+ }
229
+ $link = FrmAppHelper::make_affiliate_url( $link );
230
+ $query_args = array(
231
+ 'utm_source' => 'WordPress',
232
+ 'utm_medium' => 'addons',
233
+ 'utm_campaign' => 'liteplugin',
234
+ );
235
+ $link = add_query_arg( $query_args, $link );
236
+ }
237
+
238
+ /**
239
+ * Add the status to the addon array. Status options are:
240
+ * installed, active, not installed
241
+ *
242
+ * @since 3.04.02
243
+ */
244
+ private static function set_addon_status( &$addon ) {
245
+ if ( ! empty( $addon['activate_url'] ) ) {
246
+ $addon['status'] = array(
247
+ 'type' => 'installed',
248
+ 'label' => __( 'Installed', 'formidable' ),
249
+ );
250
+ } elseif ( $addon['installed'] ) {
251
+ $addon['status'] = array(
252
+ 'type' => 'active',
253
+ 'label' => __( 'Active', 'formidable' ),
254
+ );
255
+ } else {
256
+ $addon['status'] = array(
257
+ 'type' => 'not-installed',
258
+ 'label' => __( 'Not Installed', 'formidable' ),
259
+ );
260
  }
261
  }
262
 
382
 
383
  return $filename;
384
  }
385
+
386
+ /**
387
+ * @since 3.04.02
388
+ */
389
+ public static function ajax_install_addon() {
390
+
391
+ self::install_addon_permissions();
392
+
393
+ // Set the current screen to avoid undefined notices.
394
+ global $hook_suffix;
395
+ set_current_screen();
396
+
397
+ self::maybe_show_cred_form();
398
+
399
+ $installed = self::install_addon();
400
+ self::maybe_activate_addon( $installed );
401
+
402
+ // Send back a response.
403
+ echo json_encode( true );
404
+ wp_die();
405
+ }
406
+
407
+ /**
408
+ * @since 3.04.02
409
+ */
410
+ private static function maybe_show_cred_form() {
411
+ // Start output bufferring to catch the filesystem form if credentials are needed.
412
+ ob_start();
413
+
414
+ $show_form = false;
415
+ $method = '';
416
+ $url = add_query_arg( array( 'page' => 'formidable-settings' ), admin_url( 'admin.php' ) );
417
+ $url = esc_url_raw( $url );
418
+ $creds = request_filesystem_credentials( $url, $method, false, false, null );
419
+
420
+ if ( false === $creds ) {
421
+ $show_form = true;
422
+ } elseif ( ! WP_Filesystem( $creds ) ) {
423
+ request_filesystem_credentials( $url, $method, true, false, null );
424
+ $show_form = true;
425
+ }
426
+
427
+ if ( $show_form ) {
428
+ $form = ob_get_clean();
429
+ //TODO: test this: echo json_encode( array( 'form' => $form ) );
430
+ echo json_encode( array( 'form' => __( 'Sorry, you\'re site requires FTP authentication. Please install plugins manaully.', 'formidable' ) ) );
431
+ wp_die();
432
+ }
433
+
434
+ ob_end_clean();
435
+ }
436
+
437
+ /**
438
+ * We do not need any extra credentials if we have gotten this far,
439
+ * so let's install the plugin.
440
+ *
441
+ * @since 3.04.02
442
+ */
443
+ private static function install_addon() {
444
+ require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
445
+
446
+ $download_url = esc_url_raw( $_POST['plugin'] );
447
+
448
+ // Create the plugin upgrader with our custom skin.
449
+ $installer = new Plugin_Upgrader( new FrmInstallerSkin() );
450
+ $installer->install( $download_url );
451
+
452
+ // Flush the cache and return the newly installed plugin basename.
453
+ wp_cache_flush();
454
+ return $installer->plugin_info();
455
+ }
456
+
457
+ /**
458
+ * @since 3.04.02
459
+ */
460
+ private static function maybe_activate_addon( $installed ) {
461
+ if ( ! $installed ) {
462
+ return;
463
+ }
464
+
465
+ $activate = activate_plugin( $installed );
466
+ if ( is_wp_error( $activate ) ) {
467
+ echo json_encode( array( 'error' => $activate->get_error_message() ) );
468
+ wp_die();
469
+ }
470
+ }
471
+
472
+ /**
473
+ * Run security checks before installing
474
+ *
475
+ * @since 3.04.02
476
+ */
477
+ private static function install_addon_permissions() {
478
+ check_ajax_referer( 'frm_ajax', 'nonce' );
479
+
480
+ if ( ! current_user_can( 'activate_plugins' ) || ! isset( $_POST['plugin'] ) ) {
481
+ echo json_encode( true );
482
+ wp_die();
483
+ }
484
+ }
485
  }
classes/controllers/FrmAppController.php CHANGED
@@ -135,7 +135,7 @@ class FrmAppController {
135
  // if pro version is installed, include link to activate it
136
  $inst_install_url = wp_nonce_url( self_admin_url( 'plugins.php?action=activate&plugin=formidable-pro/formidable-pro.php' ), 'activate-plugin_formidable-pro/formidable-pro.php' );
137
  } else {
138
- $inst_install_url = 'https://formidableforms.com/knowledgebase/install-formidable-forms/';
139
  }
140
  ?>
141
  <div class="error" class="frm_previous_install">
@@ -170,16 +170,35 @@ class FrmAppController {
170
  $affiliate = FrmAppHelper::get_affiliate();
171
  if ( ! empty( $affiliate ) ) {
172
  $tip = FrmTipsHelper::get_banner_tip();
 
173
  ?>
174
  <div class="update-nag frm-update-to-pro">
175
  <?php echo FrmAppHelper::kses( $tip['tip'] ); // WPCS: XSS ok. ?>
176
  <span><?php echo FrmAppHelper::kses( $tip['call'] ); // WPCS: XSS ok. ?></span>
177
- <a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url( 'https://formidableforms.com?banner=1&tip=' . absint( $tip['num'] ) ) ); ?>" class="button">Upgrade to Pro</a>
178
  </div>
179
  <?php
180
  }
181
  }
182
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
  /**
184
  * If there are CURL problems on this server, wp_remote_post won't work for installing
185
  * Use a javascript fallback instead.
@@ -501,9 +520,10 @@ class FrmAppController {
501
 
502
  public static function set_footer_text( $text ) {
503
  if ( FrmAppHelper::is_formidable_admin() ) {
 
504
  $text = sprintf(
505
  __( 'Help us spread the %1$sFormidable Forms%2$s love with %3$s %5$s on WordPress.org%4$s. Thank you heaps!', 'formidable' ),
506
- '<a href="' . esc_url( FrmAppHelper::make_affiliate_url( 'https://formidableforms.com' ) ) . '" target="_blank">',
507
  '</a>',
508
  '<a href="https://wordpress.org/support/plugin/formidable/reviews/?filter=5#new-post" target="_blank">',
509
  '</a>',
135
  // if pro version is installed, include link to activate it
136
  $inst_install_url = wp_nonce_url( self_admin_url( 'plugins.php?action=activate&plugin=formidable-pro/formidable-pro.php' ), 'activate-plugin_formidable-pro/formidable-pro.php' );
137
  } else {
138
+ $inst_install_url = 'https://formidableforms.com/knowledgebase/install-formidable-forms/?utm_source=WordPress&utm_medium=get-started&utm_campaign=liteplugin';
139
  }
140
  ?>
141
  <div class="error" class="frm_previous_install">
170
  $affiliate = FrmAppHelper::get_affiliate();
171
  if ( ! empty( $affiliate ) ) {
172
  $tip = FrmTipsHelper::get_banner_tip();
173
+ $link = FrmAppHelper::admin_upgrade_link( 'banner' );
174
  ?>
175
  <div class="update-nag frm-update-to-pro">
176
  <?php echo FrmAppHelper::kses( $tip['tip'] ); // WPCS: XSS ok. ?>
177
  <span><?php echo FrmAppHelper::kses( $tip['call'] ); // WPCS: XSS ok. ?></span>
178
+ <a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url( $link ) ); ?>" class="button">Upgrade to Pro</a>
179
  </div>
180
  <?php
181
  }
182
  }
183
 
184
+ /**
185
+ * @since 3.04.02
186
+ */
187
+ public static function include_upgrade_overlay() {
188
+ $is_pro = FrmAppHelper::pro_is_installed();
189
+ wp_enqueue_script( 'jquery-ui-dialog' );
190
+ wp_enqueue_style( 'jquery-ui-dialog' );
191
+ include( FrmAppHelper::plugin_path() . '/classes/views/shared/upgrade_overlay.php' );
192
+ }
193
+
194
+ /**
195
+ * @since 3.04.02
196
+ */
197
+ public static function remove_upsells() {
198
+ remove_action( 'frm_before_settings', 'FrmSettingsController::license_box' );
199
+ remove_action( 'frm_after_settings', 'FrmSettingsController::settings_cta' );
200
+ }
201
+
202
  /**
203
  * If there are CURL problems on this server, wp_remote_post won't work for installing
204
  * Use a javascript fallback instead.
520
 
521
  public static function set_footer_text( $text ) {
522
  if ( FrmAppHelper::is_formidable_admin() ) {
523
+ $link = FrmAppHelper::admin_upgrade_link( 'footer' );
524
  $text = sprintf(
525
  __( 'Help us spread the %1$sFormidable Forms%2$s love with %3$s %5$s on WordPress.org%4$s. Thank you heaps!', 'formidable' ),
526
+ '<a href="' . esc_url( FrmAppHelper::make_affiliate_url( $link ) ) . '" target="_blank">',
527
  '</a>',
528
  '<a href="https://wordpress.org/support/plugin/formidable/reviews/?filter=5#new-post" target="_blank">',
529
  '</a>',
classes/controllers/FrmEntriesController.php CHANGED
@@ -75,8 +75,8 @@ class FrmEntriesController {
75
 
76
  $screen->set_help_sidebar(
77
  '<p><strong>' . esc_html__( 'For more information:', 'formidable' ) . '</strong></p>' .
78
- '<p><a href="' . esc_url( FrmAppHelper::make_affiliate_url( 'https://formidableforms.com/knowledgebase/manage-entries-from-the-back-end/' ) ) . '" target="_blank">' . esc_html__( 'Documentation on Entries', 'formidable' ) . '</a></p>' .
79
- '<p><a href="' . esc_url( FrmAppHelper::make_affiliate_url( 'https://formidableforms.com/help-desk/' ) ) . '" target="_blank">' . esc_html__( 'Support', 'formidable' ) . '</a></p>'
80
  );
81
 
82
  return $help;
75
 
76
  $screen->set_help_sidebar(
77
  '<p><strong>' . esc_html__( 'For more information:', 'formidable' ) . '</strong></p>' .
78
+ '<p><a href="' . esc_url( FrmAppHelper::make_affiliate_url( 'https://formidableforms.com/knowledgebase/manage-entries-from-the-back-end/?utm_source=WordPress&utm_medium=entries&utm_campaign=liteplugin' ) ) . '" target="_blank">' . esc_html__( 'Documentation on Entries', 'formidable' ) . '</a></p>' .
79
+ '<p><a href="' . esc_url( FrmAppHelper::make_affiliate_url( 'https://formidableforms.com/support/?utm_source=WordPress&utm_medium=entries&utm_campaign=liteplugin' ) ) . '" target="_blank">' . esc_html__( 'Support', 'formidable' ) . '</a></p>'
80
  );
81
 
82
  return $help;
classes/controllers/FrmFormActionsController.php CHANGED
@@ -45,7 +45,7 @@ class FrmFormActionsController {
45
  //'aweber' => 'FrmDefAweberAction',
46
  'mailchimp' => 'FrmDefMlcmpAction',
47
  'twilio' => 'FrmDefTwilioAction',
48
- 'highrise' => 'FrmDefHrsAction',
49
  );
50
  $action_classes = apply_filters( 'frm_registered_form_actions', $action_classes );
51
 
45
  //'aweber' => 'FrmDefAweberAction',
46
  'mailchimp' => 'FrmDefMlcmpAction',
47
  'twilio' => 'FrmDefTwilioAction',
48
+ 'payment' => 'FrmDefHrsAction',
49
  );
50
  $action_classes = apply_filters( 'frm_registered_form_actions', $action_classes );
51
 
classes/controllers/FrmFormsController.php CHANGED
@@ -833,13 +833,13 @@ class FrmFormsController {
833
  */
834
  private static function get_advanced_shortcodes() {
835
  $adv_shortcodes = array(
836
- 'sep=", "' => array(
837
  'label' => __( 'Separator', 'formidable' ),
838
  'title' => __( 'Use a different separator for checkbox fields', 'formidable' ),
839
  ),
840
- 'format="d-m-Y"' => __( 'Date Format', 'formidable' ),
841
- 'show="field_label"' => __( 'Field Label', 'formidable' ),
842
- 'wpautop=0' => array(
843
  'label' => __( 'No Auto P', 'formidable' ),
844
  'title' => __( 'Do not automatically add any paragraphs or line breaks', 'formidable' ),
845
  ),
@@ -1005,7 +1005,7 @@ class FrmFormsController {
1005
  }
1006
 
1007
  if ( isset( $message ) && ! empty( $message ) ) {
1008
- echo '<div id="message" class="updated frm_updated_message">' . FrmAppHelper::kses( $message, array( 'a' ) ) . '</div>'; // WPCS: XSS ok.
1009
  }
1010
 
1011
  return $errors;
833
  */
834
  private static function get_advanced_shortcodes() {
835
  $adv_shortcodes = array(
836
+ 'x sep=", "' => array(
837
  'label' => __( 'Separator', 'formidable' ),
838
  'title' => __( 'Use a different separator for checkbox fields', 'formidable' ),
839
  ),
840
+ 'x format="d-m-Y"' => __( 'Date Format', 'formidable' ),
841
+ 'x show="field_label"' => __( 'Field Label', 'formidable' ),
842
+ 'x wpautop=0' => array(
843
  'label' => __( 'No Auto P', 'formidable' ),
844
  'title' => __( 'Do not automatically add any paragraphs or line breaks', 'formidable' ),
845
  ),
1005
  }
1006
 
1007
  if ( isset( $message ) && ! empty( $message ) ) {
1008
+ echo '<div id="message" class="frm_updated_message">' . FrmAppHelper::kses( $message, array( 'a' ) ) . '</div>'; // WPCS: XSS ok.
1009
  }
1010
 
1011
  return $errors;
classes/controllers/FrmHooksController.php CHANGED
@@ -118,6 +118,7 @@ class FrmHooksController {
118
  // Settings Controller
119
  add_action( 'admin_menu', 'FrmSettingsController::menu', 45 );
120
  add_action( 'frm_before_settings', 'FrmSettingsController::license_box' );
 
121
  add_action( 'wp_ajax_frm_settings_tab', 'FrmSettingsController::load_settings_tab' );
122
 
123
  // Styles Controller
@@ -137,6 +138,7 @@ class FrmHooksController {
137
  add_action( 'wp_ajax_frm_addon_activate', 'FrmAddon::activate' );
138
  add_action( 'wp_ajax_frm_addon_deactivate', 'FrmAddon::deactivate' );
139
  add_action( 'wp_ajax_frm_fill_licenses', 'FrmAddonsController::get_licenses' );
 
140
 
141
  // Fields Controller
142
  add_action( 'wp_ajax_frm_load_field', 'FrmFieldsController::load_field' );
@@ -161,6 +163,9 @@ class FrmHooksController {
161
  add_action( 'wp_ajax_frm_forms_preview', 'FrmFormsController::preview' );
162
  add_action( 'wp_ajax_nopriv_frm_forms_preview', 'FrmFormsController::preview' );
163
 
 
 
 
164
  // Styles Controller
165
  add_action( 'wp_ajax_frm_settings_reset', 'FrmStylesController::reset_styling' );
166
  add_action( 'wp_ajax_frm_change_styling', 'FrmStylesController::change_styling' );
118
  // Settings Controller
119
  add_action( 'admin_menu', 'FrmSettingsController::menu', 45 );
120
  add_action( 'frm_before_settings', 'FrmSettingsController::license_box' );
121
+ add_action( 'frm_after_settings', 'FrmSettingsController::settings_cta' );
122
  add_action( 'wp_ajax_frm_settings_tab', 'FrmSettingsController::load_settings_tab' );
123
 
124
  // Styles Controller
138
  add_action( 'wp_ajax_frm_addon_activate', 'FrmAddon::activate' );
139
  add_action( 'wp_ajax_frm_addon_deactivate', 'FrmAddon::deactivate' );
140
  add_action( 'wp_ajax_frm_fill_licenses', 'FrmAddonsController::get_licenses' );
141
+ add_action( 'wp_ajax_frm_install_addon', 'FrmAddonsController::ajax_install_addon' );
142
 
143
  // Fields Controller
144
  add_action( 'wp_ajax_frm_load_field', 'FrmFieldsController::load_field' );
163
  add_action( 'wp_ajax_frm_forms_preview', 'FrmFormsController::preview' );
164
  add_action( 'wp_ajax_nopriv_frm_forms_preview', 'FrmFormsController::preview' );
165
 
166
+ // Settings
167
+ add_action( 'wp_ajax_frm_lite_settings_upgrade', 'FrmSettingsController::settings_cta_dismiss' );
168
+
169
  // Styles Controller
170
  add_action( 'wp_ajax_frm_settings_reset', 'FrmStylesController::reset_styling' );
171
  add_action( 'wp_ajax_frm_change_styling', 'FrmStylesController::change_styling' );
classes/controllers/FrmSettingsController.php CHANGED
@@ -108,4 +108,50 @@ class FrmSettingsController {
108
  self::display_form();
109
  }
110
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111
  }
108
  self::display_form();
109
  }
110
  }
111
+
112
+ /**
113
+ * Add CTA to the bottom on the plugin settings pages.
114
+ *
115
+ * @since 3.04.02
116
+ */
117
+ public static function settings_cta( $view ) {
118
+
119
+ if ( get_option( 'frm_lite_settings_upgrade', false ) ) {
120
+ return;
121
+ }
122
+
123
+ $features = array(
124
+ __( 'Extra form features like file uploads, pagination, etc', 'formidable' ),
125
+ __( 'Repeaters & cascading fields for advanced forms', 'formidable' ),
126
+ __( 'Flexibly view, search, edit, and delete entries anywhere', 'formidable' ),
127
+ __( 'Display entries with virtually limitless Formidable views', 'formidable' ),
128
+ __( 'Create surveys & polls', 'formidable' ),
129
+ __( 'WordPress user registration and login forms', 'formidable' ),
130
+ __( 'Create Stripe, PayPal or Authorize.net payment forms', 'formidable' ),
131
+ __( 'Powerful conditional logic for smart forms', 'formidable' ),
132
+ __( 'Integrations with 1000+ marketing & payment services', 'formidable' ),
133
+ __( 'Collect digital signatures', 'formidable' ),
134
+ __( 'Accept user-submitted content with Post submissions', 'formidable' ),
135
+ __( 'Email routing', 'formidable' ),
136
+ __( 'Create calculator forms', 'formidable' ),
137
+ __( 'Save draft entries and return later', 'formidable' ),
138
+ __( 'Analyze form data with graphs & stats', 'formidable' ),
139
+ );
140
+
141
+ include( FrmAppHelper::plugin_path() . '/classes/views/frm-settings/settings_cta.php' );
142
+ }
143
+
144
+ /**
145
+ * Dismiss upgrade notice at the bottom on the plugin settings pages.
146
+ *
147
+ * @since 3.04.02
148
+ */
149
+ public static function settings_cta_dismiss() {
150
+ FrmAppHelper::permission_check( 'frm_change_settings' );
151
+
152
+ update_option( 'frm_lite_settings_upgrade', time() );
153
+
154
+ wp_send_json_success();
155
+ }
156
+
157
  }
classes/helpers/FrmAppHelper.php CHANGED
@@ -11,7 +11,7 @@ class FrmAppHelper {
11
  /**
12
  * @since 2.0
13
  */
14
- public static $plug_version = '3.04.01';
15
 
16
  /**
17
  * @since 1.07.02
@@ -71,6 +71,23 @@ class FrmAppHelper {
71
  return absint( apply_filters( 'frm_affiliate_id', 0 ) );
72
  }
73
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  /**
75
  * Get the Formidable settings
76
  *
@@ -1682,6 +1699,9 @@ class FrmAppHelper {
1682
  'view_shortcodes' => __( 'This calculation may have shortcodes that work in Views but not forms.', 'formidable' ),
1683
  'text_shortcodes' => __( 'This calculation may have shortcodes that work in text calculations but not numeric calculations.', 'formidable' ),
1684
  'repeat_limit_min' => __( 'Please enter a Repeat Limit that is greater than 1.', 'formidable' ),
 
 
 
1685
  );
1686
  wp_localize_script( 'formidable_admin', 'frm_admin_js', $admin_script_strings );
1687
  }
11
  /**
12
  * @since 2.0
13
  */
14
+ public static $plug_version = '3.04.02';
15
 
16
  /**
17
  * @since 1.07.02
71
  return absint( apply_filters( 'frm_affiliate_id', 0 ) );
72
  }
73
 
74
+ /**
75
+ * @since 3.04.02
76
+ */
77
+ public static function admin_upgrade_link( $medium, $page = '' ) {
78
+ if ( empty( $page ) ) {
79
+ $page = 'https://formidableforms.com/pricing-lite/';
80
+ } else {
81
+ $page = 'https://formidableforms.com/' . $page;
82
+ }
83
+ $query_args = array(
84
+ 'utm_source' => 'WordPress',
85
+ 'utm_medium' => $medium,
86
+ 'utm_campaign' => 'liteplugin',
87
+ );
88
+ return add_query_arg( $query_args, $page );
89
+ }
90
+
91
  /**
92
  * Get the Formidable settings
93
  *
1699
  'view_shortcodes' => __( 'This calculation may have shortcodes that work in Views but not forms.', 'formidable' ),
1700
  'text_shortcodes' => __( 'This calculation may have shortcodes that work in text calculations but not numeric calculations.', 'formidable' ),
1701
  'repeat_limit_min' => __( 'Please enter a Repeat Limit that is greater than 1.', 'formidable' ),
1702
+ 'installing' => __( 'Installing', 'formidable' ),
1703
+ 'install' => __( 'Install', 'formidable' ),
1704
+ 'active' => __( 'Active', 'formidable' ),
1705
  );
1706
  wp_localize_script( 'formidable_admin', 'frm_admin_js', $admin_script_strings );
1707
  }
classes/helpers/FrmTipsHelper.php CHANGED
@@ -14,9 +14,13 @@ class FrmTipsHelper {
14
  echo '<p>';
15
  }
16
 
 
 
17
  ?>
18
- <a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url( self::base_url() . $tip['link'] ) ) ?>" target="_blank" class="frm_pro_tip">
19
- <span><i class="frm_icon_font frm_check1_icon"></i> Pro Tip:</span>
 
 
20
  <?php echo esc_html( $tip['tip'] ) ?>
21
  <?php if ( isset( $tip['call'] ) ) { ?>
22
  <span><?php echo esc_html( $tip['call'] ) ?></span>
@@ -35,37 +39,31 @@ class FrmTipsHelper {
35
  public static function get_builder_tip() {
36
  $tips = array(
37
  array(
38
- 'link' => 'section-tip',
39
- 'tip' => __( 'Long forms can still be beautiful with sections.', 'formidable' ),
40
- 'call' => __( 'Upgrade to Pro.', 'formidable' ),
41
- ),
42
- array(
43
- 'link' => 'conditional-logic-tip',
44
  'tip' => __( 'Use conditional logic to shorten your forms and increase conversions.', 'formidable' ),
45
  'call' => __( 'Upgrade to Pro.', 'formidable' ),
46
  ),
47
  array(
48
- 'link' => 'page-break-tip',
49
  'tip' => __( 'Stop intimidating users with long forms.', 'formidable' ),
50
  'call' => __( 'Use page breaks.', 'formidable' ),
51
  ),
52
  array(
53
- 'link' => 'file-upload-tip',
54
  'tip' => __( 'Cut down on back-and-forth with clients.', 'formidable' ),
55
  'call' => __( 'Allow file uploads in your form.', 'formidable' ),
56
  ),
57
  array(
58
- 'link' => 'calculations-total-tip',
59
  'tip' => __( 'Need to calculate a total?', 'formidable' ),
60
  'call' => __( 'Upgrade to Pro.', 'formidable' ),
61
  ),
62
  array(
63
- 'link' => 'prefill-fields',
64
  'tip' => __( 'Save time.', 'formidable' ),
65
  'call' => __( 'Prefill fields with user info.', 'formidable' ),
66
  ),
67
  );
68
- $tips = array_merge( $tips, self::get_form_settings_tip(), self::get_form_action_tip(), self::get_entries_tip() );
69
 
70
  return $tips;
71
  }
@@ -73,20 +71,25 @@ class FrmTipsHelper {
73
  public static function get_form_settings_tip() {
74
  $tips = array(
75
  array(
76
- 'link' => 'front-end-editing-tip',
77
  'tip' => __( 'A site with dynamic, user-generated content is within reach.', 'formidable' ),
78
  'call' => __( 'Add front-end editing.', 'formidable' ),
79
  ),
80
  array(
81
- 'link' => 'front-end-editing-b-tip',
82
  'tip' => __( 'A site with dynamic, user-generated content is within reach.', 'formidable' ),
83
  'call' => __( 'Add front-end editing.', 'formidable' ),
84
  ),
85
  array(
86
- 'link' => 'save-drafts-tip',
87
  'tip' => __( 'Have a long form that takes time to complete?', 'formidable' ),
88
  'call' => __( 'Let logged-in users save a draft and return later.', 'formidable' ),
89
  ),
 
 
 
 
 
90
  );
91
  return $tips;
92
  }
@@ -94,57 +97,57 @@ class FrmTipsHelper {
94
  public static function get_form_action_tip() {
95
  $tips = array(
96
  array(
97
- 'link' => 'email-routing-tip',
98
  'tip' => __( 'Save time by sending the email to the right person automatically.', 'formidable' ),
99
  'call' => __( 'Add email routing.', 'formidable' ),
100
  ),
101
  array(
102
- 'link' => 'create-posts-tip',
103
  'tip' => __( 'Create blog posts or pages from the front-end.', 'formidable' ),
104
  'call' => __( 'Upgrade to Pro.', 'formidable' ),
105
  ),
106
  array(
107
- 'link' => 'front-end-posting-tip',
108
  'tip' => __( 'Make front-end posting easy.', 'formidable' ),
109
  'call' => __( 'Upgrade to Pro.', 'formidable' ),
110
  ),
111
  array(
112
- 'link' => 'mailchimp-tip',
113
  'tip' => __( 'Grow your business with automated email follow-up.', 'formidable' ),
114
  'call' => __( 'Send leads straight to MailChimp.', 'formidable' ),
115
  ),
116
  array(
117
- 'link' => 'paypal-tip',
118
  'tip' => __( 'Save hours and increase revenue by collecting payments with every submission.', 'formidable' ),
119
  'call' => __( 'Use PayPal with this form.', 'formidable' ),
120
  ),
121
  array(
122
- 'link' => 'paypal-increase-revenue-tip',
123
  'tip' => __( 'Increase revenue.', 'formidable' ),
124
  'call' => __( 'Use PayPal with this form.', 'formidable' ),
125
  ),
126
  array(
127
- 'link' => 'paypal-save-time-tip',
128
  'tip' => __( 'Get paid more quickly.', 'formidable' ),
129
  'call' => __( 'Use Paypal with this form.', 'formidable' ),
130
  ),
131
  array(
132
- 'link' => 'registration-tip',
133
  'tip' => __( 'Boost your site membership.', 'formidable' ),
134
  'call' => __( 'Automatically create user accounts.', 'formidable' ),
135
  ),
136
  array(
137
- 'link' => 'registration-profile-editing-tip',
138
  'tip' => __( 'Make front-end profile editing possible.', 'formidable' ),
139
  'call' => __( 'Add user registration.', 'formidable' ),
140
  ),
141
  array(
142
- 'link' => 'twilio-tip',
143
  'tip' => __( 'Want a text when this form is submitted or when a payment is received?', 'formidable' ),
144
  'call' => __( 'Use Twilio with this form.', 'formidable' ),
145
  ),
146
  array(
147
- 'link' => 'twilio-send-tip',
148
  'tip' => __( 'Send a text when this form is submitted.', 'formidable' ),
149
  'call' => __( 'Get Twilio.', 'formidable' ),
150
  ),
@@ -156,7 +159,7 @@ class FrmTipsHelper {
156
  public static function get_styling_tip() {
157
  $tips = array(
158
  array(
159
- 'link' => 'visual-styling-tip',
160
  'tip' => __( 'Make your sidebar or footer form stand out.', 'formidable' ),
161
  'call' => __( 'Use multiple style templates.', 'formidable' ),
162
  ),
@@ -167,12 +170,12 @@ class FrmTipsHelper {
167
  public static function get_entries_tip() {
168
  $tips = array(
169
  array(
170
- 'link' => 'manage-entries-tip',
171
  'tip' => __( 'Want to edit or delete form submissions?', 'formidable' ),
172
  'call' => __( 'Add entry management.', 'formidable' ),
173
  ),
174
  array(
175
- 'link' => 'search-entries-tip',
176
  'tip' => __( 'Want to search submitted entries?', 'formidable' ),
177
  'call' => __( 'Upgrade to Pro.', 'formidable' ),
178
  ),
@@ -184,7 +187,7 @@ class FrmTipsHelper {
184
  public static function get_import_tip() {
185
  $tips = array(
186
  array(
187
- 'link' => 'import-entries-tip/',
188
  'tip' => __( 'Want to import entries into your forms?', 'formidable' ),
189
  'call' => __( 'Upgrade to Pro.', 'formidable' ),
190
  ),
@@ -195,17 +198,17 @@ class FrmTipsHelper {
195
  public static function get_banner_tip() {
196
  $tips = array(
197
  array(
198
- 'link' => '',
199
  'tip' => __( 'Looking for more ways to get professional results?', 'formidable' ),
200
  'call' => __( 'Take your forms to the next level.', 'formidable' ),
201
  ),
202
  array(
203
- 'link' => '',
204
  'tip' => __( 'Increase conversions in long forms.', 'formidable' ),
205
  'call' => __( 'Add conditional logic, page breaks, and section headings.', 'formidable' ),
206
  ),
207
  array(
208
- 'link' => '',
209
  'tip' => __( 'Automate your business and increase revenue.', 'formidable' ),
210
  'call' => __( 'Collect instant payments, and send leads to MailChimp.', 'formidable' ),
211
  ),
14
  echo '<p>';
15
  }
16
 
17
+ $link = FrmAppHelper::make_affiliate_url( self::base_url() . $tip['link'] );
18
+ $link .= '&utm_source=WordPress&utm_campaign=liteplugin';
19
  ?>
20
+ <a href="<?php echo esc_url( $link ); ?>" target="_blank" class="frm_pro_tip">
21
+ <span>
22
+ <i class="frm_icon_font frm_check1_icon"></i> <?php esc_html_e( 'Pro Tip:', 'formidable' ); ?>
23
+ </span>
24
  <?php echo esc_html( $tip['tip'] ) ?>
25
  <?php if ( isset( $tip['call'] ) ) { ?>
26
  <span><?php echo esc_html( $tip['call'] ) ?></span>
39
  public static function get_builder_tip() {
40
  $tips = array(
41
  array(
42
+ 'link' => 'conditional-logic-tip/?utm_medium=tip-logic',
 
 
 
 
 
43
  'tip' => __( 'Use conditional logic to shorten your forms and increase conversions.', 'formidable' ),
44
  'call' => __( 'Upgrade to Pro.', 'formidable' ),
45
  ),
46
  array(
47
+ 'link' => 'page-break-tip/?utm_medium=tip-pages',
48
  'tip' => __( 'Stop intimidating users with long forms.', 'formidable' ),
49
  'call' => __( 'Use page breaks.', 'formidable' ),
50
  ),
51
  array(
52
+ 'link' => 'file-upload-tip/?utm_medium=tip-uploads',
53
  'tip' => __( 'Cut down on back-and-forth with clients.', 'formidable' ),
54
  'call' => __( 'Allow file uploads in your form.', 'formidable' ),
55
  ),
56
  array(
57
+ 'link' => 'calculations-total-tip/?utm_medium=tip-calculations',
58
  'tip' => __( 'Need to calculate a total?', 'formidable' ),
59
  'call' => __( 'Upgrade to Pro.', 'formidable' ),
60
  ),
61
  array(
62
+ 'link' => 'prefill-fields/?utm_medium=tip-prefill',
63
  'tip' => __( 'Save time.', 'formidable' ),
64
  'call' => __( 'Prefill fields with user info.', 'formidable' ),
65
  ),
66
  );
 
67
 
68
  return $tips;
69
  }
71
  public static function get_form_settings_tip() {
72
  $tips = array(
73
  array(
74
+ 'link' => 'front-end-editing-tip/?utm_medium=tip-front-edit',
75
  'tip' => __( 'A site with dynamic, user-generated content is within reach.', 'formidable' ),
76
  'call' => __( 'Add front-end editing.', 'formidable' ),
77
  ),
78
  array(
79
+ 'link' => 'front-end-editing-b-tip/?utm_medium=tip-front-edit',
80
  'tip' => __( 'A site with dynamic, user-generated content is within reach.', 'formidable' ),
81
  'call' => __( 'Add front-end editing.', 'formidable' ),
82
  ),
83
  array(
84
+ 'link' => 'save-drafts-tip/?utm_medium=tip-drafts',
85
  'tip' => __( 'Have a long form that takes time to complete?', 'formidable' ),
86
  'call' => __( 'Let logged-in users save a draft and return later.', 'formidable' ),
87
  ),
88
+ array(
89
+ 'link' => 'pricing-lite/?utm_medium=tip-ajax',
90
+ 'tip' => __( 'Want to submit forms without reloading the page?', 'formidable' ),
91
+ 'call' => __( 'Get ajax form submit.', 'formidable' ),
92
+ ),
93
  );
94
  return $tips;
95
  }
97
  public static function get_form_action_tip() {
98
  $tips = array(
99
  array(
100
+ 'link' => 'email-routing-tip/?utm_medium=tip-routing',
101
  'tip' => __( 'Save time by sending the email to the right person automatically.', 'formidable' ),
102
  'call' => __( 'Add email routing.', 'formidable' ),
103
  ),
104
  array(
105
+ 'link' => 'create-posts-tip/?utm_medium=tip-posts',
106
  'tip' => __( 'Create blog posts or pages from the front-end.', 'formidable' ),
107
  'call' => __( 'Upgrade to Pro.', 'formidable' ),
108
  ),
109
  array(
110
+ 'link' => 'front-end-posting-tip/?utm_medium=tip-user-submit',
111
  'tip' => __( 'Make front-end posting easy.', 'formidable' ),
112
  'call' => __( 'Upgrade to Pro.', 'formidable' ),
113
  ),
114
  array(
115
+ 'link' => 'mailchimp-tip/?utm_medium=tip-mailchimp',
116
  'tip' => __( 'Grow your business with automated email follow-up.', 'formidable' ),
117
  'call' => __( 'Send leads straight to MailChimp.', 'formidable' ),
118
  ),
119
  array(
120
+ 'link' => 'paypal-tip/?utm_medium=tip-paypal',
121
  'tip' => __( 'Save hours and increase revenue by collecting payments with every submission.', 'formidable' ),
122
  'call' => __( 'Use PayPal with this form.', 'formidable' ),
123
  ),
124
  array(
125
+ 'link' => 'paypal-increase-revenue-tip/?utm_medium=tip-paypal-revenue',
126
  'tip' => __( 'Increase revenue.', 'formidable' ),
127
  'call' => __( 'Use PayPal with this form.', 'formidable' ),
128
  ),
129
  array(
130
+ 'link' => 'paypal-save-time-tip/?utm_medium=tip-paypal-fast',
131
  'tip' => __( 'Get paid more quickly.', 'formidable' ),
132
  'call' => __( 'Use Paypal with this form.', 'formidable' ),
133
  ),
134
  array(
135
+ 'link' => 'registration-tip/?utm_medium=tip-registration',
136
  'tip' => __( 'Boost your site membership.', 'formidable' ),
137
  'call' => __( 'Automatically create user accounts.', 'formidable' ),
138
  ),
139
  array(
140
+ 'link' => 'registration-profile-editing-tip/?utm_medium=tip-profile',
141
  'tip' => __( 'Make front-end profile editing possible.', 'formidable' ),
142
  'call' => __( 'Add user registration.', 'formidable' ),
143
  ),
144
  array(
145
+ 'link' => 'twilio-tip/?utm_medium=tip-twilio-payment',
146
  'tip' => __( 'Want a text when this form is submitted or when a payment is received?', 'formidable' ),
147
  'call' => __( 'Use Twilio with this form.', 'formidable' ),
148
  ),
149
  array(
150
+ 'link' => 'twilio-send-tip/?utm_medium=tip-twilio',
151
  'tip' => __( 'Send a text when this form is submitted.', 'formidable' ),
152
  'call' => __( 'Get Twilio.', 'formidable' ),
153
  ),
159
  public static function get_styling_tip() {
160
  $tips = array(
161
  array(
162
+ 'link' => 'visual-styling-tip/?utm_medium=tip-style',
163
  'tip' => __( 'Make your sidebar or footer form stand out.', 'formidable' ),
164
  'call' => __( 'Use multiple style templates.', 'formidable' ),
165
  ),
170
  public static function get_entries_tip() {
171
  $tips = array(
172
  array(
173
+ 'link' => 'manage-entries-tip/?utm_medium=tip-entries',
174
  'tip' => __( 'Want to edit or delete form submissions?', 'formidable' ),
175
  'call' => __( 'Add entry management.', 'formidable' ),
176
  ),
177
  array(
178
+ 'link' => 'search-entries-tip/?utm_medium=tip-entries-search',
179
  'tip' => __( 'Want to search submitted entries?', 'formidable' ),
180
  'call' => __( 'Upgrade to Pro.', 'formidable' ),
181
  ),
187
  public static function get_import_tip() {
188
  $tips = array(
189
  array(
190
+ 'link' => 'import-entries-tip/?utm_medium=tip-import',
191
  'tip' => __( 'Want to import entries into your forms?', 'formidable' ),
192
  'call' => __( 'Upgrade to Pro.', 'formidable' ),
193
  ),
198
  public static function get_banner_tip() {
199
  $tips = array(
200
  array(
201
+ 'link' => '?utm_medium=banner',
202
  'tip' => __( 'Looking for more ways to get professional results?', 'formidable' ),
203
  'call' => __( 'Take your forms to the next level.', 'formidable' ),
204
  ),
205
  array(
206
+ 'link' => '?utm_medium=banner',
207
  'tip' => __( 'Increase conversions in long forms.', 'formidable' ),
208
  'call' => __( 'Add conditional logic, page breaks, and section headings.', 'formidable' ),
209
  ),
210
  array(
211
+ 'link' => '?utm_medium=banner',
212
  'tip' => __( 'Automate your business and increase revenue.', 'formidable' ),
213
  'call' => __( 'Collect instant payments, and send leads to MailChimp.', 'formidable' ),
214
  ),
classes/models/FrmAddon.php CHANGED
@@ -428,8 +428,9 @@ class FrmAddon {
428
 
429
  $message = __( 'Your License Key was invalid', 'formidable' );
430
  if ( is_wp_error( $resp ) ) {
 
431
  /* translators: %1$s: Start link HTML, %2$s: End link HTML */
432
- $message = sprintf( __( 'You had an error communicating with the Formidable API. %1$sClick here%2$s for more information.', 'formidable' ), '<a href="https://formidableforms.com/knowledgebase/why-cant-i-activate-formidable-pro/" target="_blank">', '</a>' );
433
  $message .= ' ' . $resp->get_error_message();
434
  } elseif ( 'error' === $body || is_wp_error( $body ) ) {
435
  $message = __( 'You had an HTTP error connecting to the Formidable API', 'formidable' );
428
 
429
  $message = __( 'Your License Key was invalid', 'formidable' );
430
  if ( is_wp_error( $resp ) ) {
431
+ $link = FrmAppHelper::admin_upgrade_link( 'api', 'knowledgebase/why-cant-i-activate-formidable-pro/' );
432
  /* translators: %1$s: Start link HTML, %2$s: End link HTML */
433
+ $message = sprintf( __( 'You had an error communicating with the Formidable API. %1$sClick here%2$s for more information.', 'formidable' ), '<a href="' . esc_url( $link ) . '" target="_blank">', '</a>' );
434
  $message .= ' ' . $resp->get_error_message();
435
  } elseif ( 'error' === $body || is_wp_error( $body ) ) {
436
  $message = __( 'You had an HTTP error connecting to the Formidable API', 'formidable' );
classes/models/FrmInstallerSkin.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @since 3.04.02
4
+ *
5
+ * @subpackage Upgrader Skin
6
+ */
7
+
8
+ // Exit if accessed directly
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ if ( ! class_exists( 'WP_Upgrader_Skin' ) ) {
14
+ // this is to prevent a unit test from failing
15
+ return;
16
+ }
17
+
18
+ class FrmInstallerSkin extends WP_Upgrader_Skin {
19
+
20
+ /**
21
+ * Set the upgrader object and store it as a property in the parent class.
22
+ *
23
+ * @since 3.04.02
24
+ *
25
+ * @param object $upgrader The upgrader object (passed by reference).
26
+ */
27
+ public function set_upgrader( &$upgrader ) {
28
+ if ( is_object( $upgrader ) ) {
29
+ $this->upgrader =& $upgrader;
30
+ }
31
+ }
32
+
33
+ /**
34
+ * Set the upgrader result and store it as a property in the parent class.
35
+ *
36
+ * @since 3.04.02
37
+ *
38
+ * @param object $result The result of the install process.
39
+ */
40
+ public function set_result( $result ) {
41
+ $this->result = $result;
42
+ }
43
+
44
+ /**
45
+ * Empty out the header of its HTML content and only check to see if it has
46
+ * been performed or not.
47
+ *
48
+ * @since 3.04.02
49
+ */
50
+ public function header() {}
51
+
52
+ /**
53
+ * Empty out the footer of its HTML contents.
54
+ *
55
+ * @since 3.04.02
56
+ */
57
+ function footer() {}
58
+
59
+ /**
60
+ * Instead of outputting HTML for errors, json_encode the errors and send them
61
+ * back to the Ajax script for processing.
62
+ *
63
+ * @since 3.04.02
64
+ *
65
+ * @param array $errors Array of errors with the install process.
66
+ */
67
+ function error( $errors ) {
68
+ if ( ! empty( $errors ) ) {
69
+ echo json_encode( array( 'error' => $errors->get_error_message() ) );
70
+ wp_die();
71
+ }
72
+ }
73
+
74
+ /**
75
+ * Empty out the feedback method to prevent outputting HTML strings as the install
76
+ * is progressing.
77
+ *
78
+ * @since 3.04.02
79
+ *
80
+ * @param string $string The feedback string.
81
+ */
82
+ function feedback( $string ) {}
83
+
84
+ }
classes/views/addons/list.php CHANGED
@@ -3,32 +3,45 @@
3
 
4
  <div id="the-list" class="frm-addons">
5
  <?php foreach ( $addons as $slug => $addon ) { ?>
6
- <div class="plugin-card plugin-card-<?php echo esc_attr( $slug ) ?> frm-no-thumb">
7
  <div class="plugin-card-top">
8
- <div class="name column-name">
9
- <h3>
10
- <a href="<?php echo esc_url( $site_url . $addon['link'] ) ?>">
11
- <?php echo esc_html( $addon['title'] ) ?>
12
- </a>
13
- </h3>
14
- </div>
15
- <div class="action-links">
16
- <ul class="plugin-action-buttons">
17
- <?php if ( $addon['installed'] ) { ?>
18
- <?php if ( empty( $addon['activate_url'] ) ) { ?>
19
- <li><span class="button button-disabled" title="<?php esc_attr_e( 'This plugin is already installed', 'formidable' ) ?>"><?php esc_html_e( 'Installed', 'formidable' ) ?></span></li>
20
- <?php } else { ?>
21
- <li><a href="<?php echo esc_url( $addon['activate_url'] ) ?>" class="button activate-now"><?php esc_html_e( 'Activate', 'formidable' ); ?></a></li>
22
- <?php } ?>
23
- <?php } else { ?>
24
- <li><a class="install-now button" href="<?php echo esc_url( $site_url . $addon['link'] ) ?>" target="_blank" aria-label="<?php esc_attr_e( 'Get Started', 'formidable' ) ?>"><?php esc_html_e( 'Get Started', 'formidable' ) ?></a></li>
25
- <?php } ?>
26
- <li><a href="<?php echo esc_url( $site_url . 'knowledgebase/' . $addon['docs'] ) ?>" target="_blank" aria-label="<?php esc_attr_e( 'View Docs', 'formidable' ) ?>"><?php esc_html_e( 'View Docs', 'formidable' ) ?></a></li>
27
- </ul>
28
- </div>
29
- <div class="desc column-description">
30
- <p><?php echo wp_kses_post( $addon['excerpt'] ) ?></p>
31
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  </div>
33
  </div>
34
  <?php } ?>
3
 
4
  <div id="the-list" class="frm-addons">
5
  <?php foreach ( $addons as $slug => $addon ) { ?>
6
+ <div class="plugin-card plugin-card-<?php echo esc_attr( $slug ); ?> frm-no-thumb frm-addon-<?php echo esc_attr( $addon['status']['type'] ); ?>">
7
  <div class="plugin-card-top">
8
+ <h2>
9
+ <?php echo esc_html( $addon['title'] ) ?>
10
+ </h2>
11
+ <p><?php echo esc_html( $addon['excerpt'] ); ?></p>
12
+ <?php if ( isset( $addon['docs'] ) && ! empty( $addon['docs'] ) && $addon['installed'] ) { ?>
13
+ <a href="<?php echo esc_url( $addon['docs'] ); ?>" target="_blank" aria-label="<?php esc_attr_e( 'View Docs', 'formidable' ); ?>">
14
+ <?php esc_html_e( 'View Docs', 'formidable' ); ?>
15
+ </a>
16
+ <?php } ?>
17
+ </div>
18
+ <div class="plugin-card-bottom">
19
+ <span class="addon-status">
20
+ <?php
21
+ printf(
22
+ esc_html__( 'Status: %s', 'formidable' ),
23
+ '<span class="addon-status-label">' . esc_html( $addon['status']['label'] ) . '</span>'
24
+ );
25
+ ?>
26
+ </span>
27
+ <?php if ( $addon['status']['type'] === 'installed' ) { ?>
28
+ <a href="<?php echo esc_url( $addon['activate_url'] ) ?>" class="button activate-now frm_button <?php echo esc_attr( empty( $addon['activate_url'] ) ? 'frm_hidden' : '' ); ?>">
29
+ <?php esc_html_e( 'Activate', 'formidable' ); ?>
30
+ </a>
31
+ <?php } elseif ( isset( $addon['url'] ) && ! empty( $addon['url'] ) ) { ?>
32
+ <a class="frm-install-addon button frm_button" rel="<?php echo esc_attr( $addon['url'] ); ?>" aria-label="<?php esc_attr_e( 'Install', 'formidable' ); ?>">
33
+ <?php esc_html_e( 'Install', 'formidable' ); ?>
34
+ </a>
35
+ <span class="spinner"></span>
36
+ <?php } elseif ( FrmAppHelper::pro_is_installed() ) { ?>
37
+ <a class="install-now button frm_button" href="<?php echo esc_url( $pricing ); ?>" target="_blank" aria-label="<?php esc_attr_e( 'Get Started', 'formidable' ); ?>">
38
+ <?php esc_html_e( 'Get Started', 'formidable' ); ?>
39
+ </a>
40
+ <?php } else { ?>
41
+ <a class="install-now button frm_button" href="<?php echo esc_url( $pricing ); ?>" target="_blank" aria-label="<?php esc_attr_e( 'Upgrade Now', 'formidable' ); ?>">
42
+ <?php esc_html_e( 'Upgrade Now', 'formidable' ); ?>
43
+ </a>
44
+ <?php } ?>
45
  </div>
46
  </div>
47
  <?php } ?>
classes/views/addons/upgrade_to_pro.php CHANGED
@@ -1,8 +1,8 @@
1
  <div class="wrap upgrade_to_pro">
2
  <h1 class="frm_pro_heading">
3
  <img src="<?php echo esc_url( FrmAppHelper::plugin_url() ) ?>/images/logo.png" alt="Upgrade to Pro" />
4
- <span class="alignright">Take on bigger projects, earn more clients and grow your business.</br>
5
- Upgrade to Pro.</span>
6
  <span class="clear"></span>
7
  </h1>
8
 
@@ -20,7 +20,7 @@
20
  <th>
21
  <h3><?php echo esc_attr( ucfirst( $price_info['name'] ) ) ?></h3>
22
  <h4>$<?php echo esc_attr( $price_info['price'] ) ?></h4>
23
- <a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url( 'https://formidableforms.com/checkout?edd_action=add_to_cart' ) ) ?>&amp;download_id=<?php echo absint( $price_info['download'] ) ?>&amp;edd_options[price_id]=<?php echo absint( $price_info['id'] ) ?>" class="button-primary" target="_blank">
24
  <?php esc_html_e( 'Get Started', 'formidable' ) ?>
25
  </a>
26
  </th>
@@ -59,9 +59,9 @@
59
  <tr>
60
  <th>Included AddOns</th>
61
  <td>None</td>
62
- <td><a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url( 'https://formidableforms.com/pricing/#addon-lists' ) ); ?>" target="_blank">Premium Addons</a></td>
63
- <td><a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url( 'https://formidableforms.com/pricing/#addon-lists' ) ); ?>" target="_blank">Advanced Addons</a></td>
64
- <td><a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url( 'https://formidableforms.com/pricing/#addon-lists' ) ); ?>" target="_blank">Enterprise Addons</a></td>
65
  </tr>
66
  </tbody>
67
  </table>
@@ -87,7 +87,7 @@
87
  </tr>
88
  <tr>
89
  <th>
90
- <a href="https://formidableforms.com/features/wordpress-form-templates/" target="_blank">
91
  Create forms from Templates
92
  </a>
93
  </th>
@@ -96,7 +96,7 @@
96
  </tr>
97
  <tr>
98
  <th>
99
- <a href="https://formidableforms.com/features/importing-exporting-wordpress-forms/" target="_blank">
100
  Import and export forms with XML
101
  </a>
102
  </th>
@@ -109,18 +109,18 @@
109
  <td><i class="frm_icon_font frm_check_icon"></i></td>
110
  </tr>
111
  <tr>
112
- <th>Include text, email, url, paragraph text, radio, checkbox, and dropdown fields in your form</th>
113
  <td><i class="frm_icon_font frm_check_icon"></i></td>
114
  <td><i class="frm_icon_font frm_check_icon"></i></td>
115
  </tr>
116
  <tr>
117
- <th>Include Section headings, page breaks, rich text, date, time, scale, dynamic fields populated from other forms, hidden fields, user ID fields, password, HTML, and tags fields</th>
118
  <td><i class="frm_icon_font frm_cancel1_icon"></i></td>
119
  <td><i class="frm_icon_font frm_check_icon"></i></td>
120
  </tr>
121
  <tr>
122
  <th>
123
- <a href="https://formidableforms.com/features/wordpress-calculated-fields-form/" target="_blank">
124
  Save a calculated value into a field
125
  </a>
126
  </th>
@@ -129,7 +129,7 @@
129
  </tr>
130
  <tr>
131
  <th>
132
- <a href="https://formidableforms.com/features/wordpress-multiple-file-upload-form/" target="_blank">
133
  Allow multiple file uploads
134
  </a>
135
  </th>
@@ -138,7 +138,7 @@
138
  </tr>
139
  <tr>
140
  <th>
141
- <a href="https://formidableforms.com/features/dynamically-add-form-fields/" target="_blank">
142
  Repeat sections of fields
143
  </a>
144
  </th>
@@ -147,7 +147,7 @@
147
  </tr>
148
  <tr>
149
  <th>
150
- <a href="https://formidableforms.com/features/conditional-logic-wordpress-forms/" target="_blank">
151
  Hide and show fields conditionally based on other fields or the user's role
152
  </a>
153
  </th>
@@ -156,7 +156,7 @@
156
  </tr>
157
  <tr>
158
  <th>
159
- <a href="https://formidableforms.com/features/confirm-email-address-password-wordpress-form/" target="_blank">
160
  Confirmation fields
161
  </a>
162
  </th>
@@ -165,7 +165,7 @@
165
  </tr>
166
  <tr>
167
  <th>
168
- <a href="https://formidableforms.com/features/wordpress-multi-step-form/" target="_blank">
169
  Multi-paged forms
170
  </a>
171
  </th>
@@ -175,7 +175,7 @@
175
  <tr><th colspan="3" class="frm_table_break">Form Actions</th></tr>
176
  <tr>
177
  <th>
178
- <a href="https://formidableforms.com/features/email-autoresponders-wordpress/" target="_blank">
179
  Send multiple emails and autoresponders
180
  </a>
181
  </th>
@@ -189,7 +189,7 @@
189
  </tr>
190
  <tr>
191
  <th>
192
- <a href="https://formidableforms.com/features/user-submitted-posts-wordpress-forms/" target="_blank">
193
  Create and edit WordPress posts or custom posts from the front-end
194
  </a>
195
  </th>
@@ -199,7 +199,7 @@
199
  <tr><th colspan="3" class="frm_table_break">Form Appearance</th></tr>
200
  <tr>
201
  <th>
202
- <a href="https://formidableforms.com/features/flexible-layouts-responsive-forms/" target="_blank">
203
  Customizable layout with CSS classes
204
  </a>
205
  </th>
@@ -208,7 +208,7 @@
208
  </tr>
209
  <tr>
210
  <th>
211
- <a href="https://formidableforms.com/features/customize-form-html-wordpress/" target="_blank">
212
  Customize the HTML for your forms
213
  </a>
214
  </th>
@@ -217,7 +217,7 @@
217
  </tr>
218
  <tr>
219
  <th>
220
- <a href="https://formidableforms.com/features/wordpress-visual-form-styler/" target="_blank">
221
  Style your form with the Visual Form Styler
222
  </a>
223
  </th>
@@ -226,7 +226,7 @@
226
  </tr>
227
  <tr>
228
  <th>
229
- <a href="https://formidableforms.com/features/wordpress-visual-form-styler/" target="_blank">
230
  Create Multiple styles for different forms
231
  </a>
232
  </th>
@@ -251,7 +251,7 @@
251
  </tr>
252
  <tr>
253
  <th>
254
- <a href="https://formidableforms.com/features/save-and-continue-partial-submissions/" target="_blank">
255
  Logged-in users can save drafts and return later
256
  </a>
257
  </th>
@@ -260,7 +260,7 @@
260
  </tr>
261
  <tr>
262
  <th>
263
- <a href="https://formidableforms.com/features/front-end-editing-wordpress/" target="_blank">
264
  Flexibly and powerfully view, edit, and delete entries from anywhere on your site
265
  </a>
266
  </th>
@@ -270,7 +270,7 @@
270
  <tr><th colspan="3" class="frm_table_break">Display Entries</th></tr>
271
  <tr>
272
  <th>
273
- <a href="https://formidableforms.com/features/create-a-graph-wordpress-forms/" target="_blank">
274
  Generate graphs and stats based on your submitted data
275
  </a>
276
  </th>
@@ -279,7 +279,7 @@
279
  </tr>
280
  <tr>
281
  <th>
282
- <a href="https://formidableforms.com/features/display-form-data-views/" target="_blank">
283
  Virtually limitless views
284
  </a>
285
  </th>
1
  <div class="wrap upgrade_to_pro">
2
  <h1 class="frm_pro_heading">
3
  <img src="<?php echo esc_url( FrmAppHelper::plugin_url() ) ?>/images/logo.png" alt="Upgrade to Pro" />
4
+ <span class="alignright">Take on bigger projects, earn more clients and grow your business.<br/>
5
+ <a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url( FrmAppHelper::admin_upgrade_link( 'upgrade' ) ) ); ?>" target="_blank">Upgrade to Pro</a>.</span>
6
  <span class="clear"></span>
7
  </h1>
8
 
20
  <th>
21
  <h3><?php echo esc_attr( ucfirst( $price_info['name'] ) ) ?></h3>
22
  <h4>$<?php echo esc_attr( $price_info['price'] ) ?></h4>
23
+ <a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url( FrmAppHelper::admin_upgrade_link( 'upgrade' ) ) ); ?>" class="button-primary" target="_blank">
24
  <?php esc_html_e( 'Get Started', 'formidable' ) ?>
25
  </a>
26
  </th>
59
  <tr>
60
  <th>Included AddOns</th>
61
  <td>None</td>
62
+ <td><a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url( FrmAppHelper::admin_upgrade_link( 'upgrade' ) ) ); ?>" target="_blank">Premium Addons</a></td>
63
+ <td><a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url( FrmAppHelper::admin_upgrade_link( 'upgrade' ) ) ); ?>" target="_blank">Advanced Addons</a></td>
64
+ <td><a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url( FrmAppHelper::admin_upgrade_link( 'upgrade' ) ) ); ?>" target="_blank">Enterprise Addons</a></td>
65
  </tr>
66
  </tbody>
67
  </table>
87
  </tr>
88
  <tr>
89
  <th>
90
+ <a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'upgrade', 'features/wordpress-form-templates/' ) ); ?>" target="_blank">
91
  Create forms from Templates
92
  </a>
93
  </th>
96
  </tr>
97
  <tr>
98
  <th>
99
+ <a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'upgrade', 'features/importing-exporting-wordpress-forms/' ) ); ?>" target="_blank">
100
  Import and export forms with XML
101
  </a>
102
  </th>
109
  <td><i class="frm_icon_font frm_check_icon"></i></td>
110
  </tr>
111
  <tr>
112
+ <th>Include text, email, url, paragraph text, radio, checkbox, dropdown fields, hidden fields, user ID fields, and HTML blocks in your form</th>
113
  <td><i class="frm_icon_font frm_check_icon"></i></td>
114
  <td><i class="frm_icon_font frm_check_icon"></i></td>
115
  </tr>
116
  <tr>
117
+ <th>Include section headings, page breaks, rich text, dates, times, scales, star ratings, sliders, toggles, dynamic fields populated from other forms, passwords, and tags in advanced forms</th>
118
  <td><i class="frm_icon_font frm_cancel1_icon"></i></td>
119
  <td><i class="frm_icon_font frm_check_icon"></i></td>
120
  </tr>
121
  <tr>
122
  <th>
123
+ <a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'upgrade', 'features/wordpress-calculated-fields-form/' ) ); ?>" target="_blank">
124
  Save a calculated value into a field
125
  </a>
126
  </th>
129
  </tr>
130
  <tr>
131
  <th>
132
+ <a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'upgrade', 'features/wordpress-multiple-file-upload-form/' ) ); ?>" target="_blank">
133
  Allow multiple file uploads
134
  </a>
135
  </th>
138
  </tr>
139
  <tr>
140
  <th>
141
+ <a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'upgrade', 'features/dynamically-add-form-fields/' ) ); ?>" target="_blank">
142
  Repeat sections of fields
143
  </a>
144
  </th>
147
  </tr>
148
  <tr>
149
  <th>
150
+ <a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'upgrade', 'features/conditional-logic-wordpress-forms/' ) ); ?>" target="_blank">
151
  Hide and show fields conditionally based on other fields or the user's role
152
  </a>
153
  </th>
156
  </tr>
157
  <tr>
158
  <th>
159
+ <a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'upgrade', 'features/confirm-email-address-password-wordpress-form/' ) ); ?>" target="_blank">
160
  Confirmation fields
161
  </a>
162
  </th>
165
  </tr>
166
  <tr>
167
  <th>
168
+ <a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'upgrade', 'features/wordpress-multi-step-form/' ) ); ?>" target="_blank">
169
  Multi-paged forms
170
  </a>
171
  </th>
175
  <tr><th colspan="3" class="frm_table_break">Form Actions</th></tr>
176
  <tr>
177
  <th>
178
+ <a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'upgrade', 'features/email-autoresponders-wordpress/' ) ); ?>" target="_blank">
179
  Send multiple emails and autoresponders
180
  </a>
181
  </th>
189
  </tr>
190
  <tr>
191
  <th>
192
+ <a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'upgrade', 'features/user-submitted-posts-wordpress-forms/' ) ); ?>" target="_blank">
193
  Create and edit WordPress posts or custom posts from the front-end
194
  </a>
195
  </th>
199
  <tr><th colspan="3" class="frm_table_break">Form Appearance</th></tr>
200
  <tr>
201
  <th>
202
+ <a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'upgrade', 'features/flexible-layouts-responsive-forms/' ) ); ?>" target="_blank">
203
  Customizable layout with CSS classes
204
  </a>
205
  </th>
208
  </tr>
209
  <tr>
210
  <th>
211
+ <a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'upgrade', 'features/customize-form-html-wordpress/' ) ); ?>" target="_blank">
212
  Customize the HTML for your forms
213
  </a>
214
  </th>
217
  </tr>
218
  <tr>
219
  <th>
220
+ <a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'upgrade', 'features/wordpress-visual-form-styler/' ) ); ?>" target="_blank">
221
  Style your form with the Visual Form Styler
222
  </a>
223
  </th>
226
  </tr>
227
  <tr>
228
  <th>
229
+ <a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'upgrade', 'features/wordpress-visual-form-styler/' ) ); ?>" target="_blank">
230
  Create Multiple styles for different forms
231
  </a>
232
  </th>
251
  </tr>
252
  <tr>
253
  <th>
254
+ <a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'upgrade', 'features/save-and-continue-partial-submissions/' ) ); ?>" target="_blank">
255
  Logged-in users can save drafts and return later
256
  </a>
257
  </th>
260
  </tr>
261
  <tr>
262
  <th>
263
+ <a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'upgrade', 'features/front-end-editing-wordpress/' ) ); ?>" target="_blank">
264
  Flexibly and powerfully view, edit, and delete entries from anywhere on your site
265
  </a>
266
  </th>
270
  <tr><th colspan="3" class="frm_table_break">Display Entries</th></tr>
271
  <tr>
272
  <th>
273
+ <a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'upgrade', 'features/create-a-graph-wordpress-forms/' ) ); ?>" target="_blank">
274
  Generate graphs and stats based on your submitted data
275
  </a>
276
  </th>
279
  </tr>
280
  <tr>
281
  <th>
282
+ <a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'upgrade', 'features/display-form-data-views/' ) ); ?>" target="_blank">
283
  Virtually limitless views
284
  </a>
285
  </th>
classes/views/frm-entries/errors.php CHANGED
@@ -6,7 +6,7 @@ if ( isset( $include_extra_container ) ) { ?>
6
  if ( isset( $message ) && $message != '' ) {
7
  if ( FrmAppHelper::is_admin() ) {
8
  ?>
9
- <div id="message" class="frm_updated_message updated"><?php echo wp_kses_post( $message ) ?></div>
10
  <?php
11
  } else {
12
  FrmFormsHelper::maybe_get_scroll_js( $form->id );
6
  if ( isset( $message ) && $message != '' ) {
7
  if ( FrmAppHelper::is_admin() ) {
8
  ?>
9
+ <div id="message" class="frm_updated_message"><?php echo wp_kses_post( $message ) ?></div>
10
  <?php
11
  } else {
12
  FrmFormsHelper::maybe_get_scroll_js( $form->id );
classes/views/frm-entries/no_entries.php CHANGED
@@ -4,7 +4,7 @@
4
  <p><?php printf( esc_html__( 'If you would like to save entries in this form, go to the %1$sform Settings%2$s page %3$s and uncheck the "Do not store any entries submitted from this form" box.', 'formidable' ), '<a href="' . esc_url( admin_url( 'admin.php?page=formidable&frm_action=settings&id=' . $form->id ) ) . '">', '</a>', '</br>' ) ?></p>
5
  <?php } elseif ( $form ) { ?>
6
  <div class="frm_no_entries_header"><?php printf( esc_html__( 'No Entries for form: %s', 'formidable' ), esc_html( $form->name ) ); ?></div>
7
- <p class="frm_no_entries_text"><?php printf( esc_html__( 'See the %1$sform documentation%2$s for instructions on publishing your form', 'formidable' ), '<a href="https://formidableforms.com/knowledgebase/publish-your-forms/" target="_blank">', '</a>' ); ?></p>
8
  <?php } else { ?>
9
  <div class="frm_no_entries_header"><?php esc_html_e( 'You have not created any forms yet.', 'formidable' ); ?></div>
10
  <p class="frm_no_entries_text"><?php printf( esc_html__( 'To view entries, you must first %1$sbuild a form%2$s', 'formidable' ), '<a href="' . esc_url( admin_url( 'admin.php?page=formidable&frm_action=new' ) ) . '">', '</a>' ); ?></p>
4
  <p><?php printf( esc_html__( 'If you would like to save entries in this form, go to the %1$sform Settings%2$s page %3$s and uncheck the "Do not store any entries submitted from this form" box.', 'formidable' ), '<a href="' . esc_url( admin_url( 'admin.php?page=formidable&frm_action=settings&id=' . $form->id ) ) . '">', '</a>', '</br>' ) ?></p>
5
  <?php } elseif ( $form ) { ?>
6
  <div class="frm_no_entries_header"><?php printf( esc_html__( 'No Entries for form: %s', 'formidable' ), esc_html( $form->name ) ); ?></div>
7
+ <p class="frm_no_entries_text"><?php printf( esc_html__( 'See the %1$sform documentation%2$s for instructions on publishing your form', 'formidable' ), '<a href="https://formidableforms.com/knowledgebase/publish-your-forms/?utm_source=WordPress&utm_medium=entries&utm_campaign=liteplugin" target="_blank">', '</a>' ); ?></p>
8
  <?php } else { ?>
9
  <div class="frm_no_entries_header"><?php esc_html_e( 'You have not created any forms yet.', 'formidable' ); ?></div>
10
  <p class="frm_no_entries_text"><?php printf( esc_html__( 'To view entries, you must first %1$sbuild a form%2$s', 'formidable' ), '<a href="' . esc_url( admin_url( 'admin.php?page=formidable&frm_action=new' ) ) . '">', '</a>' ); ?></p>
classes/views/frm-form-actions/default_actions.php CHANGED
@@ -3,7 +3,7 @@
3
  class FrmDefPostAction extends FrmFormAction {
4
  public function __construct() {
5
  $action_ops = FrmFormAction::default_action_opts();
6
- $action_ops['classes'] = 'ab-icon frm_dashicon_font dashicons-before';
7
 
8
  parent::__construct( 'wppost', __( 'Create Post', 'formidable' ), $action_ops );
9
  }
@@ -12,7 +12,7 @@ class FrmDefPostAction extends FrmFormAction {
12
  // add register action
13
  class FrmDefRegAction extends FrmFormAction {
14
  public function __construct() {
15
- $action_ops = FrmFormAction::default_action_opts( 'frm_register_icon' );
16
  parent::__construct( 'register', __( 'Register User', 'formidable' ), $action_ops );
17
  }
18
  }
@@ -20,15 +20,15 @@ class FrmDefRegAction extends FrmFormAction {
20
  // add paypal action
21
  class FrmDefPayPalAction extends FrmFormAction {
22
  public function __construct() {
23
- $action_ops = FrmFormAction::default_action_opts( 'frm_paypal_icon' );
24
- parent::__construct( 'paypal', __( 'Collect Payment', 'formidable' ), $action_ops );
25
  }
26
  }
27
 
28
  // add aweber action
29
  class FrmDefAweberAction extends FrmFormAction {
30
  public function __construct() {
31
- $action_ops = FrmFormAction::default_action_opts( 'frm_aweber_icon' );
32
  parent::__construct( 'aweber', __( 'Aweber', 'formidable' ), $action_ops );
33
  }
34
  }
@@ -36,7 +36,7 @@ class FrmDefAweberAction extends FrmFormAction {
36
  // add mailchimp action
37
  class FrmDefMlcmpAction extends FrmFormAction {
38
  public function __construct() {
39
- $action_ops = FrmFormAction::default_action_opts( 'frm_mailchimp_icon' );
40
  parent::__construct( 'mailchimp', __( 'MailChimp', 'formidable' ), $action_ops );
41
  }
42
  }
@@ -44,15 +44,15 @@ class FrmDefMlcmpAction extends FrmFormAction {
44
  // add twilio action
45
  class FrmDefTwilioAction extends FrmFormAction {
46
  public function __construct() {
47
- $action_ops = FrmFormAction::default_action_opts( 'frm_sms_icon' );
48
- parent::__construct( 'twilio', __( 'Twilio', 'formidable' ), $action_ops );
49
  }
50
  }
51
 
52
- // add highrise action
53
  class FrmDefHrsAction extends FrmFormAction {
54
  public function __construct() {
55
- $action_ops = FrmFormAction::default_action_opts( 'frm_highrise_icon' );
56
- parent::__construct( 'highrise', __( 'Highrise', 'formidable' ), $action_ops );
57
  }
58
  }
3
  class FrmDefPostAction extends FrmFormAction {
4
  public function __construct() {
5
  $action_ops = FrmFormAction::default_action_opts();
6
+ $action_ops['classes'] = 'ab-icon frm_dashicon_font dashicons-before frm_show_upgrade';
7
 
8
  parent::__construct( 'wppost', __( 'Create Post', 'formidable' ), $action_ops );
9
  }
12
  // add register action
13
  class FrmDefRegAction extends FrmFormAction {
14
  public function __construct() {
15
+ $action_ops = FrmFormAction::default_action_opts( 'frm_register_icon frm_show_upgrade' );
16
  parent::__construct( 'register', __( 'Register User', 'formidable' ), $action_ops );
17
  }
18
  }
20
  // add paypal action
21
  class FrmDefPayPalAction extends FrmFormAction {
22
  public function __construct() {
23
+ $action_ops = FrmFormAction::default_action_opts( 'frm_paypal_icon frm_show_upgrade' );
24
+ parent::__construct( 'paypal', __( 'PayPal Payment', 'formidable' ), $action_ops );
25
  }
26
  }
27
 
28
  // add aweber action
29
  class FrmDefAweberAction extends FrmFormAction {
30
  public function __construct() {
31
+ $action_ops = FrmFormAction::default_action_opts( 'frm_aweber_icon frm_show_upgrade' );
32
  parent::__construct( 'aweber', __( 'Aweber', 'formidable' ), $action_ops );
33
  }
34
  }
36
  // add mailchimp action
37
  class FrmDefMlcmpAction extends FrmFormAction {
38
  public function __construct() {
39
+ $action_ops = FrmFormAction::default_action_opts( 'frm_mailchimp_icon frm_show_upgrade' );
40
  parent::__construct( 'mailchimp', __( 'MailChimp', 'formidable' ), $action_ops );
41
  }
42
  }
44
  // add twilio action
45
  class FrmDefTwilioAction extends FrmFormAction {
46
  public function __construct() {
47
+ $action_ops = FrmFormAction::default_action_opts( 'frm_sms_icon frm_show_upgrade' );
48
+ parent::__construct( 'twilio', __( 'Twilio SMS', 'formidable' ), $action_ops );
49
  }
50
  }
51
 
52
+ // add payment action
53
  class FrmDefHrsAction extends FrmFormAction {
54
  public function __construct() {
55
+ $action_ops = FrmFormAction::default_action_opts( 'frm_stripe_icon frm_credit-card-alt_icon frm_show_upgrade' );
56
+ parent::__construct( 'payment', __( 'Credit Card Payment', 'formidable' ), $action_ops );
57
  }
58
  }
classes/views/frm-forms/add_field_links.php CHANGED
@@ -48,6 +48,10 @@ foreach ( $frm_field_selection as $field_key => $field_type ) {
48
  <?php
49
 
50
  $no_allow_class = apply_filters( 'frm_noallow_class', 'frm_noallow' );
 
 
 
 
51
  foreach ( FrmField::pro_field_selection() as $field_key => $field_type ) {
52
 
53
  if ( is_array( $field_type ) && isset( $field_type['switch_from'] ) ) {
@@ -78,9 +82,11 @@ foreach ( FrmField::pro_field_selection() as $field_key => $field_type ) {
78
  <?php
79
  } else {
80
  $field_label = '<i class="' . esc_attr( FrmFormsHelper::get_field_link_icon( $field_type ) ) . ' frm_animate_bg"></i>';
81
- $field_label .= ' <span>' . FrmFormsHelper::get_field_link_name( $field_type ) . '</span>';
 
 
82
  ?>
83
- <li class="frmbutton button <?php echo esc_attr( $no_allow_class . ' frm_t' . str_replace( '|', '-', $field_key ) ) ?>" id="<?php echo esc_attr( $field_key ) ?>">
84
  <?php echo FrmAppHelper::kses( apply_filters( 'frmpro_field_links', $field_label, $id, $field_key ), array( 'a', 'i', 'span' ) ); // WPCS: XSS ok. ?>
85
  </li>
86
  <?php
48
  <?php
49
 
50
  $no_allow_class = apply_filters( 'frm_noallow_class', 'frm_noallow' );
51
+ if ( $no_allow_class === 'frm_noallow' ) {
52
+ $no_allow_class .= ' frm_show_upgrade';
53
+ FrmAppController::include_upgrade_overlay();
54
+ }
55
  foreach ( FrmField::pro_field_selection() as $field_key => $field_type ) {
56
 
57
  if ( is_array( $field_type ) && isset( $field_type['switch_from'] ) ) {
82
  <?php
83
  } else {
84
  $field_label = '<i class="' . esc_attr( FrmFormsHelper::get_field_link_icon( $field_type ) ) . ' frm_animate_bg"></i>';
85
+ $field_name = FrmFormsHelper::get_field_link_name( $field_type );
86
+ $field_label .= ' <span>' . $field_name . '</span>';
87
+ $upgrade_label = sprintf( esc_html__( '%s fields', 'formidable' ), $field_name );
88
  ?>
89
+ <li class="frmbutton button <?php echo esc_attr( $no_allow_class . ' frm_t' . str_replace( '|', '-', $field_key ) ) ?>" id="<?php echo esc_attr( $field_key ) ?>" data-upgrade="<?php echo esc_attr( $upgrade_label ); ?>" data-medium="builder-<?php echo esc_attr( sanitize_title( $upgrade_label ) ); ?>">
90
  <?php echo FrmAppHelper::kses( apply_filters( 'frmpro_field_links', $field_label, $id, $field_key ), array( 'a', 'i', 'span' ) ); // WPCS: XSS ok. ?>
91
  </li>
92
  <?php
classes/views/frm-forms/settings.php CHANGED
@@ -57,7 +57,6 @@
57
  </ul>
58
  </div>
59
  <div class="advanced_settings tabs-panel <?php echo esc_attr( $a === 'advanced_settings' ? 'frm_block' : 'frm_hidden' ); ?>">
60
- <?php FrmTipsHelper::pro_tip( 'get_form_settings_tip', 'p' ); ?>
61
 
62
  <?php if ( ! $values['is_template'] ) { ?>
63
  <h3 id="frm_shortcode" class="<?php echo esc_attr( $first_h3 ) ?>">
@@ -181,6 +180,7 @@
181
  </td>
182
  </tr>
183
  </table>
 
184
 
185
  <!--Permissions Section-->
186
  <?php do_action( 'frm_add_form_perm_options', $values ); ?>
@@ -264,12 +264,19 @@
264
  <?php
265
 
266
  //For each add-on, add an li, class, and javascript function. If active, add an additional class.
267
- foreach ( $action_controls as $action_control ) {
 
268
  $classes = ( isset( $action_control->action_options['active'] ) && $action_control->action_options['active'] ) ? 'frm_active_action ' : 'frm_inactive_action ';
269
  $classes .= $action_control->action_options['classes'];
 
 
 
 
 
 
270
  ?>
271
  <li>
272
- <a href="javascript:void(0)" class="frm_<?php echo esc_attr( $action_control->id_base ) ?>_action frm_bstooltip <?php echo esc_attr( $classes ); ?>" title="<?php echo esc_attr( $action_control->action_options['tooltip'] ) ?>" data-limit="<?php echo esc_attr( isset( $action_control->action_options['limit'] ) ? $action_control->action_options['limit'] : '99' ); ?>" data-actiontype="<?php echo esc_attr( $action_control->id_base ) ?>"></a>
273
  </li>
274
  <?php
275
  unset( $actions_icon, $classes );
57
  </ul>
58
  </div>
59
  <div class="advanced_settings tabs-panel <?php echo esc_attr( $a === 'advanced_settings' ? 'frm_block' : 'frm_hidden' ); ?>">
 
60
 
61
  <?php if ( ! $values['is_template'] ) { ?>
62
  <h3 id="frm_shortcode" class="<?php echo esc_attr( $first_h3 ) ?>">
180
  </td>
181
  </tr>
182
  </table>
183
+ <?php FrmTipsHelper::pro_tip( 'get_form_settings_tip', 'p' ); ?>
184
 
185
  <!--Permissions Section-->
186
  <?php do_action( 'frm_add_form_perm_options', $values ); ?>
264
  <?php
265
 
266
  //For each add-on, add an li, class, and javascript function. If active, add an additional class.
267
+ $included = false;
268
+ foreach ( $action_controls as $action_control ) {
269
  $classes = ( isset( $action_control->action_options['active'] ) && $action_control->action_options['active'] ) ? 'frm_active_action ' : 'frm_inactive_action ';
270
  $classes .= $action_control->action_options['classes'];
271
+
272
+ if ( ! $included && strpos( $classes, 'frm_show_upgrade' ) ) {
273
+ $included = true;
274
+ FrmAppController::include_upgrade_overlay();
275
+ }
276
+ $upgrade_label = sprintf( esc_html__( '%s form actions', 'formidable' ), $action_control->action_options['tooltip'] );
277
  ?>
278
  <li>
279
+ <a href="javascript:void(0)" class="frm_<?php echo esc_attr( $action_control->id_base ) ?>_action frm_bstooltip <?php echo esc_attr( $classes ); ?>" title="<?php echo esc_attr( $action_control->action_options['tooltip'] ) ?>" data-limit="<?php echo esc_attr( isset( $action_control->action_options['limit'] ) ? $action_control->action_options['limit'] : '99' ); ?>" data-actiontype="<?php echo esc_attr( $action_control->id_base ) ?>" data-upgrade="<?php echo esc_attr( $upgrade_label ); ?>" data-medium="settings-<?php echo esc_attr( $action_control->id_base ); ?>"></a>
280
  </li>
281
  <?php
282
  unset( $actions_icon, $classes );
classes/views/frm-settings/form.php CHANGED
@@ -3,6 +3,18 @@
3
 
4
  <?php require( FrmAppHelper::plugin_path() . '/classes/views/shared/errors.php' ); ?>
5
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  <div id="poststuff" class="metabox-holder">
7
  <div id="post-body">
8
  <div class="meta-box-sortables">
@@ -26,8 +38,6 @@
26
  </ul>
27
  </div>
28
 
29
- <?php do_action( 'frm_before_settings' ); ?>
30
-
31
  <form name="frm_settings_form" method="post" class="frm_settings_form" action="?page=formidable-settings<?php echo esc_html( $a ? '&amp;t=' . $a : '' ); ?>">
32
  <input type="hidden" name="frm_action" value="process-form" />
33
  <input type="hidden" name="action" value="process-form" />
@@ -233,4 +243,6 @@
233
  </div>
234
 
235
  </div>
 
 
236
  </div>
3
 
4
  <?php require( FrmAppHelper::plugin_path() . '/classes/views/shared/errors.php' ); ?>
5
 
6
+ <div class="metabox-holder">
7
+ <div class="postbox">
8
+ <div class="inside frm_license_box">
9
+ <h2><?php esc_html_e( 'License', 'formidable' ); ?></h2>
10
+ <hr/>
11
+ <p class="howto"><?php esc_html_e( 'Your license key provides access to automatic updates.' ); ?></p>
12
+
13
+ <?php do_action( 'frm_before_settings' ); ?>
14
+ </div>
15
+ </div>
16
+ </div>
17
+
18
  <div id="poststuff" class="metabox-holder">
19
  <div id="post-body">
20
  <div class="meta-box-sortables">
38
  </ul>
39
  </div>
40
 
 
 
41
  <form name="frm_settings_form" method="post" class="frm_settings_form" action="?page=formidable-settings<?php echo esc_html( $a ? '&amp;t=' . $a : '' ); ?>">
42
  <input type="hidden" name="frm_action" value="process-form" />
43
  <input type="hidden" name="action" value="process-form" />
243
  </div>
244
 
245
  </div>
246
+
247
+ <?php do_action( 'frm_after_settings' ); ?>
248
  </div>
classes/views/frm-settings/license_box.php CHANGED
@@ -1,13 +1,13 @@
1
- <div class="general_settings metabox-holder tabs-panel frm_license_box <?php echo esc_attr( 'general_settings' === $a ? 'frm_block' : 'frm_hidden' ); ?>">
2
- <?php if ( ! is_multisite() || current_user_can( 'setup_network' ) ) { ?>
3
- <div class="postbox">
4
- <div class="inside">
5
- <p><?php esc_html_e( 'Get more field types including multiple file upload and cascading lookups. PLUS multi-page forms, calculations, repeatable sections, confirmation fields, conditional logic, front-end editing, views, data management, and graph & stat reporting.', 'formidable' ); ?>
6
- <?php printf( esc_html__( '%1$sClick here%2$s to go Pro.', 'formidable' ), '<a href="' . esc_url( FrmAppHelper::make_affiliate_url( 'https://formidableforms.com' ) ) . '">', '</a>' ); ?>
7
- </p>
8
-
9
- <p>Already have a Pro license? <a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url( 'https://formidableforms.com/knowledgebase/install-formidable-forms/' ) ) ?>" target="_blank"><?php esc_html_e( 'Click here', 'formidable' ); ?></a> to get installation instructions and download the pro version.</p>
10
- </div>
11
- </div>
12
- <?php } ?>
13
  </div>
 
1
+ <h3 class="frm_left_label">
2
+ <?php esc_html_e( 'License Key', 'formidable' ); ?>
3
+ </h3>
4
+ <div class="frm_with_left_label">
5
+ <p>You're using Formidable Forms Lite - no license needed. Enjoy! 🙂</p>
6
+ <p>
7
+ <?php printf( esc_html__( 'To unlock more features consider %1$supgrading to PRO%2$s.', 'formidable' ), '<a href="' . esc_url( FrmAppHelper::make_affiliate_url( FrmAppHelper::admin_upgrade_link( 'settings-license' ) ) ) . '">', '</a>' ); ?>
8
+ </p>
9
+ <p>
10
+ <a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url( FrmAppHelper::admin_upgrade_link( 'settings-license', 'knowledgebase/install-formidable-forms/' ) ) ); ?>" target="_blank"><?php esc_html_e( 'Already purchased?', 'formidable' ); ?></a>
11
+ </p>
 
12
  </div>
13
+ <div class="clear"></div>
classes/views/frm-settings/settings_cta.php ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="settings-lite-cta">
2
+ <div class="metabox-holder">
3
+ <div class="postbox">
4
+ <div class="inside">
5
+
6
+ <a href="#" class="dismiss alignright" title="<?php esc_attr_e( 'Dismiss this message', 'formidable' ); ?>"><i class="dashicons dashicons-dismiss" aria-label="Dismiss" aria-hidden="true"></i></a>
7
+ <h2><?php esc_html_e( 'Get Formidable Forms Pro and Unlock all the Powerful Features', 'formidable' ); ?></h2>
8
+ <div class="cta-inside">
9
+ <p><?php esc_html_e( 'Thanks for being a loyal Formidable Forms user. Upgrade to Formidable Forms Pro to unlock all the awesome features and learn how others are defying the limits by taking on big projects without big resources.', 'formidable' ); ?></p>
10
+ <p>
11
+ <?php esc_html_e( 'We know that you will truly love Formidable Forms.', 'formidable' ); ?>
12
+ </p>
13
+ <br/>
14
+ <h3><?php esc_html_e( 'Pro Features', 'formidable' ); ?></h3>
15
+ <ul class="frm_two_col">
16
+ <?php foreach ( $features as $feature ) { ?>
17
+ <li>
18
+ <i class="dashicons dashicons-yes" aria-hidden="true"></i> <?php echo esc_html( $feature ); ?>
19
+ </li>
20
+ <?php } ?>
21
+ </ul>
22
+ <div class="clear"></div>
23
+
24
+ <p>
25
+ <a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'settings-upgrade' ) ); ?>" target="_blank" rel="noopener noreferrer">
26
+ <?php esc_html_e( 'Get Formidable Forms Pro Today and Unlock all the Powerful Features »', 'formidable' ); ?>
27
+ </a>
28
+ </p>
29
+ </div>
30
+ </div>
31
+ </div>
32
+ </div>
33
+ </div>
classes/views/shared/errors.php CHANGED
@@ -2,7 +2,7 @@
2
  <?php
3
  if ( isset( $message ) && '' !== $message ) {
4
  if ( FrmAppHelper::is_admin() ) {
5
- echo '<div id="message" class="updated frm_updated_message">';
6
  echo FrmAppHelper::kses( $message, 'all' ); // WPCS: XSS ok.
7
  echo '</div>';
8
  } else {
2
  <?php
3
  if ( isset( $message ) && '' !== $message ) {
4
  if ( FrmAppHelper::is_admin() ) {
5
+ echo '<div id="message" class="frm_updated_message">';
6
  echo FrmAppHelper::kses( $message, 'all' ); // WPCS: XSS ok.
7
  echo '</div>';
8
  } else {
classes/views/shared/mb_adv_info.php CHANGED
@@ -43,6 +43,9 @@
43
 
44
  do_action( 'frm_field_code_tab', array( 'field' => $f ) );
45
 
 
 
 
46
  unset( $f );
47
  }
48
  }
@@ -102,10 +105,6 @@
102
  <a href="javascript:void(0)" class="frm_insert_code" data-code="<?php echo esc_attr( $f->id ); ?>"><?php echo FrmAppHelper::truncate( $f->name, 60 ); // WPCS: XSS ok. ?></a>
103
  </li>
104
  <?php
105
-
106
- if ( $f->type == 'user_id' ) {
107
- $uid = $f;
108
- }
109
  unset( $f );
110
  }
111
  }
@@ -145,10 +144,15 @@
145
  <ul class="frm_code_list">
146
  <?php
147
  foreach ( $helper['codes'] as $code => $code_label ) {
148
- $code = str_replace( '|user_id|', $uid->id, $code );
 
 
 
 
 
149
  ?>
150
  <li class="frm_col_<?php echo esc_attr( $col ) ?>">
151
- <a href="javascript:void(0)" class="frmbutton button frm_insert_code <?php echo is_array( $code_label ) ? 'frm_help' : ''; ?>" data-code="x <?php echo esc_attr( $code ) ?>" <?php echo is_array( $code_label ) ? 'title="' . esc_attr( $code_label['title'] ) . '"' : ''; ?>>
152
  <?php echo esc_html( is_array( $code_label ) ? $code_label['label'] : $code_label ); ?>
153
  </a>
154
  </li>
43
 
44
  do_action( 'frm_field_code_tab', array( 'field' => $f ) );
45
 
46
+ if ( $f->type == 'user_id' ) {
47
+ $uid = $f->id;
48
+ }
49
  unset( $f );
50
  }
51
  }
105
  <a href="javascript:void(0)" class="frm_insert_code" data-code="<?php echo esc_attr( $f->id ); ?>"><?php echo FrmAppHelper::truncate( $f->name, 60 ); // WPCS: XSS ok. ?></a>
106
  </li>
107
  <?php
 
 
 
 
108
  unset( $f );
109
  }
110
  }
144
  <ul class="frm_code_list">
145
  <?php
146
  foreach ( $helper['codes'] as $code => $code_label ) {
147
+ if ( isset( $uid ) ) {
148
+ $code = str_replace( '|user_id|', $uid, $code );
149
+ } else {
150
+ $code = str_replace( '|user_id|', 'x', $code );
151
+ }
152
+ $include_x = strpos( $code, ' ' ) ? '' : 'x ';
153
  ?>
154
  <li class="frm_col_<?php echo esc_attr( $col ) ?>">
155
+ <a href="javascript:void(0)" class="frmbutton button frm_insert_code <?php echo is_array( $code_label ) ? 'frm_help' : ''; ?>" data-code="<?php echo esc_attr( $include_x . $code ); ?>" <?php echo is_array( $code_label ) ? 'title="' . esc_attr( $code_label['title'] ) . '"' : ''; ?>>
156
  <?php echo esc_html( is_array( $code_label ) ? $code_label['label'] : $code_label ); ?>
157
  </a>
158
  </li>
classes/views/shared/upgrade_overlay.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div id="frm_upgrade_modal" class="frm_hidden settings-lite-cta">
2
+ <div class="metabox-holder">
3
+ <div class="postbox">
4
+ <a href="#" class="dismiss alignright" title="<?php esc_attr_e( 'Dismiss this message', 'formidable' ); ?>"><i class="dashicons dashicons-no-alt" aria-label="Dismiss" aria-hidden="true"></i></a>
5
+ <div class="inside">
6
+
7
+ <i class="dashicons dashicons-lock"></i>
8
+ <h2>
9
+ <?php
10
+ printf(
11
+ esc_html__( '%s are a Pro feature', 'formidable' ),
12
+ '<span class="frm_feature_label"></span>'
13
+ );
14
+ ?>
15
+ </h2>
16
+ <div class="cta-inside">
17
+ <p>
18
+ <?php
19
+ if ( $is_pro ) {
20
+ $message = __( '%s are not installed on this site. Please see the addons that are included with your plan.', 'formidable' );
21
+ } else {
22
+ $message = __( '%s are not available on your plan. Please upgrade to PRO to unlock more awesome features.', 'formidable' );
23
+ }
24
+ printf( esc_html( $message ), '<span class="frm_feature_label"></span>' );
25
+ ?>
26
+ </p>
27
+ <a href="<?php echo esc_url( FrmAppHelper::admin_upgrade_link( 'builder-upgrade' ) ); ?>" class="button button-primary" target="_blank" rel="noopener noreferrer">
28
+ <?php esc_html_e( 'Upgrade to Pro', 'formidable' ); ?>
29
+ </a>
30
+ <p>
31
+ <a href="<?php echo esc_url( FrmAppHelper::make_affiliate_url( FrmAppHelper::admin_upgrade_link( 'builder-upgrade', 'knowledgebase/install-formidable-forms/' ) ) ); ?>" target="_blank" class="frm-link-secondary">
32
+ <?php esc_html_e( 'Already purchased?', 'formidable' ); ?>
33
+ </a>
34
+ </p>
35
+ </div>
36
+ </div>
37
+ </div>
38
+ </div>
39
+ </div>
css/frm_admin.css CHANGED
@@ -8,7 +8,7 @@ a.frm_confirming:hover,
8
  a.frm_confirming:focus,
9
  a.frm_confirming,
10
  .frm_confirming{
11
- color:#e37222 !important;
12
  }
13
  .frm_wrap > .wrap{
14
  margin: 10px 30px 30px;
@@ -124,8 +124,8 @@ td.column-title .frm_actions_dropdown{
124
  .post-type-frm_display .wrap .add-new-h2,
125
  .frm_wrap .add-new-h2{
126
  font-size:12px;
127
- border: 1px solid #e37222;
128
- color: #e37222;
129
  line-height: 1.4;
130
  font-weight: 600;
131
  margin: 1px 0 0 10px;
@@ -146,8 +146,8 @@ td.column-title .frm_actions_dropdown{
146
  .frm_wrap .add-new-h2:active,
147
  .frm_wrap .add-new-h2:focus{
148
  color: #fff;
149
- background:#e37222;
150
- border: 1px solid #e37222;
151
  }
152
 
153
  ul.frm_form_nav {
@@ -408,6 +408,7 @@ ul.frm_form_nav > li{
408
  margin-left: 5px;
409
  }
410
 
 
411
  .frm-white-body .frm_wrap .button,
412
  .frm-white-body .frm_wrap button{
413
  text-shadow:none;
@@ -417,9 +418,11 @@ ul.frm_form_nav > li{
417
  font-size: 1.1em;
418
  }
419
 
 
 
420
  .toplevel_page_formidable .frm_wrap button.button-primary{
421
  border-color: #da791d;
422
- background: #e37222;
423
  color:#fff;
424
  }
425
 
@@ -628,6 +631,8 @@ form .form-field.frm_field_loading{
628
 
629
  .upgrade_to_pro{
630
  padding: 10px 25px 25px;
 
 
631
  }
632
 
633
  .upgrade_to_pro h1,
@@ -649,14 +654,19 @@ form .form-field.frm_field_loading{
649
  padding: 5px 12px;
650
  }
651
 
652
- div.updated.frm_updated_message{
653
  border-radius:2px;
654
  border: 1px solid #D6E9C6;
655
  background-color: #DFF0D8;
656
  color: #468847;
657
  padding: 10px 15px;
658
  font-size:14px;
659
- margin-bottom:10px;
 
 
 
 
 
660
  }
661
 
662
  .update-nag.frm-update-to-pro{
@@ -665,7 +675,7 @@ div.updated.frm_updated_message{
665
  padding: 10px 15px;
666
  display:block;
667
  text-align:center;
668
- background:#e37222;
669
  color:#fff;
670
  font-size:19px;
671
  line-height:2.1em;
@@ -701,8 +711,9 @@ div.updated.frm_updated_message{
701
  text-align:right;
702
  }
703
 
 
704
  .upgrade_to_pro .frm_check_icon{
705
- color:#e37222;
706
  }
707
 
708
  .widefat.frm_pricing thead th,
@@ -711,18 +722,75 @@ div.updated.frm_updated_message{
711
  }
712
 
713
  .widefat th.frm_table_break{
714
- background-color:#e37222;
715
  color:#fff;
716
  text-align:center;
717
  }
718
 
719
- .plugin-card.plugin-card-formidable-pro{
720
- border:2px solid #0073aa;
721
  }
722
 
723
- .frm-no-thumb.plugin-card .name,
724
- .frm-no-thumb.plugin-card .desc{
725
- margin-left:0;