Version Description
- prevented warning about missing ads.txt file when the file exists
- added a hint about solving ads.txt issue on WP Engine platform
- allow to translate Ad Label option if WPML String Translation is used
- fixed Ad Health notices showing also ignored issues when adding a new notice
- inject ads in the outermost
the_content
when they may have been injected in an innerthe_content
- added chain of nested
the_content
filters todebug.log
to allow reasoning about possible issues
Download this release
Release Info
Developer | webzunft |
Plugin | Advanced Ads |
Version | 1.13.8 |
Comparing to | |
See all releases |
Code changes from version 1.13.7 to 1.13.8
- admin/includes/ad-health-notices.php +12 -2
- admin/includes/class-list-filters.php +6 -5
- advanced-ads.php +2 -2
- classes/ad-health-notices.php +22 -9
- classes/frontend_checks.php +3 -1
- classes/plugin.php +2 -1
- languages/advanced-ads.pot +78 -71
- modules/ads-txt/admin/class-advanced-ads-ads-txt-admin.php +26 -2
- modules/gadsense/includes/class-mapi.php +27 -1
- public/class-advanced-ads.php +40 -1
- readme.txt +11 -2
- wpml-config.xml +9 -0
admin/includes/ad-health-notices.php
CHANGED
@@ -190,7 +190,7 @@ $advanced_ads_ad_health_notices = apply_filters( 'advanced-ads-ad-health-notices
|
|
190 |
'type' => 'problem',
|
191 |
'hide' => false,
|
192 |
),
|
193 |
-
// AdSense account alert.
|
194 |
'adsense_alert_ALERT_TYPE_ADS_TXT_UNAUTHORIZED' => array(
|
195 |
'text' => sprintf(
|
196 |
__( 'One of your sites is missing the AdSense publisher ID in the ads.txt file.', 'advanced-ads' )
|
@@ -199,6 +199,15 @@ $advanced_ads_ad_health_notices = apply_filters( 'advanced-ads-ad-health-notices
|
|
199 |
admin_url( 'admin.php?page=advanced-ads-settings#general__advads-ads-txt' )
|
200 |
) . ' ' . Advanced_Ads_Ad_Health_Notices::get_adsense_error_link( 'ALERT_TYPE_ADS_TXT_UNAUTHORIZED' ),
|
201 |
'type' => 'problem',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
),
|
203 |
'nested_the_content_filters' => array(
|
204 |
'text' => sprintf(
|
@@ -208,6 +217,7 @@ $advanced_ads_ad_health_notices = apply_filters( 'advanced-ads-ad-health-notices
|
|
208 |
) . ' ' . __( 'Advanced Ads uses the outermost of them.', 'advanced-ads' ),
|
209 |
'get_help_link' => ADVADS_URL . 'manual/ad-health/?utm_source=advanced-ads&utm_medium=link&utm_campaign=error-multiple-the-content#the_content_filter_found_multiple_times',
|
210 |
'type' => 'notice',
|
|
|
211 |
),
|
212 |
// BuddyPress installed.
|
213 |
'buddypress_no_pro' => array(
|
@@ -263,7 +273,7 @@ $advanced_ads_ad_health_notices = apply_filters( 'advanced-ads-ad-health-notices
|
|
263 |
'text' => sprintf(
|
264 |
// translators: %s is a service or plugin name.
|
265 |
'<strong>' . __( '%s detected.', 'advanced-ads' ) . '</strong>'
|
266 |
-
. ' <a href="' . ADVADS_URL . 'wp-engine-and-ads/#utm_source=advanced-
|
267 |
'WP Engine'
|
268 |
),
|
269 |
'type' => 'notice',
|
190 |
'type' => 'problem',
|
191 |
'hide' => false,
|
192 |
),
|
193 |
+
// AdSense account alert. Missing ads.txt – version 1.
|
194 |
'adsense_alert_ALERT_TYPE_ADS_TXT_UNAUTHORIZED' => array(
|
195 |
'text' => sprintf(
|
196 |
__( 'One of your sites is missing the AdSense publisher ID in the ads.txt file.', 'advanced-ads' )
|
199 |
admin_url( 'admin.php?page=advanced-ads-settings#general__advads-ads-txt' )
|
200 |
) . ' ' . Advanced_Ads_Ad_Health_Notices::get_adsense_error_link( 'ALERT_TYPE_ADS_TXT_UNAUTHORIZED' ),
|
201 |
'type' => 'problem',
|
202 |
+
), // AdSense account alert. . Missing ads.txt – version 2.
|
203 |
+
'adsense_alert_ADS_TXT_MISSING' => array(
|
204 |
+
'text' => sprintf(
|
205 |
+
__( 'One of your sites is missing the AdSense publisher ID in the ads.txt file.', 'advanced-ads' )
|
206 |
+
. ' <a class="advads-settings-link" href="%s">'
|
207 |
+
. _x( 'Create one now.', 'related to ads.txt file', 'advanced-ads' ) . '</a>',
|
208 |
+
admin_url( 'admin.php?page=advanced-ads-settings#general__advads-ads-txt' )
|
209 |
+
) . ' ' . Advanced_Ads_Ad_Health_Notices::get_adsense_error_link( 'ADS_TXT_MISSING' ),
|
210 |
+
'type' => 'problem',
|
211 |
),
|
212 |
'nested_the_content_filters' => array(
|
213 |
'text' => sprintf(
|
217 |
) . ' ' . __( 'Advanced Ads uses the outermost of them.', 'advanced-ads' ),
|
218 |
'get_help_link' => ADVADS_URL . 'manual/ad-health/?utm_source=advanced-ads&utm_medium=link&utm_campaign=error-multiple-the-content#the_content_filter_found_multiple_times',
|
219 |
'type' => 'notice',
|
220 |
+
'hide' => false,
|
221 |
),
|
222 |
// BuddyPress installed.
|
223 |
'buddypress_no_pro' => array(
|
273 |
'text' => sprintf(
|
274 |
// translators: %s is a service or plugin name.
|
275 |
'<strong>' . __( '%s detected.', 'advanced-ads' ) . '</strong>'
|
276 |
+
. ' <a href="' . ADVADS_URL . 'wp-engine-and-ads/#utm_source=advanced-ads&utm_medium=link&utm_campaign=notice-wpengine">' . __( 'Learn how this might impact your ad setup.', 'advanced-ads' ) . '</a>',
|
277 |
'WP Engine'
|
278 |
),
|
279 |
'type' => 'notice',
|
admin/includes/class-list-filters.php
CHANGED
@@ -105,15 +105,16 @@ class Advanced_Ads_Ad_List_Filters {
|
|
105 |
$ad_option = $this->all_ads_options[ $post->ID ];
|
106 |
|
107 |
/**
|
108 |
-
*
|
109 |
* add the group to the list of filterable groups
|
110 |
* skip when the group is already known
|
111 |
*/
|
112 |
foreach ( $groups_to_check as $key => $ads ) {
|
113 |
-
if( ! isset( $all_filters['all_groups'][ $key ] ) // skip if this group is already known
|
114 |
-
&& in_array( $post->ID, $ads, true )
|
|
|
115 |
$all_filters['all_groups'][ $key ] = $this->all_groups[ $key ]['name'];
|
116 |
-
// remove groups that are already selected for the filter
|
117 |
unset( $groups_to_check[ $key ] );
|
118 |
continue;
|
119 |
}
|
@@ -185,7 +186,7 @@ class Advanced_Ads_Ad_List_Filters {
|
|
185 |
|
186 |
$options = array();
|
187 |
foreach ( $meta_results as $_value ) {
|
188 |
-
$value =
|
189 |
$options[ $_value['post_id'] ] = $value;
|
190 |
}
|
191 |
|
105 |
$ad_option = $this->all_ads_options[ $post->ID ];
|
106 |
|
107 |
/**
|
108 |
+
* Check if this particular ad belongs to a group and if so,
|
109 |
* add the group to the list of filterable groups
|
110 |
* skip when the group is already known
|
111 |
*/
|
112 |
foreach ( $groups_to_check as $key => $ads ) {
|
113 |
+
if ( ! isset( $all_filters['all_groups'][ $key ] ) // skip if this group is already known.
|
114 |
+
&& in_array( $post->ID, $ads, true )
|
115 |
+
&& isset( $this->all_groups[ $key ] ) ) {
|
116 |
$all_filters['all_groups'][ $key ] = $this->all_groups[ $key ]['name'];
|
117 |
+
// remove groups that are already selected for the filter.
|
118 |
unset( $groups_to_check[ $key ] );
|
119 |
continue;
|
120 |
}
|
186 |
|
187 |
$options = array();
|
188 |
foreach ( $meta_results as $_value ) {
|
189 |
+
$value = maybe_unserialize( $_value['meta_value'] );
|
190 |
$options[ $_value['post_id'] ] = $value;
|
191 |
}
|
192 |
|
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.
|
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.
|
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.8
|
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.8' );
|
43 |
|
44 |
/*----------------------------------------------------------------------------*
|
45 |
* Autoloading, modules and functions
|
classes/ad-health-notices.php
CHANGED
@@ -336,7 +336,7 @@ class Advanced_Ads_Ad_Health_Notices {
|
|
336 |
}
|
337 |
|
338 |
$notice_key = esc_attr( $notice_key );
|
339 |
-
$options
|
340 |
|
341 |
// load notices from "queue".
|
342 |
$notices = isset( $options['notices'] ) ? $options['notices'] : array();
|
@@ -379,9 +379,14 @@ class Advanced_Ads_Ad_Health_Notices {
|
|
379 |
|
380 |
$this->last_saved_notice_key = $notice_key;
|
381 |
|
382 |
-
|
383 |
-
|
384 |
-
|
|
|
|
|
|
|
|
|
|
|
385 |
}
|
386 |
|
387 |
/**
|
@@ -402,7 +407,7 @@ class Advanced_Ads_Ad_Health_Notices {
|
|
402 |
|
403 |
// check if the notice already exists.
|
404 |
$notice_key = esc_attr( $notice_key );
|
405 |
-
$options
|
406 |
|
407 |
// load notices from "queue".
|
408 |
$notices = isset( $options['notices'] ) ? $options['notices'] : array();
|
@@ -427,8 +432,16 @@ class Advanced_Ads_Ad_Health_Notices {
|
|
427 |
}
|
428 |
|
429 |
// update db.
|
430 |
-
$options['notices'] = $
|
431 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
432 |
}
|
433 |
|
434 |
/**
|
@@ -479,8 +492,8 @@ class Advanced_Ads_Ad_Health_Notices {
|
|
479 |
// get notices from options.
|
480 |
$options_before = $options = $this->options();
|
481 |
if ( ! isset( $options['notices'] )
|
482 |
-
|
483 |
-
|
484 |
return;
|
485 |
}
|
486 |
|
336 |
}
|
337 |
|
338 |
$notice_key = esc_attr( $notice_key );
|
339 |
+
$options_before = $options = $this->options();
|
340 |
|
341 |
// load notices from "queue".
|
342 |
$notices = isset( $options['notices'] ) ? $options['notices'] : array();
|
379 |
|
380 |
$this->last_saved_notice_key = $notice_key;
|
381 |
|
382 |
+
$options['notices'] = $notices;
|
383 |
+
// update db if changed.
|
384 |
+
if ( $options_before !== $options ) {
|
385 |
+
$this->update_options( $options );
|
386 |
+
|
387 |
+
// update already registered notices.
|
388 |
+
$this->load_notices();
|
389 |
+
}
|
390 |
}
|
391 |
|
392 |
/**
|
407 |
|
408 |
// check if the notice already exists.
|
409 |
$notice_key = esc_attr( $notice_key );
|
410 |
+
$options_before = $options = $this->options();
|
411 |
|
412 |
// load notices from "queue".
|
413 |
$notices = isset( $options['notices'] ) ? $options['notices'] : array();
|
432 |
}
|
433 |
|
434 |
// update db.
|
435 |
+
$options['notices'] = $notices;
|
436 |
+
|
437 |
+
// update db if changed.
|
438 |
+
if ( $options_before !== $options ) {
|
439 |
+
$this->update_options( $options );
|
440 |
+
|
441 |
+
// update already registered notices.
|
442 |
+
$this->load_notices();
|
443 |
+
}
|
444 |
+
|
445 |
}
|
446 |
|
447 |
/**
|
492 |
// get notices from options.
|
493 |
$options_before = $options = $this->options();
|
494 |
if ( ! isset( $options['notices'] )
|
495 |
+
|| ! is_array( $options['notices'] )
|
496 |
+
|| ! isset( $options['notices'][ $notice_key ] ) ) {
|
497 |
return;
|
498 |
}
|
499 |
|
classes/frontend_checks.php
CHANGED
@@ -139,6 +139,7 @@ class Advanced_Ads_Frontend_Checks {
|
|
139 |
) );
|
140 |
}
|
141 |
|
|
|
142 |
if ( $this->has_many_the_content && $this->has_the_content_placements() ) {
|
143 |
$nodes[] = array( 'type' => 1, 'data' => array(
|
144 |
'parent' => 'advanced_ads_ad_health',
|
@@ -147,7 +148,7 @@ class Advanced_Ads_Frontend_Checks {
|
|
147 |
// translators: %s is a filter hook, here `the_content`
|
148 |
__( '<strong>%s</strong> filter found multiple times.', 'advanced-ads' ),
|
149 |
'the_content' ),
|
150 |
-
'href' =>
|
151 |
'meta' => array(
|
152 |
'class' => 'advanced_ads_ad_health_warning',
|
153 |
'target' => '_blank'
|
@@ -155,6 +156,7 @@ class Advanced_Ads_Frontend_Checks {
|
|
155 |
) );
|
156 |
Advanced_Ads_Ad_Health_Notices::get_instance()->add( 'nested_the_content_filters' );
|
157 |
}
|
|
|
158 |
|
159 |
if ( ! empty( $post->ID ) ) {
|
160 |
$ad_settings = get_post_meta( $post->ID, '_advads_ad_settings', true );
|
139 |
) );
|
140 |
}
|
141 |
|
142 |
+
/*
|
143 |
if ( $this->has_many_the_content && $this->has_the_content_placements() ) {
|
144 |
$nodes[] = array( 'type' => 1, 'data' => array(
|
145 |
'parent' => 'advanced_ads_ad_health',
|
148 |
// translators: %s is a filter hook, here `the_content`
|
149 |
__( '<strong>%s</strong> filter found multiple times.', 'advanced-ads' ),
|
150 |
'the_content' ),
|
151 |
+
'href' => ADVADS_URL . 'manual/ad-health/#the_content_filter_found_multiple_times',
|
152 |
'meta' => array(
|
153 |
'class' => 'advanced_ads_ad_health_warning',
|
154 |
'target' => '_blank'
|
156 |
) );
|
157 |
Advanced_Ads_Ad_Health_Notices::get_instance()->add( 'nested_the_content_filters' );
|
158 |
}
|
159 |
+
*/
|
160 |
|
161 |
if ( ! empty( $post->ID ) ) {
|
162 |
$ad_settings = get_post_meta( $post->ID, '_advads_ad_settings', true );
|
classes/plugin.php
CHANGED
@@ -427,7 +427,8 @@ class Advanced_Ads_Plugin {
|
|
427 |
* @todo parse default options
|
428 |
*/
|
429 |
public function options() {
|
430 |
-
|
|
|
431 |
$this->options = get_option( ADVADS_SLUG, array() );
|
432 |
}
|
433 |
|
427 |
* @todo parse default options
|
428 |
*/
|
429 |
public function options() {
|
430 |
+
// we can’t store options if WPML String Translations is enabled, or it would not translate the "Ad Label" option
|
431 |
+
if ( ! isset( $this->options ) || class_exists('WPML_ST_String') ) {
|
432 |
$this->options = get_option( ADVADS_SLUG, array() );
|
433 |
}
|
434 |
|
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-06-
|
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"
|
@@ -95,11 +95,11 @@ msgid "main query"
|
|
95 |
msgstr ""
|
96 |
|
97 |
#: classes/ad-debug.php:118 classes/ad-debug.php:167 classes/ad-debug.php:169
|
98 |
-
#: public/class-advanced-ads.php:
|
99 |
msgid "Ad"
|
100 |
msgstr ""
|
101 |
|
102 |
-
#: classes/ad-debug.php:121 public/class-advanced-ads.php:
|
103 |
msgctxt "ad group singular name"
|
104 |
msgid "Ad Group"
|
105 |
msgstr ""
|
@@ -116,7 +116,7 @@ msgstr ""
|
|
116 |
msgid "Visitor Conditions"
|
117 |
msgstr ""
|
118 |
|
119 |
-
#: classes/ad-debug.php:272 classes/frontend_checks.php:
|
120 |
#: admin/includes/ad-health-notices.php:164
|
121 |
msgid ""
|
122 |
"Your website is using HTTPS, but the ad code contains HTTP and might not "
|
@@ -124,8 +124,8 @@ msgid ""
|
|
124 |
msgstr ""
|
125 |
|
126 |
#. %1$s is an anchor (link) opening tag, %2$s is the closing tag.
|
127 |
-
#: classes/ad-health-notices.php:
|
128 |
-
#: modules/gadsense/includes/class-mapi.php:
|
129 |
#, php-format
|
130 |
msgid "Learn more about AdSense account issues %1$shere%2$s."
|
131 |
msgstr ""
|
@@ -541,99 +541,93 @@ msgstr ""
|
|
541 |
msgid "<em>%s</em> filter does not exist"
|
542 |
msgstr ""
|
543 |
|
544 |
-
|
545 |
-
#: classes/frontend_checks.php:148 admin/includes/ad-health-notices.php:206
|
546 |
-
#, php-format
|
547 |
-
msgid "<strong>%s</strong> filter found multiple times."
|
548 |
-
msgstr ""
|
549 |
-
|
550 |
-
#: classes/frontend_checks.php:166
|
551 |
msgid "Ads are disabled on this page"
|
552 |
msgstr ""
|
553 |
|
554 |
-
#: classes/frontend_checks.php:
|
555 |
msgid "Ads are disabled in the content of this page"
|
556 |
msgstr ""
|
557 |
|
558 |
-
#: classes/frontend_checks.php:
|
559 |
msgid "the current post ID is 0 "
|
560 |
msgstr ""
|
561 |
|
562 |
-
#: classes/frontend_checks.php:
|
563 |
msgid "Ads are disabled on all pages"
|
564 |
msgstr ""
|
565 |
|
566 |
-
#: classes/frontend_checks.php:
|
567 |
msgid "Ads are disabled on 404 pages"
|
568 |
msgstr ""
|
569 |
|
570 |
-
#: classes/frontend_checks.php:
|
571 |
msgid "Ads are disabled on non singular pages"
|
572 |
msgstr ""
|
573 |
|
574 |
-
#: classes/frontend_checks.php:
|
575 |
#, php-format
|
576 |
msgid "Ad IDs: %s"
|
577 |
msgstr ""
|
578 |
|
579 |
-
#: classes/frontend_checks.php:
|
580 |
#, php-format
|
581 |
msgid "Visible ads should not use the Header placement: %s"
|
582 |
msgstr ""
|
583 |
|
584 |
-
#: classes/frontend_checks.php:
|
585 |
msgid "AdSense violation"
|
586 |
msgstr ""
|
587 |
|
588 |
-
#: classes/frontend_checks.php:
|
589 |
msgid "Ad is hidden"
|
590 |
msgstr ""
|
591 |
|
592 |
-
#: classes/frontend_checks.php:
|
593 |
#, php-format
|
594 |
msgid "IDs: %s"
|
595 |
msgstr ""
|
596 |
|
597 |
-
#: classes/frontend_checks.php:
|
598 |
#, php-format
|
599 |
msgid "The following responsive AdSense ads are not showing up: %s"
|
600 |
msgstr ""
|
601 |
|
602 |
-
#: classes/frontend_checks.php:
|
603 |
msgid "Consent not given"
|
604 |
msgstr ""
|
605 |
|
606 |
-
#: classes/frontend_checks.php:
|
607 |
msgid "debug DFP ads"
|
608 |
msgstr ""
|
609 |
|
610 |
-
#: classes/frontend_checks.php:
|
611 |
msgid "highlight ads"
|
612 |
msgstr ""
|
613 |
|
614 |
-
#: classes/frontend_checks.php:
|
615 |
msgid "Auto ads code found"
|
616 |
msgstr ""
|
617 |
|
618 |
-
#: classes/frontend_checks.php:
|
619 |
msgid "Ad Health"
|
620 |
msgstr ""
|
621 |
|
622 |
-
#: classes/frontend_checks.php:
|
623 |
#, php-format
|
624 |
msgid "Show %d more notifications"
|
625 |
msgstr ""
|
626 |
|
627 |
-
#: classes/frontend_checks.php:
|
628 |
msgid "Everything is fine"
|
629 |
msgstr ""
|
630 |
|
631 |
-
#: classes/frontend_checks.php:
|
632 |
#: admin/views/notices/welcome-panel.php:20
|
633 |
msgid "Get help"
|
634 |
msgstr ""
|
635 |
|
636 |
-
#: classes/frontend_checks.php:
|
637 |
msgid ""
|
638 |
"the following code is used for automatic error detection and only visible to "
|
639 |
"admins"
|
@@ -712,7 +706,7 @@ msgstr ""
|
|
712 |
msgid "Ad Groups"
|
713 |
msgstr ""
|
714 |
|
715 |
-
#: classes/widget.php:93 public/class-advanced-ads.php:
|
716 |
#: admin/includes/class-menu.php:68 admin/includes/class-menu.php:68
|
717 |
#: admin/includes/class-shortcode-creator.php:84
|
718 |
#: admin/views/ad-group-list-form-row.php:90
|
@@ -749,70 +743,70 @@ msgstr ""
|
|
749 |
msgid "Individual Posts, Pages and Public Post Types"
|
750 |
msgstr ""
|
751 |
|
752 |
-
#: public/class-advanced-ads.php:
|
753 |
msgid "Advanced Ads Error following:"
|
754 |
msgstr ""
|
755 |
|
756 |
-
#: public/class-advanced-ads.php:
|
757 |
#, php-format
|
758 |
msgid "Advanced Ads Error: %s"
|
759 |
msgstr ""
|
760 |
|
761 |
-
#: public/class-advanced-ads.php:
|
762 |
msgctxt "ad group general name"
|
763 |
msgid "Ad Groups & Rotations"
|
764 |
msgstr ""
|
765 |
|
766 |
-
#: public/class-advanced-ads.php:
|
767 |
msgid "Search Ad Groups"
|
768 |
msgstr ""
|
769 |
|
770 |
-
#: public/class-advanced-ads.php:
|
771 |
msgid "All Ad Groups"
|
772 |
msgstr ""
|
773 |
|
774 |
-
#: public/class-advanced-ads.php:
|
775 |
msgid "Parent Ad Groups"
|
776 |
msgstr ""
|
777 |
|
778 |
-
#: public/class-advanced-ads.php:
|
779 |
msgid "Parent Ad Groups:"
|
780 |
msgstr ""
|
781 |
|
782 |
-
#: public/class-advanced-ads.php:
|
783 |
msgid "Edit Ad Group"
|
784 |
msgstr ""
|
785 |
|
786 |
-
#: public/class-advanced-ads.php:
|
787 |
msgid "Update Ad Group"
|
788 |
msgstr ""
|
789 |
|
790 |
-
#: public/class-advanced-ads.php:
|
791 |
msgid "Add New Ad Group"
|
792 |
msgstr ""
|
793 |
|
794 |
-
#: public/class-advanced-ads.php:
|
795 |
msgid "New Ad Groups Name"
|
796 |
msgstr ""
|
797 |
|
798 |
-
#: public/class-advanced-ads.php:
|
799 |
msgid "Groups"
|
800 |
msgstr ""
|
801 |
|
802 |
-
#: public/class-advanced-ads.php:
|
803 |
msgid "No Ad Group found"
|
804 |
msgstr ""
|
805 |
|
806 |
-
#: public/class-advanced-ads.php:
|
807 |
#: admin/includes/class-menu.php:85 admin/views/ad-group-list-ads.php:28
|
808 |
msgid "New Ad"
|
809 |
msgstr ""
|
810 |
|
811 |
-
#: public/class-advanced-ads.php:
|
812 |
msgid "Add New Ad"
|
813 |
msgstr ""
|
814 |
|
815 |
-
#: public/class-advanced-ads.php:
|
816 |
#: admin/includes/class-ad-groups-list.php:313
|
817 |
#: modules/import-export/classes/import.php:146
|
818 |
#: modules/import-export/classes/import.php:186
|
@@ -820,35 +814,35 @@ msgstr ""
|
|
820 |
msgid "Edit"
|
821 |
msgstr ""
|
822 |
|
823 |
-
#: public/class-advanced-ads.php:
|
824 |
msgid "Edit Ad"
|
825 |
msgstr ""
|
826 |
|
827 |
-
#: public/class-advanced-ads.php:
|
828 |
msgid "View"
|
829 |
msgstr ""
|
830 |
|
831 |
-
#: public/class-advanced-ads.php:
|
832 |
msgid "View the Ad"
|
833 |
msgstr ""
|
834 |
|
835 |
-
#: public/class-advanced-ads.php:
|
836 |
msgid "Search Ads"
|
837 |
msgstr ""
|
838 |
|
839 |
-
#: public/class-advanced-ads.php:
|
840 |
msgid "No Ads found"
|
841 |
msgstr ""
|
842 |
|
843 |
-
#: public/class-advanced-ads.php:
|
844 |
msgid "No Ads found in Trash"
|
845 |
msgstr ""
|
846 |
|
847 |
-
#: public/class-advanced-ads.php:
|
848 |
msgid "Parent Ad"
|
849 |
msgstr ""
|
850 |
|
851 |
-
#: public/class-advanced-ads.php:
|
852 |
msgctxt "label above ads"
|
853 |
msgid "Advertisements"
|
854 |
msgstr ""
|
@@ -948,35 +942,44 @@ msgid "Create a new AdSense account %1$shere%2$s."
|
|
948 |
msgstr ""
|
949 |
|
950 |
#: admin/includes/ad-health-notices.php:196
|
|
|
951 |
msgid ""
|
952 |
"One of your sites is missing the AdSense publisher ID in the ads.txt file."
|
953 |
msgstr ""
|
954 |
|
955 |
#: admin/includes/ad-health-notices.php:198
|
|
|
956 |
msgctxt "related to ads.txt file"
|
957 |
msgid "Create one now."
|
958 |
msgstr ""
|
959 |
|
960 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
961 |
msgid "Advanced Ads uses the outermost of them."
|
962 |
msgstr ""
|
963 |
|
964 |
#. %1$s is a plugin name, %2$s is the opening a tag and %3$s the closing one.
|
965 |
-
#: admin/includes/ad-health-notices.php:
|
966 |
-
#: admin/includes/ad-health-notices.php:
|
967 |
-
#: admin/includes/ad-health-notices.php:
|
968 |
-
#: admin/includes/ad-health-notices.php:
|
969 |
#, php-format
|
970 |
msgid "Learn how to integrate %1$s with Advanced Ads %2$shere%3$s."
|
971 |
msgstr ""
|
972 |
|
973 |
#. %s is a service or plugin name.
|
974 |
-
#: admin/includes/ad-health-notices.php:
|
|
|
975 |
#, php-format
|
976 |
msgid "%s detected."
|
977 |
msgstr ""
|
978 |
|
979 |
-
#: admin/includes/ad-health-notices.php:
|
980 |
msgid "Learn how this might impact your ad setup."
|
981 |
msgstr ""
|
982 |
|
@@ -3115,30 +3118,34 @@ msgstr ""
|
|
3115 |
msgid "Ad blocker counter"
|
3116 |
msgstr ""
|
3117 |
|
3118 |
-
#: modules/ads-txt/admin/class-advanced-ads-ads-txt-admin.php:
|
3119 |
#, php-format
|
3120 |
msgid ""
|
3121 |
"The ads.txt file cannot be placed because the URL contains a subdirectory. "
|
3122 |
"You need to make the file available at %s"
|
3123 |
msgstr ""
|
3124 |
|
3125 |
-
#: modules/ads-txt/admin/class-advanced-ads-ads-txt-admin.php:
|
3126 |
#, php-format
|
3127 |
msgid "The file is available on %s."
|
3128 |
msgstr ""
|
3129 |
|
3130 |
-
#: modules/ads-txt/admin/class-advanced-ads-ads-txt-admin.php:
|
3131 |
msgid "The file was not created."
|
3132 |
msgstr ""
|
3133 |
|
3134 |
-
#: modules/ads-txt/admin/class-advanced-ads-ads-txt-admin.php:
|
|
|
|
|
|
|
|
|
3135 |
#: modules/ads-txt/admin/views/setting-additional-content.php:4
|
3136 |
#, php-format
|
3137 |
msgid "An error occured: %s."
|
3138 |
msgstr ""
|
3139 |
|
3140 |
#. %s the line that may need to be added manually
|
3141 |
-
#: modules/ads-txt/admin/class-advanced-ads-ads-txt-admin.php:
|
3142 |
#, php-format
|
3143 |
msgid ""
|
3144 |
"If your site is located on a subdomain, you need to add the following line "
|
@@ -3369,7 +3376,7 @@ msgstr ""
|
|
3369 |
msgid "An error occurred while requesting account details."
|
3370 |
msgstr ""
|
3371 |
|
3372 |
-
#: modules/gadsense/includes/class-mapi.php:
|
3373 |
#, php-format
|
3374 |
msgid ""
|
3375 |
"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-06-25 10:44+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"
|
95 |
msgstr ""
|
96 |
|
97 |
#: classes/ad-debug.php:118 classes/ad-debug.php:167 classes/ad-debug.php:169
|
98 |
+
#: public/class-advanced-ads.php:742 admin/views/ad-group-list-ads.php:13
|
99 |
msgid "Ad"
|
100 |
msgstr ""
|
101 |
|
102 |
+
#: classes/ad-debug.php:121 public/class-advanced-ads.php:705
|
103 |
msgctxt "ad group singular name"
|
104 |
msgid "Ad Group"
|
105 |
msgstr ""
|
116 |
msgid "Visitor Conditions"
|
117 |
msgstr ""
|
118 |
|
119 |
+
#: classes/ad-debug.php:272 classes/frontend_checks.php:246
|
120 |
#: admin/includes/ad-health-notices.php:164
|
121 |
msgid ""
|
122 |
"Your website is using HTTPS, but the ad code contains HTTP and might not "
|
124 |
msgstr ""
|
125 |
|
126 |
#. %1$s is an anchor (link) opening tag, %2$s is the closing tag.
|
127 |
+
#: classes/ad-health-notices.php:844
|
128 |
+
#: modules/gadsense/includes/class-mapi.php:1388
|
129 |
#, php-format
|
130 |
msgid "Learn more about AdSense account issues %1$shere%2$s."
|
131 |
msgstr ""
|
541 |
msgid "<em>%s</em> filter does not exist"
|
542 |
msgstr ""
|
543 |
|
544 |
+
#: classes/frontend_checks.php:168
|
|
|
|
|
|
|
|
|
|
|
|
|
545 |
msgid "Ads are disabled on this page"
|
546 |
msgstr ""
|
547 |
|
548 |
+
#: classes/frontend_checks.php:181
|
549 |
msgid "Ads are disabled in the content of this page"
|
550 |
msgstr ""
|
551 |
|
552 |
+
#: classes/frontend_checks.php:193
|
553 |
msgid "the current post ID is 0 "
|
554 |
msgstr ""
|
555 |
|
556 |
+
#: classes/frontend_checks.php:207
|
557 |
msgid "Ads are disabled on all pages"
|
558 |
msgstr ""
|
559 |
|
560 |
+
#: classes/frontend_checks.php:220
|
561 |
msgid "Ads are disabled on 404 pages"
|
562 |
msgstr ""
|
563 |
|
564 |
+
#: classes/frontend_checks.php:233
|
565 |
msgid "Ads are disabled on non singular pages"
|
566 |
msgstr ""
|
567 |
|
568 |
+
#: classes/frontend_checks.php:247
|
569 |
#, php-format
|
570 |
msgid "Ad IDs: %s"
|
571 |
msgstr ""
|
572 |
|
573 |
+
#: classes/frontend_checks.php:259 admin/includes/ad-health-notices.php:140
|
574 |
#, php-format
|
575 |
msgid "Visible ads should not use the Header placement: %s"
|
576 |
msgstr ""
|
577 |
|
578 |
+
#: classes/frontend_checks.php:273 admin/includes/ad-health-notices.php:154
|
579 |
msgid "AdSense violation"
|
580 |
msgstr ""
|
581 |
|
582 |
+
#: classes/frontend_checks.php:274 admin/includes/ad-health-notices.php:155
|
583 |
msgid "Ad is hidden"
|
584 |
msgstr ""
|
585 |
|
586 |
+
#: classes/frontend_checks.php:275
|
587 |
#, php-format
|
588 |
msgid "IDs: %s"
|
589 |
msgstr ""
|
590 |
|
591 |
+
#: classes/frontend_checks.php:288
|
592 |
#, php-format
|
593 |
msgid "The following responsive AdSense ads are not showing up: %s"
|
594 |
msgstr ""
|
595 |
|
596 |
+
#: classes/frontend_checks.php:302
|
597 |
msgid "Consent not given"
|
598 |
msgstr ""
|
599 |
|
600 |
+
#: classes/frontend_checks.php:314
|
601 |
msgid "debug DFP ads"
|
602 |
msgstr ""
|
603 |
|
604 |
+
#: classes/frontend_checks.php:325
|
605 |
msgid "highlight ads"
|
606 |
msgstr ""
|
607 |
|
608 |
+
#: classes/frontend_checks.php:332
|
609 |
msgid "Auto ads code found"
|
610 |
msgstr ""
|
611 |
|
612 |
+
#: classes/frontend_checks.php:356
|
613 |
msgid "Ad Health"
|
614 |
msgstr ""
|
615 |
|
616 |
+
#: classes/frontend_checks.php:366
|
617 |
#, php-format
|
618 |
msgid "Show %d more notifications"
|
619 |
msgstr ""
|
620 |
|
621 |
+
#: classes/frontend_checks.php:383
|
622 |
msgid "Everything is fine"
|
623 |
msgstr ""
|
624 |
|
625 |
+
#: classes/frontend_checks.php:394 admin/includes/class-ad-type.php:671
|
626 |
#: admin/views/notices/welcome-panel.php:20
|
627 |
msgid "Get help"
|
628 |
msgstr ""
|
629 |
|
630 |
+
#: classes/frontend_checks.php:444
|
631 |
msgid ""
|
632 |
"the following code is used for automatic error detection and only visible to "
|
633 |
"admins"
|
706 |
msgid "Ad Groups"
|
707 |
msgstr ""
|
708 |
|
709 |
+
#: classes/widget.php:93 public/class-advanced-ads.php:741
|
710 |
#: admin/includes/class-menu.php:68 admin/includes/class-menu.php:68
|
711 |
#: admin/includes/class-shortcode-creator.php:84
|
712 |
#: admin/views/ad-group-list-form-row.php:90
|
743 |
msgid "Individual Posts, Pages and Public Post Types"
|
744 |
msgstr ""
|
745 |
|
746 |
+
#: public/class-advanced-ads.php:380
|
747 |
msgid "Advanced Ads Error following:"
|
748 |
msgstr ""
|
749 |
|
750 |
+
#: public/class-advanced-ads.php:384
|
751 |
#, php-format
|
752 |
msgid "Advanced Ads Error: %s"
|
753 |
msgstr ""
|
754 |
|
755 |
+
#: public/class-advanced-ads.php:704
|
756 |
msgctxt "ad group general name"
|
757 |
msgid "Ad Groups & Rotations"
|
758 |
msgstr ""
|
759 |
|
760 |
+
#: public/class-advanced-ads.php:706
|
761 |
msgid "Search Ad Groups"
|
762 |
msgstr ""
|
763 |
|
764 |
+
#: public/class-advanced-ads.php:707
|
765 |
msgid "All Ad Groups"
|
766 |
msgstr ""
|
767 |
|
768 |
+
#: public/class-advanced-ads.php:708
|
769 |
msgid "Parent Ad Groups"
|
770 |
msgstr ""
|
771 |
|
772 |
+
#: public/class-advanced-ads.php:709
|
773 |
msgid "Parent Ad Groups:"
|
774 |
msgstr ""
|
775 |
|
776 |
+
#: public/class-advanced-ads.php:710
|
777 |
msgid "Edit Ad Group"
|
778 |
msgstr ""
|
779 |
|
780 |
+
#: public/class-advanced-ads.php:711
|
781 |
msgid "Update Ad Group"
|
782 |
msgstr ""
|
783 |
|
784 |
+
#: public/class-advanced-ads.php:712
|
785 |
msgid "Add New Ad Group"
|
786 |
msgstr ""
|
787 |
|
788 |
+
#: public/class-advanced-ads.php:713
|
789 |
msgid "New Ad Groups Name"
|
790 |
msgstr ""
|
791 |
|
792 |
+
#: public/class-advanced-ads.php:714 modules/import-export/views/page.php:24
|
793 |
msgid "Groups"
|
794 |
msgstr ""
|
795 |
|
796 |
+
#: public/class-advanced-ads.php:715
|
797 |
msgid "No Ad Group found"
|
798 |
msgstr ""
|
799 |
|
800 |
+
#: public/class-advanced-ads.php:743 public/class-advanced-ads.php:747
|
801 |
#: admin/includes/class-menu.php:85 admin/views/ad-group-list-ads.php:28
|
802 |
msgid "New Ad"
|
803 |
msgstr ""
|
804 |
|
805 |
+
#: public/class-advanced-ads.php:744 admin/includes/class-menu.php:85
|
806 |
msgid "Add New Ad"
|
807 |
msgstr ""
|
808 |
|
809 |
+
#: public/class-advanced-ads.php:745
|
810 |
#: admin/includes/class-ad-groups-list.php:313
|
811 |
#: modules/import-export/classes/import.php:146
|
812 |
#: modules/import-export/classes/import.php:186
|
814 |
msgid "Edit"
|
815 |
msgstr ""
|
816 |
|
817 |
+
#: public/class-advanced-ads.php:746
|
818 |
msgid "Edit Ad"
|
819 |
msgstr ""
|
820 |
|
821 |
+
#: public/class-advanced-ads.php:748
|
822 |
msgid "View"
|
823 |
msgstr ""
|
824 |
|
825 |
+
#: public/class-advanced-ads.php:749
|
826 |
msgid "View the Ad"
|
827 |
msgstr ""
|
828 |
|
829 |
+
#: public/class-advanced-ads.php:750
|
830 |
msgid "Search Ads"
|
831 |
msgstr ""
|
832 |
|
833 |
+
#: public/class-advanced-ads.php:751
|
834 |
msgid "No Ads found"
|
835 |
msgstr ""
|
836 |
|
837 |
+
#: public/class-advanced-ads.php:752
|
838 |
msgid "No Ads found in Trash"
|
839 |
msgstr ""
|
840 |
|
841 |
+
#: public/class-advanced-ads.php:753
|
842 |
msgid "Parent Ad"
|
843 |
msgstr ""
|
844 |
|
845 |
+
#: public/class-advanced-ads.php:915
|
846 |
msgctxt "label above ads"
|
847 |
msgid "Advertisements"
|
848 |
msgstr ""
|
942 |
msgstr ""
|
943 |
|
944 |
#: admin/includes/ad-health-notices.php:196
|
945 |
+
#: admin/includes/ad-health-notices.php:205
|
946 |
msgid ""
|
947 |
"One of your sites is missing the AdSense publisher ID in the ads.txt file."
|
948 |
msgstr ""
|
949 |
|
950 |
#: admin/includes/ad-health-notices.php:198
|
951 |
+
#: admin/includes/ad-health-notices.php:207
|
952 |
msgctxt "related to ads.txt file"
|
953 |
msgid "Create one now."
|
954 |
msgstr ""
|
955 |
|
956 |
+
#. %s is a filter hook, here `the_content`
|
957 |
+
#: admin/includes/ad-health-notices.php:215
|
958 |
+
#, php-format
|
959 |
+
msgid "<strong>%s</strong> filter found multiple times."
|
960 |
+
msgstr ""
|
961 |
+
|
962 |
+
#: admin/includes/ad-health-notices.php:217
|
963 |
msgid "Advanced Ads uses the outermost of them."
|
964 |
msgstr ""
|
965 |
|
966 |
#. %1$s is a plugin name, %2$s is the opening a tag and %3$s the closing one.
|
967 |
+
#: admin/includes/ad-health-notices.php:226
|
968 |
+
#: admin/includes/ad-health-notices.php:237
|
969 |
+
#: admin/includes/ad-health-notices.php:248
|
970 |
+
#: admin/includes/ad-health-notices.php:261
|
971 |
#, php-format
|
972 |
msgid "Learn how to integrate %1$s with Advanced Ads %2$shere%3$s."
|
973 |
msgstr ""
|
974 |
|
975 |
#. %s is a service or plugin name.
|
976 |
+
#: admin/includes/ad-health-notices.php:275
|
977 |
+
#: modules/ads-txt/admin/class-advanced-ads-ads-txt-admin.php:187
|
978 |
#, php-format
|
979 |
msgid "%s detected."
|
980 |
msgstr ""
|
981 |
|
982 |
+
#: admin/includes/ad-health-notices.php:276
|
983 |
msgid "Learn how this might impact your ad setup."
|
984 |
msgstr ""
|
985 |
|
3118 |
msgid "Ad blocker counter"
|
3119 |
msgstr ""
|
3120 |
|
3121 |
+
#: modules/ads-txt/admin/class-advanced-ads-ads-txt-admin.php:167
|
3122 |
#, php-format
|
3123 |
msgid ""
|
3124 |
"The ads.txt file cannot be placed because the URL contains a subdirectory. "
|
3125 |
"You need to make the file available at %s"
|
3126 |
msgstr ""
|
3127 |
|
3128 |
+
#: modules/ads-txt/admin/class-advanced-ads-ads-txt-admin.php:178
|
3129 |
#, php-format
|
3130 |
msgid "The file is available on %s."
|
3131 |
msgstr ""
|
3132 |
|
3133 |
+
#: modules/ads-txt/admin/class-advanced-ads-ads-txt-admin.php:182
|
3134 |
msgid "The file was not created."
|
3135 |
msgstr ""
|
3136 |
|
3137 |
+
#: modules/ads-txt/admin/class-advanced-ads-ads-txt-admin.php:188
|
3138 |
+
msgid "Find the solution here"
|
3139 |
+
msgstr ""
|
3140 |
+
|
3141 |
+
#: modules/ads-txt/admin/class-advanced-ads-ads-txt-admin.php:203
|
3142 |
#: modules/ads-txt/admin/views/setting-additional-content.php:4
|
3143 |
#, php-format
|
3144 |
msgid "An error occured: %s."
|
3145 |
msgstr ""
|
3146 |
|
3147 |
#. %s the line that may need to be added manually
|
3148 |
+
#: modules/ads-txt/admin/class-advanced-ads-ads-txt-admin.php:216
|
3149 |
#, php-format
|
3150 |
msgid ""
|
3151 |
"If your site is located on a subdomain, you need to add the following line "
|
3376 |
msgid "An error occurred while requesting account details."
|
3377 |
msgstr ""
|
3378 |
|
3379 |
+
#: modules/gadsense/includes/class-mapi.php:1355
|
3380 |
#, php-format
|
3381 |
msgid ""
|
3382 |
"There are one or more warnings about the currently linked AdSense account. "
|
modules/ads-txt/admin/class-advanced-ads-ads-txt-admin.php
CHANGED
@@ -8,6 +8,8 @@ class Advanced_Ads_Ads_Txt_Admin {
|
|
8 |
*/
|
9 |
const adsense = 'adsense';
|
10 |
|
|
|
|
|
11 |
/**
|
12 |
* Constructor
|
13 |
*
|
@@ -19,7 +21,7 @@ class Advanced_Ads_Ads_Txt_Admin {
|
|
19 |
add_filter( 'advanced-ads-sanitize-settings', array( $this, 'toggle' ), 10, 1 );
|
20 |
add_action( 'update_option_advanced-ads-adsense', array( $this, 'update_adsense_option' ), 10, 2 );
|
21 |
add_action( 'advanced-ads-settings-init', array( $this, 'add_settings' ) );
|
22 |
-
add_action(
|
23 |
}
|
24 |
|
25 |
|
@@ -178,6 +180,16 @@ class Advanced_Ads_Ads_Txt_Admin {
|
|
178 |
) );
|
179 |
} else {
|
180 |
$notices[] = array( '', esc_html__( 'The file was not created.', 'advanced-ads' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
}
|
182 |
|
183 |
if ( $file['is_third_party'] ) {
|
@@ -217,6 +229,18 @@ class Advanced_Ads_Ads_Txt_Admin {
|
|
217 |
return $r;
|
218 |
}
|
219 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
220 |
/**
|
221 |
* Get a notice.
|
222 |
*
|
@@ -234,7 +258,7 @@ class Advanced_Ads_Ads_Txt_Admin {
|
|
234 |
$key = self::get_transient_key();
|
235 |
$transient = get_transient( $key );
|
236 |
|
237 |
-
if ( ! $is_ajax ) {
|
238 |
return isset( $transient[ $func ] ) ? $transient[ $func ] : null;
|
239 |
}
|
240 |
|
8 |
*/
|
9 |
const adsense = 'adsense';
|
10 |
|
11 |
+
const ACTION = 'wp_ajax_advads-ads-txt';
|
12 |
+
|
13 |
/**
|
14 |
* Constructor
|
15 |
*
|
21 |
add_filter( 'advanced-ads-sanitize-settings', array( $this, 'toggle' ), 10, 1 );
|
22 |
add_action( 'update_option_advanced-ads-adsense', array( $this, 'update_adsense_option' ), 10, 2 );
|
23 |
add_action( 'advanced-ads-settings-init', array( $this, 'add_settings' ) );
|
24 |
+
add_action( self::ACTION, array( $this, 'ajax_refresh_notices' ) );
|
25 |
}
|
26 |
|
27 |
|
180 |
) );
|
181 |
} else {
|
182 |
$notices[] = array( '', esc_html__( 'The file was not created.', 'advanced-ads' ) );
|
183 |
+
if ( Advanced_Ads_Checks::wp_engine_hosting() ) {
|
184 |
+
$notices[] = array( '',
|
185 |
+
sprintf(
|
186 |
+
// translators: %s is a service or plugin name.
|
187 |
+
'<strong>' . __( '%s detected.', 'advanced-ads' ) . '</strong>'
|
188 |
+
. ' <a href="' . ADVADS_URL . 'wp-engine-and-ads/#adstxt_not_showing_up">' . __( 'Find the solution here', 'advanced-ads' ) . '</a>',
|
189 |
+
'WP Engine'
|
190 |
+
)
|
191 |
+
);
|
192 |
+
}
|
193 |
}
|
194 |
|
195 |
if ( $file['is_third_party'] ) {
|
229 |
return $r;
|
230 |
}
|
231 |
|
232 |
+
/**
|
233 |
+
* Check if the `ads.txt` file is displayed to visitors.
|
234 |
+
*
|
235 |
+
* @return bool True if displayed, False otherwise.
|
236 |
+
*/
|
237 |
+
public static function is_displayed() {
|
238 |
+
$url = home_url( '/' );
|
239 |
+
|
240 |
+
$file = self::get_notice( 'get_file_info', $url );
|
241 |
+
return is_array( $file ) && ! empty( $file['exists'] );
|
242 |
+
}
|
243 |
+
|
244 |
/**
|
245 |
* Get a notice.
|
246 |
*
|
258 |
$key = self::get_transient_key();
|
259 |
$transient = get_transient( $key );
|
260 |
|
261 |
+
if ( ! $is_ajax || ! doing_action( self::ACTION ) ) {
|
262 |
return isset( $transient[ $func ] ) ? $transient[ $func ] : null;
|
263 |
}
|
264 |
|
modules/gadsense/includes/class-mapi.php
CHANGED
@@ -1301,13 +1301,39 @@ class Advanced_Ads_AdSense_MAPI {
|
|
1301 |
$options = self::get_option();
|
1302 |
if ( isset( $options['accounts'][ $pub_id ] ) ) {
|
1303 |
if ( isset( $options['accounts'][ $pub_id ]['alerts'] ) && is_array( $options['accounts'][ $pub_id ]['alerts'] ) ) {
|
1304 |
-
|
|
|
1305 |
} else {
|
1306 |
return array();
|
1307 |
}
|
1308 |
}
|
1309 |
return false;
|
1310 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1311 |
|
1312 |
/**
|
1313 |
* Checks if there is any AdSense warning for the currently connected AdSense account.
|
1301 |
$options = self::get_option();
|
1302 |
if ( isset( $options['accounts'][ $pub_id ] ) ) {
|
1303 |
if ( isset( $options['accounts'][ $pub_id ]['alerts'] ) && is_array( $options['accounts'][ $pub_id ]['alerts'] ) ) {
|
1304 |
+
$alerts = $options['accounts'][ $pub_id ]['alerts'];
|
1305 |
+
return self::filter_stored_account_alerts( $alerts );
|
1306 |
} else {
|
1307 |
return array();
|
1308 |
}
|
1309 |
}
|
1310 |
return false;
|
1311 |
}
|
1312 |
+
|
1313 |
+
/**
|
1314 |
+
* Remove unneeded stored alerts.
|
1315 |
+
*
|
1316 |
+
* @param array $alerts Existing alerts.
|
1317 |
+
* @return array $alerts Modified allerts.
|
1318 |
+
*/
|
1319 |
+
public static function filter_stored_account_alerts( array $alerts ) {
|
1320 |
+
if ( empty( $alerts['items'] ) || ! is_array( $alerts['items'] ) ) {
|
1321 |
+
return $alerts;
|
1322 |
+
}
|
1323 |
+
|
1324 |
+
// Remove `ads.txt` related alerts if the file is displayed to visitors.
|
1325 |
+
if ( Advanced_Ads_Ads_Txt_Admin::is_displayed() ) {
|
1326 |
+
$ads_txt_alerts = array( 'ALERT_TYPE_ADS_TXT_UNAUTHORIZED', 'ADS_TXT_MISSING' );
|
1327 |
+
|
1328 |
+
foreach ( $alerts['items'] as $internal_id => $item ) {
|
1329 |
+
if ( isset( $item['id'] ) && in_array( $item['id'], $ads_txt_alerts ) ) {
|
1330 |
+
unset( $alerts['items'][ $internal_id ] );
|
1331 |
+
}
|
1332 |
+
}
|
1333 |
+
}
|
1334 |
+
|
1335 |
+
return $alerts;
|
1336 |
+
}
|
1337 |
|
1338 |
/**
|
1339 |
* Checks if there is any AdSense warning for the currently connected AdSense account.
|
public/class-advanced-ads.php
CHANGED
@@ -72,6 +72,13 @@ class Advanced_Ads {
|
|
72 |
*/
|
73 |
protected $internal_options = false;
|
74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
/**
|
76 |
* List of bots and crawlers to exclude from ad impressions
|
77 |
*
|
@@ -134,6 +141,8 @@ class Advanced_Ads {
|
|
134 |
|
135 |
// allow add-ons to interact.
|
136 |
add_action( 'init', array( $this, 'advanced_ads_loaded' ), 9 );
|
|
|
|
|
137 |
}
|
138 |
|
139 |
/**
|
@@ -446,6 +455,14 @@ class Advanced_Ads {
|
|
446 |
}
|
447 |
|
448 |
if ( $this->has_many_the_content() ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
449 |
return $content;
|
450 |
}
|
451 |
|
@@ -483,7 +500,7 @@ class Advanced_Ads {
|
|
483 |
if ( ! isset( $options['content-injection-everywhere'] ) || 0 === $options['content-injection-everywhere'] ) {
|
484 |
// check if this is a singular page within the loop or an AMP page.
|
485 |
$is_amp = advads_is_amp();
|
486 |
-
if ( ( ! is_singular( $public_post_types ) && ! is_feed() ) || ( ! $is_amp && ! in_the_loop() ) ) {
|
487 |
return $content; }
|
488 |
} else {
|
489 |
global $wp_query;
|
@@ -936,4 +953,26 @@ class Advanced_Ads {
|
|
936 |
self::get_instance()->get_model()->reset_placement_array();
|
937 |
}
|
938 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
939 |
}
|
72 |
*/
|
73 |
protected $internal_options = false;
|
74 |
|
75 |
+
/**
|
76 |
+
* Whether the loop started in an inner `the_content`.
|
77 |
+
*
|
78 |
+
* @var bool
|
79 |
+
*/
|
80 |
+
protected $was_in_the_loop = false;
|
81 |
+
|
82 |
/**
|
83 |
* List of bots and crawlers to exclude from ad impressions
|
84 |
*
|
141 |
|
142 |
// allow add-ons to interact.
|
143 |
add_action( 'init', array( $this, 'advanced_ads_loaded' ), 9 );
|
144 |
+
|
145 |
+
add_filter( 'the_content', array( $this, 'set_was_in_the_loop' ), ~PHP_INT_MAX );
|
146 |
}
|
147 |
|
148 |
/**
|
455 |
}
|
456 |
|
457 |
if ( $this->has_many_the_content() ) {
|
458 |
+
if ( current_user_can( 'advanced_ads_place_ads' ) ) {
|
459 |
+
global $wp;
|
460 |
+
Advanced_Ads::log( sprintf( 'More then one `the_content` in the stack (%s): %s, %s',
|
461 |
+
ADVADS_URL . 'manual/ad-health/#the_content_filter_found_multiple_times',
|
462 |
+
isset( $wp->request ) ? $wp->request : '',
|
463 |
+
wp_debug_backtrace_summary() )
|
464 |
+
);
|
465 |
+
}
|
466 |
return $content;
|
467 |
}
|
468 |
|
500 |
if ( ! isset( $options['content-injection-everywhere'] ) || 0 === $options['content-injection-everywhere'] ) {
|
501 |
// check if this is a singular page within the loop or an AMP page.
|
502 |
$is_amp = advads_is_amp();
|
503 |
+
if ( ( ! is_singular( $public_post_types ) && ! is_feed() ) || ( ! $is_amp && ! in_the_loop() && ! $this->was_in_the_loop ) ) {
|
504 |
return $content; }
|
505 |
} else {
|
506 |
global $wp_query;
|
953 |
self::get_instance()->get_model()->reset_placement_array();
|
954 |
}
|
955 |
}
|
956 |
+
|
957 |
+
/**
|
958 |
+
* Store whether the loop started in an inner `the_content`.
|
959 |
+
*
|
960 |
+
* If so, let us assume that we are in the loop when we are in the outermost `the_content`.
|
961 |
+
* Makes sense only when a hooked to `the_content` function that produces an inner `the_content` has
|
962 |
+
* lesser priority then `$this->plugin->get_content_injection_priority()`.
|
963 |
+
*
|
964 |
+
* @param string Post content.
|
965 |
+
* @param string Post content (unchanged).
|
966 |
+
*/
|
967 |
+
function set_was_in_the_loop( $content ) {
|
968 |
+
if ( Advanced_Ads::get_instance()->has_many_the_content() ) {
|
969 |
+
$this->was_in_the_loop = $this->was_in_the_loop || in_the_loop();
|
970 |
+
} else {
|
971 |
+
// Next top level `the_content`, forget that the loop started.
|
972 |
+
$this->was_in_the_loop = false;
|
973 |
+
}
|
974 |
+
|
975 |
+
|
976 |
+
return $content;
|
977 |
+
}
|
978 |
}
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ 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.
|
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 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
|
@@ -288,6 +288,15 @@ Yes. Advanced Ads is based on WordPress standards and therefore easily customiza
|
|
288 |
|
289 |
== Changelog ==
|
290 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
291 |
= 1.13.7 =
|
292 |
|
293 |
* set `ADVANCED_ADS_DISABLE_EDIT_BAR` to disable frontend edit bar
|
5 |
Requires at least: 4.6
|
6 |
Tested up to: 5.2
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 1.13.8
|
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
|
288 |
|
289 |
== Changelog ==
|
290 |
|
291 |
+
= 1.13.8 =
|
292 |
+
|
293 |
+
* prevented warning about missing ads.txt file when the file exists
|
294 |
+
* added a hint about solving ads.txt issue on WP Engine platform
|
295 |
+
* allow to translate Ad Label option if WPML String Translation is used
|
296 |
+
* fixed Ad Health notices showing also ignored issues when adding a new notice
|
297 |
+
* inject ads in the outermost `the_content` when they may have been injected in an inner `the_content`
|
298 |
+
* added chain of nested `the_content` filters to `debug.log` to allow reasoning about possible issues
|
299 |
+
|
300 |
= 1.13.7 =
|
301 |
|
302 |
* set `ADVANCED_ADS_DISABLE_EDIT_BAR` to disable frontend edit bar
|
wpml-config.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<wpml-config>
|
2 |
+
<admin-texts>
|
3 |
+
<key name="advanced-ads">
|
4 |
+
<key name="custom-label">
|
5 |
+
<key name="text" />
|
6 |
+
</key>
|
7 |
+
</key>
|
8 |
+
</admin-texts>
|
9 |
+
</wpml-config>
|