ThirstyAffiliates Affiliate Link Manager - Version 3.10.10

Version Description

  • Bug Fix: Security fixes
Download this release

Release Info

Developer caseproof
Plugin Icon 128x128 ThirstyAffiliates Affiliate Link Manager
Version 3.10.10
Comparing to
See all releases

Code changes from version 3.10.9 to 3.10.10

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.10.9';
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.10.10';
31
  const TEXT_DOMAIN = 'thirstyaffiliates';
32
  const THEME_TEMPLATE_PATH = 'thirstyaffiliates';
33
  const META_DATA_PREFIX = '_ta_';
Models/Notifications.php CHANGED
@@ -544,7 +544,7 @@ class Notifications implements Model_Interface {
544
 
545
  <script>
546
  jQuery(document).ready(function($) {
547
- $('li.menu-icon-thirstylink .wp-menu-name').append(`<?php echo $output; ?>`);
548
  });
549
  </script>
550
 
544
 
545
  <script>
546
  jQuery(document).ready(function($) {
547
+ $('li.menu-icon-thirstylink .wp-menu-name').append(`<?php echo wp_kses_post( $output ); ?>`);
548
  });
549
  </script>
550
 
Models/Stats_Reporting.php CHANGED
@@ -521,7 +521,17 @@ class Stats_Reporting implements Model_Interface , Initiable_Interface , Activat
521
  */
522
  public function get_all_reports() {
523
 
524
- return apply_filters( 'ta_register_reports' , array() );
 
 
 
 
 
 
 
 
 
 
525
  }
526
 
527
  /**
@@ -561,7 +571,7 @@ class Stats_Reporting implements Model_Interface , Initiable_Interface , Activat
561
  'name' => __( 'Link Overview' , 'thirstyaffiliates' ),
562
  'title' => __( 'Link Overview Report' , 'thirstyaffiliates' ),
563
  'desc' => __( 'Total clicks on affiliate links over a given period.' , 'thirstyaffiliates' ),
564
- 'content' => function() { return $this->get_link_performance_report_content(); }
565
  );
566
 
567
  return $reports;
@@ -608,21 +618,24 @@ class Stats_Reporting implements Model_Interface , Initiable_Interface , Activat
608
 
609
  // fetch current section
610
  $current_report = $this->get_current_report();
611
- $report_content = is_callable( $current_report[ 'content' ] ) ? $current_report[ 'content' ]() : $current_report[ 'content' ];
612
-
613
- // skip if section data is empty
614
- if ( empty( $current_report ) ) return; ?>
615
 
616
- <div class="ta-settings ta-settings-<?php echo esc_attr( $current_report[ 'tab' ] ); ?> wrap">
 
 
617
 
618
- <?php $this->render_reports_nav(); ?>
 
619
 
620
- <h1><?php echo esc_html( $current_report[ 'title' ] ); ?></h1>
621
- <p class="desc"><?php echo wp_kses_post( $current_report[ 'desc' ] ); ?></p>
622
-
623
- <?php echo $report_content; // phpcs:ignore WordPress.Security.EscapeOutput ?>
624
- </div>
625
- <?php
 
 
 
 
626
  }
627
 
628
  /**
@@ -680,10 +693,7 @@ class Stats_Reporting implements Model_Interface , Initiable_Interface , Activat
680
  // NOTE: when false, this needs to return an empty string as it is used for display.
681
  if ( $link_id ) $link_id = ( get_post_type( $link_id ) == $cpt_slug && get_post_status( $link_id ) == 'publish' ) ? $link_id : '';
682
 
683
- ob_start();
684
  include( $this->_constants->VIEWS_ROOT_PATH() . 'reports/link-performance-report.php' );
685
-
686
- return ob_get_clean();
687
  }
688
 
689
 
521
  */
522
  public function get_all_reports() {
523
 
524
+ $all_reports = apply_filters( 'ta_register_reports' , array() );
525
+
526
+ if( ! empty( $all_reports ) ) {
527
+ foreach( $all_reports as $tab_index => $report ) {
528
+ if( ! isset( $report[ 'content' ] ) || ! is_callable( $report[ 'content' ] ) ) {
529
+ unset( $all_reports[ $tab_index ] );
530
+ }
531
+ }
532
+ }
533
+
534
+ return $all_reports;
535
  }
536
 
537
  /**
571
  'name' => __( 'Link Overview' , 'thirstyaffiliates' ),
572
  'title' => __( 'Link Overview Report' , 'thirstyaffiliates' ),
573
  'desc' => __( 'Total clicks on affiliate links over a given period.' , 'thirstyaffiliates' ),
574
+ 'content' => function() { $this->get_link_performance_report_content(); }
575
  );
576
 
577
  return $reports;
618
 
619
  // fetch current section
620
  $current_report = $this->get_current_report();
 
 
 
 
621
 
622
+ if ( isset( $current_report[ 'content' ] ) ) { ?>
623
+ <div class="ta-settings ta-settings-<?php echo esc_attr( $current_report[ 'tab' ] ); ?> wrap">
624
+ <?php $this->render_reports_nav(); ?>
625
 
626
+ <h1><?php echo esc_html( $current_report[ 'title' ] ); ?></h1>
627
+ <p class="desc"><?php echo wp_kses_post( $current_report[ 'desc' ] ); ?></p>
628
 
629
+ <?php
630
+ // make sure TA Pro is updated
631
+ $res = $current_report[ 'content' ]();
632
+ if( ! empty( trim( $res ) ) ) {
633
+ esc_html_e('Error loading report. Please ensure ThirstyAffiliates Pro is updated to the latest version. If the problem continues, please contact our support team.', 'thirstyaffiliates');
634
+ }
635
+ ?>
636
+ </div>
637
+ <?php
638
+ }
639
  }
640
 
641
  /**
693
  // NOTE: when false, this needs to return an empty string as it is used for display.
694
  if ( $link_id ) $link_id = ( get_post_type( $link_id ) == $cpt_slug && get_post_status( $link_id ) == 'publish' ) ? $link_id : '';
695
 
 
696
  include( $this->_constants->VIEWS_ROOT_PATH() . 'reports/link-performance-report.php' );
 
 
697
  }
698
 
699
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: affiliate, link, affiliate link management, link cloaker, link redirect, s
5
  Requires at least: 5.0
6
  Requires PHP: 5.6
7
  Tested up to: 5.9
8
- Stable tag: 3.10.9
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -159,6 +159,9 @@ See our [Knowledge Base](https://thirstyaffiliates.com/knowledge-base/?utm_sourc
159
 
160
  == Changelog ==
161
 
 
 
 
162
  = 3.10.9 =
163
  * Bug Fix: Security fixes
164
 
5
  Requires at least: 5.0
6
  Requires PHP: 5.6
7
  Tested up to: 5.9
8
+ Stable tag: 3.10.10
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
159
 
160
  == Changelog ==
161
 
162
+ = 3.10.10 =
163
+ * Bug Fix: Security fixes
164
+
165
  = 3.10.9 =
166
  * Bug Fix: Security fixes
167
 
thirstyaffiliates.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: ThirstyAffiliates
4
  * Plugin URI: http://thirstyaffiliates.com/
5
  * Description: ThirstyAffiliates is a revolution in affiliate link management. Collect, collate and store your affiliate links for use in your posts and pages.
6
- * Version: 3.10.9
7
  * Author: Caseproof
8
  * Author URI: https://caseproof.com/
9
  * Requires at least: 5.0
@@ -191,8 +191,8 @@ class ThirstyAffiliates extends Abstract_Main_Plugin_Class {
191
 
192
  <div class="error">
193
  <p>
194
- <?php esc_html_e( '<b>ThirstyAffiliates</b> plugin missing dependency.<br/>' , 'thirstyaffiliates' ); ?>
195
- <?php echo $admin_notice_msg; // phpcs:ignore WordPress.Security.EscapeOutput ?>
196
  </p>
197
  </div>
198
 
3
  * Plugin Name: ThirstyAffiliates
4
  * Plugin URI: http://thirstyaffiliates.com/
5
  * Description: ThirstyAffiliates is a revolution in affiliate link management. Collect, collate and store your affiliate links for use in your posts and pages.
6
+ * Version: 3.10.10
7
  * Author: Caseproof
8
  * Author URI: https://caseproof.com/
9
  * Requires at least: 5.0
191
 
192
  <div class="error">
193
  <p>
194
+ <?php _e( '<b>ThirstyAffiliates</b> plugin missing dependency.<br/>' , 'thirstyaffiliates' ); ?>
195
+ <?php echo wp_kses_post( $admin_notice_msg ); ?>
196
  </p>
197
  </div>
198
 
views/cpt/view-inserted-link-scanner-metabox.php CHANGED
@@ -16,7 +16,7 @@
16
  </tr>
17
  </thead>
18
  <tbody>
19
- <?php echo $inserted_into_rows_html; // phpcs:ignore WordPress.Security.EscapeOutput ?>
20
  </tbody>
21
  </table>
22
  </div>
16
  </tr>
17
  </thead>
18
  <tbody>
19
+ <?php echo wp_kses_post( $inserted_into_rows_html ); ?>
20
  </tbody>
21
  </table>
22
  </div>