Advanced Ads - Version 1.13.4

Version Description

  • improved compatibility with WPML
  • improved errors given when no ad units were found in the AdSense account
  • improved UI when hiding ad health notices
  • fixed issue when logging the AdSense Hidden problem
  • fixed issue on ad filter list when two terms with the same slug exist
  • fixed unlikely case of an SQL error on ad overview page
  • fixed issue with Ad Health bar in frontend when jQuery was not found
  • added a link to ads.txt settings from AdSense warning about missing ads.txt file
  • removed unneeded ads.txt warning on com.au domains
Download this release

Release Info

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

Code changes from version 1.13.3 to 1.13.4

admin/assets/css/admin.css CHANGED
@@ -25,7 +25,8 @@
25
  #advads-overview #advads_overview_addons table tr.recommended th,
26
  #advads-overview #advads_overview_addons table tr.free th { padding-top: 20px; }
27
  #advads_overview_news .button-primary { margin-left: 0; }
28
- #advads_overview_notices .advads-loader { display: block; margin: 0 auto; }
 
29
  #advads_overview_notices #advads-support-callout p { clear: both; margin-bottom: 0; }
30
  .advads-ad-health-notices { overflow: hidden; }
31
  .advads-ad-health-notices li { padding: 10px; overflow: hidden; box-shadow: 0 1px 2px 0 rgba( 0, 0, 0, 0.2 ); border-left: 4px solid #fff; }
25
  #advads-overview #advads_overview_addons table tr.recommended th,
26
  #advads-overview #advads_overview_addons table tr.free th { padding-top: 20px; }
27
  #advads_overview_news .button-primary { margin-left: 0; }
28
+ #advads_overview_notices .main { position: relative; top: 0; left: 0; }
29
+ #advads_overview_notices .advads-loader { position: absolute; top: 0; left: 0; right: 0; bottom: 0; height: 100%; width: 100%; margin: 0 auto; opacity: 0.5; background-color: #fff; background-position: center; }
30
  #advads_overview_notices #advads-support-callout p { clear: both; margin-bottom: 0; }
31
  .advads-ad-health-notices { overflow: hidden; }
32
  .advads-ad-health-notices li { padding: 10px; overflow: hidden; box-shadow: 0 1px 2px 0 rgba( 0, 0, 0, 0.2 ); border-left: 4px solid #fff; }
admin/assets/js/admin-global.js CHANGED
@@ -70,7 +70,8 @@ jQuery( document ).ready(function () {
70
  var remove = jQuery( this ).hasClass( 'remove' );
71
 
72
  // fix height to prevent the box from going smaller first, then show the "show" link and grow again
73
- jQuery( '#advads_overview_notices' ).css( 'height', jQuery( '#advads_overview_notices' ).height() + 'px' );
 
74
 
75
  var query = {
76
  action: 'advads-ad-health-notice-hide',
@@ -83,6 +84,8 @@ jQuery( document ).ready(function () {
83
  } else {
84
  notice.hide();
85
  }
 
 
86
  advads_ad_health_maybe_remove_list();
87
  // send query
88
  jQuery.post(ajaxurl, query, function (r) {
@@ -92,6 +95,8 @@ jQuery( document ).ready(function () {
92
  advads_ad_health_reload_show_link();
93
  // remove the fixed height
94
  jQuery( '#advads_overview_notices' ).css( 'height', '' );
 
 
95
  });
96
  });
97
  // show all hidden notices
@@ -230,7 +235,7 @@ function advads_load_dashboard_rss_widget_content(){
230
  /**
231
  * Ad Health Notices in backend
232
  */
233
- // display notices list
234
  function advads_display_ad_health_notices(){
235
 
236
  var query = {
@@ -271,12 +276,15 @@ function advads_push_notice( key, attr = '' ){
271
  }
272
  // show notices of a given type again
273
  function advads_ad_health_show_hidden(){
 
274
  var query = {
275
  action: 'advads-ad-health-notice-unignore',
276
  nonce: advadsglobal.ajax_nonce
277
  };
278
  // show all hidden
279
  jQuery( document ).find( '#advads_overview_notices .advads-ad-health-notices > li:hidden' ).show();
 
 
280
  // update the button
281
  advads_ad_health_reload_show_link();
282
  advads_ad_health_maybe_remove_list();
@@ -284,6 +292,8 @@ function advads_ad_health_show_hidden(){
284
  jQuery.post(ajaxurl, query, function (r) {
285
  // update issue count
286
  advads_ad_health_reload_number_in_menu();
 
 
287
  });
288
  };
289
  // hide list fragments if last item was hidden/removed
70
  var remove = jQuery( this ).hasClass( 'remove' );
71
 
72
  // fix height to prevent the box from going smaller first, then show the "show" link and grow again
73
+ var notice_box = jQuery( '#advads_overview_notices' );
74
+ notice_box.css( 'height', notice_box.height() + 'px' );
75
 
76
  var query = {
77
  action: 'advads-ad-health-notice-hide',
84
  } else {
85
  notice.hide();
86
  }
87
+ // show loader
88
+ notice_box.find('.advads-loader' ).show();
89
  advads_ad_health_maybe_remove_list();
90
  // send query
91
  jQuery.post(ajaxurl, query, function (r) {
95
  advads_ad_health_reload_show_link();
96
  // remove the fixed height
97
  jQuery( '#advads_overview_notices' ).css( 'height', '' );
98
+ // remove loader
99
+ notice_box.find('.advads-loader' ).hide();
100
  });
101
  });
102
  // show all hidden notices
235
  /**
236
  * Ad Health Notices in backend
237
  */
238
+ // display notices list (deprecated because we load it without AJAX now)
239
  function advads_display_ad_health_notices(){
240
 
241
  var query = {
276
  }
277
  // show notices of a given type again
278
  function advads_ad_health_show_hidden(){
279
+ var notice_box = jQuery( '#advads__overview_notices');
280
  var query = {
281
  action: 'advads-ad-health-notice-unignore',
282
  nonce: advadsglobal.ajax_nonce
283
  };
284
  // show all hidden
285
  jQuery( document ).find( '#advads_overview_notices .advads-ad-health-notices > li:hidden' ).show();
286
+ // show loader
287
+ notice_box.find('.advads-loader' ).show();
288
  // update the button
289
  advads_ad_health_reload_show_link();
290
  advads_ad_health_maybe_remove_list();
292
  jQuery.post(ajaxurl, query, function (r) {
293
  // update issue count
294
  advads_ad_health_reload_number_in_menu();
295
+ // hide loader
296
+ notice_box.find('.advads-loader' ).hide();
297
  });
298
  };
299
  // hide list fragments if last item was hidden/removed
admin/assets/js/admin.js CHANGED
@@ -31,6 +31,12 @@ jQuery( document ).ready(function ($) {
31
  });
32
  };
33
 
 
 
 
 
 
 
34
  $( document ).on('change', '#advanced-ad-type input', function () {
35
  var ad_type = $( this ).val()
36
  advads_load_ad_type_parameter_metabox( ad_type );
31
  });
32
  };
33
 
34
+ $( document ).on( 'click', '#switch-to-adsense-type', function( ev ) {
35
+ ev.preventDefault();
36
+ $( '#advanced-ad-type-adsense' ).trigger( 'click' );
37
+ $( this ).closest( 'li' ).addClass( 'hidden' );
38
+ } );
39
+
40
  $( document ).on('change', '#advanced-ad-type input', function () {
41
  var ad_type = $( this ).val()
42
  advads_load_ad_type_parameter_metabox( ad_type );
admin/includes/ad-health-notices.php CHANGED
@@ -199,7 +199,12 @@ $advanced_ads_ad_health_notices = apply_filters( 'advanced-ads-ad-health-notices
199
  ),
200
  // AdSense account alert.
201
  'adsense_alert_ALERT_TYPE_ADS_TXT_UNAUTHORIZED' => array(
202
- 'text' => __( 'One of your sites is missing the AdSense publisher ID in the ads.txt file.', 'advanced-ads' ) . ' ' . Advanced_Ads_Ad_Health_Notices::get_adsense_error_link( 'ALERT_TYPE_ADS_TXT_UNAUTHORIZED' ),
 
 
 
 
 
203
  'type' => 'problem',
204
  ),
205
  )
199
  ),
200
  // AdSense account alert.
201
  'adsense_alert_ALERT_TYPE_ADS_TXT_UNAUTHORIZED' => array(
202
+ 'text' => sprintf(
203
+ __( 'One of your sites is missing the AdSense publisher ID in the ads.txt file.', 'advanced-ads' )
204
+ . ' <a class="advads-settings-link" href="%s">'
205
+ . _x('Create one now.', 'related to ads.txt file', 'advanced-ads' ) . '</a>',
206
+ admin_url( 'admin.php?page=advanced-ads-settings#general__advads-ads-txt' )
207
+ ) . ' ' . Advanced_Ads_Ad_Health_Notices::get_adsense_error_link( 'ALERT_TYPE_ADS_TXT_UNAUTHORIZED' ),
208
  'type' => 'problem',
209
  ),
210
  )
admin/includes/class-list-filters.php CHANGED
@@ -209,7 +209,15 @@ class Advanced_Ads_Ad_List_Filters {
209
  * which breaks the SQL, because the numbers are no longer recognised as such
210
  */
211
  if ( ! empty( $group_ids ) ) {
212
- $term_relations = $wpdb->get_results( $wpdb->prepare( 'SELECT object_id, term_taxonomy_id FROM `' . $wpdb->prefix . 'term_relationships` WHERE `term_taxonomy_id` IN (%1$s)', implode( ',', $group_ids ) ), 'ARRAY_A' );
 
 
 
 
 
 
 
 
213
  }
214
  foreach ( $term_relations as $value ) {
215
  if ( isset( $value['term_taxonomy_id'] ) && isset( $value['object_id'] ) ) {
@@ -403,8 +411,13 @@ class Advanced_Ads_Ad_List_Filters {
403
 
404
  $term = $request['term'];
405
  global $wpdb;
406
- $q = 'SELECT `object_id` FROM `' . $wpdb->prefix . 'term_relationships` WHERE `term_taxonomy_id` = ( SELECT `term_id` FROM `' . $wpdb->prefix . 'terms` WHERE `slug` = %s )';
407
- $q = $wpdb->prepare( $q, $term );
 
 
 
 
 
408
 
409
  $object_ids = $wpdb->get_results( $q, 'ARRAY_A' );
410
  $ads_in_taxo = array();
209
  * which breaks the SQL, because the numbers are no longer recognised as such
210
  */
211
  if ( ! empty( $group_ids ) ) {
212
+ $term_relations = $wpdb->get_results(
213
+ $wpdb->prepare(
214
+ 'SELECT object_id, term_taxonomy_id FROM `' . $wpdb->prefix . 'term_relationships` WHERE `term_taxonomy_id` IN (' .
215
+ 'SELECT term_taxonomy_id FROM `' . $wpdb->prefix . 'term_taxonomy` WHERE `taxonomy` = %s' .
216
+ ')',
217
+ Advanced_Ads::AD_GROUP_TAXONOMY
218
+ ),
219
+ 'ARRAY_A'
220
+ );
221
  }
222
  foreach ( $term_relations as $value ) {
223
  if ( isset( $value['term_taxonomy_id'] ) && isset( $value['object_id'] ) ) {
411
 
412
  $term = $request['term'];
413
  global $wpdb;
414
+ $q = 'SELECT `object_id` FROM `' . $wpdb->prefix . 'term_relationships` WHERE `term_taxonomy_id` = (' .
415
+ 'SELECT ' . $wpdb->prefix . 'terms.term_id FROM `' . $wpdb->prefix . 'terms` INNER JOIN ' .
416
+ $wpdb->prefix . 'term_taxonomy on ' . $wpdb->prefix . 'terms.term_id = ' . $wpdb->prefix . 'term_taxonomy.term_id ' .
417
+ 'WHERE ' . $wpdb->prefix . 'terms.slug = %s AND ' . $wpdb->prefix . 'term_taxonomy.taxonomy = %s' .
418
+ ')';
419
+
420
+ $q = $wpdb->prepare( $q, $term, Advanced_Ads::AD_GROUP_TAXONOMY );
421
 
422
  $object_ids = $wpdb->get_results( $q, 'ARRAY_A' );
423
  $ads_in_taxo = array();
admin/includes/class-meta-box.php CHANGED
@@ -207,6 +207,17 @@ class Advanced_Ads_Admin_Meta_Boxes {
207
  }
208
  }
209
 
 
 
 
 
 
 
 
 
 
 
 
210
  $warnings = apply_filters( 'advanced-ads-ad-notices', $warnings, $box, $post );
211
  echo '<ul id="' .$box['id'].'-notices" class="advads-metabox-notices">';
212
  foreach( $warnings as $_warning ){
207
  }
208
  }
209
 
210
+ if ( 'ad-parameters-box' === $box['id'] && Advanced_Ads_Ad_Type_Adsense::content_is_adsense( $ad->content ) && in_array( $ad->type, array( 'plain', 'content' ) ) ) {
211
+ $warnings[] = array(
212
+ 'class' => 'advads-adsense-found-in-content error',
213
+ 'text' => sprintf(
214
+ esc_html__( 'This looks like an AdSense ad. Switch the ad type to “AdSense ad” to make use of more features. %sSwitch to AdSense ad%s.', 'advanced' ),
215
+ '<button class="button-secondary" id="switch-to-adsense-type">',
216
+ '</button>'
217
+ )
218
+ );
219
+ }
220
+
221
  $warnings = apply_filters( 'advanced-ads-ad-notices', $warnings, $box, $post );
222
  echo '<ul id="' .$box['id'].'-notices" class="advads-metabox-notices">';
223
  foreach( $warnings as $_warning ){
admin/views/overview-notices.php CHANGED
@@ -22,4 +22,6 @@ Advanced_Ads_Ad_Health_Notices::get_instance()->display_notices();
22
 
23
  if ( Advanced_Ads_Ad_Health_Notices::has_visible_problems() ) {
24
  include ADVADS_BASE_PATH . 'admin/views/support-callout.php';
25
- }
 
 
22
 
23
  if ( Advanced_Ads_Ad_Health_Notices::has_visible_problems() ) {
24
  include ADVADS_BASE_PATH . 'admin/views/support-callout.php';
25
+ }
26
+
27
+ ?><div class="advads-loader" style="display: none;"></div>
admin/views/settings.php CHANGED
@@ -62,39 +62,66 @@ $setting_tabs = apply_filters(
62
 
63
  </div>
64
  <script>
65
- // menu tabs
66
- jQuery( '#advads-tabs' ).find( 'a' ).click(function () {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  jQuery( '#advads-tabs' ).find( 'a' ).removeClass( 'nav-tab-active' );
68
  jQuery( '.advads-tab' ).removeClass( 'active' );
69
 
70
- var id = jQuery( this ).attr( 'id' ).replace( '-tab', '' );
71
- jQuery( '#' + id ).addClass( 'active' );
72
- jQuery( this ).addClass( 'nav-tab-active' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  });
74
 
75
  // activate specific or first tab
76
 
77
- var active_tab = window.location.hash.replace( '#top#', '' );
78
- if (active_tab == '' || active_tab == '#_=_') {
79
- active_tab = jQuery( '.advads-tab' ).attr( 'id' );
80
- }
81
- jQuery( '#' + active_tab ).addClass( 'active' );
82
- jQuery( '#' + active_tab + '-tab' ).addClass( 'nav-tab-active' );
83
- jQuery( '.nav-tab-active' ).click();
84
  // set all tab urls
85
  advads_set_tab_hashes();
86
 
87
- // While user is already on the Settings page, find links (in admin menu,
88
- // in the Checks at the top) to particular setting tabs and open them on click.
89
- jQuery( '.toplevel_page_advanced-ads a[href*="#top"], .message a[href*="#top"]' ).click( function() {
90
- // Already on the Settings page, so simulate another click on a tab.
91
- if ( window.location.href.indexOf( 'page=advanced-ads-settings' ) ) {
92
- // Extract the tab id from the url.
93
- var tab = jQuery( this ).attr( 'href' ).split( 'advanced-ads-settings#top#' )[1];
94
- jQuery( '#advads-tabs' ).find( 'a#' + tab + '-tab' ).click();
95
- }
96
- });
97
-
98
  // dynamically generate the sub-menu
99
  jQuery( '.advads-tab-sub-menu' ).each( function( key, e ){
100
  // abort if scrollIntoView is not supported; we can’t use anchors because they are used for tabs already
62
 
63
  </div>
64
  <script>
65
+ /**
66
+ * There are two formats of URL supported:
67
+ * admin.php?page=advanced-ads-settings#top#tab_id go to the `tab_id`
68
+ * admin.php?page=advanced-ads-settings#tab_id__anchor go to the `tab_id`, scroll to the `anchor`
69
+ */
70
+
71
+ /**
72
+ * Extract the active tab and anchor from the URL.
73
+ */
74
+ function advads_extract_tab( url ) {
75
+ var hash_parts = url.replace( '#top#', '' ).replace( '#', '' ).split( '__' );
76
+
77
+ return {
78
+ 'tab': hash_parts[0] || jQuery( '.advads-tab' ).attr( 'id' ),
79
+ 'anchor': hash_parts[1]
80
+ }
81
+ }
82
+
83
+ /**
84
+ * Set the active tab and optionally scroll to the anchor.
85
+ */
86
+ function advads_set_tab( tab ) {
87
  jQuery( '#advads-tabs' ).find( 'a' ).removeClass( 'nav-tab-active' );
88
  jQuery( '.advads-tab' ).removeClass( 'active' );
89
 
90
+ jQuery( '#' + tab.tab ).addClass( 'active' );
91
+ jQuery( '#' + tab.tab + '-tab' ).addClass( 'nav-tab-active' );
92
+
93
+ if ( tab.anchor ) {
94
+ var anchor_offset = document.getElementById( tab.anchor ).getBoundingClientRect().top;
95
+ var admin_bar = 48;
96
+ window.scrollTo( 0, anchor_offset + window.scrollY - admin_bar );
97
+ }
98
+ }
99
+
100
+ // menu tabs
101
+ jQuery( '#advads-tabs' ).find( 'a' ).click(function () {
102
+ var url = jQuery( this ).attr( 'href' );
103
+ var tab = advads_extract_tab( url );
104
+ advads_set_tab( tab );
105
+ });
106
+
107
+ // While user is already on the Settings page, find links (in admin menu,
108
+ // in the Checks at the top, in the notices at the top) to particular setting tabs and open them on click.
109
+ jQuery( document ).on( 'click', 'a[href*="page=advanced-ads-settings"]:not(.nav-tab)', function() {
110
+ // Already on the Settings page, so set the new tab.
111
+ // Extract the tab id from the url.
112
+ var url = jQuery( this ).attr( 'href' ).split( 'advanced-ads-settings' )[1];
113
+ var tab = advads_extract_tab( url );
114
+ advads_set_tab( tab );
115
  });
116
 
117
  // activate specific or first tab
118
 
119
+ var active_tab = advads_extract_tab( window.location.hash );
120
+ advads_set_tab( active_tab );
121
+
 
 
 
 
122
  // set all tab urls
123
  advads_set_tab_hashes();
124
 
 
 
 
 
 
 
 
 
 
 
 
125
  // dynamically generate the sub-menu
126
  jQuery( '.advads-tab-sub-menu' ).each( function( key, e ){
127
  // abort if scrollIntoView is not supported; we can’t use anchors because they are used for tabs already
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.13.3
16
  * Author: Thomas Maier
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.13.3' );
43
 
44
  /*----------------------------------------------------------------------------*
45
  * Autoloading, modules and functions
12
  * Plugin Name: Advanced Ads
13
  * Plugin URI: https://wpadvancedads.com
14
  * Description: Manage and optimize your ads in WordPress
15
+ * Version: 1.13.4
16
  * Author: Thomas Maier
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.13.4' );
43
 
44
  /*----------------------------------------------------------------------------*
45
  * Autoloading, modules and functions
classes/EDD_SL_Plugin_Updater.php CHANGED
@@ -7,7 +7,7 @@ if ( ! defined( 'ABSPATH' ) ) exit;
7
  * Allows plugins to use their own update API.
8
  *
9
  * @author Easy Digital Downloads
10
- * @version 1.6.17
11
  */
12
  class ADVADS_SL_Plugin_Updater {
13
 
@@ -42,10 +42,19 @@ class ADVADS_SL_Plugin_Updater {
42
  $this->version = $_api_data['version'];
43
  $this->wp_override = isset( $_api_data['wp_override'] ) ? (bool) $_api_data['wp_override'] : false;
44
  $this->beta = ! empty( $this->api_data['beta'] ) ? true : false;
45
- $this->cache_key = md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) );
46
 
47
  $edd_plugin_data[ $this->slug ] = $this->api_data;
48
 
 
 
 
 
 
 
 
 
 
49
  // Set up hooks.
50
  $this->init();
51
 
@@ -112,6 +121,9 @@ class ADVADS_SL_Plugin_Updater {
112
 
113
  $_transient_data->response[ $this->name ] = $version_info;
114
 
 
 
 
115
  }
116
 
117
  $_transient_data->last_checked = time();
@@ -307,6 +319,15 @@ class ADVADS_SL_Plugin_Updater {
307
  $_data->icons = $this->convert_object_to_array( $_data->icons );
308
  }
309
 
 
 
 
 
 
 
 
 
 
310
  return $_data;
311
  }
312
 
@@ -325,7 +346,7 @@ class ADVADS_SL_Plugin_Updater {
325
  private function convert_object_to_array( $data ) {
326
  $new_data = array();
327
  foreach ( $data as $key => $value ) {
328
- $new_data[ $key ] = $value;
329
  }
330
 
331
  return $new_data;
@@ -362,7 +383,9 @@ class ADVADS_SL_Plugin_Updater {
362
  private function api_request( $_action, $_data ) {
363
 
364
  global $wp_version, $edd_plugin_url_available;
365
-
 
 
366
  // Do a quick status check on this domain if we haven't already checked it.
367
  $store_hash = md5( $this->api_url );
368
  if ( ! is_array( $edd_plugin_url_available ) || ! isset( $edd_plugin_url_available[ $store_hash ] ) ) {
@@ -376,7 +399,7 @@ class ADVADS_SL_Plugin_Updater {
376
  $edd_plugin_url_available[ $store_hash ] = false;
377
  } else {
378
  $test_url = $scheme . '://' . $host . $port;
379
- $response = wp_remote_get( $test_url, array( 'timeout' => $this->health_check_timeout, 'sslverify' => true ) );
380
  $edd_plugin_url_available[ $store_hash ] = is_wp_error( $response ) ? false : true;
381
  }
382
  }
@@ -407,7 +430,6 @@ class ADVADS_SL_Plugin_Updater {
407
  'beta' => ! empty( $data['beta'] ),
408
  );
409
 
410
- $verify_ssl = $this->verify_ssl();
411
  $request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => $verify_ssl, 'body' => $api_params ) );
412
 
413
  if ( ! is_wp_error( $request ) ) {
@@ -423,10 +445,10 @@ class ADVADS_SL_Plugin_Updater {
423
  if ( $request && isset( $request->banners ) ) {
424
  $request->banners = maybe_unserialize( $request->banners );
425
  }
426
-
427
  if ( $request && isset( $request->icons ) ) {
428
  $request->icons = maybe_unserialize( $request->icons );
429
- }
430
 
431
  if( ! empty( $request->sections ) ) {
432
  foreach( $request->sections as $key => $section ) {
7
  * Allows plugins to use their own update API.
8
  *
9
  * @author Easy Digital Downloads
10
+ * @version 1.6.18
11
  */
12
  class ADVADS_SL_Plugin_Updater {
13
 
42
  $this->version = $_api_data['version'];
43
  $this->wp_override = isset( $_api_data['wp_override'] ) ? (bool) $_api_data['wp_override'] : false;
44
  $this->beta = ! empty( $this->api_data['beta'] ) ? true : false;
45
+ $this->cache_key = 'edd_sl_' . md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) );
46
 
47
  $edd_plugin_data[ $this->slug ] = $this->api_data;
48
 
49
+ /**
50
+ * Fires after the $edd_plugin_data is setup.
51
+ *
52
+ * @since x.x.x
53
+ *
54
+ * @param array $edd_plugin_data Array of EDD SL plugin data.
55
+ */
56
+ do_action( 'post_edd_sl_plugin_updater_setup', $edd_plugin_data );
57
+
58
  // Set up hooks.
59
  $this->init();
60
 
121
 
122
  $_transient_data->response[ $this->name ] = $version_info;
123
 
124
+ // Make sure the plugin property is set to the plugin's name/location. See issue 1463 on Software Licensing's GitHub repo.
125
+ $_transient_data->response[ $this->name ]->plugin = $this->name;
126
+
127
  }
128
 
129
  $_transient_data->last_checked = time();
319
  $_data->icons = $this->convert_object_to_array( $_data->icons );
320
  }
321
 
322
+ // Convert contributors into an associative array, since we're getting an object, but Core expects an array.
323
+ if ( isset( $_data->contributors ) && ! is_array( $_data->contributors ) ) {
324
+ $_data->contributors = $this->convert_object_to_array( $_data->contributors );
325
+ }
326
+
327
+ if( ! isset( $_data->plugin ) ) {
328
+ $_data->plugin = $this->name;
329
+ }
330
+
331
  return $_data;
332
  }
333
 
346
  private function convert_object_to_array( $data ) {
347
  $new_data = array();
348
  foreach ( $data as $key => $value ) {
349
+ $new_data[ $key ] = is_object( $value ) ? $this->convert_object_to_array( $value ) : $value;
350
  }
351
 
352
  return $new_data;
383
  private function api_request( $_action, $_data ) {
384
 
385
  global $wp_version, $edd_plugin_url_available;
386
+
387
+ $verify_ssl = $this->verify_ssl();
388
+
389
  // Do a quick status check on this domain if we haven't already checked it.
390
  $store_hash = md5( $this->api_url );
391
  if ( ! is_array( $edd_plugin_url_available ) || ! isset( $edd_plugin_url_available[ $store_hash ] ) ) {
399
  $edd_plugin_url_available[ $store_hash ] = false;
400
  } else {
401
  $test_url = $scheme . '://' . $host . $port;
402
+ $response = wp_remote_get( $test_url, array( 'timeout' => $this->health_check_timeout, 'sslverify' => $verify_ssl ) );
403
  $edd_plugin_url_available[ $store_hash ] = is_wp_error( $response ) ? false : true;
404
  }
405
  }
430
  'beta' => ! empty( $data['beta'] ),
431
  );
432
 
 
433
  $request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => $verify_ssl, 'body' => $api_params ) );
434
 
435
  if ( ! is_wp_error( $request ) ) {
445
  if ( $request && isset( $request->banners ) ) {
446
  $request->banners = maybe_unserialize( $request->banners );
447
  }
448
+
449
  if ( $request && isset( $request->icons ) ) {
450
  $request->icons = maybe_unserialize( $request->icons );
451
+ }
452
 
453
  if( ! empty( $request->sections ) ) {
454
  foreach( $request->sections as $key => $section ) {
classes/ad-health-notices.php CHANGED
@@ -316,6 +316,11 @@ class Advanced_Ads_Ad_Health_Notices {
316
  $notices[ $notice_key ]['orig_key'] = $orig_notice_key;
317
  }
318
 
 
 
 
 
 
319
  // add current time – we store localized time including the offset set in WP.
320
  $notices[ $notice_key ]['time'] = current_time( 'timestamp', 0 );
321
 
@@ -357,11 +362,18 @@ class Advanced_Ads_Ad_Health_Notices {
357
 
358
  // just in case, get notices again.
359
  $notices = $this->notices;
 
 
 
 
 
360
  }
361
 
362
- // add more text.
363
- if ( ! empty( $atts['append_text'] ) ) {
364
- $notices[ $notice_key ]['append_text'] = isset( $notices[ $notice_key ]['append_text'] ) ? $notices[ $notice_key ]['append_text'] . $atts['append_text'] : $atts['append_text'];
 
 
365
  }
366
 
367
  // update db.
@@ -590,7 +602,7 @@ class Advanced_Ads_Ad_Health_Notices {
590
  */
591
  public function update_options( array $options ) {
592
  // do not allow to clear options.
593
- if ( $options === array() ) {
594
  return;
595
  }
596
 
316
  $notices[ $notice_key ]['orig_key'] = $orig_notice_key;
317
  }
318
 
319
+ // add more text.
320
+ if ( ! empty( $atts['append_text'] ) ) {
321
+ $notices[ $notice_key ]['append_text'] = esc_attr( $atts['append_text'] );
322
+ }
323
+
324
  // add current time – we store localized time including the offset set in WP.
325
  $notices[ $notice_key ]['time'] = current_time( 'timestamp', 0 );
326
 
362
 
363
  // just in case, get notices again.
364
  $notices = $this->notices;
365
+ } else {
366
+ // add more text if this is an update.
367
+ if ( ! empty( $atts['append_text'] ) ) {
368
+ $notices[ $notice_key ]['append_text'] = isset( $notices[ $notice_key ]['append_text'] ) ? $notices[ $notice_key ]['append_text'] . $atts['append_text'] : $atts['append_text'];
369
+ }
370
  }
371
 
372
+ // cleanup due to an issue fixed after 1.13.3.
373
+ foreach ( $notices as $_key => $_notice ) {
374
+ if ( empty( $_key ) ) {
375
+ unset( $notices[ $_key ] );
376
+ }
377
  }
378
 
379
  // update db.
602
  */
603
  public function update_options( array $options ) {
604
  // do not allow to clear options.
605
+ if ( array() === $options ) {
606
  return;
607
  }
608
 
classes/ad_type_content.php CHANGED
@@ -73,7 +73,11 @@ class Advanced_Ads_Ad_Type_Content extends Advanced_Ads_Ad_Type_Abstract{
73
  'drag_drop_upload' => true
74
  );
75
  wp_editor( $content, 'advanced-ad-parameters-content', $args );
76
- } ?><br class="clear"/> <input type="hidden" name="advanced_ad[output][allow_shortcodes]" value="1" /><?php
 
 
 
 
77
  include ADVADS_BASE_PATH . 'admin/views/ad-info-after-textarea.php';
78
  }
79
 
73
  'drag_drop_upload' => true
74
  );
75
  wp_editor( $content, 'advanced-ad-parameters-content', $args );
76
+ }
77
+ ?>
78
+ <br class="clear"/>
79
+
80
+ <input type="hidden" name="advanced_ad[output][allow_shortcodes]" value="1" /><?php
81
  include ADVADS_BASE_PATH . 'admin/views/ad-info-after-textarea.php';
82
  }
83
 
classes/ad_type_image.php CHANGED
@@ -63,7 +63,7 @@ class Advanced_Ads_Ad_Type_Image extends Advanced_Ads_Ad_Type_Abstract{
63
  if( ! defined( 'AAT_VERSION' )) : ?>
64
  <span class="label"><?php _e( 'URL', 'advanced-ads' ); ?></span>
65
  <div>
66
- <input type="text" name="advanced_ad[url]" id="advads-url" class="advads-ad-url" value="<?php echo $url; ?>" placeholder="<?php _e( 'Link to target site', 'advanced-ads' ); ?>" /></p>
67
  </div><hr/><?php
68
  endif;
69
  }
63
  if( ! defined( 'AAT_VERSION' )) : ?>
64
  <span class="label"><?php _e( 'URL', 'advanced-ads' ); ?></span>
65
  <div>
66
+ <input type="url" name="advanced_ad[url]" id="advads-url" class="advads-ad-url" value="<?php echo $url; ?>" placeholder="<?php _e( 'Link to target site', 'advanced-ads' ); ?>" /></p>
67
  </div><hr/><?php
68
  endif;
69
  }
classes/ad_type_plain.php CHANGED
@@ -53,7 +53,10 @@ class Advanced_Ads_Ad_Type_Plain extends Advanced_Ads_Ad_Type_Abstract{
53
  <textarea id="advads-ad-content-plain" cols="40" rows="10" name="advanced_ad[content]" onkeyup="Advanced_Ads_Admin.check_ad_source();"><?php echo esc_textarea( $content ); ?></textarea>
54
  <?php include ADVADS_BASE_PATH . 'admin/views/ad-info-after-textarea.php'; ?>
55
  <input type="hidden" name="advanced_ad[output][allow_php]" value="0"/>
56
- <?php $this->render_php_allow($ad);
 
 
 
57
  $this->render_shortcodes_allow( $ad );
58
  ?><script>jQuery( function() { Advanced_Ads_Admin.check_ad_source(); } );</script><?php
59
  }
53
  <textarea id="advads-ad-content-plain" cols="40" rows="10" name="advanced_ad[content]" onkeyup="Advanced_Ads_Admin.check_ad_source();"><?php echo esc_textarea( $content ); ?></textarea>
54
  <?php include ADVADS_BASE_PATH . 'admin/views/ad-info-after-textarea.php'; ?>
55
  <input type="hidden" name="advanced_ad[output][allow_php]" value="0"/>
56
+
57
+ <?php
58
+
59
+ $this->render_php_allow($ad);
60
  $this->render_shortcodes_allow( $ad );
61
  ?><script>jQuery( function() { Advanced_Ads_Admin.check_ad_source(); } );</script><?php
62
  }
classes/compatibility.php CHANGED
@@ -1,27 +1,39 @@
1
  <?php
 
2
  class Advanced_Ads_Compatibility {
3
  public function __construct() {
4
- // Elementor plugin
5
  if ( defined( 'ELEMENTOR_VERSION' ) ) {
6
- add_filter( 'advanced-ads-placement-content-injection-xpath', array( $this, 'content_injection_elementor' ), 10, 1 );
 
 
 
 
 
 
 
7
  }
8
  if ( defined( 'WP_ROCKET_VERSION' ) ) {
9
  add_filter( 'rocket_excluded_inline_js_content', array( $this, 'exclude_inline_js' ) );
10
  }
 
 
11
  }
12
 
13
  /**
14
  * Modify xPath expression for Elementor plugin.
15
  * The plugin does not wrap newly created text in 'p' tags.
16
  *
17
- * @param str $tag
 
18
  * @return xPath expression
19
  */
20
  public function content_injection_elementor( $tag ) {
21
- if ( $tag === 'p' ) {
22
  // 'p' or 'div.elementor-widget-text-editor' without nested 'p'
23
  $tag = "*[self::p or self::div[@class and contains(concat(' ', normalize-space(@class), ' '), ' elementor-widget-text-editor ') and not(descendant::p)]]";
24
  }
 
25
  return $tag;
26
  }
27
 
@@ -31,9 +43,51 @@ class Advanced_Ads_Compatibility {
31
  * the code that depends on this function into the footer.
32
  *
33
  * @param array $pattern Patterns to match in inline JS content.
 
 
34
  */
35
- function exclude_inline_js( $pattern ) {
36
  $pattern[] = 'advanced_ads_ready';
 
37
  return $pattern;
38
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  }
1
  <?php
2
+
3
  class Advanced_Ads_Compatibility {
4
  public function __construct() {
5
+ // Elementor plugin.
6
  if ( defined( 'ELEMENTOR_VERSION' ) ) {
7
+ add_filter( 'advanced-ads-placement-content-injection-xpath',
8
+ array(
9
+ $this,
10
+ 'content_injection_elementor',
11
+ ),
12
+ 10,
13
+ 1
14
+ );
15
  }
16
  if ( defined( 'WP_ROCKET_VERSION' ) ) {
17
  add_filter( 'rocket_excluded_inline_js_content', array( $this, 'exclude_inline_js' ) );
18
  }
19
+ // WPML.
20
+ add_filter( 'wpml_admin_language_switcher_active_languages', array( $this, 'wpml_language_switcher' ) );
21
  }
22
 
23
  /**
24
  * Modify xPath expression for Elementor plugin.
25
  * The plugin does not wrap newly created text in 'p' tags.
26
  *
27
+ * @param str $tag xpath tag.
28
+ *
29
  * @return xPath expression
30
  */
31
  public function content_injection_elementor( $tag ) {
32
+ if ( 'p' === $tag ) {
33
  // 'p' or 'div.elementor-widget-text-editor' without nested 'p'
34
  $tag = "*[self::p or self::div[@class and contains(concat(' ', normalize-space(@class), ' '), ' elementor-widget-text-editor ') and not(descendant::p)]]";
35
  }
36
+
37
  return $tag;
38
  }
39
 
43
  * the code that depends on this function into the footer.
44
  *
45
  * @param array $pattern Patterns to match in inline JS content.
46
+ *
47
+ * @return array
48
  */
49
+ public function exclude_inline_js( $pattern ) {
50
  $pattern[] = 'advanced_ads_ready';
51
+
52
  return $pattern;
53
  }
54
+
55
+ /**
56
+ * Compatibility with WPML
57
+ * show only all languages in language switcher on Advanced Ads pages if ads and groups are translated
58
+ *
59
+ * @param array $active_languages languages that can be used in language switcher.
60
+ *
61
+ * @return array
62
+ */
63
+ public function wpml_language_switcher( $active_languages ) {
64
+ global $sitepress;
65
+ $screen = get_current_screen();
66
+ if ( ! isset( $screen->id ) ) {
67
+ return $active_languages;
68
+ }
69
+
70
+ switch ( $screen->id ) {
71
+ // check if we are on a group edit page and ad group translations are disabled.
72
+ case 'advanced-ads_page_advanced-ads-groups':
73
+ $translatable_taxonomies = $sitepress->get_translatable_taxonomies();
74
+ if ( ! is_array( $translatable_taxonomies ) || ! in_array( 'advanced_ads_groups', $translatable_taxonomies, true ) ) {
75
+ return array();
76
+ }
77
+ break;
78
+ // check if Advanced Ads ad post type is translatable.
79
+ case 'edit-advanced_ads': // overview page.
80
+ case 'advanced_ads': // edit page.
81
+ $translatable_documents = $sitepress->get_translatable_documents();
82
+ if ( empty( $translatable_documents['advanced_ads'] ) ) {
83
+ return array();
84
+ }
85
+ break;
86
+ // always show all languages on Placements page.
87
+ case 'advanced-ads_page_advanced-ads-placements':
88
+ return array();
89
+ }
90
+
91
+ return $active_languages;
92
+ }
93
  }
classes/frontend_checks.php CHANGED
@@ -541,7 +541,7 @@ class Advanced_Ads_Frontend_Checks {
541
  // The parent container is invisible.
542
  if( ! jQuery( this ).parent().is(':visible') ){
543
  advads_ad_health_check_adsense_hidden_ids.push( this.dataset.adSlot );
544
- advanced_ads_frontend_checks.add_item_to_notices( 'adsense_hidden', { mode: 'update', append_key: this.dataset.adSlot, append_text: ' ' + this.dataset.adSlot } );
545
  }
546
 
547
  // Zero width, perhaps because a parent container is floated
@@ -637,11 +637,13 @@ class Advanced_Ads_Frontend_Checks {
637
 
638
  // inform the user that AdSense Auto ads code was found
639
  function advads_highlight_adsense_auto_ads(){
640
- var auto_ads_pattern = /enable_page_level_ads: true/m
641
- if (auto_ads_pattern.exec( jQuery('head').text() ) ){
642
- var advads_autoads_code_link = document.querySelector( '#wp-admin-bar-advanced_ads_ad_health_auto_ads_found' );
643
- advads_autoads_code_link.className = advads_autoads_code_link.className.replace( 'hidden', '' );
644
- }
 
 
645
  }
646
  <?php endif;
647
  /**
541
  // The parent container is invisible.
542
  if( ! jQuery( this ).parent().is(':visible') ){
543
  advads_ad_health_check_adsense_hidden_ids.push( this.dataset.adSlot );
544
+ advanced_ads_frontend_checks.add_item_to_notices( 'adsense_hidden', { mode: 'add', append_key: this.dataset.adSlot, append_text: ' AdSense ID: ' + this.dataset.adSlot + ' URL: ' + window.location + ', ' + jQuery( document ).width() + 'px' } );
545
  }
546
 
547
  // Zero width, perhaps because a parent container is floated
637
 
638
  // inform the user that AdSense Auto ads code was found
639
  function advads_highlight_adsense_auto_ads(){
640
+ if ( window.jQuery ) {
641
+ var auto_ads_pattern = /enable_page_level_ads: true/m
642
+ if (auto_ads_pattern.exec(jQuery('head').text())) {
643
+ var advads_autoads_code_link = document.querySelector('#wp-admin-bar-advanced_ads_ad_health_auto_ads_found');
644
+ advads_autoads_code_link.className = advads_autoads_code_link.className.replace('hidden', '');
645
+ }
646
+ }
647
  }
648
  <?php endif;
649
  /**
classes/plugin.php CHANGED
@@ -710,7 +710,7 @@ class Advanced_Ads_Plugin {
710
  static function support_url( $utm = '' ){
711
 
712
  // return self::any_activated_add_on() ? ADVADS_URL . 'support/' .$utm : 'https://wordpress.org/support/plugin/advanced-ads#new-post';
713
- $urm = empty( $utm ) ? '#utm_source=advanced-ads&utm_medium=link&utm_campaign=disable-support' : $utm;
714
  if( self::any_activated_add_on() ){
715
  $url = ADVADS_URL . 'support/' .$utm . '-with-addons';
716
  } else {
710
  static function support_url( $utm = '' ){
711
 
712
  // return self::any_activated_add_on() ? ADVADS_URL . 'support/' .$utm : 'https://wordpress.org/support/plugin/advanced-ads#new-post';
713
+ // $utm = empty( $utm ) ? '#utm_source=advanced-ads&utm_medium=link&utm_campaign=disable-support' : $utm;
714
  if( self::any_activated_add_on() ){
715
  $url = ADVADS_URL . 'support/' .$utm . '-with-addons';
716
  } else {
includes/functions.php CHANGED
@@ -101,6 +101,7 @@ function advads_is_amp() {
101
 
102
  return ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() )
103
  || ( function_exists( 'is_wp_amp' ) && is_wp_amp() )
 
104
  || isset( $_GET [ 'wpamp' ] );
105
  }
106
 
101
 
102
  return ( function_exists( 'is_amp_endpoint' ) && is_amp_endpoint() )
103
  || ( function_exists( 'is_wp_amp' ) && is_wp_amp() )
104
+ || ( function_exists( 'ampforwp_is_amp_endpoint' ) && ampforwp_is_amp_endpoint() )
105
  || isset( $_GET [ 'wpamp' ] );
106
  }
107
 
languages/advanced-ads.pot CHANGED
@@ -3,7 +3,7 @@ msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Advanved Ads\n"
5
  "Report-Msgid-Bugs-To: http://wordpress.org/plugins/plugin-name\n"
6
- "POT-Creation-Date: 2019-03-12 10:03+0000\n"
7
  "POT-Revision-Date: Wed Jul 13 2016 13:23:05 GMT+0200 (CEST)\n"
8
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
9
  "Last-Translator: Thomas Maier <post@webzunft.de>\n"
@@ -117,15 +117,15 @@ msgid "Visitor Conditions"
117
  msgstr ""
118
 
119
  #: classes/ad-debug.php:272 classes/frontend_checks.php:235
120
- #: admin/includes/ad-health-notices.php:165
121
  msgid ""
122
  "Your website is using HTTPS, but the ad code contains HTTP and might not "
123
  "work."
124
  msgstr ""
125
 
126
  #. %1$s is an anchor (link) opening tag, %2$s is the closing tag.
127
- #: classes/ad-health-notices.php:749
128
- #: modules/gadsense/includes/class-mapi.php:1312
129
  #, php-format
130
  msgid "Learn more about AdSense account issues %1$shere%2$s."
131
  msgstr ""
@@ -312,31 +312,31 @@ msgstr ""
312
  msgid "Insert plain text or code into this field."
313
  msgstr ""
314
 
315
- #: classes/ad_type_plain.php:88
316
  msgid "Allow PHP"
317
  msgstr ""
318
 
319
- #: classes/ad_type_plain.php:90
320
  msgid "Execute PHP code (wrapped in <code>&lt;?php ?&gt;</code>)"
321
  msgstr ""
322
 
323
- #: classes/ad_type_plain.php:91
324
  msgid "No PHP tag detected in your code."
325
  msgstr ""
326
 
327
- #: classes/ad_type_plain.php:91 classes/ad_type_plain.php:106
328
  msgid "Uncheck this checkbox for improved performance."
329
  msgstr ""
330
 
331
- #: classes/ad_type_plain.php:102
332
  msgid "Allow shortcodes"
333
  msgstr ""
334
 
335
- #: classes/ad_type_plain.php:105
336
  msgid "Execute shortcodes"
337
  msgstr ""
338
 
339
- #: classes/ad_type_plain.php:106
340
  msgid "No shortcode detected in your code."
341
  msgstr ""
342
 
@@ -490,13 +490,13 @@ msgstr ""
490
  msgid "allow ads in RSS Feed"
491
  msgstr ""
492
 
493
- #: classes/EDD_SL_Plugin_Updater.php:216
494
  #, php-format
495
  msgid ""
496
  "There is a new version of %1$s available. %2$sView version %3$s details%4$s."
497
  msgstr ""
498
 
499
- #: classes/EDD_SL_Plugin_Updater.php:224
500
  #, php-format
501
  msgid ""
502
  "There is a new version of %1$s available. %2$sView version %3$s details%4$s "
@@ -575,11 +575,11 @@ msgstr ""
575
  msgid "Visible ads should not use the Header placement: %s"
576
  msgstr ""
577
 
578
- #: classes/frontend_checks.php:262 admin/includes/ad-health-notices.php:156
579
  msgid "AdSense violation"
580
  msgstr ""
581
 
582
- #: classes/frontend_checks.php:263 admin/includes/ad-health-notices.php:157
583
  msgid "Ad is hidden"
584
  msgstr ""
585
 
@@ -944,23 +944,28 @@ msgstr ""
944
  msgid "Ad expired"
945
  msgstr ""
946
 
947
- #: admin/includes/ad-health-notices.php:178
948
  #: admin/includes/class-overview-widgets.php:86
949
  #: admin/views/notices/welcome-panel.php:6
950
  msgid "Create your first ad"
951
  msgstr ""
952
 
953
- #: admin/includes/ad-health-notices.php:183
954
- #: admin/includes/ad-health-notices.php:190
955
  #: modules/gadsense/includes/class-mapi.php:90
956
  msgid "Last AdSense account connection attempt failed."
957
  msgstr ""
958
 
959
- #: admin/includes/ad-health-notices.php:199
960
  msgid ""
961
  "One of your sites is missing the AdSense publisher ID in the ads.txt file."
962
  msgstr ""
963
 
 
 
 
 
 
964
  #: admin/includes/class-ad-groups-list.php:165
965
  msgid "Ad weight"
966
  msgstr ""
@@ -1274,33 +1279,33 @@ msgstr ""
1274
  msgid "Video"
1275
  msgstr ""
1276
 
1277
- #: admin/includes/class-meta-box.php:260
1278
  msgid "Ad Settings"
1279
  msgstr ""
1280
 
1281
- #: admin/includes/class-meta-box.php:362 admin/views/overview.php:6
1282
  msgid "Ads Dashboard"
1283
  msgstr ""
1284
 
1285
- #: admin/includes/class-meta-box.php:373
1286
  #, php-format
1287
  msgid "%d ads – <a href=\"%s\">manage</a> - <a href=\"%s\">new</a>"
1288
  msgstr ""
1289
 
1290
- #: admin/includes/class-meta-box.php:384
1291
  msgid "Get the tutorial via email"
1292
  msgstr ""
1293
 
1294
- #: admin/includes/class-meta-box.php:391
1295
  msgid "Get AdSense tips via email"
1296
  msgstr ""
1297
 
1298
- #: admin/includes/class-meta-box.php:398
1299
  msgid "Visit our blog for more articles about ad optimization"
1300
  msgstr ""
1301
 
1302
  #. %s is our URL
1303
- #: admin/includes/class-meta-box.php:451
1304
  msgid "Latest posts on wpadvancedads.com"
1305
  msgstr ""
1306
 
@@ -3098,30 +3103,30 @@ msgstr ""
3098
  msgid "Ad blocker counter"
3099
  msgstr ""
3100
 
3101
- #: modules/ads-txt/admin/class-advanced-ads-ads-txt-admin.php:166
3102
  #, php-format
3103
  msgid ""
3104
  "The ads.txt file cannot be placed because the URL contains a subdirectory. "
3105
  "You need to make the file available at %s"
3106
  msgstr ""
3107
 
3108
- #: modules/ads-txt/admin/class-advanced-ads-ads-txt-admin.php:177
3109
  #, php-format
3110
  msgid "The file is available on %s."
3111
  msgstr ""
3112
 
3113
- #: modules/ads-txt/admin/class-advanced-ads-ads-txt-admin.php:181
3114
  msgid "The file was not created."
3115
  msgstr ""
3116
 
3117
- #: modules/ads-txt/admin/class-advanced-ads-ads-txt-admin.php:192
3118
  #: modules/ads-txt/admin/views/setting-additional-content.php:4
3119
  #, php-format
3120
  msgid "An error occured: %s."
3121
  msgstr ""
3122
 
3123
  #. %s the line that may need to be added manually
3124
- #: modules/ads-txt/admin/class-advanced-ads-ads-txt-admin.php:205
3125
  #, php-format
3126
  msgid ""
3127
  "If your site is located on a subdomain, you need to add the following line "
@@ -3286,23 +3291,73 @@ msgstr ""
3286
  msgid "Auto"
3287
  msgstr ""
3288
 
3289
- #: modules/gadsense/includes/class-mapi.php:465
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3290
  msgid ""
3291
  "It seems that some changes have been made in the Advanced Ads settings. "
3292
  "Please refresh this page."
3293
  msgstr ""
3294
 
3295
- #: modules/gadsense/includes/class-mapi.php:472
3296
  #, php-format
3297
  msgid ""
3298
  "Advanced Ads does not have access to your account (<code>%s</code>) anymore."
3299
  msgstr ""
3300
 
3301
- #: modules/gadsense/includes/class-mapi.php:962
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3302
  msgid "An error occurred while requesting account details."
3303
  msgstr ""
3304
 
3305
- #: modules/gadsense/includes/class-mapi.php:1281
3306
  #, php-format
3307
  msgid ""
3308
  "There are one or more warnings about the currently linked AdSense account. "
3
  msgstr ""
4
  "Project-Id-Version: Advanved Ads\n"
5
  "Report-Msgid-Bugs-To: http://wordpress.org/plugins/plugin-name\n"
6
+ "POT-Creation-Date: 2019-04-24 11:35+0000\n"
7
  "POT-Revision-Date: Wed Jul 13 2016 13:23:05 GMT+0200 (CEST)\n"
8
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
9
  "Last-Translator: Thomas Maier <post@webzunft.de>\n"
117
  msgstr ""
118
 
119
  #: classes/ad-debug.php:272 classes/frontend_checks.php:235
120
+ #: admin/includes/ad-health-notices.php:167
121
  msgid ""
122
  "Your website is using HTTPS, but the ad code contains HTTP and might not "
123
  "work."
124
  msgstr ""
125
 
126
  #. %1$s is an anchor (link) opening tag, %2$s is the closing tag.
127
+ #: classes/ad-health-notices.php:768
128
+ #: modules/gadsense/includes/class-mapi.php:1362
129
  #, php-format
130
  msgid "Learn more about AdSense account issues %1$shere%2$s."
131
  msgstr ""
312
  msgid "Insert plain text or code into this field."
313
  msgstr ""
314
 
315
+ #: classes/ad_type_plain.php:91
316
  msgid "Allow PHP"
317
  msgstr ""
318
 
319
+ #: classes/ad_type_plain.php:93
320
  msgid "Execute PHP code (wrapped in <code>&lt;?php ?&gt;</code>)"
321
  msgstr ""
322
 
323
+ #: classes/ad_type_plain.php:94
324
  msgid "No PHP tag detected in your code."
325
  msgstr ""
326
 
327
+ #: classes/ad_type_plain.php:94 classes/ad_type_plain.php:109
328
  msgid "Uncheck this checkbox for improved performance."
329
  msgstr ""
330
 
331
+ #: classes/ad_type_plain.php:105
332
  msgid "Allow shortcodes"
333
  msgstr ""
334
 
335
+ #: classes/ad_type_plain.php:108
336
  msgid "Execute shortcodes"
337
  msgstr ""
338
 
339
+ #: classes/ad_type_plain.php:109
340
  msgid "No shortcode detected in your code."
341
  msgstr ""
342
 
490
  msgid "allow ads in RSS Feed"
491
  msgstr ""
492
 
493
+ #: classes/EDD_SL_Plugin_Updater.php:228
494
  #, php-format
495
  msgid ""
496
  "There is a new version of %1$s available. %2$sView version %3$s details%4$s."
497
  msgstr ""
498
 
499
+ #: classes/EDD_SL_Plugin_Updater.php:236
500
  #, php-format
501
  msgid ""
502
  "There is a new version of %1$s available. %2$sView version %3$s details%4$s "
575
  msgid "Visible ads should not use the Header placement: %s"
576
  msgstr ""
577
 
578
+ #: classes/frontend_checks.php:262 admin/includes/ad-health-notices.php:157
579
  msgid "AdSense violation"
580
  msgstr ""
581
 
582
+ #: classes/frontend_checks.php:263 admin/includes/ad-health-notices.php:158
583
  msgid "Ad is hidden"
584
  msgstr ""
585
 
944
  msgid "Ad expired"
945
  msgstr ""
946
 
947
+ #: admin/includes/ad-health-notices.php:181
948
  #: admin/includes/class-overview-widgets.php:86
949
  #: admin/views/notices/welcome-panel.php:6
950
  msgid "Create your first ad"
951
  msgstr ""
952
 
953
+ #: admin/includes/ad-health-notices.php:186
954
+ #: admin/includes/ad-health-notices.php:193
955
  #: modules/gadsense/includes/class-mapi.php:90
956
  msgid "Last AdSense account connection attempt failed."
957
  msgstr ""
958
 
959
+ #: admin/includes/ad-health-notices.php:203
960
  msgid ""
961
  "One of your sites is missing the AdSense publisher ID in the ads.txt file."
962
  msgstr ""
963
 
964
+ #: admin/includes/ad-health-notices.php:205
965
+ msgctxt "related to ads.txt file"
966
+ msgid "Create one now."
967
+ msgstr ""
968
+
969
  #: admin/includes/class-ad-groups-list.php:165
970
  msgid "Ad weight"
971
  msgstr ""
1279
  msgid "Video"
1280
  msgstr ""
1281
 
1282
+ #: admin/includes/class-meta-box.php:271
1283
  msgid "Ad Settings"
1284
  msgstr ""
1285
 
1286
+ #: admin/includes/class-meta-box.php:373 admin/views/overview.php:6
1287
  msgid "Ads Dashboard"
1288
  msgstr ""
1289
 
1290
+ #: admin/includes/class-meta-box.php:384
1291
  #, php-format
1292
  msgid "%d ads – <a href=\"%s\">manage</a> - <a href=\"%s\">new</a>"
1293
  msgstr ""
1294
 
1295
+ #: admin/includes/class-meta-box.php:395
1296
  msgid "Get the tutorial via email"
1297
  msgstr ""
1298
 
1299
+ #: admin/includes/class-meta-box.php:402
1300
  msgid "Get AdSense tips via email"
1301
  msgstr ""
1302
 
1303
+ #: admin/includes/class-meta-box.php:409
1304
  msgid "Visit our blog for more articles about ad optimization"
1305
  msgstr ""
1306
 
1307
  #. %s is our URL
1308
+ #: admin/includes/class-meta-box.php:462
1309
  msgid "Latest posts on wpadvancedads.com"
1310
  msgstr ""
1311
 
3103
  msgid "Ad blocker counter"
3104
  msgstr ""
3105
 
3106
+ #: modules/ads-txt/admin/class-advanced-ads-ads-txt-admin.php:165
3107
  #, php-format
3108
  msgid ""
3109
  "The ads.txt file cannot be placed because the URL contains a subdirectory. "
3110
  "You need to make the file available at %s"
3111
  msgstr ""
3112
 
3113
+ #: modules/ads-txt/admin/class-advanced-ads-ads-txt-admin.php:176
3114
  #, php-format
3115
  msgid "The file is available on %s."
3116
  msgstr ""
3117
 
3118
+ #: modules/ads-txt/admin/class-advanced-ads-ads-txt-admin.php:180
3119
  msgid "The file was not created."
3120
  msgstr ""
3121
 
3122
+ #: modules/ads-txt/admin/class-advanced-ads-ads-txt-admin.php:191
3123
  #: modules/ads-txt/admin/views/setting-additional-content.php:4
3124
  #, php-format
3125
  msgid "An error occured: %s."
3126
  msgstr ""
3127
 
3128
  #. %s the line that may need to be added manually
3129
+ #: modules/ads-txt/admin/class-advanced-ads-ads-txt-admin.php:204
3130
  #, php-format
3131
  msgid ""
3132
  "If your site is located on a subdomain, you need to add the following line "
3291
  msgid "Auto"
3292
  msgstr ""
3293
 
3294
+ #: modules/gadsense/includes/class-mapi.php:339
3295
+ #, php-format
3296
+ msgid "Error while retrieving ad code for \"%s\"."
3297
+ msgstr ""
3298
+
3299
+ #: modules/gadsense/includes/class-mapi.php:361
3300
+ #, php-format
3301
+ msgid "Invalid response while retrieving ad code for \"%s\"."
3302
+ msgstr ""
3303
+
3304
+ #: modules/gadsense/includes/class-mapi.php:402
3305
+ #, php-format
3306
+ msgid "Error while retrieving adUnits list for \"%s\"."
3307
+ msgstr ""
3308
+
3309
+ #: modules/gadsense/includes/class-mapi.php:411
3310
+ #, php-format
3311
+ msgid "Invalid response while retrieving adUnits list for \"%s\"."
3312
+ msgstr ""
3313
+
3314
+ #. %1$s is the AdSense publisher ID; %2$s a starting a tag to the AdSense ad unit list and %3$s the closing link.
3315
+ #: modules/gadsense/includes/class-mapi.php:420
3316
+ #, php-format
3317
+ msgid ""
3318
+ "The account \"%1$s\" does not seem to have any ad units. Please create some "
3319
+ "%2$shere%3$s."
3320
+ msgstr ""
3321
+
3322
+ #: modules/gadsense/includes/class-mapi.php:482
3323
  msgid ""
3324
  "It seems that some changes have been made in the Advanced Ads settings. "
3325
  "Please refresh this page."
3326
  msgstr ""
3327
 
3328
+ #: modules/gadsense/includes/class-mapi.php:489
3329
  #, php-format
3330
  msgid ""
3331
  "Advanced Ads does not have access to your account (<code>%s</code>) anymore."
3332
  msgstr ""
3333
 
3334
+ #: modules/gadsense/includes/class-mapi.php:531
3335
+ #, php-format
3336
+ msgid "error while renewing access token for \"%s\""
3337
+ msgstr ""
3338
+
3339
+ #: modules/gadsense/includes/class-mapi.php:553
3340
+ #, php-format
3341
+ msgid "invalid response received while renewing access token for \"%s\""
3342
+ msgstr ""
3343
+
3344
+ #: modules/gadsense/includes/class-mapi.php:778
3345
+ msgid "Invalid response body while retrieving account alerts"
3346
+ msgstr ""
3347
+
3348
+ #: modules/gadsense/includes/class-mapi.php:787
3349
+ msgid "error while retrieving account alerts"
3350
+ msgstr ""
3351
+
3352
+ #: modules/gadsense/includes/class-mapi.php:941
3353
+ msgid "No token provided. Token data needed to get account details."
3354
+ msgstr ""
3355
+
3356
+ #: modules/gadsense/includes/class-mapi.php:1006
3357
  msgid "An error occurred while requesting account details."
3358
  msgstr ""
3359
 
3360
+ #: modules/gadsense/includes/class-mapi.php:1329
3361
  #, php-format
3362
  msgid ""
3363
  "There are one or more warnings about the currently linked AdSense account. "
modules/ads-txt/admin/views/setting-create.php CHANGED
@@ -1,4 +1,4 @@
1
- <div id="general_advads-ads-txt">
2
  <label title="<?php _e( 'enabled', 'advanced-ads' ); ?>">
3
  <input type="radio" name="advads-ads-txt-create" value="1" <?php checked( $is_enabled, true ); ?> />
4
  <?php _e( 'enabled', 'advanced-ads' ); ?>
1
+ <div id="advads-ads-txt">
2
  <label title="<?php _e( 'enabled', 'advanced-ads' ); ?>">
3
  <input type="radio" name="advads-ads-txt-create" value="1" <?php checked( $is_enabled, true ); ?> />
4
  <?php _e( 'enabled', 'advanced-ads' ); ?>
modules/ads-txt/includes/class-advanced-ads-ads-txt-utils.php CHANGED
@@ -71,6 +71,12 @@ class Advanced_Ads_Ads_Txt_Utils {
71
  return false;
72
  }
73
 
 
 
 
 
 
 
74
  // `http://www.one.two` will only be crawled if `http://one.two` redirects to it.
75
  // Check if such redirect exists.
76
  if ( 'www' === $host_parts[0] ) {
71
  return false;
72
  }
73
 
74
+ // Example: `one.com.au'.
75
+ $suffix_and_tld = implode( '.', array_slice( $host_parts, 1 ) );
76
+ if ( $suffix_and_tld == 'com.au' ) {
77
+ return false;
78
+ }
79
+
80
  // `http://www.one.two` will only be crawled if `http://one.two` redirects to it.
81
  // Check if such redirect exists.
82
  if ( 'www' === $host_parts[0] ) {
modules/gadsense/admin/views/adsense-account.php CHANGED
@@ -40,9 +40,9 @@ $alerts_advads_messages = Advanced_Ads_Adsense_MAPI::get_adsense_alert_messages(
40
  <ul>
41
  <?php foreach( $alerts['items'] as $alert_id => $alert ) : ?>
42
  <?php if ( isset( $alerts_advads_messages[ $alert['id'] ] ) ) : ?>
43
- <li><?php echo wp_kses( $alerts_advads_messages[ $alert['id'] ], array( 'a' => array( 'href' => true, 'target' => true ) ) ); ?>&nbsp;<a href="#" class="mapi-dismiss-alert" data-id="<?php echo esc_attr( $alert_id ); ?>"><?php echo esc_html( $alerts_dismiss ); ?></a></li>
44
  <?php else : ?>
45
- <li><?php echo wp_kses( $alert['message'], array( 'a' => array( 'href' => true, 'target' => true ) ) ); ?>&nbsp;<a href="#" class="mapi-dismiss-alert" data-id="<?php echo esc_attr( $alert_id ); ?>"><?php echo esc_html( $alerts_dismiss ); ?></a></li>
46
  <?php endif; ?>
47
  <?php endforeach; ?>
48
  </ul>
40
  <ul>
41
  <?php foreach( $alerts['items'] as $alert_id => $alert ) : ?>
42
  <?php if ( isset( $alerts_advads_messages[ $alert['id'] ] ) ) : ?>
43
+ <li><?php echo wp_kses( $alerts_advads_messages[ $alert['id'] ], array( 'a' => array( 'href' => true, 'target' => true, 'class' => true ) ) ); ?>&nbsp;<a href="#" class="mapi-dismiss-alert" data-id="<?php echo esc_attr( $alert_id ); ?>"><?php echo esc_html( $alerts_dismiss ); ?></a></li>
44
  <?php else : ?>
45
+ <li><?php echo wp_kses( $alert['message'], array( 'a' => array( 'href' => true, 'target' => true, 'class' => true ) ) ); ?>&nbsp;<a href="#" class="mapi-dismiss-alert" data-id="<?php echo esc_attr( $alert_id ); ?>"><?php echo esc_html( $alerts_dismiss ); ?></a></li>
46
  <?php endif; ?>
47
  <?php endforeach; ?>
48
  </ul>
modules/gadsense/includes/class-ad-type-adsense.php CHANGED
@@ -227,6 +227,18 @@ class Advanced_Ads_Ad_Type_Adsense extends Advanced_Ads_Ad_Type_Abstract {
227
  return $output;
228
  }
229
 
 
 
 
 
 
 
 
 
 
 
 
 
230
  protected function append_defaut_responsive_content(&$output, $pub_id, $content) {
231
  $format = '';
232
  $style = 'display:block;';
227
  return $output;
228
  }
229
 
230
+ /**
231
+ * Check if a string looks like an AdSense ad code.
232
+ *
233
+ * @param string $content The string that need to be checked.
234
+ *
235
+ * @return boolean
236
+ */
237
+ public static function content_is_adsense( $content = '' ) {
238
+ return false !== stripos( $content, 'googlesyndication.com' ) &&
239
+ ( false !== stripos( $content, 'google_ad_client' ) || false !== stripos( $content, 'data-ad-client' ) );
240
+ }
241
+
242
  protected function append_defaut_responsive_content(&$output, $pub_id, $content) {
243
  $format = '';
244
  $style = 'display:block;';
modules/gadsense/includes/class-mapi.php CHANGED
@@ -87,7 +87,7 @@ class Advanced_Ads_AdSense_MAPI {
87
  $health_class->add( 'adsense_connect_' . $mapi_options['connect_error']['reason'] );
88
  } else {
89
  $health_class->add( 'adsense_connect_' . $mapi_options['connect_error']['reason'], array(
90
- 'text' => __( 'Last AdSense account connection attempt failed.', 'advanced-ads' ) . ' ' . $mapi_options['connect_error']['message'],
91
  'type' => 'problem',
92
  ) );
93
  }
@@ -336,7 +336,7 @@ class Advanced_Ads_AdSense_MAPI {
336
  if ( is_wp_error( $response ) ) {
337
  return array(
338
  'status' => false,
339
- 'msg' => 'error while retrieving adUnits list',
340
  'raw' => $response->get_error_message(),
341
  );
342
  } else {
@@ -358,7 +358,7 @@ class Advanced_Ads_AdSense_MAPI {
358
  } else {
359
  return array(
360
  'status' => false,
361
- 'msg' => 'invalid response while retrieving adCode for ' . $adUnit,
362
  'raw' => $response['body'],
363
  );
364
  }
@@ -399,26 +399,40 @@ class Advanced_Ads_AdSense_MAPI {
399
  if ( is_wp_error( $response ) ) {
400
  return array(
401
  'status' => false,
402
- 'msg' => 'error while retrieving adUnits list for "' . $account . '"',
403
  'raw' => $response->get_error_message(),
404
  );
405
  } else {
406
  $adUnits = json_decode( $response['body'], true );
407
- if ( null === $adUnits || ! isset( $adUnits['items'] ) ) {
 
408
  return array(
409
  'status' => false,
410
- 'msg' => 'invalid response while retrieving adUnits list for "' . $account . '"',
411
  'raw' => $response['body'],
412
  );
413
- } else {
414
- $new_adUnits = array();
415
- foreach ( $adUnits['items'] as $item ) {
416
- $new_adUnits[ $item['id'] ] = $item;
417
- }
418
- $options['accounts'][ $account ]['ad_units'] = $new_adUnits;
419
- update_option( self::OPTNAME, $options );
420
- return true;
421
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
422
  }
423
  } else {
424
  // return the original error info
@@ -465,14 +479,14 @@ class Advanced_Ads_AdSense_MAPI {
465
  // There is another account connected.
466
  return array(
467
  'status' => false,
468
- 'msg' => sprintf( __( 'It seems that some changes have been made in the Advanced Ads settings. Please refresh this page.', 'advanced-ads' ), $account ),
469
  'reload' => true,
470
  );
471
  } else {
472
  // No account at all.
473
  return array(
474
  'status' => false,
475
- 'msg' => sprintf( __( 'Advanced Ads does not have access to your account (<code>%s</code>) anymore.', 'advanced-ads' ), $account ),
476
  'reload' => true,
477
  );
478
  }
@@ -514,7 +528,7 @@ class Advanced_Ads_AdSense_MAPI {
514
  if ( is_wp_error( $response ) ) {
515
  return array(
516
  'status' => false,
517
- 'msg' => 'error while renewing access token for "' . $account . '"',
518
  'raw' => $response->get_error_message(),
519
  );
520
  } else {
@@ -536,7 +550,7 @@ class Advanced_Ads_AdSense_MAPI {
536
  } else {
537
  return array(
538
  'status' => false,
539
- 'msg' => 'invalid response received while renewing access token for "' . $account . '"',
540
  'raw' => $response['body'],
541
  );
542
  }
@@ -761,7 +775,7 @@ class Advanced_Ads_AdSense_MAPI {
761
  } else {
762
  $results = array(
763
  'status' => false,
764
- 'msg' => 'invalid response body while retrieving account alerts',
765
  );
766
  header( 'Content-Type:application/json' );
767
  echo wp_json_encode( $results );
@@ -770,7 +784,7 @@ class Advanced_Ads_AdSense_MAPI {
770
  } else {
771
  $results = array(
772
  'status' => false,
773
- 'msg' => 'error while retrieving account alerts',
774
  'raw' => $response->get_error_message(),
775
  );
776
  header( 'Content-Type:application/json' );
@@ -924,7 +938,7 @@ class Advanced_Ads_AdSense_MAPI {
924
  echo json_encode(
925
  array(
926
  'status' => false,
927
- 'error_msg' => 'No token provided. Token data needed to get account details.',
928
  )
929
  );
930
  die;
@@ -989,7 +1003,7 @@ class Advanced_Ads_AdSense_MAPI {
989
  } else {
990
  if ( isset( $accounts['error'] ) ) {
991
 
992
- $msg = __( 'An error occurred while requesting account details.', 'advanced-ads' );
993
  if ( isset( $accounts['error']['message'] ) ) {
994
  $msg = $accounts['error']['message'];
995
  }
@@ -1311,7 +1325,10 @@ class Advanced_Ads_AdSense_MAPI {
1311
  }
1312
  if ( !empty( $alerts ) && !empty( $alerts['items'] ) ) {
1313
  $messages[] = sprintf(
1314
- __( 'There are one or more warnings about the currently linked AdSense account. You can view them <a href="%s">here</a>', 'advanced-ads' ),
 
 
 
1315
  esc_url( admin_url( 'admin.php?page=advanced-ads-settings#top#adsense' ) )
1316
  );
1317
  }
87
  $health_class->add( 'adsense_connect_' . $mapi_options['connect_error']['reason'] );
88
  } else {
89
  $health_class->add( 'adsense_connect_' . $mapi_options['connect_error']['reason'], array(
90
+ 'text' => esc_html__( 'Last AdSense account connection attempt failed.', 'advanced-ads' ) . ' ' . $mapi_options['connect_error']['message'],
91
  'type' => 'problem',
92
  ) );
93
  }
336
  if ( is_wp_error( $response ) ) {
337
  return array(
338
  'status' => false,
339
+ 'msg' => sprintf( esc_html__( 'Error while retrieving ad code for "%s".', 'advanced-ads' ), $adUnit ),
340
  'raw' => $response->get_error_message(),
341
  );
342
  } else {
358
  } else {
359
  return array(
360
  'status' => false,
361
+ 'msg' => sprintf( esc_html__( 'Invalid response while retrieving ad code for "%s".', 'advanced-ads' ), $adUnit ),
362
  'raw' => $response['body'],
363
  );
364
  }
399
  if ( is_wp_error( $response ) ) {
400
  return array(
401
  'status' => false,
402
+ 'msg' => sprintf( esc_html__( 'Error while retrieving adUnits list for "%s".', 'advanced-ads' ), $account ),
403
  'raw' => $response->get_error_message(),
404
  );
405
  } else {
406
  $adUnits = json_decode( $response['body'], true );
407
+
408
+ if ( null === $adUnits || ! isset( $adUnits['kind'] ) || 'adsense#adUnits' !== $adUnits['kind'] ) {
409
  return array(
410
  'status' => false,
411
+ 'msg' => sprintf( esc_html__( 'Invalid response while retrieving adUnits list for "%s".', 'advanced-ads' ), $account ),
412
  'raw' => $response['body'],
413
  );
414
+ } else {
415
+ if ( ! isset( $adUnits['items'] ) ) {
416
+ return array(
417
+ 'status' => false,
418
+ 'msg' => sprintf(
419
+ // translators: %1$s is the AdSense publisher ID; %2$s a starting a tag to the AdSense ad unit list and %3$s the closing link.
420
+ esc_html__( 'The account "%1$s" does not seem to have any ad units. Please create some %2$shere%3$s.', 'advanced-ads' ),
421
+ $account,
422
+ '<a href="https://www.google.com/adsense/new/u/0/'.$account.'/main/myads-viewall-adunits?product=SELF_SERVICE_CONTENT_ADS" target="_blank">',
423
+ '</a>' ),
424
+ 'raw' => $response['body'],
425
+ );
426
+ } else {
427
+ $new_adUnits = array();
428
+ foreach ( $adUnits['items'] as $item ) {
429
+ $new_adUnits[ $item['id'] ] = $item;
430
+ }
431
+ $options['accounts'][ $account ]['ad_units'] = $new_adUnits;
432
+ update_option( self::OPTNAME, $options );
433
+ return true;
434
+ }
435
+ }
436
  }
437
  } else {
438
  // return the original error info
479
  // There is another account connected.
480
  return array(
481
  'status' => false,
482
+ 'msg' => esc_html__( 'It seems that some changes have been made in the Advanced Ads settings. Please refresh this page.', 'advanced-ads' ),
483
  'reload' => true,
484
  );
485
  } else {
486
  // No account at all.
487
  return array(
488
  'status' => false,
489
+ 'msg' => wp_kses( sprintf( __( 'Advanced Ads does not have access to your account (<code>%s</code>) anymore.', 'advanced-ads' ), $account ), array( 'code' => true ) ),
490
  'reload' => true,
491
  );
492
  }
528
  if ( is_wp_error( $response ) ) {
529
  return array(
530
  'status' => false,
531
+ 'msg' => sprintf( esc_html__( 'error while renewing access token for "%s"', 'advanced-ads' ), $account ),
532
  'raw' => $response->get_error_message(),
533
  );
534
  } else {
550
  } else {
551
  return array(
552
  'status' => false,
553
+ 'msg' => sprintf( esc_html__( 'invalid response received while renewing access token for "%s"', 'advanced-ads' ), $account ),
554
  'raw' => $response['body'],
555
  );
556
  }
775
  } else {
776
  $results = array(
777
  'status' => false,
778
+ 'msg' => esc_html__( 'Invalid response body while retrieving account alerts', 'advanced-ads' ),
779
  );
780
  header( 'Content-Type:application/json' );
781
  echo wp_json_encode( $results );
784
  } else {
785
  $results = array(
786
  'status' => false,
787
+ 'msg' => esc_html__( 'error while retrieving account alerts', 'advanced-ads' ),
788
  'raw' => $response->get_error_message(),
789
  );
790
  header( 'Content-Type:application/json' );
938
  echo json_encode(
939
  array(
940
  'status' => false,
941
+ 'error_msg' => esc_html__( 'No token provided. Token data needed to get account details.', 'advanced-ads' ),
942
  )
943
  );
944
  die;
1003
  } else {
1004
  if ( isset( $accounts['error'] ) ) {
1005
 
1006
+ $msg = esc_html__( 'An error occurred while requesting account details.', 'advanced-ads' );
1007
  if ( isset( $accounts['error']['message'] ) ) {
1008
  $msg = $accounts['error']['message'];
1009
  }
1325
  }
1326
  if ( !empty( $alerts ) && !empty( $alerts['items'] ) ) {
1327
  $messages[] = sprintf(
1328
+ wp_kses(
1329
+ __( 'There are one or more warnings about the currently linked AdSense account. You can view them <a href="%s">here</a>', 'advanced-ads' ),
1330
+ array( 'a' => array( 'href' => true ) )
1331
+ ),
1332
  esc_url( admin_url( 'admin.php?page=advanced-ads-settings#top#adsense' ) )
1333
  );
1334
  }
public/assets/js/advanced.js CHANGED
@@ -1 +1 @@
1
- advads={supports_localstorage:function(){"use strict";try{return!(!window||void 0===window.localStorage)&&(window.localStorage.setItem("x","x"),window.localStorage.removeItem("x"),!0)}catch(e){return!1}},max_per_session:function(e,t){var o=1;if(void 0!==t&&0!==parseInt(t)||(t=1),this.cookie_exists(e)){if(this.get_cookie(e)>=t)return!0;o+=parseInt(this.get_cookie(e))}return this.set_cookie(e,o),!1},count_up:function(e,t){var o=1;this.cookie_exists(e)&&(o+=parseInt(this.get_cookie(e))),this.set_cookie(e,o)},set_cookie_exists:function(e){return!!get_cookie(e)||(set_cookie(e,"",0),!1)},get_cookie:function(e){var t,o,n,i=document.cookie.split(";");for(t=0;t<i.length;t++)if(o=i[t].substr(0,i[t].indexOf("=")),n=i[t].substr(i[t].indexOf("=")+1),(o=o.replace(/^\s+|\s+$/g,""))===e)return unescape(n)},set_cookie:function(e,t,o,n,i,s){var r=null==o?null:24*o*60*60;this.set_cookie_sec(e,t,r,n,i,s)},set_cookie_sec:function(e,t,o,n,i,s){var r=new Date;r.setSeconds(r.getSeconds()+parseInt(o)),document.cookie=e+"="+escape(t)+(null==o?"":"; expires="+r.toUTCString())+(null==n?"; path=/":"; path="+n)+(null==i?"":"; domain="+i)+(null==s?"":"; secure")},cookie_exists:function(e){var t=this.get_cookie(e);return null!==t&&""!==t&&void 0!==t},move:function(e,t,o){var n=jQuery(e),i=t;if(void 0===o&&(o={}),void 0===o.css&&(o.css={}),void 0===o.method&&(o.method="prependTo"),""===t&&void 0!==o.target)switch(o.target){case"wrapper":var s="left";void 0!==o.offset&&(s=o.offset),t=this.find_wrapper(e,s)}switch(void 0===o.moveintohidden&&(t=jQuery(t).filter(":visible")),1<t.length&&console.log("Advanced Ads: element '"+i+"' found "+t.length+" times."),o.method){case"insertBefore":n.insertBefore(t);break;case"insertAfter":n.insertAfter(t);break;case"appendTo":n.appendTo(t);break;case"prependTo":n.prependTo(t);break;default:n.prependTo(t)}},set_parent_relative:function(e,t){t=void 0!==t?t:{};var o=jQuery(e).parent();t.use_grandparent&&(o=o.parent()),"static"!==o.css("position")&&""!==o.css("position")||o.css("position","relative")},fix_element:function(e,t){t=void 0!==t?t:{};var o=jQuery(e);t.use_grandparent?this.set_parent_relative(o.parent()):this.set_parent_relative(o),t.is_invisible&&o.show();var n=parseInt(o.offset().top),i=parseInt(o.offset().left);t.is_invisible&&o.hide(),o.css("position","fixed").css("top",n+"px").css("left",i+"px").css("right","")},find_wrapper:function(n,i){var s;return jQuery("body").children().each(function(e,t){if(t.id!==n.substring(1)){var o=jQuery(t);if("right"===i&&o.offset().left+jQuery(o).width()<jQuery(window).width()||"left"===i&&0<o.offset().left)return"static"!==o.css("position")&&""!==o.css("position")||o.css("position","relative"),s=t,!1}}),s},center_fixed_element:function(e){var t=jQuery(e),o=jQuery(window).width()/2-parseInt(t.css("width"))/2;t.css("left",o+"px")},center_vertically:function(e){var t=jQuery(e),o=jQuery(window).height()/2-parseInt(t.css("height"))/2;"fixed"!==t.css("position")&&(o-=topoffset=parseInt(t.offset().top)),t.css("top",o+"px")},close:function(e){jQuery(e).remove()},wait_for_images:function(i,s){var r=0,a=[];i.find('img[src][src!=""]').each(function(){a.push(this.src)}),0===a.length&&s.call(i),jQuery.each(a,function(e,t){var o=new Image;o.src=t;var n="load error";jQuery(o).one(n,function e(t){if(jQuery(this).off(n,e),++r==a.length)return s.call(i[0]),!1})})},privacy:{get_state:function(){if(!window.advads_options||!window.advads_options.privacy)return"not_needed";var e=window.advads_options.privacy;if(!e.enabled)return"not_needed";var t=e["consent-method"]?e["consent-method"]:"0";switch(t){case"0":return"not_needed";case"custom":if(e[!1]||void 0===e["custom-cookie-value"])return"not_needed";var o=advads.get_cookie(e["custom-cookie-name"]);return"string"!=typeof o?"unknown":""===e["custom-cookie-value"]&&""===o||""!==e["custom-cookie-value"]&&-1!==o.indexOf(e["custom-cookie-value"])?"accepted":"unknown";default:return advads.cookie_exists(t)?"accepted":"unknown"}},is_adsense_npa_enabled:function(){return!window.advads_options||!window.advads_options.privacy||!!window.advads_options.privacy["show-non-personalized-adsense"]}}},jQuery(document).ready(function(){if(advads.supports_localstorage()&&localStorage.getItem("advads_frontend_picker")){var s,r=jQuery("<div id='advads-picker-overlay'>"),a=[document.body,document.documentElement,document];r.css({position:"absolute",border:"solid 2px #428bca",backgroundColor:"rgba(66,139,202,0.5)",boxSizing:"border-box",zIndex:1e6,pointerEvents:"none"}).prependTo("body"),jQuery(document).mousemove(function(e){if(e.target!==s){if(~a.indexOf(e.target))return s=null,void r.hide();var t=jQuery(e.target),o=t.offset(),n=t.outerWidth(),i=t.outerHeight();s=e.target,r.css({top:o.top,left:o.left,width:n,height:i}).show(),console.log(jQuery(s).getPath())}}),jQuery(document).click(function(e){var t=jQuery(s).getPath();localStorage.setItem("advads_frontend_element",t),window.location=localStorage.getItem("advads_prev_url")})}}),jQuery.fn.extend({getPath:function(e,t){if(void 0===e&&(e=""),void 0===t&&(t=0),this.is("html"))return"html > "+e;if(3===t)return e;var o=this.get(0).nodeName.toLowerCase(),n=this.attr("id"),i=this.attr("class");return t+=1,void 0===n||/\d/.test(n)?void 0!==i&&(i=i.split(/[\s\n]+/),(i=jQuery.grep(i,function(e,t){return!/\d/.test(e)})).length&&(o+="."+i.slice(0,2).join("."))):o+="#"+n,this.siblings(o).length&&(o+=":eq("+this.siblings(o).addBack().not("#advads-picker-overlay").index(this)+")"),""===e?this.parent().getPath(o,t):this.parent().getPath(o+" > "+e,t)}});
1
+ advads={supports_localstorage:function(){"use strict";try{if(!window||window.localStorage===undefined){return false}window.localStorage.setItem("x","x");window.localStorage.removeItem("x");return true}catch(e){return false}},max_per_session:function(name,max){var num=1;if(max===undefined||parseInt(max)===0){max=1}if(this.cookie_exists(name)){if(this.get_cookie(name)>=max){return true}num=num+parseInt(this.get_cookie(name))}this.set_cookie(name,num);return false},count_up:function(name,exdays){var num=1;if(this.cookie_exists(name)){num=num+parseInt(this.get_cookie(name))}this.set_cookie(name,num)},set_cookie_exists:function(name){if(get_cookie(name)){return true}set_cookie(name,"",0);return false},get_cookie:function(name){var i,x,y,ADVcookies=document.cookie.split(";");for(i=0;i<ADVcookies.length;i++){x=ADVcookies[i].substr(0,ADVcookies[i].indexOf("="));y=ADVcookies[i].substr(ADVcookies[i].indexOf("=")+1);x=x.replace(/^\s+|\s+$/g,"");if(x===name){return unescape(y)}}},set_cookie:function(name,value,exdays,path,domain,secure){var expiry=exdays==null?null:exdays*24*60*60;this.set_cookie_sec(name,value,expiry,path,domain,secure)},set_cookie_sec:function(name,value,expiry,path,domain,secure){var exdate=new Date;exdate.setSeconds(exdate.getSeconds()+parseInt(expiry));document.cookie=name+"="+escape(value)+(expiry==null?"":"; expires="+exdate.toUTCString())+(path==null?"; path=/":"; path="+path)+(domain==null?"":"; domain="+domain)+(secure==null?"":"; secure")},cookie_exists:function(name){var c_value=this.get_cookie(name);if(c_value!==null&&c_value!==""&&c_value!==undefined){return true}return false},move:function(element,target,options){var el=jQuery(element);var target_string=target;if(typeof options==="undefined"){options={}}if(typeof options.css==="undefined"){options.css={}}if(typeof options.method==="undefined"){options.method="prependTo"}if(target===""&&typeof options.target!=="undefined"){switch(options.target){case"wrapper":var offset="left";if(typeof options.offset!=="undefined"){offset=options.offset}target=this.find_wrapper(element,offset);break}}if(typeof options.moveintohidden==="undefined"){target=jQuery(target).filter(":visible")}if(target.length>1){console.log("Advanced Ads: element '"+target_string+"' found "+target.length+" times.")}switch(options.method){case"insertBefore":el.insertBefore(target);break;case"insertAfter":el.insertAfter(target);break;case"appendTo":el.appendTo(target);break;case"prependTo":el.prependTo(target);break;default:el.prependTo(target)}},set_parent_relative:function(element,options){var options=typeof options!=="undefined"?options:{};var el=jQuery(element);var parent=el.parent();if(options.use_grandparent){parent=parent.parent()}if(parent.css("position")==="static"||parent.css("position")===""){parent.css("position","relative")}},fix_element:function(element,options){var options=typeof options!=="undefined"?options:{};var el=jQuery(element);if(options.use_grandparent){this.set_parent_relative(el.parent())}else{this.set_parent_relative(el)}if(options.is_invisible){el.show()}var topoffset=parseInt(el.offset().top);var leftoffset=parseInt(el.offset().left);if(options.is_invisible){el.hide()}if("left"===options.offset){var rightoffset=jQuery(window).width()-leftoffset-el.outerWidth();el.css("position","fixed").css("top",topoffset+"px").css("right",rightoffset+"px").css("left","")}else{el.css("position","fixed").css("top",topoffset+"px").css("left",leftoffset+"px").css("right","")}},find_wrapper:function(element,offset){var returnValue;jQuery("body").children().each(function(key,value){if(value.id!==element.substring(1)){var checkedelement=jQuery(value);if(offset==="right"&&checkedelement.offset().left+jQuery(checkedelement).width()<jQuery(window).width()||offset==="left"&&checkedelement.offset().left>0){if(checkedelement.css("position")==="static"||checkedelement.css("position")===""){checkedelement.css("position","relative")}returnValue=value;return false}}});return returnValue},center_fixed_element:function(element){var el=jQuery(element);var left=jQuery(window).width()/2-parseInt(el.css("width"))/2;el.css("left",left+"px")},center_vertically:function(element){var el=jQuery(element);var left=jQuery(window).height()/2-parseInt(el.css("height"))/2;if(el.css("position")!=="fixed"){left-=topoffset=parseInt(el.offset().top)}el.css("top",left+"px")},close:function(element){var wrapper=jQuery(element);wrapper.remove()},wait_for_images:function($el,ready_callback){var loaded_count=0;var srcs=[];$el.find('img[src][src!=""]').each(function(){srcs.push(this.src)});if(srcs.length===0){ready_callback.call($el)}jQuery.each(srcs,function(i,src){var image=new Image;image.src=src;var events="load error";jQuery(image).one(events,function me(event){jQuery(this).off(events,me);loaded_count++;if(loaded_count==srcs.length){ready_callback.call($el[0]);return false}})})},privacy:{get_state:function(){if(!window.advads_options||!window.advads_options.privacy){return"not_needed"}var options=window.advads_options.privacy;if(!options.enabled){return"not_needed"}var method=options["consent-method"]?options["consent-method"]:"0";switch(method){case"0":return"not_needed";break;case"custom":if(options["custom-cookie-value"===undefined]||options["custom-cookie-value"]===undefined){return"not_needed"}var found=advads.get_cookie(options["custom-cookie-name"]);if(typeof found!=="string"){return"unknown"}if(options["custom-cookie-value"]===""&&found===""||options["custom-cookie-value"]!==""&&found.indexOf(options["custom-cookie-value"])!==-1){return"accepted"}return"unknown";break;default:return advads.cookie_exists(method)?"accepted":"unknown"}},is_adsense_npa_enabled:function(){if(!window.advads_options||!window.advads_options.privacy){return true}var options=window.advads_options.privacy;return!!options["show-non-personalized-adsense"]}}};jQuery(document).ready(function(){if(advads.supports_localstorage()&&localStorage.getItem("advads_frontend_picker")){var advads_picker_cur,advads_picker_overlay=jQuery("<div id='advads-picker-overlay'>"),advads_picker_no=[document.body,document.documentElement,document];advads_picker_overlay.css({position:"absolute",border:"solid 2px #428bca",backgroundColor:"rgba(66,139,202,0.5)",boxSizing:"border-box",zIndex:1e6,pointerEvents:"none"}).prependTo("body");jQuery(document).mousemove(function(e){if(e.target===advads_picker_cur){return}if(~advads_picker_no.indexOf(e.target)){advads_picker_cur=null;advads_picker_overlay.hide();return}var target=jQuery(e.target),offset=target.offset(),width=target.outerWidth(),height=target.outerHeight();advads_picker_cur=e.target;advads_picker_overlay.css({top:offset.top,left:offset.left,width:width,height:height}).show();console.log(jQuery(advads_picker_cur).getPath())});jQuery(document).click(function(e){var path=jQuery(advads_picker_cur).getPath();localStorage.setItem("advads_frontend_element",path);window.location=localStorage.getItem("advads_prev_url")})}});jQuery.fn.extend({getPath:function(path,depth){if(typeof path==="undefined")path="";if(typeof depth==="undefined")depth=0;if(this.is("html")){return"html > "+path}else if(3===depth){return path}var cur=this.get(0).nodeName.toLowerCase();var el_id=this.attr("id"),el_class=this.attr("class");depth=depth+1;if(typeof el_id!=="undefined"&&!/\d/.test(el_id)){cur+="#"+el_id}else if(typeof el_class!=="undefined"){el_class=el_class.split(/[\s\n]+/);el_class=jQuery.grep(el_class,function(element,index){return!/\d/.test(element)});if(el_class.length){cur+="."+el_class.slice(0,2).join(".")}}if(this.siblings(cur).length){cur+=":eq("+this.siblings(cur).addBack().not("#advads-picker-overlay").index(this)+")"}if(path===""){return this.parent().getPath(cur,depth)}else{return this.parent().getPath(cur+" > "+path,depth)}}});
public/assets/js/advanced.orig.js CHANGED
@@ -249,9 +249,17 @@ advads = {
249
  if ( options.is_invisible ) {
250
  el.hide();
251
  }
252
- // reset "right" to prevent conflicts
253
- el.css('position', 'fixed').css('top', topoffset + 'px').css('left', leftoffset + 'px').css('right', '');
 
 
 
 
 
 
 
254
  },
 
255
  /**
256
  * find the main wrapper
257
  * either id or first of its class
249
  if ( options.is_invisible ) {
250
  el.hide();
251
  }
252
+ if ( 'left' === options.offset ) {
253
+ // Allow to scale the nested image down when it has `max-width: 100%` and touches the left edge of the viewport.
254
+ var rightoffset = jQuery( window ).width() - leftoffset - el.outerWidth();
255
+ el.css( 'position', 'fixed' ).css( 'top', topoffset + 'px' ).css( 'right', rightoffset + 'px' ).css( 'left', '' );
256
+ } else {
257
+ // reset "right" to prevent conflicts
258
+ el.css('position', 'fixed').css('top', topoffset + 'px').css('left', leftoffset + 'px').css('right', '');
259
+ }
260
+
261
  },
262
+
263
  /**
264
  * find the main wrapper
265
  * either id or first of its class
readme.txt CHANGED
@@ -1,11 +1,11 @@
1
  === Advanced Ads – Ad Manager & AdSense ===
2
- Contributors: webzunft
3
  Donate link:https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5RRRCEBGN3UT2
4
  Tags: ads, ad manager, ad rotation, adsense, banner
5
  Requires at least: 4.6
6
- Tested up to: 5.1
7
- Requires PHP: 5.4
8
- Stable tag: 1.13.3
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -45,7 +45,7 @@ Based on my experience as a publisher with millions of monthly served ads, I've
45
  choose between different ad types that enable you to:
46
 
47
  * insert ads content and banners from all ad and affiliate networks (e.g., Google AdSense, Chitika, Amazon, BuySellAds, Google Ad Manager, DoubleClick (DFP), Ezoic, media.net, Booking.com, Tradedoubler, Awin, Getyourguide, The Moneytizer...)
48
- * dedicated support for all types of Google AdSense ads, including AdSense text and diplay ads, native ads (AdSense In-article, AdSense In-feed, AdSense matched content), AdSense link units (standard and responsive), Google AdSense Auto ads, and AdSense Auto ads for AMP)
49
  * display images and image banners
50
  * create content-rich ads with the WordPress TinyMCE editor
51
  * create Amazon ads with the Rich Content ad type and the [Amazon Associates Link Builder](https://wordpress.org/plugins/amazon-associates-link-builder/) or insert contextual Amazon Native Shopping Ads
@@ -110,7 +110,7 @@ Amazing features of the most powerful and easy Google AdSense plugin.
110
  * unlimited Google AdSense ads banners
111
  * pull ad units directly from your Google AdSense account
112
  * change settings of your Google AdSense ads directly from your WordPress backend
113
- * supports all Google AdSense ad types, including Google AdSense display ads, AdSense link units, native ads like Google AdSense In-feed ads, Google AdSense In-article ads, Google AdSense matched content ads, Google AdSense Auto ads, and Google AdSense Auto ads for AMP
114
  * change type and sizes of an ad without going into your Google AdSense account
115
  * hide Google AdSense advertisements on 404 pages by default (to comply with Google AdSense terms)
116
  * insert Google AdSense code for verification and AdSense Auto Ads (previously called Page-Level ads and QuickStart)
@@ -141,7 +141,7 @@ Learn more on the [plugin homepage](https://wpadvancedads.com).
141
 
142
  Thank you for motivating us with your [positive review](https://wordpress.org/support/plugin/advanced-ads/reviews/?rate=5#new-post).
143
 
144
- Localizations: Czech, Dutch, English, French, German, Italian, Japanese, Norwegian, Portuguese, Slovak, Spanish, Turkish, Vietnamese, Polish
145
 
146
  > <strong>Add-Ons</strong>
147
  >
@@ -288,6 +288,18 @@ Yes. Advanced Ads is based on WordPress standards and therefore easily customiza
288
 
289
  == Changelog ==
290
 
 
 
 
 
 
 
 
 
 
 
 
 
291
  = 1.13.3 =
292
 
293
  * added link to get help in some error notices
1
  === Advanced Ads – Ad Manager & AdSense ===
2
+ Contributors: webzunft, advancedads
3
  Donate link:https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5RRRCEBGN3UT2
4
  Tags: ads, ad manager, ad rotation, adsense, banner
5
  Requires at least: 4.6
6
+ Tested up to: 5.2
7
+ Requires PHP: 5.6
8
+ Stable tag: 1.13.4
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
45
  choose between different ad types that enable you to:
46
 
47
  * insert ads content and banners from all ad and affiliate networks (e.g., Google AdSense, Chitika, Amazon, BuySellAds, Google Ad Manager, DoubleClick (DFP), Ezoic, media.net, Booking.com, Tradedoubler, Awin, Getyourguide, The Moneytizer...)
48
+ * dedicated support for all types of Google AdSense ads, including text and diplay ads, native ads (In-article, In-feed, matched content), link units (standard and responsive), Auto ads, and Auto ads for AMP)
49
  * display images and image banners
50
  * create content-rich ads with the WordPress TinyMCE editor
51
  * create Amazon ads with the Rich Content ad type and the [Amazon Associates Link Builder](https://wordpress.org/plugins/amazon-associates-link-builder/) or insert contextual Amazon Native Shopping Ads
110
  * unlimited Google AdSense ads banners
111
  * pull ad units directly from your Google AdSense account
112
  * change settings of your Google AdSense ads directly from your WordPress backend
113
+ * supports all Google AdSense ad types, including Google AdSense display ads, link units, native ads like In-feed ads, In-article ads, matched content ads, Google AdSense Auto ads, and Google AdSense Auto ads for AMP
114
  * change type and sizes of an ad without going into your Google AdSense account
115
  * hide Google AdSense advertisements on 404 pages by default (to comply with Google AdSense terms)
116
  * insert Google AdSense code for verification and AdSense Auto Ads (previously called Page-Level ads and QuickStart)
141
 
142
  Thank you for motivating us with your [positive review](https://wordpress.org/support/plugin/advanced-ads/reviews/?rate=5#new-post).
143
 
144
+ Localizations: Czech, Dutch, English, French, German, Italian, Japanese, Norwegian, Portuguese, Slovak, Spanish, Turkish, Vietnamese, Polish, Chinese (Taiwan)
145
 
146
  > <strong>Add-Ons</strong>
147
  >
288
 
289
  == Changelog ==
290
 
291
+ = 1.13.4 =
292
+
293
+ * improved compatibility with WPML
294
+ * improved errors given when no ad units were found in the AdSense account
295
+ * improved UI when hiding ad health notices
296
+ * fixed issue when logging the AdSense Hidden problem
297
+ * fixed issue on ad filter list when two terms with the same slug exist
298
+ * fixed unlikely case of an SQL error on ad overview page
299
+ * fixed issue with Ad Health bar in frontend when jQuery was not found
300
+ * added a link to ads.txt settings from AdSense warning about missing ads.txt file
301
+ * removed unneeded ads.txt warning on com.au domains
302
+
303
  = 1.13.3 =
304
 
305
  * added link to get help in some error notices