Advanced Ads - Version 1.17.5

Version Description

  • fixed ads being injected multiple times when using the Newspaper theme or multiple the_content filters
Download this release

Release Info

Developer webzunft
Plugin Icon 128x128 Advanced Ads
Version 1.17.5
Comparing to
See all releases

Code changes from version 1.17.4 to 1.17.5

Files changed (3) hide show
  1. advanced-ads.php +2 -2
  2. public/class-advanced-ads.php +5 -0
  3. readme.txt +5 -1
advanced-ads.php CHANGED
@@ -12,7 +12,7 @@
12
  * Plugin Name: Advanced Ads
13
  * Plugin URI: https://wpadvancedads.com
14
  * Description: Manage and optimize your ads in WordPress
15
- * Version: 1.17.4
16
  * Author: Thomas Maier, Advanced Ads GmbH
17
  * Author URI: https://wpadvancedads.com
18
  * Text Domain: advanced-ads
@@ -39,7 +39,7 @@ define( 'ADVADS_BASE_DIR', dirname( ADVADS_BASE ) ); // directory of the plugin
39
  // general and global slug, e.g. to store options in WP.
40
  define( 'ADVADS_SLUG', 'advanced-ads' );
41
  define( 'ADVADS_URL', 'https://wpadvancedads.com/' );
42
- define( 'ADVADS_VERSION', '1.17.4' );
43
 
44
  // Autoloading, modules and functions.
45
 
12
  * Plugin Name: Advanced Ads
13
  * Plugin URI: https://wpadvancedads.com
14
  * Description: Manage and optimize your ads in WordPress
15
+ * Version: 1.17.5
16
  * Author: Thomas Maier, Advanced Ads GmbH
17
  * Author URI: https://wpadvancedads.com
18
  * Text Domain: advanced-ads
39
  // general and global slug, e.g. to store options in WP.
40
  define( 'ADVADS_SLUG', 'advanced-ads' );
41
  define( 'ADVADS_URL', 'https://wpadvancedads.com/' );
42
+ define( 'ADVADS_VERSION', '1.17.5' );
43
 
44
  // Autoloading, modules and functions.
45
 
public/class-advanced-ads.php CHANGED
@@ -446,6 +446,11 @@ class Advanced_Ads {
446
  return $content;
447
  }
448
 
 
 
 
 
 
449
  // Check if ads are disabled in secondary queries.
450
  if ( ! empty( $options['disabled-ads']['secondary'] ) ) {
451
  // this function was called by ajax (in secondary query).
446
  return $content;
447
  }
448
 
449
+ // do not inject ads multiple times, e.g., when the_content is applied multiple times.
450
+ if ( $this->has_many_the_content() ) {
451
+ return $content;
452
+ }
453
+
454
  // Check if ads are disabled in secondary queries.
455
  if ( ! empty( $options['disabled-ads']['secondary'] ) ) {
456
  // this function was called by ajax (in secondary query).
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: ads, ad manager, ad rotation, adsense, banner
4
  Requires at least: 4.6
5
  Tested up to: 5.3
6
  Requires PHP: 5.6
7
- Stable tag: 1.17.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -304,6 +304,10 @@ Yes. Advanced Ads is based on WordPress standards and therefore easily customiza
304
 
305
  == Changelog ==
306
 
 
 
 
 
307
  = 1.17.4 =
308
 
309
  * added option and Display Condition to disable ads in content served through the REST API
4
  Requires at least: 4.6
5
  Tested up to: 5.3
6
  Requires PHP: 5.6
7
+ Stable tag: 1.17.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
304
 
305
  == Changelog ==
306
 
307
+ = 1.17.5 =
308
+
309
+ * fixed ads being injected multiple times when using the Newspaper theme or multiple the_content filters
310
+
311
  = 1.17.4 =
312
 
313
  * added option and Display Condition to disable ads in content served through the REST API