Advanced Ads - Version 1.4.1

Version Description

  • COOL: limitation of AdSense ads prevents you from breaking the AdSense terms of service (can be disabled)
  • added option to change the content injection priority
  • load ad output for content injection only, if injection is possible
  • added hook advanced-ads-settings-init to add new settings
  • renamed multiple hooks in the AdSense module
  • updated German translation
Download this release

Release Info

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

Code changes from version 1.4.0 to 1.4.1

admin/class-advanced-ads-admin.php CHANGED
@@ -403,7 +403,7 @@ class Advanced_Ads_Admin {
403
  return;
404
  }
405
  $ad = new Advads_Ad($post->ID);
406
-
407
  require_once('views/ad_info.php');
408
  }
409
 
@@ -609,7 +609,7 @@ class Advanced_Ads_Admin {
609
  $hook,
610
  'advanced_ads_setting_section'
611
  );
612
- // add setting fields for advanced ads
613
  add_settings_field(
614
  'activate-advanced-js',
615
  __('Use advanced JavaScript', ADVADS_SLUG),
@@ -617,6 +617,17 @@ class Advanced_Ads_Admin {
617
  $hook,
618
  'advanced_ads_setting_section'
619
  );
 
 
 
 
 
 
 
 
 
 
 
620
  }
621
 
