AdSense Plugin WP QUADS - Version 2.0.6

Version Description

  • New: Added ad label for individual post in new interface #117
  • New: Added a tutorial link in the Adsense #116
  • Fix: Fixed AMP single page data duplication issue. #123
  • Fix: Fixed http link is breaking the Secure protocol #126
Download this release

Release Info

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

Code changes from version 2.0.5 to 2.0.6

admin/assets/js/dist/adminscript.js CHANGED
@@ -10466,7 +10466,9 @@ var QuadsAdCreateRouter = /*#__PURE__*/function (_Component) {
10466
ad_unit_name: '',
10467
code: '',
10468
align: 3,
10469
adlabel: '',
10470
margin: 0,
10471
position: 'beginning_of_post',
10472
paragraph_number: 1,
@@ -55964,7 +55966,11 @@ var QuadsAdConfigFields = /*#__PURE__*/function (_Component) {
55964
}, /*#__PURE__*/_react["default"].createElement("a", {
55965
className: "quads-autofill",
55966
onClick: this.props.openModal
55967
- }, __('Autofill', 'quick-adsense-reloaded')), /*#__PURE__*/_react["default"].createElement(_QuadsAdModal["default"], {
55968
closeModal: this.props.closeModal,
55969
parentState: this.props.parentState,
55970
title: __('Enter AdSense text and display ad code here', 'quick-adsense-reloaded'),
@@ -60950,17 +60956,7 @@ var QuadsLayout = /*#__PURE__*/function (_Component) {
60950
className: "quads-panel"
60951
}, /*#__PURE__*/_react["default"].createElement("div", {
60952
className: "quads-panel-body"
60953
- }, /*#__PURE__*/_react["default"].createElement("table", null, /*#__PURE__*/_react["default"].createElement("tbody", null, quads_localize_data.is_pro ? /*#__PURE__*/_react["default"].createElement("tr", null, /*#__PURE__*/_react["default"].createElement("td", null, /*#__PURE__*/_react["default"].createElement("label", null, __('Ad Label', 'quick-adsense-reloaded'))), /*#__PURE__*/_react["default"].createElement("td", null, /*#__PURE__*/_react["default"].createElement("select", {
60954
- name: "adlabel",
60955
- value: post_meta.adlabel,
60956
- onChange: this.props.adFormChangeHandler
60957
- }, /*#__PURE__*/_react["default"].createElement("option", {
60958
- value: "none"
60959
- }, __('No Label', 'quick-adsense-reloaded')), /*#__PURE__*/_react["default"].createElement("option", {
60960
- value: "above"
60961
- }, __('Above Ads', 'quick-adsense-reloaded')), /*#__PURE__*/_react["default"].createElement("option", {
60962
- value: "below"
60963
- }, __('Below Ads', 'quick-adsense-reloaded'))))) : null, /*#__PURE__*/_react["default"].createElement("tr", null, /*#__PURE__*/_react["default"].createElement("td", null, /*#__PURE__*/_react["default"].createElement("label", null, __('Align', 'quick-adsense-reloaded'))), /*#__PURE__*/_react["default"].createElement("td", null, /*#__PURE__*/_react["default"].createElement("select", {
60964
name: "align",
60965
value: post_meta.align,
60966
onChange: this.props.adFormChangeHandler
@@ -60982,7 +60978,30 @@ var QuadsLayout = /*#__PURE__*/function (_Component) {
60982
id: "margin",
60983
name: "margin",
60984
value: post_meta.margin
60985
- }))))))));
60986
}
60987
}]);
60988
10466
ad_unit_name: '',
10467
code: '',
10468
align: 3,
10469
+ ad_label_check: false,
10470
adlabel: '',
10471
+ ad_label_text: 'Advertisements',
10472
margin: 0,
10473
position: 'beginning_of_post',
10474
paragraph_number: 1,
55966
}, /*#__PURE__*/_react["default"].createElement("a", {
55967
className: "quads-autofill",
55968
onClick: this.props.openModal
55969
+ }, __('Autofill', 'quick-adsense-reloaded')), /*#__PURE__*/_react["default"].createElement("a", {
55970
+ "class": "quads-general-helper",
55971
+ target: "_blank",
55972
+ href: "https://wpquads.com/documentation/how-to-find-data-client-id-data-slot-id-for-adsense-integration/"
55973
+ }), /*#__PURE__*/_react["default"].createElement(_QuadsAdModal["default"], {
55974
closeModal: this.props.closeModal,
55975
parentState: this.props.parentState,
55976
title: __('Enter AdSense text and display ad code here', 'quick-adsense-reloaded'),
60956
className: "quads-panel"
60957
}, /*#__PURE__*/_react["default"].createElement("div", {
60958
className: "quads-panel-body"
60959
+ }, /*#__PURE__*/_react["default"].createElement("table", null, /*#__PURE__*/_react["default"].createElement("tbody", null, /*#__PURE__*/_react["default"].createElement("tr", null, /*#__PURE__*/_react["default"].createElement("td", null, /*#__PURE__*/_react["default"].createElement("label", null, __('Align', 'quick-adsense-reloaded'))), /*#__PURE__*/_react["default"].createElement("td", null, /*#__PURE__*/_react["default"].createElement("select", {
60960
name: "align",
60961
value: post_meta.align,
60962
onChange: this.props.adFormChangeHandler
60978
id: "margin",
60979
name: "margin",
60980
value: post_meta.margin
60981
+ }))), /*#__PURE__*/_react["default"].createElement("tr", null, /*#__PURE__*/_react["default"].createElement("td", null, /*#__PURE__*/_react["default"].createElement("label", {
60982
+ htmlFor: "ad_label_check"
60983
+ }, __('Ad label', 'quick-adsense-reloaded'))), /*#__PURE__*/_react["default"].createElement("td", null, /*#__PURE__*/_react["default"].createElement("input", {
60984
+ id: "ad_label_check",
60985
+ checked: post_meta.ad_label_check,
60986
+ name: "ad_label_check",
60987
+ onChange: this.props.adFormChangeHandler,
60988
+ type: "checkbox"
60989
+ }))), post_meta.ad_label_check ? /*#__PURE__*/_react["default"].createElement("tr", null, /*#__PURE__*/_react["default"].createElement("td", null, /*#__PURE__*/_react["default"].createElement("label", null, __('Ad Label Position', 'quick-adsense-reloaded'))), /*#__PURE__*/_react["default"].createElement("td", null, /*#__PURE__*/_react["default"].createElement("select", {
60990
+ name: "adlabel",
60991
+ value: post_meta.adlabel,
60992
+ onChange: this.props.adFormChangeHandler
60993
+ }, /*#__PURE__*/_react["default"].createElement("option", {
60994
+ value: "above"
60995
+ }, __('Above Ads', 'quick-adsense-reloaded')), /*#__PURE__*/_react["default"].createElement("option", {
60996
+ value: "below"
60997
+ }, __('Below Ads', 'quick-adsense-reloaded'))))) : null, post_meta.ad_label_check ? /*#__PURE__*/_react["default"].createElement("tr", null, /*#__PURE__*/_react["default"].createElement("td", null, /*#__PURE__*/_react["default"].createElement("label", null, __('Ad Label Text', 'quick-adsense-reloaded'))), /*#__PURE__*/_react["default"].createElement("td", null, /*#__PURE__*/_react["default"].createElement("input", {
60998
+ onChange: this.props.adFormChangeHandler,
60999
+ type: "text",
61000
+ className: "small-text",
61001
+ id: "ad_label_text",
61002
+ name: "ad_label_text",
61003
+ value: post_meta.ad_label_text
61004
+ }))) : null)))));
61005
}
61006
}]);
61007
admin/assets/js/dist/style.css CHANGED
@@ -119,6 +119,12 @@ and open the template in the editor.
119
margin-left: 30px;
120
top: -17px;
121
position: relative; }
122
/*
123
To change this license header, choose License Headers in Project Properties.
124
To change this template file, choose Tools | Templates
119
margin-left: 30px;
120
top: -17px;
121
position: relative; }
122
+
123
+ #quads-ad-content .quads-autofill-div .quads-general-helper:after {
124
+ margin-top: -1px; }
125
+
126
+ #quads-ad-content .quads-autofill-div .quads-general-helper {
127
+ background-color: #005aef; }
128
/*
129
To change this license header, choose License Headers in Project Properties.
130
To change this template file, choose Tools | Templates
admin/assets/js/src/components/ads/ad-create-router/QuadsAdCreateRouter.jsx CHANGED
@@ -67,7 +67,9 @@ class QuadsAdCreateRouter extends Component {
67
ad_unit_name : '',
68
code : '',
69
align : 3,
70
adlabel : '',
71
margin : 0,
72
position : 'beginning_of_post',
73
paragraph_number : 1,
67
ad_unit_name : '',
68
code : '',
69
align : 3,
70
+ ad_label_check : false,
71
adlabel : '',
72
+ ad_label_text : 'Advertisements',
73
margin : 0,
74
position : 'beginning_of_post',
75
paragraph_number : 1,
admin/assets/js/src/components/ads/config-fields/QuadsAdConfigFields.jsx CHANGED
@@ -291,6 +291,7 @@ error_outline
291
<div>{ad_type_name} {__('Ad Configuration', 'quick-adsense-reloaded')}
292
{this.props.ad_type == 'adsense' ?
293
<div className="quads-autofill-div"><a className="quads-autofill" onClick={this.props.openModal}>{__('Autofill', 'quick-adsense-reloaded')}</a>
294
<QuadsAdModal
295
closeModal = {this.props.closeModal}
296
parentState={this.props.parentState}
291
<div>{ad_type_name} {__('Ad Configuration', 'quick-adsense-reloaded')}
292
{this.props.ad_type == 'adsense' ?
293
<div className="quads-autofill-div"><a className="quads-autofill" onClick={this.props.openModal}>{__('Autofill', 'quick-adsense-reloaded')}</a>
294
+ <a class="quads-general-helper" target="_blank" href="https://wpquads.com/documentation/how-to-find-data-client-id-data-slot-id-for-adsense-integration/"></a>
295
<QuadsAdModal
296
closeModal = {this.props.closeModal}
297
parentState={this.props.parentState}
admin/assets/js/src/components/ads/config-fields/QuadsAdConfigFields.scss CHANGED
@@ -36,4 +36,10 @@ and open the template in the editor.
36
margin-left: 30px;
37
top: -17px;
38
position: relative;
39
}
36
margin-left: 30px;
37
top: -17px;
38
position: relative;
39
+ }
40
+ #quads-ad-content .quads-autofill-div .quads-general-helper:after {
41
+ margin-top: -1px;
42
+ }
43
+ #quads-ad-content .quads-autofill-div .quads-general-helper {
44
+ background-color: #005aef;
45
}
admin/assets/js/src/components/common/layout/QuadsLayout.jsx CHANGED
@@ -14,25 +14,13 @@ class QuadsLayout extends Component {
14
render() {
15
const {__} = wp.i18n;
16
const post_meta = this.props.parentState.quads_post_meta;
17
-
18
return (
19
<div>
20
<div>{__('Layout', 'quick-adsense-reloaded')}</div>
21
<div className="quads-panel">
22
<div className="quads-panel-body">
23
<table>
24
- <tbody>
25
- {quads_localize_data.is_pro ?
26
- <tr><td><label>{__('Ad Label', 'quick-adsense-reloaded')}</label></td>
27
- <td>
28
- <select name="adlabel" value={post_meta.adlabel} onChange={this.props.adFormChangeHandler}>
29
- <option value="none">{__('No Label', 'quick-adsense-reloaded')}</option>
30
- <option value="above">{__('Above Ads', 'quick-adsense-reloaded')}</option>
31
- <option value="below">{__('Below Ads', 'quick-adsense-reloaded')}</option>
32
- </select>
33
- </td>
34
- </tr> : null
35
- }
36
<tr><td><label>{__('Align', 'quick-adsense-reloaded')}</label></td>
37
<td>
38
<select name="align" value={post_meta.align} onChange={this.props.adFormChangeHandler}>
@@ -43,7 +31,34 @@ class QuadsLayout extends Component {
43
</select>
44
</td>
45
</tr>
46
- <tr><td><label>{__('Margin', 'quick-adsense-reloaded')}</label></td><td> <input onChange={this.props.adFormChangeHandler} type="number" step="1" max="" min="" className="small-text" id="margin" name="margin" value={post_meta.margin}/></td></tr>
47
</tbody>
48
</table>
49
</div>
14
render() {
15
const {__} = wp.i18n;
16
const post_meta = this.props.parentState.quads_post_meta;
17
return (
18
<div>
19
<div>{__('Layout', 'quick-adsense-reloaded')}</div>
20
<div className="quads-panel">
21
<div className="quads-panel-body">
22
<table>
23
+ <tbody>
24
<tr><td><label>{__('Align', 'quick-adsense-reloaded')}</label></td>
25
<td>
26
<select name="align" value={post_meta.align} onChange={this.props.adFormChangeHandler}>
31
</select>
32
</td>
33
</tr>
34
+ <tr>
35
+ <td><label>{__('Margin', 'quick-adsense-reloaded')}</label></td><td> <input onChange={this.props.adFormChangeHandler} type="number" step="1" max="" min="" className="small-text" id="margin" name="margin" value={post_meta.margin}/></td>
36
+ </tr>
37
+ <tr>
38
+ <td><label htmlFor="ad_label_check">{__('Ad label', 'quick-adsense-reloaded')}</label></td>
39
+ <td>
40
+ <input id="ad_label_check" checked={post_meta.ad_label_check} name="ad_label_check" onChange={this.props.adFormChangeHandler} type="checkbox"/>
41
+ </td>
42
+ </tr>
43
+ {post_meta.ad_label_check ?
44
+ <tr>
45
+ <td><label>{__('Ad Label Position', 'quick-adsense-reloaded')}</label></td>
46
+ <td>
47
+ <select name="adlabel" value={post_meta.adlabel} onChange={this.props.adFormChangeHandler}>
48
+ <option value="above">{__('Above Ads', 'quick-adsense-reloaded')}</option>
49
+ <option value="below">{__('Below Ads', 'quick-adsense-reloaded')}</option>
50
+ </select>
51
+ </td>
52
+ </tr>
53
+ : null }
54
+ {post_meta.ad_label_check ?
55
+ <tr>
56
+ <td><label>{__('Ad Label Text', 'quick-adsense-reloaded')}</label></td>
57
+ <td>
58
+ <input onChange={this.props.adFormChangeHandler} type="text" className="small-text" id="ad_label_text" name="ad_label_text" value={post_meta.ad_label_text}/>
59
+ </td>
60
+ </tr>
61
+ : null }
62
</tbody>
63
</table>
64
</div>
admin/includes/rest-api-service.php CHANGED
@@ -5,6 +5,7 @@ if ( ! defined( 'ABSPATH' ) ) exit;
5
class QUADS_Ad_Setup_Api_Service {
6
7
private $migration_service = null;
8
9
public function __construct() {
10
@@ -341,36 +342,32 @@ class QUADS_Ad_Setup_Api_Service {
341
public function getPostsByArg($arg){
342
343
$response = array();
344
-
345
- $meta_query = new WP_Query($arg);
346
-
347
- if($meta_query->have_posts()) {
348
-
349
- $data = array();
350
- $post_meta = array();
351
- while($meta_query->have_posts()) {
352
- $meta_query->the_post();
353
- $data['post_id'] = get_the_ID();
354
- $data['post_title'] = get_the_title();
355
- $data['post_status'] = get_post_status();
356
- $data['post_modified'] = get_the_date('d M, Y');
357
- $post_meta = get_post_meta(get_the_ID(), '', true);
358
- if($post_meta){
359
- foreach($post_meta as $key => $val ){
360
- $post_meta[$key] = $val[0];
361
- }
362
- }
363
-
364
- $posts_data[] = array(
365
- 'post' => (array) $data,
366
- 'post_meta' => $post_meta
367
- );
368
-
369
}
370
- wp_reset_postdata();
371
- $response['posts_data'] = $posts_data;
372
- $response['posts_found'] = $meta_query->found_posts;
373
}
374
375
return $response;
376
5
class QUADS_Ad_Setup_Api_Service {
6
7
private $migration_service = null;
8
+ private $amp_front_loop = array();
9
10
public function __construct() {
11
342
public function getPostsByArg($arg){
343
344
$response = array();
345
+ if(count($this->amp_front_loop)==0){
346
+ $query_data = get_posts($arg);
347
+ $post_meta = array();
348
+ foreach ($query_data as $key => $value) {
349
+ $data = array();
350
+ $data['post_id'] = $value->ID;
351
+ $data['post_title'] = $value->post_title;
352
+ $data['post_status'] = $value->post_status;
353
+ $data['post_modified'] = $value->post_modified;
354
+ $post_meta = get_post_meta($data['post_id'], '', true);
355
+ if($post_meta){
356
+ foreach($post_meta as $key => $val ){
357
+ $post_meta[$key] = $val[0];
358
}
359
+ }
360
+ $posts_data[] = array(
361
+ 'post' => (array) $data,
362
+ 'post_meta' => $post_meta
363
+ );
364
}
365
+ $response['posts_data'] = $posts_data;
366
+ $response['posts_found'] = count($query_data);
367
+ $this->amp_front_loop = $response;
368
+ }else{
369
+ $response = $this->amp_front_loop;
370
+ }
371
372
return $response;
373
assets/js/quads-admin.js CHANGED
@@ -81,9 +81,13 @@ $('a[href$="quads_switch_to_old"]').removeAttr("href").attr('onClick', "quads_sw
81
}
82
// show / hide helper description
83
$('.quads-tooltip').click(function (e) {
84
- e.preventDefault();
85
var icon = $(this),
86
bubble = $(this).next();
87
88
// Close any that are already open
89
$('.quads-tooltip-message').not(bubble).hide();
81
}
82
// show / hide helper description
83
$('.quads-tooltip').click(function (e) {
84
var icon = $(this),
85
bubble = $(this).next();
86
+ if(bubble.html() === undefined){
87
+ return ;
88
+ }else{
89
+ e.preventDefault();
90
+ }
91
92
// Close any that are already open
93
$('.quads-tooltip-message').not(bubble).hide();
assets/js/quads-admin.min.js CHANGED
@@ -424,10 +424,13 @@ e.preventDefault();
424
e.stopPropagation();
425
});
426
$('.quads-general-helper').click(function (e) {
427
- e.preventDefault();
428
var icon = $(this),
429
bubble = $(this).next();
430
-
431
// Close any that are already open
432
$('.quads-message').not(bubble).hide();
433
424
e.stopPropagation();
425
});
426
$('.quads-general-helper').click(function (e) {
427
var icon = $(this),
428
bubble = $(this).next();
429
+ if(bubble.html() === undefined){
430
+ return ;
431
+ }else{
432
+ e.preventDefault();
433
+ }
434
// Close any that are already open
435
$('.quads-message').not(bubble).hide();
436
includes/amp-condition-display.php CHANGED
@@ -134,6 +134,9 @@ class quads_output_amp_condition_display{
134
if(isset($ads['enabled_on_amp']) && !$ads['enabled_on_amp']){
135
continue;
136
}
137
if($ads['position'] =='amp_after_featured_image' && $condition == 'quads_after_featured_image'){
138
$tag= '<!--CusAds'.$ads['ad_id'].'-->';
139
echo quads_replace_ads_new( $tag, 'CusAds' . $ads['ad_id'], $ads['ad_id'] );
134
if(isset($ads['enabled_on_amp']) && !$ads['enabled_on_amp']){
135
continue;
136
}
137
+ if(!isset($ads['position'])){
138
+ continue;
139
+ }
140
if($ads['position'] =='amp_after_featured_image' && $condition == 'quads_after_featured_image'){
141
$tag= '<!--CusAds'.$ads['ad_id'].'-->';
142
echo quads_replace_ads_new( $tag, 'CusAds' . $ads['ad_id'], $ads['ad_id'] );
includes/frontend-checks.php CHANGED
@@ -54,7 +54,7 @@ function quads_add_admin_bar_menu( $wp_admin_bar ) {
54
'parent' => 'quads_ad_check',
55
'id' => 'quads_ad_check_jquery',
56
'title' => __( '- JavaScript / jQuery error', 'quick-adsense-reloaded' ),
57
- 'href' => 'http://wpquads.com/docs/javascript-issues-breaking-adsense-ads/',
58
'meta' => array(
59
'class' => 'quads-hidden quads_ad_check_warning',
60
'target' => '_blank'
54
'parent' => 'quads_ad_check',
55
'id' => 'quads_ad_check_jquery',
56
'title' => __( '- JavaScript / jQuery error', 'quick-adsense-reloaded' ),
57
+ 'href' => 'https://wpquads.com/docs/javascript-issues-breaking-adsense-ads/',
58
'meta' => array(
59
'class' => 'quads-hidden quads_ad_check_warning',
60
'target' => '_blank'
includes/render-ad-functions.php CHANGED
@@ -32,7 +32,7 @@ function quads_render_ad( $id, $string, $widget = false,$ampsupport='' ) {
32
33
34
if (quads_is_amp_endpoint()){
35
- return quads_render_amp($id,$ampsupport);
36
}
37
38
@@ -41,18 +41,18 @@ function quads_render_ad( $id, $string, $widget = false,$ampsupport='' ) {
41
// allow use of shortcodes in ad plain text content
42
$string = quadsCleanShortcode('quads', $string);
43
//wp_die('t1');
44
- return apply_filters( 'quads_render_ad', $string );
45
}
46
47
// Return the adsense ad code
48
if( true === quads_is_adsense( $id, $string ) ) {
49
- return apply_filters( 'quads_render_ad', quads_render_google_async( $id ) );
50
}
51
if( true === quads_is_double_click( $id, $string ) ) {
52
- return apply_filters( 'quads_render_ad', quads_render_double_click_async( $id ) );
53
}
54
if( true === quads_is_yandex( $id, $string ) ) {
55
- return apply_filters( 'quads_render_ad', quads_render_yandex_async( $id ) );
56
}
57
58
// Return empty string
@@ -710,4 +710,44 @@ function quads_is_amp_endpoint(){
710
}
711
}
712
return false;
713
- }
32
33
34
if (quads_is_amp_endpoint()){
35
+ return apply_filters( 'quads_render_ad', quads_render_amp($id,$ampsupport),$id );
36
}
37
38
41
// allow use of shortcodes in ad plain text content
42
$string = quadsCleanShortcode('quads', $string);
43
//wp_die('t1');
44
+ return apply_filters( 'quads_render_ad', $string,$id );
45
}
46
47
// Return the adsense ad code
48
if( true === quads_is_adsense( $id, $string ) ) {
49
+ return apply_filters( 'quads_render_ad', quads_render_google_async( $id ),$id );
50
}
51
if( true === quads_is_double_click( $id, $string ) ) {
52
+ return apply_filters( 'quads_render_ad', quads_render_double_click_async( $id ),$id );
53
}
54
if( true === quads_is_yandex( $id, $string ) ) {
55
+ return apply_filters( 'quads_render_ad', quads_render_yandex_async( $id ),$id );
56
}
57
58
// Return empty string
710
}
711
}
712
return false;
713
+ }
714
+
715
+
716
+
717
+ function quads_render_ad_label_new( $adcode,$id='') {
718
+ global $quads_options,$quads_mode;
719
+
720
+ $post_id= quadsGetPostIdByMetaKeyValue('quads_ad_old_id', $id);
721
+ $ad_meta = get_post_meta($post_id, '',true);
722
+ if (quads_is_amp_endpoint()){
723
+ if(!isset($ad_meta['enabled_on_amp'][0]) || (isset($ad_meta['enabled_on_amp'][0]) && (empty($ad_meta['enabled_on_amp'][0])|| !$ad_meta['enabled_on_amp'][0]) )){
724
+ return $adcode;
725
+ }
726
+ }
727
+ $ad_label_check = isset($ad_meta['ad_label_check'][0]) ? $ad_meta['ad_label_check'][0] : false;
728
+ if($quads_mode =='new' && $ad_label_check){
729
+ $position = (isset($ad_meta['adlabel'][0]) && !empty($ad_meta['adlabel'][0]) )? $ad_meta['adlabel'][0] : 'above';
730
+ $ad_label_text = (isset($ad_meta['ad_label_text'][0]) && !empty($ad_meta['ad_label_text'][0])) ? $ad_meta['ad_label_text'][0] : 'Advertisements';
731
+ $label = apply_filters( 'quads_ad_label', $ad_label_text );
732
+
733
+ $html = '<div class="quads-ad-label quads-ad-label-new">' . sanitize_text_field($label) . '</div>';
734
+ if (defined('QUADS_PRO_VERSION') && QUADS_PRO_VERSION >= '2.0') {
735
+ $css = '.quads-ad-label{display:none} .quads-ad-label.quads-ad-label-new{display:block}';
736
+ wp_dequeue_style('quads-ad-label');
737
+ wp_deregister_style('quads-ad-label');
738
+ wp_register_style( 'quads-ad-label', false );
739
+ wp_enqueue_style( 'quads-ad-label' );
740
+ wp_add_inline_style( 'quads-ad-label', $css );
741
+ }
742
+
743
+ if( $position == 'above' ) {
744
+ return $html . $adcode;
745
+ }
746
+ if( $position == 'below' ) {
747
+ return $adcode . $html;
748
+ }
749
+ }
750
+ return $adcode;
751
+ }
752
+
753
+ add_filter( 'quads_render_ad', 'quads_render_ad_label_new',99,2 );
includes/template-functions.php CHANGED
@@ -387,9 +387,9 @@ function quads_filter_default_ads_new( $content ) {
387
388
// placeholder string for custom ad spots
389
if(isset($ads['random_ads_list']) && !empty($ads['random_ads_list'])){
390
- $cusads = '<!--CusRnd'.$ads['ad_id'].'-->';
391
}else{
392
- $cusads = '<!--CusAds'.$ads['ad_id'].'-->';
393
}
394
switch ($position) {
395
387
388
// placeholder string for custom ad spots
389
if(isset($ads['random_ads_list']) && !empty($ads['random_ads_list'])){
390
+ $cusads = '<!--CusRnd'.$ads['ad_id'].'-->';
391
}else{
392
+ $cusads = '<!--CusAds'.$ads['ad_id'].'-->';
393
}
394
switch ($position) {
395
package.json CHANGED
@@ -1,6 +1,6 @@
1
{
2
"name": "quick-adsense-reloaded",
3
- "version": "2.0.5",
4
"devDependencies": {
5
"grunt": "~0.4.5",
6
"grunt-contrib-clean": "~0.6.0",
1
{
2
"name": "quick-adsense-reloaded",
3
+ "version": "2.0.6",
4
"devDependencies": {
5
"grunt": "~0.4.5",
6
"grunt-contrib-clean": "~0.6.0",
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.5
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.5' );
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.6
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.6' );
42
}
43
44
// Plugin name
readme.txt CHANGED
@@ -10,7 +10,7 @@ Tags: adsense, ads, ad, google adsense, advertising, amp, ad injection, ad inser
10
Requires at least: 3.6+
11
Tested up to: 5.4
12
Requires PHP: 5.3
13
- Stable tag: 2.0.5
14
15
Ads & AdSense Plugin is the quickest way to insert Google AdSense & other ads into your website. Google AdSense integration with Google AMP support.
16
@@ -129,6 +129,12 @@ Alternative Installation:
129
130
131
== Changelog ==
132
= 2.0.5 =
133
* New: Lazy Loading ads feature #104
134
* Fix: Improved Conditions for user Targeting #99
10
Requires at least: 3.6+
11
Tested up to: 5.4
12
Requires PHP: 5.3
13
+ Stable tag: 2.0.6
14
15
Ads & AdSense Plugin is the quickest way to insert Google AdSense & other ads into your website. Google AdSense integration with Google AMP support.
16
129
130
131
== Changelog ==
132
+ = 2.0.6 =
133
+ * New: Added ad label for individual post in new interface #117
134
+ * New: Added a tutorial link in the Adsense #116
135
+ * Fix: Fixed AMP single page data duplication issue. #123
136
+ * Fix: Fixed http link is breaking the Secure protocol #126
137
+
138
= 2.0.5 =
139
* New: Lazy Loading ads feature #104
140
* Fix: Improved Conditions for user Targeting #99