AdSense Plugin WP QUADS - Version 2.0.27.4

Version Description

(05th June 2021) = * Fix: when sticky ads are enable Adsense ads are not loading: #394 * Fix: Newspaper unable to add mutiple ads #392

Download this release

Release Info

Developer wpquads
Plugin Icon 128x128 AdSense Plugin WP QUADS
Version 2.0.27.4
Comparing to
See all releases

Code changes from version 2.0.27.3 to 2.0.27.4

includes/template-functions.php CHANGED
@@ -107,16 +107,19 @@ function quads_load_ads_common($user_position,$html=''){
107
  }
108
  }elseif( $ads['position'] == 'before_header' && $user_position == 'newspaper_theme'){
109
  $tag= '<!--CusAds'.esc_html($ads['ad_id']).'-->';
110
- $html = preg_replace('/<div\sclass=\"td-header-menu-wrap-full td-container-wrap(.*?)\">(.*?)<div class=\"td-main-content-wrap /s', '<div class="td-header-menu-wrap-full td-container-wrap $1 "> '.quads_replace_ads_new( $tag, 'CusAds' . $ads['ad_id'], $ads['ad_id'] ).'$2 <div class="td-main-content-wrap' , $html);
111
- return $html;
112
  }elseif( $ads['position'] == 'after_header' && $user_position == 'newspaper_theme'){
113
  $tag= '<!--CusAds'.esc_html($ads['ad_id']).'-->';
114
- $html = preg_replace('/<div\sclass=\"td-header-menu-wrap-full td-container-wrap(.*?)<div class=\"td-main-content-wrap/s', '<div class="td-header-menu-wrap-full td-container-wrap $1 '.quads_replace_ads_new( $tag, 'CusAds' . $ads['ad_id'], $ads['ad_id'] ).' <div class="td-main-content-wrap ' , $html);
115
- return $html;
116
  }
117
  }
118
  }
119
  }
 
 
 
120
  }
121
  function remove_ads_for_wp_shortcodes() {
122
  $quads_settings = get_option( 'quads_settings' );
@@ -1891,7 +1894,12 @@ function quads_replace_ads_new($content, $quicktag, $id,$ampsupport='') {
1891
  return $content;
1892
  }
1893
  $ad_meta = get_post_meta($id, '',true);
1894
- if (isset($ad_meta['code'][0])) {
 
 
 
 
 
1895
  if(!empty($ad_meta['code'][0])){
1896
 
1897
  $code = '';
@@ -1920,10 +1928,7 @@ function quads_replace_ads_new($content, $quicktag, $id,$ampsupport='') {
1920
  $code ='';
1921
  }
1922
  $style = quads_get_inline_ad_style_new($id);
1923
- // if it was sticky ad return empty
1924
- if (isset($ad_meta['adsense_ad_type'][0]) && $ad_meta['adsense_ad_type'][0] == 'adsense_sticky_ads' ){
1925
- return $content;
1926
- }
1927
  if(function_exists('quads_hide_markup') && quads_hide_markup() ) {
1928
  $adscode =
1929
  "\n".'<div style="'.esc_attr($style).'">'."\n".
107
  }
108
  }elseif( $ads['position'] == 'before_header' && $user_position == 'newspaper_theme'){
109
  $tag= '<!--CusAds'.esc_html($ads['ad_id']).'-->';
110
+ $html = preg_replace('/<div\sclass=\"td-header-menu-wrap-full td-container-wrap(.*?)\">(.*?)<div class=\"td-main-content-wrap /s', '<div class="td-header-menu-wrap-full td-container-wrap$1"> '.quads_replace_ads_new( $tag, 'CusAds' . $ads['ad_id'], $ads['ad_id'] ).'$2<div class="td-main-content-wrap' , $html);
111
+
112
  }elseif( $ads['position'] == 'after_header' && $user_position == 'newspaper_theme'){
113
  $tag= '<!--CusAds'.esc_html($ads['ad_id']).'-->';
114
+ $html = preg_replace('/<div\sclass=\"td-header-menu-wrap-full td-container-wrap(.*?)<div class=\"td-main-content-wrap/s', '<div class="td-header-menu-wrap-full td-container-wrap$1 '.quads_replace_ads_new( $tag, 'CusAds' . $ads['ad_id'], $ads['ad_id'] ).'<div class="td-main-content-wrap' , $html);
115
+
116
  }
117
  }
118
  }