622
  /**
@@ -688,6 +699,19 @@ class Advanced_Ads_Admin {
688
  echo '<p class="description">'. sprintf(__('Only enable this if you can and want to use the advanced JavaScript functions described <a href="%s">here</a>.', ADVADS_SLUG), 'http://wpadvancedads.com/javascript-functions/') .'</p>';
689
  }
690
 
 
 
 
 
 
 
 
 
 
 
 
 
 
691
  /**
692
  * add heading for extra column of ads list
693
  * remove the date column
@@ -751,9 +775,9 @@ class Advanced_Ads_Admin {
751
  if (!empty($ad->width) || !empty($ad->height)) {
752
  $size = sprintf('%d x %d', $ad->width, $ad->height);
753
  }
754
-
755
- $size = apply_filters('advanced-ads-ad-size', $size, $ad);
756
-
757
  $view = plugin_dir_path(__FILE__) . 'views/ad_list_details_column.php';
758
  if (is_file($view)) {
759
  require( $view );
403
  return;
404
  }
405
  $ad = new Advads_Ad($post->ID);
406
+
407
  require_once('views/ad_info.php');
408
  }
409
 
609
  $hook,
610
  'advanced_ads_setting_section'
611
  );
612
+ // add setting fields for advanced js
613
  add_settings_field(
614
  'activate-advanced-js',
615
  __('Use advanced JavaScript', ADVADS_SLUG),
617
  $hook,
618
  'advanced_ads_setting_section'
619
  );
620
+ // add setting fields for content injection priority
621
+ add_settings_field(
622
+ 'content-injection-priority',
623
+ __('Priority of content injection filter', ADVADS_SLUG),
624
+ array($this, 'render_settings_content_injection_priority'),
625
+ $hook,
626
+ 'advanced_ads_setting_section'
627
+ );
628
+
629
+ // hook for additional settings from add-ons
630
+ do_action('advanced-ads-settings-init', $hook);
631
  }
632
 
633
  /**
699
  echo '<p class="description">'. sprintf(__('Only enable this if you can and want to use the advanced JavaScript functions described <a href="%s">here</a>.', ADVADS_SLUG), 'http://wpadvancedads.com/javascript-functions/') .'</p>';
700
  }
701
 
702
+ /**
703
+ * render setting for content injection priority
704
+ *
705
+ * @since 1.4.1
706
+ */
707
+ public function render_settings_content_injection_priority(){
708
+ $options = Advanced_Ads::get_instance()->options();
709
+ $priority = (!empty($options['content-injection-priority'])) ? absint($options['content-injection-priority']) : 100;
710
+
711
+ echo '<input id="advanced-ads-content-injection-priority" type="number" value="'.$priority.'" name="'.ADVADS_SLUG.'[content-injection-priority]" size="3"/>';
712
+ echo '<p class="description">'. __('Play with this value in order to change the priority of the injected ads compared to other auto injected elements in the post content.', ADVADS_SLUG) .'</p>';
713
+ }
714
+
715
  /**
716
  * add heading for extra column of ads list
717
  * remove the date column
775
  if (!empty($ad->width) || !empty($ad->height)) {
776
  $size = sprintf('%d x %d', $ad->width, $ad->height);
777
  }
778
+
779
+ $size = apply_filters('advanced-ads-list-ad-size', $size, $ad);
780
+
781
  $view = plugin_dir_path(__FILE__) . 'views/ad_list_details_column.php';
782
  if (is_file($view)) {
783
  require( $view );
advanced-ads.php CHANGED
@@ -12,7 +12,7 @@
12
  * Plugin Name: Advanced Ads
13
  * Plugin URI: http://wpadvancedads.com
14
  * Description: Manage and optimize your ads in WordPress
15
- * Version: 1.4.0
16
  * Author: Thomas Maier
17
  * Author URI: http://webgilde.com
18
  * Text Domain: advanced-ads
12
  * Plugin Name: Advanced Ads
13
  * Plugin URI: http://wpadvancedads.com
14
  * Description: Manage and optimize your ads in WordPress
15
+ * Version: 1.4.1
16
  * Author: Thomas Maier
17
  * Author URI: http://webgilde.com
18
  * Text Domain: advanced-ads
languages/advanced-ads-de_DE.mo CHANGED
Binary file
languages/advanced-ads-de_DE.po CHANGED
@@ -1,9 +1,9 @@
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: Advanced Ads v1.3.18\n"
4
  "Report-Msgid-Bugs-To: http://wordpress.org/plugins/plugin-name\n"
5
  "POT-Creation-Date: 2015-01-28 20:07+0100\n"
6
- "PO-Revision-Date: 2015-02-23 09:59:53+0000\n"
7
  "Last-Translator: Thomas Maier <post@webzunft.de>\n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
@@ -38,7 +38,7 @@ msgstr "Advanced Ads"
38
  #: admin/views/overview.php:12
39
  #: admin/views/placements.php:91
40
  #: classes/widget.php:66
41
- #: public/class-advanced-ads.php:547
42
  #@ advanced-ads
43
  msgid "Ads"
44
  msgstr "Anzeigen"
@@ -52,7 +52,7 @@ msgstr "Anzeigen-Gruppen"
52
 
53
  #: admin/class-advanced-ads-admin.php:200
54
  #: admin/views/overview.php:40
55
- #: public/class-advanced-ads.php:521
56
  #@ advanced-ads
57
  msgid "Groups"
58
  msgstr "Gruppen"
@@ -153,73 +153,73 @@ msgstr "Verstecke Anzeigen vor eingeloggten Benutzern"
153
  msgid "Use advanced JavaScript"
154
  msgstr "Advanced-JavaScript benutzen"
155
 
156
- #: admin/class-advanced-ads-admin.php:662
157
  #@ advanced-ads
158
  msgid "(display to all)"
159
  msgstr "(für alle sichtbar)"
160
 
161
- #: admin/class-advanced-ads-admin.php:663
162
  #@ advanced-ads
163
  msgid "Subscriber"
164
  msgstr "Abonnent"
165
 
166
- #: admin/class-advanced-ads-admin.php:664
167
  #@ advanced-ads
168
  msgid "Contributor"
169
  msgstr "Mitarbeiter"
170
 
171
- #: admin/class-advanced-ads-admin.php:665
172
  #@ advanced-ads
173
  msgid "Author"
174
  msgstr "Autor"
175
 
176
- #: admin/class-advanced-ads-admin.php:666
177
  #@ advanced-ads
178
  msgid "Editor"
179
  msgstr "Redakteur"
180
 
181
- #: admin/class-advanced-ads-admin.php:667
182
  #@ advanced-ads
183
  msgid "Admin"
184
  msgstr "Admin"
185
 
186
- #: admin/class-advanced-ads-admin.php:675
187
  #@ advanced-ads
188
  msgid "Choose the lowest role a user must have in order to not see any ads."
189
  msgstr "Wählen Sie die niedrigste Rolle die ein Benutzer haben muss um keine Anzeigen zu sehen."
190
 
191
- #: admin/class-advanced-ads-admin.php:688
192
  #, php-format
193
  #@ advanced-ads
194
  msgid "Only enable this if you can and want to use the advanced JavaScript functions described <a href=\"%s\">here</a>."
195
  msgstr "Aktivieren Sie dies nur, wenn Sie die erweiterten und <a href=\"%s\">hier</a> beschriebenen Advanced-JavaScript-Funktionen verwenden können und wollen."
196
 
197
- #: admin/class-advanced-ads-admin.php:705
198
  #@ advanced-ads
199
  msgid "Ad Details"
200
  msgstr "Anzeigeneinstellungen"
201
 
202
- #: admin/class-advanced-ads-admin.php:779
203
  #@ advanced-ads
204
  msgid "Ad Settings"
205
  msgstr "Anzeigen-Einstellungen"
206
 
207
- #: admin/class-advanced-ads-admin.php:854
208
  #@ advanced-ads
209
  msgid "Ads Dashboard"
210
  msgstr "Anzeigen-Dashboard"
211
 
212
- #: admin/class-advanced-ads-admin.php:865
213
  #@ default
214
  msgid "Tutorials and News"
215
  msgstr "Anleitungen und Neuigkeiten"
216
 
217
- #: admin/class-advanced-ads-admin.php:886
218
  #@ advanced-ads
219
  msgid "plugin manual and homepage"
220
  msgstr "Plugin-Anleitung und Homepage"
221
 
222
- #: admin/class-advanced-ads-admin.php:890
223
  #@ advanced-ads
224
  msgid "From the ad optimization universe"
225
  msgstr "Neues aus dem Anzeigen-Universum"
@@ -238,7 +238,7 @@ msgstr "#8220;%s&#8221; bearbeiten"
238
 
239
  #: admin/includes/class-ad-groups-list-table.php:99
240
  #: admin/includes/class-ad-groups-list-table.php:167
241
- #: public/class-advanced-ads.php:551
242
  #@ advanced-ads
243
  msgid "Edit"
244
  msgstr "Bearbeiten"
@@ -1392,116 +1392,116 @@ msgstr "Anhang-Seiten"
1392
  msgid "(don't) show on attachment pages"
1393
  msgstr "(Wird nicht) auf Anhang-Seiten angezeigt"
1394
 
1395
- #: public/class-advanced-ads.php:511
1396
  #@ advanced-ads
1397
  msgctxt "ad group general name"
1398
  msgid "Ad Groups"
1399
  msgstr "Anzeigen-Gruppen"
1400
 
1401
- #: public/class-advanced-ads.php:512
1402
  #@ advanced-ads
1403
  msgctxt "ad group singular name"
1404
  msgid "Ad Group"
1405
  msgstr "Anzeigen-Gruppe"
1406
 
1407
- #: public/class-advanced-ads.php:513
1408
  #@ advanced-ads
1409
  msgid "Search Ad Groups"
1410
  msgstr "Anzeigen-Gruppen suchen"
1411
 
1412
- #: public/class-advanced-ads.php:514
1413
  #@ advanced-ads
1414
  msgid "All Ad Groups"
1415
  msgstr "Alle Anzeigen-Gruppen"
1416
 
1417
- #: public/class-advanced-ads.php:515
1418
  #@ advanced-ads
1419
  msgid "Parent Ad Groups"
1420
  msgstr "Parent-Anzeigen-Gruppen"
1421
 
1422
- #: public/class-advanced-ads.php:516
1423
  #@ advanced-ads
1424
  msgid "Parent Ad Groups:"
1425
  msgstr "Parent-Anzeigen-Gruppen"
1426
 
1427
- #: public/class-advanced-ads.php:517
1428
  #@ advanced-ads
1429
  msgid "Edit Ad Group"
1430
  msgstr "Bearbeite Anzeigen-Gruppe"
1431
 
1432
- #: public/class-advanced-ads.php:518
1433
  #@ advanced-ads
1434
  msgid "Update Ad Group"
1435
  msgstr "Aktualisiere Anzeigen-Gruppe"
1436
 
1437
- #: public/class-advanced-ads.php:519
1438
  #@ advanced-ads
1439
  msgid "Add New Ad Group"
1440
  msgstr "Neue Anzeigengruppe hinzufügen"
1441
 
1442
- #: public/class-advanced-ads.php:520
1443
  #@ advanced-ads
1444
  msgid "New Ad Groups Name"
1445
  msgstr "Neuer Anzeigen-Gruppen-Name"
1446
 
1447
- #: public/class-advanced-ads.php:522
1448
  #@ advanced-ads
1449
  msgid "No Ad Group found"
1450
  msgstr "Keine Anzeigen-Gruppe gefunden"
1451
 
1452
- #: public/class-advanced-ads.php:548
1453
- #: public/class-advanced-ads.php:564
1454
  #@ advanced-ads
1455
  msgid "Ad"
1456
  msgstr "Anzeige"
1457
 
1458
- #: public/class-advanced-ads.php:549
1459
- #: public/class-advanced-ads.php:553
1460
  #@ advanced-ads
1461
  msgid "New Ad"
1462
  msgstr "Neue Anzeige"
1463
 
1464
- #: public/class-advanced-ads.php:550
1465
  #@ advanced-ads
1466
  msgid "Add New Ad"
1467
  msgstr "Neue Anzeige hinzufügen"
1468
 
1469
- #: public/class-advanced-ads.php:552
1470
  #@ advanced-ads
1471
  msgid "Edit Ad"
1472
  msgstr "Anzeige bearbeiten"
1473
 
1474
- #: public/class-advanced-ads.php:554
1475
  #@ advanced-ads
1476
  msgid "View"
1477
  msgstr "Ansicht"
1478
 
1479
- #: public/class-advanced-ads.php:555
1480
  #@ advanced-ads
1481
  msgid "View the Ad"
1482
  msgstr "Anzeige ansehen"
1483
 
1484
- #: public/class-advanced-ads.php:556
1485
  #@ advanced-ads
1486
  msgid "Search Ads"
1487
  msgstr "Anzeigen suchen"
1488
 
1489
- #: public/class-advanced-ads.php:557
1490
  #@ advanced-ads
1491
  msgid "No Ads found"
1492
  msgstr "Keine Anzeigen gefunden"
1493
 
1494
- #: public/class-advanced-ads.php:558
1495
  #@ advanced-ads
1496
  msgid "No Ads found in Trash"
1497
  msgstr "Keine Anzeigen im Papierkorb gefunden"
1498
 
1499
- #: public/class-advanced-ads.php:559
1500
  #@ advanced-ads
1501
  msgid "Parent Ad"
1502
  msgstr "Übergeordnete Anzeige"
1503
 
1504
- #: public/class-advanced-ads.php:615
1505
  #, php-format
1506
  #@ advanced-ads
1507
  msgid "Advanced Ads Error: %s"
@@ -1546,18 +1546,12 @@ msgstr ""
1546
  msgid "http://webgilde.com"
1547
  msgstr ""
1548
 
1549
- #. translators: plugin header field 'Version'
1550
- #: advanced-ads.php:0
1551
- #@ advanced-ads
1552
- msgid "1.3.18"
1553
- msgstr ""
1554
-
1555
  #: classes/ad_type_plain.php:70
1556
  #@ advanced-ads
1557
  msgid "Execute PHP code (wrapped in <code>&lt;?php ?&gt;</code>)"
1558
  msgstr "PHP Code ausführen (in <code>&lt;?php ?&gt;</code> tags)"
1559
 
1560
- #: admin/class-advanced-ads-admin.php:875
1561
  #, php-format
1562
  #@ advanced-ads
1563
  msgid "%d ads – <a href=\"%s\">manage</a> - <a href=\"%s\">new</a>"
@@ -1579,22 +1573,22 @@ msgstr "Die Anzeigeneinstellungen konnten nicht aus dem Code gewonnen werden."
1579
  msgid "Warning : The AdSense account from this code does not match the one set with the Advanced Ads Plugin. This ad might cause troubles when used in the front end."
1580
  msgstr "Achtung : Der AdSense-Account aus dem Code entspricht nicht dem in den Einstellungen. Es kann zu Problemen bei der Anzeige kommen."
1581
 
1582
- #: modules/gadsense/admin/class-gadsense-admin.php:89
1583
  #@ advanced-ads
1584
  msgid "Data updated"
1585
  msgstr "Daten aktualisiert"
1586
 
1587
- #: modules/gadsense/admin/class-gadsense-admin.php:94
1588
  #@ advanced-ads
1589
  msgid "The Publisher ID has an incorrect format. (must start with \"pub-\")"
1590
  msgstr "Die Publisher-ID hat ein falsches Format. Sie muss mit \\\"pub-\\\" beginnen."
1591
 
1592
- #: modules/gadsense/admin/views/admin-page.php:20
1593
  #@ advanced-ads
1594
  msgid "Account ID"
1595
  msgstr "Account-ID"
1596
 
1597
- #: modules/gadsense/admin/views/admin-page.php:22
1598
  #@ advanced-ads
1599
  msgid "Your AdSense Publisher ID <em>(pub-xxxxxxxxxxxxxx)</em>"
1600
  msgstr "AdSense Publisher-ID <em>(pub-xxxxxxxxxxxxxx)</em>"
@@ -1660,7 +1654,7 @@ msgstr "AdSense"
1660
  msgid "Use ads from your Google AdSense account"
1661
  msgstr "Anzeigen aus dem Google AdSense Konto verwenden"
1662
 
1663
- #: modules/gadsense/includes/class-gadsense-data.php:34
1664
  #@ advanced-ads
1665
  msgid "Auto"
1666
  msgstr "automatisch"
@@ -1675,8 +1669,41 @@ msgstr " am "
1675
  msgid "Warning : You have not yet entered an AdSense account ID. The plugin won’t work without that"
1676
  msgstr "Achtung: Bitte trage noch eine AdSense-Account-ID in den Einstellungen ein."
1677
 
1678
- #: modules/gadsense/admin/views/admin-page.php:24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1679
  #@ advanced-ads
1680
- msgid "Save AdSense ID"
1681
- msgstr "AdSense-ID speichern"
1682
 
1
  msgid ""
2
  msgstr ""
3
+ "Project-Id-Version: Advanced Ads v1.4.1\n"
4
  "Report-Msgid-Bugs-To: http://wordpress.org/plugins/plugin-name\n"
5
  "POT-Creation-Date: 2015-01-28 20:07+0100\n"
6
+ "PO-Revision-Date: 2015-03-03 17:06:25+0000\n"
7
  "Last-Translator: Thomas Maier <post@webzunft.de>\n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
38
  #: admin/views/overview.php:12
39
  #: admin/views/placements.php:91
40
  #: classes/widget.php:66
41
+ #: public/class-advanced-ads.php:550
42
  #@ advanced-ads
43
  msgid "Ads"
44
  msgstr "Anzeigen"
52
 
53
  #: admin/class-advanced-ads-admin.php:200
54
  #: admin/views/overview.php:40
55
+ #: public/class-advanced-ads.php:524
56
  #@ advanced-ads
57
  msgid "Groups"
58
  msgstr "Gruppen"
153
  msgid "Use advanced JavaScript"
154
  msgstr "Advanced-JavaScript benutzen"
155
 
156
+ #: admin/class-advanced-ads-admin.php:673
157
  #@ advanced-ads
158
  msgid "(display to all)"
159
  msgstr "(für alle sichtbar)"
160
 
161
+ #: admin/class-advanced-ads-admin.php:674
162
  #@ advanced-ads
163
  msgid "Subscriber"
164
  msgstr "Abonnent"
165
 
166
+ #: admin/class-advanced-ads-admin.php:675
167
  #@ advanced-ads
168
  msgid "Contributor"
169
  msgstr "Mitarbeiter"
170
 
171
+ #: admin/class-advanced-ads-admin.php:676
172
  #@ advanced-ads
173
  msgid "Author"
174
  msgstr "Autor"
175
 
176
+ #: admin/class-advanced-ads-admin.php:677
177
  #@ advanced-ads
178
  msgid "Editor"
179
  msgstr "Redakteur"
180
 
181
+ #: admin/class-advanced-ads-admin.php:678
182
  #@ advanced-ads
183
  msgid "Admin"
184
  msgstr "Admin"
185
 
186
+ #: admin/class-advanced-ads-admin.php:686
187
  #@ advanced-ads
188
  msgid "Choose the lowest role a user must have in order to not see any ads."
189
  msgstr "Wählen Sie die niedrigste Rolle die ein Benutzer haben muss um keine Anzeigen zu sehen."
190
 
191
+ #: admin/class-advanced-ads-admin.php:699
192
  #, php-format
193
  #@ advanced-ads
194
  msgid "Only enable this if you can and want to use the advanced JavaScript functions described <a href=\"%s\">here</a>."
195
  msgstr "Aktivieren Sie dies nur, wenn Sie die erweiterten und <a href=\"%s\">hier</a> beschriebenen Advanced-JavaScript-Funktionen verwenden können und wollen."
196
 
197
+ #: admin/class-advanced-ads-admin.php:729
198
  #@ advanced-ads
199
  msgid "Ad Details"
200
  msgstr "Anzeigeneinstellungen"
201
 
202
+ #: admin/class-advanced-ads-admin.php:803
203
  #@ advanced-ads
204
  msgid "Ad Settings"
205
  msgstr "Anzeigen-Einstellungen"
206
 
207
+ #: admin/class-advanced-ads-admin.php:878
208
  #@ advanced-ads
209
  msgid "Ads Dashboard"
210
  msgstr "Anzeigen-Dashboard"
211
 
212
+ #: admin/class-advanced-ads-admin.php:889
213
  #@ default
214
  msgid "Tutorials and News"
215
  msgstr "Anleitungen und Neuigkeiten"
216
 
217
+ #: admin/class-advanced-ads-admin.php:910
218
  #@ advanced-ads
219
  msgid "plugin manual and homepage"
220
  msgstr "Plugin-Anleitung und Homepage"
221
 
222
+ #: admin/class-advanced-ads-admin.php:914
223
  #@ advanced-ads
224
  msgid "From the ad optimization universe"
225
  msgstr "Neues aus dem Anzeigen-Universum"
238
 
239
  #: admin/includes/class-ad-groups-list-table.php:99
240
  #: admin/includes/class-ad-groups-list-table.php:167
241
+ #: public/class-advanced-ads.php:554
242
  #@ advanced-ads
243
  msgid "Edit"
244
  msgstr "Bearbeiten"
1392
  msgid "(don't) show on attachment pages"
1393
  msgstr "(Wird nicht) auf Anhang-Seiten angezeigt"
1394
 
1395
+ #: public/class-advanced-ads.php:514
1396
  #@ advanced-ads
1397
  msgctxt "ad group general name"
1398
  msgid "Ad Groups"
1399
  msgstr "Anzeigen-Gruppen"
1400
 
1401
+ #: public/class-advanced-ads.php:515
1402
  #@ advanced-ads
1403
  msgctxt "ad group singular name"
1404
  msgid "Ad Group"
1405
  msgstr "Anzeigen-Gruppe"
1406
 
1407
+ #: public/class-advanced-ads.php:516
1408
  #@ advanced-ads
1409
  msgid "Search Ad Groups"
1410
  msgstr "Anzeigen-Gruppen suchen"
1411
 
1412
+ #: public/class-advanced-ads.php:517
1413
  #@ advanced-ads
1414
  msgid "All Ad Groups"
1415
  msgstr "Alle Anzeigen-Gruppen"
1416
 
1417
+ #: public/class-advanced-ads.php:518
1418
  #@ advanced-ads
1419
  msgid "Parent Ad Groups"
1420
  msgstr "Parent-Anzeigen-Gruppen"
1421
 
1422
+ #: public/class-advanced-ads.php:519
1423
  #@ advanced-ads
1424
  msgid "Parent Ad Groups:"
1425
  msgstr "Parent-Anzeigen-Gruppen"
1426
 
1427
+ #: public/class-advanced-ads.php:520
1428
  #@ advanced-ads
1429
  msgid "Edit Ad Group"
1430
  msgstr "Bearbeite Anzeigen-Gruppe"
1431
 
1432
+ #: public/class-advanced-ads.php:521
1433
  #@ advanced-ads
1434
  msgid "Update Ad Group"
1435
  msgstr "Aktualisiere Anzeigen-Gruppe"
1436
 
1437
+ #: public/class-advanced-ads.php:522
1438
  #@ advanced-ads
1439
  msgid "Add New Ad Group"
1440
  msgstr "Neue Anzeigengruppe hinzufügen"
1441
 
1442
+ #: public/class-advanced-ads.php:523
1443
  #@ advanced-ads
1444
  msgid "New Ad Groups Name"
1445
  msgstr "Neuer Anzeigen-Gruppen-Name"
1446
 
1447
+ #: public/class-advanced-ads.php:525
1448
  #@ advanced-ads
1449
  msgid "No Ad Group found"
1450
  msgstr "Keine Anzeigen-Gruppe gefunden"
1451
 
1452
+ #: public/class-advanced-ads.php:551
1453
+ #: public/class-advanced-ads.php:567
1454
  #@ advanced-ads
1455
  msgid "Ad"
1456
  msgstr "Anzeige"
1457
 
1458
+ #: public/class-advanced-ads.php:552
1459
+ #: public/class-advanced-ads.php:556
1460
  #@ advanced-ads
1461
  msgid "New Ad"
1462
  msgstr "Neue Anzeige"
1463
 
1464
+ #: public/class-advanced-ads.php:553
1465
  #@ advanced-ads
1466
  msgid "Add New Ad"
1467
  msgstr "Neue Anzeige hinzufügen"
1468
 
1469
+ #: public/class-advanced-ads.php:555
1470
  #@ advanced-ads
1471
  msgid "Edit Ad"
1472
  msgstr "Anzeige bearbeiten"
1473
 
1474
+ #: public/class-advanced-ads.php:557
1475
  #@ advanced-ads
1476
  msgid "View"
1477
  msgstr "Ansicht"
1478
 
1479
+ #: public/class-advanced-ads.php:558
1480
  #@ advanced-ads
1481
  msgid "View the Ad"
1482
  msgstr "Anzeige ansehen"
1483
 
1484
+ #: public/class-advanced-ads.php:559
1485
  #@ advanced-ads
1486
  msgid "Search Ads"
1487
  msgstr "Anzeigen suchen"
1488
 
1489
+ #: public/class-advanced-ads.php:560
1490
  #@ advanced-ads
1491
  msgid "No Ads found"
1492
  msgstr "Keine Anzeigen gefunden"
1493
 
1494
+ #: public/class-advanced-ads.php:561
1495
  #@ advanced-ads
1496
  msgid "No Ads found in Trash"
1497
  msgstr "Keine Anzeigen im Papierkorb gefunden"
1498
 
1499
+ #: public/class-advanced-ads.php:562
1500
  #@ advanced-ads
1501
  msgid "Parent Ad"
1502
  msgstr "Übergeordnete Anzeige"
1503
 
1504
+ #: public/class-advanced-ads.php:618
1505
  #, php-format
1506
  #@ advanced-ads
1507
  msgid "Advanced Ads Error: %s"
1546
  msgid "http://webgilde.com"
1547
  msgstr ""
1548
 
 
 
 
 
 
 
1549
  #: classes/ad_type_plain.php:70
1550
  #@ advanced-ads
1551
  msgid "Execute PHP code (wrapped in <code>&lt;?php ?&gt;</code>)"
1552
  msgstr "PHP Code ausführen (in <code>&lt;?php ?&gt;</code> tags)"
1553
 
1554
+ #: admin/class-advanced-ads-admin.php:899
1555
  #, php-format
1556
  #@ advanced-ads
1557
  msgid "%d ads – <a href=\"%s\">manage</a> - <a href=\"%s\">new</a>"
1573
  msgid "Warning : The AdSense account from this code does not match the one set with the Advanced Ads Plugin. This ad might cause troubles when used in the front end."
1574
  msgstr "Achtung : Der AdSense-Account aus dem Code entspricht nicht dem in den Einstellungen. Es kann zu Problemen bei der Anzeige kommen."
1575
 
1576
+ #: modules/gadsense/admin/class-gadsense-admin.php:87
1577
  #@ advanced-ads
1578
  msgid "Data updated"
1579
  msgstr "Daten aktualisiert"
1580
 
1581
+ #: modules/gadsense/admin/class-gadsense-admin.php:93
1582
  #@ advanced-ads
1583
  msgid "The Publisher ID has an incorrect format. (must start with \"pub-\")"
1584
  msgstr "Die Publisher-ID hat ein falsches Format. Sie muss mit \\\"pub-\\\" beginnen."
1585
 
1586
+ #: modules/gadsense/admin/views/admin-page.php:21
1587
  #@ advanced-ads
1588
  msgid "Account ID"
1589
  msgstr "Account-ID"
1590
 
1591
+ #: modules/gadsense/admin/views/admin-page.php:23
1592
  #@ advanced-ads
1593
  msgid "Your AdSense Publisher ID <em>(pub-xxxxxxxxxxxxxx)</em>"
1594
  msgstr "AdSense Publisher-ID <em>(pub-xxxxxxxxxxxxxx)</em>"
1654
  msgid "Use ads from your Google AdSense account"
1655
  msgstr "Anzeigen aus dem Google AdSense Konto verwenden"
1656
 
1657
+ #: modules/gadsense/includes/class-gadsense-data.php:39
1658
  #@ advanced-ads
1659
  msgid "Auto"
1660
  msgstr "automatisch"
1669
  msgid "Warning : You have not yet entered an AdSense account ID. The plugin won’t work without that"
1670
  msgstr "Achtung: Bitte trage noch eine AdSense-Account-ID in den Einstellungen ein."
1671
 
1672
+ #: admin/class-advanced-ads-admin.php:623
1673
+ #@ advanced-ads
1674
+ msgid "Priority of content injection filter"
1675
+ msgstr "Priorität des Filters für Anzeigen in Beiträgen"
1676
+
1677
+ #: admin/class-advanced-ads-admin.php:712
1678
+ #@ advanced-ads
1679
+ msgid "Play with this value in order to change the priority of the injected ads compared to other auto injected elements in the post content."
1680
+ msgstr "Ändere diesen Wert, wenn du die Reihenfolge der automatisch im Beitrag eingefügten Anzeige im Vergleich zu anderen Elementen ändern willst."
1681
+
1682
+ #. translators: plugin header field 'Version'
1683
+ #: advanced-ads.php:0
1684
+ #@ advanced-ads
1685
+ msgid "1.4.1"
1686
+ msgstr ""
1687
+
1688
+ #: modules/gadsense/admin/views/admin-page.php:27
1689
+ #, php-format
1690
+ #@ advanced-ads
1691
+ msgid "Limit to %d AdSense ads"
1692
+ msgstr "Begrenzung auf %d AdSense Anzeigen"
1693
+
1694
+ #: modules/gadsense/admin/views/admin-page.php:32
1695
+ #, php-format
1696
+ #@ advanced-ads
1697
+ msgid "Currently, Google AdSense <a target=\"_blank\" href=\"%s\" title=\"Terms Of Service\">TOS</a> imposes a limit of %d display ads per page. You can disable this limitation at your own risks."
1698
+ msgstr "Die Google AdSense <a target='_blank' href='%s' title='Terms Of Service'>Bedingungen</a> erlauben maximal %d Banner pro Seite. Deaktiviere diese Limitierung nur, wenn du weißt, was du tust."
1699
+
1700
+ #: modules/gadsense/admin/views/admin-page.php:35
1701
+ #@ advanced-ads
1702
+ msgid "Notice: Advanced Ads only considers the AdSense ad type for this limit."
1703
+ msgstr "Beachte: Für die Prüfung des Limits werden nur die Anzeigen herangezogen, die den AdSense-Anzeigentyp haben."
1704
+
1705
+ #: modules/gadsense/admin/views/admin-page.php:38
1706
  #@ advanced-ads
1707
+ msgid "Save AdSense Settings"
1708
+ msgstr "AdSense Einstellungen speichern"
1709
 
modules/gadsense/admin/class-gadsense-admin.php CHANGED
@@ -18,7 +18,7 @@ if (!class_exists('Gadsense_Admin')) {
18
  add_action('admin_enqueue_scripts', array($this, 'enqueue_scripts'));
19
  add_action('admin_print_scripts', array($this, 'print_scripts'));
20
  add_action('admin_init', array($this, 'init'));
21
- add_filter('advanced-ads-ad-size', array($this, 'ad_details_column'), 10, 2);
22
  }
23
 
24
  public function ad_details_column($size, $the_ad) {
@@ -83,18 +83,20 @@ if (!class_exists('Gadsense_Admin')) {
83
  switch ($_POST['gadsense-form-name']) {
84
  case 'cred-form' :
85
  $id = strtolower(trim(wp_unslash($_POST['adsense-id'])));
 
 
 
86
  if (0 === strpos($id, 'pub-')) {
87
  $this->data->set_adsense_id($id);
88
- $_SESSION['gadsense']['admin_notice'] = array(
89
- 'msg' => __('Data updated', ADVADS_SLUG),
90
- 'class' => 'updated',
91
- );
92
  } else {
93
- $_SESSION['gadsense']['admin_notice'] = array(
94
- 'msg' => __('The Publisher ID has an incorrect format. (must start with "pub-")', ADVADS_SLUG),
95
- 'class' => 'error',
96
- );
97
  }
 
 
 
 
98
  break;
99
  default :
100
  }
@@ -120,7 +122,7 @@ if (!class_exists('Gadsense_Admin')) {
120
  );
121
 
122
  // Allow modifications of script files to enqueue
123
- $scripts = apply_filters('gadsense_ad_param_script', $scripts);
124
 
125
  foreach ($scripts as $handle => $value) {
126
  if (empty($handle)) {
@@ -138,7 +140,7 @@ if (!class_exists('Gadsense_Admin')) {
138
  $styles = array();
139
 
140
  // Allow modifications of default style files to enqueue
141
- $styles = apply_filters('gadsense_ad_param_style', $styles);
142
 
143
  foreach ($styles as $handle => $value) {
144
  if (!isset($value['path']) ||
18
  add_action('admin_enqueue_scripts', array($this, 'enqueue_scripts'));
19
  add_action('admin_print_scripts', array($this, 'print_scripts'));
20
  add_action('admin_init', array($this, 'init'));
21
+ add_filter('advanced-ads-list-ad-size', array($this, 'ad_details_column'), 10, 2);
22
  }
23
 
24
  public function ad_details_column($size, $the_ad) {
83
  switch ($_POST['gadsense-form-name']) {
84
  case 'cred-form' :
85
  $id = strtolower(trim(wp_unslash($_POST['adsense-id'])));
86
+ $limit = (isset($_POST['limit-per-page']))? true : false;
87
+ $msg = __('Data updated', ADVADS_SLUG);
88
+ $css = 'updated';
89
  if (0 === strpos($id, 'pub-')) {
90
  $this->data->set_adsense_id($id);
91
+ $this->data->set_limit_per_page($limit);
 
 
 
92
  } else {
93
+ $msg = __('The Publisher ID has an incorrect format. (must start with "pub-")', ADVADS_SLUG);
94
+ $css = 'error';
 
 
95
  }
96
+ $_SESSION['gadsense']['admin_notice'] = array(
97
+ 'msg' => $msg,
98
+ 'class' => $css,
99
+ );
100
  break;
101
  default :
102
  }
122
  );
123
 
124
  // Allow modifications of script files to enqueue
125
+ $scripts = apply_filters('advanced-ads-gadsense-ad-param-script', $scripts);
126
 
127
  foreach ($scripts as $handle => $value) {
128
  if (empty($handle)) {
140
  $styles = array();
141
 
142
  // Allow modifications of default style files to enqueue
143
+ $styles = apply_filters('advanced-ads-gadsense-ad-param-style', $styles);
144
 
145
  foreach ($styles as $handle => $value) {
146
  if (!isset($value['path']) ||
modules/gadsense/admin/views/admin-page.php CHANGED
@@ -3,6 +3,7 @@ if (!defined('WPINC')) {
3
  die;
4
  }
5
  $adsense_id = $this->data->get_adsense_id();
 
6
  ?>
7
  <h3>Google AdSense</h3>
8
  <?php if (isset($_SESSION['gadsense']['admin_notice'])) : ?>
@@ -21,7 +22,21 @@ $adsense_id = $this->data->get_adsense_id();
21
  <input type="text" name="adsense-id" id="adsense-id" size="32" value="<?php echo $adsense_id; ?>" /></label>
22
  <p class="description"><?php _e('Your AdSense Publisher ID <em>(pub-xxxxxxxxxxxxxx)</em>', ADVADS_SLUG) ?></p>
23
  <br />
24
- <input type="submit" class="button button-primary" value="<?php _e('Save AdSense ID', ADVADS_SLUG); ?>" />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  </form>
26
  <br />
27
  <hr />
3
  die;
4
  }
5
  $adsense_id = $this->data->get_adsense_id();
6
+ $limit_per_page = $this->data->get_limit_per_page();
7
  ?>
8
  <h3>Google AdSense</h3>
9
  <?php if (isset($_SESSION['gadsense']['admin_notice'])) : ?>
22
  <input type="text" name="adsense-id" id="adsense-id" size="32" value="<?php echo $adsense_id; ?>" /></label>
23
  <p class="description"><?php _e('Your AdSense Publisher ID <em>(pub-xxxxxxxxxxxxxx)</em>', ADVADS_SLUG) ?></p>
24
  <br />
25
+ <label>
26
+ <input type="checkbox" name="limit-per-page" value="1" <?php checked($limit_per_page); ?> />
27
+ <?php printf(__('Limit to %d AdSense ads', ADVADS_SLUG), 3); ?>
28
+ </label>
29
+ <p class="description">
30
+ <?php
31
+ printf(
32
+ __('Currently, Google AdSense <a target="_blank" href="%s" title="Terms Of Service">TOS</a> imposes a limit of %d display ads per page. You can disable this limitation at your own risks.', ADVADS_SLUG),
33
+ esc_url('https://www.google.com/adsense/terms'), 3
34
+ ); ?><br/><?php
35
+ _e('Notice: Advanced Ads only considers the AdSense ad type for this limit.', ADVADS_SLUG); ?>
36
+ </p>
37
+ <p>
38
+ <input type="submit" class="button button-primary" value="<?php _e('Save AdSense Settings', ADVADS_SLUG); ?>" />
39
+ </p>
40
  </form>
41
  <br />
42
  <hr />
modules/gadsense/admin/views/adsense-ad-parameters.php CHANGED
@@ -48,7 +48,7 @@ if ($is_responsive) {
48
  </select>
49
  </label>
50
  </p>
51
- <?php do_action('gadsense_ad_param_extra_template', $extra_params, $content); ?>
52
  </div><!-- #adsense-new-add-div-default -->
53
  <div id="pastecode-div" style="display: none;">
54
  <div id="pastecode-container">
48
  </select>
49
  </label>
50
  </p>
51
+ <?php do_action('advanced-ads-gadsense-extra-ad-param', $extra_params, $content); ?>
52
  </div><!-- #adsense-new-add-div-default -->
53
  <div id="pastecode-div" style="display: none;">
54
  <div id="pastecode-container">
modules/gadsense/includes/class-ad-type-adsense.php CHANGED
@@ -82,7 +82,7 @@ class Advads_Ad_Type_Adsense extends Advads_Ad_Type_Abstract {
82
  // Responsive
83
  $unit_resize = (isset($content->resize)) ? $content->resize : 'auto';
84
  if ('auto' != $unit_resize) {
85
- $extra_params = apply_filters('gadsense_ad_param_data', $extra_params, $content, $ad);
86
  }
87
  }
88
  if (!empty($pub_id)) {
@@ -97,9 +97,9 @@ class Advads_Ad_Type_Adsense extends Advads_Ad_Type_Abstract {
97
  * variable (which is the case for a new ad).
98
  *
99
  * Inclusion of .js and .css files for the ad creation/editon page are done by another hook. See
100
- * 'gadsense_ad_param_script' and 'gadsense_ad_param_style' in "../admin/class-gadsense-admin.php".
101
  */
