Version Description
- creating unique slugs for the ad post type in order to prevent conflicts like found with Beaver Builder
- added option to disable AdSense stats in the backend
- fixed conflicts when $ (jQuery) was not available
- fixed potential JS conflict in Wizard script
Download this release
Release Info
Developer | webzunft |
Plugin | Advanced Ads |
Version | 1.14.10 |
Comparing to | |
See all releases |
Code changes from version 1.14.9 to 1.14.10
- admin/assets/css/admin.css +3 -3
- admin/assets/js/admin.js +64 -67
- admin/assets/js/wizard.js +1 -1
- admin/includes/class-ad-type.php +42 -0
- admin/includes/class-meta-box.php +3 -1
- admin/includes/class-overview-widgets.php +6 -3
- admin/includes/class-settings.php +3 -7
- admin/views/gadsense-dashboard.php +1 -1
- advanced-ads.php +2 -2
- classes/display-conditions.php +15 -15
- classes/plugin.php +18 -0
- languages/advanced-ads.pot +144 -130
- modules/gadsense/admin/assets/js/adsense.js +133 -133
- modules/gadsense/admin/views/adsense-account.php +1 -1
- modules/gadsense/includes/class-ad-type-adsense.php +1 -1
- modules/gadsense/includes/class-gadsense-data.php +8 -0
- modules/gadsense/includes/class-network-adsense.php +22 -0
- public/views/ad-edit-bar.php +1 -1
- readme.txt +8 -1
admin/assets/css/admin.css
CHANGED
@@ -52,9 +52,9 @@
|
|
52 |
/**
|
53 |
* AD EDIT PAGE
|
54 |
*/
|
55 |
-
h2.hndle .advads-hndlelinks { display: inline-block; margin-left: 1em; }
|
56 |
-
h2.hndle .advads-hndlelinks a { text-decoration: none; }
|
57 |
-
h2.hndle .advads-hndlelinks a + a { margin-left: 1em; }
|
58 |
.advads-video-link-container { text-align: center; }
|
59 |
.advads-ad-metabox { position: relative; top: 0; left: 0; padding: 2em; background: #fff; }
|
60 |
.advads-ad-metabox h2 { font-weight: bold; color: #0074a2; font-size: 1.6em; margin: 0 0 1em; }
|
52 |
/**
|
53 |
* AD EDIT PAGE
|
54 |
*/
|
55 |
+
h2.hndle .advads-hndlelinks, #advads_overview_adsense_stats .advads-hndlelinks { display: inline-block; margin-left: 1em; }
|
56 |
+
h2.hndle .advads-hndlelinks a, #advads_overview_adsense_stats .advads-hndlelinks a { text-decoration: none; }
|
57 |
+
h2.hndle .advads-hndlelinks a + a, #advads_overview_adsense_stats .advads-hndlelinks a + a { margin-left: 1em; }
|
58 |
.advads-video-link-container { text-align: center; }
|
59 |
.advads-ad-metabox { position: relative; top: 0; left: 0; padding: 2em; background: #fff; }
|
60 |
.advads-ad-metabox h2 { font-weight: bold; color: #0074a2; font-size: 1.6em; margin: 0 0 1em; }
|
admin/assets/js/admin.js
CHANGED
@@ -1170,15 +1170,15 @@ if (! window.AdvancedAdsAdmin.AdImporter) window.AdvancedAdsAdmin.AdImporter = {
|
|
1170 |
*/
|
1171 |
highlightSelectedRowInExternalAdsList: function(hideInactive){
|
1172 |
if (typeof(hideInactive) == 'undefined') hideInactive = AdvancedAdsAdmin.AdImporter.adNetwork.hideIdle;
|
1173 |
-
const tbody =
|
1174 |
-
const btn =
|
1175 |
|
1176 |
// count the ad units to determine if there's a need for the overflow class (scrolling)
|
1177 |
const nbUnits = hideInactive
|
1178 |
-
?
|
1179 |
-
:
|
1180 |
-
if (nbUnits > 8)
|
1181 |
-
else
|
1182 |
|
1183 |
// hide inactive ads, but always show the selected one (if any)
|
1184 |
if (hideInactive) {
|
@@ -1186,7 +1186,7 @@ if (! window.AdvancedAdsAdmin.AdImporter) window.AdvancedAdsAdmin.AdImporter = {
|
|
1186 |
btn.addClass('dashicons-visibility');
|
1187 |
btn.attr('title', advadstxt.show_inactive_ads);
|
1188 |
tbody.find('tr[data-slotid]').each(function (k, v) {
|
1189 |
-
v =
|
1190 |
if (v.data("active")) v.show();
|
1191 |
else v.hide();
|
1192 |
});
|
@@ -1220,7 +1220,7 @@ if (! window.AdvancedAdsAdmin.AdImporter) window.AdvancedAdsAdmin.AdImporter = {
|
|
1220 |
},
|
1221 |
getSelectedRow(){
|
1222 |
const selectedId = AdvancedAdsAdmin.AdImporter.adNetwork.getSelectedId();
|
1223 |
-
const tbody =
|
1224 |
|
1225 |
if (selectedId){
|
1226 |
const selectedRows = tbody.find( 'tr[data-slotid="' + selectedId + '"]' );
|
@@ -1234,25 +1234,22 @@ if (! window.AdvancedAdsAdmin.AdImporter) window.AdvancedAdsAdmin.AdImporter = {
|
|
1234 |
const network = AdvancedAdsAdmin.AdImporter.adNetwork;
|
1235 |
network.openSelector();
|
1236 |
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
|
1243 |
AdvancedAdsAdmin.AdImporter.highlightSelectedRowInExternalAdsList(network.hideIdle);
|
1244 |
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
var SNT = network.getCustomInputs();
|
1249 |
SNT.css( 'display', 'none' );
|
1250 |
|
1251 |
-
|
1252 |
|
1253 |
if (! network.fetchedExternalAds){
|
1254 |
network.fetchedExternalAds = true;
|
1255 |
-
const nbUnits =
|
1256 |
if (nbUnits == 0) {
|
1257 |
//usually we start with a preloaded list.
|
1258 |
//only reload, when the count is zero (true for new accounts).
|
@@ -1280,46 +1277,46 @@ if (! window.AdvancedAdsAdmin.AdImporter) window.AdvancedAdsAdmin.AdImporter = {
|
|
1280 |
}
|
1281 |
AdvancedAdsAdmin.AdImporter.isSetup = true;
|
1282 |
|
1283 |
-
|
1284 |
|
1285 |
// handle clicks for the "insert new ... code" anchor
|
1286 |
-
|
1287 |
e.preventDefault();
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
var SNT = AdvancedAdsAdmin.AdImporter.adNetwork.getCustomInputs();
|
1293 |
SNT.css( 'display', 'none' );
|
1294 |
-
|
1295 |
});
|
1296 |
|
1297 |
// handle clicks for the "get ad code from your linked account" anchor
|
1298 |
-
|
1299 |
AdvancedAdsAdmin.AdImporter.openExternalAdsList();
|
1300 |
});
|
1301 |
|
1302 |
// the close button of the ad unit list
|
1303 |
-
|
1304 |
AdvancedAdsAdmin.AdImporter.manualSetup();
|
1305 |
} );
|
1306 |
|
1307 |
//the individual rows of the ad units may contain elements with the mapiaction class
|
1308 |
-
|
1309 |
-
var action =
|
1310 |
switch ( action ) {
|
1311 |
case 'updateList':
|
1312 |
AdvancedAdsAdmin.AdImporter.refreshAds();
|
1313 |
break;
|
1314 |
case 'getCode':
|
1315 |
-
if (
|
1316 |
break;
|
1317 |
}
|
1318 |
-
var slotId =
|
1319 |
AdvancedAdsAdmin.AdImporter.adNetwork.selectAdFromList(slotId);
|
1320 |
break;
|
1321 |
case 'updateCode':
|
1322 |
-
var slotId =
|
1323 |
AdvancedAdsAdmin.AdImporter.adNetwork.updateAdFromList(slotId);
|
1324 |
break;
|
1325 |
case 'toggleidle':
|
@@ -1340,10 +1337,10 @@ if (! window.AdvancedAdsAdmin.AdImporter) window.AdvancedAdsAdmin.AdImporter = {
|
|
1340 |
* this method is an equivalent to the close ad list button.
|
1341 |
*/
|
1342 |
manualSetup(){
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
|
1348 |
var SNT = AdvancedAdsAdmin.AdImporter.adNetwork.getCustomInputs();
|
1349 |
SNT.css( 'display', 'block' );
|
@@ -1357,17 +1354,17 @@ if (! window.AdvancedAdsAdmin.AdImporter) window.AdvancedAdsAdmin.AdImporter = {
|
|
1357 |
|
1358 |
// another legacy method
|
1359 |
resizeAdListHeader: function() {
|
1360 |
-
var th =
|
1361 |
-
var tb =
|
1362 |
var w = [];
|
1363 |
|
1364 |
tb.first().find( 'td' ).each(function(){
|
1365 |
-
w.push(
|
1366 |
});
|
1367 |
|
1368 |
th.each(function(i){
|
1369 |
if ( i != w.length - 1 ) {
|
1370 |
-
|
1371 |
}
|
1372 |
});
|
1373 |
},
|
@@ -1380,13 +1377,13 @@ if (! window.AdvancedAdsAdmin.AdImporter) window.AdvancedAdsAdmin.AdImporter = {
|
|
1380 |
closeAdSelector: function() {
|
1381 |
// close the ad unit selector
|
1382 |
setTimeout(function(){
|
1383 |
-
|
1384 |
{ height: 0, },
|
1385 |
360,
|
1386 |
function(){
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
display: 'none',
|
1391 |
height: 'auto',
|
1392 |
});
|
@@ -1403,17 +1400,17 @@ if (! window.AdvancedAdsAdmin.AdImporter) window.AdvancedAdsAdmin.AdImporter = {
|
|
1403 |
* updates the UI, (call if the selected unit is supported)
|
1404 |
*/
|
1405 |
unitIsNotSupported: function( slotID ) {
|
1406 |
-
|
1407 |
AdsenseMAPI.unsupportedUnits[slotID] = 1;
|
1408 |
-
|
1409 |
-
|
1410 |
-
if ( !
|
1411 |
-
var td =
|
1412 |
var content = td.text();
|
1413 |
td.html( '<a target="_blank" href="' + AdsenseMAPI.unsupportedLink + '" data-type="' + content + '">' + AdsenseMAPI.unsupportedText + '</a>' );
|
1414 |
}
|
1415 |
-
if ( !
|
1416 |
-
var td =
|
1417 |
var content = td.text();
|
1418 |
td.html( '<a target="_blank" href="' + AdsenseMAPI.unsupportedLink + '" data-size="' + content + '">' + AdsenseMAPI.unsupportedText + '</a>' );
|
1419 |
}
|
@@ -1425,20 +1422,20 @@ if (! window.AdvancedAdsAdmin.AdImporter) window.AdvancedAdsAdmin.AdImporter = {
|
|
1425 |
* updates the UI, (call if the selected unit is NOT supported)
|
1426 |
*/
|
1427 |
unitIsSupported: function( slotID ) {
|
1428 |
-
|
1429 |
if ( 'undefined' != typeof AdsenseMAPI.unsupportedUnits[slotID] ) {
|
1430 |
delete AdsenseMAPI.unsupportedUnits[slotID];
|
1431 |
}
|
1432 |
-
|
1433 |
-
|
1434 |
-
if (
|
1435 |
-
var td =
|
1436 |
-
var content =
|
1437 |
td.text( content );
|
1438 |
}
|
1439 |
-
if (
|
1440 |
-
var td =
|
1441 |
-
var content =
|
1442 |
td.text( content );
|
1443 |
}
|
1444 |
},
|
@@ -1449,8 +1446,8 @@ if (! window.AdvancedAdsAdmin.AdImporter) window.AdvancedAdsAdmin.AdImporter = {
|
|
1449 |
*/
|
1450 |
emptyMapiSelector: function( msg ) {
|
1451 |
const nag = '<div class="notice notice-error" style="font-size:1.1em;padding:.6em 1em;font-weight:bold;">' + msg + '</div>';
|
1452 |
-
|
1453 |
-
|
1454 |
},
|
1455 |
|
1456 |
/**
|
@@ -1458,14 +1455,14 @@ if (! window.AdvancedAdsAdmin.AdImporter) window.AdvancedAdsAdmin.AdImporter = {
|
|
1458 |
*/
|
1459 |
refreshAds: function() {
|
1460 |
const adNetwork = AdvancedAdsAdmin.AdImporter.adNetwork;
|
1461 |
-
|
1462 |
-
|
1463 |
type: 'post',
|
1464 |
url: ajaxurl,
|
1465 |
data: adNetwork.getRefreshAdsParameters(),
|
1466 |
success: function(response,status,XHR){
|
1467 |
if ( 'undefined' != typeof response.html ) {
|
1468 |
-
|
1469 |
AdvancedAdsAdmin.AdImporter.openExternalAdsList();
|
1470 |
} else if ( 'undefined' != typeof response.msg ) {
|
1471 |
AdvancedAdsAdmin.AdImporter.emptyMapiSelector( response.msg );
|
@@ -1473,10 +1470,10 @@ if (! window.AdvancedAdsAdmin.AdImporter) window.AdvancedAdsAdmin.AdImporter = {
|
|
1473 |
if ( 'undefined' != typeof response.raw ) {
|
1474 |
console.log( response.raw );
|
1475 |
}
|
1476 |
-
|
1477 |
},
|
1478 |
error: function(request,status,err){
|
1479 |
-
|
1480 |
},
|
1481 |
});
|
1482 |
|
1170 |
*/
|
1171 |
highlightSelectedRowInExternalAdsList: function(hideInactive){
|
1172 |
if (typeof(hideInactive) == 'undefined') hideInactive = AdvancedAdsAdmin.AdImporter.adNetwork.hideIdle;
|
1173 |
+
const tbody = jQuery( '#mapi-table-wrap tbody' );
|
1174 |
+
const btn = jQuery('#mapi-toggle-idle');
|
1175 |
|
1176 |
// count the ad units to determine if there's a need for the overflow class (scrolling)
|
1177 |
const nbUnits = hideInactive
|
1178 |
+
? jQuery( '#mapi-table-wrap tbody tr[data-active=1]' ).length
|
1179 |
+
: jQuery( '#mapi-table-wrap tbody tr' ).length;
|
1180 |
+
if (nbUnits > 8) jQuery( '#mapi-table-wrap' ).addClass('overflow');
|
1181 |
+
else jQuery( '#mapi-table-wrap' ).removeClass('overflow');
|
1182 |
|
1183 |
// hide inactive ads, but always show the selected one (if any)
|
1184 |
if (hideInactive) {
|
1186 |
btn.addClass('dashicons-visibility');
|
1187 |
btn.attr('title', advadstxt.show_inactive_ads);
|
1188 |
tbody.find('tr[data-slotid]').each(function (k, v) {
|
1189 |
+
v = jQuery(v);
|
1190 |
if (v.data("active")) v.show();
|
1191 |
else v.hide();
|
1192 |
});
|
1220 |
},
|
1221 |
getSelectedRow(){
|
1222 |
const selectedId = AdvancedAdsAdmin.AdImporter.adNetwork.getSelectedId();
|
1223 |
+
const tbody = jQuery( '#mapi-table-wrap tbody' );
|
1224 |
|
1225 |
if (selectedId){
|
1226 |
const selectedRows = tbody.find( 'tr[data-slotid="' + selectedId + '"]' );
|
1234 |
const network = AdvancedAdsAdmin.AdImporter.adNetwork;
|
1235 |
network.openSelector();
|
1236 |
|
1237 |
+
jQuery( '#mapi-insert-code' ).css( 'display', 'inline' );
|
1238 |
+
jQuery( '#mapi-open-selector' ).css( 'display', 'none' );
|
1239 |
+
jQuery( '#mapi-close-selector-link' ).css( 'display', 'inline' );
|
1240 |
+
jQuery( '.advads-adsense-code' ).css( 'display', 'none' );
|
1241 |
+
jQuery( '#remote-ad-unsupported-ad-type' ).css( 'display', 'none' );
|
1242 |
|
1243 |
AdvancedAdsAdmin.AdImporter.highlightSelectedRowInExternalAdsList(network.hideIdle);
|
1244 |
|
|
|
|
|
|
|
1245 |
var SNT = network.getCustomInputs();
|
1246 |
SNT.css( 'display', 'none' );
|
1247 |
|
1248 |
+
jQuery( '#mapi-wrap' ).css( 'display', 'block' );
|
1249 |
|
1250 |
if (! network.fetchedExternalAds){
|
1251 |
network.fetchedExternalAds = true;
|
1252 |
+
const nbUnits = jQuery( '#mapi-table-wrap tbody tr[data-slotid]' ).length;
|
1253 |
if (nbUnits == 0) {
|
1254 |
//usually we start with a preloaded list.
|
1255 |
//only reload, when the count is zero (true for new accounts).
|
1277 |
}
|
1278 |
AdvancedAdsAdmin.AdImporter.isSetup = true;
|
1279 |
|
1280 |
+
jQuery( document ).on( 'click', '.prevent-default', function( ev ) { ev.preventDefault() } );
|
1281 |
|
1282 |
// handle clicks for the "insert new ... code" anchor
|
1283 |
+
jQuery( document ).on('click', '#mapi-insert-code', function(e){
|
1284 |
e.preventDefault();
|
1285 |
+
jQuery( '.advads-adsense-code' ).show();
|
1286 |
+
jQuery( '#mapi-open-selector' ).css( 'display', 'inline' );
|
1287 |
+
jQuery( '#mapi-close-selector-link' ).css( 'display', 'inline' );
|
1288 |
+
jQuery( '#mapi-wrap' ).css( 'display', 'none' );
|
1289 |
var SNT = AdvancedAdsAdmin.AdImporter.adNetwork.getCustomInputs();
|
1290 |
SNT.css( 'display', 'none' );
|
1291 |
+
jQuery( this ).hide();
|
1292 |
});
|
1293 |
|
1294 |
// handle clicks for the "get ad code from your linked account" anchor
|
1295 |
+
jQuery( document ).on( 'click', '#mapi-open-selector a', function(){
|
1296 |
AdvancedAdsAdmin.AdImporter.openExternalAdsList();
|
1297 |
});
|
1298 |
|
1299 |
// the close button of the ad unit list
|
1300 |
+
jQuery( document ).on( 'click', '#mapi-close-selector,#mapi-close-selector-link', function(){
|
1301 |
AdvancedAdsAdmin.AdImporter.manualSetup();
|
1302 |
} );
|
1303 |
|
1304 |
//the individual rows of the ad units may contain elements with the mapiaction class
|
1305 |
+
jQuery( document ).on( 'click', '.mapiaction', function( ev ) {
|
1306 |
+
var action = jQuery( this ).attr( 'data-mapiaction' );
|
1307 |
switch ( action ) {
|
1308 |
case 'updateList':
|
1309 |
AdvancedAdsAdmin.AdImporter.refreshAds();
|
1310 |
break;
|
1311 |
case 'getCode':
|
1312 |
+
if ( jQuery( this ).hasClass( 'disabled' ) ) {
|
1313 |
break;
|
1314 |
}
|
1315 |
+
var slotId = jQuery( this ).attr( 'data-slotid' );
|
1316 |
AdvancedAdsAdmin.AdImporter.adNetwork.selectAdFromList(slotId);
|
1317 |
break;
|
1318 |
case 'updateCode':
|
1319 |
+
var slotId = jQuery( this ).attr( 'data-slotid' );
|
1320 |
AdvancedAdsAdmin.AdImporter.adNetwork.updateAdFromList(slotId);
|
1321 |
break;
|
1322 |
case 'toggleidle':
|
1337 |
* this method is an equivalent to the close ad list button.
|
1338 |
*/
|
1339 |
manualSetup(){
|
1340 |
+
jQuery( '#mapi-open-selector,.advads-adsense-show-code' ).css( 'display', 'inline' );
|
1341 |
+
jQuery( '#mapi-insert-code' ).css( 'display', 'inline' );
|
1342 |
+
jQuery( '#mapi-close-selector-link' ).css( 'display', 'none' );
|
1343 |
+
jQuery( '#mapi-wrap' ).css( 'display', 'none' );
|
1344 |
|
1345 |
var SNT = AdvancedAdsAdmin.AdImporter.adNetwork.getCustomInputs();
|
1346 |
SNT.css( 'display', 'block' );
|
1354 |
|
1355 |
// another legacy method
|
1356 |
resizeAdListHeader: function() {
|
1357 |
+
var th = jQuery( '#mapi-list-header span' );
|
1358 |
+
var tb = jQuery( '#mapi-table-wrap tbody tr:visible' );
|
1359 |
var w = [];
|
1360 |
|
1361 |
tb.first().find( 'td' ).each(function(){
|
1362 |
+
w.push( jQuery( this ).width() );
|
1363 |
});
|
1364 |
|
1365 |
th.each(function(i){
|
1366 |
if ( i != w.length - 1 ) {
|
1367 |
+
jQuery( this ).width( w[i] );
|
1368 |
}
|
1369 |
});
|
1370 |
},
|
1377 |
closeAdSelector: function() {
|
1378 |
// close the ad unit selector
|
1379 |
setTimeout(function(){
|
1380 |
+
jQuery( '#mapi-wrap' ).animate(
|
1381 |
{ height: 0, },
|
1382 |
360,
|
1383 |
function(){
|
1384 |
+
jQuery( '#mapi-open-selector,.advads-adsense-show-code' ).css( 'display', 'inline' );
|
1385 |
+
jQuery( '#mapi-close-selector-link' ).css( 'display', 'none' );
|
1386 |
+
jQuery( '#mapi-wrap' ).css({
|
1387 |
display: 'none',
|
1388 |
height: 'auto',
|
1389 |
});
|
1400 |
* updates the UI, (call if the selected unit is supported)
|
1401 |
*/
|
1402 |
unitIsNotSupported: function( slotID ) {
|
1403 |
+
jQuery( '#remote-ad-unsupported-ad-type' ).css( 'display', 'block' );
|
1404 |
AdsenseMAPI.unsupportedUnits[slotID] = 1;
|
1405 |
+
jQuery( 'i[data-mapiaction="getCode"][data-slotid="' + slotID + '"]' ).addClass( 'disabled' );
|
1406 |
+
jQuery( 'tr[data-slotid="' + slotID + '"] .unitcode > span' ).addClass( 'unsupported' );
|
1407 |
+
if ( ! jQuery( 'tr[data-slotid="' + slotID + '"] .unittype a' ).length ) {
|
1408 |
+
var td = jQuery( 'tr[data-slotid="' + slotID + '"] .unittype' );
|
1409 |
var content = td.text();
|
1410 |
td.html( '<a target="_blank" href="' + AdsenseMAPI.unsupportedLink + '" data-type="' + content + '">' + AdsenseMAPI.unsupportedText + '</a>' );
|
1411 |
}
|
1412 |
+
if ( ! jQuery( 'tr[data-slotid="' + slotID + '"] .unitsize a' ).length ) {
|
1413 |
+
var td = jQuery( 'tr[data-slotid="' + slotID + '"] .unitsize' );
|
1414 |
var content = td.text();
|
1415 |
td.html( '<a target="_blank" href="' + AdsenseMAPI.unsupportedLink + '" data-size="' + content + '">' + AdsenseMAPI.unsupportedText + '</a>' );
|
1416 |
}
|
1422 |
* updates the UI, (call if the selected unit is NOT supported)
|
1423 |
*/
|
1424 |
unitIsSupported: function( slotID ) {
|
1425 |
+
jQuery( '#remote-ad-unsupported-ad-type' ).css( 'display', 'none' );
|
1426 |
if ( 'undefined' != typeof AdsenseMAPI.unsupportedUnits[slotID] ) {
|
1427 |
delete AdsenseMAPI.unsupportedUnits[slotID];
|
1428 |
}
|
1429 |
+
jQuery( 'i[data-mapiaction="getCode"][data-slotid="' + slotID + '"]' ).removeClass( 'disabled' );
|
1430 |
+
jQuery( 'tr[data-slotid="' + slotID + '"] .unitcode > span' ).removeClass( 'unsupported' );
|
1431 |
+
if ( jQuery( 'tr[data-slotid="' + slotID + '"] .unittype a' ).length ) {
|
1432 |
+
var td = jQuery( 'tr[data-slotid="' + slotID + '"] .unittype' );
|
1433 |
+
var content = jQuery( 'tr[data-slotid="' + slotID + '"] .unittype a' ).attr( 'data-type' );
|
1434 |
td.text( content );
|
1435 |
}
|
1436 |
+
if ( jQuery( 'tr[data-slotid="' + slotID + '"] .unitsize a' ).length ) {
|
1437 |
+
var td = jQuery( 'tr[data-slotid="' + slotID + '"] .unitsize' );
|
1438 |
+
var content = jQuery( 'tr[data-slotid="' + slotID + '"] .unitsize a' ).attr( 'data-size' );
|
1439 |
td.text( content );
|
1440 |
}
|
1441 |
},
|
1446 |
*/
|
1447 |
emptyMapiSelector: function( msg ) {
|
1448 |
const nag = '<div class="notice notice-error" style="font-size:1.1em;padding:.6em 1em;font-weight:bold;">' + msg + '</div>';
|
1449 |
+
jQuery( '#mapi-loading-overlay' ).css( 'display', 'none' );
|
1450 |
+
jQuery( '#mapi-wrap' ).html( jQuery( nag ) );
|
1451 |
},
|
1452 |
|
1453 |
/**
|
1455 |
*/
|
1456 |
refreshAds: function() {
|
1457 |
const adNetwork = AdvancedAdsAdmin.AdImporter.adNetwork;
|
1458 |
+
jQuery( '#mapi-loading-overlay' ).css( 'display', 'block' );
|
1459 |
+
jQuery.ajax({
|
1460 |
type: 'post',
|
1461 |
url: ajaxurl,
|
1462 |
data: adNetwork.getRefreshAdsParameters(),
|
1463 |
success: function(response,status,XHR){
|
1464 |
if ( 'undefined' != typeof response.html ) {
|
1465 |
+
jQuery( '#mapi-wrap' ).replaceWith( jQuery( response.html ) );
|
1466 |
AdvancedAdsAdmin.AdImporter.openExternalAdsList();
|
1467 |
} else if ( 'undefined' != typeof response.msg ) {
|
1468 |
AdvancedAdsAdmin.AdImporter.emptyMapiSelector( response.msg );
|
1470 |
if ( 'undefined' != typeof response.raw ) {
|
1471 |
console.log( response.raw );
|
1472 |
}
|
1473 |
+
jQuery( '#mapi-loading-overlay' ).css( 'display', 'none' );
|
1474 |
},
|
1475 |
error: function(request,status,err){
|
1476 |
+
jQuery( '#mapi-loading-overlay' ).css( 'display', 'none' );
|
1477 |
},
|
1478 |
});
|
1479 |
|
admin/assets/js/wizard.js
CHANGED
@@ -65,7 +65,7 @@ var advads_wizard = {
|
|
65 |
},
|
66 |
close: function(){ // close the wizard by showing all elements again
|
67 |
this.status = false;
|
68 |
-
jQuery('
|
69 |
jQuery('#advads-stop-wizard, #advads-wizard-controls').addClass('hidden');
|
70 |
if( this.one_column !== true ){
|
71 |
jQuery( '#post-body').addClass( 'columns-2' ).removeClass( 'columns-1' );
|
65 |
},
|
66 |
close: function(){ // close the wizard by showing all elements again
|
67 |
this.status = false;
|
68 |
+
jQuery('.advads-hide').removeClass('advads-hide');
|
69 |
jQuery('#advads-stop-wizard, #advads-wizard-controls').addClass('hidden');
|
70 |
if( this.one_column !== true ){
|
71 |
jQuery( '#post-body').addClass( 'columns-2' ).removeClass( 'columns-1' );
|
admin/includes/class-ad-type.php
CHANGED
@@ -54,6 +54,7 @@ class Advanced_Ads_Admin_Ad_Type {
|
|
54 |
|
55 |
// things that need to know the current screen
|
56 |
add_action( 'current_screen', array( $this, 'run_on_ad_edit_screen' ) );
|
|
|
57 |
|
58 |
}
|
59 |
|
@@ -707,4 +708,45 @@ class Advanced_Ads_Admin_Ad_Type {
|
|
707 |
return $output;
|
708 |
}
|
709 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
710 |
}
|
54 |
|
55 |
// things that need to know the current screen
|
56 |
add_action( 'current_screen', array( $this, 'run_on_ad_edit_screen' ) );
|
57 |
+
add_filter( 'pre_wp_unique_post_slug', array( $this, 'pre_wp_unique_post_slug' ), 10, 6 );
|
58 |
|
59 |
}
|
60 |
|
708 |
return $output;
|
709 |
}
|
710 |
|
711 |
+
/**
|
712 |
+
* Create a unique across all post types slug for the ad.
|
713 |
+
* Almost all code here copied from `wp_unique_post_slug()`.
|
714 |
+
*
|
715 |
+
* @param string $override_slug Short-circuit return value.
|
716 |
+
* @param string $slug The desired slug (post_name).
|
717 |
+
* @param int $post_ID Post ID.
|
718 |
+
* @param string $post_status The post status.
|
719 |
+
* @param string $post_type Post type.
|
720 |
+
* @param int $post_parent Post parent ID.
|
721 |
+
*/
|
722 |
+
function pre_wp_unique_post_slug( $override_slug, $slug, $post_ID, $post_status, $post_type, $post_parent ) {
|
723 |
+
if ( Advanced_Ads::POST_TYPE_SLUG !== $post_type ) {
|
724 |
+
return $override_slug;
|
725 |
+
}
|
726 |
+
|
727 |
+
global $wpdb, $wp_rewrite;
|
728 |
+
|
729 |
+
$feeds = $wp_rewrite->feeds;
|
730 |
+
if ( ! is_array( $feeds ) ) {
|
731 |
+
$feeds = array();
|
732 |
+
}
|
733 |
+
|
734 |
+
// Advanced Ads post types slugs must be unique across all types.
|
735 |
+
$check_sql = "SELECT post_name FROM $wpdb->posts WHERE post_name = %s AND ID != %d LIMIT 1";
|
736 |
+
$post_name_check = $wpdb->get_var( $wpdb->prepare( $check_sql, $slug, $post_ID ) );
|
737 |
+
|
738 |
+
|
739 |
+
if ( $post_name_check || in_array( $slug, $feeds ) || 'embed' === $slug ) {
|
740 |
+
$suffix = 2;
|
741 |
+
do {
|
742 |
+
$alt_post_name = substr( $slug, 0, 200 - ( strlen( $suffix ) + 1 ) ) . "-$suffix";
|
743 |
+
$post_name_check = $wpdb->get_var( $wpdb->prepare( $check_sql, $alt_post_name, $post_ID ) );
|
744 |
+
$suffix++;
|
745 |
+
} while ( $post_name_check );
|
746 |
+
$override_slug = $alt_post_name;
|
747 |
+
}
|
748 |
+
|
749 |
+
return $override_slug;
|
750 |
+
}
|
751 |
+
|
752 |
}
|
admin/includes/class-meta-box.php
CHANGED
@@ -54,7 +54,8 @@ class Advanced_Ads_Admin_Meta_Boxes {
|
|
54 |
add_meta_box(
|
55 |
'ad-main-box', __( 'Ad Type', 'advanced-ads' ), array($this, 'markup_meta_boxes'), $post_type, 'normal', 'high'
|
56 |
);
|
57 |
-
if (Advanced_Ads_AdSense_Data::get_instance()->is_setup()
|
|
|
58 |
global $post_id;
|
59 |
if ($post_id){
|
60 |
$ad = new Advanced_Ads_Ad( $post_id );
|
@@ -194,6 +195,7 @@ class Advanced_Ads_Admin_Meta_Boxes {
|
|
194 |
);
|
195 |
$advads_gadsense_options['hidden'] = !$unit_code;
|
196 |
$view = 'gadsense-dashboard.php';
|
|
|
197 |
break;
|
198 |
}
|
199 |
|
54 |
add_meta_box(
|
55 |
'ad-main-box', __( 'Ad Type', 'advanced-ads' ), array($this, 'markup_meta_boxes'), $post_type, 'normal', 'high'
|
56 |
);
|
57 |
+
if ( Advanced_Ads_AdSense_Data::get_instance()->is_setup()
|
58 |
+
&& ! Advanced_Ads_AdSense_Data::get_instance()->is_hide_stats() ){
|
59 |
global $post_id;
|
60 |
if ($post_id){
|
61 |
$ad = new Advanced_Ads_Ad( $post_id );
|
195 |
);
|
196 |
$advads_gadsense_options['hidden'] = !$unit_code;
|
197 |
$view = 'gadsense-dashboard.php';
|
198 |
+
$hndlelinks = '<a href="' . esc_url( admin_url( 'admin.php?page=advanced-ads-settings#top#adsense' ) ) . '" target="_blank">' . __('Disable', 'advanced-ads') . '</a>';
|
199 |
break;
|
200 |
}
|
201 |
|
admin/includes/class-overview-widgets.php
CHANGED
@@ -46,8 +46,11 @@ class Advanced_Ads_Overview_Widgets_Callbacks {
|
|
46 |
'render_next_steps');
|
47 |
self::add_meta_box('advads_overview_support', __( 'Manual and Support', 'advanced-ads' ), 'right',
|
48 |
'render_support' );
|
49 |
-
if (Advanced_Ads_AdSense_Data::get_instance()->is_setup()
|
50 |
-
|
|
|
|
|
|
|
51 |
'render_adsense_stats' );
|
52 |
}
|
53 |
|
@@ -355,7 +358,7 @@ class Advanced_Ads_Overview_Widgets_Callbacks {
|
|
355 |
public static function render_addons( $hide_activated = false ){
|
356 |
|
357 |
$link = ADVADS_URL . 'manual/how-to-install-an-add-on/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-install-add-ons';
|
358 |
-
?><p
|
359 |
|
360 |
$caching_used = Advanced_Ads_Checks::cache();
|
361 |
|
46 |
'render_next_steps');
|
47 |
self::add_meta_box('advads_overview_support', __( 'Manual and Support', 'advanced-ads' ), 'right',
|
48 |
'render_support' );
|
49 |
+
if ( Advanced_Ads_AdSense_Data::get_instance()->is_setup()
|
50 |
+
&& ! Advanced_Ads_AdSense_Data::get_instance()->is_hide_stats() ){
|
51 |
+
$disable_link_markup = '<span class="advads-hndlelinks hndle"><a href="' . esc_url( admin_url( 'admin.php?page=advanced-ads-settings#top#adsense' ) ) . '" target="_blank">' . esc_attr__('Disable', 'advanced-ads') . '</a></span>';
|
52 |
+
|
53 |
+
self::add_meta_box('advads_overview_adsense_stats', __( 'AdSense Earnings', 'advanced-ads' ) . $disable_link_markup, 'full',
|
54 |
'render_adsense_stats' );
|
55 |
}
|
56 |
|
358 |
public static function render_addons( $hide_activated = false ){
|
359 |
|
360 |
$link = ADVADS_URL . 'manual/how-to-install-an-add-on/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-install-add-ons';
|
361 |
+
?><p><a href="<?php echo esc_url( $link ); ?>" target="_blank"><?php echo esc_attr__( 'How to install and activate an add-on.', 'advanced-ads' ); ?></a></p><?php
|
362 |
|
363 |
$caching_used = Advanced_Ads_Checks::cache();
|
364 |
|
admin/includes/class-settings.php
CHANGED
@@ -362,9 +362,6 @@ class Advanced_Ads_Admin_Settings {
|
|
362 |
|
363 |
echo '<h3>' . esc_attr__( 'Are you missing something?', 'advanced-ads' ) . '</h3>';
|
364 |
|
365 |
-
$link = ADVADS_URL . 'manual/how-to-install-an-add-on/#utm_source=advanced-ads&utm_medium=link&utm_campaign=settings-licenses';
|
366 |
-
echo '<p><a href="' . esc_url( $link ) . '" target="_blank">' . esc_attr__( 'How to install and activate an add-on.', 'advanced-ads' ) . '</a></p>';
|
367 |
-
|
368 |
Advanced_Ads_Overview_Widgets_Callbacks::render_addons( true );
|
369 |
}
|
370 |
|
@@ -614,13 +611,13 @@ class Advanced_Ads_Admin_Settings {
|
|
614 |
}
|
615 |
|
616 |
/**
|
617 |
-
*
|
618 |
*
|
619 |
* @since 1.8.4 – moved here from Tracking add-on
|
620 |
*/
|
621 |
public function render_settings_link_target_callback() {
|
622 |
|
623 |
-
// get option if saved for tracking
|
624 |
$options = Advanced_Ads::get_instance()->options();
|
625 |
if ( ! isset( $options['target-blank'] ) && class_exists( 'Advanced_Ads_Tracking_Plugin' ) ) {
|
626 |
$tracking_options = Advanced_Ads_Tracking_Plugin::get_instance()->options();
|
@@ -634,8 +631,7 @@ class Advanced_Ads_Admin_Settings {
|
|
634 |
}
|
635 |
|
636 |
/**
|
637 |
-
*
|
638 |
-
*
|
639 |
*/
|
640 |
public function render_settings_uninstall_delete_data() {
|
641 |
$options = Advanced_Ads::get_instance()->options();
|
362 |
|
363 |
echo '<h3>' . esc_attr__( 'Are you missing something?', 'advanced-ads' ) . '</h3>';
|
364 |
|
|
|
|
|
|
|
365 |
Advanced_Ads_Overview_Widgets_Callbacks::render_addons( true );
|
366 |
}
|
367 |
|
611 |
}
|
612 |
|
613 |
/**
|
614 |
+
* Render link target="_blank" setting
|
615 |
*
|
616 |
* @since 1.8.4 – moved here from Tracking add-on
|
617 |
*/
|
618 |
public function render_settings_link_target_callback() {
|
619 |
|
620 |
+
// get option if saved for tracking.
|
621 |
$options = Advanced_Ads::get_instance()->options();
|
622 |
if ( ! isset( $options['target-blank'] ) && class_exists( 'Advanced_Ads_Tracking_Plugin' ) ) {
|
623 |
$tracking_options = Advanced_Ads_Tracking_Plugin::get_instance()->options();
|
631 |
}
|
632 |
|
633 |
/**
|
634 |
+
* Render setting 'Delete data on uninstall"
|
|
|
635 |
*/
|
636 |
public function render_settings_uninstall_delete_data() {
|
637 |
$options = Advanced_Ads::get_instance()->options();
|
admin/views/gadsense-dashboard.php
CHANGED
@@ -28,4 +28,4 @@ if ($pub_id){
|
|
28 |
else{
|
29 |
echo __("There is an error in your AdSense setup.", "advanced-ads");
|
30 |
}
|
31 |
-
?>
|
28 |
else{
|
29 |
echo __("There is an error in your AdSense setup.", "advanced-ads");
|
30 |
}
|
31 |
+
?>
|
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.14.
|
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.14.
|
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.14.10
|
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.14.10' );
|
43 |
|
44 |
/*----------------------------------------------------------------------------*
|
45 |
* Autoloading, modules and functions
|
classes/display-conditions.php
CHANGED
@@ -902,39 +902,39 @@ class Advanced_Ads_Display_Conditions {
|
|
902 |
|
903 |
return false;
|
904 |
}
|
905 |
-
|
906 |
/**
|
907 |
* Check 'content age' condition in frontend.
|
908 |
*
|
909 |
-
* @param
|
910 |
-
* @param
|
911 |
* @return bool true if can be displayed
|
912 |
*/
|
913 |
-
static function check_content_age( $options = array(), Advanced_Ads_Ad $ad ) {
|
914 |
global $post;
|
915 |
-
|
916 |
-
$operator = ( isset($options['operator']) && $options['operator'] === 'younger_than' ) ? 'younger_than' : 'older_than';
|
917 |
-
$value = isset( $options['value'] ) ? $options['value'] : '';
|
918 |
|
919 |
-
|
|
|
|
|
|
|
920 |
return true;
|
921 |
}
|
922 |
-
|
923 |
-
// get post publish date in unix timestamp
|
924 |
$publish_time = get_the_time( 'U', $post->ID );
|
925 |
|
926 |
-
// get difference from now
|
927 |
$diff_from_now = time() - $publish_time;
|
928 |
-
|
929 |
-
// check against entered age
|
930 |
$value_in_seconds = DAY_IN_SECONDS * $value;
|
931 |
|
932 |
-
if(
|
933 |
return $diff_from_now < $value_in_seconds;
|
934 |
} else {
|
935 |
return $diff_from_now > $value_in_seconds;
|
936 |
}
|
937 |
-
}
|
938 |
|
939 |
/**
|
940 |
* helper function to check for in array values
|
902 |
|
903 |
return false;
|
904 |
}
|
905 |
+
|
906 |
/**
|
907 |
* Check 'content age' condition in frontend.
|
908 |
*
|
909 |
+
* @param array $options options of the condition.
|
910 |
+
* @param object $ad Advanced_Ads_Ad.
|
911 |
* @return bool true if can be displayed
|
912 |
*/
|
913 |
+
public static function check_content_age( $options = array(), Advanced_Ads_Ad $ad ) {
|
914 |
global $post;
|
|
|
|
|
|
|
915 |
|
916 |
+
$operator = ( isset( $options['operator'] ) && 'younger_than' === $options['operator'] ) ? 'younger_than' : 'older_than';
|
917 |
+
$value = isset( $options['value'] ) ? $options['value'] : '';
|
918 |
+
|
919 |
+
if ( empty( $post->ID ) || empty( $value ) ) {
|
920 |
return true;
|
921 |
}
|
922 |
+
|
923 |
+
// get post publish date in unix timestamp.
|
924 |
$publish_time = get_the_time( 'U', $post->ID );
|
925 |
|
926 |
+
// get difference from now.
|
927 |
$diff_from_now = time() - $publish_time;
|
928 |
+
|
929 |
+
// check against entered age.
|
930 |
$value_in_seconds = DAY_IN_SECONDS * $value;
|
931 |
|
932 |
+
if ( 'younger_than' === $operator ) {
|
933 |
return $diff_from_now < $value_in_seconds;
|
934 |
} else {
|
935 |
return $diff_from_now > $value_in_seconds;
|
936 |
}
|
937 |
+
}
|
938 |
|
939 |
/**
|
940 |
* helper function to check for in array values
|
classes/plugin.php
CHANGED
@@ -737,4 +737,22 @@ class Advanced_Ads_Plugin {
|
|
737 |
return $url;
|
738 |
}
|
739 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
740 |
}
|
737 |
return $url;
|
738 |
}
|
739 |
|
740 |
+
/**
|
741 |
+
* Create a unique hash from the URL
|
742 |
+
*
|
743 |
+
* @return bool
|
744 |
+
*/
|
745 |
+
public static function random_by_url() {
|
746 |
+
$url = home_url();
|
747 |
+
$hash = hash( 'md5', $url );
|
748 |
+
|
749 |
+
if ( preg_match_all( '/\d/', $hash, $numbers ) ) {
|
750 |
+
$numbers_int = array_map( 'intval', $numbers[0] );
|
751 |
+
$sum = array_sum( $numbers_int );
|
752 |
+
} else {
|
753 |
+
return false;
|
754 |
+
}
|
755 |
+
|
756 |
+
return 0 !== $sum % 2;
|
757 |
+
}
|
758 |
}
|
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-09-
|
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"
|
@@ -88,12 +88,12 @@ msgid "Support"
|
|
88 |
msgstr ""
|
89 |
|
90 |
#: admin/class-advanced-ads-admin.php:417
|
91 |
-
#: admin/includes/class-overview-widgets.php:
|
92 |
msgid "Add-Ons"
|
93 |
msgstr ""
|
94 |
|
95 |
#: admin/class-advanced-ads-admin.php:683
|
96 |
-
#: admin/includes/class-overview-widgets.php:
|
97 |
#, php-format
|
98 |
msgid ""
|
99 |
"Thank the developer with a ★★★★★ review on <a "
|
@@ -146,11 +146,11 @@ msgstr ""
|
|
146 |
msgid "Placement"
|
147 |
msgstr ""
|
148 |
|
149 |
-
#: classes/ad-debug.php:152 admin/includes/class-meta-box.php:
|
150 |
msgid "Display Conditions"
|
151 |
msgstr ""
|
152 |
|
153 |
-
#: classes/ad-debug.php:239 admin/includes/class-meta-box.php:
|
154 |
msgid "Visitor Conditions"
|
155 |
msgstr ""
|
156 |
|
@@ -578,7 +578,7 @@ msgstr ""
|
|
578 |
msgid "Random AdSense ads"
|
579 |
msgstr ""
|
580 |
|
581 |
-
#: classes/frontend_checks.php:109 admin/includes/class-settings.php:
|
582 |
msgid "You look like a bot"
|
583 |
msgstr ""
|
584 |
|
@@ -672,7 +672,7 @@ msgstr ""
|
|
672 |
msgid "Everything is fine"
|
673 |
msgstr ""
|
674 |
|
675 |
-
#: classes/frontend_checks.php:444 admin/includes/class-ad-type.php:
|
676 |
#: admin/views/notices/welcome-panel.php:20
|
677 |
msgid "Get help"
|
678 |
msgstr ""
|
@@ -1128,86 +1128,86 @@ msgstr ""
|
|
1128 |
msgid "No ad group created"
|
1129 |
msgstr ""
|
1130 |
|
1131 |
-
#: admin/includes/class-ad-type.php:
|
1132 |
msgid "Ad Details"
|
1133 |
msgstr ""
|
1134 |
|
1135 |
-
#: admin/includes/class-ad-type.php:
|
1136 |
msgid "Ad Planning"
|
1137 |
msgstr ""
|
1138 |
|
1139 |
-
#: admin/includes/class-ad-type.php:
|
1140 |
msgid "Ad Shortcode"
|
1141 |
msgstr ""
|
1142 |
|
1143 |
-
#: admin/includes/class-ad-type.php:
|
1144 |
#, php-format
|
1145 |
msgid "%s ad updated."
|
1146 |
msgid_plural "%s ads updated."
|
1147 |
msgstr[0] ""
|
1148 |
msgstr[1] ""
|
1149 |
|
1150 |
-
#: admin/includes/class-ad-type.php:
|
1151 |
#, php-format
|
1152 |
msgid "%s ad not updated, somebody is editing it."
|
1153 |
msgid_plural "%s ads not updated, somebody is editing them."
|
1154 |
msgstr[0] ""
|
1155 |
msgstr[1] ""
|
1156 |
|
1157 |
-
#: admin/includes/class-ad-type.php:
|
1158 |
#, php-format
|
1159 |
msgid "%s ad permanently deleted."
|
1160 |
msgid_plural "%s ads permanently deleted."
|
1161 |
msgstr[0] ""
|
1162 |
msgstr[1] ""
|
1163 |
|
1164 |
-
#: admin/includes/class-ad-type.php:
|
1165 |
#, php-format
|
1166 |
msgid "%s ad moved to the Trash."
|
1167 |
msgid_plural "%s ads moved to the Trash."
|
1168 |
msgstr[0] ""
|
1169 |
msgstr[1] ""
|
1170 |
|
1171 |
-
#: admin/includes/class-ad-type.php:
|
1172 |
#, php-format
|
1173 |
msgid "%s ad restored from the Trash."
|
1174 |
msgid_plural "%s ads restored from the Trash."
|
1175 |
msgstr[0] ""
|
1176 |
msgstr[1] ""
|
1177 |
|
1178 |
-
#: admin/includes/class-ad-type.php:
|
1179 |
msgid "Ad updated."
|
1180 |
msgstr ""
|
1181 |
|
1182 |
#. translators: %s: date and time of the revision
|
1183 |
-
#: admin/includes/class-ad-type.php:
|
1184 |
#, php-format
|
1185 |
msgid "Ad restored to revision from %s"
|
1186 |
msgstr ""
|
1187 |
|
1188 |
-
#: admin/includes/class-ad-type.php:
|
1189 |
msgid "Ad saved."
|
1190 |
msgstr ""
|
1191 |
|
1192 |
-
#: admin/includes/class-ad-type.php:
|
1193 |
msgid "Ad submitted."
|
1194 |
msgstr ""
|
1195 |
|
1196 |
-
#: admin/includes/class-ad-type.php:
|
1197 |
#, php-format
|
1198 |
msgid "Ad scheduled for: <strong>%1$s</strong>."
|
1199 |
msgstr ""
|
1200 |
|
1201 |
#. translators: Publish box date format, see http://php.net/date
|
1202 |
-
#: admin/includes/class-ad-type.php:
|
1203 |
msgid "M j, Y @ G:i"
|
1204 |
msgstr ""
|
1205 |
|
1206 |
-
#: admin/includes/class-ad-type.php:
|
1207 |
msgid "Ad draft updated."
|
1208 |
msgstr ""
|
1209 |
|
1210 |
-
#: admin/includes/class-ad-type.php:
|
1211 |
msgid ""
|
1212 |
"You don’t have access to ads. Please deactivate and re-enable Advanced Ads "
|
1213 |
"again to fix this."
|
@@ -1336,66 +1336,71 @@ msgstr ""
|
|
1336 |
msgid "Ad Type"
|
1337 |
msgstr ""
|
1338 |
|
1339 |
-
#: admin/includes/class-meta-box.php:
|
1340 |
-
#: admin/includes/class-overview-widgets.php:
|
1341 |
msgid "AdSense Earnings"
|
1342 |
msgstr ""
|
1343 |
|
1344 |
-
#: admin/includes/class-meta-box.php:
|
1345 |
msgid "Ad Parameters"
|
1346 |
msgstr ""
|
1347 |
|
1348 |
-
#: admin/includes/class-meta-box.php:
|
1349 |
msgid "Layout / Output"
|
1350 |
msgstr ""
|
1351 |
|
1352 |
-
#: admin/includes/class-meta-box.php:
|
1353 |
msgid "Increase your ad revenue"
|
1354 |
msgstr ""
|
1355 |
|
1356 |
-
#: admin/includes/class-meta-box.php:
|
1357 |
msgid "Ad Stats"
|
1358 |
msgstr ""
|
1359 |
|
1360 |
-
#: admin/includes/class-meta-box.php:
|
1361 |
-
#: admin/includes/class-meta-box.php:
|
1362 |
#: admin/views/ad-output-metabox.php:82
|
1363 |
#: modules/ads-txt/admin/views/setting-create.php:11
|
1364 |
#: modules/privacy/admin/views/setting-enable.php:2
|
1365 |
msgid "Manual"
|
1366 |
msgstr ""
|
1367 |
|
1368 |
-
#: admin/includes/class-meta-box.php:
|
1369 |
msgid "Video"
|
1370 |
msgstr ""
|
1371 |
|
1372 |
-
#: admin/includes/class-meta-box.php:
|
|
|
|
|
|
|
|
|
|
|
1373 |
msgid "Ad Settings"
|
1374 |
msgstr ""
|
1375 |
|
1376 |
-
#: admin/includes/class-meta-box.php:
|
1377 |
msgid "Ads Dashboard"
|
1378 |
msgstr ""
|
1379 |
|
1380 |
-
#: admin/includes/class-meta-box.php:
|
1381 |
#, php-format
|
1382 |
msgid "%d ads – <a href=\"%s\">manage</a> - <a href=\"%s\">new</a>"
|
1383 |
msgstr ""
|
1384 |
|
1385 |
-
#: admin/includes/class-meta-box.php:
|
1386 |
msgid "Get the tutorial via email"
|
1387 |
msgstr ""
|
1388 |
|
1389 |
-
#: admin/includes/class-meta-box.php:
|
1390 |
msgid "Get AdSense tips via email"
|
1391 |
msgstr ""
|
1392 |
|
1393 |
-
#: admin/includes/class-meta-box.php:
|
1394 |
msgid "Visit our blog for more articles about ad optimization"
|
1395 |
msgstr ""
|
1396 |
|
1397 |
#. %s is our URL
|
1398 |
-
#: admin/includes/class-meta-box.php:
|
1399 |
msgid "Latest posts on wpadvancedads.com"
|
1400 |
msgstr ""
|
1401 |
|
@@ -1427,215 +1432,214 @@ msgstr ""
|
|
1427 |
msgid "Manual and Support"
|
1428 |
msgstr ""
|
1429 |
|
1430 |
-
#: admin/includes/class-overview-widgets.php:
|
1431 |
#: admin/views/notices/welcome-panel.php:6
|
1432 |
msgid "Create your first ad"
|
1433 |
msgstr ""
|
1434 |
|
1435 |
-
#: admin/includes/class-overview-widgets.php:
|
1436 |
#: modules/gadsense/admin/views/adsense-account.php:71
|
1437 |
#: modules/gadsense/admin/views/adsense-account.php:93
|
1438 |
msgid "Connect to AdSense"
|
1439 |
msgstr ""
|
1440 |
|
1441 |
-
#: admin/includes/class-overview-widgets.php:
|
1442 |
msgid "Join the newsletter for more benefits"
|
1443 |
msgstr ""
|
1444 |
|
1445 |
-
#: admin/includes/class-overview-widgets.php:
|
1446 |
msgid "Get 2 free add-ons"
|
1447 |
msgstr ""
|
1448 |
|
1449 |
-
#: admin/includes/class-overview-widgets.php:
|
1450 |
msgid "Get the first steps and more tutorials to your inbox"
|
1451 |
msgstr ""
|
1452 |
|
1453 |
-
#: admin/includes/class-overview-widgets.php:
|
1454 |
msgid "How to earn more with AdSense"
|
1455 |
msgstr ""
|
1456 |
|
1457 |
-
#: admin/includes/class-overview-widgets.php:
|
1458 |
msgid "Join now"
|
1459 |
msgstr ""
|
1460 |
|
1461 |
-
#: admin/includes/class-overview-widgets.php:
|
1462 |
msgid ""
|
1463 |
"Do you find Advanced Ads useful and would like to keep us motivated? Please "
|
1464 |
"help us with a review."
|
1465 |
msgstr ""
|
1466 |
|
1467 |
-
#: admin/includes/class-overview-widgets.php:
|
1468 |
msgid "Sure, I’ll rate the plugin"
|
1469 |
msgstr ""
|
1470 |
|
1471 |
-
#: admin/includes/class-overview-widgets.php:
|
1472 |
msgid "I already did"
|
1473 |
msgstr ""
|
1474 |
|
1475 |
-
#: admin/includes/class-overview-widgets.php:
|
1476 |
msgid "Manage your ads"
|
1477 |
msgstr ""
|
1478 |
|
1479 |
-
#: admin/includes/class-overview-widgets.php:
|
1480 |
msgid "Get the All Access pass"
|
1481 |
msgstr ""
|
1482 |
|
1483 |
-
#: admin/includes/class-overview-widgets.php:
|
1484 |
#: admin/views/notices/welcome-panel.php:22
|
1485 |
#, php-format
|
1486 |
msgid "<a href=\"%s\" target=\"_blank\">Manual</a>"
|
1487 |
msgstr ""
|
1488 |
|
1489 |
-
#: admin/includes/class-overview-widgets.php:
|
1490 |
#, php-format
|
1491 |
msgid "<a href=\"%s\" target=\"_blank\">FAQ and Support</a>"
|
1492 |
msgstr ""
|
1493 |
|
1494 |
#. %s includes a number and markup like <span class="count">6</span>.
|
1495 |
-
#: admin/includes/class-overview-widgets.php:
|
1496 |
#: admin/views/overview-notices.php:17
|
1497 |
#, php-format
|
1498 |
msgid "Show %s hidden notices"
|
1499 |
msgstr ""
|
1500 |
|
1501 |
-
#: admin/includes/class-overview-widgets.php:
|
1502 |
-
#: admin/includes/class-settings.php:366
|
1503 |
msgid "How to install and activate an add-on."
|
1504 |
msgstr ""
|
1505 |
|
1506 |
-
#: admin/includes/class-overview-widgets.php:
|
1507 |
msgid "The solution for professional websites."
|
1508 |
msgstr ""
|
1509 |
|
1510 |
-
#: admin/includes/class-overview-widgets.php:
|
1511 |
#: admin/views/pitch-pro-tab.php:7
|
1512 |
msgid "support for cached sites"
|
1513 |
msgstr ""
|
1514 |
|
1515 |
-
#: admin/includes/class-overview-widgets.php:369
|
1516 |
-
#: admin/includes/class-overview-widgets.php:370
|
1517 |
-
#: admin/includes/class-overview-widgets.php:371
|
1518 |
#: admin/includes/class-overview-widgets.php:372
|
|
|
|
|
|
|
1519 |
#, php-format
|
1520 |
msgid "integrates with <strong>%s</strong>"
|
1521 |
msgstr ""
|
1522 |
|
1523 |
-
#: admin/includes/class-overview-widgets.php:
|
1524 |
msgid "click fraud protection, lazy load, ad-block ads"
|
1525 |
msgstr ""
|
1526 |
|
1527 |
-
#: admin/includes/class-overview-widgets.php:
|
1528 |
#: admin/views/pitch-pro-tab.php:8
|
1529 |
msgid "11 more display and visitor conditions"
|
1530 |
msgstr ""
|
1531 |
|
1532 |
-
#: admin/includes/class-overview-widgets.php:
|
1533 |
#: admin/views/pitch-pro-tab.php:9
|
1534 |
msgid "6 more placements"
|
1535 |
msgstr ""
|
1536 |
|
1537 |
-
#: admin/includes/class-overview-widgets.php:
|
1538 |
#: admin/views/pitch-pro-tab.php:10
|
1539 |
msgid "placement tests for ad optimization"
|
1540 |
msgstr ""
|
1541 |
|
1542 |
-
#: admin/includes/class-overview-widgets.php:
|
1543 |
#: admin/views/pitch-pro-tab.php:11
|
1544 |
msgid "ad grids and many more advanced features"
|
1545 |
msgstr ""
|
1546 |
|
1547 |
-
#: admin/includes/class-overview-widgets.php:
|
1548 |
msgid ""
|
1549 |
"Analyze clicks and impressions of your ads locally or in Google Analytics, "
|
1550 |
"share reports, and limit ads to a specific number of impressions or clicks."
|
1551 |
msgstr ""
|
1552 |
|
1553 |
-
#: admin/includes/class-overview-widgets.php:
|
1554 |
msgid ""
|
1555 |
"Display ads based on the device or the size of your visitor’s browser, and "
|
1556 |
"control ads on AMP pages."
|
1557 |
msgstr ""
|
1558 |
|
1559 |
-
#: admin/includes/class-overview-widgets.php:
|
1560 |
msgid ""
|
1561 |
"Earn more money and let advertisers pay for ad space directly on the "
|
1562 |
"frontend of your site."
|
1563 |
msgstr ""
|
1564 |
|
1565 |
-
#: admin/includes/class-overview-widgets.php:
|
1566 |
msgid ""
|
1567 |
"Target visitors with ads that match their geo location and make more money "
|
1568 |
"with regional campaigns."
|
1569 |
msgstr ""
|
1570 |
|
1571 |
-
#: admin/includes/class-overview-widgets.php:
|
1572 |
msgid ""
|
1573 |
"Increase click rates on your ads by placing them in sticky positions above, "
|
1574 |
"next or below your site."
|
1575 |
msgstr ""
|
1576 |
|
1577 |
-
#: admin/includes/class-overview-widgets.php:
|
1578 |
msgid ""
|
1579 |
"Users will never miss an ad or other information in a PopUp. Choose when it "
|
1580 |
"shows up and for how long a user can close it."
|
1581 |
msgstr ""
|
1582 |
|
1583 |
-
#: admin/includes/class-overview-widgets.php:
|
1584 |
msgid ""
|
1585 |
"Create a beautiful and simple slider from your ads to show more information "
|
1586 |
"on less space."
|
1587 |
msgstr ""
|
1588 |
|
1589 |
-
#: admin/includes/class-overview-widgets.php:
|
1590 |
msgid ""
|
1591 |
"Place AdSense In-feed ads between posts on homepage, category, and archive "
|
1592 |
"pages."
|
1593 |
msgstr ""
|
1594 |
|
1595 |
-
#: admin/includes/class-overview-widgets.php:
|
1596 |
-
#: admin/includes/class-overview-widgets.php:
|
1597 |
-
#: admin/includes/class-overview-widgets.php:
|
1598 |
msgid "Install now"
|
1599 |
msgstr ""
|
1600 |
|
1601 |
-
#: admin/includes/class-overview-widgets.php:
|
1602 |
-
#: admin/includes/class-overview-widgets.php:
|
1603 |
-
#: admin/includes/class-overview-widgets.php:
|
1604 |
-
#: admin/includes/class-overview-widgets.php:
|
1605 |
-
#: admin/includes/class-overview-widgets.php:
|
1606 |
-
#: admin/includes/class-overview-widgets.php:
|
1607 |
-
#: admin/includes/class-overview-widgets.php:
|
1608 |
-
#: admin/includes/class-overview-widgets.php:
|
1609 |
msgid "Activate now"
|
1610 |
msgstr ""
|
1611 |
|
1612 |
-
#: admin/includes/class-overview-widgets.php:
|
1613 |
msgid "Visit your ad stats"
|
1614 |
msgstr ""
|
1615 |
|
1616 |
-
#: admin/includes/class-overview-widgets.php:
|
1617 |
msgid "Use Genesis specific ad positions."
|
1618 |
msgstr ""
|
1619 |
|
1620 |
-
#: admin/includes/class-overview-widgets.php:
|
1621 |
msgid ""
|
1622 |
"Manage ad positions with WPBakery Page Builder (formerly Visual Composer)."
|
1623 |
msgstr ""
|
1624 |
|
1625 |
-
#: admin/includes/class-overview-widgets.php:
|
1626 |
msgid "Our best deal with all add-ons included."
|
1627 |
msgstr ""
|
1628 |
|
1629 |
-
#: admin/includes/class-overview-widgets.php:
|
1630 |
msgid "Get full access"
|
1631 |
msgstr ""
|
1632 |
|
1633 |
-
#: admin/includes/class-overview-widgets.php:
|
1634 |
#: admin/views/ad-display-metabox.php:48 admin/views/ad-visitor-metabox.php:48
|
1635 |
msgid "Visit the manual"
|
1636 |
msgstr ""
|
1637 |
|
1638 |
-
#: admin/includes/class-overview-widgets.php:
|
1639 |
msgid "Get this add-on"
|
1640 |
msgstr ""
|
1641 |
|
@@ -1729,17 +1733,17 @@ msgstr ""
|
|
1729 |
msgid "Are you missing something?"
|
1730 |
msgstr ""
|
1731 |
|
1732 |
-
#: admin/includes/class-settings.php:
|
1733 |
msgid "Choose the roles a user must have in order to not see any ads."
|
1734 |
msgstr ""
|
1735 |
|
1736 |
-
#: admin/includes/class-settings.php:
|
1737 |
msgid ""
|
1738 |
"<strong>notice: </strong>the file is currently enabled by an add-on that "
|
1739 |
"needs it."
|
1740 |
msgstr ""
|
1741 |
|
1742 |
-
#: admin/includes/class-settings.php:
|
1743 |
#, php-format
|
1744 |
msgid ""
|
1745 |
"Enable advanced JavaScript functions (<a href=\"%s\" target=\"_blank\">"
|
@@ -1747,7 +1751,7 @@ msgid ""
|
|
1747 |
"need features from this file."
|
1748 |
msgstr ""
|
1749 |
|
1750 |
-
#: admin/includes/class-settings.php:
|
1751 |
msgid ""
|
1752 |
"Some plugins and themes trigger ad injections where it shouldn’t happen. "
|
1753 |
"Therefore, Advanced Ads ignores injected placements on non-singular pages "
|
@@ -1757,77 +1761,77 @@ msgid ""
|
|
1757 |
"injection only in the first x posts on your archive pages."
|
1758 |
msgstr ""
|
1759 |
|
1760 |
-
#: admin/includes/class-settings.php:
|
1761 |
msgid ""
|
1762 |
"Please check your post content. A priority of 10 and below might cause "
|
1763 |
"issues (wpautop function might run twice)."
|
1764 |
msgstr ""
|
1765 |
|
1766 |
-
#: admin/includes/class-settings.php:
|
1767 |
msgid ""
|
1768 |
"Play with this value in order to change the priority of the injected ads "
|
1769 |
"compared to other auto injected elements in the post content."
|
1770 |
msgstr ""
|
1771 |
|
1772 |
-
#: admin/includes/class-settings.php:
|
1773 |
msgid ""
|
1774 |
"Advanced Ads ignores paragraphs and other elements in containers when "
|
1775 |
"injecting ads into the post content. Check this option to ignore this "
|
1776 |
"limitation and ads might show up again."
|
1777 |
msgstr ""
|
1778 |
|
1779 |
-
#: admin/includes/class-settings.php:
|
1780 |
msgid "Read this first"
|
1781 |
msgstr ""
|
1782 |
|
1783 |
-
#: admin/includes/class-settings.php:
|
1784 |
msgid "Hide ads from crawlers, bots and empty user agents."
|
1785 |
msgstr ""
|
1786 |
|
1787 |
-
#: admin/includes/class-settings.php:
|
1788 |
msgid "Pro feature"
|
1789 |
msgstr ""
|
1790 |
|
1791 |
#. %1$s is a starting <a> tag and %2$s a closing one
|
1792 |
-
#: admin/includes/class-settings.php:
|
1793 |
#, php-format
|
1794 |
msgid ""
|
1795 |
"Disable %1$sAd Health%2$s in frontend and backend, warnings and internal "
|
1796 |
"notices like tips, tutorials, email newsletters and update notices."
|
1797 |
msgstr ""
|
1798 |
|
1799 |
-
#: admin/includes/class-settings.php:
|
1800 |
msgid ""
|
1801 |
"Prefix of class or id attributes in the frontend. Change it if you don’t "
|
1802 |
"want <strong>ad blockers</strong> to mark these blocks as ads.<br/>You might "
|
1803 |
"need to <strong>rewrite css rules afterwards</strong>."
|
1804 |
msgstr ""
|
1805 |
|
1806 |
-
#: admin/includes/class-settings.php:
|
1807 |
msgid "Allow editors to also manage and publish ads."
|
1808 |
msgstr ""
|
1809 |
|
1810 |
-
#: admin/includes/class-settings.php:
|
1811 |
#, php-format
|
1812 |
msgid ""
|
1813 |
"You can assign different ad-related roles on a user basis with <a "
|
1814 |
"href=\"%s\" target=\"_blank\">Advanced Ads Pro</a>."
|
1815 |
msgstr ""
|
1816 |
|
1817 |
-
#: admin/includes/class-settings.php:
|
1818 |
msgctxt "label before ads"
|
1819 |
msgid "Advertisements"
|
1820 |
msgstr ""
|
1821 |
|
1822 |
-
#: admin/includes/class-settings.php:
|
1823 |
msgid "Displayed above ads."
|
1824 |
msgstr ""
|
1825 |
|
1826 |
-
#: admin/includes/class-settings.php:
|
1827 |
msgid "Clean up all data related to Advanced Ads when removing the plugin."
|
1828 |
msgstr ""
|
1829 |
|
1830 |
-
#: admin/includes/class-settings.php:
|
1831 |
msgid "Disable shortcode button in visual editor."
|
1832 |
msgstr ""
|
1833 |
|
@@ -2265,7 +2269,7 @@ msgstr ""
|
|
2265 |
#: admin/views/placements-ad-label-position.php:5
|
2266 |
#: admin/views/placements-ad-label.php:1 admin/views/placements-ad-label.php:4
|
2267 |
#: admin/views/placements.php:74
|
2268 |
-
#: modules/gadsense/includes/class-network-adsense.php:
|
2269 |
msgid "default"
|
2270 |
msgstr ""
|
2271 |
|
@@ -3385,47 +3389,57 @@ msgstr ""
|
|
3385 |
msgid "Disable top anchor ad"
|
3386 |
msgstr ""
|
3387 |
|
3388 |
-
#: modules/gadsense/includes/class-network-adsense.php:
|
|
|
|
|
|
|
|
|
3389 |
msgid "Limit to 3 ads"
|
3390 |
msgstr ""
|
3391 |
|
3392 |
-
#: modules/gadsense/includes/class-network-adsense.php:
|
3393 |
msgid "Disable violation warnings"
|
3394 |
msgstr ""
|
3395 |
|
3396 |
-
#: modules/gadsense/includes/class-network-adsense.php:
|
3397 |
msgid "Transparent background"
|
3398 |
msgstr ""
|
3399 |
|
3400 |
-
#: modules/gadsense/includes/class-network-adsense.php:
|
3401 |
msgid "Full width responsive ads on mobile"
|
3402 |
msgstr ""
|
3403 |
|
3404 |
-
#: modules/gadsense/includes/class-network-adsense.php:
|
3405 |
#, php-format
|
3406 |
msgid "Limit to %d AdSense ads"
|
3407 |
msgstr ""
|
3408 |
|
3409 |
-
#: modules/gadsense/includes/class-network-adsense.php:
|
3410 |
msgid ""
|
3411 |
"There is no explicit limit for AdSense ads anymore, but you can still use "
|
3412 |
"this setting to prevent too many AdSense ads to show accidentally on your "
|
3413 |
"site."
|
3414 |
msgstr ""
|
3415 |
|
3416 |
-
#: modules/gadsense/includes/class-network-adsense.php:
|
3417 |
msgid ""
|
3418 |
"Due to technical restrictions, the limit does not work on placements with "
|
3419 |
"cache-busting enabled."
|
3420 |
msgstr ""
|
3421 |
|
3422 |
-
#: modules/gadsense/includes/class-network-adsense.php:
|
3423 |
msgid ""
|
3424 |
"Enable this box if you don’t want Google Auto ads to place anchor ads at the "
|
3425 |
"top of your page."
|
3426 |
msgstr ""
|
3427 |
|
3428 |
-
#: modules/gadsense/includes/class-network-adsense.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
3429 |
#: modules/gadsense/admin/views/connect-adsense.php:37
|
3430 |
msgid ""
|
3431 |
"Insert the AdSense header code used for verification and the Auto Ads "
|
@@ -3433,30 +3447,30 @@ msgid ""
|
|
3433 |
msgstr ""
|
3434 |
|
3435 |
#. this is the text for a link to a sub-page in an AdSense account
|
3436 |
-
#: modules/gadsense/includes/class-network-adsense.php:
|
3437 |
msgid "Adjust Auto ads options"
|
3438 |
msgstr ""
|
3439 |
|
3440 |
-
#: modules/gadsense/includes/class-network-adsense.php:
|
3441 |
#, php-format
|
3442 |
msgid ""
|
3443 |
"Please read <a href=\"%s\" target=\"_blank\">this article</a> if <strong>ads "
|
3444 |
"appear in random places</strong>."
|
3445 |
msgstr ""
|
3446 |
|
3447 |
-
#: modules/gadsense/includes/class-network-adsense.php:
|
3448 |
msgid "Display Auto ads only on specific pages"
|
3449 |
msgstr ""
|
3450 |
|
3451 |
-
#: modules/gadsense/includes/class-network-adsense.php:
|
3452 |
msgid "Auto ads on AMP pages"
|
3453 |
msgstr ""
|
3454 |
|
3455 |
-
#: modules/gadsense/includes/class-network-adsense.php:
|
3456 |
msgid "Disable warnings about potential violations of the AdSense terms."
|
3457 |
msgstr ""
|
3458 |
|
3459 |
-
#: modules/gadsense/includes/class-network-adsense.php:
|
3460 |
#, php-format
|
3461 |
msgid ""
|
3462 |
"Our <a href=\"%s\" target=\"_blank\">Ad Health</a> feature monitors if "
|
@@ -3464,21 +3478,21 @@ msgid ""
|
|
3464 |
"managed with Advanced Ads. Enable this option to remove these checks"
|
3465 |
msgstr ""
|
3466 |
|
3467 |
-
#: modules/gadsense/includes/class-network-adsense.php:
|
3468 |
msgid ""
|
3469 |
"Enable this option in case your theme adds an unfortunate background color "
|
3470 |
"to AdSense ads."
|
3471 |
msgstr ""
|
3472 |
|
3473 |
-
#: modules/gadsense/includes/class-network-adsense.php:
|
3474 |
msgid "enable"
|
3475 |
msgstr ""
|
3476 |
|
3477 |
-
#: modules/gadsense/includes/class-network-adsense.php:
|
3478 |
msgid "disable"
|
3479 |
msgstr ""
|
3480 |
|
3481 |
-
#: modules/gadsense/includes/class-network-adsense.php:
|
3482 |
#, php-format
|
3483 |
msgid ""
|
3484 |
"Whether your responsive ad unit may expand to <a href='%s' target='blank'>"
|
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-09-24 07:14+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"
|
88 |
msgstr ""
|
89 |
|
90 |
#: admin/class-advanced-ads-admin.php:417
|
91 |
+
#: admin/includes/class-overview-widgets.php:58
|
92 |
msgid "Add-Ons"
|
93 |
msgstr ""
|
94 |
|
95 |
#: admin/class-advanced-ads-admin.php:683
|
96 |
+
#: admin/includes/class-overview-widgets.php:175
|
97 |
#, php-format
|
98 |
msgid ""
|
99 |
"Thank the developer with a ★★★★★ review on <a "
|
146 |
msgid "Placement"
|
147 |
msgstr ""
|
148 |
|
149 |
+
#: classes/ad-debug.php:152 admin/includes/class-meta-box.php:79
|
150 |
msgid "Display Conditions"
|
151 |
msgstr ""
|
152 |
|
153 |
+
#: classes/ad-debug.php:239 admin/includes/class-meta-box.php:82
|
154 |
msgid "Visitor Conditions"
|
155 |
msgstr ""
|
156 |
|
578 |
msgid "Random AdSense ads"
|
579 |
msgstr ""
|
580 |
|
581 |
+
#: classes/frontend_checks.php:109 admin/includes/class-settings.php:514
|
582 |
msgid "You look like a bot"
|
583 |
msgstr ""
|
584 |
|
672 |
msgid "Everything is fine"
|
673 |
msgstr ""
|
674 |
|
675 |
+
#: classes/frontend_checks.php:444 admin/includes/class-ad-type.php:676
|
676 |
#: admin/views/notices/welcome-panel.php:20
|
677 |
msgid "Get help"
|
678 |
msgstr ""
|
1128 |
msgid "No ad group created"
|
1129 |
msgstr ""
|
1130 |
|
1131 |
+
#: admin/includes/class-ad-type.php:88 admin/includes/class-ad-type.php:94
|
1132 |
msgid "Ad Details"
|
1133 |
msgstr ""
|
1134 |
|
1135 |
+
#: admin/includes/class-ad-type.php:89 admin/includes/class-ad-type.php:95
|
1136 |
msgid "Ad Planning"
|
1137 |
msgstr ""
|
1138 |
|
1139 |
+
#: admin/includes/class-ad-type.php:90 admin/includes/class-ad-type.php:96
|
1140 |
msgid "Ad Shortcode"
|
1141 |
msgstr ""
|
1142 |
|
1143 |
+
#: admin/includes/class-ad-type.php:242
|
1144 |
#, php-format
|
1145 |
msgid "%s ad updated."
|
1146 |
msgid_plural "%s ads updated."
|
1147 |
msgstr[0] ""
|
1148 |
msgstr[1] ""
|
1149 |
|
1150 |
+
#: admin/includes/class-ad-type.php:243
|
1151 |
#, php-format
|
1152 |
msgid "%s ad not updated, somebody is editing it."
|
1153 |
msgid_plural "%s ads not updated, somebody is editing them."
|
1154 |
msgstr[0] ""
|
1155 |
msgstr[1] ""
|
1156 |
|
1157 |
+
#: admin/includes/class-ad-type.php:244
|
1158 |
#, php-format
|
1159 |
msgid "%s ad permanently deleted."
|
1160 |
msgid_plural "%s ads permanently deleted."
|
1161 |
msgstr[0] ""
|
1162 |
msgstr[1] ""
|
1163 |
|
1164 |
+
#: admin/includes/class-ad-type.php:245
|
1165 |
#, php-format
|
1166 |
msgid "%s ad moved to the Trash."
|
1167 |
msgid_plural "%s ads moved to the Trash."
|
1168 |
msgstr[0] ""
|
1169 |
msgstr[1] ""
|
1170 |
|
1171 |
+
#: admin/includes/class-ad-type.php:246
|
1172 |
#, php-format
|
1173 |
msgid "%s ad restored from the Trash."
|
1174 |
msgid_plural "%s ads restored from the Trash."
|
1175 |
msgstr[0] ""
|
1176 |
msgstr[1] ""
|
1177 |
|
1178 |
+
#: admin/includes/class-ad-type.php:576 admin/includes/class-ad-type.php:577
|
1179 |
msgid "Ad updated."
|
1180 |
msgstr ""
|
1181 |
|
1182 |
#. translators: %s: date and time of the revision
|
1183 |
+
#: admin/includes/class-ad-type.php:579
|
1184 |
#, php-format
|
1185 |
msgid "Ad restored to revision from %s"
|
1186 |
msgstr ""
|
1187 |
|
1188 |
+
#: admin/includes/class-ad-type.php:580 admin/includes/class-ad-type.php:581
|
1189 |
msgid "Ad saved."
|
1190 |
msgstr ""
|
1191 |
|
1192 |
+
#: admin/includes/class-ad-type.php:582
|
1193 |
msgid "Ad submitted."
|
1194 |
msgstr ""
|
1195 |
|
1196 |
+
#: admin/includes/class-ad-type.php:584
|
1197 |
#, php-format
|
1198 |
msgid "Ad scheduled for: <strong>%1$s</strong>."
|
1199 |
msgstr ""
|
1200 |
|
1201 |
#. translators: Publish box date format, see http://php.net/date
|
1202 |
+
#: admin/includes/class-ad-type.php:586
|
1203 |
msgid "M j, Y @ G:i"
|
1204 |
msgstr ""
|
1205 |
|
1206 |
+
#: admin/includes/class-ad-type.php:588
|
1207 |
msgid "Ad draft updated."
|
1208 |
msgstr ""
|
1209 |
|
1210 |
+
#: admin/includes/class-ad-type.php:675
|
1211 |
msgid ""
|
1212 |
"You don’t have access to ads. Please deactivate and re-enable Advanced Ads "
|
1213 |
"again to fix this."
|
1336 |
msgid "Ad Type"
|
1337 |
msgstr ""
|
1338 |
|
1339 |
+
#: admin/includes/class-meta-box.php:64
|
1340 |
+
#: admin/includes/class-overview-widgets.php:53
|
1341 |
msgid "AdSense Earnings"
|
1342 |
msgstr ""
|
1343 |
|
1344 |
+
#: admin/includes/class-meta-box.php:73
|
1345 |
msgid "Ad Parameters"
|
1346 |
msgstr ""
|
1347 |
|
1348 |
+
#: admin/includes/class-meta-box.php:76 admin/includes/class-settings.php:66
|
1349 |
msgid "Layout / Output"
|
1350 |
msgstr ""
|
1351 |
|
1352 |
+
#: admin/includes/class-meta-box.php:86
|
1353 |
msgid "Increase your ad revenue"
|
1354 |
msgstr ""
|
1355 |
|
1356 |
+
#: admin/includes/class-meta-box.php:91
|
1357 |
msgid "Ad Stats"
|
1358 |
msgstr ""
|
1359 |
|
1360 |
+
#: admin/includes/class-meta-box.php:153 admin/includes/class-meta-box.php:164
|
1361 |
+
#: admin/includes/class-meta-box.php:169 admin/includes/class-settings.php:607
|
1362 |
#: admin/views/ad-output-metabox.php:82
|
1363 |
#: modules/ads-txt/admin/views/setting-create.php:11
|
1364 |
#: modules/privacy/admin/views/setting-enable.php:2
|
1365 |
msgid "Manual"
|
1366 |
msgstr ""
|
1367 |
|
1368 |
+
#: admin/includes/class-meta-box.php:163
|
1369 |
msgid "Video"
|
1370 |
msgstr ""
|
1371 |
|
1372 |
+
#: admin/includes/class-meta-box.php:198
|
1373 |
+
#: admin/includes/class-overview-widgets.php:51
|
1374 |
+
msgid "Disable"
|
1375 |
+
msgstr ""
|
1376 |
+
|
1377 |
+
#: admin/includes/class-meta-box.php:308
|
1378 |
msgid "Ad Settings"
|
1379 |
msgstr ""
|
1380 |
|
1381 |
+
#: admin/includes/class-meta-box.php:410 admin/views/overview.php:6
|
1382 |
msgid "Ads Dashboard"
|
1383 |
msgstr ""
|
1384 |
|
1385 |
+
#: admin/includes/class-meta-box.php:421
|
1386 |
#, php-format
|
1387 |
msgid "%d ads – <a href=\"%s\">manage</a> - <a href=\"%s\">new</a>"
|
1388 |
msgstr ""
|
1389 |
|
1390 |
+
#: admin/includes/class-meta-box.php:432
|
1391 |
msgid "Get the tutorial via email"
|
1392 |
msgstr ""
|
1393 |
|
1394 |
+
#: admin/includes/class-meta-box.php:439
|
1395 |
msgid "Get AdSense tips via email"
|
1396 |
msgstr ""
|
1397 |
|
1398 |
+
#: admin/includes/class-meta-box.php:446
|
1399 |
msgid "Visit our blog for more articles about ad optimization"
|
1400 |
msgstr ""
|
1401 |
|
1402 |
#. %s is our URL
|
1403 |
+
#: admin/includes/class-meta-box.php:499
|
1404 |
msgid "Latest posts on wpadvancedads.com"
|
1405 |
msgstr ""
|
1406 |
|
1432 |
msgid "Manual and Support"
|
1433 |
msgstr ""
|
1434 |
|
1435 |
+
#: admin/includes/class-overview-widgets.php:105
|
1436 |
#: admin/views/notices/welcome-panel.php:6
|
1437 |
msgid "Create your first ad"
|
1438 |
msgstr ""
|
1439 |
|
1440 |
+
#: admin/includes/class-overview-widgets.php:108
|
1441 |
#: modules/gadsense/admin/views/adsense-account.php:71
|
1442 |
#: modules/gadsense/admin/views/adsense-account.php:93
|
1443 |
msgid "Connect to AdSense"
|
1444 |
msgstr ""
|
1445 |
|
1446 |
+
#: admin/includes/class-overview-widgets.php:118
|
1447 |
msgid "Join the newsletter for more benefits"
|
1448 |
msgstr ""
|
1449 |
|
1450 |
+
#: admin/includes/class-overview-widgets.php:120
|
1451 |
msgid "Get 2 free add-ons"
|
1452 |
msgstr ""
|
1453 |
|
1454 |
+
#: admin/includes/class-overview-widgets.php:121
|
1455 |
msgid "Get the first steps and more tutorials to your inbox"
|
1456 |
msgstr ""
|
1457 |
|
1458 |
+
#: admin/includes/class-overview-widgets.php:122
|
1459 |
msgid "How to earn more with AdSense"
|
1460 |
msgstr ""
|
1461 |
|
1462 |
+
#: admin/includes/class-overview-widgets.php:125
|
1463 |
msgid "Join now"
|
1464 |
msgstr ""
|
1465 |
|
1466 |
+
#: admin/includes/class-overview-widgets.php:133
|
1467 |
msgid ""
|
1468 |
"Do you find Advanced Ads useful and would like to keep us motivated? Please "
|
1469 |
"help us with a review."
|
1470 |
msgstr ""
|
1471 |
|
1472 |
+
#: admin/includes/class-overview-widgets.php:135
|
1473 |
msgid "Sure, I’ll rate the plugin"
|
1474 |
msgstr ""
|
1475 |
|
1476 |
+
#: admin/includes/class-overview-widgets.php:137
|
1477 |
msgid "I already did"
|
1478 |
msgstr ""
|
1479 |
|
1480 |
+
#: admin/includes/class-overview-widgets.php:143
|
1481 |
msgid "Manage your ads"
|
1482 |
msgstr ""
|
1483 |
|
1484 |
+
#: admin/includes/class-overview-widgets.php:147
|
1485 |
msgid "Get the All Access pass"
|
1486 |
msgstr ""
|
1487 |
|
1488 |
+
#: admin/includes/class-overview-widgets.php:173
|
1489 |
#: admin/views/notices/welcome-panel.php:22
|
1490 |
#, php-format
|
1491 |
msgid "<a href=\"%s\" target=\"_blank\">Manual</a>"
|
1492 |
msgstr ""
|
1493 |
|
1494 |
+
#: admin/includes/class-overview-widgets.php:174
|
1495 |
#, php-format
|
1496 |
msgid "<a href=\"%s\" target=\"_blank\">FAQ and Support</a>"
|
1497 |
msgstr ""
|
1498 |
|
1499 |
#. %s includes a number and markup like <span class="count">6</span>.
|
1500 |
+
#: admin/includes/class-overview-widgets.php:183
|
1501 |
#: admin/views/overview-notices.php:17
|
1502 |
#, php-format
|
1503 |
msgid "Show %s hidden notices"
|
1504 |
msgstr ""
|
1505 |
|
1506 |
+
#: admin/includes/class-overview-widgets.php:361
|
|
|
1507 |
msgid "How to install and activate an add-on."
|
1508 |
msgstr ""
|
1509 |
|
1510 |
+
#: admin/includes/class-overview-widgets.php:366
|
1511 |
msgid "The solution for professional websites."
|
1512 |
msgstr ""
|
1513 |
|
1514 |
+
#: admin/includes/class-overview-widgets.php:369
|
1515 |
#: admin/views/pitch-pro-tab.php:7
|
1516 |
msgid "support for cached sites"
|
1517 |
msgstr ""
|
1518 |
|
|
|
|
|
|
|
1519 |
#: admin/includes/class-overview-widgets.php:372
|
1520 |
+
#: admin/includes/class-overview-widgets.php:373
|
1521 |
+
#: admin/includes/class-overview-widgets.php:374
|
1522 |
+
#: admin/includes/class-overview-widgets.php:375
|
1523 |
#, php-format
|
1524 |
msgid "integrates with <strong>%s</strong>"
|
1525 |
msgstr ""
|
1526 |
|
1527 |
+
#: admin/includes/class-overview-widgets.php:376
|
1528 |
msgid "click fraud protection, lazy load, ad-block ads"
|
1529 |
msgstr ""
|
1530 |
|
1531 |
+
#: admin/includes/class-overview-widgets.php:377
|
1532 |
#: admin/views/pitch-pro-tab.php:8
|
1533 |
msgid "11 more display and visitor conditions"
|
1534 |
msgstr ""
|
1535 |
|
1536 |
+
#: admin/includes/class-overview-widgets.php:378
|
1537 |
#: admin/views/pitch-pro-tab.php:9
|
1538 |
msgid "6 more placements"
|
1539 |
msgstr ""
|
1540 |
|
1541 |
+
#: admin/includes/class-overview-widgets.php:379
|
1542 |
#: admin/views/pitch-pro-tab.php:10
|
1543 |
msgid "placement tests for ad optimization"
|
1544 |
msgstr ""
|
1545 |
|
1546 |
+
#: admin/includes/class-overview-widgets.php:380
|
1547 |
#: admin/views/pitch-pro-tab.php:11
|
1548 |
msgid "ad grids and many more advanced features"
|
1549 |
msgstr ""
|
1550 |
|
1551 |
+
#: admin/includes/class-overview-widgets.php:387
|
1552 |
msgid ""
|
1553 |
"Analyze clicks and impressions of your ads locally or in Google Analytics, "
|
1554 |
"share reports, and limit ads to a specific number of impressions or clicks."
|
1555 |
msgstr ""
|
1556 |
|
1557 |
+
#: admin/includes/class-overview-widgets.php:393
|
1558 |
msgid ""
|
1559 |
"Display ads based on the device or the size of your visitor’s browser, and "
|
1560 |
"control ads on AMP pages."
|
1561 |
msgstr ""
|
1562 |
|
1563 |
+
#: admin/includes/class-overview-widgets.php:406
|
1564 |
msgid ""
|
1565 |
"Earn more money and let advertisers pay for ad space directly on the "
|
1566 |
"frontend of your site."
|
1567 |
msgstr ""
|
1568 |
|
1569 |
+
#: admin/includes/class-overview-widgets.php:412
|
1570 |
msgid ""
|
1571 |
"Target visitors with ads that match their geo location and make more money "
|
1572 |
"with regional campaigns."
|
1573 |
msgstr ""
|
1574 |
|
1575 |
+
#: admin/includes/class-overview-widgets.php:418
|
1576 |
msgid ""
|
1577 |
"Increase click rates on your ads by placing them in sticky positions above, "
|
1578 |
"next or below your site."
|
1579 |
msgstr ""
|
1580 |
|
1581 |
+
#: admin/includes/class-overview-widgets.php:424
|
1582 |
msgid ""
|
1583 |
"Users will never miss an ad or other information in a PopUp. Choose when it "
|
1584 |
"shows up and for how long a user can close it."
|
1585 |
msgstr ""
|
1586 |
|
1587 |
+
#: admin/includes/class-overview-widgets.php:430
|
1588 |
msgid ""
|
1589 |
"Create a beautiful and simple slider from your ads to show more information "
|
1590 |
"on less space."
|
1591 |
msgstr ""
|
1592 |
|
1593 |
+
#: admin/includes/class-overview-widgets.php:436
|
1594 |
msgid ""
|
1595 |
"Place AdSense In-feed ads between posts on homepage, category, and archive "
|
1596 |
"pages."
|
1597 |
msgstr ""
|
1598 |
|
1599 |
+
#: admin/includes/class-overview-widgets.php:439
|
1600 |
+
#: admin/includes/class-overview-widgets.php:614
|
1601 |
+
#: admin/includes/class-overview-widgets.php:630
|
1602 |
msgid "Install now"
|
1603 |
msgstr ""
|
1604 |
|
1605 |
+
#: admin/includes/class-overview-widgets.php:457
|
1606 |
+
#: admin/includes/class-overview-widgets.php:478
|
1607 |
+
#: admin/includes/class-overview-widgets.php:503
|
1608 |
+
#: admin/includes/class-overview-widgets.php:521
|
1609 |
+
#: admin/includes/class-overview-widgets.php:539
|
1610 |
+
#: admin/includes/class-overview-widgets.php:557
|
1611 |
+
#: admin/includes/class-overview-widgets.php:575
|
1612 |
+
#: admin/includes/class-overview-widgets.php:593
|
1613 |
msgid "Activate now"
|
1614 |
msgstr ""
|
1615 |
|
1616 |
+
#: admin/includes/class-overview-widgets.php:486
|
1617 |
msgid "Visit your ad stats"
|
1618 |
msgstr ""
|
1619 |
|
1620 |
+
#: admin/includes/class-overview-widgets.php:610
|
1621 |
msgid "Use Genesis specific ad positions."
|
1622 |
msgstr ""
|
1623 |
|
1624 |
+
#: admin/includes/class-overview-widgets.php:626
|
1625 |
msgid ""
|
1626 |
"Manage ad positions with WPBakery Page Builder (formerly Visual Composer)."
|
1627 |
msgstr ""
|
1628 |
|
1629 |
+
#: admin/includes/class-overview-widgets.php:642
|
1630 |
msgid "Our best deal with all add-ons included."
|
1631 |
msgstr ""
|
1632 |
|
1633 |
+
#: admin/includes/class-overview-widgets.php:644
|
1634 |
msgid "Get full access"
|
1635 |
msgstr ""
|
1636 |
|
1637 |
+
#: admin/includes/class-overview-widgets.php:658
|
1638 |
#: admin/views/ad-display-metabox.php:48 admin/views/ad-visitor-metabox.php:48
|
1639 |
msgid "Visit the manual"
|
1640 |
msgstr ""
|
1641 |
|
1642 |
+
#: admin/includes/class-overview-widgets.php:661
|
1643 |
msgid "Get this add-on"
|
1644 |
msgstr ""
|
1645 |
|
1733 |
msgid "Are you missing something?"
|
1734 |
msgstr ""
|
1735 |
|
1736 |
+
#: admin/includes/class-settings.php:431
|
1737 |
msgid "Choose the roles a user must have in order to not see any ads."
|
1738 |
msgstr ""
|
1739 |
|
1740 |
+
#: admin/includes/class-settings.php:445
|
1741 |
msgid ""
|
1742 |
"<strong>notice: </strong>the file is currently enabled by an add-on that "
|
1743 |
"needs it."
|
1744 |
msgstr ""
|
1745 |
|
1746 |
+
#: admin/includes/class-settings.php:448
|
1747 |
#, php-format
|
1748 |
msgid ""
|
1749 |
"Enable advanced JavaScript functions (<a href=\"%s\" target=\"_blank\">"
|
1751 |
"need features from this file."
|
1752 |
msgstr ""
|
1753 |
|
1754 |
+
#: admin/includes/class-settings.php:468
|
1755 |
msgid ""
|
1756 |
"Some plugins and themes trigger ad injections where it shouldn’t happen. "
|
1757 |
"Therefore, Advanced Ads ignores injected placements on non-singular pages "
|
1761 |
"injection only in the first x posts on your archive pages."
|
1762 |
msgstr ""
|
1763 |
|
1764 |
+
#: admin/includes/class-settings.php:484
|
1765 |
msgid ""
|
1766 |
"Please check your post content. A priority of 10 and below might cause "
|
1767 |
"issues (wpautop function might run twice)."
|
1768 |
msgstr ""
|
1769 |
|
1770 |
+
#: admin/includes/class-settings.php:486
|
1771 |
msgid ""
|
1772 |
"Play with this value in order to change the priority of the injected ads "
|
1773 |
"compared to other auto injected elements in the post content."
|
1774 |
msgstr ""
|
1775 |
|
1776 |
+
#: admin/includes/class-settings.php:500
|
1777 |
msgid ""
|
1778 |
"Advanced Ads ignores paragraphs and other elements in containers when "
|
1779 |
"injecting ads into the post content. Check this option to ignore this "
|
1780 |
"limitation and ads might show up again."
|
1781 |
msgstr ""
|
1782 |
|
1783 |
+
#: admin/includes/class-settings.php:516
|
1784 |
msgid "Read this first"
|
1785 |
msgstr ""
|
1786 |
|
1787 |
+
#: admin/includes/class-settings.php:517
|
1788 |
msgid "Hide ads from crawlers, bots and empty user agents."
|
1789 |
msgstr ""
|
1790 |
|
1791 |
+
#: admin/includes/class-settings.php:530
|
1792 |
msgid "Pro feature"
|
1793 |
msgstr ""
|
1794 |
|
1795 |
#. %1$s is a starting <a> tag and %2$s a closing one
|
1796 |
+
#: admin/includes/class-settings.php:548
|
1797 |
#, php-format
|
1798 |
msgid ""
|
1799 |
"Disable %1$sAd Health%2$s in frontend and backend, warnings and internal "
|
1800 |
"notices like tips, tutorials, email newsletters and update notices."
|
1801 |
msgstr ""
|
1802 |
|
1803 |
+
#: admin/includes/class-settings.php:566
|
1804 |
msgid ""
|
1805 |
"Prefix of class or id attributes in the frontend. Change it if you don’t "
|
1806 |
"want <strong>ad blockers</strong> to mark these blocks as ads.<br/>You might "
|
1807 |
"need to <strong>rewrite css rules afterwards</strong>."
|
1808 |
msgstr ""
|
1809 |
|
1810 |
+
#: admin/includes/class-settings.php:585
|
1811 |
msgid "Allow editors to also manage and publish ads."
|
1812 |
msgstr ""
|
1813 |
|
1814 |
+
#: admin/includes/class-settings.php:586
|
1815 |
#, php-format
|
1816 |
msgid ""
|
1817 |
"You can assign different ad-related roles on a user basis with <a "
|
1818 |
"href=\"%s\" target=\"_blank\">Advanced Ads Pro</a>."
|
1819 |
msgstr ""
|
1820 |
|
1821 |
+
#: admin/includes/class-settings.php:597
|
1822 |
msgctxt "label before ads"
|
1823 |
msgid "Advertisements"
|
1824 |
msgstr ""
|
1825 |
|
1826 |
+
#: admin/includes/class-settings.php:606
|
1827 |
msgid "Displayed above ads."
|
1828 |
msgstr ""
|
1829 |
|
1830 |
+
#: admin/includes/class-settings.php:642
|
1831 |
msgid "Clean up all data related to Advanced Ads when removing the plugin."
|
1832 |
msgstr ""
|
1833 |
|
1834 |
+
#: admin/includes/class-settings.php:655
|
1835 |
msgid "Disable shortcode button in visual editor."
|
1836 |
msgstr ""
|
1837 |
|
2269 |
#: admin/views/placements-ad-label-position.php:5
|
2270 |
#: admin/views/placements-ad-label.php:1 admin/views/placements-ad-label.php:4
|
2271 |
#: admin/views/placements.php:74
|
2272 |
+
#: modules/gadsense/includes/class-network-adsense.php:236
|
2273 |
msgid "default"
|
2274 |
msgstr ""
|
2275 |
|
3389 |
msgid "Disable top anchor ad"
|
3390 |
msgstr ""
|
3391 |
|
3392 |
+
#: modules/gadsense/includes/class-network-adsense.php:61
|
3393 |
+
msgid "Disable stats"
|
3394 |
+
msgstr ""
|
3395 |
+
|
3396 |
+
#: modules/gadsense/includes/class-network-adsense.php:73
|
3397 |
msgid "Limit to 3 ads"
|
3398 |
msgstr ""
|
3399 |
|
3400 |
+
#: modules/gadsense/includes/class-network-adsense.php:83
|
3401 |
msgid "Disable violation warnings"
|
3402 |
msgstr ""
|
3403 |
|
3404 |
+
#: modules/gadsense/includes/class-network-adsense.php:91
|
3405 |
msgid "Transparent background"
|
3406 |
msgstr ""
|
3407 |
|
3408 |
+
#: modules/gadsense/includes/class-network-adsense.php:99
|
3409 |
msgid "Full width responsive ads on mobile"
|
3410 |
msgstr ""
|
3411 |
|
3412 |
+
#: modules/gadsense/includes/class-network-adsense.php:143
|
3413 |
#, php-format
|
3414 |
msgid "Limit to %d AdSense ads"
|
3415 |
msgstr ""
|
3416 |
|
3417 |
+
#: modules/gadsense/includes/class-network-adsense.php:147
|
3418 |
msgid ""
|
3419 |
"There is no explicit limit for AdSense ads anymore, but you can still use "
|
3420 |
"this setting to prevent too many AdSense ads to show accidentally on your "
|
3421 |
"site."
|
3422 |
msgstr ""
|
3423 |
|
3424 |
+
#: modules/gadsense/includes/class-network-adsense.php:151
|
3425 |
msgid ""
|
3426 |
"Due to technical restrictions, the limit does not work on placements with "
|
3427 |
"cache-busting enabled."
|
3428 |
msgstr ""
|
3429 |
|
3430 |
+
#: modules/gadsense/includes/class-network-adsense.php:163
|
3431 |
msgid ""
|
3432 |
"Enable this box if you don’t want Google Auto ads to place anchor ads at the "
|
3433 |
"top of your page."
|
3434 |
msgstr ""
|
3435 |
|
3436 |
+
#: modules/gadsense/includes/class-network-adsense.php:176
|
3437 |
+
msgid ""
|
3438 |
+
"Enable this option to stop loading stats from AdSense into your WordPress "
|
3439 |
+
"backend."
|
3440 |
+
msgstr ""
|
3441 |
+
|
3442 |
+
#: modules/gadsense/includes/class-network-adsense.php:191
|
3443 |
#: modules/gadsense/admin/views/connect-adsense.php:37
|
3444 |
msgid ""
|
3445 |
"Insert the AdSense header code used for verification and the Auto Ads "
|
3447 |
msgstr ""
|
3448 |
|
3449 |
#. this is the text for a link to a sub-page in an AdSense account
|
3450 |
+
#: modules/gadsense/includes/class-network-adsense.php:196
|
3451 |
msgid "Adjust Auto ads options"
|
3452 |
msgstr ""
|
3453 |
|
3454 |
+
#: modules/gadsense/includes/class-network-adsense.php:198
|
3455 |
#, php-format
|
3456 |
msgid ""
|
3457 |
"Please read <a href=\"%s\" target=\"_blank\">this article</a> if <strong>ads "
|
3458 |
"appear in random places</strong>."
|
3459 |
msgstr ""
|
3460 |
|
3461 |
+
#: modules/gadsense/includes/class-network-adsense.php:199
|
3462 |
msgid "Display Auto ads only on specific pages"
|
3463 |
msgstr ""
|
3464 |
|
3465 |
+
#: modules/gadsense/includes/class-network-adsense.php:200
|
3466 |
msgid "Auto ads on AMP pages"
|
3467 |
msgstr ""
|
3468 |
|
3469 |
+
#: modules/gadsense/includes/class-network-adsense.php:213
|
3470 |
msgid "Disable warnings about potential violations of the AdSense terms."
|
3471 |
msgstr ""
|
3472 |
|
3473 |
+
#: modules/gadsense/includes/class-network-adsense.php:214
|
3474 |
#, php-format
|
3475 |
msgid ""
|
3476 |
"Our <a href=\"%s\" target=\"_blank\">Ad Health</a> feature monitors if "
|
3478 |
"managed with Advanced Ads. Enable this option to remove these checks"
|
3479 |
msgstr ""
|
3480 |
|
3481 |
+
#: modules/gadsense/includes/class-network-adsense.php:225
|
3482 |
msgid ""
|
3483 |
"Enable this option in case your theme adds an unfortunate background color "
|
3484 |
"to AdSense ads."
|
3485 |
msgstr ""
|
3486 |
|
3487 |
+
#: modules/gadsense/includes/class-network-adsense.php:237
|
3488 |
msgid "enable"
|
3489 |
msgstr ""
|
3490 |
|
3491 |
+
#: modules/gadsense/includes/class-network-adsense.php:238
|
3492 |
msgid "disable"
|
3493 |
msgstr ""
|
3494 |
|
3495 |
+
#: modules/gadsense/includes/class-network-adsense.php:243
|
3496 |
#, php-format
|
3497 |
msgid ""
|
3498 |
"Whether your responsive ad unit may expand to <a href='%s' target='blank'>"
|
modules/gadsense/admin/assets/js/adsense.js
CHANGED
@@ -37,7 +37,7 @@ class AdvancedAdsNetworkAdsense extends AdvancedAdsAdNetwork{
|
|
37 |
|
38 |
getSelectedId() {
|
39 |
const pubId = gadsenseData.pubId || false;
|
40 |
-
const slotId =
|
41 |
if (pubId && slotId)
|
42 |
return "ca-" + pubId + ":" + slotId;
|
43 |
return null;
|
@@ -54,7 +54,7 @@ class AdvancedAdsNetworkAdsense extends AdvancedAdsAdNetwork{
|
|
54 |
var elmData = jQuery(elm).data('refresh');
|
55 |
if (elmData){
|
56 |
elmData = typeof(elmData) === 'string' ? JSON.parse(elmData) : elmData;
|
57 |
-
var unit_code =
|
58 |
elmData.filter_value = unit_code;
|
59 |
elmData.requires_refresh = true;
|
60 |
jQuery(elm).data('refresh', elmData);
|
@@ -76,11 +76,11 @@ class AdvancedAdsNetworkAdsense extends AdvancedAdsAdNetwork{
|
|
76 |
}
|
77 |
|
78 |
onManualSetup() {
|
79 |
-
|
80 |
-
|
81 |
this.undoReadOnly();
|
82 |
// const name = (this.adUnitName) ? "( " + this.adUnitName + " ) " : "";
|
83 |
-
//
|
84 |
}
|
85 |
|
86 |
/**
|
@@ -94,11 +94,11 @@ class AdvancedAdsNetworkAdsense extends AdvancedAdsAdNetwork{
|
|
94 |
this.undoReadOnly();
|
95 |
this.setDetailsFromAdCode(parsed);
|
96 |
this.makeReadOnly();
|
97 |
-
|
98 |
-
|
99 |
this.closeAdSelector();
|
100 |
} else {
|
101 |
-
|
102 |
}
|
103 |
return parsed;
|
104 |
}
|
@@ -124,7 +124,7 @@ class AdvancedAdsNetworkAdsense extends AdvancedAdsAdNetwork{
|
|
124 |
var code = this.codes[slotID];
|
125 |
var parsed = this.processAdCode(code);
|
126 |
if ( false !== parsed ) {
|
127 |
-
|
128 |
this.closeAdSelector();
|
129 |
this.preventCloseAdSelector = false;
|
130 |
}
|
@@ -138,9 +138,9 @@ class AdvancedAdsNetworkAdsense extends AdvancedAdsAdNetwork{
|
|
138 |
getRemoteCode( slotID ) {
|
139 |
|
140 |
if ( '' == slotID ) return;
|
141 |
-
|
142 |
const that = this;
|
143 |
-
|
144 |
type: 'post',
|
145 |
url: ajaxurl,
|
146 |
data: {
|
@@ -149,9 +149,9 @@ class AdvancedAdsNetworkAdsense extends AdvancedAdsAdNetwork{
|
|
149 |
unit: slotID,
|
150 |
},
|
151 |
success: function(response,status,XHR){
|
152 |
-
|
153 |
if ( 'undefined' != typeof response.code ) {
|
154 |
-
|
155 |
var parsed = that.processAdCode( response.code );
|
156 |
if ( false !== parsed ) {
|
157 |
that.codes[slotID] = response.code;
|
@@ -160,17 +160,17 @@ class AdvancedAdsNetworkAdsense extends AdvancedAdsAdNetwork{
|
|
160 |
AdvancedAdsAdmin.AdImporter.highlightSelectedRowInExternalAdsList();
|
161 |
// // Update quota message if needed
|
162 |
// if ( 1 == 0 ) {
|
163 |
-
//
|
164 |
// AdsenseMAPI.quota = response.quota;
|
165 |
// if ( 0 == response.quota ) {
|
166 |
-
//
|
167 |
// }
|
168 |
// }
|
169 |
that.closeAdSelector();
|
170 |
|
171 |
} else {
|
172 |
if ( 'undefined' != typeof response.raw ) {
|
173 |
-
|
174 |
} else if( 'undefined' != typeof response.msg ) {
|
175 |
if ( 'undefined' != typeof response.reload ) {
|
176 |
AdvancedAdsAdmin.AdImporter.emptyMapiSelector( response.msg );
|
@@ -178,7 +178,7 @@ class AdvancedAdsNetworkAdsense extends AdvancedAdsAdNetwork{
|
|
178 |
if ( 'doesNotSupportAdUnitType' == response.msg ) {
|
179 |
AdvancedAdsAdmin.AdImporter.unitIsNotSupported( slotID );
|
180 |
} else {
|
181 |
-
|
182 |
}
|
183 |
}
|
184 |
if ( 'undefined' != typeof response.raw ) {
|
@@ -188,7 +188,7 @@ class AdvancedAdsNetworkAdsense extends AdvancedAdsAdNetwork{
|
|
188 |
}
|
189 |
},
|
190 |
error: function(request,status,err){
|
191 |
-
|
192 |
|
193 |
},
|
194 |
});
|
@@ -204,7 +204,7 @@ class AdvancedAdsNetworkAdsense extends AdvancedAdsAdNetwork{
|
|
204 |
parseAdContent(content) {
|
205 |
var rawContent = ('undefined' != typeof(content))? content.trim() : '';
|
206 |
var theAd = {};
|
207 |
-
var theContent =
|
208 |
var adByGoogle = theContent.find( 'ins' );
|
209 |
theAd.slotId = adByGoogle.attr( 'data-ad-slot' ) || '';
|
210 |
if ('undefined' != typeof(adByGoogle.attr( 'data-ad-client' ))) {
|
@@ -297,7 +297,7 @@ class AdvancedAdsNetworkAdsense extends AdvancedAdsAdNetwork{
|
|
297 |
}
|
298 |
|
299 |
if ( '' == theAd.slotId && gadsenseData.pubId && '' != gadsenseData.pubId ) {
|
300 |
-
theAd.type =
|
301 |
}
|
302 |
|
303 |
/* Page-Level ad */
|
@@ -310,7 +310,7 @@ class AdvancedAdsNetworkAdsense extends AdvancedAdsAdNetwork{
|
|
310 |
theAd = { 'parse_message': 'unknownAd' };
|
311 |
}
|
312 |
|
313 |
-
|
314 |
return theAd;
|
315 |
}
|
316 |
|
@@ -332,7 +332,7 @@ class AdvancedAdsNetworkAdsense extends AdvancedAdsAdNetwork{
|
|
332 |
* legacy method
|
333 |
*/
|
334 |
handleParseResult( parseResult ) {
|
335 |
-
|
336 |
switch ( parseResult.parse_message ) {
|
337 |
case 'pageLevelAd' :
|
338 |
advads_show_adsense_auto_ads_warning();
|
@@ -341,19 +341,19 @@ class AdvancedAdsNetworkAdsense extends AdvancedAdsAdNetwork{
|
|
341 |
// Not recognized ad code
|
342 |
if ( this.parseCodeBtnClicked && 'post-new.php' == gadsenseData.pagenow ) {
|
343 |
// do not show if just after switching to AdSense ad type on ad creation
|
344 |
-
|
345 |
}
|
346 |
break;
|
347 |
default:
|
348 |
this.setDetailsFromAdCode( parseResult );
|
349 |
if ( 'undefined' != typeof AdsenseMAPI && 'undefined' != typeof AdsenseMAPI.hasToken && parseResult.pubId == AdsenseMAPI.pubId ) {
|
350 |
-
var content =
|
351 |
this.mapiSaveAdCode( content, parseResult.slotId );
|
352 |
this.makeReadOnly();
|
353 |
}
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
var SNT = this.getCustomInputs();
|
358 |
SNT.css( 'display', 'block' );
|
359 |
}
|
@@ -365,56 +365,56 @@ class AdvancedAdsNetworkAdsense extends AdvancedAdsAdNetwork{
|
|
365 |
*/
|
366 |
setDetailsFromAdCode(theAd) {
|
367 |
this.undoReadOnly();
|
368 |
-
|
369 |
-
|
370 |
if ('normal' == theAd.type) {
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
}
|
375 |
if ('responsive' == theAd.type) {
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
}
|
381 |
if ('link' == theAd.type) {
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
}
|
386 |
if ('link-responsive' == theAd.type) {
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
}
|
392 |
if ('matched-content' == theAd.type) {
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
}
|
398 |
if ('in-article' == theAd.type) {
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
}
|
403 |
if ('in-feed' == theAd.type) {
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
}
|
409 |
var storedPubId = gadsenseData.pubId;
|
410 |
|
411 |
if ( '' !== storedPubId && theAd.pubId != storedPubId && '' != theAd.slotId ) {
|
412 |
-
|
413 |
} else {
|
414 |
-
|
415 |
}
|
416 |
-
|
417 |
-
|
418 |
}
|
419 |
|
420 |
/**
|
@@ -422,32 +422,32 @@ class AdvancedAdsNetworkAdsense extends AdvancedAdsAdNetwork{
|
|
422 |
* Format the post content field
|
423 |
*/
|
424 |
static gadsenseFormatAdContent() {
|
425 |
-
var slotId =
|
426 |
-
var unitType =
|
427 |
-
var publisherId =
|
428 |
var adContent = {
|
429 |
slotId: slotId,
|
430 |
unitType: unitType,
|
431 |
pubId: publisherId,
|
432 |
};
|
433 |
if ('responsive' == unitType) {
|
434 |
-
var resize =
|
435 |
if (0 == resize) { resize = 'auto'; }
|
436 |
adContent.resize = resize;
|
437 |
}
|
438 |
if ('in-feed' == unitType) {
|
439 |
-
adContent.layout_key =
|
440 |
}
|
441 |
if ('undefined' != typeof(adContent.resize) && 'auto' != adContent.resize) {
|
442 |
-
|
443 |
}
|
444 |
-
|
445 |
|
446 |
if ('undefined' != typeof(window.gadsenseAdContent)) {
|
447 |
adContent = window.gadsenseAdContent;
|
448 |
delete( window.gadsenseAdContent );
|
449 |
}
|
450 |
-
|
451 |
|
452 |
}
|
453 |
|
@@ -455,48 +455,48 @@ class AdvancedAdsNetworkAdsense extends AdvancedAdsAdNetwork{
|
|
455 |
* legacy method
|
456 |
*/
|
457 |
updateAdsenseType(){
|
458 |
-
var type =
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
if ( 'responsive' == type || 'link-responsive' == type || 'matched-content' == type ) {
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
} else if ( 'in-feed' == type ) {
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
// show add-on notice
|
479 |
-
|
480 |
-
|
481 |
} else if ( 'in-article' == type ) {
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
} else if ( 'normal' == type || 'link' == type ) {
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
|
492 |
-
if ( !
|
493 |
-
|
494 |
}
|
495 |
-
if ( !
|
496 |
-
|
497 |
}
|
498 |
}
|
499 |
-
|
500 |
AdvancedAdsNetworkAdsense.gadsenseFormatAdContent();
|
501 |
|
502 |
this.show_float_warnings( type );
|
@@ -507,8 +507,8 @@ class AdvancedAdsNetworkAdsense extends AdvancedAdsAdNetwork{
|
|
507 |
* Show / hide position warning.
|
508 |
*/
|
509 |
show_float_warnings( unit_type ) {
|
510 |
-
var resize_type =
|
511 |
-
var position =
|
512 |
|
513 |
if (
|
514 |
( -1 !== [ 'link-responsive', 'matched-content', 'in-article', 'in-feed' ].indexOf( unit_type )
|
@@ -516,9 +516,9 @@ class AdvancedAdsNetworkAdsense extends AdvancedAdsAdNetwork{
|
|
516 |
)
|
517 |
&& ( 'left' == position || 'right' == position )
|
518 |
) {
|
519 |
-
|
520 |
} else {
|
521 |
-
|
522 |
}
|
523 |
}
|
524 |
|
@@ -526,20 +526,20 @@ class AdvancedAdsNetworkAdsense extends AdvancedAdsAdNetwork{
|
|
526 |
* legacy method - adds readonly to relevant inputs
|
527 |
*/
|
528 |
makeReadOnly() {
|
529 |
-
|
530 |
-
|
531 |
}
|
532 |
|
533 |
/**
|
534 |
* legacy method - removes readonly from relevant inputs (original name getSlotAndType_jq)
|
535 |
*/
|
536 |
undoReadOnly() {
|
537 |
-
|
538 |
-
|
539 |
}
|
540 |
|
541 |
getCustomInputs() {
|
542 |
-
var $div1 =
|
543 |
var $label1 = $div1.prev();
|
544 |
var $hr1 = $div1.next();
|
545 |
var $label2 = $hr1.next();
|
@@ -570,7 +570,7 @@ class AdvancedAdsNetworkAdsense extends AdvancedAdsAdNetwork{
|
|
570 |
if (parsedAd) {
|
571 |
// check
|
572 |
// we need to check if the type of the ad is different from the default. this marks a manually setup ad.
|
573 |
-
const unitType =
|
574 |
if (parsedAd.type != unitType) {
|
575 |
//this ad was manually setup. don't open the selector, but switch to manual select.
|
576 |
switchToManualSetup = true;
|
@@ -590,15 +590,15 @@ class AdvancedAdsNetworkAdsense extends AdvancedAdsAdNetwork{
|
|
590 |
|
591 |
onDomReady() {
|
592 |
const that = this;
|
593 |
-
|
594 |
ev.preventDefault();
|
595 |
that.onSelected();
|
596 |
} );
|
597 |
|
598 |
-
|
599 |
ev.preventDefault();
|
600 |
that.parseCodeBtnClicked = true;
|
601 |
-
var rawContent =
|
602 |
var parseResult = that.parseAdContent( rawContent );
|
603 |
that.handleParseResult( parseResult );
|
604 |
if (AdvancedAdsAdmin.AdImporter.highlightSelectedRowInExternalAdsList()){
|
@@ -613,16 +613,16 @@ class AdvancedAdsNetworkAdsense extends AdvancedAdsAdNetwork{
|
|
613 |
}
|
614 |
});
|
615 |
|
616 |
-
|
617 |
that.checkAdSlotId(this);
|
618 |
});
|
619 |
|
620 |
-
let inputCode =
|
621 |
if (inputCode) {
|
622 |
this.checkAdSlotId(inputCode[0]);
|
623 |
}
|
624 |
|
625 |
-
|
626 |
that.show_float_warnings( 'responsive' );
|
627 |
} );
|
628 |
this.updateAdsenseType();
|
@@ -637,20 +637,20 @@ class AdvancedAdsNetworkAdsense extends AdvancedAdsAdNetwork{
|
|
637 |
}
|
638 |
|
639 |
checkAdSlotId(elm) {
|
640 |
-
if ( 'unit-code' ==
|
641 |
-
var val =
|
642 |
if (val) val = val.trim();
|
643 |
if ( val.length > 0 && ( gadsenseData.pubId && -1 != val.indexOf( gadsenseData.pubId.substr( 4 ) ) ) ) {
|
644 |
// if ( val.length > 0 && -1 != val.indexOf( gadsenseData.pubId.substr( 4 ) ) ) {
|
645 |
-
|
646 |
-
|
647 |
} else {
|
648 |
-
|
649 |
-
|
650 |
}
|
651 |
} else {
|
652 |
-
|
653 |
-
|
654 |
}
|
655 |
this.updateAdsenseType();
|
656 |
}
|
@@ -658,8 +658,8 @@ class AdvancedAdsNetworkAdsense extends AdvancedAdsAdNetwork{
|
|
658 |
mapiSaveAdCode( code, slot ) {
|
659 |
if ( 'undefined' != typeof AdsenseMAPI.hasToken && 'undefined' == typeof this.codes[ 'ca-' + AdsenseMAPI.pubId + ':' + slot ] ) {
|
660 |
this.codes['ca-' + AdsenseMAPI.pubId + ':' + slot] = code;
|
661 |
-
|
662 |
-
|
663 |
type: 'post',
|
664 |
url: ajaxurl,
|
665 |
data: {
|
@@ -669,10 +669,10 @@ class AdvancedAdsNetworkAdsense extends AdvancedAdsAdNetwork{
|
|
669 |
action: 'advads-mapi-reconstructed-code',
|
670 |
},
|
671 |
success: function( resp, status, XHR ) {
|
672 |
-
|
673 |
},
|
674 |
error: function( req, status, err ) {
|
675 |
-
|
676 |
},
|
677 |
});
|
678 |
}
|
@@ -681,14 +681,14 @@ class AdvancedAdsNetworkAdsense extends AdvancedAdsAdNetwork{
|
|
681 |
mapiMayBeSaveAdCode(){
|
682 |
// MAPI not set up
|
683 |
if ( 'undefined' == typeof AdsenseMAPI.hasToken ) return;
|
684 |
-
var slotId =
|
685 |
if ( !slotId ) return;
|
686 |
|
687 |
-
var type =
|
688 |
-
var width =
|
689 |
-
var height =
|
690 |
-
var layout =
|
691 |
-
var layoutKey =
|
692 |
|
693 |
var code = false;
|
694 |
|
37 |
|
38 |
getSelectedId() {
|
39 |
const pubId = gadsenseData.pubId || false;
|
40 |
+
const slotId = jQuery( '#unit-code' ).val().trim();
|
41 |
if (pubId && slotId)
|
42 |
return "ca-" + pubId + ":" + slotId;
|
43 |
return null;
|
54 |
var elmData = jQuery(elm).data('refresh');
|
55 |
if (elmData){
|
56 |
elmData = typeof(elmData) === 'string' ? JSON.parse(elmData) : elmData;
|
57 |
+
var unit_code = jQuery('input#unit-code').val();
|
58 |
elmData.filter_value = unit_code;
|
59 |
elmData.requires_refresh = true;
|
60 |
jQuery(elm).data('refresh', elmData);
|
76 |
}
|
77 |
|
78 |
onManualSetup() {
|
79 |
+
jQuery( '.advads-adsense-code' ).css( 'display', 'none' );
|
80 |
+
jQuery( '#remote-ad-unsupported-ad-type' ).css( 'display', 'none' );
|
81 |
this.undoReadOnly();
|
82 |
// const name = (this.adUnitName) ? "( " + this.adUnitName + " ) " : "";
|
83 |
+
// jQuery( '#advanced-ads-adsense-unit-name').text(name);
|
84 |
}
|
85 |
|
86 |
/**
|
94 |
this.undoReadOnly();
|
95 |
this.setDetailsFromAdCode(parsed);
|
96 |
this.makeReadOnly();
|
97 |
+
jQuery('#remote-ad-code-error').css('display', 'none');
|
98 |
+
jQuery('#remote-ad-unsupported-ad-type').css('display', 'none');
|
99 |
this.closeAdSelector();
|
100 |
} else {
|
101 |
+
jQuery( '#remote-ad-code-error' ).css( 'display', 'block' );
|
102 |
}
|
103 |
return parsed;
|
104 |
}
|
124 |
var code = this.codes[slotID];
|
125 |
var parsed = this.processAdCode(code);
|
126 |
if ( false !== parsed ) {
|
127 |
+
jQuery( '#remote-ad-unsupported-ad-type' ).css( 'display', 'none' );
|
128 |
this.closeAdSelector();
|
129 |
this.preventCloseAdSelector = false;
|
130 |
}
|
138 |
getRemoteCode( slotID ) {
|
139 |
|
140 |
if ( '' == slotID ) return;
|
141 |
+
jQuery( '#mapi-loading-overlay' ).css( 'display', 'block' );
|
142 |
const that = this;
|
143 |
+
jQuery.ajax({
|
144 |
type: 'post',
|
145 |
url: ajaxurl,
|
146 |
data: {
|
149 |
unit: slotID,
|
150 |
},
|
151 |
success: function(response,status,XHR){
|
152 |
+
jQuery( '#mapi-loading-overlay' ).css( 'display', 'none' );
|
153 |
if ( 'undefined' != typeof response.code ) {
|
154 |
+
jQuery( '#remote-ad-code-msg' ).empty();
|
155 |
var parsed = that.processAdCode( response.code );
|
156 |
if ( false !== parsed ) {
|
157 |
that.codes[slotID] = response.code;
|
160 |
AdvancedAdsAdmin.AdImporter.highlightSelectedRowInExternalAdsList();
|
161 |
// // Update quota message if needed
|
162 |
// if ( 1 == 0 ) {
|
163 |
+
// jQuery( '#mapi-quota-message' ).text( response.quotaMsg );
|
164 |
// AdsenseMAPI.quota = response.quota;
|
165 |
// if ( 0 == response.quota ) {
|
166 |
+
// jQuery( '#mapi-get-adcode,#mapi-get-adunits' ).prop( 'disabled', true );
|
167 |
// }
|
168 |
// }
|
169 |
that.closeAdSelector();
|
170 |
|
171 |
} else {
|
172 |
if ( 'undefined' != typeof response.raw ) {
|
173 |
+
jQuery( '#remote-ad-code-msg' ).html( response.raw );
|
174 |
} else if( 'undefined' != typeof response.msg ) {
|
175 |
if ( 'undefined' != typeof response.reload ) {
|
176 |
AdvancedAdsAdmin.AdImporter.emptyMapiSelector( response.msg );
|
178 |
if ( 'doesNotSupportAdUnitType' == response.msg ) {
|
179 |
AdvancedAdsAdmin.AdImporter.unitIsNotSupported( slotID );
|
180 |
} else {
|
181 |
+
jQuery( '#remote-ad-code-msg' ).html( response.msg );
|
182 |
}
|
183 |
}
|
184 |
if ( 'undefined' != typeof response.raw ) {
|
188 |
}
|
189 |
},
|
190 |
error: function(request,status,err){
|
191 |
+
jQuery( '#mapi-loading-overlay' ).css( 'display', 'none' );
|
192 |
|
193 |
},
|
194 |
});
|
204 |
parseAdContent(content) {
|
205 |
var rawContent = ('undefined' != typeof(content))? content.trim() : '';
|
206 |
var theAd = {};
|
207 |
+
var theContent = jQuery( '<div />' ).html( rawContent );
|
208 |
var adByGoogle = theContent.find( 'ins' );
|
209 |
theAd.slotId = adByGoogle.attr( 'data-ad-slot' ) || '';
|
210 |
if ('undefined' != typeof(adByGoogle.attr( 'data-ad-client' ))) {
|
297 |
}
|
298 |
|
299 |
if ( '' == theAd.slotId && gadsenseData.pubId && '' != gadsenseData.pubId ) {
|
300 |
+
theAd.type = jQuery( '#unit-type' ).val();
|
301 |
}
|
302 |
|
303 |
/* Page-Level ad */
|
310 |
theAd = { 'parse_message': 'unknownAd' };
|
311 |
}
|
312 |
|
313 |
+
jQuery( document ).trigger( 'gadsenseParseAdContent', [ theAd, adByGoogle ] );
|
314 |
return theAd;
|
315 |
}
|
316 |
|
332 |
* legacy method
|
333 |
*/
|
334 |
handleParseResult( parseResult ) {
|
335 |
+
jQuery( '#pastecode-msg' ).empty();
|
336 |
switch ( parseResult.parse_message ) {
|
337 |
case 'pageLevelAd' :
|
338 |
advads_show_adsense_auto_ads_warning();
|
341 |
// Not recognized ad code
|
342 |
if ( this.parseCodeBtnClicked && 'post-new.php' == gadsenseData.pagenow ) {
|
343 |
// do not show if just after switching to AdSense ad type on ad creation
|
344 |
+
jQuery( '#pastecode-msg' ).append( jQuery( '<p />' ).css( 'color', 'red' ).html( gadsenseData.msg.unknownAd ) );
|
345 |
}
|
346 |
break;
|
347 |
default:
|
348 |
this.setDetailsFromAdCode( parseResult );
|
349 |
if ( 'undefined' != typeof AdsenseMAPI && 'undefined' != typeof AdsenseMAPI.hasToken && parseResult.pubId == AdsenseMAPI.pubId ) {
|
350 |
+
var content = jQuery( '#advanced-ads-ad-parameters input[name="advanced_ad[content]"]' ).val();
|
351 |
this.mapiSaveAdCode( content, parseResult.slotId );
|
352 |
this.makeReadOnly();
|
353 |
}
|
354 |
+
jQuery( '.advads-adsense-code' ).hide();
|
355 |
+
jQuery( '.advads-adsense-show-code' ).show();
|
356 |
+
jQuery( '#mapi-insert-code' ).show();
|
357 |
var SNT = this.getCustomInputs();
|
358 |
SNT.css( 'display', 'block' );
|
359 |
}
|
365 |
*/
|
366 |
setDetailsFromAdCode(theAd) {
|
367 |
this.undoReadOnly();
|
368 |
+
jQuery( '#unit-code' ).val( theAd.slotId );
|
369 |
+
jQuery( '#advads-adsense-pub-id' ).val( theAd.pubId );
|
370 |
if ('normal' == theAd.type) {
|
371 |
+
jQuery( '#unit-type' ).val( 'normal' );
|
372 |
+
jQuery( '#advanced-ads-ad-parameters-size input[name="advanced_ad[width]"]' ).val( theAd.width );
|
373 |
+
jQuery( '#advanced-ads-ad-parameters-size input[name="advanced_ad[height]"]' ).val( theAd.height );
|
374 |
}
|
375 |
if ('responsive' == theAd.type) {
|
376 |
+
jQuery( '#unit-type' ).val( 'responsive' );
|
377 |
+
jQuery( '#ad-resize-type' ).val( 'auto' );
|
378 |
+
jQuery( '#advanced-ads-ad-parameters-size input[name="advanced_ad[width]"]' ).val( '' );
|
379 |
+
jQuery( '#advanced-ads-ad-parameters-size input[name="advanced_ad[height]"]' ).val( '' );
|
380 |
}
|
381 |
if ('link' == theAd.type) {
|
382 |
+
jQuery( '#unit-type' ).val( 'link' );
|
383 |
+
jQuery( '#advanced-ads-ad-parameters-size input[name="advanced_ad[width]"]' ).val( theAd.width );
|
384 |
+
jQuery( '#advanced-ads-ad-parameters-size input[name="advanced_ad[height]"]' ).val( theAd.height );
|
385 |
}
|
386 |
if ('link-responsive' == theAd.type) {
|
387 |
+
jQuery( '#unit-type' ).val( 'link-responsive' );
|
388 |
+
jQuery( '#ad-resize-type' ).val( 'auto' );
|
389 |
+
jQuery( '#advanced-ads-ad-parameters-size input[name="advanced_ad[width]"]' ).val( '' );
|
390 |
+
jQuery( '#advanced-ads-ad-parameters-size input[name="advanced_ad[height]"]' ).val( '' );
|
391 |
}
|
392 |
if ('matched-content' == theAd.type) {
|
393 |
+
jQuery( '#unit-type' ).val( 'matched-content' );
|
394 |
+
jQuery( '#ad-resize-type' ).val( 'auto' );
|
395 |
+
jQuery( '#advanced-ads-ad-parameters-size input[name="advanced_ad[width]"]' ).val( '' );
|
396 |
+
jQuery( '#advanced-ads-ad-parameters-size input[name="advanced_ad[height]"]' ).val( '' );
|
397 |
}
|
398 |
if ('in-article' == theAd.type) {
|
399 |
+
jQuery( '#unit-type' ).val( 'in-article' );
|
400 |
+
jQuery( '#advanced-ads-ad-parameters-size input[name="advanced_ad[width]"]' ).val( '' );
|
401 |
+
jQuery( '#advanced-ads-ad-parameters-size input[name="advanced_ad[height]"]' ).val( '' );
|
402 |
}
|
403 |
if ('in-feed' == theAd.type) {
|
404 |
+
jQuery( '#unit-type' ).val( 'in-feed' );
|
405 |
+
jQuery( '#ad-layout-key' ).val( theAd.layout_key );
|
406 |
+
jQuery( '#advanced-ads-ad-parameters-size input[name="advanced_ad[width]"]' ).val( '' );
|
407 |
+
jQuery( '#advanced-ads-ad-parameters-size input[name="advanced_ad[height]"]' ).val( '' );
|
408 |
}
|
409 |
var storedPubId = gadsenseData.pubId;
|
410 |
|
411 |
if ( '' !== storedPubId && theAd.pubId != storedPubId && '' != theAd.slotId ) {
|
412 |
+
jQuery( '#adsense-ad-param-error' ).text( gadsenseData.msg.pubIdMismatch );
|
413 |
} else {
|
414 |
+
jQuery( '#adsense-ad-param-error' ).empty();
|
415 |
}
|
416 |
+
jQuery( document ).trigger( 'this.setDetailsFromAdCode', [ theAd ] );
|
417 |
+
jQuery( '#unit-type' ).trigger( 'change' );
|
418 |
}
|
419 |
|
420 |
/**
|
422 |
* Format the post content field
|
423 |
*/
|
424 |
static gadsenseFormatAdContent() {
|
425 |
+
var slotId = jQuery( '#ad-parameters-box #unit-code' ).val();
|
426 |
+
var unitType = jQuery( '#ad-parameters-box #unit-type' ).val();
|
427 |
+
var publisherId = jQuery( '#advads-adsense-pub-id' ).val() ? jQuery( '#advads-adsense-pub-id' ).val() : gadsenseData.pubId;
|
428 |
var adContent = {
|
429 |
slotId: slotId,
|
430 |
unitType: unitType,
|
431 |
pubId: publisherId,
|
432 |
};
|
433 |
if ('responsive' == unitType) {
|
434 |
+
var resize = jQuery( '#ad-parameters-box #ad-resize-type' ).val();
|
435 |
if (0 == resize) { resize = 'auto'; }
|
436 |
adContent.resize = resize;
|
437 |
}
|
438 |
if ('in-feed' == unitType) {
|
439 |
+
adContent.layout_key = jQuery( '#ad-parameters-box #ad-layout-key' ).val();
|
440 |
}
|
441 |
if ('undefined' != typeof(adContent.resize) && 'auto' != adContent.resize) {
|
442 |
+
jQuery( document ).trigger( 'gadsenseFormatAdResponsive', [adContent] );
|
443 |
}
|
444 |
+
jQuery( document ).trigger( 'gadsenseFormatAdContent', [adContent] );
|
445 |
|
446 |
if ('undefined' != typeof(window.gadsenseAdContent)) {
|
447 |
adContent = window.gadsenseAdContent;
|
448 |
delete( window.gadsenseAdContent );
|
449 |
}
|
450 |
+
jQuery( '#advads-ad-content-adsense' ).val( JSON.stringify( adContent, false, 2 ) );
|
451 |
|
452 |
}
|
453 |
|
455 |
* legacy method
|
456 |
*/
|
457 |
updateAdsenseType(){
|
458 |
+
var type = jQuery( '#unit-type' ).val();
|
459 |
+
jQuery( '.advads-adsense-layout' ).hide();
|
460 |
+
jQuery( '.advads-adsense-layout' ).next('div').hide();
|
461 |
+
jQuery( '.advads-adsense-layout-key' ).hide();
|
462 |
+
jQuery( '.advads-adsense-layout-key' ).next('div').hide();
|
463 |
+
jQuery( '.advads-ad-notice-in-feed-add-on' ).hide();
|
464 |
if ( 'responsive' == type || 'link-responsive' == type || 'matched-content' == type ) {
|
465 |
+
jQuery( '#advanced-ads-ad-parameters-size' ).css( 'display', 'none' );
|
466 |
+
jQuery( '#advanced-ads-ad-parameters-size' ).prev('.label').css( 'display', 'none' );
|
467 |
+
jQuery( '#advanced-ads-ad-parameters-size' ).next('.hr').css( 'display', 'none' );
|
468 |
+
jQuery( '.clearfix-before' ).show();
|
469 |
} else if ( 'in-feed' == type ) {
|
470 |
+
jQuery( '.advads-adsense-layout' ).css( 'display', 'none' );
|
471 |
+
jQuery( '.advads-adsense-layout' ).next('div').css( 'display', '`none' );
|
472 |
+
jQuery( '.advads-adsense-layout-key' ).css( 'display', 'block' );
|
473 |
+
jQuery( '.advads-adsense-layout-key' ).next('div').css( 'display', 'block' );
|
474 |
+
jQuery( '.advads-adsense-layout-key' ).next('div').css( 'display', 'block' );
|
475 |
+
jQuery( '#advanced-ads-ad-parameters-size' ).css( 'display', 'none' );
|
476 |
+
jQuery( '#advanced-ads-ad-parameters-size' ).prev('.label').css( 'display', 'none' );
|
477 |
+
jQuery( '#advanced-ads-ad-parameters-size' ).next('.hr').css( 'display', 'none' );
|
478 |
// show add-on notice
|
479 |
+
jQuery( '.advads-ad-notice-in-feed-add-on' ).show();
|
480 |
+
jQuery( '.clearfix-before' ).show();
|
481 |
} else if ( 'in-article' == type ) {
|
482 |
+
jQuery( '#advanced-ads-ad-parameters-size' ).css( 'display', 'none' );
|
483 |
+
jQuery( '#advanced-ads-ad-parameters-size' ).prev('.label').css( 'display', 'none' );
|
484 |
+
jQuery( '#advanced-ads-ad-parameters-size' ).next('.hr').css( 'display', 'none' );
|
485 |
+
jQuery( '.clearfix-before' ).show();
|
486 |
} else if ( 'normal' == type || 'link' == type ) {
|
487 |
+
jQuery( '#advanced-ads-ad-parameters-size' ).css( 'display', 'block' );
|
488 |
+
jQuery( '#advanced-ads-ad-parameters-size' ).prev('.label').css( 'display', 'block' );
|
489 |
+
jQuery( '#advanced-ads-ad-parameters-size' ).next('.hr').css( 'display', 'block' );
|
490 |
+
jQuery( '.clearfix-before' ).hide();
|
491 |
|
492 |
+
if ( ! jQuery( '[name="advanced_ad\[width\]"]' ).val() ) {
|
493 |
+
jQuery( '[name="advanced_ad\[width\]"]' ).val( '300' );
|
494 |
}
|
495 |
+
if ( ! jQuery( '[name="advanced_ad\[height\]"]' ).val() ) {
|
496 |
+
jQuery( '[name="advanced_ad\[height\]"]' ).val( '250' );
|
497 |
}
|
498 |
}
|
499 |
+
jQuery( document ).trigger( 'gadsenseUnitChanged' );
|
500 |
AdvancedAdsNetworkAdsense.gadsenseFormatAdContent();
|
501 |
|
502 |
this.show_float_warnings( type );
|
507 |
* Show / hide position warning.
|
508 |
*/
|
509 |
show_float_warnings( unit_type ) {
|
510 |
+
var resize_type = jQuery('#ad-resize-type').val();
|
511 |
+
var position = jQuery( '#advanced-ad-output-position input[name="advanced_ad[output][position]"]:checked' ).val();
|
512 |
|
513 |
if (
|
514 |
( -1 !== [ 'link-responsive', 'matched-content', 'in-article', 'in-feed' ].indexOf( unit_type )
|
516 |
)
|
517 |
&& ( 'left' == position || 'right' == position )
|
518 |
) {
|
519 |
+
jQuery('#ad-parameters-box-notices .advads-ad-notice-responsive-position').show();
|
520 |
} else {
|
521 |
+
jQuery('#ad-parameters-box-notices .advads-ad-notice-responsive-position').hide();
|
522 |
}
|
523 |
}
|
524 |
|
526 |
* legacy method - adds readonly to relevant inputs
|
527 |
*/
|
528 |
makeReadOnly() {
|
529 |
+
jQuery( '#unit-code,#ad-layout,#ad-layout-key,[name="advanced_ad[width]"],[name="advanced_ad[height]"]' ).prop( 'readonly', true );
|
530 |
+
jQuery( '#unit-type option:not(:selected)' ).prop( 'disabled', true );
|
531 |
}
|
532 |
|
533 |
/**
|
534 |
* legacy method - removes readonly from relevant inputs (original name getSlotAndType_jq)
|
535 |
*/
|
536 |
undoReadOnly() {
|
537 |
+
jQuery( '#unit-code,#ad-layout,#ad-layout-key,[name="advanced_ad[width]"],[name="advanced_ad[height]"]' ).prop( 'readonly', false );
|
538 |
+
jQuery( '#unit-type option:not(:selected)' ).prop( 'disabled', false );
|
539 |
}
|
540 |
|
541 |
getCustomInputs() {
|
542 |
+
var $div1 = jQuery( '#unit-code' ).closest( 'div' );
|
543 |
var $label1 = $div1.prev();
|
544 |
var $hr1 = $div1.next();
|
545 |
var $label2 = $hr1.next();
|
570 |
if (parsedAd) {
|
571 |
// check
|
572 |
// we need to check if the type of the ad is different from the default. this marks a manually setup ad.
|
573 |
+
const unitType = jQuery('#unit-type').val();
|
574 |
if (parsedAd.type != unitType) {
|
575 |
//this ad was manually setup. don't open the selector, but switch to manual select.
|
576 |
switchToManualSetup = true;
|
590 |
|
591 |
onDomReady() {
|
592 |
const that = this;
|
593 |
+
jQuery( document ).on( 'click', '.advads-adsense-close-code', function( ev ) {
|
594 |
ev.preventDefault();
|
595 |
that.onSelected();
|
596 |
} );
|
597 |
|
598 |
+
jQuery( document ).on('click', '.advads-adsense-submit-code', function(ev){
|
599 |
ev.preventDefault();
|
600 |
that.parseCodeBtnClicked = true;
|
601 |
+
var rawContent = jQuery( '.advads-adsense-content' ).val();
|
602 |
var parseResult = that.parseAdContent( rawContent );
|
603 |
that.handleParseResult( parseResult );
|
604 |
if (AdvancedAdsAdmin.AdImporter.highlightSelectedRowInExternalAdsList()){
|
613 |
}
|
614 |
});
|
615 |
|
616 |
+
jQuery( document ).on('change', '#unit-type, #unit-code', function (ev) {
|
617 |
that.checkAdSlotId(this);
|
618 |
});
|
619 |
|
620 |
+
let inputCode = jQuery('#unit-code');
|
621 |
if (inputCode) {
|
622 |
this.checkAdSlotId(inputCode[0]);
|
623 |
}
|
624 |
|
625 |
+
jQuery( document ).on( 'change', '#ad-resize-type', function( ev ) {
|
626 |
that.show_float_warnings( 'responsive' );
|
627 |
} );
|
628 |
this.updateAdsenseType();
|
637 |
}
|
638 |
|
639 |
checkAdSlotId(elm) {
|
640 |
+
if ( 'unit-code' == jQuery( elm ).attr( 'id' ) ) {
|
641 |
+
var val = jQuery( elm ).val();
|
642 |
if (val) val = val.trim();
|
643 |
if ( val.length > 0 && ( gadsenseData.pubId && -1 != val.indexOf( gadsenseData.pubId.substr( 4 ) ) ) ) {
|
644 |
// if ( val.length > 0 && -1 != val.indexOf( gadsenseData.pubId.substr( 4 ) ) ) {
|
645 |
+
jQuery( '#advads-pubid-in-slot' ).css( 'display', 'block' );
|
646 |
+
jQuery( elm ).css( 'background-color', 'rgba(255, 235, 59, 0.33)' );
|
647 |
} else {
|
648 |
+
jQuery( '#unit-code' ).css( 'background-color', '#fff' );
|
649 |
+
jQuery( '#advads-pubid-in-slot' ).css( 'display', 'none' );
|
650 |
}
|
651 |
} else {
|
652 |
+
jQuery( '#unit-code' ).css( 'background-color', '#fff' );
|
653 |
+
jQuery( '#advads-pubid-in-slot' ).css( 'display', 'none' );
|
654 |
}
|
655 |
this.updateAdsenseType();
|
656 |
}
|
658 |
mapiSaveAdCode( code, slot ) {
|
659 |
if ( 'undefined' != typeof AdsenseMAPI.hasToken && 'undefined' == typeof this.codes[ 'ca-' + AdsenseMAPI.pubId + ':' + slot ] ) {
|
660 |
this.codes['ca-' + AdsenseMAPI.pubId + ':' + slot] = code;
|
661 |
+
jQuery( '#mapi-loading-overlay' ).css( 'display', 'block' );
|
662 |
+
jQuery.ajax({
|
663 |
type: 'post',
|
664 |
url: ajaxurl,
|
665 |
data: {
|
669 |
action: 'advads-mapi-reconstructed-code',
|
670 |
},
|
671 |
success: function( resp, status, XHR ) {
|
672 |
+
jQuery( '#mapi-loading-overlay' ).css( 'display', 'none' );
|
673 |
},
|
674 |
error: function( req, status, err ) {
|
675 |
+
jQuery( '#mapi-loading-overlay' ).css( 'display', 'none' );
|
676 |
},
|
677 |
});
|
678 |
}
|
681 |
mapiMayBeSaveAdCode(){
|
682 |
// MAPI not set up
|
683 |
if ( 'undefined' == typeof AdsenseMAPI.hasToken ) return;
|
684 |
+
var slotId = jQuery( '#unit-code' ).val();
|
685 |
if ( !slotId ) return;
|
686 |
|
687 |
+
var type = jQuery( '#unit-type' ).val();
|
688 |
+
var width = jQuery( '#advanced-ads-ad-parameters-size input[name="advanced_ad[width]"]' ).val().trim();
|
689 |
+
var height = jQuery( '#advanced-ads-ad-parameters-size input[name="advanced_ad[height]"]' ).val().trim();
|
690 |
+
var layout = jQuery( '#ad-layout' ).val();
|
691 |
+
var layoutKey = jQuery( '#ad-layout-key' ).val();
|
692 |
|
693 |
var code = false;
|
694 |
|
modules/gadsense/admin/views/adsense-account.php
CHANGED
@@ -158,7 +158,7 @@ printf(__( 'Problems with AdSense? Check out the %1$smanual%2$s or %3$sask here%
|
|
158 |
<div id="mapi-alerts-overlay">
|
159 |
<div style="position:relative;text-align:center;display:table;width:100%;height:100%;">
|
160 |
<div style="display:table-cell;vertical-align:middle;">
|
161 |
-
<img alt="loading" src="<?php echo esc_url( ADVADS_BASE_URL . 'admin/assets/img/loader.gif
|
162 |
</div>
|
163 |
</div>
|
164 |
</div>
|
158 |
<div id="mapi-alerts-overlay">
|
159 |
<div style="position:relative;text-align:center;display:table;width:100%;height:100%;">
|
160 |
<div style="display:table-cell;vertical-align:middle;">
|
161 |
+
<img alt="loading" src="<?php echo esc_url( ADVADS_BASE_URL . 'admin/assets/img/loader.gif' ); ?>" />
|
162 |
</div>
|
163 |
</div>
|
164 |
</div>
|
modules/gadsense/includes/class-ad-type-adsense.php
CHANGED
@@ -55,7 +55,7 @@ class Advanced_Ads_Ad_Type_Adsense extends Advanced_Ads_Ad_Type_Abstract {
|
|
55 |
// TODO: create a dedicated method to handle this properly
|
56 |
?>
|
57 |
<script>
|
58 |
-
|
59 |
<?php
|
60 |
$mapi_options = Advanced_Ads_AdSense_MAPI::get_option();
|
61 |
$json_ad_codes = json_encode($mapi_options['ad_codes']);
|
55 |
// TODO: create a dedicated method to handle this properly
|
56 |
?>
|
57 |
<script>
|
58 |
+
jQuery(function () {
|
59 |
<?php
|
60 |
$mapi_options = Advanced_Ads_AdSense_MAPI::get_option();
|
61 |
$json_ad_codes = json_encode($mapi_options['ad_codes']);
|
modules/gadsense/includes/class-gadsense-data.php
CHANGED
@@ -92,4 +92,12 @@ class Advanced_Ads_AdSense_Data {
|
|
92 |
};
|
93 |
return false;
|
94 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
}
|
92 |
};
|
93 |
return false;
|
94 |
}
|
95 |
+
// load stats from AdSense account.
|
96 |
+
public function is_hide_stats(){
|
97 |
+
if ( isset( $this->options ) && is_array( $this->options ) && isset( $this->options['hide-stats'] ) ){
|
98 |
+
return true;
|
99 |
+
};
|
100 |
+
return false;
|
101 |
+
}
|
102 |
+
|
103 |
}
|
modules/gadsense/includes/class-network-adsense.php
CHANGED
@@ -55,6 +55,15 @@ class Advanced_Ads_Network_Adsense extends Advanced_Ads_Ad_Network{
|
|
55 |
$section_id
|
56 |
);
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
// add setting field for adsense limit
|
59 |
// deprecated of January, 2019; will be removed one year later
|
60 |
$limit_per_page = $this->data->get_limit_per_page();
|
@@ -156,6 +165,19 @@ class Advanced_Ads_Network_Adsense extends Advanced_Ads_Ad_Network{
|
|
156 |
<?php
|
157 |
}
|
158 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
/**
|
160 |
* render page-level ads setting
|
161 |
*
|
55 |
$section_id
|
56 |
);
|
57 |
|
58 |
+
// hide AdSense stats in the backend
|
59 |
+
add_settings_field(
|
60 |
+
'hide_stats',
|
61 |
+
__( 'Disable stats', 'advanced-ads' ),
|
62 |
+
array( $this, 'render_settings_adsense_hide_stats' ),
|
63 |
+
$hook,
|
64 |
+
$section_id
|
65 |
+
);
|
66 |
+
|
67 |
// add setting field for adsense limit
|
68 |
// deprecated of January, 2019; will be removed one year later
|
69 |
$limit_per_page = $this->data->get_limit_per_page();
|
165 |
<?php
|
166 |
}
|
167 |
|
168 |
+
/**
|
169 |
+
* Render setting to hide AdSense stats showing in the backend
|
170 |
+
*/
|
171 |
+
public function render_settings_adsense_hide_stats() {
|
172 |
+
$options = $this->data->get_options();
|
173 |
+
$hide_stats = isset( $options['hide-stats'] )? true : false; ?>
|
174 |
+
<label>
|
175 |
+
<input type="checkbox" name="<?php echo GADSENSE_OPT_NAME; ?>[hide-stats]" value="1" <?php checked( $hide_stats ); ?> />
|
176 |
+
<?php esc_html_e( 'Enable this option to stop loading stats from AdSense into your WordPress backend.', 'advanced-ads' ); ?>
|
177 |
+
</label>
|
178 |
+
<?php
|
179 |
+
}
|
180 |
+
|
181 |
/**
|
182 |
* render page-level ads setting
|
183 |
*
|
public/views/ad-edit-bar.php
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
<div class="advads-edit-bar advads-edit-appear">
|
2 |
-
<a href="<?php echo get_edit_post_link( $this->id ); ?>" class="advads-edit-button" title="<?php esc_attr_e( strip_tags( $this->title ) ); ?>"><span class="dashicons dashicons-edit"></span></a>
|
3 |
</div>
|
1 |
<div class="advads-edit-bar advads-edit-appear">
|
2 |
+
<a href="<?php echo get_edit_post_link( $this->id ); ?>" class="advads-edit-button" title="<?php esc_attr_e( strip_tags( $this->title ) ); ?>" rel="nofollow"><span class="dashicons dashicons-edit"></span></a>
|
3 |
</div>
|
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.14.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -303,6 +303,13 @@ Yes. Advanced Ads is based on WordPress standards and therefore easily customiza
|
|
303 |
|
304 |
== Changelog ==
|
305 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
306 |
= 1.14.9 =
|
307 |
|
308 |
* fixed deprecated notices causing a warning
|
5 |
Requires at least: 4.6
|
6 |
Tested up to: 5.2
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 1.14.10
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
303 |
|
304 |
== Changelog ==
|
305 |
|
306 |
+
= 1.14.10 =
|
307 |
+
|
308 |
+
* creating unique slugs for the ad post type in order to prevent conflicts like found with Beaver Builder
|
309 |
+
* added option to disable AdSense stats in the backend
|
310 |
+
* fixed conflicts when $ (jQuery) was not available
|
311 |
+
* fixed potential JS conflict in Wizard script
|
312 |
+
|
313 |
= 1.14.9 =
|
314 |
|
315 |
* fixed deprecated notices causing a warning
|