ThirstyAffiliates Affiliate Link Manager - Version 3.3.5

Version Description

  • Improvement: Show warning on slug edit to inform users about consequences of editing slug in regards to already inserted links
  • Bug Fix: When Statistics module is disabled hide the Enhanced JS Redirect option
  • Bug Fix: Uncaught type error on URL splitting in Link Fixer
  • Bug Fix: Add jQuery to script dependency list for front end TA script
Download this release

Release Info

Developer jkohlbach
Plugin Icon 128x128 ThirstyAffiliates Affiliate Link Manager
Version 3.3.5
Comparing to
See all releases

Code changes from version 3.3.4 to 3.3.5

Helpers/Plugin_Constants.php CHANGED
@@ -27,7 +27,7 @@ class Plugin_Constants {
27
// Plugin configuration constants
28
const TOKEN = 'ta';
29
const INSTALLED_VERSION = 'ta_installed_version';
30
- const VERSION = '3.3.4';
31
const TEXT_DOMAIN = 'thirstyaffiliates';
32
const THEME_TEMPLATE_PATH = 'thirstyaffiliates';
33
const META_DATA_PREFIX = '_ta_';
27
// Plugin configuration constants
28
const TOKEN = 'ta';
29
const INSTALLED_VERSION = 'ta_installed_version';
30
+ const VERSION = '3.3.5';
31
const TEXT_DOMAIN = 'thirstyaffiliates';
32
const THEME_TEMPLATE_PATH = 'thirstyaffiliates';
33
const META_DATA_PREFIX = '_ta_';
Models/Marketing.php CHANGED
@@ -366,10 +366,13 @@ class Marketing implements Model_Interface , Activatable_Interface , Initiable_I
366
* Display enable js redirect notice.
367
*
368
* @since 3.3.0
369
* @access public
370
*/
371
public function display_enable_js_redirect_notice() {
372
373
$screen = get_current_screen();
374
375
$post_type = get_post_type();
366
* Display enable js redirect notice.
367
*
368
* @since 3.3.0
369
+ * @since 3.3.5 Only show notice when statistics module is enabled.
370
* @access public
371
*/
372
public function display_enable_js_redirect_notice() {
373
374
+ if ( get_option( 'ta_enable_stats_reporting_module' , 'yes' ) !== 'yes' ) return;
375
+
376
$screen = get_current_screen();
377
378
$post_type = get_post_type();
Models/Script_Loader.php CHANGED
@@ -264,6 +264,7 @@ class Script_Loader implements Model_Interface {
264
*
265
* @since 3.0.0
266
* @since 3.3.0 Add enable JS redirect TA global var.
267
* @access public
268
*/
269
public function load_frontend_scripts() {
@@ -273,7 +274,7 @@ class Script_Loader implements Model_Interface {
273
if ( apply_filters( 'ta_enqueue_tajs_script' , ( get_option( 'ta_enable_link_fixer' , 'yes' ) === 'yes' || get_option( 'ta_enable_stats_reporting_module' , 'yes' ) === 'yes' ) ) ) {
274
275
// load main frontend script that holds the link fixer and stat record JS code
276
- wp_enqueue_script( 'ta_main_js' , $this->_constants->JS_ROOT_URL() . 'app/ta.js' , array() , Plugin_Constants::VERSION , true );
277
wp_localize_script( 'ta_main_js' , 'thirsty_global_vars' , array(
278
'home_url' => $this->_get_absolute_home_url( true ),
279
'ajax_url' => admin_url( 'admin-ajax.php' ),
@@ -281,6 +282,7 @@ class Script_Loader implements Model_Interface {
281
'link_prefix' => $this->_helper_functions->get_thirstylink_link_prefix(),
282
'link_prefixes' => maybe_unserialize( get_option( 'ta_used_link_prefixes' ) ),
283
'post_id' => isset( $post->ID ) ? $post->ID : 0,
284
'enable_js_redirect' => get_option( 'ta_enable_javascript_frontend_redirect' ),
285
'disable_thirstylink_class' => get_option( 'ta_disable_thirsty_link_class' )
286
) );
264
*
265
* @since 3.0.0
266
* @since 3.3.0 Add enable JS redirect TA global var.
267
+ * @since 3.3.5 Add parameter for checking if statistics module is enabled or not.
268
* @access public
269
*/
270
public function load_frontend_scripts() {
274
if ( apply_filters( 'ta_enqueue_tajs_script' , ( get_option( 'ta_enable_link_fixer' , 'yes' ) === 'yes' || get_option( 'ta_enable_stats_reporting_module' , 'yes' ) === 'yes' ) ) ) {
275
276
// load main frontend script that holds the link fixer and stat record JS code
277
+ wp_enqueue_script( 'ta_main_js' , $this->_constants->JS_ROOT_URL() . 'app/ta.js' , array( 'jquery' ) , Plugin_Constants::VERSION , true );
278
wp_localize_script( 'ta_main_js' , 'thirsty_global_vars' , array(
279
'home_url' => $this->_get_absolute_home_url( true ),
280
'ajax_url' => admin_url( 'admin-ajax.php' ),
282
'link_prefix' => $this->_helper_functions->get_thirstylink_link_prefix(),
283
'link_prefixes' => maybe_unserialize( get_option( 'ta_used_link_prefixes' ) ),
284
'post_id' => isset( $post->ID ) ? $post->ID : 0,
285
+ 'enable_record_stats' => get_option( 'ta_enable_stats_reporting_module' , 'yes' ),
286
'enable_js_redirect' => get_option( 'ta_enable_javascript_frontend_redirect' ),
287
'disable_thirstylink_class' => get_option( 'ta_disable_thirsty_link_class' )
288
) );
Models/Settings.php CHANGED
@@ -227,6 +227,7 @@ class Settings implements Model_Interface , Activatable_Interface , Initiable_In
227
*
228
* @since 3.0.0
229
* @since 3.3.1 Add support for URL input type.
230
* @access public
231
*/
232
public function init_settings_sections_and_options() {
@@ -407,10 +408,11 @@ class Settings implements Model_Interface , Activatable_Interface , Initiable_In
407
),
408
409
array(
410
- 'id' => 'ta_enable_javascript_frontend_redirect',
411
- 'title' => __( "Enable Enhanced Javascript Redirect on Frontend" , 'thirstyaffiliates' ),
412
- 'desc' => __( "By default affiliate links are redirected on the server side. Enabling this will set all affiliate links to be redirected via javascript on your website's frontend. This will then improve the accuracy of the link performance report." , 'thirstyaffiliates' ),
413
- 'type' => 'toggle'
414
),
415
416
array(
227
*
228
* @since 3.0.0
229
* @since 3.3.1 Add support for URL input type.
230
+ * @since 3.3.5 Hide enhanced javascript redirect setting when statistics module is disabled.
231
* @access public
232
*/
233
public function init_settings_sections_and_options() {
408
),
409
410
array(
411
+ 'id' => 'ta_enable_javascript_frontend_redirect',
412
+ 'title' => __( "Enable Enhanced Javascript Redirect on Frontend" , 'thirstyaffiliates' ),
413
+ 'desc' => __( "By default affiliate links are redirected on the server side. Enabling this will set all affiliate links to be redirected via javascript on your website's frontend. This will then improve the accuracy of the link performance report (This will only work when <strong>Statistics</strong> module is enabled)." , 'thirstyaffiliates' ),
414
+ 'type' => 'toggle',
415
+ 'condition_cb' => function() { return get_option( 'ta_enable_stats_reporting_module' ) === 'yes'; }
416
),
417
418
array(
js/app/advance_link_picker/package-lock.json ADDED
@@ -0,0 +1,6831 @@