102
- $template = apply_filters('gadsense_ad_param_template', $default_template, $content);
103
  require($template);
104
  }
105
 
@@ -129,7 +129,8 @@ class Advads_Ad_Type_Adsense extends Advads_Ad_Type_Abstract {
129
  $output = '';
130
  $db = Gadsense_Data::get_instance();
131
  $pub_id = $db->get_adsense_id();
132
-
 
133
  if (!isset($content->unitType) || empty($pub_id))
134
  return $output;
135
  if (!isset($gadsense['google_loaded']) || !$gadsense['google_loaded']) {
@@ -142,10 +143,11 @@ class Advads_Ad_Type_Adsense extends Advads_Ad_Type_Abstract {
142
  } else {
143
  $gadsense['adsense_count'] = 1;
144
  }
145
- /*if (3 < $gadsense['adsense_count']) {
 
146
  // The maximum allowed adSense ad per page count is 3 (according to the current Google AdSense TOS).
147
- return $output;
148
- }*/
149
 
150
  if ('responsive' != $content->unitType) {
151
  $output .= '<ins class="adsbygoogle" ';
@@ -157,14 +159,7 @@ class Advads_Ad_Type_Adsense extends Advads_Ad_Type_Abstract {
157
  $output .= '</script>' . "\n";
158
  } else {
159
  if (!isset($content->resize) || 'auto' == $content->resize) {
160
- $output .= '<ins class="adsbygoogle" ';
161
- $output .= 'style="display:block;"';
162
- $output .= 'data-ad-client="ca-' . $pub_id . '" ' . "\n";
163
- $output .= 'data-ad-slot="' . $content->slotId . '" ' . "\n";
164
- $output .= 'data-ad-format="auto"></ins>' . "\n";
165
- $output .= '<script> ' . "\n";
166
- $output .= '(adsbygoogle = window.adsbygoogle || []).push({}); ' . "\n";
167
- $output .= '</script>' . "\n";
168
  } else {
169
  /**
170
  * At this point, the ad is responsive ($ad->content->unitType == responsive)
@@ -172,11 +167,30 @@ class Advads_Ad_Type_Adsense extends Advads_Ad_Type_Abstract {
172
  * The $output variable already contains the first line which includes "adsbygoogle.js",
173
  * The rest of the output should be appended to it.
174
  */
175
- $output = apply_filters('gadsense_responsive_output', $output, $ad, $pub_id);
 
 
 
 
 
 
 
 
176
  }
177
  }
178
  return $output;
179
  }
 
 
 
 
 
 
 
 
 
 
 
180
 
181
  }
182
 
82
  // Responsive
83
  $unit_resize = (isset($content->resize)) ? $content->resize : 'auto';
84
  if ('auto' != $unit_resize) {
85
+ $extra_params = apply_filters('advanced-ads-gadsense-ad-param-data', $extra_params, $content, $ad);
86
  }
87
  }
