Popups by OptinMonster – Best WordPress Lead Generation Plugin - Version 1.1.6

Version Description

  • Compatibility updates for WordPress 4.7.
Download this release

Release Info

Developer griffinjt
Plugin Icon 128x128 Popups by OptinMonster – Best WordPress Lead Generation Plugin
Version 1.1.6
Comparing to
See all releases

Code changes from version 1.1.5.9 to 1.1.6

OMAPI/Content.php CHANGED
@@ -180,7 +180,7 @@ class OMAPI_Content {
180
  */
181
  public function api( $panel, $object ) {
182
 
183
- $link = $this->base->menu->has_trial_link() ? $this->base->menu->get_trial_link() : 'https://optinmonster.com/pricing/';
184
  $text = $this->base->menu->has_trial_link() ? 'Click here to start your free 30-day trial!' : 'Click here to view OptinMonster plans and pricing.';
185
  if ( ! $this->base->get_api_credentials() ) : ?>
186
  <p class="omapi-red"><strong><?php _e( 'You must authenticate your OptinMonster account before you can use OptinMonster on this site.', 'optin-monster-api' ); ?></strong></p>
180
  */
181
  public function api( $panel, $object ) {
182
 
183
+ $link = $this->base->menu->get_action_link();
184
  $text = $this->base->menu->has_trial_link() ? 'Click here to start your free 30-day trial!' : 'Click here to view OptinMonster plans and pricing.';
185
  if ( ! $this->base->get_api_credentials() ) : ?>
186
  <p class="omapi-red"><strong><?php _e( 'You must authenticate your OptinMonster account before you can use OptinMonster on this site.', 'optin-monster-api' ); ?></strong></p>
OMAPI/Menu.php CHANGED
@@ -1254,8 +1254,52 @@ class OMAPI_Menu {
1254
 
1255
  /**
1256
  * Called whenever a signup link is displayed, this function will
1257
- * check if there's a trial ID specified.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1258
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1259
  * There are three ways to specify an ID, ordered by highest to lowest priority
1260
  * - add_filter( 'optinmonster_trial_id', function() { return 1234; } );
1261
  * - define( 'OPTINMONSTER_TRIAL_ID', 1234 );
@@ -1265,29 +1309,30 @@ class OMAPI_Menu {
1265
  */
1266
  public function get_trial_link() {
1267
 
1268
- $trialId = '';
 
1269
 
1270
  // Check if trial ID is a constant
1271
  if ( defined( 'OPTINMONSTER_TRIAL_ID' ) ) {
1272
- $trialId = OPTINMONSTER_TRIAL_ID;
1273
  }
1274
 
1275
  // Now run any filters that may be on the trial ID
1276
- $trialId = apply_filters( 'optinmonster_trial_id', $trialId );
1277
 
1278
  /**
1279
  * If we still don't have a trial ID by this point
1280
  * check the DB for an option
1281
  */
1282
- if ( empty( $trialId ) ) {
1283
- $trialId = get_option( 'optinmonster_trial_id', $trialId );
1284
  }
1285
 
1286
  // Return the trial link if we have a trial ID
1287
- if ( ! empty( $trialId ) ) {
1288
  return 'http://www.shareasale.com/r.cfm?u='
1289
- . urlencode( trim( $trialId ) )
1290
- . '&b=601672&m=49337&afftrack=&urllink=optinmonster.com%2Ffree-trial%2F%3Fid%3D' . urlencode( trim( $trialId ) );
1291
  }
1292
 
1293
  // Return the regular pricing page by default
@@ -1295,6 +1340,20 @@ class OMAPI_Menu {
1295
 
1296
  }
1297
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1298
  public function has_trial_link() {
1299
 
1300
  $link = $this->get_trial_link();
1254
 
1255
  /**
1256
  * Called whenever a signup link is displayed, this function will
1257
+ * check if there's an affiliate ID specified.
1258
+ *
1259
+ * There are three ways to specify an ID, ordered by highest to lowest priority
1260
+ * - add_filter( 'optinmonster_sas_id', function() { return 1234; } );
1261
+ * - define( 'OPTINMONSTER_SAS_ID', 1234 );
1262
+ * - get_option( 'optinmonster_sas_id' ); (with the option being in the wp_options
1263
+ * table) If an ID is present, returns the affiliate link with the affiliate ID. If no ID is
1264
+ * present, just returns the OptinMonster pricing page URL.
1265
+ */
1266
+ public function get_sas_link() {
1267
+
1268
+ global $omSasId;
1269
+ $omSasId = '';
1270
+
1271
+ // Check if sas ID is a constant
1272
+ if ( defined( 'OPTINMONSTER_SAS_ID' ) ) {
1273
+ $omSasId = OPTINMONSTER_SAS_ID;
1274
+ }
1275
 
1276
+ // Now run any filters that may be on the sas ID
1277
+ $omSasId = apply_filters( 'optinmonster_sas_id', $omSasId );
1278
+
1279
+ /**
1280
+ * If we still don't have a sas ID by this point
1281
+ * check the DB for an option
1282
+ */
1283
+ if ( empty( $omSasId ) ) {
1284
+ $sasId = get_option( 'optinmonster_sas_id', $omSasId );
1285
+ }
1286
+
1287
+ // Return the sas link if we have a sas ID
1288
+ if ( ! empty( $omSasId ) ) {
1289
+ return 'http://www.shareasale.com/r.cfm?u='
1290
+ . urlencode( trim( $omSasId ) )
1291
+ . '&b=601672&m=49337&afftrack=&urllink=optinmonster.com';
1292
+ }
1293
+
1294
+ // Return the regular pricing page by default
1295
+ return 'https://optinmonster.com/pricing/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpdashboard';
1296
+
1297
+ }
1298
+
1299
+ /**
1300
+ * Called whenever a signup link is displayed, this function will
1301
+ * check if there's a trial ID specified.
1302
+ *
1303
  * There are three ways to specify an ID, ordered by highest to lowest priority
1304
  * - add_filter( 'optinmonster_trial_id', function() { return 1234; } );
1305
  * - define( 'OPTINMONSTER_TRIAL_ID', 1234 );
1309
  */
1310
  public function get_trial_link() {
1311
 
1312
+ global $omTrialId;
1313
+ $omTrialId = '';
1314
 
1315
  // Check if trial ID is a constant
1316
  if ( defined( 'OPTINMONSTER_TRIAL_ID' ) ) {
1317
+ $omTrialId = OPTINMONSTER_TRIAL_ID;
1318
  }
1319
 
1320
  // Now run any filters that may be on the trial ID
1321
+ $omTrialId = apply_filters( 'optinmonster_trial_id', $omTrialId );
1322
 
1323
  /**
1324
  * If we still don't have a trial ID by this point
1325
  * check the DB for an option
1326
  */
1327
+ if ( empty( $omTrialId ) ) {
1328
+ $omTrialId = get_option( 'optinmonster_trial_id', $omTrialId );
1329
  }
1330
 
1331
  // Return the trial link if we have a trial ID
1332
+ if ( ! empty( $omTrialId ) ) {
1333
  return 'http://www.shareasale.com/r.cfm?u='
1334
+ . urlencode( trim( $omTrialId ) )
1335
+ . '&b=601672&m=49337&afftrack=&urllink=optinmonster.com%2Ffree-trial%2F%3Fid%3D' . urlencode( trim( $omTrialId ) );
1336
  }
1337
 
1338
  // Return the regular pricing page by default
1340
 
1341
  }
1342
 
1343
+ public function get_action_link() {
1344
+ global $omTrialId, $omSasId;
1345
+ $trial = $this->get_trial_link();
1346
+ $sas = $this->get_sas_link();
1347
+
1348
+ if ( ! empty( $omTrialId ) ) {
1349
+ return $trial;
1350
+ } else if ( ! empty( $omSasId ) ) {
1351
+ return $sas;
1352
+ } else {
1353
+ return 'https://optinmonster.com/pricing/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpdashboard';
1354
+ }
1355
+ }
1356
+
1357
  public function has_trial_link() {
1358
 
1359
  $link = $this->get_trial_link();
OMAPI/Welcome.php CHANGED
@@ -181,7 +181,7 @@ class OMAPI_Welcome {
181
  public function callback_to_display_page() {
182
 
183
  $text = $this->base->menu->has_trial_link() ? __( 'Get Started for Free', 'optin-monster-api' ) : __( 'Get OptinMonster Now', 'optin-monster-api' );
184
- $link = esc_url( $this->base->menu->get_trial_link() );
185
  $api_link = esc_url_raw( admin_url( 'admin.php?page=optin-monster-api-settings' ) );
186
  ?>
187
  <div class="omapi-welcome-content">
181
  public function callback_to_display_page() {
182
 
183
  $text = $this->base->menu->has_trial_link() ? __( 'Get Started for Free', 'optin-monster-api' ) : __( 'Get OptinMonster Now', 'optin-monster-api' );
184
+ $link = esc_url( $this->base->menu->get_action_link() );
185
  $api_link = esc_url_raw( admin_url( 'admin.php?page=optin-monster-api-settings' ) );
186
  ?>
187
  <div class="omapi-welcome-content">
optin-monster-wp-api.php CHANGED
@@ -5,7 +5,7 @@
5
  * Description: OptinMonster API plugin to connect your WordPress site to your OptinMonster forms.
6
  * Author: Thomas Griffin
7
  * Author URI: https://thomasgriffin.io
8
- * Version: 1.1.5.9
9
  * Text Domain: optin-monster-api
10
  * Domain Path: languages
11
  *
@@ -60,7 +60,7 @@ class OMAPI {
60
  *
61
  * @var string
62
  */
63
- public $version = '1.1.5.9';
64
 
65
  /**
66
  * The name of the plugin.
5
  * Description: OptinMonster API plugin to connect your WordPress site to your OptinMonster forms.
6
  * Author: Thomas Griffin
7
  * Author URI: https://thomasgriffin.io
8
+ * Version: 1.1.6
9
  * Text Domain: optin-monster-api
10
  * Domain Path: languages
11
  *
60
  *
61
  * @var string
62
  */
63
+ public $version = '1.1.6';
64
 
65
  /**
66
  * The name of the plugin.
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: griffinjt, smub
3
  Tags: wordpress popup, popup, lightbox popup, mailchimp, aweber, campaign monitor, constant contact, exit-intent, madmimi, infusionsoft, getresponse, hubspot, marketo, activecampaign, pardot, totalsend, emma, icontact, mailerlite, mailpoet, google analytics, pop over, optin forms, email list, subscribers, wordpress popup form, lightbox, wordpress popups, popups, lightbox popups, optin form, wordpress optin form, sidebar optin form, sidebar optin, sidebar form, wordpress overlay popup, wordpress popup plugin, popup plugin, wordpress lightbox optin, wordpress lightbox optin form, after post optin form, wordpress after post optin form, after post optin form plugin, lightbox popup plugin, wordpress popup solution, exit intent, exit-intent, optinmonster, optin monster, optin-monster, mobile popup, mobile popups, mobile optin forms, mobile optins, lightbox optins, wordpress mobile popup, wordpress mobile popups, wordpress mobile optin forms, wordpress lightbox optins, lead gen, lead generation, wordpress lead generation, lead generation wordpress, wordpress lead gen, fullscreen, welcome gate, interstitial
4
  Requires at least: 3.5.1
5
- Tested up to: 4.6.1
6
  Stable tag: trunk
7
  License: GNU General Public License v2.0 or later
8
 
@@ -160,6 +160,9 @@ OptinMonster is the <a href="http://optinmonster.com" rel="friend" title="OptinM
160
 
161
  == Changelog ==
162
 
 
 
 
163
  = 1.1.5.9 =
164
  * Added the async attribute to the OptinMonster API script output for improved performance.
165
  * Fixed a bug that caused the debugging report to not properly grab shortcodes.
2
  Contributors: griffinjt, smub
3
  Tags: wordpress popup, popup, lightbox popup, mailchimp, aweber, campaign monitor, constant contact, exit-intent, madmimi, infusionsoft, getresponse, hubspot, marketo, activecampaign, pardot, totalsend, emma, icontact, mailerlite, mailpoet, google analytics, pop over, optin forms, email list, subscribers, wordpress popup form, lightbox, wordpress popups, popups, lightbox popups, optin form, wordpress optin form, sidebar optin form, sidebar optin, sidebar form, wordpress overlay popup, wordpress popup plugin, popup plugin, wordpress lightbox optin, wordpress lightbox optin form, after post optin form, wordpress after post optin form, after post optin form plugin, lightbox popup plugin, wordpress popup solution, exit intent, exit-intent, optinmonster, optin monster, optin-monster, mobile popup, mobile popups, mobile optin forms, mobile optins, lightbox optins, wordpress mobile popup, wordpress mobile popups, wordpress mobile optin forms, wordpress lightbox optins, lead gen, lead generation, wordpress lead generation, lead generation wordpress, wordpress lead gen, fullscreen, welcome gate, interstitial
4
  Requires at least: 3.5.1
5
+ Tested up to: 4.7
6
  Stable tag: trunk
7
  License: GNU General Public License v2.0 or later
8
 
160
 
161
  == Changelog ==
162
 
163
+ = 1.1.6 =
164
+ * Compatibility updates for WordPress 4.7.
165
+
166
  = 1.1.5.9 =
167
  * Added the async attribute to the OptinMonster API script output for improved performance.
168
  * Fixed a bug that caused the debugging report to not properly grab shortcodes.