Version Description
- set
ADVANCED_ADS_DISABLE_EDIT_BAR
to disable frontend edit bar - set better default data for new AdSense ads
- when
the_content
filters are nested, use the outermost one to inject ads - hide certain notices for a longer period even if they stay valid
- removed notice about plugin updates since WP 5.2 handles this now
- removed notice about website being hosted on wp.com
- honor "Hide ads for user roles" and "Hide ads from bots" settings when displaying AdSense verification code & Auto ads
- prevented some attachment pages containing ads from being indexed
Download this release
Release Info
Developer | webzunft |
Plugin | Advanced Ads |
Version | 1.13.7 |
Comparing to | |
See all releases |
Code changes from version 1.13.6 to 1.13.7
- admin/assets/js/admin-global.js +16 -16
- admin/includes/ad-health-notices.php +116 -53
- admin/includes/class-ad-type.php +5 -5
- admin/includes/class-overview-widgets.php +12 -3
- admin/views/ad-visitor-metabox.php +1 -0
- admin/views/feedback-disable.php +1 -0
- admin/views/notices/welcome-panel.php +1 -1
- admin/views/overview-notice-row.php +1 -1
- admin/views/overview-notices.php +1 -1
- admin/views/overview.php +3 -2
- advanced-ads.php +2 -2
- classes/ad-health-notices.php +85 -22
- classes/ad.php +1 -1
- classes/checks.php +38 -20
- classes/compatibility.php +30 -0
- classes/frontend_checks.php +51 -20
- languages/advanced-ads.pot +201 -169
- modules/gadsense/admin/assets/js/new-ad.js +9 -1
- modules/gadsense/includes/class-ad-type-adsense.php +2 -2
- modules/gadsense/includes/class-gadsense-data.php +1 -1
- modules/gadsense/public/public.php +9 -1
- public/class-advanced-ads.php +35 -28
- readme.txt +13 -2
admin/assets/js/admin-global.js
CHANGED
@@ -277,24 +277,24 @@ function advads_push_notice( key, attr = '' ){
|
|
277 |
// show notices of a given type again
|
278 |
function advads_ad_health_show_hidden(){
|
279 |
var notice_box = jQuery( '#advads__overview_notices');
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
notice_box.find('.advads-loader' ).show();
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
notice_box.find('.advads-loader' ).hide();
|
297 |
-
|
298 |
};
|
299 |
// hide list fragments if last item was hidden/removed
|
300 |
function advads_ad_health_maybe_remove_list(){
|
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();
|
291 |
+
// send query
|
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
|
300 |
function advads_ad_health_maybe_remove_list(){
|
admin/includes/ad-health-notices.php
CHANGED
@@ -7,19 +7,27 @@
|
|
7 |
* - "problem" (critical)
|
8 |
*
|
9 |
* attribute: can_hide
|
10 |
-
* (user can hide this warning, default: true)
|
11 |
*
|
12 |
* attribute: hide
|
13 |
* (how to handle click on "hide" button)
|
14 |
* - true (default, hide the item)
|
15 |
* - false (remove the item completely from list of notifications)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
*/
|
17 |
-
$advanced_ads_ad_health_notices = apply_filters( 'advanced-ads-ad-health-notices',
|
|
|
18 |
// old PHP version
|
19 |
// checked using Advanced_Ads_Checks::php_version_minimum().
|
20 |
'old_php' => array(
|
21 |
'text' => sprintf(
|
22 |
-
|
23 |
__( 'Your <strong>PHP version (%1$s) is too low</strong>. Advanced Ads is built for PHP %2$s and higher. It might work, but updating PHP is highly recommended. Please ask your hosting provider for more information.', 'advanced-ads' ),
|
24 |
phpversion(),
|
25 |
Advanced_Ads_Checks::MINIMUM_PHP_VERSION
|
@@ -30,24 +38,17 @@ $advanced_ads_ad_health_notices = apply_filters( 'advanced-ads-ad-health-notices
|
|
30 |
// checked using Advanced_Ads_Checks::cache() && ! defined( 'AAP_VERSION' ).
|
31 |
'cache_no_pro' => array(
|
32 |
'text' => sprintf(
|
33 |
-
|
34 |
__( 'Your <strong>website uses cache</strong>. Some dynamic features like ad rotation or visitor conditions might not work properly. Use the cache-busting feature of <a href="%s" target="_blank">Advanced Ads Pro</a> to load ads dynamically.', 'advanced-ads' ),
|
35 |
ADVADS_URL . 'add-ons/advanced-ads-pro/#utm_source=advanced-ads&utm_medium=link&utm_campaign=error-cache'
|
36 |
),
|
37 |
'type' => 'problem',
|
38 |
),
|
39 |
-
// updates for Advanced Ads plugins are available
|
40 |
-
// checked using Advanced_Ads_Checks::plugin_updates_available().
|
41 |
-
'plugin_updates_available' => array(
|
42 |
-
'text' => __( 'There are <strong>plugin updates available</strong>. Please update.', 'advanced-ads' ),
|
43 |
-
'type' => 'problem',
|
44 |
-
'hide' => false,
|
45 |
-
),
|
46 |
// Autoptimize found, but no Advanced Ads Pro
|
47 |
// Advanced_Ads_Checks::active_autoptimize() && ! defined( 'AAP_VERSION' ) ).
|
48 |
'autoptimize_no_pro' => array(
|
49 |
'text' => sprintf(
|
50 |
-
|
51 |
__( '<strong>Autoptimize plugin detected</strong>. While this plugin is great for site performance, it is known to alter code, including scripts from ad networks. <a href="%s" target="_blank">Advanced Ads Pro</a> has a build-in support for Autoptimize.', 'advanced-ads' ),
|
52 |
ADVADS_URL . 'add-ons/advanced-ads-pro/#utm_source=advanced-ads&utm_medium=link&utm_campaign=error-autoptimize'
|
53 |
),
|
@@ -57,7 +58,7 @@ $advanced_ads_ad_health_notices = apply_filters( 'advanced-ads-ad-health-notices
|
|
57 |
// Advanced_Ads_Checks::conflicting_plugins().
|
58 |
'conflicting_plugins' => array(
|
59 |
'text' => sprintf(
|
60 |
-
|
61 |
__( 'Plugins that are known to cause (partial) problems: <strong>%1$s</strong>. <a href="%2$s" target="_blank">Learn more</a>.', 'advanced-ads' ),
|
62 |
implode( ', ', Advanced_Ads_Checks::conflicting_plugins() ),
|
63 |
ADVADS_URL . 'manual/known-plugin-conflicts/#utm_source=advanced-ads&utm_medium=link&utm_campaign=error-plugin-conflicts'
|
@@ -68,9 +69,9 @@ $advanced_ads_ad_health_notices = apply_filters( 'advanced-ads-ad-health-notices
|
|
68 |
// Advanced_Ads_Checks::php_extensions().
|
69 |
'php_extensions_missing' => array(
|
70 |
'text' => sprintf(
|
71 |
-
|
72 |
__( 'Missing PHP extensions could cause issues. Please ask your hosting provider to enable them: %s', 'advanced-ads' ),
|
73 |
-
implode(
|
74 |
),
|
75 |
'type' => 'problem',
|
76 |
),
|
@@ -78,18 +79,12 @@ $advanced_ads_ad_health_notices = apply_filters( 'advanced-ads-ad-health-notices
|
|
78 |
// Advanced_Ads_Checks::ads_disabled().
|
79 |
'ads_disabled' => array(
|
80 |
'text' => sprintf(
|
81 |
-
|
82 |
__( 'Ads are disabled for all or some pages. See "disabled ads" in <a href="%s">settings</a>.', 'advanced-ads' ),
|
83 |
admin_url( 'admin.php?page=advanced-ads-settings#top#general' )
|
84 |
),
|
85 |
'type' => 'problem',
|
86 |
),
|
87 |
-
// user is on wordpress.com
|
88 |
-
// defined( 'IS_WPCOM' ).
|
89 |
-
'wp_com' => array(
|
90 |
-
'text' => __( 'This site is hosted on wordpress.com.', 'advanced-ads' ),
|
91 |
-
'type' => 'problem',
|
92 |
-
),
|
93 |
// check if Advanced Ads related constants are enabled
|
94 |
// Advanced_Ads_Checks::get_defined_constants().
|
95 |
'constants_enabled' => array(
|
@@ -100,7 +95,7 @@ $advanced_ads_ad_health_notices = apply_filters( 'advanced-ads-ad-health-notices
|
|
100 |
// Advanced_Ads_Checks::jquery_ui_conflict().
|
101 |
'jquery_ui_conflict' => array(
|
102 |
'text' => sprintf(
|
103 |
-
|
104 |
__( 'Possible conflict between jQueryUI library, used by Advanced Ads and other libraries (probably <a href="%s">Twitter Bootstrap</a>). This might lead to misfortunate formats in forms, but should not damage features.', 'advanced-ads' ),
|
105 |
'http://getbootstrap.com/javascript/#js-noconflict'
|
106 |
),
|
@@ -110,7 +105,7 @@ $advanced_ads_ad_health_notices = apply_filters( 'advanced-ads-ad-health-notices
|
|
110 |
// Advanced_Ads_Checks::assets_expired().
|
111 |
'assets_expired' => array(
|
112 |
'text' => sprintf(
|
113 |
-
|
114 |
__( 'Some assets were changed. Please <strong>rebuild the asset folder</strong> in the <a href="%s">Advanced Ads settings</a> to update the ad blocker disguise.', 'advanced-ads' ),
|
115 |
admin_url( 'admin.php?page=advanced-ads-settings' )
|
116 |
),
|
@@ -120,14 +115,15 @@ $advanced_ads_ad_health_notices = apply_filters( 'advanced-ads-ad-health-notices
|
|
120 |
// missing license codes
|
121 |
// Advanced_Ads_Checks::license_invalid().
|
122 |
'license_invalid' => array(
|
123 |
-
'text'
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
'type'
|
130 |
-
'
|
|
|
131 |
),
|
132 |
// an individual ad expired.
|
133 |
'ad_expired' => array(
|
@@ -135,38 +131,39 @@ $advanced_ads_ad_health_notices = apply_filters( 'advanced-ads-ad-health-notices
|
|
135 |
'type' => 'notice',
|
136 |
'hide' => false,
|
137 |
),
|
138 |
-
//
|
139 |
// is checked in the frontend by Ad Health in Advanced_Ads_Frontend_Checks::can_use_head_placement().
|
140 |
'ad_with_output_in_head' => array(
|
141 |
// we keep the %s here and replace it with an empty string, because we use it somewhere else and don’t want to create a new string that is basically the same.
|
142 |
-
'text'
|
143 |
-
|
144 |
__( 'Visible ads should not use the Header placement: %s', 'advanced-ads' ),
|
145 |
''
|
146 |
),
|
147 |
-
'type'
|
148 |
-
'hide'
|
149 |
'get_help_link' => ADVADS_URL . 'manual/ad-health/?utm_source=advanced-ads&utm_medium=link&utm_campaign=error-visible-ad-in-header#header-ads',
|
|
|
150 |
),
|
151 |
// ad AdSense ad was hidden in the frontend using CSS
|
152 |
// check in Ad Health in frontend.
|
153 |
'adsense_hidden' => array(
|
154 |
// we keep the %s here and replace it with an empty string, because we use it somewhere else and don’t want to create a new string that is basically the same.
|
155 |
-
'text'
|
156 |
'%s: %s.',
|
157 |
__( 'AdSense violation', 'advanced-ads' ),
|
158 |
__( 'Ad is hidden', 'advanced-ads' )
|
159 |
),
|
160 |
-
'type'
|
161 |
-
'hide'
|
162 |
'get_help_link' => ADVADS_URL . 'adsense-errors/?utm_source=advanced-ads&utm_medium=link&utm_campaign=error-adsense-hidden#AdSense_hidden',
|
163 |
),
|
164 |
// Ad has HTTP, but site uses HTTPS
|
165 |
// check in Ad Health in frontend.
|
166 |
'ad_has_http' => array(
|
167 |
-
'text'
|
168 |
-
'type'
|
169 |
-
'hide'
|
170 |
'get_help_link' => ADVADS_URL . 'manual/ad-health/?utm_source=advanced-ads&utm_medium=link&utm_campaign=error-https-ads#https-ads',
|
171 |
),
|
172 |
// dummy text for general AdSense issue.
|
@@ -175,12 +172,6 @@ $advanced_ads_ad_health_notices = apply_filters( 'advanced-ads-ad-health-notices
|
|
175 |
'text' => __( 'AdSense issue' ),
|
176 |
'type' => 'problem',
|
177 |
),
|
178 |
-
// no ads created, yet.
|
179 |
-
'no_ads' => array(
|
180 |
-
// we keep the %s here and replace it with an empty string, because we use it somewhere else and don’t want to create a new string that is basically the same.
|
181 |
-
'text' => '<a href="' . admin_url( 'post-new.php?post_type=' . Advanced_Ads::POST_TYPE_SLUG ) . '">' . __( 'Create your first ad', 'advanced-ads' ) . '</a>.',
|
182 |
-
'type' => 'notice',
|
183 |
-
),
|
184 |
// AdSense connection error: disapproved account.
|
185 |
'adsense_connect_disapprovedAccount' => array(
|
186 |
'text' => __( 'Last AdSense account connection attempt failed.', 'advanced-ads' ) . ' ' . __( 'Your account was not approved by AdSense.', 'advance-ads' ) . ' ' . Advanced_Ads_Ad_Health_Notices::get_adsense_error_link( 'disapprovedAccount' ),
|
@@ -190,7 +181,9 @@ $advanced_ads_ad_health_notices = apply_filters( 'advanced-ads-ad-health-notices
|
|
190 |
// AdSense connection error: no adsense account.
|
191 |
'adsense_connect_noAdSenseAccount' => array(
|
192 |
'text' => sprintf(
|
193 |
-
__( 'Last AdSense account connection attempt failed.', 'advanced-ads' ) . ' ' .
|
|
|
|
|
194 |
'<a href="https://www.google.com/adsense/start/?utm_source=AdvancedAdsPlugIn&utm_medium=partnerships&utm_campaign=AdvancedAdsPartner" target="_blank">',
|
195 |
'</a>'
|
196 |
),
|
@@ -200,12 +193,82 @@ $advanced_ads_ad_health_notices = apply_filters( 'advanced-ads-ad-health-notices
|
|
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 |
)
|
211 |
);
|
7 |
* - "problem" (critical)
|
8 |
*
|
9 |
* attribute: can_hide
|
10 |
+
* (user can see a button to hide this warning, default: true)
|
11 |
*
|
12 |
* attribute: hide
|
13 |
* (how to handle click on "hide" button)
|
14 |
* - true (default, hide the item)
|
15 |
* - false (remove the item completely from list of notifications)
|
16 |
+
*
|
17 |
+
* attribute: timeout
|
18 |
+
* (for how long to hide/ignore the message in seconds.)
|
19 |
+
* - default: empty
|
20 |
+
*
|
21 |
+
* attribute: get_help_link
|
22 |
+
* (enter URL, if exists, will add a link after the message)
|
23 |
*/
|
24 |
+
$advanced_ads_ad_health_notices = apply_filters( 'advanced-ads-ad-health-notices',
|
25 |
+
array(
|
26 |
// old PHP version
|
27 |
// checked using Advanced_Ads_Checks::php_version_minimum().
|
28 |
'old_php' => array(
|
29 |
'text' => sprintf(
|
30 |
+
// translators: %1$s is a version number.
|
31 |
__( 'Your <strong>PHP version (%1$s) is too low</strong>. Advanced Ads is built for PHP %2$s and higher. It might work, but updating PHP is highly recommended. Please ask your hosting provider for more information.', 'advanced-ads' ),
|
32 |
phpversion(),
|
33 |
Advanced_Ads_Checks::MINIMUM_PHP_VERSION
|
38 |
// checked using Advanced_Ads_Checks::cache() && ! defined( 'AAP_VERSION' ).
|
39 |
'cache_no_pro' => array(
|
40 |
'text' => sprintf(
|
41 |
+
// translators: %s is a target URL.
|
42 |
__( 'Your <strong>website uses cache</strong>. Some dynamic features like ad rotation or visitor conditions might not work properly. Use the cache-busting feature of <a href="%s" target="_blank">Advanced Ads Pro</a> to load ads dynamically.', 'advanced-ads' ),
|
43 |
ADVADS_URL . 'add-ons/advanced-ads-pro/#utm_source=advanced-ads&utm_medium=link&utm_campaign=error-cache'
|
44 |
),
|
45 |
'type' => 'problem',
|
46 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
// Autoptimize found, but no Advanced Ads Pro
|
48 |
// Advanced_Ads_Checks::active_autoptimize() && ! defined( 'AAP_VERSION' ) ).
|
49 |
'autoptimize_no_pro' => array(
|
50 |
'text' => sprintf(
|
51 |
+
// translators: %s is a target URL.
|
52 |
__( '<strong>Autoptimize plugin detected</strong>. While this plugin is great for site performance, it is known to alter code, including scripts from ad networks. <a href="%s" target="_blank">Advanced Ads Pro</a> has a build-in support for Autoptimize.', 'advanced-ads' ),
|
53 |
ADVADS_URL . 'add-ons/advanced-ads-pro/#utm_source=advanced-ads&utm_medium=link&utm_campaign=error-autoptimize'
|
54 |
),
|
58 |
// Advanced_Ads_Checks::conflicting_plugins().
|
59 |
'conflicting_plugins' => array(
|
60 |
'text' => sprintf(
|
61 |
+
// translators: %1$s is a list of plugin names; %2$s a target URL.
|
62 |
__( 'Plugins that are known to cause (partial) problems: <strong>%1$s</strong>. <a href="%2$s" target="_blank">Learn more</a>.', 'advanced-ads' ),
|
63 |
implode( ', ', Advanced_Ads_Checks::conflicting_plugins() ),
|
64 |
ADVADS_URL . 'manual/known-plugin-conflicts/#utm_source=advanced-ads&utm_medium=link&utm_campaign=error-plugin-conflicts'
|
69 |
// Advanced_Ads_Checks::php_extensions().
|
70 |
'php_extensions_missing' => array(
|
71 |
'text' => sprintf(
|
72 |
+
// translators: %s is a list of PHP extensions.
|
73 |
__( 'Missing PHP extensions could cause issues. Please ask your hosting provider to enable them: %s', 'advanced-ads' ),
|
74 |
+
implode( ', ', Advanced_Ads_Checks::php_extensions() )
|
75 |
),
|
76 |
'type' => 'problem',
|
77 |
),
|
79 |
// Advanced_Ads_Checks::ads_disabled().
|
80 |
'ads_disabled' => array(
|
81 |
'text' => sprintf(
|
82 |
+
// translators: %s is a target URL.
|
83 |
__( 'Ads are disabled for all or some pages. See "disabled ads" in <a href="%s">settings</a>.', 'advanced-ads' ),
|
84 |
admin_url( 'admin.php?page=advanced-ads-settings#top#general' )
|
85 |
),
|
86 |
'type' => 'problem',
|
87 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
// check if Advanced Ads related constants are enabled
|
89 |
// Advanced_Ads_Checks::get_defined_constants().
|
90 |
'constants_enabled' => array(
|
95 |
// Advanced_Ads_Checks::jquery_ui_conflict().
|
96 |
'jquery_ui_conflict' => array(
|
97 |
'text' => sprintf(
|
98 |
+
// translators: %s is a target URL.
|
99 |
__( 'Possible conflict between jQueryUI library, used by Advanced Ads and other libraries (probably <a href="%s">Twitter Bootstrap</a>). This might lead to misfortunate formats in forms, but should not damage features.', 'advanced-ads' ),
|
100 |
'http://getbootstrap.com/javascript/#js-noconflict'
|
101 |
),
|
105 |
// Advanced_Ads_Checks::assets_expired().
|
106 |
'assets_expired' => array(
|
107 |
'text' => sprintf(
|
108 |
+
// translators: %s is a target URL.
|
109 |
__( 'Some assets were changed. Please <strong>rebuild the asset folder</strong> in the <a href="%s">Advanced Ads settings</a> to update the ad blocker disguise.', 'advanced-ads' ),
|
110 |
admin_url( 'admin.php?page=advanced-ads-settings' )
|
111 |
),
|
115 |
// missing license codes
|
116 |
// Advanced_Ads_Checks::license_invalid().
|
117 |
'license_invalid' => array(
|
118 |
+
'text' => __( 'One or more license keys for <strong>Advanced Ads add-ons are invalid or missing</strong>.', 'advanced-ads' ) . ' '
|
119 |
+
. sprintf(
|
120 |
+
// translators: %s is a target URL.
|
121 |
+
__( 'Please add valid license keys <a href="%s">here</a>.', 'advanced-ads' ),
|
122 |
+
get_admin_url( 1, 'admin.php?page=advanced-ads-settings#top#licenses' )
|
123 |
+
),
|
124 |
+
'type' => 'problem',
|
125 |
+
'hide' => false,
|
126 |
+
'timeout' => WEEK_IN_SECONDS,
|
127 |
),
|
128 |
// an individual ad expired.
|
129 |
'ad_expired' => array(
|
131 |
'type' => 'notice',
|
132 |
'hide' => false,
|
133 |
),
|
134 |
+
// a visible ad is used in <head> tags
|
135 |
// is checked in the frontend by Ad Health in Advanced_Ads_Frontend_Checks::can_use_head_placement().
|
136 |
'ad_with_output_in_head' => array(
|
137 |
// we keep the %s here and replace it with an empty string, because we use it somewhere else and don’t want to create a new string that is basically the same.
|
138 |
+
'text' => sprintf(
|
139 |
+
// translators: %s is empty here, but the string will be followed by a name of an ad unit.
|
140 |
__( 'Visible ads should not use the Header placement: %s', 'advanced-ads' ),
|
141 |
''
|
142 |
),
|
143 |
+
'type' => 'notice',
|
144 |
+
'hide' => false,
|
145 |
'get_help_link' => ADVADS_URL . 'manual/ad-health/?utm_source=advanced-ads&utm_medium=link&utm_campaign=error-visible-ad-in-header#header-ads',
|
146 |
+
'timeout' => YEAR_IN_SECONDS,
|
147 |
),
|
148 |
// ad AdSense ad was hidden in the frontend using CSS
|
149 |
// check in Ad Health in frontend.
|
150 |
'adsense_hidden' => array(
|
151 |
// we keep the %s here and replace it with an empty string, because we use it somewhere else and don’t want to create a new string that is basically the same.
|
152 |
+
'text' => sprintf(
|
153 |
'%s: %s.',
|
154 |
__( 'AdSense violation', 'advanced-ads' ),
|
155 |
__( 'Ad is hidden', 'advanced-ads' )
|
156 |
),
|
157 |
+
'type' => 'problem',
|
158 |
+
'hide' => false,
|
159 |
'get_help_link' => ADVADS_URL . 'adsense-errors/?utm_source=advanced-ads&utm_medium=link&utm_campaign=error-adsense-hidden#AdSense_hidden',
|
160 |
),
|
161 |
// Ad has HTTP, but site uses HTTPS
|
162 |
// check in Ad Health in frontend.
|
163 |
'ad_has_http' => array(
|
164 |
+
'text' => __( 'Your website is using HTTPS, but the ad code contains HTTP and might not work.', 'advanced-ads' ),
|
165 |
+
'type' => 'notice',
|
166 |
+
'hide' => false,
|
167 |
'get_help_link' => ADVADS_URL . 'manual/ad-health/?utm_source=advanced-ads&utm_medium=link&utm_campaign=error-https-ads#https-ads',
|
168 |
),
|
169 |
// dummy text for general AdSense issue.
|
172 |
'text' => __( 'AdSense issue' ),
|
173 |
'type' => 'problem',
|
174 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
// AdSense connection error: disapproved account.
|
176 |
'adsense_connect_disapprovedAccount' => array(
|
177 |
'text' => __( 'Last AdSense account connection attempt failed.', 'advanced-ads' ) . ' ' . __( 'Your account was not approved by AdSense.', 'advance-ads' ) . ' ' . Advanced_Ads_Ad_Health_Notices::get_adsense_error_link( 'disapprovedAccount' ),
|
181 |
// AdSense connection error: no adsense account.
|
182 |
'adsense_connect_noAdSenseAccount' => array(
|
183 |
'text' => sprintf(
|
184 |
+
__( 'Last AdSense account connection attempt failed.', 'advanced-ads' ) . ' ' .
|
185 |
+
// translators: %1$s is the opening a tag and %2$s the closing one.
|
186 |
+
__( 'Create a new AdSense account %1$shere%2$s.', 'advanced-ads' ) . ' ' . Advanced_Ads_Ad_Health_Notices::get_adsense_error_link( 'noAdSenseAccount' ),
|
187 |
'<a href="https://www.google.com/adsense/start/?utm_source=AdvancedAdsPlugIn&utm_medium=partnerships&utm_campaign=AdvancedAdsPartner" target="_blank">',
|
188 |
'</a>'
|
189 |
),
|
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' )
|
197 |
+
. ' <a class="advads-settings-link" href="%s">'
|
198 |
+
. _x( 'Create one now.', 'related to ads.txt file', 'advanced-ads' ) . '</a>',
|
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(
|
205 |
+
// translators: %s is a filter hook, here `the_content`.
|
206 |
+
__( '<strong>%s</strong> filter found multiple times.', 'advanced-ads' ),
|
207 |
+
'the_content'
|
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(
|
214 |
+
'text' => sprintf(
|
215 |
+
// translators: %1$s is a plugin name, %2$s is the opening a tag and %3$s the closing one.
|
216 |
+
__( 'Learn how to integrate %1$s with Advanced Ads %2$shere%3$s.', 'advanced-ads' ),
|
217 |
+
'<strong>BuddyPress</strong>',
|
218 |
+
'<a href="' . ADVADS_URL . 'ads-on-buddypress-pages/#utm_source=advanced-ads&utm_medium=link&utm_campaign=notice-buddypress" target="_blank">',
|
219 |
+
'</a>'
|
220 |
+
),
|
221 |
+
'type' => 'notice',
|
222 |
+
),
|
223 |
+
// bbPress installed.
|
224 |
+
'bbpress_no_pro' => array(
|
225 |
+
'text' => sprintf(
|
226 |
+
// translators: %1$s is a plugin name, %2$s is the opening a tag and %3$s the closing one.
|
227 |
+
__( 'Learn how to integrate %1$s with Advanced Ads %2$shere%3$s.', 'advanced-ads' ),
|
228 |
+
'<strong>bbPress</strong>',
|
229 |
+
'<a href="' . ADVADS_URL . 'ads-in-bbpress/#utm_source=advanced-ads&utm_medium=link&utm_campaign=notice-bbpress" target="_blank">',
|
230 |
+
'</a>'
|
231 |
+
),
|
232 |
+
'type' => 'notice',
|
233 |
+
),
|
234 |
+
// WPML plugin activated.
|
235 |
+
'WPML_active' => array(
|
236 |
+
'text' => sprintf(
|
237 |
+
// translators: %1$s is a plugin name, %2$s is the opening a tag and %3$s the closing one.
|
238 |
+
__( 'Learn how to integrate %1$s with Advanced Ads %2$shere%3$s.', 'advanced-ads' ),
|
239 |
+
'<strong>WPML</strong>',
|
240 |
+
'<a href="' . ADVADS_URL . 'translating-ads-wpml/#utm_source=advanced-ads&utm_medium=link&utm_campaign=notice-WPML" target="_blank">',
|
241 |
+
'</a>'
|
242 |
+
),
|
243 |
+
'type' => 'notice',
|
244 |
+
'hide' => false,
|
245 |
+
'timeout' => YEAR_IN_SECONDS,
|
246 |
+
),
|
247 |
+
// AMP and Accelerated Mobile Pages plugins.
|
248 |
+
'AMP_active' => array(
|
249 |
+
'text' => sprintf(
|
250 |
+
// translators: %1$s is a plugin name, %2$s is the opening a tag and %3$s the closing one.
|
251 |
+
__( 'Learn how to integrate %1$s with Advanced Ads %2$shere%3$s.', 'advanced-ads' ),
|
252 |
+
'<strong>AMP</strong>',
|
253 |
+
'<a href="' . ADVADS_URL . 'manual/ads-on-amp-pages/#utm_source=advanced-ads&utm_medium=link&utm_campaign=notice-amp" target="_blank">',
|
254 |
+
'</a>'
|
255 |
+
),
|
256 |
+
'type' => 'notice',
|
257 |
+
'hide' => false,
|
258 |
+
'timeout' => YEAR_IN_SECONDS,
|
259 |
+
),
|
260 |
+
// Hosting on WP Engine
|
261 |
+
// Advanced_Ads_Checks::wp_engine_hosting().
|
262 |
+
'wpengine' => array(
|
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-aads&utm_medium=link&utm_campaign=notice-wpengine">' . __( 'Learn how this might impact your ad setup.', 'advanced-ads' ) . '</a>',
|
267 |
+
'WP Engine'
|
268 |
+
),
|
269 |
+
'type' => 'notice',
|
270 |
+
'hide' => false,
|
271 |
+
'timeout' => YEAR_IN_SECONDS,
|
272 |
+
),
|
273 |
)
|
274 |
);
|
admin/includes/class-ad-type.php
CHANGED
@@ -395,10 +395,9 @@ class Advanced_Ads_Admin_Ad_Type {
|
|
395 |
|
396 |
$image_id = ( isset( $_POST['advanced_ad']['output']['image_id'] ) ) ? absint( $_POST['advanced_ad']['output']['image_id'] ) : 0;
|
397 |
if ( $image_id ) {
|
398 |
-
$
|
399 |
-
|
400 |
-
|
401 |
-
add_post_meta( $image_id, '_advanced-ads_parent_id', $post_id, false );
|
402 |
}
|
403 |
}
|
404 |
|
@@ -668,7 +667,8 @@ class Advanced_Ads_Admin_Ad_Type {
|
|
668 |
global $typenow;
|
669 |
|
670 |
if ( isset( $typenow ) && $untranslated_text === 'You need a higher level of permission.' && $typenow === $this->post_type ) {
|
671 |
-
$translated_text = __( 'You don’t have access to ads. Please deactivate and re-enable Advanced Ads again to fix this.', 'advanced-ads' )
|
|
|
672 |
}
|
673 |
|
674 |
return $translated_text;
|
395 |
|
396 |
$image_id = ( isset( $_POST['advanced_ad']['output']['image_id'] ) ) ? absint( $_POST['advanced_ad']['output']['image_id'] ) : 0;
|
397 |
if ( $image_id ) {
|
398 |
+
$attachment = get_post( $image_id );
|
399 |
+
if ( $attachment && 0 === $attachment->post_parent ) {
|
400 |
+
wp_update_post( array( 'ID' => $image_id, 'post_parent' => $post_id ) );
|
|
|
401 |
}
|
402 |
}
|
403 |
|
667 |
global $typenow;
|
668 |
|
669 |
if ( isset( $typenow ) && $untranslated_text === 'You need a higher level of permission.' && $typenow === $this->post_type ) {
|
670 |
+
$translated_text = __( 'You don’t have access to ads. Please deactivate and re-enable Advanced Ads again to fix this.', 'advanced-ads' )
|
671 |
+
. ' <a href="' . ADVADS_URL . 'manual/user-capabilities/?utm_source=advanced-ads&utm_medium=link&utm_campaign=wrong-user-role#You_dont_have_access_to_ads" target="_blank">' . __( 'Get help', 'advanced-ads' ) . '</a>';
|
672 |
}
|
673 |
|
674 |
return $translated_text;
|
admin/includes/class-overview-widgets.php
CHANGED
@@ -26,7 +26,7 @@ class Advanced_Ads_Overview_Widgets_Callbacks {
|
|
26 |
|
27 |
// show errors
|
28 |
if( Advanced_Ads_Ad_Health_Notices::notices_enabled()
|
29 |
-
&& Advanced_Ads_Ad_Health_Notices::get_instance()->
|
30 |
self::add_meta_box('advads_overview_notices', false, 'full', 'render_notices' );
|
31 |
}
|
32 |
|
@@ -61,7 +61,7 @@ class Advanced_Ads_Overview_Widgets_Callbacks {
|
|
61 |
* @since 1.11.x
|
62 |
*/
|
63 |
public static function render_notices(){
|
64 |
-
|
65 |
/*?><span class="advads-loader"></span>
|
66 |
<script>jQuery( document ).ready( function(){ advads_display_ad_health_notices(); });</script><?php*/
|
67 |
Advanced_Ads_Ad_Health_Notices::get_instance()->render_widget();
|
@@ -155,7 +155,16 @@ class Advanced_Ads_Overview_Widgets_Callbacks {
|
|
155 |
<li><?php printf( __( '<a href="%s" target="_blank">FAQ and Support</a>', 'advanced-ads' ), ADVADS_URL . 'support/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-support' ); ?></li>
|
156 |
<li><?php printf( __( 'Thank the developer with a ★★★★★ review on <a href="%s" target="_blank">wordpress.org</a>', 'advanced-ads' ), 'https://wordpress.org/support/plugin/advanced-ads/reviews/?filter=5#new-post' ); ?></li>
|
157 |
</ul><?php
|
158 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
do_action( 'advanced-ads-overview-below-support' );
|
160 |
|
161 |
}
|
26 |
|
27 |
// show errors
|
28 |
if( Advanced_Ads_Ad_Health_Notices::notices_enabled()
|
29 |
+
&& count( Advanced_Ads_Ad_Health_Notices::get_instance()->displayed_notices ) ){
|
30 |
self::add_meta_box('advads_overview_notices', false, 'full', 'render_notices' );
|
31 |
}
|
32 |
|
61 |
* @since 1.11.x
|
62 |
*/
|
63 |
public static function render_notices(){
|
64 |
+
|
65 |
/*?><span class="advads-loader"></span>
|
66 |
<script>jQuery( document ).ready( function(){ advads_display_ad_health_notices(); });</script><?php*/
|
67 |
Advanced_Ads_Ad_Health_Notices::get_instance()->render_widget();
|
155 |
<li><?php printf( __( '<a href="%s" target="_blank">FAQ and Support</a>', 'advanced-ads' ), ADVADS_URL . 'support/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-support' ); ?></li>
|
156 |
<li><?php printf( __( 'Thank the developer with a ★★★★★ review on <a href="%s" target="_blank">wordpress.org</a>', 'advanced-ads' ), 'https://wordpress.org/support/plugin/advanced-ads/reviews/?filter=5#new-post' ); ?></li>
|
157 |
</ul><?php
|
158 |
+
|
159 |
+
$ignored_count = count( Advanced_Ads_Ad_Health_Notices::get_instance()->ignore );
|
160 |
+
$displayed_count = count( Advanced_Ads_Ad_Health_Notices::get_instance()->displayed_notices );
|
161 |
+
if( !$displayed_count && $ignored_count ){
|
162 |
+
// translators: %s includes a number and markup like <span class="count">6</span>.
|
163 |
+
?><p><span class="dashicons dashicons-warning"></span> <a href="<?php echo wp_nonce_url( admin_url( 'admin.php?page=advanced-ads&advads-show-hidden-notices=true' ), 'advanced-ads-show-hidden-notices', 'advads_nonce' ); ?>"><?php
|
164 |
+
printf( __( 'Show %s hidden notices', 'advanced-ads' ), $ignored_count );
|
165 |
+
?></a></p><?php
|
166 |
+
}
|
167 |
+
|
168 |
do_action( 'advanced-ads-overview-below-support' );
|
169 |
|
170 |
}
|
admin/views/ad-visitor-metabox.php
CHANGED
@@ -13,6 +13,7 @@ if ( ! defined( 'AAP_VERSION' ) ) {
|
|
13 |
$pro_conditions[] = __( 'referrer url', 'advanced-ads' );
|
14 |
$pro_conditions[] = __( 'user agent', 'advanced-ads' );
|
15 |
$pro_conditions[] = __( 'user can (capabilities)', 'advanced-ads' );
|
|
|
16 |
}
|
17 |
if ( ! defined( 'AAGT_VERSION' ) ) {
|
18 |
$pro_conditions[] = __( 'geo location', 'advanced-ads' );
|
13 |
$pro_conditions[] = __( 'referrer url', 'advanced-ads' );
|
14 |
$pro_conditions[] = __( 'user agent', 'advanced-ads' );
|
15 |
$pro_conditions[] = __( 'user can (capabilities)', 'advanced-ads' );
|
16 |
+
$pro_conditions[] = __( 'user role', 'advanced-ads' );
|
17 |
}
|
18 |
if ( ! defined( 'AAGT_VERSION' ) ) {
|
19 |
$pro_conditions[] = __( 'geo location', 'advanced-ads' );
|
admin/views/feedback-disable.php
CHANGED
@@ -17,6 +17,7 @@
|
|
17 |
?>
|
18 |
</label></li>
|
19 |
<?php endif; ?>
|
|
|
20 |
<li><label><input type="radio" name="advanced_ads_disable_reason" value="temporary"/><?php esc_attr_e( 'It is only temporary', 'advanced-ads' ); ?></label></li>
|
21 |
<li><label><input type="radio" name="advanced_ads_disable_reason" value="missing feature"/><?php esc_attr_e( 'I miss a feature', 'advanced-ads' ); ?></label></li>
|
22 |
<li><input type="text" name="advanced_ads_disable_text[]" value="" placeholder="<?php esc_attr_e( 'Which one?', 'advanced-ads' ); ?>"/></li>
|
17 |
?>
|
18 |
</label></li>
|
19 |
<?php endif; ?>
|
20 |
+
<li><label><input type="radio" name="advanced_ads_disable_reason" value="ads not showing up"/><?php esc_attr_e( 'Ads are not showing up', 'advanced-ads' ); ?></label></li>
|
21 |
<li><label><input type="radio" name="advanced_ads_disable_reason" value="temporary"/><?php esc_attr_e( 'It is only temporary', 'advanced-ads' ); ?></label></li>
|
22 |
<li><label><input type="radio" name="advanced_ads_disable_reason" value="missing feature"/><?php esc_attr_e( 'I miss a feature', 'advanced-ads' ); ?></label></li>
|
23 |
<li><input type="text" name="advanced_ads_disable_text[]" value="" placeholder="<?php esc_attr_e( 'Which one?', 'advanced-ads' ); ?>"/></li>
|
admin/views/notices/welcome-panel.php
CHANGED
@@ -17,7 +17,7 @@
|
|
17 |
</ul>
|
18 |
</div>
|
19 |
<div class="aa-welcome-panel-column aa-welcome-panel-last">
|
20 |
-
<h3><?php _e( 'Get
|
21 |
<ul>
|
22 |
<li><?php printf( __( '<a href="%s" target="_blank">Manual</a>', 'advanced-ads' ), ADVADS_URL . 'manual/#utm_source=advanced-ads&utm_medium=link&utm_campaign=welcome-manual' ); ?></li>
|
23 |
<li><a href="<?php echo ADVADS_URL . 'support/#utm_source=advanced-ads&utm_medium=link&utm_campaign=welcome-support'; ?>" target="_blank"><?php _e( 'Reach out for help', 'advanced-ads' ); ?></a></li>
|
17 |
</ul>
|
18 |
</div>
|
19 |
<div class="aa-welcome-panel-column aa-welcome-panel-last">
|
20 |
+
<h3><?php _e( 'Get help', 'advanced-ads' ); ?></h3>
|
21 |
<ul>
|
22 |
<li><?php printf( __( '<a href="%s" target="_blank">Manual</a>', 'advanced-ads' ), ADVADS_URL . 'manual/#utm_source=advanced-ads&utm_medium=link&utm_campaign=welcome-manual' ); ?></li>
|
23 |
<li><a href="<?php echo ADVADS_URL . 'support/#utm_source=advanced-ads&utm_medium=link&utm_campaign=welcome-support'; ?>" target="_blank"><?php _e( 'Reach out for help', 'advanced-ads' ); ?></a></li>
|
admin/views/overview-notice-row.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<li data-notice="<?php echo esc_attr( $_notice_key ); ?>" <?php echo $is_hidden ? 'style="display: none;"' : ''; ?>>
|
2 |
<span><?php echo $text; ?></span>
|
3 |
<?php if ( $can_hide ) : ?>
|
4 |
-
<button type="button" class="advads-ad-health-notice-hide<?php echo ! $hide ? ' remove' : ''; ?>"><span class="dashicons dashicons-
|
5 |
<?php endif; ?>
|
6 |
<?php if ( $date ) : ?>
|
7 |
<span class="date"><?php echo esc_attr( $date ); ?></span>
|
1 |
<li data-notice="<?php echo esc_attr( $_notice_key ); ?>" <?php echo $is_hidden ? 'style="display: none;"' : ''; ?>>
|
2 |
<span><?php echo $text; ?></span>
|
3 |
<?php if ( $can_hide ) : ?>
|
4 |
+
<button type="button" class="advads-ad-health-notice-hide<?php echo ! $hide ? ' remove' : ''; ?>"><span class="dashicons dashicons-no-alt"></span></button>
|
5 |
<?php endif; ?>
|
6 |
<?php if ( $date ) : ?>
|
7 |
<span class="date"><?php echo esc_attr( $date ); ?></span>
|
admin/views/overview-notices.php
CHANGED
@@ -14,7 +14,7 @@ Advanced_Ads_Ad_Health_Notices::get_instance()->display_notices();
|
|
14 |
<p class="adsvads-ad-health-notices-show-hidden" <?php echo ! $ignored_count ? 'style="display: none;"' : ''; ?>><?php
|
15 |
printf(
|
16 |
// translators: %s includes a number and markup like <span class="count">6</span>.
|
17 |
-
__( 'Show %s hidden', 'advanced-ads' ), '<span class="count">' . $ignored_count . '</span>' );
|
18 |
?>
|
19 |
<button type="button"><span class="dashicons dashicons-visibility"></span></button>
|
20 |
</p>
|
14 |
<p class="adsvads-ad-health-notices-show-hidden" <?php echo ! $ignored_count ? 'style="display: none;"' : ''; ?>><?php
|
15 |
printf(
|
16 |
// translators: %s includes a number and markup like <span class="count">6</span>.
|
17 |
+
__( 'Show %s hidden notices', 'advanced-ads' ), '<span class="count">' . $ignored_count . '</span>' );
|
18 |
?>
|
19 |
<button type="button"><span class="dashicons dashicons-visibility"></span></button>
|
20 |
</p>
|
admin/views/overview.php
CHANGED
@@ -5,11 +5,12 @@
|
|
5 |
|
6 |
$title = __( 'Ads Dashboard', 'advanced-ads' );
|
7 |
|
8 |
-
|
|
|
9 |
<h1><?php echo esc_html( $title ); ?></h1>
|
10 |
|
11 |
<div id="advads-overview">
|
12 |
-
|
13 |
</div><!-- dashboard-widgets-wrap -->
|
14 |
<?php do_action( 'advanced-ads-admin-overview-after' ); ?>
|
15 |
</div><!-- wrap -->
|
5 |
|
6 |
$title = __( 'Ads Dashboard', 'advanced-ads' );
|
7 |
|
8 |
+
?>
|
9 |
+
<div class="wrap">
|
10 |
<h1><?php echo esc_html( $title ); ?></h1>
|
11 |
|
12 |
<div id="advads-overview">
|
13 |
+
<?php Advanced_Ads_Overview_Widgets_Callbacks::setup_overview_widgets(); ?>
|
14 |
</div><!-- dashboard-widgets-wrap -->
|
15 |
<?php do_action( 'advanced-ads-admin-overview-after' ); ?>
|
16 |
</div><!-- wrap -->
|
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.7
|
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.7' );
|
43 |
|
44 |
/*----------------------------------------------------------------------------*
|
45 |
* Autoloading, modules and functions
|
classes/ad-health-notices.php
CHANGED
@@ -156,13 +156,48 @@ class Advanced_Ads_Ad_Health_Notices {
|
|
156 |
// load notices from "notices".
|
157 |
$this->notices = isset( $options['notices'] ) ? $options['notices'] : array();
|
158 |
|
159 |
-
|
|
|
|
|
160 |
foreach ( $this->notices as $_key => $_notice ) {
|
|
|
161 |
if ( empty( $_key ) ) {
|
162 |
unset( $this->notices[ $_key ] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
}
|
164 |
}
|
165 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
// load hidden notices.
|
167 |
$this->ignore = $this->get_valid_ignored();
|
168 |
|
@@ -174,13 +209,14 @@ class Advanced_Ads_Ad_Health_Notices {
|
|
174 |
|
175 |
/**
|
176 |
* Manage when to run checks
|
|
|
177 |
* - once per day on any backend page
|
178 |
* - on each Advanced Ads related page
|
179 |
*/
|
180 |
public function run_checks() {
|
181 |
|
182 |
-
// run in WP Admin only.
|
183 |
-
if ( ! is_admin() ) {
|
184 |
return;
|
185 |
}
|
186 |
|
@@ -213,11 +249,6 @@ class Advanced_Ads_Ad_Health_Notices {
|
|
213 |
} else {
|
214 |
$this->remove( 'cache_no_pro' );
|
215 |
}
|
216 |
-
if ( Advanced_Ads_Checks::plugin_updates_available() ) {
|
217 |
-
$this->add( 'plugin_updates_available' );
|
218 |
-
} else {
|
219 |
-
$this->remove( 'plugin_updates_available' );
|
220 |
-
}
|
221 |
if ( Advanced_Ads_Checks::active_autoptimize() && ! defined( 'AAP_VERSION' ) ) {
|
222 |
$this->add( 'autoptimize_no_pro' );
|
223 |
} else {
|
@@ -238,9 +269,6 @@ class Advanced_Ads_Ad_Health_Notices {
|
|
238 |
} else {
|
239 |
$this->remove( 'ads_disabled' );
|
240 |
}
|
241 |
-
if ( defined( 'IS_WPCOM' ) ) {
|
242 |
-
$this->add( 'wp_com' );
|
243 |
-
}
|
244 |
if ( Advanced_Ads_Checks::get_defined_constants() ) {
|
245 |
$this->add( 'constants_enabled' );
|
246 |
} else {
|
@@ -256,10 +284,28 @@ class Advanced_Ads_Ad_Health_Notices {
|
|
256 |
} else {
|
257 |
$this->remove( 'license_invalid' );
|
258 |
}
|
259 |
-
if ( !
|
260 |
-
$this->add( '
|
261 |
} else {
|
262 |
-
$this->remove( '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
263 |
}
|
264 |
|
265 |
set_transient( self::DAILY_CHECK_TRANSIENT_NAME, true, DAY_IN_SECONDS );
|
@@ -374,6 +420,10 @@ class Advanced_Ads_Ad_Health_Notices {
|
|
374 |
if ( ! empty( $atts['append_text'] ) ) {
|
375 |
$notices[ $notice_key ]['append_text'] = isset( $notices[ $notice_key ]['append_text'] ) ? $notices[ $notice_key ]['append_text'] . $atts['append_text'] : $atts['append_text'];
|
376 |
}
|
|
|
|
|
|
|
|
|
377 |
}
|
378 |
|
379 |
// update db.
|
@@ -394,6 +444,14 @@ class Advanced_Ads_Ad_Health_Notices {
|
|
394 |
// get original notice array for the "hide" attribute.
|
395 |
$notice_array = $this->get_notice_array_for_key( $notice_key );
|
396 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
397 |
if ( isset( $notice_array['hide'] ) && false === $notice_array['hide'] ) {
|
398 |
// remove item.
|
399 |
self::get_instance()->remove( $notice_key );
|
@@ -442,7 +500,7 @@ class Advanced_Ads_Ad_Health_Notices {
|
|
442 |
* adds notice key into "ignore" array
|
443 |
* does not remove it from "notices" array
|
444 |
*
|
445 |
-
* @param
|
446 |
*/
|
447 |
public function ignore( $notice_key ) {
|
448 |
|
@@ -517,7 +575,7 @@ class Advanced_Ads_Ad_Health_Notices {
|
|
517 |
|
518 |
// iterate through notices.
|
519 |
?>
|
520 |
-
|
521 |
|
522 |
// failsafe in case this is not an array.
|
523 |
if ( ! is_array( $this->notices ) ) {
|
@@ -527,7 +585,13 @@ class Advanced_Ads_Ad_Health_Notices {
|
|
527 |
foreach ( $this->notices as $_notice_key => $_notice ) {
|
528 |
|
529 |
$notice_array = $this->get_notice_array_for_key( $_notice_key );
|
530 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
531 |
|
532 |
// skip if type is not correct.
|
533 |
if ( $notice_type !== $type ) {
|
@@ -648,7 +712,6 @@ class Advanced_Ads_Ad_Health_Notices {
|
|
648 |
return $ignore;
|
649 |
}
|
650 |
|
651 |
-
|
652 |
/**
|
653 |
* Check if there are visible problems (notices of type "problem")
|
654 |
*
|
@@ -666,7 +729,7 @@ class Advanced_Ads_Ad_Health_Notices {
|
|
666 |
/**
|
667 |
* Get visible notices by type – hidden and displayed
|
668 |
*
|
669 |
-
* @param
|
670 |
*
|
671 |
* @return array
|
672 |
*/
|
@@ -702,7 +765,7 @@ class Advanced_Ads_Ad_Health_Notices {
|
|
702 |
/**
|
703 |
* Check if there are visible notices for a given type
|
704 |
*
|
705 |
-
* @param
|
706 |
*
|
707 |
* @return integer
|
708 |
*/
|
@@ -722,7 +785,7 @@ class Advanced_Ads_Ad_Health_Notices {
|
|
722 |
* Get the notice array for a notice key
|
723 |
* useful, if a notice key was manipulated
|
724 |
*
|
725 |
-
* @param
|
726 |
*
|
727 |
* @return array type
|
728 |
*/
|
@@ -776,7 +839,7 @@ class Advanced_Ads_Ad_Health_Notices {
|
|
776 |
/**
|
777 |
* Return a "Get Help" link
|
778 |
*
|
779 |
-
* @param
|
780 |
*
|
781 |
* @return string HTML of the target link
|
782 |
*/
|
156 |
// load notices from "notices".
|
157 |
$this->notices = isset( $options['notices'] ) ? $options['notices'] : array();
|
158 |
|
159 |
+
/**
|
160 |
+
* Cleanup notices
|
161 |
+
*/
|
162 |
foreach ( $this->notices as $_key => $_notice ) {
|
163 |
+
// without valid key caused by an issue prior to 1.13.3.
|
164 |
if ( empty( $_key ) ) {
|
165 |
unset( $this->notices[ $_key ] );
|
166 |
+
};
|
167 |
+
|
168 |
+
$time = current_time( 'timestamp', 0 );
|
169 |
+
$notice_array = $this->get_notice_array_for_key( $_key );
|
170 |
+
|
171 |
+
// handle notices with a timeout.
|
172 |
+
if ( isset( $_notice['closed'] ) ) {
|
173 |
+
// remove notice when timeout expired – was closed longer ago than timeout set in the notice options.
|
174 |
+
if ( empty( $notice_array['timeout'] )
|
175 |
+
|| ( ( $time - $_notice['closed'] ) > $notice_array['timeout'] ) ) {
|
176 |
+
$this->remove( $_key );
|
177 |
+
} else {
|
178 |
+
// just ignore notice if timeout is still valid.
|
179 |
+
unset( $this->notices[ $_key ] );
|
180 |
+
}
|
181 |
}
|
182 |
}
|
183 |
|
184 |
+
// unignore notices if `show-hidden=true` is set in the URL.
|
185 |
+
if ( isset( $_GET['advads_nonce'] ) && wp_verify_nonce( wp_unslash( $_GET['advads_nonce'] ), 'advanced-ads-show-hidden-notices' )
|
186 |
+
&& isset( $_GET['advads-show-hidden-notices'] ) && 'true' === $_GET['advads-show-hidden-notices'] ) {
|
187 |
+
$this->unignore();
|
188 |
+
// remove the argument from the URL.
|
189 |
+
add_filter(
|
190 |
+
'removable_query_args',
|
191 |
+
function ( $removable_query_args ) {
|
192 |
+
$removable_query_args[] = 'advads-show-hidden-notices';
|
193 |
+
$removable_query_args[] = 'advads_nonce';
|
194 |
+
|
195 |
+
return $removable_query_args;
|
196 |
+
}
|
197 |
+
);
|
198 |
+
}
|
199 |
+
|
200 |
+
|
201 |
// load hidden notices.
|
202 |
$this->ignore = $this->get_valid_ignored();
|
203 |
|
209 |
|
210 |
/**
|
211 |
* Manage when to run checks
|
212 |
+
* - only when users have ads
|
213 |
* - once per day on any backend page
|
214 |
* - on each Advanced Ads related page
|
215 |
*/
|
216 |
public function run_checks() {
|
217 |
|
218 |
+
// run in WP Admin only and if there are any ads.
|
219 |
+
if ( ! is_admin() || ! Advanced_Ads::get_number_of_ads() ) {
|
220 |
return;
|
221 |
}
|
222 |
|
249 |
} else {
|
250 |
$this->remove( 'cache_no_pro' );
|
251 |
}
|
|
|
|
|
|
|
|
|
|
|
252 |
if ( Advanced_Ads_Checks::active_autoptimize() && ! defined( 'AAP_VERSION' ) ) {
|
253 |
$this->add( 'autoptimize_no_pro' );
|
254 |
} else {
|
269 |
} else {
|
270 |
$this->remove( 'ads_disabled' );
|
271 |
}
|
|
|
|
|
|
|
272 |
if ( Advanced_Ads_Checks::get_defined_constants() ) {
|
273 |
$this->add( 'constants_enabled' );
|
274 |
} else {
|
284 |
} else {
|
285 |
$this->remove( 'license_invalid' );
|
286 |
}
|
287 |
+
if ( class_exists( 'BuddyPress', false ) && ! defined( 'AAP_VERSION' ) ) {
|
288 |
+
$this->add( 'buddypress_no_pro' );
|
289 |
} else {
|
290 |
+
$this->remove( 'buddypress_no_pro' );
|
291 |
+
}
|
292 |
+
if ( class_exists( 'bbPress', false ) && ! defined( 'AAP_VERSION' ) ) {
|
293 |
+
$this->add( 'bbpress_no_pro' );
|
294 |
+
} else {
|
295 |
+
$this->remove( 'bbpress_no_pro' );
|
296 |
+
}
|
297 |
+
if ( defined( 'ICL_SITEPRESS_VERSION' ) ) {
|
298 |
+
$this->add( 'WPML_active' );
|
299 |
+
} else {
|
300 |
+
$this->remove( 'WPML_active' );
|
301 |
+
}
|
302 |
+
if ( Advanced_Ads_Checks::active_amp_plugin() ) {
|
303 |
+
$this->add( 'AMP_active' );
|
304 |
+
} else {
|
305 |
+
$this->remove( 'AMP_active' );
|
306 |
+
}
|
307 |
+
if ( Advanced_Ads_Checks::wp_engine_hosting() ) {
|
308 |
+
$this->add( 'wpengine' );
|
309 |
}
|
310 |
|
311 |
set_transient( self::DAILY_CHECK_TRANSIENT_NAME, true, DAY_IN_SECONDS );
|
420 |
if ( ! empty( $atts['append_text'] ) ) {
|
421 |
$notices[ $notice_key ]['append_text'] = isset( $notices[ $notice_key ]['append_text'] ) ? $notices[ $notice_key ]['append_text'] . $atts['append_text'] : $atts['append_text'];
|
422 |
}
|
423 |
+
// add `closed` marker, if given.
|
424 |
+
if ( ! empty( $atts['closed'] ) ) {
|
425 |
+
$notices[ $notice_key ]['closed'] = absint( $atts['closed'] );
|
426 |
+
}
|
427 |
}
|
428 |
|
429 |
// update db.
|
444 |
// get original notice array for the "hide" attribute.
|
445 |
$notice_array = $this->get_notice_array_for_key( $notice_key );
|
446 |
|
447 |
+
// handle notices with a timeout.
|
448 |
+
// set `closed` timestamp if the notice definition has a timeout information.
|
449 |
+
if ( isset( $notice_array['timeout'] ) ) {
|
450 |
+
$this->update( $notice_key, array( 'closed' => current_time( 'timestamp', 0 ) ) );
|
451 |
+
|
452 |
+
return;
|
453 |
+
}
|
454 |
+
|
455 |
if ( isset( $notice_array['hide'] ) && false === $notice_array['hide'] ) {
|
456 |
// remove item.
|
457 |
self::get_instance()->remove( $notice_key );
|
500 |
* adds notice key into "ignore" array
|
501 |
* does not remove it from "notices" array
|
502 |
*
|
503 |
+
* @param string $notice_key key of the notice to be ignored.
|
504 |
*/
|
505 |
public function ignore( $notice_key ) {
|
506 |
|
575 |
|
576 |
// iterate through notices.
|
577 |
?>
|
578 |
+
<ul class="advads-ad-health-notices advads-ad-health-notices-<?php echo $type; ?>"><?php
|
579 |
|
580 |
// failsafe in case this is not an array.
|
581 |
if ( ! is_array( $this->notices ) ) {
|
585 |
foreach ( $this->notices as $_notice_key => $_notice ) {
|
586 |
|
587 |
$notice_array = $this->get_notice_array_for_key( $_notice_key );
|
588 |
+
|
589 |
+
// remove the notice if key doesn’t exist anymore.
|
590 |
+
if ( array() === $notice_array ) {
|
591 |
+
$this->remove( $_notice_key );
|
592 |
+
}
|
593 |
+
|
594 |
+
$notice_type = isset( $notice_array['type'] ) ? $notice_array['type'] : 'problem';
|
595 |
|
596 |
// skip if type is not correct.
|
597 |
if ( $notice_type !== $type ) {
|
712 |
return $ignore;
|
713 |
}
|
714 |
|
|
|
715 |
/**
|
716 |
* Check if there are visible problems (notices of type "problem")
|
717 |
*
|
729 |
/**
|
730 |
* Get visible notices by type – hidden and displayed
|
731 |
*
|
732 |
+
* @param string $type type of the notice.
|
733 |
*
|
734 |
* @return array
|
735 |
*/
|
765 |
/**
|
766 |
* Check if there are visible notices for a given type
|
767 |
*
|
768 |
+
* @param string $type type of the notice.
|
769 |
*
|
770 |
* @return integer
|
771 |
*/
|
785 |
* Get the notice array for a notice key
|
786 |
* useful, if a notice key was manipulated
|
787 |
*
|
788 |
+
* @param string $notice_key key of the notice.
|
789 |
*
|
790 |
* @return array type
|
791 |
*/
|
839 |
/**
|
840 |
* Return a "Get Help" link
|
841 |
*
|
842 |
+
* @param string $link target URL.
|
843 |
*
|
844 |
* @return string HTML of the target link
|
845 |
*/
|
classes/ad.php
CHANGED
@@ -783,7 +783,7 @@ class Advanced_Ads_Ad {
|
|
783 |
}
|
784 |
|
785 |
// add edit button for users with the appropriate rights
|
786 |
-
if( current_user_can( Advanced_Ads_Plugin::user_cap( 'advanced_ads_edit_ads') ) ){
|
787 |
ob_start();
|
788 |
include ADVADS_BASE_PATH . 'public/views/ad-edit-bar.php';
|
789 |
$ad_content = ob_get_clean() . $ad_content;
|
783 |
}
|
784 |
|
785 |
// add edit button for users with the appropriate rights
|
786 |
+
if( ! defined( 'ADVANCED_ADS_DISABLE_EDIT_BAR' ) && current_user_can( Advanced_Ads_Plugin::user_cap( 'advanced_ads_edit_ads') ) ){
|
787 |
ob_start();
|
788 |
include ADVADS_BASE_PATH . 'public/views/ad-edit-bar.php';
|
789 |
$ad_content = ob_get_clean() . $ad_content;
|
classes/checks.php
CHANGED
@@ -71,26 +71,6 @@ class Advanced_Ads_Checks {
|
|
71 |
return false;
|
72 |
}
|
73 |
|
74 |
-
/**
|
75 |
-
* any plugin updates available
|
76 |
-
*
|
77 |
-
* @return bool true if plugin updates are available
|
78 |
-
*/
|
79 |
-
public static function plugin_updates_available(){
|
80 |
-
|
81 |
-
// iterate throught the plugins and check if any of them is ours (i.e., starts with the string "advanced-ads")
|
82 |
-
$update_plugins = get_site_transient( 'update_plugins' );
|
83 |
-
if ( ! empty( $update_plugins->response ) ) {
|
84 |
-
foreach( $update_plugins->response as $_key => $_responsive ){
|
85 |
-
if( 0 === strpos( $_key, 'advanced-ads') ){
|
86 |
-
return true;
|
87 |
-
}
|
88 |
-
}
|
89 |
-
}
|
90 |
-
|
91 |
-
return false;
|
92 |
-
}
|
93 |
-
|
94 |
/**
|
95 |
* check if license keys are missing or invalid or expired
|
96 |
*
|
@@ -180,6 +160,30 @@ class Advanced_Ads_Checks {
|
|
180 |
}
|
181 |
return false;
|
182 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
|
184 |
/**
|
185 |
* checks if the preconditions are met to wrap an ad with <!--noptimize--> comments
|
@@ -295,6 +299,20 @@ class Advanced_Ads_Checks {
|
|
295 |
}
|
296 |
return $result;
|
297 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
298 |
|
299 |
/**
|
300 |
* Notice for Adblocker module if assets have expired
|
71 |
return false;
|
72 |
}
|
73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
/**
|
75 |
* check if license keys are missing or invalid or expired
|
76 |
*
|
160 |
}
|
161 |
return false;
|
162 |
}
|
163 |
+
|
164 |
+
/**
|
165 |
+
* Any AMP plugin enabled
|
166 |
+
*
|
167 |
+
* @return bool true if AMP plugin is installed
|
168 |
+
*/
|
169 |
+
public static function active_amp_plugin(){
|
170 |
+
// Accelerated Mobile Pages
|
171 |
+
if( function_exists( 'ampforwp_is_amp_endpoint' ) ){
|
172 |
+
return true;
|
173 |
+
}
|
174 |
+
|
175 |
+
// AMP plugin
|
176 |
+
if( function_exists( 'is_amp_endpoint' ) ){
|
177 |
+
return true;
|
178 |
+
}
|
179 |
+
|
180 |
+
// other plugins
|
181 |
+
if ( function_exists( 'is_wp_amp' ) ){
|
182 |
+
return true;
|
183 |
+
}
|
184 |
+
|
185 |
+
return false;
|
186 |
+
}
|
187 |
|
188 |
/**
|
189 |
* checks if the preconditions are met to wrap an ad with <!--noptimize--> comments
|
299 |
}
|
300 |
return $result;
|
301 |
}
|
302 |
+
|
303 |
+
|
304 |
+
/**
|
305 |
+
* WP Engine hosting detected
|
306 |
+
*
|
307 |
+
* @return bool true if site is hosted by WP Engine
|
308 |
+
*/
|
309 |
+
public static function wp_engine_hosting(){
|
310 |
+
if( defined( 'WPE_APIKEY' ) ){
|
311 |
+
return true;
|
312 |
+
}
|
313 |
+
|
314 |
+
return false;
|
315 |
+
}
|
316 |
|
317 |
/**
|
318 |
* Notice for Adblocker module if assets have expired
|
classes/compatibility.php
CHANGED
@@ -18,6 +18,8 @@ class Advanced_Ads_Compatibility {
|
|
18 |
}
|
19 |
// WPML.
|
20 |
add_filter( 'wpml_admin_language_switcher_active_languages', array( $this, 'wpml_language_switcher' ) );
|
|
|
|
|
21 |
}
|
22 |
|
23 |
/**
|
@@ -90,4 +92,32 @@ class Advanced_Ads_Compatibility {
|
|
90 |
|
91 |
return $active_languages;
|
92 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
}
|
18 |
}
|
19 |
// WPML.
|
20 |
add_filter( 'wpml_admin_language_switcher_active_languages', array( $this, 'wpml_language_switcher' ) );
|
21 |
+
// Wordpress SEO by Yoast.
|
22 |
+
add_filter( 'wpseo_sitemap_entry', array( $this, 'wordpress_seo_noindex_ad_attachments' ), 10, 3 );
|
23 |
}
|
24 |
|
25 |
/**
|
92 |
|
93 |
return $active_languages;
|
94 |
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Wordpress SEO: remove attachments attached to ads from `/attachment-sitemap.xml`.
|
98 |
+
*
|
99 |
+
* @param array $url Array of URL parts.
|
100 |
+
* @param string $type URL type.
|
101 |
+
* @param obj $post WP_Post object of attachment.
|
102 |
+
* @return array/bool Unmodified array of URL parts or false to remove URL.
|
103 |
+
*/
|
104 |
+
public function wordpress_seo_noindex_ad_attachments( $url, $type, $post ) {
|
105 |
+
if ( 'post' !== $type ) {
|
106 |
+
return $url;
|
107 |
+
}
|
108 |
+
|
109 |
+
static $ad_ids = null;
|
110 |
+
if ( null === $ad_ids ) {
|
111 |
+
$ad_ids = Advanced_Ads::get_instance()->get_model()->get_ads( array(
|
112 |
+
'post_status' => 'any',
|
113 |
+
'fields' => 'ids'
|
114 |
+
) );
|
115 |
+
}
|
116 |
+
|
117 |
+
if ( isset( $post->post_parent ) && in_array( $post->post_parent, $ad_ids, true ) ) {
|
118 |
+
return false;
|
119 |
+
}
|
120 |
+
|
121 |
+
return $url;
|
122 |
+
}
|
123 |
}
|
classes/frontend_checks.php
CHANGED
@@ -7,6 +7,7 @@ class Advanced_Ads_Frontend_Checks {
|
|
7 |
* @var bool
|
8 |
*/
|
9 |
private $did_the_content = false;
|
|
|
10 |
|
11 |
public function __construct() {
|
12 |
add_action( 'init', array( $this, 'init' ) );
|
@@ -125,26 +126,34 @@ class Advanced_Ads_Frontend_Checks {
|
|
125 |
) );
|
126 |
|
127 |
if ( $wp_the_query->is_singular() ) {
|
128 |
-
if ( ! $this->did_the_content ) {
|
129 |
-
$
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
148 |
}
|
149 |
|
150 |
if ( ! empty( $post->ID ) ) {
|
@@ -412,6 +421,10 @@ class Advanced_Ads_Frontend_Checks {
|
|
412 |
if ( ! $this->did_the_content ) {
|
413 |
$this->did_the_content = true;
|
414 |
}
|
|
|
|
|
|
|
|
|
415 |
return $content;
|
416 |
}
|
417 |
|
@@ -792,4 +805,22 @@ class Advanced_Ads_Frontend_Checks {
|
|
792 |
|
793 |
return $dom;
|
794 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
795 |
}
|
7 |
* @var bool
|
8 |
*/
|
9 |
private $did_the_content = false;
|
10 |
+
private $has_many_the_content = false;
|
11 |
|
12 |
public function __construct() {
|
13 |
add_action( 'init', array( $this, 'init' ) );
|
126 |
) );
|
127 |
|
128 |
if ( $wp_the_query->is_singular() ) {
|
129 |
+
if ( ! $this->did_the_content && $this->has_the_content_placements() ) {
|
130 |
+
$nodes[] = array( 'type' => 1, 'data' => array(
|
131 |
+
'parent' => 'advanced_ads_ad_health',
|
132 |
+
'id' => 'advanced_ads_ad_health_the_content_not_invoked',
|
133 |
+
'title' => sprintf( __( '<em>%s</em> filter does not exist', 'advanced-ads' ), 'the_content' ),
|
134 |
+
'href' => ADVADS_URL . 'manual/ads-not-showing-up/?utm_source=advanced-ads&utm_medium=link&utm_campaign=adhealth-content-filter-missing#the_content-filter-missing',
|
135 |
+
'meta' => array(
|
136 |
+
'class' => 'advanced_ads_ad_health_warning',
|
137 |
+
'target' => '_blank'
|
138 |
+
)
|
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',
|
145 |
+
'id' => 'advanced_ads_ad_health_nested_the_content',
|
146 |
+
'title' => sprintf(
|
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' => false,
|
151 |
+
'meta' => array(
|
152 |
+
'class' => 'advanced_ads_ad_health_warning',
|
153 |
+
'target' => '_blank'
|
154 |
+
)
|
155 |
+
) );
|
156 |
+
Advanced_Ads_Ad_Health_Notices::get_instance()->add( 'nested_the_content_filters' );
|
157 |
}
|
158 |
|
159 |
if ( ! empty( $post->ID ) ) {
|
421 |
if ( ! $this->did_the_content ) {
|
422 |
$this->did_the_content = true;
|
423 |
}
|
424 |
+
|
425 |
+
if ( Advanced_Ads::get_instance()->has_many_the_content() ) {
|
426 |
+
$this->has_many_the_content = true;
|
427 |
+
}
|
428 |
return $content;
|
429 |
}
|
430 |
|
805 |
|
806 |
return $dom;
|
807 |
}
|
808 |
+
|
809 |
+
/**
|
810 |
+
* Check if at least one placement uses `the_content`.
|
811 |
+
*
|
812 |
+
* @return bool True/False.
|
813 |
+
*/
|
814 |
+
private function has_the_content_placements() {
|
815 |
+
$placements = Advanced_Ads::get_ad_placements_array();
|
816 |
+
$placement_types = Advanced_Ads_Placements::get_placement_types();
|
817 |
+
// Find a placement that depends on 'the_content' filter.
|
818 |
+
foreach ( $placements as $placement ) {
|
819 |
+
if ( isset ( $placement['type'] )
|
820 |
+
&& ! empty( $placement_types[ $placement['type'] ]['options']['uses_the_content'] ) ) {
|
821 |
+
return true;
|
822 |
+
}
|
823 |
+
}
|
824 |
+
return false;
|
825 |
+
}
|
826 |
}
|
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-
|
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"
|
@@ -31,7 +31,7 @@ msgid "or"
|
|
31 |
msgstr ""
|
32 |
|
33 |
#: admin/class-advanced-ads-admin.php:223 classes/display-conditions.php:215
|
34 |
-
#: classes/visitor-conditions.php:242 admin/views/ad-visitor-metabox.php:
|
35 |
msgid "and"
|
36 |
msgstr ""
|
37 |
|
@@ -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,15 +116,15 @@ 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:
|
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:
|
128 |
#: modules/gadsense/includes/class-mapi.php:1362
|
129 |
#, php-format
|
130 |
msgid "Learn more about AdSense account issues %1$shere%2$s."
|
@@ -524,109 +524,116 @@ msgstr ""
|
|
524 |
msgid "Unable to locate needed folder (%s)."
|
525 |
msgstr ""
|
526 |
|
527 |
-
#: classes/frontend_checks.php:
|
528 |
msgid "Random AdSense ads"
|
529 |
msgstr ""
|
530 |
|
531 |
-
#: classes/frontend_checks.php:
|
532 |
msgid "You look like a bot"
|
533 |
msgstr ""
|
534 |
|
535 |
-
#: classes/frontend_checks.php:
|
536 |
msgid "Ad blocker enabled"
|
537 |
msgstr ""
|
538 |
|
539 |
-
#: classes/frontend_checks.php:
|
540 |
#, php-format
|
541 |
msgid "<em>%s</em> filter does not exist"
|
542 |
msgstr ""
|
543 |
|
544 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
545 |
msgid "Ads are disabled on this page"
|
546 |
msgstr ""
|
547 |
|
548 |
-
#: classes/frontend_checks.php:
|
549 |
msgid "Ads are disabled in the content of this page"
|
550 |
msgstr ""
|
551 |
|
552 |
-
#: classes/frontend_checks.php:
|
553 |
msgid "the current post ID is 0 "
|
554 |
msgstr ""
|
555 |
|
556 |
-
#: classes/frontend_checks.php:
|
557 |
msgid "Ads are disabled on all pages"
|
558 |
msgstr ""
|
559 |
|
560 |
-
#: classes/frontend_checks.php:
|
561 |
msgid "Ads are disabled on 404 pages"
|
562 |
msgstr ""
|
563 |
|
564 |
-
#: classes/frontend_checks.php:
|
565 |
msgid "Ads are disabled on non singular pages"
|
566 |
msgstr ""
|
567 |
|
568 |
-
#: classes/frontend_checks.php:
|
569 |
#, php-format
|
570 |
msgid "Ad IDs: %s"
|
571 |
msgstr ""
|
572 |
|
573 |
-
#: classes/frontend_checks.php:
|
574 |
#, php-format
|
575 |
msgid "Visible ads should not use the Header placement: %s"
|
576 |
msgstr ""
|
577 |
|
578 |
-
#: classes/frontend_checks.php:
|
579 |
msgid "AdSense violation"
|
580 |
msgstr ""
|
581 |
|
582 |
-
#: classes/frontend_checks.php:
|
583 |
msgid "Ad is hidden"
|
584 |
msgstr ""
|
585 |
|
586 |
-
#: classes/frontend_checks.php:
|
587 |
#, php-format
|
588 |
msgid "IDs: %s"
|
589 |
msgstr ""
|
590 |
|
591 |
-
#: classes/frontend_checks.php:
|
592 |
#, php-format
|
593 |
msgid "The following responsive AdSense ads are not showing up: %s"
|
594 |
msgstr ""
|
595 |
|
596 |
-
#: classes/frontend_checks.php:
|
597 |
msgid "Consent not given"
|
598 |
msgstr ""
|
599 |
|
600 |
-
#: classes/frontend_checks.php:
|
601 |
msgid "debug DFP ads"
|
602 |
msgstr ""
|
603 |
|
604 |
-
#: classes/frontend_checks.php:
|
605 |
msgid "highlight ads"
|
606 |
msgstr ""
|
607 |
|
608 |
-
#: classes/frontend_checks.php:
|
609 |
msgid "Auto ads code found"
|
610 |
msgstr ""
|
611 |
|
612 |
-
#: classes/frontend_checks.php:
|
613 |
msgid "Ad Health"
|
614 |
msgstr ""
|
615 |
|
616 |
-
#: classes/frontend_checks.php:
|
617 |
#, php-format
|
618 |
msgid "Show %d more notifications"
|
619 |
msgstr ""
|
620 |
|
621 |
-
#: classes/frontend_checks.php:
|
622 |
msgid "Everything is fine"
|
623 |
msgstr ""
|
624 |
|
625 |
-
#: classes/frontend_checks.php:
|
|
|
626 |
msgid "Get help"
|
627 |
msgstr ""
|
628 |
|
629 |
-
#: classes/frontend_checks.php:
|
630 |
msgid ""
|
631 |
"the following code is used for automatic error detection and only visible to "
|
632 |
"admins"
|
@@ -705,7 +712,7 @@ msgstr ""
|
|
705 |
msgid "Ad Groups"
|
706 |
msgstr ""
|
707 |
|
708 |
-
#: classes/widget.php:93 public/class-advanced-ads.php:
|
709 |
#: admin/includes/class-menu.php:68 admin/includes/class-menu.php:68
|
710 |
#: admin/includes/class-shortcode-creator.php:84
|
711 |
#: admin/views/ad-group-list-form-row.php:90
|
@@ -742,70 +749,70 @@ msgstr ""
|
|
742 |
msgid "Individual Posts, Pages and Public Post Types"
|
743 |
msgstr ""
|
744 |
|
745 |
-
#: public/class-advanced-ads.php:
|
746 |
msgid "Advanced Ads Error following:"
|
747 |
msgstr ""
|
748 |
|
749 |
-
#: public/class-advanced-ads.php:
|
750 |
#, php-format
|
751 |
msgid "Advanced Ads Error: %s"
|
752 |
msgstr ""
|
753 |
|
754 |
-
#: public/class-advanced-ads.php:
|
755 |
msgctxt "ad group general name"
|
756 |
msgid "Ad Groups & Rotations"
|
757 |
msgstr ""
|
758 |
|
759 |
-
#: public/class-advanced-ads.php:
|
760 |
msgid "Search Ad Groups"
|
761 |
msgstr ""
|
762 |
|
763 |
-
#: public/class-advanced-ads.php:
|
764 |
msgid "All Ad Groups"
|
765 |
msgstr ""
|
766 |
|
767 |
-
#: public/class-advanced-ads.php:
|
768 |
msgid "Parent Ad Groups"
|
769 |
msgstr ""
|
770 |
|
771 |
-
#: public/class-advanced-ads.php:
|
772 |
msgid "Parent Ad Groups:"
|
773 |
msgstr ""
|
774 |
|
775 |
-
#: public/class-advanced-ads.php:
|
776 |
msgid "Edit Ad Group"
|
777 |
msgstr ""
|
778 |
|
779 |
-
#: public/class-advanced-ads.php:
|
780 |
msgid "Update Ad Group"
|
781 |
msgstr ""
|
782 |
|
783 |
-
#: public/class-advanced-ads.php:
|
784 |
msgid "Add New Ad Group"
|
785 |
msgstr ""
|
786 |
|
787 |
-
#: public/class-advanced-ads.php:
|
788 |
msgid "New Ad Groups Name"
|
789 |
msgstr ""
|
790 |
|
791 |
-
#: public/class-advanced-ads.php:
|
792 |
msgid "Groups"
|
793 |
msgstr ""
|
794 |
|
795 |
-
#: public/class-advanced-ads.php:
|
796 |
msgid "No Ad Group found"
|
797 |
msgstr ""
|
798 |
|
799 |
-
#: public/class-advanced-ads.php:
|
800 |
#: admin/includes/class-menu.php:85 admin/views/ad-group-list-ads.php:28
|
801 |
msgid "New Ad"
|
802 |
msgstr ""
|
803 |
|
804 |
-
#: public/class-advanced-ads.php:
|
805 |
msgid "Add New Ad"
|
806 |
msgstr ""
|
807 |
|
808 |
-
#: public/class-advanced-ads.php:
|
809 |
#: admin/includes/class-ad-groups-list.php:313
|
810 |
#: modules/import-export/classes/import.php:146
|
811 |
#: modules/import-export/classes/import.php:186
|
@@ -813,40 +820,40 @@ msgstr ""
|
|
813 |
msgid "Edit"
|
814 |
msgstr ""
|
815 |
|
816 |
-
#: public/class-advanced-ads.php:
|
817 |
msgid "Edit Ad"
|
818 |
msgstr ""
|
819 |
|
820 |
-
#: public/class-advanced-ads.php:
|
821 |
msgid "View"
|
822 |
msgstr ""
|
823 |
|
824 |
-
#: public/class-advanced-ads.php:
|
825 |
msgid "View the Ad"
|
826 |
msgstr ""
|
827 |
|
828 |
-
#: public/class-advanced-ads.php:
|
829 |
msgid "Search Ads"
|
830 |
msgstr ""
|
831 |
|
832 |
-
#: public/class-advanced-ads.php:
|
833 |
msgid "No Ads found"
|
834 |
msgstr ""
|
835 |
|
836 |
-
#: public/class-advanced-ads.php:
|
837 |
msgid "No Ads found in Trash"
|
838 |
msgstr ""
|
839 |
|
840 |
-
#: public/class-advanced-ads.php:
|
841 |
msgid "Parent Ad"
|
842 |
msgstr ""
|
843 |
|
844 |
-
#: public/class-advanced-ads.php:
|
845 |
msgctxt "label above ads"
|
846 |
msgid "Advertisements"
|
847 |
msgstr ""
|
848 |
|
849 |
-
#: admin/includes/ad-health-notices.php:
|
850 |
#, php-format
|
851 |
msgid ""
|
852 |
"Your <strong>PHP version (%1$s) is too low</strong>. Advanced Ads is built "
|
@@ -854,7 +861,7 @@ msgid ""
|
|
854 |
"recommended. Please ask your hosting provider for more information."
|
855 |
msgstr ""
|
856 |
|
857 |
-
#: admin/includes/ad-health-notices.php:
|
858 |
#, php-format
|
859 |
msgid ""
|
860 |
"Your <strong>website uses cache</strong>. Some dynamic features like ad "
|
@@ -863,11 +870,7 @@ msgid ""
|
|
863 |
"load ads dynamically."
|
864 |
msgstr ""
|
865 |
|
866 |
-
#: admin/includes/ad-health-notices.php:
|
867 |
-
msgid "There are <strong>plugin updates available</strong>. Please update."
|
868 |
-
msgstr ""
|
869 |
-
|
870 |
-
#: admin/includes/ad-health-notices.php:51
|
871 |
#, php-format
|
872 |
msgid ""
|
873 |
"<strong>Autoptimize plugin detected</strong>. While this plugin is great for "
|
@@ -876,36 +879,32 @@ msgid ""
|
|
876 |
"in support for Autoptimize."
|
877 |
msgstr ""
|
878 |
|
879 |
-
#: admin/includes/ad-health-notices.php:
|
880 |
#, php-format
|
881 |
msgid ""
|
882 |
"Plugins that are known to cause (partial) problems: <strong>%1$s</strong>. "
|
883 |
"<a href=\"%2$s\" target=\"_blank\">Learn more</a>."
|
884 |
msgstr ""
|
885 |
|
886 |
-
#: admin/includes/ad-health-notices.php:
|
887 |
#, php-format
|
888 |
msgid ""
|
889 |
"Missing PHP extensions could cause issues. Please ask your hosting provider "
|
890 |
"to enable them: %s"
|
891 |
msgstr ""
|
892 |
|
893 |
-
#: admin/includes/ad-health-notices.php:
|
894 |
#, php-format
|
895 |
msgid ""
|
896 |
"Ads are disabled for all or some pages. See \"disabled ads\" in <a "
|
897 |
"href=\"%s\">settings</a>."
|
898 |
msgstr ""
|
899 |
|
900 |
-
#: admin/includes/ad-health-notices.php:
|
901 |
-
msgid "This site is hosted on wordpress.com."
|
902 |
-
msgstr ""
|
903 |
-
|
904 |
-
#: admin/includes/ad-health-notices.php:96 admin/views/support.php:25
|
905 |
msgid "Advanced Ads related constants enabled"
|
906 |
msgstr ""
|
907 |
|
908 |
-
#: admin/includes/ad-health-notices.php:
|
909 |
#, php-format
|
910 |
msgid ""
|
911 |
"Possible conflict between jQueryUI library, used by Advanced Ads and other "
|
@@ -913,7 +912,7 @@ msgid ""
|
|
913 |
"to misfortunate formats in forms, but should not damage features."
|
914 |
msgstr ""
|
915 |
|
916 |
-
#: admin/includes/ad-health-notices.php:
|
917 |
#, php-format
|
918 |
msgid ""
|
919 |
"Some assets were changed. Please <strong>rebuild the asset folder</strong> "
|
@@ -921,43 +920,66 @@ msgid ""
|
|
921 |
"disguise."
|
922 |
msgstr ""
|
923 |
|
924 |
-
#: admin/includes/ad-health-notices.php:
|
925 |
msgid ""
|
926 |
"One or more license keys for <strong>Advanced Ads add-ons are invalid or "
|
927 |
"missing</strong>."
|
928 |
msgstr ""
|
929 |
|
930 |
-
#: admin/includes/ad-health-notices.php:
|
931 |
#, php-format
|
932 |
msgid "Please add valid license keys <a href=\"%s\">here</a>."
|
933 |
msgstr ""
|
934 |
|
935 |
-
#: admin/includes/ad-health-notices.php:
|
936 |
msgid "Ad expired"
|
937 |
msgstr ""
|
938 |
|
939 |
-
#: admin/includes/ad-health-notices.php:
|
940 |
-
#: admin/includes/
|
941 |
-
#:
|
942 |
-
msgid "
|
943 |
msgstr ""
|
944 |
|
|
|
945 |
#: admin/includes/ad-health-notices.php:186
|
946 |
-
|
947 |
-
|
948 |
-
msgid "Last AdSense account connection attempt failed."
|
949 |
msgstr ""
|
950 |
|
951 |
-
#: admin/includes/ad-health-notices.php:
|
952 |
msgid ""
|
953 |
"One of your sites is missing the AdSense publisher ID in the ads.txt file."
|
954 |
msgstr ""
|
955 |
|
956 |
-
#: admin/includes/ad-health-notices.php:
|
957 |
msgctxt "related to ads.txt file"
|
958 |
msgid "Create one now."
|
959 |
msgstr ""
|
960 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
961 |
#: admin/includes/class-ad-groups-list.php:165
|
962 |
msgid "Ad weight"
|
963 |
msgstr ""
|
@@ -1087,39 +1109,39 @@ msgid_plural "%s ads restored from the Trash."
|
|
1087 |
msgstr[0] ""
|
1088 |
msgstr[1] ""
|
1089 |
|
1090 |
-
#: admin/includes/class-ad-type.php:
|
1091 |
msgid "Ad updated."
|
1092 |
msgstr ""
|
1093 |
|
1094 |
#. translators: %s: date and time of the revision
|
1095 |
-
#: admin/includes/class-ad-type.php:
|
1096 |
#, php-format
|
1097 |
msgid "Ad restored to revision from %s"
|
1098 |
msgstr ""
|
1099 |
|
1100 |
-
#: admin/includes/class-ad-type.php:
|
1101 |
msgid "Ad saved."
|
1102 |
msgstr ""
|
1103 |
|
1104 |
-
#: admin/includes/class-ad-type.php:
|
1105 |
msgid "Ad submitted."
|
1106 |
msgstr ""
|
1107 |
|
1108 |
-
#: admin/includes/class-ad-type.php:
|
1109 |
#, php-format
|
1110 |
msgid "Ad scheduled for: <strong>%1$s</strong>."
|
1111 |
msgstr ""
|
1112 |
|
1113 |
#. translators: Publish box date format, see http://php.net/date
|
1114 |
-
#: admin/includes/class-ad-type.php:
|
1115 |
msgid "M j, Y @ G:i"
|
1116 |
msgstr ""
|
1117 |
|
1118 |
-
#: admin/includes/class-ad-type.php:
|
1119 |
msgid "Ad draft updated."
|
1120 |
msgstr ""
|
1121 |
|
1122 |
-
#: admin/includes/class-ad-type.php:
|
1123 |
msgid ""
|
1124 |
"You don’t have access to ads. Please deactivate and re-enable Advanced Ads "
|
1125 |
"again to fix this."
|
@@ -1329,6 +1351,11 @@ msgstr ""
|
|
1329 |
msgid "Manual and Support"
|
1330 |
msgstr ""
|
1331 |
|
|
|
|
|
|
|
|
|
|
|
1332 |
#: admin/includes/class-overview-widgets.php:89
|
1333 |
#: modules/gadsense/admin/views/adsense-account.php:71
|
1334 |
#: modules/gadsense/admin/views/adsense-account.php:89
|
@@ -1390,139 +1417,146 @@ msgstr ""
|
|
1390 |
msgid "<a href=\"%s\" target=\"_blank\">FAQ and Support</a>"
|
1391 |
msgstr ""
|
1392 |
|
1393 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1394 |
msgid "The solution for professional websites."
|
1395 |
msgstr ""
|
1396 |
|
1397 |
-
#: admin/includes/class-overview-widgets.php:
|
1398 |
#: admin/views/pitch-pro-tab.php:7
|
1399 |
msgid "support for cached sites"
|
1400 |
msgstr ""
|
1401 |
|
1402 |
-
#: admin/includes/class-overview-widgets.php:
|
1403 |
-
#: admin/includes/class-overview-widgets.php:
|
1404 |
-
#: admin/includes/class-overview-widgets.php:
|
1405 |
-
#: admin/includes/class-overview-widgets.php:
|
1406 |
#, php-format
|
1407 |
msgid "integrates with <strong>%s</strong>"
|
1408 |
msgstr ""
|
1409 |
|
1410 |
-
#: admin/includes/class-overview-widgets.php:
|
1411 |
msgid "click fraud protection, lazy load, ad-block ads"
|
1412 |
msgstr ""
|
1413 |
|
1414 |
-
#: admin/includes/class-overview-widgets.php:
|
1415 |
#: admin/views/pitch-pro-tab.php:8
|
1416 |
msgid "11 more display and visitor conditions"
|
1417 |
msgstr ""
|
1418 |
|
1419 |
-
#: admin/includes/class-overview-widgets.php:
|
1420 |
#: admin/views/pitch-pro-tab.php:9
|
1421 |
msgid "6 more placements"
|
1422 |
msgstr ""
|
1423 |
|
1424 |
-
#: admin/includes/class-overview-widgets.php:
|
1425 |
#: admin/views/pitch-pro-tab.php:10
|
1426 |
msgid "placement tests for ad optimization"
|
1427 |
msgstr ""
|
1428 |
|
1429 |
-
#: admin/includes/class-overview-widgets.php:
|
1430 |
#: admin/views/pitch-pro-tab.php:11
|
1431 |
msgid "ad grids and many more advanced features"
|
1432 |
msgstr ""
|
1433 |
|
1434 |
-
#: admin/includes/class-overview-widgets.php:
|
1435 |
msgid ""
|
1436 |
"Analyze clicks and impressions of your ads locally or in Google Analytics, "
|
1437 |
"share reports, and limit ads to a specific number of impressions or clicks."
|
1438 |
msgstr ""
|
1439 |
|
1440 |
-
#: admin/includes/class-overview-widgets.php:
|
1441 |
msgid ""
|
1442 |
"Display ads based on the device or the size of your visitor’s browser, and "
|
1443 |
"control ads on AMP pages."
|
1444 |
msgstr ""
|
1445 |
|
1446 |
-
#: admin/includes/class-overview-widgets.php:
|
1447 |
msgid ""
|
1448 |
"Earn more money and let advertisers pay for ad space directly on the "
|
1449 |
"frontend of your site."
|
1450 |
msgstr ""
|
1451 |
|
1452 |
-
#: admin/includes/class-overview-widgets.php:
|
1453 |
msgid ""
|
1454 |
"Target visitors with ads that match their geo location and make more money "
|
1455 |
"with regional campaigns."
|
1456 |
msgstr ""
|
1457 |
|
1458 |
-
#: admin/includes/class-overview-widgets.php:
|
1459 |
msgid ""
|
1460 |
"Increase click rates on your ads by placing them in sticky positions above, "
|
1461 |
"next or below your site."
|
1462 |
msgstr ""
|
1463 |
|
1464 |
-
#: admin/includes/class-overview-widgets.php:
|
1465 |
msgid ""
|
1466 |
"Users will never miss an ad or other information in a PopUp. Choose when it "
|
1467 |
"shows up and for how long a user can close it."
|
1468 |
msgstr ""
|
1469 |
|
1470 |
-
#: admin/includes/class-overview-widgets.php:
|
1471 |
msgid ""
|
1472 |
"Create a beautiful and simple slider from your ads to show more information "
|
1473 |
"on less space."
|
1474 |
msgstr ""
|
1475 |
|
1476 |
-
#: admin/includes/class-overview-widgets.php:
|
1477 |
msgid ""
|
1478 |
"Place AdSense In-feed ads between posts on homepage, category, and archive "
|
1479 |
"pages."
|
1480 |
msgstr ""
|
1481 |
|
1482 |
-
#: admin/includes/class-overview-widgets.php:
|
1483 |
-
#: admin/includes/class-overview-widgets.php:
|
1484 |
-
#: admin/includes/class-overview-widgets.php:
|
1485 |
msgid "Install now"
|
1486 |
msgstr ""
|
1487 |
|
1488 |
-
#: admin/includes/class-overview-widgets.php:
|
1489 |
-
#: admin/includes/class-overview-widgets.php:
|
1490 |
-
#: admin/includes/class-overview-widgets.php:
|
1491 |
-
#: admin/includes/class-overview-widgets.php:
|
1492 |
-
#: admin/includes/class-overview-widgets.php:
|
1493 |
-
#: admin/includes/class-overview-widgets.php:
|
1494 |
-
#: admin/includes/class-overview-widgets.php:
|
1495 |
-
#: admin/includes/class-overview-widgets.php:
|
1496 |
msgid "Activate now"
|
1497 |
msgstr ""
|
1498 |
|
1499 |
-
#: admin/includes/class-overview-widgets.php:
|
1500 |
msgid "Visit your ad stats"
|
1501 |
msgstr ""
|
1502 |
|
1503 |
-
#: admin/includes/class-overview-widgets.php:
|
1504 |
msgid "Use Genesis specific ad positions."
|
1505 |
msgstr ""
|
1506 |
|
1507 |
-
#: admin/includes/class-overview-widgets.php:
|
1508 |
msgid ""
|
1509 |
"Manage ad positions with WPBakery Page Builder (formerly Visual Composer)."
|
1510 |
msgstr ""
|
1511 |
|
1512 |
-
#: admin/includes/class-overview-widgets.php:
|
1513 |
msgid "Our best deal with all add-ons included."
|
1514 |
msgstr ""
|
1515 |
|
1516 |
-
#: admin/includes/class-overview-widgets.php:
|
1517 |
msgid "Get full access"
|
1518 |
msgstr ""
|
1519 |
|
1520 |
-
#: admin/includes/class-overview-widgets.php:
|
1521 |
-
#: admin/views/ad-display-metabox.php:48 admin/views/ad-visitor-metabox.php:
|
1522 |
msgid "Visit the manual"
|
1523 |
msgstr ""
|
1524 |
|
1525 |
-
#: admin/includes/class-overview-widgets.php:
|
1526 |
msgid "Get this add-on"
|
1527 |
msgstr ""
|
1528 |
|
@@ -1920,22 +1954,22 @@ msgid "If you want to display the ad everywhere, don't do anything here. "
|
|
1920 |
msgstr ""
|
1921 |
|
1922 |
#: admin/views/ad-display-metabox.php:139
|
1923 |
-
#: admin/views/ad-visitor-metabox.php:
|
1924 |
msgid "New condition"
|
1925 |
msgstr ""
|
1926 |
|
1927 |
#: admin/views/ad-display-metabox.php:142
|
1928 |
-
#: admin/views/ad-visitor-metabox.php:
|
1929 |
msgid "-- choose a condition --"
|
1930 |
msgstr ""
|
1931 |
|
1932 |
#: admin/views/ad-display-metabox.php:149
|
1933 |
-
#: admin/views/ad-visitor-metabox.php:
|
1934 |
msgid "Add-On features"
|
1935 |
msgstr ""
|
1936 |
|
1937 |
#: admin/views/ad-display-metabox.php:162 admin/views/ad-group-list-ads.php:37
|
1938 |
-
#: admin/views/ad-visitor-metabox.php:
|
1939 |
msgid "add"
|
1940 |
msgstr ""
|
1941 |
|
@@ -2339,69 +2373,73 @@ msgstr ""
|
|
2339 |
msgid "user can (capabilities)"
|
2340 |
msgstr ""
|
2341 |
|
2342 |
-
#: admin/views/ad-visitor-metabox.php:
|
|
|
|
|
|
|
|
|
2343 |
msgid "geo location"
|
2344 |
msgstr ""
|
2345 |
|
2346 |
-
#: admin/views/ad-visitor-metabox.php:
|
2347 |
msgid "browser width"
|
2348 |
msgstr ""
|
2349 |
|
2350 |
-
#: admin/views/ad-visitor-metabox.php:
|
2351 |
msgid ""
|
2352 |
"Click on the button below if the ad should NOT be visible to all visitors"
|
2353 |
msgstr ""
|
2354 |
|
2355 |
-
#: admin/views/ad-visitor-metabox.php:
|
2356 |
msgid "Hide the ad from some users"
|
2357 |
msgstr ""
|
2358 |
|
2359 |
-
#: admin/views/ad-visitor-metabox.php:
|
2360 |
msgid ""
|
2361 |
"Display conditions that are based on the user. Use with caution on cached "
|
2362 |
"websites."
|
2363 |
msgstr ""
|
2364 |
|
2365 |
-
#: admin/views/ad-visitor-metabox.php:
|
2366 |
msgid ""
|
2367 |
"Visitor conditions limit the number of users who can see your ad. There is "
|
2368 |
"no need to set visitor conditions if you want all users to see the ad."
|
2369 |
msgstr ""
|
2370 |
|
2371 |
-
#: admin/views/ad-visitor-metabox.php:
|
2372 |
#: modules/privacy/admin/views/setting-enable.php:4
|
2373 |
msgid "It seems that a caching plugin is activated."
|
2374 |
msgstr ""
|
2375 |
|
2376 |
-
#: admin/views/ad-visitor-metabox.php:
|
2377 |
#, php-format
|
2378 |
msgid ""
|
2379 |
"Check out cache-busting in <a href=\"%s\" target=\"_blank\">Advanced Ads "
|
2380 |
"Pro</a> if dynamic features get cached."
|
2381 |
msgstr ""
|
2382 |
|
2383 |
-
#: admin/views/ad-visitor-metabox.php:
|
2384 |
#, php-format
|
2385 |
msgid ""
|
2386 |
"Define the exact browser width for which an ad should be visible using the "
|
2387 |
"<a href=\"%s\" target=\"_blank\">Responsive add-on</a>."
|
2388 |
msgstr ""
|
2389 |
|
2390 |
-
#: admin/views/ad-visitor-metabox.php:
|
2391 |
msgid ""
|
2392 |
"The visitor conditions below are deprecated. Please use the new version of "
|
2393 |
"visitor conditions to replace it."
|
2394 |
msgstr ""
|
2395 |
|
2396 |
-
#: admin/views/ad-visitor-metabox.php:
|
2397 |
msgid "Display on all devices"
|
2398 |
msgstr ""
|
2399 |
|
2400 |
-
#: admin/views/ad-visitor-metabox.php:
|
2401 |
msgid "only on mobile devices"
|
2402 |
msgstr ""
|
2403 |
|
2404 |
-
#: admin/views/ad-visitor-metabox.php:
|
2405 |
msgid "not on mobile devices"
|
2406 |
msgstr ""
|
2407 |
|
@@ -2430,59 +2468,57 @@ msgid "Send me free help to %s"
|
|
2430 |
msgstr ""
|
2431 |
|
2432 |
#: admin/views/feedback-disable.php:20
|
2433 |
-
msgid "
|
2434 |
msgstr ""
|
2435 |
|
2436 |
#: admin/views/feedback-disable.php:21
|
2437 |
-
msgid "
|
2438 |
msgstr ""
|
2439 |
|
2440 |
#: admin/views/feedback-disable.php:22
|
2441 |
-
msgid "
|
2442 |
msgstr ""
|
2443 |
|
2444 |
#: admin/views/feedback-disable.php:23
|
2445 |
-
msgid "
|
2446 |
msgstr ""
|
2447 |
|
2448 |
#: admin/views/feedback-disable.php:24
|
|
|
|
|
|
|
|
|
2449 |
msgid "I switched to another plugin"
|
2450 |
msgstr ""
|
2451 |
|
2452 |
-
#: admin/views/feedback-disable.php:
|
2453 |
msgid "Send feedback & deactivate"
|
2454 |
msgstr ""
|
2455 |
|
2456 |
-
#: admin/views/feedback-disable.php:
|
2457 |
msgid "Send feedback"
|
2458 |
msgstr ""
|
2459 |
|
2460 |
-
#: admin/views/feedback-disable.php:
|
2461 |
msgid "Only Deactivate"
|
2462 |
msgstr ""
|
2463 |
|
2464 |
-
#: admin/views/feedback-disable.php:
|
2465 |
msgid ""
|
2466 |
"Thanks for submitting your feedback. I will reply within 24 hours on working "
|
2467 |
"days."
|
2468 |
msgstr ""
|
2469 |
|
2470 |
#. %s is the title of the website
|
2471 |
-
#: admin/views/feedback-disable.php:
|
2472 |
#, php-format
|
2473 |
msgid "All the best to you and %s."
|
2474 |
msgstr ""
|
2475 |
|
2476 |
-
#: admin/views/feedback-disable.php:
|
2477 |
msgid "Disabling the plugin now…"
|
2478 |
msgstr ""
|
2479 |
|
2480 |
-
#. %s includes a number and markup like <span class="count">6</span>.
|
2481 |
-
#: admin/views/overview-notices.php:17
|
2482 |
-
#, php-format
|
2483 |
-
msgid "Show %s hidden"
|
2484 |
-
msgstr ""
|
2485 |
-
|
2486 |
#: admin/views/pitch-bundle.php:1
|
2487 |
msgid "All Access – with all available add-ons"
|
2488 |
msgstr ""
|
@@ -3032,10 +3068,6 @@ msgstr ""
|
|
3032 |
msgid "Setting up AdSense ads manually"
|
3033 |
msgstr ""
|
3034 |
|
3035 |
-
#: admin/views/notices/welcome-panel.php:20
|
3036 |
-
msgid "Get Help"
|
3037 |
-
msgstr ""
|
3038 |
-
|
3039 |
#: admin/views/notices/welcome-panel.php:23
|
3040 |
msgid "Reach out for help"
|
3041 |
msgstr ""
|
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-03 09:23+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"
|
31 |
msgstr ""
|
32 |
|
33 |
#: admin/class-advanced-ads-admin.php:223 classes/display-conditions.php:215
|
34 |
+
#: classes/visitor-conditions.php:242 admin/views/ad-visitor-metabox.php:158
|
35 |
msgid "and"
|
36 |
msgstr ""
|
37 |
|
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:725 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:688
|
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:244
|
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 "
|
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:831
|
128 |
#: modules/gadsense/includes/class-mapi.php:1362
|
129 |
#, php-format
|
130 |
msgid "Learn more about AdSense account issues %1$shere%2$s."
|
524 |
msgid "Unable to locate needed folder (%s)."
|
525 |
msgstr ""
|
526 |
|
527 |
+
#: classes/frontend_checks.php:92
|
528 |
msgid "Random AdSense ads"
|
529 |
msgstr ""
|
530 |
|
531 |
+
#: classes/frontend_checks.php:106 admin/includes/class-settings.php:517
|
532 |
msgid "You look like a bot"
|
533 |
msgstr ""
|
534 |
|
535 |
+
#: classes/frontend_checks.php:120
|
536 |
msgid "Ad blocker enabled"
|
537 |
msgstr ""
|
538 |
|
539 |
+
#: classes/frontend_checks.php:133
|
540 |
#, php-format
|
541 |
msgid "<em>%s</em> filter does not exist"
|
542 |
msgstr ""
|
543 |
|
544 |
+
#. %s is a filter hook, here `the_content`
|
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:179
|
555 |
msgid "Ads are disabled in the content of this page"
|
556 |
msgstr ""
|
557 |
|
558 |
+
#: classes/frontend_checks.php:191
|
559 |
msgid "the current post ID is 0 "
|
560 |
msgstr ""
|
561 |
|
562 |
+
#: classes/frontend_checks.php:205
|
563 |
msgid "Ads are disabled on all pages"
|
564 |
msgstr ""
|
565 |
|
566 |
+
#: classes/frontend_checks.php:218
|
567 |
msgid "Ads are disabled on 404 pages"
|
568 |
msgstr ""
|
569 |
|
570 |
+
#: classes/frontend_checks.php:231
|
571 |
msgid "Ads are disabled on non singular pages"
|
572 |
msgstr ""
|
573 |
|
574 |
+
#: classes/frontend_checks.php:245
|
575 |
#, php-format
|
576 |
msgid "Ad IDs: %s"
|
577 |
msgstr ""
|
578 |
|
579 |
+
#: classes/frontend_checks.php:257 admin/includes/ad-health-notices.php:140
|
580 |
#, php-format
|
581 |
msgid "Visible ads should not use the Header placement: %s"
|
582 |
msgstr ""
|
583 |
|
584 |
+
#: classes/frontend_checks.php:271 admin/includes/ad-health-notices.php:154
|
585 |
msgid "AdSense violation"
|
586 |
msgstr ""
|
587 |
|
588 |
+
#: classes/frontend_checks.php:272 admin/includes/ad-health-notices.php:155
|
589 |
msgid "Ad is hidden"
|
590 |
msgstr ""
|
591 |
|
592 |
+
#: classes/frontend_checks.php:273
|
593 |
#, php-format
|
594 |
msgid "IDs: %s"
|
595 |
msgstr ""
|
596 |
|
597 |
+
#: classes/frontend_checks.php:286
|
598 |
#, php-format
|
599 |
msgid "The following responsive AdSense ads are not showing up: %s"
|
600 |
msgstr ""
|
601 |
|
602 |
+
#: classes/frontend_checks.php:300
|
603 |
msgid "Consent not given"
|
604 |
msgstr ""
|
605 |
|
606 |
+
#: classes/frontend_checks.php:312
|
607 |
msgid "debug DFP ads"
|
608 |
msgstr ""
|
609 |
|
610 |
+
#: classes/frontend_checks.php:323
|
611 |
msgid "highlight ads"
|
612 |
msgstr ""
|
613 |
|
614 |
+
#: classes/frontend_checks.php:330
|
615 |
msgid "Auto ads code found"
|
616 |
msgstr ""
|
617 |
|
618 |
+
#: classes/frontend_checks.php:354
|
619 |
msgid "Ad Health"
|
620 |
msgstr ""
|
621 |
|
622 |
+
#: classes/frontend_checks.php:364
|
623 |
#, php-format
|
624 |
msgid "Show %d more notifications"
|
625 |
msgstr ""
|
626 |
|
627 |
+
#: classes/frontend_checks.php:381
|
628 |
msgid "Everything is fine"
|
629 |
msgstr ""
|
630 |
|
631 |
+
#: classes/frontend_checks.php:392 admin/includes/class-ad-type.php:671
|
632 |
+
#: admin/views/notices/welcome-panel.php:20
|
633 |
msgid "Get help"
|
634 |
msgstr ""
|
635 |
|
636 |
+
#: classes/frontend_checks.php:442
|
637 |
msgid ""
|
638 |
"the following code is used for automatic error detection and only visible to "
|
639 |
"admins"
|
712 |
msgid "Ad Groups"
|
713 |
msgstr ""
|
714 |
|
715 |
+
#: classes/widget.php:93 public/class-advanced-ads.php:724
|
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 |
msgid "Individual Posts, Pages and Public Post Types"
|
750 |
msgstr ""
|
751 |
|
752 |
+
#: public/class-advanced-ads.php:371
|
753 |
msgid "Advanced Ads Error following:"
|
754 |
msgstr ""
|
755 |
|
756 |
+
#: public/class-advanced-ads.php:375
|
757 |
#, php-format
|
758 |
msgid "Advanced Ads Error: %s"
|
759 |
msgstr ""
|
760 |
|
761 |
+
#: public/class-advanced-ads.php:687
|
762 |
msgctxt "ad group general name"
|
763 |
msgid "Ad Groups & Rotations"
|
764 |
msgstr ""
|
765 |
|
766 |
+
#: public/class-advanced-ads.php:689
|
767 |
msgid "Search Ad Groups"
|
768 |
msgstr ""
|
769 |
|
770 |
+
#: public/class-advanced-ads.php:690
|
771 |
msgid "All Ad Groups"
|
772 |
msgstr ""
|
773 |
|
774 |
+
#: public/class-advanced-ads.php:691
|
775 |
msgid "Parent Ad Groups"
|
776 |
msgstr ""
|
777 |
|
778 |
+
#: public/class-advanced-ads.php:692
|
779 |
msgid "Parent Ad Groups:"
|
780 |
msgstr ""
|
781 |
|
782 |
+
#: public/class-advanced-ads.php:693
|
783 |
msgid "Edit Ad Group"
|
784 |
msgstr ""
|
785 |
|
786 |
+
#: public/class-advanced-ads.php:694
|
787 |
msgid "Update Ad Group"
|
788 |
msgstr ""
|
789 |
|
790 |
+
#: public/class-advanced-ads.php:695
|
791 |
msgid "Add New Ad Group"
|
792 |
msgstr ""
|
793 |
|
794 |
+
#: public/class-advanced-ads.php:696
|
795 |
msgid "New Ad Groups Name"
|
796 |
msgstr ""
|
797 |
|
798 |
+
#: public/class-advanced-ads.php:697 modules/import-export/views/page.php:24
|
799 |
msgid "Groups"
|
800 |
msgstr ""
|
801 |
|
802 |
+
#: public/class-advanced-ads.php:698
|
803 |
msgid "No Ad Group found"
|
804 |
msgstr ""
|
805 |
|
806 |
+
#: public/class-advanced-ads.php:726 public/class-advanced-ads.php:730
|
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:727 admin/includes/class-menu.php:85
|
812 |
msgid "Add New Ad"
|
813 |
msgstr ""
|
814 |
|
815 |
+
#: public/class-advanced-ads.php:728
|
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 |
msgid "Edit"
|
821 |
msgstr ""
|
822 |
|
823 |
+
#: public/class-advanced-ads.php:729
|
824 |
msgid "Edit Ad"
|
825 |
msgstr ""
|
826 |
|
827 |
+
#: public/class-advanced-ads.php:731
|
828 |
msgid "View"
|
829 |
msgstr ""
|
830 |
|
831 |
+
#: public/class-advanced-ads.php:732
|
832 |
msgid "View the Ad"
|
833 |
msgstr ""
|
834 |
|
835 |
+
#: public/class-advanced-ads.php:733
|
836 |
msgid "Search Ads"
|
837 |
msgstr ""
|
838 |
|
839 |
+
#: public/class-advanced-ads.php:734
|
840 |
msgid "No Ads found"
|
841 |
msgstr ""
|
842 |
|
843 |
+
#: public/class-advanced-ads.php:735
|
844 |
msgid "No Ads found in Trash"
|
845 |
msgstr ""
|
846 |
|
847 |
+
#: public/class-advanced-ads.php:736
|
848 |
msgid "Parent Ad"
|
849 |
msgstr ""
|
850 |
|
851 |
+
#: public/class-advanced-ads.php:898
|
852 |
msgctxt "label above ads"
|
853 |
msgid "Advertisements"
|
854 |
msgstr ""
|
855 |
|
856 |
+
#: admin/includes/ad-health-notices.php:31
|
857 |
#, php-format
|
858 |
msgid ""
|
859 |
"Your <strong>PHP version (%1$s) is too low</strong>. Advanced Ads is built "
|
861 |
"recommended. Please ask your hosting provider for more information."
|
862 |
msgstr ""
|
863 |
|
864 |
+
#: admin/includes/ad-health-notices.php:42
|
865 |
#, php-format
|
866 |
msgid ""
|
867 |
"Your <strong>website uses cache</strong>. Some dynamic features like ad "
|
870 |
"load ads dynamically."
|
871 |
msgstr ""
|
872 |
|
873 |
+
#: admin/includes/ad-health-notices.php:52
|
|
|
|
|
|
|
|
|
874 |
#, php-format
|
875 |
msgid ""
|
876 |
"<strong>Autoptimize plugin detected</strong>. While this plugin is great for "
|
879 |
"in support for Autoptimize."
|
880 |
msgstr ""
|
881 |
|
882 |
+
#: admin/includes/ad-health-notices.php:62
|
883 |
#, php-format
|
884 |
msgid ""
|
885 |
"Plugins that are known to cause (partial) problems: <strong>%1$s</strong>. "
|
886 |
"<a href=\"%2$s\" target=\"_blank\">Learn more</a>."
|
887 |
msgstr ""
|
888 |
|
889 |
+
#: admin/includes/ad-health-notices.php:73
|
890 |
#, php-format
|
891 |
msgid ""
|
892 |
"Missing PHP extensions could cause issues. Please ask your hosting provider "
|
893 |
"to enable them: %s"
|
894 |
msgstr ""
|
895 |
|
896 |
+
#: admin/includes/ad-health-notices.php:83
|
897 |
#, php-format
|
898 |
msgid ""
|
899 |
"Ads are disabled for all or some pages. See \"disabled ads\" in <a "
|
900 |
"href=\"%s\">settings</a>."
|
901 |
msgstr ""
|
902 |
|
903 |
+
#: admin/includes/ad-health-notices.php:91 admin/views/support.php:25
|
|
|
|
|
|
|
|
|
904 |
msgid "Advanced Ads related constants enabled"
|
905 |
msgstr ""
|
906 |
|
907 |
+
#: admin/includes/ad-health-notices.php:99
|
908 |
#, php-format
|
909 |
msgid ""
|
910 |
"Possible conflict between jQueryUI library, used by Advanced Ads and other "
|
912 |
"to misfortunate formats in forms, but should not damage features."
|
913 |
msgstr ""
|
914 |
|
915 |
+
#: admin/includes/ad-health-notices.php:109
|
916 |
#, php-format
|
917 |
msgid ""
|
918 |
"Some assets were changed. Please <strong>rebuild the asset folder</strong> "
|
920 |
"disguise."
|
921 |
msgstr ""
|
922 |
|
923 |
+
#: admin/includes/ad-health-notices.php:118 admin/includes/notices.php:36
|
924 |
msgid ""
|
925 |
"One or more license keys for <strong>Advanced Ads add-ons are invalid or "
|
926 |
"missing</strong>."
|
927 |
msgstr ""
|
928 |
|
929 |
+
#: admin/includes/ad-health-notices.php:121 admin/includes/notices.php:36
|
930 |
#, php-format
|
931 |
msgid "Please add valid license keys <a href=\"%s\">here</a>."
|
932 |
msgstr ""
|
933 |
|
934 |
+
#: admin/includes/ad-health-notices.php:130
|
935 |
msgid "Ad expired"
|
936 |
msgstr ""
|
937 |
|
938 |
+
#: admin/includes/ad-health-notices.php:177
|
939 |
+
#: admin/includes/ad-health-notices.php:184
|
940 |
+
#: modules/gadsense/includes/class-mapi.php:90
|
941 |
+
msgid "Last AdSense account connection attempt failed."
|
942 |
msgstr ""
|
943 |
|
944 |
+
#. %1$s is the opening a tag and %2$s the closing one.
|
945 |
#: admin/includes/ad-health-notices.php:186
|
946 |
+
#, php-format
|
947 |
+
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 |
+
#: admin/includes/ad-health-notices.php:208
|
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:216
|
966 |
+
#: admin/includes/ad-health-notices.php:227
|
967 |
+
#: admin/includes/ad-health-notices.php:238
|
968 |
+
#: admin/includes/ad-health-notices.php:251
|
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:265
|
975 |
+
#, php-format
|
976 |
+
msgid "%s detected."
|
977 |
+
msgstr ""
|
978 |
+
|
979 |
+
#: admin/includes/ad-health-notices.php:266
|
980 |
+
msgid "Learn how this might impact your ad setup."
|
981 |
+
msgstr ""
|
982 |
+
|
983 |
#: admin/includes/class-ad-groups-list.php:165
|
984 |
msgid "Ad weight"
|
985 |
msgstr ""
|
1109 |
msgstr[0] ""
|
1110 |
msgstr[1] ""
|
1111 |
|
1112 |
+
#: admin/includes/class-ad-type.php:571 admin/includes/class-ad-type.php:572
|
1113 |
msgid "Ad updated."
|
1114 |
msgstr ""
|
1115 |
|
1116 |
#. translators: %s: date and time of the revision
|
1117 |
+
#: admin/includes/class-ad-type.php:574
|
1118 |
#, php-format
|
1119 |
msgid "Ad restored to revision from %s"
|
1120 |
msgstr ""
|
1121 |
|
1122 |
+
#: admin/includes/class-ad-type.php:575 admin/includes/class-ad-type.php:576
|
1123 |
msgid "Ad saved."
|
1124 |
msgstr ""
|
1125 |
|
1126 |
+
#: admin/includes/class-ad-type.php:577
|
1127 |
msgid "Ad submitted."
|
1128 |
msgstr ""
|
1129 |
|
1130 |
+
#: admin/includes/class-ad-type.php:579
|
1131 |
#, php-format
|
1132 |
msgid "Ad scheduled for: <strong>%1$s</strong>."
|
1133 |
msgstr ""
|
1134 |
|
1135 |
#. translators: Publish box date format, see http://php.net/date
|
1136 |
+
#: admin/includes/class-ad-type.php:581
|
1137 |
msgid "M j, Y @ G:i"
|
1138 |
msgstr ""
|
1139 |
|
1140 |
+
#: admin/includes/class-ad-type.php:583
|
1141 |
msgid "Ad draft updated."
|
1142 |
msgstr ""
|
1143 |
|
1144 |
+
#: admin/includes/class-ad-type.php:670
|
1145 |
msgid ""
|
1146 |
"You don’t have access to ads. Please deactivate and re-enable Advanced Ads "
|
1147 |
"again to fix this."
|
1351 |
msgid "Manual and Support"
|
1352 |
msgstr ""
|
1353 |
|
1354 |
+
#: admin/includes/class-overview-widgets.php:86
|
1355 |
+
#: admin/views/notices/welcome-panel.php:6
|
1356 |
+
msgid "Create your first ad"
|
1357 |
+
msgstr ""
|
1358 |
+
|
1359 |
#: admin/includes/class-overview-widgets.php:89
|
1360 |
#: modules/gadsense/admin/views/adsense-account.php:71
|
1361 |
#: modules/gadsense/admin/views/adsense-account.php:89
|
1417 |
msgid "<a href=\"%s\" target=\"_blank\">FAQ and Support</a>"
|
1418 |
msgstr ""
|
1419 |
|
1420 |
+
#. %s includes a number and markup like <span class="count">6</span>.
|
1421 |
+
#: admin/includes/class-overview-widgets.php:164
|
1422 |
+
#: admin/views/overview-notices.php:17
|
1423 |
+
#, php-format
|
1424 |
+
msgid "Show %s hidden notices"
|
1425 |
+
msgstr ""
|
1426 |
+
|
1427 |
+
#: admin/includes/class-overview-widgets.php:182
|
1428 |
msgid "The solution for professional websites."
|
1429 |
msgstr ""
|
1430 |
|
1431 |
+
#: admin/includes/class-overview-widgets.php:185
|
1432 |
#: admin/views/pitch-pro-tab.php:7
|
1433 |
msgid "support for cached sites"
|
1434 |
msgstr ""
|
1435 |
|
1436 |
+
#: admin/includes/class-overview-widgets.php:188
|
1437 |
+
#: admin/includes/class-overview-widgets.php:189
|
1438 |
+
#: admin/includes/class-overview-widgets.php:190
|
1439 |
+
#: admin/includes/class-overview-widgets.php:191
|
1440 |
#, php-format
|
1441 |
msgid "integrates with <strong>%s</strong>"
|
1442 |
msgstr ""
|
1443 |
|
1444 |
+
#: admin/includes/class-overview-widgets.php:192
|
1445 |
msgid "click fraud protection, lazy load, ad-block ads"
|
1446 |
msgstr ""
|
1447 |
|
1448 |
+
#: admin/includes/class-overview-widgets.php:193
|
1449 |
#: admin/views/pitch-pro-tab.php:8
|
1450 |
msgid "11 more display and visitor conditions"
|
1451 |
msgstr ""
|
1452 |
|
1453 |
+
#: admin/includes/class-overview-widgets.php:194
|
1454 |
#: admin/views/pitch-pro-tab.php:9
|
1455 |
msgid "6 more placements"
|
1456 |
msgstr ""
|
1457 |
|
1458 |
+
#: admin/includes/class-overview-widgets.php:195
|
1459 |
#: admin/views/pitch-pro-tab.php:10
|
1460 |
msgid "placement tests for ad optimization"
|
1461 |
msgstr ""
|
1462 |
|
1463 |
+
#: admin/includes/class-overview-widgets.php:196
|
1464 |
#: admin/views/pitch-pro-tab.php:11
|
1465 |
msgid "ad grids and many more advanced features"
|
1466 |
msgstr ""
|
1467 |
|
1468 |
+
#: admin/includes/class-overview-widgets.php:203
|
1469 |
msgid ""
|
1470 |
"Analyze clicks and impressions of your ads locally or in Google Analytics, "
|
1471 |
"share reports, and limit ads to a specific number of impressions or clicks."
|
1472 |
msgstr ""
|
1473 |
|
1474 |
+
#: admin/includes/class-overview-widgets.php:209
|
1475 |
msgid ""
|
1476 |
"Display ads based on the device or the size of your visitor’s browser, and "
|
1477 |
"control ads on AMP pages."
|
1478 |
msgstr ""
|
1479 |
|
1480 |
+
#: admin/includes/class-overview-widgets.php:222
|
1481 |
msgid ""
|
1482 |
"Earn more money and let advertisers pay for ad space directly on the "
|
1483 |
"frontend of your site."
|
1484 |
msgstr ""
|
1485 |
|
1486 |
+
#: admin/includes/class-overview-widgets.php:228
|
1487 |
msgid ""
|
1488 |
"Target visitors with ads that match their geo location and make more money "
|
1489 |
"with regional campaigns."
|
1490 |
msgstr ""
|
1491 |
|
1492 |
+
#: admin/includes/class-overview-widgets.php:234
|
1493 |
msgid ""
|
1494 |
"Increase click rates on your ads by placing them in sticky positions above, "
|
1495 |
"next or below your site."
|
1496 |
msgstr ""
|
1497 |
|
1498 |
+
#: admin/includes/class-overview-widgets.php:240
|
1499 |
msgid ""
|
1500 |
"Users will never miss an ad or other information in a PopUp. Choose when it "
|
1501 |
"shows up and for how long a user can close it."
|
1502 |
msgstr ""
|
1503 |
|
1504 |
+
#: admin/includes/class-overview-widgets.php:246
|
1505 |
msgid ""
|
1506 |
"Create a beautiful and simple slider from your ads to show more information "
|
1507 |
"on less space."
|
1508 |
msgstr ""
|
1509 |
|
1510 |
+
#: admin/includes/class-overview-widgets.php:252
|
1511 |
msgid ""
|
1512 |
"Place AdSense In-feed ads between posts on homepage, category, and archive "
|
1513 |
"pages."
|
1514 |
msgstr ""
|
1515 |
|
1516 |
+
#: admin/includes/class-overview-widgets.php:255
|
1517 |
+
#: admin/includes/class-overview-widgets.php:430
|
1518 |
+
#: admin/includes/class-overview-widgets.php:446
|
1519 |
msgid "Install now"
|
1520 |
msgstr ""
|
1521 |
|
1522 |
+
#: admin/includes/class-overview-widgets.php:273
|
1523 |
+
#: admin/includes/class-overview-widgets.php:294
|
1524 |
+
#: admin/includes/class-overview-widgets.php:319
|
1525 |
+
#: admin/includes/class-overview-widgets.php:337
|
1526 |
+
#: admin/includes/class-overview-widgets.php:355
|
1527 |
+
#: admin/includes/class-overview-widgets.php:373
|
1528 |
+
#: admin/includes/class-overview-widgets.php:391
|
1529 |
+
#: admin/includes/class-overview-widgets.php:409
|
1530 |
msgid "Activate now"
|
1531 |
msgstr ""
|
1532 |
|
1533 |
+
#: admin/includes/class-overview-widgets.php:302
|
1534 |
msgid "Visit your ad stats"
|
1535 |
msgstr ""
|
1536 |
|
1537 |
+
#: admin/includes/class-overview-widgets.php:426
|
1538 |
msgid "Use Genesis specific ad positions."
|
1539 |
msgstr ""
|
1540 |
|
1541 |
+
#: admin/includes/class-overview-widgets.php:442
|
1542 |
msgid ""
|
1543 |
"Manage ad positions with WPBakery Page Builder (formerly Visual Composer)."
|
1544 |
msgstr ""
|
1545 |
|
1546 |
+
#: admin/includes/class-overview-widgets.php:458
|
1547 |
msgid "Our best deal with all add-ons included."
|
1548 |
msgstr ""
|
1549 |
|
1550 |
+
#: admin/includes/class-overview-widgets.php:460
|
1551 |
msgid "Get full access"
|
1552 |
msgstr ""
|
1553 |
|
1554 |
+
#: admin/includes/class-overview-widgets.php:474
|
1555 |
+
#: admin/views/ad-display-metabox.php:48 admin/views/ad-visitor-metabox.php:48
|
1556 |
msgid "Visit the manual"
|
1557 |
msgstr ""
|
1558 |
|
1559 |
+
#: admin/includes/class-overview-widgets.php:477
|
1560 |
msgid "Get this add-on"
|
1561 |
msgstr ""
|
1562 |
|
1954 |
msgstr ""
|
1955 |
|
1956 |
#: admin/views/ad-display-metabox.php:139
|
1957 |
+
#: admin/views/ad-visitor-metabox.php:102
|
1958 |
msgid "New condition"
|
1959 |
msgstr ""
|
1960 |
|
1961 |
#: admin/views/ad-display-metabox.php:142
|
1962 |
+
#: admin/views/ad-visitor-metabox.php:105
|
1963 |
msgid "-- choose a condition --"
|
1964 |
msgstr ""
|
1965 |
|
1966 |
#: admin/views/ad-display-metabox.php:149
|
1967 |
+
#: admin/views/ad-visitor-metabox.php:114
|
1968 |
msgid "Add-On features"
|
1969 |
msgstr ""
|
1970 |
|
1971 |
#: admin/views/ad-display-metabox.php:162 admin/views/ad-group-list-ads.php:37
|
1972 |
+
#: admin/views/ad-visitor-metabox.php:127
|
1973 |
msgid "add"
|
1974 |
msgstr ""
|
1975 |
|
2373 |
msgid "user can (capabilities)"
|
2374 |
msgstr ""
|
2375 |
|
2376 |
+
#: admin/views/ad-visitor-metabox.php:16
|
2377 |
+
msgid "user role"
|
2378 |
+
msgstr ""
|
2379 |
+
|
2380 |
+
#: admin/views/ad-visitor-metabox.php:19
|
2381 |
msgid "geo location"
|
2382 |
msgstr ""
|
2383 |
|
2384 |
+
#: admin/views/ad-visitor-metabox.php:22
|
2385 |
msgid "browser width"
|
2386 |
msgstr ""
|
2387 |
|
2388 |
+
#: admin/views/ad-visitor-metabox.php:30
|
2389 |
msgid ""
|
2390 |
"Click on the button below if the ad should NOT be visible to all visitors"
|
2391 |
msgstr ""
|
2392 |
|
2393 |
+
#: admin/views/ad-visitor-metabox.php:31
|
2394 |
msgid "Hide the ad from some users"
|
2395 |
msgstr ""
|
2396 |
|
2397 |
+
#: admin/views/ad-visitor-metabox.php:41
|
2398 |
msgid ""
|
2399 |
"Display conditions that are based on the user. Use with caution on cached "
|
2400 |
"websites."
|
2401 |
msgstr ""
|
2402 |
|
2403 |
+
#: admin/views/ad-visitor-metabox.php:87
|
2404 |
msgid ""
|
2405 |
"Visitor conditions limit the number of users who can see your ad. There is "
|
2406 |
"no need to set visitor conditions if you want all users to see the ad."
|
2407 |
msgstr ""
|
2408 |
|
2409 |
+
#: admin/views/ad-visitor-metabox.php:91
|
2410 |
#: modules/privacy/admin/views/setting-enable.php:4
|
2411 |
msgid "It seems that a caching plugin is activated."
|
2412 |
msgstr ""
|
2413 |
|
2414 |
+
#: admin/views/ad-visitor-metabox.php:93
|
2415 |
#, php-format
|
2416 |
msgid ""
|
2417 |
"Check out cache-busting in <a href=\"%s\" target=\"_blank\">Advanced Ads "
|
2418 |
"Pro</a> if dynamic features get cached."
|
2419 |
msgstr ""
|
2420 |
|
2421 |
+
#: admin/views/ad-visitor-metabox.php:132
|
2422 |
#, php-format
|
2423 |
msgid ""
|
2424 |
"Define the exact browser width for which an ad should be visible using the "
|
2425 |
"<a href=\"%s\" target=\"_blank\">Responsive add-on</a>."
|
2426 |
msgstr ""
|
2427 |
|
2428 |
+
#: admin/views/ad-visitor-metabox.php:189
|
2429 |
msgid ""
|
2430 |
"The visitor conditions below are deprecated. Please use the new version of "
|
2431 |
"visitor conditions to replace it."
|
2432 |
msgstr ""
|
2433 |
|
2434 |
+
#: admin/views/ad-visitor-metabox.php:195
|
2435 |
msgid "Display on all devices"
|
2436 |
msgstr ""
|
2437 |
|
2438 |
+
#: admin/views/ad-visitor-metabox.php:199
|
2439 |
msgid "only on mobile devices"
|
2440 |
msgstr ""
|
2441 |
|
2442 |
+
#: admin/views/ad-visitor-metabox.php:203
|
2443 |
msgid "not on mobile devices"
|
2444 |
msgstr ""
|
2445 |
|
2468 |
msgstr ""
|
2469 |
|
2470 |
#: admin/views/feedback-disable.php:20
|
2471 |
+
msgid "Ads are not showing up"
|
2472 |
msgstr ""
|
2473 |
|
2474 |
#: admin/views/feedback-disable.php:21
|
2475 |
+
msgid "It is only temporary"
|
2476 |
msgstr ""
|
2477 |
|
2478 |
#: admin/views/feedback-disable.php:22
|
2479 |
+
msgid "I miss a feature"
|
2480 |
msgstr ""
|
2481 |
|
2482 |
#: admin/views/feedback-disable.php:23
|
2483 |
+
msgid "Which one?"
|
2484 |
msgstr ""
|
2485 |
|
2486 |
#: admin/views/feedback-disable.php:24
|
2487 |
+
msgid "I stopped using ads on my site."
|
2488 |
+
msgstr ""
|
2489 |
+
|
2490 |
+
#: admin/views/feedback-disable.php:25
|
2491 |
msgid "I switched to another plugin"
|
2492 |
msgstr ""
|
2493 |
|
2494 |
+
#: admin/views/feedback-disable.php:30
|
2495 |
msgid "Send feedback & deactivate"
|
2496 |
msgstr ""
|
2497 |
|
2498 |
+
#: admin/views/feedback-disable.php:31
|
2499 |
msgid "Send feedback"
|
2500 |
msgstr ""
|
2501 |
|
2502 |
+
#: admin/views/feedback-disable.php:33
|
2503 |
msgid "Only Deactivate"
|
2504 |
msgstr ""
|
2505 |
|
2506 |
+
#: admin/views/feedback-disable.php:36
|
2507 |
msgid ""
|
2508 |
"Thanks for submitting your feedback. I will reply within 24 hours on working "
|
2509 |
"days."
|
2510 |
msgstr ""
|
2511 |
|
2512 |
#. %s is the title of the website
|
2513 |
+
#: admin/views/feedback-disable.php:41
|
2514 |
#, php-format
|
2515 |
msgid "All the best to you and %s."
|
2516 |
msgstr ""
|
2517 |
|
2518 |
+
#: admin/views/feedback-disable.php:42
|
2519 |
msgid "Disabling the plugin now…"
|
2520 |
msgstr ""
|
2521 |
|
|
|
|
|
|
|
|
|
|
|
|
|
2522 |
#: admin/views/pitch-bundle.php:1
|
2523 |
msgid "All Access – with all available add-ons"
|
2524 |
msgstr ""
|
3068 |
msgid "Setting up AdSense ads manually"
|
3069 |
msgstr ""
|
3070 |
|
|
|
|
|
|
|
|
|
3071 |
#: admin/views/notices/welcome-panel.php:23
|
3072 |
msgid "Reach out for help"
|
3073 |
msgstr ""
|
modules/gadsense/admin/assets/js/new-ad.js
CHANGED
@@ -611,7 +611,7 @@
|
|
611 |
break;
|
612 |
default:
|
613 |
setDetailsFromAdCode( parseResult );
|
614 |
-
if ( 'undefined' != typeof AdsenseMAPI && parseResult.pubId == AdsenseMAPI.pubId ) {
|
615 |
var content = $( '#advanced-ads-ad-parameters input[name="advanced_ad[content]"]' ).val();
|
616 |
MapiSaveAdCode( content, parseResult.slotId );
|
617 |
makeReadOnly();
|
@@ -876,6 +876,14 @@
|
|
876 |
$( '#advanced-ads-ad-parameters-size' ).next('.hr').css( 'display', 'block' );
|
877 |
$( '.clearfix-before' ).hide();
|
878 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
879 |
$( document ).trigger( 'gadsenseUnitChanged' );
|
880 |
window.gadsenseFormatAdContent();
|
881 |
|
611 |
break;
|
612 |
default:
|
613 |
setDetailsFromAdCode( parseResult );
|
614 |
+
if ( 'undefined' != typeof AdsenseMAPI && 'undefined' != typeof AdsenseMAPI.hasToken && parseResult.pubId == AdsenseMAPI.pubId ) {
|
615 |
var content = $( '#advanced-ads-ad-parameters input[name="advanced_ad[content]"]' ).val();
|
616 |
MapiSaveAdCode( content, parseResult.slotId );
|
617 |
makeReadOnly();
|
876 |
$( '#advanced-ads-ad-parameters-size' ).next('.hr').css( 'display', 'block' );
|
877 |
$( '.clearfix-before' ).hide();
|
878 |
}
|
879 |
+
if ( 'link' == type || 'normal' == type ) {
|
880 |
+
if ( ! $( '[name="advanced_ad\[width\]"]' ).val() ) {
|
881 |
+
$( '[name="advanced_ad\[width\]"]' ).val( '300' );
|
882 |
+
}
|
883 |
+
if ( ! $( '[name="advanced_ad\[height\]"]' ).val() ) {
|
884 |
+
$( '[name="advanced_ad\[height\]"]' ).val( '250' );
|
885 |
+
}
|
886 |
+
}
|
887 |
$( document ).trigger( 'gadsenseUnitChanged' );
|
888 |
window.gadsenseFormatAdContent();
|
889 |
|
modules/gadsense/includes/class-ad-type-adsense.php
CHANGED
@@ -56,7 +56,7 @@ class Advanced_Ads_Ad_Type_Adsense extends Advanced_Ads_Ad_Type_Abstract {
|
|
56 |
$unit_id = '';
|
57 |
$unit_pubid = '';
|
58 |
$unit_code = '';
|
59 |
-
$unit_type = '';
|
60 |
$unit_width = 0;
|
61 |
$unit_height = 0;
|
62 |
$json_content = '';
|
@@ -72,7 +72,7 @@ class Advanced_Ads_Ad_Type_Adsense extends Advanced_Ads_Ad_Type_Abstract {
|
|
72 |
|
73 |
// check pub_id for errors
|
74 |
$pub_id_errors = false;
|
75 |
-
if( $pub_id !== '' && 0 !== strpos( $pub_id, 'pub-' )){
|
76 |
$pub_id_errors = __( 'The Publisher ID has an incorrect format. (must start with "pub-")', 'advanced-ads' );
|
77 |
}
|
78 |
|
56 |
$unit_id = '';
|
57 |
$unit_pubid = '';
|
58 |
$unit_code = '';
|
59 |
+
$unit_type = 'responsive';
|
60 |
$unit_width = 0;
|
61 |
$unit_height = 0;
|
62 |
$json_content = '';
|
72 |
|
73 |
// check pub_id for errors
|
74 |
$pub_id_errors = false;
|
75 |
+
if( $pub_id !== '' && 0 !== strpos( $pub_id, 'pub-' ) ){
|
76 |
$pub_id_errors = __( 'The Publisher ID has an incorrect format. (must start with "pub-")', 'advanced-ads' );
|
77 |
}
|
78 |
|
modules/gadsense/includes/class-gadsense-data.php
CHANGED
@@ -52,7 +52,7 @@ class Advanced_Ads_AdSense_Data {
|
|
52 |
if ( ! empty( $ad ) ) {
|
53 |
if ( isset( $ad->is_ad ) && true === $ad->is_ad && 'adsense' === $ad->type ) {
|
54 |
$ad_content = json_decode( $ad->content );
|
55 |
-
if ( $ad_content && isset( $ad_content->pubId ) ) {
|
56 |
return $ad_content->pubId;
|
57 |
}
|
58 |
}
|
52 |
if ( ! empty( $ad ) ) {
|
53 |
if ( isset( $ad->is_ad ) && true === $ad->is_ad && 'adsense' === $ad->type ) {
|
54 |
$ad_content = json_decode( $ad->content );
|
55 |
+
if ( $ad_content && isset( $ad_content->pubId ) && !empty( $ad_content->pubId ) ) {
|
56 |
return $ad_content->pubId;
|
57 |
}
|
58 |
}
|
modules/gadsense/public/public.php
CHANGED
@@ -29,6 +29,10 @@ class Advanced_Ads_AdSense_Public {
|
|
29 |
echo '<style>ins.adsbygoogle { background-color: transparent; padding: 0; }</style>';
|
30 |
}
|
31 |
|
|
|
|
|
|
|
|
|
32 |
$privacy_options = Advanced_Ads_Privacy::get_instance()->options();
|
33 |
$privacy_enabled = ! empty( $privacy_options['enabled'] ) && 'not_needed' !== Advanced_Ads_Privacy::get_instance()->get_state();
|
34 |
$npa_enabled = ! empty( $privacy_options['show-non-personalized-adsense'] );
|
@@ -51,6 +55,10 @@ class Advanced_Ads_AdSense_Public {
|
|
51 |
} )</script>';
|
52 |
}
|
53 |
|
|
|
|
|
|
|
|
|
54 |
/**
|
55 |
* inject page-level header code
|
56 |
*
|
@@ -58,7 +66,7 @@ class Advanced_Ads_AdSense_Public {
|
|
58 |
*/
|
59 |
$pub_id = trim( $this->data->get_adsense_id() );
|
60 |
|
61 |
-
if
|
62 |
$pub_id = $this->data->get_adsense_id();
|
63 |
$client_id = 'ca-' . $pub_id;
|
64 |
include GADSENSE_BASE_PATH . 'public/templates/page-level.php';
|
29 |
echo '<style>ins.adsbygoogle { background-color: transparent; padding: 0; }</style>';
|
30 |
}
|
31 |
|
32 |
+
if ( defined( 'ADVADS_ADS_DISABLED' ) ) {
|
33 |
+
return;
|
34 |
+
}
|
35 |
+
|
36 |
$privacy_options = Advanced_Ads_Privacy::get_instance()->options();
|
37 |
$privacy_enabled = ! empty( $privacy_options['enabled'] ) && 'not_needed' !== Advanced_Ads_Privacy::get_instance()->get_state();
|
38 |
$npa_enabled = ! empty( $privacy_options['show-non-personalized-adsense'] );
|
55 |
} )</script>';
|
56 |
}
|
57 |
|
58 |
+
if ( ! apply_filters( 'advanced-ads-can-display-ads-in-header', true ) ) {
|
59 |
+
return;
|
60 |
+
}
|
61 |
+
|
62 |
/**
|
63 |
* inject page-level header code
|
64 |
*
|
66 |
*/
|
67 |
$pub_id = trim( $this->data->get_adsense_id() );
|
68 |
|
69 |
+
if ( $pub_id && isset( $options['page-level-enabled'] ) && $options['page-level-enabled'] ) {
|
70 |
$pub_id = $this->data->get_adsense_id();
|
71 |
$client_id = 'ca-' . $pub_id;
|
72 |
include GADSENSE_BASE_PATH . 'public/templates/page-level.php';
|
public/class-advanced-ads.php
CHANGED
@@ -296,6 +296,7 @@ class Advanced_Ads {
|
|
296 |
|
297 |
if ( ! empty( $post_ad_options['disable_ads'] ) ) {
|
298 |
define( 'ADVADS_ADS_DISABLED', true );
|
|
|
299 |
}
|
300 |
};
|
301 |
|
@@ -308,8 +309,28 @@ class Advanced_Ads {
|
|
308 |
$shop_ad_options = get_post_meta( absint( $shop_id ), '_advads_ad_settings', true );
|
309 |
if ( ! empty( $shop_ad_options['disable_ads'] ) ) {
|
310 |
define( 'ADVADS_ADS_DISABLED', true );
|
|
|
311 |
}
|
312 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
313 |
}
|
314 |
|
315 |
/**
|
@@ -424,6 +445,10 @@ class Advanced_Ads {
|
|
424 |
return $content;
|
425 |
}
|
426 |
|
|
|
|
|
|
|
|
|
427 |
// Check if ads are disabled in secondary queries.
|
428 |
if ( ! empty( $options['disabled-ads']['secondary'] ) ) {
|
429 |
// this function was called by ajax (in secondary query).
|
@@ -434,11 +459,6 @@ class Advanced_Ads {
|
|
434 |
if ( 'wp_router_page' === get_post_type() ) {
|
435 |
return $content;
|
436 |
}
|
437 |
-
|
438 |
-
if ( $this->has_many_the_content() ) {
|
439 |
-
return $content;
|
440 |
-
}
|
441 |
-
|
442 |
}
|
443 |
|
444 |
// No need to inject ads because all tags are stripped from excepts.
|
@@ -574,23 +594,6 @@ class Advanced_Ads {
|
|
574 |
return false;
|
575 |
}
|
576 |
|
577 |
-
if ( isset( $options['hide-for-user-role'] ) ) {
|
578 |
-
$hide_for_roles = Advanced_Ads_Utils::maybe_translate_cap_to_role( $options['hide-for-user-role'] );
|
579 |
-
} else {
|
580 |
-
$hide_for_roles = array();
|
581 |
-
}
|
582 |
-
$user = wp_get_current_user();
|
583 |
-
|
584 |
-
if ( $hide_for_roles && is_user_logged_in() && is_array( $user->roles ) && array_intersect( $hide_for_roles, $user->roles ) ) {
|
585 |
-
return false;
|
586 |
-
}
|
587 |
-
|
588 |
-
// check bots if option is enabled.
|
589 |
-
if ( ( isset( $options['block-bots'] ) && $options['block-bots']
|
590 |
-
&& ! $this->is_cache_bot() && $this->is_bot() ) ) {
|
591 |
-
return false;
|
592 |
-
}
|
593 |
-
|
594 |
return true;
|
595 |
}
|
596 |
|
@@ -802,11 +805,15 @@ class Advanced_Ads {
|
|
802 |
*/
|
803 |
public function noindex_attachment_images() {
|
804 |
global $post;
|
805 |
-
|
806 |
-
if ( is_attachment() && is_object( $post ) && isset( $post->post_parent )
|
807 |
-
|
808 |
-
|
809 |
-
|
|
|
|
|
|
|
|
|
810 |
}
|
811 |
}
|
812 |
}
|
@@ -817,7 +824,7 @@ class Advanced_Ads {
|
|
817 |
* @since 1.10.8
|
818 |
*/
|
819 |
public function custom_header_code(){
|
820 |
-
if( current_user_can( Advanced_Ads_Plugin::user_cap( 'advanced_ads_edit_ads') ) ){
|
821 |
?><style>
|
822 |
div.advads-edit-bar{position:relative;top:0;left:0;height:0;display:none;z-index:10000;animation:advads-edit-appear 2s linear 1;}
|
823 |
@keyframes advads-edit-appear {
|
296 |
|
297 |
if ( ! empty( $post_ad_options['disable_ads'] ) ) {
|
298 |
define( 'ADVADS_ADS_DISABLED', true );
|
299 |
+
return;
|
300 |
}
|
301 |
};
|
302 |
|
309 |
$shop_ad_options = get_post_meta( absint( $shop_id ), '_advads_ad_settings', true );
|
310 |
if ( ! empty( $shop_ad_options['disable_ads'] ) ) {
|
311 |
define( 'ADVADS_ADS_DISABLED', true );
|
312 |
+
return;
|
313 |
}
|
314 |
}
|
315 |
+
|
316 |
+
if ( isset( $options['hide-for-user-role'] ) ) {
|
317 |
+
$hide_for_roles = Advanced_Ads_Utils::maybe_translate_cap_to_role( $options['hide-for-user-role'] );
|
318 |
+
} else {
|
319 |
+
$hide_for_roles = array();
|
320 |
+
}
|
321 |
+
$user = wp_get_current_user();
|
322 |
+
|
323 |
+
if ( $hide_for_roles && is_user_logged_in() && is_array( $user->roles ) && array_intersect( $hide_for_roles, $user->roles ) ) {
|
324 |
+
define( 'ADVADS_ADS_DISABLED', true );
|
325 |
+
return;
|
326 |
+
}
|
327 |
+
|
328 |
+
// check bots if option is enabled.
|
329 |
+
if ( ( isset( $options['block-bots'] ) && $options['block-bots']
|
330 |
+
&& ! $this->is_cache_bot() && $this->is_bot() ) ) {
|
331 |
+
define( 'ADVADS_ADS_DISABLED', true );
|
332 |
+
return;
|
333 |
+
}
|
334 |
}
|
335 |
|
336 |
/**
|
445 |
return $content;
|
446 |
}
|
447 |
|
448 |
+
if ( $this->has_many_the_content() ) {
|
449 |
+
return $content;
|
450 |
+
}
|
451 |
+
|
452 |
// Check if ads are disabled in secondary queries.
|
453 |
if ( ! empty( $options['disabled-ads']['secondary'] ) ) {
|
454 |
// this function was called by ajax (in secondary query).
|
459 |
if ( 'wp_router_page' === get_post_type() ) {
|
460 |
return $content;
|
461 |
}
|
|
|
|
|
|
|
|
|
|
|
462 |
}
|
463 |
|
464 |
// No need to inject ads because all tags are stripped from excepts.
|
594 |
return false;
|
595 |
}
|
596 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
597 |
return true;
|
598 |
}
|
599 |
|
805 |
*/
|
806 |
public function noindex_attachment_images() {
|
807 |
global $post;
|
808 |
+
|
809 |
+
if ( is_attachment() && is_object( $post ) && isset( $post->post_parent ) ) {
|
810 |
+
$post_parent = get_post( $post->post_parent );
|
811 |
+
$parent_is_ad = $post_parent && self::POST_TYPE_SLUG == $post_parent->post_type;
|
812 |
+
// if the image was not attached to any post and if at least one image ad contains the image. Needed for backward compatibility.
|
813 |
+
$parent_is_image_ad = ( empty( $post->post_parent ) && 0 < get_post_meta( get_the_ID(), '_advanced-ads_parent_id', true ) );
|
814 |
+
|
815 |
+
if ( $parent_is_ad || $parent_is_image_ad ) {
|
816 |
+
echo '<meta name="robots" content="noindex,nofollow" />';
|
817 |
}
|
818 |
}
|
819 |
}
|
824 |
* @since 1.10.8
|
825 |
*/
|
826 |
public function custom_header_code(){
|
827 |
+
if ( ! defined( 'ADVANCED_ADS_DISABLE_EDIT_BAR' ) && current_user_can( Advanced_Ads_Plugin::user_cap( 'advanced_ads_edit_ads') ) ){
|
828 |
?><style>
|
829 |
div.advads-edit-bar{position:relative;top:0;left:0;height:0;display:none;z-index:10000;animation:advads-edit-appear 2s linear 1;}
|
830 |
@keyframes advads-edit-appear {
|
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 |
|
@@ -27,7 +27,7 @@ Are you looking for a simple ad manager plugin? These are the top arguments to u
|
|
27 |
|
28 |
Would you like to know if there is a certain feature, what the optimized setup would be, or how to implement your client’s demands? Just [open a thread in the forum](https://wordpress.org/support/plugin/advanced-ads#new-post)!
|
29 |
|
30 |
-
Based on my experience as a publisher with millions of monthly served ads, I've developed this ad management plugin for WordPress when no other solution offered testing and optimization features. It allowed us to grow to 100 MM monthly ad impressions. Benefit from this knowledge and monetize your website today!
|
31 |
|
32 |
[Full Feature List](https://wpadvancedads.com/features/).
|
33 |
|
@@ -288,6 +288,17 @@ Yes. Advanced Ads is based on WordPress standards and therefore easily customiza
|
|
288 |
|
289 |
== Changelog ==
|
290 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
291 |
= 1.13.6 =
|
292 |
|
293 |
* fixed missing index issue raised when Tracking settings never were saved
|
5 |
Requires at least: 4.6
|
6 |
Tested up to: 5.2
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 1.13.7
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
27 |
|
28 |
Would you like to know if there is a certain feature, what the optimized setup would be, or how to implement your client’s demands? Just [open a thread in the forum](https://wordpress.org/support/plugin/advanced-ads#new-post)!
|
29 |
|
30 |
+
Based on my experience as a publisher with millions of monthly served ads, I've developed this ad management plugin for WordPress when no other solution offered testing and optimization features. It allowed us to grow to 100 MM monthly ad impressions. Benefit from this knowledge about advertising and monetize your website today!
|
31 |
|
32 |
[Full Feature List](https://wpadvancedads.com/features/).
|
33 |
|
288 |
|
289 |
== Changelog ==
|
290 |
|
291 |
+
= 1.13.7 =
|
292 |
+
|
293 |
+
* set `ADVANCED_ADS_DISABLE_EDIT_BAR` to disable frontend edit bar
|
294 |
+
* set better default data for new AdSense ads
|
295 |
+
* when `the_content` filters are nested, use the outermost one to inject ads
|
296 |
+
* hide certain notices for a longer period even if they stay valid
|
297 |
+
* removed notice about plugin updates since WP 5.2 handles this now
|
298 |
+
* removed notice about website being hosted on wp.com
|
299 |
+
* honor "Hide ads for user roles" and "Hide ads from bots" settings when displaying AdSense verification code & Auto ads
|
300 |
+
* prevented some attachment pages containing ads from being indexed
|
301 |
+
|
302 |
= 1.13.6 =
|
303 |
|
304 |
* fixed missing index issue raised when Tracking settings never were saved
|