88
  if (!empty($pub_id)) {
97
  * variable (which is the case for a new ad).
98
  *
99
  * Inclusion of .js and .css files for the ad creation/editon page are done by another hook. See
100
+ * 'advanced-ads-gadsense-ad-param-script' and 'advanced-ads-gadsense-ad-param-style' in "../admin/class-gadsense-admin.php".
101
  */
102
+ $template = apply_filters('advanced-ads-gadsense-ad-param-template', $default_template, $content);
103
  require($template);
104
  }
105
 
129
  $output = '';
130
  $db = Gadsense_Data::get_instance();
131
  $pub_id = $db->get_adsense_id();
132
+ $limit_per_page = $db->get_limit_per_page();
133
+
134
  if (!isset($content->unitType) || empty($pub_id))
135
  return $output;
136
  if (!isset($gadsense['google_loaded']) || !$gadsense['google_loaded']) {
143
  } else {
144
  $gadsense['adsense_count'] = 1;
145
  }
146
+
147
+ if ($limit_per_page && 3 < $gadsense['adsense_count']) {
148
  // The maximum allowed adSense ad per page count is 3 (according to the current Google AdSense TOS).
149
+ return '';
150
+ }
151
 
152
  if ('responsive' != $content->unitType) {
153
  $output .= '<ins class="adsbygoogle" ';
159
  $output .= '</script>' . "\n";
160
  } else {
161
  if (!isset($content->resize) || 'auto' == $content->resize) {
162
+ $this->append_defaut_responsive_content($output, $pub_id, $content->slotId);
 
 
 
 
 
 
 
163
  } else {
164
  /**
165
  * At this point, the ad is responsive ($ad->content->unitType == responsive)
167
  * The $output variable already contains the first line which includes "adsbygoogle.js",
168
  * The rest of the output should be appended to it.
169
  */
170
+ $unmodified = $output;
171
+ $output = apply_filters('advanced-ads-gadsense-responsive-output', $output, $ad, $pub_id);
172
+ if ($unmodified == $output) {
173
+ /**
174
+ * If the output has not been modified, perform a default responsive output.
175
+ * A simple did_action check isn't sufficient, some hooks may be attached and fired but didn't touch the output
176
+ */
177
+ $this->append_defaut_responsive_content($output, $pub_id, $content->slotId);
178
+ }
179
  }
180
  }