119
  }
120
+ if($user_position == 'newspaper_theme'){
121
+ return $html;
122
+ }
123
  }
124
  function remove_ads_for_wp_shortcodes() {
125
  $quads_settings = get_option( 'quads_settings' );
1894
  return $content;
1895
  }
1896
  $ad_meta = get_post_meta($id, '',true);
1897
+ $condition = true;
1898
+ // if it was sticky ad return empty
1899
+ if (isset($ad_meta['adsense_ad_type'][0]) && $ad_meta['adsense_ad_type'][0] == 'adsense_sticky_ads' ){
1900
+ $condition = false;
1901
+ }
1902
+ if (isset($ad_meta['code'][0]) && $condition) {
1903
  if(!empty($ad_meta['code'][0])){
1904
 
1905
  $code = '';
1928
  $code ='';
1929
  }
1930
  $style = quads_get_inline_ad_style_new($id);
1931
+
 
 
 
1932
  if(function_exists('quads_hide_markup') && quads_hide_markup() ) {
1933
  $adscode =
1934
  "\n".'<div style="'.esc_attr($style).'">'."\n".
quick-adsense-reloaded.php CHANGED
@@ -6,7 +6,7 @@
6
  * Description: Insert Google AdSense and other ad formats fully automatic into your website
7
  * Author: WP Quads
8
  * Author URI: https://wordpress.org/plugins/quick-adsense-reloaded/
9
- * Version: 2.0.27.3
10
  * Text Domain: quick-adsense-reloaded
11
  * Domain Path: languages
12
  * Credits: WP QUADS - Quick AdSense Reloaded is a fork of Quick AdSense
@@ -38,7 +38,7 @@ if( !defined( 'ABSPATH' ) )
38
 
39
  // Plugin version
40
  if( !defined( 'QUADS_VERSION' ) ) {
41
- define( 'QUADS_VERSION', '2.0.27.3' );
42
  }
43
 
44
  // Plugin name
6
  * Description: Insert Google AdSense and other ad formats fully automatic into your website
7
  * Author: WP Quads
8
  * Author URI: https://wordpress.org/plugins/quick-adsense-reloaded/
9
+ * Version: 2.0.27.4
10
  * Text Domain: quick-adsense-reloaded
11
  * Domain Path: languages
12
  * Credits: WP QUADS - Quick AdSense Reloaded is a fork of Quick AdSense
38
 
39
  // Plugin version
40
  if( !defined( 'QUADS_VERSION' ) ) {
41
+ define( 'QUADS_VERSION', '2.0.27.4' );
42
  }
43
 
44
  // Plugin name
readme.txt CHANGED
@@ -10,7 +10,7 @@ Tags: ad manager, ads, adsense, amp, banner
10
  Requires at least: 3.6+
11
  Tested up to: 5.7.2
12
  Requires PHP: 5.4
13
- Stable tag: 2.0.27.3
14
 
15
  Ads & AdSense Ad Plugin is the quickest way to insert Google AdSense & other ads into your website. Google AdSense integration with Google AMP support.
16
 
@@ -204,6 +204,10 @@ Alternative Installation:
204
 
205
 
206
  == Changelog ==
 
 
 
 
207
  = 2.0.27.3 (29th June 2021) =
208
  * New: update readme.txt #393
209
 
10
  Requires at least: 3.6+
11
  Tested up to: 5.7.2
12
  Requires PHP: 5.4
13
+ Stable tag: 2.0.27.4
14
 
15
  Ads & AdSense Ad Plugin is the quickest way to insert Google AdSense & other ads into your website. Google AdSense integration with Google AMP support.
16
 
204
 
205
 
206
  == Changelog ==
207
+ = 2.0.27.4 (05th June 2021) =
208
+ * Fix: when sticky ads are enable Adsense ads are not loading: #394
209
+ * Fix: Newspaper unable to add mutiple ads #392
210
+
211
  = 2.0.27.3 (29th June 2021) =
212
  * New: update readme.txt #393
213