AdSense Plugin WP QUADS - Version 1.4.7

Version Description

  • Fix: Not all quicktag generated adsense ads are shown if no default ads are used
Download this release

Release Info

Developer ReneHermi
Plugin Icon 128x128 AdSense Plugin WP QUADS
Version 1.4.7
Comparing to
See all releases

Code changes from version 1.4.6 to 1.4.7

includes/admin/admin-notices.php CHANGED
@@ -281,6 +281,7 @@ function quads_is_any_ad_activated() {
281
 
282
  // ad activated with api (custom position)
283
  if( count( $check ) > 0 ) {
 
284
  return true;
285
  }
286
  // check if any other ad is assigned and activated
@@ -294,8 +295,10 @@ function quads_is_any_ad_activated() {
294
  isset( $quads_options['pos8']['Par3Ads'] ) ||
295
  isset( $quads_options['pos9']['Img1Ads'] )
296
  ) {
 
297
  return true;
298
  }
 
299
  // no ad is activated
300
  return false;
301
  }
281
 
282
  // ad activated with api (custom position)
283
  if( count( $check ) > 0 ) {
284
+ //wp_die(print_r($check));
285
  return true;
286
  }
287
  // check if any other ad is assigned and activated
295
  isset( $quads_options['pos8']['Par3Ads'] ) ||
296
  isset( $quads_options['pos9']['Img1Ads'] )
297
  ) {
298
+ //wp_die('test');
299
  return true;
300
  }
301
+ //wp_die('test1');
302
  // no ad is activated
303
  return false;
304
  }
includes/template-functions.php CHANGED
@@ -593,15 +593,16 @@ function quads_parse_random_ads($content) {
593
  */
594
  function quads_parse_quicktags($content){
595
  global $adsArray, $visibleContentAds;
596
-
 
597
  $idx = 0;
598
  for ( $i = 1; $i <= count( $adsArray ); $i++ ) {
599
  if( strpos( $content, '<!--Ads' . $adsArray[$idx] . '-->' ) !== false ) {
600
  $content = quads_replace_ads( $content, 'Ads' . $adsArray[$idx], $adsArray[$idx] );
601
- $adsArray = quads_del_element( $adsArray, $idx );
602
  $visibleContentAds += 1;
 
603
  //quads_set_ad_count_content();
604
- //if( quads_ad_reach_max_count() ) {
605
  if( $visibleContentAds >= quads_get_max_allowed_post_ads( $content ) ) {
606
  $content = quads_clean_tags( $content );
607
  return $content;
@@ -796,11 +797,11 @@ function quads_clean_tags($content, $trimonly = false) {
796
  * @param int $idx key to remove from array
797
  * @return array
798
  */
799
- function quads_del_element($paragraphsArrayay, $idx) {
800
  $copy = array();
801
- for( $i=0; $i<count($paragraphsArrayay) ;$i++) {
802
  if ( $idx != $i ) {
803
- array_push($copy, $paragraphsArrayay[$i]);
804
  }
805
  }
806
  return $copy;
593
  */
594
  function quads_parse_quicktags($content){
595
  global $adsArray, $visibleContentAds;
596
+ //print_r(count($adsArray));
597
+
598
  $idx = 0;
599
  for ( $i = 1; $i <= count( $adsArray ); $i++ ) {
600
  if( strpos( $content, '<!--Ads' . $adsArray[$idx] . '-->' ) !== false ) {
601
  $content = quads_replace_ads( $content, 'Ads' . $adsArray[$idx], $adsArray[$idx] );
602
+ //$adsArray = quads_del_element( $adsArray, $idx );
603
  $visibleContentAds += 1;
604
+ $idx +=1;
605
  //quads_set_ad_count_content();
 
606
  if( $visibleContentAds >= quads_get_max_allowed_post_ads( $content ) ) {
607
  $content = quads_clean_tags( $content );
608
  return $content;
797
  * @param int $idx key to remove from array
798
  * @return array
799
  */
800
+ function quads_del_element($array, $idx) {
801
  $copy = array();
802
+ for( $i=0; $i<count($array) ;$i++) {
803
  if ( $idx != $i ) {
804
+ array_push($copy, $array[$i]);
805
  }
806
  }
807
  return $copy;
quick-adsense-reloaded.php CHANGED
@@ -6,7 +6,7 @@
6
  * Description: Insert Google AdSense or any Ads code into your website. A fork of Quick AdSense
7
  * Author: Rene Hermenau, WP-Staging
8
  * Author URI: https://wordpress.org/plugins/quick-adsense-reloaded/
9
- * Version: 1.4.6
10
  * Text Domain: quick-adsense-reloaded
11
  * Domain Path: languages
12
  * Credits: WP QUADS - Quick AdSense Reloaded is a fork of Quick AdSense
@@ -35,7 +35,7 @@ if( !defined( 'ABSPATH' ) )
35
 
36
  // Plugin version
37
  if( !defined( 'QUADS_VERSION' ) ) {
38
- define( 'QUADS_VERSION', '1.4.6' );
39
  }
40
 
41
  // Plugin name
6
  * Description: Insert Google AdSense or any Ads code into your website. A fork of Quick AdSense
7
  * Author: Rene Hermenau, WP-Staging
8
  * Author URI: https://wordpress.org/plugins/quick-adsense-reloaded/
9
+ * Version: 1.4.7
10
  * Text Domain: quick-adsense-reloaded
11
  * Domain Path: languages
12
  * Credits: WP QUADS - Quick AdSense Reloaded is a fork of Quick AdSense
35
 
36
  // Plugin version
37
  if( !defined( 'QUADS_VERSION' ) ) {
38
+ define( 'QUADS_VERSION', '1.4.7' );
39
  }
40
 
41
  // Plugin name
readme.txt CHANGED
@@ -9,7 +9,7 @@ License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
  Tags: adsense, ads, ad, google adsense, advertising, amp, ad injection, ad inserter, ad manager
10
  Requires at least: 3.6+
11
  Tested up to: 4.7.2
12
- Stable tag: 1.4.6
13
 
14
  Quick Adsense Reloaded! Quickest way to insert Google AdSense & other ads into your website. Google AdSense integration with Google AMP support
15
 
@@ -129,6 +129,9 @@ Alternative Installation:
129
 
130
  == Changelog ==
131
 
 
 
 
132
  = 1.4.6 =
133
  * New: Theme API for custom theme integration of AdSense ads supports margin and alignment options now
134
  * New: Create WP QUADS admin menue logo
9
  Tags: adsense, ads, ad, google adsense, advertising, amp, ad injection, ad inserter, ad manager
10
  Requires at least: 3.6+
11
  Tested up to: 4.7.2
12
+ Stable tag: 1.4.7
13
 
14
  Quick Adsense Reloaded! Quickest way to insert Google AdSense & other ads into your website. Google AdSense integration with Google AMP support
15
 
129
 
130
  == Changelog ==
131
 
132
+ = 1.4.7 =
133
+ * Fix: Not all quicktag generated adsense ads are shown if no default ads are used
134
+
135
  = 1.4.6 =
136
  * New: Theme API for custom theme integration of AdSense ads supports margin and alignment options now
137
  * New: Create WP QUADS admin menue logo