181
  return $output;
182
  }
183
+
184
+ private function append_defaut_responsive_content(&$output, $pub_id, $slot_id) {
185
+ $output .= '<ins class="adsbygoogle" ';
186
+ $output .= 'style="display:block;"';
187
+ $output .= 'data-ad-client="ca-' . $pub_id . '" ' . "\n";
188
+ $output .= 'data-ad-slot="' . $slot_id . '" ' . "\n";
189
+ $output .= 'data-ad-format="auto"></ins>' . "\n";
190
+ $output .= '<script> ' . "\n";
191
+ $output .= '(adsbygoogle = window.adsbygoogle || []).push({}); ' . "\n";
192
+ $output .= '</script>' . "\n";
193
+ }
194
 
195
  }
196
 
modules/gadsense/includes/class-gadsense-data.php CHANGED
@@ -23,6 +23,11 @@ if (!class_exists('Gadsense_Data')) {
23
  $options['adsense_id'] = '';
24
  $update = true;
25
  }
 
 
 
 
 
26
 
27
  if ($update) {
28
  update_option(GADSENSE_OPT_NAME, $options);
@@ -42,8 +47,13 @@ if (!class_exists('Gadsense_Data')) {
42
  $old_id = $this->options['adsense_id'];
43
  $this->options['adsense_id'] = $id;
44
  update_option(GADSENSE_OPT_NAME, $this->options);
45
- do_action('gadsense_after_id_changed', $id, $old_id);
46
  }
 
 
 
 
 
47
 
48
  /**
49
  * GETTERS
@@ -52,9 +62,13 @@ if (!class_exists('Gadsense_Data')) {
52
  return $this->options['adsense_id'];
53
  }
54
 
 
 
 
 
55
  public function get_responsive_sizing() {
56
  $resizing = $this->resizing;
57
- $this->resizing = apply_filters('gadsense_responsive_sizing', $resizing);
58
  return $this->resizing;
59
  }
60
 
23
  $options['adsense_id'] = '';
24
  $update = true;
25
  }
26
+ // Limit of 3 ads per page
27
+ if (!isset($options['limit_ads_per_page'])) {
28
+ $options['limit_ads_per_page'] = true;
29
+ $update = true;
30
+ }
31
 
32
  if ($update) {
33
  update_option(GADSENSE_OPT_NAME, $options);
47
  $old_id = $this->options['adsense_id'];
48
  $this->options['adsense_id'] = $id;
49
  update_option(GADSENSE_OPT_NAME, $this->options);
50
+ do_action('advanced-ads-gadsense-after-id-changed', $id, $old_id);
51
  }
52
+
53
+ public function set_limit_per_page($value = true) {
54
+ $this->options['limit_ads_per_page'] = $value;
55
+ update_option(GADSENSE_OPT_NAME, $this->options);
56
+ }
57
 
58
  /**
59
  * GETTERS
62
  return $this->options['adsense_id'];
63
  }
64
 
65
+ public function get_limit_per_page() {
66
+ return $this->options['limit_ads_per_page'];
67
+ }
68
+
69
  public function get_responsive_sizing() {
70
  $resizing = $this->resizing;
71
+ $this->resizing = apply_filters('advanced-ads-gadsense-responsive-sizing', $resizing);
72
  return $this->resizing;
73
  }
74
 
public/class-advanced-ads.php CHANGED
@@ -89,6 +89,8 @@ class Advanced_Ads {
89
  */
90
  private function __construct() {
91
 
 
 
92
  // Load plugin text domain
93
  add_action('plugins_loaded', array($this, 'load_plugin_textdomain'));
94
 
@@ -119,7 +121,8 @@ class Advanced_Ads {
119
  // register hooks and filters for auto ad injection
120
  add_action('wp_head', array($this, 'inject_header'), 20);
121
  add_action('wp_footer', array($this, 'inject_footer'), 20);
122
- add_filter('the_content', array($this, 'inject_content'), 100);
 
123
  }
124
 
125
  /**
89
  */
90
  private function __construct() {
91
 
92
+ $options = $this->options();
93
+
94
  // Load plugin text domain
95
  add_action('plugins_loaded', array($this, 'load_plugin_textdomain'));
96
 
121
  // register hooks and filters for auto ad injection
122
  add_action('wp_head', array($this, 'inject_header'), 20);
123
  add_action('wp_footer', array($this, 'inject_footer'), 20);
124
+ $content_injection_priority = (isset($options['content-injection-priority'])) ? absint($options['content-injection-priority']) : 100;
125
+ add_filter('the_content', array($this, 'inject_content'), $content_injection_priority);
126
  }
127
 
128
  /**
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link:https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id
4
  Tags: ads, ad, adsense, display, banner, advertisements, adverts, advert, monetization
5
  Requires at least: WP 3.5, PHP 5.3
6
  Tested up to: 4.1.1
7
- Stable tag: 1.4.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -65,7 +65,7 @@ global conditions
65
 
66
  display ads by conditions based on the visitor
67
 
68
- * all devices, mobile only or exclude mobile users
69
  * hide all ads from logged in users based on their role
70
 
71
  = ad injection =
@@ -87,6 +87,7 @@ There is an ad type dedicated to Google AdSense that supports:
87
 
88
  * switch ad sizes
89
  * switch between normal and responsive
 
90
  * (more coming soon)
91
 
92
  = based on WordPress standards =
@@ -165,6 +166,15 @@ There is no revenue share. Advanced Ads doesn’t alter your ad codes in a way t
165
 
166
  == Changelog ==
167
 
 
 
 
 
 
 
 
 
 
168
  = 1.4.0 =
169
 
170
  * COOL: AdSense ad type, [manual](http://wpadvancedads.com/advancedads/manual/ad-types/adsense-ads/)
4
  Tags: ads, ad, adsense, display, banner, advertisements, adverts, advert, monetization
5
  Requires at least: WP 3.5, PHP 5.3
6
  Tested up to: 4.1.1
7
+ Stable tag: 1.4.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
65
 
66
  display ads by conditions based on the visitor
67
 
68
+ * display ads on all devices, mobile only or exclude mobile users
69
  * hide all ads from logged in users based on their role
70
 
71
  = ad injection =
87
 
88
  * switch ad sizes
89
  * switch between normal and responsive
90
+ * automatic limit 3 AdSense ads according to AdSense terms of service (can be disabled)
91
  * (more coming soon)
92
 
93
  = based on WordPress standards =
166
 
167
  == Changelog ==
168
 
169
+ = 1.4.1 =
170
+
171
+ * COOL: limitation of AdSense ads prevents you from breaking the AdSense terms of service (can be disabled)
172
+ * added option to change the content injection priority
173
+ * load ad output for content injection only, if injection is possible
174
+ * added hook `advanced-ads-settings-init` to add new settings
175
+ * renamed multiple hooks in the AdSense module
176
+ * updated German translation
177
+
178
  = 1.4.0 =
179
 
180
  * COOL: AdSense ad type, [manual](http://wpadvancedads.com/advancedads/manual/ad-types/adsense-ads/)