Advanced Ads - Version 1.0.2

Version Description

  • bugfix for editing ad weights in ad groups
  • bugfix for autoloader
Download this release

Release Info

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

Code changes from version 1.7.8 to 1.0.2

Files changed (136) hide show
  1. admin/assets/css/admin.css +24 -255
  2. admin/assets/css/index.php +1 -0
  3. admin/assets/img/advertisement.png +0 -0
  4. admin/assets/img/intro/5-star-experience.png +0 -0
  5. admin/assets/img/intro/5-star-support.png +0 -0
  6. admin/assets/img/intro/5-star-usability.png +0 -0
  7. admin/assets/img/loader.gif +0 -0
  8. admin/assets/img/output-center.png +0 -0
  9. admin/assets/img/output-left.png +0 -0
  10. admin/assets/img/output-right.png +0 -0
  11. admin/assets/img/placements/content-after.png +0 -0
  12. admin/assets/img/placements/content-before.png +0 -0
  13. admin/assets/img/placements/content-random.png +0 -0
  14. admin/assets/img/placements/content-within.png +0 -0
  15. admin/assets/img/placements/footer.png +0 -0
  16. admin/assets/img/placements/header.png +0 -0
  17. admin/assets/img/placements/layer.png +0 -0
  18. admin/assets/img/placements/manual.png +0 -0
  19. admin/assets/img/placements/sticky-sidebar-left.png +0 -0
  20. admin/assets/img/placements/widget.png +0 -0
  21. admin/assets/img/thomas.png +0 -0
  22. admin/assets/img/tinymce-icon.png +0 -0
  23. admin/assets/jquery-ui/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  24. admin/assets/jquery-ui/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  25. admin/assets/jquery-ui/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  26. admin/assets/jquery-ui/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  27. admin/assets/jquery-ui/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  28. admin/assets/jquery-ui/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  29. admin/assets/jquery-ui/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  30. admin/assets/jquery-ui/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  31. admin/assets/jquery-ui/images/ui-icons_222222_256x240.png +0 -0
  32. admin/assets/jquery-ui/images/ui-icons_2e83ff_256x240.png +0 -0
  33. admin/assets/jquery-ui/images/ui-icons_454545_256x240.png +0 -0
  34. admin/assets/jquery-ui/images/ui-icons_888888_256x240.png +0 -0
  35. admin/assets/jquery-ui/images/ui-icons_cd0a0a_256x240.png +0 -0
  36. admin/assets/jquery-ui/jquery-ui.min.css +0 -7
  37. admin/assets/js/admin-global.js +0 -49
  38. admin/assets/js/admin.js +77 -780
  39. admin/assets/js/index.php +1 -0
  40. admin/assets/js/inline-edit-group-ads.js +101 -0
  41. admin/assets/js/shortcode.js +0 -99
  42. admin/assets/js/wizard.js +0 -147
  43. admin/class-advanced-ads-admin.php +381 -644
  44. admin/includes/class-ad-groups-list-table.php +288 -0
  45. admin/includes/class-ad-groups-list.php +0 -418
  46. admin/includes/class-ad-type.php +0 -561
  47. admin/includes/class-list-table.php +969 -0
  48. admin/includes/class-menu.php +0 -296
  49. admin/includes/class-meta-box.php +0 -412
  50. admin/includes/class-notices.php +0 -510
  51. admin/includes/class-overview-widgets.php +0 -261
  52. admin/includes/class-settings.php +0 -467
  53. admin/includes/class-shortcode-creator.php +0 -138
  54. admin/includes/index.php +1 -0
  55. admin/includes/notices.php +0 -90
  56. admin/includes/shortcode-creator-l10n.php +0 -20
  57. admin/views/ad-display-metabox.php +41 -135
  58. admin/views/ad-group-ads-inline-form.php +34 -0
  59. admin/views/ad-group-edit.php +41 -30
  60. admin/views/ad-group-list-form-row.php +0 -56
  61. admin/views/ad-group-list-header.php +0 -7
  62. admin/views/ad-group-list-row.php +0 -24
  63. admin/views/ad-group.php +72 -63
  64. admin/views/ad-info-bottom.php +0 -12
  65. admin/views/ad-info-top.php +0 -85
  66. admin/views/ad-info.php +0 -19
  67. admin/views/ad-list-details-column.php +0 -16
  68. admin/views/ad-list-filters.php +0 -15
  69. admin/views/ad-list-no-ads.php +0 -12
  70. admin/views/ad-list-timing-column.php +0 -28
  71. admin/views/ad-main-metabox.php +9 -21
  72. admin/views/ad-output-metabox.php +0 -57
  73. admin/views/ad-parameters-metabox.php +6 -30
  74. admin/views/ad-parameters-size.php +0 -8
  75. admin/views/ad-submitbox-meta.php +0 -33
  76. admin/views/ad-visitor-metabox.php +0 -112
  77. admin/views/admin.php +25 -0
  78. admin/views/debug.php +9 -7
  79. admin/views/feedback_disable.php +0 -20
  80. admin/views/intro.php +0 -90
  81. admin/views/notices/adblock.php +0 -11
  82. admin/views/notices/error.php +0 -1
  83. admin/views/notices/info.php +0 -3
  84. admin/views/notices/inline.php +0 -5
  85. admin/views/notices/jqueryui_error.php +0 -3
  86. admin/views/notices/plugin_error.php +0 -1
  87. admin/views/notices/subscribe.php +0 -5
  88. admin/views/overview.php +0 -32
  89. admin/views/placements.php +0 -199
  90. admin/views/post-ad-settings-metabox.php +0 -3
  91. admin/views/setting-license.php +0 -48
  92. admin/views/settings-disable-ads.php +0 -21
  93. admin/views/settings.php +28 -69
  94. admin/views/support.php +0 -86
  95. advanced-ads.php +38 -28
  96. assets/index.php +1 -0
  97. assets/screenshot-1.png +0 -0
  98. assets/screenshot-2.png +0 -0
  99. classes/EDD_SL_Plugin_Updater.php +0 -378
  100. classes/ad-ajax.php +0 -95
  101. classes/ad-model.php +0 -131
  102. classes/ad-select.php +0 -165
  103. classes/ad.php +543 -874
  104. classes/ad_ajax_callbacks.php +0 -363
  105. classes/ad_group.php +327 -477
  106. classes/ad_placements.php +0 -505
  107. classes/ad_type_abstract.php +95 -95
  108. classes/ad_type_content.php +65 -116
  109. classes/ad_type_group.php +0 -109
  110. classes/ad_type_image.php +0 -158
  111. classes/ad_type_plain.php +54 -92
  112. classes/checks.php +0 -233
  113. classes/display-conditions.php +0 -951
  114. classes/plugin.php +0 -600
  115. classes/upgrades.php +0 -268
  116. classes/visitor-conditions.php +0 -363
  117. classes/widget.php +0 -179
  118. composer.json +4 -23
  119. composer.lock +0 -149
  120. includes/array_ad_conditions.php +51 -73
  121. includes/autoloader.php +31 -0
  122. includes/cap_map.php +0 -15
  123. includes/class_ajax_callbacks.php +99 -0
  124. includes/functions.php +0 -79
  125. includes/index.php +1 -0
  126. includes/load_modules.php +0 -81
  127. languages/advanced-ads-es_ES.mo +0 -0
  128. languages/advanced-ads-es_ES.po +0 -2922
  129. languages/advanced-ads-fr_FR.mo +0 -0
  130. languages/advanced-ads-fr_FR.po +0 -2968
  131. languages/advanced-ads-it_IT.mo +0 -0
  132. languages/advanced-ads-it_IT.po +0 -2677
  133. languages/advanced-ads-nl_NL.mo +0 -0
  134. languages/advanced-ads-nl_NL.po +0 -2855
  135. languages/advanced-ads-pt_BR.mo +0 -0
  136. languages/advanced-ads-pt_BR.po +0 -687
admin/assets/css/admin.css CHANGED
@@ -1,281 +1,50 @@
1
- /**
2
- * DASHBOARD WIDGET
3
- */
4
- #advads_dashboard_widget h4 { margin-top: .5em; }
5
- #advads_dashboard_widget a.rsswidget { font-weight: 400; }
6
- #advads_dashboard_widget .rss-widget ul li { margin-bottom: 6px; }
7
-
8
- /**
9
- * OVERVIEW PAGE
10
- */
11
- .toplevel_page_advanced-ads #dashboard-widgets .postbox-container { width: 100% !important; }
12
- .toplevel_page_advanced-ads #dashboard-widgets .postbox-container .postbox { float: left; width: 23%; min-width: 310px; margin-right: 1%; }
13
- /* .toplevel_page_advanced-ads #dashboard-widgets .postbox-container .postbox + .postbox { margin-left: 1%; } */
14
- .toplevel_page_advanced-ads #dashboard-widgets .postbox-container .postbox ul.list { list-style: inside; }
15
- .toplevel_page_advanced-ads .metabox-holder .postbox-container .empty-container { display: none; }
16
-
17
- /**
18
- * INTRO PAGE
19
- */
20
- .admin_page_advanced-ads-intro .feature-section img { border: solid 1px #0074a2; }
21
- .admin_page_advanced-ads-intro ul { list-style: inside disc; }
22
-
23
- /**
24
- * AD OVERVIEW PAGE
25
- */
26
- .ad_details img { float: left; margin-right: 10px; }
27
- .ad_details img + p { float: left; }
28
- .post-type-advanced_ads .subsubsub .draft a { background-color: #FCE7C0; }
29
- .post-type-advanced_ads .subsubsub .pending a { background-color: #FFDEDE; }
30
- .post-type-advanced_ads .wp-list-table .status-draft { background-color: #FCE7C0; }
31
- .post-type-advanced_ads .wp-list-table .status-pending { background-color: #FFDEDE; }
32
-
33
  /**
34
  * AD EDIT PAGE
35
  */
36
- h2.hndle .advads-hndlelinks { display: inline-block; margin-left: 1em; }
37
- h2.hndle .advads-hndlelinks a { text-decoration: none; }
38
- h2.hndle .advads-hndlelinks a + a { margin-left: 1em; }
39
- .advads-video-link-container { text-align: center; }
40
- .advads-ad-metabox { position: relative; top: 0; left: 0; padding: 3em; background: #fff; }
41
- .advads-ad-metabox h2 { font-weight: bold; color: #0074a2; font-size: 1.6em; margin: 0 0 2em; }
42
-
43
- #advads-ad-injection-box hr { clear: both; }
44
- #advads-ad-injection-box div pre input { width: 30em; }
45
- #advads-ad-injection-box .ui-accordion .ui-accordion-header { margin-top: 0; border-radius: 0; }
46
- #advads-ad-injection-box .ui-accordion .ui-accordion-content { border-radius: 0; }
47
- #advads-ad-injection-box .advads-ad-injection-box-button-wrap { width: 100px; float: left; margin-right: 10px; margin-bottom: 0px; padding: 1px; text-align: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
48
- #advads-ad-injection-box .button-primary { display: block; margin-bottom: 10px; padding: 10px; width: 100px; height: 75px; background-size: 100px 75px; font-size: 1.5em; text-indent: -9999px; border: solid 1px #0085ba; }
49
- #advads-ad-injection-box .button-primary { box-shadow: 0px 0px 2px #0085ba; }
50
- #advads-ad-injection-box button:hover { background: #0085ba !important; color: #fff; text-indent: 0; white-space: normal; cursor: pointer; }
51
- #advads-ad-injection-box input[type="number"] { width: 4em; }
52
-
53
-
54
- #advads-ad-injection-shortcode { width: 130px; border: none; background: #ededed; }
55
- #advads-ad-injection-message-placement-created { font-size: 1.5em; }
56
- .advads-pro-link { opacity: 0.5; }
57
-
58
- #advads-ad-info { overflow: hidden; margin-bottom: 1em; }
59
- #advads-ad-info > * { float: left; margin: 0; line-height: 2em; }
60
- #advads-ad-info pre { float: left; margin: 0; line-height: 2em; }
61
- #advads-ad-info > label > span { float: left; margin-right: .5em; }
62
- #advads-ad-info > label + pre { margin-right: .5em; }
63
- #advads-ad-info > label { margin-left: 1em; }
64
- #advads-ad-info pre input { background: transparent; }
65
-
66
  #ad-main-box { overflow: hidden; }
 
 
67
  .post-type-advanced_ads #poststuff .meta-box-sortables .inside {
68
- margin: 0;
69
- padding: 0;
70
  }
71
  .post-type-advanced_ads .meta-box-sortables .inside > * {
72
- margin: 20px 10px;
73
  }
74
  .post-type-advanced_ads .meta-box-sortables .inside h4 {
75
- background: linear-gradient(to top, #ECECEC, #F9F9F9) repeat scroll 0 0 #F1F1F1;
76
- font-size: 15px;
77
- font-weight: 400;
78
- line-height: 1;
79
- margin: 0;
80
- padding: 10px 10px 5px;
81
  }
82
- .post-type-advanced_ads #advads-ad-description p { font-style: italic; }
83
- .post-type-advanced_ads #advads-ad-description textarea { display: none; width: 100%; height: 10em; }
84
  #advanced-ad-type .description {
85
- display: block;
86
- margin-left: 24px;
87
  }
88
  .post-type-advanced_ads #advanced_ad_content_others textarea {
89
- width: 100%;
90
- height: 20em;
91
  }
92
 
93
  .post-type-advanced_ads #advanced-ad-conditions {
94
- text-align: left;
 
 
 
95
  }
96
- .post-type-advanced_ads h5 { font-size: 1.2em; margin: 1em 0 .5em; }
97
- .post-type-advanced_ads .advads-conditions-table label { margin-right: 1em; }
98
- .post-type-advanced_ads .advads-conditions-table td, .post-type-advanced_ads .advads-conditions-table th { padding: 10px 0 10px 10px; }
99
- .post-type-advanced_ads .advads-conditions-table .advanced-ads-display-condition-set label { float: left; margin-right: -1px; }
100
- .post-type-advanced_ads .advads-conditions-table .ui-widget { font-size: inherit; }
101
- #advads-display-conditions-new select { text-transform: capitalize; }
102
- .advads-display-conditions-remove + h5 { display: inline-block; margin-top: 0; margin-left: 1em; }
103
- select + .advads-conditions-single { display: inline-block; }
104
- .advads-conditions-table { border-collapse: collapse; }
105
- .advads-conditions-table td, .advads-conditions-table td * { vertical-align: top; }
106
- .advads-conditions-table > tbody > tr td { border-bottom: 1px solid #ddd; }
107
- .advads-conditions-table select { vertical-align: inherit; margin: 0; }
108
- .advads-conditions-connector label { text-transform: uppercase; background: #fff; border: 1px solid #aaa; color: #555; }
109
- .advads-conditions-type { text-transform: capitalize; }
110
- .advads-conditions-table tr:first-child .advads-conditions-connector * { display: none; }
111
-
112
- .post-type-advanced_ads #advads-ad-content-plain { width: 100%; }
113
- .post-type-advanced_ads .advads-conditions-single th { vertical-align: top; }
114
- .post-type-advanced_ads .advads-conditions-single { margin: 0; padding: 0 10px 0 0; line-height: 1em; }
115
- .post-type-advanced_ads select + .advads-conditions-single { padding-left: 10px }
116
- .post-type-advanced_ads .advads-conditions-single.disabled { display: none; opacity: .5; }
117
- .post-type-advanced_ads .advads-conditions-table .advads-conditions-single.advads-buttonset label { margin: 0 -1px .3em 0; padding: 0 .5em; background: #f7f7f7; height: 26px; line-height: 26px; color: #555; border: 1px solid #ccc; border-radius: 0; font-family: inherit; box-shadow: none; }
118
- .post-type-advanced_ads #ad-display-box .advads-conditions-single.advads-buttonset label span { margin: 0; padding: 0; line-height: inherit; }
119
- .post-type-advanced_ads .advads-conditions-postid-buttons { padding: 0 10px; }
120
- .advads-conditions-postids-show-search { margin-left: .5em !important; }
121
- .advads-conditions-postids-list li { background: #F1F1F1; padding: 3px; }
122
- .advads-conditions-postids-list .remove { margin-right: 1em; font-size: .9em; }
123
- .advads-conditions-postids-autocomplete-suggestions li span.left { float: left; }
124
- .advads-conditions-postids-autocomplete-suggestions li span.right { float: right; color: #aaa; font-size: .8em; }
125
-
126
- .advads-buttonset label span { margin: 0; padding: 0; }
127
-
128
- .advads-buttonset .ui-state-active,
129
- .advads-buttonset .ui-button.ui-state-active { border-color: #0074a2 !important; background: #2ea2cc !important; color: #fff !important; box-shadow: none; }
130
-
131
- #ad-display-box .advads-conditions-terms-show-search { height: 22px; line-height: 22px; font-weight: bold; font-size: 1.5em; }
132
- .advads-conditions-terms-show-search + .description { display: none; }
133
- .advads-conditions-terms-show-search:hover + .description { display: inline-block; margin-left: .5em; color: #666; }
134
- .advads-conditions-terms-search { display: none; }
135
  .post-type-advanced_ads #ad-parameters-box .advads-ad-parameters-spinner { display: block; float: none; }
136
- .post-type-advanced_ads #advanced-ads-ad-parameters-size label + label { margin-left: 1em; }
137
- .post-type-advanced_ads #advanced-ads-ad-parameters-size input[type="number"] { width: 4em; margin-left: .5em; }
138
- .post-type-advanced_ads #advanced-ad-output-position label + label { margin-left: 1em; }
139
- .post-type-advanced_ads #advanced-ad-output-position img { border: 1px solid #ddd; padding: 2px; }
140
- .post-type-advanced_ads #advanced-ad-output-margin input[type="number"] { width: 4em; }
141
- .post-type-advanced_ads #advanced-ad-output-margin label + label { margin-left: 1em; }
142
-
143
- /* option lists */
144
- .advads-option-list { overflow: hidden; }
145
- .advads-option-list > .label { display: block; float: left; width: 10em; padding: 10px; font-weight: bold; text-transform: capitalize; }
146
- .advads-option-list > .label + div { display: block; float: left; padding: 10px; }
147
- .advads-option-list > hr { clear: both; float: none; display: block; }
148
-
149
- .advads-debug-output legend { text-decoration: underline; cursor: pointer; }
150
-
151
- #advads-exp-timestampdiv { padding-top: 5px; line-height: 23px; }
152
- #advads-exp-timestampdiv p { margin: 8px 0 6px; }
153
- #advads-exp-timestampdiv input { border-width: 1px; border-style: solid; }
154
- #advads-exp-timestampdiv select { height: 21px; line-height: 14px; padding: 0; vertical-align: top; font-size: 12px; }
155
- #advads-exp-aa, #advads-exp-jj, #advads-exp-hh, #advads-exp-mn { padding: 1px; font-size: 12px; }
156
- #advads-exp-jj, #advads-exp-hh, #advads-exp-mn { width: 2em; }
157
- #advads-exp-aa { width: 3.4em; }
158
-
159
- #advads-url,
160
- #advads-image-url,
161
- #advads-image-title,
162
- #advads-image-alt { width: 80%; }
163
- #advads-image-edit-link[href=""] { display: none; }
164
- #advads-image-preview img { max-width: 100%; height: auto; }
165
-
166
- /* Wizard adjustments */
167
- .advads-hide { display: none; }
168
- #advads-wizard-controls button span { line-height: 32px; }
169
 
170
  /**
171
  AD GROUP LIST
172
  */
173
- #advads-ad-group-list .row-actions span + span::before { content: '|'; padding: 0 3px; }
174
- #advads-ad-group-list ul, #advads-ad-group-list ol { margin: 0; list-style-position: inside; }
175
- #advads-ad-group-list tbody tr:nth-child(4n+1) { background: #f9f9f9; }
176
- #advads-ad-group-list .advads-group-ads tr:nth-child(odd) { background: #f9f9f9; }
177
- .advads-ad-group-list-ads li { margin: 0; padding: 3px 0; }
178
- .advads-ad-group-list-ads li:hover { background: #eee; }
179
- .advads-ad-group-list-ads i { margin-left: 1em; font-style: italic; }
180
- .advads-ad-group-list-ads span { float: right; }
181
- .advads-group-row .row-actions a { cursor: pointer; }
182
- .advads-group-row .advads-usage { margin-top: 1em; }
183
- .advads-usage code { padding: 0; background: none; }
184
- .advads-group-row code { background: none; }
185
- .advads-ad-group-form > td { border-bottom: 1px solid; }
186
- .advads-ad-group-form label { display: inline-block; margin-bottom: 1em; }
187
- .advads-ad-group-form strong { float: left; width: 180px; }
188
- .advads-ad-group-form ul { float: left; }
189
- .advads-ad-group-list-ads li { padding-bottom: 10px; }
190
- fieldset.advads-group-add-ad { margin-top: 1em; }
191
-
192
- /**
193
- AD PLACEMENTS
194
- */
195
- .advads-placement-description { display: none; }
196
- .advads-placements-new-form .advads-placement-type { position: relative; top: 0; left: 0; float: left; margin: 10px 10px 0; }
197
- .advads-placements-new-form .advads-placement-type .ui-button { background: none; border-radius: 0; height: auto; }
198
- .advads-placements-new-form .advads-placement-type .ui-button-text { padding: 0; width: 140px; height: 105px; border: solid 1px #0085ba; border-radius: 3px; box-shadow: 0px 0px 2px #0085ba; overflow: hidden; }
199
- .advads-placements-new-form .advads-placement-type .ui-button-text img { max-width: 100%; pointer-events: none; }
200
- .advads-placements-new-form .advads-placement-type label { display: inline-block; width: 140px; text-align: center; border: 0; padding: 0; }
201
- .advads-placements-new-form .advads-placement-type label .description { padding: 10px; }
202
- .advads-placements-new-form .advads-error-message { display: none; }
203
- .advads-placements-table { min-width: 80%; border-collapse: collapse; background: #fff; }
204
- .advads-placements-table tbody tr { border-top: 1px solid #f1f1f1; }
205
- .advads-placements-table tbody tr td:first-child { width: 70px; }
206
- .advads-placements-table tbody tr td:nth-child(2) { width: 100px; }
207
- .advads-placements-table tbody tr td:last-child { width: 70px; }
208
- .advads-placements-table th { margin: 0; padding: 10px; text-align: left; vertical-align: top; }
209
- .advads-placements-table.widefat tbody th { font-weight: bold; }
210
- .advads-placements-table th span { font-weight: normal; }
211
- .advads-placements-table td { margin: 0; padding: 10px; text-align: left; vertical-align: top; }
212
- .advads-placements-table img { height: 50px; }
213
- .advads-placements-table .usage-link { cursor: pointer; }
214
- .advads-placements-table .advads-usage input { width: 100%; }
215
- .advads-placements-table-options { text-align: right; }
216
- .advads-placement-options input, .advads-placement-options select { background: transparent; }
217
- .advads-placements-table-options input[type="number"] { width: 4em; }
218
- .advads-placements-table ol { margin: 0.5em 0; list-style-position: inside; }
219
 
220
  /**
221
  GENERAL ELEMENTS
222
  */
223
- .advads-toggle-link { cursor: pointer; }
224
- .advads-content-half { float: left; margin-right: 5%; width: 45%; min-width: 300px; }
225
- .advads-box { margin-bottom: 20px; padding: 10px; background: #fff; border: solid 1px; }
226
- .on-hover { display: none; }
227
- tr:hover .on-hover { display: block; }
228
- .advads-admin-notice { overflow: hidden; }
229
- .advads-admin-notice .button-primary { margin-left: 1em; }
230
- .advads-admin-notice-inline { padding: 1px 12px; border: 1px solid #0074a2; border-left-width: 4px; }
231
- .advads-admin-notice-inline p { margin: 0.5em 0; padding: 2px; }
232
- .advads-review-image { margin-right: 10px; margin-bottom: 10px; float: left; }
233
- .advads-spinner { float: none; visibility: visible; }
234
- .advads-wide-input { width: 30em; }
235
-
236
- /**
237
- - GOOGLE ADSENSE MODULE
238
- -*/
239
- #pastecode-div { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.65); z-index: 250000; }
240
- #pastecode-container { width: 480px; margin: 85px auto 0 auto; background-color: #fff; padding: 2%; overflow-x : scroll; overflow-y : scroll; border: 5px solid #dcdcdc; border-radius: 5px; }
241
- #adsense-ad-param-error { color: red; font-weight: bold; }
242
-
243
- /**
244
- - TABS + SETTINGS
245
- -*/
246
- .advads-tab { display: none; }
247
- .advads-tab.active { display: block; }
248
- .advads-license-activate-active { color: green; }
249
- .advads-license-activate-error { color: red; }
250
-
251
- /**
252
- - SUPPORT PAGE
253
- -*/
254
- .advads-support-form textarea { width: 25em; height: 10em; }
255
-
256
- /**
257
- - GENERAL
258
- -*/
259
- .advads-error-message { color: red !important; }
260
- .advads-success-message { color: green !important; }
261
- .advads-hidden { display: none; }
262
- .advads-loader { display: block; width: 43px; height: 11px; background: url(../img/loader.gif) no-repeat; }
263
-
264
- /* Image Ad */
265
- #advads_type_image_wp_media .media-sidebar .setting:not([data-setting="title"]):not([data-setting="alt"]),
266
- /* fields added via the `attachment_fields_to_edit` filter */
267
- #advads_type_image_wp_media .media-sidebar .compat-item { display: none; }
268
-
269
- /* TinyMCE shortcode creator */
270
- #advads-shortcode-modal-container-body .spinner { background: url(../../../../../../wp-admin/images/spinner.gif) no-repeat; -webkit-background-size: 20px 20px; background-size: 20px 20px; vertical-align: middle; width: 20px; height: 20px; }
271
- #advads-select-for-shortcode { box-sizing: border-box; }
272
- #advads-select-for-shortcode optgroup { font-weight: 700; font-family: Tahoma, sans-serif; }
273
- #advads-select-for-shortcode optgroup option { padding-left: 20px; }
274
-
275
- /* Filter dropdowns on the ad list table */
276
- .advads-ad-list-even { background-color: #f9f9f9 !important; }
277
- .advads-ad-list-odd { background-color: #fff !important; }
278
- .edit-php.post-type-advanced_ads #filter-by-date, .edit-php.post-type-advanced_ads label[for=filter-by-date], .edit-php.post-type-advanced_ads #post-query-submit { display: none; }
279
-
280
- /* Hide 'New Ad' in menu */
281
- .wp-submenu li a[href="post-new.php?post_type=advanced_ads"] { display:none !important; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  /**
2
  * AD EDIT PAGE
3
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  #ad-main-box { overflow: hidden; }
5
+ .post-type-advanced_ads .meta-box-sortables .hndle { display: none; }
6
+ .post-type-advanced_ads .meta-box-sortables .handlediv { display: none; }
7
  .post-type-advanced_ads #poststuff .meta-box-sortables .inside {
8
+ margin: 0;
9
+ padding: 0;
10
  }
11
  .post-type-advanced_ads .meta-box-sortables .inside > * {
12
+ margin: 20px 10px;
13
  }
14
  .post-type-advanced_ads .meta-box-sortables .inside h4 {
15
+ background: linear-gradient(to top, #ECECEC, #F9F9F9) repeat scroll 0 0 #F1F1F1;
16
+ font-size: 15px;
17
+ font-weight: 400;
18
+ line-height: 1;
19
+ margin: 0;
20
+ padding: 10px 10px 5px;
21
  }
 
 
22
  #advanced-ad-type .description {
23
+ display: block;
24
+ margin-left: 24px;
25
  }
26
  .post-type-advanced_ads #advanced_ad_content_others textarea {
27
+ width: 100%;
28
+ height: 20em;
29
  }
30
 
31
  .post-type-advanced_ads #advanced-ad-conditions {
32
+ text-align: left;
33
+ }
34
+ .post-type-advanced_ads #advads-ad-content-plain {
35
+ width: 100%;
36
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  .post-type-advanced_ads #ad-parameters-box .advads-ad-parameters-spinner { display: block; float: none; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
 
39
  /**
40
  AD GROUP LIST
41
  */
42
+ .advads-groups-ads-list { margin: 0; }
43
+ .ad-group-ads-form table td { margin: 0; padding: 3px 5px 3px 0; }
44
+ .ad-group-ads-form table td:first-child { font-weight: bold; }
45
+ .ad-group-ads-form table td.ad-group-ads-weight input { width: 3em; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
 
47
  /**
48
  GENERAL ELEMENTS
49
  */
50
+ .advads-toggle-link { cursor: pointer; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/assets/css/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden
admin/assets/img/advertisement.png DELETED
Binary file
admin/assets/img/intro/5-star-experience.png DELETED
Binary file
admin/assets/img/intro/5-star-support.png DELETED
Binary file
admin/assets/img/intro/5-star-usability.png DELETED
Binary file
admin/assets/img/loader.gif DELETED
Binary file
admin/assets/img/output-center.png DELETED
Binary file
admin/assets/img/output-left.png DELETED
Binary file
admin/assets/img/output-right.png DELETED
Binary file
admin/assets/img/placements/content-after.png DELETED
Binary file
admin/assets/img/placements/content-before.png DELETED
Binary file
admin/assets/img/placements/content-random.png DELETED
Binary file
admin/assets/img/placements/content-within.png DELETED
Binary file
admin/assets/img/placements/footer.png DELETED
Binary file
admin/assets/img/placements/header.png DELETED
Binary file
admin/assets/img/placements/layer.png DELETED
Binary file
admin/assets/img/placements/manual.png DELETED
Binary file
admin/assets/img/placements/sticky-sidebar-left.png DELETED
Binary file
admin/assets/img/placements/widget.png DELETED
Binary file
admin/assets/img/thomas.png DELETED
Binary file
admin/assets/img/tinymce-icon.png DELETED
Binary file
admin/assets/jquery-ui/images/ui-bg_flat_0_aaaaaa_40x100.png DELETED
Binary file
admin/assets/jquery-ui/images/ui-bg_flat_75_ffffff_40x100.png DELETED
Binary file
admin/assets/jquery-ui/images/ui-bg_glass_55_fbf9ee_1x400.png DELETED
Binary file
admin/assets/jquery-ui/images/ui-bg_glass_65_ffffff_1x400.png DELETED
Binary file
admin/assets/jquery-ui/images/ui-bg_glass_75_dadada_1x400.png DELETED
Binary file
admin/assets/jquery-ui/images/ui-bg_glass_75_e6e6e6_1x400.png DELETED
Binary file
admin/assets/jquery-ui/images/ui-bg_glass_95_fef1ec_1x400.png DELETED
Binary file
admin/assets/jquery-ui/images/ui-bg_highlight-soft_75_cccccc_1x100.png DELETED
Binary file
admin/assets/jquery-ui/images/ui-icons_222222_256x240.png DELETED
Binary file
admin/assets/jquery-ui/images/ui-icons_2e83ff_256x240.png DELETED
Binary file
admin/assets/jquery-ui/images/ui-icons_454545_256x240.png DELETED
Binary file
admin/assets/jquery-ui/images/ui-icons_888888_256x240.png DELETED
Binary file
admin/assets/jquery-ui/images/ui-icons_cd0a0a_256x240.png DELETED
Binary file
admin/assets/jquery-ui/jquery-ui.min.css DELETED
@@ -1,7 +0,0 @@
1
- /*! jQuery UI - v1.11.4 - 2015-03-11
2
- * http://jqueryui.com
3
- * Includes: core.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, draggable.css, menu.css, progressbar.css, resizable.css, selectable.css, selectmenu.css, slider.css, sortable.css, spinner.css, tabs.css, tooltip.css, theme.css
4
- * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
5
- * Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
6
-
7
- .ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .5em .5em .7em;min-height:0;font-size:100%}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:45%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{overflow:hidden;position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:none}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{position:relative;margin:0;padding:3px 1em 3px .4em;cursor:pointer;min-height:0;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");height:100%;filter:alpha(opacity=25);opacity:0.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable{-ms-touch-action:none;touch-action:none}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-selectmenu-menu{padding:0;margin:0;position:absolute;top:0;left:0;display:none}.ui-selectmenu-menu .ui-menu{overflow:auto;overflow-x:hidden;padding-bottom:1px}.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup{font-size:1em;font-weight:bold;line-height:1.5;padding:2px 0.4em;margin:0.5em 0 0 0;height:auto;border:0}.ui-selectmenu-open{display:block}.ui-selectmenu-button{display:inline-block;overflow:hidden;position:relative;text-decoration:none;cursor:pointer}.ui-selectmenu-button span.ui-icon{right:0.5em;left:auto;margin-top:-8px;position:absolute;top:50%}.ui-selectmenu-button span.ui-selectmenu-text{text-align:left;padding:0.4em 2.1em 0.4em 1em;display:block;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #aaa;background:#fff url("images/ui-bg_flat_75_ffffff_40x100.png") 50% 50% repeat-x;color:#222}.ui-widget-content a{color:#222}.ui-widget-header{border:1px solid #aaa;background:#ccc url("images/ui-bg_highlight-soft_75_cccccc_1x100.png") 50% 50% repeat-x;color:#222;font-weight:bold}.ui-widget-header a{color:#222}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #d3d3d3;background:#e6e6e6 url("images/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#555}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#555;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #999;background:#dadada url("images/ui-bg_glass_75_dadada_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#212121;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #aaa;background:#fff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url("images/ui-bg_glass_55_fbf9ee_1x400.png") 50% 50% repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url("images/ui-bg_glass_95_fef1ec_1x400.png") 50% 50% repeat-x;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-state-default .ui-icon{background-image:url("images/ui-icons_888888_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url("images/ui-icons_454545_256x240.png")}.ui-state-active .ui-icon{background-image:url("images/ui-icons_454545_256x240.png")}.ui-state-highlight .ui-icon{background-image:url("images/ui-icons_2e83ff_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_cd0a0a_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#aaa url("images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaa url("images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30);border-radius:8px}
 
 
 
 
 
 
 
admin/assets/js/admin-global.js DELETED
@@ -1,49 +0,0 @@
1
- /*
2
- * global js functions for Advanced Ads
3
- */
4
- jQuery( document ).ready(function () {
5
-
6
- /**
7
- * ADMIN NOTICES
8
- */
9
- // close button
10
- jQuery(document).on('click', '.advads-admin-notice button.notice-dismiss', function(){
11
- var messagebox = jQuery(this).parents('.advads-admin-notice');
12
- if( messagebox.attr('data-notice') === undefined) return;
13
-
14
- var query = {
15
- action: 'advads-close-notice',
16
- notice: messagebox.attr('data-notice')
17
- };
18
- // send query
19
- jQuery.post(ajaxurl, query, function (r) {
20
- // messagebox.fadeOut();
21
- });
22
-
23
- });
24
- // autoresponder button
25
- jQuery('.advads-notices-button-subscribe').click(function(){
26
- if(this.dataset.notice === undefined) return;
27
- var messagebox = jQuery(this).parents('.advads-admin-notice');
28
- messagebox.find('p').append( '<span class="spinner advads-spinner"></span>' );
29
-
30
- var query = {
31
- action: 'advads-subscribe-notice',
32
- notice: this.dataset.notice
33
- };
34
- // send and close message
35
- jQuery.post(ajaxurl, query, function (r) {
36
- if(r === '1'){
37
- messagebox.fadeOut();
38
- } else {
39
- messagebox.find('p').html(r);
40
- // don’t change class on intro page
41
- if( ! jQuery('.admin_page_advanced-ads-intro').length ){
42
- messagebox.removeClass('updated').addClass('error');
43
- }
44
- }
45
- });
46
-
47
- });
48
-
49
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/assets/js/admin.js CHANGED
@@ -1,595 +1,78 @@
1
- jQuery( document ).ready(function ($) {
2
- if ( ! $.fn.accordion || ! $.fn.tooltip || ! advads_use_ui_buttonset() ) {
3
- $( '.advads-jqueryui-error').show();
4
- }
5
-
6
- function advads_load_ad_type_parameter_metabox(ad_type) {
7
- jQuery( '#advanced-ad-type input' ).prop( 'disabled', true );
8
- $( '#advanced-ads-tinymce-wrapper' ).hide();
9
- $( '#advanced-ads-ad-parameters' ).html( '<span class="spinner advads-ad-parameters-spinner advads-spinner"></span>' );
10
- $.ajax({
11
- type: 'POST',
12
- url: ajaxurl,
13
- data: {
14
- 'action': 'load_ad_parameters_metabox',
15
- 'ad_type': ad_type,
16
- 'ad_id': $( '#post_ID' ).val()
17
- },
18
- success: function (data, textStatus, XMLHttpRequest) {
19
- // toggle main content field
20
- if (data) {
21
- $( '#advanced-ads-ad-parameters' ).html( data ).trigger( 'paramloaded' );
22
- advads_maybe_textarea_to_tinymce( ad_type );
23
- }
24
- },
25
- error: function (MLHttpRequest, textStatus, errorThrown) {
26
- $( '#advanced-ads-ad-parameters' ).html( errorThrown );
27
- }
28
- }).always( function ( MLHttpRequest, textStatus, errorThrown ) {
29
- jQuery( '#advanced-ad-type input').prop( 'disabled', false );
30
- });
31
- };
32
-
33
- $( document ).on('change', '#advanced-ad-type input', function () {
34
- var ad_type = $( this ).val()
35
- advads_load_ad_type_parameter_metabox( ad_type );
36
- });
37
-
38
- // trigger for ad injection after ad creation
39
- $( '#advads-ad-injection-box .advads-ad-injection-button' ).on( 'click', function(){
40
- var placement_type = this.dataset.placementType, // create new placement
41
- placement_slug = this.dataset.placementSlug, // use existing placement
42
- options = {};
43
-
44
- if ( ! placement_type && ! placement_slug ) { return; }
45
-
46
- // create new placement
47
- if ( placement_type ) {
48
- // for content injection
49
- if ( 'post_content' === placement_type ) {
50
- var paragraph = prompt( advadstxt.after_paragraph_promt, 1);
51
- if ( paragraph !== null ) {
52
- options.index = parseInt( paragraph, 10 );
53
- }
54
- }
55
- }
56
- $( '#advads-ad-injection-box .advads-loader' ).show();
57
- $( '#advads-ad-injection-box-placements' ).hide();
58
- $( 'body').animate({ scrollTop: $( '#advads-ad-injection-box' ).offset().top -40 }, 1, 'linear' );
59
-
60
- $.ajax({
61
- type: 'POST',
62
- url: ajaxurl,
63
- data: {
64
- action: 'advads-ad-injection-content',
65
- placement_type: placement_type,
66
- placement_slug: placement_slug,
67
- ad_id: $( '#post_ID' ).val(),
68
- options: options
69
- },
70
- success: function (r, textStatus, XMLHttpRequest) {
71
- $( '#advads-ad-injection-box *' ).hide();
72
- // append anchor to placement message
73
- $( '#advads-ad-injection-message-placement-created a' ).attr( 'href', $( '#advads-ad-injection-message-placement-created a' ).attr( 'href' ) + r );
74
- $( '#advads-ad-injection-message-placement-created, #advads-ad-injection-message-placement-created *' ).show();
75
- },
76
- error: function (MLHttpRequest, textStatus, errorThrown) {
77
- $( '#advads-ad-injection-box' ).html( errorThrown );
78
- }
79
- }).always( function ( MLHttpRequest, textStatus, errorThrown ) {
80
- // jQuery( '#advanced-ad-type input').prop( 'disabled', false );
81
- });;
82
- });
83
-
84
- // activate general buttons
85
- if ( advads_use_ui_buttonset() ) {
86
- $( '.advads-buttonset' ).buttonset();
87
- }
88
- // activate accordions
89
- if ( $.fn.accordion ) {
90
- $( ".advads-accordion" ).accordion({
91
- active: false,
92
- collapsible: true,
93
- });
94
- }
95
-
96
- $( document ).on('click', '.advads-conditions-terms-buttons .button', function (e) {
97
- $( this ).remove();
98
- });
99
- // display input field to search for terms
100
- $( document ).on('click', '.advads-conditions-terms-show-search', function (e) {
101
- e.preventDefault();
102
- // display input field
103
- $( this ).siblings( '.advads-conditions-terms-search' ).show().focus();
104
- // register autocomplete
105
- advads_register_terms_autocomplete( $( this ).siblings( '.advads-conditions-terms-search' ) );
106
- $( this ).next( 'br' ).show();
107
- $( this ).hide();
108
- });
109
- // function for autocomplete
110
- function advads_register_terms_autocomplete( self ){
111
- self.autocomplete({
112
- source: function(request, callback){
113
- // var searchField = request.term;
114
- advads_term_search( self, callback );
115
- },
116
- minLength: 1,
117
- select: function( event, ui ) {
118
- // append new line with input fields
119
- $( '<label class="button ui-state-active">' + ui.item.label + '<input type="hidden" name="' + self.data('inputName') + '" value="' + ui.item.value + '"></label>' ).appendTo( self.siblings( '.advads-conditions-terms-buttons' ) );
120
-
121
- // show / hide other elements
122
- // $( '.advads-display-conditions-individual-post' ).hide();
123
- // $( '.advads-conditions-postids-list .show-search a' ).show();
124
- },
125
- close: function( event, ui ) {
126
- self.val( '' );
127
- }
128
- });
129
- }
130
- // display input field to search for post, page, etc.
131
- $( document ).on( 'click', '.advads-conditions-postids-show-search', function (e) {
132
- e.preventDefault();
133
- // display input field
134
- $( this).next().find( '.advads-display-conditions-individual-post' ).show();
135
- //$( '.advads-conditions-postids-search-line .description' ).hide();
136
- $( this ).hide();
137
- });
138
- // register autocomplete to display condition individual posts
139
- $( document ).on( "focus", ".advads-display-conditions-individual-post", function(e) {
140
- var self = this;
141
- if ( !$(this).data("autocomplete") ) { // If the autocomplete wasn't called yet:
142
- $( this ).autocomplete({
143
- source: function(request, callback){
144
- var searchParam = request.term;
145
- advads_post_search( searchParam, callback );
146
- },
147
- minLength: 2,
148
- select: function( event, ui ) {
149
- // append new line with input fields
150
- var newline = $( '<label class="button ui-state-active">' + ui.item.label + '</label>' );
151
- $( '<input type="hidden" name="' + self.dataset.fieldName + '[value][]" value="' + ui.item.value + '"/>' ).appendTo( newline );
152
- newline.insertBefore( $( self ).parent( '.advads-conditions-postids-search-line' ) );
153
- },
154
- close: function( event, ui ) {
155
- $( self ).val( '' );
156
- },
157
- })
158
- .autocomplete().data("ui-autocomplete")._renderItem = function( ul, item ) {
159
- ul.addClass( "advads-conditions-postids-autocomplete-suggestions" );
160
- return $( "<li></li>" )
161
- .append( "<span class='left'>" + item.label + "</span>&nbsp;<span class='right'>" + item.info + "</span>" )
162
- .appendTo( ul );
163
- };
164
- };
165
- });
166
-
167
- // remove individual posts from the display conditions post list
168
- $( document ).on('click', '.advads-conditions-postid-buttons .button', function(e){
169
- $( this ).remove();
170
- });
171
- // display/hide error message if no option was selected
172
- // is also called on every click
173
- function advads_display_condition_option_not_selected(){
174
- $( '.advads-conditions-not-selected' ).each(function(){
175
- if( $( this ).siblings('input:checked').length ){
176
- $( this ).hide();
177
- } else {
178
- $( this ).show();
179
- }
180
- });
181
- }
182
- advads_display_condition_option_not_selected();
183
- // update error messages when an item is clicked
184
- $( document ).on( 'click', '.advads-conditions-terms-buttons input[type="checkbox"], .advads-conditions-single input[type="checkbox"]', function(){
185
- // needs a slight delay until the buttons are updated
186
- window.setTimeout( advads_display_condition_option_not_selected, 200 );
187
- });
188
- // activate and toggle conditions connector option
189
- $('.advads-conditions-connector input').advads_button();
190
- // dynamically change label
191
- $(document).on('click', '.advads-conditions-connector input', function(){
192
- if( $( this ).is(':checked' ) ){
193
- $( this ).button( "option", "label", advadstxt.condition_or );
194
- } else {
195
- $( this ).button( "option", "label", advadstxt.condition_and );
196
- }
197
- });
198
-
199
- // display ad groups form
200
- $( '#advads-ad-group-list a.edit, #advads-ad-group-list a.row-title' ).click(function(e){
201
- e.preventDefault();
202
- var advadsgroupformrow = $( this ).parents( '.advads-group-row' ).next( '.advads-ad-group-form' );
203
- if(advadsgroupformrow.is( ':visible' )){
204
- advadsgroupformrow.hide();
205
- } else {
206
- advadsgroupformrow.show();
207
- }
208
- });
209
- // display ad groups usage
210
- $( '#advads-ad-group-list a.usage' ).click(function(e){
211
- e.preventDefault();
212
- var usagediv = $( this ).parents( '.advads-group-row' ).find( '.advads-usage' );
213
- if(usagediv.is( ':visible' )){
214
- usagediv.hide();
215
- } else {
216
- usagediv.show();
217
- }
218
- });
219
- // display ad groups usage
220
- $( '.advads-placements-table .usage-link' ).click(function(e){
221
- e.preventDefault();
222
- var usagediv = $( this ).next( '.advads-usage' );
223
- if(usagediv.is( ':visible' )){
224
- usagediv.hide();
225
- } else {
226
- usagediv.show();
227
- }
228
- });
229
-
230
- // group page: add ad to group
231
- $( '.advads-group-add-ad button' ).click( function() {
232
- var $settings_row = $( this ).closest( '.advads-ad-group-form' ),
233
- $ad = $settings_row.find( '.advads-group-add-ad-list-ads option:selected' )
234
- $weight_selector = $settings_row.find( '.advads-group-add-ad-list-weights' ).last(),
235
- $ad_table = $settings_row.find( '.advads-group-ads tbody' );
236
- // add new row if does not already exist
237
- if ( $ad.length && $weight_selector.length && ! $ad_table.find( '[name="' + $ad.val() + '"]' ).length ) {
238
- $ad_table.append(
239
- $( '<tr></tr>' ).append(
240
- $( '<td></td>' ).html( $ad.text() ),
241
- $( '<td></td>' ).append( $weight_selector.clone().val( $weight_selector.val() ).prop( 'name', $ad.val() ) ),
242
- '<td><button type="button" class="advads-remove-ad-from-group button">x</button></td>'
243
- )
244
- );
245
- }
246
- });
247
- // group page: remove ad from group
248
- $( '#advads-ad-group-list' ).on( 'click', '.advads-remove-ad-from-group', function() {
249
- var $ad_row = $( this ).closest( 'tr' );
250
-
251
- if ( $ad_row.data( 'ad-id' ) ) {
252
- // save the ad id, it is needed when this ad is not included in any other group
253
- $( '#advads-ad-group-list form' ).append(
254
- '<input type="hidden" name="advads-groups-removed-ads[]" value="' + $ad_row.data( 'ad-id' ) + '">'
255
- );
256
- }
257
- $ad_row.remove();
258
- });
259
-
260
-
261
-
262
- /**
263
- * SETTINGS PAGE
264
- */
265
-
266
- // activate licenses
267
- $('.advads-license-activate').click(function(){
268
-
269
- var button = $(this);
270
-
271
- if( ! this.dataset.addon ) { return }
272
-
273
- // hide button to prevent issues with activation when people click twice
274
- button.hide();
275
-
276
- var query = {
277
- action: 'advads-activate-license',
278
- addon: this.dataset.addon,
279
- pluginname: this.dataset.pluginname,
280
- optionslug: this.dataset.optionslug,
281
- license: $(this).siblings('.advads-license-key').val(),
282
- security: $('#advads-licenses-ajax-referrer').val()
283
- };
284
-
285
- // show loader
286
- $( '<span class="spinner advads-spinner"></span>' ).insertAfter( button );
287
-
288
- // send and close message
289
- $.post(ajaxurl, query, function (r) {
290
- // remove spinner
291
- $('span.spinner').remove();
292
-
293
- if( r === '1' ){
294
- button.siblings('.advads-license-activate-error').remove();
295
- button.siblings('.advads-license-deactivate').show();
296
- button.fadeOut();
297
- button.siblings('.advads-license-activate-active').fadeIn();
298
- button.siblings('input').prop('disabled', true);
299
- } else if( r === 'ex' ){
300
- button.siblings('.advads-license-activate-error').remove();
301
- button.siblings('.advads-license-expired-error').show();
302
- button.show();
303
- } else {
304
- button.siblings('.advads-license-activate-error').show().text( r );
305
- button.show();
306
- }
307
- });
308
- });
309
-
310
- // deactivate licenses
311
- $('.advads-license-deactivate').click(function(){
312
-
313
- var button = $(this);
314
-
315
- if( ! this.dataset.addon ) { return }
316
-
317
- // hide button to prevent issues with double clicking
318
- button.hide();
319
-
320
- var query = {
321
- action: 'advads-deactivate-license',
322
- addon: this.dataset.addon,
323
- pluginname: this.dataset.pluginname,
324
- optionslug: this.dataset.optionslug,
325
- security: $('#advads-licenses-ajax-referrer').val()
326
- };
327
-
328
- // show loader
329
- $( '<span class="spinner advads-spinner"></span>' ).insertAfter( button );
330
-
331
- // send and close message
332
- $.post(ajaxurl, query, function (r) {
333
- // remove spinner
334
- $('span.spinner').remove();
335
-
336
- if( r === '1' ){
337
- button.siblings('.advads-license-activate-error').hide();
338
- button.siblings('.advads-license-activate-active').hide();
339
- button.siblings('.advads-license-activate').show();
340
- button.siblings('input').prop('disabled', false);
341
- button.fadeOut();
342
- } else if( r === 'ex' ){
343
- button.siblings('.advads-license-activate-error').hide();
344
- button.siblings('.advads-license-activate-active').hide();
345
- button.siblings('.advads-license-expired-error').show();
346
- button.siblings('input').prop('disabled', false);
347
- button.fadeOut();
348
- } else {
349
- button.siblings('.advads-license-activate-error').show().text( r );
350
- button.siblings('.advads-license-activate-active').hide();
351
- button.show();
352
- }
353
- });
354
- });
355
-
356
-
357
-
358
-
359
- /**
360
- * PLACEMENTS
361
- */
362
-
363
- // show image tooltips
364
- if ( $.fn.tooltip ) {
365
- $( ".advads-placements-new-form .advads-placement-type" ).tooltip({
366
- items: "span",
367
- content: function() {
368
- return $( this ).parents('.advads-placement-type').find( '.advads-placement-description' ).html();
369
- }
370
- });
371
- }
372
-
373
- /**
374
- * Image ad uploader
375
- */
376
-
377
- $('body').on('click', '.advads_image_upload', function(e) {
378
-
379
- e.preventDefault();
380
-
381
- var button = $(this);
382
-
383
- // If the media frame already exists, reopen it.
384
- if ( file_frame ) {
385
- // file_frame.uploader.uploader.param( 'post_id', set_to_post_id );
386
- file_frame.open();
387
- return;
388
- }
389
-
390
- // Create the media frame.
391
- file_frame = wp.media.frames.file_frame = wp.media( {
392
- id: 'advads_type_image_wp_media',
393
- title: button.data( 'uploaderTitle' ),
394
- button: {
395
- text: button.data( 'uploaderButtonText' )
396
- },
397
- library: {
398
- type: 'image'
399
- },
400
- multiple: false // only allow one file to be selected
401
- } );
402
-
403
- // When an image is selected, run a callback.
404
- file_frame.on( 'select', function() {
405
-
406
- var selection = file_frame.state().get('selection');
407
- selection.each( function( attachment, index ) {
408
- attachment = attachment.toJSON();
409
- if ( 0 === index ) {
410
- // place first attachment in field
411
- $( '#advads-image-id' ).val( attachment.id );
412
- $( '#advanced-ads-ad-parameters-size input[name="advanced_ad[width]"]' ).val( attachment.width );
413
- $( '#advanced-ads-ad-parameters-size input[name="advanced_ad[height]"]' ).val( attachment.height );
414
- // update image preview
415
- var new_image = '<img width="'+ attachment.width +'" height="'+ attachment.height +
416
- '" title="'+ attachment.title +'" alt="'+ attachment.alt +'" src="'+ attachment.url +'"/>';
417
- $('#advads-image-preview').html( new_image );
418
- $('#advads-image-edit-link').attr( 'href', attachment.editLink );
419
- // process "reserve this space" checkbox
420
- $( '#advanced-ads-ad-parameters-size input[type=number]:first' ).change();
421
- }
422
- });
423
- });
424
-
425
- // Finally, open the modal
426
- file_frame.open();
427
- });
428
-
429
- // WP 3.5+ uploader
430
- var file_frame;
431
- window.formfield = '';
432
-
433
- advads_ad_list_build_filters();
434
-
435
- // adblocker related code
436
- $( '#advanced-ads-use-adblocker' ).change( function() {
437
- advads_toggle_box( this, '#advads-adblocker-wrapper' );
438
- });
439
- // processing of the rebuild asset form and the FTP/SSH credentials form
440
- var $advads_adblocker_wrapper = $( '#advads-adblocker-wrapper' );
441
- $advads_adblocker_wrapper.find( 'input[type="submit"]' ).prop( 'disabled', false );
442
- $advads_adblocker_wrapper.on( 'submit', 'form', function( event ) {
443
- var $that = $( this ), // form itself
444
- data = $that.serializeArray();
445
- data.push( { name: 'action', value: 'advads-adblock-rebuild-assets' } );
446
-
447
- $that.prev( '.error' ).remove();
448
- $that.find( 'input[type="submit"]' ).prop( 'disabled', true ).after( '<span class="spinner advads-spinner"></span>' );
449
-
450
- $.ajax({
451
- type: $that.attr( 'method' ),
452
- url: ajaxurl,
453
- action: 'advads-adblock-rebuild-assets',
454
- data: data
455
- }).done( function( data ) {
456
- $advads_adblocker_wrapper.html( data );
457
- }).fail( function( jqXHR, textStatus, errorThrown ) {
458
- $that.before( '<div class="error"><p>' + textStatus + ': ' + errorThrown + '</p></div>' );
459
- $that.find( 'input[type="submit"]' ).prop( 'disabled', false ).next( '.advads-spinner' ).remove();
460
- });
461
-
462
- event.preventDefault();
463
- });
464
-
465
- // process "reserve this space" checkbox
466
- $( '#advanced-ads-ad-parameters' ).on( 'change', '#advanced-ads-ad-parameters-size input[type=number]', function() {
467
- if ( $( '#advanced-ads-ad-parameters-size input[type=number]' ).filter( function() {
468
- return parseInt( this.value, 10 ) > 0;
469
- }).length === 2 ) {
470
- $( '#advads-wrapper-add-sizes' ).prop( 'disabled', false );
471
- } else {
472
- $( '#advads-wrapper-add-sizes' ).prop( 'disabled', true ).prop( 'checked', false );
473
- }
474
- });
475
- // process "reserve this space" checkbox - ad type changed
476
- $( '#advanced-ads-ad-parameters' ).on( 'paramloaded', function() {
477
- $( '#advanced-ads-ad-parameters-size input[type=number]:first' ).change();
478
- })
479
- // process "reserve this space" checkbox - on load
480
- $( '#advanced-ads-ad-parameters-size input[type=number]:first' ).change();
481
-
482
- // move meta box markup to hndle headline
483
- $('.advads-hndlelinks').each(function(){
484
- $(this).removeClass('hidden');
485
- $(this).appendTo( $(this).parent('.inside').siblings('h2.hndle') );
486
- });
487
- // open tutorial link when klick on it
488
- $('.advads-video-link').click(function( el ){
489
- el.preventDefault();
490
- var video_container = $(this).parents('h2').siblings('.inside').find('.advads-video-link-container');
491
- video_container.html( video_container.data('videolink') );
492
- });
493
- // switch import type
494
- jQuery( '.advads_import_type' ).change( function() {
495
- if ( this.value === 'xml_content' ) {
496
- jQuery( '#advads_xml_file' ).hide();
497
- jQuery( '#advads_xml_content' ).show();
498
- } else {
499
- jQuery( '#advads_xml_file' ).show();
500
- jQuery( '#advads_xml_content' ).hide();
501
- }
502
- });
503
-
504
- });
505
-
506
- /**
507
- * store the action hash in settings form action
508
- * thanks for Yoast SEO for this idea
509
- */
510
- function advads_set_tab_hashes() {
511
- // iterate through forms
512
- jQuery( '#advads-tabs' ).find( 'a' ).each(function () {
513
- var id = jQuery( this ).attr( 'id' ).replace( '-tab', '' );
514
- var optiontab = jQuery( '#' + id );
515
-
516
- var form = optiontab.children( '.advads-settings-tab-main-form' );
517
- if ( form.length ) {
518
- var currentUrl = form.attr( 'action' ).split( '#' )[ 0 ];
519
- form.attr( 'action', currentUrl + jQuery( this ).attr( 'href' ) );
520
- }
521
- });
522
- }
523
-
524
- /**
525
- * callback for term search autocomplete
526
- *
527
- * @param {type} search term
528
- * @param {type} callback
529
- * @returns {obj} json object with labels and values
530
- */
531
- function advads_term_search(field, callback) {
532
-
533
- // return ['post', 'poster'];
534
- var query = {
535
- action: 'advads-terms-search',
536
- };
537
-
538
- query.search = field.val();
539
- query.tax = field.data('tagName');
540
-
541
- var querying = true;
542
-
543
- var results = {};
544
- jQuery.post(ajaxurl, query, function (r) {
545
- querying = false;
546
- var results = [];
547
- if(r){
548
- r.map(function(element, index){
549
- results[index] = {
550
- value: element.term_id,
551
- label: element.name
552
- };
553
- });
554
- }
555
- callback( results );
556
- }, 'json');
557
- }
558
-
559
- /**
560
- * callback for post search autocomplete
561
- *
562
- * @param {str} searchParam
563
- * @param {type} callback
564
- * @returns {obj} json object with labels and values
565
- */
566
- function advads_post_search( searchParam, callback ) {
567
-
568
- // return ['post', 'poster'];
569
- var query = {
570
- action: 'advads-post-search',
571
- _ajax_linking_nonce: jQuery( '#_ajax_linking_nonce' ).val(),
572
- 'search': searchParam
573
- };
574
-
575
- var querying = true;
576
-
577
- var results = {};
578
- jQuery.post(ajaxurl, query, function (r) {
579
- querying = false;
580
- var results = [];
581
- if(r){
582
- r.map(function(element, index){
583
- results[index] = {
584
- label: element.title,
585
- value: element.ID,
586
- info: element.info
587
- };
588
- });
589
- }
590
- callback( results );
591
- }, 'json');
592
- }
593
 
594
  /**
595
  * toggle content elements (hide/show)
@@ -597,191 +80,5 @@ function advads_post_search( searchParam, callback ) {
597
  * @param selector jquery selector
598
  */
599
  function advads_toggle(selector) {
600
- jQuery( selector ).slideToggle();
601
- }
602
-
603
- /**
604
- * toggle content elements with a checkbox (hide/show)
605
- *
606
- * @param selector jquery selector
607
- */
608
- function advads_toggle_box(e, selector) {
609
- if (jQuery( e ).is( ':checked' )) {
610
- jQuery( selector ).slideDown();
611
- } else {
612
- jQuery( selector ).slideUp();
613
- }
614
- }
615
-
616
- /**
617
- * disable content of one box when selecting another
618
- * only grey/disable it, don’t hide it
619
- *
620
- * @param selector jquery selector
621
- */
622
- function advads_toggle_box_enable(e, selector) {
623
- if (jQuery( e ).is( ':checked' )) {
624
- jQuery( selector ).find( 'input' ).removeAttr( 'disabled', '' );
625
- } else {
626
- jQuery( selector ).find( 'input' ).attr( 'disabled', 'disabled' );
627
- }
628
- }
629
-
630
- /**
631
- * validate placement form on submit
632
- */
633
- function advads_validate_placement_form(){
634
- // check if placement type was selected
635
- if( ! jQuery('.advads-placement-type input:checked').length){
636
- jQuery('.advads-placement-type-error').show();
637
- return false;
638
- } else {
639
- jQuery('.advads-placement-type-error').hide();
640
- }
641
- // check if placement name was entered
642
- if( jQuery('.advads-new-placement-name').val() == '' ){
643
- jQuery('.advads-placement-name-error').show();
644
- return false;
645
- } else {
646
- jQuery('.advads-placement-name-error').hide();
647
- }
648
- return true;
649
- }
650
-
651
- /**
652
- * replace textarea with TinyMCE editor for Rich Content ad type
653
- */
654
- function advads_maybe_textarea_to_tinymce( ad_type ) {
655
- var textarea = jQuery( '#advads-ad-content-plain' ),
656
- textarea_html = textarea.val(),
657
- tinymce_id = 'advanced-ads-tinymce',
658
- tinymce_id_ws = jQuery( '#' + tinymce_id ),
659
- tinymce_wrapper_div = jQuery ( '#advanced-ads-tinymce-wrapper' );
660
-
661
- if ( ad_type !== 'content' ) {
662
- tinymce_id_ws.prop('name', tinymce_id );
663
- tinymce_wrapper_div.hide();
664
- return false;
665
- }
666
-
667
- if ( typeof tinyMCE === 'object' && tinyMCE.get( tinymce_id ) !== null ) {
668
- // visual mode
669
- if ( textarea_html ) {
670
- // see BeforeSetContent in the wp-includes\js\tinymce\plugins\wordpress\plugin.js
671
- var wp = window.wp,
672
- hasWpautop = ( wp && wp.editor && wp.editor.autop && tinyMCE.get( tinymce_id ).getParam( 'wpautop', true ) );
673
- if ( hasWpautop ) {
674
- textarea_html = wp.editor.autop( textarea_html );
675
- }
676
- tinyMCE.get( tinymce_id ).setContent( textarea_html );
677
- }
678
- textarea.remove();
679
- tinymce_id_ws.prop('name', textarea.prop( 'name' ) );
680
- tinymce_wrapper_div.show();
681
- } else if ( tinymce_id_ws.length ) {
682
- // text mode
683
- tinymce_id_ws.val( textarea_html );
684
- textarea.remove();
685
- tinymce_id_ws.prop('name', textarea.prop( 'name' ) );
686
- tinymce_wrapper_div.show();
687
- }
688
- }
689
-
690
- /**
691
- * adds <option> tags to <select> dropdowns before the 'Filter' button on the ad list table
692
- * @param {string} jQuery wrapped set where to find value/text for <option>
693
- * @param {string} jQuery wrapped set with <select> tag
694
- */
695
- function advads_ad_list_add_items_to_dropdowns( $input, $select ) {
696
- var all_unique_rows = [];
697
-
698
- $input.each( function() {
699
- var one_row = jQuery( this ).text();
700
-
701
- if ( jQuery.inArray( one_row, all_unique_rows ) === -1 ) {
702
- all_unique_rows.push( one_row );
703
- $select.append(
704
- jQuery("<option/>", {
705
- value: one_row,
706
- text: one_row
707
- })
708
- );
709
- }
710
- });
711
- }
712
-
713
- /**
714
- * adds filter dropdowns before the 'Filter' button on the ad list table
715
- */
716
- function advads_ad_list_build_filters() {
717
- var $filter_type = jQuery( '#advads-filter-type' ),
718
- $filter_size = jQuery( '#advads-filter-size' ),
719
- $filter_group = jQuery( '#advads-filter-group' ),
720
- $filter_date = jQuery( '#advads-filter-date' ),
721
- $ad_planning_col = jQuery( '.advads-filter-timing' );
722
-
723
- advads_ad_list_add_items_to_dropdowns( jQuery( '.advads-ad-type' ), $filter_type );
724
- advads_ad_list_add_items_to_dropdowns( jQuery( '.advads-ad-size' ), $filter_size );
725
- advads_ad_list_add_items_to_dropdowns( jQuery( '.taxonomy-advanced_ads_groups a' ), $filter_group );
726
- // if such classes exist on the page - show related <option>s
727
- jQuery.each( ['advads-filter-future', 'advads-filter-any-exp-date', 'advads-filter-expired' ], function( i, v ) {
728
- if ( $ad_planning_col.hasClass( v ) ) {
729
- $filter_date.children( 'option[value="' + v + '"] ' ).show();
730
- }
731
- });
732
-
733
- jQuery( "#advads-filter-type, #advads-filter-size, #advads-filter-group, #advads-filter-date" ).change( function() {
734
- var $the_list_tr = jQuery( '#the-list tr' ).removeClass( 'advads-hidden' );
735
-
736
- if ( $filter_type.val() ) {
737
- $the_list_tr.filter( function() {
738
- return jQuery( this ).find( '.advads-ad-type' ).text() !== $filter_type.val();
739
- }).addClass( 'advads-hidden' );
740
- }
741
- if ( $filter_size.val() ) {
742
- $the_list_tr.not( '.advads-hidden' ).filter ( function() {
743
- return jQuery( this ).find( '.advads-ad-size' ).text() !== $filter_size.val();
744
- }).addClass( 'advads-hidden' );
745
- }
746
- if ( $filter_date.val() ) {
747
- $the_list_tr.not( '.advads-hidden' ).filter( function() {
748
- return jQuery( this ).find( '.' + $filter_date.val() ).length === 0;
749
- }).addClass( 'advads-hidden' );
750
- }
751
- if ( $filter_group.val() ) {
752
- $the_list_tr.not( '.advads-hidden' ).filter( function() {
753
- var ret = false;
754
- //iterate through each group within current tr
755
- jQuery( this ).find( '.taxonomy-advanced_ads_groups a' ).each( function() {
756
- if ( jQuery( this ).text() === $filter_group.val() ) {
757
- ret = true;
758
- return false; //break the loop
759
- }
760
- });
761
- return ret === false;
762
- }).addClass( 'advads-hidden' );
763
- }
764
- // create stripped table, because css nth-child does not counts hidden rows
765
- $the_list_tr.not( '.advads-hidden' ).filter( ':odd' ).addClass( 'advads-ad-list-odd' ).removeClass( 'advads-ad-list-even' ).end()
766
- .filter( ':even' ).addClass( 'advads-ad-list-even' ).removeClass( 'advads-ad-list-odd' );
767
- });
768
- }
769
-
770
- // Change JQueryUI names to fix name collision with other libraries, eg. Bootstrap
771
- jQuery.fn.advads_button = jQuery.fn.button;
772
-
773
- /**
774
- * check if jQueryUI button/buttonset can be used
775
- */
776
- var advads_use_ui_buttonset = ( function() {
777
- var ret = null;
778
- return function () {
779
- if ( null === ret ) {
780
- var needle = 'var g="string"==typeof f,h=c.call(arguments,1)'; //string from jquery-ui source code
781
- ret = jQuery.fn.advads_button && jQuery.fn.buttonset && jQuery.fn.button.toString().indexOf( needle ) !== -1;
782
- }
783
- return ret;
784
- };
785
- })();
786
-
787
-
1
+ jQuery(document).ready(function($) {
2
+ "use strict";
3
+ /*
4
+ function load_content_editor( ad_type ) {
5
+ $.ajax({
6
+ type: 'POST',
7
+ url: ajaxurl,
8
+ data: {
9
+ 'action': 'load_content_editor',
10
+ 'type' : ad_type,
11
+ 'ad_id' : $('#post_ID').val()
12
+ },
13
+ success:function(data, textStatus, XMLHttpRequest){
14
+ // toggle main content field
15
+ if(data == 'content') {
16
+ $('#advanced_ad_content_others').html(''); // clear other editors
17
+ $('#advanced_ad_content').show();
18
+ } else {
19
+ $('#advanced_ad_content').hide();
20
+ $('#advanced_ad_content_others').html(data);
21
+ }
22
+ },
23
+ error: function(MLHttpRequest, textStatus, errorThrown){
24
+ $('#advanced_ad_content_others').html(errorThrown);
25
+ }
26
+ });
27
+ };
28
+
29
+ // load content editor on page load
30
+ if($('#advanced_ad_type input').length > 0) {
31
+ var ad_type = $('#advanced_ad_type input').val();
32
+ load_content_editor(ad_type);
33
+ }
34
+
35
+ $(document).on('change', '#advanced_ad_type input', function(){
36
+ var ad_type = $(this).val()
37
+ load_content_editor( ad_type );
38
+ });
39
+ */
40
+
41
+ function advads_load_ad_type_parameter_metabox(ad_type) {
42
+ $('#advanced-ads-ad-parameters').html('<span class="spinner advads-ad-parameters-spinner"></span>');
43
+ $.ajax({
44
+ type: 'POST',
45
+ url: ajaxurl,
46
+ data: {
47
+ 'action': 'load_ad_parameters_metabox',
48
+ 'ad_type': ad_type,
49
+ 'ad_id': $('#post_ID').val()
50
+ },
51
+ success: function(data, textStatus, XMLHttpRequest) {
52
+ // toggle main content field
53
+ if (data) {
54
+ $('#advanced-ads-ad-parameters').html(data);
55
+ }
56
+ },
57
+ error: function(MLHttpRequest, textStatus, errorThrown) {
58
+ $('#advanced-ads-ad-parameters').html(errorThrown);
59
+ }
60
+ });
61
+ }
62
+ ;
63
+
64
+ $(document).on('change', '#advanced-ad-type input', function() {
65
+ var ad_type = $(this).val()
66
+ advads_load_ad_type_parameter_metabox(ad_type);
67
+ });
68
+
69
+ // empty / clear input condition fields in the same row as the clear button
70
+ $('#advanced-ad-conditions .clear-radio').click(function() {
71
+ $(this).closest('tr').find('input[type="radio"]').prop('checked', false);
72
+ $(this).closest('tr').find('input[type="text"]').val('');
73
+ });
74
+
75
+ })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
 
77
  /**
78
  * toggle content elements (hide/show)
80
  * @param selector jquery selector
81
  */
82
  function advads_toggle(selector) {
83
+ jQuery(selector).slideToggle();
84
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/assets/js/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden
admin/assets/js/inline-edit-group-ads.js ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* saving ad group ad settings */
2
+
3
+ var inlineEditAdGroupAds;
4
+ (function($) {
5
+ inlineEditAdGroupAds = {
6
+ init: function() {
7
+ var t = this;
8
+ $('#the-list').on('click', 'a.edit-ad-group-ads', function() {
9
+ inlineEditAdGroupAds.edit(this);
10
+ return false;
11
+ });
12
+ $('#the-list').on('click', 'a.cancel', function() {
13
+ return inlineEditAdGroupAds.revert();
14
+ });
15
+ $('#the-list').on('click', 'a.save', function() {
16
+ return inlineEditAdGroupAds.save(this);
17
+ });
18
+ $('#the-list').on('keydown', 'input, select', function() {
19
+ if (e.which === 13) {
20
+ return inlineEditAdGroupAds.save(this);
21
+ }
22
+ });
23
+ $('#posts-filter input[type="submit"]').mousedown(function() {
24
+ t.revert();
25
+ });
26
+ },
27
+ edit: function(link) {
28
+ var td, id, t = this;
29
+ // get group id
30
+ id = t.getId(link);
31
+ // get container
32
+ td = $(link).parents('td');
33
+ // load form with information
34
+ params = {
35
+ action: 'advads-ad-group-ads-form',
36
+ group_id: id,
37
+ };
38
+ $.post(ajaxurl, params,
39
+ // append return
40
+ function(r) {
41
+ if (r) {
42
+ // hide all child elements
43
+ td.children('*').hide();
44
+ // display the form
45
+ $(r).appendTo(td);
46
+ }
47
+ }
48
+ );
49
+ return false;
50
+ },
51
+ save: function(link) {
52
+ var params, td, id, t = this;
53
+ // get group id
54
+ id = t.getId(link);
55
+ // get container
56
+ td = $(link).parents('td');
57
+ td.find('.ad-group-ads-form .spinner').show();
58
+ params = {
59
+ action: 'advads-ad-group-ads-form-save',
60
+ group_id: id,
61
+ fields: ''
62
+ };
63
+ params.fields = td.find(':input').serialize();
64
+ // make ajax request
65
+ $.post(ajaxurl, params, function(r) {
66
+ td.find('.ad-group-ads-form .spinner').hide();
67
+ if (r) {
68
+ t.revert(); // show normal table
69
+
70
+ $.each(r, function(key, value){
71
+ // search the field with the ad weight and change the value
72
+ td.find('.ad-weight-' + key).html(value);
73
+ })
74
+ }
75
+
76
+ }, "json"
77
+ );
78
+ return false;
79
+ },
80
+ // remove edit form and display the other elements again
81
+ revert: function() {
82
+ var td = $('table.widefat .ad-group-ads-form').parents('td');
83
+ if (td) {
84
+ $('table.widefat .spinner').hide();
85
+ td.find('.ad-group-ads-form').remove();
86
+ td.find('*').show();
87
+ }
88
+
89
+ return false;
90
+ },
91
+ // get the id of the group from the link clicked
92
+ getId: function(link) {
93
+ groupid = $(link).parents('td').find('.ad-group-id').val();
94
+ return parseInt(groupid);
95
+ ;
96
+ }
97
+ };
98
+ $(document).ready(function() {
99
+ inlineEditAdGroupAds.init();
100
+ });
101
+ })(jQuery);
admin/assets/js/shortcode.js DELETED
@@ -1,99 +0,0 @@
1
- (function() {
2
- tinymce.create( 'tinymce.plugins.advads_shortcode', {
3
- /**
4
- * Initializes the plugin
5
- *
6
- * @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
7
- * @param {string} url Absolute URL to where the plugin is located.
8
- */
9
- init : function( ed, url ) {
10
- ed.addButton( 'advads_shortcode_button', {
11
- title: ed.getLang( 'advads_shortcode.title', 'Advanced ads shortcodes' ),
12
- image : url + '/../img/tinymce-icon.png',
13
- cmd: 'advads_shortcode_command'
14
- });
15
-
16
- ed.addCommand( 'advads_shortcode_command', function() {
17
- ed.windowManager.open({
18
- title: ed.getLang( 'advads_shortcode.title', 'Advanced Ads shortcodes' ),
19
- inline: 1,
20
- body: [{
21
- id: 'advads-shortcode-modal-container',
22
- type: 'container',
23
- minWidth: 320,
24
- html: '<span class="spinner advads-ad-parameters-spinner advads-spinner"></span>',
25
- }],
26
- buttons: [{
27
- text: ed.getLang( 'advads_shortcode.ok', 'Add shortcode' ),
28
- id: 'advads-shortcode-button-insert-wrap',
29
-
30
- onclick: function( e ) {
31
- if ( jQuery( '#advads-shortcode-modal-container-body #advads-select-for-shortcode' ).length > 0 ) {
32
- var item = jQuery( '#advads-select-for-shortcode option:selected' ).val();
33
- if ( item ) {
34
- item = item.split( '_' );
35
- if ( item.length !== 2 ) {
36
- return;
37
- }
38
- if ( item[0] === "ad" ) {
39
- ed.insertContent( '[the_ad id="' + item[1] + '"]' );
40
- } else if ( item[0] === "group" ) {
41
- ed.insertContent( '[the_ad_group id="' + item[1] + '"]' );
42
- } else if ( item[0] === "placement" ) {
43
- ed.insertContent( '[the_ad_placement id="' + item[1] + '"]' );
44
- }
45
- }
46
- }
47
- ed.windowManager.close();
48
- },
49
- },
50
- {
51
- text: ed.getLang( 'advads_shortcode.cancel', 'Cancel' ),
52
- onclick: 'close'
53
- }],
54
-
55
- });
56
-
57
- append_select_field();
58
-
59
- });
60
- },
61
- });
62
-
63
- // Register the plugin
64
- tinymce.PluginManager.add( 'advads_shortcode', tinymce.plugins.advads_shortcode );
65
-
66
- function append_select_field() {
67
- var insert_button_wrap = jQuery( '#advads-shortcode-button-insert-wrap' ),
68
- insert_button = jQuery( '#advads-shortcode-button-insert-wrap button' ),
69
- container_body = jQuery( '#advads-shortcode-modal-container-body' );
70
-
71
- insert_button_wrap.addClass( 'mce-disabled' );
72
- insert_button.prop( 'disabled', true );
73
-
74
- jQuery.ajax({
75
- type: 'POST',
76
- url: ajaxurl,
77
- data: {
78
- 'action': 'advads_content_for_shortcode_creator'
79
- }
80
- })
81
- .done( function( data, textStatus, jqXHR ) {
82
- container_body.html( data );
83
-
84
- jQuery( '#advads-select-for-shortcode' ).on( 'change', function() {
85
- if ( jQuery( this ).prop( 'selectedIndex' ) === 0 ) {
86
- insert_button_wrap.addClass( 'mce-disabled' );
87
- insert_button.prop( 'disabled', true );
88
- } else {
89
- insert_button_wrap.removeClass( 'mce-disabled' );
90
- insert_button.prop( 'disabled', false );
91
- }
92
- });
93
-
94
- })
95
- .fail( function( jqXHR, textStatus, errorThrown ) {
96
- container_body.html( errorThrown );
97
- });
98
- }
99
- })();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/assets/js/wizard.js DELETED
@@ -1,147 +0,0 @@
1
- jQuery( document ).ready(function ($) {
2
- // ad wizard
3
- advads_wizard.init();
4
- });
5
- var advads_wizard = {
6
- box_order: [ // selectors of elements in the wizard in the correct order
7
- '#post-body-content',
8
- '#ad-main-box',
9
- '#ad-parameters-box',
10
- '#ad-output-box',
11
- '#ad-display-box',
12
- '#ad-visitor-box',
13
- // '#advanced_ads_groupsdiv',
14
- // '#submitdiv'
15
- ],
16
- current_box: '#post-body-content', // current active box
17
- one_column: false, // whether the edit screen is in one-column mode
18
- init: function(){
19
- var _this = this;
20
- jQuery('#advads-wizard-controls-next').click( function( ){ _this.next(); } );
21
- jQuery('#advads-wizard-controls-prev').click( function( ){ _this.prev(); } );
22
- jQuery('#advads-wizard-controls-save').click( function( e ){ e.preventDefault(); jQuery('#publish').click(); } ); // save ad
23
- jQuery( '#advads-start-wizard' ).click( function(){
24
- _this.start();
25
- });
26
- // end wizard when the button was clicked
27
- jQuery( '.advads-stop-wizard' ).click( function(){
28
- _this.close();
29
- });
30
- },
31
- show_current_box: function(){
32
- jQuery( this.current_box ).removeClass('advads-hide');
33
- },
34
- start: function(){ // do stuff when wizard is started
35
- // show page in 1-column stype
36
- if( jQuery( '#post-body').hasClass('columns-1') ){
37
- this.one_column = true;
38
- } else {
39
- jQuery( '#post-body').addClass( 'columns-1' ).removeClass( 'columns-2' );
40
- }
41
- // hide all boxes, messages and the headline by adding a hide css class
42
- jQuery('#post-body-content, .postbox-container .postbox, h1 ~ div:not(.advads-admin-notice), h1').addClass( 'advads-hide' );
43
- // display first box
44
- this.show_current_box();
45
- // display close button and controls
46
- jQuery('#advads-stop-wizard, #advads-wizard-controls').removeClass('hidden')
47
- this.update_nav();
48
- this.callbacks();
49
- // initially hide some elemente
50
- jQuery( '#advads-ad-description').addClass('advads-hide'); // ad description
51
- jQuery( '#advads-ad-info').addClass('advads-hide'); // shortcode and php function info
52
- // hide all elements with 'advads-hide-for-wizard' class
53
- jQuery( '.advads-hide-in-wizard').hide();
54
- // remove close-class from ad type box
55
- jQuery( '#ad-main-box' ).removeClass('closed');
56
- this.save_hide_wizard( false );
57
- // jump to next box when ad type is selected
58
- jQuery('#advanced-ad-type input').change(function(){
59
- _this.next();
60
- });
61
- },
62
- close: function(){ // close the wizard by showing all elements again
63
- jQuery('*').removeClass('advads-hide');
64
- jQuery('#advads-stop-wizard, #advads-wizard-controls').addClass('hidden');
65
- if( this.one_column !== true ){
66
- jQuery( '#post-body').addClass( 'columns-2' ).removeClass( 'columns-1' );
67
- }
68
- jQuery('#advads-wizard-welcome').remove();// close wizard welcome message
69
- // show all elements with 'advads-hide-for-wizard' class
70
- jQuery( '.advads-hide-in-wizard').show();
71
- this.save_hide_wizard( true );
72
- },
73
- update_nav: function(){ // update navigation, display only valid buttons
74
- // display all buttons
75
- jQuery('#advads-wizard-controls button').removeClass('hidden');
76
- // hide next button if there is no next widget
77
- var i = this.box_order.indexOf( this.current_box );
78
- if( i === this.box_order.length - 1 ){
79
- jQuery('#advads-wizard-controls-next').addClass('hidden');
80
- }
81
- if( i === 0 ){
82
- jQuery('#advads-wizard-controls-prev').addClass('hidden');
83
- }
84
- // hide stop wizard button in bottom navi
85
- if( i !== 0 ){
86
- jQuery('#advads-wizard-controls .advads-stop-wizard').addClass('hidden');
87
- } else {
88
- jQuery('#advads-wizard-controls .advads-stop-wizard').removeClass('hidden');
89
- }
90
- // hide save button for first boxes
91
- if( i <= 2 ){
92
- jQuery('#advads-wizard-controls-save').addClass('hidden');
93
- } else {
94
- jQuery('#advads-wizard-controls-save').removeClass('hidden');
95
- }
96
- },
97
- next: function(){ // show next box
98
- // get index of current item in box-array
99
- var i = this.box_order.indexOf( this.current_box );
100
- // check if there is a next index
101
- if( this.box_order[ i + 1 ] === undefined ){
102
- return;
103
- }
104
- // hide current element
105
- jQuery( this.current_box ).addClass('advads-hide')
106
- // load next element into current
107
- this.current_box = this.box_order[ i + 1 ];
108
- this.show_current_box();
109
- this.update_nav();
110
- this.callbacks();
111
- },
112
- prev: function(){ // show previous box
113
- // get index of current item in box-array
114
- var i = this.box_order.indexOf( this.current_box );
115
- // check if there is a previous index
116
- if( this.box_order[ i - 1 ] === undefined ){
117
- return;
118
- }
119
- // hide current element
120
- jQuery( this.current_box ).addClass('advads-hide')
121
- // load next element into current
122
- this.current_box = this.box_order[ i - 1 ];
123
- this.show_current_box();
124
- this.update_nav();
125
- this.callbacks();
126
- },
127
- callbacks: function(){ // a number of custom settings for some of the boxes
128
- return;
129
- switch( this.current_box ){
130
- case '#post-body-content' :
131
- // hide shortcode and php information
132
-
133
- break;
134
- }
135
- },
136
- save_hide_wizard: function( hide_wizard ){ // update wizard state (started by default or not?)
137
-
138
- jQuery.ajax({
139
- type: 'POST',
140
- url: ajaxurl,
141
- data: {
142
- action: 'advads-save-hide-wizard-state',
143
- hide_wizard: hide_wizard,
144
- },
145
- });
146
- }
147
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/class-advanced-ads-admin.php CHANGED
@@ -7,677 +7,414 @@
7
  * @author Thomas Maier <thomas.maier@webgilde.com>
8
  * @license GPL-2.0+
9
  * @link http://webgilde.com
10
- * @copyright 2013-2015 Thomas Maier, webgilde GmbH
11
  */
12
 
13
  /**
14
  * Plugin class. This class should ideally be used to work with the
15
  * administrative side of the WordPress site.
16
  *
 
17
  * @package Advanced_Ads_Admin
18
  * @author Thomas Maier <thomas.maier@webgilde.com>
19
  */
20
  class Advanced_Ads_Admin {
21
 
22
- /**
23
- * Instance of this class.
24
- *
25
- * @since 1.0.0
26
- * @var object
27
- */
28
- protected static $instance = null;
29
-
30
- /**
31
- * Instance of admin notice class.
32
- *
33
- * @since 1.5.2
34
- * @var object
35
- */
36
- protected $notices = null;
37
-
38
- /**
39
- * Slug of the settings page
40
- *
41
- * @since 1.0.0
42
- * @var string
43
- */
44
- public $plugin_screen_hook_suffix = null;
45
-
46
- /**
47
- * general plugin slug
48
- *
49
- * @since 1.0.0
50
- * @var string
51
- */
52
- protected $plugin_slug = '';
53
-
54
-
55
-
56
-
57
-
58
- /**
59
- * Initialize the plugin by loading admin scripts & styles and adding a
60
- * settings page and menu.
61
- *
62
- * @since 1.0.0
63
- */
64
- private function __construct() {
65
- if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
66
- new Advanced_Ads_Ad_Ajax_Callbacks;
67
- } else {
68
- add_action( 'plugins_loaded', array( $this, 'wp_plugins_loaded' ) );
69
- }
70
- // add shortcode creator to TinyMCE
71
- Advanced_Ads_Shortcode_Creator::get_instance();
72
-
73
- }
74
-
75
- public function wp_plugins_loaded() {
76
- /*
77
  * Call $plugin_slug from public plugin class.
78
  *
79
  */
80
- $plugin = Advanced_Ads::get_instance();
81
- $this->plugin_slug = $plugin->get_plugin_slug();
82
-
83
-
84
- // Load admin style sheet and JavaScript.
85
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_styles' ) );
86
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ), 9 );
87
-
88
- // update placements
89
- add_action( 'admin_init', array('Advanced_Ads_Placements', 'update_placements') );
90
- // check for add-on updates
91
- add_action( 'admin_init', array($this, 'add_on_updater'), 1 );
92
-
93
- // check for update logic
94
- add_action( 'admin_notices', array($this, 'admin_notices') );
95
-
96
-
97
- // set 1 column layout on overview page as user and page option
98
- add_filter( 'screen_layout_columns', array('Advanced_Ads_Overview_Widgets_Callbacks', 'one_column_overview_page') );
99
- add_filter( 'get_user_option_screen_layout_toplevel_page_advanced', array( 'Advanced_Ads_Overview_Widgets_Callbacks', 'one_column_overview_page_user') );
100
-
101
- // add links to plugin page
102
- add_filter( 'plugin_action_links_' . ADVADS_BASE, array( $this, 'add_plugin_links' ) );
103
- // display information when user is going to disable the plugin
104
- // add_filter( 'after_plugin_row_' . ADVADS_BASE, array( $this, 'display_deactivation_message' ) );
105
- Advanced_Ads_Admin_Meta_Boxes::get_instance();
106
- Advanced_Ads_Admin_Menu::get_instance();
107
- Advanced_Ads_Admin_Ad_Type::get_instance();
108
- Advanced_Ads_Admin_Settings::get_instance();
109
- }
110
-
111
- /**
112
- * Return an instance of this class.
113
- *
114
- * @since 1.0.0
115
- *
116
- * @return object A single instance of this class.
117
- */
118
- public static function get_instance() {
119
- // If the single instance hasn't been set, set it now.
120
- if ( null == self::$instance ) {
121
- self::$instance = new self;
122
- }
123
-
124
- return self::$instance;
125
- }
126
-
127
- /**
128
- * Register and enqueue admin-specific style sheet.
129
- *
130
- * @since 1.0.0
131
- */
132
- public function enqueue_admin_styles() {
133
- wp_enqueue_style( $this->plugin_slug . '-admin-styles', plugins_url( 'assets/css/admin.css', __FILE__ ), array(), ADVADS_VERSION );
134
- if( self::screen_belongs_to_advanced_ads() ){
135
- // jQuery ui smoothness style 1.11.4
136
- wp_enqueue_style( $this->plugin_slug . '-jquery-ui-styles', plugins_url( 'assets/jquery-ui/jquery-ui.min.css', __FILE__ ), array(), '1.11.4' );
137
- }
138
- //wp_enqueue_style( 'jquery-style', '//code.jquery.com/ui/1.11.3/themes/smoothness/jquery-ui.css' );
139
- }
140
-
141
- /**
142
- * Register and enqueue admin-specific JavaScript.
143
- *
144
- * @since 1.0.0
145
- *
146
- * @return null Return early if no settings page is registered.
147
- */
148
- public function enqueue_admin_scripts() {
149
-
150
- // global js script
151
- wp_enqueue_script( $this->plugin_slug . '-admin-global-script', plugins_url( 'assets/js/admin-global.js', __FILE__ ), array('jquery'), ADVADS_VERSION );
152
-
153
- if( self::screen_belongs_to_advanced_ads() ){
154
- wp_register_script( $this->plugin_slug . '-admin-script', plugins_url( 'assets/js/admin.js', __FILE__ ), array( 'jquery', 'jquery-ui-autocomplete' , 'jquery-ui-button' ), ADVADS_VERSION );
155
- wp_register_script( $this->plugin_slug . '-wizard-script', plugins_url( 'assets/js/wizard.js', __FILE__ ), array('jquery'), ADVADS_VERSION );
156
-
157
- // jquery ui
158
- wp_enqueue_script( 'jquery-ui-accordion' );
159
- wp_enqueue_script( 'jquery-ui-button' );
160
- wp_enqueue_script( 'jquery-ui-tooltip' );
161
-
162
- // just register this script for later inclusion on ad group list page
163
- wp_register_script( 'inline-edit-group-ads', plugins_url( 'assets/js/inline-edit-group-ads.js', __FILE__ ), array('jquery'), ADVADS_VERSION );
164
-
165
- // register admin.js translations
166
- $translation_array = array(
167
- 'condition_or' => __( 'or', 'advanced-ads' ),
168
- 'condition_and' => __( 'and', 'advanced-ads' ),
169
- 'after_paragraph_promt' => __( 'After which paragraph?', 'advanced-ads' ),
170
- );
171
- wp_localize_script( $this->plugin_slug . '-admin-script', 'advadstxt', $translation_array );
172
-
173
- wp_enqueue_script( $this->plugin_slug . '-admin-script' );
174
- wp_enqueue_script( $this->plugin_slug . '-wizard-script' );
175
- }
176
-
177
- //call media manager for image upload only on ad edit pages
178
- $screen = get_current_screen();
179
- if( isset( $screen->id ) && Advanced_Ads::POST_TYPE_SLUG === $screen->id ) {
180
- // the 'wp_enqueue_media' function can be executed only once and should be called with the 'post' parameter
181
- // in this case, the '_wpMediaViewsL10n' js object inside html will contain id of the post, that is necessary to view oEmbed priview inside tinyMCE editor.
182
- // since other plugins can call the 'wp_enqueue_media' function without the 'post' parameter, Advanced Ads should call it earlier.
183
- global $post;
184
- wp_enqueue_media( array( 'post' => $post ) );
185
- }
186
-
187
- }
188
-
189
- /**
190
- * check if the current screen belongs to Advanced Ads
191
- *
192
- * @since 1.6.6
193
- * @return bool true if screen belongs to Advanced Ads
194
- */
195
- static function screen_belongs_to_advanced_ads(){
196
-
197
- if( ! function_exists( 'get_current_screen' ) ){
198
- return false;
199
- }
200
-
201
- $screen = get_current_screen();
202
- //echo $screen->id;
203
- if( !isset( $screen->id ) ) {
204
- return false;
205
- }
206
-
207
- $advads_pages = apply_filters( 'advanced-ads-dashboard-screens', array(
208
- 'advanced-ads_page_advanced-ads-groups', // ad groups
209
- 'edit-advanced_ads', // ads overview
210
- 'advanced_ads', // ad edit page
211
- 'advanced-ads_page_advanced-ads-placements', // placements
212
- 'advanced-ads_page_advanced-ads-settings', // settings
213
- 'toplevel_page_advanced-ads', // overview
214
- 'admin_page_advanced-ads-debug', // debug
215
- 'advanced-ads_page_advanced-ads-support', // support
216
- 'admin_page_advanced-ads-intro', // intro
217
- 'admin_page_advanced-ads-import-export', // import & export
218
- ));
219
-
220
- if( in_array( $screen->id, $advads_pages )){
221
- return true;
222
- }
223
-
224
- return false;
225
- }
226
-
227
-
228
- /**
229
- * get action from the params
230
- *
231
- * @since 1.0.0
232
- */
233
- public function current_action() {
234
- if ( isset($_REQUEST['action']) && -1 != $_REQUEST['action'] ) {
235
- return $_REQUEST['action'];
236
- }
237
-
238
- return false;
239
- }
240
-
241
-
242
  /**
243
- * get DateTimeZone object for the WP installation
 
 
 
 
244
  */
245
- public static function get_wp_timezone() {
246
- $_time_zone = get_option( 'timezone_string' );
247
- $time_zone = new DateTimeZone( 'UTC' );
248
- if ( $_time_zone ) {
249
- $time_zone = new DateTimeZone( $_time_zone );
250
- } else {
251
- $gmt_offset = floatval( get_option( 'gmt_offset' ) );
252
- $sign = ( 0 > $gmt_offset )? '-' : '+';
253
- $int = floor( abs( $gmt_offset ) );
254
- $frac = abs( $gmt_offset ) - $int;
255
-
256
- $gmt = '';
257
- if ( $gmt_offset ) {
258
- $gmt .= $sign . zeroise( $int, 2 ) . ':' . zeroise( 60 * $frac, 2 );
259
- $time_zone = date_create( '2017-10-01T12:00:00' . $gmt )->getTimezone();
260
- }
261
-
262
  }
263
- return $time_zone;
 
264
  }
265
-
266
  /**
267
- * get literal expression of timezone
 
 
 
 
268
  */
269
- public static function timezone_get_name( $DTZ ) {
270
- if ( $DTZ instanceof DateTimeZone ) {
271
- $TZ = timezone_name_get( $DTZ );
272
- if ( 'UTC' == $TZ ) {
273
- return 'UTC+0';
274
- }
275
- if ( false === strpos( $TZ, '/' ) ) {
276
- $TZ = 'UTC' . $TZ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
277
  } else {
278
- $TZ = sprintf( __( 'time of %s', 'advanced-ads' ), $TZ );
 
 
 
 
 
 
 
 
279
  }
280
- return $TZ;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
281
  }
282
- return 'UTC+0';
283
  }
284
 
285
- /**
286
- * initiate the admin notices class
287
- *
288
- * @since 1.5.3
289
- */
290
- public function admin_notices(){
291
- // display ad block warning to everyone who can edit ads
292
- if( current_user_can( Advanced_Ads_Plugin::user_cap( 'advanced_ads_edit_ads') ) ) {
293
- if ( $this->screen_belongs_to_advanced_ads() ){
294
- include ADVADS_BASE_PATH . 'admin/views/notices/adblock.php';
295
- include ADVADS_BASE_PATH . 'admin/views/notices/jqueryui_error.php';
296
- }
297
- }
298
-
299
- if( current_user_can( Advanced_Ads_Plugin::user_cap( 'advanced_ads_edit_ads') ) ) {
300
- $this->notices = Advanced_Ads_Admin_Notices::get_instance()->notices;
301
- Advanced_Ads_Admin_Notices::get_instance()->display_notices();
302
- }
303
- }
304
-
305
- /**
306
- * save license key
307
- *
308
- * @since 1.2.0
309
- * @param string $addon string with addon identifier
310
- */
311
- public function activate_license( $addon = '', $plugin_name = '', $options_slug = '', $license_key = '' ) {
312
-
313
- if ( '' === $addon || '' === $plugin_name || '' === $options_slug ) {
314
- return __( 'Error while trying to register the license. Please contact support.', 'advanced-ads' );
315
- }
316
-
317
- $license_key = esc_attr( trim( $license_key ) );
318
- if ( '' == $license_key ) {
319
- return __( 'Please enter a valid license key', 'advanced-ads' );
320
- }
321
-
322
- if ( has_filter( 'advanced_ads_license_'. $options_slug ) ) {
323
- return apply_filters( 'advanced_ads_license_' . $options_slug, false, __METHOD__, $plugin_name, $options_slug, $license_key );
324
- }
325
-
326
- // check if license was already activated and abort activation if so
327
- /*if( $this->check_license($license_key, $plugin_name, $options_slug)){
328
- return 1;
329
- }*/
330
-
331
- $api_params = array(
332
- 'edd_action'=> 'activate_license',
333
- 'license' => $license_key,
334
- 'item_name' => urlencode( $plugin_name ),
335
- 'url' => home_url()
336
- );
337
- // Call the custom API.
338
- $response = wp_remote_post( ADVADS_URL, array(
339
- 'timeout' => 15,
340
- 'sslverify' => false,
341
- 'body' => $api_params
342
- ) );
343
-
344
- if ( is_wp_error( $response ) ) {
345
- $body = wp_remote_retrieve_body( $response );
346
- if ( $body ){
347
- return $body;
348
- } else {
349
- // return print_r($response, true);
350
- return __( 'License couldn’t be activated. Please try again later.', 'advanced-ads' );
351
- }
352
- }
353
-
354
- $license_data = json_decode( wp_remote_retrieve_body( $response ) );
355
- // save license status
356
- update_option($options_slug . '-license-status', $license_data->license, false);
357
-
358
- // display activation problem
359
- if( !empty( $license_data->error )) {
360
- // user friendly texts for errors
361
- $errors = array(
362
- 'license_not_activable' => __( 'This is the bundle license key.', 'advanced-ads' ),
363
- 'item_name_mismatch' => __( 'This is not the correct key for this add-on.', 'advanced-ads' ),
364
- 'no_activations_left' => __( 'There are no activations left.', 'advanced-ads' )
365
- );
366
- $error = isset( $errors[ $license_data->error ] ) ? $errors[ $license_data->error ] : $license_data->error;
367
- if( 'expired' === $license_data->error ){
368
- return 'ex';
369
- } else {
370
- if( isset($errors[ $license_data->error ] ) ) {
371
- return $error;
372
- } else {
373
- return sprintf( __('License is invalid. Reason: %s'), $error);
374
- }
375
- }
376
- } else {
377
- // save license value time
378
- update_option($options_slug . '-license-expires', $license_data->expires, false);
379
- // reset license_expires admin notification
380
- Advanced_Ads_Admin_Notices::get_instance()->remove_from_queue( 'license_expires' );
381
- Advanced_Ads_Admin_Notices::get_instance()->remove_from_queue( 'license_expired' );
382
- Advanced_Ads_Admin_Notices::get_instance()->remove_from_queue( 'license_invalid' );
383
- // save license key
384
- $licenses = $this->get_licenses();
385
- $licenses[ $addon ] = $license_key;
386
- $this->save_licenses( $licenses );
387
- }
388
-
389
- return 1;
390
- }
391
-
392
- /**
393
- * check if a specific license key was already activated for the current page
394
- *
395
- * @since 1.6.17
396
- * @return bool true if already activated
397
- * @deprecated since version 1.7.2 because it only checks if a key is valid, not if the url registered with that key
398
- */
399
- public function check_license( $license_key = '', $plugin_name = '', $options_slug = '' ){
400
-
401
- if ( has_filter( 'advanced_ads_license_'. $options_slug ) ) {
402
- return apply_filters( 'advanced_ads_license_' . $options_slug, false, __METHOD__, $plugin_name, $options_slug, $license_key );
403
- }
404
-
405
- $api_params = array(
406
- 'edd_action' => 'check_license',
407
- 'license' => $license_key,
408
- 'item_name' => urlencode( $plugin_name )
409
- );
410
- $response = wp_remote_get( add_query_arg( $api_params, ADVADS_URL ), array( 'timeout' => 15, 'sslverify' => false ) );
411
- if ( is_wp_error( $response ) ) {
412
- return false;
413
- }
414
- $license_data = json_decode( wp_remote_retrieve_body( $response ) );
415
-
416
- // if this license is still valid
417
- if( $license_data->license == 'valid' ) {
418
- update_option($options_slug . '-license-expires', $license_data->expires, false);
419
- update_option($options_slug . '-license-status', $license_data->license, false);
420
-
421
- return true;
422
- }
423
- return false;
424
- }
425
-
426
- /**
427
- * deactivate license key
428
- *
429
- * @since 1.6.11
430
- * @param string $addon string with addon identifier
431
- */
432
- public function deactivate_license( $addon = '', $plugin_name = '', $options_slug = '' ) {
433
-
434
- if ( '' === $addon || '' === $plugin_name || '' === $options_slug ) {
435
- return __( 'Error while trying to disable the license. Please contact support.', 'advanced-ads' );
436
- }
437
-
438
- $licenses = $this->get_licenses();
439
- $license_key = isset($licenses[$addon]) ? $licenses[$addon] : '';
440
-
441
- if ( has_filter( 'advanced_ads_license_'. $options_slug ) ) {
442
- return apply_filters( 'advanced_ads_license_' . $options_slug, false, __METHOD__, $plugin_name, $options_slug, $license_key );
443
- }
444
-
445
- $api_params = array(
446
- 'edd_action' => 'deactivate_license',
447
- 'license' => $license_key,
448
- 'item_name' => urlencode( $plugin_name )
449
- );
450
- // Send the remote request
451
- $response = wp_remote_post( ADVADS_URL, array(
452
- 'body' => $api_params,
453
- 'timeout' => 15,
454
- 'sslverify' => false,
455
- ) );
456
-
457
- if ( is_wp_error( $response ) ) {
458
- $body = wp_remote_retrieve_body( $response );
459
- if ( $body ){
460
- return $body;
461
- } else {
462
- return __( 'License couldn’t be deactivated. Please try again later.', 'advanced-ads' );
463
- }
464
- }
465
-
466
- $license_data = json_decode( wp_remote_retrieve_body( $response ) );
467
-
468
- // save license status
469
-
470
- // remove data
471
- if( 'deactivated' === $license_data->license ) {
472
- delete_option( $options_slug . '-license-status' );
473
- delete_option( $options_slug . '-license-expires' );
474
- Advanced_Ads_Admin_Notices::get_instance()->remove_from_queue( 'license_expires' );
475
- } elseif( 'failed' === $license_data->license ) {
476
- update_option($options_slug . '-license-expires', $license_data->expires, false);
477
- update_option($options_slug . '-license-status', $license_data->license, false);
478
- return 'ex';
479
- } else {
480
- return __( 'License couldn’t be deactivated. Please try again later.', 'advanced-ads' );
481
- }
482
-
483
- return 1;
484
- }
485
-
486
- /**
487
- * get license keys for all add-ons
488
- *
489
- * @since 1.6.15
490
- * @return arr $licenses licenses
491
- */
492
- public function get_licenses(){
493
-
494
- $licenses = array();
495
-
496
- if( is_multisite() ){
497
- // if multisite, get option from main blog
498
- global $current_site;
499
- $licenses = get_blog_option( $current_site->blog_id, ADVADS_SLUG . '-licenses', array() );
500
-
501
- } else {
502
- $licenses = get_option( ADVADS_SLUG . '-licenses', array() );
503
- }
504
-
505
- return $licenses;
506
- }
507
-
508
- /**
509
- * save license keys for all add-ons
510
- *
511
- * @since 1.7.2
512
- * @return arr $licenses licenses
513
- */
514
- public function save_licenses( $licenses = array() ){
515
-
516
- if( is_multisite() ){
517
- // if multisite, get option from main blog
518
- global $current_site;
519
- update_blog_option( $current_site->blog_id, ADVADS_SLUG . '-licenses', $licenses );
520
- } else {
521
- update_option( ADVADS_SLUG . '-licenses', $licenses );
522
- }
523
- }
524
-
525
- /**
526
- * get license status of an add-on
527
- *
528
- * @since 1.6.15
529
- * @param str $slug slug of the add-on
530
- * @return str $status license status, e.g. "valid" or "invalid"
531
- */
532
- public function get_license_status( $slug = '' ){
533
-
534
- $status = false;
535
-
536
- if( is_multisite() ){
537
- // if multisite, get option from main blog
538
- global $current_site;
539
- $status = get_blog_option( $current_site->blog_id, $slug . '-license-status', false);
540
- } else {
541
- $status = get_option( $slug . '-license-status', false);
542
- }
543
-
544
- return $status;
545
- }
546
-
547
- /**
548
- * get license expired value of an add-on
549
- *
550
- * @since 1.6.15
551
- * @param str $slug slug of the add-on
552
- * @return str $date expiry date of an add-on
553
- */
554
- public function get_license_expires( $slug = '' ){
555
-
556
- $date = false;
557
-
558
- if( is_multisite() ){
559
- // if multisite, get option from main blog
560
- global $current_site;
561
- $date = get_blog_option( $current_site->blog_id, $slug . '-license-expires', false);
562
- } else {
563
- $date = get_option( $slug . '-license-expires', false);
564
- }
565
-
566
- return $date;
567
- }
568
-
569
-
570
- /*
571
- * add-on updater
572
- *
573
- * @since 1.5.7
574
- */
575
- public function add_on_updater(){
576
-
577
- // ignore, if not main blog
578
- if( is_multisite() && ! is_main_site() ){
579
- return;
580
- }
581
-
582
- /**
583
- * list of registered add ons
584
- * contains:
585
- * name
586
- * version
587
- * path
588
- * options_slug
589
- * short option slug (=key)
590
- */
591
- $add_ons = apply_filters( 'advanced-ads-add-ons', array() );
592
-
593
- if( $add_ons === array() ) {
594
- return;
595
- }
596
-
597
- // check only every hour for updates to decrease load on store
598
- // ignore, if force-update was set
599
- if( ! isset( $_GET['force-check'] ) && get_transient( ADVADS_SLUG . '_add-on-updates-checked' ) ){
600
- return;
601
- }
602
- set_transient( ADVADS_SLUG . '_add-on-updates-checked', true, 3600 );
603
-
604
- // load license keys
605
- $licenses = get_option(ADVADS_SLUG . '-licenses', array());
606
-
607
- foreach( $add_ons as $_add_on_key => $_add_on ){
608
-
609
- // check if a license expired over time
610
- $expiry_date = $this->get_license_expires( $_add_on['options_slug'] );
611
- $now = time();
612
- if( $expiry_date && 'lifetime' !== $expiry_date && strtotime( $expiry_date ) < $now ){
613
- // remove license status
614
- delete_option( $_add_on['options_slug'] . '-license-status' );
615
- continue;
616
- }
617
-
618
- // check status
619
- if( $this->get_license_status( $_add_on['options_slug'] ) !== 'valid' ) {
620
- continue;
621
- }
622
-
623
- // retrieve our license key
624
- $license_key = isset($licenses[$_add_on_key]) ? $licenses[$_add_on_key] : '';
625
-
626
- // setup the updater
627
- if( $license_key ){
628
- new EDD_SL_Plugin_Updater( ADVADS_URL, $_add_on['path'], array(
629
- 'version' => $_add_on['version'],
630
- 'license' => $license_key,
631
- 'item_name' => $_add_on['name'],
632
- 'author' => 'Thomas Maier'
633
- )
634
- );
635
- }
636
- }
637
  }
638
-
639
- /**
640
- * add links to the plugins list
641
- *
642
- * @since 1.6.14
643
- * @param arr $links array of links for the plugins, adapted when the current plugin is found.
644
- * @param str $file the filename for the current plugin, which the filter loops through.
645
- * @return array $links
646
- */
647
- function add_plugin_links( $links ) {
648
- // add link to settings
649
- //$settings_link = '<a href="' . admin_url( 'admin.php?page=advanced_ads&page=advanced-ads-settings' ) . '">' . __( 'Settings', 'advanced-ads' ) . '</a>';
650
- //array_unshift( $links, $settings_link );
651
-
652
- // add link to support page
653
- $support_link = '<a href="' . esc_url( admin_url( 'admin.php?page=advanced-ads-support' ) ) . '">' . __( 'Support', 'advanced-ads' ) . '</a>';
654
- array_unshift( $links, $support_link );
655
-
656
- // add link to add-ons
657
- $extend_link = '<a href="' . ADVADS_URL . 'add-ons/#utm_source=advanced-ads&utm_medium=link&utm_campaign=plugin-page" target="_blank">' . __( 'Add-Ons', 'advanced-ads' ) . '</a>';
658
- array_unshift( $links, $extend_link );
659
-
660
- return $links;
661
- }
662
-
663
- /**
664
- * display message when someone is going to disable the plugin
665
- *
666
- * @since 1.6.14
667
- */
668
- function display_deactivation_message(){
669
-
670
- // get email address
671
- $current_user = wp_get_current_user();
672
- if ( !($current_user instanceof WP_User) ){
673
- $email = '';
674
- } else {
675
- $email = trim( $current_user->user_email );
676
- }
677
-
678
- include ADVADS_BASE_PATH . 'admin/views/feedback_disable.php';
679
- }
680
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
681
 
682
 
683
  }
7
  * @author Thomas Maier <thomas.maier@webgilde.com>
8
  * @license GPL-2.0+
9
  * @link http://webgilde.com
10
+ * @copyright 2013 Thomas Maier, webgilde GmbH
11
  */
12
 
13
  /**
14
  * Plugin class. This class should ideally be used to work with the
15
  * administrative side of the WordPress site.
16
  *
17
+ * *
18
  * @package Advanced_Ads_Admin
19
  * @author Thomas Maier <thomas.maier@webgilde.com>
20
  */
21
  class Advanced_Ads_Admin {
22
 
23
+ /**
24
+ * Instance of this class.
25
+ *
26
+ * @since 1.0.0
27
+ * @var object
28
+ */
29
+ protected static $instance = null;
30
+
31
+ /**
32
+ * Slug of the settings page
33
+ *
34
+ * @since 1.0.0
35
+ * @var string
36
+ */
37
+ public $plugin_screen_hook_suffix = null;
38
+
39
+ /**
40
+ * Slug of the ad group page
41
+ *
42
+ * @since 1.0.0
43
+ * @var string
44
+ */
45
+ protected $ad_group_hook_suffix = null;
46
+
47
+ /**
48
+ * general plugin slug
49
+ *
50
+ * @since 1.0.0
51
+ * @var string
52
+ */
53
+ protected $plugin_slug = '';
54
+
55
+ /**
56
+ * post type slug
57
+ *
58
+ * @since 1.0.0
59
+ * @var string
60
+ */
61
+ protected $post_type = '';
62
+
63
+ /**
64
+ * Initialize the plugin by loading admin scripts & styles and adding a
65
+ * settings page and menu.
66
+ *
67
+ * @since 1.0.0
68
+ */
69
+ private function __construct() {
70
+
71
+ /*
 
 
 
 
 
 
72
  * Call $plugin_slug from public plugin class.
73
  *
74
  */
75
+ $plugin = Advanced_Ads::get_instance();
76
+ $this->plugin_slug = $plugin->get_plugin_slug();
77
+ $this->post_type = constant("Advanced_Ads::POST_TYPE_SLUG");
78
+
79
+ // Load admin style sheet and JavaScript.
80
+ add_action('admin_enqueue_scripts', array($this, 'enqueue_admin_styles'));
81
+ add_action('admin_enqueue_scripts', array($this, 'enqueue_admin_scripts'));
82
+
83
+ // Add menu items
84
+ add_action('admin_menu', array($this, 'add_ad_group_menu'));
85
+ add_action('admin_menu', array($this, 'add_plugin_admin_menu'));
86
+
87
+ add_action('admin_init', array($this, 'add_meta_boxes'));
88
+
89
+ // save ads post type
90
+ add_action('save_post', array($this, 'save_ad'));
91
+
92
+ // settings handling
93
+ add_action('admin_init', array($this, 'settings_init'));
94
+
95
+ // Add an action link pointing to the options page.
96
+ $plugin_basename = plugin_basename(plugin_dir_path('__DIR__') . $this->plugin_slug . '.php');
97
+ add_filter('plugin_action_links_' . $plugin_basename, array($this, 'add_action_links'));
98
+ }
99
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
  /**
101
+ * Return an instance of this class.
102
+ *
103
+ * @since 1.0.0
104
+ *
105
+ * @return object A single instance of this class.
106
  */
107
+ public static function get_instance() {
108
+
109
+ // If the single instance hasn't been set, set it now.
110
+ if (null == self::$instance) {
111
+ self::$instance = new self;
 
 
 
 
 
 
 
 
 
 
 
 
112
  }
113
+
114
+ return self::$instance;
115
  }
116
+
117
  /**
118
+ * Register and enqueue admin-specific style sheet.
119
+ *
120
+ * @since 1.0.0
121
+ *
122
+ * @return null Return early if no settings page is registered.
123
  */
124
+ public function enqueue_admin_styles() {
125
+
126
+ global $post;
127
+ if (!isset($this->plugin_screen_hook_suffix) && isset($post) && Advanced_Ads::POST_TYPE_SLUG != $post->type) {
128
+ return;
129
+ }
130
+
131
+ wp_enqueue_style($this->plugin_slug . '-admin-styles', plugins_url('assets/css/admin.css', __FILE__), array(), Advanced_Ads::VERSION);
132
+ }
133
+
134
+ /**
135
+ * Register and enqueue admin-specific JavaScript.
136
+ *
137
+ * @since 1.0.0
138
+ *
139
+ * @return null Return early if no settings page is registered.
140
+ */
141
+ public function enqueue_admin_scripts() {
142
+
143
+ global $post;
144
+ if (!isset($this->plugin_screen_hook_suffix) && isset($post) && Advanced_Ads::POST_TYPE_SLUG != $post->type) {
145
+ return;
146
+ }
147
+
148
+ wp_enqueue_script($this->plugin_slug . '-admin-script', plugins_url('assets/js/admin.js', __FILE__), array('jquery'), Advanced_Ads::VERSION);
149
+
150
+ // just register this script for later inclusion on ad group list page
151
+ wp_register_script('inline-edit-group-ads', plugins_url('assets/js/inline-edit-group-ads.js', __FILE__), array('jquery'), Advanced_Ads::VERSION);
152
+
153
+ }
154
+
155
+ /**
156
+ * Register the administration menu for this plugin into the WordPress Dashboard menu.
157
+ *
158
+ * @since 1.0.0
159
+ */
160
+ public function add_plugin_admin_menu() {
161
+
162
+ // add settings page
163
+ $this->plugin_screen_hook_suffix = add_submenu_page(
164
+ 'edit.php?post_type=' . Advanced_Ads::POST_TYPE_SLUG, __('Advanced Ads Settings', $this->plugin_slug), __('Settings', $this->plugin_slug), 'manage_options', $this->plugin_slug . '-settings', array($this, 'display_plugin_settings_page')
165
+ );
166
+ add_submenu_page(
167
+ null, __('Advanced Ads Debugging', $this->plugin_slug), __('Debug', $this->plugin_slug), 'manage_options', $this->plugin_slug . '-debug', array($this, 'display_plugin_debug_page')
168
+ );
169
+ }
170
+
171
+ /**
172
+ * Render the settings page
173
+ *
174
+ * @since 1.0.0
175
+ */
176
+ public function display_plugin_settings_page() {
177
+ include_once( 'views/settings.php' );
178
+ }
179
+
180
+ /**
181
+ * Render the debug page
182
+ *
183
+ * @since 1.0.1
184
+ */
185
+ public function display_plugin_debug_page() {
186
+ // load array with ads by condition
187
+ $plugin = Advanced_Ads::get_instance();
188
+ $ads_by_conditions = $plugin->get_ads_by_conditions_array();
189
+
190
+ include_once( 'views/debug.php' );
191
+ }
192
+
193
+ /**
194
+ * Register ad group taxonomy page
195
+ *
196
+ * @since 1.0.0
197
+ */
198
+ public function add_ad_group_menu() {
199
+
200
+ $this->ad_group_hook_suffix = add_submenu_page(
201
+ 'edit.php?post_type=' . Advanced_Ads::POST_TYPE_SLUG, __('Ad Groups', $this->plugin_slug), __('Ad Groups', $this->plugin_slug), 'manage_options', $this->plugin_slug . '-groups', array($this, 'ad_group_admin_page')
202
+ );
203
+ }
204
+
205
+ /**
206
+ * Render the ad group page
207
+ *
208
+ * @since 1.0.0
209
+ */
210
+ public function ad_group_admin_page() {
211
+
212
+ $taxonomy = Advanced_Ads::AD_GROUP_TAXONOMY;
213
+ $post_type = Advanced_Ads::POST_TYPE_SLUG;
214
+ $tax = get_taxonomy($taxonomy);
215
+
216
+ $action = $this->current_action();
217
+
218
+ // handle new and updated groups
219
+ if ($action == 'editedgroup') {
220
+ $group_id = (int) $_POST['group_id'];
221
+ check_admin_referer('update-group_' . $group_id);
222
+
223
+ if (!current_user_can($tax->cap->edit_terms))
224
+ wp_die(__('Cheatin&#8217; uh?'));
225
+
226
+ // handle new groups
227
+ if ($group_id == 0) {
228
+ $ret = wp_insert_term($_POST['name'], $taxonomy, $_POST);
229
+ if ($ret && !is_wp_error($ret))
230
+ $forced_message = 1;
231
+ else
232
+ $forced_message = 4;
233
+ // handle group updates
234
  } else {
235
+ $tag = get_term($group_id, $taxonomy);
236
+ if (!$tag)
237
+ wp_die(__('You attempted to edit an item that doesn&#8217;t exist. Perhaps it was deleted?'));
238
+
239
+ $ret = wp_update_term($group_id, $taxonomy, $_POST);
240
+ if ($ret && !is_wp_error($ret))
241
+ $forced_message = 3;
242
+ else
243
+ $forced_message = 5;
244
  }
245
+ // deleting items
246
+ } elseif($action == 'delete'){
247
+ $group_id = (int) $_REQUEST['group_id'];
248
+ check_admin_referer('delete-tag_' . $group_id);
249
+
250
+ if (!current_user_can($tax->cap->delete_terms))
251
+ wp_die(__('Cheatin&#8217; uh?'));
252
+
253
+ wp_delete_term($group_id, $taxonomy);
254
+
255
+ $forced_message = 2;
256
+ }
257
+
258
+ // handly views
259
+ switch ($action) {
260
+ case 'edit' :
261
+ $title = $tax->labels->edit_item;
262
+ if (isset($_REQUEST['group_id'])) {
263
+ $group_id = absint($_REQUEST['group_id']);
264
+ $tag = get_term($group_id, $taxonomy, OBJECT, 'edit');
265
+ } else {
266
+ $group_id = 0;
267
+ $tag = false;
268
+ }
269
+
270
+ require_once( 'views/ad-group-edit.php' );
271
+ break;
272
+
273
+ default :
274
+ $title = $tax->labels->name;
275
+ // load needed classes
276
+ include_once( 'includes/class-list-table.php' );
277
+ include_once( 'includes/class-ad-groups-list-table.php' );
278
+ // load template
279
+ include_once( 'views/ad-group.php' );
280
  }
 
281
  }
282
 
283
+ /**
284
+ * returns a link to the ad group list page
285
+ *
286
+ * @since 1.0.0
287
+ * @param arr $args additional arguments, e.g. action or group_id
288
+ * @return string admin url
289
+ */
290
+ static function group_page_url($args = array()) {
291
+ $plugin = Advanced_Ads::get_instance();
292
+
293
+ $defaultargs = array(
294
+ 'post_type' => constant("Advanced_Ads::POST_TYPE_SLUG"),
295
+ 'page' => 'advanced-ads-groups',
296
+ );
297
+ $args = $args + $defaultargs;
298
+
299
+ return add_query_arg($args, admin_url('edit.php'));
300
+ }
301
+
302
+ /**
303
+ * Add settings action link to the plugins page.
304
+ *
305
+ * @since 1.0.0
306
+ */
307
+ public function add_action_links($links) {
308
+
309
+ return array_merge(
310
+ array(
311
+ 'settings' => '<a href="' . admin_url('edit.php?post_type=advanced_ads&page=advanced-ads-settings') . '">' . __('Settings', $this->plugin_slug) . '</a>'
312
+ ), $links
313
+ );
314
+ }
315
+
316
+ /**
317
+ * Add meta boxes
318
+ *
319
+ * @since 1.0.0
320
+ */
321
+ public function add_meta_boxes() {
322
+ global $_wp_post_type_features;
323
+
324
+ add_meta_box(
325
+ 'ad-main-box', __('Ad Main', $this->plugin_slug), array($this, 'markup_meta_boxes'), Advanced_Ads::POST_TYPE_SLUG, 'normal', 'high'
326
+ );
327
+ add_meta_box(
328
+ 'ad-parameters-box', __('Fine tune your ad', $this->plugin_slug), array($this, 'markup_meta_boxes'), Advanced_Ads::POST_TYPE_SLUG, 'normal', 'high'
329
+ );
330
+ add_meta_box(
331
+ 'ad-display-box', __('Where to display your ads', $this->plugin_slug), array($this, 'markup_meta_boxes'), Advanced_Ads::POST_TYPE_SLUG, 'normal', 'high'
332
+ );
333
+ }
334
+
335
+ /**
336
+ * load templates for all meta boxes
337
+ *
338
+ * @since 1.0.0
339
+ * @param obj $post
340
+ * @param array $box
341
+ * @todo move ad initialization to main function and just global it
342
+ */
343
+ public function markup_meta_boxes($post, $box) {
344
+ $ad = new Advads_Ad($post->ID);
345
+
346
+ switch ($box['id']) {
347
+ case 'ad-main-box':
348
+ $view = 'ad-main-metabox.php';
349
+ break;
350
+ case 'ad-parameters-box':
351
+ $view = 'ad-parameters-metabox.php';
352
+ break;
353
+ case 'ad-display-box':
354
+ $view = 'ad-display-metabox.php';
355
+ break;
356
+ }
357
+
358
+ if (empty($view))
359
+ return;
360
+ $view = plugin_dir_path(__FILE__) . 'views/' . $view;
361
+ if (is_file($view)) {
362
+ require_once( $view );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
363
  }
364
+ }
365
+
366
+ /**
367
+ * prepare the ad post type to be saved
368
+ *
369
+ * @since 1.0.0
370
+ * @param int $post_id id of the post
371
+ * @todo handling this more dynamic based on ad type
372
+ */
373
+ public function save_ad($post_id) {
374
+
375
+ // only use for ads, no other post type
376
+ if (!isset($_POST['post_type']) || $this->post_type != $_POST['post_type'] || !isset($_POST['advanced_ad']['type'])) {
377
+ return;
378
+ }
379
+
380
+ // get ad object
381
+ $ad = new Advads_Ad($post_id);
382
+ if (!$ad instanceof Advads_Ad)
383
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
384
 
385
+ $ad->type = $_POST['advanced_ad']['type'];
386
+ if(!empty($_POST['advanced_ad']['content']))
387
+ $ad->content = $_POST['advanced_ad']['content'];
388
+ else $ad->content = '';
389
+ $ad->conditions = $_POST['advanced_ad']['conditions'];
390
+
391
+ $ad->save();
392
+ }
393
+
394
+ /**
395
+ * get action from the params
396
+ *
397
+ * @since 1.0.0
398
+ */
399
+ public function current_action() {
400
+ if (isset($_REQUEST['action']) && -1 != $_REQUEST['action'])
401
+ return $_REQUEST['action'];
402
+
403
+ return false;
404
+ }
405
+
406
+ /**
407
+ * initialize settings
408
+ *
409
+ * @since 1.0.1
410
+ */
411
+ public function settings_init(){
412
+
413
+ // no additional settings registered yet, but some addons might need this
414
+
415
+ // register settings
416
+ register_setting($this->plugin_screen_hook_suffix, 'advancedads');
417
+ }
418
 
419
 
420
  }
admin/includes/class-ad-groups-list-table.php ADDED
@@ -0,0 +1,288 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Groups List Table class.
5
+ *
6
+ * derrived from WP_Terms_List_Table
7
+ *
8
+ * @package WordPress
9
+ * @subpackage List_Table
10
+ * @since 3.1.0
11
+ * @access private
12
+ */
13
+ class AdvAds_Groups_List_Table extends AdvAds_List_Table {
14
+
15
+ /**
16
+ * constructor
17
+ *
18
+ * @since 1.0.0
19
+ * @global type $status
20
+ * @global type $page
21
+ */
22
+ function __construct() {
23
+ global $status, $page;
24
+
25
+ parent::__construct(array(
26
+ 'plural' => 'adgroups',
27
+ 'singular' => 'adgroup',
28
+ ));
29
+
30
+ $this->post_type = Advanced_Ads::POST_TYPE_SLUG;
31
+ $this->taxonomy = Advanced_Ads::AD_GROUP_TAXONOMY;
32
+ }
33
+
34
+ /**
35
+ * default column handling
36
+ *
37
+ * @since 1.0.0
38
+ * @param type $item
39
+ * @param type $column_name
40
+ * @return output for the column
41
+ */
42
+ function column_default($item, $column_name) {
43
+ return apply_filters("manage_{$this->taxonomy}_{$column_name}_column", '', $column_name, $item->term_id);
44
+ }
45
+
46
+ /**
47
+ * handle checkbox column
48
+ *
49
+ * @since 1.0.ß
50
+ * @see WP_List_Table::::single_row_columns()
51
+ * @param array $item A singular item (one full row's worth of data)
52
+ * @return string Text to be placed inside the column <td> (movie title only)
53
+ */
54
+ function column_cb($tag) {
55
+ $default_term = get_option('default_' . $this->screen->taxonomy);
56
+
57
+ return '<label class="screen-reader-text" for="cb-select-' . $tag->term_id . '">' . sprintf(__('Select %s', Advanced_Ads::TD), $tag->name) . '</label>'
58
+ . '<input type="checkbox" name="delete_tags[]" value="' . $tag->term_id . '" id="cb-select-' . $tag->term_id . '" />';
59
+
60
+ return '&nbsp;';
61
+ }
62
+
63
+ /**
64
+ * column with the ad group id
65
+ * @since 1.0.0
66
+ * @param type $tag
67
+ * @return string
68
+ */
69
+ function column_id($tag) {
70
+ return $tag->term_id;
71
+ }
72
+
73
+ /**
74
+ * render the basic ad group information
75
+ *
76
+ * @since 1.0.0
77
+ * @param obj $tag
78
+ * @return string
79
+ */
80
+ function column_name($tag) {
81
+ $tax = get_taxonomy($this->taxonomy);
82
+
83
+ $default_term = get_option('default_' . $this->taxonomy);
84
+
85
+ $name = apply_filters('term_name', $tag->name, $tag);
86
+ $qe_data = get_term($tag->term_id, $this->taxonomy, OBJECT, 'edit');
87
+ // $edit_link = esc_url(get_edit_term_link($tag->term_id, $this->taxonomy, $this->screen->post_type));
88
+ $args = array(
89
+ 'action' => 'edit',
90
+ 'group_id' => $tag->term_id
91
+ );
92
+ $edit_link = Advanced_Ads_Admin::group_page_url($args);
93
+
94
+ $out = '<strong><a class="row-title" href="' . $edit_link . '" title="' . esc_attr(sprintf(__('Edit &#8220;%s&#8221;', Advanced_Ads::TD), $name)) . '">' . $name . '</a></strong><br />';
95
+ $out .= '<p class="description">' . $tag->description . '</p>';
96
+
97
+ $actions = array();
98
+ if (current_user_can($tax->cap->edit_terms)) {
99
+ $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit', Advanced_Ads::TD) . '</a>';
100
+ // $actions['inline hide-if-no-js'] = '<a href="#" class="editinline">' . __('Quick&nbsp;Edit') . '</a>';
101
+ }
102
+ if (current_user_can($tax->cap->delete_terms) && $tag->term_id != $default_term){
103
+ $args = array(
104
+ 'action' => 'delete',
105
+ 'group_id' => $tag->term_id
106
+ );
107
+ $delete_link = Advanced_Ads_Admin::group_page_url($args);
108
+ $actions['delete'] = "<a class='delete-tag' href='" . wp_nonce_url($delete_link, 'delete-tag_' . $tag->term_id) . "'>" . __('Delete') . "</a>";
109
+ }
110
+
111
+ $actions = apply_filters("{$this->taxonomy}_row_actions", $actions, $tag);
112
+
113
+ $out .= $this->row_actions($actions);
114
+ $out .= '</div>';
115
+
116
+ return $out;
117
+ }
118
+
119
+ /**
120
+ * render the slug column
121
+ *
122
+ * @since 1.0.0
123
+ * @param obj $tag
124
+ * @return string
125
+ */
126
+ function column_slug($tag) {
127
+ return apply_filters('editable_slug', $tag->slug);
128
+ }
129
+
130
+ /**
131
+ * render the ads column (number of ads belonging to this group)
132
+ *
133
+ * @since 1.0.0
134
+ * @param obj $tag
135
+ * @return string
136
+ */
137
+ function column_ads($tag) {
138
+ $count = number_format_i18n($tag->count);
139
+
140
+ $tax = get_taxonomy($this->taxonomy);
141
+ $args = array(
142
+ 'post_type' => $this->post_type,
143
+ $this->taxonomy => $tag->slug
144
+ );
145
+ $ads = new WP_Query($args);
146
+
147
+ $group = new Advads_Ad_Group($tag->term_id);
148
+ $weights = $group->get_ad_weights();
149
+
150
+ $out = '';
151
+ $actions = array();
152
+ // The Loop
153
+ if ( $ads->have_posts() ) {
154
+ $out .= '<table class="advads-groups-ads-list">';
155
+ while ( $ads->have_posts() ) {
156
+ $ads->the_post();
157
+ $out .= '<tr><td><a href="' . get_edit_post_link(get_the_ID()) . '">' . get_the_title() . '</a>';
158
+ $_weight = (isset($weights[get_the_ID()])) ? $weights[get_the_ID()] : Advads_Ad_Group::MAX_AD_GROUP_WEIGHT;
159
+ $out .= '<td class="ad-weight ad-weight-' . get_the_ID() . '" title="'.__('Ad weight', Advanced_Ads::TD).'">' . $_weight . '</td></tr>';
160
+ $out .= '</tr>';
161
+ }
162
+ $out .= '</table>';
163
+ // include actions
164
+ $actions['edit'] = '<a href="#" class="edit-ad-group-ads">' . __('Edit', Advanced_Ads::TD) . '</a>';
165
+ $out .= $this->row_actions($actions);
166
+ // row with the group id
167
+ $out .= '<input type="hidden" class="ad-group-id" value="'. $tag->term_id .'"/>';
168
+ }
169
+ // Restore original Post Data
170
+ wp_reset_postdata();
171
+
172
+ return $out;
173
+ }
174
+
175
+ /**
176
+ * load the column names
177
+ *
178
+ * @since 1.0.0
179
+ * @see WP_List_Table::::single_row_columns()
180
+ * @return array An associative array containing column information: 'slugs'=>'Visible Titles'
181
+ * ************************************************************************ */
182
+ function get_columns() {
183
+ $columns = array(
184
+ // 'cb' => '<input type="checkbox" />', //Render a checkbox instead of text
185
+ 'id' => __('ID', $this->textdomain),
186
+ 'name' => __('Ad Group', $this->textdomain),
187
+ 'slug' => __('Slug', $this->textdomain),
188
+ 'ads' => __('Ads', $this->textdomain),
189
+ );
190
+ return $columns;
191
+ }
192
+
193
+ /**
194
+ * contains sortable columns
195
+ *
196
+ * @since 1.0.0
197
+ * @return array An associative array containing all the columns that should be sortable: 'slugs'=>array('data_values',bool)
198
+ * ************************************************************************ */
199
+ function get_sortable_columns() {
200
+ $sortable_columns = array(
201
+ 'id' => array('id', true), //true means it's already sorted
202
+ 'name' => array('name', false),
203
+ 'description' => array('description', false),
204
+ 'slug' => array('slug', false)
205
+ );
206
+ return $sortable_columns;
207
+ }
208
+
209
+ /**
210
+ * define bulk actions
211
+ *
212
+ * @since 1.0.0
213
+ * @return array An associative array containing all the bulk actions: 'slugs'=>'Visible Titles'
214
+ * ************************************************************************ */
215
+ function get_bulk_actions() {
216
+ $actions = array(
217
+ // 'delete' => __('Delete', $this->textdomain)
218
+ );
219
+ return $actions;
220
+ }
221
+
222
+ /**
223
+ * handle bulk actions here
224
+ *
225
+ * @since 1.0.0
226
+ * @see $this->prepare_items()
227
+ * ************************************************************************ */
228
+ function process_bulk_action() {
229
+
230
+ //Detect when a bulk action is being triggered...
231
+ if ('delete' === $this->current_action()) {
232
+
233
+ }
234
+ }
235
+
236
+ /**
237
+ * load items for output
238
+ *
239
+ * @since 1.0.0
240
+ */
241
+ function prepare_items() {
242
+ // how many items per page
243
+ // get_items_per_page basically uses a filter
244
+ $per_page = $this->get_items_per_page('edit_' . $this->taxonomy . '_per_page');
245
+
246
+ // set columns
247
+ $columns = $this->get_columns();
248
+ $hidden = array();
249
+ $sortable = $this->get_sortable_columns();
250
+
251
+ // combined array with all kinds of columns
252
+ $this->_column_headers = array($columns, $hidden, $sortable);
253
+
254
+ // process bulk actions
255
+ $this->process_bulk_action();
256
+
257
+ // prepare items
258
+ $search = !empty($_REQUEST['s']) ? trim(wp_unslash($_REQUEST['s'])) : '';
259
+
260
+ $args = array(
261
+ 'taxonomy' => $this->taxonomy,
262
+ 'search' => $search,
263
+ 'page' => $this->get_pagenum(),
264
+ 'number' => $per_page,
265
+ 'hide_empty' => 0,
266
+ 'orderby' => 'id'
267
+ );
268
+
269
+ if (!empty($_REQUEST['orderby']))
270
+ $args['orderby'] = trim(wp_unslash($_REQUEST['orderby']));
271
+
272
+ if (!empty($_REQUEST['order']))
273
+ $args['order'] = trim(wp_unslash($_REQUEST['order']));
274
+
275
+ $this->callback_args = $args;
276
+
277
+ // get items
278
+ $this->items = get_categories($args);
279
+
280
+ $total_items = count($this->items);
281
+ $this->set_pagination_args(array(
282
+ 'total_items' => $total_items,
283
+ 'per_page' => $per_page,
284
+ 'total_pages' => ceil($total_items / $per_page)
285
+ ));
286
+ }
287
+
288
+ }
admin/includes/class-ad-groups-list.php DELETED
@@ -1,418 +0,0 @@
1
- <?php
2
- /**
3
- * Groups List Table class.
4
- *
5
- * @package Advanced Ads
6
- * @since 1.4.4
7
- */
8
- class Advanced_Ads_Groups_List {
9
-
10
- /**
11
- * array with all groups
12
- */
13
- public $groups = array();
14
-
15
- /**
16
- * array with all ad group types
17
- */
18
- public $types = array();
19
-
20
- /**
21
- * construct the current list
22
- */
23
- public function __construct(){
24
-
25
- // set default vars
26
- $this->taxonomy = Advanced_Ads::AD_GROUP_TAXONOMY;
27
- $this->post_type = Advanced_Ads::POST_TYPE_SLUG;
28
-
29
- $this->load_groups();
30
-
31
- $this->types = $this->get_ad_group_types();
32
- }
33
-
34
- /**
35
- * load ad groups
36
- */
37
- public function load_groups(){
38
-
39
- // load all groups
40
- $search = ! empty($_REQUEST['s']) ? trim( wp_unslash( $_REQUEST['s'] ) ) : '';
41
-
42
- $args = array(
43
- 'taxonomy' => $this->taxonomy,
44
- 'search' => $search,
45
- 'hide_empty' => 0,
46
- );
47
- // get wp term objects
48
- $terms = Advanced_Ads::get_ad_groups( $args );
49
-
50
- // add meta data to groups
51
- $this->groups = $this->load_groups_objects_from_terms( $terms );
52
- }
53
-
54
- /**
55
- * load ad groups objects from wp term objects
56
- *
57
- * @param arr $terms array of wp term objects
58
- */
59
- protected function load_groups_objects_from_terms(array $terms){
60
-
61
- $groups = array();
62
- foreach ( $terms as $_group ){
63
- $groups[] = new Advanced_Ads_Group( $_group );
64
- }
65
-
66
- return $groups;
67
- }
68
-
69
- /**
70
- * render group list header
71
- */
72
- public function render_header(){
73
- $file = ADVADS_BASE_PATH . 'admin/views/ad-group-list-header.php';
74
- require_once($file);
75
- }
76
-
77
- /**
78
- * render list rows
79
- */
80
- public function render_rows(){
81
- foreach ( $this->groups as $_group ){
82
- $this->render_row( $_group );
83
- $this->render_form_row( $_group );
84
- }
85
- }
86
-
87
-
88
- /**
89
- * render a single row
90
- *
91
- * @param obj $group the ad group object
92
- */
93
- public function render_row( Advanced_Ads_Group $group ) {
94
- $file = ADVADS_BASE_PATH . 'admin/views/ad-group-list-row.php';
95
- require($file);
96
- }
97
-
98
- /**
99
- * render the form row of a group
100
- *
101
- * @param obj $group the ad group object
102
- */
103
- public function render_form_row(Advanced_Ads_Group $group){
104
-
105
- // query ads
106
- $ads = $this->get_ads( $group );
107
-
108
- $weights = $group->get_ad_weights();
109
- $ad_form_rows = $weights;
110
- arsort( $ad_form_rows );
111
-
112
- // The Loop
113
- if ( $ads->post_count ) {
114
- foreach ( $ads->posts as $_ad ) {
115
- $row = '';
116
- $ad_id = $_ad->ID;
117
- $row .= '<tr data-ad-id="'. $ad_id . '"><td>' . $_ad->post_title . '</td><td>';
118
- $row .= '<select name="advads-groups['. $group->id . '][ads]['.$_ad->ID.']">';
119
- $ad_weight = (isset($weights[$ad_id])) ? $weights[$ad_id] : Advanced_Ads_Group::MAX_AD_GROUP_WEIGHT;
120
- for ( $i = 0; $i <= Advanced_Ads_Group::MAX_AD_GROUP_WEIGHT; $i++ ) {
121
- $row .= '<option ' . selected( $ad_weight, $i, false ) . '>' . $i . '</option>';
122
- }
123
- $row .= '</select</td><td><button type="button" class="advads-remove-ad-from-group button">x</button></td></tr>';
124
- $ad_form_rows[$_ad->ID] = $row;
125
- }
126
- }
127
- $ad_form_rows = $this->remove_empty_weights( $ad_form_rows );
128
- // Restore original Post Data
129
- wp_reset_postdata();
130
-
131
- $ads_for_select = $this->ads_for_select();
132
- $new_ad_weights = '<select class="advads-group-add-ad-list-weights">';
133
- for ( $i = 0; $i <= Advanced_Ads_Group::MAX_AD_GROUP_WEIGHT; $i++ ) {
134
- $new_ad_weights .= '<option ' . selected( 10, $i, false ) . '>' . $i . '</option>';
135
- }
136
- $new_ad_weights .= '</select>';
137
-
138
- $file = ADVADS_BASE_PATH . 'admin/views/ad-group-list-form-row.php';
139
- require($file);
140
- }
141
-
142
- /**
143
- * render the ads list
144
- *
145
- * @param $obj $group group object
146
- */
147
- public function render_ads_list(Advanced_Ads_Group $group){
148
-
149
- $ads = $this->get_ads( $group );
150
-
151
- $weights = $group->get_ad_weights();
152
- $weight_sum = array_sum( $weights );
153
- $ads_output = $weights;
154
- arsort( $ads_output );
155
-
156
- // The Loop
157
- if ( $ads->have_posts() ) {
158
- echo ($group->type == 'default' && $weight_sum) ? '<ul>' : '<ol>';
159
- while ( $ads->have_posts() ) {
160
- $ads->the_post();
161
- $line_output = '<li><a href="' . get_edit_post_link( get_the_ID() ) . '">' . get_the_title() . '</a>';
162
-
163
- $_weight = (isset($weights[get_the_ID()])) ? $weights[get_the_ID()] : Advanced_Ads_Group::MAX_AD_GROUP_WEIGHT;
164
- if ( $group->type == 'default' && $weight_sum ) {
165
- $line_output .= '<span class="ad-weight" title="'.__( 'Ad weight', 'advanced-ads' ).'">' . number_format( ($_weight / $weight_sum) * 100 ) .'%</span>';
166
- }
167
-
168
- $ad = new Advanced_Ads_Ad( get_the_ID() );
169
- $expiry_date_format = get_option( 'date_format' ). ', ' . get_option( 'time_format' );
170
- $post_start = get_the_date('U', $ad->id );
171
-
172
- if ( $post_start > time() ) {
173
- $line_output .= '<br />' . sprintf( __( 'starts %s', 'advanced-ads' ), date( $expiry_date_format, $post_start ) );
174
- }
175
- if ( isset( $ad->expiry_date ) && $ad->expiry_date ) {
176
- $expiry = $ad->expiry_date;
177
- $expiry_date = date_create( '@' . $expiry );
178
- $tz_option = get_option( 'timezone_string' );
179
-
180
- if ( $tz_option ) {
181
- $expiry_date->setTimezone( Advanced_Ads_Admin::get_wp_timezone() );
182
- } else {
183
- $tz_name = Advanced_Ads_Admin::timezone_get_name( Advanced_Ads_Admin::get_wp_timezone() );
184
- $tz_offset = substr( $tz_name, 3 );
185
- $off_time = date_create( $expiry_date->format( 'Y-m-d\TH:i:s' ) . $tz_offset );
186
- $offset_in_sec = date_offset_get( $off_time );
187
- $expiry_date = date_create( '@' . ( $expiry + $offset_in_sec ) );
188
- }
189
-
190
- $TZ = ' ( ' . Advanced_Ads_Admin::timezone_get_name( Advanced_Ads_Admin::get_wp_timezone() ) . ' )';
191
- if ( $expiry > time() ) {
192
- $line_output .= '<br />' . sprintf( __( 'expires %s', 'advanced-ads' ), $expiry_date->format( $expiry_date_format ) ) . $TZ;
193
- } elseif ( $expiry <= time() ) {
194
- $line_output .= '<br />' . sprintf( __( '<strong>expired</strong> %s', 'advanced-ads' ), $expiry_date->format( $expiry_date_format ) ) . $TZ;
195
- }
196
- }
197
- $line_output .= '</li>';
198
-
199
- $ads_output[get_the_ID()] = $line_output;
200
- }
201
-
202
- $ads_output = $this->remove_empty_weights( $ads_output );
203
-
204
- echo implode( '', $ads_output );
205
- echo ($group->type == 'default' && $weight_sum) ? '</ul>' : '</ol>';
206
- if ( $group->ad_count === 'all' ) {
207
- echo '<p>' . __( 'all published ads are displayed', 'advanced-ads' ) . '</p>';
208
- } elseif ( $group->ad_count > 1 ) {
209
- echo '<p>' . sprintf( __( 'up to %d ads displayed', 'advanced-ads' ), $group->ad_count ) . '</p>';
210
- }
211
- } else {
212
- _e( 'No ads assigned', 'advanced-ads' );
213
- }
214
- // Restore original Post Data
215
- wp_reset_postdata();
216
- }
217
-
218
- /**
219
- * remove entries from the ad weight array that are just id
220
- *
221
- * @since 1.5.1
222
- * @param arr $ads_output array with any output other that an integer
223
- * @return arr $ads_output array with ad output
224
- */
225
- private function remove_empty_weights(array $ads_output){
226
-
227
- foreach ( $ads_output as $key => $value ){
228
- if ( is_int( $value ) ) {
229
- unset($ads_output[$key]); }
230
- }
231
-
232
- return $ads_output;
233
- }
234
-
235
- /**
236
- * get ads for this group
237
- *
238
- * @param obj $group group object
239
- * @return obj $ads WP_Query result with ads for this group
240
- */
241
- public function get_ads($group){
242
- $args = array(
243
- 'post_type' => $this->post_type,
244
- 'post_status' => array('publish', 'pending', 'future', 'private'),
245
- 'taxonomy' => $group->taxonomy,
246
- 'term' => $group->slug,
247
- 'posts_per_page' => -1
248
- );
249
- return $ads = new WP_Query( $args );
250
- }
251
-
252
- /**
253
- * list of all ads to display in select dropdown
254
- *
255
- * @return array
256
- */
257
- public function ads_for_select(){
258
- $select = array();
259
- $model = Advanced_Ads::get_instance()->get_model();
260
-
261
- // load all ads
262
- $ads = $model->get_ads( array('orderby' => 'title', 'order' => 'ASC') );
263
- foreach ( $ads as $_ad ){
264
- $select[ $_ad->ID ] = esc_html( $_ad->post_title );
265
- }
266
-
267
- return $select;
268
- }
269
-
270
- /**
271
- * return ad group types
272
- *
273
- * @return arr $types ad group information
274
- */
275
- public function get_ad_group_types(){
276
- $types = array(
277
- 'default' => array(
278
- 'title' => __( 'Random ads', 'advanced-ads' ),
279
- 'description' => __( 'Display random ads based on ad weight', 'advanced-ads' )
280
- ),
281
- 'ordered' => array(
282
- 'title' => __( 'Ordered ads', 'advanced-ads' ),
283
- 'description' => __( 'Display ads with the highest ad weight first', 'advanced-ads' ),
284
- )
285
- );
286
-
287
- return apply_filters( 'advanced-ads-group-types', $types );
288
- }
289
-
290
- /**
291
- * render ad group action links
292
- *
293
- * @param $obj $group group object
294
- */
295
- public function render_action_links($group){
296
- global $tax;
297
-
298
- $tax = get_taxonomy( $this->taxonomy );
299
-
300
- $actions = array();
301
- if ( current_user_can( $tax->cap->edit_terms ) ) {
302
- $actions['edit'] = '<a class="edit">' . __( 'Edit', 'advanced-ads' ) . '</a>';
303
- $actions['usage'] = '<a class="usage">' . __( 'Usage', 'advanced-ads' ) . '</a>';
304
- }
305
-
306
- if ( current_user_can( $tax->cap->delete_terms ) ){
307
- $args = array(
308
- 'action' => 'delete',
309
- 'group_id' => $group->id
310
- );
311
- $delete_link = self::group_page_url( $args );
312
- $actions['delete'] = "<a class='delete-tag' href='" . wp_nonce_url( $delete_link, 'delete-tag_' . $group->id ) . "'>" . __( 'Delete' ) . '</a>';
313
- }
314
-
315
- if ( ! count( $actions ) ) { return; }
316
-
317
- echo '<div class="row-actions">';
318
- foreach ( $actions as $action => $link ) {
319
- echo "<span class='$action'>$link</span>";
320
- }
321
- echo '</div>';
322
- }
323
-
324
- /**
325
- * bulk update groups
326
- *
327
- */
328
- public function update_groups(){
329
- // check nonce
330
- if ( ! isset( $_POST['advads-group-update-nonce'] )
331
- || ! wp_verify_nonce( $_POST['advads-group-update-nonce'], 'update-advads-groups' ) ){
332
-
333
- return new WP_Error( 'invalid_ad_group', __( 'Invalid Ad Group', 'advanced-ads' ) );
334
- }
335
-
336
- // check user rights
337
- if( ! current_user_can( Advanced_Ads_Plugin::user_cap( 'advanced_ads_edit_ads') ) ) {
338
- return new WP_Error( 'invalid_ad_group_rights', __( 'You don’t have permission to change the ad groups', 'advanced-ads' ) );
339
- }
340
-
341
- // empty group settings
342
- update_option( 'advads-ad-groups', array() );
343
- // empty weights
344
- update_option( 'advads-ad-weights', array() );
345
-
346
- // ad_id => group_ids
347
- $ad_groups_assoc = array();
348
-
349
- if ( isset( $_POST['advads-groups-removed-ads'] ) && is_array( $_POST['advads-groups-removed-ads'] ) ) {
350
- foreach ( $_POST['advads-groups-removed-ads'] as $ad_id ) {
351
- $ad_groups_assoc[ $ad_id ] = array();
352
- }
353
- }
354
-
355
- // iterate through groups
356
- if ( isset($_POST['advads-groups']) && count( $_POST['advads-groups'] ) ){
357
-
358
- foreach ( $_POST['advads-groups'] as $_group_id => $_group ){
359
- // save basic wp term
360
- wp_update_term( $_group_id, Advanced_Ads::AD_GROUP_TAXONOMY, $_group );
361
-
362
- $group = new Advanced_Ads_Group( $_group['id'] );
363
- if ( isset( $_group['ads'] ) && is_array( $_group['ads'] ) ) {
364
- // save ad weights
365
- $group->save_ad_weights( $_group['ads'] );
366
-
367
- foreach ( $_group['ads'] as $_ad_id => $_ad_weight ) {
368
- $ad_groups_assoc[ $_ad_id ][] = (int) $_group_id;
369
- }
370
- }
371
-
372
- // save other attributes
373
- $type = isset($_group['type']) ? $_group['type'] : 'default';
374
- $ad_count = isset($_group['ad_count']) ? $_group['ad_count'] : 1;
375
- $options = isset($_group['options']) ? $_group['options'] : array();
376
-
377
- // allow other add-ons to save their own group attributes
378
- $atts = apply_filters( 'advanced-ads-group-save-atts', array(
379
- 'type' => $type,
380
- 'ad_count' => $ad_count,
381
- 'options' => $options,
382
- ), $_group);
383
-
384
- $group->save( $atts );
385
- }
386
-
387
- foreach ( $ad_groups_assoc as $_ad_id => $group_ids ) {
388
- wp_set_object_terms( $_ad_id, $group_ids, $this->taxonomy);
389
- }
390
-
391
- }
392
-
393
- // reload groups
394
- $this->load_groups();
395
-
396
- return true;
397
- }
398
-
399
- /**
400
- * returns a link to the ad group list page
401
- *
402
- * @since 1.0.0
403
- * @param arr $args additional arguments, e.g. action or group_id
404
- * @return string admin url
405
- */
406
- public static function group_page_url($args = array()) {
407
- $plugin = Advanced_Ads::get_instance();
408
-
409
- $defaultargs = array(
410
- // 'post_type' => constant("Advanced_Ads::POST_TYPE_SLUG"),
411
- 'page' => 'advanced-ads-groups',
412
- );
413
- $args = $args + $defaultargs;
414
-
415
- return add_query_arg( $args, admin_url( 'admin.php' ) );
416
- }
417
-
418
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/includes/class-ad-type.php DELETED
@@ -1,561 +0,0 @@
1
- <?php
2
- defined( 'ABSPATH' ) || exit;
3
-
4
- class Advanced_Ads_Admin_Ad_Type {
5
- /**
6
- * Instance of this class.
7
- *
8
- * @var object
9
- */
10
- protected static $instance = null;
11
-
12
- /**
13
- * post type slug
14
- *
15
- * @since 1.0.0
16
- * @var string
17
- */
18
- protected $post_type = '';
19
-
20
- private function __construct() {
21
- // registering custom columns needs to work with and without DOING_AJAX
22
- add_filter( 'manage_advanced_ads_posts_columns', array($this, 'ad_list_columns_head') ); // extra column
23
- add_filter( 'manage_advanced_ads_posts_custom_column', array($this, 'ad_list_columns_content'), 10, 2 ); // extra column
24
- add_filter( 'manage_advanced_ads_posts_custom_column', array($this, 'ad_list_columns_timing'), 10, 2 ); // extra column
25
- add_action( 'restrict_manage_posts', array( $this, 'ad_list_add_filters') );
26
-
27
- // ad updated messages
28
- add_filter( 'bulk_post_updated_messages', array($this, 'ad_bulk_update_messages'), 10, 2 );
29
-
30
- // handling (ad) lists
31
- add_filter( 'request', array($this, 'ad_list_request') ); // order ads by title, not ID
32
- add_action( 'all_admin_notices', array($this, 'no_ads_yet_notice') );
33
-
34
- // save ads post type
35
- add_action( 'save_post', array($this, 'save_ad') );
36
- // delete ads post type
37
- add_action( 'delete_post', array($this, 'delete_ad') );
38
-
39
- // on post/ad edit screen
40
- add_action( 'edit_form_top', array($this, 'edit_form_above_title') );
41
- add_action( 'edit_form_after_title', array($this, 'edit_form_below_title') );
42
- add_action( 'dbx_post_sidebar', array($this, 'edit_form_end') );
43
- add_action( 'post_submitbox_misc_actions', array($this, 'add_submit_box_meta') );
44
-
45
- // ad updated messages
46
- add_filter( 'post_updated_messages', array($this, 'ad_update_messages') );
47
-
48
- $this->post_type = constant( 'Advanced_Ads::POST_TYPE_SLUG' );
49
-
50
- }
51
-
52
- /**
53
- * Return an instance of this class.
54
- *
55
- * @return object A single instance of this class.
56
- */
57
- public static function get_instance() {
58
- // If the single instance hasn't been set, set it now.
59
- if ( null == self::$instance ) {
60
- self::$instance = new self;
61
- }
62
-
63
- return self::$instance;
64
- }
65
-
66
- /**
67
- * add heading for extra column of ads list
68
- * remove the date column
69
- *
70
- * @since 1.3.3
71
- * @param arr $columns
72
- */
73
- public function ad_list_columns_head( $columns ){
74
- $new_columns = array();
75
- if( is_array( $columns ) ){
76
- foreach( $columns as $key => $value ) {
77
- $new_columns[ $key ] = $value;
78
- if ( $key == 'title' ){
79
- $new_columns[ 'ad_details' ] = __( 'Ad Details', 'advanced-ads' );
80
- $new_columns[ 'ad_timing' ] = __( 'Ad Planning', 'advanced-ads' );
81
- }
82
- }
83
- } else {
84
- $new_columns[ 'ad_details' ] = __( 'Ad Details', 'advanced-ads' );
85
- $new_columns[ 'ad_timing' ] = __( 'Ad Planning', 'advanced-ads' );
86
- }
87
-
88
- // white-listed columns
89
- $whitelist = apply_filters( 'advanced-ads-ad-list-allowed-columns', array(
90
- 'cb', // checkbox
91
- 'title',
92
- 'ad_details',
93
- 'ad_timing',
94
- 'taxonomy-advanced_ads_groups',
95
- ) );
96
-
97
- // remove non-white-listed columns
98
- foreach( $new_columns as $_key => $_value ){
99
- if( ! in_array( $_key, $whitelist ) ){
100
- unset( $new_columns[ $_key ] );
101
- }
102
- }
103
-
104
- return $new_columns;
105
- }
106
-
107
- /**
108
- * display ad details in ads list
109
- *
110
- * @since 1.3.3
111
- * @param string $column_name name of the column
112
- * @param int $ad_id id of the ad
113
- */
114
- public function ad_list_columns_content($column_name, $ad_id) {
115
- if ( $column_name == 'ad_details' ) {
116
- $ad = new Advanced_Ads_Ad( $ad_id );
117
-
118
- // load ad type title
119
- $types = Advanced_Ads::get_instance()->ad_types;
120
- $type = ( ! empty($types[$ad->type]->title)) ? $types[$ad->type]->title : 0;
121
-
122
- // load ad size
123
- $size = 0;
124
- if ( ! empty($ad->width) || ! empty($ad->height) ) {
125
- $size = sprintf( '%d x %d', $ad->width, $ad->height );
126
- }
127
-
128
- $size = apply_filters( 'advanced-ads-list-ad-size', $size, $ad );
129
-
130
- include ADVADS_BASE_PATH . 'admin/views/ad-list-details-column.php';
131
- }
132
- }
133
-
134
- /**
135
- * display ad details in ads list
136
- *
137
- * @since 1.6.11
138
- * @param string $column_name name of the column
139
- * @param int $ad_id id of the ad
140
- */
141
- public function ad_list_columns_timing($column_name, $ad_id) {
142
- if ( $column_name == 'ad_timing' ) {
143
- $ad = new Advanced_Ads_Ad( $ad_id );
144
-
145
- $expiry = false;
146
- $post_future = false;
147
- $post_start = get_the_date('U', $ad->id );
148
- $html_classes = 'advads-filter-timing';
149
- $expiry_date_format = get_option( 'date_format' ). ', ' . get_option( 'time_format' );
150
-
151
- if( isset( $ad->expiry_date ) && $ad->expiry_date ){
152
- $html_classes .= ' advads-filter-any-exp-date';
153
-
154
- $expiry = $ad->expiry_date;
155
- if( $ad->expiry_date < time() ){
156
- $html_classes .= ' advads-filter-expired';
157
- }
158
- }
159
- if( $post_start > time() ){
160
- $post_future = $post_start;
161
- $html_classes .= ' advads-filter-future';
162
- }
163
-
164
- include ADVADS_BASE_PATH . 'admin/views/ad-list-timing-column.php';
165
- }
166
- }
167
-
168
- /**
169
- * adds filter dropdowns before the 'Filter' button on the ad list table
170
- */
171
- function ad_list_add_filters() {
172
- $screen = get_current_screen();
173
- if ( ! isset( $screen->id ) || $screen->id !== 'edit-advanced_ads' ) {
174
- return;
175
- }
176
-
177
- include ADVADS_BASE_PATH . 'admin/views/ad-list-filters.php';
178
- }
179
-
180
- /**
181
- * edit ad bulk update messages
182
- *
183
- * @since 1.4.7
184
- * @param arr $messages existing bulk update messages
185
- * @param arr $counts numbers of updated ads
186
- * @return arr $messages
187
- *
188
- * @see wp-admin/edit.php
189
- */
190
- public function ad_bulk_update_messages(array $messages, array $counts){
191
- $post = get_post();
192
-
193
- $messages[Advanced_Ads::POST_TYPE_SLUG] = array(
194
- 'updated' => _n( '%s ad updated.', '%s ads updated.', $counts['updated'] ),
195
- 'locked' => _n( '%s ad not updated, somebody is editing it.', '%s ads not updated, somebody is editing them.', $counts['locked'] ),
196
- 'deleted' => _n( '%s ad permanently deleted.', '%s ads permanently deleted.', $counts['deleted'] ),
197
- 'trashed' => _n( '%s ad moved to the Trash.', '%s ads moved to the Trash.', $counts['trashed'] ),
198
- 'untrashed' => _n( '%s ad restored from the Trash.', '%s ads restored from the Trash.', $counts['untrashed'] ),
199
- );
200
-
201
- return $messages;
202
- }
203
-
204
- /**
205
- * order ads by title on ads list
206
- *
207
- * @since 1.3.18
208
- * @param arr $vars array with request vars
209
- */
210
- public function ad_list_request($vars){
211
-
212
- // order ads by title on ads list
213
- if ( is_admin() && empty( $vars['orderby'] ) && $this->post_type == $vars['post_type'] ) {
214
- $vars = array_merge( $vars, array(
215
- 'orderby' => 'title',
216
- 'order' => 'ASC'
217
- ) );
218
- }
219
-
220
- return $vars;
221
- }
222
-
223
- /**
224
- * show instructions to create first ad above the ad list
225
- *
226
- * @return type
227
- */
228
- public function no_ads_yet_notice(){
229
- $screen = get_current_screen();
230
- if ( ! isset( $screen->id ) || $screen->id !== 'edit-advanced_ads' ) {
231
- return;
232
- }
233
-
234
- // get number of ads
235
- $recent_ads = Advanced_Ads::get_instance()->get_model()->get_ads();
236
-
237
- // only display if there are no more than 2 ads
238
- if( 3 > count( $recent_ads ) ){
239
- include ADVADS_BASE_PATH . 'admin/views/ad-list-no-ads.php';
240
- }
241
- }
242
-
243
-
244
- /**
245
- * prepare the ad post type to be saved
246
- *
247
- * @since 1.0.0
248
- * @param int $post_id id of the post
249
- * @todo handling this more dynamic based on ad type
250
- */
251
- public function save_ad($post_id) {
252
-
253
- // only use for ads, no other post type
254
- if ( ! isset($_POST['post_type']) || $this->post_type != $_POST['post_type'] || ! isset($_POST['advanced_ad']['type']) ) {
255
- return;
256
- }
257
-
258
- // don’t do this on revisions
259
- if ( wp_is_post_revision( $post_id ) ) {
260
- return;
261
- }
262
-
263
- // get ad object
264
- $ad = new Advanced_Ads_Ad( $post_id );
265
- if ( ! $ad instanceof Advanced_Ads_Ad ) {
266
- return;
267
- }
268
-
269
- // filter to allow change of submitted ad settings
270
- $_POST['advanced_ad'] = apply_filters( 'advanced-ads-ad-settings-pre-save', $_POST['advanced_ad'] );
271
-
272
- $ad->type = $_POST['advanced_ad']['type'];
273
- if ( isset($_POST['advanced_ad']['output']) ) {
274
- $ad->set_option( 'output', $_POST['advanced_ad']['output'] );
275
- } else {
276
- $ad->set_option( 'output', array() );
277
- }
278
- /**
279
- * deprecated since introduction of "visitors" in 1.5.4
280
- */
281
- if ( isset($_POST['advanced_ad']['visitor']) ) {
282
- $ad->set_option( 'visitor', $_POST['advanced_ad']['visitor'] );
283
- } else {
284
- $ad->set_option( 'visitor', array() );
285
- }
286
- // visitor conditions
287
- if ( isset($_POST['advanced_ad']['visitors']) ) {
288
- $ad->set_option( 'visitors', $_POST['advanced_ad']['visitors'] );
289
- } else {
290
- $ad->set_option( 'visitors', array() );
291
- }
292
- $ad->url = 0;
293
- if ( isset($_POST['advanced_ad']['url']) ) {
294
- $ad->url = esc_url( $_POST['advanced_ad']['url'] );
295
- }
296
- // save size
297
- $ad->width = 0;
298
- if ( isset($_POST['advanced_ad']['width']) ) {
299
- $ad->width = absint( $_POST['advanced_ad']['width'] );
300
- }
301
- $ad->height = 0;
302
- if ( isset($_POST['advanced_ad']['height']) ) {
303
- $ad->height = absint( $_POST['advanced_ad']['height'] );
304
- }
305
-
306
- if ( ! empty($_POST['advanced_ad']['description']) ) {
307
- $ad->description = esc_textarea( $_POST['advanced_ad']['description'] ); }
308
- else { $ad->description = ''; }
309
-
310
- if ( ! empty($_POST['advanced_ad']['content']) ) {
311
- $ad->content = $_POST['advanced_ad']['content']; }
312
- else { $ad->content = ''; }
313
-
314
- if ( ! empty($_POST['advanced_ad']['conditions']) ){
315
- $ad->conditions = $_POST['advanced_ad']['conditions'];
316
- } else {
317
- $ad->conditions = array();
318
- }
319
- // prepare expiry date
320
- if ( isset($_POST['advanced_ad']['expiry_date']['enabled']) ) {
321
- $year = absint( $_POST['advanced_ad']['expiry_date']['year'] );
322
- $month = absint( $_POST['advanced_ad']['expiry_date']['month'] );
323
- $day = absint( $_POST['advanced_ad']['expiry_date']['day'] );
324
- $hour = absint( $_POST['advanced_ad']['expiry_date']['hour'] );
325
- $minute = absint( $_POST['advanced_ad']['expiry_date']['minute'] );
326
-
327
- $expiration_date = sprintf( "%04d-%02d-%02d %02d:%02d:%02d", $year, $month, $day, $hour, $minute, '00' );
328
- $valid_date = wp_checkdate( $month, $day, $year, $expiration_date );
329
-
330
- if ( !$valid_date ) {
331
- $ad->expiry_date = 0;
332
- } else {
333
- $_gmDate = date_create( $expiration_date, Advanced_Ads_Admin::get_wp_timezone() );
334
- $_gmDate->setTimezone( new DateTimeZone( 'UTC' ) );
335
- $gmDate = $_gmDate->format( 'Y-m-d-H-i' );
336
- list( $year, $month, $day, $hour, $minute ) = explode( '-', $gmDate );
337
- $ad->expiry_date = gmmktime($hour, $minute, 0, $month, $day, $year);
338
- }
339
- } else {
340
- $ad->expiry_date = 0;
341
- }
342
-
343
- $image_id = ( isset( $_POST['advanced_ad']['output']['image_id'] ) ) ? absint( $_POST['advanced_ad']['output']['image_id'] ) : 0;
344
- if ( $image_id ) {
345
- $all_posts_id = get_post_meta( $image_id, '_advanced-ads_parent_id' );
346
-
347
- if ( ! in_array ( $post_id, $all_posts_id ) ) {
348
- add_post_meta( $image_id, '_advanced-ads_parent_id', $post_id, false );
349
- }
350
- }
351
-
352
- $ad->save();
353
- }
354
-
355
- /**
356
- * prepare the ad post type to be removed
357
- *
358
- * @param int $post_id id of the post
359
- */
360
- public function delete_ad( $post_id ) {
361
- global $wpdb;
362
-
363
- if ( ! current_user_can( 'delete_posts' ) ) {
364
- return;
365
- }
366
-
367
- if ( $post_id > 0 ) {
368
- $post_type = get_post_type( $post_id );
369
- if ( $post_type == $this->post_type ) {
370
- $wpdb->query(
371
- $wpdb->prepare( "DELETE FROM $wpdb->postmeta WHERE meta_key = %s AND meta_value = %d", '_advanced-ads_parent_id', $post_id )
372
- );
373
- }
374
- }
375
- }
376
-
377
- /**
378
- * add information above the ad title
379
- *
380
- * @since 1.5.6
381
- * @param obj $post
382
- */
383
- public function edit_form_above_title($post){
384
- if ( ! isset($post->post_type) || $post->post_type != $this->post_type ) {
385
- return;
386
- }
387
- $ad = new Advanced_Ads_Ad( $post->ID );
388
-
389
- $placement_types = Advanced_Ads_Placements::get_placement_types();
390
- $placements = Advanced_Ads::get_ad_placements_array(); // -TODO use model
391
-
392
- include ADVADS_BASE_PATH . 'admin/views/ad-info-top.php';
393
- }
394
-
395
- /**
396
- * add information about the ad below the ad title
397
- *
398
- * @since 1.1.0
399
- * @param obj $post
400
- */
401
- public function edit_form_below_title($post){
402
- if ( ! isset($post->post_type) || $post->post_type != $this->post_type ) {
403
- return;
404
- }
405
- $ad = new Advanced_Ads_Ad( $post->ID );
406
-
407
- include ADVADS_BASE_PATH . 'admin/views/ad-info.php';
408
- }
409
-
410
- /**
411
- * add information below the ad edit form
412
- *
413
- * @since 1.7.3
414
- * @param obj $post
415
- */
416
- public function edit_form_end($post){
417
- if ( ! isset($post->post_type) || $post->post_type != $this->post_type ) {
418
- return;
419
- }
420
-
421
- include ADVADS_BASE_PATH . 'admin/views/ad-info-bottom.php';
422
- }
423
-
424
- /**
425
- * add meta values below submit box
426
- *
427
- * @since 1.3.15
428
- */
429
- public function add_submit_box_meta(){
430
- global $post, $wp_locale;
431
-
432
- if ( $post->post_type !== Advanced_Ads::POST_TYPE_SLUG ) { return; }
433
-
434
- $ad = new Advanced_Ads_Ad( $post->ID );
435
-
436
- // get time set for ad or current timestamp (both GMT)
437
- $utc_ts = $ad->expiry_date ? $ad->expiry_date : time();
438
- $utc_time = date_create( '@' . $utc_ts );
439
- $tz_option = get_option( 'timezone_string' );
440
- $exp_time = clone( $utc_time );
441
-
442
- if ( $tz_option ) {
443
- $exp_time->setTimezone( Advanced_Ads_Admin::get_wp_timezone() );
444
- } else {
445
- $tz_name = Advanced_Ads_Admin::timezone_get_name( Advanced_Ads_Admin::get_wp_timezone() );
446
- $tz_offset = substr( $tz_name, 3 );
447
- $off_time = date_create( $utc_time->format( 'Y-m-d\TH:i:s' ) . $tz_offset );
448
- $offset_in_sec = date_offset_get( $off_time );
449
- $exp_time = date_create( '@' . ( $utc_ts + $offset_in_sec ) );
450
- }
451
-
452
- list( $curr_year, $curr_month, $curr_day, $curr_hour, $curr_minute ) = explode( '-', $exp_time->format( 'Y-m-d-H-i' ) );
453
- $enabled = 1 - empty($ad->expiry_date);
454
-
455
- include ADVADS_BASE_PATH . 'admin/views/ad-submitbox-meta.php';
456
- }
457
-
458
- /**
459
- * edit ad update messages
460
- *
461
- * @since 1.4.7
462
- * @param arr $messages existing post update messages
463
- * @return arr $messages
464
- *
465
- * @see wp-admin/edit-form-advanced.php
466
- */
467
- public function ad_update_messages($messages = array()){
468
- $post = get_post();
469
-
470
- // added to hide error message caused by third party code that uses post_updated_messages filter wrong
471
- if( ! is_array( $messages )){
472
- return $messages;
473
- }
474
-
475
- $messages[Advanced_Ads::POST_TYPE_SLUG] = array(
476
- 0 => '', // Unused. Messages start at index 1.
477
- 1 => __( 'Ad updated.', 'advanced-ads' ),
478
- 4 => __( 'Ad updated.', 'advanced-ads' ),
479
- /* translators: %s: date and time of the revision */
480
- 5 => isset( $_GET['revision'] ) ? sprintf( __( 'Ad restored to revision from %s', 'advanced-ads' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
481
- 6 => __( 'Ad published.', 'advanced-ads' ) . ' ' . sprintf(__( 'Ad not showing up? Take a look <a href="%s" target="_blank">here</a>', 'advanced-ads' ), ADVADS_URL . 'manual/ads-not-showing-up/#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-ad-not-visible'),
482
- 7 => __( 'Ad saved.', 'advanced-ads' ),
483
- 8 => __( 'Ad submitted.', 'advanced-ads' ),
484
- 9 => sprintf(
485
- __( 'Ad scheduled for: <strong>%1$s</strong>.', 'advanced-ads' ),
486
- // translators: Publish box date format, see http://php.net/date
487
- date_i18n( __( 'M j, Y @ G:i', 'advanced-ads' ), strtotime( $post->post_date ) )
488
- ),
489
- 10 => __( 'Ad draft updated.', 'advanced-ads' )
490
- );
491
- return $messages;
492
- }
493
-
494
- /**
495
- * whether to show the wizard welcome message or not
496
- *
497
- * @since 1.7.4
498
- * @return bool true, if wizard welcome message should be displayed
499
- */
500
- public function show_wizard_welcome(){
501
- $user_id = get_current_user_id();
502
- if( ! $user_id ) {
503
- return true;
504
- }
505
-
506
- $hide_wizard = get_user_meta( $user_id, 'advanced-ads-hide-wizard', true );
507
- global $post;
508
-
509
- return ( ! $hide_wizard && 'edit' !== $post->filter ) ? true : false;
510
- }
511
-
512
- /**
513
- * whether to start the wizard by default or not
514
- *
515
- * @since 1.7.4
516
- * return bool true, if wizard should start automatically
517
- */
518
- public function start_wizard_automatically(){
519
- $user_id = get_current_user_id();
520
- if( ! $user_id ) {
521
- return true;
522
- }
523
-
524
- $hide_wizard = get_user_meta( $user_id, 'advanced-ads-hide-wizard', true );
525
- global $post;
526
-
527
- // true if the wizard was never started or closed
528
- return ( ( ! $hide_wizard && 'edit' !== $post->filter ) || 'false'=== $hide_wizard ) ? true : false;
529
- }
530
-
531
- /**
532
- * Check if an ad is not valid for 'Post Content' placement
533
- *
534
- * @param obj $ad Advanced_Ads_Ad object
535
- * @return string with error if not valid, bool false if valid
536
- */
537
- public static function check_ad_dom_is_not_valid( Advanced_Ads_Ad $ad ) {
538
- $adContent = ( isset( $ad->content ) ) ? $ad->content : '';
539
- if ( ! $adContent ) {
540
- return false;
541
- }
542
-
543
- $wpCharset = get_bloginfo('charset');
544
- $adDom = new DOMDocument('1.0', $wpCharset);
545
-
546
- $libxml_previous_state = libxml_use_internal_errors( true );
547
- // clear existing errors
548
- libxml_clear_errors();
549
- // source for this regex: http://stackoverflow.com/questions/17852537/preg-replace-only-specific-part-of-string
550
- $adContent = preg_replace('#(document.write.+)</(.*)#', '$1<\/$2', $adContent); // escapes all closing html tags
551
- $adDom->loadHtml('<!DOCTYPE html><html><meta http-equiv="Content-Type" content="text/html; charset=' . $wpCharset . '" /><body>' . $adContent);
552
- // log errors
553
- if( libxml_get_last_error() instanceof LibXMLError ) {
554
- return print_r( libxml_get_last_error(), true );
555
- }
556
-
557
- libxml_use_internal_errors( $libxml_previous_state );
558
- return false;
559
- }
560
-
561
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/includes/class-list-table.php ADDED
@@ -0,0 +1,969 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Base class for displaying a list of items in an ajaxified HTML table.
4
+ *
5
+ * Derrived from WP_List_Table WordPress 3.9
6
+ * @link http://codex.wordpress.org/Class_Reference/WP_List_Table
7
+ *
8
+ * @package WordPress
9
+ * @subpackage List_Table
10
+ * @since 3.1.0
11
+ */
12
+
13
+ class AdvAds_List_Table {
14
+
15
+ /**
16
+ * The current list of items
17
+ *
18
+ * @since 3.1.0
19
+ * @var array
20
+ * @access protected
21
+ */
22
+ var $items;
23
+
24
+ /**
25
+ * Various information about the current table
26
+ *
27
+ * @since 3.1.0
28
+ * @var array
29
+ * @access private
30
+ */
31
+ var $_args;
32
+
33
+ /**
34
+ * Various information needed for displaying the pagination
35
+ *
36
+ * @since 3.1.0
37
+ * @var array
38
+ * @access private
39
+ */
40
+ var $_pagination_args = array();
41
+
42
+ /**
43
+ * The current screen
44
+ *
45
+ * @since 3.1.0
46
+ * @var object
47
+ * @access protected
48
+ */
49
+ var $screen;
50
+
51
+ /**
52
+ * Cached bulk actions
53
+ *
54
+ * @since 3.1.0
55
+ * @var array
56
+ * @access private
57
+ */
58
+ var $_actions;
59
+
60
+ /**
61
+ * Cached pagination output
62
+ *
63
+ * @since 3.1.0
64
+ * @var string
65
+ * @access private
66
+ */
67
+ var $_pagination;
68
+
69
+ /**
70
+ * Constructor. The child class should call this constructor from its own constructor
71
+ *
72
+ * @param array $args An associative array with information about the current table
73
+ * @access protected
74
+ */
75
+ function __construct( $args = array() ) {
76
+ $args = wp_parse_args( $args, array(
77
+ 'plural' => '',
78
+ 'singular' => '',
79
+ 'ajax' => false,
80
+ 'screen' => null,
81
+ ) );
82
+
83
+ $this->screen = convert_to_screen( $args['screen'] );
84
+
85
+ add_filter( "manage_{$this->screen->id}_columns", array( $this, 'get_columns' ), 0 );
86
+
87
+ if ( !$args['plural'] )
88
+ $args['plural'] = $this->screen->base;
89
+
90
+ $args['plural'] = sanitize_key( $args['plural'] );
91
+ $args['singular'] = sanitize_key( $args['singular'] );
92
+
93
+ $this->_args = $args;
94
+
95
+ if ( $args['ajax'] ) {
96
+ // wp_enqueue_script( 'list-table' );
97
+ add_action( 'admin_footer', array( $this, '_js_vars' ) );
98
+ }
99
+ }
100
+
101
+ /**
102
+ * Checks the current user's permissions
103
+ * @uses wp_die()
104
+ *
105
+ * @since 3.1.0
106
+ * @access public
107
+ * @abstract
108
+ */
109
+ function ajax_user_can() {
110
+ die( 'function WP_List_Table::ajax_user_can() must be over-ridden in a sub-class.' );
111
+ }
112
+
113
+ /**
114
+ * Prepares the list of items for displaying.
115
+ * @uses WP_List_Table::set_pagination_args()
116
+ *
117
+ * @since 3.1.0
118
+ * @access public
119
+ * @abstract
120
+ */
121
+ function prepare_items() {
122
+ die( 'function WP_List_Table::prepare_items() must be over-ridden in a sub-class.' );
123
+ }
124
+
125
+ /**
126
+ * An internal method that sets all the necessary pagination arguments
127
+ *
128
+ * @param array $args An associative array with information about the pagination
129
+ * @access protected
130
+ */
131
+ function set_pagination_args( $args ) {
132
+ $args = wp_parse_args( $args, array(
133
+ 'total_items' => 0,
134
+ 'total_pages' => 0,
135
+ 'per_page' => 0,
136
+ ) );
137
+
138
+ if ( !$args['total_pages'] && $args['per_page'] > 0 )
139
+ $args['total_pages'] = ceil( $args['total_items'] / $args['per_page'] );
140
+
141
+ // redirect if page number is invalid and headers are not already sent
142
+ if ( ! headers_sent() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) && $args['total_pages'] > 0 && $this->get_pagenum() > $args['total_pages'] ) {
143
+ wp_redirect( add_query_arg( 'paged', $args['total_pages'] ) );
144
+ exit;
145
+ }
146
+
147
+ $this->_pagination_args = $args;
148
+ }
149
+
150
+ /**
151
+ * Access the pagination args
152
+ *
153
+ * @since 3.1.0
154
+ * @access public
155
+ *
156
+ * @param string $key
157
+ * @return array
158
+ */
159
+ function get_pagination_arg( $key ) {
160
+ if ( 'page' == $key )
161
+ return $this->get_pagenum();
162
+
163
+ if ( isset( $this->_pagination_args[$key] ) )
164
+ return $this->_pagination_args[$key];
165
+ }
166
+
167
+ /**
168
+ * Whether the table has items to display or not
169
+ *
170
+ * @since 3.1.0
171
+ * @access public
172
+ *
173
+ * @return bool
174
+ */
175
+ function has_items() {
176
+ return !empty( $this->items );
177
+ }
178
+
179
+ /**
180
+ * Message to be displayed when there are no items
181
+ *
182
+ * @since 3.1.0
183
+ * @access public
184
+ */
185
+ function no_items() {
186
+ _e( 'No items found.' );
187
+ }
188
+
189
+ /**
190
+ * Display the search box.
191
+ *
192
+ * @since 3.1.0
193
+ * @access public
194
+ *
195
+ * @param string $text The search button text
196
+ * @param string $input_id The search input id
197
+ */
198
+ function search_box( $text, $input_id ) {
199
+ if ( empty( $_REQUEST['s'] ) && !$this->has_items() )
200
+ return;
201
+
202
+ $input_id = $input_id . '-search-input';
203
+
204
+ if ( ! empty( $_REQUEST['orderby'] ) )
205
+ echo '<input type="hidden" name="orderby" value="' . esc_attr( $_REQUEST['orderby'] ) . '" />';
206
+ if ( ! empty( $_REQUEST['order'] ) )
207
+ echo '<input type="hidden" name="order" value="' . esc_attr( $_REQUEST['order'] ) . '" />';
208
+ if ( ! empty( $_REQUEST['post_mime_type'] ) )
209
+ echo '<input type="hidden" name="post_mime_type" value="' . esc_attr( $_REQUEST['post_mime_type'] ) . '" />';
210
+ if ( ! empty( $_REQUEST['detached'] ) )
211
+ echo '<input type="hidden" name="detached" value="' . esc_attr( $_REQUEST['detached'] ) . '" />';
212
+ ?>
213
+ <p class="search-box">
214
+ <label class="screen-reader-text" for="<?php echo $input_id ?>"><?php echo $text; ?>:</label>
215
+ <input type="search" id="<?php echo $input_id ?>" name="s" value="<?php _admin_search_query(); ?>" />
216
+ <?php submit_button( $text, 'button', false, false, array('id' => 'search-submit') ); ?>
217
+ </p>
218
+ <?php
219
+ }
220
+
221
+ /**
222
+ * Get an associative array ( id => link ) with the list
223
+ * of views available on this table.
224
+ *
225
+ * @since 3.1.0
226
+ * @access protected
227
+ *
228
+ * @return array
229
+ */
230
+ function get_views() {
231
+ return array();
232
+ }
233
+
234
+ /**
235
+ * Display the list of views available on this table.
236
+ *
237
+ * @since 3.1.0
238
+ * @access public
239
+ */
240
+ function views() {
241
+ $views = $this->get_views();
242
+ /**
243
+ * Filter the list of available list table views.
244
+ *
245
+ * The dynamic portion of the hook name, $this->screen->id, refers
246
+ * to the ID of the current screen, usually a string.
247
+ *
248
+ * @since 3.5.0
249
+ *
250
+ * @param array $views An array of available list table views.
251
+ */
252
+ $views = apply_filters( "views_{$this->screen->id}", $views );
253
+
254
+ if ( empty( $views ) )
255
+ return;
256
+
257
+ echo "<ul class='subsubsub'>\n";
258
+ foreach ( $views as $class => $view ) {
259
+ $views[ $class ] = "\t<li class='$class'>$view";
260
+ }
261
+ echo implode( " |</li>\n", $views ) . "</li>\n";
262
+ echo "</ul>";
263
+ }
264
+
265
+ /**
266
+ * Get an associative array ( option_name => option_title ) with the list
267
+ * of bulk actions available on this table.
268
+ *
269
+ * @since 3.1.0
270
+ * @access protected
271
+ *
272
+ * @return array
273
+ */
274
+ function get_bulk_actions() {
275
+ return array();
276
+ }
277
+
278
+ /**
279
+ * Display the bulk actions dropdown.
280
+ *
281
+ * @since 3.1.0
282
+ * @access public
283
+ */
284
+ function bulk_actions() {
285
+ if ( is_null( $this->_actions ) ) {
286
+ $no_new_actions = $this->_actions = $this->get_bulk_actions();
287
+ /**
288
+ * Filter the list table Bulk Actions drop-down.
289
+ *
290
+ * The dynamic portion of the hook name, $this->screen->id, refers
291
+ * to the ID of the current screen, usually a string.
292
+ *
293
+ * This filter can currently only be used to remove bulk actions.
294
+ *
295
+ * @since 3.5.0
296
+ *
297
+ * @param array $actions An array of the available bulk actions.
298
+ */
299
+ $this->_actions = apply_filters( "bulk_actions-{$this->screen->id}", $this->_actions );
300
+ $this->_actions = array_intersect_assoc( $this->_actions, $no_new_actions );
301
+ $two = '';
302
+ } else {
303
+ $two = '2';
304
+ }
305
+
306
+ if ( empty( $this->_actions ) )
307
+ return;
308
+
309
+ echo "<select name='action$two'>\n";
310
+ echo "<option value='-1' selected='selected'>" . __( 'Bulk Actions' ) . "</option>\n";
311
+
312
+ foreach ( $this->_actions as $name => $title ) {
313
+ $class = 'edit' == $name ? ' class="hide-if-no-js"' : '';
314
+
315
+ echo "\t<option value='$name'$class>$title</option>\n";
316
+ }
317
+
318
+ echo "</select>\n";
319
+
320
+ submit_button( __( 'Apply' ), 'action', false, false, array( 'id' => "doaction$two" ) );
321
+ echo "\n";
322
+ }
323
+
324
+ /**
325
+ * Get the current action selected from the bulk actions dropdown.
326
+ *
327
+ * @since 3.1.0
328
+ * @access public
329
+ *
330
+ * @return string|bool The action name or False if no action was selected
331
+ */
332
+ function current_action() {
333
+ if ( isset( $_REQUEST['action'] ) && -1 != $_REQUEST['action'] )
334
+ return $_REQUEST['action'];
335
+
336
+ if ( isset( $_REQUEST['action2'] ) && -1 != $_REQUEST['action2'] )
337
+ return $_REQUEST['action2'];
338
+
339
+ return false;
340
+ }
341
+
342
+ /**
343
+ * Generate row actions div
344
+ *
345
+ * @since 3.1.0
346
+ * @access protected
347
+ *
348
+ * @param array $actions The list of actions
349
+ * @param bool $always_visible Whether the actions should be always visible
350
+ * @return string
351
+ */
352
+ function row_actions( $actions, $always_visible = false ) {
353
+ $action_count = count( $actions );
354
+ $i = 0;
355
+
356
+ if ( !$action_count )
357
+ return '';
358
+
359
+ $out = '<div class="' . ( $always_visible ? 'row-actions visible' : 'row-actions' ) . '">';
360
+ foreach ( $actions as $action => $link ) {
361
+ ++$i;
362
+ ( $i == $action_count ) ? $sep = '' : $sep = ' | ';
363
+ $out .= "<span class='$action'>$link$sep</span>";
364
+ }
365
+ $out .= '</div>';
366
+
367
+ return $out;
368
+ }
369
+
370
+ /**
371
+ * Display a monthly dropdown for filtering items
372
+ *
373
+ * @since 3.1.0
374
+ * @access protected
375
+ */
376
+ function months_dropdown( $post_type ) {
377
+ global $wpdb, $wp_locale;
378
+
379
+ $months = $wpdb->get_results( $wpdb->prepare( "
380
+ SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month
381
+ FROM $wpdb->posts
382
+ WHERE post_type = %s
383
+ ORDER BY post_date DESC
384
+ ", $post_type ) );
385
+
386
+ /**
387
+ * Filter the 'Months' drop-down results.
388
+ *
389
+ * @since 3.7.0
390
+ *
391
+ * @param object $months The months drop-down query results.
392
+ * @param string $post_type The post type.
393
+ */
394
+ $months = apply_filters( 'months_dropdown_results', $months, $post_type );
395
+
396
+ $month_count = count( $months );
397
+
398
+ if ( !$month_count || ( 1 == $month_count && 0 == $months[0]->month ) )
399
+ return;
400
+
401
+ $m = isset( $_GET['m'] ) ? (int) $_GET['m'] : 0;
402
+ ?>
403
+ <select name='m'>
404
+ <option<?php selected( $m, 0 ); ?> value='0'><?php _e( 'Show all dates' ); ?></option>
405
+ <?php
406
+ foreach ( $months as $arc_row ) {
407
+ if ( 0 == $arc_row->year )
408
+ continue;
409
+
410
+ $month = zeroise( $arc_row->month, 2 );
411
+ $year = $arc_row->year;
412
+
413
+ printf( "<option %s value='%s'>%s</option>\n",
414
+ selected( $m, $year . $month, false ),
415
+ esc_attr( $arc_row->year . $month ),
416
+ /* translators: 1: month name, 2: 4-digit year */
417
+ sprintf( __( '%1$s %2$d' ), $wp_locale->get_month( $month ), $year )
418
+ );
419
+ }
420
+ ?>
421
+ </select>
422
+ <?php
423
+ }
424
+
425
+ /**
426
+ * Display a view switcher
427
+ *
428
+ * @since 3.1.0
429
+ * @access protected
430
+ */
431
+ function view_switcher( $current_mode ) {
432
+ $modes = array(
433
+ 'list' => __( 'List View' ),
434
+ 'excerpt' => __( 'Excerpt View' )
435
+ );
436
+
437
+ ?>
438
+ <input type="hidden" name="mode" value="<?php echo esc_attr( $current_mode ); ?>" />
439
+ <div class="view-switch">
440
+ <?php
441
+ foreach ( $modes as $mode => $title ) {
442
+ $class = ( $current_mode == $mode ) ? 'class="current"' : '';
443
+ echo "<a href='" . esc_url( add_query_arg( 'mode', $mode, $_SERVER['REQUEST_URI'] ) ) . "' $class><img id='view-switch-$mode' src='" . esc_url( includes_url( 'images/blank.gif' ) ) . "' width='20' height='20' title='$title' alt='$title' /></a>\n";
444
+ }
445
+ ?>
446
+ </div>
447
+ <?php
448
+ }
449
+
450
+ /**
451
+ * Display a comment count bubble
452
+ *
453
+ * @since 3.1.0
454
+ * @access protected
455
+ *
456
+ * @param int $post_id
457
+ * @param int $pending_comments
458
+ */
459
+ function comments_bubble( $post_id, $pending_comments ) {
460
+ $pending_phrase = sprintf( __( '%s pending' ), number_format( $pending_comments ) );
461
+
462
+ if ( $pending_comments )
463
+ echo '<strong>';
464
+
465
+ echo "<a href='" . esc_url( add_query_arg( 'p', $post_id, admin_url( 'edit-comments.php' ) ) ) . "' title='" . esc_attr( $pending_phrase ) . "' class='post-com-count'><span class='comment-count'>" . number_format_i18n( get_comments_number() ) . "</span></a>";
466
+
467
+ if ( $pending_comments )
468
+ echo '</strong>';
469
+ }
470
+
471
+ /**
472
+ * Get the current page number
473
+ *
474
+ * @since 3.1.0
475
+ * @access protected
476
+ *
477
+ * @return int
478
+ */
479
+ function get_pagenum() {
480
+ $pagenum = isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 0;
481
+
482
+ if( isset( $this->_pagination_args['total_pages'] ) && $pagenum > $this->_pagination_args['total_pages'] )
483
+ $pagenum = $this->_pagination_args['total_pages'];
484
+
485
+ return max( 1, $pagenum );
486
+ }
487
+
488
+ /**
489
+ * Get number of items to display on a single page
490
+ *
491
+ * @since 3.1.0
492
+ * @access protected
493
+ *
494
+ * @return int
495
+ */
496
+ function get_items_per_page( $option, $default = 20 ) {
497
+ $per_page = (int) get_user_option( $option );
498
+ if ( empty( $per_page ) || $per_page < 1 )
499
+ $per_page = $default;
500
+
501
+ /**
502
+ * Filter the number of items to be displayed on each page of the list table.
503
+ *
504
+ * The dynamic hook name, $option, refers to the per page option depending
505
+ * on the type of list table in use. Possible values may include:
506
+ * 'edit_comments_per_page', 'sites_network_per_page', 'site_themes_network_per_page',
507
+ * 'themes_netework_per_page', 'users_network_per_page', 'edit_{$post_type}', etc.
508
+ *
509
+ * @since 2.9.0
510
+ *
511
+ * @param int $per_page Number of items to be displayed. Default 20.
512
+ */
513
+ return (int) apply_filters( $option, $per_page );
514
+ }
515
+
516
+ /**
517
+ * Display the pagination.
518
+ *
519
+ * @since 3.1.0
520
+ * @access protected
521
+ */
522
+ function pagination( $which ) {
523
+ if ( empty( $this->_pagination_args ) )
524
+ return;
525
+
526
+ extract( $this->_pagination_args, EXTR_SKIP );
527
+
528
+ $output = '<span class="displaying-num">' . sprintf( _n( '1 item', '%s items', $total_items ), number_format_i18n( $total_items ) ) . '</span>';
529
+
530
+ $current = $this->get_pagenum();
531
+
532
+ $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
533
+
534
+ $current_url = remove_query_arg( array( 'hotkeys_highlight_last', 'hotkeys_highlight_first' ), $current_url );
535
+
536
+ $page_links = array();
537
+
538
+ $disable_first = $disable_last = '';
539
+ if ( $current == 1 )
540
+ $disable_first = ' disabled';
541
+ if ( $current == $total_pages )
542
+ $disable_last = ' disabled';
543
+
544
+ $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
545
+ 'first-page' . $disable_first,
546
+ esc_attr__( 'Go to the first page' ),
547
+ esc_url( remove_query_arg( 'paged', $current_url ) ),
548
+ '&laquo;'
549
+ );
550
+
551
+ $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
552
+ 'prev-page' . $disable_first,
553
+ esc_attr__( 'Go to the previous page' ),
554
+ esc_url( add_query_arg( 'paged', max( 1, $current-1 ), $current_url ) ),
555
+ '&lsaquo;'
556
+ );
557
+
558
+ if ( 'bottom' == $which )
559
+ $html_current_page = $current;
560
+ else
561
+ $html_current_page = sprintf( "<input class='current-page' title='%s' type='text' name='paged' value='%s' size='%d' />",
562
+ esc_attr__( 'Current page' ),
563
+ $current,
564
+ strlen( $total_pages )
565
+ );
566
+
567
+ $html_total_pages = sprintf( "<span class='total-pages'>%s</span>", number_format_i18n( $total_pages ) );
568
+ $page_links[] = '<span class="paging-input">' . sprintf( _x( '%1$s of %2$s', 'paging' ), $html_current_page, $html_total_pages ) . '</span>';
569
+
570
+ $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
571
+ 'next-page' . $disable_last,
572
+ esc_attr__( 'Go to the next page' ),
573
+ esc_url( add_query_arg( 'paged', min( $total_pages, $current+1 ), $current_url ) ),
574
+ '&rsaquo;'
575
+ );
576
+
577
+ $page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
578
+ 'last-page' . $disable_last,
579
+ esc_attr__( 'Go to the last page' ),
580
+ esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ),
581
+ '&raquo;'
582
+ );
583
+
584
+ $pagination_links_class = 'pagination-links';
585
+ if ( ! empty( $infinite_scroll ) )
586
+ $pagination_links_class = ' hide-if-js';
587
+ $output .= "\n<span class='$pagination_links_class'>" . join( "\n", $page_links ) . '</span>';
588
+
589
+ if ( $total_pages )
590
+ $page_class = $total_pages < 2 ? ' one-page' : '';
591
+ else
592
+ $page_class = ' no-pages';
593
+
594
+ $this->_pagination = "<div class='tablenav-pages{$page_class}'>$output</div>";
595
+
596
+ echo $this->_pagination;
597
+ }
598
+
599
+ /**
600
+ * Get a list of columns. The format is:
601
+ * 'internal-name' => 'Title'
602
+ *
603
+ * @since 3.1.0
604
+ * @access protected
605
+ * @abstract
606
+ *
607
+ * @return array
608
+ */
609
+ function get_columns() {
610
+ die( 'function WP_List_Table::get_columns() must be over-ridden in a sub-class.' );
611
+ }
612
+
613
+ /**
614
+ * Get a list of sortable columns. The format is:
615
+ * 'internal-name' => 'orderby'
616
+ * or
617
+ * 'internal-name' => array( 'orderby', true )
618
+ *
619
+ * The second format will make the initial sorting order be descending
620
+ *
621
+ * @since 3.1.0
622
+ * @access protected
623
+ *
624
+ * @return array
625
+ */
626
+ function get_sortable_columns() {
627
+ return array();
628
+ }
629
+
630
+ /**
631
+ * Get a list of all, hidden and sortable columns, with filter applied
632
+ *
633
+ * @since 3.1.0
634
+ * @access protected
635
+ *
636
+ * @return array
637
+ */
638
+ function get_column_info() {
639
+ if ( isset( $this->_column_headers ) )
640
+ return $this->_column_headers;
641
+
642
+ $columns = get_column_headers( $this->screen );
643
+ $hidden = get_hidden_columns( $this->screen );
644
+
645
+ $sortable_columns = $this->get_sortable_columns();
646
+ /**
647
+ * Filter the list table sortable columns for a specific screen.
648
+ *
649
+ * The dynamic portion of the hook name, $this->screen->id, refers
650
+ * to the ID of the current screen, usually a string.
651
+ *
652
+ * @since 3.5.0
653
+ *
654
+ * @param array $sortable_columns An array of sortable columns.
655
+ */
656
+ $_sortable = apply_filters( "manage_{$this->screen->id}_sortable_columns", $sortable_columns );
657
+
658
+ $sortable = array();
659
+ foreach ( $_sortable as $id => $data ) {
660
+ if ( empty( $data ) )
661
+ continue;
662
+
663
+ $data = (array) $data;
664
+ if ( !isset( $data[1] ) )
665
+ $data[1] = false;
666
+
667
+ $sortable[$id] = $data;
668
+ }
669
+
670
+ $this->_column_headers = array( $columns, $hidden, $sortable );
671
+
672
+ return $this->_column_headers;
673
+ }
674
+
675
+ /**
676
+ * Return number of visible columns
677
+ *
678
+ * @since 3.1.0
679
+ * @access public
680
+ *
681
+ * @return int
682
+ */
683
+ function get_column_count() {
684
+ list ( $columns, $hidden ) = $this->get_column_info();
685
+ $hidden = array_intersect( array_keys( $columns ), array_filter( $hidden ) );
686
+ return count( $columns ) - count( $hidden );
687
+ }
688
+
689
+ /**
690
+ * Print column headers, accounting for hidden and sortable columns.
691
+ *
692
+ * @since 3.1.0
693
+ * @access protected
694
+ *
695
+ * @param bool $with_id Whether to set the id attribute or not
696
+ */
697
+ function print_column_headers( $with_id = true ) {
698
+ list( $columns, $hidden, $sortable ) = $this->get_column_info();
699
+
700
+ $current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
701
+ $current_url = remove_query_arg( 'paged', $current_url );
702
+
703
+ if ( isset( $_GET['orderby'] ) )
704
+ $current_orderby = $_GET['orderby'];
705
+ else
706
+ $current_orderby = '';
707
+
708
+ if ( isset( $_GET['order'] ) && 'desc' == $_GET['order'] )
709
+ $current_order = 'desc';
710
+ else
711
+ $current_order = 'asc';
712
+
713
+ if ( ! empty( $columns['cb'] ) ) {
714
+ static $cb_counter = 1;
715
+ $columns['cb'] = '<label class="screen-reader-text" for="cb-select-all-' . $cb_counter . '">' . __( 'Select All' ) . '</label>'
716
+ . '<input id="cb-select-all-' . $cb_counter . '" type="checkbox" />';
717
+ $cb_counter++;
718
+ }
719
+
720
+ foreach ( $columns as $column_key => $column_display_name ) {
721
+ $class = array( 'manage-column', "column-$column_key" );
722
+
723
+ $style = '';
724
+ if ( in_array( $column_key, $hidden ) )
725
+ $style = 'display:none;';
726
+
727
+ $style = ' style="' . $style . '"';
728
+
729
+ if ( 'cb' == $column_key )
730
+ $class[] = 'check-column';
731
+ elseif ( in_array( $column_key, array( 'posts', 'comments', 'links' ) ) )
732
+ $class[] = 'num';
733
+
734
+ if ( isset( $sortable[$column_key] ) ) {
735
+ list( $orderby, $desc_first ) = $sortable[$column_key];
736
+
737
+ if ( $current_orderby == $orderby ) {
738
+ $order = 'asc' == $current_order ? 'desc' : 'asc';
739
+ $class[] = 'sorted';
740
+ $class[] = $current_order;
741
+ } else {
742
+ $order = $desc_first ? 'desc' : 'asc';
743
+ $class[] = 'sortable';
744
+ $class[] = $desc_first ? 'asc' : 'desc';
745
+ }
746
+
747
+ $column_display_name = '<a href="' . esc_url( add_query_arg( compact( 'orderby', 'order' ), $current_url ) ) . '"><span>' . $column_display_name . '</span><span class="sorting-indicator"></span></a>';
748
+ }
749
+
750
+ $id = $with_id ? "id='$column_key'" : '';
751
+
752
+ if ( !empty( $class ) )
753
+ $class = "class='" . join( ' ', $class ) . "'";
754
+
755
+ echo "<th scope='col' $id $class $style>$column_display_name</th>";
756
+ }
757
+ }
758
+
759
+ /**
760
+ * Display the table
761
+ *
762
+ * @since 3.1.0
763
+ * @access public
764
+ */
765
+ function display() {
766
+ extract( $this->_args );
767
+
768
+ $this->display_tablenav( 'top' );
769
+
770
+ ?>
771
+ <table class="wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>" cellspacing="0">
772
+ <thead>
773
+ <tr>
774
+ <?php $this->print_column_headers(); ?>
775
+ </tr>
776
+ </thead>
777
+
778
+ <tfoot>
779
+ <tr>
780
+ <?php $this->print_column_headers( false ); ?>
781
+ </tr>
782
+ </tfoot>
783
+
784
+ <tbody id="the-list"<?php if ( $singular ) echo " data-wp-lists='list:$singular'"; ?>>
785
+ <?php $this->display_rows_or_placeholder(); ?>
786
+ </tbody>
787
+ </table>
788
+ <?php
789
+ $this->display_tablenav( 'bottom' );
790
+ }
791
+
792
+ /**
793
+ * Get a list of CSS classes for the <table> tag
794
+ *
795
+ * @since 3.1.0
796
+ * @access protected
797
+ *
798
+ * @return array
799
+ */
800
+ function get_table_classes() {
801
+ return array( 'widefat', 'fixed', $this->_args['plural'] );
802
+ }
803
+
804
+ /**
805
+ * Generate the table navigation above or below the table
806
+ *
807
+ * @since 3.1.0
808
+ * @access protected
809
+ */
810
+ function display_tablenav( $which ) {
811
+ if ( 'top' == $which )
812
+ wp_nonce_field( 'bulk-' . $this->_args['plural'] );
813
+ ?>
814
+ <div class="tablenav <?php echo esc_attr( $which ); ?>">
815
+
816
+ <div class="alignleft actions bulkactions">
817
+ <?php $this->bulk_actions(); ?>
818
+ </div>
819
+ <?php
820
+ $this->extra_tablenav( $which );
821
+ $this->pagination( $which );
822
+ ?>
823
+
824
+ <br class="clear" />
825
+ </div>
826
+ <?php
827
+ }
828
+
829
+ /**
830
+ * Extra controls to be displayed between bulk actions and pagination
831
+ *
832
+ * @since 3.1.0
833
+ * @access protected
834
+ */
835
+ function extra_tablenav( $which ) {}
836
+
837
+ /**
838
+ * Generate the <tbody> part of the table
839
+ *
840
+ * @since 3.1.0
841
+ * @access protected
842
+ */
843
+ function display_rows_or_placeholder() {
844
+ if ( $this->has_items() ) {
845
+ $this->display_rows();
846
+ } else {
847
+ list( $columns, $hidden ) = $this->get_column_info();
848
+ echo '<tr class="no-items"><td class="colspanchange" colspan="' . $this->get_column_count() . '">';
849
+ $this->no_items();
850
+ echo '</td></tr>';
851
+ }
852
+ }
853
+
854
+ /**
855
+ * Generate the table rows
856
+ *
857
+ * @since 3.1.0
858
+ * @access protected
859
+ */
860
+ function display_rows() {
861
+ foreach ( $this->items as $item )
862
+ $this->single_row( $item );
863
+ }
864
+
865
+ /**
866
+ * Generates content for a single row of the table
867
+ *
868
+ * @since 3.1.0
869
+ * @access protected
870
+ *
871
+ * @param object $item The current item
872
+ */
873
+ function single_row( $item ) {
874
+ static $row_class = '';
875
+ $row_class = ( $row_class == '' ? ' class="alternate"' : '' );
876
+
877
+ echo '<tr' . $row_class . '>';
878
+ $this->single_row_columns( $item );
879
+ echo '</tr>';
880
+ }
881
+
882
+ /**
883
+ * Generates the columns for a single row of the table
884
+ *
885
+ * @since 3.1.0
886
+ * @access protected
887
+ *
888
+ * @param object $item The current item
889
+ */
890
+ function single_row_columns( $item ) {
891
+ list( $columns, $hidden ) = $this->get_column_info();
892
+
893
+ foreach ( $columns as $column_name => $column_display_name ) {
894
+ $class = "class='$column_name column-$column_name'";
895
+
896
+ $style = '';
897
+ if ( in_array( $column_name, $hidden ) )
898
+ $style = ' style="display:none;"';
899
+
900
+ $attributes = "$class$style";
901
+
902
+ if ( 'cb' == $column_name ) {
903
+ echo '<th scope="row" class="check-column">';
904
+ echo $this->column_cb( $item );
905
+ echo '</th>';
906
+ }
907
+ elseif ( method_exists( $this, 'column_' . $column_name ) ) {
908
+ echo "<td $attributes>";
909
+ echo call_user_func( array( $this, 'column_' . $column_name ), $item );
910
+ echo "</td>";
911
+ }
912
+ else {
913
+ echo "<td $attributes>";
914
+ echo $this->column_default( $item, $column_name );
915
+ echo "</td>";
916
+ }
917
+ }
918
+ }
919
+
920
+ /**
921
+ * Handle an incoming ajax request (called from admin-ajax.php)
922
+ *
923
+ * @since 3.1.0
924
+ * @access public
925
+ */
926
+ function ajax_response() {
927
+ $this->prepare_items();
928
+
929
+ extract( $this->_args );
930
+ extract( $this->_pagination_args, EXTR_SKIP );
931
+
932
+ ob_start();
933
+ if ( ! empty( $_REQUEST['no_placeholder'] ) )
934
+ $this->display_rows();
935
+ else
936
+ $this->display_rows_or_placeholder();
937
+
938
+ $rows = ob_get_clean();
939
+
940
+ $response = array( 'rows' => $rows );
941
+
942
+ if ( isset( $total_items ) )
943
+ $response['total_items_i18n'] = sprintf( _n( '1 item', '%s items', $total_items ), number_format_i18n( $total_items ) );
944
+
945
+ if ( isset( $total_pages ) ) {
946
+ $response['total_pages'] = $total_pages;
947
+ $response['total_pages_i18n'] = number_format_i18n( $total_pages );
948
+ }
949
+
950
+ die( json_encode( $response ) );
951
+ }
952
+
953
+ /**
954
+ * Send required variables to JavaScript land
955
+ *
956
+ * @access private
957
+ */
958
+ function _js_vars() {
959
+ $args = array(
960
+ 'class' => get_class( $this ),
961
+ 'screen' => array(
962
+ 'id' => $this->screen->id,
963
+ 'base' => $this->screen->base,
964
+ )
965
+ );
966
+
967
+ printf( "<script type='text/javascript'>list_args = %s;</script>\n", json_encode( $args ) );
968
+ }
969
+ }
admin/includes/class-menu.php DELETED
@@ -1,296 +0,0 @@
1
- <?php
2
- defined( 'ABSPATH' ) || exit;
3
-
4
- class Advanced_Ads_Admin_Menu {
5
- /**
6
- * Instance of this class.
7
- *
8
- * @var object
9
- */
10
- protected static $instance = null;
11
-
12
- /**
13
- * Slug of the ad group page
14
- *
15
- * @since 1.0.0
16
- * @var string
17
- */
18
- protected $ad_group_hook_suffix = null;
19
-
20
- private function __construct() {
21
- // Add menu items
22
- add_action( 'admin_menu', array($this, 'add_plugin_admin_menu') );
23
- add_action( 'admin_head', array( $this, 'highlight_menu_item' ) );
24
-
25
- $this->plugin_slug = Advanced_Ads::get_instance()->get_plugin_slug();
26
- $this->post_type = constant( 'Advanced_Ads::POST_TYPE_SLUG' );
27
- }
28
-
29
- /**
30
- * Return an instance of this class.
31
- *
32
- * @return object A single instance of this class.
33
- */
34
- public static function get_instance() {
35
- // If the single instance hasn't been set, set it now.
36
- if ( null == self::$instance ) {
37
- self::$instance = new self;
38
- }
39
-
40
- return self::$instance;
41
- }
42
-
43
- /**
44
- * Register the administration menu for this plugin into the WordPress Dashboard menu.
45
- *
46
- * @since 1.0.0
47
- */
48
- public function add_plugin_admin_menu() {
49
-
50
- // add main menu item with overview page
51
- add_menu_page(
52
- __( 'Overview', 'advanced-ads' ), 'Advanced Ads', Advanced_Ads_Plugin::user_cap( 'advanced_ads_see_interface'), $this->plugin_slug, array($this, 'display_overview_page'), 'dashicons-chart-line', '58.74'
53
- );
54
-
55
- add_submenu_page(
56
- $this->plugin_slug, __( 'Ads', 'advanced-ads' ), __( 'Ads', 'advanced-ads' ), Advanced_Ads_Plugin::user_cap( 'advanced_ads_edit_ads'), 'edit.php?post_type=' . Advanced_Ads::POST_TYPE_SLUG
57
- );
58
-
59
- // hidden by css; not placed in 'options.php' in order to highlight the correct item, see the 'highlight_menu_item()'
60
- if ( ! current_user_can( 'edit_posts' ) ) {
61
- add_submenu_page(
62
- $this->plugin_slug, __( 'Add New Ad', 'advanced-ads' ), __( 'New Ad', 'advanced-ads' ), Advanced_Ads_Plugin::user_cap( 'advanced_ads_edit_ads'), 'post-new.php?post_type=' . Advanced_Ads::POST_TYPE_SLUG
63
- );
64
- }
65
-
66
- $this->ad_group_hook_suffix = add_submenu_page(
67
- $this->plugin_slug, __( 'Ad Groups', 'advanced-ads' ), __( 'Groups', 'advanced-ads' ), Advanced_Ads_Plugin::user_cap( 'advanced_ads_edit_ads'), $this->plugin_slug . '-groups', array($this, 'ad_group_admin_page')
68
- );
69
-
70
- // add placements page
71
- add_submenu_page(
72
- $this->plugin_slug, __( 'Ad Placements', 'advanced-ads' ), __( 'Placements', 'advanced-ads' ), Advanced_Ads_Plugin::user_cap( 'advanced_ads_manage_placements'), $this->plugin_slug . '-placements', array($this, 'display_placements_page')
73
- );
74
- // add settings page
75
- Advanced_Ads_Admin::get_instance()->plugin_screen_hook_suffix = add_submenu_page(
76
- $this->plugin_slug, __( 'Advanced Ads Settings', 'advanced-ads' ), __( 'Settings', 'advanced-ads' ), Advanced_Ads_Plugin::user_cap( 'advanced_ads_manage_options'), $this->plugin_slug . '-settings', array($this, 'display_plugin_settings_page')
77
- );
78
- add_submenu_page(
79
- 'options.php', __( 'Advanced Ads Debugging', 'advanced-ads' ), __( 'Debug', 'advanced-ads' ), Advanced_Ads_Plugin::user_cap( 'advanced_ads_manage_options'), $this->plugin_slug . '-debug', array($this, 'display_plugin_debug_page')
80
- );
81
- // intro page
82
- add_submenu_page(
83
- 'options.php', __( 'Advanced Ads Intro', 'advanced-ads' ), __( 'Advanced Ads Intro', 'advanced-ads' ), Advanced_Ads_Plugin::user_cap( 'advanced_ads_manage_options'), $this->plugin_slug . '-intro', array($this, 'display_plugin_intro_page')
84
- );
85
- // add support page
86
- add_submenu_page(
87
- $this->plugin_slug, __( 'Support', 'advanced-ads' ), __( 'Support', 'advanced-ads' ), Advanced_Ads_Plugin::user_cap( 'advanced_ads_manage_options'), $this->plugin_slug . '-support', array($this, 'display_support_page')
88
- );
89
-
90
- // allows extensions to insert sub menu pages
91
- do_action( 'advanced-ads-submenu-pages', $this->plugin_slug );
92
- }
93
-
94
- /**
95
- * Highlights the 'Advanced Ads->Ads' item in the menu when an ad edit page is open
96
- * @see the 'parent_file' and the 'submenu_file' filters for reference
97
- */
98
- public function highlight_menu_item() {
99
- global $parent_file, $submenu_file, $post_type;
100
- if ( $post_type === $this->post_type ) {
101
- $parent_file = $this->plugin_slug;
102
- $submenu_file = 'edit.php?post_type=' . $this->post_type;
103
- }
104
- }
105
-
106
- /**
107
- * Render the overview page
108
- *
109
- * @since 1.2.2
110
- */
111
- public function display_overview_page() {
112
-
113
- $screen = get_current_screen();
114
-
115
- // set up overview widgets
116
- Advanced_Ads_Overview_Widgets_Callbacks::setup_overview_widgets( $screen );
117
-
118
- // convert from vertical order to horizontal
119
- $screen->add_option( 'layout_columns', 1 );
120
-
121
- include ADVADS_BASE_PATH . 'admin/views/overview.php';
122
- }
123
-
124
- /**
125
- * Render the settings page
126
- *
127
- * @since 1.0.0
128
- */
129
- public function display_plugin_settings_page() {
130
- include ADVADS_BASE_PATH . 'admin/views/settings.php';
131
- }
132
-
133
- /**
134
- * Render the placements page
135
- *
136
- * @since 1.1.0
137
- */
138
- public function display_placements_page() {
139
- $placement_types = Advanced_Ads_Placements::get_placement_types();
140
- $placements = Advanced_Ads::get_ad_placements_array(); // -TODO use model
141
- $items = Advanced_Ads_Placements::items_for_select();
142
- // load ads and groups for select field
143
-
144
- // display view
145
- include ADVADS_BASE_PATH . 'admin/views/placements.php';
146
- }
147
-
148
- /**
149
- * Render the debug page
150
- *
151
- * @since 1.0.1
152
- */
153
- public function display_plugin_debug_page() {
154
- // load array with ads by condition
155
- $plugin = Advanced_Ads::get_instance();
156
- $plugin_options = $plugin->options();
157
- $ad_placements = Advanced_Ads::get_ad_placements_array(); // -TODO use model
158
-
159
- include ADVADS_BASE_PATH . 'admin/views/debug.php';
160
- }
161
-
162
- /**
163
- * Render intro page
164
- *
165
- * @since 1.6.8.2
166
- */
167
- public function display_plugin_intro_page() {
168
- // load array with ads by condition
169
-
170
- // remove intro message from queue
171
- Advanced_Ads_Admin_Notices::get_instance()->remove_from_queue('nl_intro');
172
-
173
- include ADVADS_BASE_PATH . 'admin/views/intro.php';
174
- }
175
-
176
- /**
177
- * Render the support page
178
- *
179
- * @since 1.6.8.1
180
- */
181
- public function display_support_page() {
182
- // process email
183
-
184
- $mail_sent = false;
185
- $sent_errors = array();
186
- global $current_user;
187
- $user = wp_get_current_user();
188
-
189
- $email = $user->user_email !== '' ? $user->user_email : '';
190
- $name = $user->first_name !== '' ? $user->first_name . ' ' . $user->last_name : $user->user_login;
191
- $message = '';
192
-
193
- if( isset( $_POST['advads_support']['email'] ) ){
194
-
195
- $email = trim( $_POST['advads_support']['email'] );
196
- $name = trim( $_POST['advads_support']['name'] );
197
- $message = trim( $_POST['advads_support']['message'] );
198
- if( '' === $message ){
199
- $sent_errors[] = __('Please enter a message', 'advanced-ads');
200
- }
201
- if( is_email( $email ) ){
202
- $headers = 'From: '. $name .' <' . $email . '>' . "\r\n";
203
- $content = $message;
204
- $content .= "\r\n\r\n Name: " . $name;
205
- $content .= "\r\n URL: " . home_url();
206
-
207
- $mail_sent = wp_mail( 'support@wpadvancedads.com', 'Support for ' . home_url(), $content, $headers );
208
- if( ! $mail_sent ){
209
- $sent_errors[] = sprintf(__('Email could NOT be sent. Please contact us directly at %s.', 'advanced-ads'), '<a href="mailto:support@wpadvancedads.com">support@wpadvancedads.com</a>');
210
- }
211
- } else {
212
- $sent_errors[] = __('Please enter a valid email address', 'advanced-ads');
213
- }
214
- }
215
-
216
- include ADVADS_BASE_PATH . 'admin/views/support.php';
217
- }
218
-
219
- /**
220
- * Render the ad group page
221
- *
222
- * @since 1.0.0
223
- */
224
- public function ad_group_admin_page() {
225
-
226
- $taxonomy = Advanced_Ads::AD_GROUP_TAXONOMY;
227
- $post_type = Advanced_Ads::POST_TYPE_SLUG;
228
- $tax = get_taxonomy( $taxonomy );
229
-
230
- $action = Advanced_Ads_Admin::get_instance()->current_action();
231
-
232
- // handle new and updated groups
233
- if ( 'editedgroup' == $action ) {
234
- $group_id = (int) $_POST['group_id'];
235
- check_admin_referer( 'update-group_' . $group_id );
236
-
237
- if ( ! current_user_can( $tax->cap->edit_terms ) ) {
238
- wp_die( __( 'Sorry, you are not allowed to access this feature.', 'advanced-ads' ) ); }
239
-
240
- // handle new groups
241
- if ( 0 == $group_id ) {
242
- $ret = wp_insert_term( $_POST['name'], $taxonomy, $_POST );
243
- if ( $ret && ! is_wp_error( $ret ) ) {
244
- $forced_message = 1; }
245
- else {
246
- $forced_message = 4; }
247
- // handle group updates
248
- } else {
249
- $tag = get_term( $group_id, $taxonomy );
250
- if ( ! $tag ) {
251
- wp_die( __( 'You attempted to edit an ad group that doesn&#8217;t exist. Perhaps it was deleted?', 'advanced-ads' ) ); }
252
-
253
- $ret = wp_update_term( $group_id, $taxonomy, $_POST );
254
- if ( $ret && ! is_wp_error( $ret ) ) {
255
- $forced_message = 3; }
256
- else {
257
- $forced_message = 5; }
258
- }
259
- // deleting items
260
- } elseif ( $action == 'delete' ){
261
- $group_id = (int) $_REQUEST['group_id'];
262
- check_admin_referer( 'delete-tag_' . $group_id );
263
-
264
- if ( ! current_user_can( $tax->cap->delete_terms ) ) {
265
- wp_die( __( 'Sorry, you are not allowed to access this feature.', 'advanced-ads' ) ); }
266
-
267
- wp_delete_term( $group_id, $taxonomy );
268
-
269
- $forced_message = 2;
270
- }
271
-
272
- // handle views
273
- switch ( $action ) {
274
- case 'edit' :
275
- $title = $tax->labels->edit_item;
276
- if ( isset($_REQUEST['group_id']) ) {
277
- $group_id = absint( $_REQUEST['group_id'] );
278
- $tag = get_term( $group_id, $taxonomy, OBJECT, 'edit' );
279
- } else {
280
- $group_id = 0;
281
- $tag = false;
282
- }
283
-
284
- include ADVADS_BASE_PATH . 'admin/views/ad-group-edit.php';
285
- break;
286
-
287
- default :
288
- $title = $tax->labels->name;
289
- $wp_list_table = _get_list_table( 'WP_Terms_List_Table' );
290
-
291
- // load template
292
- include ADVADS_BASE_PATH . 'admin/views/ad-group.php';
293
- }
294
- }
295
-
296
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/includes/class-meta-box.php DELETED
@@ -1,412 +0,0 @@
1
- <?php
2
- defined( 'ABSPATH' ) || exit;
3
-
4
- class Advanced_Ads_Admin_Meta_Boxes {
5
- /**
6
- * Instance of this class.
7
- *
8
- * @var object
9
- */
10
- protected static $instance = null;
11
-
12
- /**
13
- * meta box ids
14
- *
15
- * @since 1.7.4.2
16
- * @var array
17
- */
18
- protected $meta_box_ids = array();
19
-
20
-
21
- private function __construct() {
22
- add_action( 'add_meta_boxes_' . Advanced_Ads::POST_TYPE_SLUG, array( $this, 'add_meta_boxes' ) );
23
- // add meta box for post types edit pages
24
- add_action( 'add_meta_boxes', array( $this, 'add_post_meta_box' ) );
25
- add_action( 'save_post', array( $this, 'save_post_meta_box' ) );
26
- // register dashboard widget
27
- add_action( 'wp_dashboard_setup', array($this, 'add_dashboard_widget') );
28
- }
29
-
30
- /**
31
- * Return an instance of this class.
32
- *
33
- * @return object A single instance of this class.
34
- */
35
- public static function get_instance() {
36
- // If the single instance hasn't been set, set it now.
37
- if ( null == self::$instance ) {
38
- self::$instance = new self;
39
- }
40
-
41
- return self::$instance;
42
- }
43
-
44
- /**
45
- * Add meta boxes
46
- *
47
- * @since 1.0.0
48
- */
49
- public function add_meta_boxes() {
50
- $post_type = Advanced_Ads::POST_TYPE_SLUG;
51
-
52
- add_meta_box(
53
- 'ad-main-box', __( 'Ad Type', 'advanced-ads' ), array($this, 'markup_meta_boxes'), $post_type, 'normal', 'high'
54
- );
55
- // use dynamic filter from to add close class to ad type meta box after saved first time
56
- add_filter( 'postbox_classes_advanced_ads_ad-main-box', array( $this, 'close_ad_type_metabox' ) );
57
-
58
- add_meta_box(
59
- 'ad-parameters-box', __( 'Ad Parameters', 'advanced-ads' ), array($this, 'markup_meta_boxes'), $post_type, 'normal', 'high'
60
- );
61
- add_meta_box(
62
- 'ad-output-box', __( 'Layout / Output', 'advanced-ads' ), array($this, 'markup_meta_boxes'), $post_type, 'normal', 'high'
63
- );
64
- add_meta_box(
65
- 'ad-display-box', __( 'Display Conditions', 'advanced-ads' ), array($this, 'markup_meta_boxes'), $post_type, 'normal', 'high'
66
- );
67
- add_meta_box(
68
- 'ad-visitor-box', __( 'Visitor Conditions', 'advanced-ads' ), array($this, 'markup_meta_boxes'), $post_type, 'normal', 'high'
69
- );
70
-
71
- // register meta box ids
72
- $this->meta_box_ids = array(
73
- 'ad-main-box',
74
- 'ad-parameters-box',
75
- 'ad-output-box',
76
- 'ad-display-box',
77
- 'ad-visitor-box',
78
- 'advanced_ads_groupsdiv' // automatically added by ad groups taxonomy
79
- );
80
-
81
- // force AA meta boxes to never be completely hidden by screen options
82
- add_filter( 'hidden_meta_boxes', array( $this, 'unhide_meta_boxes' ), 10, 2 );
83
-
84
- $whitelist = apply_filters( 'advanced-ads-ad-edit-allowed-metaboxes', array_merge(
85
- $this->meta_box_ids,
86
- array(
87
- 'submitdiv',
88
- 'slugdiv',
89
- 'tracking-ads-box',
90
- 'ad-layer-ads-box', // deprecated
91
- )
92
- ) );
93
-
94
- global $wp_meta_boxes;
95
- // remove non-white-listed meta boxes
96
- foreach ( array( 'normal', 'advanced', 'side' ) as $context ) {
97
- if ( isset( $wp_meta_boxes[ $post_type ][ $context ] ) ) {
98
- foreach ( array( 'high', 'sorted', 'core', 'default', 'low' ) as $priority ) {
99
- if ( isset( $wp_meta_boxes[ $post_type ][ $context ][ $priority ]) ) {
100
- foreach ( (array) $wp_meta_boxes[ $post_type ][ $context ][ $priority ] as $id => $box ) {
101
- if ( ! in_array( $id, $whitelist ) ) {
102
- unset( $wp_meta_boxes[ $post_type ][ $context ][ $priority ][ $id ] );
103
- }
104
- }
105
- }
106
- }
107
- }
108
- }
109
- }
110
-
111
- /**
112
- * load templates for all meta boxes
113
- *
114
- * @since 1.0.0
115
- * @param obj $post
116
- * @param array $box
117
- * @todo move ad initialization to main function and just global it
118
- */
119
- public function markup_meta_boxes($post, $box) {
120
- $ad = new Advanced_Ads_Ad( $post->ID );
121
-
122
- switch ( $box['id'] ) {
123
- case 'ad-main-box':
124
- $view = 'ad-main-metabox.php';
125
- $hndlelinks = '<a href="' . ADVADS_URL . 'manual/ad-types#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-ad-type" target="_blank">' . __('Manual', 'advanced-ads') . '</a>';
126
- break;
127
- case 'ad-parameters-box':
128
- $view = 'ad-parameters-metabox.php';
129
- break;
130
- case 'ad-output-box':
131
- $view = 'ad-output-metabox.php';
132
- break;
133
- case 'ad-display-box':
134
- $view = 'ad-display-metabox.php';
135
- $hndlelinks = '<a href="#" class="advads-video-link">' . __('Video', 'advanced-ads') . '</a>';
136
- $hndlelinks .= '<a href="' . ADVADS_URL . 'manual/display-conditions#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-display" target="_blank">' . __('Manual', 'advanced-ads') . '</a>';
137
- $videomarkup = '<iframe width="420" height="315" src="https://www.youtube-nocookie.com/embed/wVB6UpeyWNA?rel=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>';
138
- break;
139
- case 'ad-visitor-box':
140
- $view = 'ad-visitor-metabox.php';
141
- $hndlelinks = '<a href="' . ADVADS_URL . 'manual/visitor-conditions#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-visitor" target="_blank">' . __('Manual', 'advanced-ads') . '</a>';
142
- break;
143
- }
144
-
145
- if ( ! isset( $view ) ) {
146
- return;
147
- }
148
- // markup moved to handle headline of the metabox
149
- if( isset( $hndlelinks ) ){
150
- ?><span class="advads-hndlelinks hidden"><?php echo $hndlelinks; ?></span>
151
- <?php
152
- }
153
- // show video markup
154
- if( isset( $videomarkup ) ){
155
- echo '<div class="advads-video-link-container" data-videolink=\'' . $videomarkup . '\'></div>';
156
- }
157
- include ADVADS_BASE_PATH . 'admin/views/' . $view;
158
- }
159
-
160
- /**
161
- * force all AA related meta boxes to stay visible
162
- *
163
- * @since 1.7.4.2
164
- * @param array $hidden An array of hidden meta boxes
165
- * @param WP_Screen $screen WP_Screen object of the current screen
166
- */
167
- public function unhide_meta_boxes( $hidden, $screen ){
168
- // only check on Advanced Ads edit screen
169
- if ( ! isset( $screen->id ) || $screen->id !== 'advanced_ads' || !is_array( $this->meta_box_ids ) ) {
170
- return $hidden;
171
- }
172
-
173
- // return only hidden elements which are not among the Advanced Ads meta box ids
174
- return array_diff( $hidden, $this->meta_box_ids );
175
- }
176
-
177
- /**
178
- * add a meta box to post type edit screens with ad settings
179
- *
180
- * @since 1.3.10
181
- * @param string $post_type current post type
182
- */
183
- public function add_post_meta_box($post_type = ''){
184
- // don’t display for non admins
185
- if( ! current_user_can( Advanced_Ads_Plugin::user_cap( 'advanced_ads_edit_ads') ) ) {
186
- return;
187
- }
188
-
189
- // get public post types
190
- $public_post_types = get_post_types( array('public' => true, 'publicly_queryable' => true), 'names', 'or' );
191
-
192
- //limit meta box to public post types
193
- if ( in_array( $post_type, $public_post_types ) ) {
194
- add_meta_box(
195
- 'advads-ad-settings',
196
- __( 'Ad Settings', 'advanced-ads' ),
197
- array( $this, 'render_post_meta_box' ),
198
- $post_type,
199
- 'advanced',
200
- 'low'
201
- );
202
- }
203
- }
204
-
205
- /**
206
- * render meta box for ad settings on a per post basis
207
- *
208
- * @since 1.3.10
209
- * @param WP_Post $post The post object.
210
- */
211
- public function render_post_meta_box( $post ) {
212
-
213
- // nonce field to check when we save the values
214
- wp_nonce_field( 'advads_post_meta_box', 'advads_post_meta_box_nonce' );
215
-
216
- // retrieve an existing value from the database.
217
- $values = get_post_meta( $post->ID, '_advads_ad_settings', true );
218
-
219
- // load the view
220
- include ADVADS_BASE_PATH . 'admin/views/post-ad-settings-metabox.php';
221
-
222
- do_action( 'advanced_ads_render_post_meta_box', $post, $values );
223
- }
224
-
225
- /**
226
- * save the ad meta when the post is saved.
227
- *
228
- * @since 1.3.10
229
- * @param int $post_id The ID of the post being saved.
230
- */
231
- public function save_post_meta_box( $post_id ) {
232
-
233
- if( ! current_user_can( Advanced_Ads_Plugin::user_cap( 'advanced_ads_edit_ads') ) ) {
234
- return;
235
- }
236
-
237
- // check nonce
238
- if ( ! isset( $_POST['advads_post_meta_box_nonce'] ) ) {
239
- return $post_id; }
240
-
241
- $nonce = $_POST['advads_post_meta_box_nonce'];
242
-
243
- // Verify that the nonce is valid.
244
- if ( ! wp_verify_nonce( $nonce, 'advads_post_meta_box' ) ) {
245
- return $post_id; }
246
-
247
- // don’t save on autosave
248
- if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
249
- return $post_id; }
250
-
251
- // check the user's permissions.
252
- if ( 'page' == $_POST['post_type'] ) {
253
- if ( ! current_user_can( 'edit_page', $post_id ) ) {
254
- return $post_id; }
255
- } else {
256
- if ( ! current_user_can( 'edit_post', $post_id ) ) {
257
- return $post_id; }
258
- }
259
-
260
- // Sanitize the user input.
261
- $_data['disable_ads'] = isset($_POST['advanced_ads']['disable_ads']) ? absint( $_POST['advanced_ads']['disable_ads'] ) : 0;
262
-
263
- $_data = apply_filters( 'advanced_ads_save_post_meta_box', $_data );
264
-
265
- // Update the meta field.
266
- update_post_meta( $post_id, '_advads_ad_settings', $_data );
267
- }
268
-
269
- /**
270
- * add "close" class to collapse the ad-type metabox after ad was saved first
271
- *
272
- * @since 1.7.2
273
- * @param arr $classes
274
- * @return arr $classes
275
- */
276
- public function close_ad_type_metabox( $classes = array() ) {
277
- global $post;
278
- if ( isset( $post->ID ) && 'edit' === $post->filter ) {
279
- if ( ! in_array( 'closed', $classes ) ) {
280
- $classes[] = 'closed';
281
- }
282
- } else {
283
- $classes = array();
284
- }
285
- return $classes;
286
- }
287
-
288
- /**
289
- * add dashboard widget with ad stats and additional information
290
- *
291
- * @since 1.3.12
292
- */
293
- public function add_dashboard_widget(){
294
- // display dashboard widget only to authors and higher roles
295
- if( ! current_user_can('publish_posts') ) {
296
- return;
297
- }
298
- add_meta_box( 'advads_dashboard_widget', __( 'Ads Dashboard', 'advanced-ads' ), array($this, 'dashboard_widget_function'), 'dashboard', 'side', 'high' );
299
- }
300
-
301
- /**
302
- * display widget functions
303
- */
304
- public static function dashboard_widget_function($post, $callback_args){
305
- // load ad optimization feed
306
- $feeds = array(
307
- array(
308
- 'link' => 'http://webgilde.com/en/ad-optimization/',
309
- 'url' => 'http://webgilde.com/en/ad-optimization/feed/',
310
- 'title' => __( 'From the ad optimization universe', 'advanced-ads' ),
311
- 'items' => 2,
312
- 'show_summary' => 0,
313
- 'show_author' => 0,
314
- 'show_date' => 0,
315
- ),
316
- array(
317
- 'link' => ADVADS_URL,
318
- 'url' => ADVADS_URL . 'feed/',
319
- 'title' => __( 'Advanced Ads Tutorials', 'advanced-ads' ),
320
- 'items' => 2,
321
- 'show_summary' => 0,
322
- 'show_author' => 0,
323
- 'show_date' => 0,
324
- ),
325
- );
326
-
327
- // get number of ads
328
- $recent_ads = Advanced_Ads::get_instance()->get_model()->get_ads();
329
- echo '<p>';
330
- printf(__( '%d ads – <a href="%s">manage</a> - <a href="%s">new</a>', 'advanced-ads' ),
331
- count( $recent_ads ),
332
- 'edit.php?post_type='. Advanced_Ads::POST_TYPE_SLUG,
333
- 'post-new.php?post_type='. Advanced_Ads::POST_TYPE_SLUG);
334
- echo '</p>';
335
-
336
- // get and display plugin version
337
- $advads_plugin_data = get_plugin_data( ADVADS_BASE_PATH . 'advanced-ads.php' );
338
- if ( isset($advads_plugin_data['Version']) ){
339
- $version = $advads_plugin_data['Version'];
340
- echo '<p><a href="'.ADVADS_URL.'#utm_source=advanced-ads&utm_medium=link&utm_campaign=dashboard" target="_blank" title="'.
341
- __( 'plugin manual and homepage', 'advanced-ads' ).'">Advanced Ads</a> '. $version .'</p>';
342
- }
343
-
344
- $notice_options = Advanced_Ads_Admin_Notices::get_instance()->options();
345
- $_notice = 'nl_first_steps';
346
- if ( ! isset($notice_options['closed'][ $_notice ] ) ) {
347
- ?><div class="advads-admin-notice">
348
- <p><button type="button" class="button-primary advads-notices-button-subscribe" data-notice="<?php echo $_notice ?>"><?php _e('Get the tutorial via email', 'advanced-ads'); ?></button></p>
349
- </div><?php
350
- }
351
-
352
- $_notice = 'nl_adsense';
353
- if ( ! isset($notice_options['closed'][ $_notice ] ) ) {
354
- ?><div class="advads-admin-notice">
355
- <p><button type="button" class="button-primary advads-notices-button-subscribe" data-notice="<?php echo $_notice ?>"><?php _e('Get AdSense tips via email', 'advanced-ads'); ?></button></p>
356
- </div><?php
357
- }
358
-
359
- // rss feed
360
- // $this->dashboard_widget_function_output('advads_dashboard_widget', $feed);
361
- self::dashboard_cached_rss_widget( 'advads_dashboard_widget', array( 'self', 'dashboard_widget_function_output' ), array( 'advads' => $feeds ) );
362
-
363
- // add markup for utm variables
364
- // todo: move to js file
365
- ?><script>jQuery('#advads_dashboard_widget .rss-widget a').each(function(){ this.href = this.href + '#utm_source=advanced-ads&utm_medium=rss-link&utm_campaign=dashboard'; })</script><?php
366
- }
367
-
368
- /**
369
- * checks to see if there are feed urls in transient cache; if not, load them
370
- * built using a lot of https://developer.wordpress.org/reference/functions/wp_dashboard_cached_rss_widget/
371
- *
372
- * @since 1.3.12
373
- * @param string $widget_id
374
- * @param callback $callback
375
- * @param array $check_urls RSS feeds
376
- * @return bool False on failure. True on success.
377
- */
378
- static function dashboard_cached_rss_widget( $widget_id, $callback, $feeds = array() ) {
379
- if ( empty($feeds) ) {
380
- return;
381
- }
382
-
383
- $cache_key = 'dash_' . md5( $widget_id );
384
- if ( false !== ( $output = get_transient( $cache_key ) ) ) {
385
- echo $output;
386
- return true;
387
- }
388
- if ( $callback && is_callable( $callback ) ) {
389
- ob_start();
390
- call_user_func_array( $callback, $feeds );
391
- set_transient( $cache_key, ob_get_flush(), 48 * HOUR_IN_SECONDS ); // Default lifetime in cache of 48 hours
392
- }
393
-
394
- return true;
395
- }
396
-
397
- /**
398
- * create the rss output of the widget
399
- *
400
- * @param string $widget_id Widget ID.
401
- * @param array $feeds Array of RSS feeds.
402
- */
403
- static function dashboard_widget_function_output( $feeds ) {
404
- foreach ( $feeds as $_feed ){
405
- echo '<div class="rss-widget">';
406
- echo '<h4>'.$_feed['title'].'</h4>';
407
- wp_widget_rss_output( $_feed['url'], $_feed );
408
- echo '</div>';
409
- }
410
- }
411
-
412
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/includes/class-notices.php DELETED
@@ -1,510 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * container class for admin notices
5
- *
6
- * @package WordPress
7
- * @subpackage Advanced Ads Plugin
8
- * @since 1.4.5
9
- */
10
- class Advanced_Ads_Admin_Notices {
11
-
12
- /**
13
- * maximum number of notices to show at once
14
- */
15
- const MAX_NOTICES = 2;
16
-
17
- /**
18
- * instance of this class.
19
- *
20
- * @since 1.5.3
21
- * @var object
22
- */
23
- protected static $instance = null;
24
-
25
- /**
26
- * options
27
- *
28
- * @since 1.5.3
29
- * @var array
30
- */
31
- protected $options;
32
-
33
- /**
34
- * notices to be displayed
35
- *
36
- * @since 1.5.3
37
- * @var array
38
- */
39
- public $notices = array();
40
-
41
- /**
42
- * plugin class
43
- */
44
- private $plugin;
45
-
46
- public function __construct() {
47
- $this->plugin = Advanced_Ads_Plugin::get_instance();
48
- // load notices
49
- $this->load_notices();
50
- // display notices
51
- //$this->display_notices();
52
-
53
- add_action( 'advanced-ads-ad-params-before', array( $this, 'adsense_tutorial' ), 10, 2 );
54
- }
55
-
56
- /**
57
- * Return an instance of this class.
58
- *
59
- * @since 1.5.3
60
- * @return object A single instance of this class.
61
- */
62
- public static function get_instance() {
63
-
64
- // If the single instance hasn't been set, set it now.
65
- if ( null == self::$instance ) {
66
- self::$instance = new self;
67
- }
68
-
69
- return self::$instance;
70
- }
71
-
72
- /**
73
- * load admin notices
74
- *
75
- * @since 1.4.5
76
- * @updated 1.5.3 moved from admin class here
77
- */
78
- public function load_notices() {
79
-
80
- $options = $this->options();
81
- $plugin_options = $this->plugin->options();
82
-
83
- // load notices from queue
84
- $this->notices = isset($options['queue']) ? $options['queue'] : array();
85
- $notices_before = $this->notices;
86
-
87
- // check license notices
88
- $this->register_license_notices();
89
- // notice for Adblocker module
90
- $this->check_assets_expired();
91
-
92
- // don’t check non-critical notices if they are disabled
93
- if ( ! isset($plugin_options['disable-notices']) ) {
94
- // handle version notices
95
- $this->register_version_notices();
96
- // check other notices
97
- $this->check_notices();
98
- }
99
-
100
- // register notices in db so they get displayed until closed for good
101
- if ( $this->notices !== $notices_before ) {
102
- $this->add_to_queue( $this->notices );
103
- }
104
- }
105
-
106
- /**
107
- * register update notices
108
- *
109
- */
110
- public function register_version_notices() {
111
- if ( defined( 'DOING_AJAX' ) ) {
112
- return;
113
- }
114
-
115
- $internal_options = $this->plugin->internal_options();
116
- $plugin_options = $this->plugin->options();
117
-
118
- // set an artifical older version for updates on installed plugins before the notice logic was invented
119
- if ( ! isset($internal_options['version']) && $plugin_options !== array() ) {
120
- $old_version = '1.4.4';
121
- } elseif ( isset($internal_options['version']) ) {
122
- $old_version = $internal_options['version'];
123
- } else {
124
- // empty version for new installations
125
- $old_version = 0;
126
- }
127
-
128
- if ( isset($internal_options['version']) && ($internal_options['version'] !== ADVADS_VERSION) && $old_version ) {
129
- if ( version_compare( $old_version, '1.4.5' ) == -1 ) {
130
- $this->notices[] = '1.4.5';
131
- }
132
- if ( version_compare( $old_version, '1.5.4' ) == -1 ) {
133
- $this->notices[] = '1.5.4';
134
- }
135
- if ( version_compare( $old_version, '1.6' ) == -1 ) {
136
- $this->notices[] = '1.6';
137
- }
138
- if ( version_compare( $old_version, '1.6.6' ) == -1 ) {
139
- $this->notices[] = '1.6.6';
140
- }
141
- if ( version_compare( $old_version, '1.7' ) == -1 ) {
142
- $this->notices[] = '1.7';
143
- }
144
- }
145
- }
146
-
147
- /**
148
- * update version number to latest one
149
- */
150
- public function update_version_number(){
151
-
152
- $internal_options = $this->plugin->internal_options();
153
- $new_options = $internal_options; // in case we udpate options here
154
-
155
- $new_options['version'] = ADVADS_VERSION;
156
-
157
- // update version numbers
158
- if ( $internal_options !== $new_options ) {
159
- $this->plugin->update_internal_options( $new_options );
160
- }
161
- }
162
-
163
- /**
164
- * check various notices conditions
165
- */
166
- public function check_notices() {
167
- $internal_options = $this->plugin->internal_options();
168
- $now = time();
169
- $activation = (isset($internal_options['installed'])) ? $internal_options['installed'] : $now; // activation time
170
-
171
- $options = $this->options();
172
- $closed = isset($options['closed']) ? $options['closed'] : array();
173
- $queue = isset($options['queue']) ? $options['queue'] : array();
174
-
175
- // register intro message
176
- if( $options === array() && ! in_array( 'nl_intro', $queue ) && ! isset( $closed['nl_intro'] ) ){
177
- $this->notices[] = 'nl_intro';
178
- }
179
- // offer free add-ons if not yet subscribed
180
- if ( ! $this->is_subscribed() && ! in_array( 'nl_free_addons', $queue ) && ! isset( $closed['nl_free_addons'] )) {
181
- $this->notices[] = 'nl_free_addons';
182
- }
183
- // ask for a review after 30 days
184
- if ( 2592000 < ( time() - $activation) && ! in_array( 'review', $queue ) && ! isset( $closed['review'] )) {
185
- $this->notices[] = 'review';
186
- }
187
- }
188
-
189
- /**
190
- * register license key notices
191
- */
192
- public function register_license_notices(){
193
-
194
- if( ! Advanced_Ads_Admin::screen_belongs_to_advanced_ads() ){
195
- return;
196
- }
197
-
198
- $options = $this->options();
199
- $queue = isset($options['queue']) ? $options['queue'] : array();
200
- // check license keys
201
-
202
- if ( Advanced_Ads_Checks::licenses_invalid() ){
203
- if( ! in_array( 'license_invalid', $queue )) {
204
- $this->notices[] = 'license_invalid';
205
- }
206
- } else {
207
- $this->remove_from_queue( 'license_invalid' );
208
- }
209
-
210
- // check expiring licenses
211
- if ( Advanced_Ads_Checks::licenses_expire() ){
212
- if( ! in_array( 'license_expires', $queue )) {
213
- $this->notices[] = 'license_expires';
214
- }
215
- } else {
216
- $this->remove_from_queue( 'license_expires' );
217
- }
218
-
219
- // check expired licenses
220
- if ( Advanced_Ads_Checks::licenses_expired() ){
221
- if( ! in_array( 'license_expired', $queue )) {
222
- $this->notices[] = 'license_expired';
223
- }
224
- } else {
225
- $this->remove_from_queue( 'license_expired' );
226
- }
227
- }
228
-
229
- /**
230
- * Notice for Adblocker module
231
- */
232
- public function check_assets_expired() {
233
- $plugin_options = $this->plugin->options();
234
- $options = $this->options();
235
-
236
- if ( empty ( $plugin_options['use-adblocker'] ) ) {
237
- // check if assets expired, but user disabled Adblocker module
238
- $key = array_search( 'assets_expired', $this->notices );
239
- if ( $key !== false ) {
240
- $this->remove_from_queue( 'assets_expired' );
241
- unset( $this->notices[ $key] );
242
- }
243
-
244
- return;
245
- }
246
-
247
- $adblocker_options = Advanced_Ads_Ad_Blocker::get_instance()->options();
248
-
249
- if ( ! in_array( 'assets_expired', $this->notices ) && ( empty ( $adblocker_options['module_can_work'] ) )
250
- ) {
251
- $this->notices[] = 'assets_expired';
252
- }
253
- }
254
-
255
- /**
256
- * add update notices to the queue of all notices that still needs to be closed
257
- *
258
- * @since 1.5.3
259
- * @param str|arr $notices one or more notices to be added to the queue
260
- */
261
- public function add_to_queue($notices = 0) {
262
- if ( ! $notices ) {
263
- return;
264
- }
265
-
266
- // get queue from options
267
- $options = $this->options();
268
- $queue = isset($options['queue']) ? $options['queue'] : array();
269
-
270
- if ( is_array( $notices ) ) {
271
- $queue = array_merge( $queue, $notices );
272
- } else {
273
- $queue[] = $notices;
274
- }
275
-
276
- // remove possible duplicated
277
- $queue = array_unique( $queue );
278
-
279
- // update db
280
- $options['queue'] = $queue;
281
- $this->update_options( $options );
282
- }
283
-
284
- /**
285
- * remove update notice from queue
286
- * move notice into "closed"
287
- *
288
- * @since 1.5.3
289
- * @param str $notice notice to be removed from the queue
290
- */
291
- public function remove_from_queue($notice) {
292
- if ( ! isset($notice) ) {
293
- return;
294
- }
295
-
296
- // get queue from options
297
- $options_before = $options = $this->options();
298
- if ( ! isset($options['queue']) ) {
299
- return;
300
- }
301
- $queue = (array) $options['queue'];
302
- $closed = isset($options['closed']) ? $options['closed'] : array();
303
-
304
- $key = array_search( $notice, $queue );
305
- if ( $key !== false ) {
306
- unset($queue[$key]);
307
- // close message with timestamp
308
- }
309
- // don’t close again twice
310
- if( ! isset( $closed[$notice] )){
311
- $closed[$notice] = time();
312
- }
313
-
314
- // update db
315
- $options['queue'] = $queue;
316
- $options['closed'] = $closed;
317
-
318
-
319
- // only update if changed
320
- if( $options_before !== $options ){
321
- $this->update_options( $options );
322
- }
323
- }
324
-
325
- /**
326
- *
327
- * display notices
328
- *
329
- */
330
- public function display_notices() {
331
-
332
- if ( defined( 'DOING_AJAX' ) ) {
333
- return; }
334
-
335
- if ( $this->notices === array() ) {
336
- return; }
337
-
338
- // load notices
339
- include ADVADS_BASE_PATH . '/admin/includes/notices.php';
340
-
341
- // iterate through notices
342
- $count = 0;
343
- foreach ( $this->notices as $_notice ) {
344
-
345
- if ( isset($advanced_ads_admin_notices[$_notice]) ) {
346
- $notice = $advanced_ads_admin_notices[$_notice];
347
- $text = $advanced_ads_admin_notices[$_notice]['text'];
348
- $type = isset($advanced_ads_admin_notices[$_notice]['type']) ? $advanced_ads_admin_notices[$_notice]['type'] : '';
349
- } else {
350
- continue;
351
- }
352
-
353
- // don’t display non-global notices on other than plugin related pages
354
- if( ( ! isset( $advanced_ads_admin_notices[$_notice]['global'] ) || ! $advanced_ads_admin_notices[$_notice]['global'] )
355
- && ! Advanced_Ads_Admin::screen_belongs_to_advanced_ads() ) {
356
- continue;
357
- }
358
-
359
- switch ( $type ) {
360
- case 'info' :
361
- include ADVADS_BASE_PATH . '/admin/views/notices/info.php';
362
- break;
363
- case 'subscribe' :
364
- include ADVADS_BASE_PATH . '/admin/views/notices/subscribe.php';
365
- break;
366
- case 'plugin_error' :
367
- include ADVADS_BASE_PATH . '/admin/views/notices/plugin_error.php';
368
- break;
369
- default :
370
- include ADVADS_BASE_PATH . '/admin/views/notices/error.php';
371
- }
372
-
373
- if( ++$count == self::MAX_NOTICES ) {
374
- break;
375
- }
376
- }
377
- }
378
-
379
- /**
380
- * return notices options
381
- *
382
- * @since 1.5.3
383
- * @return array $options
384
- */
385
- public function options() {
386
- if ( ! isset($this->options) ) {
387
- $this->options = get_option( ADVADS_SLUG . '-notices', array() );
388
- }
389
-
390
- return $this->options;
391
- }
392
-
393
- /**
394
- * update notices options
395
- *
396
- * @since 1.5.3
397
- * @param array $options new options
398
- */
399
- public function update_options(array $options) {
400
- // do not allow to clear options
401
- if ( $options === array() ) {
402
- return;
403
- }
404
-
405
- $this->options = $options;
406
- update_option( ADVADS_SLUG . '-notices', $options );
407
- }
408
-
409
- /**
410
- * subscribe to newsletter and autoresponder
411
- *
412
- * @since 1.5.3
413
- * @param string $notice slug of the subscription notice to send the correct reply
414
- */
415
- public function subscribe($notice) {
416
- if ( ! isset( $notice ) ) {
417
- return;
418
- }
419
-
420
- global $current_user;
421
- $user = wp_get_current_user();
422
-
423
- if ( $user->user_email == '' ) {
424
- return sprintf( __( 'You don’t seem to have an email address. Please use <a href="%s" target="_blank">this form</a> to sign up.', 'advanced-ads' ), 'http://eepurl.com/bk4z4P' );
425
- }
426
-
427
- $data = array(
428
- 'email' => $user->user_email,
429
- 'notice' => $notice
430
- );
431
-
432
- $result = wp_remote_post('https://wpadvancedads.com/remote/subscribe.php?source=plugin', array(
433
- 'method' => 'POST',
434
- 'timeout' => 20,
435
- 'redirection' => 5,
436
- 'httpversion' => '1.1',
437
- 'blocking' => true,
438
- 'body' => $data)
439
- );
440
-
441
- if ( is_wp_error( $result ) ) {
442
- return __( 'How embarrassing. The email server seems to be down. Please try again later.', 'advanced-ads' );
443
- } else {
444
- // mark as subscribed and move notice from quere
445
- $this->mark_as_subscribed();
446
- $this->remove_from_queue( $notice );
447
- return sprintf(__( 'Please check your email (%s) for the confirmation message. If you didn’t receive one or want to use another email address then please use <a href="%s" target="_blank">this form</a> to sign up.', 'advanced-ads' ), $user->user_email, 'http://eepurl.com/bk4z4P' );
448
- }
449
- }
450
-
451
- /**
452
- * check if blog is subscribed to the newsletter
453
- */
454
- public function is_subscribed() {
455
-
456
- /**
457
- * respect previous settings
458
- */
459
- $options = $this->options();
460
- if ( isset($options['is_subscribed'] ) ) {
461
- return true;
462
- }
463
-
464
- $user_id = get_current_user_id();
465
- if( ! $user_id ) {
466
- return true;
467
- }
468
-
469
- $subscribed = get_user_meta($user_id, 'advanced-ads-subscribed', true);
470
- return $subscribed;
471
- }
472
-
473
- /**
474
- * update information that the current user is subscribed
475
- */
476
- private function mark_as_subscribed() {
477
-
478
- $user_id = get_current_user_id();
479
-
480
- if( ! $this->is_subscribed() ) {
481
- update_user_meta( $user_id, 'advanced-ads-subscribed', true);
482
- }
483
- }
484
-
485
- /**
486
- * add AdSense tutorial notice
487
- *
488
- * @param obj $ad ad object
489
- * @param arr $types ad types
490
- */
491
- public function adsense_tutorial( $ad, $types = array() ){
492
-
493
- $options = $this->options();
494
- $_notice = 'nl_adsense';
495
-
496
- if ( $ad->type !== 'adsense' || isset($options['closed'][ $_notice ] ) ) {
497
- return;
498
- }
499
-
500
- include ADVADS_BASE_PATH . '/admin/includes/notices.php';
501
-
502
- if ( ! isset( $advanced_ads_admin_notices[ $_notice ] ) ) {
503
- return;
504
- }
505
-
506
- $notice = $advanced_ads_admin_notices[ $_notice ];
507
- $text = $notice['text'];
508
- include ADVADS_BASE_PATH . '/admin/views/notices/inline.php';
509
- }
510
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/includes/class-overview-widgets.php DELETED
@@ -1,261 +0,0 @@
1
- <?php
2
- /**
3
- * container class for callbacks for overview widgets
4
- *
5
- * @package WordPress
6
- * @subpackage Advanced Ads Plugin
7
- * @since 1.4.3
8
- */
9
- class Advanced_Ads_Overview_Widgets_Callbacks {
10
-
11
- /**
12
- * set the overview page to one column layout so widgets can get ordered horizontally
13
- *
14
- * @since 1.4.3
15
- * @param arr $columns columns array
16
- * @return int $columns
17
- */
18
- static function one_column_overview_page( $columns ) {
19
- // $columns['toplevel_page_advanced-ads'] = 1;
20
- return $columns;
21
- }
22
-
23
- /**
24
- * set the overview page to one column layout so widgets can get ordered horizontally
25
- * this overwrites user settings
26
- *
27
- * @since 1.4.3
28
- * @return int $columns
29
- */
30
- function one_column_overview_page_user() {
31
- // return 1;
32
- }
33
-
34
- /**
35
- * register the plugin overview widgets
36
- *
37
- * @since 1.4.3
38
- * @param obj $screen
39
- */
40
- public static function setup_overview_widgets($screen){
41
-
42
- // abort if not on the overview page
43
- if ( ! isset($screen->id) || $screen->id !== 'toplevel_page_advanced-ads' ) { return; }
44
-
45
- add_meta_box('advads_overview_news', __( 'Tips and Tutorials', 'advanced-ads' ),
46
- array('Advanced_Ads_Overview_Widgets_Callbacks', 'render_subscribe'), $screen->id, 'normal', 'high');
47
- add_meta_box('advads_overview_addon_help', __( 'Setup and Optimization Help', 'advanced-ads' ),
48
- array('Advanced_Ads_Overview_Widgets_Callbacks', 'render_help'), $screen->id, 'normal', 'high');
49
- add_meta_box('advads_overview_support', __( 'Manual and Support', 'advanced-ads' ),
50
- array('Advanced_Ads_Overview_Widgets_Callbacks', 'render_support'), $screen->id, 'normal', 'high');
51
-
52
- // add widgets for pro add ons
53
- add_meta_box('advads_overview_addon_pro', __( 'Advanced Ads Pro', 'advanced-ads' ),
54
- array('Advanced_Ads_Overview_Widgets_Callbacks', 'render_add_on_pro'), $screen->id, 'side', 'high');
55
- add_meta_box('advads_overview_addon_tracking', __( 'Tracking and Stats', 'advanced-ads' ),
56
- array('Advanced_Ads_Overview_Widgets_Callbacks', 'render_add_on_tracking'), $screen->id, 'side', 'high');
57
- add_meta_box('advads_overview_addon_responsive', __( 'Responsive and Mobile ads', 'advanced-ads' ),
58
- array('Advanced_Ads_Overview_Widgets_Callbacks', 'render_add_on_responsive'), $screen->id, 'side', 'high');
59
- add_meta_box('advads_overview_addon_geotargeting', __( 'Geo Targeting', 'advanced-ads' ),
60
- array('Advanced_Ads_Overview_Widgets_Callbacks', 'render_add_on_geotargeting'), $screen->id, 'side', 'high');
61
- add_meta_box('advads_overview_addon_sticky', __( 'Sticky ads', 'advanced-ads' ),
62
- array('Advanced_Ads_Overview_Widgets_Callbacks', 'render_add_on_sticky'), $screen->id, 'side', 'high');
63
- add_meta_box('advads_overview_addon_layer', __( 'PopUps and Layers', 'advanced-ads' ),
64
- array('Advanced_Ads_Overview_Widgets_Callbacks', 'render_add_on_layer'), $screen->id, 'side', 'high');
65
- add_meta_box('advads_overview_addon_slider', __( 'Ad Slider', 'advanced-ads' ),
66
- array('Advanced_Ads_Overview_Widgets_Callbacks', 'render_add_on_slider'), $screen->id, 'side', 'high');
67
- // add_meta_box('advads_overview_addon_sellingads', __( 'Selling Ads', 'advanced-ads' ),
68
- // array('Advanced_Ads_Overview_Widgets_Callbacks', 'render_add_on_sellingads'), $screen->id, 'side', 'high');
69
- }
70
-
71
- /**
72
- * subscribe widget
73
- *
74
- * @since 1.5.4
75
- */
76
- public static function render_subscribe(){
77
-
78
- $is_subscribed = Advanced_Ads_Admin_Notices::get_instance()->is_subscribed();
79
- $options = Advanced_Ads_Admin_Notices::get_instance()->options();
80
-
81
- $_notice = 'nl_free_addons';
82
- if ( ! isset($options['closed'][ $_notice ] ) && ! $is_subscribed ) {
83
- ?><div class="advads-admin-notice">
84
- <p><?php _e( 'Get 2 <strong>free add-ons</strong> for joining the newsletter.', 'advanced-ads' ); ?></p>
85
- <button type="button" class="button-primary advads-notices-button-subscribe" data-notice="<?php echo $_notice ?>"><?php _e('Join now', 'advanced-ads'); ?></button>
86
- </div><?php
87
- }
88
-
89
- $_notice = 'nl_adsense';
90
- if ( ! isset($options['closed'][ $_notice ] ) ) {
91
- ?><div class="advads-admin-notice">
92
- <p><?php _e( 'Learn more about how and <strong>how much you can earn with AdSense</strong> and Advanced Ads from the dedicated newsletter group.', 'advanced-ads' ); ?></p>
93
- <button type="button" class="button-primary advads-notices-button-subscribe" data-notice="<?php echo $_notice ?>"><?php _e('Subscribe me now', 'advanced-ads'); ?></button>
94
- </div><?php
95
- }
96
-
97
- $_notice = 'nl_first_steps';
98
- if ( ! isset($options['closed'][ $_notice ] ) && ! $is_subscribed ) {
99
- ?><div class="advads-admin-notice">
100
- <p><?php _e( 'Get the first steps and more tutorials to your inbox.', 'advanced-ads' ); ?></p>
101
- <button type="button" class="button-primary advads-notices-button-subscribe" data-notice="<?php echo $_notice ?>"><?php _e('Send it now', 'advanced-ads'); ?></button>
102
- </div><?php
103
- }
104
-
105
- $model = Advanced_Ads::get_instance()->get_model();
106
- $recent_ads = $model->get_ads();
107
-
108
- // get next steps
109
- self::render_next_steps( $recent_ads );
110
- }
111
-
112
- /**
113
- * render next-steps
114
- */
115
- private static function render_next_steps($recent_ads = array()){
116
- $model = Advanced_Ads::get_instance()->get_model();
117
- $groups = $model->get_ad_groups();
118
- $placements = $model->get_ad_placements_array();
119
-
120
- $next_steps = array();
121
-
122
- if ( count( $recent_ads ) == 0 ) :
123
- $next_steps[] = '<p><a class="button button-primary" href="' . admin_url( 'post-new.php?post_type=' . Advanced_Ads::POST_TYPE_SLUG ) .
124
- '">' . __( 'Create your first ad', 'advanced-ads' ) . '</a></p>';
125
- endif;
126
- if ( count( $groups ) == 0 ) :
127
- $next_steps[] = '<p class="description">' . __( 'Ad Groups contain ads and are currently used to rotate multiple ads on a single spot.', 'advanced-ads' ) . '</p>' .
128
- '<p><a class="button button-primary" href="' . admin_url( 'admin.php?action=edit&page=advanced-ads-groups' ) .
129
- '">' . __( 'Create your first group', 'advanced-ads' ) . '</a></p>';
130
- endif;
131
- if ( count( $placements ) == 0 ) :
132
- $next_steps[] = '<p class="description">' . __( 'Ad Placements are the best way to manage where to display ads and groups.', 'advanced-ads' ) . '</p>'
133
- . '<p><a class="button button-primary" href="' . admin_url( 'admin.php?action=edit&page=advanced-ads-placements' ) .
134
- '">' . __( 'Create your first placement', 'advanced-ads' ) . '</a></p>';
135
- endif;
136
-
137
- // display all options
138
- if ( count( $next_steps ) > 0 ){
139
- ?><br/><h4><?php _e( 'Next steps', 'advanced-ads' ); ?></h4><?php
140
- foreach ( $next_steps as $_step ){
141
- echo $_step;
142
- }
143
- }
144
- }
145
-
146
- /**
147
- * support widget
148
- */
149
- public static function render_support(){
150
- ?><ul>
151
- <li><?php printf( __( '<a href="%s" target="_blank">Manual</a>', 'advanced-ads' ), ADVADS_URL . 'manual/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-manual' ); ?></li>
152
- <li><?php printf( __( '<a href="%s" target="_blank">FAQ and Support</a>', 'advanced-ads' ), ADVADS_URL . 'support/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-manual' ); ?></li>
153
- <li><?php printf( __( 'Vote for a <a href="%s" target="_blank">feature</a>', 'advanced-ads' ), ADVADS_URL . 'feature-requests/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-manual' ); ?></li>
154
- <li><?php printf( __( 'Thank the developer with a &#9733;&#9733;&#9733;&#9733;&#9733; review on <a href="%s" target="_blank">wordpress.org</a>', 'advanced-ads' ), 'https://wordpress.org/support/view/plugin-reviews/advanced-ads' ); ?></li>
155
- </ul><?php
156
- }
157
-
158
- /**
159
- * help widget
160
- */
161
- public static function render_help(){
162
-
163
- ?><p><?php _e( 'Need help to set up and optimize your ads? Need custom coding on your site? Ask me for a quote.', 'advanced-ads' ); ?></p>
164
- <p><a class="button button-primary" href="mailto:support@wpadvancedads.com?subject=<?php printf( __( 'Help with ads on %s', 'advanced-ads' ), home_url()); ?>"><?php
165
- _e( 'Get an offer', 'advanced-ads' ); ?></a></p><?php
166
- }
167
-
168
- /**
169
- * pro add-on widget
170
- */
171
- public static function render_add_on_pro(){
172
-
173
- ?><p><?php _e( 'Ad management for advanced websites.', 'advanced-ads' ); ?></p><ul class='list'>
174
- <li><?php _e( 'Cache-busting', 'advanced-ads' ); ?></li>
175
- <li><?php _e( 'Advanced visitor conditions', 'advanced-ads' ); ?></li>
176
- <li><?php _e( 'Flash ads with fallback', 'advanced-ads' ); ?></li>
177
- </ul><p><a class="button button-primary" href="<?php echo ADVADS_URL; ?>add-ons/advanced-ads-pro/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons" target="_blank"><?php
178
- _e( 'Get Pro', 'advanced-ads' ); ?></a></p><?php
179
- }
180
-
181
- /**
182
- * tracking add-on widget
183
- */
184
- public static function render_add_on_tracking(){
185
-
186
- ?><p><?php _e( 'Track the impressions of and clicks on your ads.', 'advanced-ads' ); ?></p><ul class='list'>
187
- <li><?php _e( '2 methods to count impressions', 'advanced-ads' ); ?></li>
188
- <li><?php _e( 'beautiful stats for all or single ads', 'advanced-ads' ); ?></li>
189
- <li><?php _e( 'group stats by day, week or month', 'advanced-ads' ); ?></li>
190
- </ul><p><a class="button button-primary" href="<?php echo ADVADS_URL; ?>add-ons/tracking/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons" target="_blank"><?php
191
- _e( 'Get the Tracking add-on', 'advanced-ads' ); ?></a></p><?php
192
- }
193
-
194
- /**
195
- * responsive add-on widget
196
- */
197
- public static function render_add_on_responsive(){
198
-
199
- ?><p><?php _e( 'Display ads based on the size of your visitor’s browser or device.', 'advanced-ads' ); ?></p><ul class='list'>
200
- <li><?php _e( 'set a range (from … to …) pixels for the browser size', 'advanced-ads' ); ?></li>
201
- <li><?php _e( 'set custom sizes for AdSense responsive ads', 'advanced-ads' ); ?></li>
202
- <li><?php _e( 'list all ads by their responsive settings', 'advanced-ads' ); ?></li>
203
- </ul><p><a class="button button-primary" href="<?php echo ADVADS_URL; ?>add-ons/responsive-ads/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons" target="_blank"><?php
204
- _e( 'Get the Responsive add-on', 'advanced-ads' ); ?></a></p><?php
205
- }
206
-
207
- /**
208
- * geo targeting add-on widget
209
- */
210
- public static function render_add_on_geotargeting(){
211
-
212
- ?><p><?php _e( 'Target visitors by their geo location.', 'advanced-ads' ); ?></p><ul class='list'>
213
- </ul><p><a class="button button-primary" href="<?php echo ADVADS_URL; ?>add-ons/geo-targeting/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons" target="_blank"><?php
214
- _e( 'Get the Geo Targeting add-on', 'advanced-ads' ); ?></a></p><?php
215
- }
216
-
217
- /**
218
- * sticky add-on widget
219
- */
220
- public static function render_add_on_sticky(){
221
-
222
- ?><p><?php _e( 'Fix ads to the browser while users are scrolling and create best performing anchor ads.', 'advanced-ads' ); ?></p><ul class='list'>
223
- <li><?php _e( 'position ads that don’t scroll with the screen', 'advanced-ads' ); ?></li>
224
- <li><?php _e( 'build anchor ads not only on mobile devices', 'advanced-ads' ); ?></li>
225
- </ul><p><a class="button button-primary" href="<?php echo ADVADS_URL; ?>add-ons/sticky-ads/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons" target="_blank"><?php
226
- _e( 'Get the Sticky add-on', 'advanced-ads' ); ?></a></p><?php
227
- }
228
-
229
- /**
230
- * layer add-on widget
231
- */
232
- public static function render_add_on_layer(){
233
-
234
- ?><p><?php _e( 'Display content and ads in layers and popups on custom events.', 'advanced-ads' ); ?></p><ul class='list'>
235
- <li><?php _e( 'display a popup after a user interaction like scrolling', 'advanced-ads' ); ?></li>
236
- <li><?php _e( 'optional background overlay', 'advanced-ads' ); ?></li>
237
- <li><?php _e( 'allow users to close the popup', 'advanced-ads' ); ?></li>
238
- </ul><p><a class="button button-primary" href="<?php echo ADVADS_URL; ?>add-ons/popup-and-layer-ads/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons" target="_blank"><?php
239
- _e( 'Get the PopUp and Layer add-on', 'advanced-ads' ); ?></a></p><?php
240
- }
241
-
242
- /**
243
- * slider add-on widget
244
- */
245
- public static function render_add_on_slider(){
246
-
247
- ?><p><?php _e( 'Create a beautiful and simple slider from your ads.', 'advanced-ads' ); ?></p>
248
- <p><a class="button button-primary" href="<?php echo ADVADS_URL; ?>add-ons/slider/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons" target="_blank"><?php
249
- _e( 'Get the Slider add-on', 'advanced-ads' ); ?></a></p><?php
250
- }
251
-
252
- /**
253
- * selling ads add-on widget
254
- */
255
- public static function render_add_on_sellingads(){
256
- ?><p><?php _e( 'Let users purchase ads directly in the frontend of your site.', 'advanced-ads' ); ?></p>
257
- <p><a class="button button-primary" href="<?php echo ADVADS_URL; ?>add-ons/slider/#utm_source=advanced-ads&utm_medium=link&utm_campaign=overview-add-ons" target="_blank"><?php
258
- _e( 'Get the Selling Ads add-on', 'advanced-ads' ); ?></a></p><?php
259
- }
260
-
261
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/includes/class-settings.php DELETED
@@ -1,467 +0,0 @@
1
- <?php
2
- defined( 'ABSPATH' ) || exit;
3
-
4
- class Advanced_Ads_Admin_Settings {
5
- /**
6
- * Instance of this class.
7
- *
8
- * @var object
9
- */
10
- protected static $instance = null;
11
-
12
- private function __construct() {
13
- // settings handling
14
- add_action( 'admin_init', array( $this, 'settings_init' ) );
15
- }
16
-
17
- /**
18
- * Return an instance of this class.
19
- *
20
- * @return object A single instance of this class.
21
- */
22
- public static function get_instance() {
23
- // If the single instance hasn't been set, set it now.
24
- if ( null == self::$instance ) {
25
- self::$instance = new self;
26
- }
27
-
28
- return self::$instance;
29
- }
30
-
31
- /**
32
- * initialize settings
33
- *
34
- * @since 1.0.1
35
- */
36
- public function settings_init(){
37
-
38
- // get settings page hook
39
- $hook = Advanced_Ads_Admin::get_instance()->plugin_screen_hook_suffix;
40
-
41
- // register settings
42
- register_setting( ADVADS_SLUG, ADVADS_SLUG, array($this, 'sanitize_settings') );
43
-
44
- // general settings section
45
- add_settings_section(
46
- 'advanced_ads_setting_section',
47
- __( 'General', 'advanced-ads' ),
48
- array($this, 'render_settings_section_callback'),
49
- $hook
50
- );
51
-
52
- // licenses section only for main blog
53
- if( is_main_site( get_current_blog_id() ) ){
54
- // register license settings
55
- register_setting( ADVADS_SLUG . '-licenses', ADVADS_SLUG . '-licenses' );
56
-
57
- add_settings_section(
58
- 'advanced_ads_settings_license_section',
59
- __( 'Licenses', 'advanced-ads' ),
60
- array($this, 'render_settings_licenses_section_callback'),
61
- 'advanced-ads-settings-license-page'
62
- );
63
-
64
- add_filter( 'advanced-ads-setting-tabs', array( $this, 'license_tab') );
65
- }
66
-
67
- // add setting fields to disable ads
68
- add_settings_field(
69
- 'disable-ads',
70
- __( 'Disable ads', 'advanced-ads' ),
71
- array($this, 'render_settings_disable_ads'),
72
- $hook,
73
- 'advanced_ads_setting_section'
74
- );
75
- // add setting fields for user role
76
- add_settings_field(
77
- 'hide-for-user-role',
78
- __( 'Hide ads for logged in users', 'advanced-ads' ),
79
- array($this, 'render_settings_hide_for_users'),
80
- $hook,
81
- 'advanced_ads_setting_section'
82
- );
83
- // add setting fields for advanced js
84
- add_settings_field(
85
- 'activate-advanced-js',
86
- __( 'Use advanced JavaScript', 'advanced-ads' ),
87
- array($this, 'render_settings_advanced_js'),
88
- $hook,
89
- 'advanced_ads_setting_section'
90
- );
91
- // add setting fields for content injection protection
92
- add_settings_field(
93
- 'content-injection-everywhere',
94
- __( 'Unlimited ad injection', 'advanced-ads' ),
95
- array($this, 'render_settings_content_injection_everywhere'),
96
- $hook,
97
- 'advanced_ads_setting_section'
98
- );
99
- // add setting fields for content injection priority
100
- add_settings_field(
101
- 'content-injection-priority',
102
- __( 'Priority of content injection filter', 'advanced-ads' ),
103
- array($this, 'render_settings_content_injection_priority'),
104
- $hook,
105
- 'advanced_ads_setting_section'
106
- );
107
- // add setting fields for content injection priority
108
- add_settings_field(
109
- 'block-bots',
110
- __( 'Hide ads from bots', 'advanced-ads' ),
111
- array($this, 'render_settings_block_bots'),
112
- $hook,
113
- 'advanced_ads_setting_section'
114
- );
115
- // opt out from internal notices
116
- add_settings_field(
117
- 'disable-notices',
118
- __( 'Disable notices', 'advanced-ads' ),
119
- array($this, 'render_settings_disabled_notices'),
120
- $hook,
121
- 'advanced_ads_setting_section'
122
- );
123
- // opt out from internal notices
124
- add_settings_field(
125
- 'front-prefix',
126
- __( 'ID prefix', 'advanced-ads' ),
127
- array($this, 'render_settings_front_prefix'),
128
- $hook,
129
- 'advanced_ads_setting_section'
130
- );
131
- // remove id from widgets
132
- add_settings_field(
133
- 'remove-widget-id',
134
- __( 'Remove Widget ID', 'advanced-ads' ),
135
- array($this, 'render_settings_remove_widget_id'),
136
- $hook,
137
- 'advanced_ads_setting_section'
138
- );
139
- // allow editors to manage ads
140
- add_settings_field(
141
- 'editors-manage-ads',
142
- __( 'Allow editors to manage ads', 'advanced-ads' ),
143
- array($this, 'render_settings_editors_manage_ads'),
144
- $hook,
145
- 'advanced_ads_setting_section'
146
- );
147
-
148
- add_settings_field(
149
- 'add-custom-label',
150
- __( 'Ad label', 'advanced-ads' ),
151
- array( $this, 'render_settings_add_custom_label' ),
152
- $hook,
153
- 'advanced_ads_setting_section'
154
- );
155
-
156
- // only for main blog
157
- if ( is_main_site( get_current_blog_id() ) ) {
158
- add_settings_field(
159
- 'uninstall-delete-data',
160
- __( 'Delete data on uninstall', 'advanced-ads' ),
161
- array( $this, 'render_settings_uninstall_delete_data' ),
162
- $hook,
163
- 'advanced_ads_setting_section'
164
- );
165
- }
166
-
167
- // hook for additional settings from add-ons
168
- do_action( 'advanced-ads-settings-init', $hook );
169
- }
170
-
171
- /**
172
- * add license tab
173
- *
174
- * arr $tabs setting tabs
175
- */
176
- public function license_tab( array $tabs ){
177
-
178
- $tabs['licenses'] = array(
179
- 'page' => 'advanced-ads-settings-license-page',
180
- 'group' => ADVADS_SLUG . '-licenses',
181
- 'tabid' => 'licenses',
182
- 'title' => __( 'Licenses', 'advanced-ads' )
183
- );
184
-
185
- return $tabs;
186
- }
187
-
188
- /**
189
- * render settings section
190
- *
191
- * @since 1.1.1
192
- */
193
- public function render_settings_section_callback(){
194
- // for whatever purpose there might come
195
- }
196
-
197
- /**
198
- * render licenses settings section
199
- *
200
- * @since 1.5.1
201
- */
202
- public function render_settings_licenses_section_callback(){
203
- echo '<p>'. __( 'Enter license keys for our powerful <a href="'.ADVADS_URL.'add-ons/#utm_source=advanced-ads&utm_medium=link&utm_campaign=settings-licenses" target="_blank">add-ons</a>.', 'advanced-ads' );
204
- echo ' ' . __( 'See also <a href="'.ADVADS_URL.'manual-category/purchase-licenses/#utm_source=advanced-ads&utm_medium=link&utm_campaign=settings-licenses" target="_blank">Issues and questions about licenses</a>', 'advanced-ads' ) .'.</p>';
205
- // nonce field
206
- echo '<input type="hidden" id="advads-licenses-ajax-referrer" value="' . wp_create_nonce( "advads_ajax_license_nonce" ) . '"/>';
207
- }
208
-
209
- /**
210
- * options to disable ads
211
- *
212
- * @since 1.3.11
213
- */
214
- public function render_settings_disable_ads(){
215
- $options = Advanced_Ads::get_instance()->options();
216
-
217
- // set the variables
218
- $disable_all = isset($options['disabled-ads']['all']) ? 1 : 0;
219
- $disable_404 = isset($options['disabled-ads']['404']) ? 1 : 0;
220
- $disable_archives = isset($options['disabled-ads']['archives']) ? 1 : 0;
221
- $disable_secondary = isset($options['disabled-ads']['secondary']) ? 1 : 0;
222
- $disable_feed = ( ! isset( $options['disabled-ads']['feed'] ) || $options['disabled-ads']['feed'] ) ? 1 : 0;
223
-
224
- // load the template
225
- include ADVADS_BASE_PATH . 'admin/views/settings-disable-ads.php';
226
- }
227
-
228
- /**
229
- * render setting to hide ads from logged in users
230
- *
231
- * @since 1.1.1
232
- */
233
- public function render_settings_hide_for_users(){
234
- $options = Advanced_Ads::get_instance()->options();
235
- $current_capability_role = isset($options['hide-for-user-role']) ? $options['hide-for-user-role'] : 0;
236
-
237
- $capability_roles = array(
238
- '' => __( '(display to all)', 'advanced-ads' ),
239
- 'read' => __( 'Subscriber', 'advanced-ads' ),
240
- 'delete_posts' => __( 'Contributor', 'advanced-ads' ),
241
- 'edit_posts' => __( 'Author', 'advanced-ads' ),
242
- 'edit_pages' => __( 'Editor', 'advanced-ads' ),
243
- 'activate_plugins' => __( 'Admin', 'advanced-ads' ),
244
- );
245
- echo '<select name="'.ADVADS_SLUG.'[hide-for-user-role]">';
246
- foreach ( $capability_roles as $_capability => $_role ) {
247
- echo '<option value="'.$_capability.'" '.selected( $_capability, $current_capability_role, false ).'>'.$_role.'</option>';
248
- }
249
- echo '</select>';
250
-
251
- echo '<p class="description">'. __( 'Choose the lowest role a user must have in order to not see any ads.', 'advanced-ads' ) .'</p>';
252
- }
253
-
254
- /**
255
- * render setting to display advanced js file
256
- *
257
- * @since 1.2.3
258
- */
259
- public function render_settings_advanced_js(){
260
- $options = Advanced_Ads::get_instance()->options();
261
- $checked = ( ! empty($options['advanced-js'])) ? 1 : 0;
262
-
263
- // display notice if js file was overridden
264
- if( ! $checked && apply_filters( 'advanced-ads-activate-advanced-js', $checked ) ){
265
- echo '<p>' . __( '<strong>notice: </strong>the file is currently enabled by an add-on that needs it.', 'advanced-ads' ) . '</p>';
266
- }
267
- echo '<input id="advanced-ads-advanced-js" type="checkbox" value="1" name="'.ADVADS_SLUG.'[advanced-js]" '.checked( $checked, 1, false ).'>';
268
- echo '<p class="description">'. sprintf( __( 'Enable advanced JavaScript functions (<a href="%s" target="_blank">here</a>). Some features and add-ons might override this setting if they need features from this file.', 'advanced-ads' ), ADVADS_URL . 'javascript-functions/#utm_source=advanced-ads&utm_medium=link&utm_campaign=settings' ) .'</p>';
269
- }
270
-
271
- /**
272
- * render setting for content injection protection
273
- *
274
- * @since 1.4.1
275
- */
276
- public function render_settings_content_injection_everywhere(){
277
- $options = Advanced_Ads::get_instance()->options();
278
- $everywhere = ( isset($options['content-injection-everywhere']) ) ? true : false;
279
-
280
- echo '<input id="advanced-ads-injection-everywhere" type="checkbox" value="true" name="'.ADVADS_SLUG.'[content-injection-everywhere]" '.checked( $everywhere, true, false ).'>';
281
- echo '<p class="description">'. __( 'Some plugins and themes trigger ad injection where it shouldn’t happen. Therefore, Advanced Ads ignores injected placements on non-singular pages and outside the loop. However, this can cause problems with some themes. You can enable this option if you don’t see ads or want to enable ad injections on archive pages AT YOUR OWN RISK.', 'advanced-ads' ) .'</p>';
282
-
283
- }
284
-
285
- /**
286
- * render setting for content injection priority
287
- *
288
- * @since 1.4.1
289
- */
290
- public function render_settings_content_injection_priority(){
291
- $options = Advanced_Ads::get_instance()->options();
292
- $priority = ( isset($options['content-injection-priority'])) ? intval( $options['content-injection-priority'] ) : 100;
293
-
294
- echo '<input id="advanced-ads-content-injection-priority" type="number" value="'.$priority.'" name="'.ADVADS_SLUG.'[content-injection-priority]" size="3"/>';
295
- echo '<p class="description">';
296
- if ( $priority < 11 ) {
297
- echo '<span class="advads-error-message">' . __( 'Please check your post content. A priority of 10 and below might cause issues (wpautop function might run twice).', 'advanced-ads' ) . '</span><br />';
298
- }
299
- _e( 'Play with this value in order to change the priority of the injected ads compared to other auto injected elements in the post content.', 'advanced-ads' );
300
- echo '</p>';
301
- }
302
-
303
- /**
304
- * render setting for blocking bots
305
- *
306
- * @since 1.4.9
307
- */
308
- public function render_settings_block_bots(){
309
- $options = Advanced_Ads::get_instance()->options();
310
- $checked = ( ! empty($options['block-bots'])) ? 1 : 0;
311
-
312
- echo '<input id="advanced-ads-block-bots" type="checkbox" value="1" name="'.ADVADS_SLUG.'[block-bots]" '.checked( $checked, 1, false ).'>';
313
- echo '<p class="description">'. sprintf( __( 'Hide ads from crawlers, bots and empty user agents. Also prevents counting impressions for bots when using the <a href="%s" target="_blank">Tracking Add-On</a>.', 'advanced-ads' ), ADVADS_URL . 'add-ons/tracking/#utm_source=advanced-ads&utm_medium=link&utm_campaign=settings' ) .'<br/>'
314
- . __( 'Disabling this option only makes sense if your ads contain content you want to display to bots (like search engines) or your site is cached and bots could create a cached version without the ads.', 'advanced-ads' ) . '</p>';
315
- }
316
-
317
- /**
318
- * render setting to disable notices
319
- *
320
- * @since 1.5.3
321
- */
322
- public function render_settings_disabled_notices(){
323
- $options = Advanced_Ads::get_instance()->options();
324
- $checked = ( ! empty($options['disable-notices'])) ? 1 : 0;
325
-
326
- echo '<input id="advanced-ads-disabled-notices" type="checkbox" value="1" name="'.ADVADS_SLUG.'[disable-notices]" '.checked( $checked, 1, false ).'>';
327
- echo '<p class="description">'. __( 'Disable internal notices like tips, tutorials, email newsletters and update notices. Disabling notices is recommended if you run multiple blogs with Advanced Ads already.', 'advanced-ads' ) . '</p>';
328
- }
329
-
330
- /**
331
- * render setting for frontend prefix
332
- *
333
- * @since 1.6.8
334
- */
335
- public function render_settings_front_prefix(){
336
- $options = Advanced_Ads::get_instance()->options();
337
-
338
- $prefix = Advanced_Ads_Plugin::get_instance()->get_frontend_prefix();
339
- $old_prefix = ( isset($options['id-prefix'])) ? esc_attr( $options['id-prefix'] ) : '';
340
-
341
- echo '<input id="advanced-ads-front-prefix" type="text" value="' .$prefix .'" name="'.ADVADS_SLUG.'[front-prefix]" />';
342
- // deprecated
343
- echo '<input type="hidden" value="' .$old_prefix .'" name="'.ADVADS_SLUG.'[id-prefix]" />';
344
- echo '<p class="description">'. __( 'Prefix of class or id attributes in the frontend. Change it if you don’t want <strong>ad blockers</strong> to mark these blocks as ads.<br/>You might need to <strong>rewrite css rules afterwards</strong>.', 'advanced-ads' ) .'</p>';
345
- }
346
-
347
- /**
348
- * render setting to remove the id from advanced ads widgets
349
- *
350
- * @since 1.6.8.2
351
- */
352
- public function render_settings_remove_widget_id(){
353
- $options = Advanced_Ads::get_instance()->options();
354
-
355
- // is true by default if no options where previously set
356
- if( ! isset($options['remove-widget-id']) && $options !== array() ){
357
- $remove = false;
358
- } elseif( $options === array() ){
359
- $remove = true;
360
- } else {
361
- $remove = true;
362
- }
363
-
364
- echo '<input id="advanced-ads-remove-widget-id" type="checkbox" ' . checked( $remove, true, false ) . ' name="'.ADVADS_SLUG.'[remove-widget-id]" />';
365
- echo '<p class="description">' . __( 'Remove the ID attribute from widgets in order to not make them an easy target of ad blockers.', 'advanced-ads' );
366
-
367
- if ( class_exists( 'q2w3_fixed_widget', false ) ) {
368
- echo '<br />' . __( 'If checked, the Advanced Ads Widget will not work with the fixed option of the <strong>Q2W3 Fixed Widget</strong> plugin.', 'advanced-ads' );
369
- }
370
-
371
- echo '</p>';
372
- }
373
-
374
- /**
375
- * render setting to allow editors to manage ads
376
- *
377
- * @since 1.6.14
378
- */
379
- public function render_settings_editors_manage_ads(){
380
- $options = Advanced_Ads::get_instance()->options();
381
-
382
- // is false by default if no options where previously set
383
- if( isset($options['editors-manage-ads']) && $options['editors-manage-ads'] ){
384
- $allow = true;
385
- } else {
386
- $allow = false;
387
- }
388
-
389
- echo '<input id="advanced-ads-editors-manage-ads" type="checkbox" ' . checked( $allow, true, false ) . ' name="'.ADVADS_SLUG.'[editors-manage-ads]" />';
390
- echo '<p class="description">'. __( 'Allow editors to also manage and publish ads.', 'advanced-ads' ) .
391
- ' ' . sprintf(__( 'You can assign different ad-related roles on a user basis with <a href="%s" target="_blank">Advanced Ads Pro</a>.', 'advanced-ads' ), ADVADS_URL . 'add-ons/advanced-ads-pro/#utm_source=advanced-ads&utm_medium=link&utm_campaign=settings') . '</p>';
392
- }
393
-
394
- /**
395
- * render setting to add an "Advertisement" label before ads
396
- *
397
- */
398
- public function render_settings_add_custom_label(){
399
- $options = Advanced_Ads::get_instance()->options();
400
-
401
- $enabled = isset( $options['custom-label']['enabled'] );
402
- $label = ! empty ( $options['custom-label']['text'] ) ? esc_html( $options['custom-label']['text'] ) : _x( 'Advertisements', 'label before ads' );
403
- ?>
404
-
405
- <fieldset>
406
- <input type="checkbox" <?php checked( $enabled, true ); ?> value="1" onclick="advads_toggle_box( this, '#advads-custom-label' );" name="<?php echo ADVADS_SLUG . '[custom-label][enabled]'; ?>" />
407
- <input <?php if ( ! $enabled ) echo 'style="display:none;"' ?> id="advads-custom-label" type="text" value="<?php echo $label; ?>" name="<?php echo ADVADS_SLUG . '[custom-label][text]'; ?>" />
408
- </fieldset>
409
- <p class="description"><?php _e( 'Displayed above ads.', 'advanced-ads' ); ?>&nbsp;<a target="_blank" href="<?php echo ADVADS_URL . 'manual/advertisement-label/#utm_source=advanced-ads&utm_medium=link&utm_campaign=settings-advertisement-label'?>"><?php _e( 'Manual', 'advanced-ads' ); ?></a></p>
410
-
411
- <?php
412
- }
413
-
414
- /**
415
- * render setting 'Delete data on uninstall"
416
- *
417
- */
418
- public function render_settings_uninstall_delete_data(){
419
- $options = Advanced_Ads::get_instance()->options();
420
- $enabled = ! empty( $options['uninstall-delete-data'] ); ?>
421
-
422
- <input type="checkbox" value="1" name="<?php echo ADVADS_SLUG; ?>[uninstall-delete-data]" <?php checked( $enabled, 1 ); ?>>
423
- <p class="description"><?php _e( 'Clean up all data related to Advanced Ads when removing the plugin.', 'advanced-ads' ); ?></p>
424
- <?php
425
- }
426
-
427
- /**
428
- * sanitize plugin settings
429
- *
430
- * @since 1.5.1
431
- * @param array $options all the options
432
- */
433
- public function sanitize_settings($options){
434
-
435
- // sanitize whatever option one wants to sanitize
436
-
437
- if ( isset( $options['front-prefix'] ) ) {
438
- $options['front-prefix'] = sanitize_html_class( $options['front-prefix'], Advanced_Ads_Plugin::DEFAULT_FRONTEND_PREFIX );
439
- }
440
-
441
- $options = apply_filters( 'advanced-ads-sanitize-settings', $options );
442
-
443
- // check if editors can edit ads now and set the rights
444
- // else, remove that right
445
- $editor_role = get_role( 'editor' );
446
- if( null == $editor_role ){
447
- return $options;
448
- }
449
- if( isset($options['editors-manage-ads']) && $options['editors-manage-ads'] ){
450
- $editor_role->add_cap( 'advanced_ads_see_interface' );
451
- $editor_role->add_cap( 'advanced_ads_edit_ads' );
452
- $editor_role->add_cap( 'advanced_ads_manage_placements' );
453
- $editor_role->add_cap( 'advanced_ads_place_ads' );
454
- } else {
455
- $editor_role->remove_cap( 'advanced_ads_see_interface' );
456
- $editor_role->remove_cap( 'advanced_ads_edit_ads' );
457
- $editor_role->remove_cap( 'advanced_ads_manage_placements' );
458
- $editor_role->remove_cap( 'advanced_ads_place_ads' );
459
- }
460
-
461
- // we need 3 states: ! isset, 1, 0
462
- $options['disabled-ads']['feed'] = isset( $options['disabled-ads']['feed'] ) ? 1 : 0;
463
-
464
- return $options;
465
- }
466
-
467
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/includes/class-shortcode-creator.php DELETED
@@ -1,138 +0,0 @@
1
- <?php
2
- /**
3
- * shortcode generator for TinyMCE editor
4
- *
5
- */
6
- class Advanced_Ads_Shortcode_Creator {
7
- /**
8
- * instance of this class.
9
- *
10
- * @var object
11
- */
12
- protected static $instance = null;
13
-
14
- private function __construct() {
15
- add_action( 'init', array ( $this, 'init' ) );
16
- }
17
-
18
- /**
19
- * Return an instance of this class.
20
- *
21
- * @return object A single instance of this class.
22
- */
23
- public static function get_instance() {
24
- // If the single instance hasn't been set, set it now.
25
- if ( null == self::$instance ) {
26
- self::$instance = new self;
27
- }
28
-
29
- return self::$instance;
30
- }
31
-
32
- public function init() {
33
- if( ! current_user_can( Advanced_Ads_Plugin::user_cap( 'advanced_ads_place_ads') ) ) {
34
- return;
35
- }
36
-
37
- if ( 'true' == get_user_option( 'rich_editing' ) ) {
38
- add_filter( 'mce_external_plugins', array( $this, 'add_plugin' ) );
39
- add_filter( 'mce_buttons', array( $this, 'register_buttons' ) );
40
- add_filter( 'mce_external_languages', array( $this, 'add_l10n' ) );
41
- add_action( 'wp_ajax_advads_content_for_shortcode_creator', array( $this, 'get_content_for_shortcode_creator' ) );
42
- }
43
- }
44
-
45
- /**
46
- * add the plugin to array of external TinyMCE plugins
47
- *
48
- */
49
- public function add_plugin( $plugin_array ) {
50
- $plugin_array['advads_shortcode'] = ADVADS_BASE_URL . 'admin/assets/js/shortcode.js';
51
- return $plugin_array;
52
- }
53
-
54
- /**
55
- * add button to tinyMCE window
56
- *
57
- */
58
- public function register_buttons( $buttons ) {
59
- $buttons[] = 'advads_shortcode_button';
60
- return $buttons;
61
- }
62
-
63
- /**
64
- * prints html select field for shortcode creator
65
- *
66
- */
67
- public function get_content_for_shortcode_creator() {
68
- if ( ! ( current_user_can( 'edit_posts' ) || current_user_can( 'edit_pages' ) ) ) {
69
- return;
70
- }
71
-
72
- $items = self::items_for_select(); ?>
73
-
74
- <select id="advads-select-for-shortcode">
75
- <option value=""><?php _e( '--empty--', 'advanced-ads' ); ?></option>
76
- <?php if ( isset( $items['ads'] ) ) : ?>
77
- <optgroup label="<?php _e( 'Ads', 'advanced-ads' ); ?>">
78
- <?php foreach ( $items['ads'] as $_item_id => $_item_title ) : ?>
79
- <option value="<?php echo $_item_id; ?>"><?php echo $_item_title; ?></option>
80
- <?php endforeach; ?>
81
- </optgroup>
82
- <?php endif; ?>
83
- <?php if ( isset( $items['groups'] ) ) : ?>
84
- <optgroup label="<?php _e( 'Ad Groups', 'advanced-ads' ); ?>">
85
- <?php foreach ( $items['groups'] as $_item_id => $_item_title ) : ?>
86
- <option value="<?php echo $_item_id; ?>"><?php echo $_item_title; ?></option>
87
- <?php endforeach; ?>
88
- </optgroup>
89
- <?php endif; ?>
90
- <?php if ( isset( $items['placements'] ) ) : ?>
91
- <optgroup label="<?php _e( 'Placements', 'advanced-ads' ); ?>">
92
- <?php foreach ( $items['placements'] as $_item_id => $_item_title ) : ?>
93
- <option value="<?php echo $_item_id; ?>"><?php echo $_item_title; ?></option>
94
- <?php endforeach; ?>
95
- </optgroup>
96
- <?php endif; ?>
97
- </select><?php
98
- exit();
99
- }
100
-
101
- /**
102
- * get items for item select field
103
- *
104
- * @return arr $select items for select field
105
- */
106
- public static function items_for_select(){
107
- $select = array();
108
- $model = Advanced_Ads::get_instance()->get_model();
109
-
110
- // load all ads
111
- $ads = $model->get_ads( array( 'orderby' => 'name', 'order' => 'ASC' ) );
112
- foreach ( $ads as $_ad ){
113
- $select['ads']['ad_' . $_ad->ID] = $_ad->post_title;
114
- }
115
-
116
- // load all ad groups
117
- $groups = $model->get_ad_groups();
118
- foreach ( $groups as $_group ){
119
- $select['groups']['group_' . $_group->term_id] = $_group->name;
120
- }
121
-
122
- // load all placements
123
- $placements = $model->get_ad_placements_array();
124
- foreach ( $placements as $key => $_placement ) {
125
- $select['placements']['placement_' . $key] = $_placement['name'];
126
- }
127
-
128
- return $select;
129
- }
130
-
131
- /**
132
- * add localisation
133
- */
134
- public function add_l10n( $mce_external_languages ) {
135
- $mce_external_languages[ 'advads_shortcode' ] = ADVADS_BASE_PATH . 'admin/includes/shortcode-creator-l10n.php';
136
- return $mce_external_languages;
137
- }
138
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/includes/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden
admin/includes/notices.php DELETED
@@ -1,90 +0,0 @@
1
- <?php
2
- /**
3
- * array with admin notices
4
- */
5
- $advanced_ads_admin_notices = apply_filters( 'advanced-ads-notices', array(
6
- // if users updated from a previous version to 1.4.5
7
- '1.4.5' => array(
8
- 'type' => 'update',
9
- 'text' => 'Advanced Ads 1.4.5 changes the behavior of some display conditions. Please read this <a href="http://wpadvancedads.com/advanced-ads-1-4-5/" target="_blank">update post</a> to learn if this change should concern you.',
10
- ),
11
- // email tutorial
12
- 'nl_intro' => array(
13
- 'type' => 'info',
14
- 'text' => sprintf(__( 'Advanced Ads successfully installed. Take a look at the <a href="%s">First Steps</a>.', 'advanced-ads' ), admin_url( 'admin.php?page=advanced-ads-intro' )),
15
- 'global' => true
16
- ),
17
- // email tutorial
18
- 'nl_first_steps' => array(
19
- 'type' => 'subscribe',
20
- 'text' => __( 'Thank you for activating <strong>Advanced Ads</strong>. Would you like to receive the first steps via email?', 'advanced-ads' ),
21
- 'confirm_text' => __( 'Yes, send it', 'advanced-ads' ),
22
- 'global' => true
23
- ),
24
- // free add-ons
25
- 'nl_free_addons' => array(
26
- 'type' => 'subscribe',
27
- 'text' => __( 'Thank you for using <strong>Advanced Ads</strong>. Stay informed and receive <strong>2 free add-ons</strong> for joining the newsletter.', 'advanced-ads' ),
28
- 'confirm_text' => __( 'Add me now', 'advanced-ads' ),
29
- 'global' => true
30
- ),
31
- // adsense newsletter group
32
- 'nl_adsense' => array(
33
- 'type' => 'subscribe',
34
- 'text' => __( 'Learn more about how and <strong>how much you can earn with AdSense</strong> and Advanced Ads from my dedicated newsletter.', 'advanced-ads' ),
35
- 'confirm_text' => __( 'Subscribe me now', 'advanced-ads' ),
36
- 'global' => true
37
- ),
38
- // if users updated from a previous version to 1.5.4
39
- '1.5.4' => array(
40
- 'type' => 'update',
41
- 'text' => 'With Advanced Ads 1.5.4 the handling of <strong>visitor conditions</strong> became more consistent, flexible, and hopefully easier to use too. Please read this <a href="http://wpadvancedads.com/advanced-ads-1-5-4/" target="_blank">update post</a> to learn if this change should concern you.',
42
- ),
43
- // if users updated from a previous version to 1.6
44
- '1.6' => array(
45
- 'type' => 'update',
46
- 'text' => 'Advanced Ads 1.6 contains important <strong>fixes for ad groups</strong>. Please read the <a href="https://wpadvancedads.com/advanced-ads-1-6/" target="_blank">update post</a>.',
47
- ),
48
- // if users updated from a previous version to 1.6.6
49
- '1.6.6' => array(
50
- 'type' => 'update',
51
- 'text' => 'Advanced Ads 1.6.6 changed <a href="/wp-admin/admin.php?page=advanced-ads-placements">placements</a> completely. Take a look at the <a href="https://wpadvancedads.com/advanced-ads-1-6-6/" target="_blank">update post</a> to find out why I am so excited about it.',
52
- ),
53
- // if users updated from a previous version to 1.7
54
- '1.7' => array(
55
- 'type' => 'update',
56
- 'text' => 'Advanced Ads 1.7 made changes to the Display Conditions interface. Please check your settings and the <a href="https://wpadvancedads.com/manual/display-conditions/" target="_blank">manual</a>, if you are using them.',
57
- ),
58
- // missing license codes
59
- 'license_invalid' => array(
60
- 'type' => 'plugin_error',
61
- 'text' => __( 'One or more license keys for <strong>Advanced Ads add-ons are invalid or missing</strong>.', 'advanced-ads' ) . ' ' . sprintf( __( 'Please add valid license keys <a href="%s">here</a>.', 'advanced-ads' ), get_admin_url( 1, 'admin.php?page=advanced-ads-settings#top#licenses' ) ),
62
- 'global' => true
63
- ),
64
- // license expires
65
- 'license_expires' => array(
66
- 'type' => 'plugin_error',
67
- 'text' => sprintf( __( 'One or more licenses for your <strong>Advanced Ads add-ons are expiring soon</strong>. Don’t risk to lose support and updates and renew your license before it expires with a significant discount on <a href="%s" target="_blank">the add-on page</a>.', 'advanced-ads' ), admin_url( 'admin.php?page=advanced-ads-settings#top#licenses' ) ),
68
- 'global' => true
69
- ),
70
- // license expired
71
- 'license_expired' => array(
72
- 'type' => 'plugin_error',
73
- 'text' => sprintf( __( '<strong>Advanced Ads</strong> license(s) expired. Support and updates are disabled. Please visit <a href="%s"> the license page</a> for more information.', 'advanced-ads' ), admin_url( 'admin.php?page=advanced-ads-settings#top#licenses' ) ),
74
- 'global' => true
75
- ),
76
- // please review
77
- 'review' => array(
78
- 'type' => 'info',
79
- 'text' => sprintf( __( '<img src="%3$s" alt="Thomas" width="80" height="115" class="advads-review-image"/>You are using <strong>Advanced Ads</strong> for some time now. Thank you! If you need my help then please visit the <a href="%1$s" target="_blank">Support page</a> to get free help.</p><h3>Thanks for your Review</h3><p>If you share my passion and find Advanced Ads useful then please <a href="%2$s" target="_blank">leave a 5-star review on wordpress.org</a>.</p><p><em>Thomas</em>', 'advanced-ads' ), ADVADS_URL . 'support/#utm_source=advanced-ads&utm_medium=link&utm_campaign=notice-review', 'https://wordpress.org/support/view/plugin-reviews/advanced-ads#postform', ADVADS_BASE_URL . 'admin/assets/img/thomas.png' ),
80
- 'global' => false
81
- ),
82
- // adblocker assets expired
83
- 'assets_expired' => array(
84
- 'type' => 'update',
85
- 'text' => sprintf( __('Some assets were changed. Please <strong>rebuild the asset folder</strong> in the <a href="%s">Advanced Ads settings</a> to update the ad blocker disguise.', 'advanced-ads' ), admin_url( 'admin.php?page=advanced-ads-settings' ) ),
86
- 'global' => true
87
- ),
88
-
89
- ));
90
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/includes/shortcode-creator-l10n.php DELETED
@@ -1,20 +0,0 @@
1
- <?php
2
- if ( ! defined( 'ABSPATH' ) )
3
- exit;
4
-
5
- if ( ! class_exists( '_WP_Editors' ) )
6
- require( ABSPATH . WPINC . '/class-wp-editor.php' );
7
-
8
- function advads_shortcode_creator_l10n() {
9
- $strings = array(
10
- 'title' => _x( 'Add an ad', 'shortcode creator', 'advanced-ads' ),
11
- 'ok' => _x( 'Add shortcode', 'shortcode creator', 'advanced-ads' ),
12
- 'cancel' => _x( 'Cancel', 'shortcode creator', 'advanced-ads' ),
13
- );
14
- $locale = _WP_Editors::$mce_locale;
15
- $translated = 'tinyMCE.addI18n("' . $locale . '.advads_shortcode", ' . json_encode( $strings ) . ");\n";
16
-
17
- return $translated;
18
- }
19
-
20
- $strings = advads_shortcode_creator_l10n();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/ad-display-metabox.php CHANGED
@@ -1,135 +1,41 @@
1
- <?php
2
- $display_conditions = Advanced_Ads_Display_Conditions::get_instance()->conditions;
3
- $options = $ad->options('conditions');
4
- // error_log(print_r($display_conditions, true));
5
- // error_log(print_r($options, true));
6
- ?><p class="description"><?php _e('Set Display Conditions to allow or hide the ad on specific pages.', 'advanced-ads'); ?></p>
7
- <div id="advads-display-conditions">
8
- <p class="advads-jqueryui-error advads-error-message hidden"><?php printf(__( 'There might be a problem with layouts and scripts in your dashboard. Please check <a href="%s" target="_blank">this article to learn more</a>.', 'advanced-ads' ), ADVADS_URL . 'manual/jquery-problem-in-dashboard/#utm_source=advanced-ads&utm_medium=link&utm_campaign=notice-jquery-error' ); ?></p>
9
- <table class="advads-conditions-table"><tbody><?php
10
- // add general conditions by default
11
- if( !is_array( $options ) || !count( $options )){
12
- $options = array(
13
- 'general' => null
14
- );
15
- }
16
-
17
- $last_index = -1;
18
- $i = 0;
19
- if (is_array($options)) :
20
- foreach ($options as $_index => $_options) :
21
- $show_or_force_warning = false;
22
- // get type attribute from previous option format
23
- $_options['type'] = isset($_options['type']) ? $_options['type'] : $_index;
24
- $connector = ( ! isset($_options['connector'] ) || 'or' !== $_options['connector'] ) ? 'and' : 'or';
25
- if (isset($_options['type']) && isset($display_conditions[$_options['type']]['metabox'])) {
26
- $metabox = $display_conditions[$_options['type']]['metabox'];
27
- } else {
28
- continue;
29
- }
30
- if (method_exists($metabox[0], $metabox[1])) {
31
- /**
32
- * show warning for connector when
33
- * not set to OR already
34
- * this condition and the previous are on page level and not from the identical type
35
- * they are both set to SHOW
36
- */
37
- $tax = ( isset( $_options['type'] ) && isset( $display_conditions[ $_options['type'] ]['taxonomy'] ) ) ? $display_conditions[ $_options['type'] ]['taxonomy'] : false;
38
- $last_tax = ( isset( $options[$last_index]['type'] ) && isset( $display_conditions[ $options[$last_index]['type'] ]['taxonomy'] ) ) ? $display_conditions[ $options[$last_index]['type'] ]['taxonomy'] : false;
39
- if( $tax && $last_tax && $last_tax === $tax
40
- && ( ! isset( $_options['connector'] ) || $_options['connector'] !== 'or' )
41
- && 'is' === $_options['operator'] && 'is' === $options[$last_index]['operator']
42
- && $_options['type'] !== $options[$last_index]['type'] ){
43
-
44
- $show_or_force_warning = true;
45
- }
46
-
47
- ?><tr><td class="advads-conditions-connector"><?php echo Advanced_Ads_Display_Conditions::render_connector_option( $i, $connector );
48
- if( $show_or_force_warning ){
49
- ?><p class="advads-error-message"><?php
50
- _e( 'Forced to OR.', 'advanced-ads');
51
- echo '&nbsp;<a target="_blank" href="' . ADVADS_URL . 'manual/display-conditions#manual-combining-multiple-conditions' . '">' . __( 'manual', 'advanced-ads' ) . '</a>';
52
- ?></p><?php
53
-
54
- }
55
- ?></td><td class="advads-conditions-type" data-condition-type="<?php echo $_options['type']; ?>"><?php echo $display_conditions[$_options['type']]['label']; ?></td><td><?php
56
- call_user_func(array($metabox[0], $metabox[1]), $_options, $i++);
57
- ?></td><td><button type="button" class="advads-display-conditions-remove button">x</button></td></tr><?php
58
- }
59
- $last_index = $_index;
60
- endforeach;
61
- endif;
62
- ?></tbody></table>
63
- <input type="hidden" id="advads-display-conditions-index" value="<?php echo is_array($options) ? count($options) : 0; ?>"/>
64
- </div>
65
- <?php if (!isset($options) || count($options) == 0) :
66
- ?><p><?php _e('If you want to display the ad everywhere, don\'t do anything here. ', 'advanced-ads'); ?></p><?php
67
- endif;
68
- ?><fieldset>
69
- <legend><?php _e('New condition', 'advanced-ads'); ?></legend>
70
- <div id="advads-display-conditions-new">
71
- <select>
72
- <option value=""><?php _e('-- choose a condition --', 'advanced-ads'); ?></option>
73
- <?php foreach ($display_conditions as $_condition_id => $_condition) : ?>
74
- <option value="<?php echo $_condition_id; ?>"><?php echo $_condition['label']; ?></option>
75
- <?php endforeach; ?>
76
- </select>
77
- <button type="button" class="button"><?php _e('add', 'advanced-ads'); ?></button>
78
- <span class="advads-loader" style="display: none;"></span>
79
- </div>
80
- </fieldset>
81
- <script>
82
- jQuery(document).ready(function ($) {
83
- $('#advads-display-conditions-new button').click(function () {
84
- var display_condition_type = $('#advads-display-conditions-new select').val();
85
- var display_condition_title = $('#advads-display-conditions-new select option:selected').text();
86
- var display_condition_index = parseInt($('#advads-display-conditions-index').val());
87
- if (!display_condition_type || '' == display_condition_type ){
88
- return;
89
- }
90
- $('#advads-display-conditions-new .advads-loader').show(); // show loader
91
- $('#advads-display-conditions-new button').hide(); // hide add button
92
- $.ajax({
93
- type: 'POST',
94
- url: ajaxurl,
95
- data: {
96
- action: 'load_display_conditions_metabox',
97
- type: display_condition_type,
98
- index: display_condition_index
99
- },
100
- success: function (r, textStatus, XMLHttpRequest) {
101
- // add
102
- if (r) {
103
- var connector = '<input style="display:none;" type="checkbox" name="<?php echo Advanced_Ads_Display_Conditions::FORM_NAME; ?>[' + display_condition_index + '][connector]" checked="checked" value="or" id="advads-conditions-'+ display_condition_index +'-connector"><label for="advads-conditions-'+ display_condition_index +'-connector"><?php _e( 'or', 'advanced-ads' ); ?></label>';
104
- var newline = '<tr><td class="advads-conditions-connector">'+connector+'</td><td class="advads-conditions-type" data-condition-type="'+ display_condition_type +'">' + display_condition_title + '</td><td>' + r + '</td><td><button type="button" class="advads-display-conditions-remove button">x</button></td></tr>';
105
- $('#advads-display-conditions table tbody').append(newline);
106
- if ( advads_use_ui_buttonset() ) {
107
- $('#advads-display-conditions table tbody .advads-conditions-single.advads-buttonset').buttonset();
108
- }
109
- if ( jQuery.fn.advads_button ) {
110
- $('#advads-display-conditions table tbody .advads-conditions-connector input').advads_button();
111
- }
112
- // increase count
113
- display_condition_index++;
114
- $('#advads-display-conditions-index').val(display_condition_index);
115
- // reset select
116
- $('#advads-display-conditions-new select')[0].selectedIndex = 0;
117
- }
118
- },
119
- error: function (MLHttpRequest, textStatus, errorThrown) {
120
- $('#advads-display-conditions-new').append(errorThrown);
121
- },
122
- complete: function( MLHttpRequest, textStatus ) {
123
- $('#advads-display-conditions-new .advads-loader').hide(); // hide loader
124
- $('#advads-display-conditions-new button').show(); // display add button
125
- }
126
- });
127
- });
128
- $(document).on('click', '.advads-display-conditions-remove', function () {
129
- var row = $(this).parents('#advads-display-conditions table tr');
130
- row.remove();
131
- });
132
- });
133
- </script>
134
- <?php
135
- do_action('advanced-ads-display-conditions-after', $ad);
1
+ <?php $types = Advanced_Ads::get_instance()->ad_types; ?>
2
+ <h4><?php _e('Where to display the ad', $this->plugin_slug); ?></h4>
3
+ <p class="advads-toggle-link" onclick="advads_toggle('#advads-how-it-works')">>>><?php _e('Click to see Help', $this->plugin_slug); ?><<<</p>
4
+ <ul id="advads-how-it-works" style="display: none;">
5
+ <li><?php _e('If you want to display the ad everywhere, don’t do anything here. ', $this->plugin_slug); ?></li>
6
+ <li><?php _e('The fewer conditions you enter, the better the performance will be.', $this->plugin_slug); ?></li>
7
+ <li><?php _e('Filling more than one item into the ’show here’ text field means at least one of them needs to be true. (OR)', $this->plugin_slug); ?></li>
8
+ <li><?php _e('Filling more than one item into the ’don’t show’ text field means all must match (AND).', $this->plugin_slug); ?></li>
9
+ <li><?php _e('When using one of the two choices on checkbox conditions, the rule is binding. E.g. "Front Page: show here" will result on the ad being only visible on the front page.', $this->plugin_slug); ?></li>
10
+ <li><?php _e('If there is nothing in the row, there won’t be any check. Meaning, if you leave everything empty, the ad will be displayed everywhere.', $this->plugin_slug); ?></li>
11
+ </ul>
12
+ <table id="advanced-ad-conditions">
13
+ <thead>
14
+ <tr>
15
+ <th></th>
16
+ <th><?php _e('show here', $this->plugin_slug); ?></th>
17
+ <th><?php _e('DON’T show', $this->plugin_slug); ?></th>
18
+ <th></th>
19
+ </tr>
20
+ <?php global $advanced_ads_ad_conditions;
21
+ if (is_array($advanced_ads_ad_conditions))
22
+ foreach ($advanced_ads_ad_conditions as $_key => $_condition) :
23
+ ?><tr>
24
+ <th><?php echo $_condition['label']; ?>
25
+ <?php if (!empty($_condition['description'])) : ?>
26
+ <span class="description" title="<?php echo $_condition['description']; ?>">(?)</span>
27
+ <?php endif; ?>
28
+ </th>
29
+ <?php if (empty($_condition['type'])) : continue; ?>
30
+ <?php elseif ($_condition['type'] == 'idfield' || $_condition['type'] == 'textvalues') : ?>
31
+ <td><input type="text" name="advanced_ad[conditions][<?php echo $_key; ?>][include]" value="<?php if(isset($ad->conditions[$_key]['include'])) echo $ad->conditions[$_key]['include']; ?>"/></td>
32
+ <td><input type="text" name="advanced_ad[conditions][<?php echo $_key; ?>][exclude]" value="<?php if(isset($ad->conditions[$_key]['exclude'])) echo $ad->conditions[$_key]['exclude']; ?>"/></td>
33
+ <?php elseif ($_condition['type'] == 'radio') : ?>
34
+ <td><input type="radio" name="advanced_ad[conditions][<?php echo $_key; ?>]" value="1" <?php if(isset($ad->conditions[$_key])) checked($ad->conditions[$_key], 1) ?>/></td>
35
+ <td><input type="radio" name="advanced_ad[conditions][<?php echo $_key; ?>]" value="0" <?php if(isset($ad->conditions[$_key])) checked($ad->conditions[$_key], 0) ?>/></td>
36
+ <?php endif; ?>
37
+ <td><button type="button" class="clear-radio"><?php _e('clear', $this->plugin_slug); ?></button></td>
38
+ </tr>
39
+ <?php endforeach; ?>
40
+ </thead>
41
+ </table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/ad-group-ads-inline-form.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if(count($ads)) : ?>
2
+ <p><form method="get" action="" class="ad-group-ads-form">
3
+ <table>
4
+ <tbody>
5
+ <?php foreach($ads as $_ad) : ?>
6
+ <tr>
7
+ <td><?php echo $_ad->post_title; ?></td>
8
+ <td class="ad-group-ads-weight">
9
+ <label>
10
+ <span class="title"><?php _ex('weight', 'ad group ads form', Advanced_Ads::TD); ?></span>
11
+ <select name="weight[<?php echo $_ad->ID; ?>]">
12
+ <?php $ad_weight = (isset($weights[$_ad->ID])) ? $weights[$_ad->ID] : Advads_Ad_Group::MAX_AD_GROUP_WEIGHT; ?>
13
+ <? for($i = 0; $i <= Advads_Ad_Group::MAX_AD_GROUP_WEIGHT; $i++) : ?>
14
+ <option <?php selected($ad_weight, $i); ?>><?php echo $i; ?></option>
15
+ <? endfor; ?>
16
+ </select>
17
+ </label>
18
+ </td>
19
+ </tr>
20
+ <?php endforeach; ?>
21
+ </tbody>
22
+ </table>
23
+ <p class="inline-edit-save submit">
24
+ <a href="#inline-edit" class="cancel button-secondary alignleft"><?php _e('Cancel', Advanced_Ads::TD); ?></a>
25
+ <a href="#inline-edit" class="save button-primary alignright"><?php _e('Update', Advanced_Ads::TD); ?></a>
26
+ <span class="spinner"></span>
27
+ <?php wp_nonce_field('ad-groups-inline-edit-nonce', 'advads-ad-groups-inline-form-nonce', false); ?>
28
+ <input type="hidden" name="taxonomy" value="<?php echo $group->id; ?>" />
29
+ <br class="clear" />
30
+ </p>
31
+ </form>
32
+ <?php else : ?>
33
+ <p><?php _e('There are no ads in this group', Advanced_Ads::TD); ?></p>
34
+ <?php endif; ?>
admin/views/ad-group-edit.php CHANGED
@@ -6,59 +6,70 @@
6
  * @subpackage Administration
7
  */
8
  // don't load directly
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- die('-1'); }
11
 
12
- if ( ! is_int( $group_id ) ) {
13
- ?>
14
- <div id="message" class="updated"><p><strong><?php _e( 'You did not select an item for editing.' ); ?></strong></p></div>
15
  <?php
16
- return;
17
  }
18
 
19
- do_action( "{$taxonomy}_pre_edit_form", $tag, $taxonomy );
20
  ?>
21
 
22
  <div class="wrap">
23
- <h1><?php echo $tax->labels->edit_item; ?></h1>
24
  <div id="ajax-response"></div>
25
- <form name="editgroup" id="editgroup" method="post" action="<?php echo Advanced_Ads_Groups_List::group_page_url(); ?>" class="validate"<?php do_action( $taxonomy . '_term_edit_form_tag' ); ?>>
26
  <input type="hidden" name="action" value="editedgroup" />
27
  <input type="hidden" name="group_id" value="<?php echo $group_id; ?>" />
28
- <input type="hidden" name="taxonomy" value="<?php echo esc_attr( $taxonomy ) ?>" />
29
- <?php wp_original_referer_field( true, 'previous' );
30
- wp_nonce_field( 'update-group_' . $group_id ); ?>
31
  <table class="form-table">
32
  <tr class="form-field form-required">
33
- <th scope="row" valign="top"><label for="name"><?php _ex( 'Name', 'Taxonomy Name' ); ?></label></th>
34
- <td><input name="name" id="name" type="text" value="<?php if ( isset($tag->name) ) { echo esc_attr( $tag->name ); } ?>" size="40" aria-required="true" /></td>
35
  </tr>
36
- <?php if ( ! global_terms_enabled() ) { ?>
37
  <tr class="form-field">
38
- <th scope="row" valign="top"><label for="slug"><?php _ex( 'Slug', 'Taxonomy Slug' ); ?></label></th>
39
- <td><input name="slug" id="slug" type="text" value="<?php if ( isset($tag->slug) ) { echo esc_attr( apply_filters( 'editable_slug', $tag->slug ) ); } ?>" size="40" />
40
- <p class="description"><?php _e( 'An id-like string with only letters in lower case, numbers, and hyphens.', 'advanced-ads' ); ?></p></td>
41
  </tr>
42
- <?php }
43
- $text = (isset($tag->description)) ? $tag->description : ''; ?>
 
 
 
 
 
 
 
 
 
 
 
44
  <tr class="form-field">
45
- <th scope="row" valign="top"><label for="description"><?php _ex( 'Description', 'Taxonomy Description' ); ?></label></th>
46
  <td><textarea name="description" id="description" rows="5" cols="50" class="large-text"><?php echo $text; // textarea_escaped ?></textarea></td>
47
  </tr>
48
  <?php
49
 
50
- do_action( $taxonomy . '_edit_form_fields', $tag, $taxonomy );
51
- ?>
52
  </table>
53
  <?php
54
- do_action( $taxonomy . '_edit_form', $tag, $taxonomy );
55
 
56
- if ( $group_id == 0 ){
57
- submit_button( __( 'Create new Ad Group', 'advanced-ads' ) );
58
- } else {
59
- submit_button( __( 'Update', 'advanced-ads' ) );
60
- }
61
- ?>
62
  </form>
63
  </div>
64
  <script type="text/javascript">
6
  * @subpackage Administration
7
  */
8
  // don't load directly
9
+ if (!defined('ABSPATH'))
10
+ die('-1');
11
 
12
+ if (!is_int($group_id)) {
13
+ ?>
14
+ <div id="message" class="updated"><p><strong><?php _e('You did not select an item for editing.'); ?></strong></p></div>
15
  <?php
16
+ return;
17
  }
18
 
19
+ do_action("{$taxonomy}_pre_edit_form", $tag, $taxonomy);
20
  ?>
21
 
22
  <div class="wrap">
23
+ <h2><?php echo $tax->labels->edit_item; ?></h2>
24
  <div id="ajax-response"></div>
25
+ <form name="editgroup" id="editgroup" method="post" action="<?php echo Advanced_Ads_Admin::group_page_url(); ?>" class="validate"<?php do_action($taxonomy . '_term_edit_form_tag'); ?>>
26
  <input type="hidden" name="action" value="editedgroup" />
27
  <input type="hidden" name="group_id" value="<?php echo $group_id; ?>" />
28
+ <input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy) ?>" />
29
+ <?php wp_original_referer_field(true, 'previous');
30
+ wp_nonce_field('update-group_' . $group_id); ?>
31
  <table class="form-table">
32
  <tr class="form-field form-required">
33
+ <th scope="row" valign="top"><label for="name"><?php _ex('Name', 'Taxonomy Name'); ?></label></th>
34
+ <td><input name="name" id="name" type="text" value="<?php if (isset($tag->name)) echo esc_attr($tag->name); ?>" size="40" aria-required="true" /></td>
35
  </tr>
36
+ <?php if (!global_terms_enabled()) { ?>
37
  <tr class="form-field">
38
+ <th scope="row" valign="top"><label for="slug"><?php _ex('Slug', 'Taxonomy Slug'); ?></label></th>
39
+ <td><input name="slug" id="slug" type="text" value="<?php if (isset($tag->slug)) echo esc_attr(apply_filters('editable_slug', $tag->slug)); ?>" size="40" />
40
+ <p class="description"><?php _e('An id-like string with only letters in lower case, numbers, and hyphens. Can be used to query a group.', $this->plugin_slug); ?></p></td>
41
  </tr>
42
+ <?php } ?>
43
+ <?php if (is_taxonomy_hierarchical($taxonomy)) : ?>
44
+ <tr class="form-field">
45
+ <th scope="row" valign="top"><label for="parent"><?php _ex('Parent', 'Taxonomy Parent'); ?></label></th>
46
+ <td>
47
+ <?php if($group_id == 0){
48
+ wp_dropdown_categories(array('hide_empty' => 0, 'hide_if_empty' => false, 'name' => 'parent', 'orderby' => 'name', 'taxonomy' => $taxonomy, 'hierarchical' => true, 'show_option_none' => __('None')));
49
+ } else {
50
+ wp_dropdown_categories(array('hide_empty' => 0, 'hide_if_empty' => false, 'name' => 'parent', 'orderby' => 'name', 'taxonomy' => $taxonomy, 'selected' => $tag->parent, 'exclude_tree' => $tag->term_id, 'hierarchical' => true, 'show_option_none' => __('None')));
51
+ }; ?></td>
52
+ </tr>
53
+ <?php endif; // is_taxonomy_hierarchical()
54
+ $text = (isset($tag->description)) ? $tag->description : ''; ?>
55
  <tr class="form-field">
56
+ <th scope="row" valign="top"><label for="description"><?php _ex('Description', 'Taxonomy Description'); ?></label></th>
57
  <td><textarea name="description" id="description" rows="5" cols="50" class="large-text"><?php echo $text; // textarea_escaped ?></textarea></td>
58
  </tr>
59
  <?php
60
 
61
+ do_action($taxonomy . '_edit_form_fields', $tag, $taxonomy);
62
+ ?>
63
  </table>
64
  <?php
65
+ do_action($taxonomy . '_edit_form', $tag, $taxonomy);
66
 
67
+ if($group_id == 0){
68
+ submit_button(__('Create new Ad Group', $this->plugin_slug));
69
+ } else {
70
+ submit_button(__('Update', $this->plugin_slug));
71
+ }
72
+ ?>
73
  </form>
74
  </div>
75
  <script type="text/javascript">
admin/views/ad-group-list-form-row.php DELETED
@@ -1,56 +0,0 @@
1
- <tr class="hidden advads-ad-group-form">
2
- <td colspan="3">
3
- <label><strong><?php _e( 'Name', 'advanced-ads' ); ?></strong><input type="text" name="advads-groups[<?php
4
- echo $group->id; ?>][name]" value="<?php echo $group->name; ?>"/></label><br/>
5
- <label><strong><?php _e( 'Description', 'advanced-ads' ); ?></strong><input type="text" name="advads-groups[<?php
6
- echo $group->id; ?>][description]" value="<?php echo $group->description; ?>"/></label><br/>
7
- <strong><?php _e( 'Type', 'advanced-ads' ); ?></strong>
8
- <ul class="advads-ad-group-type"><?php foreach ( $this->types as $_type_key => $_type ) :
9
- ?><li><label><input type="radio" name="advads-groups[<?php echo $group->id;
10
- ?>][type]" value="<?php echo $_type_key; ?>" <?php checked( $group->type, $_type_key )?>/><?php
11
- echo $_type['title']; ?></label>
12
- <p class="description"><?php echo $_type['description']; ?></p>
13
- </li><?php
14
- endforeach; ?></ul><div class="clear"></div>
15
- <div class="advads-ad-group-number">
16
- <label><strong><?php _e( 'Number of visible ads', 'advanced-ads' ); ?></strong>
17
- <select name="advads-groups[<?php echo $group->id; ?>][ad_count]"><?php
18
- $max = ( count( $ad_form_rows ) >= 10 ) ? count( $ad_form_rows ) + 2 : 10;
19
- for ( $i = 1; $i <= $max; $i++ ) : ?>
20
- <option <?php selected( $group->ad_count, $i ); ?>><?php echo $i; ?></option>
21
- <?php endfor;
22
- ?><option <?php selected( $group->ad_count, 'all' ); ?> value="all"><?php _ex('all', 'option to display all ads in an ad groups', 'advanced-ads'); ?></option>
23
- </select>
24
- </label>
25
- <p class="description"><?php _e( 'Number of ads that are visible at the same time', 'advanced-ads' ); ?></p>
26
- </div>
27
- <?php do_action( 'advanced-ads-group-form-options', $group ); ?>
28
- <h3><?php _e( 'Ads', 'advanced-ads' ); ?></h3>
29
-
30
- <table class="advads-group-ads">
31
- <thead><tr><th><?php _e( 'Ad', 'advanced-ads' );
32
- ?></th><th colspan="2"><?php _e( 'weight', 'advanced-ads' ); ?></th></tr></thead>
33
- <tbody>
34
- <?php
35
- if ( count( $ad_form_rows ) ) {
36
- foreach ( $ad_form_rows as $_row ) {
37
- echo $_row;
38
- }
39
- } ?>
40
- </tbody>
41
- </table>
42
-
43
- <?php if ( $ads_for_select ): ?>
44
- <fieldset class="advads-group-add-ad">
45
- <legend><?php _e( 'New Ad', 'advanced-ads' ); ?></legend>
46
- <select class="advads-group-add-ad-list-ads">
47
- <?php foreach ( $ads_for_select as $_ad_id => $_ad_title ) {
48
- echo '<option value="advads-groups[' . $group->id . '][ads][' . $_ad_id . ']">' . $_ad_title . '</option>';
49
- } ?>
50
- </select>
51
- <?php echo $new_ad_weights; ?>
52
- <button type="button" class="button"><?php _e( 'add', 'advanced-ads' ); ?></button>
53
- </fieldset>
54
- <?php endif; ?>
55
- </td>
56
- </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/ad-group-list-header.php DELETED
@@ -1,7 +0,0 @@
1
- <thead>
2
- <tr>
3
- <th><?php _e( 'Ad Group', 'advanced-ads' ); ?></th>
4
- <th><?php _e( 'Details', 'advanced-ads' ); ?></th>
5
- <th><?php _e( 'Ads', 'advanced-ads' ); ?></th>
6
- </tr>
7
- </thead>
 
 
 
 
 
 
 
admin/views/ad-group-list-row.php DELETED
@@ -1,24 +0,0 @@
1
- <tr class="advads-group-row">
2
- <td>
3
- <input type="hidden" class="advads-group-id" name="advads-groups[<?php echo $group->id; ?>][id]" value="<?php echo $group->id; ?>"/>
4
- <strong><a class="row-title" href="#"><?php echo $group->name; ?></a></strong>
5
- <p class="description"><?php echo $group->description; ?></p>
6
- <?php echo $this->render_action_links( $group ); ?>
7
- <div class="hidden advads-usage">
8
- <label><?php _e( 'shortcode', 'advanced-ads' ); ?>
9
- <code><input type="text" onclick="this.select();" style="width: 200px;" value='[the_ad_group id="<?php echo $group->id; ?>"]'/></code>
10
- </label><br/>
11
- <label><?php _e( 'template', 'advanced-ads' ); ?>
12
- <code><input type="text" onclick="this.select();" value="the_ad_group(<?php echo $group->id; ?>);"/></code>
13
- </label>
14
- <p><?php printf( __( 'Learn more about using groups in the <a href="%s" target="_blank">manual</a>.', 'advanced-ads' ), ADVADS_URL . 'manual/ad-groups/#utm_source=advanced-ads&utm_medium=link&utm_campaign=groups' ); ?></p>
15
- </div>
16
- </td>
17
- <td>
18
- <ul><?php $_type = isset($this->types[$group->type]['title']) ? $this->types[$group->type]['title'] : 'default'; ?>
19
- <li><strong><?php printf( __( 'Type: %s', 'advanced-ads' ), $_type ); ?></strong></li>
20
- <li><?php printf( __( 'ID: %s', 'advanced-ads' ), $group->id ); ?></li>
21
- </ul>
22
- </td>
23
- <td class="advads-ad-group-list-ads"><?php $this->render_ads_list( $group ); ?></td>
24
- </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/ad-group.php CHANGED
@@ -5,88 +5,97 @@
5
  * @since 1.0.0
6
  * @see /wp-admin/edit-tags.php (for a good example in WP core)
7
  */
8
- $ad_groups_list = new Advanced_Ads_Groups_List();
 
 
9
 
10
- // save updated groups
11
- if ( isset($_REQUEST['advads-group-update-nonce']) ){
12
- $udpate_result = $ad_groups_list->update_groups();
13
- // display error message
14
- if ( is_wp_error( $udpate_result ) ){
15
- $error_string = $udpate_result->get_error_message();
16
- echo '<div id="message" class="error"><p>' . $error_string . '</p></div>';
17
- } else {
18
- echo '<div id="message" class="updated"><p>' . __( 'Ad Groups successfully updated', 'advanced-ads' ) . '</p></div>';
19
- }
 
 
 
 
 
20
  }
21
 
22
- /*$messages[$taxonomy] = array(
23
- 0 => '', // Unused. Messages start at index 1.
24
- 1 => __( 'Ad Group added.', 'advanced-ads' ),
25
- 2 => __( 'Ad Group deleted.', 'advanced-ads' ),
26
- 3 => __( 'Ad Group updated.', 'advanced-ads' ),
27
- 4 => __( 'Ad Group not added.', 'advanced-ads' ),
28
- 5 => __( 'Ad Group not updated.', 'advanced-ads' ),
29
- 6 => __( 'Ad Group deleted.', 'advanced-ads' )
 
 
30
  );
31
 
32
  $message = false;
33
- if ( isset($_REQUEST['message']) && ( $msg = (int) $_REQUEST['message'] ) || isset($forced_message) ) {
34
- if ( isset($msg) && isset($messages[$taxonomy][$msg]) ){
35
- $message = $messages[$taxonomy][$msg];
36
- } elseif ( isset($messages[$taxonomy][$forced_message]) ) {
37
- $message = $messages[$taxonomy][$forced_message];
38
- }
39
- }*/
40
  ?>
41
 
42
  <div class="wrap nosubsub">
43
- <h1><?php
44
- echo esc_html( $title );
45
- if ( ! empty($_REQUEST['s']) ) {
46
- printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;', 'advanced-ads' ) . '</span>', esc_html( wp_unslash( $_REQUEST['s'] ) ) );
47
- } else {
48
- echo ' <a href="' . Advanced_Ads_Groups_List::group_page_url( array('action' => 'edit') ) . '" class="add-new-h2">' . $tax->labels->add_new_item . '</a>';
49
- }
50
- ?>
51
- </h1>
52
- <p><?php _e( 'Ad Groups are a very flexible method to bundle ads. You can use them to display random ads in the frontend or run split tests, but also just for informational purposes. Not only can an Ad Groups have multiple ads, but an ad can belong to multiple ad groups.', 'advanced-ads' ); ?></p>
53
- <?php if ( isset($message) ) : ?>
54
  <div id="message" class="updated"><p><?php echo $message; ?></p></div>
55
  <?php
56
- $_SERVER['REQUEST_URI'] = esc_url( remove_query_arg( array('message'), $_SERVER['REQUEST_URI'] ) );
57
- endif;
58
- ?>
59
  <div id="ajax-response"></div>
60
- <a onclick="advads_toggle('#advads-ad-group-display-info')"><?php _e( 'How to display an Ad Group?', 'advanced-ads' ); ?></a>
61
- <div id="advads-ad-group-display-info" style="display: none;">
62
- <p><?php printf( __( 'Examples on how to display an ad group? Find more help and examples in the <a href="%s" target="_blank">manual</a>', 'advanced-ads' ), ADVADS_URL . 'manual/ad-groups/#utm_source=advanced-ads&utm_medium=link&utm_campaign=groups' ); ?></p>
63
- <h4><?php _e( 'shortcode', 'advanced-ads' ); ?></h4>
64
- <p class="description"><?php _e( 'To display an ad group with the ID 6 in content fields', 'advanced-ads' ); ?></p>
65
- <pre><input type="text" onclick="this.select();" style="width: 250px;" value='[the_ad_group id="6"]'/></pre>
66
- <h4><?php _e( 'template', 'advanced-ads' ); ?></h4>
67
- <p class="description"><?php _e( 'To display an ad group with the ID 6 in template files', 'advanced-ads' ); ?></p>
68
- <pre><input type="text" onclick="this.select();" value="the_ad_group(6);"/></pre>
69
- </div>
70
 
71
  <div id="col-container">
72
  <div class="col-wrap">
73
  <form class="search-form" action="" method="get">
74
- <!--input type="hidden" name="taxonomy" value="<?php echo esc_attr( $taxonomy ); ?>" /-->
75
  <input type="hidden" name="page" value="advanced-ads-groups" />
76
- <?php $wp_list_table->search_box( $tax->labels->search_items, 'tag' ); ?>
 
77
 
78
  </form>
79
  <br class="clear" />
80
- <div id="advads-ad-group-list">
81
- <form action="" method="post">
82
- <?php wp_nonce_field( 'update-advads-groups', 'advads-group-update-nonce' ); ?>
83
- <table class="wp-list-table widefat fixed adgroups">
84
- <?php $ad_groups_list->render_header(); ?>
85
- <?php $ad_groups_list->render_rows(); ?>
86
- </table>
87
- <?php submit_button( __( 'Update Groups', 'advanced-ads' ) ); ?>
88
- </form>
89
- </div>
 
 
 
 
 
 
 
 
 
90
  </div>
91
  </div><!-- /col-container -->
92
- </div><!-- /wrap -->
5
  * @since 1.0.0
6
  * @see /wp-admin/edit-tags.php (for a good example in WP core)
7
  */
8
+ $ad_group_table = new AdvAds_Groups_List_Table(array('screen' => get_current_screen()));
9
+ $ad_group_table->textdomain = $this->plugin_slug;
10
+ $pagenum = $ad_group_table->get_pagenum();
11
 
12
+ $ad_group_table->prepare_items();
13
+ $total_pages = $ad_group_table->get_pagination_arg('total_pages');
14
+
15
+ if ($pagenum > $total_pages && $total_pages > 0) {
16
+ wp_redirect(add_query_arg('paged', $total_pages));
17
+ exit;
18
+ }
19
+
20
+ /**
21
+ * @TODO those 2 scripts needed? or even extend it with our own?
22
+ */
23
+ // wp_enqueue_script('admin-tags');
24
+
25
+ if (current_user_can($tax->cap->edit_terms)) {
26
+ wp_enqueue_script('inline-edit-group-ads');
27
  }
28
 
29
+ // require_once( ABSPATH . 'wp-admin/admin-header.php' );
30
+
31
+ $messages[$taxonomy] = array(
32
+ 0 => '', // Unused. Messages start at index 1.
33
+ 1 => __('Ad Group added.', $this->plugin_slug),
34
+ 2 => __('Ad Group deleted.', $this->plugin_slug),
35
+ 3 => __('Ad Group updated.', $this->plugin_slug),
36
+ 4 => __('Ad Group not added.', $this->plugin_slug),
37
+ 5 => __('Ad Group not updated.', $this->plugin_slug),
38
+ 6 => __('Ad Group deleted.', $this->plugin_slug)
39
  );
40
 
41
  $message = false;
42
+ if (isset($_REQUEST['message']) && ( $msg = (int) $_REQUEST['message'] ) || isset($forced_message)) {
43
+ if (isset($msg) && isset($messages[$taxonomy][$msg])){
44
+ $message = $messages[$taxonomy][$msg];
45
+ } elseif(isset($messages[$taxonomy][$forced_message])) {
46
+ $message = $messages[$taxonomy][$forced_message];
47
+ }
48
+ }
49
  ?>
50
 
51
  <div class="wrap nosubsub">
52
+ <h2><?php
53
+ echo esc_html($title);
54
+ if (!empty($_REQUEST['s'])) {
55
+ printf('<span class="subtitle">' . __('Search results for &#8220;%s&#8221;', $this->plugin_slug) . '</span>', esc_html(wp_unslash($_REQUEST['s'])));
56
+ } else {
57
+ echo ' <a href="' . Advanced_Ads_Admin::group_page_url(array('action' => 'edit')) . '" class="add-new-h2">' . $tax->labels->add_new_item . '</a>';
58
+ }
59
+ ?>
60
+ </h2>
61
+
62
+ <?php if ($message) : ?>
63
  <div id="message" class="updated"><p><?php echo $message; ?></p></div>
64
  <?php
65
+ $_SERVER['REQUEST_URI'] = remove_query_arg(array('message'), $_SERVER['REQUEST_URI']);
66
+ endif;
67
+ ?>
68
  <div id="ajax-response"></div>
 
 
 
 
 
 
 
 
 
 
69
 
70
  <div id="col-container">
71
  <div class="col-wrap">
72
  <form class="search-form" action="" method="get">
73
+ <!--input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" /-->
74
  <input type="hidden" name="page" value="advanced-ads-groups" />
75
+ <input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" />
76
+ <?php $ad_group_table->search_box($tax->labels->search_items, 'tag'); ?>
77
 
78
  </form>
79
  <br class="clear" />
80
+ <form id="posts-filter" action="" method="post">
81
+ <input type="hidden" name="taxonomy" value="<?php echo esc_attr($taxonomy); ?>" />
82
+ <input type="hidden" name="post_type" value="<?php echo esc_attr($post_type); ?>" />
83
+
84
+ <?php $ad_group_table->display(); ?>
85
+
86
+ <br class="clear" />
87
+ </form><?php
88
+ /**
89
+ * Fires after the ad grouptable.
90
+ *
91
+ * The dynamic portion of the hook name, $taxonomy, refers to the taxonomy slug.
92
+ *
93
+ * @since 1.0.0
94
+ * @param string $taxonomy The taxonomy name.
95
+ */
96
+ do_action("after-{$taxonomy}-table", $taxonomy);
97
+ ?>
98
+
99
  </div>
100
  </div><!-- /col-container -->
101
+ </div><!-- /wrap -->
admin/views/ad-info-bottom.php DELETED
@@ -1,12 +0,0 @@
1
- <div id="advads-wizard-controls" class="hidden">
2
- <button type="button" id="advads-wizard-controls-prev" class="button button-secondary button-large"><span class="dashicons dashicons-controls-back"></span>&nbsp;<?php _ex( 'previous', 'wizard navigation', 'advanced-ads' ); ?></button>
3
- <button type="button" class="advads-stop-wizard button button-large"><?php _ex( 'Stop Wizard', 'advanced-ads' ); ?></button>
4
- <input type="submit" id="advads-wizard-controls-save" class="button button-primary button-large" value="<?php _ex( 'save', 'wizard navigation', 'advanced-ads' ); ?>"/>
5
- <button type="button" id="advads-wizard-controls-next" class="button button-primary button-large"><?php _ex( 'next', 'wizard navigation', 'advanced-ads' ); ?>&nbsp;<span class="dashicons dashicons-controls-forward"></span></button>
6
- </div>
7
- <?php // start the wizard if it was never closed
8
- if( $this->start_wizard_automatically() ) : ?>
9
- <script>
10
- advads_wizard.start();
11
- </script>
12
- <?php endif;
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/ad-info-top.php DELETED
@@ -1,85 +0,0 @@
1
- <?php // show quick injection options
2
- if( isset( $_GET['message'] ) && 6 === $_GET['message'] ) : ?>
3
- <div id="advads-ad-injection-box" class="advads-ad-metabox postbox">
4
- <span class="advads-loader" style="display: none;"></span>
5
- <p id="advads-ad-injection-message-placement-created" class="hidden"><?php printf(__( 'Congratulations! Your ad is now visible in the frontend. You can adjust the placement options <a href="%s">here</a>.', 'advanced-ads' ), admin_url( 'admin.php?page=advanced-ads-placements#single-placement-' ) ); ?></p>
6
- <div id="advads-ad-injection-box-placements">
7
- <h2><?php _e( 'Where do you want to display the ad?', 'advanced-ads' ); ?></h2>
8
- <p><?php _e( 'New placement', 'advanced-ads' ); ?></p>
9
- <div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary" data-placement-type="post_top" style="background-image: url(<?php echo ADVADS_BASE_URL . 'admin/assets/img/placements/content-before.png'; ?>)"><?php _e( 'Before Content', 'advanced-ads'); ?></button></div>
10
- <div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary" data-placement-type="post_content" style="background-image: url(<?php echo ADVADS_BASE_URL . 'admin/assets/img/placements/content-within.png'; ?>)"><?php _e( 'Content', 'advanced-ads'); ?></button></div>
11
- <div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary" data-placement-type="post_bottom" style="background-image: url(<?php echo ADVADS_BASE_URL . 'admin/assets/img/placements/content-after.png'; ?>)"><?php _e( 'After Content', 'advanced-ads'); ?></button></div>
12
- <a href="<?php echo admin_url( 'widgets.php' ); ?>"><div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary" style="background-image: url(<?php echo ADVADS_BASE_URL . 'admin/assets/img/placements/widget.png'; ?>)"><?php _e( 'Manage Sidebar', 'advanced-ads'); ?></button></div></a>
13
- <?php
14
- if( ! defined( 'AAP_VERSION' ) ) :
15
- ?><a href="<?php echo ADVADS_URL . 'add-ons/advanced-ads-pro/#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-created-injection-pro' ?>" target="_blank"><div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary advads-pro-link" style="background-image: url(<?php echo ADVADS_BASE_URL . 'admin/assets/img/placements/content-random.png'; ?>)"><?php _e( 'Show Pro Places', 'advanced-ads'); ?></button></div></a><?php
16
- endif;
17
-
18
- if( ! defined( 'AASADS_VERSION' ) ) :
19
- ?><a href="<?php echo ADVADS_URL . 'add-ons/sticky-ads/#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-created-injection-sticky' ?>" target="_blank"><div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary advads-pro-link" style="background-image: url(<?php echo ADVADS_BASE_URL . 'admin/assets/img/placements/sticky-sidebar-left.png'; ?>)"><?php _e( 'Show Sticky Places', 'advanced-ads'); ?></button></div></a><?php
20
- endif;
21
-
22
- if( ! defined( 'AAPLDS_VERSION' ) ) :
23
- ?><a href="<?php echo ADVADS_URL . 'add-ons/popup-and-layer-ads/#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-created-injection-layer' ?>" target="_blank"><div class="advads-ad-injection-box-button-wrap"><button type="button" class="advads-ad-injection-button button-primary advads-pro-link" style="background-image: url(<?php echo ADVADS_BASE_URL . 'admin/assets/img/placements/layer.png'; ?>)"><?php _e( 'Show PopUp', 'advanced-ads'); ?></button></div></a><?php
24
- endif;
25
-
26
- ob_start();
27
- foreach ( $placements as $_placement_slug => $_placement ) :
28
- if ( ! isset( $_placement['type'] ) || ! isset( $_placement['name'] ) ) {
29
- continue;
30
- }
31
- if ( ! isset( $placement_types[ $_placement['type'] ] ) ) {
32
- $_placement['type'] = 'default';
33
- }
34
-
35
- $placement_img = '';
36
- if ( isset( $placement_types[ $_placement['type'] ]['image'] ) ) {
37
- $placement_img = 'style="background-image: url(' . $placement_types[ $_placement['type'] ]['image'] . ');"';
38
- } ?>
39
-
40
- <div class="advads-ad-injection-box-button-wrap"><?php
41
- printf( '<button type="button" class="advads-ad-injection-button button-primary" data-placement-slug="%s" %s title="%s">%s</button>',
42
- $_placement_slug, $placement_img, $_placement['name'], $placement_types[ $_placement['type'] ]['title'] );
43
- echo $_placement['name']; ?></div>
44
- <?php
45
- endforeach;
46
- if ( $existing_p_output = ob_get_clean() ) : ?>
47
- <div class="clear"></div>
48
- <p><?php _e( 'Existing placement', 'advanced-ads'); ?></p>
49
- <?php echo $existing_p_output; ?>
50
- <?php endif; ?>
51
-
52
- <div class="clear"></div>
53
- <p><?php printf( __( 'Or use the shortcode %s to insert the ad into the content manually.', 'advanced-ads'), '<input id="advads-ad-injection-shortcode" onclick="this.select();" value="[the_ad id=\'' . $post->ID . '\']"/>' ); ?>
54
- <?php printf( __( 'Learn more about your choices to display an ad in the <a href="%s" target="_blank">manual</a>.', 'advanced-ads' ), ADVADS_URL . 'manual/display-ads/#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-created' ); ?></p>
55
- </div>
56
- </div>
57
- <script>
58
- jQuery('#advads-ad-info-close').click(function(){
59
- jQuery('#advads-ad-info-top').fadeOut();
60
- });
61
- </script>
62
- <?php endif;
63
- // display ad wizard controls
64
- ?><button type="button" id="advads-start-wizard" class="dashicons-before dashicons-controls-play page-title-action"><?php _e('Start Wizard', 'advanced-ads'); ?></button>
65
- <button type="button" id="advads-stop-wizard" class="advads-stop-wizard dashicons-before dashicons-no page-title-action hidden"><?php _e('Stop Wizard', 'advanced-ads'); ?></button>
66
- <script>
67
- // move wizard button to head
68
- jQuery('#advads-start-wizard').appendTo('h1');
69
- jQuery('.advads-stop-wizard').insertBefore('h1');
70
- </script>
71
- <?php // show wizard welcome message
72
- if( $this->show_wizard_welcome() ) : ?>
73
- <div id="advads-wizard-welcome" class="advads-ad-metabox postbox">
74
- <h2><?php _e( 'Welcome to the Wizard', 'advanced-ads' ); ?></h2>
75
- <p><?php _e( 'The Wizard helps you to quickly create and publish an ad. Therefore, only the most common options are visible.', 'advanced-ads' ); ?></p>
76
- <button type="button" id="advads-hide-wizard-welcome" class="page-title-action"><?php _e('Start Wizard', 'advanced-ads'); ?></button>
77
- <button type="button" class="advads-stop-wizard dashicons-before dashicons-no page-title-action"><?php _e('Stop Wizard and show all options', 'advanced-ads'); ?></button>
78
- <a a href="<?php echo ADVADS_URL . 'manual/wizard/#utm_source=advanced-ads&utm_medium=link&utm_campaign=wizard'; ?>" target="_blank"><?php _e('manual', 'advanced-ads'); ?></a>
79
- </div>
80
- <script>
81
- // move wizard button to head
82
- jQuery('#advads-hide-wizard-welcome').click( function(){ jQuery( '#advads-wizard-welcome' ).remove(); });
83
- jQuery('#advads-end-wizard').insertBefore('h1');
84
- </script>
85
- <?php endif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/ad-info.php DELETED
@@ -1,19 +0,0 @@
1
- <div id="advads-ad-info">
2
- <span><?php printf( __( 'Ad Id: %s', 'advanced-ads' ), "<strong>$post->ID</strong>" ); ?></span>
3
- <label><span><?php _e( 'shortcode', 'advanced-ads' ); ?></span>
4
- <pre><input type="text" onclick="this.select();" value='[the_ad id="<?php echo $post->ID; ?>"]'/></pre></label>
5
- <label><span><?php _e( 'theme function', 'advanced-ads' ); ?></span>
6
- <pre><input type="text" onclick="this.select();" value="&lt;?php the_ad(<?php echo $post->ID; ?>); ?&gt;"/></pre></label>
7
- <span><?php printf( __( 'Find more display options in the <a href="%s" target="_blank">manual</a>.', 'advanced-ads' ), ADVADS_URL . 'manual/display-ads/#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit' ); ?></span>
8
- </div>
9
- <div id="advads-ad-description">
10
- <?php if ( ! empty($ad->description) ) : ?>
11
- <p title="<?php _e( 'click to change', 'advanced-ads' ); ?>"
12
- onclick="advads_toggle('#advads-ad-description textarea'); advads_toggle('#advads-ad-description p')"><?php
13
- echo nl2br( $ad->description ); ?></p>
14
- <?php else : ?>
15
- <button type="button" onclick="advads_toggle('#advads-ad-description textarea'); advads_toggle('#advads-ad-description button')"><?php _e( 'Add a description', 'advanced-ads' ); ?></button>
16
- <?php endif; ?>
17
- <textarea name="advanced_ad[description]" placeholder="<?php
18
- _e( 'Internal description or your own notes about this ad.', 'advanced-ads' ); ?>"><?php echo $ad->description; ?></textarea>
19
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/ad-list-details-column.php DELETED
@@ -1,16 +0,0 @@
1
- <fieldset class="inline-edit-col-left">
2
- <div class="inline-edit-col">
3
- <?php if ( ! empty( $type ) ) :
4
- // display image, if this is the image type
5
- if( 'image' === $ad->type ) {
6
- $id = ( isset( $ad->output['image_id'] ) ) ? $ad->output['image_id'] : '';
7
- $types[$ad->type]->create_image_icon( $id );
8
- }
9
- ?><p><strong class="advads-ad-type"><?php echo $type; ?></strong></p>
10
- <?php endif;
11
- if ( ! empty( $size) ) : ?>
12
- <p class="advads-ad-size"><?php echo $size; ?></p><?php
13
- endif;
14
- do_action( 'advanced-ads-ad-list-details-column-after', $ad ); ?>
15
- </div>
16
- </fieldset>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/ad-list-filters.php DELETED
@@ -1,15 +0,0 @@
1
- <select id="advads-filter-type">
2
- <option value="">- <?php _e( 'all ad types', 'advanced-ads' ); ?> -</option>
3
- </select>
4
- <select id="advads-filter-size">
5
- <option value="">- <?php _e( 'all ad sizes', 'advanced-ads' ); ?> -</option>
6
- </select>
7
- <select id="advads-filter-date">
8
- <option value="">- <?php _e( 'all ad dates', 'advanced-ads' ); ?> -</option>
9
- <option value="advads-filter-expired" style="display:none;"><?php _e( 'expired', 'advanced-ads' ); ?></option>
10
- <option value="advads-filter-any-exp-date" style="display:none;"><?php _e( 'any expiry date', 'advanced-ads' ); ?></option>
11
- <option value="advads-filter-future" style="display:none;"><?php _e( 'planned', 'advanced-ads' ); ?></option>
12
- </select>
13
- <select id="advads-filter-group">
14
- <option value="">- <?php _e( 'all ad groups', 'advanced-ads' ); ?> -</option>
15
- </select>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/ad-list-no-ads.php DELETED
@@ -1,12 +0,0 @@
1
- <div id="advads-first-ad-links" class="postbox advads-ad-metabox" style="clear: both; margin: 10px 20px 0 2px;">
2
- <h2><?php _e( 'Not many ads here yet. Get help from the following resources:', 'advanced-ads' ); ?></h2>
3
- <button type="button" id="advads-first-ad-video-link" class="button-primary"><?php _e( 'Watch the “First Ad” Tutorial (Video)', 'advanced-ads'); ?></button>
4
- <a href="<?php echo ADVADS_URL . '/manual/ad-templates#utm_source=advanced-ads&utm_medium=link&utm_campaign=first-ad-import'; ?>" target="_blank"><button type="button" class="button-primary"><?php _e( 'Import Ads (Link)', 'advanced-ads'); ?></button></a>
5
- <a href="<?php echo ADVADS_URL . '/codex/ad-placeholder#utm_source=advanced-ads&utm_medium=link&utm_campaign=first-ad-dummy'; ?>" target="_blank"><button type="button" class="button-primary"><?php _e( 'Get dummy ad content (Link)', 'advanced-ads'); ?></button></a>
6
- <br class="clear"/>
7
- </div>
8
- <script>
9
- jQuery('#advads-first-ad-video-link').click(function(){
10
- jQuery( '<br/><iframe width="420" height="315" src="https://www.youtube-nocookie.com/embed/R-LZuEB7MUQ?rel=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>' ).appendTo('#advads-first-ad-links');
11
- });
12
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/ad-list-timing-column.php DELETED
@@ -1,28 +0,0 @@
1
- <fieldset class="inline-edit-col-left">
2
- <div class="inline-edit-col <?php echo $html_classes; ?>">
3
- <?php if ( $post_future ) : ?>
4
- <p><?php printf( __( 'starts %s', 'advanced-ads' ), date( $expiry_date_format, $post_future ) ); ?></p>
5
- <?php endif; ?>
6
- <?php if ( $expiry ) : ?>
7
- <?php
8
- $tz_option = get_option( 'timezone_string' );
9
- $expiry_date = date_create( '@' . $expiry );
10
- if ( $tz_option ) {
11
- $expiry_date->setTimezone( Advanced_Ads_Admin::get_wp_timezone() );
12
- } else {
13
- $tz_name = Advanced_Ads_Admin::timezone_get_name( Advanced_Ads_Admin::get_wp_timezone() );
14
- $tz_offset = substr( $tz_name, 3 );
15
- $off_time = date_create( $expiry_date->format( 'Y-m-d\TH:i:s' ) . $tz_offset );
16
- $offset_in_sec = date_offset_get( $off_time );
17
- $expiry_date = date_create( '@' . ( $expiry + $offset_in_sec ) );
18
- }
19
- ?>
20
- <?php if ( $expiry > time() ) :?>
21
- <p><?php printf( __( 'expires %s', 'advanced-ads' ), $expiry_date->format( $expiry_date_format ) ); ?></p>
22
- <?php else : ?>
23
- <p><?php printf( __( '<strong>expired</strong> %s', 'advanced-ads' ), $expiry_date->format( $expiry_date_format ) ); ?></p>
24
- <?php endif; ?>
25
- <?php endif; ?>
26
- <?php do_action( 'advanced-ads-ad-list-timing-column-after', $ad ); ?>
27
- </div>
28
- </fieldset>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/ad-main-metabox.php CHANGED
@@ -1,33 +1,21 @@
1
  <?php $types = Advanced_Ads::get_instance()->ad_types; ?>
2
- <?php if ( empty($types) ) : ?>
3
- <p><?php _e( 'No ad types defined', 'advanced-ads' ); ?></p>
4
  <?php else : ?>
 
5
  <ul id="advanced-ad-type">
6
  <?php
7
- // choose first type if none set
8
- $type = (isset($ad->type)) ? $ad->type : current( $types )->ID;
9
- foreach ( $types as $_type ) : ?>
10
  <li>
11
  <input type="radio" name="advanced_ad[type]"
12
  id="advanced-ad-type-<?php echo $_type->ID ?>"
13
  value="<?php echo $_type->ID; ?>"
14
- <?php checked( $type, $_type->ID ); ?>/>
15
  <label for="advanced-ad-type-<?php echo $_type->ID ?>"><?php echo (empty($_type->title)) ? $_type->ID : $_type->title; ?></label>
16
- <?php if ( ! empty($_type->description) ) : ?><span class="description"><?php echo $_type->description; ?></span><?php endif; ?>
17
  </li>
18
  <?php endforeach; ?>
19
  </ul>
20
- <?php endif; ?>
21
- <script>
22
- jQuery( document ).on('change', '#advanced-ad-type input', function () {
23
- advads_update_ad_type_headline();
24
- });
25
-
26
- // dynamically move ad type to the meta box title
27
- advads_main_metabox_title = jQuery('#ad-main-box h2').text();
28
- function advads_update_ad_type_headline(){
29
- var advads_selected_type = jQuery('#advanced-ad-type input:checked + label').text();
30
- jQuery('#ad-main-box h2').html( advads_main_metabox_title + ': ' + advads_selected_type );
31
- }
32
- advads_update_ad_type_headline();
33
- </script>
1
  <?php $types = Advanced_Ads::get_instance()->ad_types; ?>
2
+ <?php if (empty($types)) : ?>
3
+ <p><?php _e('No ad types defined', $this->plugin_slug); ?></p>
4
  <?php else : ?>
5
+ <h4><?php _e('Ad Type and Content', $this->plugin_slug); ?></h4>
6
  <ul id="advanced-ad-type">
7
  <?php
8
+ // choose first type if none set
9
+ $type = (isset($ad->type)) ? $ad->type : current($types)->ID;
10
+ foreach ($types as $_type) : ?>
11
  <li>
12
  <input type="radio" name="advanced_ad[type]"
13
  id="advanced-ad-type-<?php echo $_type->ID ?>"
14
  value="<?php echo $_type->ID; ?>"
15
+ <?php checked($type, $_type->ID); ?>/>
16
  <label for="advanced-ad-type-<?php echo $_type->ID ?>"><?php echo (empty($_type->title)) ? $_type->ID : $_type->title; ?></label>
17
+ <?php if (!empty($_type->description)) : ?><span class="description"><?php echo $_type->description; ?></span><?php endif; ?>
18
  </li>
19
  <?php endforeach; ?>
20
  </ul>
21
+ <?php endif; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/ad-output-metabox.php DELETED
@@ -1,57 +0,0 @@
1
- <p class="description"><?php _e( 'Everything connected to the ads layout and output.', 'advanced-ads' ); ?></p>
2
- <?php $options = $ad->options( 'output' ); ?>
3
- <div class="advads-option-list">
4
- <span class="label"><?php _e( 'Position', 'advanced-ads' ); ?></span>
5
- <div id="advanced-ad-output-position">
6
- <label><input type="radio" name="advanced_ad[output][position]" value="" title="<?php _e( '- default -', 'advanced-ads' );
7
- ?>" <?php if ( empty($options['position']) ) { checked( 1, 1 ); } ?>/><?php _e( 'default', 'advanced-ads' ); ?></label>
8
- <label title="<?php _e( 'left', 'advanced-ads' ); ?>"><input type="radio" name="advanced_ad[output][position]" value="left"
9
- <?php if ( isset($options['position']) ) { checked( $options['position'], 'left' ); } ?>/>
10
- <img src="<?php echo ADVADS_BASE_URL; ?>admin/assets/img/output-left.png" width="60" height="45"/></label>
11
- <label title="<?php _e( 'center', 'advanced-ads' ); ?>"><input type="radio" name="advanced_ad[output][position]" value="center"
12
- <?php if ( isset($options['position']) ) { checked( $options['position'], 'center' ); } ?>/>
13
- <img src="<?php echo ADVADS_BASE_URL; ?>admin/assets/img/output-center.png" width="60" height="45"/></label>
14
- <label title="<?php _e( 'right', 'advanced-ads' ); ?>"><input type="radio" name="advanced_ad[output][position]" value="right"
15
- <?php if ( isset($options['position']) ) { checked( $options['position'], 'right' ); } ?>/>
16
- <img src="<?php echo ADVADS_BASE_URL; ?>admin/assets/img/output-right.png" width="60" height="45"/></label>
17
- <p><label><input type="checkbox" name="advanced_ad[output][clearfix]" value="1"<?php if ( isset($options['clearfix']) ) { checked( $options['clearfix'], 1 ); } ?>/><?php
18
- _e( 'Check this if you don\'t want the following elements to float around the ad. (adds a clearfix)', 'advanced-ads' );
19
- ?></label></p>
20
- </div>
21
- <hr/>
22
- <span class="label"><?php _e( 'Margin', 'advanced-ads' ); ?></span>
23
- <div id="advanced-ad-output-margin">
24
- <label><?php _e( 'top:', 'advanced-ads' ); ?> <input type="number" value="<?php
25
- if ( isset($options['margin']['top']) ) { echo $options['margin']['top']; } ?>" name="advanced_ad[output][margin][top]"/>px</label>
26
- <label><?php _e( 'right:', 'advanced-ads' ); ?> <input type="number" value="<?php
27
- if ( isset($options['margin']['right']) ) { echo $options['margin']['right']; } ?>" name="advanced_ad[output][margin][right]"/>px</label>
28
- <label><?php _e( 'bottom:', 'advanced-ads' ); ?> <input type="number" value="<?php
29
- if ( isset($options['margin']['bottom']) ) { echo $options['margin']['bottom']; } ?>" name="advanced_ad[output][margin][bottom]"/>px</label>
30
- <label><?php _e( 'left:', 'advanced-ads' ); ?> <input type="number" value="<?php
31
- if ( isset($options['margin']['left']) ) { echo $options['margin']['left']; } ?>" name="advanced_ad[output][margin][left]"/>px</label>
32
- <p class="description"><?php _e( 'tip: use this to add a margin around the ad', 'advanced-ads' ); ?></p>
33
- </div>
34
- <hr class="advads-hide-in-wizard"/>
35
- <label class='label advads-hide-in-wizard' for="advads-output-wrapper-id"><?php _e( 'container ID', 'advanced-ads' ); ?></label>
36
- <div class="advads-hide-in-wizard">
37
- <input type="text" id="advads-output-wrapper-id" name="advanced_ad[output][wrapper-id]" value="<?php if ( isset($options['wrapper-id']) ) { echo $options['wrapper-id']; } ?>"/>
38
- <p class="description"><?php _e( 'Specify the id of the ad container. Leave blank for random or no id.', 'advanced-ads' ); ?></p>
39
- </div>
40
- <hr class="advads-hide-in-wizard"/>
41
- <label class='label advads-hide-in-wizard' for="advads-output-wrapper-class"><?php _e( 'container classes', 'advanced-ads' ); ?></label>
42
- <div class="advads-hide-in-wizard">
43
- <input type="text" id="advads-output-wrapper-class" name="advanced_ad[output][wrapper-class]" value="<?php if ( isset($options['wrapper-class']) ) { echo $options['wrapper-class']; } ?>"/>
44
- <p class="description"><?php _e( 'Specify one or more classes for the container. Separate multiple classes with a space', 'advanced-ads.' ); ?></p>
45
- </div>
46
- <hr class="advads-hide-in-wizard"/>
47
- <label for="advads-output-debugmode" class="label advads-hide-in-wizard"><?php _e( 'Enable debug mode', 'advanced-ads' ); ?></label>
48
- <div class="advads-hide-in-wizard">
49
- <input id="advads-output-debugmode" type="checkbox" name="advanced_ad[output][debugmode]" value="1"<?php if ( isset($options['debugmode']) ) { checked( $options['debugmode'], 1 ); } ?>/>
50
-
51
- <a href="<?php echo ADVADS_URL; ?>manual/ad-debug-mode/#utm_source=advanced-ads&utm_medium=link&utm_campaign=ad-debug-mode" target="_blank"><?php _e( 'Manual', 'advanced-ads' ); ?></a>
52
- </div>
53
-
54
-
55
- <?php do_action( 'advanced-ads-output-metabox-after', $ad ); ?>
56
-
57
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/ad-parameters-metabox.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php $types = Advanced_Ads::get_instance()->ad_types; ?>
 
2
  <?php
3
  /**
4
  * when changing ad type ad parameter content is loaded via ajax
@@ -6,34 +7,9 @@
6
  * @filesource includes/class-ajax-callbacks.php ::load_ad_parameters_metabox
7
  * @filesource classes/ad-type-content.php :: renter_parameters()
8
  */
9
- do_action( 'advanced-ads-ad-params-before', $ad, $types ); ?>
10
- <div id="advanced-ads-tinymce-wrapper" style="display:none;">
11
- <?php
12
- $args = array(
13
- // used here instead of textarea_rows, because of display:none
14
- 'editor_height' => 300,
15
- 'drag_drop_upload' => true,
16
- );
17
- wp_editor( '', 'advanced-ads-tinymce', $args );
18
- ?>
19
  </div>
20
- <div id="advanced-ads-ad-parameters" class="advads-option-list">
21
- <?php $type = (isset($types[$ad->type])) ? $types[$ad->type] : current( $types );
22
- $type->render_parameters( $ad );
23
-
24
- include ADVADS_BASE_PATH . 'admin/views/ad-parameters-size.php'; ?>
25
-
26
- <?php
27
- if ( defined ( 'WP_DEBUG' ) && WP_DEBUG &&
28
- ( $error = Advanced_Ads_Admin_Ad_Type::check_ad_dom_is_not_valid( $ad ) ) ) : ?>
29
- <p class="advads-error-message">
30
- <?php _e( 'The code of this ad might not work properly with the <em>Content</em> placement.', 'advanced-ads' );
31
- ?>&nbsp;<?php printf(__( 'Reach out to <a href="%s">support</a> to get help.', 'advanced-ads' ), admin_url('admin.php?page=advanced-ads-support') );
32
- if ( true === WP_DEBUG ) : ?>
33
- <span style="white-space:pre-wrap"><?php echo $error; ?></span>
34
- <?php endif;
35
- ?>
36
- </p>
37
- <?php endif; ?>
38
- </div>
39
- <?php do_action( 'advanced-ads-ad-params-after', $ad, $types );
1
  <?php $types = Advanced_Ads::get_instance()->ad_types; ?>
2
+ <h4><?php _e('Ad Parameters', Advanced_Ads::TD); ?></h4>
3
  <?php
4
  /**
5
  * when changing ad type ad parameter content is loaded via ajax
7
  * @filesource includes/class-ajax-callbacks.php ::load_ad_parameters_metabox
8
  * @filesource classes/ad-type-content.php :: renter_parameters()
9
  */
10
+ ?>
11
+ <div id="advanced-ads-ad-parameters">
12
+ <?php $type = (isset($types[$ad->type])) ? $types[$ad->type] : current($types);
13
+ $type->render_parameters($ad); ?>
 
 
 
 
 
 
14
  </div>
15
+ <?php do_action('advanced-ads-ad-params-after', $ad, $types);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/ad-parameters-size.php DELETED
@@ -1,8 +0,0 @@
1
- <span class="label"><?php _e( 'size', 'advanced-ads' ); ?></span>
2
- <div id="advanced-ads-ad-parameters-size">
3
- <label><?php _e( 'width', 'advanced-ads' ); ?><input type="number" size="4" maxlength="4" value="<?php echo isset($ad->width) ? $ad->width : 0; ?>" name="advanced_ad[width]">px</label>
4
- <label><?php _e( 'height', 'advanced-ads' ); ?><input type="number" size="4" maxlength="4" value="<?php echo isset($ad->height) ? $ad->height : 0; ?>" name="advanced_ad[height]">px</label>
5
- <?php $add_wrapper_sizes = ! empty( $ad->output['add_wrapper_sizes'] ); ?>
6
- <label><input type="checkbox" id="advads-wrapper-add-sizes" name="advanced_ad[output][add_wrapper_sizes]" value="true" <?php checked($add_wrapper_sizes); ?>><?php _e( 'reserve this space', 'advanced-ads' ); ?></label>
7
- </div>
8
- <hr/>
 
 
 
 
 
 
 
 
admin/views/ad-submitbox-meta.php DELETED
@@ -1,33 +0,0 @@
1
- <?php
2
- $TZ = Advanced_Ads_Admin::timezone_get_name( Advanced_Ads_Admin::get_wp_timezone() );
3
- ?><div id="advanced-ads-expiry-date" class="misc-pub-section curtime misc-pub-curtime">
4
- <label onclick="advads_toggle_box('#advanced-ads-expiry-date-enable', '#advanced-ads-expiry-date .inner')">
5
- <input type="checkbox" id="advanced-ads-expiry-date-enable" name="advanced_ad[expiry_date][enabled]"
6
- value="1" <?php checked( $enabled, 1 ); ?>/><?php _e( 'Set expiry date', 'advanced-ads' ); ?>&nbsp;(<?php echo $TZ; ?>)
7
- </label>
8
- <br/>
9
-
10
- <div class="inner" <?php if ( ! $enabled ) : ?>style="display:none;"<?php endif; ?>>
11
- <?php
12
- $month = '<label><span class="screen-reader-text">' . __( 'Month' ) . '</span><select id="advads-exp-mm" name="advanced_ad[expiry_date][month]"' . ">\n";
13
- for ( $i = 1; $i < 13; $i = $i + 1 ) {
14
- $monthnum = zeroise( $i, 2 );
15
- $month .= "\t\t\t" . '<option value="' . $monthnum . '" ' . selected( $curr_month, $monthnum, false ) . '>';
16
- $month .= sprintf( _x( '%1$s-%2$s', '1: month number (01, 02, etc.), 2: month abbreviation', 'advanced-ads' ),
17
- $monthnum, $wp_locale->get_month_abbrev( $wp_locale->get_month( $i ) ) ) . "</option>\n";
18
- }
19
- $month .= '</select></label>';
20
-
21
- $day = '<label><span class="screen-reader-text">' . __( 'Day' ) . '</span><input type="text" id="advads-exp-jj" name="advanced_ad[expiry_date][day]" value="' . $curr_day . '" size="2" maxlength="2" autocomplete="off" /></label>';
22
- $year = '<label><span class="screen-reader-text">' . __( 'Year' ) . '</span><input type="text" id="advads-exp-aa" name="advanced_ad[expiry_date][year]" value="' . $curr_year . '" size="4" maxlength="4" autocomplete="off" /></label>';
23
- $hour = '<label><span class="screen-reader-text">' . __( 'Hour' ) . '</span><input type="text" id="advads-exp-hh" name="advanced_ad[expiry_date][hour]" value="' . $curr_hour . '" size="2" maxlength="2" autocomplete="off" /></label>';
24
- $minute = '<label><span class="screen-reader-text">' . __( 'Minute' ) . '</span><input type="text" id="advads-exp-mn" name="advanced_ad[expiry_date][minute]" value="' . $curr_minute . '" size="2" maxlength="2" autocomplete="off" /></label>';
25
-
26
- ?>
27
- <fieldset id="advads-exp-timestampdiv">
28
- <div class="timestamp-wrap">
29
- <?php printf( _x( '%1$s %2$s, %3$s @ %4$s %5$s', 'order of expiry date fields 1: month, 2: day, 3: year, 4: hour, 5: minute', 'advanced-ads' ), $month, $day, $year, $hour, $minute ); ?>
30
- </div>
31
- </fieldset>
32
- </div>
33
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/ad-visitor-metabox.php DELETED
@@ -1,112 +0,0 @@
1
- <?php
2
- $visitor_conditions = Advanced_Ads_Visitor_Conditions::get_instance()->conditions;
3
- $options = $ad->options( 'visitors' );
4
- ?><p class="description"><?php _e( 'Display conditions that are based on the user. Use with caution on cached websites.', 'advanced-ads' ); ?></p>
5
- <div id="advads-visitor-conditions">
6
- <table class="advads-conditions-table"><tbody><?php
7
- if ( isset( $options ) ) :
8
- $i = 0;
9
- foreach ( $options as $_options ) :
10
- if ( isset( $visitor_conditions[ $_options['type'] ]['metabox'] ) ) {
11
- $metabox = $visitor_conditions[ $_options['type'] ]['metabox'];
12
- } else {
13
- continue;
14
- }
15
- $connector = ( ! isset($_options['connector'] ) || 'or' !== $_options['connector'] ) ? 'and' : 'or';
16
- if ( method_exists( $metabox[0], $metabox[1] ) ) {
17
- ?><tr><td class="advads-conditions-connector"><?php echo Advanced_Ads_Visitor_Conditions::render_connector_option( $i, $connector ); ?></td><?php
18
- ?><td class="advads-conditions-type"><?php echo $visitor_conditions[ $_options['type'] ]['label']; ?></td><td><?php
19
- call_user_func( array( $metabox[0], $metabox[1] ), $_options, $i++ );
20
- ?></td><td><button type="button" class="advads-visitor-conditions-remove button">x</button></td></tr><?php
21
- }
22
- endforeach;
23
- endif;
24
- ?></tbody></table>
25
- <input type="hidden" id="advads-visitor-conditions-index" value="<?php echo isset( $options ) ? count( $options ) : 0; ?>"/>
26
- </div>
27
- <?php if( ! isset( $options ) || count( $options ) == 0 ) :
28
- ?><p><?php _e( 'Visitor conditions limit the number of users who can see your ad. There is no need to set visitor conditions if you want all users to see the ad.', 'advanced-ads' ); ?></p><?php
29
- elseif( Advanced_Ads_Checks::cache() && ! defined('AAP_VERSION') ) :
30
- ?><p><?php printf(__( 'Check out cache-busting in <a href="%s" target="_blank">Advanced Ads Pro</a> if dynamic features get cached.', 'advanced-ads' ), ADVADS_URL . 'add-ons/advanced-ads-pro/#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-visitor' ); ?></p><?php
31
- endif;
32
- ?>
33
- <fieldset>
34
- <legend><?php _e( 'New condition', 'advanced-ads' ); ?></legend>
35
- <div id="advads-visitor-conditions-new">
36
- <select>
37
- <option value=""><?php _e( '-- choose a condition --', 'advanced-ads' ); ?></option>
38
- <?php foreach ( $visitor_conditions as $_condition_id => $_condition ) : ?>
39
- <option value="<?php echo $_condition_id; ?>"><?php echo $_condition['label']; ?></option>
40
- <?php endforeach; ?>
41
- </select>
42
- <button type="button" class="button"><?php _e( 'add', 'advanced-ads' ); ?></button>
43
- <span class="advads-loader" style="display: none;"></span>
44
- </div>
45
- </fieldset>
46
- <?php if ( ! defined( 'AAR_SLUG' ) ) : ?>
47
- <p><?php printf( __( 'Define the exact browser width for which an ad should be visible using the <a href="%s" target="_blank">Responsive add-on</a>.', 'advanced-ads' ), ADVADS_URL . 'add-ons/responsive-ads/#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-visitor' ); ?></p>
48
- <?php endif;
49
- ?><script>
50
- jQuery( document ).ready(function ($) {
51
- $('#advads-visitor-conditions-new button').click(function(){
52
- var visitor_condition_type = $('#advads-visitor-conditions-new select').val();
53
- var visitor_condition_title = $('#advads-visitor-conditions-new select option:selected').text();
54
- var visitor_condition_index = parseInt( $('#advads-visitor-conditions-index').val() );
55
- if( ! visitor_condition_type ) return;
56
- $('#advads-visitor-conditions-new .advads-loader').show();
57
- $.ajax({
58
- type: 'POST',
59
- url: ajaxurl,
60
- data: {
61
- action: 'load_visitor_conditions_metabox',
62
- type: visitor_condition_type,
63
- index: visitor_condition_index
64
- },
65
- success: function (r, textStatus, XMLHttpRequest) {
66
- // add
67
- if (r) {
68
- var connector = '<input type="checkbox" name="<?php echo Advanced_Ads_Visitor_Conditions::FORM_NAME; ?>[' + visitor_condition_index + '][connector]" value="or" id="advads-visitor-conditions-'+ visitor_condition_index +'-connector"><label for="advads-visitor-conditions-'+ visitor_condition_index +'-connector"><?php _e( 'and', 'advanced-ads' ); ?></label>';
69
- var newline = '<tr><td class="advads-conditions-connector">'+connector+'</td><td>' + visitor_condition_title + '</td><td>' + r + '</td><td><button type="button" class="advads-visitor-conditions-remove button">x</button></td></tr>';
70
- $( '#advads-visitor-conditions table tbody' ).append( newline );
71
- if ( jQuery.fn.advads_button ) {
72
- $('#advads-visitor-conditions table tbody .advads-conditions-connector input').advads_button();
73
- }
74
- // increase count
75
- visitor_condition_index++;
76
- $('#advads-visitor-conditions-index').val( visitor_condition_index );
77
- $('#advads-visitor-conditions-new .advads-loader').hide();
78
- }
79
- },
80
- error: function (MLHttpRequest, textStatus, errorThrown) {
81
- $( '#advads-visitor-conditions-new' ).append( errorThrown );
82
- $('#advads-visitor-conditions-new .advads-loader').hide();
83
- }
84
- });
85
- });
86
- $(document).on('click', '.advads-visitor-conditions-remove', function(){
87
- var row = $(this).parents('#advads-visitor-conditions table tr');
88
- row.remove();
89
- });
90
- });
91
- </script>
92
- <?php $options = $ad->options( 'visitor' );
93
- if ( isset( $options['mobile'] ) && '' !== $options['mobile'] ) :
94
- ?><p style="color: red;"><?php _e( 'The visitor conditions below are deprecated. Please use the new version of visitor conditions to replace it.', 'advanced-ads' ); ?></p>
95
- <ul id="advanced-ad-visitor-mobile">
96
- <li>
97
- <input type="radio" name="advanced_ad[visitor][mobile]"
98
- id="advanced-ad-visitor-mobile-all" value=""
99
- <?php checked( empty($options['mobile']), 1 ); ?>/>
100
- <label for="advanced-ad-visitor-mobile-all"><?php _e( 'Display on all devices', 'advanced-ads' ); ?></label>
101
- <input type="radio" name="advanced_ad[visitor][mobile]"
102
- id="advanced-ad-visitor-mobile-only" value="only"
103
- <?php checked( $options['mobile'], 'only' ); ?>/>
104
- <label for="advanced-ad-visitor-mobile-only"><?php _e( 'only on mobile devices', 'advanced-ads' ); ?></label>
105
- <input type="radio" name="advanced_ad[visitor][mobile]"
106
- id="advanced-ad-visitor-mobile-no" value="no"
107
- <?php checked( $options['mobile'], 'no' ); ?>/>
108
- <label for="advanced-ad-visitor-mobile-no"><?php _e( 'not on mobile devices', 'advanced-ads' ); ?></label>
109
- </li>
110
- </ul>
111
- <?php endif; ?>
112
- <?php do_action( 'advanced-ads-visitor-conditions-after', $ad ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/admin.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Represents the view for the administration dashboard.
4
+ *
5
+ * This includes the header, options, and other information that should provide
6
+ * The User Interface to the end user.
7
+ *
8
+ * @package Advanced_Ads_Admin
9
+ * @author Thomas Maier <thomas.maier@webgilde.com>
10
+ * @license GPL-2.0+
11
+ * @link http://webgilde.com
12
+ * @copyright 2013 Thomas Maier, webgilde GmbH
13
+ */
14
+ ?>
15
+
16
+ <div class="wrap">
17
+ <h2 style="color:red;"><?php _e('Work in progress', $this->plugin_slug); ?></h2>
18
+ <p><?php _e('This screen is work in progress. You can use the information if you understand them, but there is nothing to do here yet.', $this->plugin_slug); ?></p>
19
+ <?php screen_icon(); ?>
20
+ <h1><?php echo esc_html(get_admin_page_title()); ?></h1>
21
+
22
+ <h2><?php _e('Ad Condition Overview', $this->plugin_slug); ?></h2>
23
+ <pre><?php print_r($ads_by_conditions); ?></pre>
24
+
25
+ </div>
admin/views/debug.php CHANGED
@@ -2,13 +2,15 @@
2
  /**
3
  * the view for the debug page
4
  */
5
- ?><div class="wrap">
6
- <h1><?php _e( 'Debug Page', 'advanced-ads' ); ?></h1>
7
- <p><?php _e( 'Work in progress', 'advanced-ads' ); ?></p>
 
 
8
  <?php screen_icon(); ?>
 
9
 
10
- <h2><?php _e( 'Settings', 'advanced-ads' ); ?></h2>
11
- <pre><?php print_r( $plugin_options ); ?></pre>
12
 
13
- <?php do_action('advanced-ads-debug-after', $plugin_options); ?>
14
- </div>
2
  /**
3
  * the view for the debug page
4
  */
5
+ ?>
6
+
7
+ <div class="wrap">
8
+ <h2 style="color:red;"><?php _e('Work in progress', $this->plugin_slug); ?></h2>
9
+ <p><?php _e('This screen is work in progress. You can use the information if you understand them, but there is nothing to do here yet.', $this->plugin_slug); ?></p>
10
  <?php screen_icon(); ?>
11
+ <h1><?php echo esc_html(get_admin_page_title()); ?></h1>
12
 
13
+ <h2><?php _e('Ad Condition Overview', $this->plugin_slug); ?></h2>
14
+ <pre><?php print_r($ads_by_conditions); ?></pre>
15
 
16
+ </div>
 
admin/views/feedback_disable.php DELETED
@@ -1,20 +0,0 @@
1
- <tr id="advanced-ads-feedback" class="active"><td colspan="3">
2
- <form action="mailto:support@wpadvancedads.com">
3
- <p><?php _e( 'Thank you for helping to improve Advanced Ads.', 'advanced-ads' ); ?></p>
4
- <p><?php _e( 'Your feedback will motivates me to work harder towards a professional ad management solution.', 'advanced-ads' ); ?></p>
5
- <p><?php _e( 'Why did you decide to disable Advanced Ads?', 'advanced-ads' ); ?></p>
6
- <ul>
7
- <li><input type="checkbox" name="advanced_ads_disable_reason[]"/><?php _e( 'I stopped showing ads on my site', 'advanced-ads' ); ?></li>
8
- <li><input type="checkbox" name="advanced_ads_disable_reason[]"/><?php printf(__( 'I miss a feature or <a href="%s">add-on</a>', 'advanced-ads' ), ADVADS_URL . '/add-ons/#utm_source=advanced-ads&utm_medium=link&utm_campaign=disabled' ); ?></li>
9
- <li><input type="checkbox" name="advanced_ads_disable_reason[]"/><?php _e( 'I have a technical problem', 'advanced-ads' ); ?></li>
10
- <li><input type="checkbox" name="advanced_ads_disable_reason[]"/><?php _e( 'other reason', 'advanced-ads' ); ?></li>
11
- </ul>
12
- <textarea name="advanced_ads_disable_reason_text" placeholder="<?php _e( 'Please specify, if possible', 'advanced-ads' ); ?>"></textarea>
13
- <p><?php _e( 'What would be a reason to return to Advanced Ads?', 'advanced-ads' ); ?></p>
14
- <textarea name="advanced_ads_return[]"></textarea>
15
- <?php if( $email ) : ?>
16
- <input type="submit" name="advanced_ads_disable_submit" value="submit as <?php echo $email; ?>"/>
17
- <?php endif; ?>
18
- <input type="submit" name="advanced_ads_disable_submit" value="submit anonymously"/>
19
- </form>
20
- </td></tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/intro.php DELETED
@@ -1,90 +0,0 @@
1
- <?php
2
- /* wp_enqueue_style( 'wp-mediaelement' );
3
- wp_enqueue_script( 'wp-mediaelement' );
4
- wp_localize_script( 'mediaelement', '_wpmejsSettings', array(
5
- 'pluginPath' => includes_url( 'js/mediaelement/', 'relative' ),
6
- 'pauseOtherPlayers' => ''
7
- ) );
8
-
9
- $video_url = 'https://videopress.com/embed/T54Iy7Tw';
10
- $locale = str_replace( '_', '-', get_locale() );
11
- if ( 'en' !== $locale ) {
12
- $video_url = add_query_arg( 'defaultLangCode', $locale, $video_url );
13
- }*/
14
-
15
- $minor_features = array(
16
- array(
17
- 'src' => ADVADS_BASE_URL . '/admin/assets/img/intro/5-star-usability.png',
18
- 'heading' => __( '5-Star Usability', 'advanced-ads' ),
19
- 'description' => __( 'Advanced Ads is powerful and easy to use, because it is build on WordPress standards. If you know how to publish a post then you know how to create an ad.', 'advanced-ads' ),
20
- ),
21
- array(
22
- 'src' => ADVADS_BASE_URL . '/admin/assets/img/intro/5-star-support.png',
23
- 'heading' => __( '5-Star Support', 'advanced-ads' ),
24
- 'description' => __( 'I promise you the best supported ad management plugin for WordPress. Whether a pro user or not, you can reach me easily through the support page, in the chat on the homepage or replying to a newsletter.', 'advanced-ads' ),
25
- ),
26
- array(
27
- 'src' => ADVADS_BASE_URL . '/admin/assets/img/intro/5-star-experience.png',
28
- 'heading' => __( '5-Star Experience', 'advanced-ads' ),
29
- 'description' => __( 'Advanced Ads was built out of my own experience. I am personally using it to serve millions of ad impressions per month and constantly test new ways to optimize ad settings.', 'advanced-ads' ),
30
- ),
31
- );
32
- ?>
33
- <div class="wrap about-wrap">
34
- <h1><?php printf( __( 'Welcome to <strong>Advanced Ads</strong>' ), ADVADS_VERSION ); ?></h1>
35
-
36
- <div class="about-text"><?php _e( 'Let me give you an introduction into your future ad management solution.' ); ?></div>
37
-
38
- <?php /* <h2 class="nav-tab-wrapper">
39
- <a href="about.php" class="nav-tab nav-tab-active"><?php _e( 'What&#8217;s New' ); ?></a>
40
- <a href="credits.php" class="nav-tab"><?php _e( 'Credits' ); ?></a>
41
- <a href="freedoms.php" class="nav-tab"><?php _e( 'Freedoms' ); ?></a>
42
- </h2>
43
-
44
- <div class="headline-feature feature-video">
45
- <iframe width="1050" height="591" src="<?php echo esc_url( $video_url ); ?>" frameborder="0" allowfullscreen></iframe>
46
- <script src="https://videopress.com/videopress-iframe.js"></script>
47
- </div>*/ ?>
48
-
49
- <hr/>
50
-
51
- <div class="feature-section three-col">
52
- <?php foreach ( $minor_features as $feature ) : ?>
53
- <div class="col">
54
- <img src="<?php echo esc_attr( $feature['src'] ); ?>" width="314" height="180"/>
55
- <h3><?php echo $feature['heading']; ?></h3>
56
- <p><?php echo $feature['description']; ?></p>
57
- </div>
58
- <?php endforeach; ?>
59
- </div>
60
- <hr/>
61
- <h2><?php _e( 'Next Steps', 'advanced-ads' ); ?></h2>
62
- <div class="feature-section three-col">
63
- <div class="col">
64
- <h3>1. <?php _e( 'Subscribe to the Mailing List', 'advanced-ads' ); ?></h3>
65
- <p><?php _e( 'Subscribe to the newsletter and instantly', 'advanced-ads' ); ?></p>
66
- <ul>
67
- <li><?php _e( 'get 2 free add-ons.', 'advanced-ads' ); ?></li>
68
- <li><?php _e( 'reply to the welcome message with a question.', 'advanced-ads' ); ?></li>
69
- <li><?php _e( 'subscribe to a dedicated group for the tutorial or AdSense tips.', 'advanced-ads' ); ?></li>
70
- </ul>
71
- <div class="advads-admin-notice">
72
- <p>
73
- <button type="button" class="button button-hero button-primary advads-notices-button-subscribe" data-notice="nl_free_addons"><?php echo __('Subscribe me now', 'advanced-ads'); ?></button>
74
- </p>
75
- </div>
76
- </div>
77
- <div class="col">
78
- <h3>2. <?php _e( 'Create your first ad', 'advanced-ads' ); ?></h3>
79
- <p><?php printf(__( 'Get started by creating an ad <a href="%1$s" target="blank">right now</a> or watch the <a href="%2$s" target="blank">tutorial video (3:29min)</a> first.', 'advanced-ads' ), admin_url( 'post-new.php?post_type=' . Advanced_Ads::POST_TYPE_SLUG ), ADVADS_URL . 'manual/first-ad/#utm_source=advanced-ads&utm_medium=link&utm_campaign=intro' ); ?></p>
80
- </div>
81
- <div class="col">
82
- <h3>3. <?php _e( 'Display your ad', 'advanced-ads' ); ?></h3>
83
- <p><?php _e( 'You can display your ad using a shortcode, widget or one of the powerful placements. Placements help you to inject ads into the content or place them on your site without coding.', 'advanced-ads' ); ?></p>
84
- <ul>
85
- <li><a href="<?php echo ADVADS_URL . '/manual/placements/#utm_source=advanced-ads&utm_medium=link&utm_campaign=intro'; ?>" target="_blank"><?php _e( 'List of all available placements', 'advanced-ads' ); ?></a></li>
86
- <li><a href="<?php echo admin_url( 'admin.php?page=advanced-ads-placements' ); ?>" target="_blank"><?php _e( 'Create a placement', 'advanced-ads' ); ?></a></li>
87
- </ul>
88
- </div>
89
- </div>
90
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/notices/adblock.php DELETED
@@ -1,11 +0,0 @@
1
- <div class="advads-ad-block-check">
2
- <img src="<?php echo ADVADS_BASE_URL . 'admin/assets/img/advertisement.png' ?>" width="1" height="1"/>
3
- <div class="message error" style="display: none;"><p><?php _e( 'Please disable your <strong>AdBlocker</strong> to prevent problems with your ad setup.', 'advanced-ads' ); ?></p></div>
4
- </div>
5
- <script>
6
- jQuery(document).ready(function(){
7
- if( ! jQuery('.advads-ad-block-check img').is(':visible') ){
8
- jQuery('.advads-ad-block-check .message').show();
9
- }
10
- });
11
- </script>
 
 
 
 
 
 
 
 
 
 
 
admin/views/notices/error.php DELETED
@@ -1 +0,0 @@
1
- <div class="error advads-admin-notice notice is-dismissible message" data-notice="<?php echo $_notice; ?>"><p><?php echo $text; ?></p></div>
 
admin/views/notices/info.php DELETED
@@ -1,3 +0,0 @@
1
- <div class="updated advads-admin-notice message notice is-dismissible" data-notice="<?php echo $_notice; ?>">
2
- <p><?php echo $text; ?></p>
3
- </div>
 
 
 
admin/views/notices/inline.php DELETED
@@ -1,5 +0,0 @@
1
- <div class="advads-admin-notice-inline advads-admin-notice notice is-dismissible" data-notice="<?php echo $_notice ?>">
2
- <p><?php echo $text; ?>
3
- <button type="button" class="button-primary advads-notices-button-subscribe"><?php echo isset( $notice['confirm_text'] ) ? $notice['confirm_text'] : __('Subscribe me now', 'advanced-ads'); ?></button>
4
- </p>
5
- </div>
 
 
 
 
 
admin/views/notices/jqueryui_error.php DELETED
@@ -1,3 +0,0 @@
1
- <div class="advads-jqueryui-error message error" style="display: none;">
2
- <p><?php printf(__( 'There might be a problem with layouts and scripts in your dashboard. Please check <a href="%s" target="_blank">this article to learn more</a>.', 'advanced-ads' ), ADVADS_URL . 'manual/jquery-problem-in-dashboard/#utm_source=advanced-ads&utm_medium=link&utm_campaign=notice-jquery-error' ); ?></p>
3
- </div>
 
 
 
admin/views/notices/plugin_error.php DELETED
@@ -1 +0,0 @@
1
- <div class="error advads-admin-notice message"><p><?php echo $text; ?><?php ?></p></div>
 
admin/views/notices/subscribe.php DELETED
@@ -1,5 +0,0 @@
1
- <div class="updated advads-admin-notice notice is-dismissible" data-notice="<?php echo $_notice ?>">
2
- <p><?php echo $text; ?>
3
- <button type="button" class="button-primary advads-notices-button-subscribe" data-notice="<?php echo $_notice ?>"><?php echo isset( $notice['confirm_text'] ) ? $notice['confirm_text'] : __('Subscribe me now', 'advanced-ads'); ?></button>
4
- </p>
5
- </div>
 
 
 
 
 
admin/views/overview.php DELETED
@@ -1,32 +0,0 @@
1
- <?php
2
- /**
3
- * Advanced Ads overview page in the dashboard
4
- */
5
-
6
- /** Load WordPress dashboard API */
7
- require_once(ABSPATH . 'wp-admin/includes/dashboard.php');
8
-
9
- do_action( 'advanced-ads-admin-overview-before' );
10
-
11
- wp_enqueue_script( 'dashboard' );
12
- if ( current_user_can( 'edit_theme_options' ) ) {
13
- wp_enqueue_script( 'customize-loader' ); }
14
- if ( current_user_can( 'install_plugins' ) ) {
15
- wp_enqueue_script( 'plugin-install' ); }
16
- if ( current_user_can( 'upload_files' ) ) {
17
- wp_enqueue_script( 'media-upload' ); }
18
- add_thickbox();
19
-
20
- if ( wp_is_mobile() ) {
21
- wp_enqueue_script( 'jquery-touch-punch' ); }
22
-
23
- $title = __( 'Ads Dashboard', 'advanced-ads' );
24
-
25
- ?><div class="wrap">
26
- <h1><?php echo esc_html( $title ); ?></h1>
27
-
28
- <div id="dashboard-widgets-wrap">
29
- <?php wp_dashboard(); ?>
30
- </div><!-- dashboard-widgets-wrap -->
31
- <?php do_action( 'advanced-ads-admin-overview-after' ); ?>
32
- </div><!-- wrap -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/placements.php DELETED
@@ -1,199 +0,0 @@
1
- <?php
2
- /**
3
- * the view for the placements page
4
- */
5
- ?><div class="wrap">
6
- <?php if ( isset($_GET['message'] ) ) :
7
- if ( $_GET['message'] === 'error' ) :
8
- ?><div id="message" class="error"><p><?php _e( 'Couldn’t create the new placement. Please check your form field and whether the name is already in use.', 'advanced-ads' ); ?></p></div><?php
9
- elseif ( $_GET['message'] === 'updated' ) :
10
- ?><div id="message" class="updated"><p><?php _e( 'Placements updated', 'advanced-ads' ); ?></p></div><?php
11
- endif; ?>
12
- <?php endif; ?>
13
- <?php screen_icon(); ?>
14
- <h1><?php echo esc_html( get_admin_page_title() ); ?></h1>
15
- <p class="description"><?php _e( 'Placements are physically places in your theme and posts. You can use them if you plan to change ads and ad groups on the same place without the need to change your templates.', 'advanced-ads' ); ?></p>
16
- <p class="description"><?php printf( __( 'See also the manual for more information on <a href="%s">placements</a>.', 'advanced-ads' ), ADVADS_URL . 'manual/placements/#utm_source=advanced-ads&utm_medium=link&utm_campaign=placements' ); ?></p>
17
- <?php if ( isset($placements) && is_array( $placements ) && count( $placements ) ) :
18
- do_action( 'advanced-ads-placements-list-before', $placements ); ?>
19
- <h2><?php _e( 'Placements', 'advanced-ads' ); ?></h2>
20
- <form method="POST" action="">
21
- <table class="widefat advads-placements-table striped">
22
- <thead>
23
- <tr>
24
- <th><?php _e( 'Type', 'advanced-ads' ); ?></th>
25
- <th><?php _e( 'Name', 'advanced-ads' ); ?></th>
26
- <th><?php _e( 'Options', 'advanced-ads' ); ?></th>
27
- <?php do_action( 'advanced-ads-placements-list-column-header' ); ?>
28
- <th></th>
29
- </tr>
30
- </thead>
31
- <tbody>
32
- <?php // order by slug
33
- ksort( $placements );
34
- foreach ( $placements as $_placement_slug => $_placement ) :
35
- $type_missing = false;
36
- if( isset( $_placement['type'] ) && ! isset( $placement_types[$_placement['type']] )) {
37
- $missed_type = $_placement['type'];
38
- $_placement['type'] = 'default';
39
- $type_missing = true;
40
- }
41
- ?><tr id="single-placement-<?php echo $_placement_slug; ?>">
42
- <td><?php
43
- if( $type_missing ) : // type is not given
44
- ?><p class="advads-error-message"><?php printf(__( 'Placement type "%s" is missing and was reset to "default".<br/>Please check if the responsible add-on is activated.', 'advanced-ads' ), $missed_type ); ?></p><?php
45
- elseif( isset($_placement['type'] )) :
46
- if( isset( $placement_types[$_placement['type']]['image'] )) :
47
- ?><img src="<?php echo $placement_types[$_placement['type']]['image'];
48
- ?>" title="<?php echo $placement_types[$_placement['type']]['title'];
49
- ?>" alt="<?php echo $placement_types[$_placement['type']]['title']; ?>"/><?php
50
- else :
51
- echo $placement_types[$_placement['type']]['title'];
52
- endif;
53
- else :
54
- __( 'default', 'advanced-ads' );
55
- endif;
56
- ?></td>
57
- <td><?php echo $_placement['name']; ?><br/>
58
- <?php if( ! isset( $_placement['type'] ) || 'default' === $_placement['type']) :
59
- $_placement['type'] = 'default';
60
- ?><a class="usage-link"><?php _e( 'show usage', 'advanced-ads' ); ?></a><div class="hidden advads-usage">
61
- <label><?php _e( 'shortcode', 'advanced-ads' ); ?>
62
- <code><input type="text" onclick="this.select();" value='[the_ad_placement id="<?php echo $_placement_slug; ?>"]'/></code>
63
- </label>
64
- <label><?php _e( 'template', 'advanced-ads' ); ?>
65
- <code><input type="text" onclick="this.select();" value="the_ad_placement('<?php echo $_placement_slug; ?>');"/></code>
66
- </label>
67
- </div><?php
68
- endif;
69
- ?></td>
70
- <td class="advads-placements-table-options">
71
- <?php do_action( 'advanced-ads-placement-options-before', $_placement_slug, $_placement ); ?>
72
- <label for="adsads-placements-item-<?php echo $_placement_slug; ?>"><?php _e( 'Item', 'advanced-ads' ); ?></label>
73
- <select id="adsads-placements-item-<?php echo $_placement_slug; ?>" name="advads[placements][<?php echo $_placement_slug; ?>][item]">
74
- <option value=""><?php _e( '--not selected--', 'advanced-ads' ); ?></option>
75
- <?php if ( isset($items['groups']) ) : ?>
76
- <optgroup label="<?php _e( 'Ad Groups', 'advanced-ads' ); ?>">
77
- <?php foreach ( $items['groups'] as $_item_id => $_item_title ) : ?>
78
- <option value="<?php echo $_item_id; ?>" <?php if ( isset($_placement['item']) ) { selected( $_item_id, $_placement['item'] ); } ?>><?php echo $_item_title; ?></option>
79
- <?php endforeach; ?>
80
- </optgroup>
81
- <?php endif; ?>
82
- <?php if ( isset($items['ads']) ) : ?>
83
- <optgroup label="<?php _e( 'Ads', 'advanced-ads' ); ?>">
84
- <?php foreach ( $items['ads'] as $_item_id => $_item_title ) : ?>
85
- <option value="<?php echo $_item_id; ?>" <?php if ( isset($_placement['item']) ) { selected( $_item_id, $_placement['item'] ); } ?>><?php echo $_item_title; ?></option>
86
- <?php endforeach; ?>
87
- </optgroup>
88
- <?php endif; ?>
89
- </select><br/>
90
- <?php
91
- switch ( $_placement['type'] ) :
92
- case 'post_content' :
93
- ?><div class="advads-placement-options"><?php
94
- _e( 'Inject', 'advanced-ads' );
95
- $_positions = array('after' => __( 'after', 'advanced-ads' ), 'before' => __( 'before', 'advanced-ads' )); ?>
96
- <select name="advads[placements][<?php echo $_placement_slug; ?>][options][position]">
97
- <?php foreach ( $_positions as $_pos_key => $_pos ) : ?>
98
- <option value="<?php echo $_pos_key; ?>" <?php if ( isset($_placement['options']['position']) ) { selected( $_placement['options']['position'], $_pos_key ); } ?>><?php echo $_pos; ?></option>
99
- <?php endforeach; ?>
100
- </select>
101
-
102
- <input type="number" name="advads[placements][<?php echo $_placement_slug; ?>][options][index]" value="<?php
103
- echo (isset($_placement['options']['index'])) ? $_placement['options']['index'] : 1;
104
- ?>"/>.
105
-
106
- <?php $tags = Advanced_Ads_Placements::tags_for_content_injection(); ?>
107
- <select name="advads[placements][<?php echo $_placement_slug; ?>][options][tag]">
108
- <?php foreach ( $tags as $_tag_key => $_tag ) : ?>
109
- <option value="<?php echo $_tag_key; ?>" <?php if ( isset($_placement['options']['tag']) ) { selected( $_placement['options']['tag'], $_tag_key ); } ?>><?php echo $_tag; ?></option>
110
- <?php endforeach; ?>
111
- </select>
112
-
113
- <p><label><input type="checkbox" name="advads[placements][<?php echo $_placement_slug; ?>][options][start_from_bottom]" value="1" <?php
114
- if (isset($_placement['options']['start_from_bottom'])) { checked( $_placement['options']['start_from_bottom'], 1); }
115
- ?>/><?php _e( 'start counting from bottom', 'advanced-ads' ); ?></label></p>
116
- </div>
117
- <?php if( ! function_exists( 'mb_convert_encoding' ) ) : ?>
118
- <p><span class="advads-error-message"><?php _e( 'Important Notice', 'advanced-ads' ); ?>: </span><?php _e( 'Your server is missing an extension. This might break the content injection.<br/>Ignore this warning if everything works fine or else ask your hosting provider to enable <em>mbstring</em>.', 'advanced-ads' ); ?></p>
119
- <?php endif;
120
- break;
121
- endswitch;
122
- do_action( 'advanced-ads-placement-options-after', $_placement_slug, $_placement );
123
- ob_start();
124
- do_action( 'advanced-ads-placement-options-after-advanced', $_placement_slug, $_placement );
125
- $advanced_options = ob_get_clean();
126
- if( $advanced_options ) :
127
- ?><a class="advads-toggle-link" onclick="advads_toggle('.advads-placements-advanced-options-<?php
128
- echo $_placement_slug; ?>')">- <?php _e( 'advanced options', 'advanced-ads' ); ?> –</a>
129
- <div class="advads-placements-advanced-options-<?php echo $_placement_slug; ?>" style="display: none"><?php
130
- echo $advanced_options;
131
- ?></div><?php
132
- endif;
133
- ?></td>
134
- <?php do_action( 'advanced-ads-placements-list-column', $_placement_slug, $_placement ); ?>
135
- <td>
136
- <input type="checkbox" id="adsads-placements-item-delete-<?php echo $_placement_slug; ?>" name="advads[placements][<?php echo $_placement_slug; ?>][delete]" value="1"/>
137
- <label for="adsads-placements-item-delete-<?php echo $_placement_slug; ?>"><?php _ex( 'delete', 'checkbox to remove placement', 'advanced-ads' ); ?></label>
138
- </td>
139
- </tr>
140
- <?php endforeach; ?>
141
- </tbody>
142
- </table>
143
- <input type="submit" id="advads-save-placements-button" class="button button-primary" value="<?php _e( 'Save Placements', 'advanced-ads' ); ?>"/>
144
- <?php wp_nonce_field( 'advads-placement', 'advads_placement', true ) ?>
145
- <button type="button" title="<?php _e( 'Create a new placement', 'advanced-ads' ); ?>" class="button-secondary" onclick="advads_toggle('.advads-placements-new-form')"><?php
146
- _e( 'New Placement', 'advanced-ads' ); ?></button>
147
- <?php do_action( 'advanced-ads-placements-list-buttons', $placements ); ?>
148
- </form>
149
- <?php do_action( 'advanced-ads-placements-list-after', $placements );
150
- endif;
151
-
152
- ?><form method="POST" action="" onsubmit="return advads_validate_placement_form();" class="advads-placements-new-form"<?php if ( isset($placements) && count( $placements ) ) echo ' style="display: none;"' ; ?>>
153
- <h3>1. <?php _e( 'Choose a placement type', 'advanced-ads' ); ?></h3>
154
- <p class="description"><?php printf(__( 'Placement types define where the ad is going to be displayed. Learn more about the different types from the <a href="%s">manual</a>', 'advanced-ads' ), ADVADS_URL . 'manual/placements/#utm_source=advanced-ads&utm_medium=link&utm_campaign=placements' ); ?></p>
155
- <div class= "advads-new-placement-types advads-buttonset">
156
- <?php
157
- if ( is_array( $placement_types ) ) {
158
- foreach ( $placement_types as $_key => $_place ) :
159
- if( isset( $_place['image'] )) :
160
- $image = '<img src="' . $_place['image'] . '" alt="' . $_place['title'] . '"/>';
161
- else :
162
- $image = '<strong>' . $_place['title'] . '</strong><br/><p class="description">' . $_place['description'] . '</p>';
163
- endif;
164
- ?><div class="advads-placement-type"><label for="advads-placement-type-<?php echo $_key; ?>"><?php echo $image; ?></label>
165
- <input type="radio" id="advads-placement-type-<?php echo $_key; ?>" name="advads[placement][type]" value="<?php echo $_key; ?>"/>
166
- <p class="advads-placement-description"><strong><?php echo $_place['title'] ?></strong><br/><?php echo $_place['description']; ?></p>
167
- </div><?php
168
- endforeach; };
169
- ?></div>
170
- <div class="clear"></div>
171
- <p class="advads-error-message advads-placement-type-error"><?php _e( 'Please select a placement type.', 'advanced-ads' ); ?></p>
172
- <br/>
173
- <h3>2. <?php _e( 'Choose a Name', 'advanced-ads' ); ?></h3>
174
- <p class="description"><?php _e( 'The name of the placement is only visible to you. Tip: choose a descriptive one, e.g. <em>Below Post Headline</em>.', 'advanced-ads' ); ?></p>
175
- <p><input name="advads[placement][name]" class="advads-new-placement-name" type="text" value="" placeholder="<?php _e( 'Placement Name', 'advanced-ads' ); ?>"/></p>
176
- <p class="advads-error-message advads-placement-name-error"><?php _e( 'Please enter a name for your placement.', 'advanced-ads' ); ?></p>
177
- <h3>3. <?php _e( 'Choose the Ad or Group', 'advanced-ads' ); ?></h3>
178
- <p class="description"><?php _e( 'The ad or group that should be displayed.', 'advanced-ads' ); ?></p>
179
- <p><select name="advads[placement][item]">
180
- <option value=""><?php _e( '--not selected--', 'advanced-ads' ); ?></option>
181
- <?php if ( isset($items['groups']) ) : ?>
182
- <optgroup label="<?php _e( 'Ad Groups', 'advanced-ads' ); ?>">
183
- <?php foreach ( $items['groups'] as $_item_id => $_item_title ) : ?>
184
- <option value="<?php echo $_item_id; ?>"><?php echo $_item_title; ?></option>
185
- <?php endforeach; ?>
186
- </optgroup>
187
- <?php endif; ?>
188
- <?php if ( isset($items['ads']) ) : ?>
189
- <optgroup label="<?php _e( 'Ads', 'advanced-ads' ); ?>">
190
- <?php foreach ( $items['ads'] as $_item_id => $_item_title ) : ?>
191
- <option value="<?php echo $_item_id; ?>"><?php echo $_item_title; ?></option>
192
- <?php endforeach; ?>
193
- </optgroup>
194
- <?php endif; ?>
195
- </select></p>
196
- <?php wp_nonce_field( 'advads-placement', 'advads_placement', true ) ?>
197
- <input type="submit" class="button button-primary" value="<?php _e( 'Save New Placement', 'advanced-ads' ); ?>"/>
198
- </form>
199
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/post-ad-settings-metabox.php DELETED
@@ -1,3 +0,0 @@
1
- <label><input type="checkbox" name="advanced_ads[disable_ads]" value="1" <?php
2
- if ( isset($values['disable_ads']) ) { checked( $values['disable_ads'], true ); }
3
- ?>/><?php _e( 'Disable ads on this page', 'advanced-ads' ); ?></label>
 
 
 
admin/views/setting-license.php DELETED
@@ -1,48 +0,0 @@
1
- <?php
2
- $errortext = false;
3
- $expires = Advanced_Ads_Admin::get_instance()->get_license_expires( $options_slug );
4
- $expired = false;
5
- $expired_error = __( 'Your license expired.', 'advanced-ads' );
6
- $expired_error .= $expired_renew_link = ' ' . sprintf(__( '<a href="%s" target="_blank">Renew it with a discount</a>.', 'advanced-ads' ), ADVADS_URL . 'checkout/?edd_license_key=' . esc_attr($license_key) . '#utm_source=advanced-ads&utm_medium=link&utm_campaign=settings-licenses' );
7
- if( 'lifetime' !== $expires ){
8
- $expires_time = strtotime( $expires );
9
- $days_left = ( $expires_time - time() ) / DAY_IN_SECONDS;
10
- }
11
- if( 'lifetime' === $expires ){
12
- // do nothing
13
- } elseif( $days_left <= 0 ){
14
- $plugin_url = isset( $plugin_url ) ? $plugin_url : ADVADS_URL;
15
- $errortext = $expired_error;
16
- $expired = true;
17
- } elseif ( 0 < $days_left && 91 > $days_left ){
18
- $errortext = sprintf( __('(%d days left)', 'advanced-ads' ), $days_left ) . $expired_renew_link;
19
- }
20
- $show_active = ( $license_status !== false && $license_status == 'valid' && ! $expired ) ? true : false;
21
-
22
- ?><input type="text" class="regular-text advads-license-key" placeholder="<?php _e( 'License key', 'advanced-ads' ); ?>"
23
- name="<?php echo ADVADS_SLUG . '-licenses'; ?>[<?php echo $index; ?>]"
24
- value="<?php esc_attr_e($license_key); ?>"
25
- <?php if( $license_status !== false && $license_status == 'valid' && ! $expired ) : ?> disabled="disabled"<?php endif; ?>/>
26
-
27
- <button type="button" class="button-secondary advads-license-deactivate"
28
- <?php if( $license_status !== 'valid' ) echo ' style="display: none;" '; ?>
29
- data-addon="<?php echo $index; ?>"
30
- data-pluginname="<?php echo $plugin_name; ?>"
31
- data-optionslug="<?php echo $options_slug; ?>"
32
- name="advads_license_activate"><?php _e('Deactivate License'); ?></button>
33
-
34
- <button type="button" class="button-primary advads-license-activate"
35
- <?php if( $license_status === 'valid' && ! $expired ) echo ' style="display: none;" '; ?>
36
- data-addon="<?php echo $index; ?>"
37
- data-pluginname="<?php echo $plugin_name; ?>"
38
- data-optionslug="<?php echo $options_slug; ?>"
39
- name="advads_license_activate"><?php _e('Activate License'); ?></button><?php
40
- if( '' === trim( $license_key ) ){
41
- $errortext = __('Please enter a valid license key', 'advanced-ads');
42
- } elseif( ! $expired && ! $errortext ){
43
- $errortext = ( $license_status == 'invalid') ? __('License key invalid', 'advanced-ads') : '';
44
- }
45
- ?>&nbsp;
46
- <span class="advads-license-activate-active" <?php if( ! $show_active ) echo 'style="display: none;"'; ?>><?php _e( 'active', 'advanced-ads' ); ?></span>
47
- <span class="advads-license-activate-error" <?php if( ! $errortext ) echo 'style="display: none;"'; ?>><?php echo $errortext; ?></span>
48
- <span class="advads-license-expired-error advads-error-message" style="display: none;"><?php echo $expired_error; ?></span>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/settings-disable-ads.php DELETED
@@ -1,21 +0,0 @@
1
- <label><input id="advanced-ads-disable-ads-all" type="checkbox" value="1" name="<?php
2
- echo ADVADS_SLUG ?>[disabled-ads][all]" <?php checked( $disable_all, 1 );
3
- ?>><?php _e( 'Disable all ads in frontend', 'advanced-ads' ); ?></label>
4
- <p class="description"><?php _e( 'Use this option to disable all ads in the frontend, but still be able to use the plugin.', 'advanced-ads' ); ?></p>
5
-
6
- <label><input id="advanced-ads-disable-ads-404" type="checkbox" value="1" name="<?php
7
- echo ADVADS_SLUG; ?>[disabled-ads][404]" <?php checked( $disable_404, 1 );
8
- ?>><?php _e( 'Disable ads on 404 error pages', 'advanced-ads' ); ?></label>
9
-
10
- <br/><label><input id="advanced-ads-disable-ads-archives" type="checkbox" value="1" name="<?php
11
- echo ADVADS_SLUG; ?>[disabled-ads][archives]" <?php checked( $disable_archives, 1 );
12
- ?>><?php _e( 'Disable ads on non-singular pages', 'advanced-ads' ); ?></label>
13
- <p class="description"><?php _e( 'e.g. archive pages like categories, tags, authors, front page (if a list)', 'advanced-ads' ); ?></p>
14
- <label><input id="advanced-ads-disable-ads-secondary" type="checkbox" value="1" name="<?php
15
- echo ADVADS_SLUG; ?>[disabled-ads][secondary]" <?php checked( $disable_secondary, 1 );
16
- ?>><?php _e( 'Disable ads on secondary queries', 'advanced-ads' ); ?></label>
17
- <p class="description"><?php _e( 'Secondary queries are custom queries of posts outside the main query of a page. Try this option if you see ads injected on places where they shouldn’t appear.', 'advanced-ads' ); ?></p>
18
-
19
- <label><input id="advanced-ads-disable-ads-feed" type="checkbox" value="1" name="<?php
20
- echo ADVADS_SLUG; ?>[disabled-ads][feed]" <?php checked( $disable_feed, 1 );
21
- ?>><?php _e( 'Disable ads in Feed', 'advanced-ads' ); ?></label>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/settings.php CHANGED
@@ -2,77 +2,36 @@
2
  /**
3
  * the view for the settings page
4
  */
 
5
 
6
- // array with setting tabs for frontend
7
- $setting_tabs = apply_filters('advanced-ads-setting-tabs', array(
8
- 'general' => array(
9
- 'page' => Advanced_Ads_Admin::get_instance()->plugin_screen_hook_suffix,
10
- 'group' => ADVADS_SLUG,
11
- 'tabid' => 'general',
12
- 'title' => __( 'General', 'advanced-ads' )
13
- )
14
- ));
15
- ?><div class="wrap">
16
- <?php screen_icon(); ?>
17
- <h1><?php echo esc_html( get_admin_page_title() ); ?></h1>
18
- <?php settings_errors(); ?>
19
- <h2 class="nav-tab-wrapper" id="advads-tabs">
20
- <?php foreach ( $setting_tabs as $_setting_tab_id => $_setting_tab ) : ?>
21
- <a class="nav-tab" id="<?php echo $_setting_tab_id; ?>-tab"
22
- href="#top#<?php echo $_setting_tab_id; ?>"><?php echo $_setting_tab['title']; ?></a>
23
- <?php endforeach; ?>
24
- </h2>
25
- <?php foreach ( $setting_tabs as $_setting_tab_id => $_setting_tab ) : ?>
26
- <div id="<?php echo $_setting_tab_id; ?>" class="advads-tab">
27
- <form class="advads-settings-tab-main-form" method="post" action="options.php">
28
- <?php
29
- if ( isset( $_setting_tab['group'] ) ) {
30
- settings_fields( $_setting_tab['group'] );
31
- }
32
- do_settings_sections( $_setting_tab['page'] );
33
 
34
- do_action( 'advanced-ads-settings-form', $_setting_tab_id, $_setting_tab );
35
- if ( isset( $_setting_tab['group'] ) && 'advanced-ads-licenses' !== $_setting_tab['group'] ){
36
- submit_button( __( 'Save settings on this page', 'advanced-ads' ) );
37
- }
38
- ?>
39
- </form>
40
- <?php do_action( 'advanced-ads-settings-tab-after-form', $_setting_tab_id, $_setting_tab ); ?>
41
- </div>
42
- <?php endforeach; ?>
43
- <?php
44
- do_action( 'advanced-ads-additional-settings-form' );
45
- ?>
46
- <ul>
47
 
48
- <li><a href="<?php echo esc_url( admin_url( 'admin.php?page=advanced-ads-import-export' ) ); ?>"><?php _e( 'Import &amp; Export', 'advanced-ads' ); ?></a></li>
49
- <li><a href="<?php echo esc_url( admin_url( 'admin.php?page=advanced-ads-debug' ) ); ?>"><?php _e( 'Debug Page', 'advanced-ads' ); ?></a></li>
50
- <li><a href="<?php echo esc_url( admin_url( 'admin.php?page=advanced-ads-intro' ) ); ?>"><?php _e( 'Welcome Page', 'advanced-ads' ); ?></a></li>
51
- <li><a href="http://wordpress.org/plugins/advanced-ads/" title="<?php _e( 'Advanced Ads on WordPress.org', 'advanced-ads' ); ?>"><?php _e( 'Advanced Ads on wp.org', 'advanced-ads' ); ?></a></li>
52
- <li><a href="http://webgilde.com" title="<?php _e( 'the company behind Advanced Ads', 'advanced-ads' ); ?>"><?php echo 'webgilde GmbH'; ?></a></li>
53
- </ul>
54
 
55
- </div>
56
- <script>
57
- // menu tabs
58
- jQuery( '#advads-tabs' ).find( 'a' ).click(function () {
59
- jQuery( '#advads-tabs' ).find( 'a' ).removeClass( 'nav-tab-active' );
60
- jQuery( '.advads-tab' ).removeClass( 'active' );
61
-
62
- var id = jQuery( this ).attr( 'id' ).replace( '-tab', '' );
63
- jQuery( '#' + id ).addClass( 'active' );
64
- jQuery( this ).addClass( 'nav-tab-active' );
65
- });
66
 
67
- // activate specific or first tab
68
-
69
- var active_tab = window.location.hash.replace( '#top#', '' );
70
- if (active_tab == '' || active_tab == '#_=_') {
71
- active_tab = jQuery( '.advads-tab' ).attr( 'id' );
72
- }
73
- jQuery( '#' + active_tab ).addClass( 'active' );
74
- jQuery( '#' + active_tab + '-tab' ).addClass( 'nav-tab-active' );
75
- jQuery( '.nav-tab-active' ).click();
76
- // set all tab urls
77
- advads_set_tab_hashes();
78
- </script>
2
  /**
3
  * the view for the settings page
4
  */
5
+ ?>
6
 
7
+ <div class="wrap">
8
+ <?php screen_icon(); ?>
9
+ <h1><?php echo esc_html(get_admin_page_title()); ?></h1>
10
+ <form method="POST" action="options.php">
11
+ <?php
12
+ /**
13
+ * only display setting field if any registered
14
+ * @TODO remove when base plugin has its own settings
15
+ */
16
+ global $wp_settings_fields;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
+ if(isset($wp_settings_fields['advanced_ads_page_advanced-ads-settings'])){
19
+ settings_fields($this->plugin_screen_hook_suffix);
20
+ do_settings_sections( $this->plugin_screen_hook_suffix);
 
 
 
 
 
 
 
 
 
 
21
 
22
+ do_action('advanced-ads-settings-form');
23
+ submit_button();
24
+ } else {
25
+ echo '<p>'.__('No settings available yet', $this->plugin_slug).'</p>';
26
+ }
 
27
 
28
+ ?>
29
+ </form>
30
+ <hr/>
31
+ <ul>
32
+ <li><a href="/wp-admin/edit.php?post_type=advanced_ads&page=advanced-ads-debug"><?php _e('Debug Page', $this->plugin_slug); ?></a></li>
33
+ <li><a href="http://wordpress.org/plugins/advanced-ads/" title="<?php _e('Advanced Ads on WordPress.org', $this->plugin_slug); ?>"><?php _e('Advanced Ads on wp.org', $this->plugin_slug); ?></a></li>
34
+ <li><a href="http://webgilde.com" title="<?php _e('the company behind Advanced Ads', $this->plugin_slug); ?>"><?php _e('webgilde GmbH', $this->plugin_slug); ?></a></li>
35
+ </ul>
 
 
 
36
 
37
+ </div>
 
 
 
 
 
 
 
 
 
 
 
admin/views/support.php DELETED
@@ -1,86 +0,0 @@
1
- <?php
2
- /**
3
- * the view for the support page
4
- */
5
- ?><div class="wrap">
6
- <?php screen_icon(); ?>
7
- <h1><?php echo esc_html( get_admin_page_title() ); ?></h1>
8
- <h2>1. <?php _e( 'Possible Issues', 'advanced-ads' ); ?></h2>
9
- <p><?php _e( 'Please fix the red highlighted issues on this page or try to understand their consequences before contacting support.', 'advanced-ads' ); ?></p>
10
-
11
- <?php $messages = array();
12
- if( ! Advanced_Ads_Checks::php_version_minimum() ) :
13
- $messages[] = sprintf(__( 'Your <strong>PHP version (%s) is too low</strong>. Advanced Ads is built for PHP 5.3 and higher. It might work, but updating PHP is highly recommended. Please ask your hosting provider for more information.', 'advanced-ads' ), phpversion() );
14
- endif;
15
- if( Advanced_Ads_Checks::cache() && ! defined( 'AAP_VERSION' ) ) :
16
- $messages[] = sprintf(__( 'Your <strong>website uses cache</strong>. Some dynamic features like ad rotation or visitor conditions might not work properly. Use the cache-busting feature of <a href="%s" target="_blank">Advanced Ads Pro</a> to load ads dynamically.', 'advanced-ads' ), ADVADS_URL . 'add-ons/advanced-ads-pro/#utm_source=advanced-ads&utm_medium=link&utm_campaign=support' );
17
- endif;
18
- if( Advanced_Ads_Checks::wp_update_available() ) :
19
- $messages[] = __( 'There is a <strong>new WordPress version available</strong>. Please update.', 'advanced-ads' );
20
- endif;
21
- if( Advanced_Ads_Checks::plugin_updates_available() ) :
22
- $messages[] = __( 'There are <strong>plugin updates available</strong>. Please update.', 'advanced-ads' );
23
- endif;
24
- /* if( Advanced_Ads_Checks::licenses_invalid() ) :
25
- $messages[] = sprintf( __( 'One or more license keys for <strong>Advanced Ads add-ons are invalid or missing</strong>. Please add valid license keys <a href="%s">here</a>.', 'advanced-ads' ), admin_url( 'admin.php?page=advanced-ads-settings#top#licenses' ) );
26
- endif;
27
- if( Advanced_Ads_Checks::licenses_expired() ) :
28
- $messages[] = sprintf( __( '<strong>Advanced Ads</strong> license(s) expired. Support and updates are disabled. Please visit <a href="%s"> the license page</a> for more information.', 'advanced-ads' ), admin_url( 'admin.php?page=advanced-ads-settings#top#licenses' ) );
29
- endif;*/
30
- if( Advanced_Ads_Checks::active_autoptimize() && ! defined( 'AAP_VERSION' ) ) :
31
- $messages[] = sprintf(__( '<strong>Autoptimize plugin detected</strong>. While this plugin is great for site performance, it is known to alter code, including scripts from ad networks. <a href="%s" target="_blank">Advanced Ads Pro</a> has a build-in support for Autoptimize.', 'advanced-ads' ), ADVADS_URL . 'add-ons/advanced-ads-pro/#utm_source=advanced-ads&utm_medium=link&utm_campaign=support');
32
- endif;
33
- if( count( Advanced_Ads_Checks::conflicting_plugins() ) ) :
34
- $messages[] = sprintf(__( 'Plugins that are known to cause (partial) problems: <strong>%1$s</strong>. <a href="%2$s" target="_blank">Learn more</a>.', 'advanced-ads' ), implode( ', ', Advanced_Ads_Checks::conflicting_plugins() ), ADVADS_URL . 'manual/known-plugin-conflicts/#utm_source=advanced-ads&utm_medium=link&utm_campaign=support');
35
- endif;
36
- $options = Advanced_Ads::get_instance()->options();
37
- if( isset( $options['disabled-ads']) ){
38
- $messages[] = sprintf(__( 'Ads are disabled for all or some pages. See "disabled ads" in <a href="%s">settings</a>.', 'advanced-ads' ), admin_url('admin.php?page=advanced-ads-settings#top#general') );
39
- }
40
- Advanced_Ads_Checks::jquery_ui_conflict();
41
-
42
- $messages = apply_filters( 'advanced-ads-support-messages', $messages );
43
-
44
- if( count( $messages )) :
45
- foreach( $messages as $_message ) :
46
- ?><div class="message error"><p><?php echo $_message; ?></p></div><?php
47
- endforeach;
48
- endif; ?>
49
- <h2>2. <?php _e( 'Search', 'advanced-ads' ); ?></h2>
50
- <p><?php _e( 'Use the following form to search for solutions in the manual on wpadvancedads.com', 'advanced-ads' ); ?></p>
51
- <form action="https://wpadvancedads.com/" method="get">
52
- <input type="search" name="s"/>
53
- <input type="submit" value="<?php _e( 'search', 'advanced-ads' ); ?>">
54
- </form>
55
- <h2>3. <?php _e( 'Contact', 'advanced-ads' ); ?></h2>
56
- <p><?php printf(__( 'Please search the manual for a solution and take a look at <a href="%s" target="_blank">Ads not showing up?</a> before contacting me for help.', 'advanced-ads' ), ADVADS_URL . 'manual/ads-not-showing-up/#utm_source=advanced-ads&utm_medium=link&utm_campaign=support' ); ?></p>
57
- <?php if( isset( $_POST['advads_support']['email'] ) && array() === $sent_errors ) : ?>
58
- <p class="advads-success-message"><?php _e( 'Email was successfully sent.', 'advanced-ads' ); ?></p>
59
- <?php else : ?>
60
- <?php if( isset( $_POST['advads_support']['email'] ) && count( $sent_errors ) ) : ?>
61
- <p class="advads-error-message"><?php echo implode( $sent_errors, '</p><p class="advads-error-message">' ); ?></p>
62
- <?php endif; ?>
63
- <form action="" method="post">
64
- <table class="form-table advads-support-form">
65
- <tbody>
66
- <tr>
67
- <th scope="row"><label for="advads-support-email"><?php _e( 'your email', 'advanced-ads' ); ?></label></th>
68
- <td scope="row"><input id="advads-support-email" class="regular-text" type="email" name="advads_support[email]" value="<?php echo $email; ?>"/></td>
69
- </tr>
70
- <tr>
71
- <th scope="row"><label for="advads-support-name"><?php _e( 'your name', 'advanced-ads' ); ?></label></th>
72
- <td scope="row"><input type="text" class="regular-text" name="advads_support[name]" value="<?php echo $name; ?>"/></td>
73
- </tr>
74
- <tr>
75
- <th scope="row"><label for="advads-support-text"><?php _e( 'your message', 'advanced-ads' ); ?></label></th>
76
- <td scope="row"><textarea name="advads_support[message]"><?php echo $message; ?></textarea></td>
77
- </tr>
78
- <tr>
79
- <td></td>
80
- <td><input type="submit" class="button button-primary" value="<?php _e( 'send', 'advanced-ads' ); ?>"></td>
81
- </tr>
82
- </tbody>
83
- </table>
84
- </form>
85
- <?php endif; ?>
86
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
advanced-ads.php CHANGED
@@ -2,23 +2,23 @@
2
  /**
3
  * Advanced Ads.
4
  *
5
- * @package Advanced_Ads
6
  * @author Thomas Maier <thomas.maier@webgilde.com>
7
  * @license GPL-2.0+
8
  * @link http://webgilde.com
9
- * @copyright 2013-2015 Thomas Maier, webgilde GmbH
10
  *
11
  * @wordpress-plugin
12
  * Plugin Name: Advanced Ads
13
- * Plugin URI: https://wpadvancedads.com
14
  * Description: Manage and optimize your ads in WordPress
15
- * Version: 1.7.8
16
  * Author: Thomas Maier
17
  * Author URI: http://webgilde.com
18
  * Text Domain: advanced-ads
19
- * Domain Path: /languages
20
  * License: GPL-2.0+
21
  * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
 
22
  */
23
 
24
  // If this file is called directly, abort.
@@ -27,42 +27,52 @@ if ( ! defined( 'WPINC' ) ) {
27
  }
28
 
29
  // only load if not already existing (maybe included from another plugin)
30
- if ( defined( 'ADVADS_BASE_PATH' ) ) {
31
- return ;
32
  }
33
 
34
  // load basic path to the plugin
35
- define( 'ADVADS_BASE', plugin_basename( __FILE__ ) ); // plugin base as used by WordPress to identify it
36
- define( 'ADVADS_BASE_PATH', plugin_dir_path( __FILE__ ) );
37
- define( 'ADVADS_BASE_URL', plugin_dir_url( __FILE__ ) );
38
- define( 'ADVADS_BASE_DIR', dirname( ADVADS_BASE ) ); // directory of the plugin without any paths
39
- // general and global slug, e.g. to store options in WP, textdomain
40
- define( 'ADVADS_SLUG', 'advanced-ads' );
41
- define( 'ADVADS_URL', 'https://wpadvancedads.com/' );
42
- define( 'ADVADS_VERSION', '1.7.8' );
43
 
44
  /*----------------------------------------------------------------------------*
45
- * Autoloading, modules and functions
46
  *----------------------------------------------------------------------------*/
47
-
48
- // load public functions (might be used by modules, other plugins or theme)
49
- require_once ADVADS_BASE_PATH . 'includes/functions.php';
50
- require_once ADVADS_BASE_PATH . 'includes/load_modules.php';
51
- require_once ADVADS_BASE_PATH . 'includes/cap_map.php';
52
-
53
- Advanced_Ads_ModuleLoader::getLoader(); // enable autoloading
54
 
55
  /*----------------------------------------------------------------------------*
56
- * Public-Facing and Core Functionality
57
  *----------------------------------------------------------------------------*/
58
 
59
- Advanced_Ads::get_instance();
60
- Advanced_Ads_ModuleLoader::loadModules( ADVADS_BASE_PATH . 'modules/' ); // enable modules, requires base class
 
 
 
 
 
 
 
61
 
62
  /*----------------------------------------------------------------------------*
63
  * Dashboard and Administrative Functionality
64
  *----------------------------------------------------------------------------*/
65
 
66
- if ( is_admin() ) {
67
- Advanced_Ads_Admin::get_instance();
68
  }
 
 
 
 
 
 
 
 
 
 
2
  /**
3
  * Advanced Ads.
4
  *
5
+ * @package Advanced_Ads_Admin
6
  * @author Thomas Maier <thomas.maier@webgilde.com>
7
  * @license GPL-2.0+
8
  * @link http://webgilde.com
9
+ * @copyright 2013-2014 Thomas Maier, webgilde GmbH
10
  *
11
  * @wordpress-plugin
12
  * Plugin Name: Advanced Ads
13
+ * Plugin URI: http://wpadvancedads.com
14
  * Description: Manage and optimize your ads in WordPress
15
+ * Version: 1.0.2
16
  * Author: Thomas Maier
17
  * Author URI: http://webgilde.com
18
  * Text Domain: advanced-ads
 
19
  * License: GPL-2.0+
20
  * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
21
+ * Domain Path: /languages
22
  */
23
 
24
  // If this file is called directly, abort.
27
  }
28
 
29
  // only load if not already existing (maybe included from another plugin)
30
+ if( defined('ADVADS_BASE_PATH') ) {
31
+ return ;
32
  }
33
 
34
  // load basic path to the plugin
35
+ define('ADVADS_BASE_PATH', plugin_dir_path(__FILE__));
36
+ // general and global slug, e.g. to store options in WP
37
+ define('ADVADS_SLUG', 'advancedads');
 
 
 
 
 
38
 
39
  /*----------------------------------------------------------------------------*
40
+ * Autoloading Objects
41
  *----------------------------------------------------------------------------*/
42
+ if (!class_exists('Advanced_Ads', true)) {
43
+ require_once( plugin_dir_path( __FILE__ ) . 'includes/autoloader.php' );
44
+ require_once( plugin_dir_path( __FILE__ ) . 'public/class-advanced-ads.php' );
45
+ spl_autoload_register(array('Advads_Autoloader', 'load'));
46
+ }
 
 
47
 
48
  /*----------------------------------------------------------------------------*
49
+ * Public-Facing Functionality
50
  *----------------------------------------------------------------------------*/
51
 
52
+ /*
53
+ * Register hooks that are fired when the plugin is activated or deactivated.
54
+ * When the plugin is deleted, the uninstall.php file is loaded.
55
+ *
56
+ */
57
+ register_activation_hook( __FILE__, array( 'Advanced_Ads', 'activate' ) );
58
+ register_deactivation_hook( __FILE__, array( 'Advanced_Ads', 'deactivate' ) );
59
+
60
+ add_action( 'plugins_loaded', array( 'Advanced_Ads', 'get_instance' ) );
61
 
62
  /*----------------------------------------------------------------------------*
63
  * Dashboard and Administrative Functionality
64
  *----------------------------------------------------------------------------*/
65
 
66
+ if( defined('DOING_AJAX') ) {
67
+ new Advads_Ad_Ajax_Callbacks;
68
  }
69
+ // load ad conditions array
70
+ require_once( plugin_dir_path( __FILE__ ) . 'includes/array_ad_conditions.php' );
71
+
72
+ if ( is_admin() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) {
73
+ require_once( plugin_dir_path( __FILE__ ) . 'admin/class-advanced-ads-admin.php' );
74
+ add_action( 'plugins_loaded', array( 'Advanced_Ads_Admin', 'get_instance' ) );
75
+ }
76
+
77
+ // load public functions
78
+ require_once( plugin_dir_path( __FILE__ ) . 'public/functions.php' );
assets/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden
assets/screenshot-1.png ADDED
Binary file
assets/screenshot-2.png ADDED
Binary file
classes/EDD_SL_Plugin_Updater.php DELETED
@@ -1,378 +0,0 @@
1
- <?php
2
-
3
- // uncomment this line for testing
4
- //set_site_transient( 'update_plugins', null );
5
-
6
- // Exit if accessed directly
7
- if ( ! defined( 'ABSPATH' ) ) exit;
8
-
9
- /**
10
- * Allows plugins to use their own update API.
11
- *
12
- * @author Pippin Williamson
13
- * @version 1.6.3
14
- */
15
- class EDD_SL_Plugin_Updater {
16
- private $api_url = '';
17
- private $api_data = array();
18
- private $name = '';
19
- private $slug = '';
20
- private $version = '';
21
-
22
- /**
23
- * Class constructor.
24
- *
25
- * @uses plugin_basename()
26
- * @uses hook()
27
- *
28
- * @param string $_api_url The URL pointing to the custom API endpoint.
29
- * @param string $_plugin_file Path to the plugin file.
30
- * @param array $_api_data Optional data to send with API calls.
31
- */
32
- public function __construct( $_api_url, $_plugin_file, $_api_data = null ) {
33
-
34
- global $edd_plugin_data;
35
-
36
- $this->api_url = trailingslashit( $_api_url );
37
- $this->api_data = $_api_data;
38
- $this->name = plugin_basename( $_plugin_file );
39
- $this->slug = basename( $_plugin_file, '.php' );
40
- $this->version = $_api_data['version'];
41
-
42
- $edd_plugin_data[ $this->slug ] = $this->api_data;
43
-
44
- // Set up hooks.
45
- $this->init();
46
-
47
- }
48
-
49
- /**
50
- * Set up WordPress filters to hook into WP's update process.
51
- *
52
- * @uses add_filter()
53
- *
54
- * @return void
55
- */
56
- public function init() {
57
-
58
- add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) );
59
- add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
60
- remove_action( 'after_plugin_row_' . $this->name, 'wp_plugin_update_row', 10, 2 );
61
- add_action( 'after_plugin_row_' . $this->name, array( $this, 'show_update_notification' ), 10, 2 );
62
- add_action( 'admin_init', array( $this, 'show_changelog' ) );
63
-
64
- }
65
-
66
- /**
67
- * Check for Updates at the defined API endpoint and modify the update array.
68
- *
69
- * This function dives into the update API just when WordPress creates its update array,
70
- * then adds a custom API call and injects the custom plugin data retrieved from the API.
71
- * It is reassembled from parts of the native WordPress plugin update code.
72
- * See wp-includes/update.php line 121 for the original wp_update_plugins() function.
73
- *
74
- * @uses api_request()
75
- *
76
- * @param array $_transient_data Update array build by WordPress.
77
- * @return array Modified update array with custom plugin data.
78
- */
79
- public function check_update( $_transient_data ) {
80
-
81
- global $pagenow;
82
-
83
- if( ! is_object( $_transient_data ) ) {
84
- $_transient_data = new stdClass;
85
- }
86
-
87
- if( 'plugins.php' == $pagenow && is_multisite() ) {
88
- return $_transient_data;
89
- }
90
-
91
- if ( empty( $_transient_data->response ) || empty( $_transient_data->response[ $this->name ] ) ) {
92
-
93
- $version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug ) );
94
-
95
- if ( false !== $version_info && is_object( $version_info ) && isset( $version_info->new_version ) ) {
96
-
97
- if( version_compare( $this->version, $version_info->new_version, '<' ) ) {
98
-
99
- $_transient_data->response[ $this->name ] = $version_info;
100
-
101
- }
102
-
103
- $_transient_data->last_checked = time();
104
- $_transient_data->checked[ $this->name ] = $this->version;
105
-
106
- }
107
-
108
- }
109
-
110
- return $_transient_data;
111
- }
112
-
113
- /**
114
- * show update nofication row -- needed for multisite subsites, because WP won't tell you otherwise!
115
- *
116
- * @param string $file
117
- * @param array $plugin
118
- */
119
- public function show_update_notification( $file, $plugin ) {
120
-
121
- if( ! current_user_can( 'update_plugins' ) ) {
122
- return;
123
- }
124
-
125
- if( ! is_multisite() ) {
126
- return;
127
- }
128
-
129
- if ( $this->name != $file ) {
130
- return;
131
- }
132
-
133
- // Remove our filter on the site transient
134
- remove_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ), 10 );
135
-
136
- $update_cache = get_site_transient( 'update_plugins' );
137
-
138
- $update_cache = is_object( $update_cache ) ? $update_cache : new stdClass();
139
-
140
- if ( empty( $update_cache->response ) || empty( $update_cache->response[ $this->name ] ) ) {
141
-
142
- $cache_key = md5( 'edd_plugin_' . sanitize_key( $this->name ) . '_version_info' );
143
- $version_info = get_transient( $cache_key );
144
-
145
- if( false === $version_info ) {
146
-
147
- $version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug ) );
148
-
149
- set_transient( $cache_key, $version_info, 3600 );
150
- }
151
-
152
- if( ! is_object( $version_info ) ) {
153
- return;
154
- }
155
-
156
- if( version_compare( $this->version, $version_info->new_version, '<' ) ) {
157
-
158
- $update_cache->response[ $this->name ] = $version_info;
159
-
160
- }
161
-
162
- $update_cache->last_checked = time();
163
- $update_cache->checked[ $this->name ] = $this->version;
164
-
165
- set_site_transient( 'update_plugins', $update_cache );
166
-
167
- } else {
168
-
169
- $version_info = $update_cache->response[ $this->name ];
170
-
171
- }
172
-
173
- // Restore our filter
174
- add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) );
175
-
176
- if ( ! empty( $update_cache->response[ $this->name ] ) && version_compare( $this->version, $version_info->new_version, '<' ) ) {
177
-
178
- // build a plugin list row, with update notification
179
- $wp_list_table = _get_list_table( 'WP_Plugins_List_Table' );
180
- echo '<tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message">';
181
-
182
- $changelog_link = self_admin_url( 'index.php?edd_sl_action=view_plugin_changelog&plugin=' . $this->name . '&slug=' . $this->slug . '&TB_iframe=true&width=772&height=911' );
183
-
184
- if ( empty( $version_info->download_link ) ) {
185
- printf(
186
- __( 'There is a new version of %1$s available. %2$sView version %3$s details%4$s.', 'advanced-ads' ),
187
- esc_html( $version_info->name ),
188
- '<a target="_blank" class="thickbox" href="' . esc_url( $changelog_link ) . '">',
189
- esc_html( $version_info->new_version ),
190
- '</a>'
191
- );
192
- } else {
193
- printf(
194
- __( 'There is a new version of %1$s available. %2$sView version %3$s details%4$s or %5$supdate now%6$s.', 'advanced-ads' ),
195
- esc_html( $version_info->name ),
196
- '<a target="_blank" class="thickbox" href="' . esc_url( $changelog_link ) . '">',
197
- esc_html( $version_info->new_version ),
198
- '</a>',
199
- '<a href="' . esc_url( wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $this->name, 'upgrade-plugin_' . $this->name ) ) .'">',
200
- '</a>'
201
- );
202
- }
203
-
204
- do_action( "in_plugin_update_message-{$file}", $plugin, $version_info );
205
-
206
- echo '</div></td></tr>';
207
- }
208
- }
209
-
210
-
211
- /**
212
- * Updates information on the "View version x.x details" page with custom data.
213
- *
214
- * @uses api_request()
215
- *
216
- * @param mixed $_data
217
- * @param string $_action
218
- * @param object $_args
219
- * @return object $_data
220
- */
221
- public function plugins_api_filter( $_data, $_action = '', $_args = null ) {
222
-
223
-
224
- if ( $_action != 'plugin_information' ) {
225
-
226
- return $_data;
227
-
228
- }
229
-
230
- if ( ! isset( $_args->slug ) || ( $_args->slug != $this->slug ) ) {
231
-
232
- return $_data;
233
-
234
- }
235
-
236
- $to_send = array(
237
- 'slug' => $this->slug,
238
- 'is_ssl' => is_ssl(),
239
- 'fields' => array(
240
- 'banners' => false, // These will be supported soon hopefully
241
- 'reviews' => false
242
- )
243
- );
244
-
245
- $api_response = $this->api_request( 'plugin_information', $to_send );
246
-
247
- if ( false !== $api_response ) {
248
- $_data = $api_response;
249
- }
250
-
251
- return $_data;
252
- }
253
-
254
-
255
- /**
256
- * Disable SSL verification in order to prevent download update failures
257
- *
258
- * @param array $args
259
- * @param string $url
260
- * @return object $array
261
- */
262
- public function http_request_args( $args, $url ) {
263
- // If it is an https request and we are performing a package download, disable ssl verification
264
- if ( strpos( $url, 'https://' ) !== false && strpos( $url, 'edd_action=package_download' ) ) {
265
- $args['sslverify'] = false;
266
- }
267
- return $args;
268
- }
269
-
270
- /**
271
- * Calls the API and, if successfull, returns the object delivered by the API.
272
- *
273
- * @uses get_bloginfo()
274
- * @uses wp_remote_post()
275
- * @uses is_wp_error()
276
- *
277
- * @param string $_action The requested action.
278
- * @param array $_data Parameters for the API action.
279
- * @return false|object
280
- */
281
- private function api_request( $_action, $_data ) {
282
-
283
- global $wp_version;
284
-
285
- $data = array_merge( $this->api_data, $_data );
286
-
287
- if ( $data['slug'] != $this->slug ) {
288
- return;
289
- }
290
-
291
- if( $this->api_url == home_url() ) {
292
- return false; // Don't allow a plugin to ping itself
293
- }
294
-
295
- $api_params = array(
296
- 'edd_action' => 'get_version',
297
- 'license' => ! empty( $data['license'] ) ? $data['license'] : '',
298
- 'item_name' => isset( $data['item_name'] ) ? $data['item_name'] : false,
299
- 'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false,
300
- 'slug' => $data['slug'],
301
- 'author' => $data['author'],
302
- 'url' => home_url()
303
- );
304
-
305
- $request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
306
-
307
- if ( ! is_wp_error( $request ) ) {
308
- $request = json_decode( wp_remote_retrieve_body( $request ) );
309
- }
310
-
311
- if ( $request && isset( $request->sections ) ) {
312
- $request->sections = maybe_unserialize( $request->sections );
313
- } else {
314
- $request = false;
315
- }
316
-
317
- return $request;
318
- }
319
-
320
- public function show_changelog() {
321
-
322
- global $edd_plugin_data;
323
-
324
- if( empty( $_REQUEST['edd_sl_action'] ) || 'view_plugin_changelog' != $_REQUEST['edd_sl_action'] ) {
325
- return;
326
- }
327
-
328
- if( empty( $_REQUEST['plugin'] ) ) {
329
- return;
330
- }
331
-
332
- if( empty( $_REQUEST['slug'] ) ) {
333
- return;
334
- }
335
-
336
- if( ! current_user_can( 'update_plugins' ) ) {
337
- wp_die( __( 'You do not have permission to install plugin updates', 'easy-digital-downloads' ), __( 'Error', 'easy-digital-downloads' ), array( 'response' => 403 ) );
338
- }
339
-
340
- $data = $edd_plugin_data[ $_REQUEST['slug'] ];
341
- $cache_key = md5( 'edd_plugin_' . sanitize_key( $_REQUEST['plugin'] ) . '_version_info' );
342
- $version_info = get_transient( $cache_key );
343
-
344
- if( false === $version_info ) {
345
-
346
- $api_params = array(
347
- 'edd_action' => 'get_version',
348
- 'item_name' => isset( $data['item_name'] ) ? $data['item_name'] : false,
349
- 'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false,
350
- 'slug' => $_REQUEST['slug'],
351
- 'author' => $data['author'],
352
- 'url' => home_url()
353
- );
354
-
355
- $request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
356
-
357
- if ( ! is_wp_error( $request ) ) {
358
- $version_info = json_decode( wp_remote_retrieve_body( $request ) );
359
- }
360
-
361
- if ( ! empty( $version_info ) && isset( $version_info->sections ) ) {
362
- $version_info->sections = maybe_unserialize( $version_info->sections );
363
- } else {
364
- $version_info = false;
365
- }
366
-
367
- set_transient( $cache_key, $version_info, 3600 );
368
-
369
- }
370
-
371
- if( ! empty( $version_info ) && isset( $version_info->sections['changelog'] ) ) {
372
- echo '<div style="background:#fff;padding:10px;">' . $version_info->sections['changelog'] . '</div>';
373
- }
374
-
375
- exit;
376
- }
377
-
378
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/ad-ajax.php DELETED
@@ -1,95 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Provide public ajax interface.
5
- *
6
- * @since 1.5.0
7
- */
8
- class Advanced_Ads_Ajax {
9
-
10
- private function __construct()
11
- {
12
- add_action( 'wp_ajax_advads_ad_select', array( $this, 'advads_ajax_ad_select' ) );
13
- add_action( 'wp_ajax_nopriv_advads_ad_select', array( $this, 'advads_ajax_ad_select' ) );
14
- }
15
-
16
- private static $instance;
17
-
18
- public static function get_instance()
19
- {
20
- if ( ! isset(self::$instance) ) {
21
- self::$instance = new self;
22
- }
23
-
24
- return self::$instance;
25
- }
26
-
27
- /**
28
- * Simple wp ajax interface for ad selection.
29
- */
30
- public function advads_ajax_ad_select() {
31
- // set proper header
32
- header( 'Content-Type: application/json; charset: utf-8' );
33
-
34
- // allow modules / add ons to test (this is rather late but should happen before anything important is called)
35
- do_action( 'advanced-ads-ajax-ad-select-init' );
36
-
37
- $adIds = isset( $_REQUEST['ad_ids'] ) ? $_REQUEST['ad_ids'] : null;
38
- if ( is_string( $adIds ) ) {
39
- $adIds = json_decode( $adIds, true );
40
- }
41
- if (is_array($adIds)) { // ads loaded previously and passed by query
42
- Advanced_Ads::get_instance()->current_ads += $adIds;
43
- }
44
-
45
- $deferedAds = isset( $_REQUEST['deferedAds'] ) ? $_REQUEST['deferedAds'] : null;
46
- if ( $deferedAds ) { // load all ajax ads with a single request
47
- $response = array();
48
-
49
- foreach ( (array) $deferedAds as $request ) {
50
- $result = $this->select_one( $request );
51
- $result['elementId'] = ! empty( $request['elementId'] ) ? $request['elementId'] : null;
52
- $response[] = $result;
53
- }
54
- echo json_encode( $response );
55
- die();
56
- }
57
-
58
- $response = $this->select_one( $_REQUEST );
59
- echo json_encode( $response );
60
- die();
61
- }
62
-
63
- /**
64
- * Provides a single ad (ad, group, placement) given ID and selection method.
65
- *
66
- * @param $request array
67
- */
68
- private function select_one( $request ) {
69
- // init handlers
70
- $selector = Advanced_Ads_Select::get_instance();
71
- $methods = $selector->get_methods();
72
- $method = isset( $request['ad_method'] ) ? (string) $request['ad_method'] : null;
73
- $id = isset( $request['ad_id'] ) ? (string) $request['ad_id'] : null;
74
- $arguments = isset( $request['ad_args'] ) ? $request['ad_args'] : array();
75
- if (is_string($arguments)) {
76
- $arguments = stripslashes($arguments);
77
- $arguments = json_decode($arguments, true);
78
- }
79
-
80
- $response = array();
81
- if ( isset( $methods[ $method ] ) && isset( $id ) ) {
82
- $advads = Advanced_Ads::get_instance();
83
- $l = count( $advads->current_ads );
84
-
85
- // build content
86
- $content = $selector->get_ad_by_method( $id, $method, $arguments );
87
- $adIds = array_slice( $advads->current_ads, $l ); // ads loaded by this request
88
-
89
- return array( 'status' => 'success', 'item' => $content, 'id' => $id, 'method' => $method, 'ads' => $adIds );
90
- } else {
91
- // report error
92
- return array( 'status' => 'error', 'message' => 'No valid ID or METHOD found.' );
93
- }
94
- }
95
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/ad-model.php DELETED
@@ -1,131 +0,0 @@
1
- <?php
2
-
3
- class Advanced_Ads_Model {
4
-
5
- /**
6
- * Cache group for WP Object Cache
7
- *
8
- * @var string
9
- */
10
- const OBJECT_CACHE_GROUP = 'advanced-ads';
11
-
12
- /**
13
- * Default time-to-live for WP Object Cache
14
- *
15
- * @var string
16
- */
17
- const OBJECT_CACHE_TTL = 720; // 12 Minutes
18
-
19
- /**
20
- *
21
- * @var wpdb
22
- */
23
- protected $db;
24
-
25
- /**
26
- *
27
- * @var array
28
- */
29
- protected $ad_conditions;
30
-
31
- /**
32
- *
33
- * @var array
34
- */
35
- protected $ad_placements;
36
-
37
- public function __construct(wpdb $wpdb)
38
- {
39
- $this->db = $wpdb;
40
- }
41
-
42
- /**
43
- *
44
- * @return array
45
- */
46
- public function get_ad_conditions()
47
- {
48
- if ( ! isset(self::$ad_conditions) ) {
49
- $this->ad_conditions = include ADVADS_BASE_PATH . 'includes/array_ad_conditions.php';
50
- }
51
-
52
- return $this->ad_conditions;
53
- }
54
-
55
- /**
56
- * Get all blog ids of blogs in the current network that are:
57
- * - not archived
58
- * - not spam
59
- * - not deleted
60
- *
61
- * @since 1.0.0
62
- * @return array|false The blog ids, false if no matches.
63
- */
64
- public function get_blog_ids() {
65
- // get an array of blog ids
66
- $sql = "SELECT blog_id FROM $this->db->blogs WHERE archived = '0' AND spam = '0' AND deleted = '0'";
67
-
68
- return $this->db->get_col( $sql );
69
- }
70
-
71
- /**
72
- * load all ads based on WP_Query conditions
73
- *
74
- * @since 1.1.0
75
- * @param arr $args WP_Query arguments that are more specific that default
76
- * @return arr $ads array with post objects
77
- */
78
- public function get_ads($args = array()){
79
- // add default WP_Query arguments
80
- $args['post_type'] = Advanced_Ads::POST_TYPE_SLUG;
81
- $args['posts_per_page'] = -1;
82
- if ( empty($args['post_status']) ) { $args['post_status'] = array( 'publish', 'future' ); }
83
- $ads = new WP_Query( $args );
84
-
85
- return $ads->posts;
86
- }
87
-
88
- /**
89
- * load all ad groups
90
- *
91
- * @since 1.1.0
92
- * @param arr $args array with options
93
- * @return arr $groups array with ad groups
94
- * @link http://codex.wordpress.org/Function_Reference/get_terms
95
- */
96
- public function get_ad_groups($args = array()){
97
- $args['hide_empty'] = isset($args['hide_empty']) ? $args['hide_empty'] : false; // display groups without any ads
98
-
99
- return get_terms( Advanced_Ads::AD_GROUP_TAXONOMY, $args );
100
- }
101
-
102
- /**
103
- * get the array with ad placements
104
- *
105
- * @since 1.1.0
106
- * @return arr $ad_placements
107
- */
108
- public function get_ad_placements_array(){
109
-
110
- if ( ! isset( $this->ad_placements ) ) {
111
- $this->ad_placements = get_option( 'advads-ads-placements', array() );
112
-
113
- // load default array if not saved yet
114
- if ( ! is_array( $this->ad_placements ) ){
115
- $this->ad_placements = array();
116
- }
117
- }
118
-
119
- return $this->ad_placements;
120
- }
121
-
122
- /**
123
- * update the array with ad placements
124
- *
125
- * @param arr $ad_placements
126
- */
127
- public function update_ad_placements_array( $ad_placements ) {
128
- update_option( 'advads-ads-placements', $ad_placements );
129
- $this->ad_placements = $ad_placements;
130
- }
131
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/ad-select.php DELETED
@@ -1,165 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Abstracts ad selection.
5
- *
6
- * The class allows to modify 'methods' (named callbacks) to provide ads
7
- * through `advanced-ads-ad-select-methods` filter.
8
- * This can be used to replace default methods, wrap them or add new ones.
9
- *
10
- * Further allows to provide ad selection attributes
11
- * through `advanced-ads-ad-select-args` filter to influence behaviour of the
12
- * selection method.
13
- * Default methods have a `override` attribute that allows to replace the
14
- * content. This may be used to defer or skip ad codes dynamically.
15
- *
16
- * @since 1.5.0
17
- */
18
- class Advanced_Ads_Select {
19
-
20
- const PLACEMENT = 'placement';
21
- const GROUP = 'group';
22
- const AD = 'id'; // alias of self::ID
23
- const ID = 'id';
24
-
25
- protected $methods;
26
-
27
- private function __construct() {}
28
-
29
- /**
30
- *
31
- * @var Advanced_Ads_Select
32
- */
33
- private static $instance;
34
-
35
- /**
36
- *
37
- * @return Advanced_Ads_Select
38
- */
39
- public static function get_instance()
40
- {
41
- if ( ! isset(self::$instance) ) {
42
- self::$instance = new self;
43
- }
44
-
45
- return self::$instance;
46
- }
47
-
48
- /**
49
- *
50
- * @return array
51
- */
52
- public function get_methods()
53
- {
54
- if ( ! isset($this->methods) ) {
55
- $methods = array(
56
- self::AD => array( $this, 'get_ad_by_id' ),
57
- self::GROUP => array( $this, 'get_ad_by_group' ),
58
- self::PLACEMENT => array( $this, 'get_ad_by_placement' ),
59
- );
60
-
61
- $this->methods = apply_filters( 'advanced-ads-ad-select-methods', $methods );
62
- }
63
-
64
- return $this->methods;
65
- }
66
-
67
- /**
68
- * Advanced ad selection methods should not directly rely on
69
- * current environment factors.
70
- * Prior to actual ad selection the meta is provided to allow for
71
- * serialised, proxied or otherwise defered selection workflows.
72
- *
73
- * @return array
74
- */
75
- public function get_ad_arguments( $method, $id, $args = array() )
76
- {
77
- $args = (array) $args;
78
-
79
- $args['previous_method'] = isset( $args['method'] ) ? $args['method'] : null;
80
- $args['previous_id'] = isset( $args['id'] ) ? $args['id'] : null;
81
-
82
- if ( $id || ! isset( $args['id'] ) ) $args['id'] = $id;
83
- $args['method'] = $method;
84
-
85
- $args = apply_filters( 'advanced-ads-ad-select-args', $args, $method, $id );
86
-
87
- return $args;
88
- }
89
-
90
- public function get_ad_by_method( $id, $method, $args = array() ) {
91
-
92
- $methods = $this->get_methods();
93
- if ( ! isset($methods[ $method ]) ) {
94
- return ;
95
- }
96
- if ( ! advads_can_display_ads() ) {
97
- return ;
98
- }
99
- $args = $this->get_ad_arguments( $method, $id, $args );
100
-
101
- return call_user_func( $methods[ $method ], $args );
102
- }
103
-
104
- // internal
105
- public function get_ad_by_id($args) {
106
- if ( isset($args['override']) ) {
107
- return $args['override'];
108
- }
109
- if ( ! isset($args['id']) || $args['id'] == 0 ) {
110
- return ;
111
- }
112
-
113
- // get ad
114
- $ad = new Advanced_Ads_Ad( (int) $args['id'], $args );
115
-
116
- if ( false !== ( $override = apply_filters( 'advanced-ads-ad-select-override-by-ad', false, $ad, $args ) ) ) {
117
- return $override;
118
- }
119
-
120
- // check conditions
121
- if ( $ad->can_display() ) {
122
- return $ad->output();
123
- }
124
- }
125
-
126
- // internal
127
- public function get_ad_by_group($args) {
128
- if ( isset($args['override']) ) {
129
- return $args['override'];
130
- }
131
- if ( ! isset($args['id']) || $args['id'] == 0 ) {
132
- return;
133
- }
134
-
135
- // get ad
136
- $id = (int) $args['id'];
137
- $adgroup = new Advanced_Ads_Group( $id, $args );
138
- $ordered_ad_ids = $adgroup->get_ordered_ad_ids();
139
-
140
- if ( false !== ( $override = apply_filters( 'advanced-ads-ad-select-override-by-group', false, $adgroup, $ordered_ad_ids, $args ) ) ) {
141
- return $override;
142
- }
143
-
144
- return $adgroup->output( $ordered_ad_ids );
145
- }
146
-
147
- // internal
148
- public function get_ad_by_placement($args) {
149
- if ( isset($args['override']) ) {
150
- return $args['override'];
151
- }
152
- if ( ! isset($args['id']) || $args['id'] == '' ) {
153
- return ;
154
- }
155
-
156
- // check conditions
157
- if ( ! Advanced_Ads_Placements::can_display( $args['id'] ) ) {
158
- return;
159
- }
160
-
161
- // get placement content
162
- $id = $args['id'];
163
- return Advanced_Ads_Placements::output( $id, $args );
164
- }
165
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/ad.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
 
3
  /**
4
- * Advanced Ads Ad.
5
  *
6
- * @package Advanced_Ads_Ad
7
  * @author Thomas Maier <thomas.maier@webgilde.com>
8
  * @license GPL-2.0+
9
  * @link http://webgilde.com
@@ -13,880 +13,549 @@
13
  /**
14
  * an ad object
15
  *
16
- * @package Advanced_Ads_Ad
17
  * @author Thomas Maier <thomas.maier@webgilde.com>
18
- * @deprecated since version 1.5.3 (May 6th 2015)
19
- * might still be needed if some old add-ons are running somewhere
20
  */
21
- if( ! class_exists ( 'Advads_Ad', false ) ){
22
- class Advads_Ad extends Advanced_Ads_Ad {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  }
25
- }
26
 
27
- /**
28
- * an ad object
29
- *
30
- * @package Advanced_Ads_Ad
31
- * @author Thomas Maier <thomas.maier@webgilde.com>
32
- */
33
- class Advanced_Ads_Ad {
34
-
35
- /**
36
- * id of the post type for this ad
37
- */
38
- public $id = 0;
39
-
40
- /**
41
- * true, if this is an Advanced Ads Ad post type
42
- */
43
- protected $is_ad = false;
44
-
45
- /**
46
- * ad type
47
- */
48
- public $type = 'content';
49
-
50
- /**
51
- * ad width
52
- */
53
- public $width = 0;
54
-
55
- /**
56
- * target url
57
- *
58
- * @since 1.6.10
59
- */
60
- public $url = '';
61
-
62
- /**
63
- * ad height
64
- */
65
- public $height = 0;
66
-
67
- /**
68
- * object of current ad type
69
- */
70
- protected $type_obj;
71
-
72
- /**
73
- * content of the ad
74
- *
75
- * only needed for ad types using the post content field
76
- */
77
- public $content = '';
78
-
79
- /**
80
- * conditions of the ad display
81
- */
82
- public $conditions = array();
83
-
84
- /**
85
- * status of the ad (e.g. publish, pending)
86
- */
87
- public $status = array();
88
-
89
- /**
90
- * array with meta field options aka parameters
91
- */
92
- protected $options = array();
93
-
94
- /**
95
- * name of the meta field to save options to
96
- */
97
- static $options_meta_field = 'advanced_ads_ad_options';
98
-
99
- /**
100
- * additional arguments set when ad is loaded, overwrites or extends options
101
- */
102
- public $args = array();
103
-
104
- /**
105
- * multidimensional array contains information about the wrapper
106
- * each possible html attribute is an array with possible multiple elements
107
- */
108
- public $wrapper = array();
109
-
110
- /**
111
- * init ad object
112
- *
113
- * @param int $id id of the ad (= post id)
114
- * @param arr $args additional arguments
115
- */
116
- public function __construct($id, $args = array()) {
117
- $id = absint( $id );
118
- $this->id = $id;
119
- $this->args = is_array( $args ) ? $args : array();
120
-
121
- // whether the ad will be tracked
122
- $this->global_output = isset( $this->args['global_output'] ) ? (bool) $this->args['global_output'] : true;
123
-
124
- if ( ! empty($id) ) { $this->load( $id ); }
125
-
126
- // dynamically add sanitize filters for condition types
127
- $_types = array();
128
- // -TODO use model
129
- $advanced_ads_ad_conditions = Advanced_Ads::get_ad_conditions();
130
- foreach ( $advanced_ads_ad_conditions as $_condition ) {
131
- // add unique
132
- $_types[$_condition['type']] = false;
133
- }
134
- // iterate types
135
- foreach ( array_keys( $_types ) as $_type ) {
136
- // -TODO might be faster to use __call() method or isset()-test class method array
137
- $method_name = 'sanitize_condition_'. $_type;
138
- if ( method_exists( $this, $method_name ) ) {
139
- add_filter( 'advanced-ads-sanitize-condition-' . $_type, array($this, $method_name), 10, 1 );
140
- } elseif ( function_exists( 'advads_sanitize_condition_' . $_type ) ) {
141
- // check for public function to sanitize this
142
- add_filter( 'advanced-ads-sanitize-condition-' . $_type, 'advads_sanitize_condition_' . $_type, 10, 1 );
143
-
144
- }
145
- }
146
- }
147
-
148
- /**
149
- * load an ad object by id based on its ad type
150
- *
151
- * @since 1.0.0
152
- */
153
- private function load($id = 0){
154
-
155
- $_data = get_post( $id );
156
- if ( $_data == null ) { return false; }
157
-
158
- // return, if not an ad
159
- if ( $_data->post_type != Advanced_Ads::POST_TYPE_SLUG ) {
160
- return false;
161
- } else {
162
- $this->is_ad = true;
163
- }
164
-
165
- $this->type = $this->options( 'type' );
166
- $this->title = $_data->post_title;
167
- /* load ad type object */
168
- $types = Advanced_Ads::get_instance()->ad_types;
169
- if ( isset($types[$this->type]) ){
170
- $this->type_obj = $types[$this->type];
171
- } else {
172
- $this->type_obj = new Advanced_Ads_Ad_Type_Abstract;
173
- }
174
- $this->url = $this->options( 'url' );
175
- $this->width = $this->options( 'width' );
176
- $this->height = $this->options( 'height' );
177
- $this->conditions = $this->options( 'conditions' );
178
- $this->description = $this->options( 'description' );
179
- $this->output = $this->options( 'output' );
180
- $this->status = $_data->post_status;
181
- $this->wrapper = $this->load_wrapper_options();
182
- $this->expiry_date = $this->options( 'expiry_date' );
183
-
184
- // load content based on ad type
185
- $this->content = $this->type_obj->load_content( $_data );
186
-
187
- // set wrapper conditions
188
- $this->wrapper = apply_filters( 'advanced-ads-set-wrapper', $this->wrapper, $this );
189
- // add unique wrapper id, if options given
190
- if ( is_array( $this->wrapper ) && $this->wrapper !== array() && ! isset( $this->wrapper['id'] ) ){
191
- // create unique id if not yet given
192
- $this->wrapper['id'] = $this->create_wrapper_id();
193
- }
194
- }
195
-
196
- /**
197
- * get options from meta field and return specific field
198
- *
199
- * @param string $field post meta key to be returned
200
- * @return mixed meta field content
201
- * @since 1.0.0
202
- * @todo check against default values
203
- */
204
- public function options( $field = '', $default = null ) {
205
- // retrieve options, if not given yet
206
- // -TODO may execute multiple times (if empty); bad design and risk to access unintialised data with direct access to $this->options property.
207
- if ( $this->options === array() ) {
208
- // load arguments given on ad load
209
- $this->options = $this->args;
210
- // get_post_meta() may return false
211
- $meta = get_post_meta( $this->id, self::$options_meta_field, true );
212
- if ( $meta ){
213
- $this->options = array_merge_recursive( $this->options, $meta );
214
- }
215
- }
216
-
217
- // return specific option
218
- if ( $field != '' ) {
219
- if ( isset($this->options[$field]) ) {
220
- return $this->options[$field];
221
- }
222
- } else { // return all options
223
- if ( ! empty($this->options) ) {
224
- return $this->options;
225
- }
226
- }
227
-
228
- return $default;
229
- }
230
-
231
- /**
232
- * set an option of the ad
233
- *
234
- * @since 1.1.0
235
- * @param string $option name of the option
236
- * @param mixed $value value of the option
237
- */
238
- public function set_option($option = '', $value = ''){
239
- if ( $option == '' ) { return; }
240
-
241
- // get current options
242
- $options = $this->options();
243
-
244
- // set options
245
- $options[$option] = $value;
246
-
247
- // save options
248
- $this->options = $options;
249
-
250
- }
251
-
252
-
253
- /**
254
- * return ad content for frontend output
255
- *
256
- * @since 1.0.0
257
- * @param array $output_options output options
258
- * @return string $output ad output
259
- */
260
- public function output( $output_options = array() ){
261
- if ( ! $this->is_ad ) { return ''; }
262
-
263
- $output_options['global_output'] = $this->global_output = isset( $output_options['global_output'] ) ? $output_options['global_output'] : $this->global_output;
264
-
265
- // switch between normal and debug mode
266
- if( isset( $this->output['debugmode'] ) ){
267
- $output = $this->prepare_debug_output();
268
- } else {
269
- $output = $this->prepare_frontend_output();
270
- }
271
-
272
- // add the ad to the global output array
273
- $advads = Advanced_Ads::get_instance();
274
- if ( $output_options['global_output'] ) {
275
- $advads->current_ads[] = array('type' => 'ad', 'id' => $this->id, 'title' => $this->title, 'output' => $output);
276
- }
277
-
278
- // action when output is created
279
- do_action( 'advanced-ads-output', $this, $output, $output_options );
280
-
281
- return $output;
282
- }
283
-
284
- /**
285
- * check if the ad can be displayed in frontend due to its own conditions
286
- *
287
- * @since 1.0.0
288
- * @param array $check_options check options
289
- * @return bool $can_display true if can be displayed in frontend
290
- */
291
- public function can_display( $check_options = array() ) {
292
- $check_options = wp_parse_args( $check_options, array( 'passive_cache_busting' => false ) );
293
-
294
- // force ad display if debug mode is enabled
295
- if( isset( $this->output['debugmode'] )){
296
- return true;
297
- }
298
-
299
- // prevent ad to show up through wp_head, if this is not a header placement
300
- if( doing_action( 'wp_head' ) && isset( $this->options['placement_type'] ) && 'header' !== $this->options['placement_type'] ){
301
- return false;
302
- }
303
-
304
- if ( ! $check_options['passive_cache_busting'] ) {
305
- // don’t display ads that are not published or private for users not logged in
306
- if ( $this->status !== 'publish' && ! ($this->status === 'private' && is_user_logged_in() ) ) {
307
- return false;
308
- }
309
-
310
- if ( ! $this->can_display_by_visitor() || ! $this->can_display_by_expiry_date() ) {
311
- return false;
312
- }
313
- } else {
314
- if ( $this->status !== 'publish' || ! $this->can_display_by_expiry_date() ) {
315
- return false;
316
- }
317
- }
318
-
319
- // add own conditions to flag output as possible or not
320
- $can_display = apply_filters( 'advanced-ads-can-display', true, $this, $check_options );
321
-
322
- return $can_display;
323
- }
324
-
325
- /**
326
- * check visitor conditions
327
- *
328
- * @since 1.1.0
329
- * @return bool $can_display true if can be displayed in frontend based on visitor settings
330
- */
331
- public function can_display_by_visitor(){
332
- if ( ! empty( $this->options['wp_the_query']['is_feed'] ) ) {
333
- return true;
334
- }
335
-
336
- // check old "visitor" and new "visitors" conditions
337
- if ( ( empty($this->options['visitors']) ||
338
- ! is_array( $this->options['visitors'] ) )
339
- && ( empty($this->options['visitor']) ||
340
- ! is_array( $this->options['visitor'] )
341
- )) { return true; }
342
-
343
- if ( isset( $this->options['visitors'] ) && is_array( $this->options['visitors'] ) ) {
344
-
345
- $visitor_conditions = $this->options['visitors'];
346
-
347
- $last_result = false;
348
- $length = count( $visitor_conditions );
349
-
350
- for($i = 0; $i < $length; ++$i) {
351
- $_condition = current( $visitor_conditions );
352
- // ignore OR if last result was true
353
- if( $last_result && isset( $_condition['connector'] ) && 'or' === $_condition['connector'] ){
354
- next( $visitor_conditions );
355
- continue;
356
- }
357
- $last_result = $result = Advanced_Ads_Visitor_Conditions::frontend_check( $_condition, $this );
358
- if( ! $result ) {
359
- // return false only, if the next condition doesn’t have an OR operator
360
- $next = next( $visitor_conditions );
361
- if( ! isset( $next['connector'] ) || $next['connector'] !== 'or' ) {
362
- return false;
363
- }
364
- } else {
365
- next( $visitor_conditions );
366
- }
367
- }
368
- }
369
-
370
- /**
371
- * "old" visitor conditions
372
- *
373
- * @deprecated since version 1.5.4
374
- */
375
-
376
- if ( empty($this->options['visitor']) ||
377
- ! is_array( $this->options['visitor'] ) ) { return true; }
378
- $visitor_conditions = $this->options( 'visitor' );
379
-
380
- // check mobile condition
381
- if ( isset($visitor_conditions['mobile']) ){
382
- switch ( $visitor_conditions['mobile'] ){
383
- case 'only' :
384
- if ( ! wp_is_mobile() ) { return false; }
385
- break;
386
- case 'no' :
387
- if ( wp_is_mobile() ) { return false; }
388
- break;
389
- }
390
- }
391
-
392
- return true;
393
- }
394
-
395
- /**
396
- * check expiry date
397
- *
398
- * @since 1.3.15
399
- * @return bool $can_display true if can be displayed in frontend based on expiry date
400
- */
401
- public function can_display_by_expiry_date(){
402
-
403
- // if expiry_date is not set null is returned
404
- $ad_expiry_date = (int) $this->options( 'expiry_date' );
405
-
406
- if ( $ad_expiry_date <= 0 || $ad_expiry_date > time() ) {
407
- return true;
408
- }
409
-
410
- // set status to 'draft' if the ad is expired
411
- if ( $this->status !== 'draft' ) {
412
- wp_update_post( array( 'ID' => $this->id, 'post_status' => 'draft' ) );
413
- }
414
-
415
- return false;
416
- }
417
-
418
- /**
419
- * save an ad to the database
420
- * takes values from the current state
421
- */
422
- public function save(){
423
- global $wpdb;
424
-
425
- // remove slashes from content
426
- $content = $this->prepare_content_to_save();
427
-
428
- $where = array('ID' => $this->id);
429
- $wpdb->update( $wpdb->posts, array( 'post_content' => $content ), $where );
430
-
431
- // clean post from object cache
432
- clean_post_cache( $this->id );
433
-
434
- // sanitize conditions
435
- // see sanitize_conditions function for example on using this filter
436
- $conditions = self::sanitize_conditions_on_save( $this->conditions );
437
-
438
- // save other options to post meta field
439
- $options = $this->options();
440
-
441
- $options['type'] = $this->type;
442
- $options['url'] = $this->url;
443
- $options['width'] = $this->width;
444
- $options['height'] = $this->height;
445
- $options['conditions'] = $conditions;
446
- $options['expiry_date'] = $this->expiry_date;
447
- $options['description'] = $this->description;
448
-
449
- // filter to manipulate options or add more to be saved
450
- $options = apply_filters( 'advanced-ads-save-options', $options, $this );
451
-
452
- update_post_meta( $this->id, self::$options_meta_field, $options );
453
- }
454
-
455
- /**
456
- * native filter for content field before being saved
457
- *
458
- * @return string $content ad content
459
- * @since 1.0.0
460
- */
461
- public function prepare_content_to_save() {
462
-
463
- $content = $this->content;
464
-
465
- // load ad type specific parameter filter
466
- // @todo this is just a hotfix for type_obj not set, yet the cause is still unknown
467
- if(is_object( $this->type_obj )){
468
- $content = $this->type_obj->sanitize_content( $content );
469
- }
470
- // apply a custom filter by ad type
471
- $content = apply_filters( 'advanced-ads-pre-ad-save-' . $this->type, $content );
472
-
473
- return $content;
474
- }
475
-
476
- /**
477
- * native filter for ad parameters before being saved
478
- *
479
- * @return arr $parameters sanitized parameters
480
- */
481
- public function prepare_parameters_to_save() {
482
-
483
- $parameters = $this->parameters;
484
- // load ad type specific parameter filter
485
- $parameters = $this->type_obj->sanitize_parameters( $parameters );
486
-
487
- // apply native WP filter for content fields
488
- return $parameters;
489
- }
490
-
491
- /**
492
- * prepare ads output
493
- *
494
- */
495
- public function prepare_frontend_output() {
496
-
497
- // load ad type specific content filter
498
- $output = $this->type_obj->prepare_output( $this );
499
- // don’t deliver anything, if main ad content is empty
500
- if( $output == '' ) {
501
- return;
502
- }
503
-
504
- // filter to manipulate the output before the wrapper is added
505
- $output = apply_filters( 'advanced-ads-output-inside-wrapper', $output, $this );
506
-
507
- $output = $this->maybe_add_label ( $output );
508
-
509
- // build wrapper around the ad
510
- $output = $this->add_wrapper( $output );
511
-
512
- // add a clearfix, if set
513
- if ( isset($this->output['clearfix']) && $this->output['clearfix'] ){
514
- $output .= '<br style="clear: both; display: block; float: none;"/>';
515
- }
516
-
517
- // apply a custom filter by ad type
518
- $output = apply_filters( 'advanced-ads-ad-output', $output, $this );
519
-
520
- return $output;
521
- }
522
-
523
- /**
524
- * prepare debug mode output
525
- *
526
- * @since 1.7.0.3
527
- */
528
- public function prepare_debug_output() {
529
-
530
- global $post, $wp_query;
531
-
532
- // set size
533
- if( $this->width && $this->height ){
534
- $width = $this->width;
535
- $height = $this->height;
536
- } else {
537
- $width = 300;
538
- $height = 250;
539
- }
540
-
541
- $style = "width:{$width}px;height:{$height}px;background-color:#ddd;overflow:scroll;";
542
-
543
- $prefix = Advanced_Ads_Plugin::get_instance()->get_frontend_prefix();
544
-
545
- $content = array();
546
-
547
- // display notice that debug doesn’t work with cache-busting
548
- if( class_exists( 'Advanced_Ads_Pro_Module_Cache_Busting', false ) && isset ( $this->args['cache-busting'] ) && 'off' !== $this->args['cache-busting'] ){
549
- $content[] = '<span style="color: red;">Debug mode does not work properly with cache-busting enabled for this ad.</span>';
550
- }
551
-
552
- // compare current wp_query with global wp_main_query
553
- if( ! $wp_query->is_main_query() ){
554
- $content[] = '<span style="color: red;">Current query is not identical to main query.</span>';
555
- // output differences
556
- $content[] = $this->build_query_diff_table();
557
- }
558
-
559
- // compare current post with global post
560
- if( $wp_query->post !== $post ){
561
- $error = '<span style="color: red;">Current post is not identical to main post.</span>';
562
- // output differences
563
- if( isset( $post->post_title ) && $post->ID ){
564
- $error .= '<br/>current post: ' . $post->post_title . ', ID: ' . $post->ID;
565
- }
566
- if( isset( $wp_query->post->post_title ) && $wp_query->post->ID ){
567
- $error .= '<br/>main post: ' . $wp_query->post->post_title . ', ID: ' . $wp_query->post->ID;
568
- }
569
- $content[] = $error;
570
- }
571
-
572
- ob_start();
573
-
574
- include( ADVADS_BASE_PATH . '/public/views/ad-debug.php' );
575
-
576
- $output = ob_get_clean();
577
-
578
- // apply a custom filter by ad type
579
- $output = apply_filters( 'advanced-ads-ad-output-debug', $output, $this );
580
-
581
- return $output;
582
-
583
- }
584
-
585
- /**
586
- * build table with differences between current and main query
587
- *
588
- * @since 1.7.0.3
589
- */
590
- private function build_query_diff_table(){
591
-
592
- global $wp_query, $wp_the_query;
593
-
594
- $diff_current = array_diff_assoc( $wp_query->query_vars, $wp_the_query->query_vars );
595
- $diff_main = array_diff_assoc( $wp_the_query->query_vars, $wp_query->query_vars );
596
-
597
- if( ! is_array( $diff_current ) || ! is_array( $diff_main ) ){
598
- return '';
599
- }
600
-
601
- ob_start();
602
-
603
- ?><table><thead><tr><th></th><th>current query</th><th>main query</th></tr></thead><?php
604
- foreach( $diff_current as $_key => $_value ){
605
- ?><tr><td><?php echo $_key; ?></td><td><?php echo $_value; ?></td><td><?php if( isset( $diff_main[$_key] ) ) echo $diff_main[$_key]; ?></td></tr><?php
606
- }
607
- ?></table><?php
608
-
609
- return ob_get_clean();
610
- }
611
-
612
- /**
613
- * sanitize ad display conditions when saving the ad
614
- *
615
- * @param array $conditions conditions array send via the dashboard form for an ad
616
- * @return array with sanitized conditions
617
- * @since 1.0.0
618
- */
619
- public function sanitize_conditions_on_save($conditions = array()){
620
-
621
- global $advanced_ads_ad_conditions;
622
-
623
- if ( ! is_array( $conditions ) || $conditions == array() ) { return array(); }
624
-
625
- foreach ( $conditions as $_key => $_condition ){
626
- if ( $_key == 'postids' ){
627
- // sanitize single post conditions
628
- if ( empty($_condition['ids']) ){ // remove, if empty
629
- $_condition['include'] = array();
630
- $_condition['exclude'] = array();
631
- } elseif( isset( $_condition['method'] ) ) {
632
- switch ( $_condition['method'] ){
633
- case 'include' :
634
- $_condition['include'] = $_condition['ids'];
635
- $_condition['exclude'] = array();
636
- break;
637
- case 'exclude' :
638
- $_condition['include'] = array();
639
- $_condition['exclude'] = $_condition['ids'];
640
- break;
641
- }
642
- }
643
- } else {
644
- if ( ! is_array( $_condition ) ) {
645
- $_condition = trim( $_condition ); }
646
- if ( $_condition == '' ) {
647
- $conditions[$_key] = $_condition;
648
- continue;
649
- }
650
- }
651
- $type = ! empty($advanced_ads_ad_conditions[$_key]['type']) ? $advanced_ads_ad_conditions[$_key]['type'] : 0;
652
- if ( empty($type) ) { continue; }
653
-
654
- // dynamically apply filters for each condition used
655
- $conditions[$_key] = apply_filters( 'advanced-ads-sanitize-condition-' . $type, $_condition );
656
- }
657
- return $conditions;
658
- }
659
-
660
- /**
661
- * sanitize id input field(s) for pattern /1,2,3,4/
662
- *
663
- * @pararm array/string $cond input string/array
664
- * @return array/string $cond sanitized string/array
665
- */
666
- public static function sanitize_condition_idfield($cond = ''){
667
- // strip anything that is not comma or number
668
-
669
- if ( is_array( $cond ) ){
670
- foreach ( $cond as $_key => $_cond ){
671
- $cond[$_key] = preg_replace( '#[^0-9,]#', '', $_cond );
672
- }
673
- } else {
674
- $cond = preg_replace( '#[^0-9,]#', '', $cond );
675
- }
676
- return $cond;
677
- }
678
-
679
- /**
680
- * sanitize radio input field
681
- *
682
- * @pararm string $string input string
683
- * @return string $string sanitized string
684
- */
685
- public static function sanitize_condition_radio($string = ''){
686
- // only allow 0, 1 and empty
687
- return $string = preg_replace( '#[^01]#', '', $string );
688
- }
689
-
690
- /**
691
- * sanitize comma seperated text input field
692
- *
693
- * @pararm array/string $cond input string/array
694
- * @return array/string $cond sanitized string/array
695
- */
696
- public static function sanitize_condition_textvalues($cond = ''){
697
- // strip anything that is not comma, alphanumeric, minus and underscore
698
- if ( is_array( $cond ) ){
699
- foreach ( $cond as $_key => $_cond ){
700
- $cond[$_key] = preg_replace( '#[^0-9,A-Za-z-_]#', '', $_cond );
701
- }
702
- } else {
703
- $cond = preg_replace( '#[^0-9,A-Za-z-_]#', '', $cond );
704
- }
705
- return $cond;
706
- }
707
-
708
- /**
709
- * load wrapper options set with the ad
710
- *
711
- * @since 1.3
712
- * @return arr $wrapper options array ready to be use in add_wrapper() function
713
- */
714
- protected function load_wrapper_options(){
715
- $wrapper = array();
716
-
717
- // print_r($this->output);
718
-
719
- if ( ! empty($this->output['position']) ) {
720
- switch ( $this->output['position'] ) {
721
- case 'left' :
722
- $wrapper['style']['float'] = 'left';
723
- break;
724
- case 'right' :
725
- $wrapper['style']['float'] = 'right';
726
- break;
727
- case 'center' :
728
- $wrapper['style']['text-align'] = 'center';
729
- // add css rule after wrapper to center the ad
730
- // add_filter( 'advanced-ads-output-wrapper-after-content', array( $this, 'center_ad_content' ), 10, 2 );
731
- break;
732
- case 'clearfix' :
733
- $wrapper['style']['clear'] = 'both';
734
- break;
735
- }
736
- }
737
-
738
- if ( isset($this->output['class']) && is_array( $this->output['class'] ) ) {
739
- $wrapper['class'] = $this->output['class'];
740
- }
741
-
742
- // add manual classes
743
- if ( isset($this->output['wrapper-class']) && '' !== $this->output['wrapper-class'] ) {
744
- $classes = explode( ' ', $this->output['wrapper-class'] );
745
-
746
- foreach( $classes as $_class ){
747
- $wrapper['class'][] = sanitize_text_field( $_class );
748
- }
749
- }
750
-
751
- if ( ! empty($this->output['margin']['top']) ) {
752
- $wrapper['style']['margin-top'] = intval( $this->output['margin']['top'] ) . 'px';
753
- }
754
- if ( ! empty($this->output['margin']['right']) ) {
755
- $wrapper['style']['margin-right'] = intval( $this->output['margin']['right'] ) . 'px';
756
- }
757
- if ( ! empty($this->output['margin']['bottom']) ) {
758
- $wrapper['style']['margin-bottom'] = intval( $this->output['margin']['bottom'] ) . 'px';
759
- }
760
- if ( ! empty($this->output['margin']['left']) ) {
761
- $wrapper['style']['margin-left'] = intval( $this->output['margin']['left'] ) . 'px';
762
- }
763
-
764
- if ( ! empty ($this->output['add_wrapper_sizes'] ) ) {
765
- $wrapper['style']['width'] = intval( $this->width ) . 'px';
766
- $wrapper['style']['height'] = intval( $this->height ) . 'px';
767
- }
768
-
769
- // exclude the 'Header Code' placement type
770
- if ( ! isset( $this->args['placement_type'] ) || ! 'post_top' === $this->args['placement_type'] ) {
771
- $wrapper['data-id'] = $this->id;
772
- }
773
-
774
- return $wrapper;
775
- }
776
-
777
- /**
778
- * add a wrapper arount the ad content if wrapper information are given
779
- *
780
- * @since 1.1.4
781
- * @param str $ad_content content of the ad
782
- * @return str $wrapper ad within the wrapper
783
- */
784
- protected function add_wrapper($ad_content = ''){
785
-
786
- $wrapper_options = apply_filters( 'advanced-ads-output-wrapper-options', $this->wrapper, $this );
787
-
788
- if ( ( ! isset( $this->output['wrapper-id'] ) || '' === $this->output['wrapper-id'] )
789
- && $wrapper_options == array() || ! is_array( $wrapper_options ) ) { return $ad_content; }
790
-
791
- // create unique id if not yet given
792
- if ( empty($wrapper_options['id']) ){
793
- $this->wrapper['id'] = $wrapper_options['id'] = $this->create_wrapper_id();
794
- }
795
-
796
- // build the box
797
- $wrapper = '<div';
798
- foreach ( $wrapper_options as $_html_attr => $_values ){
799
- if ( $_html_attr == 'style' ){
800
- $_style_values_string = '';
801
- foreach ( $_values as $_style_attr => $_style_values ){
802
- if ( is_array( $_style_values ) ) {
803
- $_style_values_string .= $_style_attr . ': ' .implode( ' ', $_style_values ). '; '; }
804
- else {
805
- $_style_values_string .= $_style_attr . ': ' .$_style_values. '; '; }
806
- }
807
- $wrapper .= " style=\"$_style_values_string\"";
808
- } else {
809
- if ( is_array( $_values ) ) {
810
- $_values_string = implode( ' ', $_values ); }
811
- else {
812
- $_values_string = sanitize_title( $_values ); }
813
- $wrapper .= " $_html_attr=\"$_values_string\"";
814
- }
815
- }
816
- $wrapper .= '>';
817
- $wrapper .= apply_filters( 'advanced-ads-output-wrapper-before-content', '', $this );
818
- $wrapper .= $ad_content;
819
- $wrapper .= apply_filters( 'advanced-ads-output-wrapper-after-content', '', $this );
820
- $wrapper .= '</div>';
821
-
822
- return $wrapper;
823
- }
824
-
825
- /**
826
- * function to add css rule after the ad to center its content
827
- *
828
- * @since 1.6.9.5
829
- * @param str $output additional output in wrapper after content
830
- * @param obj $ad Advanced_Ads_Ad object
831
- * @return str $output
832
- *
833
- */
834
- /*public function center_ad_content( $output, Advanced_Ads_Ad $ad ){
835
-
836
- // no additional check needed, because the hook is only called when the ad is centered
837
- if( isset( $ad->wrapper['id'] )){
838
- // does not work with most div elements, so actually not used now
839
- $output .= '<style type="text/css">#'. $ad->wrapper['id'] . ' img, #'. $ad->wrapper['id'] . ' div { display: inline !important; }</style>';
840
- }
841
-
842
- return $output;
843
- }*/
844
-
845
- /**
846
- * create a random wrapper id
847
- *
848
- * @since 1.1.4
849
- * @return string $id random id string
850
- */
851
- private function create_wrapper_id(){
852
-
853
- if( isset( $this->output['wrapper-id'] )){
854
- $id = sanitize_key( $this->output['wrapper-id'] );
855
- if( '' !== $id ){
856
- return $id;
857
- }
858
- }
859
-
860
- $prefix = Advanced_Ads_Plugin::get_instance()->get_frontend_prefix();
861
-
862
- return $prefix . mt_rand();
863
- }
864
-
865
- /**
866
- * add an "Advertisement" label if conditions are met
867
- *
868
- * @param str $output
869
- * @return str $output
870
- */
871
- public function maybe_add_label( &$output ) {
872
- if ( ! ( isset( $this->args['placement_type'] ) && $this->args['placement_type'] === 'header' ) &&
873
- $this->type !== 'group' &&
874
- $label = Advanced_Ads::get_instance()->get_label()
875
- ) {
876
- // ignore slider and group with refresh
877
- if ( isset( $this->args['group_info']['type'] ) &&
878
- $this->args['group_info']['type'] === 'slider' &&
879
- ! empty( $this->args['group_info']['refresh_enabled'] )
880
- ) {
881
- return $output;
882
- }
883
- // first ad in a group or single ad without group, and not group output for passive cb
884
- if ( empty( $this->args['group_info']['ads_displayed'] ) && empty( $this->args['group_info']['passive_cb'] ) ) {
885
- $output = $label . $output;
886
- }
887
- }
888
-
889
- return $output;
890
- }
891
-
892
- }
1
  <?php
2
 
3
  /**
4
+ * Advanced Ads.
5
  *
6
+ * @package Advads_Ad
7
  * @author Thomas Maier <thomas.maier@webgilde.com>
8
  * @license GPL-2.0+
9
  * @link http://webgilde.com
13
  /**
14
  * an ad object
15
  *
16
+ * @package Advads_Ad
17
  * @author Thomas Maier <thomas.maier@webgilde.com>
 
 
18
  */
19
+ class Advads_Ad {
20
+
21
+ /**
22
+ * id of the post type for this ad
23
+ */
24
+ protected $id = 0;
25
+
26
+ /**
27
+ * true, if this is an Advanced Ads Ad post type
28
+ */
29
+ protected $is_ad = false;
30
+
31
+ /**
32
+ * ad type
33
+ */
34
+ public $type = 'content';
35
+
36
+ /**
37
+ * object of current ad type
38
+ */
39
+ protected $type_obj;
40
+
41
+ /**
42
+ * content of the ad
43
+ *
44
+ * only needed for ad types using the post content field
45
+ */
46
+ public $content = '';
47
+
48
+ /**
49
+ * conditions of the ad display
50
+ */
51
+ public $conditions = array();
52
+
53
+ /**
54
+ * status of the ad (e.g. publish, pending)
55
+ */
56
+ public $status = array();
57
+
58
+ /**
59
+ * array with meta field options aka parameters
60
+ */
61
+ protected $options = array();
62
+
63
+ /**
64
+ * name of the meta field to save options to
65
+ */
66
+ static $options_meta_field = 'advanced_ads_ad_options';
67
+
68
+ /**
69
+ * init ad object
70
+ *
71
+ * @param int $id id of the ad (= post id)
72
+ */
73
+ public function __construct($id) {
74
+ global $advanced_ads_ad_conditions;
75
+ $id = absint($id);
76
+ $this->id = $id;
77
+
78
+ if(!empty($id)) $this->load($id);
79
+
80
+ // dynamically add sanitize filters for condition types
81
+ $_types = array();
82
+ foreach($advanced_ads_ad_conditions as $_condition) {
83
+ $_types[] = $_condition['type'];
84
+ }
85
+ $_types = array_unique($_types);
86
+ foreach($_types as $_type) {
87
+ $method_name = 'sanitize_condition_'. $_type;
88
+ if(method_exists($this, $method_name)) {
89
+ add_filter('advanced-ads-sanitize-condition-' . $_type, array($this, $method_name), 10, 1);
90
+ } elseif(function_exists('advads_sanitize_condition_' . $_type)) {
91
+ // check for public function to sanitize this
92
+ add_filter('advanced-ads-sanitize-condition-' . $_type, 'advads_sanitize_condition_' . $_type, 10, 1);
93
+
94
+ }
95
+ }
96
+ }
97
 
98
+ /**
99
+ * load an ad object by id based on its ad type
100
+ *
101
+ * @since 1.0.0
102
+ */
103
+ private function load($id = 0){
104
+
105
+ $_data = get_post($id);
106
+ if($_data == null) return false;
107
+
108
+ // return, if not an ad
109
+ if($_data->post_type != Advanced_Ads::POST_TYPE_SLUG) {
110
+ return false;
111
+ } else {
112
+ $this->is_ad = true;
113
+ }
114
+
115
+ $this->type = $this->options('type');
116
+ /* load ad type object */
117
+ $types = Advanced_Ads::get_instance()->ad_types;
118
+ if(isset($types[$this->type])){
119
+ $this->type_obj = $types[$this->type];
120
+ } else {
121
+ $this->type_obj = new Advads_Ad_Type_Abstract;
122
+ }
123
+
124
+ $this->conditions = $this->options('conditions');
125
+ $this->status = $_data->post_status;
126
+
127
+ // load content based on ad type
128
+ $this->content = $this->type_obj->load_content($_data);
129
  }
 
130
 
131
+ /**
132
+ * get options from meta field and return specific field
133
+ *
134
+ * @param string $field post meta key to be returned
135
+ * @return mixed meta field content
136
+ * @since 1.0.0
137
+ * @todo check against default values
138
+ */
139
+ public function options($field = ''){
140
+ // retrieve options, if not given yet
141
+ if($this->options == array()) {
142
+ $this->options = get_post_meta($this->id, self::$options_meta_field, true);
143
+ }
144
+
145
+ // return specific option
146
+ if($field != '') {
147
+ if(!empty($this->options[$field]))
148
+ return $this->options[$field];
149
+ } else { // return all options
150
+ if(!empty($this->options))
151
+ return $this->options;
152
+ }
153
+ }
154
+
155
+ /**
156
+ * return ad content for frontend output
157
+ */
158
+ public function output(){
159
+ if(!$this->is_ad) return '';
160
+
161
+ $output = $this->prepare_frontend_output();
162
+ return $output;
163
+ }
164
+
165
+ /**
166
+ * check if the ad can be displayed in frontend due to its conditions
167
+ *
168
+ * @return bool $can_display true if can be displayed in frontend
169
+ */
170
+ public function can_display(){
171
+ global $post;
172
+
173
+ if(empty($this->options['conditions']) ||
174
+ !is_array($this->options['conditions'])) return true;
175
+
176
+ $conditions = $this->options['conditions'];
177
+ foreach($conditions as $_cond_key => $_cond_value) {
178
+ switch($_cond_key){
179
+ // check for post ids
180
+ case 'postids' :
181
+ // included posts
182
+ if(!empty($_cond_value['include'])){
183
+ $post_ids = explode(',', $_cond_value['include']);
184
+ if(is_array($post_ids)
185
+ && isset($post->ID)
186
+ && !in_array($post->ID, $post_ids))
187
+ return false;
188
+ }
189
+ // excluded posts
190
+ if(!empty($_cond_value['exclude'])){
191
+ $post_ids = explode(',', $_cond_value['exclude']);
192
+ if(is_array($post_ids)
193
+ && isset($post->ID)
194
+ && in_array($post->ID, $post_ids))
195
+ return false;
196
+ }
197
+ break;
198
+ // check for category ids
199
+ case 'categoryids' :
200
+ // included
201
+ if(!empty($_cond_value['include'])){
202
+ $category_ids = explode(',', $_cond_value['include']);
203
+ // check if currently in a post (not post page, but also posts in loops)
204
+ if(is_array($category_ids) && isset($post->ID)
205
+ && !in_category($category_ids, $post)) {
206
+ return false;
207
+ }
208
+ }
209
+ // check for excluded category ids
210
+ if(!empty($_cond_value['exclude'])){
211
+ $category_ids = explode(',', $_cond_value['exclude']);
212
+ // check if currently in a post (not post page, but also posts in loops)
213
+ if(is_array($category_ids) && isset($post->ID)
214
+ && in_category($category_ids, $post) ) {
215
+ // being only in one excluded category is enough to not display the ad
216
+ return false;
217
+ }
218
+ }
219
+ break;
220
+ // check for included category archive ids
221
+ // @link http://codex.wordpress.org/Conditional_Tags#A_Category_Page
222
+ case 'categoryarchiveids' :
223
+ if(!empty($_cond_value['include'])){
224
+ $category_ids = explode(',', $_cond_value['include']);
225
+ if(is_array($category_ids) && !is_category($category_ids))
226
+ return false;
227
+ }
228
+ // check for excluded category archive ids
229
+ if(!empty($_cond_value['exclude'])){
230
+ $category_ids = explode(',', $_cond_value['exclude']);
231
+ if(is_array($category_ids) && is_category($category_ids))
232
+ return false;
233
+ }
234
+ break;
235
+ // check for included post types
236
+ case 'posttypes' :
237
+ if(!empty($_cond_value['include'])){
238
+ $post_types = explode(',', $_cond_value['include']);
239
+ // check if currently in a post (not post page, but also posts in loops)
240
+ if(is_array($post_types) && !in_array(get_post_type(), $post_types)) {
241
+ return false;
242
+ }
243
+ }
244
+ // check for excluded post types
245
+ if(!empty($_cond_value['include'])){
246
+ $post_types = explode(',', $_cond_value['exclude']);
247
+ // check if currently in a post (not post page, but also posts in loops)
248
+ if(is_array($post_types) && in_array(get_post_type(), $post_types)) {
249
+ return false;
250
+ }
251
+ }
252
+ break;
253
+ // check is_front_page
254
+ // @link https://codex.wordpress.org/Conditional_Tags#The_Front_Page
255
+ case 'is_front_page' :
256
+ if(($_cond_value == 1 && !is_front_page())
257
+ || ($_cond_value == 0 && is_front_page()))
258
+ return false;
259
+ break;
260
+ // check is_singular
261
+ // @link https://codex.wordpress.org/Conditional_Tags#A_Post_Type
262
+ case 'is_singular' :
263
+ if(($_cond_value == 1 && !is_singular())
264
+ || ($_cond_value == 0 && is_singular()))
265
+ return false;
266
+ break;
267
+ // check is_archive
268
+ // @link https://codex.wordpress.org/Conditional_Tags#Any_Archive_Page
269
+ case 'is_archive' :
270
+ if(($_cond_value == 1 && !is_archive())
271
+ || ($_cond_value == 0 && is_archive()))
272
+ return false;
273
+ break;
274
+ // check is_search
275
+ // @link https://codex.wordpress.org/Conditional_Tags#A_Search_Result_Page
276
+ case 'is_search' :
277
+ if(($_cond_value == 1 && !is_search())
278
+ || ($_cond_value == 0 && is_search()))
279
+ return false;
280
+ break;
281
+ // check is_404
282
+ // @link https://codex.wordpress.org/Conditional_Tags#A_404_Not_Found_Page
283
+ case 'is_404' :
284
+ if(($_cond_value == 1 && !is_404())
285
+ || ($_cond_value == 0 && is_404()))
286
+ return false;
287
+ break;
288
+ // check is_attachment
289
+ // @link https://codex.wordpress.org/Conditional_Tags#An_Attachment
290
+ case 'is_attachment' :
291
+ if(($_cond_value == 1 && !is_attachment())
292
+ || ($_cond_value == 0 && is_attachment()))
293
+ return false;
294
+ break;
295
+ }
296
+ }
297
+
298
+ return true;
299
+ }
300
+
301
+ /**
302
+ * save an ad to the database
303
+ * takes values from the current state
304
+ */
305
+ public function save(){
306
+ global $wpdb;
307
+
308
+ // remove slashes from content
309
+ $content = $this->prepare_content_to_save();
310
+
311
+ $where = array('ID' => $this->id);
312
+ $wpdb->update( $wpdb->posts, array( 'post_content' => $content ), $where );
313
+
314
+ // sanitize conditions
315
+ // see sanitize_conditions function for example on using this filter
316
+ $conditions = self::sanitize_conditions_on_save($this->conditions);
317
+
318
+ // save other options to post meta field
319
+ $options = array(
320
+ 'type' => $this->type,
321
+ 'conditions' => $conditions,
322
+ );
323
+
324
+ // filter to manipulate options or add more to be saved
325
+ $options = apply_filters('advanced-ads-save-options', $options, $this);
326
+
327
+ $this->update_general_ad_conditions($conditions);
328
+
329
+ update_post_meta($this->id, self::$options_meta_field, $options);
330
+
331
+ }
332
+
333
+ /**
334
+ * native filter for content field before being saved
335
+ *
336
+ * @return string $content ad content
337
+ * @since 1.0.0
338
+ */
339
+ public function prepare_content_to_save() {
340
+
341
+ $content = $this->content;
342
+
343
+ // load ad type specific parameter filter
344
+ $content = $this->type_obj->sanitize_content($content);
345
+ // apply a custom filter by ad type
346
+ $content = apply_filters('advanced-ads-pre-ad-save-' . $this->type, $content);
347
+
348
+ return $content;
349
+ }
350
+
351
+ /**
352
+ * native filter for ad parameters before being saved
353
+ *
354
+ * @return arr $parameters sanitized parameters
355
+ */
356
+ public function prepare_parameters_to_save() {
357
+
358
+ $parameters = $this->parameters;
359
+ // load ad type specific parameter filter
360
+ $parameters = $this->type_obj->sanitize_parameters($parameters);
361
+
362
+ // apply native WP filter for content fields
363
+ return $parameters;
364
+ }
365
+
366
+ /**
367
+ * prepare ads output
368
+ *
369
+ * @param string $content ad content
370
+ * @param obj $ad ad object
371
+ */
372
+ public function prepare_frontend_output(){
373
+
374
+ // load ad type specific content filter
375
+ $output = $this->type_obj->prepare_output($this);
376
+
377
+ // apply a custom filter by ad type
378
+ $output = apply_filters('advanced-ads-ad-output', $output, $this);
379
+
380
+ return $output;
381
+ }
382
+
383
+ /**
384
+ * sanitize ad display conditions when saving the ad
385
+ *
386
+ * @param array $conditions conditions array send via the dashboard form for an ad
387
+ * @return array with sanitized conditions
388
+ * @since 1.0.0
389
+ */
390
+ public function sanitize_conditions_on_save($conditions = array()){
391
+
392
+ global $advanced_ads_ad_conditions;
393
+
394
+ if(!is_array($conditions) || $conditions == array()) return array();
395
+
396
+ foreach($conditions as $_key => $_condition){
397
+ if(!is_array($_condition))
398
+ $_condition = trim($_condition);
399
+ if($_condition == '') {
400
+ $conditions[$_key] = $_condition;
401
+ continue;
402
+ }
403
+ $type = $advanced_ads_ad_conditions[$_key]['type'];
404
+ if(empty($type)) continue;
405
+
406
+ // dynamically apply filters for each condition used
407
+ $conditions[$_key] = apply_filters('advanced-ads-sanitize-condition-' . $type, $_condition);
408
+ }
409
+
410
+ return $conditions;
411
+ }
412
+
413
+ /**
414
+ * sanitize id input field(s) for pattern /1,2,3,4/
415
+ *
416
+ * @pararm array/string $cond input string/array
417
+ * @return array/string $cond sanitized string/array
418
+ */
419
+ public static function sanitize_condition_idfield($cond = ''){
420
+ // strip anything that is not comma or number
421
+ if(is_array($cond)){
422
+ foreach($cond as $_key => $_cond){
423
+ $cond[$_key] = preg_replace('#[^0-9,]#', '', $_cond);
424
+ }
425
+ } else {
426
+ $cond = preg_replace('#[^0-9,]#', '', $cond);
427
+ }
428
+ return $cond;
429
+ }
430
+
431
+ /**
432
+ * sanitize radio input field
433
+ *
434
+ * @pararm string $string input string
435
+ * @return string $string sanitized string
436
+ */
437
+ public static function sanitize_condition_radio($string = ''){
438
+ // only allow 0, 1 and empty
439
+ return $string = preg_replace('#[^01]#', '', $string);
440
+ }
441
+
442
+ /**
443
+ * sanitize comma seperated text input field
444
+ *
445
+ * @pararm array/string $cond input string/array
446
+ * @return array/string $cond sanitized string/array
447
+ */
448
+ public static function sanitize_condition_textvalues($cond = ''){
449
+ // strip anything that is not comma, alphanumeric, minus and underscore
450
+ if(is_array($cond)){
451
+ foreach($cond as $_key => $_cond){
452
+ $cond[$_key] = preg_replace('#[^0-9,A-Za-z-_]#', '', $_cond);
453
+ }
454
+ } else {
455
+ $cond = preg_replace('#[^0-9,A-Za-z-_]#', '', $cond);
456
+ }
457
+ return $cond;
458
+ }
459
+
460
+ /**
461
+ * update general ad conditions with conditions for the current ad
462
+ *
463
+ * @param array $conditions ad display conditions from ad form
464
+ * @since 1.0.0
465
+ * @todo make those condition checks extendible
466
+ */
467
+ public function update_general_ad_conditions($conditions){
468
+ global $advanced_ads_ad_conditions;
469
+
470
+ $plugin = Advanced_Ads::get_instance();
471
+ $ads_by_conditions = $plugin->get_ads_by_conditions_array();
472
+ $plugin_slug = $plugin->get_plugin_slug();
473
+
474
+ // remove current ad from general ad condition array
475
+ $ads_by_conditions = $this->remove_ad_from_general_ad_conditions($this->id, $ads_by_conditions);
476
+
477
+ // only run conditions if ad is publically visible
478
+ if($this->status == 'publish')
479
+ // iterate through the ads display condition
480
+ foreach($conditions as $_condition_key => $_condition){
481
+ if(!isset($advanced_ads_ad_conditions[$_condition_key]['type'])) {
482
+ $plugin->log(sprintf(__('A "%s" display condition does not exist', $plugin_slug), $_condition_key));
483
+ return;
484
+ }
485
+ // add conditions based on type
486
+ switch($advanced_ads_ad_conditions[$_condition_key]['type']){
487
+ case 'idfield' :
488
+ if(isset($_condition['include']) && $_condition['include'] != ''){
489
+ $_ids = explode(',', $_condition['include']);
490
+ if(is_array($_ids)) foreach($_ids as $_id){
491
+ $ads_by_conditions[$_condition_key][$_id]['include'][] = $this->id;
492
+ }
493
+ }
494
+ if(isset($_condition['exclude']) && $_condition['exclude'] != ''){
495
+ $_ids = explode(',', $_condition['exclude']);
496
+ if(is_array($_ids)) foreach($_ids as $_id){
497
+ $ads_by_conditions[$_condition_key][$_id]['exclude'][] = $this->id;
498
+ }
499
+ }
500
+ break;
501
+ case 'textvalues' :
502
+ if(isset($_condition['include']) && $_condition['include'] != ''){
503
+ $_ids = explode(',', $_condition['include']);
504
+ if(is_array($_ids)) foreach($_ids as $_id){
505
+ $ads_by_conditions[$_condition_key][$_id]['include'][] = $this->id;
506
+ }
507
+ }
508
+ if(isset($_condition['exclude']) && $_condition['exclude'] != ''){
509
+ $_ids = explode(',', $_condition['exclude']);
510
+ if(is_array($_ids)) foreach($_ids as $_id){
511
+ $ads_by_conditions[$_condition_key][$_id]['exclude'][] = $this->id;
512
+ }
513
+ }
514
+ break;
515
+ case 'radio' :
516
+ if($_condition == 1)
517
+ $ads_by_conditions[$_condition_key]['include'][] = $this->id;
518
+ elseif($_condition == 0)
519
+ $ads_by_conditions[$_condition_key]['exclude'][] = $this->id;
520
+ break;
521
+ } // switch
522
+ } // forearch
523
+
524
+ update_option('advads-ads-by-conditions', $ads_by_conditions);
525
+ }
526
+
527
+ /**
528
+ * remove ad id from ad conditions array
529
+ *
530
+ * @param int $ad_id id of the ad (=post id)
531
+ * @param arr $conditions array with the general, global ad conditions
532
+ * @since 1.0.0
533
+ */
534
+ static function remove_ad_from_general_ad_conditions($ad_id = 0, $conditions = array()){
535
+ $ad_id = absint($ad_id);
536
+ if(empty($ad_id) || !is_array($conditions) || $conditions == array()) return;
537
+
538
+ foreach($conditions as $_key => $_cond){
539
+ // remove single elements
540
+ if(!is_array($_cond) && $_cond == $ad_id){
541
+ unset($conditions[$_key]);
542
+ } elseif(empty($_cond)){
543
+ unset($conditions[$_key]);
544
+ }
545
+ // check recursively
546
+ elseif(is_array($_cond)){
547
+ $new_cond = self::remove_ad_from_general_ad_conditions($ad_id, $_cond);
548
+
549
+ if($new_cond == array() || $new_cond == ''){
550
+ // remove empty arrays
551
+ unset($conditions[$_key]);
552
+ } else {
553
+ $conditions[$_key] = $new_cond;
554
+ }
555
+ }
556
+ }
557
+
558
+ return $conditions;
559
+ }
560
+
561
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/ad_ajax_callbacks.php DELETED
@@ -1,363 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Advanced Ads.
5
- *
6
- * @package Advanced_Ads
7
- * @author Thomas Maier <thomas.maier@webgilde.com>
8
- * @license GPL-2.0+
9
- * @link http://webgilde.com
10
- * @copyright 2013-2015 Thomas Maier, webgilde GmbH
11
- */
12
-
13
- /**
14
- * This class is used to bundle all ajax callbacks
15
- *
16
- * @package Advanced_Ads_Ajax_Callbacks
17
- * @author Thomas Maier <thomas.maier@webgilde.com>
18
- */
19
- class Advanced_Ads_Ad_Ajax_Callbacks {
20
-
21
- public function __construct() {
22
-
23
- // NOTE: admin only!
24
- //add_action( 'wp_ajax_load_content_editor', array( $this, 'load_content_editor' ) );
25
- add_action( 'wp_ajax_load_ad_parameters_metabox', array( $this, 'load_ad_parameters_metabox' ) );
26
- add_action( 'wp_ajax_load_visitor_conditions_metabox', array( $this, 'load_visitor_condition' ) );
27
- add_action( 'wp_ajax_load_display_conditions_metabox', array( $this, 'load_display_condition' ) );
28
- add_action( 'wp_ajax_advads-terms-search', array( $this, 'search_terms' ) );
29
- add_action( 'wp_ajax_advads-close-notice', array( $this, 'close_notice' ) );
30
- add_action( 'wp_ajax_advads-subscribe-notice', array( $this, 'subscribe' ) );
31
- add_action( 'wp_ajax_advads-activate-license', array( $this, 'activate_license' ) );
32
- add_action( 'wp_ajax_advads-deactivate-license', array( $this, 'deactivate_license' ) );
33
- add_action( 'wp_ajax_advads-adblock-rebuild-assets', array( $this, 'adblock_rebuild_assets' ) );
34
- add_action( 'wp_ajax_advads-post-search', array( $this, 'post_search' ) );
35
- add_action( 'wp_ajax_advads-ad-injection-content', array( $this, 'inject_placement' ) );
36
- add_action( 'wp_ajax_advads-save-hide-wizard-state', array( $this, 'save_wizard_state' ) );
37
-
38
- }
39
-
40
- /**
41
- * load content of the ad parameter metabox
42
- *
43
- * @since 1.0.0
44
- */
45
- public function load_ad_parameters_metabox() {
46
- if ( ! current_user_can( Advanced_Ads_Plugin::user_cap( 'advanced_ads_edit_ads') ) ) {
47
- return;
48
- }
49
-
50
- $types = Advanced_Ads::get_instance()->ad_types;
51
- $type = $_REQUEST['ad_type'];
52
- $ad_id = absint( $_REQUEST['ad_id'] );
53
- if ( empty($ad_id) ) { die(); }
54
-
55
- $ad = new Advanced_Ads_Ad( $ad_id );
56
-
57
- if ( ! empty($types[$type]) && method_exists( $types[$type], 'render_parameters' ) ) {
58
- $types[$type]->render_parameters( $ad );
59
-
60
- include ADVADS_BASE_PATH . 'admin/views/ad-parameters-size.php';
61
- }
62
-
63
- die();
64
-
65
- }
66
-
67
- /**
68
- * load interface for single visitor condition
69
- *
70
- * @since 1.5.4
71
- */
72
- public function load_visitor_condition() {
73
- if( ! current_user_can( Advanced_Ads_Plugin::user_cap( 'advanced_ads_edit_ads') ) ) {
74
- return;
75
- }
76
-
77
- // get visitor condition types
78
- $visitor_conditions = Advanced_Ads_Visitor_Conditions::get_instance()->conditions;
79
- $condition = array();
80
- $condition['type'] = isset( $_POST['type'] ) ? $_POST['type'] : '';
81
- $index = isset( $_POST['index'] ) ? $_POST['index'] : 0;
82
-
83
- if( isset( $visitor_conditions[$condition['type']] ) ) {
84
- $metabox = $visitor_conditions[$condition['type']]['metabox'];
85
- } else {
86
- die();
87
- }
88
-
89
- if ( method_exists( $metabox[0], $metabox[1] ) ) {
90
- call_user_func( array($metabox[0], $metabox[1]), $condition, $index );
91
- }
92
-
93
- die();
94
- }
95
- /**
96
- * load interface for single display condition
97
- *
98
- * @since 1.7
99
- */
100
- public function load_display_condition() {
101
- if( ! current_user_can( Advanced_Ads_Plugin::user_cap( 'advanced_ads_edit_ads') ) ) {
102
- return;
103
- }
104
-
105
- // get display condition types
106
- $conditions = Advanced_Ads_Display_Conditions::get_instance()->conditions;
107
- $condition = array();
108
-
109
- $condition['type'] = isset( $_POST['type'] ) ? $_POST['type'] : '';
110
-
111
- $index = isset( $_POST['index'] ) ? $_POST['index'] : 0;
112
-
113
- if( isset( $conditions[$condition['type']] ) ) {
114
- $metabox = $conditions[$condition['type']]['metabox'];
115
- } else {
116
- die();
117
- }
118
-
119
- if ( method_exists( $metabox[0], $metabox[1] ) ) {
120
- call_user_func( array($metabox[0], $metabox[1]), $condition, $index );
121
- }
122
-
123
- die();
124
- }
125
-
126
- /**
127
- * search terms belonging to a specific taxonomy
128
- *
129
- * @sinc 1.4.7
130
- */
131
- public function search_terms(){
132
- if ( ! current_user_can( Advanced_Ads_Plugin::user_cap( 'advanced_ads_edit_ads') ) ) {
133
- return;
134
- }
135
-
136
- $args = array();
137
- $taxonomy = $_POST['tax'];
138
- $args = array('hide_empty' => false, 'number' => 20);
139
-
140
- if ( !isset( $_POST['search'] ) || $_POST['search'] === '' ) { die(); }
141
-
142
- // if search is an id, search for the term id, else do a full text search
143
- if(0 !== absint($_POST['search'])){
144
- $args['include'] = array(absint($_POST['search']));
145
- } else {
146
- $args['search'] = $_POST['search'];
147
- }
148
-
149
- $results = get_terms( $taxonomy, $args );
150
- // $results = _WP_Editors::wp_link_query( $args );
151
- echo wp_json_encode( $results );
152
- echo "\n";
153
- die();
154
- }
155
-
156
- /**
157
- * search terms belonging to a specific taxonomy
158
- *
159
- * @since 1.5.3
160
- */
161
- public function close_notice(){
162
- if ( ! current_user_can( Advanced_Ads_Plugin::user_cap( 'advanced_ads_manage_options') ) ) {
163
- return;
164
- }
165
-
166
- if ( !isset( $_POST['notice'] ) || $_POST['notice'] === '' ) { die(); }
167
-
168
- Advanced_Ads_Admin_Notices::get_instance()->remove_from_queue($_POST['notice']);
169
- die();
170
- }
171
-
172
- /**
173
- * subscribe to newsletter
174
- *
175
- * @since 1.5.3
176
- */
177
- public function subscribe(){
178
- if ( ! current_user_can( Advanced_Ads_Plugin::user_cap( 'advanced_ads_see_interface') ) ) {
179
- return;
180
- }
181
-
182
- if ( !isset( $_POST['notice'] ) || $_POST['notice'] === '' ) { die(); }
183
-
184
- echo Advanced_Ads_Admin_Notices::get_instance()->subscribe($_POST['notice']);
185
- die();
186
- }
187
-
188
- /**
189
- * activate license of an add-on
190
- *
191
- * @since 1.5.7
192
- */
193
- public function activate_license(){
194
- if ( ! current_user_can( Advanced_Ads_Plugin::user_cap( 'advanced_ads_manage_options') ) ) {
195
- return;
196
- }
197
-
198
- // check nonce
199
- check_ajax_referer( 'advads_ajax_license_nonce', 'security' );
200
-
201
- if ( !isset( $_POST['addon'] ) || $_POST['addon'] === '' ) { die(); }
202
-
203
- echo Advanced_Ads_Admin::get_instance()->activate_license( $_POST['addon'], $_POST['pluginname'], $_POST['optionslug'], $_POST['license'] );
204
-
205
- die();
206
- }
207
-
208
- /**
209
- * deactivate license of an add-on
210
- *
211
- * @since 1.6.11
212
- */
213
- public function deactivate_license(){
214
- if ( ! current_user_can( Advanced_Ads_Plugin::user_cap( 'advanced_ads_manage_options') ) ) {
215
- return;
216
- }
217
-
218
- // check nonce
219
- check_ajax_referer( 'advads_ajax_license_nonce', 'security' );
220
-
221
- if ( !isset( $_POST['addon'] ) || $_POST['addon'] === '' ) { die(); }
222
-
223
- echo Advanced_Ads_Admin::get_instance()->deactivate_license( $_POST['addon'], $_POST['pluginname'], $_POST['optionslug'] );
224
-
225
- die();
226
- }
227
-
228
- /**
229
- * rebuild assets for ad-blocker module
230
- *
231
- */
232
- public function adblock_rebuild_assets(){
233
- if ( ! current_user_can( Advanced_Ads_Plugin::user_cap( 'advanced_ads_manage_options') ) ) {
234
- return;
235
- }
236
-
237
- Advanced_Ads_Ad_Blocker_Admin::get_instance()->add_asset_rebuild_form();
238
- die();
239
- }
240
-
241
- /**
242
- * post search (used in Display conditions)
243
- *
244
- */
245
- public function post_search(){
246
- if ( ! current_user_can( Advanced_Ads_Plugin::user_cap( 'advanced_ads_edit_ads') ) ) {
247
- return;
248
- }
249
-
250
- add_filter( 'wp_link_query_args', array( 'Advanced_Ads_Display_Conditions', 'modify_post_search' ) );
251
- add_filter( 'posts_search', array( 'Advanced_Ads_Display_Conditions', 'modify_post_search_sql' ) );
252
-
253
- wp_ajax_wp_link_ajax();
254
- }
255
-
256
- /**
257
- * inject an ad and a placement
258
- *
259
- * @since 1.7.3
260
- */
261
- public function inject_placement(){
262
- if ( ! current_user_can( Advanced_Ads_Plugin::user_cap( 'advanced_ads_edit_ads') ) ) {
263
- die();
264
- }
265
-
266
- $ad_id = absint( $_REQUEST['ad_id'] );
267
- if ( empty( $ad_id ) ) { die(); }
268
-
269
- // use existing placement
270
- if ( isset( $_REQUEST['placement_slug'] ) ) {
271
- $xml_array[] = '<placements type="array">';
272
- $xml_array[] = '<item key="0" type="array">';
273
- $xml_array[] = '<item type="string">ad_' . $ad_id . '</item>';
274
- $xml_array[] = '<key type="string">' . $_REQUEST['placement_slug'] . '</key>';
275
- $xml_array[] = '<use_existing type="boolean">1</use_existing>';
276
- $xml_array[] = '</item>';
277
- $xml_array[] = '</placements>';
278
-
279
- $xml = '<advads-export>' . implode( '', $xml_array ) . '</advads-export>';
280
-
281
- Advanced_Ads_Import::get_instance()->import( $xml );
282
- if ( count( Advanced_Ads_Import::get_instance()->imported_data['placements'] ) ) {
283
- // if the ad was assigned
284
- echo $_REQUEST['placement_slug'];
285
- };
286
- die();
287
- }
288
-
289
- // create new placement
290
- $placements = Advanced_Ads::get_instance()->get_model()->get_ad_placements_array();
291
-
292
- $type = esc_attr( $_REQUEST['placement_type'] );
293
-
294
- $item = 'ad_' . $ad_id;
295
-
296
- $options = array();
297
-
298
- // check type
299
- $placement_types = Advanced_Ads_Placements::get_placement_types();
300
- if( ! isset( $placement_types[ $type ] ) ){
301
- die();
302
- }
303
-
304
- $title = $placement_types[ $type ]['title'];
305
-
306
- $new_placement = array(
307
- 'type' => $type,
308
- 'item' => $item,
309
- 'name' => $title,
310
- );
311
-
312
- // set content specific options
313
- if( 'post_content' === $type ){
314
- $index = isset( $_REQUEST['options']['index'] ) ? absint( $_REQUEST['options']['index'] ) : 1;
315
- $new_placement['options'] = array(
316
- 'position' => 'after',
317
- 'index' => $index,
318
- 'tag' => 'p'
319
- );
320
- }
321
-
322
- $i = 1;
323
- // try to save placement until we found an empty slug
324
- do {
325
- $slug = Advanced_Ads_Placements::save_new_placement( $new_placement );
326
- $new_placement['name'] = $title . ' ' . $i;
327
- $i ++;
328
- if( $i === 100 ){ // prevent endless loop, just in case
329
- Advanced_Ads::log( 'endless loop when injecting placement' );
330
- break;
331
- }
332
- } while ( ! $slug );
333
-
334
- // return potential slug
335
- echo $slug;
336
-
337
- die();
338
- }
339
-
340
- /**
341
- * save ad wizard state for each user individually
342
- *
343
- * @since 1.7.4
344
- */
345
- public function save_wizard_state(){
346
- if ( ! current_user_can( Advanced_Ads_Plugin::user_cap( 'advanced_ads_edit_ads') ) ) {
347
- return;
348
- }
349
-
350
- $state = ( isset( $_REQUEST['hide_wizard'] ) && 'true' === $_REQUEST['hide_wizard'] ) ? 'true' : 'false';
351
-
352
- // get current user
353
- $user_id = get_current_user_id();
354
- if( ! $user_id ) {
355
- die();
356
- }
357
-
358
- update_user_meta( $user_id, 'advanced-ads-hide-wizard', $state );
359
-
360
- die();
361
- }
362
-
363
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/ad_group.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Advanced Ads
5
  *
6
- * @package Advanced_Ads_Group
7
  * @author Thomas Maier <thomas.maier@webgilde.com>
8
  * @license GPL-2.0+
9
  * @link http://webgilde.com
@@ -13,483 +13,333 @@
13
  /**
14
  * an ad group object
15
  *
16
- * @package Advanced_Ads_Group
17
  * @author Thomas Maier <thomas.maier@webgilde.com>
18
  */
19
- class Advanced_Ads_Group {
20
-
21
- /**
22
- * default ad group weight
23
- */
24
- const MAX_AD_GROUP_WEIGHT = 10;
25
-
26
- /**
27
- * term id of this ad group
28
- */
29
- public $id = 0;
30
-
31
- /**
32
- * group type
33
- *
34
- * @since 1.4.8
35
- */
36
- public $type = 'default';
37
-
38
- /**
39
- * name of the taxonomy
40
- */
41
- public $taxonomy = '';
42
-
43
- /**
44
- * post type of the ads
45
- */
46
- protected $post_type = '';
47
-
48
- /**
49
- * the current loaded ad
50
- */
51
- protected $current_ad = '';
52
-
53
- /**
54
- * the name of the term
55
- */
56
- public $name = '';
57
-
58
- /**
59
- * the slug of the term
60
- */
61
- public $slug = '';
62
-
63
- /**
64
- * the description of the term
65
- */
66
- public $description = '';
67
-
68
- /**
69
- * number of ads to display in the group block
70
- */
71
- public $ad_count = 1;
72
-
73
- /**$slug
74
- * contains other options
75
- *
76
- * @since 1.5.5
77
- */
78
- public $options = array();
79
-
80
- /**
81
- * Optional arguments passed to ads.
82
- *
83
- * @var array
84
- */
85
- public $ad_args = array();
86
-
87
- /**
88
- * containing ad weights
89
- */
90
- private $ad_weights = 0;
91
-
92
- /**
93
- * array with post type objects (ads)
94
- */
95
- private $ads = array();
96
-
97
- /**
98
- * init ad group object
99
- *
100
- * @since 1.0.0
101
- * @param int|obj $group either id of the ad group (= taxonomy id) or term object
102
- * @param array $ad_args optional arguments passed to ads
103
- */
104
- public function __construct( $group, $ad_args = array() ) {
105
-
106
- $this->taxonomy = Advanced_Ads::AD_GROUP_TAXONOMY;
107
-
108
- $group = get_term( $group, $this->taxonomy );
109
- if ( $group == null || is_wp_error( $group ) ) {
110
- return;
111
- }
112
-
113
- $this->load( $group, $ad_args );
114
- }
115
-
116
- /**
117
- * load additional ad group properties
118
- *
119
- * @since 1.4.8
120
- * @param int $id group id
121
- * @param obj $group wp term object
122
- * @param array $ad_args optional arguments passed to ads
123
- */
124
- private function load( $group, $ad_args ) {
125
- $this->id = $group->term_id;
126
- $this->name = $group->name;
127
- $this->slug = $group->slug;
128
- $this->description = $group->description;
129
- $this->post_type = Advanced_Ads::POST_TYPE_SLUG;
130
- $this->ad_args = $ad_args;
131
-
132
- $this->load_additional_attributes();
133
- }
134
-
135
- /**
136
- * load additional attributes for groups that are not part of the WP terms
137
- *
138
- * @since 1.4.8
139
- */
140
- protected function load_additional_attributes() {
141
- // -TODO should abstract (i.e. only call once per request)
142
- $all_groups = get_option( 'advads-ad-groups', array() );
143
-
144
- if ( isset( $all_groups[ $this->id ]['type'] ) ) {
145
- $this->type = $all_groups[ $this->id ]['type'];
146
- }
147
-
148
- // get ad count; default is 1
149
- if ( isset( $all_groups[ $this->id ]['ad_count'] ) ) {
150
- $this->ad_count = $all_groups[ $this->id ]['ad_count'] === 'all' ? 'all' : (int) $all_groups[ $this->id ]['ad_count'];
151
- }
152
-
153
- if ( isset( $all_groups[ $this->id ]['options'] ) ) {
154
- $this->options = isset( $all_groups[ $this->id ]['options'] ) ? $all_groups[ $this->id ]['options'] : array();
155
- }
156
- }
157
-
158
- /**
159
- * control the output of the group by type and amount of ads
160
- *
161
- * @since 1.4.8
162
- * @param array/null ordered_ad_ids ordered ids of the ads that belong to the group
163
- * @return str $output output of ad(s) by ad
164
- */
165
- public function output( $ordered_ad_ids = false ) {
166
- // if $ordered_ad_ids was not passed to the function, load it
167
- $ordered_ad_ids = ( $ordered_ad_ids === false ) ? $this->get_ordered_ad_ids() : $ordered_ad_ids;
168
- if ( $ordered_ad_ids === null ) {
169
- return;
170
- }
171
-
172
- // load the ad output
173
- $output = array();
174
- $ads_displayed = 0;
175
- $ad_count = apply_filters( 'advanced-ads-group-ad-count', $this->ad_count, $this );
176
-
177
- $ad_select = Advanced_Ads_Select::get_instance();
178
-
179
- // the Advanced_Ads_Ad obj can access this info
180
- $this->ad_args['group_info'] = array( 'refresh_enabled' => ! empty( $this->options['refresh']['enabled'] ), 'type' => $this->type );
181
-
182
- foreach ( $ordered_ad_ids as $_ad_id ) {
183
- $this->ad_args['group_info']['ads_displayed'] = $ads_displayed;
184
-
185
- // load the ad object
186
- $ad = $ad_select->get_ad_by_method( $_ad_id, Advanced_Ads_Select::AD, $this->ad_args );
187
-
188
- if ( $ad !== null ) {
189
- $output[] = $ad;
190
- $ads_displayed++;
191
- // break the loop when maximum ads are reached
192
- if( $ads_displayed === $ad_count ) {
193
- break;
194
- }
195
- }
196
- }
197
-
198
- // add the group to the global output array
199
- $advads = Advanced_Ads::get_instance();
200
- $advads->current_ads[] = array('type' => 'group', 'id' => $this->id, 'title' => $this->name);
201
-
202
- // filter grouped ads output
203
- $output_string = implode( '', apply_filters( 'advanced-ads-group-output-array', $output, $this ) );
204
-
205
- // filter final group output
206
- return apply_filters( 'advanced-ads-group-output', $output_string, $this );
207
- }
208
-
209
- /**
210
- * get ordered ids of the ads that belong to the group
211
- *
212
- * @return array/null ordered ad ads that belong to the group
213
- */
214
- public function get_ordered_ad_ids() {
215
- if ( ! $this->id ) {
216
- return;
217
- }
218
-
219
- // load ads
220
- $ads = $this->load_all_ads();
221
- if ( $ads === array() ) {
222
- return;
223
- }
224
-
225
- // get ad weights serving as an order here
226
- $weights = $this->get_ad_weights();
227
- asort($weights);
228
-
229
- // if ads and weights don’t have the same keys, update weights array
230
- if ( (count( $weights ) == 0 && count( $ads ) > 0) || count( $weights ) != count( $ads ) || array_diff_key( $weights, $ads ) != array()
231
- || array_diff_key( $ads, $weights ) != array() ) {
232
- $this->update_ad_weights();
233
- $weights = $this->ad_weights;
234
- }
235
-
236
- // remove ads with 0 ad weight
237
- foreach( $weights as $_ad_id => $_ad_weight ){
238
- if( $_ad_weight === 0 ){
239
- unset( $weights[ $_ad_id ] );
240
- }
241
- }
242
-
243
- // order ads based on group type
244
- switch($this->type){
245
- case 'ordered' :
246
- // order to highest weight first
247
- arsort( $weights );
248
- $ordered_ad_ids = array_keys($weights);
249
- break;
250
- default : // default
251
- $ordered_ad_ids = $this->shuffle_ads($ads, $weights);
252
- }
253
-
254
- return apply_filters( 'advanced-ads-group-output-ad-ids', $ordered_ad_ids, $this->type, $ads, $weights, $this );
255
- }
256
-
257
- /**
258
- * return all ads from this group
259
- *
260
- * @since 1.0.0
261
- */
262
- public function get_all_ads() {
263
- if ( count( $this->ads ) > 0 ) {
264
- return $this->ads; }
265
- else {
266
- return $this->load_all_ads(); }
267
- }
268
-
269
- /**
270
- * load all public ads for this group
271
- *
272
- * @since 1.0.0
273
- * @update 1.1.0 load only public ads
274
- * @update allow to cache groups for few minutes
275
- * @return arr $ads array with ad (post) objects
276
- */
277
- private function load_all_ads() {
278
-
279
- if ( ! $this->id ) {
280
- return array();
281
- }
282
-
283
- // reset
284
- $this->ads = array();
285
-
286
- // much more complex than needed: one of the three queries is not needed and the last query gets slow quiet fast
287
- $args = array(
288
- 'post_type' => $this->post_type,
289
- 'post_status' => 'publish',
290
- 'posts_per_page' => -1,
291
- 'taxonomy' => $this->taxonomy,
292
- 'term' => $this->slug,
293
- 'orderby' => 'id' // might want to avoid sorting as not needed for most calls and fast in PHP; slight I/O blocking concern
294
- );
295
-
296
- $found = false;
297
- $key = 'ad_group_all_ads_' . $this->post_type . '_' . $this->taxonomy . '_' . $this->slug;
298
- $ads = wp_cache_get( $key, Advanced_Ads_Model::OBJECT_CACHE_GROUP, false, $found );
299
- if ( $found ) {
300
- $this->ads = $ads;
301
- } else {
302
- $ads = new WP_Query( $args );
303
-
304
- if ( $ads->have_posts() ) {
305
- $this->ads = $this->add_post_ids( $ads->posts );
306
- wp_cache_set( $key, $this->ads, Advanced_Ads_Model::OBJECT_CACHE_GROUP, Advanced_Ads_Model::OBJECT_CACHE_TTL);
307
- }
308
- }
309
-
310
- return $this->ads;
311
- }
312
-
313
- /**
314
- * use post ids as keys for ad array
315
- *
316
- * @since 1.0.0
317
- * @param arr $ads array with post objects
318
- * @return arr $ads array with post objects with post id as their key
319
- * @todo check, if there isn’t a WP function for this already
320
- */
321
- private function add_post_ids(array $ads){
322
-
323
- $ads_with_id = array();
324
- foreach ( $ads as $_ad ){
325
- $ads_with_id[$_ad->ID] = $_ad;
326
- }
327
-
328
- return $ads_with_id;
329
- }
330
-
331
- /**
332
- * shuffle ads based on ad weight
333
- *
334
- * @since 1.0.0
335
- * @param arr $ads array with ad objects
336
- * @param arr $weights ad weights
337
- * @return arr $shuffled_ads shuffled array with ad ids
338
- */
339
- public function shuffle_ads($ads = array(), $weights) {
340
-
341
- // get a random ad for every ad there is
342
- $shuffled_ads = array();
343
- // while non-zero weights are set select random next
344
- while ( null !== $random_ad_id = $this->get_random_ad_by_weight( $weights ) ) {
345
- // remove chosen ad from weights array
346
- unset($weights[$random_ad_id]);
347
- // put random ad into shuffled array
348
- if ( ! empty($ads[$random_ad_id]) ) {
349
- $shuffled_ads[] = $random_ad_id; }
350
- }
351
-
352
- return $shuffled_ads;
353
- }
354
-
355
- /**
356
- * get random ad by ad weight
357
- *
358
- * @since 1.0.0
359
- * @param array $ad_weights e.g. array(A => 2, B => 3, C => 5)
360
- * @source applied with fix for order http://stackoverflow.com/a/11872928/904614
361
- */
362
- private function get_random_ad_by_weight(array $ad_weights) {
363
-
364
- // use maximum ad weight for ads without this
365
- // ads might have a weight of zero (0); to avoid mt_rand fail assume that at least 1 is set.
366
- $max = array_sum( $ad_weights );
367
- if ( $max < 1 ) {
368
- return ;
369
- }
370
-
371
- $rand = mt_rand( 1, $max );
372
-
373
- foreach ( $ad_weights as $ad_id => $_weight ) {
374
- $rand -= $_weight;
375
- if ( $rand <= 0 ) {
376
- return $ad_id;
377
- }
378
- }
379
- }
380
-
381
- /**
382
- * get weights of ads in this group
383
- *
384
- * @since 1.0.0
385
- */
386
- public function get_ad_weights() {
387
- // load and save ad weights if not yet set
388
- if ( $this->ad_weights == 0 ) {
389
- $weights = get_option( 'advads-ad-weights', array() );
390
- if ( isset($weights[$this->id]) ) {
391
- $this->ad_weights = $weights[$this->id];
392
- }
393
- }
394
-
395
- // return ad weights ordered by weight
396
- if(!is_array($this->ad_weights)) {
397
- return array();
398
- } else {
399
- return $this->ad_weights;
400
- }
401
- }
402
-
403
- /**
404
- * save ad group information that are not included in terms or ad weight
405
- *
406
- * @since 1.4.8
407
- * @param arr $args group arguments
408
- */
409
- public function save($args = array()) {
410
-
411
- $defaults = array( 'type' => 'default', 'ad_count' => 1, 'options' => array() );
412
- $args = wp_parse_args($args, $defaults);
413
-
414
- // get global ad group option
415
- $groups = get_option( 'advads-ad-groups', array() );
416
-
417
- $groups[$this->id] = $args;
418
-
419
- update_option( 'advads-ad-groups', $groups );
420
- }
421
-
422
- /**
423
- * save ad group weight (into global ad weight array)
424
- *
425
- * @since 1.0.0
426
- * @param arr|str $weights array with ad weights (key: ad id; value: weight)
427
- */
428
- public function save_ad_weights($weights = '') {
429
-
430
- // allow only arrays and empty string
431
- if ( ! is_array( $weights ) && $weights !== '' ) {
432
- return; }
433
-
434
- $global_weights = get_option( 'advads-ad-weights', array() );
435
-
436
- $global_weights[$this->id] = $this->sanitize_ad_weights( $weights );
437
-
438
- /**
439
- * save ad weights in frontend only, if contanst is not set
440
- * always save in admin
441
- * use the constant to prevent accidental overriding of ad settings in the frontend as happened on very large sites
442
- */
443
- if( !defined( 'ADVANCED_ADS_DISABLE_FRONTEND_AD_WEIGHT_UPDATE' ) || is_admin() ){
444
- update_option( 'advads-ad-weights', $global_weights );
445
- }
446
-
447
- // refresh ad weights after update to avoid conflict
448
- $this->ad_weights = $global_weights[$this->id];
449
- }
450
-
451
- /**
452
- * update ad weight based on current ads for the group and ad weight
453
- *
454
- * @since 1.0.0
455
- */
456
- private function update_ad_weights(){
457
- $ads = $this->get_all_ads();
458
- $weights = $this->get_ad_weights();
459
-
460
- $new_weights = array();
461
- // use only ads assigned to the group
462
- foreach ( $ads as $_ad ){
463
- if ( isset($weights[$_ad->ID]) ){
464
- $new_weights[$_ad->ID] = $weights[$_ad->ID];
465
- } else {
466
- // if no weight is given, use maximum default value
467
- $new_weights[$_ad->ID] = self::MAX_AD_GROUP_WEIGHT;
468
- }
469
- }
470
-
471
- $this->save_ad_weights( $new_weights );
472
- }
473
-
474
- /**
475
- * sanitize ad weights
476
- *
477
- * @since 1.0.0
478
- * @param arr $weights ad weights array with (key: ad id; value: weight)
479
- */
480
- private function sanitize_ad_weights($weights = array()) {
481
-
482
- if ( ! is_array( $weights ) ) {
483
- return ''; }
484
-
485
- $sanitized_weights = array();
486
- foreach ( $weights as $_ad_id => $_weight ) {
487
- $_ad_id = absint( $_ad_id );
488
- $_weight = absint( $_weight );
489
- $sanitized_weights[$_ad_id] = $_weight;
490
- }
491
-
492
- return $sanitized_weights;
493
- }
494
 
495
  }
3
  /**
4
  * Advanced Ads
5
  *
6
+ * @package Advads_Ad_Group
7
  * @author Thomas Maier <thomas.maier@webgilde.com>
8
  * @license GPL-2.0+
9
  * @link http://webgilde.com
13
  /**
14
  * an ad group object
15
  *
16
+ * @package Advads_Ad_Group
17
  * @author Thomas Maier <thomas.maier@webgilde.com>
18
  */
19
+ class Advads_Ad_Group {
20
+
21
+ /**
22
+ * default ad group weight
23
+ */
24
+ const MAX_AD_GROUP_WEIGHT = 10;
25
+
26
+ /**
27
+ * id of the taxonomy of this ad group
28
+ */
29
+ protected $id = 0;
30
+
31
+ /**
32
+ * name of the taxonomy
33
+ */
34
+ protected $taxonomy = '';
35
+
36
+ /**
37
+ * post type of the ads
38
+ */
39
+ protected $post_type = '';
40
+
41
+ /**
42
+ * the current loaded ad
43
+ */
44
+ protected $current_ad = '';
45
+
46
+ /**
47
+ * the name of the term
48
+ */
49
+ public $name = '';
50
+
51
+ /**
52
+ * the slug of the term
53
+ */
54
+ public $slug = '';
55
+
56
+ /**
57
+ * the description of the term
58
+ */
59
+ public $description = '';
60
+
61
+ /**
62
+ * containing ad weights
63
+ */
64
+ private $ad_weights = 0;
65
+
66
+ /**
67
+ * array with post type objects (ads)
68
+ */
69
+ private $ads = array();
70
+
71
+ /**
72
+ * init ad group object
73
+ *
74
+ * @since 1.0.0
75
+ * @param int $id id of the ad group (= taxonomy id)
76
+ */
77
+ public function __construct($id) {
78
+ $id = absint($id);
79
+
80
+ if (empty($id))
81
+ return;
82
+
83
+ $this->id = $id;
84
+ $this->taxonomy = Advanced_Ads::AD_GROUP_TAXONOMY;
85
+ $this->post_type = Advanced_Ads::POST_TYPE_SLUG;
86
+
87
+ $this->load($id);
88
+ }
89
+
90
+ /**
91
+ * load an ad group object by id
92
+ *
93
+ * @since 1.0.0
94
+ */
95
+ private function load($id = 0) {
96
+ $_group = get_term($id, $this->taxonomy);
97
+ if ($_group == null)
98
+ return;
99
+
100
+ $this->name = $_group->name;
101
+ $this->slug = $_group->slug;
102
+ $this->description = $_group->description;
103
+ }
104
+
105
+ /**
106
+ * return random ad content for frontend output
107
+ *
108
+ * @since 1.0.0
109
+ * @return string ad content
110
+ */
111
+ public function output_random_ad() {
112
+ // see prepare_frontend_output for example for this filter
113
+ $ad = $this->get_random_ad();
114
+
115
+ if (!is_object($ad))
116
+ return '';
117
+
118
+ // makes sure the ad filters can also run here
119
+ $adcontent = $ad->output();
120
+
121
+ // filter again, in case a developer wants to filter group output individually
122
+ $output = apply_filters('advanced-ads-group-output', $adcontent, $this);
123
+
124
+ return $output;
125
+ }
126
+
127
+ /**
128
+ * get a random ad from this group
129
+ *
130
+ * @since 1.0.0
131
+ * @return
132
+ */
133
+ private function get_random_ad() {
134
+
135
+ // load all ads
136
+ $ads = $this->load_all_ads();
137
+
138
+ // return, if no ads given
139
+ if ($ads === array())
140
+ return;
141
+
142
+ // shuffle ads based on ad weight
143
+ $ads = $this->shuffle_ads($ads);
144
+
145
+ // check ads one by one for being able to be displayed on this spot
146
+ foreach ($ads as $_ad) {
147
+ // load the ad object
148
+ $ad = new Advads_Ad($_ad->ID);
149
+ if ($ad->can_display()) {
150
+ return $ad;
151
+ }
152
+ }
153
+
154
+ return '';
155
+ }
156
+
157
+ /**
158
+ * return all ads from this group
159
+ *
160
+ * @since 1.0.0
161
+ */
162
+ public function get_all_ads() {
163
+ if(count($this->ads) > 0)
164
+ return $this->ads;
165
+ else
166
+ return $this->load_all_ads();
167
+ }
168
+
169
+ /**
170
+ * load all ads for this group
171
+ *
172
+ * @since 1.0.0
173
+ * @return arr $ads array with ad (post) objects
174
+ */
175
+ private function load_all_ads() {
176
+
177
+ $args = array(
178
+ 'post_type' => $this->post_type,
179
+ $this->taxonomy => $this->slug,
180
+ 'orderby' => 'id'
181
+ );
182
+ $ads = new WP_Query($args);
183
+ // not sure if reset of postdata is needed here
184
+ wp_reset_postdata();
185
+
186
+ if ($ads->have_posts()) {
187
+ return $this->ads = $this->add_post_ids($ads->posts);
188
+ } else {
189
+ return $this->ads = array();
190
+ }
191
+ }
192
+
193
+ /**
194
+ * use post ids as keys for ad array
195
+ *
196
+ * @since 1.0.0
197
+ * @param arr $ads array with post objects
198
+ * @return arr $ads array with post objects with post id as their key
199
+ * @todo check, if there isn’t a WP function for this already
200
+ */
201
+ private function add_post_ids(array $ads){
202
+
203
+ $ads_with_id = array();
204
+ foreach($ads as $_ad){
205
+ $ads_with_id[$_ad->ID] = $_ad;
206
+ }
207
+
208
+ return $ads_with_id;
209
+ }
210
+
211
+ /**
212
+ * shuffle ads based on ad weight
213
+ *
214
+ * @since 1.0.0
215
+ * @param arr $ads array with ad objects
216
+ * @return arr $shuffled_ads shuffled array with ad objects
217
+ */
218
+ private function shuffle_ads($ads = array()) {
219
+
220
+ // get saved ad weights
221
+ $weights = $this->get_ad_weights();
222
+
223
+ // if ads and weights don’t have the same keys, update weights array
224
+ if(count($weights) != count($ads) || array_diff_key($weights, $ads) != array()
225
+ || array_diff_key($ads, $weights) != array()) {
226
+ $this->update_ad_weights();
227
+ }
228
+
229
+ // get a random ad for every ad there is
230
+ $shuffled_ads = array();
231
+ $ad_count = count($ads);
232
+ for($i = 1; $i <= $ad_count; $i++){
233
+ $random_ad_id = $this->get_random_ad_by_weight($weights);
234
+ // remove chosen ad from weights array
235
+ unset($weights[$random_ad_id]);
236
+ // put random ad into shuffled array
237
+ if(isset($ads[$random_ad_id])) { $shuffled_ads[] = $ads[$random_ad_id]; }
238
+ }
239
+
240
+ return $shuffled_ads;
241
+ }
242
+
243
+ /**
244
+ * get random ad by ad weight
245
+ *
246
+ * @since 1.0.0
247
+ * @param array $ad_weights e.g. array(A => 2, B => 3, C => 5)
248
+ * @source applied with fix for order http://stackoverflow.com/a/11872928/904614
249
+ */
250
+ private function get_random_ad_by_weight(array $ad_weights) {
251
+
252
+ // order array by ad weight; lowest first
253
+ asort($ad_weights);
254
+
255
+ // use maximum ad weight for ads without this
256
+ $max = (int) array_sum($ad_weights);
257
+ $rand = mt_rand(1, $max);
258
+
259
+ foreach ($ad_weights as $key => $value) {
260
+ $rand -= $value;
261
+ if ($rand <= 0) {
262
+ return $key;
263
+ }
264
+ }
265
+ }
266
+
267
+ /**
268
+ * get weights of ads in this group
269
+ *
270
+ * @since 1.0.0
271
+ */
272
+ public function get_ad_weights() {
273
+ if ($this->ad_weights == 0) {
274
+ $weights = get_option('advads-ad-weights', array());
275
+ } else {
276
+ return $this->ad_weights;
277
+ }
278
+ if (isset($weights[$this->id])) {
279
+ return $this->ad_weights = $weights[$this->id];
280
+ }
281
+ }
282
+
283
+ /**
284
+ * save ad group weight (into global ad weight array)
285
+ *
286
+ * @since 1.0.0
287
+ * @param arr|str $weights array with ad weights (key: ad id; value: weight)
288
+ */
289
+ public function save_ad_weights($weights = '') {
290
+
291
+ // allow only arrays and empty string
292
+ if (!is_array($weights) && $weights = '')
293
+ return;
294
+
295
+ $global_weights = get_option('advads-ad-weights', array());
296
+
297
+ $global_weights[$this->id] = $this->sanitize_ad_weights($weights);
298
+
299
+ update_option('advads-ad-weights', $global_weights);
300
+ }
301
+ /**
302
+ * update ad weight based on current ads for the group and ad weight
303
+ *
304
+ * @since 1.0.0
305
+ */
306
+ private function update_ad_weights(){
307
+ $ads = $this->get_all_ads();
308
+ $weights = $this->get_ad_weights();
309
+
310
+ $new_weights = array();
311
+ // use only ads assigned to the group
312
+ foreach($ads as $_ad){
313
+ if(isset($weights[$_ad->ID])){
314
+ $new_weights[$_ad->ID] = $weights[$_ad->ID];
315
+ } else {
316
+ // if no weight is given, use maximum default value
317
+ $new_weights[$_ad->ID] = self::MAX_AD_GROUP_WEIGHT;
318
+ }
319
+ }
320
+
321
+ $this->save_ad_weights($new_weights);
322
+ }
323
+
324
+ /**
325
+ * sanitize ad weights
326
+ *
327
+ * @since 1.0.0
328
+ * @param arr $weights ad weights array with (key: ad id; value: weight)
329
+ */
330
+ private function sanitize_ad_weights($weights = array()) {
331
+
332
+ if (!is_array($weights))
333
+ return '';
334
+
335
+ $sanitized_weights = array();
336
+ foreach ($weights as $_ad_id => $_weight) {
337
+ $_ad_id = absint($_ad_id);
338
+ $_weight = absint($_weight);
339
+ $sanitized_weights[$_ad_id] = $_weight;
340
+ }
341
+
342
+ return $sanitized_weights;
343
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
344
 
345
  }
classes/ad_placements.php DELETED
@@ -1,505 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Advanced Ads
5
- *
6
- * @package Advanced_Ads_Placements
7
- * @author Thomas Maier <thomas.maier@webgilde.com>
8
- * @license GPL-2.0+
9
- * @link http://webgilde.com
10
- * @copyright 2014 Thomas Maier, webgilde GmbH
11
- */
12
-
13
- /**
14
- * grouping placements functions
15
- *
16
- * @since 1.1.0
17
- * @package Advanced_Ads_Placements
18
- * @author Thomas Maier <thomas.maier@webgilde.com>
19
- */
20
- class Advanced_Ads_Placements {
21
-
22
- /**
23
- * get placement types
24
- *
25
- * @since 1.2.1
26
- * @return arr $types array with placement types
27
- */
28
- public static function get_placement_types() {
29
- $types = array(
30
- 'default' => array(
31
- 'title' => __( 'Manual Placement', 'advanced-ads' ),
32
- 'description' => __( 'Manual placement to use as function or shortcode.', 'advanced-ads' ),
33
- 'image' => ADVADS_BASE_URL . 'admin/assets/img/placements/manual.png'
34
- ),
35
- 'header' => array(
36
- 'title' => __( 'Header Code', 'advanced-ads' ),
37
- 'description' => __( 'Injected in Header (before closing &lt;/head&gt; Tag, often not visible).', 'advanced-ads' ),
38
- 'image' => ADVADS_BASE_URL . 'admin/assets/img/placements/header.png'
39
- ),
40
- 'footer' => array(
41
- 'title' => __( 'Footer Code', 'advanced-ads' ),
42
- 'description' => __( 'Injected in Footer (before closing &lt;/body&gt; Tag).', 'advanced-ads' ),
43
- 'image' => ADVADS_BASE_URL . 'admin/assets/img/placements/footer.png'
44
- ),
45
- 'post_top' => array(
46
- 'title' => __( 'Before Content', 'advanced-ads' ),
47
- 'description' => __( 'Injected before the post content.', 'advanced-ads' ),
48
- 'image' => ADVADS_BASE_URL . 'admin/assets/img/placements/content-before.png'
49
- ),
50
- 'post_bottom' => array(
51
- 'title' => __( 'After Content', 'advanced-ads' ),
52
- 'description' => __( 'Injected after the post content.', 'advanced-ads' ),
53
- 'image' => ADVADS_BASE_URL . 'admin/assets/img/placements/content-after.png'
54
- ),
55
- 'post_content' => array(
56
- 'title' => __( 'Post Content', 'advanced-ads' ),
57
- 'description' => __( 'Injected into the post content. You can choose the paragraph after which the ad content is displayed.', 'advanced-ads' ),
58
- 'image' => ADVADS_BASE_URL . 'admin/assets/img/placements/content-within.png'
59
- ),
60
- 'sidebar_widget' => array(
61
- 'title' => __( 'Sidebar Widget', 'advanced-ads' ),
62
- 'description' => __( 'Create a sidebar widget with an ad. Can be placed and used like any other widget.', 'advanced-ads' ),
63
- 'image' => ADVADS_BASE_URL . 'admin/assets/img/placements/widget.png'
64
- ),
65
- );
66
- return apply_filters( 'advanced-ads-placement-types', $types );
67
- }
68
-
69
- /**
70
- * update placements if sent
71
- *
72
- * @since 1.5.2
73
- */
74
- static function update_placements(){
75
-
76
- // check user permissions
77
- if( ! current_user_can( Advanced_Ads_Plugin::user_cap( 'advanced_ads_manage_placements') ) ) {
78
- return;
79
- }
80
-
81
- $success = null;
82
-
83
- if ( isset($_POST['advads']['placement']) && check_admin_referer( 'advads-placement', 'advads_placement' ) ){
84
- $success = self::save_new_placement( $_POST['advads']['placement'] );
85
- }
86
- // save placement data
87
- if ( isset($_POST['advads']['placements']) && check_admin_referer( 'advads-placement', 'advads_placement' )){
88
- $success = self::save_placements( $_POST['advads']['placements'] );
89
- }
90
-
91
- $success = apply_filters( 'advanced-ads-update-placements', $success );
92
-
93
- if(isset($success)){
94
- $message = $success ? 'updated' : 'error';
95
- wp_redirect( esc_url_raw( add_query_arg(array('message' => $message)) ) );
96
- }
97
- }
98
-
99
- /**
100
- * save a new placement
101
- *
102
- * @since 1.1.0
103
- * @param array $new_placement
104
- * @return mixed slug if saved; false if not
105
- */
106
- public static function save_new_placement($new_placement) {
107
- // load placements // -TODO use model
108
- $placements = Advanced_Ads::get_ad_placements_array();
109
-
110
- // create slug
111
- $new_placement['slug'] = sanitize_title( $new_placement['name'] );
112
-
113
- // check if slug already exists or is empty
114
- if ( $new_placement['slug'] === '' || isset( $placements[$new_placement['slug']]) || !isset( $new_placement['type'] ) ) {
115
- return false;
116
- }
117
-
118
- // make sure only allowed types are being saved
119
- $placement_types = Advanced_Ads_Placements::get_placement_types();
120
- $new_placement['type'] = (isset($placement_types[$new_placement['type']])) ? $new_placement['type'] : 'default';
121
- // escape name
122
- $new_placement['name'] = esc_attr( $new_placement['name'] );
123
-
124
- // add new place to all placements
125
- $placements[$new_placement['slug']] = array(
126
- 'type' => $new_placement['type'],
127
- 'name' => $new_placement['name'],
128
- 'item' => $new_placement['item']
129
- );
130
-
131
- // add index options
132
- if ( isset($new_placement['options']) ){
133
- $placements[$new_placement['slug']]['options'] = $new_placement['options'];
134
- if ( isset($placements[$new_placement['slug']]['options']['index']) ) {
135
- $placements[$new_placement['slug']]['options']['index'] = absint( $placements[$new_placement['slug']]['options']['index'] ); }
136
- }
137
-
138
- // save array
139
- Advanced_Ads::get_instance()->get_model()->update_ad_placements_array( $placements );
140
-
141
- return $new_placement['slug'];
142
- }
143
-
144
- /**
145
- * save placements
146
- *
147
- * @since 1.1.0
148
- * @param array $placement_items
149
- * @return mixed true if saved; error message if not
150
- */
151
- public static function save_placements($placement_items) {
152
-
153
- // load placements // -TODO use model
154
- $placements = Advanced_Ads::get_ad_placements_array();
155
-
156
- foreach ( $placement_items as $_placement_slug => $_placement ) {
157
- // remove the placement
158
- if ( isset($_placement['delete']) ) {
159
- unset($placements[$_placement_slug]);
160
- continue;
161
- }
162
- // save item
163
- if ( isset($_placement['item']) ) {
164
- $placements[$_placement_slug]['item'] = $_placement['item']; }
165
- // save item options
166
- if ( isset($_placement['options']) ){
167
- $placements[$_placement_slug]['options'] = $_placement['options'];
168
- if ( isset($placements[$_placement_slug]['options']['index']) ) {
169
- $placements[$_placement_slug]['options']['index'] = absint( $placements[$_placement_slug]['options']['index'] ); }
170
- } else {
171
- $placements[$_placement_slug]['options'] = array();
172
- }
173
- }
174
-
175
- // save array
176
- Advanced_Ads::get_instance()->get_model()->update_ad_placements_array( $placements );
177
-
178
- return true;
179
- }
180
-
181
- /**
182
- * get items for item select field
183
- *
184
- * @since 1.1
185
- * @return arr $select items for select field
186
- */
187
- public static function items_for_select() {
188
- $select = array();
189
- $model = Advanced_Ads::get_instance()->get_model();
190
-
191
- // load all ad groups
192
- $groups = $model->get_ad_groups();
193
- foreach ( $groups as $_group ) {
194
- $select['groups']['group_' . $_group->term_id] = $_group->name;
195
- }
196
-
197
- // load all ads
198
- $ads = $model->get_ads( array('orderby' => 'title', 'order' => 'ASC') );
199
- foreach ( $ads as $_ad ) {
200
- $select['ads']['ad_' . $_ad->ID] = $_ad->post_title;
201
- }
202
-
203
- return $select;
204
- }
205
-
206
- /**
207
- * get html tags for content injection
208
- *
209
- * @since 1.3.5
210
- * @return arr $tags array with tags that can be used for content injection
211
- */
212
- public static function tags_for_content_injection(){
213
- $tags = apply_filters( 'advanced-ads-tags-for-injection', array(
214
- 'p' => sprintf( __( 'paragraph (%s)', 'advanced-ads' ), '&lt;p&gt;' ),
215
- 'pwithoutimg' => sprintf( __( 'paragraph without image (%s)', 'advanced-ads' ), '&lt;p&gt;' ),
216
- 'h2' => sprintf( __( 'headline 2 (%s)', 'advanced-ads' ), '&lt;h2&gt;' ),
217
- 'h3' => sprintf( __( 'headline 3 (%s)', 'advanced-ads' ), '&lt;h3&gt;' ),
218
- 'h4' => sprintf( __( 'headline 4 (%s)', 'advanced-ads' ), '&lt;h4&gt;' ),
219
- ));
220
-
221
- return $tags;
222
- }
223
-
224
- /**
225
- * return content of a placement
226
- *
227
- * @since 1.1.0
228
- * @param string $id slug of the display
229
- * @param array $args optional arguments (passed to child)
230
- */
231
- public static function output( $id = '', $args = array() ) {
232
- // get placement data for the slug
233
- if ( $id == '' ) {
234
- return;
235
- }
236
-
237
- $placements = Advanced_Ads::get_ad_placements_array();
238
-
239
- if ( isset( $placements[ $id ]['item'] ) && $placements[ $id ]['item'] !== '' ) {
240
- $_item = explode( '_', $placements[ $id ]['item'] );
241
-
242
- if ( ! isset( $_item[1] ) || empty( $_item[1] ) ) {
243
- return ;
244
- }
245
-
246
- // inject options
247
- if ( isset( $placements[ $id ]['options'] ) && is_array( $placements[ $id ]['options'] ) ) {
248
- foreach ( $placements[ $id ]['options'] as $_k => $_v ) {
249
- if ( ! isset( $args[ $_k ] ) ) {
250
- $args[ $_k ] = $_v;
251
- }
252
- }
253
- }
254
-
255
- // inject placement type
256
- if ( isset( $placements[ $id ]['type'] ) ) {
257
- $args[ 'placement_type' ] = $placements[ $id ]['type'];
258
- }
259
-
260
- // options
261
- $prefix = Advanced_Ads_Plugin::get_instance()->get_frontend_prefix();
262
-
263
- // return either ad or group content
264
- switch ( $_item[0] ) {
265
- case 'ad':
266
- case Advanced_Ads_Select::AD :
267
- // create class from placement id (not if header injection)
268
- if ( ! isset( $placements[ $id ]['type'] ) || $placements[ $id ]['type'] !== 'header' ) {
269
- if ( ! isset( $args['output'] ) ) {
270
- $args['output'] = array();
271
- }
272
- if ( ! isset( $args['output']['class'] ) ) {
273
- $args['output']['class'] = array();
274
- }
275
- $class = $prefix . $id;
276
- if ( ! in_array( $class, $args['output']['class'] ) ) {
277
- $args['output']['class'][] = $class;
278
- }
279
-
280
- $args['output']['placement_id'] = $id;
281
- }
282
-
283
- // fix method id
284
- $_item[0] = Advanced_Ads_Select::AD;
285
- break;
286
-
287
- // avoid loops (programmatical error)
288
- case Advanced_Ads_Select::PLACEMENT :
289
- return;
290
-
291
- case Advanced_Ads_Select::GROUP :
292
- $class = $prefix . $id;
293
- if ( ( isset( $placements[ $id ]['type'] ) && $placements[ $id ]['type'] !== 'header' )
294
- && ( !isset( $args['output']['class'] )
295
- || !is_array( $args['output']['class'] )
296
- || !in_array( $class, $args['output']['class'] ) ) ) {
297
- $args['output']['class'][] = $class;
298
- }
299
-
300
- // create placement id for various features
301
- if ( ! isset( $placements[ $id ]['type'] ) || $placements[ $id ]['type'] !== 'header' ) {
302
- $args['output']['placement_id'] = $id;
303
- }
304
- default:
305
- }
306
-
307
- // add the placement to the global output array
308
- $advads = Advanced_Ads::get_instance();
309
- $advads->current_ads[] = array('type' => 'placement', 'id' => $id, 'title' => $placements[ $id ]['name']);
310
-
311
- return Advanced_Ads_Select::get_instance()->get_ad_by_method( (int) $_item[1], $_item[0], $args );
312
- }
313
- }
314
-
315
- /**
316
- * inject ads directly into the content
317
- *
318
- * @since 1.2.1
319
- * @param string $placement_id id of the placement
320
- * @param arr $options placement options
321
- * @param string $content
322
- * @return type
323
- * @link inspired by http://www.wpbeginner.com/wp-tutorials/how-to-insert-ads-within-your-post-content-in-wordpress/
324
- */
325
- public static function &inject_in_content($placement_id, $options, &$content) {
326
- // test ad is emtpy
327
- $whitespaces = json_decode('"\t\n\r \u00A0"');
328
- $adContent = Advanced_Ads_Select::get_instance()->get_ad_by_method( $placement_id, 'placement', $options );
329
- if ( trim( $adContent, $whitespaces ) === '' ) {
330
- return $content;
331
- }
332
-
333
- // parse document as DOM (fragment - having only a part of an actual post given)
334
- // -TODO may want to verify the wpcharset is supported by server (mb_list_encodings)
335
- // prevent messages from dom parser
336
- $wpCharset = get_bloginfo('charset');
337
- // check if mbstring exists
338
- if ( ! function_exists( 'mb_convert_encoding' ) ) {
339
- if ( $wpCharset === "UTF-8" ) {
340
- $content = htmlspecialchars_decode( htmlentities( $content, ENT_COMPAT, $wpCharset, false ) );
341
- } else {
342
- return $content;
343
- }
344
- } else {
345
- $content = mb_convert_encoding( $content, 'HTML-ENTITIES', $wpCharset );
346
- }
347
-
348
- // check which priority the wpautop filter has; might have been disabled on purpose
349
- $wpautop_priority = has_filter( 'the_content', 'wpautop');
350
- if ( $wpautop_priority && Advanced_Ads_Plugin::get_instance()->get_content_injection_priority() < $wpautop_priority ) {
351
- $content = wpautop( $content );
352
- }
353
-
354
- $dom = new DOMDocument('1.0', $wpCharset);
355
- // may loose some fragments or add autop-like code
356
- libxml_use_internal_errors(true); // avoid notices and warnings - html is most likely malformed
357
- $success = $dom->loadHtml('<!DOCTYPE html><html><meta http-equiv="Content-Type" content="text/html; charset=' . $wpCharset . '" /><body>' . $content);
358
- libxml_use_internal_errors(false);
359
- if ($success !== true) {
360
- // -TODO handle cases were dom-parsing failed (at least inform user)
361
- return $content;
362
- }
363
-
364
- // parse arguments
365
- $tag = isset($options['tag']) ? $options['tag'] : 'p';
366
- $tag = preg_replace('/[^a-z0-9]/i', '', $tag); // simplify tag
367
-
368
- // allow more complex xPath expression
369
- $tag = apply_filters( 'advanced-ads-placement-content-injection-xpath', $tag, $options );
370
-
371
- if ( $tag === 'pwithoutimg' ) {
372
- $tag = 'p[not(descendant::img)]';
373
- }
374
-
375
- // only has before and after
376
- $before = isset($options['position']) && $options['position'] === 'before';
377
- $paragraph_id = isset($options['index']) ? $options['index'] : 1;
378
- $paragraph_id = max( 1, (int) $paragraph_id );
379
- $paragraph_select_from_bottom = isset($options['start_from_bottom']) && $options['start_from_bottom'];
380
-
381
- // select positions
382
- $xpath = new DOMXPath($dom);
383
- $items = $xpath->query('/html/body/' . $tag);
384
- $offset = null;
385
-
386
- $options = array(
387
- 'allowEmpty' => false, // whether the tag can be empty to be counted
388
- );
389
- // if there are too few items at this level test nesting
390
- $options['itemLimit'] = $tag === 'p' ? 2 : 1;
391
-
392
- // allow hooks to change some options
393
- $options = apply_filters(
394
- 'advanced-ads-placement-content-injection-options',
395
- $options,
396
- $tag );
397
-
398
- if ($items->length < $options['itemLimit'] ) {
399
- $items = $xpath->query('/html/body/*/' . $tag);
400
- }
401
- // try third level
402
- if ($items->length < $options['itemLimit']) {
403
- $items = $xpath->query('/html/body/*/*/' . $tag);
404
- }
405
- // try all levels as last resort
406
- if ( $items->length < $options['itemLimit'] ) {
407
- $items = $xpath->query( '//' . $tag );
408
- }
409
-
410
- // allow to select other elements
411
- $items = apply_filters( 'advanced-ads-placement-content-injection-items', $items, $xpath, $tag );
412
-
413
- // filter empty tags from items
414
- $paragraphs = array();
415
- foreach ($items as $item) {
416
- if ( $options['allowEmpty'] || ( isset($item->textContent) && trim($item->textContent, $whitespaces) !== '' ) ) {
417
- $paragraphs[] = $item;
418
- }
419
- }
420
-
421
- $paragraph_count = count($paragraphs);
422
- if ($paragraph_count >= $paragraph_id) {
423
- $offset = $paragraph_select_from_bottom ? $paragraph_count - $paragraph_id : $paragraph_id - 1;
424
-
425
- // convert HTML to XML!
426
- $adDom = new DOMDocument('1.0', $wpCharset);
427
- libxml_use_internal_errors(true);
428
- // replace `</` with `<\/` in ad content when placed within `document.write()` to prevent code from breaking
429
- // source for this regex: http://stackoverflow.com/questions/17852537/preg-replace-only-specific-part-of-string
430
- $adContent = preg_replace('#(document.write.+)</(.*)#', '$1<\/$2', $adContent); // escapes all closing html tags
431
- // $adContent = preg_replace('#(document.write.+)</sc(.*)#', '$1<\/sc$2', $adContent); // only escapes closing </script> tags
432
- // $adContent = preg_replace('#(document.write[^<^)]+)</sc(.*)#', '$1<\/sc$2', $adContent); // too restrict, doesn’t work when beginning <script> tag is in the same line
433
- $adDom->loadHtml('<!DOCTYPE html><html><meta http-equiv="Content-Type" content="text/html; charset=' . $wpCharset . '" /><body>' . $adContent);
434
- // log errors
435
- if ( defined ( 'WP_DEBUG' ) && WP_DEBUG && current_user_can( 'advanced_ads_manage_options') && libxml_get_last_error() instanceof LibXMLError ){
436
- Advanced_Ads::log( 'possible content injection error for placement "' . $placement_id . '": ' . print_r( libxml_get_last_error(), true ) );
437
- }
438
-
439
- // inject
440
- $node = apply_filters( 'advanced-ads-placement-content-injection-node', $paragraphs[$offset], $tag, $before );
441
- if ($before) {
442
- $refNode = $node;
443
-
444
- foreach ( $adDom->getElementsByTagName( 'body' )->item( 0 )->childNodes as $importedNode ) {
445
- $importedNode = $dom->importNode( $importedNode, true );
446
- $refNode->parentNode->insertBefore( $importedNode, $refNode );
447
- }
448
- } else {
449
- // append before next node or as last child to body
450
- $refNode = $node->nextSibling;
451
- if (isset($refNode)) {
452
-
453
- foreach ( $adDom->getElementsByTagName( 'body' )->item( 0 )->childNodes as $importedNode ) {
454
- $importedNode = $dom->importNode( $importedNode, true );
455
- $refNode->parentNode->insertBefore( $importedNode, $refNode );
456
- }
457
-
458
- } else {
459
- // append to body; -TODO using here that we only select direct children of the body tag
460
- foreach ( $adDom->getElementsByTagName( 'body' )->item( 0 )->childNodes as $importedNode ) {
461
- $importedNode = $dom->importNode( $importedNode, true );
462
- $node->parentNode->appendChild( $importedNode );
463
- }
464
- }
465
- }
466
-
467
- libxml_use_internal_errors(false);
468
- }
469
-
470
- // convert to text-representation
471
- $content = $dom->saveHTML();
472
- // remove head and tail (required for dom parser but unwanted for content)
473
- $content = substr($content, stripos($content, '<body>') + 6);
474
- $content = str_replace(array('</body>', '</html>'), '', $content);
475
-
476
- // no fall-back desired: if there are too few paragraphs do nothing
477
-
478
- // fix shortcode quotes (malformed by backend editor)
479
- $matches = array();
480
- if (0 < preg_match_all('/\[[^]]+\]/Siu', $content, $matches, PREG_OFFSET_CAPTURE) && isset($matches[0])) {
481
- foreach ($matches[0] as $match) {
482
- $offset = $match[1];
483
- $content = substr($content, 0, $offset) . str_replace(array('“', '″', '&#8220;', '&quote;', '&#8243;'), '"', $match[0]) . substr($content, $offset + strlen($match[0]));
484
- }
485
- }
486
-
487
- return $content;
488
- }
489
-
490
- /**
491
- * check if the placement can be displayed
492
- *
493
- * @since 1.6.9
494
- * @param int $id placement id
495
- * @return bool true if placement can be displayed
496
- */
497
- static function can_display( $id = 0 ){
498
- if ( ! isset($id) || $id === 0 ) {
499
- return true;
500
- }
501
-
502
- return apply_filters( 'advanced-ads-can-display-placement', true, $id );
503
- }
504
-
505
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/ad_type_abstract.php CHANGED
@@ -13,112 +13,112 @@
13
  * see ad_type_content.php for an example on ad type
14
  *
15
  */
16
- class Advanced_Ads_Ad_Type_Abstract {
17
 
18
- /**
19
- * ID - internal type of the ad type
20
- *
21
- * must be static so set your own ad type ID here
22
- * use slug like format, only lower case, underscores and hyphens
23
- *
24
- * @since 1.0.0
25
- */
26
- public $ID = '';
27
 
28
- /**
29
- * public title
30
- *
31
- * will be set within __construct so one can localize it
32
- *
33
- * @since 1.0.0
34
- */
35
- public $title = '';
36
 
37
- /**
38
- * description of the ad type
39
- *
40
- * will be set within __construct so one can localize it
41
- *
42
- * @since 1.0.0
43
- */
44
- public $description = '';
45
 
46
- /**
47
- * parameters of the ad
48
- *
49
- * defaults are set in construct
50
- */
51
- public $parameters = array();
52
 
53
- /**
54
- * set basic attributes
55
- *
56
- * @since 1.0.0
57
- */
58
- public function __construct() {
59
- // initiall
60
- }
61
 
62
- /**
63
- * output for the ad parameters metabox
64
- *
65
- * @param obj $ad ad object
66
- * @since 1.0.0
67
- */
68
- public function render_parameters($ad){
69
- /**
70
- * this will be loaded by default or using ajax when changing the ad type radio buttons
71
- * echo the output right away here
72
- * name parameters must be in the "advanced_ads" array
73
- */
74
- }
75
 
76
- /**
77
- * sanitize ad parameters on save
78
- *
79
- * @param arr $parameters array with ad parameters
80
- * @return arr $parameters sanitized ad parameters
81
- * @since 1.0.0
82
- */
83
- public function sanitize_parameters($parameters = array()){
84
- // no specific filter for content ad parameters, because there are no
85
- return $parameters;
86
- }
87
 
88
- /**
89
- * sanitize content field on save
90
- *
91
- * @param str $content ad content
92
- * @return str $content sanitized ad content
93
- * @since 1.0.0
94
- */
95
- public function sanitize_content($content = ''){
96
 
97
- // remove slashes from content
98
- return $content = wp_unslash( $content );
99
- }
100
 
101
- /**
102
- * load content field for the ad
103
- *
104
- * @param obj $post WP post object
105
- * @return str $content ad content
106
- * @since 1.0.0
107
- */
108
- public function load_content($post){
109
 
110
- return $post->post_content;
111
- }
112
 
113
- /**
114
- * prepare the ads frontend output
115
- *
116
- * @param obj $ad ad object
117
- * @return str $content ad content prepared for frontend output
118
- * @since 1.0.0
119
- */
120
- public function prepare_output($ad){
121
- return $ad->content;
122
- }
123
 
124
  }
13
  * see ad_type_content.php for an example on ad type
14
  *
15
  */
16
+ class Advads_Ad_Type_Abstract {
17
 
18
+ /**
19
+ * ID - internal type of the ad type
20
+ *
21
+ * must be static so set your own ad type ID here
22
+ * use slug like format, only lower case, underscores and hyphens
23
+ *
24
+ * @since 1.0.0
25
+ */
26
+ public $ID = '';
27
 
28
+ /**
29
+ * public title
30
+ *
31
+ * will be set within __construct so one can localize it
32
+ *
33
+ * @since 1.0.0
34
+ */
35
+ public $title = '';
36
 
37
+ /**
38
+ * description of the ad type
39
+ *
40
+ * will be set within __construct so one can localize it
41
+ *
42
+ * @since 1.0.0
43
+ */
44
+ public $description = '';
45
 
46
+ /**
47
+ * parameters of the ad
48
+ *
49
+ * defaults are set in construct
50
+ */
51
+ public $parameters = array();
52
 
53
+ /**
54
+ * set basic attributes
55
+ *
56
+ * @since 1.0.0
57
+ */
58
+ public function __construct() {
59
+ // initiall
60
+ }
61
 
62
+ /**
63
+ * output for the ad parameters metabox
64
+ *
65
+ * @param obj $ad ad object
66
+ * @since 1.0.0
67
+ */
68
+ public function render_parameters($ad){
69
+ /**
70
+ * this will be loaded by default or using ajax when changing the ad type radio buttons
71
+ * echo the output right away here
72
+ * name parameters must be in the "advanced_ads" array
73
+ */
74
+ }
75
 
76
+ /**
77
+ * sanitize ad parameters on save
78
+ *
79
+ * @param arr $parameters array with ad parameters
80
+ * @return arr $parameters sanitized ad parameters
81
+ * @since 1.0.0
82
+ */
83
+ public function sanitize_parameters($parameters = array()){
84
+ // no specific filter for content ad parameters, because there are no
85
+ return $parameters;
86
+ }
87
 
88
+ /**
89
+ * sanitize content field on save
90
+ *
91
+ * @param str $content ad content
92
+ * @return str $content sanitized ad content
93
+ * @since 1.0.0
94
+ */
95
+ public function sanitize_content($content = ''){
96
 
97
+ // remove slashes from content
98
+ return $content = wp_unslash($content);
99
+ }
100
 
101
+ /**
102
+ * load content field for the ad
103
+ *
104
+ * @param obj $post WP post object
105
+ * @return str $content ad content
106
+ * @since 1.0.0
107
+ */
108
+ public function load_content($post){
109
 
110
+ return $post->post_content;
111
+ }
112
 
113
+ /**
114
+ * prepare the ads frontend output
115
+ *
116
+ * @param obj $ad ad object
117
+ * @return str $content ad content prepared for frontend output
118
+ * @since 1.0.0
119
+ */
120
+ public function prepare_output($ad){
121
+ return $ad->content;
122
+ }
123
 
124
  }
classes/ad_type_content.php CHANGED
@@ -14,121 +14,70 @@
14
  * see also includes/ad-type-abstract.php for basic object
15
  *
16
  */
17
- class Advanced_Ads_Ad_Type_Content extends Advanced_Ads_Ad_Type_Abstract{
18
-
19
- /**
20
- * ID - internal type of the ad type
21
- *
22
- * must be static so set your own ad type ID here
23
- * use slug like format, only lower case, underscores and hyphens
24
- *
25
- * @since 1.0.0
26
- */
27
- public $ID = 'content';
28
-
29
- /**
30
- * set basic attributes
31
- *
32
- * @since 1.0.0
33
- */
34
- public function __construct() {
35
- $this->title = __( 'Rich Content', 'advanced-ads' );
36
- $this->description = __( 'The full content editor from WordPress with all features like shortcodes, image upload or styling, but also simple text/html mode for scripts and code.', 'advanced-ads' );
37
- $this->parameters = array(
38
- 'content' => ''
39
- );
40
- }
41
-
42
- /**
43
- * output for the ad parameters metabox
44
- *
45
- * this will be loaded using ajax when changing the ad type radio buttons
46
- * echo the output right away here
47
- * name parameters must be in the "advanced_ads" array
48
- *
49
- * @param obj $ad ad object
50
- * @since 1.0.0
51
- */
52
- public function render_parameters($ad){
53
- // load tinymc content exitor
54
- $content = (isset($ad->content)) ? $ad->content : '';
55
-
56
- /**
57
- * build the tinymc editor
58
- * @link http://codex.wordpress.org/Function_Reference/wp_editor
59
- *
60
- * don’t build it when ajax is used; display message and buttons instead
61
- */
62
- if ( defined( 'DOING_AJAX' ) ){ ?>
63
- <textarea id="advads-ad-content-plain" style="display:none;" cols="40" rows="10" name="advanced_ad[content]"><?php echo $content; ?></textarea>
64
- <?php
65
- } else {
66
- $args = array(
67
- 'textarea_name' => 'advanced_ad[content]',
68
- 'textarea_rows' => 10,
69
- 'drag_drop_upload' => true
70
- );
71
- wp_editor( $content, 'advanced-ad-parameters-content', $args );
72
- } ?><br class="clear"/><?php
73
- }
74
-
75
- /**
76
- * sanitize content field on save
77
- *
78
- * @param str $content ad content
79
- * @return str $content sanitized ad content
80
- * @since 1.0.0
81
- */
82
- public function sanitize_content($content = ''){
83
-
84
- // remove slashes from content
85
- $content = wp_unslash( $content );
86
-
87
- // use WordPress core content filter
88
- return $content = apply_filters( 'content_save_pre', $content );
89
- }
90
-
91
- /**
92
- * prepare the ads frontend output
93
- *
94
- * @param obj $ad ad object
95
- * @return str $content ad content prepared for frontend output
96
- * @since 1.0.0
97
- */
98
- public function prepare_output($ad){
99
-
100
- // apply functions normally running through the_content filter
101
- // the_content filter is not used here because it created an infinite loop (ads within ads for "before content" and other auto injections)
102
- // maybe the danger is not here yet, but changing it to use the_content filter changes a lot
103
-
104
- $output = $ad->content;
105
-
106
- if ( isset( $GLOBALS['wp_embed'] ) ) {
107
- // temporarily replace the global $post variable with the current ad (post)
108
- $old_post = $GLOBALS['post'];
109
- $GLOBALS['post'] = $ad->id;
110
-
111
- // get the [embed] shortcode to run before wpautop()
112
- $output = $GLOBALS['wp_embed']->run_shortcode( $output );
113
- // attempts to embed all URLs in a post
114
- $output = $GLOBALS['wp_embed']->autoembed( $output );
115
-
116
- $GLOBALS['post'] = $old_post;
117
- }
118
-
119
- $output = wptexturize( $output );
120
- $output = convert_smilies( $output );
121
- $output = convert_chars( $output );
122
- $output = wpautop( $output );
123
- $output = shortcode_unautop( $output );
124
- $output = do_shortcode( $output );
125
- $output = prepend_attachment( $output );
126
- // make included images responsive, since WordPress 4.4
127
- if( ! defined( 'ADVADS_DISABLE_RESPONSIVE_IMAGES' ) && function_exists( 'wp_make_content_images_responsive' ) ){
128
- $output = wp_make_content_images_responsive( $output );
129
- }
130
-
131
- return $output;
132
- }
133
 
134
  }
14
  * see also includes/ad-type-abstract.php for basic object
15
  *
16
  */
17
+ class Advads_Ad_Type_Content extends Advads_Ad_Type_Abstract{
18
+
19
+ /**
20
+ * ID - internal type of the ad type
21
+ *
22
+ * must be static so set your own ad type ID here
23
+ * use slug like format, only lower case, underscores and hyphens
24
+ *
25
+ * @since 1.0.0
26
+ */
27
+ public $ID = 'content';
28
+
29
+ /**
30
+ * set basic attributes
31
+ *
32
+ * @since 1.0.0
33
+ */
34
+ public function __construct() {
35
+ $this->title = __('Rich Content', Advanced_Ads::TD);
36
+ $this->description = __('The full content editor from WordPress with all features like image upload or styling, but also simple text/html mode for scripts and code.', Advanced_Ads::TD);
37
+ $this->parameters = array(
38
+ 'content' => ''
39
+ );
40
+ }
41
+
42
+ /**
43
+ * output for the ad parameters metabox
44
+ *
45
+ * this will be loaded using ajax when changing the ad type radio buttons
46
+ * echo the output right away here
47
+ * name parameters must be in the "advanced_ads" array
48
+ *
49
+ * @param obj $ad ad object
50
+ * @since 1.0.0
51
+ */
52
+ public function render_parameters($ad){
53
+ // load tinymc content exitor
54
+ $content = (isset($ad->content)) ? $ad->content : '';
55
+ /**
56
+ * build the tinymc editor
57
+ * @link http://codex.wordpress.org/Function_Reference/wp_editor
58
+ */
59
+ $args = array(
60
+ 'textarea_name' => 'advanced_ad[content]',
61
+ 'textarea_rows' => 10,
62
+ 'drag_drop_upload' => true
63
+ );
64
+ wp_editor($content, 'advanced-ad-parameters-content', $args);
65
+ }
66
+
67
+ /**
68
+ * sanitize content field on save
69
+ *
70
+ * @param str $content ad content
71
+ * @return str $content sanitized ad content
72
+ * @since 1.0.0
73
+ */
74
+ public function sanitize_content($content = ''){
75
+
76
+ // remove slashes from content
77
+ $content = wp_unslash($content);
78
+
79
+ // use WordPress core content filter
80
+ return $content = apply_filters('content_save_pre', $content);
81
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
 
83
  }
classes/ad_type_group.php DELETED
@@ -1,109 +0,0 @@
1
- <?php
2
- /**
3
- * Advanced Ads Plain Ad Type
4
- *
5
- * @package Advanced_Ads
6
- * @author Thomas Maier <thomas.maier@webgilde.com>
7
- * @license GPL-2.0+
8
- * @link http://webgilde.com
9
- * @copyright 2014-2016 Thomas Maier, webgilde GmbH
10
- *
11
- * Class containing information about the plain text/code ad type
12
- *
13
- * see ad-type-content.php for a better sample on ad type
14
- *
15
- * @since 1.7.1.1
16
- *
17
- */
18
- class Advanced_Ads_Ad_Type_Group extends Advanced_Ads_Ad_Type_Abstract{
19
-
20
- /**
21
- * ID - internal type of the ad type
22
- *
23
- */
24
- public $ID = 'group';
25
-
26
- /**
27
- * set basic attributes
28
- */
29
- public function __construct() {
30
- $this->title = __( 'Ad Group', 'advanced-ads' );
31
- $this->description = __( 'Choose an existing ad group. Use this type when you want to assign the same display and visitor conditions to all ads in that group.', 'advanced-ads' );
32
- $this->parameters = array(
33
- 'group_id' => 0
34
- );
35
-
36
- // on save, remove the group in which the ad is itself to prevent infinite loops
37
- add_action( 'save_post', array($this, 'remove_from_ad_group'), 1 );
38
- }
39
-
40
- /**
41
- * when saving the ad, remove it from the ad group, if this is the group assigned as ad content
42
- */
43
- public function remove_from_ad_group( $post_id ){
44
-
45
- if( ! isset( $_POST['post_type'] ) || $_POST['post_type'] !== Advanced_Ads::POST_TYPE_SLUG ){
46
- return;
47
- }
48
-
49
- if( isset( $_POST[ 'advanced_ad' ]['output']['group_id'] ) ){
50
- $group_id = intval( $_POST[ 'advanced_ad' ]['output']['group_id'] );
51
- if( isset( $_POST['tax_input']['advanced_ads_groups'] ) ){
52
- if(( $key = array_search( $group_id, $_POST['tax_input']['advanced_ads_groups'])) !== false ) {
53
- $res = wp_remove_object_terms( $post_id, $group_id, Advanced_Ads::AD_GROUP_TAXONOMY );
54
- unset( $_POST['tax_input']['advanced_ads_groups'][$key] );
55
- }
56
- }
57
- }
58
- }
59
-
60
-
61
- /**
62
- * output for the ad parameters metabox
63
- *
64
- * this will be loaded using ajax when changing the ad type radio buttons
65
- * echo the output right away here
66
- * name parameters must be in the "advanced_ads" array
67
- *
68
- * @param obj $ad ad object
69
- */
70
- public function render_parameters($ad){
71
-
72
- $group_id = ( isset( $ad->output['group_id'] ) ) ? $ad->output['group_id'] : '';
73
-
74
- $select = array();
75
- $model = Advanced_Ads::get_instance()->get_model();
76
-
77
- // load all ad groups
78
- $groups = $model->get_ad_groups();
79
-
80
- if( ! is_array( $groups ) || ! count( $groups ) ){
81
- return;
82
- }
83
-
84
- ?><label for="advads-group-id" class="label"><?php _e('ad group', 'advanced-ads'); ?></label><div><select name="advanced_ad[output][group_id]" id="advads-group-id"><?php
85
-
86
- foreach ( $groups as $_group ) {
87
- ?><option value="<?php echo $_group->term_id; ?>" <?php selected( $_group->term_id, $group_id ); ?>><?php echo $_group->name; ?></option><?php
88
- }
89
-
90
- ?></select></div><hr/><?php
91
-
92
- }
93
-
94
- /**
95
- * prepare the ads frontend output
96
- *
97
- * @param obj $ad ad object
98
- * @return str $content ad content prepared for frontend output
99
- */
100
- public function prepare_output($ad){
101
-
102
- $group_id = ( isset( $ad->output['group_id'] ) ) ? absint( $ad->output['group_id'] ) : 0;
103
-
104
- if( $group_id ){
105
- return get_ad_group( $group_id );
106
- }
107
- }
108
-
109
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/ad_type_image.php DELETED
@@ -1,158 +0,0 @@
1
- <?php
2
- /**
3
- * Advanced Ads Image Ad Type
4
- *
5
- * @package Advanced_Ads
6
- * @author Thomas Maier <thomas.maier@webgilde.com>
7
- * @license GPL-2.0+
8
- * @link http://webgilde.com
9
- * @copyright 2015 Thomas Maier, webgilde GmbH
10
- * @since 1.6.10
11
- *
12
- * Class containing information about the content ad type
13
- * this should also work as an example for other ad types
14
- *
15
- */
16
- class Advanced_Ads_Ad_Type_Image extends Advanced_Ads_Ad_Type_Abstract{
17
-
18
- /**
19
- * ID - internal type of the ad type
20
- *
21
- * must be static so set your own ad type ID here
22
- * use slug like format, only lower case, underscores and hyphens
23
- *
24
- * @since 1.6.10
25
- */
26
- public $ID = 'image';
27
-
28
- /**
29
- * set basic attributes
30
- *
31
- * @since 1.6.10
32
- */
33
- public function __construct() {
34
- $this->title = __( 'Image Ad', ADVADS_SLUG );
35
- $this->description = __( 'Ads in various image formats.', ADVADS_SLUG );
36
- $this->parameters = array(
37
- 'image_url' => '',
38
- 'image_title' => '',
39
- 'image_alt' => '',
40
- );
41
- }
42
-
43
- /**
44
- * output for the ad parameters metabox
45
- *
46
- * @param obj $ad ad object
47
- * @since 1.6.10
48
- */
49
- public function render_parameters($ad){
50
- // load tinymc content exitor
51
- $id = ( isset( $ad->output['image_id'] ) ) ? $ad->output['image_id'] : '';
52
- $url = ( isset( $ad->url ) ) ? esc_url( $ad->url ) : '';
53
-
54
- ?><p><button href="#" class="advads_image_upload button button-secondary" type="button" data-uploader-title="<?php
55
- _e( 'Insert File', ADVADS_SLUG ); ?>" data-uploader-button-text="<?php _e( 'Insert', ADVADS_SLUG ); ?>" onclick="return false;"><?php _e( 'select image', ADVADS_SLUG ); ?></button>
56
- <a id="advads-image-edit-link" href="<?php if( $id ){ echo get_edit_post_link( $id ); } ?>"><?php _e('edit', ADVADS_SLUG ); ?></a>
57
- </p>
58
- <input type="hidden" name="advanced_ad[output][image_id]" value="<?php echo $id; ?>" id="advads-image-id"/>
59
- <div id="advads-image-preview">
60
- <?php $this->create_image_tag( $id ); ?>
61
- </div>
62
-
63
- <?php // don’t show if tracking plugin enabled
64
- if( ! defined( 'AAT_VERSION' )) : ?>
65
- <p><label for="advads-url"><?php _e( 'url', ADVADS_SLUG ); ?></label><br/>
66
- <input type="url" name="advanced_ad[url]" id="advads-url" value="<?php echo $url; ?>"/></p>
67
- <p><?php printf(__( 'Pro: Open this url in a new window and track impressions and clicks with the <a href="%s" target="_blank">Tracking add-on</a>', ADVADS_SLUG ), ADVADS_URL . 'add-ons/tracking/#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-image-tracking'); ?></p>
68
- <?php endif;
69
- }
70
-
71
- /**
72
- * render image tag
73
- *
74
- * @param int $attachment_id post id of the image
75
- * @since 1.6.10
76
- */
77
- public function create_image_tag( $attachment_id ){
78
-
79
- $image = wp_get_attachment_image_src( $attachment_id, 'full' );
80
- if ( $image ) {
81
- list( $src, $width, $height ) = $image;
82
- $hwstring = image_hwstring($width, $height);
83
- $attachment = get_post($attachment_id);
84
- $alt = trim(strip_tags( get_post_meta($attachment_id, '_wp_attachment_image_alt', true) ));
85
- $title = trim(strip_tags( $attachment->post_title )); // Finally, use the title
86
-
87
- global $wp_current_filter;
88
-
89
- $more_attributes = '';
90
- // create srcset and sizes attributes if we are in the the_content filter and in WordPress 4.4
91
- if( isset( $wp_current_filter )
92
- && in_array( 'the_content', $wp_current_filter )
93
- && ! defined( 'ADVADS_DISABLE_RESPONSIVE_IMAGES' )){
94
- if( function_exists( 'wp_get_attachment_image_srcset' ) ){
95
- $more_attributes .= ' srcset=\'' . wp_get_attachment_image_srcset( $attachment_id, 'full' ) . '\'';
96
- }
97
- if( function_exists( 'wp_get_attachment_image_sizes' ) ){
98
- $more_attributes .= ' sizes=\'' . wp_get_attachment_image_sizes( $attachment_id, 'full' ) . '\'';
99
- }
100
- }
101
-
102
- $more_attributes = apply_filters( 'advanced-ads-ad-image-tag-attributes', $more_attributes );
103
-
104
- echo rtrim("<img $hwstring") . " src='$src' alt='$alt' title='$title' $more_attributes/>";
105
- }
106
- }
107
-
108
- /**
109
- * render image icon for overview pages
110
- *
111
- * @param int $attachment_id post id of the image
112
- * @since 1.7.4
113
- */
114
- public function create_image_icon( $attachment_id ){
115
-
116
- $image = wp_get_attachment_image_src( $attachment_id, 'medium', true );
117
- if ( $image ) {
118
- list( $src, $width, $height ) = $image;
119
-
120
- // scale down width or height to max 100px
121
- if( $width > $height ){
122
- $height = absint( $height / ( $width / 100 ) );
123
- $width = 100;
124
- } else {
125
- $width = absint( $width / ( $height / 100 ) );
126
- $height = 100;
127
- }
128
-
129
- $hwstring = image_hwstring($width, $height);
130
- $attachment = get_post($attachment_id);
131
- $alt = trim(strip_tags( get_post_meta($attachment_id, '_wp_attachment_image_alt', true) ));
132
- $title = trim(strip_tags( $attachment->post_title )); // Finally, use the title
133
-
134
- echo rtrim("<img $hwstring") . " src='$src' alt='$alt' title='$title'/>";
135
- }
136
- }
137
-
138
- /**
139
- * prepare the ads frontend output by adding <object> tags
140
- *
141
- * @param obj $ad ad object
142
- * @return str $content ad content prepared for frontend output
143
- * @since 1.6.10.
144
- */
145
- public function prepare_output($ad){
146
-
147
- $id = ( isset( $ad->output['image_id'] ) ) ? absint( $ad->output['image_id'] ) : '';
148
- $url = ( isset( $ad->url ) ) ? esc_url( $ad->url ) : '';
149
-
150
- ob_start();
151
- if( ! defined( 'AAT_VERSION' ) && $url ){ echo '<a href="'. $url .'">'; }
152
- echo $this->create_image_tag( $id );
153
- if( ! defined( 'AAT_VERSION' ) && $url ){ echo '</a>'; }
154
-
155
- return ob_get_clean();
156
- }
157
-
158
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/ad_type_plain.php CHANGED
@@ -13,101 +13,63 @@
13
  * see ad-type-content.php for a better sample on ad type
14
  *
15
  */
16
- class Advanced_Ads_Ad_Type_Plain extends Advanced_Ads_Ad_Type_Abstract{
17
 
18
- /**
19
- * ID - internal type of the ad type
20
- * *
21
- * @since 1.0.0
22
- */
23
- public $ID = 'plain';
24
 
25
- /**
26
- * set basic attributes
27
- *
28
- * @since 1.0.0
29
- */
30
- public function __construct() {
31
- $this->title = __( 'Plain Text and Code', 'advanced-ads' );
32
- $this->description = __( 'Simple text editor without any filters. You might use it to display unfiltered content, php code or javascript. Shortcodes and other WordPress content field magic does not work here.', 'advanced-ads' );
33
- $this->parameters = array(
34
- 'content' => ''
35
- );
36
- }
37
 
38
- /**
39
- * output for the ad parameters metabox
40
- *
41
- * this will be loaded using ajax when changing the ad type radio buttons
42
- * echo the output right away here
43
- * name parameters must be in the "advanced_ads" array
44
- *
45
- * @param obj $ad ad object
46
- * @since 1.0.0
47
- */
48
- public function render_parameters($ad){
49
- // load content
50
- $content = (isset($ad->content)) ? $ad->content : '';
 
 
 
 
 
 
 
 
51
 
52
- ?><p class="description"><?php _e( 'Insert plain text or code into this field.', 'advanced-ads' ); ?></p>
53
- <textarea id="advads-ad-content-plain" cols="40" rows="10" name="advanced_ad[content]"><?php echo $content; ?></textarea>
54
- <input type="hidden" name="advanced_ad[output][allow_php]" value="0"/>
55
- <?php $this->render_php_allow($ad);
56
- }
57
-
58
- /**
59
- * render php output field
60
- *
61
- * @param $ad Advanced_Ads_Ad object
62
- */
63
- public function render_php_allow( $ad ){
64
-
65
- if( defined( 'ADVANCED_ADS_DISALLOW_PHP' ) ){
66
- return;
67
- }
68
-
69
- $content = (isset($ad->content)) ? $ad->content : '';
70
-
71
- // check if php is allowed
72
- if ( isset($ad->output['allow_php']) ){
73
- $allow_php = absint( $ad->output['allow_php'] );
74
- } else {
75
- /**
76
- * for compatibility for ads with php added prior to 1.3.18
77
- * check if there is php code in the content
78
- */
79
- if ( preg_match( '/\<\?php/', $content ) ){
80
- $allow_php = 1;
81
- } else {
82
- $allow_php = 0;
83
- }
84
- }
85
- ?>
86
- <label class="label" for="advads-parameters-php"><?php _e( 'Allow PHP' ); ?></label>
87
- <div>
88
- <input id="advads-parameters-php" type="checkbox" name="advanced_ad[output][allow_php]" value="1" <?php checked( 1, $allow_php ); ?>/><?php _e( 'Execute PHP code (wrapped in <code>&lt;?php ?&gt;</code>)', 'advanced-ads' );
89
- ?></div><hr/><?php
90
-
91
- }
92
-
93
- /**
94
- * prepare the ads frontend output
95
- *
96
- * @param obj $ad ad object
97
- * @return str $content ad content prepared for frontend output
98
- * @since 1.0.0
99
- */
100
- public function prepare_output($ad){
101
-
102
- // evaluate the code as php if setting was never saved or is allowed
103
- if ( ! defined( 'ADVANCED_ADS_DISALLOW_PHP' ) && ( ! isset($ad->output['allow_php']) || $ad->output['allow_php'] ) ){
104
- ob_start();
105
- eval('?>'.$ad->content);
106
- $content = ob_get_clean();
107
- } else {
108
- $content = $ad->content;
109
- }
110
- return $content;
111
- }
112
 
113
  }
13
  * see ad-type-content.php for a better sample on ad type
14
  *
15
  */
16
+ class Advads_Ad_Type_Plain extends Advads_Ad_Type_Abstract{
17
 
18
+ /**
19
+ * ID - internal type of the ad type
20
+ * *
21
+ * @since 1.0.0
22
+ */
23
+ public $ID = 'plain';
24
 
25
+ /**
26
+ * set basic attributes
27
+ *
28
+ * @since 1.0.0
29
+ */
30
+ public function __construct() {
31
+ $this->title = __('Plain Text and Code', Advanced_Ads::TD);
32
+ $this->description = __('Simple text editor without any filters. You might use it to display unfiltered content, php code or javascript. Shortcodes and other WordPress content field magic does not work here.', Advanced_Ads::TD);
33
+ $this->parameters = array(
34
+ 'content' => ''
35
+ );
36
+ }
37
 
38
+ /**
39
+ * output for the ad parameters metabox
40
+ *
41
+ * this will be loaded using ajax when changing the ad type radio buttons
42
+ * echo the output right away here
43
+ * name parameters must be in the "advanced_ads" array
44
+ *
45
+ * @param obj $ad ad object
46
+ * @since 1.0.0
47
+ */
48
+ public function render_parameters($ad){
49
+ // load tinymc content exitor
50
+ $content = (isset($ad->content)) ? $ad->content : '';
51
+ /**
52
+ * build the tinymc editor
53
+ * @link http://codex.wordpress.org/Function_Reference/wp_editor
54
+ */
55
+ ?><p class="description"><?php _e('Insert plain text or code into this field.', Advanced_Ads::TD); ?></p>
56
+ <textarea id="advads-ad-content-plain" cols="40" rows="10" name="advanced_ad[content]"><?php echo $content; ?></textarea>
57
+ <?php
58
+ }
59
 
60
+ /**
61
+ * prepare the ads frontend output
62
+ *
63
+ * @param obj $ad ad object
64
+ * @return str $content ad content prepared for frontend output
65
+ * @since 1.0.0
66
+ */
67
+ public function prepare_output($ad){
68
+ // evaluate the code as php
69
+ ob_start();
70
+ eval('?>'.$ad->content);
71
+ $content = ob_get_clean();
72
+ return $content;
73
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
 
75
  }
classes/checks.php DELETED
@@ -1,233 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * checks for various things
5
- *
6
- * @since 1.6.9
7
- */
8
- class Advanced_Ads_Checks {
9
-
10
- /**
11
- * php version minimum 5.3
12
- *
13
- * @return bool true if 5.3 and higher
14
- */
15
- public static function php_version_minimum(){
16
-
17
- if (version_compare(phpversion(), '5.3', '>=')) {
18
- return true;
19
- }
20
-
21
- return false;
22
- }
23
-
24
- /**
25
- * caching used
26
- *
27
- * @return bool true if active
28
- */
29
- public static function cache(){
30
-
31
- if( ( defined( 'WP_CACHE' ) && WP_CACHE ) // general cache constant
32
- || defined('W3TC') // W3 Total Cache
33
- || function_exists( 'wp_super_cache_text_domain' ) // WP SUper Cache
34
- || class_exists('zencache\\plugin') // ZenCache
35
- ){
36
- return true;
37
- }
38
-
39
- return false;
40
- }
41
-
42
- /**
43
- * WordPress update available
44
- *
45
- * @return bool true if WordPress update available
46
- */
47
- public static function wp_update_available(){
48
-
49
- $update_data = wp_get_update_data();
50
- $count = absint( $update_data['counts']['wordpress'] );
51
-
52
- if( $count ){
53
- return true;
54
- }
55
-
56
- return false;
57
- }
58
-
59
- /**
60
- * any plugin updates available
61
- *
62
- * @return bool true if plugin updates are available
63
- */
64
- public static function plugin_updates_available(){
65
-
66
- $update_data = wp_get_update_data();
67
- $count = absint( $update_data['counts']['plugins'] );
68
-
69
- if( $count ){
70
- return true;
71
- }
72
-
73
- return false;
74
- }
75
-
76
- /**
77
- * check if license keys are missing or invalid
78
- *
79
- * @since 1.6.6
80
- * @update 1.6.9 moved from Advanced_Ads_Plugin
81
- * @return true if there are missing licenses
82
- */
83
- public static function licenses_invalid(){
84
-
85
- $add_ons = apply_filters( 'advanced-ads-add-ons', array() );
86
-
87
- if( $add_ons === array() ) {
88
- return false;
89
- }
90
-
91
- foreach( $add_ons as $_add_on_key => $_add_on ){
92
- $status = Advanced_Ads_Admin::get_instance()->get_license_status( $_add_on['options_slug'] );
93
-
94
- // don’t check if license is valid
95
- if( $status === 'valid' ) {
96
- continue;
97
- }
98
-
99
- // retrieve our license key from the DB
100
- $licenses = Advanced_Ads_Admin::get_instance()->get_licenses();
101
-
102
- $license_key = isset($licenses[$_add_on_key]) ? $licenses[$_add_on_key] : false;
103
-
104
- if( ! $license_key || $status !== 'valid' ){
105
- return true;
106
- }
107
- }
108
-
109
- return false;
110
- }
111
-
112
- /**
113
- * check if license keys are going to expire within next 14 days
114
- *
115
- * @since 1.6.6
116
- * @update 1.6.9 moved from Advanced_Ads_Plugin
117
- * @return true if there are expiring licenses
118
- */
119
- public static function licenses_expire(){
120
-
121
- $add_ons = apply_filters( 'advanced-ads-add-ons', array() );
122
-
123
- if( $add_ons === array() ) {
124
- return false;
125
- }
126
-
127
- $now = time();
128
-
129
- foreach( $add_ons as $_add_on_key => $_add_on ){
130
- // don’t display error for invalid licenses
131
- if( Advanced_Ads_Admin::get_instance()->get_license_status( $_add_on['options_slug'] ) === 'invalid' ) {
132
- continue;
133
- }
134
-
135
- $expiry_date = Advanced_Ads_Admin::get_instance()->get_license_expires( $_add_on['options_slug'] );
136
-
137
- if( $expiry_date && 'lifetime' !== $expiry_date ){
138
- $expiry_date_t = strtotime( $expiry_date );
139
- $in_two_weeks = time() + ( WEEK_IN_SECONDS * 2) ;
140
- // check if expiry date is within next comming 2 weeks
141
- if( $expiry_date_t < $in_two_weeks && $expiry_date_t >= $now ){
142
- return true;
143
- }
144
-
145
- }
146
- }
147
-
148
- return false;
149
- }
150
-
151
- /**
152
- * check if license keys are already expired
153
- *
154
- * @since 1.6.6
155
- * @update 1.6.9 moved from Advanced_Ads_Plugin
156
- * @return true if there are expired licenses
157
- */
158
- public static function licenses_expired(){
159
-
160
- $add_ons = apply_filters( 'advanced-ads-add-ons', array() );
161
-
162
- if( $add_ons === array() ) {
163
- return false;
164
- }
165
-
166
- $now = time();
167
-
168
- foreach( $add_ons as $_add_on_key => $_add_on ){
169
- // don’t display error for invalid licenses
170
- if( Advanced_Ads_Admin::get_instance()->get_license_status( $_add_on['options_slug'] ) === 'invalid' ) {
171
- continue;
172
- }
173
-
174
- $expiry_date = Advanced_Ads_Admin::get_instance()->get_license_expires( $_add_on['options_slug'] );
175
-
176
- if( $expiry_date && 'lifetime' !== $expiry_date && strtotime( $expiry_date ) < $now ){
177
- return true;
178
- }
179
- }
180
-
181
- return false;
182
- }
183
-
184
- /**
185
- * Autoptimize plugin installed
186
- * can change ad tags, especially inline css and scripts
187
- *
188
- * @link https://wordpress.org/plugins/autoptimize/
189
- * @return bool true if Autoptimize is installed
190
- */
191
- public static function active_autoptimize(){
192
-
193
- if( defined( 'AUTOPTIMIZE_CACHE_DIR' ) ){
194
- return true;
195
- }
196
-
197
- return false;
198
- }
199
-
200
- /**
201
- * check for additional conflicting plugins
202
- *
203
- * @return arr $plugins names of conflicting plugins
204
- */
205
- public static function conflicting_plugins(){
206
-
207
- $conflicting_plugins = array();
208
-
209
- if( defined( 'Publicize_Base' )){ // JetPack Publicize module
210
- $conflicting_plugins[] = 'Jetpack – Publicize';
211
- }
212
-
213
- return $conflicting_plugins;
214
- }
215
-
216
- /**
217
- * check for potential jQuery errors
218
- * only script, so no return, but direct output
219
- *
220
- */
221
- public static function jquery_ui_conflict(){
222
- ?>
223
- <div id="advads-jqueryui-conflict-message" style="display:none;" class="message error"><p><?php printf( __( 'Possible conflict between jQueryUI library, used by Advanced Ads and other libraries (probably <a href="%s">Twitter Bootstrap</a>). This might lead to misfortunate formats in forms, but should not damage features.', 'advanced-ads' ), 'http://getbootstrap.com/javascript/#js-noconflict' ); ?></p></div>
224
- <script>// string from jquery-ui source code
225
- jQuery(document).ready(function(){
226
- var needle = 'var g="string"==typeof f,h=c.call(arguments,1)';
227
- if ( jQuery.fn.button.toString().indexOf( needle ) === -1 || jQuery.fn.tooltip.toString().indexOf( needle ) === -1 ) {
228
- jQuery( '#advads-jqueryui-conflict-message' ).show();
229
- }
230
- });
231
- </script><?php
232
- }
233
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/display-conditions.php DELETED
@@ -1,951 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Display Conditions under which to (not) show an ad
5
- *
6
- * @since 1.7
7
- *
8
- */
9
- class Advanced_Ads_Display_Conditions {
10
-
11
- /**
12
- *
13
- * @var Advanced_Ads_Display_Conditions
14
- */
15
- protected static $instance;
16
-
17
- /**
18
- * registered display conditions
19
- */
20
- public $conditions;
21
-
22
- /**
23
- * start of name in form elements
24
- */
25
- const FORM_NAME = 'advanced_ad[conditions]';
26
-
27
- protected static $query_var_keys = array(
28
- // 'is_single',
29
- 'is_archive',
30
- 'is_search',
31
- 'is_home',
32
- 'is_404',
33
- 'is_attachment',
34
- 'is_singular',
35
- 'is_front_page',
36
- 'is_feed'
37
- );
38
-
39
- // this is how the general conditions should look like by default
40
- protected static $default_general_keys = array(
41
- 'is_front_page',
42
- 'is_singular',
43
- 'is_archive',
44
- 'is_search',
45
- 'is_404',
46
- 'is_attachment',
47
- 'is_main_query',
48
- 'is_feed'
49
- );
50
-
51
- private function __construct() {
52
-
53
- // register filter
54
- add_filter('advanced-ads-ad-select-args', array($this, 'ad_select_args_callback'));
55
- add_filter('advanced-ads-can-display', array($this, 'can_display'), 10, 2);
56
-
57
- // register conditions with init hook, register as late as possible so other plugins can use the same hook to add new taxonomies
58
- add_action( 'init', array($this, 'register_conditions'), 100 );
59
- }
60
-
61
- /**
62
- * register display conditions
63
- *
64
- * @since 1.7.1.4
65
- */
66
- public function register_conditions(){
67
- $conditions = array(
68
- 'posttypes' => array(// post types condition
69
- 'label' => __('post type', 'advanced-ads'),
70
- 'description' => __('Choose the public post types on which to display the ad.', 'advanced-ads'),
71
- 'metabox' => array('Advanced_Ads_Display_Conditions', 'metabox_post_type'), // callback to generate the metabox
72
- 'check' => array('Advanced_Ads_Display_Conditions', 'check_post_type'), // callback for frontend check
73
- // 'helplink' => ADVADS_URL . 'manual/display-ads-either-on-mobile-or-desktop/#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-visitor-mobile' // link to help section
74
- ),
75
- 'postids' => array(// post id condition
76
- 'label' => __('specific pages', 'advanced-ads'),
77
- 'description' => __('Choose on which individual posts, pages and public post type pages you want to display or hide ads.', 'advanced-ads'),
78
- 'metabox' => array('Advanced_Ads_Display_Conditions', 'metabox_post_ids'), // callback to generate the metabox
79
- 'check' => array('Advanced_Ads_Display_Conditions', 'check_post_ids'), // callback for frontend check
80
- ),
81
- 'general' => array(// general conditions
82
- 'label' => __('general conditions', 'advanced-ads'),
83
- // 'description' => __( 'Choose on which individual posts, pages and public post type pages you want to display or hide ads.', 'advanced-ads' ),
84
- 'metabox' => array('Advanced_Ads_Display_Conditions', 'metabox_general'), // callback to generate the metabox
85
- 'check' => array('Advanced_Ads_Display_Conditions', 'check_general'), // callback for frontend check
86
- ),
87
- 'author' => array(// author conditions
88
- 'label' => __('author', 'advanced-ads'),
89
- // 'description' => __( 'Choose on which individual posts, pages and public post type pages you want to display or hide ads.', 'advanced-ads' ),
90
- 'metabox' => array('Advanced_Ads_Display_Conditions', 'metabox_author'), // callback to generate the metabox
91
- 'check' => array('Advanced_Ads_Display_Conditions', 'check_author'), // callback for frontend check
92
- ),
93
- );
94
-
95
- // register a condition for each taxonomy for posts
96
- $taxonomies = get_taxonomies(array('public' => true, 'publicly_queryable' => true), 'objects', 'or');
97
- foreach ($taxonomies as $_tax) :
98
- if ( in_array( $_tax->name, array( 'advanced_ads_groups' ) ) ) {
99
- continue;
100
- }
101
-
102
- $conditions['taxonomy_' . $_tax->name] = array(
103
- 'label' => $_tax->label,
104
- // 'description' => sprintf(__( 'Choose terms from the %s taxonomy a post must belong to for showing or hiding ads.', 'advanced-ads' ), $_tax->label ),
105
- 'metabox' => array('Advanced_Ads_Display_Conditions', 'metabox_taxonomy_terms'), // callback to generate the metabox
106
- 'check' => array('Advanced_Ads_Display_Conditions', 'check_taxonomies'), // callback for frontend check
107
- 'taxonomy' => $_tax->name, // unique for this type: the taxonomy name
108
- );
109
-
110
- $conditions['archive_' . $_tax->name] = array(
111
- 'label' => sprintf(__('archive: %s', 'advanced-ads'), $_tax->labels->singular_name),
112
- // 'description' => sprintf(__( 'Choose on which %s archive page ads are hidden or displayeds.', 'advanced-ads' ), $_tax->label ),
113
- 'metabox' => array('Advanced_Ads_Display_Conditions', 'metabox_taxonomy_terms'), // callback to generate the metabox
114
- 'check' => array('Advanced_Ads_Display_Conditions', 'check_taxonomy_archive'), // callback for frontend check
115
- 'taxonomy' => $_tax->name, // unique for this type: the taxonomy name
116
- );
117
- endforeach;
118
-
119
- $this->conditions = apply_filters('advanced-ads-display-conditions', $conditions);
120
-
121
- ksort($this->conditions);
122
- }
123
-
124
- /**
125
- *
126
- * @return Advanced_Ads_Plugin
127
- */
128
- public static function get_instance() {
129
- // If the single instance hasn't been set, set it now.
130
- if (null === self::$instance) {
131
- self::$instance = new self;
132
- }
133
-
134
- return self::$instance;
135
- }
136
-
137
- /**
138
- * controls frontend checks for conditions
139
- *
140
- * @param arr $options options of the condition
141
- * @param ob $ad Advanced_Ads_Ad
142
- * @return bool false, if ad can’t be delivered
143
- */
144
- static function frontend_check($options = array(), $ad = false) {
145
- $display_conditions = Advanced_Ads_Display_Conditions::get_instance()->conditions;
146
-
147
- if (is_array($options) && isset( $options['type'] ) && isset($display_conditions[$options['type']]['check'])) {
148
- $check = $display_conditions[$options['type']]['check'];
149
- } else {
150
- return true;
151
- }
152
-
153
- // call frontend check callback
154
- if (method_exists($check[0], $check[1])) {
155
- return call_user_func(array($check[0], $check[1]), $options, $ad);
156
- }
157
-
158
- return true;
159
- }
160
-
161
- /**
162
- * render connector option
163
- *
164
- * @since 1.7.0.4
165
- * @param int $index
166
- */
167
- static function render_connector_option( $index = 0, $value = 'or' ){
168
-
169
- $label = ( $value === 'or' ) ? __( 'or', 'advanced-ads' ) : __( 'and', 'advanced-ads' );
170
-
171
- return '<input style="display:none;" type="checkbox" name="' . self::FORM_NAME . '[' . $index . '][connector]' . '" value="or" id="advads-conditions-' .
172
- $index . '-connector"' .
173
- checked( 'or', $value, false )
174
- .'><label for="advads-conditions-' . $index . '-connector">' . $label . '</label>';
175
- }
176
-
177
- /**
178
- * callback to display the metabox for the post type condition
179
- *
180
- * @param arr $options options of the condition
181
- * @param int $index index of the condition
182
- */
183
- static function metabox_post_type($options, $index = 0) {
184
- if (!isset($options['type']) || '' === $options['type']) {
185
- return;
186
- }
187
-
188
- $type_options = self::get_instance()->conditions;
189
-
190
- if (!isset($type_options[$options['type']])) {
191
- return;
192
- }
193
-
194
- // get values and select operator based on previous settings
195
- $operator = ( isset($options['operator']) && $options['operator'] === 'is_not' ) ? 'is_not' : 'is';
196
- $values = ( isset($options['value'] ) && is_array( $options['value'] ) ) ? $options['value'] : array();
197
-
198
- // form name basis
199
- $name = self::FORM_NAME . '[' . $index . ']';
200
-
201
- // options
202
- ?><input type="hidden" name="<?php echo $name; ?>[type]" value="<?php echo $options['type']; ?>"/>
203
- <select name="<?php echo $name; ?>[operator]">
204
- <option value="is" <?php selected('is', $operator); ?>><?php _e('show', 'advanced-ads'); ?></option>
205
- <option value="is_not" <?php selected('is_not', $operator); ?>><?php _e('hide', 'advanced-ads' ); ?></option>
206
- </select><?php
207
-
208
- // set defaults
209
- $post_types = get_post_types(array('public' => true, 'publicly_queryable' => true), 'object', 'or');
210
- ?><div class="advads-conditions-single advads-buttonset"><?php
211
- foreach ($post_types as $_type_id => $_type) {
212
- if ( in_array($_type_id, $values)) {
213
- $_val = 1;
214
- } else {
215
- $_val = 0;
216
- }
217
- ?><label class="button" for="advads-conditions-<?php echo $index; ?>-<?php echo $_type_id;
218
- ?>"><?php echo $_type->label; ?></label><input type="checkbox" id="advads-conditions-<?php echo $index; ?>-<?php echo $_type_id; ?>" name="<?php echo $name; ?>[value][]" <?php checked($_val, 1); ?> value="<?php echo $_type_id; ?>"><?php
219
- }
220
- ?><p class="advads-conditions-not-selected advads-error-message"><?php _ex( 'Please select some items.', 'Error message shown when no display condition term is selected', 'advanced-ads' ); ?></p></div><?php
221
- }
222
-
223
- /**
224
- * callback to display the metabox for the author condition
225
- *
226
- * @param arr $options options of the condition
227
- * @param int $index index of the condition
228
- */
229
- static function metabox_author($options, $index = 0) {
230
-
231
- if (!isset($options['type']) || '' === $options['type']) {
232
- return;
233
- }
234
-
235
- $type_options = self::get_instance()->conditions;
236
-
237
- if (!isset($type_options[$options['type']])) {
238
- return;
239
- }
240
-
241
- // get values and select operator based on previous settings
242
- $operator = ( isset($options['operator']) && $options['operator'] === 'is_not' ) ? 'is_not' : 'is';
243
- $values = ( isset($options['value']) && is_array($options['value']) ) ? $options['value'] : array();
244
-
245
- // form name basis
246
- $name = self::FORM_NAME . '[' . $index . ']';
247
- ?><input type="hidden" name="<?php echo $name; ?>[type]" value="<?php echo $options['type']; ?>"/>
248
- <select name="<?php echo $name; ?>[operator]">
249
- <option value="is" <?php selected('is', $operator); ?>><?php _e('show', 'advanced-ads'); ?></option>
250
- <option value="is_not" <?php selected('is_not', $operator); ?>><?php _e('hide', 'advanced-ads'); ?></option>
251
- </select><?php
252
- // set defaults
253
- $authors = get_users(array('who' => 'authors', 'orderby' => 'nicename', 'number' => 50));
254
- ?><div class="advads-conditions-single advads-buttonset"><?php
255
- foreach ($authors as $_author) {
256
- if ( in_array($_author->ID, $values ) ) {
257
- $_val = 1;
258
- } else {
259
- $_val = 0;
260
- }
261
- ?><label class="button ui-button" for="advads-conditions-<?php echo $index; ?>-<?php echo $_author->ID;
262
- ?>"><?php echo $_author->display_name; ?></label><input type="checkbox" id="advads-conditions-<?php echo $index; ?>-<?php echo $_author->ID; ?>" name="<?php echo $name; ?>[value][]" <?php checked($_val, 1); ?> value="<?php echo $_author->ID; ?>"><?php
263
- }
264
- ?><p class="advads-conditions-not-selected advads-error-message"><?php _ex( 'Please select some items.', 'Error message shown when no display condition term is selected', 'advanced-ads' ); ?></p></div><?php
265
- }
266
-
267
- /**
268
- * callback to display the metabox for the taxonomy archive pages
269
- *
270
- * @param arr $options options of the condition
271
- * @param int $index index of the condition
272
- */
273
- static function metabox_taxonomy_terms($options, $index = 0) {
274
-
275
- if (!isset($options['type']) || '' === $options['type']) {
276
- return;
277
- }
278
-
279
- $type_options = self::get_instance()->conditions;
280
-
281
- // don’t use if this is not a taxonomy
282
- if (!isset($type_options[$options['type']]) || !isset($type_options[$options['type']]['taxonomy'])) {
283
- return;
284
- }
285
-
286
- $taxonomy = get_taxonomy($type_options[$options['type']]['taxonomy']);
287
- if (false == $taxonomy) {
288
- return;
289
- }
290
-
291
- // get values and select operator based on previous settings
292
- $operator = ( isset($options['operator']) && $options['operator'] === 'is_not' ) ? 'is_not' : 'is';
293
- $values = ( isset($options['value']) && is_array($options['value']) ) ? $options['value'] : array();
294
-
295
- // limit the number of terms so many terms don’t break the admin page
296
- $max_terms = absint(apply_filters('advanced-ads-admin-max-terms', 50));
297
-
298
- // form name basis
299
- $name = self::FORM_NAME . '[' . $index . ']';
300
- ?><input type="hidden" name="<?php echo $name; ?>[type]" value="<?php echo $options['type']; ?>"/>
301
- <select name="<?php echo $name; ?>[operator]">
302
- <option value="is" <?php selected('is', $operator); ?>><?php _e('show', 'advanced-ads'); ?></option>
303
- <option value="is_not" <?php selected('is_not', $operator); ?>><?php _e('hide', 'advanced-ads'); ?></option>
304
- </select><?php
305
- ?><div class="advads-conditions-single advads-buttonset"><?php
306
- self::display_term_list($taxonomy, $values, $name . '[value][]', $max_terms, $index);
307
- ?></div><?php
308
- }
309
-
310
- /**
311
- * display terms of a taxonomy for choice
312
- *
313
- * @param obj $taxonomy taxonomy object
314
- * @param arr $checked ids of checked terms
315
- * @param str $inputname name of the input field
316
- * @param int $max_terms maximum number of terms to show
317
- * @param int $index index of the conditions group
318
- */
319
- public static function display_term_list($taxonomy, $checked = array(), $inputname = '', $max_terms = 50, $index = 0) {
320
-
321
- $terms = get_terms($taxonomy->name, array('hide_empty' => false, 'number' => $max_terms));
322
-
323
- if (!empty($terms) && !is_wp_error($terms)):
324
- // display search field if the term limit is reached
325
- if (count($terms) == $max_terms) :
326
-
327
- // query active terms
328
- if (is_array($checked) && count($checked)) {
329
- $args = array('hide_empty' => false);
330
- $args['include'] = $checked;
331
- $checked_terms = get_terms($taxonomy->name, $args);
332
- ?><div class="advads-conditions-terms-buttons dynamic-search"><?php
333
- foreach ($checked_terms as $_checked_term) :
334
- ?><label class="button ui-state-active"><?php echo $_checked_term->name;
335
- ?><input type="hidden" name="<?php echo $inputname; ?>" value="<?php echo $_checked_term->term_id; ?>"></label><?php
336
- endforeach;
337
- ?></div><?php
338
- } else {
339
- ?><div class="advads-conditions-terms-buttons dynamic-search"></div><?php
340
- }
341
- ?><span class="advads-conditions-terms-show-search button" title="<?php
342
- _ex('add more terms', 'display the terms search field on ad edit page', 'advanced-ads');
343
- ?>">+</span><span class="description"><?php _e('add more terms', 'advanced-ads');
344
- ?></span><br/><input type="text" class="advads-conditions-terms-search" data-tag-name="<?php echo $taxonomy->name;
345
- ?>" data-input-name="<?php echo $inputname; ?>" placeholder="<?php _e('term name or id', 'advanced-ads'); ?>"/><?php
346
- else :
347
- ?><div class="advads-conditions-terms-buttons advads-buttonset"><?php
348
- foreach ($terms as $_term) :
349
- $field_id = "advads-conditions-$index-$_term->term_id";
350
- ?><input type="checkbox" id="<?php echo $field_id; ?>" name="<?php echo $inputname; ?>" value="<?php echo $_term->term_id; ?>" <?php checked(in_array($_term->term_id, $checked), true); ?>><label for="<?php echo $field_id; ?>"><?php echo $_term->name; ?></label><?php
351
- endforeach;
352
- ?><p class="advads-conditions-not-selected advads-error-message"><?php _ex( 'Please select some items.', 'Error message shown when no display condition term is selected', 'advanced-ads' ); ?></p></div><?php
353
- endif;
354
- endif;
355
- }
356
-
357
- /**
358
- * callback to display the metabox for the taxonomy archive pages
359
- *
360
- * @param arr $options options of the condition
361
- * @param int $index index of the condition
362
- */
363
- static function metabox_post_ids($options, $index = 0) {
364
-
365
- if (!isset($options['type']) || '' === $options['type']) {
366
- return;
367
- }
368
-
369
- // get values and select operator based on previous settings
370
- $operator = ( isset($options['operator']) && $options['operator'] === 'is_not' ) ? 'is_not' : 'is';
371
- $values = ( isset($options['value']) && is_array($options['value']) ) ? $options['value'] : array();
372
-
373
- // form name basis
374
- $name = self::FORM_NAME . '[' . $index . ']';
375
- ?><input type="hidden" name="<?php echo $name; ?>[type]" value="<?php echo $options['type']; ?>"/>
376
- <select name="<?php echo $name; ?>[operator]">
377
- <option value="is" <?php selected('is', $operator); ?>><?php _e('show', 'advanced-ads'); ?></option>
378
- <option value="is_not" <?php selected('is_not', $operator); ?>><?php _e('hide', 'advanced-ads'); ?></option>
379
- </select><?php ?><div class="advads-conditions-single advads-buttonset advads-conditions-postid-buttons"><?php
380
- // query active post ids
381
- if ($values != array()) {
382
- $args = array(
383
- 'post_type' => 'any',
384
- // 'post_status' => 'publish',
385
- 'post__in' => $values,
386
- 'posts_per_page' => -1,
387
- // 'ignore_sticky_posts' => 1,
388
- );
389
-
390
- $the_query = new WP_Query($args);
391
- while ($the_query->have_posts()) {
392
- $the_query->next_post();
393
- ?><label class="button ui-state-active"><?php echo get_the_title($the_query->post->ID) . ' (' . $the_query->post->post_type . ')';
394
- ?><input type="hidden" name="<?php echo $name; ?>[value][]" value="<?php echo $the_query->post->ID; ?>"></label><?php
395
- }
396
- }
397
- ?><span class="advads-conditions-postids-show-search button" <?php
398
- if (!count($values)) {
399
- echo 'style="display:none;"';
400
- }
401
- ?>>+</span>
402
- <p class="advads-conditions-postids-search-line">
403
- <input type="text" class="advads-display-conditions-individual-post" <?php if (count($values)) {
404
- echo 'style="display:none;"';
405
- } ?>
406
- placeholder="<?php _e('title or id', 'advanced-ads'); ?>"
407
- data-field-name="<?php echo $name; ?>"/><?php
408
- wp_nonce_field('internal-linking', '_ajax_linking_nonce', false);
409
- ?></p></div><?php
410
- }
411
-
412
- /**
413
- * callback to display the metabox for the general display conditions
414
- *
415
- * @param arr $options options of the condition
416
- * @param int $index index of the condition
417
- */
418
- static function metabox_general($options, $index = 0) {
419
-
420
- // general conditions array
421
- $conditions = self::get_instance()->general_conditions();
422
- if (!isset($options['type']) || '' === $options['type']) {
423
- return;
424
- }
425
-
426
- $name = self::FORM_NAME . '[' . $index . ']';
427
- $values = isset($options['value']) ? $options['value'] : array();
428
- ?><div class="advads-conditions-single advads-buttonset">
429
- <input type="hidden" name="<?php echo $name; ?>[type]" value="<?php echo $options['type']; ?>"/><?php
430
- foreach ($conditions as $_key => $_condition) :
431
-
432
- // activate by default
433
- $value = ( $values === array() || in_array($_key, $values) ) ? 1 : 0;
434
-
435
- $field_id = "advads-conditions-$index-$_key";
436
- ?><input type="checkbox" id="<?php echo $field_id; ?>" name="<?php echo $name; ?>[value][]" value="<?php echo $_key; ?>" <?php checked(1, $value); ?>><label for="<?php echo $field_id; ?>"><?php echo $_condition['label']; ?></label><?php
437
- endforeach;
438
- ?></div><?php
439
- return;
440
- }
441
-
442
- /**
443
- * retrieve the array with general conditions
444
- *
445
- * @return arr $conditions
446
- *
447
- */
448
- static function general_conditions() {
449
- return $conditions = array(
450
- 'is_front_page' => array(
451
- 'label' => __('Home Page', 'advanced-ads'),
452
- 'description' => __('show on Home page', 'advanced-ads'),
453
- 'type' => 'radio',
454
- ),
455
- 'is_singular' => array(
456
- 'label' => __('Singular Pages', 'advanced-ads'),
457
- 'description' => __('show on singular pages/posts', 'advanced-ads'),
458
- 'type' => 'radio',
459
- ),
460
- 'is_archive' => array(
461
- 'label' => __('Archive Pages', 'advanced-ads'),
462
- 'description' => __('show on any type of archive page (category, tag, author and date)', 'advanced-ads'),
463
- 'type' => 'radio',
464
- ),
465
- 'is_search' => array(
466
- 'label' => __('Search Results', 'advanced-ads'),
467
- 'description' => __('show on search result pages', 'advanced-ads'),
468
- 'type' => 'radio',
469
- ),
470
- 'is_404' => array(
471
- 'label' => __('404 Page', 'advanced-ads'),
472
- 'description' => __('show on 404 error page', 'advanced-ads'),
473
- 'type' => 'radio',
474
- ),
475
- 'is_attachment' => array(
476
- 'label' => __('Attachment Pages', 'advanced-ads'),
477
- 'description' => __('show on attachment pages', 'advanced-ads'),
478
- 'type' => 'radio',
479
- ),
480
- 'is_main_query' => array(
481
- 'label' => __('Secondary Queries', 'advanced-ads'),
482
- 'description' => __('allow ads in secondary queries', 'advanced-ads'),
483
- 'type' => 'radio',
484
- ),
485
- 'is_feed' => array(
486
- 'label' => __('Feed', 'advanced-ads'),
487
- 'description' => __('allow ads in Feed', 'advanced-ads'),
488
- 'type' => 'radio',
489
- )
490
- );
491
- }
492
-
493
- /**
494
- * check post type display condition in frontend
495
- *
496
- * @param arr $options options of the condition
497
- * @param obj $ad Advanced_Ads_Ad
498
- * @return bool true if can be displayed
499
- */
500
- static function check_post_type($options = array(), Advanced_Ads_Ad $ad) {
501
- if (!isset($options['value']) || !is_array($options['value'])) {
502
- return false;
503
- }
504
-
505
- if (isset($options['operator']) && $options['operator'] === 'is_not') {
506
- $operator = 'is_not';
507
- } else {
508
- $operator = 'is';
509
- }
510
-
511
- $ad_options = $ad->options();
512
- $query = $ad_options['wp_the_query'];
513
- $post = isset($ad_options['post']) ? $ad_options['post'] : null;
514
- $post_type = isset($post['post_type']) ? $post['post_type'] : false;
515
-
516
- if ( ! self::can_display_ids( $post_type, $options['value'], $operator ) ) {
517
- return false;
518
- }
519
-
520
- return true;
521
- }
522
-
523
- /**
524
- * check author display condition in frontend
525
- *
526
- * @param arr $options options of the condition
527
- * @param obj $ad Advanced_Ads_Ad
528
- * @return bool true if can be displayed
529
- */
530
- static function check_author($options = array(), Advanced_Ads_Ad $ad) {
531
-
532
- if (!isset($options['value']) || !is_array($options['value'])) {
533
- return false;
534
- }
535
-
536
- if (isset($options['operator']) && $options['operator'] === 'is_not') {
537
- $operator = 'is_not';
538
- } else {
539
- $operator = 'is';
540
- }
541
-
542
- $ad_options = $ad->options();
543
- $post = isset($ad_options['post']) ? $ad_options['post'] : null;
544
- $post_author = isset($post['author']) ? $post['author'] : false;
545
-
546
- if (!self::can_display_ids($post_author, $options['value'], $operator)) {
547
- return false;
548
- }
549
-
550
- return true;
551
- }
552
-
553
- /**
554
- * check taxonomies display condition in frontend
555
- *
556
- * @param arr $options options of the condition
557
- * @return bool true if can be displayed
558
- */
559
- static function check_taxonomies($options = array(), Advanced_Ads_Ad $ad) {
560
-
561
- if( !isset( $options['value']) ){
562
- return false;
563
- }
564
-
565
- if (isset($options['operator']) && $options['operator'] === 'is_not') {
566
- $operator = 'is_not';
567
- } else {
568
- $operator = 'is';
569
- }
570
-
571
- $ad_options = $ad->options();
572
- $query = $ad_options['wp_the_query'];
573
- $post_id = isset($ad_options['post']['id']) ? $ad_options['post']['id'] : null;
574
-
575
- // get terms of the current taxonomy
576
- $type_options = self::get_instance()->conditions;
577
- if (!isset($options['type']) || !isset($type_options[$options['type']]['taxonomy'])) {
578
- return true;
579
- }
580
- $taxonomy = $type_options[$options['type']]['taxonomy'];
581
-
582
- $terms = get_the_terms($post_id, $taxonomy);
583
-
584
- if ( is_array($terms) ) {
585
- foreach ($terms as $term) {
586
- $term_ids[] = $term->term_id;
587
- }
588
- } elseif( false === $terms && 'is' === $operator ) {
589
- // don’t show if should show only for a specific tag
590
- return false;
591
- } else {
592
- return true;
593
- }
594
-
595
- if( 'is' === $operator && ( ! isset($query['is_singular']) || ! $query['is_singular'] ) ){
596
- return false;
597
- } elseif (isset($query['is_singular']) && $query['is_singular'] && !self::can_display_ids($options['value'], $term_ids, $operator)
598
- ) {
599
- return false;
600
- }
601
-
602
- return true;
603
- }
604
-
605
- /**
606
- * check taxonomy archive display condition in frontend
607
- *
608
- * @param arr $options options of the condition
609
- * @return bool true if can be displayed
610
- */
611
- static function check_taxonomy_archive($options = array(), Advanced_Ads_Ad $ad) {
612
-
613
- if( !isset( $options['value']) ){
614
- return false;
615
- }
616
-
617
- if (isset($options['operator']) && $options['operator'] === 'is_not') {
618
- $operator = 'is_not';
619
- } else {
620
- $operator = 'is';
621
- }
622
-
623
- $ad_options = $ad->options();
624
- $query = $ad_options['wp_the_query'];
625
-
626
- // return false if operator is "is", but important query vars are not given
627
- if( 'is' === $operator && ( empty( $query['term_id'] ) || empty($query['is_archive']) ) ){
628
- return false;
629
- } elseif ( isset($query['term_id']) && isset($query['is_archive']) && $query['is_archive'] && !self::can_display_ids($query['term_id'], $options['value'], $operator)
630
- ) {
631
- return false;
632
- }
633
-
634
- return true;
635
- }
636
-
637
- /**
638
- * check post ids display condition in frontend
639
- *
640
- * @param arr $options options of the condition
641
- * @return bool true if can be displayed
642
- */
643
- static function check_post_ids($options = array(), Advanced_Ads_Ad $ad) {
644
-
645
- if (isset($options['operator']) && $options['operator'] === 'is_not') {
646
- $operator = 'is_not';
647
- } else {
648
- $operator = 'is';
649
- }
650
-
651
- $ad_options = $ad->options();
652
- $query = $ad_options['wp_the_query'];
653
- $post_id = isset($ad_options['post']['id']) ? $ad_options['post']['id'] : null;
654
-
655
- if( empty( $ad_options['wp_the_query']['is_singular'] ) ){
656
- return false;
657
- }
658
-
659
- if ( ! isset( $options['value'] ) || ! is_array( $options['value'] ) || ! $post_id ) {
660
- return true;
661
- }
662
-
663
- return self::can_display_ids($post_id, $options['value'], $operator);
664
- }
665
-
666
- /**
667
- * check general display conditions in frontend
668
- *
669
- * @param arr $options options of the condition
670
- * @param obj $ad Advanced_Ads_Ad
671
- * @return bool true if can be displayed
672
- */
673
- static function check_general($options = array(), Advanced_Ads_Ad $ad) {
674
-
675
- // display by default
676
- if (!isset($options['value']) || !is_array($options['value']) || !count($options['value'])) {
677
- return true;
678
- }
679
-
680
- // skip checks, if general conditions are unchanged
681
- if( self::$default_general_keys === $options['value'] ){
682
- return true;
683
- }
684
-
685
- // get plugin options
686
- $plugin_options = Advanced_Ads_Plugin::get_instance()->options();
687
-
688
- // error_log(print_r($options, true));
689
- // error_log(print_r(debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS ), true));
690
-
691
- $ad_options = $ad->options();
692
- $query = $ad_options['wp_the_query'];
693
-
694
- // check main query
695
- if ( isset( $query['is_main_query'] ) && ! $query['is_main_query'] && ! in_array('is_main_query', $options['value'] ) ) {
696
- return false;
697
- }
698
-
699
- // check home page
700
- if ( ( ( isset($query['is_front_page']) && $query['is_front_page'] )
701
- || ( isset($query['is_home']) && $query['is_home'] ) )
702
- && in_array('is_front_page', $options['value'])
703
- ) {
704
- return true;
705
- } elseif (isset($query['is_front_page']) && $query['is_front_page'] && (
706
- !in_array('is_front_page', $options['value'])
707
- )) {
708
- return false;
709
- }
710
-
711
- // check common tests
712
- foreach (self::$query_var_keys as $_type) {
713
- if ('is_main_query' !== $_type && isset($query[$_type]) && $query[$_type] &&
714
- in_array($_type, $options['value'])) {
715
- return true;
716
- }
717
- }
718
-
719
- return false;
720
- }
721
-
722
- /**
723
- * helper function to check for in array values
724
- *
725
- * @param mixed $id scalar (key) or array of keys as needle
726
- * @param array $ids haystack
727
- *
728
- * @return boolean void if either argument is empty
729
- */
730
- static function in_array($id, $ids) {
731
- // empty?
732
- if (!isset($id) || $id === array()) {
733
- return;
734
- }
735
-
736
- // invalid?
737
- if (!is_array($ids)) {
738
- return;
739
- }
740
-
741
- return is_array($id) ? array_intersect($id, $ids) !== array() : in_array($id, $ids);
742
- }
743
-
744
- /**
745
- * helper to compare ids
746
- *
747
- * @param arr $needle ids that should be searched for in haystack
748
- * @param arr $haystack reference ids
749
- * @param str $operator whether it should be included or not
750
- * @return boolean
751
- */
752
- static function can_display_ids($needle, $haystack, $operator = 'is') {
753
-
754
- if ('is' === $operator && self::in_array($needle, $haystack) === false) {
755
- return false;
756
- }
757
-
758
- if ('is_not' === $operator && self::in_array($needle, $haystack) === true) {
759
- return false;
760
- }
761
-
762
- return true;
763
- }
764
-
765
- /**
766
- * check display conditions
767
- *
768
- * @since 1.1.0 moved here from can_display()
769
- * @since 1.7.0 moved here from display-by-query module
770
- * @return bool $can_display true if can be displayed in frontend
771
- */
772
- public function can_display($can_display, $ad) {
773
- if (!$can_display) {
774
- return false;
775
- }
776
-
777
- $options = $ad->options();
778
- if (
779
- // test if anything is to be limited at all
780
- !isset($options['conditions']) || !is_array($options['conditions'])
781
- // query arguments required
782
- || !isset($options['wp_the_query'])
783
- ) {
784
- return true;
785
- }
786
- // get conditions with rebased index keys
787
- $conditions = array_values( $options['conditions'] );
788
- $query = $options['wp_the_query'];
789
- $post = isset($options['post']) ? $options['post'] : null;
790
-
791
-
792
- $last_result = false;
793
- $length = count( $conditions );
794
-
795
- for($i = 0; $i < $length; ++$i) {
796
- $_condition = current( $conditions );
797
- $next = next( $conditions );
798
- $next_key = key( $conditions );
799
-
800
- /**
801
- * force next condition’s connector to OR if
802
- * not set to OR already
803
- * this condition and the next are from the same taxonomy
804
- * the conditions don’t have the same condition type
805
- * they are both set to SHOW
806
- */
807
- $tax = ( isset( $_condition['type'] ) && isset( $this->conditions[ $_condition['type'] ]['taxonomy'] ) ) ? $this->conditions[ $_condition['type'] ]['taxonomy'] : false;
808
- $next_tax = ( isset( $next['type'] ) && isset( $this->conditions[ $next['type'] ]['taxonomy'] ) ) ? $this->conditions[ $next['type'] ]['taxonomy'] : false;
809
- if( $tax && $next_tax && $next_key
810
- && $next_tax === $tax
811
- && ( ! isset( $next['connector'] ) || $next['connector'] !== 'or' )
812
- && 'is' === $_condition['operator'] && 'is' === $next['operator']
813
- && $_condition['type'] !== $next['type'] ){
814
- // error_log(print_r('force_or', true));
815
- $next['connector'] = 'or';
816
- $conditions[ $next_key ]['connector'] = 'or';
817
- }
818
-
819
- // ignore OR if last result was true
820
- if( $last_result && isset( $_condition['connector'] ) && 'or' === $_condition['connector'] ){
821
- continue;
822
- }
823
-
824
- $last_result = $result = self::frontend_check($_condition, $ad);
825
- if( ! $result ) {
826
- // return false only, if the next condition doesn’t have an OR operator
827
- if( ! isset( $next['connector'] ) || $next['connector'] !== 'or' ) {
828
- return false;
829
- }
830
- }
831
- }
832
-
833
- return true;
834
- }
835
-
836
- /**
837
- * On demand provide current query arguments to ads.
838
- *
839
- * Existing arguments must not be overridden.
840
- * Some arguments might be cachable.
841
- *
842
- * @param array $args
843
- *
844
- * @return array
845
- */
846
- public function ad_select_args_callback($args) {
847
- global $post, $wp_the_query, $wp_query;
848
-
849
- if (isset($post)) {
850
- if (!isset($args['post'])) {
851
- $args['post'] = array();
852
- }
853
- if (!isset($args['post']['id'])) {
854
- // if currently on a single site, use the main query information just in case a custom query is broken
855
- if( isset( $wp_the_query->post->ID ) && $wp_the_query->is_single() ){
856
- $args['post']['id'] = $wp_the_query->post->ID;
857
- } else {
858
- $args['post']['id'] = $post->ID;
859
- }
860
- }
861
- if (!isset($args['post']['author'])) {
862
- // if currently on a single site, use the main query information just in case a custom query is broken
863
- if( isset( $wp_the_query->post->post_author ) && $wp_the_query->is_single() ){
864
- $args['post']['author'] = $wp_the_query->post->post_author;
865
- } else {
866
- $args['post']['author'] = $post->post_author;
867
- }
868
- }
869
- if (!isset($args['post']['post_type'])) {
870
- // if currently on a single site, use the main query information just in case a custom query is broken
871
- if( isset( $wp_the_query->post->post_type ) && $wp_the_query->is_single() ){
872
- $args['post']['post_type'] = $wp_the_query->post->post_type;
873
- } else {
874
- $args['post']['post_type'] = $post->post_type;
875
- }
876
- }
877
- }
878
-
879
- // pass query arguments
880
- if (isset($wp_the_query)) {
881
- if (!isset($args['wp_the_query'])) {
882
- $args['wp_the_query'] = array();
883
- }
884
- $query = $wp_the_query->get_queried_object();
885
- // term_id exists only for taxonomy archive pages
886
- if (!isset($args['wp_the_query']['term_id']) && $query) {
887
- $args['wp_the_query']['term_id'] = isset($query->term_id) ? $query->term_id : '';
888
- }
889
-
890
- // query type/ context
891
- if (!isset($args['wp_the_query']['is_main_query'])) {
892
- $args['wp_the_query']['is_main_query'] = Advanced_Ads::get_instance()->is_main_query();
893
- }
894
-
895
- // query vars
896
- foreach (self::$query_var_keys as $key) {
897
- if (!isset($args['wp_the_query'][$key])) {
898
- $args['wp_the_query'][$key] = $wp_the_query->$key();
899
- }
900
- }
901
- }
902
-
903
- return $args;
904
- }
905
-
906
- /**
907
- * modify post search query to search by post_title or ID
908
- *
909
- * @param array $query
910
- * @return string
911
- */
912
- public static function modify_post_search( $query ) {
913
- $query['suppress_filters'] = false;
914
- $query['orderby'] = 'post_title';
915
- return $query;
916
- }
917
-
918
- /**
919
- * modify post search sql to search by post_title or ID
920
- *
921
- * @param string $sql
922
- * @return string
923
- */
924
- public static function modify_post_search_sql( $sql ) {
925
- global $wpdb;
926
-
927
- $sql = preg_replace_callback( "/{$wpdb->posts}.post_(content|excerpt)( NOT)? LIKE '%(.*?)%'/", array( 'Advanced_Ads_Display_Conditions', 'modify_post_search_sql_callback' ), $sql );
928
-
929
- return $sql;
930
- }
931
-
932
- /**
933
- * preg_replace callback used in modify_post_search_sql()
934
- *
935
- * @param array $matches
936
- * @return string
937
- */
938
- public static function modify_post_search_sql_callback( $matches ) {
939
- global $wpdb;
940
- if ( $matches[1] === 'content' && preg_match( '@^([0-9]+)$@', $matches[3], $matches_id ) ) {
941
- $equals_op = $matches[2] === ' NOT' ? '!=' : '=';
942
- return "{$wpdb->posts}.ID$equals_op$matches_id[1]";
943
- } else if ( $matches[2] === ' NOT' ) {
944
- return '1=1';
945
- } else {
946
- return '1=0';
947
- }
948
- }
949
-
950
- }
951
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/plugin.php DELETED
@@ -1,600 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Wordpress integration and definitions:
5
- *
6
- * - posttypes
7
- * - taxonomy
8
- * - textdomain
9
- *
10
- * @since 1.5.0
11
- */
12
- class Advanced_Ads_Plugin {
13
- /**
14
- *
15
- * @var Advanced_Ads_Plugin
16
- */
17
- protected static $instance;
18
-
19
- /**
20
- *
21
- * @var Advanced_Ads_Model
22
- */
23
- protected $model;
24
-
25
- /**
26
- * plugin options
27
- *
28
- * @since 1.0.1
29
- * @var array (if loaded)
30
- */
31
- protected $options;
32
-
33
- /**
34
- * interal plugin options – set by the plugin
35
- *
36
- * @since 1.4.5
37
- * @var array (if loaded)
38
- */
39
- protected $internal_options;
40
-
41
- /**
42
- * default prefix of selectors (id, class) in the frontend
43
- * can be changed by options
44
- *
45
- * @var Advanced_Ads_Plugin
46
- */
47
- const DEFAULT_FRONTEND_PREFIX = 'advads-';
48
-
49
- /**
50
- *
51
- * @var frontend prefix for classes and IDs
52
- */
53
- private $frontend_prefix;
54
-
55
-
56
- private function __construct() {
57
- register_activation_hook( ADVADS_BASE, array( $this, 'activate' ) );
58
- register_deactivation_hook( ADVADS_BASE, array( $this, 'deactivate' ) );
59
- register_uninstall_hook( ADVADS_BASE, array( 'Advanced_Ads_Plugin', 'uninstall' ) );
60
-
61
- add_action( 'plugins_loaded', array( $this, 'wp_plugins_loaded' ) );
62
- }
63
-
64
- /**
65
- *
66
- * @return Advanced_Ads_Plugin
67
- */
68
- public static function get_instance() {
69
- // If the single instance hasn't been set, set it now.
70
- if ( null === self::$instance ) {
71
- self::$instance = new self;
72
- }
73
-
74
- return self::$instance;
75
- }
76
-
77
- /**
78
- *
79
- * @param Advanced_Ads_Model $model
80
- */
81
- public function set_model(Advanced_Ads_Model $model) {
82
- $this->model = $model;
83
- }
84
-
85
- public function wp_plugins_loaded() {
86
- // Load plugin text domain
87
- $this->load_plugin_textdomain();
88
-
89
- $internal_options = $this->internal_options();
90
-
91
- /**
92
- * run upgrades, if this is a new version or version does not exist
93
- */
94
- if ( ! defined( 'DOING_AJAX' ) && ( ! isset( $internal_options['version'] ) || version_compare( $internal_options['version'], ADVADS_VERSION, '<' ) ) ) {
95
- new Advanced_Ads_Upgrades();
96
- }
97
-
98
- // activate plugin when new blog is added on multisites // -TODO this is admin-only
99
- add_action( 'wpmu_new_blog', array( $this, 'activate_new_site' ) );
100
-
101
- // Load public-facing style sheet and JavaScript.
102
- add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ) );
103
- add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
104
-
105
- // add short codes
106
- add_shortcode( 'the_ad', array( $this, 'shortcode_display_ad' ) );
107
- add_shortcode( 'the_ad_group', array( $this, 'shortcode_display_ad_group' ) );
108
- add_shortcode( 'the_ad_placement', array( $this, 'shortcode_display_ad_placement' ) );
109
-
110
- // remove default ad group menu item // -TODO only for admin
111
- add_action( 'admin_menu', array( $this, 'remove_taxonomy_menu_item' ) );
112
- // load widgets
113
- add_action( 'widgets_init', array( $this, 'widget_init' ) );
114
-
115
- // load display conditions
116
- Advanced_Ads_Display_Conditions::get_instance();
117
- }
118
-
119
- /**
120
- * Register and enqueue public-facing style sheet.
121
- *
122
- * @since 1.0.0
123
- */
124
- public function enqueue_styles() {
125
- // wp_enqueue_style( $this->get_plugin_slug() . '-plugin-styles', plugins_url('assets/css/public.css', __FILE__), array(), ADVADS_VERSION);
126
- }
127
-
128
- /**
129
- * Return the plugin slug.
130
- *
131
- * @since 1.0.0
132
- * @return Plugin slug variable.
133
- */
134
- public function get_plugin_slug() {
135
- return ADVADS_SLUG;
136
- }
137
-
138
- /**
139
- * Register and enqueues public-facing JavaScript files.
140
- *
141
- * @since 1.0.0
142
- */
143
- public function enqueue_scripts() {
144
- // wp_enqueue_script( $this->get_plugin_slug() . '-plugin-script', plugins_url('assets/js/public.js', __FILE__), array('jquery'), ADVADS_VERSION);
145
- $options = $this->options();
146
- $activated_js = apply_filters( 'advanced-ads-activate-advanced-js', isset( $options['advanced-js'] ) );
147
- if ( $activated_js ){
148
- wp_enqueue_script( $this->get_plugin_slug() . '-advanced-js', ADVADS_BASE_URL . 'public/assets/js/advanced.js', array( 'jquery' ), ADVADS_VERSION );
149
- }
150
- }
151
-
152
- public function widget_init() {
153
- register_widget( 'Advanced_Ads_Widget' );
154
- }
155
-
156
- /**
157
- * Fired when a new site is activated with a WPMU environment.
158
- *
159
- * @since 1.0.0
160
- * @param int $blog_id ID of the new blog.
161
- */
162
- public function activate_new_site($blog_id) {
163
-
164
- if ( 1 !== did_action( 'wpmu_new_blog' ) ) {
165
- return;
166
- }
167
-
168
- switch_to_blog( $blog_id );
169
- $this->single_activate();
170
- restore_current_blog();
171
- }
172
-
173
- /**
174
- * Fired for each blog when the plugin is activated.
175
- *
176
- * @since 1.0.0
177
- */
178
- protected function single_activate() {
179
- // $this->post_types_rewrite_flush();
180
- // -TODO inform modules
181
- }
182
-
183
- /**
184
- * Fired for each blog when the plugin is deactivated.
185
- *
186
- * @since 1.0.0
187
- */
188
- protected function single_deactivate() {
189
- // -TODO inform modules
190
- }
191
-
192
- /**
193
- * Load the plugin text domain for translation.
194
- *
195
- * @since 1.0.0
196
- */
197
- public function load_plugin_textdomain() {
198
- // $locale = apply_filters('advanced-ads-plugin-locale', get_locale(), $domain);
199
- load_plugin_textdomain( ADVADS_SLUG, false, ADVADS_BASE_DIR . '/languages' );
200
- }
201
-
202
- /**
203
- * Fired when the plugin is activated.
204
- *
205
- * @since 1.0.0
206
- * @param boolean $network_wide True if WPMU superadmin uses
207
- * "Network Activate" action, false if
208
- * WPMU is disabled or plugin is
209
- * activated on an individual blog.
210
- */
211
- public function activate($network_wide) {
212
- $this->create_capabilities();
213
-
214
- return;
215
- // was never used nor missed, but could come in handy one day
216
-
217
- if ( function_exists( 'is_multisite' ) && is_multisite() ) {
218
-
219
- if ( $network_wide ) {
220
-
221
- // Get all blog ids
222
- $blog_ids = $this->model->get_blog_ids();
223
-
224
- foreach ( $blog_ids as $blog_id ) {
225
-
226
- switch_to_blog( $blog_id );
227
- $this->single_activate();
228
- }
229
-
230
- restore_current_blog();
231
- } else {
232
- $this->single_activate();
233
- }
234
- } else {
235
- $this->single_activate();
236
- }
237
- }
238
-
239
- /**
240
- * Fired when the plugin is deactivated.
241
- *
242
- * @since 1.0.0
243
- * @param boolean $network_wide
244
- *
245
- * True if WPMU superadmin uses
246
- * "Network Deactivate" action, false if
247
- * WPMU is disabled or plugin is
248
- * deactivated on an individual blog.
249
- */
250
- public function deactivate($network_wide) {
251
- $this->remove_capabilities();
252
-
253
- return;
254
-
255
- if ( function_exists( 'is_multisite' ) && is_multisite() ) {
256
-
257
- if ( $network_wide ) {
258
-
259
- // Get all blog ids
260
- $blog_ids = $this->model->get_blog_ids();
261
-
262
- foreach ( $blog_ids as $blog_id ) {
263
-
264
- switch_to_blog( $blog_id );
265
- $this->single_deactivate();
266
- }
267
-
268
- restore_current_blog();
269
- } else {
270
- $this->single_deactivate();
271
- }
272
- } else {
273
- $this->single_deactivate();
274
- }
275
- }
276
-
277
- /**
278
- * flush rewrites on plugin activation so permalinks for them work from the beginning on
279
- *
280
- * @since 1.0.0
281
- * @link http://codex.wordpress.org/Function_Reference/register_post_type#Flushing_Rewrite_on_Activation
282
- */
283
- /*public function post_types_rewrite_flush(){
284
- // load custom post type
285
- Advanced_Ads::get_instance()->create_post_types();
286
- // flush rewrite rules
287
- flush_rewrite_rules();
288
- }*/
289
-
290
- /**
291
- * remove WP tag edit page for the ad group taxonomy
292
- * needed, because we can’t remove it with `show_ui` without also removing the meta box
293
- *
294
- * @since 1.0.0
295
- */
296
- public function remove_taxonomy_menu_item() {
297
- remove_submenu_page( 'edit.php?post_type=advanced_ads', 'edit-tags.php?taxonomy=advanced_ads_groups&amp;post_type=advanced_ads' );
298
- }
299
-
300
- /**
301
- * shortcode to include ad in frontend
302
- *
303
- * @since 1.0.0
304
- * @param arr $atts
305
- */
306
- public function shortcode_display_ad($atts){
307
- $id = isset($atts['id']) ? (int) $atts['id'] : 0;
308
-
309
- // use the public available function here
310
- return get_ad( $id );
311
- }
312
-
313
- /**
314
- * shortcode to include ad from an ad group in frontend
315
- *
316
- * @since 1.0.0
317
- * @param arr $atts
318
- */
319
- public function shortcode_display_ad_group($atts){
320
- $id = isset($atts['id']) ? (int) $atts['id'] : 0;
321
-
322
- // use the public available function here
323
- return get_ad_group( $id );
324
- }
325
-
326
- /**
327
- * shortcode to display content of an ad placement in frontend
328
- *
329
- * @since 1.1.0
330
- * @param arr $atts
331
- */
332
- public function shortcode_display_ad_placement($atts){
333
- $id = isset($atts['id']) ? (string) $atts['id'] : '';
334
-
335
- // use the public available function here
336
- return get_ad_placement( $id );
337
- }
338
-
339
- /**
340
- * return plugin options
341
- * these are the options updated by the user
342
- *
343
- * @since 1.0.1
344
- * @return array $options
345
- * @todo parse default options
346
- */
347
- public function options() {
348
- if ( ! isset( $this->options ) ) {
349
- $this->options = get_option( ADVADS_SLUG, array() );
350
- }
351
-
352
- return $this->options;
353
- }
354
-
355
- /**
356
- * update plugin options (not for settings page, but if automatic options are needed)
357
- *
358
- * @since 1.5.1
359
- * @param array $options new options
360
- */
361
- public function update_options( array $options ) {
362
- // do not allow to clear options
363
- if ( $options === array() ) {
364
- return;
365
- }
366
-
367
- $this->options = $options;
368
- update_option( ADVADS_SLUG, $options );
369
- }
370
-
371
- /**
372
- * return internal plugin options
373
- * these are options set by the plugin
374
- *
375
- * @since 1.0.1
376
- * @return array $options
377
- * @todo parse default options
378
- */
379
- public function internal_options() {
380
- if ( ! isset( $this->internal_options ) ) {
381
- $defaults = array(
382
- 'version' => ADVADS_VERSION,
383
- 'installed' => time(), // when was this installed
384
- );
385
- $this->internal_options = get_option( ADVADS_SLUG . '-internal', array() );
386
-
387
- // save defaults
388
- if($this->internal_options === array()){
389
- $this->internal_options = $defaults;
390
- $this->update_internal_options($this->internal_options);
391
- }
392
-
393
- // for versions installed prior to 1.5.3 set installed date for now
394
- if( ! isset( $this->internal_options['installed'] )){
395
- $this->internal_options['installed'] = time();
396
- $this->update_internal_options($this->internal_options);
397
- }
398
- }
399
-
400
- return $this->internal_options;
401
- }
402
-
403
- /**
404
- * update internal plugin options
405
- *
406
- * @since 1.5.1
407
- * @param array $options new internal options
408
- */
409
- public function update_internal_options( array $options ) {
410
- // do not allow to clear options
411
- if ( $options === array() ) {
412
- return;
413
- }
414
-
415
- $this->internal_options = $options;
416
- update_option( ADVADS_SLUG . '-internal', $options );
417
- }
418
-
419
- /**
420
- * get prefix used for frontend elements
421
- *
422
- * @since 1.6.8.2
423
- */
424
- public function get_frontend_prefix(){
425
- if ( ! $this->frontend_prefix ) {
426
- $options = $this->options();
427
-
428
- if ( ! isset( $options['front-prefix'] ) ) {
429
- if ( isset( $options['id-prefix'] ) ) {
430
- // deprecated: keeps widgets working that previously received an id based on the front-prefix
431
- $this->frontend_prefix = esc_attr( $options['id-prefix'] );
432
- } else {
433
- $host = parse_url( get_home_url(), PHP_URL_HOST );
434
- $this->frontend_prefix = preg_match( '/[A-Za-z][A-Za-z0-9_]{4}/', $host, $result ) ? $result[0] . '-' : Advanced_Ads_Plugin::DEFAULT_FRONTEND_PREFIX;
435
- }
436
- } else {
437
- $this->frontend_prefix = $options['front-prefix'];
438
- }
439
- }
440
- return $this->frontend_prefix;
441
- }
442
-
443
- /**
444
- * get priority used for injection inside content
445
- *
446
- * @since 1.6.10.2
447
- */
448
- public function get_content_injection_priority(){
449
- $options = $this->options();
450
-
451
- return isset( $options['content-injection-priority'] ) ? intval( $options['content-injection-priority'] ) : 100;
452
- }
453
-
454
- /**
455
- * returns the capability needed to perform an action
456
- *
457
- * @since 1.6.14
458
- * @param str $capability a capability to check, can be internal to Advanced Ads
459
- * @return str $capability a valid WordPress capability
460
- */
461
- public static function user_cap( $capability = 'manage_options' ){
462
-
463
- global $advanced_ads_capabilities;
464
-
465
- // admins can do everything
466
- // is also a fallback if no option or more specific capability is given
467
- if( current_user_can( 'manage_options' ) ){
468
- return 'manage_options';
469
- }
470
-
471
- return apply_filters( 'advanced-ads-capability', $capability );
472
-
473
- // check, if capability is mapped to an existing WP capability
474
- /*if( isset( $advanced_ads_capabilities[ $capability ] ) ){
475
- return apply_filters( 'advanced-ads-capability', $advanced_ads_capabilities[ $capability ], $capability );
476
- } else {
477
- // if not, use 'manage_posts' capability
478
- return apply_filters( 'advanced-ads-capability', 'manage_options', $capability );
479
- }*/
480
-
481
- }
482
-
483
- /**
484
- * Create roles and capabilities
485
- *
486
- */
487
- public function create_capabilities() {
488
- if ( $role = get_role( 'administrator' ) ) {
489
- $role->add_cap( 'advanced_ads_manage_options' );
490
- $role->add_cap( 'advanced_ads_see_interface' );
491
- $role->add_cap( 'advanced_ads_edit_ads' );
492
- $role->add_cap( 'advanced_ads_manage_placements' );
493
- $role->add_cap( 'advanced_ads_place_ads' );
494
- }
495
- }
496
-
497
- /**
498
- * Remove roles and capabilities
499
- *
500
- */
501
- public function remove_capabilities() {
502
- if ( $role = get_role( 'administrator' ) ) {
503
- $role->remove_cap( 'advanced_ads_manage_options' );
504
- $role->remove_cap( 'advanced_ads_see_interface' );
505
- $role->remove_cap( 'advanced_ads_edit_ads' );
506
- $role->remove_cap( 'advanced_ads_manage_placements' );
507
- $role->remove_cap( 'advanced_ads_place_ads' );
508
- }
509
- }
510
-
511
- /**
512
- * Fired when the plugin is uninstalled.
513
- */
514
- public static function uninstall() {
515
- $advads_options = Advanced_Ads::get_instance()->options();
516
-
517
- if ( ! empty( $advads_options['uninstall-delete-data'] ) ) {
518
- global $wpdb;
519
- $main_blog_id = $wpdb->blogid;
520
-
521
- Advanced_Ads::get_instance()->create_post_types();
522
-
523
- if ( ! is_multisite() ) {
524
- Advanced_Ads_Plugin::get_instance()->uninstall_single();
525
- } else {
526
- $blog_ids = $wpdb->get_col( "SELECT blog_id FROM {$wpdb->blogs}" );
527
-
528
- foreach ( $blog_ids as $blog_id ) {
529
- switch_to_blog( $blog_id );
530
- Advanced_Ads_Plugin::get_instance()->uninstall_single();
531
- }
532
- switch_to_blog( $main_blog_id );
533
- }
534
-
535
- // Delete assets (main blog).
536
- Advanced_Ads_Ad_Blocker_Admin::get_instance()->clear_assets();
537
- delete_option( ADVADS_AB_SLUG );
538
- }
539
-
540
- }
541
-
542
- /**
543
- * Fired for each blog when the plugin is uninstalled.
544
- *
545
- */
546
- protected function uninstall_single() {
547
- global $wpdb;
548
-
549
- // Ads.
550
- $post_ids = $wpdb->get_col( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_type = %s", Advanced_Ads::POST_TYPE_SLUG ) );
551
-
552
- if ( $post_ids ) {
553
- $wpdb->delete(
554
- $wpdb->posts,
555
- array( 'post_type' => Advanced_Ads::POST_TYPE_SLUG ),
556
- array( '%s' )
557
- );
558
-
559
- $wpdb->query( "DELETE FROM {$wpdb->postmeta} WHERE post_id IN( " . implode( ',', $post_ids ) . " )" );
560
- }
561
-
562
- // Groups.
563
- $term_ids = $wpdb->get_col( $wpdb->prepare( "SELECT t.term_id FROM {$wpdb->terms} AS t INNER JOIN {$wpdb->term_taxonomy} AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy = %s", Advanced_Ads::AD_GROUP_TAXONOMY ) );
564
-
565
- foreach ( $term_ids as $term_id ) {
566
- wp_delete_term( $term_id, Advanced_Ads::AD_GROUP_TAXONOMY );
567
- }
568
-
569
- delete_option( 'advads-ad-groups' );
570
- delete_option( Advanced_Ads::AD_GROUP_TAXONOMY . '_children' );
571
- delete_option( 'advads-ad-weights' );
572
-
573
- // Placements.
574
- delete_option( 'advads-ads-placements' );
575
-
576
- // User metadata.
577
- delete_metadata( 'user', null, 'advanced-ads-hide-wizard', '', true );
578
- delete_metadata( 'user', null, 'advanced-ads-subscribed', '', true );
579
-
580
- // Post metadata.
581
- delete_metadata( 'post', null, '_advads_ad_settings', '', true );
582
-
583
- // Transients.
584
- delete_transient( ADVADS_SLUG . '_add-on-updates-checked' );
585
-
586
- delete_option( GADSENSE_OPT_NAME );
587
- delete_option( ADVADS_SLUG );
588
- delete_option( ADVADS_SLUG . '-internal' );
589
- delete_option( ADVADS_SLUG . '-notices' );
590
-
591
- // Widget.
592
- $base_widget_id = Advanced_Ads_Widget::get_base_id();
593
- delete_option( 'widget_' . $base_widget_id );
594
-
595
- do_action( 'advanced-ads-uninstall' );
596
-
597
- wp_cache_flush();
598
- }
599
-
600
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/upgrades.php DELETED
@@ -1,268 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Upgrade logic from older data to new one
5
- *
6
- * the version number itself is changed in /admin/includes/class-notices.php::register_version_notices()
7
- *
8
- * @since 1.7
9
- */
10
- class Advanced_Ads_Upgrades {
11
-
12
- public function __construct(){
13
-
14
- $internal_options = Advanced_Ads_Plugin::get_instance()->internal_options();
15
-
16
- // the 'advanced_ads_edit_ads' capability was added to POST_TYPE_SLUG post type in this version
17
- if ( ! isset( $internal_options['version'] ) || version_compare( $internal_options['version'], '1.7.2', '<' ) ) {
18
- Advanced_Ads_Plugin::get_instance()->create_capabilities();
19
- }
20
-
21
- // suppress version update?
22
- $suppress_version_number_update = false;
23
-
24
- // don’t upgrade if no previous version existed
25
- if( ! empty( $internal_options['version'] ) ) {
26
- if ( version_compare( $internal_options['version'], '1.7' ) == -1 ) {
27
- // run with wp_loaded action, because WP_Query is needed and some plugins inject data that is not yet initialized
28
- add_action( 'wp_loaded', array( $this, 'upgrade_1_7') );
29
- }
30
-
31
- if ( version_compare( $internal_options['version'], '1.7.4' ) == -1 ) {
32
- // upgrate version number only after this ran through, because of the used filter only available in admin
33
- if( ! is_admin() ){
34
- $suppress_version_number_update = true;
35
- // run with wp_loaded action, because Upgrades are checked in the plugins_loaded hook
36
- } else {
37
- add_action( 'wp_loaded', array( $this, 'upgrade_1_7_4') );
38
- }
39
- }
40
- }
41
-
42
- // update version notices – if this doesn’t happen here, the upgrade might run multiple times and destroy updated data
43
- if( ! $suppress_version_number_update ){
44
- Advanced_Ads_Admin_Notices::get_instance()->update_version_number();
45
- }
46
- }
47
-
48
- /**
49
- * upgrade data to version 1.7
50
- * rewrite existing display conditions
51
- */
52
- public function upgrade_1_7(){
53
-
54
- // get all ads, regardless of the publish status
55
- $args['post_status'] = 'any';
56
- $args['suppress_filters'] = true; // needed to remove issue with a broken plugin from the repository
57
- $ads = Advanced_Ads::get_instance()->get_model()->get_ads( $args );
58
-
59
- // iterate through ads
60
- // error_log(print_r($ads, true));
61
- error_log(print_r('–– STARTING ADVANCED ADS data upgrade to version 1.7 ––', true));
62
- foreach( $ads as $_ad ){
63
- // ad options
64
- $option_key = Advanced_Ads_Ad::$options_meta_field;
65
- if( !isset( $_ad->ID ) || ! $option_key ){
66
- continue;
67
- }
68
- $options = get_post_meta( $_ad->ID, $option_key, true );
69
- // rewrite display conditions
70
- if( ! isset( $options['conditions'] ) ){
71
- continue;
72
- }
73
-
74
- error_log(print_r('AD ID: ' . $_ad->ID, true));
75
- error_log(print_r('OLD CONDITIONS', true));
76
- error_log(print_r($options['conditions'], true));
77
-
78
- $old_conditions = $options['conditions'];
79
-
80
- // check if conditions are disabled
81
- if( ! isset( $old_conditions['enabled'] ) || ! $old_conditions['enabled'] ){
82
- $new_conditions = '';
83
- } else {
84
- $new_conditions = array();
85
-
86
- // rewrite general conditions
87
- $old_general_conditions = array(
88
- 'is_front_page',
89
- 'is_singular',
90
- 'is_archive',
91
- 'is_search',
92
- 'is_404',
93
- 'is_attachment',
94
- 'is_main_query'
95
- );
96
- $general = array();
97
- foreach( $old_general_conditions as $_general_condition ){
98
- if( isset( $old_conditions[ $_general_condition ] ) && $old_conditions[ $_general_condition ] ) {
99
- $general[] = $_general_condition;
100
- }
101
- }
102
- // move general conditions into display conditions
103
- // only, if the number of conditions in the previous setting is lower, because only that means there is an active limitation
104
- // not sure if allowing an empty array is logical, but some users might have set this up to hide an ad
105
- if( count( $general ) < count( $old_general_conditions ) ){
106
- $new_conditions[] = array(
107
- 'type' => 'general',
108
- 'value' => $general
109
- );
110
- }
111
-
112
- // rewrite post types condition
113
- if( isset( $old_conditions[ 'posttypes' ]['include'] )
114
- && ( !isset ( $old_conditions[ 'posttypes' ]['all'] )
115
- || ! $old_conditions[ 'posttypes' ]['all'] ) ) {
116
- if ( is_string( $old_conditions[ 'posttypes' ]['include']) ) {
117
- $old_conditions[ 'posttypes' ]['include'] = explode( ',', $old_conditions[ 'posttypes' ]['include'] );
118
- }
119
- $new_conditions[] = array(
120
- 'type' => 'posttypes',
121
- 'value' => $old_conditions[ 'posttypes' ]['include']
122
- );
123
- }
124
-
125
- /**
126
- * rewrite category ids and category archive ids
127
- *
128
- * the problem is that before there was no connection between term ids and taxonomy, now, each taxonomy has its own condition
129
- */
130
- // check, if there are even such options set
131
- if( ( isset( $old_conditions[ 'categoryids' ] )
132
- && ( !isset ( $old_conditions[ 'categoryids' ]['all'] )
133
- || ! $old_conditions[ 'categoryids' ]['all'] ) )
134
- || ( isset( $old_conditions[ 'categoryarchiveids' ] )
135
- && ( !isset ( $old_conditions[ 'categoryarchiveids' ]['all'] )
136
- || ! $old_conditions[ 'categoryarchiveids' ]['all'] ) ))
137
- {
138
-
139
- // get all taxonomies
140
- $taxonomies = get_taxonomies( array('public' => true, 'publicly_queryable' => true), 'objects', 'or' );
141
- $taxonomy_terms = array();
142
- foreach ( $taxonomies as $_tax ) {
143
- if( $_tax->name === 'advanced_ads_groups' ){
144
- continue;
145
- }
146
- // get all terms
147
- $terms = get_terms( $_tax->name, array('hide_empty' => false, 'number' => 0, 'fields' => 'ids' ) );
148
- if ( is_wp_error( $terms ) || ! count( $terms ) ){
149
- continue;
150
- } else {
151
- $taxonomy_terms[ $_tax->name ] = $terms;
152
- }
153
-
154
- // get terms that are in all terms and in active terms
155
- if( isset( $old_conditions[ 'categoryids' ] )
156
- && ( !isset ( $old_conditions[ 'categoryids' ]['all'] )
157
- || ! $old_conditions[ 'categoryids' ]['all'] ) )
158
- {
159
- // honor "include" option first
160
- if( isset ( $old_conditions[ 'categoryids' ]['include'] ) && count( $old_conditions[ 'categoryids' ]['include'] )
161
- && $same_values = array_intersect($terms, $old_conditions[ 'categoryids' ]['include']) ){
162
- $new_conditions[] = array(
163
- 'type' => 'taxonomy_' . $_tax->name ,
164
- 'operator' => 'is',
165
- 'value' => $same_values
166
- );
167
- } elseif ( isset ( $old_conditions[ 'categoryids' ]['exclude'] ) && count( $old_conditions[ 'categoryids' ]['exclude'] )
168
- && $same_values = array_intersect($terms, $old_conditions[ 'categoryids' ]['exclude']) ){
169
- $new_conditions[] = array(
170
- 'type' => 'taxonomy_' . $_tax->name ,
171
- 'operator' => 'is_not',
172
- 'value' => $same_values
173
- );
174
- }
175
- }
176
-
177
- // get terms that are in all terms and in active terms
178
- if( isset( $old_conditions[ 'categoryarchiveids' ] )
179
- && ( !isset ( $old_conditions[ 'categoryarchiveids' ]['all'] )
180
- || ! $old_conditions[ 'categoryarchiveids' ]['all'] ) )
181
- {
182
- // honor "include" option first
183
- if( isset ( $old_conditions[ 'categoryarchiveids' ]['include'] ) && count( $old_conditions[ 'categoryarchiveids' ]['include'] )
184
- && $same_values = array_intersect($terms, $old_conditions[ 'categoryarchiveids' ]['include']) ){
185
- $new_conditions[] = array(
186
- 'type' => 'archive_' . $_tax->name ,
187
- 'operator' => 'is',
188
- 'value' => $same_values
189
- );
190
- } elseif ( isset ( $old_conditions[ 'categoryarchiveids' ]['exclude'] ) && count( $old_conditions[ 'categoryarchiveids' ]['exclude'] )
191
- && $same_values = array_intersect($terms, $old_conditions[ 'categoryarchiveids' ]['exclude']) ){
192
- $new_conditions[] = array(
193
- 'type' => 'archive_' . $_tax->name ,
194
- 'operator' => 'is_not',
195
- 'value' => $same_values
196
- );
197
- }
198
- }
199
- }
200
- }
201
-
202
- // rewrite single post ids
203
- if( isset ( $old_conditions[ 'postids' ]['ids'] )
204
- && isset ( $old_conditions[ 'postids' ]['method'] )
205
- && $old_conditions[ 'postids' ]['method']
206
- && ( !isset ( $old_conditions[ 'postids' ]['all'] )
207
- || ! $old_conditions[ 'postids' ]['all'] ) ) {
208
- $operator = ( $old_conditions[ 'postids' ]['method'] === 'exclude' ) ? 'is_not' : 'is';
209
- if ( is_string( $old_conditions[ 'postids' ]['ids']) ) {
210
- $old_conditions[ 'postids' ]['ids'] = explode( ',', $old_conditions[ 'postids' ]['ids'] );
211
- }
212
- $new_conditions[] = array(
213
- 'type' => 'postids',
214
- 'operator' => $operator,
215
- 'value' => $old_conditions[ 'postids' ]['ids']
216
- );
217
- }
218
- }
219
-
220
- error_log(print_r('NEW CONDITIONS', true));
221
- error_log(print_r($new_conditions, true));
222
-
223
- $options['conditions'] = $new_conditions;
224
-
225
- // save conditions
226
- update_post_meta( $_ad->ID, $option_key, $options );
227
- }
228
-
229
- error_log(print_r('up to 1.7', true));
230
- }
231
-
232
- /**
233
- * upgrades for version 1.7.4
234
- * reactivate active add-on licenses, needed only once after upgrade of the plugin shop
235
- */
236
- public function upgrade_1_7_4(){
237
-
238
- // ignore, if not main blog
239
- if( is_multisite() && ! is_main_site() ){
240
- return;
241
- }
242
-
243
- $add_ons = apply_filters( 'advanced-ads-add-ons', array() );
244
-
245
- // return if no add-ons found
246
- if( $add_ons === array() ) {
247
- return;
248
- }
249
-
250
- error_log(print_r('–– STARTING ADVANCED ADS 1.7.4 upgrade ––', true));
251
- foreach( $add_ons as $_add_on_key => $_add_on ){
252
-
253
- // check status
254
- if( Advanced_Ads_Admin::get_instance()->get_license_status( $_add_on['options_slug'] ) !== 'valid' ) {
255
- continue;
256
- }
257
-
258
- // retrieve our license key from the DB
259
- $licenses = get_option(ADVADS_SLUG . '-licenses', array());
260
- $license_key = isset($licenses[$_add_on_key]) ? $licenses[$_add_on_key] : '';
261
-
262
- $result = Advanced_Ads_Admin::get_instance()->activate_license( $_add_on_key, $_add_on['name'], $_add_on['options_slug'], $license_key );
263
- error_log( sprintf( 'Register license key for %s: %s', $_add_on['name'], $result ) );
264
-
265
- }
266
- }
267
-
268
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/visitor-conditions.php DELETED
@@ -1,363 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * visitor conditions under which to (not) show an ad
5
- *
6
- * @since 1.5.4
7
- *
8
- */
9
- class Advanced_Ads_Visitor_Conditions {
10
-
11
- /**
12
- *
13
- * @var Advanced_Ads_Visitor_Conditions
14
- */
15
- protected static $instance;
16
-
17
- /**
18
- * registered visitor conditions
19
- */
20
- public $conditions;
21
-
22
- /**
23
- * start of name in form elements
24
- */
25
- const FORM_NAME = 'advanced_ad[visitors]';
26
-
27
- public function __construct() {
28
-
29
- // register conditions
30
- $this->conditions = apply_filters( 'advanced-ads-visitor-conditions', array(
31
- 'mobile' => array( // type of the condition
32
- 'label' => __( 'mobile device', 'advanced-ads' ),
33
- 'description' => __( 'Display ads only on mobile devices or hide them.', 'advanced-ads' ),
34
- 'metabox' => array( 'Advanced_Ads_Visitor_Conditions', 'mobile_is_or_not' ), // callback to generate the metabox
35
- 'check' => array( 'Advanced_Ads_Visitor_Conditions', 'check_mobile' ), // callback for frontend check
36
- 'helplink' => ADVADS_URL . 'manual/display-ads-either-on-mobile-or-desktop/#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-visitor-mobile' // link to help section
37
- ),
38
- 'loggedin' => array(
39
- 'label' => __( 'logged in visitor', 'advanced-ads' ),
40
- 'description' => __( 'Whether the visitor has to be logged in or not in order to see the ads.', 'advanced-ads' ),
41
- 'metabox' => array( 'Advanced_Ads_Visitor_Conditions', 'metabox_is_or_not' ), // callback to generate the metabox
42
- 'check' => array( 'Advanced_Ads_Visitor_Conditions', 'check_logged_in' ) // callback for frontend check
43
- ),
44
- ));
45
-
46
- ksort( $this->conditions );
47
- }
48
-
49
- /**
50
- *
51
- * @return Advanced_Ads_Plugin
52
- */
53
- public static function get_instance() {
54
- // If the single instance hasn't been set, set it now.
55
- if ( null === self::$instance ) {
56
- self::$instance = new self;
57
- }
58
-
59
- return self::$instance;
60
- }
61
-
62
- /**
63
- * callback to render the mobile condition using the "is not" condition
64
- *
65
- * @param arr $options options of the condition
66
- * @param int $index index of the condition
67
- */
68
- static function mobile_is_or_not( $options, $index = 0 ){
69
-
70
- self::metabox_is_or_not($options, $index);
71
-
72
- if( ! defined( 'AAR_SLUG' ) ){
73
- echo '<p>' . sprintf(__( 'Pro: Display ads by the available space on the device using the <a href="%s" target="_blank">Responsive add-on</a>', ADVADS_SLUG ), ADVADS_URL . 'add-ons/responsive-ads/#utm_source=advanced-ads&utm_medium=link&utm_campaign=edit-visitor-responsive') . '</p>';
74
- }
75
- }
76
-
77
- /**
78
- * callback to display the "is not" condition
79
- *
80
- * @param arr $options options of the condition
81
- * @param int $index index of the condition
82
- */
83
- static function metabox_is_or_not( $options, $index = 0 ){
84
-
85
- if ( ! isset ( $options['type'] ) || '' === $options['type'] ) { return; }
86
-
87
- $type_options = self::get_instance()->conditions;
88
-
89
- if ( ! isset( $type_options[ $options['type'] ] ) ) {
90
- return;
91
- }
92
-
93
- // form name basis
94
- $name = self::FORM_NAME . '[' . $index . ']';
95
-
96
- // options
97
- $operator = isset( $options['operator'] ) ? $options['operator'] : 'is';
98
-
99
- ?><input type="hidden" name="<?php echo $name; ?>[type]" value="<?php echo $options['type']; ?>"/>
100
- <select name="<?php echo $name; ?>[operator]">
101
- <option value="is" <?php selected( 'is', $operator ); ?>><?php _e( 'is' ); ?></option>
102
- <option value="is_not" <?php selected( 'is_not', $operator ); ?>><?php _e( 'is not' ); ?></option>
103
- </select>
104
- <p class="description"><?php echo $type_options[ $options['type'] ]['description'];
105
- if( isset( $type_options[ $options['type'] ]['helplink'] ) ) : ?>
106
- <a href="<?php echo $type_options[ $options['type'] ]['helplink']; ?>" target="_blank"><?php
107
- _e( 'Manual and Troubleshooting', 'advanced-ads' );
108
- ?></a><?php endif; ?></p><?php
109
- }
110
-
111
- /**
112
- * callback to display the any condition based on a number
113
- *
114
- * @param arr $options options of the condition
115
- * @param int $index index of the condition
116
- */
117
- static function metabox_number( $options, $index = 0 ){
118
-
119
- if ( ! isset ( $options['type'] ) || '' === $options['type'] ) { return; }
120
-
121
- $type_options = self::get_instance()->conditions;
122
-
123
- if ( ! isset( $type_options[ $options['type'] ] ) ) {
124
- return;
125
- }
126
-
127
- // form name basis
128
- $name = self::FORM_NAME . '[' . $index . ']';
129
-
130
- // options
131
- $value = isset( $options['value'] ) ? $options['value'] : 0;
132
- $operator = isset( $options['operator'] ) ? $options['operator'] : 'is_equal';
133
-
134
- ?><input type="hidden" name="<?php echo $name; ?>[type]" value="<?php echo $options['type']; ?>"/>
135
- <select name="<?php echo $name; ?>[operator]">
136
- <option value="is_equal" <?php selected( 'is_equal', $operator ); ?>><?php _e( 'equal', 'advanced-ads' ); ?></option>
137
- <option value="is_higher" <?php selected( 'is_higher', $operator ); ?>><?php _e( 'equal or higher', 'advanced-ads' ); ?></option>
138
- <option value="is_lower" <?php selected( 'is_lower', $operator ); ?>><?php _e( 'equal or lower', 'advanced-ads' ); ?></option>
139
- </select><input type="number" name="<?php echo $name; ?>[value]" value="<?php echo absint( $value ); ?>"/>
140
- <p class="description"><?php echo $type_options[ $options['type'] ]['description']; ?></p><?php
141
- }
142
-
143
- /**
144
- * callback to display the any condition based on a number
145
- *
146
- * @param arr $options options of the condition
147
- * @param int $index index of the condition
148
- */
149
- static function metabox_string( $options, $index = 0 ){
150
-
151
- if ( ! isset ( $options['type'] ) || '' === $options['type'] ) { return; }
152
-
153
- $type_options = self::get_instance()->conditions;
154
-
155
- if ( ! isset( $type_options[ $options['type'] ] ) ) {
156
- return;
157
- }
158
-
159
- // form name basis
160
- $name = self::FORM_NAME . '[' . $index . ']';
161
-
162
- // options
163
- $value = isset( $options['value'] ) ? $options['value'] : '';
164
- $operator = isset( $options['operator'] ) ? $options['operator'] : 'contains';
165
-
166
- ?><input type="hidden" name="<?php echo $name; ?>[type]" value="<?php echo $options['type']; ?>"/>
167
- <select name="<?php echo $name; ?>[operator]">
168
- <option value="contain" <?php selected( 'contain', $operator ); ?>><?php _e( 'contains', 'advanced-ads' ); ?></option>
169
- <option value="start" <?php selected( 'start', $operator ); ?>><?php _e( 'starts with', 'advanced-ads' ); ?></option>
170
- <option value="end" <?php selected( 'end', $operator ); ?>><?php _e( 'ends with', 'advanced-ads' ); ?></option>
171
- <option value="match" <?php selected( 'match', $operator ); ?>><?php _e( 'matches', 'advanced-ads' ); ?></option>
172
- <option value="regex" <?php selected( 'regex', $operator ); ?>><?php _e( 'matches regex', 'advanced-ads' ); ?></option>
173
- <option value="contain_not" <?php selected( 'contain_not', $operator ); ?>><?php _e( 'does not contain', 'advanced-ads' ); ?></option>
174
- <option value="start_not" <?php selected( 'start_not', $operator ); ?>><?php _e( 'does not start with', 'advanced-ads' ); ?></option>
175
- <option value="end_not" <?php selected( 'end_not', $operator ); ?>><?php _e( 'does not end with', 'advanced-ads' ); ?></option>
176
- <option value="match_not" <?php selected( 'match_not', $operator ); ?>><?php _e( 'does not match', 'advanced-ads' ); ?></option>
177
- <option value="regex_not" <?php selected( 'regex_not', $operator ); ?>><?php _e( 'does not match regex', 'advanced-ads' ); ?></option>
178
- </select><input type="text" name="<?php echo $name; ?>[value]" value="<?php echo $value; ?>"/>
179
- <p class="description"><?php echo $type_options[ $options['type'] ]['description']; ?></p><?php
180
- }
181
-
182
- /**
183
- * controls frontend checks for conditions
184
- *
185
- * @param arr $options options of the condition
186
- * @param ob $ad Advanced_Ads_Ad
187
- * @return bool false, if ad can’t be delivered
188
- */
189
- static function frontend_check( $options = array(), $ad = false ){
190
- $visitor_conditions = Advanced_Ads_Visitor_Conditions::get_instance()->conditions;
191
-
192
- if ( is_array( $options ) && isset( $visitor_conditions[ $options['type'] ]['check'] ) ) {
193
- $check = $visitor_conditions[ $options['type'] ]['check'];
194
- } else {
195
- return true;
196
- }
197
-
198
- // call frontend check callback
199
- if ( method_exists( $check[0], $check[1] ) ) {
200
- return call_user_func( array( $check[0], $check[1] ), $options, $ad );
201
- }
202
-
203
- return true;
204
- }
205
-
206
- /**
207
- * render connector option
208
- *
209
- * @since 1.7.0.4
210
- * @param int $index
211
- */
212
- static function render_connector_option( $index = 0, $value = 'or' ){
213
-
214
- $label = ( $value === 'or' ) ? __( 'or', 'advanced-ads' ) : __( 'and', 'advanced-ads' );
215
-
216
- return '<input type="checkbox" name="' . self::FORM_NAME . '[' . $index . '][connector]' . '" value="or" id="advads-visitor-conditions-' .
217
- $index . '-connector"' .
218
- checked( 'or', $value, false )
219
- .'><label for="advads-visitor-conditions-' . $index . '-connector">' . $label . '</label>';
220
- }
221
-
222
- /**
223
- * check mobile visitor condition in frontend
224
- *
225
- * @param arr $options options of the condition
226
- * @return bool true if can be displayed
227
- */
228
- static function check_mobile( $options = array() ){
229
-
230
- if ( ! isset( $options['operator'] ) ) {
231
- return true;
232
- }
233
-
234
- switch ( $options['operator'] ){
235
- case 'is' :
236
- if ( ! wp_is_mobile() ) { return false; }
237
- break;
238
- case 'is_not' :
239
- if ( wp_is_mobile() ) { return false; }
240
- break;
241
- }
242
-
243
- return true;
244
- }
245
-
246
- /**
247
- * check mobile visitor condition in frontend
248
- *
249
- * @since 1.6.3
250
- * @param arr $options options of the condition
251
- * @return bool true if can be displayed
252
- */
253
- static function check_logged_in( $options = array() ){
254
-
255
- if ( ! isset( $options['operator'] ) ) {
256
- return true;
257
- }
258
-
259
- switch ( $options['operator'] ){
260
- case 'is' :
261
- if ( ! is_user_logged_in() ) { return false; }
262
- break;
263
- case 'is_not' :
264
- if ( is_user_logged_in() ) { return false; }
265
- break;
266
- }
267
-
268
- return true;
269
- }
270
-
271
- /**
272
- * helper for check with strings
273
- *
274
- * @since 1.6.3
275
- * @param str $string string that is going to be checked
276
- * @return bool true if ad can be displayed
277
- */
278
- static function helper_check_string( $string = '', $options = array() ){
279
-
280
- if ( ! isset( $options['operator'] ) || ! isset( $options['value'] ) || '' === $options['value'] ){
281
- return true;
282
- }
283
-
284
- $operator = $options['operator'];
285
- $value = $options['value'];
286
-
287
- // check length of url
288
- if( $operator !== 'regex' && $operator !== 'regex_not' ){
289
- if ( strlen( $value ) > strlen( $string ) ) {
290
- return false;
291
- }
292
- }
293
-
294
- // check the condition by mode and bool
295
- $condition = true;
296
- switch ( $operator ){
297
- // referrer contains string on any position
298
- case 'contain' :
299
- $condition = stripos( $string, $value ) !== false;
300
- break;
301
-
302
- // referrer does not contain string on any position
303
- case 'contain_not' :
304
- $condition = stripos( $string, $value ) === false;
305
- break;
306
-
307
- // referrer starts with the string
308
- case 'start' :
309
- $condition = stripos( $string, $value ) === 0;
310
- break;
311
- // referrer does not start with the string
312
- case 'start_not' :
313
- $condition = stripos( $string, $value ) !== 0;
314
- break;
315
- // referrer ends with the string
316
- case 'end' :
317
- // check if string is longer than referrer
318
- $strlen = strlen( $string );
319
- $vallen = strlen( $value );
320
-
321
- $condition = substr_compare( $string, $value, $strlen - $vallen, $vallen, true ) === 0;
322
- break;
323
- // referrer does not end with the string
324
- case 'end_not' :
325
- // check if string is longer than referrer
326
- $strlen = strlen( $string );
327
- $vallen = strlen( $value );
328
-
329
- $condition = substr_compare( $string, $value, $strlen - $vallen, $vallen, true ) !== 0;
330
- break;
331
-
332
- // referrer is equal to the string
333
- case 'match' :
334
- // strings do match, but should not or not match but should
335
- $condition = strcasecmp($value, $string) === 0;
336
- break;
337
- // referrer is not equal to the string
338
- case 'match_not' :
339
- // strings do match, but should not or not match but should
340
- $condition = strcasecmp($value, $string) !== 0;
341
- break;
342
- // string is a regular expression
343
- case 'regex' :
344
- // check regular expression first
345
- if( @preg_match( $value, null ) === false ){
346
- Advanced_Ads::log( "Advanced Ads: regular expression '$value' in visitor condition is broken." );
347
- } else {
348
- $condition = preg_match( $value, $string );
349
- }
350
- break;
351
- // string is not a regular expression
352
- case 'regex_not' :
353
- if( @preg_match( $value, null ) === false ){
354
- Advanced_Ads::log( "Advanced Ads: regular expression '$value' in visitor condition is broken." );
355
- } else {
356
- $condition = ! preg_match( $value, $string );
357
- }
358
- break;
359
- }
360
-
361
- return $condition;
362
- }
363
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/widget.php DELETED
@@ -1,179 +0,0 @@
1
- <?php
2
- /**
3
- * Advanced Ads Widget
4
- *
5
- * @package Advanced_Ads_Widget
6
- * @author Thomas Maier <thomas.maier@webgilde.com>
7
- * @license GPL-2.0+
8
- * @link http://webgilde.com
9
- * @copyright 2014 Thomas Maier, webgilde GmbH
10
- */
11
-
12
- /**
13
- * Ad widget
14
- *
15
- */
16
- class Advanced_Ads_Widget extends WP_Widget {
17
-
18
- function __construct() {
19
- $prefix = Advanced_Ads_Plugin::get_instance()->get_frontend_prefix();
20
- $classname = $prefix . 'widget';
21
-
22
- $widget_ops = array('classname' => $classname, 'description' => __( 'Display Ads and Ad Groups.', 'advanced-ads' ));
23
- $control_ops = array();
24
- $base_id = Advanced_Ads_Widget::get_base_id();
25
-
26
- parent::__construct( $base_id,'Advanced Ads', $widget_ops, $control_ops );
27
- }
28
-
29
- function widget($args, $instance) {
30
- /** This filter is documented in wp-includes/default-widgets.php */
31
- $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base );
32
-
33
- extract( $args );
34
- $item_id = empty($instance['item_id']) ? '' : $instance['item_id'];
35
-
36
- $output = self::output( $item_id );
37
- if( $output == '' ){
38
- return;
39
- }
40
-
41
- echo $before_widget;
42
- if ( ! empty( $title ) ) {
43
- echo $before_title . $title . $after_title;
44
- }
45
- echo $output;
46
- echo $after_widget;
47
- }
48
-
49
- function update($new_instance, $old_instance) {
50
- $instance = $old_instance;
51
- $instance['title'] = $new_instance['title'];
52
- $instance['item_id'] = $new_instance['item_id'];
53
- return $instance;
54
- }
55
-
56
- function form($instance) {
57
- $instance = wp_parse_args( (array) $instance, array('title' => '', 'item_id' => '') );
58
- $title = strip_tags( $instance['title'] );
59
- $elementid = $instance['item_id'];
60
-
61
- ?><p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ); ?></label>
62
- <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" /></p><?php
63
-
64
- $items = array_merge( self::items_for_select(), self::widget_placements_for_select() );
65
- ?>
66
- <select id="<?php echo $this->get_field_id( 'item_id' ); ?>" name="<?php echo $this->get_field_name( 'item_id' ); ?>">
67
- <option value=""><?php _e( '--empty--', 'advanced-ads' ); ?></option>
68
- <?php if ( isset($items['placements']) ) : ?>
69
- <optgroup label="<?php _e( 'Placements', 'advanced-ads' ); ?>">
70
- <?php foreach ( $items['placements'] as $_item_id => $_item_title ) : ?>
71
- <option value="<?php echo $_item_id; ?>" <?php selected( $_item_id, $elementid ); ?>><?php echo $_item_title; ?></option>
72
- <?php endforeach; ?>
73
- </optgroup>
74
- <?php endif; ?>
75
- <?php if ( isset($items['groups']) ) : ?>
76
- <optgroup label="<?php _e( 'Ad Groups', 'advanced-ads' ); ?>">
77
- <?php foreach ( $items['groups'] as $_item_id => $_item_title ) : ?>
78
- <option value="<?php echo $_item_id; ?>" <?php selected( $_item_id, $elementid ); ?>><?php echo $_item_title; ?></option>
79
- <?php endforeach; ?>
80
- </optgroup>
81
- <?php endif; ?>
82
- <?php if ( isset($items['ads']) ) : ?>
83
- <optgroup label="<?php _e( 'Ads', 'advanced-ads' ); ?>">
84
- <?php foreach ( $items['ads'] as $_item_id => $_item_title ) : ?>
85
- <option value="<?php echo $_item_id; ?>" <?php selected( $_item_id, $elementid ); ?>><?php echo $_item_title; ?></option>
86
- <?php endforeach; ?>
87
- </optgroup>
88
- <?php endif; ?>
89
- </select><?php
90
- }
91
-
92
- /**
93
- * get items for widget select field
94
- *
95
- * @since 1.2
96
- * @return arr $select items for select field
97
- */
98
- static function items_for_select(){
99
- $select = array();
100
- $model = Advanced_Ads::get_instance()->get_model();
101
-
102
- // load all ads
103
- $ads = $model->get_ads( array('orderby' => 'title', 'order' => 'ASC') );
104
- foreach ( $ads as $_ad ){
105
- $select['ads']['ad_' . $_ad->ID] = $_ad->post_title;
106
- }
107
-
108
- // load all ad groups
109
- $groups = $model->get_ad_groups();
110
- foreach ( $groups as $_group ){
111
- $select['groups']['group_' . $_group->term_id] = $_group->name;
112
- }
113
-
114
- return $select;
115
- }
116
-
117
- /**
118
- * get widget placements for select field
119
- *
120
- * @since 1.6.11
121
- * @return arr $items for select field
122
- */
123
- public static function widget_placements_for_select(){
124
- $select = array();
125
- $placements = Advanced_Ads::get_ad_placements_array();
126
-
127
- foreach( $placements as $_placement_slug => $_placement ){
128
- if( isset( $_placement['type'] ) && 'sidebar_widget' === $_placement['type'] ){
129
- $select['placements']['placement_' . $_placement_slug ] = $_placement['name'];
130
- }
131
- }
132
-
133
- return $select;
134
- }
135
-
136
- /**
137
- * return content of an in a widget
138
- *
139
- * @since 1.2
140
- * @param string $id slug of the display
141
- */
142
- static function output($id = ''){
143
- // get placement data for the slug
144
- if ( empty($id) ) { return; }
145
-
146
- $item = explode( '_', $id, 2 );
147
-
148
- if ( isset($item[1]) ) {
149
- $item_id = $item[1];
150
- } elseif (empty($item_id)) {
151
- return;
152
- }
153
-
154
- // return either ad or group content
155
- if ( $item[0] == 'ad' ){
156
- return get_ad( absint( $item_id ) );
157
- } elseif ( $item[0] == 'group' ){
158
- return get_ad_group( absint( $item_id ) );
159
- } elseif ( $item[0] == 'placement' ){
160
- return get_ad_placement( $item_id );
161
- }
162
-
163
- return;
164
- }
165
-
166
- /**
167
- * get the base id of the widget
168
- *
169
- * @return string
170
- */
171
- public static function get_base_id() {
172
- $options = Advanced_Ads_Plugin::get_instance()->options();
173
-
174
- // deprecated to keep previously changed prefixed working
175
- $prefix2 = ( isset( $options['id-prefix'] ) && $options['id-prefix'] !== '' ) ? $options['id-prefix'] : 'advads_ad_';
176
- return $prefix2 . 'widget';
177
- }
178
-
179
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
composer.json CHANGED
@@ -2,39 +2,20 @@
2
  "name": "webgilde/advanced-ads",
3
  "description": "Advanced Ads: Manage and optimize your ads in WordPress",
4
  "keywords": ["wordpress", "ads", "plugin"],
 
 
5
  "authors": [
6
  {
7
  "name": "Thomas Maier",
8
  "email": "thomas.maier@webgilde.com"
9
  }
10
  ],
11
- "homepage": "https://wordpress.org/plugins/advanced-ads/",
12
- "license": "GPL-2.0+",
13
  "type": "wordpress-plugin",
14
- "support": {
15
- "forum": "https://wordpress.org/support/plugin/advanced-ads"
16
- },
17
  "require": {
18
- "composer/installers": "~1.0",
19
- "xrstf/composer-php52": "^1.0.17"
20
  },
21
  "autoload": {
22
- "classmap": [
23
- "admin/",
24
- "classes/",
25
- "public/"
26
- ]
27
- },
28
- "scripts": {
29
- "post-install-cmd": [
30
- "xrstf\\Composer52\\Generator::onPostInstallCmd"
31
- ],
32
- "post-update-cmd": [
33
- "xrstf\\Composer52\\Generator::onPostInstallCmd"
34
- ],
35
- "post-autoload-dump": [
36
- "xrstf\\Composer52\\Generator::onPostInstallCmd"
37
- ]
38
  },
39
  "extra": {
40
  "branch-alias": {
2
  "name": "webgilde/advanced-ads",
3
  "description": "Advanced Ads: Manage and optimize your ads in WordPress",
4
  "keywords": ["wordpress", "ads", "plugin"],
5
+ "homepage": "http://webgilde.com",
6
+ "license": "GPL-2.0",
7
  "authors": [
8
  {
9
  "name": "Thomas Maier",
10
  "email": "thomas.maier@webgilde.com"
11
  }
12
  ],
 
 
13
  "type": "wordpress-plugin",
 
 
 
14
  "require": {
15
+ "composer/installers": "~1.0"
 
16
  },
17
  "autoload": {
18
+ "classmap": [ "classes/", "includes/", "public/class-advanced-ads.php" ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  },
20
  "extra": {
21
  "branch-alias": {
composer.lock DELETED
@@ -1,149 +0,0 @@
1
- {
2
- "_readme": [
3
- "This file locks the dependencies of your project to a known state",
4
- "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
5
- "This file is @generated automatically"
6
- ],
7
- "hash": "a5682b6980988f749640ce92382a6247",
8
- "content-hash": "ad3eee4861f3aff012912967c0a17906",
9
- "packages": [
10
- {
11
- "name": "composer/installers",
12
- "version": "v1.0.23",
13
- "source": {
14
- "type": "git",
15
- "url": "https://github.com/composer/installers.git",
16
- "reference": "6213d900e92647831f7a406d5c530ea1f3d4360e"
17
- },
18
- "dist": {
19
- "type": "zip",
20
- "url": "https://api.github.com/repos/composer/installers/zipball/6213d900e92647831f7a406d5c530ea1f3d4360e",
21
- "reference": "6213d900e92647831f7a406d5c530ea1f3d4360e",
22
- "shasum": ""
23
- },
24
- "require": {
25
- "composer-plugin-api": "^1.0"
26
- },
27
- "replace": {
28
- "roundcube/plugin-installer": "*",
29
- "shama/baton": "*"
30
- },
31
- "require-dev": {
32
- "composer/composer": "1.0.*@dev",
33
- "phpunit/phpunit": "4.1.*"
34
- },
35
- "type": "composer-plugin",
36
- "extra": {
37
- "class": "Composer\\Installers\\Plugin",
38
- "branch-alias": {
39
- "dev-master": "1.0-dev"
40
- }
41
- },
42
- "autoload": {
43
- "psr-0": {
44
- "Composer\\Installers\\": "src/"
45
- }
46
- },
47
- "notification-url": "https://packagist.org/downloads/",
48
- "license": [
49
- "MIT"
50
- ],
51
- "authors": [
52
- {
53
- "name": "Kyle Robinson Young",
54
- "email": "kyle@dontkry.com",
55
- "homepage": "https://github.com/shama"
56
- }
57
- ],
58
- "description": "A multi-framework Composer library installer",
59
- "homepage": "http://composer.github.com/installers/",
60
- "keywords": [
61
- "Craft",
62
- "Dolibarr",
63
- "Hurad",
64
- "MODX Evo",
65
- "OXID",
66
- "SMF",
67
- "Thelia",
68
- "WolfCMS",
69
- "agl",
70
- "aimeos",
71
- "annotatecms",
72
- "bitrix",
73
- "cakephp",
74
- "chef",
75
- "codeigniter",
76
- "concrete5",
77
- "croogo",
78
- "dokuwiki",
79
- "drupal",
80
- "elgg",
81
- "fuelphp",
82
- "grav",
83
- "installer",
84
- "joomla",
85
- "kohana",
86
- "laravel",
87
- "lithium",
88
- "magento",
89
- "mako",
90
- "mediawiki",
91
- "modulework",
92
- "moodle",
93
- "phpbb",
94
- "piwik",
95
- "ppi",
96
- "puppet",
97
- "roundcube",
98
- "shopware",
99
- "silverstripe",
100
- "symfony",
101
- "typo3",
102
- "wordpress",
103
- "zend",
104
- "zikula"
105
- ],
106
- "time": "2016-01-27 12:54:22"
107
- },
108
- {
109
- "name": "xrstf/composer-php52",
110
- "version": "v1.0.19",
111
- "source": {
112
- "type": "hg",
113
- "url": "https://bitbucket.org/xrstf/composer-php52",
114
- "reference": "9a4a9c46d0347b39bf9159815301dc66fc25324e"
115
- },
116
- "dist": {
117
- "type": "zip",
118
- "url": "https://bitbucket.org/xrstf/composer-php52/get/9a4a9c46d0347b39bf9159815301dc66fc25324e.zip",
119
- "reference": "9a4a9c46d0347b39bf9159815301dc66fc25324e",
120
- "shasum": ""
121
- },
122
- "type": "library",
123
- "extra": {
124
- "branch-alias": {
125
- "dev-default": "1.x-dev"
126
- }
127
- },
128
- "autoload": {
129
- "psr-0": {
130
- "xrstf\\Composer52": "lib/"
131
- }
132
- },
133
- "notification-url": "https://packagist.org/downloads/",
134
- "license": [
135
- "MIT"
136
- ],
137
- "homepage": "http://www.xrstf.de/",
138
- "time": "2015-10-01 14:11:58"
139
- }
140
- ],
141
- "packages-dev": [],
142
- "aliases": [],
143
- "minimum-stability": "stable",
144
- "stability-flags": [],
145
- "prefer-stable": false,
146
- "prefer-lowest": false,
147
- "platform": [],
148
- "platform-dev": []
149
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/array_ad_conditions.php CHANGED
@@ -14,86 +14,64 @@
14
  * type - information / markup type
15
  * idfield - input field for comma separated lists of ids
16
  * radio - radio button
17
- * others - added to not trigger internal sanitization
18
  *
19
  * note: ’idfield’ always has a {field}_not version that is created automatically and being its own condition
20
  *
21
- * @deprecated since 1.7
22
  */
23
 
24
- // avoid direct execution
25
- if ( ! class_exists( 'Advanced_Ads', false ) ) {
26
- die();
27
- }
28
-
29
  $advanced_ads_slug = Advanced_Ads::get_instance()->get_plugin_slug();
30
 
31
  $advanced_ads_ad_conditions = array(
32
- 'enabled' => array( // dummy, to let the validation of the general ad conditions past
33
- // 'label' => __('Post Types', $advanced_ads_slug),
34
- // 'description' => __('Choose the public post types on which to display the ad.', $advanced_ads_slug),
35
- 'type' => 'other',
36
- // 'callback' => array('Advanced_Ads_Display_Condition_Callbacks', 'post_types')
37
- ),
38
- 'posttypes' => array(
39
- 'label' => __( 'Post Types', $advanced_ads_slug ),
40
- 'description' => __( 'Choose the public post types on which to display the ad.', $advanced_ads_slug ),
41
- 'type' => 'textvalues',
42
- 'callback' => array('Advanced_Ads_Display_Condition_Callbacks', 'post_types')
43
- ),
44
- 'categoryids' => array(
45
- 'label' => __( 'Categories, Tags and Taxonomies', $advanced_ads_slug ),
46
- 'description' => __( 'Choose terms from public category, tag and other taxonomies a post must belong to in order to have ads.', $advanced_ads_slug ),
47
- 'type' => 'idfield',
48
- 'callback' => array('Advanced_Ads_Display_Condition_Callbacks', 'terms')
49
- ),
50
- 'categoryarchiveids' => array(
51
- 'label' => __( 'Category Archives', $advanced_ads_slug ),
52
- 'description' => __( 'comma seperated IDs of category archives', $advanced_ads_slug ),
53
- 'type' => 'idfield',
54
- 'callback' => array('Advanced_Ads_Display_Condition_Callbacks', 'category_archives')
55
- ),
56
- 'postids' => array(
57
- 'label' => __( 'Individual Posts, Pages and Public Post Types', $advanced_ads_slug ),
58
- 'description' => __( 'Choose on which individual posts, pages and public post type pages you want to display or hide ads.', $advanced_ads_slug ),
59
- 'type' => 'other',
60
- 'callback' => array('Advanced_Ads_Display_Condition_Callbacks', 'single_posts')
61
- ),
62
- 'is_front_page' => array(
63
- 'label' => __( 'Home Page', $advanced_ads_slug ),
64
- 'description' => __( 'show on Home page', $advanced_ads_slug ),
65
- 'type' => 'radio',
66
- ),
67
- 'is_singular' => array(
68
- 'label' => __( 'Singular Pages', $advanced_ads_slug ),
69
- 'description' => __( 'show on singular pages/posts', $advanced_ads_slug ),
70
- 'type' => 'radio',
71
- ),
72
- 'is_archive' => array(
73
- 'label' => __( 'Archive Pages', $advanced_ads_slug ),
74
- 'description' => __( 'show on any type of archive page (category, tag, author and date)', $advanced_ads_slug ),
75
- 'type' => 'radio',
76
- ),
77
- 'is_search' => array(
78
- 'label' => __( 'Search Results', $advanced_ads_slug ),
79
- 'description' => __( 'show on search result pages', $advanced_ads_slug ),
80
- 'type' => 'radio',
81
- ),
82
- 'is_404' => array(
83
- 'label' => __( '404 Page', $advanced_ads_slug ),
84
- 'description' => __( 'show on 404 error page', $advanced_ads_slug ),
85
- 'type' => 'radio',
86
- ),
87
- 'is_attachment' => array(
88
- 'label' => __( 'Attachment Pages', $advanced_ads_slug ),
89
- 'description' => __( 'show on attachment pages', $advanced_ads_slug ),
90
- 'type' => 'radio',
91
- ),
92
- 'is_main_query' => array(
93
- 'label' => __( 'Secondary Queries', $advanced_ads_slug ),
94
- 'description' => __( 'allow ads in secondary queries', $advanced_ads_slug ),
95
- 'type' => 'radio',
96
- )
97
  );
98
 
99
- return apply_filters( 'advanced-ads-conditions', $advanced_ads_ad_conditions );
14
  * type - information / markup type
15
  * idfield - input field for comma separated lists of ids
16
  * radio - radio button
 
17
  *
18
  * note: ’idfield’ always has a {field}_not version that is created automatically and being its own condition
19
  *
 
20
  */
21
 
 
 
 
 
 
22
  $advanced_ads_slug = Advanced_Ads::get_instance()->get_plugin_slug();
23
 
24
  $advanced_ads_ad_conditions = array(
25
+ 'postids' => array(
26
+ 'label' => __('Single Pages/Posts', $advanced_ads_slug),
27
+ 'description' => __('comma seperated IDs of post, page or custom post type', $advanced_ads_slug),
28
+ 'type' => 'idfield',
29
+ ),
30
+ 'categoryids' => array(
31
+ 'label' => __('Categories', $advanced_ads_slug),
32
+ 'description' => __('comma seperated IDs of categories for posts or category archives', $advanced_ads_slug),
33
+ 'type' => 'idfield',
34
+ ),
35
+ 'categoryarchiveids' => array(
36
+ 'label' => __('Category Archives', $advanced_ads_slug),
37
+ 'description' => __('comma seperated IDs of category archives', $advanced_ads_slug),
38
+ 'type' => 'idfield',
39
+ ),
40
+ 'posttypes' => array(
41
+ 'label' => __('Post Types', $advanced_ads_slug),
42
+ 'description' => __('comma seperated list of post types', $advanced_ads_slug),
43
+ 'type' => 'textvalues',
44
+ ),
45
+ 'is_front_page' => array(
46
+ 'label' => __('Home Page', $advanced_ads_slug),
47
+ 'description' => __('(don’t) show on Home page', $advanced_ads_slug),
48
+ 'type' => 'radio',
49
+ ),
50
+ 'is_singular' => array(
51
+ 'label' => __('Singular Pages', $advanced_ads_slug),
52
+ 'description' => __('(don’t) show on singular pages/posts', $advanced_ads_slug),
53
+ 'type' => 'radio',
54
+ ),
55
+ 'is_archive' => array(
56
+ 'label' => __('Archive Pages', $advanced_ads_slug),
57
+ 'description' => __('(don’t) show on any type of archive page (category, tag, author and date)', $advanced_ads_slug),
58
+ 'type' => 'radio',
59
+ ),
60
+ 'is_search' => array(
61
+ 'label' => __('Search Results', $advanced_ads_slug),
62
+ 'description' => __('(don’t) show on search result pages', $advanced_ads_slug),
63
+ 'type' => 'radio',
64
+ ),
65
+ 'is_404' => array(
66
+ 'label' => __('404 Page', $advanced_ads_slug),
67
+ 'description' => __('(don’t) show on 404 error page', $advanced_ads_slug),
68
+ 'type' => 'radio',
69
+ ),
70
+ 'is_attachment' => array(
71
+ 'label' => __('Attachment Pages', $advanced_ads_slug),
72
+ 'description' => __('(don’t) show on attachment pages', $advanced_ads_slug),
73
+ 'type' => 'radio',
74
+ )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  );
76
 
77
+ $advanced_ads_ad_conditions = apply_filters('advanced-ads-conditions', $advanced_ads_ad_conditions);
includes/autoloader.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * autoloader
5
+ *
6
+ * currently all classes of real objects (e.g. ads) can be found in /classes on the plugins root directory
7
+ * all classes have the "Advads_" prefix to prevent any conflicts with other plugins
8
+ * but filenames don’t use "advads" and are written in lower case
9
+ * e.g. Advads_Ad is in file classes/ad.php
10
+ *
11
+ * to be able to change this structure later, I use an autoloader here
12
+ */
13
+ class Advads_Autoloader {
14
+
15
+ public static function load($classname) {
16
+ // to lower case
17
+ $classname = strtolower($classname);
18
+
19
+ // strip "advads_" prefix
20
+ $classname = str_replace('advads_', '', $classname);
21
+
22
+ $filepath = ADVADS_BASE_PATH . 'classes' . DIRECTORY_SEPARATOR . $classname . '.php';
23
+
24
+ if (file_exists($filepath)) {
25
+ require_once $filepath;
26
+ } else {
27
+ return false;
28
+ }
29
+ }
30
+
31
+ }
includes/cap_map.php DELETED
@@ -1,15 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Advanced Ads capabilities
5
- *
6
- * currently only for informational purposes
7
- */
8
-
9
- $advanced_ads_capabilities = apply_filters( 'advanced-ads-capabilities', array(
10
- 'advanced_ads_manage_options', // admins only
11
- 'advanced_ads_see_interface', // admins, maybe editors
12
- 'advanced_ads_edit_ads', // admins, maybe editors
13
- 'advanced_ads_manage_placements', // admins, maybe editors
14
- 'advanced_ads_place_ads', // admins, maybe editors
15
- ));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/class_ajax_callbacks.php ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Advanced Ads.
5
+ *
6
+ * @package Advanced_Ads
7
+ * @author Thomas Maier <thomas.maier@webgilde.com>
8
+ * @license GPL-2.0+
9
+ * @link http://webgilde.com
10
+ * @copyright 2013 Thomas Maier, webgilde GmbH
11
+ */
12
+
13
+ /**
14
+ * This class is used to bundle all ajax callbacks
15
+ *
16
+ * @package Advanced_Ads_Ajax_Callbacks
17
+ * @author Thomas Maier <thomas.maier@webgilde.com>
18
+ */
19
+ class Advanced_Ads_Ajax_Callbacks {
20
+
21
+ public function __construct() {
22
+
23
+ add_action( 'wp_ajax_load_content_editor', array( $this, 'load_content_editor' ) );
24
+ add_action( 'wp_ajax_load_ad_parameters_metabox', array( $this, 'load_ad_parameters_metabox' ) );
25
+ add_action( 'wp_ajax_advads-ad-group-ads-form', array( $this, 'load_ad_groups_ad_form' ) );
26
+ add_action( 'wp_ajax_advads-ad-group-ads-form-save', array( $this, 'save_ad_groups_ad_form' ) );
27
+
28
+ }
29
+
30
+ /**
31
+ * load content of the ad parameter metabox
32
+ *
33
+ * @since 1.0.0
34
+ */
35
+ public function load_ad_parameters_metabox() {
36
+
37
+ $types = Advanced_Ads::get_instance()->ad_types;
38
+ $type = $_REQUEST['ad_type'];
39
+ $ad_id = absint($_REQUEST['ad_id']);
40
+ if(empty($ad_id)) wp_die();
41
+
42
+ $ad = new Advads_Ad($ad_id);
43
+
44
+ if(!empty($types[$type]) && method_exists($types[$type], 'render_parameters')) {
45
+ $types[$type]->render_parameters($ad);
46
+ }
47
+
48
+ wp_die();
49
+
50
+ }
51
+
52
+ /**
53
+ * load the form to edit ads in an ad group
54
+ *
55
+ * @since 1.0.0
56
+ */
57
+ public function load_ad_groups_ad_form(){
58
+ $id = absint($_POST['group_id']);
59
+ // load the group
60
+ $group = new Advads_Ad_Group($id);
61
+ // get weights
62
+ $weights = $group->get_ad_weights();
63
+ // get group ads
64
+ $ads = $group->get_all_ads();
65
+
66
+ include_once(ADVADS_BASE_PATH . 'admin/views/ad-group-ads-inline-form.php');
67
+ die();
68
+ }
69
+
70
+ /**
71
+ * save
72
+ *
73
+ * @since 1.0.0
74
+ */
75
+ public function save_ad_groups_ad_form(){
76
+
77
+ // load field values
78
+ $fields = array();
79
+ parse_str($_POST['fields'], $fields);
80
+
81
+ if(!wp_verify_nonce($fields['advads-ad-groups-inline-form-nonce'], 'ad-groups-inline-edit-nonce')) die();
82
+
83
+ // load the group
84
+ $id = absint($_POST['group_id']);
85
+ $group = new Advads_Ad_Group($id);
86
+
87
+ if(!isset($fields['weight'])) die();
88
+ $group->save_ad_weights($fields['weight']);
89
+
90
+ // returning the weights as an array
91
+ header('Content-Type: application/json');
92
+ echo json_encode($group->get_ad_weights());
93
+
94
+ die();
95
+ }
96
+
97
+ }
98
+
99
+ $advanced_ads_ajax_calls = new Advanced_Ads_Ajax_Callbacks;
includes/functions.php DELETED
@@ -1,79 +0,0 @@
1
- <?php
2
-
3
- /*
4
- * functions that are directly available in WordPress themes (and plugins)
5
- */
6
-
7
- /**
8
- * return ad content
9
- *
10
- * @since 1.0.0
11
- * @param int $id id of the ad (post)
12
- * @param arr $args additional arguments
13
- */
14
- function get_ad($id = 0, $args = array()){
15
- return Advanced_Ads_Select::get_instance()->get_ad_by_method( $id, 'id', $args );
16
- }
17
-
18
- /**
19
- * echo an ad
20
- *
21
- * @since 1.0.0
22
- * @param int $id id of the ad (post)
23
- * @param arr $args additional arguments
24
- */
25
- function the_ad($id = 0, $args = array()){
26
- echo get_ad( $id, $args );
27
- }
28
-
29
- /**
30
- * return an ad from an ad group based on ad weight
31
- *
32
- * @since 1.0.0
33
- * @param int $id id of the ad group (taxonomy)
34
- *
35
- */
36
- function get_ad_group($id = 0){
37
- return Advanced_Ads_Select::get_instance()->get_ad_by_method( $id, 'group' );
38
- }
39
-
40
- /**
41
- * echo an ad from an ad group
42
- *
43
- * @since 1.0.0
44
- * @param int $id id of the ad (post)
45
- */
46
- function the_ad_group($id = 0){
47
- echo get_ad_group( $id );
48
- }
49
-
50
- /**
51
- * return content of an ad placement
52
- *
53
- * @since 1.1.0
54
- * @param string $id slug of the ad placement
55
- *
56
- */
57
- function get_ad_placement($id = ''){
58
- return Advanced_Ads_Select::get_instance()->get_ad_by_method( $id, 'placement' );
59
- }
60
-
61
- /**
62
- * return content of an ad placement
63
- *
64
- * @since 1.1.0
65
- * @param string $id slug of the ad placement
66
- */
67
- function the_ad_placement($id = ''){
68
- echo get_ad_placement( $id );
69
- }
70
-
71
- /**
72
- * return true if ads can be displayed
73
- *
74
- * @since 1.4.9
75
- * @return bool, true if ads can be displayed
76
- */
77
- function advads_can_display_ads(){
78
- return Advanced_Ads::get_instance()->can_display_ads();
79
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php // Silence is golden
includes/load_modules.php DELETED
@@ -1,81 +0,0 @@
1
- <?php
2
-
3
- final class Advanced_Ads_ModuleLoader {
4
-
5
- protected static $loader;
6
- protected static $textdomains = array();
7
- protected static $modules = array();
8
-
9
- public static function getLoader()
10
- {
11
- if ( null === self::$loader ) {
12
- self::$loader = require_once ADVADS_BASE_PATH . 'vendor/autoload_52.php';
13
- }
14
-
15
- return self::$loader;
16
- }
17
-
18
- /**
19
- * Module loader options:
20
- * - array 'disabled': Pretty name by (module) dirname
21
- *
22
- * @param string $path path to modules
23
- * @param array $options module loader options
24
- */
25
- public static function loadModules($path, $options = array()) {
26
- $loader = self::getLoader();
27
-
28
- $disabledModules = isset($options['disabled']) ? (array) $options['disabled'] : array();
29
- $isAdmin = is_admin();
30
-
31
- // iterate modules
32
- foreach ( glob( $path . '*/main.php' ) as $module ) {
33
- $modulePath = dirname( $module );
34
- $moduleName = basename( $modulePath );
35
-
36
- // configuration is enabled by default (localisation, autoloading and other undemanding stuff)
37
- if ( file_exists( $modulePath . '/config.php' ) ) {
38
- $config = require $modulePath . '/config.php';
39
- // append autoload classmap
40
- if ( isset($config['classmap']) && is_array( $config['classmap'] ) ) {
41
- $loader->addClassmap( $config['classmap'] );
42
- }
43
- // append textdomain
44
- /*if ( isset($config['textdomain']) && $config['textdomain'] ) {
45
- self::$textdomains[$config['textdomain']] = "modules/$moduleName/languages";
46
- }*/
47
- }
48
-
49
- // admin is enabled by default
50
- if ( $isAdmin && file_exists( $modulePath . '/admin.php' ) ) {
51
- include $modulePath . '/admin.php'; // do not care if this fails
52
- }
53
-
54
- // skip if disabled
55
- if ( isset( $disabledModules[$moduleName] ) ) {
56
- continue ;
57
- }
58
-
59
- self::$modules[$moduleName] = $modulePath;
60
- }
61
-
62
- // register textdomains if non-empty
63
- /* if ( self::$textdomains !== array() ) {
64
- add_action( 'plugins_loaded', array( 'Advanced_Ads_ModuleLoader', 'load_module_textdomains') );
65
- }*/
66
-
67
- // load modules
68
- foreach ( self::$modules as $name => $path ) {
69
- require_once $path . '/main.php';
70
- }
71
- }
72
-
73
- /**
74
- * @deprecated since 1.7.6
75
- */
76
- public static function load_module_textdomains() {
77
- foreach ( self::$textdomains as $slug => $rel_path ) {
78
- load_plugin_textdomain( ADVADS_SLUG, false, ADVADS_BASE_DIR . '/languages' );
79
- }
80
- }
81
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/advanced-ads-es_ES.mo DELETED
Binary file
languages/advanced-ads-es_ES.po DELETED
@@ -1,2922 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: Advanved Ads\n"
4
- "Report-Msgid-Bugs-To: http://wordpress.org/plugins/plugin-name\n"
5
- "POT-Creation-Date: 2015-01-27 16:47+0100\n"
6
- "PO-Revision-Date: Sun May 15 2016 18:05:03 GMT+0200 (CEST)\n"
7
- "Last-Translator: admin <post@webzunft.de>\n"
8
- "Language-Team: webgilde <thomas.maier@webgilde.com>\n"
9
- "Language: Spanish (Spain)\n"
10
- "Plural-Forms: nplurals=2; plural=n != 1\n"
11
- "MIME-Version: 1.0\n"
12
- "Content-Type: text/plain; charset=UTF-8\n"
13
- "Content-Transfer-Encoding: 8bit\n"
14
- "X-Poedit-SourceCharset: UTF-8\n"
15
- "X-Generator: Loco - https://localise.biz/\n"
16
- "X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;"
17
- "__:1;_e:1;_c:1;_n:1,2;_n_noop:1,2;_nc:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
18
- "_x:1,2c;_ex:1,2c;_nx:1,2,4c;_nx_noop:1,2,3c;_n_js:1,2;_nx_js:1,2,3c;"
19
- "esc_attr__:1;esc_html__:1;esc_attr_e:1;esc_html_e:1;esc_attr_x:1,2c;"
20
- "esc_html_x:1,2c;comments_number_link:2,3;t:1;st:1;trans:1;transChoice:1,2\n"
21
- "X-Poedit-Basepath: ../\n"
22
- "X-Poedit-SearchPath-0: .\n"
23
- "X-Loco-Target-Locale: es_ES"
24
-
25
- #: ../admin/class-advanced-ads-admin.php:215 ../classes/display-conditions.php:
26
- #: 171 ../classes/visitor-conditions.php:214
27
- msgid "or"
28
- msgstr ""
29
-
30
- #: ../admin/class-advanced-ads-admin.php:216 ../admin/views/ad-display-metabox.
31
- #: php:76 ../admin/views/ad-visitor-metabox.php:68 ../classes/display-conditions.
32
- #: php:171 ../classes/visitor-conditions.php:214
33
- msgid "and"
34
- msgstr ""
35
-
36
- #: ../admin/class-advanced-ads-admin.php:217
37
- msgid "After which paragraph?"
38
- msgstr ""
39
-
40
- #: ../admin/class-advanced-ads-admin.php:430
41
- msgid "Please enter a message"
42
- msgstr ""
43
-
44
- #: ../admin/class-advanced-ads-admin.php:440
45
- #, php-format
46
- msgid "Email could NOT be sent. Please contact us directly at %s."
47
- msgstr ""
48
-
49
- #: ../admin/class-advanced-ads-admin.php:443
50
- msgid "Please enter a valid email address"
51
- msgstr ""
52
-
53
- #: ../admin/class-advanced-ads-admin.php:736 ../admin/class-advanced-ads-admin.
54
- #: php:747 ../admin/class-advanced-ads-admin.php:752 ../admin/views/ad-output-
55
- #: metabox.php:50
56
- msgid "Manual"
57
- msgstr ""
58
-
59
- #: ../admin/class-advanced-ads-admin.php:746
60
- msgid "Video"
61
- msgstr ""
62
-
63
- #: ../admin/class-advanced-ads-admin.php:1097
64
- msgid "Ad label"
65
- msgstr ""
66
-
67
- #: ../admin/class-advanced-ads-admin.php:1304
68
- msgid ""
69
- "If checked, the Advanced Ads Widget will not work with the fixed option of "
70
- "the <strong>Q2W3 Fixed Widget</strong> plugin."
71
- msgstr ""
72
-
73
- #: ../admin/class-advanced-ads-admin.php:1327
74
- #, php-format
75
- msgid ""
76
- "You can assign different ad-related roles on a user basis with <a href=\"%s\" "
77
- "target=\"_blank\">Advanced Ads Pro</a>."
78
- msgstr ""
79
-
80
- #: ../admin/class-advanced-ads-admin.php:1339 ../public/class-advanced-ads.php:711
81
- msgctxt "label before ads"
82
- msgid "Advertisements"
83
- msgstr ""
84
-
85
- #: ../admin/class-advanced-ads-admin.php:1346
86
- msgid "Displayed above ads."
87
- msgstr ""
88
-
89
- #: ../admin/class-advanced-ads-admin.php:1766
90
- #, php-format
91
- msgid "time of %s"
92
- msgstr ""
93
-
94
- #: ../admin/class-advanced-ads-admin.php:1833
95
- msgid "License couldn’t be activated. Please try again later."
96
- msgstr ""
97
-
98
- #: ../admin/class-advanced-ads-admin.php:1845
99
- msgid "This is the bundle license key."
100
- msgstr ""
101
-
102
- #: ../admin/class-advanced-ads-admin.php:1846
103
- msgid "This is not the correct key for this add-on."
104
- msgstr ""
105
-
106
- #: ../admin/class-advanced-ads-admin.php:1847
107
- msgid "There are no activations left."
108
- msgstr ""
109
-
110
- #: ../admin/class-advanced-ads-admin.php:2114
111
- msgid "Add-Ons"
112
- msgstr ""
113
-
114
- #: ../admin/includes/class-overview-widgets.php:59
115
- msgid "Geo Targeting"
116
- msgstr ""
117
-
118
- #: ../admin/includes/class-overview-widgets.php:151
119
- #, php-format
120
- msgid "<a href=\"%s\" target=\"_blank\">FAQ and Support</a>"
121
- msgstr ""
122
-
123
- #: ../admin/includes/class-overview-widgets.php:211
124
- msgid "Target visitors by their geo location."
125
- msgstr ""
126
-
127
- #: ../admin/includes/class-overview-widgets.php:213
128
- msgid "Get the Geo Targeting add-on"
129
- msgstr ""
130
-
131
- #: ../admin/includes/class-overview-widgets.php:235
132
- msgid "optional background overlay"
133
- msgstr ""
134
-
135
- #: ../admin/includes/notices.php:79
136
- #, php-format
137
- msgid ""
138
- "<img src=\"%3$s\" alt=\"Thomas\" width=\"80\" height=\"115\" class=\"advads-review-"
139
- "image\"/>You are using <strong>Advanced Ads</strong> for some time now. Thank "
140
- "you! If you need my help then please visit the <a href=\"%1$s\" "
141
- "target=\"_blank\">Support page</a> to get free help.</p><h3>Thanks for your "
142
- "Review</h3><p>If you share my passion and find Advanced Ads useful then "
143
- "please <a href=\"%2$s\" target=\"_blank\">leave a 5-star review on wordpress."
144
- "org</a>.</p><p><em>Thomas</em>"
145
- msgstr ""
146
-
147
- #: ../admin/includes/notices.php:85
148
- #, php-format
149
- msgid ""
150
- "Some assets were changed. Please <strong>rebuild the asset folder</strong> "
151
- "in the <a href=\"%s\">Advanced Ads settings</a> to update the ad blocker "
152
- "disguise."
153
- msgstr ""
154
-
155
- #: ../admin/views/ad-display-metabox.php:6
156
- msgid "Set Display Conditions to allow or hide the ad on specific pages."
157
- msgstr ""
158
-
159
- #: ../admin/views/ad-display-metabox.php:8 ../admin/views/notices/jqueryui_error.
160
- #: php:2
161
- #, php-format
162
- msgid ""
163
- "There might be a problem with layouts and scripts in your dashboard. Please "
164
- "check <a href=\"%s\" target=\"_blank\">this article to learn more</a>."
165
- msgstr ""
166
-
167
- #: ../admin/views/ad-info-bottom.php:2
168
- msgctxt "wizard navigation"
169
- msgid "previous"
170
- msgstr ""
171
-
172
- #: ../admin/views/ad-info-bottom.php:3
173
- msgctxt "wizard navigation"
174
- msgid "save"
175
- msgstr ""
176
-
177
- #: ../admin/views/ad-info-bottom.php:4
178
- msgctxt "wizard navigation"
179
- msgid "next"
180
- msgstr ""
181
-
182
- #: ../admin/views/ad-info-top.php:4
183
- #, php-format
184
- msgid ""
185
- "Congratulations! Your ad is now visible in the frontend. You can adjust the "
186
- "placement options <a href=\"%s\">here</a>."
187
- msgstr ""
188
-
189
- #: ../admin/views/ad-info-top.php:5
190
- msgid "Where do you want to display the ad?"
191
- msgstr ""
192
-
193
- #: ../admin/views/ad-info-top.php:7
194
- msgid "Content"
195
- msgstr ""
196
-
197
- #: ../admin/views/ad-info-top.php:9
198
- msgid "Manage Sidebar"
199
- msgstr ""
200
-
201
- #: ../admin/views/ad-info-top.php:11
202
- msgid "Show Pro Places"
203
- msgstr ""
204
-
205
- #: ../admin/views/ad-info-top.php:14
206
- msgid "Show Sticky Places"
207
- msgstr ""
208
-
209
- #: ../admin/views/ad-info-top.php:17
210
- msgid "Show PopUp"
211
- msgstr ""
212
-
213
- #: ../admin/views/ad-info-top.php:21
214
- #, php-format
215
- msgid "Or use the shortcode %s to insert the ad into the content manually."
216
- msgstr ""
217
-
218
- #: ../admin/views/ad-info-top.php:31 ../admin/views/ad-info-top.php:43
219
- msgid "Start Wizard"
220
- msgstr ""
221
-
222
- #: ../admin/views/ad-info-top.php:32
223
- msgid "Stop Wizard"
224
- msgstr ""
225
-
226
- #: ../admin/views/ad-info-top.php:41
227
- msgid "Welcome to the Wizard"
228
- msgstr ""
229
-
230
- #: ../admin/views/ad-info-top.php:42
231
- msgid ""
232
- "The Wizard helps you to quickly create and publish an ad. Therefore, only "
233
- "the most common options are visible.<br/>You can access all options when "
234
- "<strong>switching off</strong> the Wizard using the <em>Stop Wizard</em> "
235
- "button.<br/>You can <strong>switch on</strong> the Wizard at any time using "
236
- "the <em>Start Wizard</em> button."
237
- msgstr ""
238
-
239
- #: ../admin/views/ad-info-top.php:44
240
- msgid "Stop Wizard and show all options"
241
- msgstr ""
242
-
243
- #: ../admin/views/ad-output-metabox.php:47
244
- msgid "Enable debug mode"
245
- msgstr ""
246
-
247
- #: ../admin/views/ad-parameters-size.php:6
248
- msgid "reserve this space"
249
- msgstr ""
250
-
251
- #: ../admin/views/feedback_disable.php:3
252
- msgid "Thank you for helping to improve Advanced Ads."
253
- msgstr ""
254
-
255
- #: ../admin/views/feedback_disable.php:4
256
- msgid ""
257
- "Your feedback will motivates me to work harder towards a professional ad "
258
- "management solution."
259
- msgstr ""
260
-
261
- #: ../admin/views/feedback_disable.php:5
262
- msgid "Why did you decide to disable Advanced Ads?"
263
- msgstr ""
264
-
265
- #: ../admin/views/feedback_disable.php:7
266
- msgid "I stopped showing ads on my site"
267
- msgstr ""
268
-
269
- #: ../admin/views/feedback_disable.php:8
270
- #, php-format
271
- msgid "I miss a feature or <a href=\"%s\">add-on</a>"
272
- msgstr ""
273
-
274
- #: ../admin/views/feedback_disable.php:9
275
- msgid "I have a technical problem"
276
- msgstr ""
277
-
278
- #: ../admin/views/feedback_disable.php:10
279
- msgid "other reason"
280
- msgstr ""
281
-
282
- #: ../admin/views/feedback_disable.php:12
283
- msgid "Please specify, if possible"
284
- msgstr ""
285
-
286
- #: ../admin/views/feedback_disable.php:13
287
- msgid "What would be a reason to return to Advanced Ads?"
288
- msgstr ""
289
-
290
- #: ../admin/views/intro.php:79
291
- #, php-format
292
- msgid ""
293
- "Get started by creating an ad <a href=\"%1$s\" target=\"blank\">right now</a> or "
294
- "watch the <a href=\"%2$s\" target=\"blank\">tutorial video (3:29min)</a> first."
295
- msgstr ""
296
-
297
- #: ../admin/views/setting-license.php:6
298
- #, php-format
299
- msgid "<a href=\"%s\" target=\"_blank\">Renew it with a discount</a>."
300
- msgstr ""
301
-
302
- #: ../admin/views/settings-disable-ads.php:21
303
- msgid "Disable ads in Feed"
304
- msgstr ""
305
-
306
- #: ../classes/ad_placements.php:211
307
- #, php-format
308
- msgid "paragraph without image (%s)"
309
- msgstr ""
310
-
311
- #: ../classes/ad_type_group.php:31
312
- msgid ""
313
- "Choose an existing ad group. Use this type when you want to assign the same "
314
- "display and visitor conditions to all ads in that group."
315
- msgstr ""
316
-
317
- #: ../classes/ad_type_group.php:84
318
- msgid "ad group"
319
- msgstr ""
320
-
321
- #: ../classes/ad_type_plain.php:86
322
- msgid "Allow PHP"
323
- msgstr ""
324
-
325
- #: ../classes/display-conditions.php:69
326
- msgid "post type"
327
- msgstr ""
328
-
329
- #: ../classes/display-conditions.php:76
330
- msgid "specific pages"
331
- msgstr ""
332
-
333
- #: ../classes/display-conditions.php:82
334
- msgid "general conditions"
335
- msgstr ""
336
-
337
- #: ../classes/display-conditions.php:88
338
- msgid "author"
339
- msgstr ""
340
-
341
- #: ../classes/display-conditions.php:113
342
- #, php-format
343
- msgid "archive: %s"
344
- msgstr ""
345
-
346
- #: ../classes/display-conditions.php:214 ../classes/display-conditions.php:258 ..
347
- #: classes/display-conditions.php:346
348
- msgctxt "Error message shown when no display condition term is selected"
349
- msgid "Please select some items."
350
- msgstr ""
351
-
352
- #: ../classes/display-conditions.php:243 ../classes/display-conditions.php:296 ..
353
- #: classes/display-conditions.php:371
354
- msgid "show"
355
- msgstr ""
356
-
357
- #: ../classes/display-conditions.php:244 ../classes/display-conditions.php:297 ..
358
- #: classes/display-conditions.php:372
359
- msgid "hide"
360
- msgstr ""
361
-
362
- #: ../classes/display-conditions.php:400
363
- msgid "title or id"
364
- msgstr ""
365
-
366
- #: ../classes/display-conditions.php:480
367
- msgid "Feed"
368
- msgstr ""
369
-
370
- #: ../classes/display-conditions.php:481
371
- msgid "allow ads in Feed"
372
- msgstr ""
373
-
374
- #: ../classes/visitor-conditions.php:107
375
- msgid "Manual and Troubleshooting"
376
- msgstr ""
377
-
378
- #: ../modules/ad-blocker/admin/views/rebuild_form.php:31
379
- msgid "Rename assets"
380
- msgstr ""
381
-
382
- #: ../modules/ad-blocker/admin/views/rebuild_form.php:34
383
- msgid "Check if you want to change the names of the assets"
384
- msgstr ""
385
-
386
- #: ../modules/ad-blocker/admin/views/rebuild_form.php:43
387
- #, php-format
388
- msgid ""
389
- "Please, rebuild the asset folder. All assets will be located in "
390
- "<strong>%s</strong>"
391
- msgstr ""
392
-
393
- #. Name of the plugin
394
- msgid "Advanced Ads"
395
- msgstr "Advanced Ads"
396
-
397
- #. URI of the plugin
398
- msgid "https://wpadvancedads.com"
399
- msgstr "https://wpadvancedads.com"
400
-
401
- #. Description of the plugin
402
- msgid "Manage and optimize your ads in WordPress"
403
- msgstr "Gestiona y optimiza tus anuncios en Wordpress"
404
-
405
- #. Author of the plugin
406
- msgid "Thomas Maier"
407
- msgstr "Thomas Maier"
408
-
409
- #. Author URI of the plugin
410
- msgid "http://webgilde.com"
411
- msgstr "http://webgilde.com"
412
-
413
- #: ../admin/class-advanced-ads-admin.php:283
414
- msgid "Overview"
415
- msgstr "Visión General"
416
-
417
- #: ../admin/class-advanced-ads-admin.php:287 ../admin/class-advanced-ads-admin.
418
- #: php:287 ../admin/includes/class-shortcode-creator.php:77 ../admin/views/ad-
419
- #: group-list-form-row.php:28 ../admin/views/ad-group-list-header.php:5 ..
420
- #: admin/views/placements.php:81 ../admin/views/placements.php:185 ..
421
- #: classes/widget.php:89 ../public/class-advanced-ads.php:590
422
- msgid "Ads"
423
- msgstr "Anuncios"
424
-
425
- #: ../admin/class-advanced-ads-admin.php:293 ../public/class-advanced-ads.php:593
426
- msgid "Add New Ad"
427
- msgstr "Añadir Nuevo Anuncio"
428
-
429
- #: ../admin/class-advanced-ads-admin.php:293 ../public/class-advanced-ads.php:592
430
- #: ../public/class-advanced-ads.php:596
431
- msgid "New Ad"
432
- msgstr "Nuevo Anuncio"
433
-
434
- #: ../admin/class-advanced-ads-admin.php:298 ../admin/includes/class-shortcode-
435
- #: creator.php:84 ../admin/views/placements.php:74 ../admin/views/placements.php:
436
- #: 178 ../classes/widget.php:82
437
- msgid "Ad Groups"
438
- msgstr "Grupos de Anuncios"
439
-
440
- #: ../admin/class-advanced-ads-admin.php:298 ../public/class-advanced-ads.php:563
441
- msgid "Groups"
442
- msgstr "Grupos"
443
-
444
- #: ../admin/class-advanced-ads-admin.php:303
445
- msgid "Ad Placements"
446
- msgstr "Colocación de Anuncios"
447
-
448
- #: ../admin/class-advanced-ads-admin.php:303 ../admin/includes/class-shortcode-
449
- #: creator.php:91 ../admin/views/placements.php:18 ../classes/widget.php:75
450
- msgid "Placements"
451
- msgstr "Colocaciones"
452
-
453
- #: ../admin/class-advanced-ads-admin.php:307
454
- msgid "Advanced Ads Settings"
455
- msgstr "Configuraciones de Advanced Ads"
456
-
457
- #: ../admin/class-advanced-ads-admin.php:307 ../admin/class-advanced-ads-admin.
458
- #: php:555 ../admin/views/debug.php:10
459
- msgid "Settings"
460
- msgstr "Configuraciones"
461
-
462
- #: ../admin/class-advanced-ads-admin.php:310
463
- msgid "Advanced Ads Debugging"
464
- msgstr "Depuración de Advanced Ads"
465
-
466
- #: ../admin/class-advanced-ads-admin.php:310
467
- msgid "Debug"
468
- msgstr "Depuración"
469
-
470
- #: ../admin/class-advanced-ads-admin.php:314 ../admin/class-advanced-ads-admin.
471
- #: php:314
472
- msgid "Advanced Ads Intro"
473
- msgstr "Introducción a Advanced Ads"
474
-
475
- #: ../admin/class-advanced-ads-admin.php:318 ../admin/class-advanced-ads-admin.
476
- #: php:318 ../admin/class-advanced-ads-admin.php:2110
477
- msgid "Support"
478
- msgstr "Soporte"
479
-
480
- #: ../admin/class-advanced-ads-admin.php:469 ../admin/class-advanced-ads-admin.
481
- #: php:496
482
- msgid "Sorry, you are not allowed to access this feature."
483
- msgstr "Lo sentimos, no tienes permiso para acceder a esta función."
484
-
485
- #: ../admin/class-advanced-ads-admin.php:482
486
- msgid ""
487
- "You attempted to edit an ad group that doesn&#8217;t exist. Perhaps it was "
488
- "deleted?"
489
- msgstr ""
490
- "Intentaste editar un Grupo de Anuncios que no existe. Tal vez ha sido "
491
- "borrado?"
492
-
493
- #: ../admin/class-advanced-ads-admin.php:650
494
- msgid "Ad Type"
495
- msgstr "Tipo de Anuncio"
496
-
497
- #: ../admin/class-advanced-ads-admin.php:656
498
- msgid "Ad Parameters"
499
- msgstr "Parámetros del Anuncio"
500
-
501
- #: ../admin/class-advanced-ads-admin.php:659
502
- msgid "Layout / Output"
503
- msgstr "Diseño / Visualización"
504
-
505
- #: ../admin/class-advanced-ads-admin.php:662
506
- msgid "Display Conditions"
507
- msgstr "Condiciones de Visualización"
508
-
509
- #: ../admin/class-advanced-ads-admin.php:665
510
- msgid "Visitor Conditions"
511
- msgstr "Condiciones del Visitante"
512
-
513
- #: ../admin/class-advanced-ads-admin.php:924 ../admin/class-advanced-ads-admin.
514
- #: php:925
515
- msgid "Ad updated."
516
- msgstr "Anuncio actualizado."
517
-
518
- #. translators: %s: date and time of the revision
519
- #: ../admin/class-advanced-ads-admin.php:927
520
- #, php-format
521
- msgid "Ad restored to revision from %s"
522
- msgstr "Anunció restaurado para revisión de %s"
523
-
524
- #: ../admin/class-advanced-ads-admin.php:928
525
- msgid "Ad published."
526
- msgstr "Anuncio publicado."
527
-
528
- #: ../admin/class-advanced-ads-admin.php:929
529
- msgid "Ad saved."
530
- msgstr "Anuncio guardado."
531
-
532
- #: ../admin/class-advanced-ads-admin.php:930
533
- msgid "Ad submitted."
534
- msgstr "Anuncio enviado."
535
-
536
- #: ../admin/class-advanced-ads-admin.php:932
537
- #, php-format
538
- msgid "Ad scheduled for: <strong>%1$s</strong>."
539
- msgstr "Anuncio programado para: <strong>%1$s</strong>."
540
-
541
- #. translators: Publish box date format, see http://php.net/date
542
- #: ../admin/class-advanced-ads-admin.php:934
543
- msgid "M j, Y @ G:i"
544
- msgstr "M j, Y @ G:i"
545
-
546
- #: ../admin/class-advanced-ads-admin.php:936
547
- msgid "Ad draft updated."
548
- msgstr "Borrador del anuncio actualizado."
549
-
550
- #: ../admin/class-advanced-ads-admin.php:955
551
- #, php-format
552
- msgid "%s ad updated."
553
- msgid_plural "%s ads updated."
554
- msgstr[0] "%s anuncio actualizado."
555
- msgstr[1] "%s anuncios actualizados."
556
-
557
- #: ../admin/class-advanced-ads-admin.php:956
558
- #, php-format
559
- msgid "%s ad not updated, somebody is editing it."
560
- msgid_plural "%s ads not updated, somebody is editing them."
561
- msgstr[0] "%s anuncio no actualizado, alguien lo esta editando."
562
- msgstr[1] "%s anuncios no actualizados, alguien los esta editando."
563
-
564
- #: ../admin/class-advanced-ads-admin.php:957
565
- #, php-format
566
- msgid "%s ad permanently deleted."
567
- msgid_plural "%s ads permanently deleted."
568
- msgstr[0] "%s anuncio permanentemente borrado."
569
- msgstr[1] "%s anuncios permanentemente borrados."
570
-
571
- #: ../admin/class-advanced-ads-admin.php:958
572
- #, php-format
573
- msgid "%s ad moved to the Trash."
574
- msgid_plural "%s ads moved to the Trash."
575
- msgstr[0] "%s anuncio movido a la papelera."
576
- msgstr[1] "%s anuncios movidos a la papelera."
577
-
578
- #: ../admin/class-advanced-ads-admin.php:959
579
- #, php-format
580
- msgid "%s ad restored from the Trash."
581
- msgid_plural "%s ads restored from the Trash."
582
- msgstr[0] "%s anuncio restaurado de la papelera."
583
- msgstr[1] "%s anuncios restaurados de la papelera."
584
-
585
- #: ../admin/class-advanced-ads-admin.php:994 ../admin/views/settings.php:12
586
- msgid "General"
587
- msgstr "General"
588
-
589
- #: ../admin/class-advanced-ads-admin.php:1006 ../admin/class-advanced-ads-admin.
590
- #: php:1118
591
- msgid "Licenses"
592
- msgstr "Licencias"
593
-
594
- #: ../admin/class-advanced-ads-admin.php:1017
595
- msgid "Disable ads"
596
- msgstr "Deshabilitar anuncios"
597
-
598
- #: ../admin/class-advanced-ads-admin.php:1025
599
- msgid "Hide ads for logged in users"
600
- msgstr "Ocultar anuncios para usuarios que inicien sesión"
601
-
602
- #: ../admin/class-advanced-ads-admin.php:1033
603
- msgid "Use advanced JavaScript"
604
- msgstr "Utilizar JavaScript avanzado"
605
-
606
- #: ../admin/class-advanced-ads-admin.php:1041
607
- msgid "Unlimited ad injection"
608
- msgstr "Inyección ilimitada de anuncios"
609
-
610
- #: ../admin/class-advanced-ads-admin.php:1049
611
- msgid "Priority of content injection filter"
612
- msgstr "Prioridad de filtro de inyección de contenido"
613
-
614
- #: ../admin/class-advanced-ads-admin.php:1057
615
- msgid "Hide ads from bots"
616
- msgstr "Ocultar anuncios de bots"
617
-
618
- #: ../admin/class-advanced-ads-admin.php:1065
619
- msgid "Disable notices"
620
- msgstr "Deshabilitar notificaciones"
621
-
622
- #: ../admin/class-advanced-ads-admin.php:1073
623
- msgid "ID prefix"
624
- msgstr "Prefijo ID"
625
-
626
- #: ../admin/class-advanced-ads-admin.php:1081
627
- msgid "Remove Widget ID"
628
- msgstr "Remover Widget ID"
629
-
630
- #: ../admin/class-advanced-ads-admin.php:1089
631
- msgid "Allow editors to manage ads"
632
- msgstr "Permitir a editores gestionar anuncios"
633
-
634
- #: ../admin/class-advanced-ads-admin.php:1174
635
- msgid "(display to all)"
636
- msgstr "(mostrar a todos)"
637
-
638
- #: ../admin/class-advanced-ads-admin.php:1175
639
- msgid "Subscriber"
640
- msgstr "Suscriptor"
641
-
642
- #: ../admin/class-advanced-ads-admin.php:1176
643
- msgid "Contributor"
644
- msgstr "Contribuyente"
645
-
646
- #: ../admin/class-advanced-ads-admin.php:1177
647
- msgid "Author"
648
- msgstr "Autor"
649
-
650
- #: ../admin/class-advanced-ads-admin.php:1178
651
- msgid "Editor"
652
- msgstr "Editor"
653
-
654
- #: ../admin/class-advanced-ads-admin.php:1179
655
- msgid "Admin"
656
- msgstr "Administrador"
657
-
658
- #: ../admin/class-advanced-ads-admin.php:1187
659
- msgid "Choose the lowest role a user must have in order to not see any ads."
660
- msgstr "Elige el rol mínimo que un usuario debe tener para no ver ningún anuncio."
661
-
662
- #: ../admin/class-advanced-ads-admin.php:1201
663
- msgid ""
664
- "<strong>notice: </strong>the file is currently enabled by an add-on that "
665
- "needs it."
666
- msgstr ""
667
- "<strong>Notificación: </strong>el archivo se encuentra activado por un add-"
668
- "on que lo necesita."
669
-
670
- #: ../admin/class-advanced-ads-admin.php:1204
671
- #, php-format
672
- msgid ""
673
- "Enable advanced JavaScript functions (<a href=\"%s\" target=\"_blank\">here</a>)."
674
- " Some features and add-ons might override this setting if they need features "
675
- "from this file."
676
- msgstr ""
677
- "Habilitar funciones avanzadas de JavaScript (<a href=\"%s\" "
678
- "target=\"_blank\">aquí</a>). Algunas características y add-ons pueden anular "
679
- "esta configuración si necesitan funciones de este archivo."
680
-
681
- #: ../admin/class-advanced-ads-admin.php:1217
682
- msgid ""
683
- "Some plugins and themes trigger ad injection where it shouldn’t happen. "
684
- "Therefore, Advanced Ads ignores injected placements on non-singular pages "
685
- "and outside the loop. However, this can cause problems with some themes. You "
686
- "can enable this option if you don’t see ads or want to enable ad injections "
687
- "on archive pages AT YOUR OWN RISK."
688
- msgstr ""
689
- "Algunos plugins y temas pueden desencadenar inyecciones de anuncios en "
690
- "lugares en donde no debe ocurrir. Por lo tanto, Advanced Ads ignora las "
691
- "colocaciones inyectadas en páginas no singulares y fuera del ciclo iterativo "
692
- "(loop). No obstante, esto puede causar problemas con algunos temas. Puedes "
693
- "habilitar esta opción si no ves anuncios o quieres habilitar las inyecciones "
694
- "de anuncios en páginas de archivos BAJO TU PROPIO RIESGO."
695
-
696
- #: ../admin/class-advanced-ads-admin.php:1233
697
- msgid ""
698
- "Please check your post content. A priority of 10 and below might cause "
699
- "issues (wpautop function might run twice)."
700
- msgstr ""
701
- "Por favor, revisa el contenido de tu entrada. Una prioridad de 10 o menos "
702
- "puede causar problemas (la función wpautop puede ejecutarse dos veces)."
703
-
704
- #: ../admin/class-advanced-ads-admin.php:1235
705
- msgid ""
706
- "Play with this value in order to change the priority of the injected ads "
707
- "compared to other auto injected elements in the post content."
708
- msgstr ""
709
- "Juega con este valor para cambiar la prioridad de los anuncios inyectados en "
710
- "comparación con otros elementos auto inyectados en el contenido de la "
711
- "entrada."
712
-
713
- #: ../admin/class-advanced-ads-admin.php:1249
714
- #, php-format
715
- msgid ""
716
- "Hide ads from crawlers, bots and empty user agents. Also prevents counting "
717
- "impressions for bots when using the <a href=\"%s\" target=\"_blank\">Tracking "
718
- "Add-On</a>."
719
- msgstr ""
720
- "Ocultar los anuncios de rastreadores (crawlers), bots y usuarios de agente "
721
- "vacíos. También previene contar impresiones de bots cuando se usa <a "
722
- "href=\"%s\" target=\"_blank\">El Add-On de Rastreo</a>."
723
-
724
- #: ../admin/class-advanced-ads-admin.php:1250
725
- msgid ""
726
- "Disabling this option only makes sense if your ads contain content you want "
727
- "to display to bots (like search engines) or your site is cached and bots "
728
- "could create a cached version without the ads."
729
- msgstr ""
730
- "Deshabilitar esta opción sólo tiene sentido si tus anuncios contienen "
731
- "contenido que deseas mostrar a los bots (como motores de búsqueda) o tu "
732
- "sitio esta cacheado y los bots pueden crear una versión cacheada sin los "
733
- "anuncios."
734
-
735
- #: ../admin/class-advanced-ads-admin.php:1263
736
- msgid ""
737
- "Disable internal notices like tips, tutorials, email newsletters and update "
738
- "notices. Disabling notices is recommended if you run multiple blogs with "
739
- "Advanced Ads already."
740
- msgstr ""
741
- "Deshabilitar notificaciones internas como tips, tutoriales, boletines de "
742
- "noticias y notificaciones de actualizaciones. Deshabilitar las "
743
- "notificaciones es recomendado si ya administras múltiples sitios con "
744
- "Advanced Ads."
745
-
746
- #: ../admin/class-advanced-ads-admin.php:1280
747
- msgid ""
748
- "Prefix of class or id attributes in the frontend. Change it if you don’t "
749
- "want <strong>ad blockers</strong> to mark these blocks as ads.<br/>You might "
750
- "need to <strong>rewrite css rules afterwards</strong>."
751
- msgstr ""
752
- "Prefijo de clase o atributos ID en el frente del sitio. Cámbialo si no "
753
- "quieres que los <strong>bloqueadores de anuncios</strong> marquen estos "
754
- "bloques como anuncios. <br/>Podrías necesitar <strong>reescribir las reglas "
755
- "css después</strong>."
756
-
757
- #: ../admin/class-advanced-ads-admin.php:1301
758
- msgid ""
759
- "Remove the ID attribute from widgets in order to not make them an easy "
760
- "target of ad blockers."
761
- msgstr ""
762
- "Remover el atributo ID de los widgets para no hacerlos un blanco fácil de "
763
- "los bloqueadores de anuncios."
764
-
765
- #: ../admin/class-advanced-ads-admin.php:1326
766
- msgid "Allow editors to also manage and publish ads."
767
- msgstr "Permitir también que los editores gestionen y publiquen anuncios."
768
-
769
- #: ../admin/class-advanced-ads-admin.php:1404
770
- msgid "Ad Details"
771
- msgstr "Detalles del Anuncio"
772
-
773
- #: ../admin/class-advanced-ads-admin.php:1405
774
- msgid "Ad Planning"
775
- msgstr "Planificación del Anuncio"
776
-
777
- #: ../admin/class-advanced-ads-admin.php:1540
778
- msgid "Ad Settings"
779
- msgstr "Configuración del Anuncio"
780
-
781
- #: ../admin/class-advanced-ads-admin.php:1619 ../admin/views/overview.php:23
782
- msgid "Ads Dashboard"
783
- msgstr "Panel de Anuncios"
784
-
785
- #: ../admin/class-advanced-ads-admin.php:1631
786
- msgid "From the ad optimization universe"
787
- msgstr "Desde el universo de optimización de anuncios"
788
-
789
- #: ../admin/class-advanced-ads-admin.php:1640
790
- msgid "Advanced Ads Tutorials"
791
- msgstr "Tutoriales de Advanced Ads"
792
-
793
- #: ../admin/class-advanced-ads-admin.php:1651
794
- #, php-format
795
- msgid "%d ads – <a href=\"%s\">manage</a> - <a href=\"%s\">new</a>"
796
- msgstr "%d Anuncios – <a href=\"%s\">Gestionar</a> - <a href=\"%s\">Nuevo</a>"
797
-
798
- #: ../admin/class-advanced-ads-admin.php:1662
799
- msgid "plugin manual and homepage"
800
- msgstr "Manual del plugin y página de inicio"
801
-
802
- #: ../admin/class-advanced-ads-admin.php:1669
803
- msgid "Get the tutorial via email"
804
- msgstr "Obtener el tutorial vía correo electrónico"
805
-
806
- #: ../admin/class-advanced-ads-admin.php:1676
807
- msgid "Get AdSense tips via email"
808
- msgstr "Obtener tips de AdSense vía correo electrónico"
809
-
810
- #: ../admin/class-advanced-ads-admin.php:1802
811
- msgid "Error while trying to register the license. Please contact support."
812
- msgstr "Error al tratar de registrar la licencia. Por favor, contactar a soporte."
813
-
814
- #: ../admin/class-advanced-ads-admin.php:1807 ../admin/views/setting-license.php:37
815
- msgid "Please enter a valid license key"
816
- msgstr "Por favor, ingresa una llave de licencia válida"
817
-
818
- #: ../admin/class-advanced-ads-admin.php:1856
819
- #, php-format
820
- msgid "License is invalid. Reason: %s"
821
- msgstr "Licencia inválida. Razón: %s"
822
-
823
- #: ../admin/class-advanced-ads-admin.php:1910
824
- msgid "Error while trying to disable the license. Please contact support."
825
- msgstr "Error al tratar de deshabilitar la licencia. Por favor, contacta a soporte."
826
-
827
- #: ../admin/class-advanced-ads-admin.php:1933 ../admin/class-advanced-ads-admin.
828
- #: php:1950
829
- msgid "License couldn’t be deactivated. Please try again later."
830
- msgstr "La licencia no pudo ser desactivada.a soporte."
831
-
832
- #: ../admin/includes/class-ad-groups-list.php:156
833
- msgid "Ad weight"
834
- msgstr "Peso del Anuncio"
835
-
836
- #: ../admin/includes/class-ad-groups-list.php:164 ../admin/views/ad-list-timing-
837
- #: column.php:4
838
- #, php-format
839
- msgid "starts %s"
840
- msgstr "Comienza %s"
841
-
842
- #: ../admin/includes/class-ad-groups-list.php:183 ../admin/views/ad-list-timing-
843
- #: column.php:21
844
- #, php-format
845
- msgid "expires %s"
846
- msgstr "Expira %s"
847
-
848
- #: ../admin/includes/class-ad-groups-list.php:185 ../admin/views/ad-list-timing-
849
- #: column.php:23
850
- #, php-format
851
- msgid "<strong>expired</strong> %s"
852
- msgstr "<strong>Expirado</strong> %s"
853
-
854
- #: ../admin/includes/class-ad-groups-list.php:198
855
- msgid "all published ads are displayed"
856
- msgstr "Todos los anuncios publicados están mostrados"
857
-
858
- #: ../admin/includes/class-ad-groups-list.php:200
859
- #, php-format
860
- msgid "up to %d ads displayed"
861
- msgstr "Hasta %d anuncios mostrados"
862
-
863
- #: ../admin/includes/class-ad-groups-list.php:203 ../admin/views/ad-group-list-
864
- #: form-row.php:37
865
- msgid "No ads assigned"
866
- msgstr "No hay anuncios asignados"
867
-
868
- #: ../admin/includes/class-ad-groups-list.php:251
869
- msgid "Random ads"
870
- msgstr "Anuncios aleatorios"
871
-
872
- #: ../admin/includes/class-ad-groups-list.php:252
873
- msgid "Display random ads based on ad weight"
874
- msgstr "Mostrar anuncios aleatorios basados en el peso del anuncio"
875
-
876
- #: ../admin/includes/class-ad-groups-list.php:255
877
- msgid "Ordered ads"
878
- msgstr "Anuncios ordenados"
879
-
880
- #: ../admin/includes/class-ad-groups-list.php:256
881
- msgid "Display ads with the highest ad weight first"
882
- msgstr "Mostrar de primero anuncios con el peso más alto"
883
-
884
- #: ../admin/includes/class-ad-groups-list.php:275 ../public/class-advanced-ads.
885
- #: php:594
886
- msgid "Edit"
887
- msgstr "Editar"
888
-
889
- #: ../admin/includes/class-ad-groups-list.php:276
890
- msgid "Usage"
891
- msgstr "Uso"
892
-
893
- #: ../admin/includes/class-ad-groups-list.php:285
894
- msgid "Delete"
895
- msgstr "Eliminar"
896
-
897
- #: ../admin/includes/class-ad-groups-list.php:306
898
- msgid "Invalid Ad Group"
899
- msgstr "Grupo de Anuncios Inválido"
900
-
901
- #: ../admin/includes/class-ad-groups-list.php:311
902
- msgid "You don’t have permission to change the ad groups"
903
- msgstr "No tienes permiso para cambiar los Grupos de Anuncios"
904
-
905
- #: ../admin/includes/class-notices.php:406
906
- #, php-format
907
- msgid ""
908
- "You don’t seem to have an email address. Please use <a href=\"%s\" "
909
- "target=\"_blank\">this form</a> to sign up."
910
- msgstr ""
911
- "Parece ser que no tienes una dirección de correo electrónico. Por favor, usa "
912
- "<a href=\"%s\" target=\"_blank\">este formulario</a> para registrarte."
913
-
914
- #: ../admin/includes/class-notices.php:424
915
- msgid "How embarrassing. The email server seems to be down. Please try again later."
916
- msgstr ""
917
- "Esto es penoso. El servidor de correos parece estar caído. Por favor, "
918
- "inténtalo más tarde."
919
-
920
- #: ../admin/includes/class-notices.php:429
921
- #, php-format
922
- msgid ""
923
- "Please check your email (%s) for the confirmation message. If you didn’t "
924
- "receive one or want to use another email address then please use <a "
925
- "href=\"%s\" target=\"_blank\">this form</a> to sign up."
926
- msgstr ""
927
- "Por favor, revisa tu correo (%s) para el mensaje de confirmación. Si no "
928
- "recibiste uno o deseas utilizar otra dirección de correo, entonces por favor "
929
- "usa <a href=\"%s\" target=\"_blank\">este formulario</a> para registrarte."
930
-
931
- #: ../admin/includes/class-overview-widgets.php:45
932
- msgid "Tips and Tutorials"
933
- msgstr "Tips y Tutoriales"
934
-
935
- #: ../admin/includes/class-overview-widgets.php:47
936
- msgid "Setup and Optimization Help"
937
- msgstr "Ayuda de Optimización y Configuración"
938
-
939
- #: ../admin/includes/class-overview-widgets.php:49
940
- msgid "Manual and Support"
941
- msgstr "Manual y Soporte"
942
-
943
- #: ../admin/includes/class-overview-widgets.php:53
944
- msgid "Advanced Ads Pro"
945
- msgstr "Advanced Ads Pro"
946
-
947
- #: ../admin/includes/class-overview-widgets.php:55
948
- msgid "Tracking and Stats"
949
- msgstr "Estadísticas y Rastreo"
950
-
951
- #: ../admin/includes/class-overview-widgets.php:57
952
- msgid "Responsive and Mobile ads"
953
- msgstr "Anuncios Responsables y Móviles"
954
-
955
- #: ../admin/includes/class-overview-widgets.php:61
956
- msgid "Sticky ads"
957
- msgstr "Anuncios Pegajosos (sticky)"
958
-
959
- #: ../admin/includes/class-overview-widgets.php:63
960
- msgid "PopUps and Layers"
961
- msgstr "PopUps y Ventanas Emergentes"
962
-
963
- #: ../admin/includes/class-overview-widgets.php:65
964
- msgid "Ad Slider"
965
- msgstr "Slider de Anuncios"
966
-
967
- #: ../admin/includes/class-overview-widgets.php:83
968
- msgid "Get 2 <strong>free add-ons</strong> for joining the newsletter."
969
- msgstr ""
970
- "Obtén <strong>2 add-ons gratis</strong> por suscribirte al boletín de "
971
- "noticias."
972
-
973
- #: ../admin/includes/class-overview-widgets.php:84
974
- msgid "Join now"
975
- msgstr "Suscríbete Ahora"
976
-
977
- #: ../admin/includes/class-overview-widgets.php:91
978
- msgid ""
979
- "Learn more about how and <strong>how much you can earn with AdSense</strong> "
980
- "and Advanced Ads from the dedicated newsletter group."
981
- msgstr ""
982
- "Aprende más acerca de cómo y <strong>cuánto puedes ganar con "
983
- "AdSense</strong> y Advanced Ads con nuestro grupo de noticias dedicado."
984
-
985
- #: ../admin/includes/class-overview-widgets.php:92 ../admin/includes/notices.php:
986
- #: 35 ../admin/views/intro.php:73 ../admin/views/notices/inline.php:3 ..
987
- #: admin/views/notices/subscribe.php:3
988
- msgid "Subscribe me now"
989
- msgstr "Suscribirme Ahora"
990
-
991
- #: ../admin/includes/class-overview-widgets.php:99
992
- msgid "Get the first steps and more tutorials to your inbox."
993
- msgstr "Obtén los primeros pasos y más tutoriales en tu correo."
994
-
995
- #: ../admin/includes/class-overview-widgets.php:100
996
- msgid "Send it now"
997
- msgstr "Enviarlo Ahora"
998
-
999
- #: ../admin/includes/class-overview-widgets.php:123 ../admin/views/intro.php:78
1000
- msgid "Create your first ad"
1001
- msgstr "Crea Tu Primer Anuncio"
1002
-
1003
- #: ../admin/includes/class-overview-widgets.php:126
1004
- msgid ""
1005
- "Ad Groups contain ads and are currently used to rotate multiple ads on a "
1006
- "single spot."
1007
- msgstr ""
1008
- "Los Grupos de Anuncios contienen anuncios y se usan actualmente para rotar "
1009
- "múltiples anuncios en un mismo lugar."
1010
-
1011
- #: ../admin/includes/class-overview-widgets.php:128
1012
- msgid "Create your first group"
1013
- msgstr "Crea Tu Primer Grupo"
1014
-
1015
- #: ../admin/includes/class-overview-widgets.php:131
1016
- msgid "Ad Placements are the best way to manage where to display ads and groups."
1017
- msgstr ""
1018
- "Las Colocaciones de Anuncios son la mejor manera para gestionar en donde "
1019
- "mostrar anuncios y grupos."
1020
-
1021
- #: ../admin/includes/class-overview-widgets.php:133
1022
- msgid "Create your first placement"
1023
- msgstr "Crea Tu Primera Colocación"
1024
-
1025
- #: ../admin/includes/class-overview-widgets.php:138
1026
- msgid "Next steps"
1027
- msgstr "Próximos Pasos"
1028
-
1029
- #: ../admin/includes/class-overview-widgets.php:150
1030
- #, php-format
1031
- msgid "<a href=\"%s\" target=\"_blank\">Manual</a>"
1032
- msgstr "<a href=\"%s\" target=\"_blank\">Manual</a>"
1033
-
1034
- #: ../admin/includes/class-overview-widgets.php:152
1035
- #, php-format
1036
- msgid "Vote for a <a href=\"%s\" target=\"_blank\">feature</a>"
1037
- msgstr "Vota por una <a href=\"%s\" target=\"_blank\">funcionalidad</a>"
1038
-
1039
- #: ../admin/includes/class-overview-widgets.php:153
1040
- #, php-format
1041
- msgid ""
1042
- "Thank the developer with a &#9733;&#9733;&#9733;&#9733;&#9733; review on <a "
1043
- "href=\"%s\" target=\"_blank\">wordpress.org</a>"
1044
- msgstr ""
1045
- "Agradece al desarrollador con una &#9733;&#9733;&#9733;&#9733;&#9733; "
1046
- "evaluación del plugin en <a href=\"%s\" target=\"_blank\">wordpress.org</a>"
1047
-
1048
- #: ../admin/includes/class-overview-widgets.php:162
1049
- msgid ""
1050
- "Need help to set up and optimize your ads? Need custom coding on your site? "
1051
- "Ask me for a quote."
1052
- msgstr ""
1053
- "Necesitas ayuda configurando y optimizando tus anuncios? Necesitas "
1054
- "programación personalizada para tu sitio? Contáctame para una cotización."
1055
-
1056
- #: ../admin/includes/class-overview-widgets.php:163
1057
- #, php-format
1058
- msgid "Help with ads on %s"
1059
- msgstr "Ayuda con anuncios en %s"
1060
-
1061
- #: ../admin/includes/class-overview-widgets.php:164
1062
- msgid "Get an offer"
1063
- msgstr "Obtén una Cotización"
1064
-
1065
- #: ../admin/includes/class-overview-widgets.php:172
1066
- msgid "Ad management for advanced websites."
1067
- msgstr "Gestión de anuncios para websites avanzados."
1068
-
1069
- #: ../admin/includes/class-overview-widgets.php:173
1070
- msgid "Cache-busting"
1071
- msgstr "Almacenamiento-en-caché"
1072
-
1073
- #: ../admin/includes/class-overview-widgets.php:174
1074
- msgid "Advanced visitor conditions"
1075
- msgstr "Condiciones Avanzadas del Visitante"
1076
-
1077
- #: ../admin/includes/class-overview-widgets.php:175
1078
- msgid "Flash ads with fallback"
1079
- msgstr "Anuncios Flash con Retroceso (fallback)"
1080
-
1081
- #: ../admin/includes/class-overview-widgets.php:177
1082
- msgid "Get Pro"
1083
- msgstr "Obtener Pro"
1084
-
1085
- #: ../admin/includes/class-overview-widgets.php:185
1086
- msgid "Track the impressions of and clicks on your ads."
1087
- msgstr "Rastrear las impresiones y los clics en tus anuncios."
1088
-
1089
- #: ../admin/includes/class-overview-widgets.php:186
1090
- msgid "2 methods to count impressions"
1091
- msgstr "Dos métodos para contar las impresiones"
1092
-
1093
- #: ../admin/includes/class-overview-widgets.php:187
1094
- msgid "beautiful stats for all or single ads"
1095
- msgstr "Hermosas estadísticas para todos los anuncios o para anuncios individuales"
1096
-
1097
- #: ../admin/includes/class-overview-widgets.php:188
1098
- msgid "group stats by day, week or month"
1099
- msgstr "Agrupar estadísticas por día, semana o mes"
1100
-
1101
- #: ../admin/includes/class-overview-widgets.php:190
1102
- msgid "Get the Tracking add-on"
1103
- msgstr "Obtener el add-on de Rastreo"
1104
-
1105
- #: ../admin/includes/class-overview-widgets.php:198
1106
- msgid "Display ads based on the size of your visitor’s browser or device."
1107
- msgstr "Mostrar anuncios en base al tamaño del navegador del visitante."
1108
-
1109
- #: ../admin/includes/class-overview-widgets.php:199
1110
- msgid "set a range (from … to …) pixels for the browser size"
1111
- msgstr "Definir un rango (de… a…) píxeles para el tamaño del navegador"
1112
-
1113
- #: ../admin/includes/class-overview-widgets.php:200
1114
- msgid "set custom sizes for AdSense responsive ads"
1115
- msgstr "Definir tamaños personalizados para los anuncios responsables de AdSense"
1116
-
1117
- #: ../admin/includes/class-overview-widgets.php:201
1118
- msgid "list all ads by their responsive settings"
1119
- msgstr "Listar todos los anuncios por sus configuraciones responsables"
1120
-
1121
- #: ../admin/includes/class-overview-widgets.php:203
1122
- msgid "Get the Responsive add-on"
1123
- msgstr "Obtener el add-on de diseño responsable"
1124
-
1125
- #: ../admin/includes/class-overview-widgets.php:221
1126
- msgid ""
1127
- "Fix ads to the browser while users are scrolling and create best performing "
1128
- "anchor ads."
1129
- msgstr ""
1130
- "Fijar anuncios al navegador mientras los usuarios están desplazándose y "
1131
- "crear los anuncios de anclaje con mejor rendimiento."
1132
-
1133
- #: ../admin/includes/class-overview-widgets.php:222
1134
- msgid "position ads that don’t scroll with the screen"
1135
- msgstr "Posicionar anuncios que no se desplacen con la pantalla"
1136
-
1137
- #: ../admin/includes/class-overview-widgets.php:223
1138
- msgid "build anchor ads not only on mobile devices"
1139
- msgstr "Construir anuncios de anclaje no solamente en dispositivos móviles"
1140
-
1141
- #: ../admin/includes/class-overview-widgets.php:225
1142
- msgid "Get the Sticky add-on"
1143
- msgstr "Obtener el add-on de Anuncios Pegajosos (sticky)"
1144
-
1145
- #: ../admin/includes/class-overview-widgets.php:233
1146
- msgid "Display content and ads in layers and popups on custom events."
1147
- msgstr ""
1148
- "Mostrar contenido y anuncios en Ventanas Emergentes y PopUps en eventos "
1149
- "personalizados."
1150
-
1151
- #: ../admin/includes/class-overview-widgets.php:234
1152
- msgid "display a popup after a user interaction like scrolling"
1153
- msgstr "Mostrar un PopUp después de una interacción de usuario (como desplazarse)"
1154
-
1155
- #: ../admin/includes/class-overview-widgets.php:236
1156
- msgid "allow users to close the popup"
1157
- msgstr "Permitir a los usuarios cerrar un PopUp\n"
1158
-
1159
- #: ../admin/includes/class-overview-widgets.php:238
1160
- msgid "Get the PopUp and Layer add-on"
1161
- msgstr "Obtener el add-on de PopUps y Ventanas Emergentes"
1162
-
1163
- #: ../admin/includes/class-overview-widgets.php:246
1164
- msgid "Create a beautiful and simple slider from your ads."
1165
- msgstr "Crear un lindo y simple Slider para tus anuncios."
1166
-
1167
- #: ../admin/includes/class-overview-widgets.php:248
1168
- msgid "Get the Slider add-on"
1169
- msgstr "Obtener el add-on del Slider"
1170
-
1171
- #: ../admin/includes/class-shortcode-creator.php:75 ../classes/widget.php:73
1172
- msgid "--empty--"
1173
- msgstr "--Vacío--"
1174
-
1175
- #: ../admin/includes/notices.php:14
1176
- #, php-format
1177
- msgid ""
1178
- "Advanced Ads successfully installed. Take a look at the <a href=\"%s\">First "
1179
- "Steps</a>."
1180
- msgstr ""
1181
- "Advanced Ads exitosamente instalado. Échale un vistazo a los <a "
1182
- "href=\"%s\">primeros pasos</a>."
1183
-
1184
- #: ../admin/includes/notices.php:20
1185
- msgid ""
1186
- "Thank you for activating <strong>Advanced Ads</strong>. Would you like to "
1187
- "receive the first steps via email?"
1188
- msgstr ""
1189
- "Gracias por activar <strong>Advanced Ads</strong>. Deseas recibir los "
1190
- "primeros pasos por correo electrónico?"
1191
-
1192
- #: ../admin/includes/notices.php:21
1193
- msgid "Yes, send it"
1194
- msgstr "Si, envíalo"
1195
-
1196
- #: ../admin/includes/notices.php:27
1197
- msgid ""
1198
- "Thank you for using <strong>Advanced Ads</strong>. Stay informed and receive "
1199
- "<strong>2 free add-ons</strong> for joining the newsletter."
1200
- msgstr ""
1201
- "Gracias por usar <strong>Advanced Ads</strong>. Mántente informado y recibe "
1202
- "<strong>2 add-ons gratis</strong> por unirte a nuestro boletín de noticias."
1203
-
1204
- #: ../admin/includes/notices.php:28
1205
- msgid "Add me now"
1206
- msgstr "Añadirme Ahora"
1207
-
1208
- #: ../admin/includes/notices.php:34
1209
- msgid ""
1210
- "Learn more about how and <strong>how much you can earn with AdSense</strong> "
1211
- "and Advanced Ads from my dedicated newsletter."
1212
- msgstr ""
1213
- "Aprende más sobre cómo y <strong>cuánto puedes ganar con AdSense</strong> y "
1214
- "Advanced Ads con mi boletín de noticias dedicado."
1215
-
1216
- #: ../admin/includes/notices.php:61
1217
- msgid ""
1218
- "One or more license keys for <strong>Advanced Ads add-ons are invalid or "
1219
- "missing</strong>."
1220
- msgstr ""
1221
- "Una o más llaves de licencia para los <strong>add-ons de Advanced Ads no se "
1222
- "encuentran o son inválidos</strong>."
1223
-
1224
- #: ../admin/includes/notices.php:61
1225
- #, php-format
1226
- msgid "Please add valid license keys <a href=\"%s\">here</a>."
1227
- msgstr "Por favor, añade llaves de licencia válidas <a href=\"%s\">aquí</a>."
1228
-
1229
- #: ../admin/includes/notices.php:67
1230
- #, php-format
1231
- msgid ""
1232
- "One or more licenses for your <strong>Advanced Ads add-ons are expiring "
1233
- "soon</strong>. Don’t risk to lose support and updates and renew your license "
1234
- "before it expires with a significant discount on <a href=\"%s\" "
1235
- "target=\"_blank\">the add-on page</a>."
1236
- msgstr ""
1237
- "Una o más licencias para tus <strong>add-ons de Advanced Ads van a expirar "
1238
- "pronto</strong>. No arriesgues perder soporte y actualizaciones y renueva tu "
1239
- "licencia antes de que expire con un descuento significativo en <a href=\"%s\" "
1240
- "target=\"_blank\">la página de add-ons</a>."
1241
-
1242
- #: ../admin/includes/notices.php:73 ../admin/views/support.php:28
1243
- #, php-format
1244
- msgid ""
1245
- "<strong>Advanced Ads</strong> license(s) expired. Support and updates are "
1246
- "disabled. Please visit <a href=\"%s\"> the license page</a> for more "
1247
- "information."
1248
- msgstr ""
1249
- "Licencia (s) de <strong>Advanced Ads</strong> expirada. El soporte y las "
1250
- "actualizaciones están deshabilitadas. Por favor, visita <a href=\"%s\"> la "
1251
- "página de licencias</a> para más información."
1252
-
1253
- #: ../admin/includes/shortcode-creator-l10n.php:10
1254
- msgctxt "shortcode creator"
1255
- msgid "Add an ad"
1256
- msgstr "Agrega un Anuncio"
1257
-
1258
- #: ../admin/includes/shortcode-creator-l10n.php:11
1259
- msgctxt "shortcode creator"
1260
- msgid "Add shortcode"
1261
- msgstr "Agrega un Shortcode "
1262
-
1263
- #: ../admin/includes/shortcode-creator-l10n.php:12
1264
- msgctxt "shortcode creator"
1265
- msgid "Cancel"
1266
- msgstr "Cancelar "
1267
-
1268
- #: ../admin/views/ad-display-metabox.php:39
1269
- msgid "If you want to display the ad everywhere, don't do anything here. "
1270
- msgstr "Si quieres mostrar el anuncio en todas partes, no hagas nada aquí."
1271
-
1272
- #: ../admin/views/ad-display-metabox.php:42 ../admin/views/ad-visitor-metabox.php:
1273
- #: 34
1274
- msgid "New condition"
1275
- msgstr "Nueva Condición"
1276
-
1277
- #: ../admin/views/ad-display-metabox.php:45 ../admin/views/ad-visitor-metabox.php:
1278
- #: 37
1279
- msgid "-- choose a condition --"
1280
- msgstr "-- Selecciona una Condición --"
1281
-
1282
- #: ../admin/views/ad-display-metabox.php:50 ../admin/views/ad-visitor-metabox.php:
1283
- #: 42
1284
- msgid "add"
1285
- msgstr "Añadir"
1286
-
1287
- #: ../admin/views/ad-group-edit.php:14
1288
- msgid "You did not select an item for editing."
1289
- msgstr "No seleccionaste un ítem para editar."
1290
-
1291
- #: ../admin/views/ad-group-edit.php:33
1292
- msgctxt "Taxonomy Name"
1293
- msgid "Name"
1294
- msgstr "Nombre"
1295
-
1296
- #: ../admin/views/ad-group-edit.php:38
1297
- msgctxt "Taxonomy Slug"
1298
- msgid "Slug"
1299
- msgstr "Slug"
1300
-
1301
- #: ../admin/views/ad-group-edit.php:40
1302
- msgid "An id-like string with only letters in lower case, numbers, and hyphens."
1303
- msgstr "Una cadena tipo-id con solamente letras en minúscula, números, y guiones."
1304
-
1305
- #: ../admin/views/ad-group-edit.php:45
1306
- msgctxt "Taxonomy Description"
1307
- msgid "Description"
1308
- msgstr "Descripción"
1309
-
1310
- #: ../admin/views/ad-group-edit.php:57
1311
- msgid "Create new Ad Group"
1312
- msgstr "Crear un nuevo Grupo de Anuncios"
1313
-
1314
- #: ../admin/views/ad-group-edit.php:59
1315
- msgid "Update"
1316
- msgstr "Actualizar"
1317
-
1318
- #: ../admin/views/ad-group-list-form-row.php:3 ../admin/views/placements.php:24
1319
- msgid "Name"
1320
- msgstr "Nombre"
1321
-
1322
- #: ../admin/views/ad-group-list-form-row.php:5
1323
- msgid "Description"
1324
- msgstr "Descripción"
1325
-
1326
- #: ../admin/views/ad-group-list-form-row.php:7 ../admin/views/placements.php:23 ..
1327
- #: modules/gadsense/admin/views/adsense-ad-parameters.php:48
1328
- msgid "Type"
1329
- msgstr "Tipo"
1330
-
1331
- #: ../admin/views/ad-group-list-form-row.php:16
1332
- msgid "Number of visible ads"
1333
- msgstr "Número de anuncios visibles"
1334
-
1335
- #: ../admin/views/ad-group-list-form-row.php:22
1336
- msgctxt "option to display all ads in an ad groups"
1337
- msgid "all"
1338
- msgstr "Todos"
1339
-
1340
- #: ../admin/views/ad-group-list-form-row.php:25
1341
- msgid "Number of ads that are visible at the same time"
1342
- msgstr "Número de anuncios que son visibles al mismo tiempo"
1343
-
1344
- #: ../admin/views/ad-group-list-form-row.php:31 ../public/class-advanced-ads.php:
1345
- #: 591
1346
- msgid "Ad"
1347
- msgstr "Anuncio"
1348
-
1349
- #: ../admin/views/ad-group-list-form-row.php:32
1350
- msgid "weight"
1351
- msgstr "Peso"
1352
-
1353
- #: ../admin/views/ad-group-list-header.php:3 ../classes/ad_type_group.php:30
1354
- msgid "Ad Group"
1355
- msgstr "Grupo de Anuncios"
1356
-
1357
- #: ../admin/views/ad-group-list-header.php:4
1358
- msgid "Details"
1359
- msgstr "Detalles"
1360
-
1361
- #: ../admin/views/ad-group-list-row.php:8 ../admin/views/ad-group.php:63 ..
1362
- #: admin/views/ad-info.php:3 ../admin/views/placements.php:59
1363
- msgid "shortcode"
1364
- msgstr "Shortcode:"
1365
-
1366
- #: ../admin/views/ad-group-list-row.php:11 ../admin/views/ad-group.php:66 ..
1367
- #: admin/views/placements.php:62
1368
- msgid "template"
1369
- msgstr "Plantilla"
1370
-
1371
- #: ../admin/views/ad-group-list-row.php:14
1372
- #, php-format
1373
- msgid "Learn more about using groups in the <a href=\"%s\" target=\"_blank\">manual</a>."
1374
- msgstr ""
1375
- "Aprende más sobre el uso de grupos en el <a href=\"%s\" "
1376
- "target=\"_blank\">manual</a>."
1377
-
1378
- #: ../admin/views/ad-group-list-row.php:19
1379
- #, php-format
1380
- msgid "Type: %s"
1381
- msgstr "Tipo: %s"
1382
-
1383
- #: ../admin/views/ad-group-list-row.php:20
1384
- #, php-format
1385
- msgid "ID: %s"
1386
- msgstr "ID: %s"
1387
-
1388
- #: ../admin/views/ad-group.php:18
1389
- msgid "Ad Groups successfully updated"
1390
- msgstr "Grupos de Anuncios actualizados exitosamente"
1391
-
1392
- #: ../admin/views/ad-group.php:46
1393
- #, php-format
1394
- msgid "Search results for &#8220;%s&#8221;"
1395
- msgstr "Resultados de la búsqueda para &#8220;%s&#8221;"
1396
-
1397
- #: ../admin/views/ad-group.php:52
1398
- msgid ""
1399
- "Ad Groups are a very flexible method to bundle ads. You can use them to "
1400
- "display random ads in the frontend or run split tests, but also just for "
1401
- "informational purposes. Not only can an Ad Groups have multiple ads, but an "
1402
- "ad can belong to multiple ad groups."
1403
- msgstr ""
1404
- "Los Grupos de Anuncios son un método muy flexible para reunir anuncios. Los "
1405
- "puedes usar para mostrar anuncios aleatorios en el frente de tu sitio o para "
1406
- "ejecutar evaluaciones comparativas (tipo split tests), pero también sirven "
1407
- "con propósitos informativos. Los Grupos de Anuncios no solamente pueden "
1408
- "tener múltiples anuncios, sino que también, un anuncio puede pertenecer a "
1409
- "múltiples grupos."
1410
-
1411
- #: ../admin/views/ad-group.php:60
1412
- msgid "How to display an Ad Group?"
1413
- msgstr "Cómo mostrar un Grupo de Anuncios?"
1414
-
1415
- #: ../admin/views/ad-group.php:62
1416
- #, php-format
1417
- msgid ""
1418
- "Examples on how to display an ad group? Find more help and examples in the "
1419
- "<a href=\"%s\" target=\"_blank\">manual</a>"
1420
- msgstr ""
1421
- "Ejemplos de cómo mostrar un Grupo de Anuncios? Encuentra más ayuda y "
1422
- "ejemplos en el <a href=\"%s\" target=\"_blank\">manual</a>"
1423
-
1424
- #: ../admin/views/ad-group.php:64
1425
- msgid "To display an ad group with the ID 6 in content fields"
1426
- msgstr "Para mostrar un Grupo de Anuncios con el ID 6 en los campos de contenido"
1427
-
1428
- #: ../admin/views/ad-group.php:67
1429
- msgid "To display an ad group with the ID 6 in template files"
1430
- msgstr "Para mostrar un Grupo de Anuncios con el ID 6 en los archivos de plantilla"
1431
-
1432
- #: ../admin/views/ad-group.php:87
1433
- msgid "Update Groups"
1434
- msgstr "Actualizar Grupos"
1435
-
1436
- #: ../admin/views/ad-info-top.php:6 ../classes/ad_placements.php:46
1437
- msgid "Before Content"
1438
- msgstr "Antes del Contenido"
1439
-
1440
- #: ../admin/views/ad-info-top.php:8 ../classes/ad_placements.php:51
1441
- msgid "After Content"
1442
- msgstr "Después del Contenido"
1443
-
1444
- #: ../admin/views/ad-info-top.php:22
1445
- #, php-format
1446
- msgid ""
1447
- "Learn more about your choices to display an ad in the <a href=\"%s\" "
1448
- "target=\"_blank\">manual</a>."
1449
- msgstr ""
1450
- "Aprender más acerca de tus opciones para mostrar un anuncio en el <a "
1451
- "href=\"%s\" target=\"_blank\">manual</a>."
1452
-
1453
- #: ../admin/views/ad-info.php:2
1454
- #, php-format
1455
- msgid "Ad Id: %s"
1456
- msgstr "ID del Anuncio: %s"
1457
-
1458
- #: ../admin/views/ad-info.php:5
1459
- msgid "theme function"
1460
- msgstr "Función para el Tema:"
1461
-
1462
- #: ../admin/views/ad-info.php:7
1463
- #, php-format
1464
- msgid "Find more display options in the <a href=\"%s\" target=\"_blank\">manual</a>."
1465
- msgstr ""
1466
- "Encuentra más opciones de visualización en el <a href=\"%s\" "
1467
- "target=\"_blank\">manual</a>."
1468
-
1469
- #: ../admin/views/ad-info.php:12
1470
- msgid "click to change"
1471
- msgstr "Clic para cambiar"
1472
-
1473
- #: ../admin/views/ad-info.php:16
1474
- msgid "Add a description"
1475
- msgstr "Añadir una Descripción"
1476
-
1477
- #: ../admin/views/ad-info.php:19
1478
- msgid "Internal description or your own notes about this ad."
1479
- msgstr "Descripción interna, o tus propias notas, acerca de este anuncio."
1480
-
1481
- #: ../admin/views/ad-list-filters.php:2
1482
- msgid "all ad types"
1483
- msgstr "Todos los tipos de anuncios"
1484
-
1485
- #: ../admin/views/ad-list-filters.php:5
1486
- msgid "all ad sizes"
1487
- msgstr "Todos los tamaños de anuncios"
1488
-
1489
- #: ../admin/views/ad-list-filters.php:8
1490
- msgid "all ad dates"
1491
- msgstr "Todas las fechas de anuncios"
1492
-
1493
- #: ../admin/views/ad-list-filters.php:9
1494
- msgid "expired"
1495
- msgstr "Expirado"
1496
-
1497
- #: ../admin/views/ad-list-filters.php:10
1498
- msgid "any expiry date"
1499
- msgstr "Cualquier fecha de expiración"
1500
-
1501
- #: ../admin/views/ad-list-filters.php:11
1502
- msgid "planned"
1503
- msgstr "Planeado"
1504
-
1505
- #: ../admin/views/ad-list-filters.php:14
1506
- msgid "all ad groups"
1507
- msgstr "Todos los Grupos de Anuncios"
1508
-
1509
- #: ../admin/views/ad-main-metabox.php:3
1510
- msgid "No ad types defined"
1511
- msgstr "No hay tipos de anuncios definidos"
1512
-
1513
- #: ../admin/views/ad-output-metabox.php:1
1514
- msgid "Everything connected to the ads layout and output."
1515
- msgstr "Todo lo relacionado con el diseño y la visualización de los anuncios."
1516
-
1517
- #: ../admin/views/ad-output-metabox.php:4
1518
- msgid "Position"
1519
- msgstr "Posición:"
1520
-
1521
- #: ../admin/views/ad-output-metabox.php:6
1522
- msgid "- default -"
1523
- msgstr "- Defecto -"
1524
-
1525
- #: ../admin/views/ad-output-metabox.php:7 ../admin/views/placements.php:52
1526
- msgid "default"
1527
- msgstr "Defecto"
1528
-
1529
- #: ../admin/views/ad-output-metabox.php:8
1530
- msgid "left"
1531
- msgstr "Izquierda"
1532
-
1533
- #: ../admin/views/ad-output-metabox.php:11
1534
- msgid "center"
1535
- msgstr "Centro"
1536
-
1537
- #: ../admin/views/ad-output-metabox.php:14
1538
- msgid "right"
1539
- msgstr "Derecha"
1540
-
1541
- #: ../admin/views/ad-output-metabox.php:18
1542
- msgid ""
1543
- "Check this if you don't want the following elements to float around the ad. "
1544
- "(adds a clearfix)"
1545
- msgstr ""
1546
- "Chequea esto si no quieres que los elementos sub-siguientes floten alrededor "
1547
- "del anuncio. (Añade un arreglo de espacio - clearfix)"
1548
-
1549
- #: ../admin/views/ad-output-metabox.php:22
1550
- msgid "Margin"
1551
- msgstr "Margen:"
1552
-
1553
- #: ../admin/views/ad-output-metabox.php:24
1554
- msgid "top:"
1555
- msgstr "Superior:"
1556
-
1557
- #: ../admin/views/ad-output-metabox.php:26
1558
- msgid "right:"
1559
- msgstr "Derecho:"
1560
-
1561
- #: ../admin/views/ad-output-metabox.php:28
1562
- msgid "bottom:"
1563
- msgstr "Inferior:"
1564
-
1565
- #: ../admin/views/ad-output-metabox.php:30
1566
- msgid "left:"
1567
- msgstr "Izquierdo:"
1568
-
1569
- #: ../admin/views/ad-output-metabox.php:32
1570
- msgid "tip: use this to add a margin around the ad"
1571
- msgstr "Tip: usa esto para añadir un margen alrededor del anuncio"
1572
-
1573
- #: ../admin/views/ad-output-metabox.php:35
1574
- msgid "container ID"
1575
- msgstr "ID del Contenedor"
1576
-
1577
- #: ../admin/views/ad-output-metabox.php:38
1578
- msgid "Specify the id of the ad container. Leave blank for random or no id."
1579
- msgstr ""
1580
- "Especificar el ID para el contenedor del anuncio. Dejar en blanco para un "
1581
- "valor aleatorio o para no tener un ID"
1582
-
1583
- #: ../admin/views/ad-output-metabox.php:41
1584
- msgid "container classes"
1585
- msgstr "Clases para el Contenedor"
1586
-
1587
- #: ../admin/views/ad-output-metabox.php:44
1588
- msgid ""
1589
- "Specify one or more classes for the container. Separate multiple classes "
1590
- "with a space"
1591
- msgstr ""
1592
- "Especificar múltiples clases para el contenedor. Separar múltiples clases "
1593
- "con un espacio"
1594
-
1595
- #: ../admin/views/ad-parameters-size.php:1
1596
- msgid "size"
1597
- msgstr "Tamaño"
1598
-
1599
- #: ../admin/views/ad-parameters-size.php:3
1600
- msgid "width"
1601
- msgstr "Ancho"
1602
-
1603
- #: ../admin/views/ad-parameters-size.php:4
1604
- msgid "height"
1605
- msgstr "Alto"
1606
-
1607
- #: ../admin/views/ad-submitbox-meta.php:6
1608
- msgid "Set expiry date"
1609
- msgstr "Establecer la fecha de expiración"
1610
-
1611
- #: ../admin/views/ad-submitbox-meta.php:12
1612
- msgid "Month"
1613
- msgstr "Mes"
1614
-
1615
- #: ../admin/views/ad-submitbox-meta.php:16
1616
- #, php-format
1617
- msgctxt "1: month number (01, 02, etc.), 2: month abbreviation"
1618
- msgid "%1$s-%2$s"
1619
- msgstr "%1$s-%2$s"
1620
-
1621
- #: ../admin/views/ad-submitbox-meta.php:21
1622
- msgid "Day"
1623
- msgstr "Día"
1624
-
1625
- #: ../admin/views/ad-submitbox-meta.php:22
1626
- msgid "Year"
1627
- msgstr "Año"
1628
-
1629
- #: ../admin/views/ad-submitbox-meta.php:23
1630
- msgid "Hour"
1631
- msgstr "Hora"
1632
-
1633
- #: ../admin/views/ad-submitbox-meta.php:24
1634
- msgid "Minute"
1635
- msgstr "Minuto"
1636
-
1637
- #: ../admin/views/ad-submitbox-meta.php:29
1638
- #, php-format
1639
- msgctxt "order of expiry date fields 1: month, 2: day, 3: year, 4: hour, 5: minute"
1640
- msgid "%1$s %2$s, %3$s @ %4$s %5$s"
1641
- msgstr "%1$s %2$s, %3$s @ %4$s %5$s"
1642
-
1643
- #: ../admin/views/ad-visitor-metabox.php:4
1644
- msgid ""
1645
- "Display conditions that are based on the user. Use with caution on cached "
1646
- "websites."
1647
- msgstr ""
1648
- "Mostrar condiciones que están basadas en el usuario. Usar con cautela en "
1649
- "websites cacheados."
1650
-
1651
- #: ../admin/views/ad-visitor-metabox.php:28
1652
- msgid ""
1653
- "Visitor conditions limit the number of users who can see your ad. There is "
1654
- "no need to set visitor conditions if you want all users to see the ad."
1655
- msgstr ""
1656
- "Las condiciones del visitante limitan el número de usuarios que pueden ver "
1657
- "tu anuncio. No hay necesidad de establecer condiciones del visitante si "
1658
- "deseas que todos los usuarios vean el anuncio."
1659
-
1660
- #: ../admin/views/ad-visitor-metabox.php:30
1661
- #, php-format
1662
- msgid ""
1663
- "Check out cache-busting in <a href=\"%s\" target=\"_blank\">Advanced Ads Pro</a> "
1664
- "if dynamic features get cached."
1665
- msgstr ""
1666
- "Revisa el almacenamiento-en-caché en <a href=\"%s\" target=\"_blank\">Advanced "
1667
- "Ads Pro</a> si las funcionalidades dinámicas son cacheadas."
1668
-
1669
- #: ../admin/views/ad-visitor-metabox.php:47
1670
- #, php-format
1671
- msgid ""
1672
- "Define the exact browser width for which an ad should be visible using the "
1673
- "<a href=\"%s\" target=\"_blank\">Responsive add-on</a>."
1674
- msgstr ""
1675
- "Definir el ancho exacto del navegador para los que un anuncio debe ser "
1676
- "visible usando el <a href=\"%s\" target=\"_blank\">Add-on responsable</a>."
1677
-
1678
- #: ../admin/views/ad-visitor-metabox.php:92
1679
- msgid ""
1680
- "The visitor conditions below are deprecated. Please use the new version of "
1681
- "visitor conditions to replace it."
1682
- msgstr ""
1683
- "Las condiciones del visitante de abajo están depreciadas. Por favor, utiliza "
1684
- "la nueva versión de las condiciones del visitante para reemplazarlas."
1685
-
1686
- #: ../admin/views/ad-visitor-metabox.php:98
1687
- msgid "Display on all devices"
1688
- msgstr "Mostrar en todos los dispositivos"
1689
-
1690
- #: ../admin/views/ad-visitor-metabox.php:102
1691
- msgid "only on mobile devices"
1692
- msgstr "Solamente en dispositivos móviles"
1693
-
1694
- #: ../admin/views/ad-visitor-metabox.php:106
1695
- msgid "not on mobile devices"
1696
- msgstr "No en dispositivos móviles"
1697
-
1698
- #: ../admin/views/debug.php:6 ../admin/views/settings.php:47
1699
- msgid "Debug Page"
1700
- msgstr "Página de Depuración"
1701
-
1702
- #: ../admin/views/debug.php:7
1703
- msgid "Work in progress"
1704
- msgstr "Trabajo en Progreso"
1705
-
1706
- #: ../admin/views/intro.php:18
1707
- msgid "5-Star Usability"
1708
- msgstr "Usabilidad 5- estrellas"
1709
-
1710
- #: ../admin/views/intro.php:19
1711
- msgid ""
1712
- "Advanced Ads is powerful and easy to use, because it is build on WordPress "
1713
- "standards. If you know how to publish a post then you know how to create an "
1714
- "ad."
1715
- msgstr ""
1716
- "Advanced Ads es poderoso y fácil de usar porque está construido bajo los "
1717
- "estándares de WordPress. Si sabes cómo publicar una entrada, entonces sabrás "
1718
- "cómo crear un anuncio."
1719
-
1720
- #: ../admin/views/intro.php:23
1721
- msgid "5-Star Support"
1722
- msgstr "Soporte 5-estrellas"
1723
-
1724
- #: ../admin/views/intro.php:24
1725
- msgid ""
1726
- "I promise you the best supported ad management plugin for WordPress. Whether "
1727
- "a pro user or not, you can reach me easily through the support page, in the "
1728
- "chat on the homepage or replying to a newsletter."
1729
- msgstr ""
1730
- "Te prometo el plugin de administración de anuncios con mejor soporte para "
1731
- "WordPress. Seas un usuario pro o no, puedes localizarme fácilmente a través "
1732
- "de la página de soporte, en el chat de la página de inicio, o respondiendo a "
1733
- "mi boletín de noticias."
1734
-
1735
- #: ../admin/views/intro.php:28
1736
- msgid "5-Star Experience"
1737
- msgstr "Experiencia 5- estrellas"
1738
-
1739
- #: ../admin/views/intro.php:29
1740
- msgid ""
1741
- "Advanced Ads was built out of my own experience. I am personally using it to "
1742
- "serve millions of ad impressions per month and constantly test new ways to "
1743
- "optimize ad settings."
1744
- msgstr ""
1745
- "Advanced Ads fue construido en base a mi propia experiencia. Personalmente, "
1746
- "lo uso para manejar millones de impresiones de anuncios por mes y "
1747
- "constantemente pruebo nuevas formas de optimizar las configuraciones de los "
1748
- "anuncios."
1749
-
1750
- #: ../admin/views/intro.php:34
1751
- msgid "Welcome to <strong>Advanced Ads</strong>"
1752
- msgstr "Bienvenido a <strong>Advanced Ads</strong>\n"
1753
-
1754
- #: ../admin/views/intro.php:36
1755
- msgid "Let me give you an introduction into your future ad management solution."
1756
- msgstr ""
1757
- "Permíteme darte una introducción de tu futura solución en gestión de "
1758
- "anuncios."
1759
-
1760
- #: ../admin/views/intro.php:61
1761
- msgid "Next Steps"
1762
- msgstr "Próximos Pasos"
1763
-
1764
- #: ../admin/views/intro.php:64
1765
- msgid "Subscribe to the Mailing List"
1766
- msgstr "Suscríbete a la Lista de Correos"
1767
-
1768
- #: ../admin/views/intro.php:65
1769
- msgid "Subscribe to the newsletter and instantly"
1770
- msgstr "Suscríbete instantáneamente al boletín de noticias"
1771
-
1772
- #: ../admin/views/intro.php:67
1773
- msgid "get 2 free add-ons."
1774
- msgstr "Obtén 2 add-ons gratis"
1775
-
1776
- #: ../admin/views/intro.php:68
1777
- msgid "reply to the welcome message with a question."
1778
- msgstr "Responde al mensaje de bienvenida con una pregunta."
1779
-
1780
- #: ../admin/views/intro.php:69
1781
- msgid "subscribe to a dedicated group for the tutorial or AdSense tips."
1782
- msgstr "Suscríbete a un grupo dedicado para el tutorial o para los tips de AdSense."
1783
-
1784
- #: ../admin/views/intro.php:82
1785
- msgid "Display your ad"
1786
- msgstr "Muestra Tu Anuncio"
1787
-
1788
- #: ../admin/views/intro.php:83
1789
- msgid ""
1790
- "You can display your ad using a shortcode, widget or one of the powerful "
1791
- "placements. Placements help you to inject ads into the content or place them "
1792
- "on your site without coding."
1793
- msgstr ""
1794
- "Puedes mostrar tu anuncio utilizando un shortcode, un widget, o alguna de "
1795
- "las poderosas colocaciones disponibles. Las colocaciones te ayudan a "
1796
- "inyectar anuncios dentro del contenido, o a colocarlos en algún lugar de tu "
1797
- "sitio sin necesidad de que tengas que programar."
1798
-
1799
- #: ../admin/views/intro.php:85
1800
- msgid "List of all available placements"
1801
- msgstr "Listado de todas las colocaciones disponibles"
1802
-
1803
- #: ../admin/views/intro.php:86
1804
- msgid "Create a placement"
1805
- msgstr "Crear una Colocación"
1806
-
1807
- #: ../admin/views/placements.php:8
1808
- msgid ""
1809
- "Couldn’t create the new placement. Please check your form field and whether "
1810
- "the name is already in use."
1811
- msgstr ""
1812
- "No se pudo crear la nueva colocación. Por favor, revisa el campo del "
1813
- "formulario y si el nombre ya está en uso."
1814
-
1815
- #: ../admin/views/placements.php:10
1816
- msgid "Placements updated"
1817
- msgstr "Colocaciones Actualizadas"
1818
-
1819
- #: ../admin/views/placements.php:15
1820
- msgid ""
1821
- "Placements are physically places in your theme and posts. You can use them "
1822
- "if you plan to change ads and ad groups on the same place without the need "
1823
- "to change your templates."
1824
- msgstr ""
1825
- "Las Colocaciones son lugares físicos dentro de tu tema y tus entradas. "
1826
- "Puedes utilizarlas si planeas cambiar anuncios o Grupos de Anuncios en el "
1827
- "mismo lugar y sin la necesidad de cambiar tus plantillas (templates)."
1828
-
1829
- #: ../admin/views/placements.php:16
1830
- #, php-format
1831
- msgid "See also the manual for more information on <a href=\"%s\">placements</a>."
1832
- msgstr ""
1833
- "Consulta también el manual para más información sobre <a href=\"%s\">Las "
1834
- "Colocaciones</a>. "
1835
-
1836
- #: ../admin/views/placements.php:25
1837
- msgid "Options"
1838
- msgstr "Opciones"
1839
-
1840
- #: ../admin/views/placements.php:42
1841
- #, php-format
1842
- msgid ""
1843
- "Placement type \"%s\" is missing and was reset to \"default\".<br/>Please check "
1844
- "if the responsible add-on is activated."
1845
- msgstr ""
1846
- "El tipo de colocación \"%s\" no se encuentra y fue reiniciado a su \"valor por "
1847
- "defecto\". <br/> Por favor, chequea si el add-on que es responsable de este "
1848
- "funcionamiento está activado."
1849
-
1850
- #: ../admin/views/placements.php:58
1851
- msgid "show usage"
1852
- msgstr "Mostrar uso"
1853
-
1854
- #: ../admin/views/placements.php:70
1855
- msgid "Item"
1856
- msgstr "Item"
1857
-
1858
- #: ../admin/views/placements.php:72 ../admin/views/placements.php:176
1859
- msgid "--not selected--"
1860
- msgstr "--No Seleccionado--"
1861
-
1862
- #: ../admin/views/placements.php:92
1863
- msgid "Inject"
1864
- msgstr "Inyectados"
1865
-
1866
- #: ../admin/views/placements.php:93
1867
- msgid "after"
1868
- msgstr "Después"
1869
-
1870
- #: ../admin/views/placements.php:93
1871
- msgid "before"
1872
- msgstr "Antes"
1873
-
1874
- #: ../admin/views/placements.php:113
1875
- msgid "start counting from bottom"
1876
- msgstr "Empezar contando desde el final"
1877
-
1878
- #: ../admin/views/placements.php:116
1879
- msgid "Important Notice"
1880
- msgstr "Notificación Importante"
1881
-
1882
- #: ../admin/views/placements.php:116
1883
- msgid ""
1884
- "Your server is missing an extension. This might break the content injection."
1885
- "<br/>Ignore this warning if everything works fine or else ask your hosting "
1886
- "provider to enable <em>mbstring</em>."
1887
- msgstr ""
1888
- "A tu servidor le hace falta una extensión. Esto puede romper la inyección de "
1889
- "contenido.<br/> Ignora esta advertencia si todo está funcionando bien. De lo "
1890
- "contrario, pídele a tu compañía de hospedaje habilitar <em>mbstring</em>."
1891
-
1892
- #: ../admin/views/placements.php:126
1893
- msgid "advanced options"
1894
- msgstr "Opciones Avanzadas"
1895
-
1896
- #: ../admin/views/placements.php:134
1897
- msgctxt "checkbox to remove placement"
1898
- msgid "delete"
1899
- msgstr "Eliminar"
1900
-
1901
- #: ../admin/views/placements.php:140
1902
- msgid "Save Placements"
1903
- msgstr "Guardar Colocaciones"
1904
-
1905
- #: ../admin/views/placements.php:142
1906
- msgid "Create a new placement"
1907
- msgstr "Crear una Nueva Colocación"
1908
-
1909
- #: ../admin/views/placements.php:143
1910
- msgid "New Placement"
1911
- msgstr "Nueva Colocación"
1912
-
1913
- #: ../admin/views/placements.php:149
1914
- msgid "Choose a placement type"
1915
- msgstr "Selecciona un tipo de colocación"
1916
-
1917
- #: ../admin/views/placements.php:150
1918
- #, php-format
1919
- msgid ""
1920
- "Placement types define where the ad is going to be displayed. Learn more "
1921
- "about the different types from the <a href=\"%s\">manual</a>"
1922
- msgstr ""
1923
- "Los tipos de colocaciones definen en donde se debe mostrar el anuncio. "
1924
- "Aprende más sobre los diferentes tipos en el <a href=\"%s\">manual</a>."
1925
-
1926
- #: ../admin/views/placements.php:167
1927
- msgid "Please select a placement type."
1928
- msgstr "Por favor, selecciona un tipo de colocación."
1929
-
1930
- #: ../admin/views/placements.php:169
1931
- msgid "Choose a Name"
1932
- msgstr "Selecciona un Nombre"
1933
-
1934
- #: ../admin/views/placements.php:170
1935
- msgid ""
1936
- "The name of the placement is only visible to you. Tip: choose a descriptive "
1937
- "one, e.g. <em>Below Post Headline</em>."
1938
- msgstr ""
1939
- "El nombre de la colocación es solamente visible para ti. Tip: selecciona un "
1940
- "nombre descriptivo, ej: <em>Debajo del Encabezado de la Entrada</em>."
1941
-
1942
- #: ../admin/views/placements.php:171
1943
- msgid "Placement Name"
1944
- msgstr "Nombre de la Colocación"
1945
-
1946
- #: ../admin/views/placements.php:172
1947
- msgid "Please enter a name for your placement."
1948
- msgstr "Por favor, ingresa un nombre para tu colocación."
1949
-
1950
- #: ../admin/views/placements.php:173
1951
- msgid "Choose the Ad or Group"
1952
- msgstr "Selecciona el Anuncio o Grupo"
1953
-
1954
- #: ../admin/views/placements.php:174
1955
- msgid "The ad or group that should be displayed."
1956
- msgstr "El anuncio o grupo que debe ser mostrado."
1957
-
1958
- #: ../admin/views/placements.php:193
1959
- msgid "Save New Placement"
1960
- msgstr "Guardar la Nueva Colocación"
1961
-
1962
- #: ../admin/views/post-ad-settings-metabox.php:3
1963
- msgid "Disable ads on this page"
1964
- msgstr "Deshabilitar anuncios en esta página"
1965
-
1966
- #: ../admin/views/setting-license.php:5
1967
- msgid "Your license expired."
1968
- msgstr "Tu licencia expiró."
1969
-
1970
- #: ../admin/views/setting-license.php:14
1971
- #, php-format
1972
- msgid "(%d days left)"
1973
- msgstr "(%d días restantes)"
1974
-
1975
- #: ../admin/views/setting-license.php:18
1976
- msgid "License key"
1977
- msgstr "Llave de Licencia"
1978
-
1979
- #: ../admin/views/setting-license.php:28
1980
- msgid "Deactivate License"
1981
- msgstr "Desactivar Licencia"
1982
-
1983
- #: ../admin/views/setting-license.php:35
1984
- msgid "Activate License"
1985
- msgstr "Activar Licencia"
1986
-
1987
- #: ../admin/views/setting-license.php:39
1988
- msgid "License key invalid"
1989
- msgstr "Llave de licencia inválida"
1990
-
1991
- #: ../admin/views/setting-license.php:42
1992
- msgid "active"
1993
- msgstr "Activa"
1994
-
1995
- #: ../admin/views/settings-disable-ads.php:3
1996
- msgid "Disable all ads in frontend"
1997
- msgstr "Deshabilitar todos los anuncios en el frente del sitio"
1998
-
1999
- #: ../admin/views/settings-disable-ads.php:4
2000
- msgid ""
2001
- "Use this option to disable all ads in the frontend, but still be able to use "
2002
- "the plugin."
2003
- msgstr ""
2004
- "Usar esta opción para deshabilitar todos los anuncios en el frente del sitio "
2005
- "y todavía tener la capacidad de usar el plugin."
2006
-
2007
- #: ../admin/views/settings-disable-ads.php:8
2008
- msgid "Disable ads on 404 error pages"
2009
- msgstr "Deshabilitar anuncios en las páginas de error 404"
2010
-
2011
- #: ../admin/views/settings-disable-ads.php:12
2012
- msgid "Disable ads on non-singular pages"
2013
- msgstr "Deshabilitar anuncios en páginas no-singulares"
2014
-
2015
- #: ../admin/views/settings-disable-ads.php:13
2016
- msgid "e.g. archive pages like categories, tags, authors, front page (if a list)"
2017
- msgstr ""
2018
- "Ej. Páginas de archivo como categorías, etiquetas, autores, frente de la "
2019
- "página (si es una lista)"
2020
-
2021
- #: ../admin/views/settings-disable-ads.php:16
2022
- msgid "Disable ads on secondary queries"
2023
- msgstr "Deshabilitar anuncios en consultas (queries) secundarias"
2024
-
2025
- #: ../admin/views/settings-disable-ads.php:17
2026
- msgid ""
2027
- "Secondary queries are custom queries of posts outside the main query of a "
2028
- "page. Try this option if you see ads injected on places where they shouldn’t "
2029
- "appear."
2030
- msgstr ""
2031
- "Las consultas (queries) secundarias son consultas personalizadas de entradas "
2032
- "fuera de la consulta principal de una página. Intenta habilitar esta opción "
2033
- "si ves anuncios inyectados en lugares en donde no deberían aparecer."
2034
-
2035
- #: ../admin/views/settings.php:36
2036
- msgid "Save settings on this page"
2037
- msgstr "Guardar las configuraciones de esta página"
2038
-
2039
- #: ../admin/views/settings.php:48
2040
- msgid "Welcome Page"
2041
- msgstr "Página de Bienvenida"
2042
-
2043
- #: ../admin/views/settings.php:49
2044
- msgid "Advanced Ads on WordPress.org"
2045
- msgstr "Advanced Ads en WordPress.org"
2046
-
2047
- #: ../admin/views/settings.php:49
2048
- msgid "Advanced Ads on wp.org"
2049
- msgstr "Advanced Ads en wp.org"
2050
-
2051
- #: ../admin/views/settings.php:50
2052
- msgid "the company behind Advanced Ads"
2053
- msgstr "la compañía detrás de Advanced Ads"
2054
-
2055
- #: ../admin/views/support.php:8
2056
- msgid "Possible Issues"
2057
- msgstr "Posibles Problemas"
2058
-
2059
- #: ../admin/views/support.php:9
2060
- msgid ""
2061
- "Please fix the red highlighted issues on this page or try to understand "
2062
- "their consequences before contacting support."
2063
- msgstr ""
2064
- "Por favor, arregla los problemas resaltados en rojo en esta página o intenta "
2065
- "entender sus consecuencias antes de contactar a soporte."
2066
-
2067
- #: ../admin/views/support.php:13
2068
- #, php-format
2069
- msgid ""
2070
- "Your <strong>PHP version (%s) is too low</strong>. Advanced Ads is built for "
2071
- "PHP 5.3 and higher. It might work, but updating PHP is highly recommended. "
2072
- "Please ask your hosting provider for more information."
2073
- msgstr ""
2074
- "Tu <strong>versión de PHP (%s) es muy vieja</strong>. Advanced Ads fue "
2075
- "diseñado para PHP 5.3 o mayor. Puede que funcione, pero actualizar PHP es "
2076
- "altamente recomendado. Por favor, consulta con tu compañía de hospedaje para "
2077
- "mayor información."
2078
-
2079
- #: ../admin/views/support.php:16
2080
- #, php-format
2081
- msgid ""
2082
- "Your <strong>website uses cache</strong>. Some dynamic features like ad "
2083
- "rotation or visitor conditions might not work properly. Use the cache-"
2084
- "busting feature of <a href=\"%s\" target=\"_blank\">Advanced Ads Pro</a> to load "
2085
- "ads dynamically."
2086
- msgstr ""
2087
- "Tu <strong>sitio web utiliza caché</strong>. Algunas características "
2088
- "dinámicas, como la rotación de anuncios o las condiciones del visitante, "
2089
- "puede que no funcionen correctamente. Utiliza la característica de "
2090
- "almacenamiento-en-caché de <a href=\"%s\" target=\"_blank\">Advanced Ads Pro</a> "
2091
- "para cargar los anuncios dinámicamente."
2092
-
2093
- #: ../admin/views/support.php:19
2094
- msgid "There is a <strong>new WordPress version available</strong>. Please update."
2095
- msgstr ""
2096
- "Hay una <strong>nueva versión de WordPress disponible</strong>. Por favor, "
2097
- "actualízala."
2098
-
2099
- #: ../admin/views/support.php:22
2100
- msgid "There are <strong>plugin updates available</strong>. Please update."
2101
- msgstr ""
2102
- "Hay <strong>actualizaciones del plugin disponibles</strong>. Por favor, "
2103
- "actualízalo."
2104
-
2105
- #: ../admin/views/support.php:25
2106
- #, php-format
2107
- msgid ""
2108
- "One or more license keys for <strong>Advanced Ads add-ons are invalid or "
2109
- "missing</strong>. Please add valid license keys <a href=\"%s\">here</a>."
2110
- msgstr ""
2111
- "Una o más llaves de licencia para <strong>los add-ons avanzados son "
2112
- "inválidas o no se encuentran</strong>. Por favor, adiciona llaves de "
2113
- "licencia válidas <a href=\"%s\">aquí</a>."
2114
-
2115
- #: ../admin/views/support.php:31
2116
- #, php-format
2117
- msgid ""
2118
- "<strong>Autoptimize plugin detected</strong>. While this plugin is great for "
2119
- "site performance, it is known to alter code, including scripts from ad "
2120
- "networks. <a href=\"%s\" target=\"_blank\">Advanced Ads Pro</a> has a build-in "
2121
- "support for Autoptimize."
2122
- msgstr ""
2123
- "<strong>Autoptimize plugin detectado</strong>. A pesar de que este plugin es "
2124
- "muy bueno para el rendimiento del sitio, también es bien sabido que tiende a "
2125
- "modificar el código, incluyendo scripts de redes de anuncios. <a href=\"%s\" "
2126
- "target=\"_blank\">Advanced Ads Pro</a> posee un soporte incorporado para "
2127
- "Autoptimize."
2128
-
2129
- #: ../admin/views/support.php:34
2130
- #, php-format
2131
- msgid ""
2132
- "Plugins that are known to cause (partial) problems: <strong>%1$s</strong>. "
2133
- "<a href=\"%2$s\" target=\"_blank\">Learn more</a>."
2134
- msgstr ""
2135
- "Plugins que se conocen que causan problemas (parciales): "
2136
- "<strong>%1$s</strong>. <a href=\"%2$s\" target=\"_blank\">Más Información</a>."
2137
-
2138
- #: ../admin/views/support.php:38
2139
- #, php-format
2140
- msgid ""
2141
- "Ads are disabled for all or some pages. See \"disabled ads\" in <a "
2142
- "href=\"%s\">settings</a>."
2143
- msgstr ""
2144
- "Los anuncios están deshabilitados para todas o algunas páginas. Ver "
2145
- "\"anuncios deshabilitados\" en <a href=\"%s\">configuraciones</a>."
2146
-
2147
- #: ../admin/views/support.php:49
2148
- msgid "Search"
2149
- msgstr "Buscar"
2150
-
2151
- #: ../admin/views/support.php:50
2152
- msgid ""
2153
- "Use the following form to search for solutions in the manual on "
2154
- "wpadvancedads.com"
2155
- msgstr ""
2156
- "Usa el siguiente formulario para buscar soluciones en el manual de "
2157
- "wpadvancedads.com"
2158
-
2159
- #: ../admin/views/support.php:53
2160
- msgid "search"
2161
- msgstr "Buscar"
2162
-
2163
- #: ../admin/views/support.php:55
2164
- msgid "Contact"
2165
- msgstr "Contacto"
2166
-
2167
- #: ../admin/views/support.php:56
2168
- #, php-format
2169
- msgid ""
2170
- "Please search the manual for a solution and take a look at <a href=\"%s\" "
2171
- "target=\"_blank\">Ads not showing up?</a> before contacting me for help."
2172
- msgstr ""
2173
- "Por favor, busca en el manual para una solución y échale un vistazo a la "
2174
- "sección de <a href=\"%s\" target=\"_blank\"> Anuncios no aparecen?</a> antes de "
2175
- "contactarme por ayuda."
2176
-
2177
- #: ../admin/views/support.php:58
2178
- msgid "Email was successfully sent."
2179
- msgstr "El correo electrónico fue enviado exitosamente."
2180
-
2181
- #: ../admin/views/support.php:67
2182
- msgid "your email"
2183
- msgstr "Tu correo electrónico"
2184
-
2185
- #: ../admin/views/support.php:71
2186
- msgid "your name"
2187
- msgstr "Tu nombre"
2188
-
2189
- #: ../admin/views/support.php:75
2190
- msgid "your message"
2191
- msgstr "Tu mensaje"
2192
-
2193
- #: ../admin/views/support.php:80
2194
- msgid "send"
2195
- msgstr "Enviar"
2196
-
2197
- #: ../admin/views/notices/adblock.php:3
2198
- msgid ""
2199
- "Please disable your <strong>AdBlocker</strong> to prevent problems with your "
2200
- "ad setup."
2201
- msgstr ""
2202
- "Por favor, deshabilita tu <strong>bloqueador de anuncios "
2203
- "(AdBlocker)</strong> para prevenir problemas con la configuración de tu "
2204
- "anuncio."
2205
-
2206
- #: ../classes/ad_placements.php:31
2207
- msgid "Manual Placement"
2208
- msgstr "Colocación Manual"
2209
-
2210
- #: ../classes/ad_placements.php:32
2211
- msgid "Manual placement to use as function or shortcode."
2212
- msgstr "Colocación manual para usar como Función o Shortcode."
2213
-
2214
- #: ../classes/ad_placements.php:36
2215
- msgid "Header Code"
2216
- msgstr "Código de Encabezado"
2217
-
2218
- #: ../classes/ad_placements.php:37
2219
- msgid "Injected in Header (before closing &lt;/head&gt; Tag, often not visible)."
2220
- msgstr ""
2221
- "Inyectar en el encabezado (antes de la etiqueta &lt;/head&gt;, que con "
2222
- "frecuencia no es visible)."
2223
-
2224
- #: ../classes/ad_placements.php:41
2225
- msgid "Footer Code"
2226
- msgstr "Código del Pie de Página"
2227
-
2228
- #: ../classes/ad_placements.php:42
2229
- msgid "Injected in Footer (before closing &lt;/body&gt; Tag)."
2230
- msgstr ""
2231
- "Inyectado en el Pie de Página (antes de la etiqueta de cierre del &lt;"
2232
- "/body&gt;). "
2233
-
2234
- #: ../classes/ad_placements.php:47
2235
- msgid "Injected before the post content."
2236
- msgstr "Inyectado antes del contenido de la entrada."
2237
-
2238
- #: ../classes/ad_placements.php:52
2239
- msgid "Injected after the post content."
2240
- msgstr "Inyectado después del contenido de la entrada."
2241
-
2242
- #: ../classes/ad_placements.php:56
2243
- msgid "Post Content"
2244
- msgstr "Contenido de la Entrada"
2245
-
2246
- #: ../classes/ad_placements.php:57
2247
- msgid ""
2248
- "Injected into the post content. You can choose the paragraph after which the "
2249
- "ad content is displayed."
2250
- msgstr ""
2251
- "Inyectado en el contenido de la entrada. Puedes elegir el párrafo en el que "
2252
- "inmediatamente después el anuncio se mostrará."
2253
-
2254
- #: ../classes/ad_placements.php:61
2255
- msgid "Sidebar Widget"
2256
- msgstr "Widget de la Barra Lateral"
2257
-
2258
- #: ../classes/ad_placements.php:62
2259
- msgid ""
2260
- "Create a sidebar widget with an ad. Can be placed and used like any other "
2261
- "widget."
2262
- msgstr ""
2263
- "Crear un widget de barra lateral con un anuncio. Puede ser colocado y "
2264
- "utilizado como cualquier otro widget."
2265
-
2266
- #: ../classes/ad_placements.php:210
2267
- #, php-format
2268
- msgid "paragraph (%s)"
2269
- msgstr "Párrafo (%s)"
2270
-
2271
- #: ../classes/ad_placements.php:212
2272
- #, php-format
2273
- msgid "headline 2 (%s)"
2274
- msgstr "Encabezado 2 (%s)"
2275
-
2276
- #: ../classes/ad_placements.php:213
2277
- #, php-format
2278
- msgid "headline 3 (%s)"
2279
- msgstr "Encabezado 3 (%s)"
2280
-
2281
- #: ../classes/ad_placements.php:214
2282
- #, php-format
2283
- msgid "headline 4 (%s)"
2284
- msgstr "Encabezado 4 (%s)"
2285
-
2286
- #: ../classes/ad_type_content.php:35
2287
- msgid "Rich Content"
2288
- msgstr "Contenido Enriquecido"
2289
-
2290
- #: ../classes/ad_type_content.php:36
2291
- msgid ""
2292
- "The full content editor from WordPress with all features like shortcodes, "
2293
- "image upload or styling, but also simple text/html mode for scripts and code."
2294
- msgstr ""
2295
- "El editor de contenido de WordPress completo con todas las características "
2296
- "como shortcodes, carga de imágenes o estilos, y también un modo simple de "
2297
- "texto/html para scripts y código."
2298
-
2299
- #: ../classes/ad_type_image.php:34
2300
- msgid "Image Ad"
2301
- msgstr "Anuncio con Imagen"
2302
-
2303
- #: ../classes/ad_type_image.php:35
2304
- msgid "Ads in various image formats."
2305
- msgstr "Anuncios en varios formatos de imagen."
2306
-
2307
- #: ../classes/ad_type_image.php:55
2308
- msgid "Insert File"
2309
- msgstr "Insertar Archivo"
2310
-
2311
- #: ../classes/ad_type_image.php:55
2312
- msgid "Insert"
2313
- msgstr "Insertar"
2314
-
2315
- #: ../classes/ad_type_image.php:55
2316
- msgid "select image"
2317
- msgstr "Seleccionar Imagen"
2318
-
2319
- #: ../classes/ad_type_image.php:56
2320
- msgid "edit"
2321
- msgstr "Editar"
2322
-
2323
- #: ../classes/ad_type_image.php:65
2324
- msgid "url"
2325
- msgstr "URL"
2326
-
2327
- #: ../classes/ad_type_image.php:67
2328
- #, php-format
2329
- msgid ""
2330
- "Pro: Open this url in a new window and track impressions and clicks with the "
2331
- "<a href=\"%s\" target=\"_blank\">Tracking add-on</a>"
2332
- msgstr ""
2333
- "Pro: Abre esta URL en una ventana nueva y rastrea las impresiones y los "
2334
- "clics con el <a href=\"%s\" target=\"_blank\">add-on de Rastreo</a>"
2335
-
2336
- #: ../classes/ad_type_plain.php:31
2337
- msgid "Plain Text and Code"
2338
- msgstr "Texto Simple y Código"
2339
-
2340
- #: ../classes/ad_type_plain.php:32
2341
- msgid ""
2342
- "Simple text editor without any filters. You might use it to display "
2343
- "unfiltered content, php code or javascript. Shortcodes and other WordPress "
2344
- "content field magic does not work here."
2345
- msgstr ""
2346
- "Editor de texto simple sin ningún filtro. Lo puedes usar para mostrar "
2347
- "contenido no filtrado, código PHP o JavaScript. Sin embargo, los shortcodes "
2348
- "y otro contenido del campo mágico de WordPress no funciona aquí."
2349
-
2350
- #: ../classes/ad_type_plain.php:52
2351
- msgid "Insert plain text or code into this field."
2352
- msgstr "Insertar texto simple o código en este campo."
2353
-
2354
- #: ../classes/ad_type_plain.php:88
2355
- msgid "Execute PHP code (wrapped in <code>&lt;?php ?&gt;</code>)"
2356
- msgstr "Ejecutar código PHP (enmarcado en <code>&lt;?php ?&gt;</code>)"
2357
-
2358
- #: ../classes/checks.php:223
2359
- #, php-format
2360
- msgid ""
2361
- "Possible conflict between jQueryUI library, used by Advanced Ads and other "
2362
- "libraries (probably <a href=\"%s\">Twitter Bootstrap</a>). This might lead to "
2363
- "misfortunate formats in forms, but should not damage features."
2364
- msgstr ""
2365
- "Potencial conflicto entre la librería jQueryUI, usada por Advanced Ads, y "
2366
- "otras librerías (probablemente <a href=\"%s\">Twitter Bootstrap</a>). Esto "
2367
- "puede crear formatos distorsionados en formularios, pero no debería dañar "
2368
- "ninguna funcionalidad."
2369
-
2370
- #: ../classes/display-conditions.php:70 ../includes/array_ad_conditions.php:40
2371
- msgid "Choose the public post types on which to display the ad."
2372
- msgstr "Selecciona los post types públicos en los cuales mostrar el anuncio."
2373
-
2374
- #: ../classes/display-conditions.php:77 ../includes/array_ad_conditions.php:58
2375
- msgid ""
2376
- "Choose on which individual posts, pages and public post type pages you want "
2377
- "to display or hide ads."
2378
- msgstr ""
2379
- "Seleccionar en que entradas individuales, páginas y páginas públicas post "
2380
- "type deseas mostrar o ocultar anuncios."
2381
-
2382
- #: ../classes/display-conditions.php:336
2383
- msgctxt "display the terms search field on ad edit page"
2384
- msgid "add more terms"
2385
- msgstr "Añadir más términos "
2386
-
2387
- #: ../classes/display-conditions.php:337
2388
- msgid "add more terms"
2389
- msgstr "Añadir más términos"
2390
-
2391
- #: ../classes/display-conditions.php:339
2392
- msgid "term name or id"
2393
- msgstr "Nombre del término o ID"
2394
-
2395
- #: ../classes/display-conditions.php:445 ../includes/array_ad_conditions.php:63
2396
- msgid "Home Page"
2397
- msgstr "Página de Inicio"
2398
-
2399
- #: ../classes/display-conditions.php:446 ../includes/array_ad_conditions.php:64
2400
- msgid "show on Home page"
2401
- msgstr "Mostrar en Página de Inicio"
2402
-
2403
- #: ../classes/display-conditions.php:450 ../includes/array_ad_conditions.php:68
2404
- msgid "Singular Pages"
2405
- msgstr "Páginas Singulares"
2406
-
2407
- #: ../classes/display-conditions.php:451 ../includes/array_ad_conditions.php:69
2408
- msgid "show on singular pages/posts"
2409
- msgstr "Mostrar en páginas/entradas singulares"
2410
-
2411
- #: ../classes/display-conditions.php:455 ../includes/array_ad_conditions.php:73
2412
- msgid "Archive Pages"
2413
- msgstr "Páginas de Archivo"
2414
-
2415
- #: ../classes/display-conditions.php:456 ../includes/array_ad_conditions.php:74
2416
- msgid "show on any type of archive page (category, tag, author and date)"
2417
- msgstr ""
2418
- "Mostrar en cualquier tipo de página de archivo (categoría, etiqueta, autor y "
2419
- "fecha)"
2420
-
2421
- #: ../classes/display-conditions.php:460 ../includes/array_ad_conditions.php:78
2422
- msgid "Search Results"
2423
- msgstr "Resultados de la Búsqueda"
2424
-
2425
- #: ../classes/display-conditions.php:461 ../includes/array_ad_conditions.php:79
2426
- msgid "show on search result pages"
2427
- msgstr "Mostrar en páginas de resultados de búsquedas"
2428
-
2429
- #: ../classes/display-conditions.php:465 ../includes/array_ad_conditions.php:83
2430
- msgid "404 Page"
2431
- msgstr "Páginas 404"
2432
-
2433
- #: ../classes/display-conditions.php:466 ../includes/array_ad_conditions.php:84
2434
- msgid "show on 404 error page"
2435
- msgstr "Mostrar en páginas de error 404"
2436
-
2437
- #: ../classes/display-conditions.php:470 ../includes/array_ad_conditions.php:88
2438
- msgid "Attachment Pages"
2439
- msgstr "Páginas Adjuntas"
2440
-
2441
- #: ../classes/display-conditions.php:471 ../includes/array_ad_conditions.php:89
2442
- msgid "show on attachment pages"
2443
- msgstr "Mostrar en páginas adjuntas"
2444
-
2445
- #: ../classes/display-conditions.php:475 ../includes/array_ad_conditions.php:93
2446
- msgid "Secondary Queries"
2447
- msgstr "Consultas (Queries) Secundarias "
2448
-
2449
- #: ../classes/display-conditions.php:476 ../includes/array_ad_conditions.php:94
2450
- msgid "allow ads in secondary queries"
2451
- msgstr "Permitir anuncios en consultas (queries) secundarias "
2452
-
2453
- #: ../classes/EDD_SL_Plugin_Updater.php:177
2454
- #, php-format
2455
- msgid ""
2456
- "There is a new version of %1$s available. <a target=\"_blank\" "
2457
- "class=\"thickbox\" href=\"%2$s\">View version %3$s details</a>."
2458
- msgstr ""
2459
- "Hay una nueva versión de %1$s disponible. <a target=\"_blank\" "
2460
- "class=\"thickbox\" href=\"%2$s\">Ver los detalles de la versión %3$s</a>."
2461
-
2462
- #: ../classes/EDD_SL_Plugin_Updater.php:184
2463
- #, php-format
2464
- msgid ""
2465
- "There is a new version of %1$s available. <a target=\"_blank\" "
2466
- "class=\"thickbox\" href=\"%2$s\">View version %3$s details</a> or <a "
2467
- "href=\"%4$s\">update now</a>."
2468
- msgstr ""
2469
- "Hay una nueva versión de %1$s disponible. <a target=\"_blank\" "
2470
- "class=\"thickbox\" href=\"%2$s\">Ver los detalles de la versión %3$s</a> o <a "
2471
- "href=\"%4$s\">actualízala ahora</a>."
2472
-
2473
- #: ../classes/EDD_SL_Plugin_Updater.php:324
2474
- msgid "You do not have permission to install plugin updates"
2475
- msgstr "No tienes permiso para instalar actualizaciones de plugins"
2476
-
2477
- #: ../classes/EDD_SL_Plugin_Updater.php:324
2478
- msgid "Error"
2479
- msgstr "Error"
2480
-
2481
- #: ../classes/visitor-conditions.php:32
2482
- msgid "mobile device"
2483
- msgstr "Dispositivo Móvil"
2484
-
2485
- #: ../classes/visitor-conditions.php:33
2486
- msgid "Display ads only on mobile devices or hide them."
2487
- msgstr "Mostrar anuncios solamente en dispositivos móviles u ocultarlos."
2488
-
2489
- #: ../classes/visitor-conditions.php:39
2490
- msgid "logged in visitor"
2491
- msgstr "Visitante Conectado"
2492
-
2493
- #: ../classes/visitor-conditions.php:40
2494
- msgid "Whether the visitor has to be logged in or not in order to see the ads."
2495
- msgstr "Si el visitante debe estar conectado o no para ver los anuncios."
2496
-
2497
- #: ../classes/visitor-conditions.php:73
2498
- #, php-format
2499
- msgid ""
2500
- "Pro: Display ads by the available space on the device using the <a href=\"%s\" "
2501
- "target=\"_blank\">Responsive add-on</a>"
2502
- msgstr ""
2503
- "Pro: Mostrar anuncios según el espacio disponible en el dispositivo usando "
2504
- "el <a href=\"%s\" target=\"_blank\">Add-on Responsable</a>"
2505
-
2506
- #: ../classes/visitor-conditions.php:101
2507
- msgid "is"
2508
- msgstr "Es"
2509
-
2510
- #: ../classes/visitor-conditions.php:102
2511
- msgid "is not"
2512
- msgstr "No es"
2513
-
2514
- #: ../classes/visitor-conditions.php:136
2515
- msgid "equal"
2516
- msgstr "Igual"
2517
-
2518
- #: ../classes/visitor-conditions.php:137
2519
- msgid "equal or higher"
2520
- msgstr "Igual o mayor"
2521
-
2522
- #: ../classes/visitor-conditions.php:138
2523
- msgid "equal or lower"
2524
- msgstr "Igual o menor"
2525
-
2526
- #: ../classes/visitor-conditions.php:168
2527
- msgid "contains"
2528
- msgstr "Contiene"
2529
-
2530
- #: ../classes/visitor-conditions.php:169
2531
- msgid "starts with"
2532
- msgstr "Comienza con"
2533
-
2534
- #: ../classes/visitor-conditions.php:170
2535
- msgid "ends with"
2536
- msgstr "Termina con"
2537
-
2538
- #: ../classes/visitor-conditions.php:171
2539
- msgid "matches"
2540
- msgstr "Equivale a"
2541
-
2542
- #: ../classes/visitor-conditions.php:172
2543
- msgid "matches regex"
2544
- msgstr "Equivale a regex"
2545
-
2546
- #: ../classes/visitor-conditions.php:173
2547
- msgid "does not contain"
2548
- msgstr "No contiene"
2549
-
2550
- #: ../classes/visitor-conditions.php:174
2551
- msgid "does not start with"
2552
- msgstr "No comienza con"
2553
-
2554
- #: ../classes/visitor-conditions.php:175
2555
- msgid "does not end with"
2556
- msgstr "No termina con"
2557
-
2558
- #: ../classes/visitor-conditions.php:176
2559
- msgid "does not match"
2560
- msgstr "No equivale a"
2561
-
2562
- #: ../classes/visitor-conditions.php:177
2563
- msgid "does not match regex"
2564
- msgstr "No equivale a regex"
2565
-
2566
- #: ../classes/widget.php:25
2567
- msgid "Display Ads and Ad Groups."
2568
- msgstr "Mostrar Anuncios y Grupos de Anuncios."
2569
-
2570
- #: ../classes/widget.php:67
2571
- msgid "Title:"
2572
- msgstr "Título:"
2573
-
2574
- #: ../includes/array_ad_conditions.php:39
2575
- msgid "Post Types"
2576
- msgstr "Post Types"
2577
-
2578
- #: ../includes/array_ad_conditions.php:45
2579
- msgid "Categories, Tags and Taxonomies"
2580
- msgstr "Categorías, Etiquetas y Taxonomías"
2581
-
2582
- #: ../includes/array_ad_conditions.php:46
2583
- msgid ""
2584
- "Choose terms from public category, tag and other taxonomies a post must "
2585
- "belong to in order to have ads."
2586
- msgstr ""
2587
- "Seleccionar términos de categorías públicas, etiquetas y otras taxonomías a "
2588
- "las que una entrada debe pertenecer para tener anuncios."
2589
-
2590
- #: ../includes/array_ad_conditions.php:51
2591
- msgid "Category Archives"
2592
- msgstr "Archivos de Categorías"
2593
-
2594
- #: ../includes/array_ad_conditions.php:52
2595
- msgid "comma seperated IDs of category archives"
2596
- msgstr "IDs de archivos de categorías separados por coma "
2597
-
2598
- #: ../includes/array_ad_conditions.php:57
2599
- msgid "Individual Posts, Pages and Public Post Types"
2600
- msgstr "Entradas Individuales, Páginas y Post Types Públicos"
2601
-
2602
- #: ../modules/ad-blocker/admin/admin.php:133
2603
- msgid "The asset folder was rebuilt successfully"
2604
- msgstr "El directorio de archivos fue reconstruido exitosamente"
2605
-
2606
- #: ../modules/ad-blocker/admin/admin.php:218
2607
- msgid "Ad blocker fix"
2608
- msgstr "Reparación de Ad blocker"
2609
-
2610
- #: ../modules/ad-blocker/admin/admin.php:257
2611
- msgid "There is no writable upload folder"
2612
- msgstr "No hay directorio escribible de cargas y subidas "
2613
-
2614
- #: ../modules/ad-blocker/admin/admin.php:278
2615
- #, php-format
2616
- msgid "Unable to rename \"%s\" directory"
2617
- msgstr "No es posible renombrar el directorio \"%s\""
2618
-
2619
- #: ../modules/ad-blocker/admin/admin.php:294 ../modules/ad-blocker/admin/admin.
2620
- #: php:307 ../modules/ad-blocker/admin/admin.php:324
2621
- #, php-format
2622
- msgid "Unable to copy assets to the \"%s\" directory"
2623
- msgstr "No es posible copiar los archivos al directorio \"%s\""
2624
-
2625
- #: ../modules/ad-blocker/admin/admin.php:358 ../modules/ad-blocker/admin/admin.
2626
- #: php:378
2627
- #, php-format
2628
- msgid "We do not have direct write access to the \"%s\" directory"
2629
- msgstr "No tenemos acceso directo de escritura al directorio \"%s\" "
2630
-
2631
- #: ../modules/ad-blocker/admin/admin.php:445
2632
- #, php-format
2633
- msgid ""
2634
- "Unable to create \"%s\" directory. Is its parent directory writable by the "
2635
- "server?"
2636
- msgstr ""
2637
- "No es posible crear el directorio \"%s\". Es el directorio principal "
2638
- "escribible en el servidor?"
2639
-
2640
- #: ../modules/ad-blocker/admin/admin.php:456
2641
- #, php-format
2642
- msgid "Unable to copy files to %s"
2643
- msgstr "No es posible copiar archivos a %s"
2644
-
2645
- #: ../modules/ad-blocker/admin/admin.php:592
2646
- msgid ""
2647
- "Prevents ad block software from breaking your website when blocking asset "
2648
- "files (.js, .css)."
2649
- msgstr ""
2650
- "Previene que el software de Ad block rompa tu sitio cuando bloquee archivos "
2651
- "(.js, .css)."
2652
-
2653
- #: ../modules/ad-blocker/admin/views/rebuild_form.php:1
2654
- msgid "Ad blocker file folder"
2655
- msgstr "Directorio de archivos de Ad blocker"
2656
-
2657
- #: ../modules/ad-blocker/admin/views/rebuild_form.php:10
2658
- msgid "Upload folder is not writable"
2659
- msgstr "El directorio de cargas y subidas no es escribible"
2660
-
2661
- #: ../modules/ad-blocker/admin/views/rebuild_form.php:23
2662
- msgid "Asset path"
2663
- msgstr "Ruta de Archivos"
2664
-
2665
- #: ../modules/ad-blocker/admin/views/rebuild_form.php:27
2666
- msgid "Asset URL"
2667
- msgstr "URL de Archivos"
2668
-
2669
- #: ../modules/ad-blocker/admin/views/rebuild_form.php:46
2670
- msgid "Rebuild asset folder"
2671
- msgstr "Reconstruir directorio de archivos"
2672
-
2673
- #: ../modules/gadsense/main.php:19
2674
- msgid " at "
2675
- msgstr "En"
2676
-
2677
- #: ../modules/gadsense/admin/admin.php:26 ../modules/gadsense/admin/views/adsense-
2678
- #: ad-parameters.php:51
2679
- msgid "Responsive"
2680
- msgstr "Responsable"
2681
-
2682
- #: ../modules/gadsense/admin/admin.php:44
2683
- msgid "The ad details couldn't be retrieved from the ad code"
2684
- msgstr "Los detalles del anuncio no pudieron ser recuperados del código del anuncio"
2685
-
2686
- #: ../modules/gadsense/admin/admin.php:45
2687
- msgid ""
2688
- "Warning : The AdSense account from this code does not match the one set with "
2689
- "the Advanced Ads Plugin. This ad might cause troubles when used in the front "
2690
- "end."
2691
- msgstr ""
2692
- "Advertencia: La cuenta de AdSense de este código no es equivalente a la que "
2693
- "se encuentra en el plugin de Advanced Ads. Este anuncio puede causar "
2694
- "problemas cuando se use en el frente del sitio."
2695
-
2696
- #: ../modules/gadsense/admin/admin.php:123 ../modules/gadsense/admin/admin.php:262
2697
- msgid "AdSense"
2698
- msgstr "AdSense"
2699
-
2700
- #: ../modules/gadsense/admin/admin.php:131
2701
- msgid "AdSense ID"
2702
- msgstr "ID de AdSense "
2703
-
2704
- #: ../modules/gadsense/admin/admin.php:140
2705
- msgid "Limit to 3 ads"
2706
- msgstr "Limitar a 3 anuncios"
2707
-
2708
- #: ../modules/gadsense/admin/admin.php:149
2709
- msgid "Activate Page-Level ads"
2710
- msgstr "Activar Anuncios de Nivel-de-Página"
2711
-
2712
- #: ../modules/gadsense/admin/admin.php:169
2713
- #, php-format
2714
- msgid ""
2715
- "Please enter your Publisher ID in order to use AdSense on your page. See the "
2716
- "<a href=\"%s\" target=\"_blank\">manual</a> for more information."
2717
- msgstr ""
2718
- "Por favor, ingresa tu ID de publicador para usar AdSense en tu página. Ver "
2719
- "el <a href=\"%s\" target=\"_blank\">manual</a> para mayor información."
2720
-
2721
- #: ../modules/gadsense/admin/admin.php:183
2722
- msgid "Your AdSense Publisher ID <em>(pub-xxxxxxxxxxxxxx)</em>"
2723
- msgstr "Tu ID de publicador de AdSense <em>(pub-xxxxxxxxxxxxxx)</em>"
2724
-
2725
- #: ../modules/gadsense/admin/admin.php:195
2726
- #, php-format
2727
- msgid "Limit to %d AdSense ads"
2728
- msgstr "Limitar a %d anuncios de AdSense "
2729
-
2730
- #: ../modules/gadsense/admin/admin.php:199
2731
- #, php-format
2732
- msgid ""
2733
- "Currently, Google AdSense <a target=\"_blank\" href=\"%s\" title=\"Terms Of "
2734
- "Service\">TOS</a> imposes a limit of %d display ads per page. You can disable "
2735
- "this limitation at your own risks."
2736
- msgstr ""
2737
- "Actualmente, los <a target=\"_blank\" href=\"%s\" title=\"Terminos de "
2738
- "Servicio\">Terminos de Servicio</a> de Google AdSense imponen un límite de %d "
2739
- "anuncios a mostrar por página. Puedes deshabilitar esta limitación bajo tu "
2740
- "propio riesgo."
2741
-
2742
- #: ../modules/gadsense/admin/admin.php:202
2743
- msgid "Notice: Advanced Ads only considers the AdSense ad type for this limit."
2744
- msgstr ""
2745
- "Nota: Advanced Ads solamente considera el tipo de anuncio de AdSense para "
2746
- "este límite."
2747
-
2748
- #: ../modules/gadsense/admin/admin.php:205
2749
- msgid ""
2750
- "Due to technical restrictions, the limit does not work on placements with "
2751
- "cache-busting enabled."
2752
- msgstr ""
2753
- "Debido a restricciones técnicas, el límite no funciona en colocaciones con "
2754
- "almacenamiento-en-caché habilitado."
2755
-
2756
- #: ../modules/gadsense/admin/admin.php:219
2757
- msgid "Insert Page-Level ads code on all pages."
2758
- msgstr "Insertar código de anuncios de Nivel-de-Página en todas las páginas."
2759
-
2760
- #: ../modules/gadsense/admin/admin.php:221
2761
- msgid ""
2762
- "You still need to enable Page-Level ads in your AdSense account. See <a "
2763
- "href=\"https://support.google.com/adsense/answer/6245304\" "
2764
- "target=\"_blank\">AdSense Help</a> (requires AdSense-login) for more "
2765
- "information"
2766
- msgstr ""
2767
- "Todavía necesitas habilitar anuncios de Nivel-de-Página en tu cuenta de "
2768
- "AdSense. Ver <a href=\"https://support.google.com/adsense/answer/6245304\" "
2769
- "target=\"_blank\">Ayuda de AdSense</a> (requirere inicio de sesión en AdSense)"
2770
-
2771
- #: ../modules/gadsense/admin/admin.php:240 ../modules/gadsense/includes/class-ad-
2772
- #: type-adsense.php:73
2773
- msgid "The Publisher ID has an incorrect format. (must start with \"pub-\")"
2774
- msgstr "El ID del publicador tiene un formato incorrecto. (Debe comenzar con \"pub-\")"
2775
-
2776
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:23
2777
- msgid "Copy&Paste existing ad code"
2778
- msgstr "Copiar & Pegar el código existente del anuncio"
2779
-
2780
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:29
2781
- msgid "Ad Slot ID"
2782
- msgstr "ID de la Casilla del Anuncio"
2783
-
2784
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:37
2785
- #, php-format
2786
- msgid "Publisher ID: %s"
2787
- msgstr "ID del Publicador: %s"
2788
-
2789
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:44
2790
- #, php-format
2791
- msgid "Please <a href=\"%s\" target=\"_blank\">change it here</a>."
2792
- msgstr "Por favor, <a href=\"%s\" target=\"_blank\">cámbialo aquí</a>."
2793
-
2794
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:50
2795
- msgid "Normal"
2796
- msgstr "Normal"
2797
-
2798
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:55
2799
- #, php-format
2800
- msgid ""
2801
- "Use the <a href=\"%s\" target=\"_blank\">Responsive add-on</a> in order to "
2802
- "define the exact creative for each browser width."
2803
- msgstr ""
2804
- "Usa el <a href=\"%s\" target=\"_blank\">add-on responsable</a> para definir el "
2805
- "diseño exacto para cada ancho del navegador."
2806
-
2807
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:60
2808
- msgid "Resizing"
2809
- msgstr "Cambiar el Tamaño"
2810
-
2811
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:72
2812
- msgid "Copy the ad code from your AdSense account and paste it in the area below"
2813
- msgstr ""
2814
- "Copia el código del anuncio de tu cuenta de AdSense y pégalo en el área de "
2815
- "abajo"
2816
-
2817
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:75
2818
- msgid "Get details"
2819
- msgstr "Obtener Detalles"
2820
-
2821
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:76
2822
- msgid "Close"
2823
- msgstr "Cerrar"
2824
-
2825
- #: ../modules/gadsense/includes/class-ad-type-adsense.php:35
2826
- msgid "AdSense ad"
2827
- msgstr "Anuncio de AdSense"
2828
-
2829
- #: ../modules/gadsense/includes/class-ad-type-adsense.php:36
2830
- msgid "Use ads from your Google AdSense account"
2831
- msgstr "Usar anuncios de tu cuenta de Google AdSense"
2832
-
2833
- #: ../modules/gadsense/includes/class-ad-type-adsense.php:105
2834
- msgid "Your AdSense Publisher ID is missing."
2835
- msgstr "Tu ID de publicador de AdSense no se encuentra."
2836
-
2837
- #: ../modules/gadsense/includes/class-gadsense-data.php:46
2838
- msgid "Auto"
2839
- msgstr "Auto"
2840
-
2841
- #: ../public/class-advanced-ads.php:309
2842
- msgid "Advanced Ads Error following:"
2843
- msgstr "El siguiente error de Advanced Ads:"
2844
-
2845
- #: ../public/class-advanced-ads.php:312
2846
- #, php-format
2847
- msgid "Advanced Ads Error: %s"
2848
- msgstr "Error de Advanced Ads: %s"
2849
-
2850
- #: ../public/class-advanced-ads.php:553
2851
- msgctxt "ad group general name"
2852
- msgid "Ad Groups"
2853
- msgstr "Grupos de Anuncios"
2854
-
2855
- #: ../public/class-advanced-ads.php:554
2856
- msgctxt "ad group singular name"
2857
- msgid "Ad Group"
2858
- msgstr "Grupo de Anuncios"
2859
-
2860
- #: ../public/class-advanced-ads.php:555
2861
- msgid "Search Ad Groups"
2862
- msgstr "Buscar Grupos de Anuncios"
2863
-
2864
- #: ../public/class-advanced-ads.php:556
2865
- msgid "All Ad Groups"
2866
- msgstr "Todos los Grupos de Anuncios"
2867
-
2868
- #: ../public/class-advanced-ads.php:557
2869
- msgid "Parent Ad Groups"
2870
- msgstr "Grupos Principales de Anuncios"
2871
-
2872
- #: ../public/class-advanced-ads.php:558
2873
- msgid "Parent Ad Groups:"
2874
- msgstr "Grupos Principales de Anuncios:"
2875
-
2876
- #: ../public/class-advanced-ads.php:559
2877
- msgid "Edit Ad Group"
2878
- msgstr "Editar Grupo de Anuncios"
2879
-
2880
- #: ../public/class-advanced-ads.php:560
2881
- msgid "Update Ad Group"
2882
- msgstr "Actualizar Grupo de Anuncios"
2883
-
2884
- #: ../public/class-advanced-ads.php:561
2885
- msgid "Add New Ad Group"
2886
- msgstr "Añadir Nuevo Grupo de Anuncios"
2887
-
2888
- #: ../public/class-advanced-ads.php:562
2889
- msgid "New Ad Groups Name"
2890
- msgstr "Nuevo Nombre para Grupos de Anuncios"
2891
-
2892
- #: ../public/class-advanced-ads.php:564
2893
- msgid "No Ad Group found"
2894
- msgstr "Grupo de Anuncios no encontrado"
2895
-
2896
- #: ../public/class-advanced-ads.php:595
2897
- msgid "Edit Ad"
2898
- msgstr "Editar Anuncio"
2899
-
2900
- #: ../public/class-advanced-ads.php:597
2901
- msgid "View"
2902
- msgstr "Ver"
2903
-
2904
- #: ../public/class-advanced-ads.php:598
2905
- msgid "View the Ad"
2906
- msgstr "Ver el Anuncio"
2907
-
2908
- #: ../public/class-advanced-ads.php:599
2909
- msgid "Search Ads"
2910
- msgstr "Buscar Anuncios"
2911
-
2912
- #: ../public/class-advanced-ads.php:600
2913
- msgid "No Ads found"
2914
- msgstr "No se encontraron anuncios"
2915
-
2916
- #: ../public/class-advanced-ads.php:601
2917
- msgid "No Ads found in Trash"
2918
- msgstr "No se encontraron anuncios en la papelera"
2919
-
2920
- #: ../public/class-advanced-ads.php:602
2921
- msgid "Parent Ad"
2922
- msgstr "Anuncio Principal"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/advanced-ads-fr_FR.mo DELETED
Binary file
languages/advanced-ads-fr_FR.po DELETED
@@ -1,2968 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: Advanved Ads\n"
4
- "Report-Msgid-Bugs-To: http://wordpress.org/plugins/plugin-name\n"
5
- "POT-Creation-Date: 2015-01-27 16:47+0100\n"
6
- "PO-Revision-Date: Sun May 15 2016 18:04:50 GMT+0200 (CEST)\n"
7
- "Last-Translator: admin <post@webzunft.de>\n"
8
- "Language-Team: webgilde <thomas.maier@webgilde.com>\n"
9
- "Language: French (France)\n"
10
- "Plural-Forms: nplurals=2; plural=n > 1\n"
11
- "MIME-Version: 1.0\n"
12
- "Content-Type: text/plain; charset=UTF-8\n"
13
- "Content-Transfer-Encoding: 8bit\n"
14
- "X-Poedit-SourceCharset: UTF-8\n"
15
- "X-Generator: Loco - https://localise.biz/\n"
16
- "X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;"
17
- "__:1;_e:1;_c:1;_n:1,2;_n_noop:1,2;_nc:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
18
- "_x:1,2c;_ex:1,2c;_nx:1,2,4c;_nx_noop:1,2,3c;_n_js:1,2;_nx_js:1,2,3c;"
19
- "esc_attr__:1;esc_html__:1;esc_attr_e:1;esc_html_e:1;esc_attr_x:1,2c;"
20
- "esc_html_x:1,2c;comments_number_link:2,3;t:1;st:1;trans:1;transChoice:1,2\n"
21
- "X-Poedit-Basepath: ..\n"
22
- "X-Poedit-SearchPath-0: .\n"
23
- "X-Loco-Target-Locale: fr_FR"
24
-
25
- #: ../admin/class-advanced-ads-admin.php:215 ../classes/display-conditions.php:
26
- #: 171 ../classes/visitor-conditions.php:214
27
- msgid "or"
28
- msgstr ""
29
-
30
- #: ../admin/class-advanced-ads-admin.php:216 ../admin/views/ad-display-metabox.
31
- #: php:76 ../admin/views/ad-visitor-metabox.php:68 ../classes/display-conditions.
32
- #: php:171 ../classes/visitor-conditions.php:214
33
- msgid "and"
34
- msgstr ""
35
-
36
- #: ../admin/class-advanced-ads-admin.php:217
37
- msgid "After which paragraph?"
38
- msgstr ""
39
-
40
- #: ../admin/class-advanced-ads-admin.php:746
41
- msgid "Video"
42
- msgstr ""
43
-
44
- #: ../admin/class-advanced-ads-admin.php:1097
45
- msgid "Ad label"
46
- msgstr ""
47
-
48
- #: ../admin/class-advanced-ads-admin.php:1339 ../public/class-advanced-ads.php:711
49
- msgctxt "label before ads"
50
- msgid "Advertisements"
51
- msgstr ""
52
-
53
- #: ../admin/class-advanced-ads-admin.php:1346
54
- msgid "Displayed above ads."
55
- msgstr ""
56
-
57
- #: ../admin/class-advanced-ads-admin.php:1833
58
- msgid "License couldn’t be activated. Please try again later."
59
- msgstr ""
60
-
61
- #: ../admin/class-advanced-ads-admin.php:1847
62
- msgid "There are no activations left."
63
- msgstr ""
64
-
65
- #: ../admin/class-advanced-ads-admin.php:1933 ../admin/class-advanced-ads-admin.
66
- #: php:1950
67
- msgid "License couldn’t be deactivated. Please try again later."
68
- msgstr ""
69
-
70
- #: ../admin/views/ad-info-bottom.php:2
71
- msgctxt "wizard navigation"
72
- msgid "previous"
73
- msgstr ""
74
-
75
- #: ../admin/views/ad-info-bottom.php:3
76
- msgctxt "wizard navigation"
77
- msgid "save"
78
- msgstr ""
79
-
80
- #: ../admin/views/ad-info-bottom.php:4
81
- msgctxt "wizard navigation"
82
- msgid "next"
83
- msgstr ""
84
-
85
- #: ../admin/views/ad-info-top.php:4
86
- #, php-format
87
- msgid ""
88
- "Congratulations! Your ad is now visible in the frontend. You can adjust the "
89
- "placement options <a href=\"%s\">here</a>."
90
- msgstr ""
91
-
92
- #: ../admin/views/ad-info-top.php:5
93
- msgid "Where do you want to display the ad?"
94
- msgstr ""
95
-
96
- #: ../admin/views/ad-info-top.php:7
97
- msgid "Content"
98
- msgstr ""
99
-
100
- #: ../admin/views/ad-info-top.php:9
101
- msgid "Manage Sidebar"
102
- msgstr ""
103
-
104
- #: ../admin/views/ad-info-top.php:11
105
- msgid "Show Pro Places"
106
- msgstr ""
107
-
108
- #: ../admin/views/ad-info-top.php:14
109
- msgid "Show Sticky Places"
110
- msgstr ""
111
-
112
- #: ../admin/views/ad-info-top.php:17
113
- msgid "Show PopUp"
114
- msgstr ""
115
-
116
- #: ../admin/views/ad-info-top.php:21
117
- #, php-format
118
- msgid "Or use the shortcode %s to insert the ad into the content manually."
119
- msgstr ""
120
-
121
- #: ../admin/views/ad-info-top.php:31 ../admin/views/ad-info-top.php:43
122
- msgid "Start Wizard"
123
- msgstr ""
124
-
125
- #: ../admin/views/ad-info-top.php:32
126
- msgid "Stop Wizard"
127
- msgstr ""
128
-
129
- #: ../admin/views/ad-info-top.php:41
130
- msgid "Welcome to the Wizard"
131
- msgstr ""
132
-
133
- #: ../admin/views/ad-info-top.php:42
134
- msgid ""
135
- "The Wizard helps you to quickly create and publish an ad. Therefore, only "
136
- "the most common options are visible.<br/>You can access all options when "
137
- "<strong>switching off</strong> the Wizard using the <em>Stop Wizard</em> "
138
- "button.<br/>You can <strong>switch on</strong> the Wizard at any time using "
139
- "the <em>Start Wizard</em> button."
140
- msgstr ""
141
-
142
- #: ../admin/views/ad-info-top.php:44
143
- msgid "Stop Wizard and show all options"
144
- msgstr ""
145
-
146
- #: ../admin/views/ad-output-metabox.php:47
147
- msgid "Enable debug mode"
148
- msgstr ""
149
-
150
- #: ../admin/views/ad-parameters-size.php:6
151
- msgid "reserve this space"
152
- msgstr ""
153
-
154
- #: ../admin/views/setting-license.php:6
155
- #, php-format
156
- msgid "<a href=\"%s\" target=\"_blank\">Renew it with a discount</a>."
157
- msgstr ""
158
-
159
- #: ../admin/views/settings-disable-ads.php:21
160
- msgid "Disable ads in Feed"
161
- msgstr ""
162
-
163
- #: ../classes/ad_placements.php:211
164
- #, php-format
165
- msgid "paragraph without image (%s)"
166
- msgstr ""
167
-
168
- #: ../classes/ad_type_group.php:31
169
- msgid ""
170
- "Choose an existing ad group. Use this type when you want to assign the same "
171
- "display and visitor conditions to all ads in that group."
172
- msgstr ""
173
-
174
- #: ../classes/ad_type_group.php:84
175
- msgid "ad group"
176
- msgstr ""
177
-
178
- #: ../classes/ad_type_plain.php:86
179
- msgid "Allow PHP"
180
- msgstr ""
181
-
182
- #: ../classes/display-conditions.php:400
183
- msgid "title or id"
184
- msgstr ""
185
-
186
- #: ../classes/display-conditions.php:480
187
- msgid "Feed"
188
- msgstr ""
189
-
190
- #: ../classes/display-conditions.php:481
191
- msgid "allow ads in Feed"
192
- msgstr ""
193
-
194
- #: ../modules/ad-blocker/admin/views/rebuild_form.php:31
195
- msgid "Rename assets"
196
- msgstr ""
197
-
198
- #: ../modules/ad-blocker/admin/views/rebuild_form.php:34
199
- msgid "Check if you want to change the names of the assets"
200
- msgstr ""
201
-
202
- #: ../modules/ad-blocker/admin/views/rebuild_form.php:43
203
- #, php-format
204
- msgid ""
205
- "Please, rebuild the asset folder. All assets will be located in "
206
- "<strong>%s</strong>"
207
- msgstr ""
208
-
209
- #. Name of the plugin
210
- msgid "Advanced Ads"
211
- msgstr "Advanced Ads"
212
-
213
- #. URI of the plugin
214
- msgid "https://wpadvancedads.com"
215
- msgstr "https://wpadvancedads.com"
216
-
217
- #. Description of the plugin
218
- msgid "Manage and optimize your ads in WordPress"
219
- msgstr "Gérer et optimiser vos pubs dans Wordpress"
220
-
221
- #. Author of the plugin
222
- msgid "Thomas Maier"
223
- msgstr "Thomas Maier"
224
-
225
- #. Author URI of the plugin
226
- msgid "http://webgilde.com"
227
- msgstr "http://webgilde.com"
228
-
229
- #: ../admin/class-advanced-ads-admin.php:283
230
- msgid "Overview"
231
- msgstr "Aperçu"
232
-
233
- #: ../admin/class-advanced-ads-admin.php:287 ../admin/class-advanced-ads-admin.
234
- #: php:287 ../admin/includes/class-shortcode-creator.php:77 ../admin/views/ad-
235
- #: group-list-form-row.php:28 ../admin/views/ad-group-list-header.php:5 ..
236
- #: admin/views/placements.php:81 ../admin/views/placements.php:185 ..
237
- #: classes/widget.php:89 ../public/class-advanced-ads.php:590
238
- msgid "Ads"
239
- msgstr "Pubs"
240
-
241
- #: ../admin/class-advanced-ads-admin.php:293 ../public/class-advanced-ads.php:593
242
- msgid "Add New Ad"
243
- msgstr "Ajouter une nouvelle pub"
244
-
245
- #: ../admin/class-advanced-ads-admin.php:293 ../public/class-advanced-ads.php:592
246
- #: ../public/class-advanced-ads.php:596
247
- msgid "New Ad"
248
- msgstr "Nouvelle pub"
249
-
250
- #: ../admin/class-advanced-ads-admin.php:298 ../admin/includes/class-shortcode-
251
- #: creator.php:84 ../admin/views/placements.php:74 ../admin/views/placements.php:
252
- #: 178 ../classes/widget.php:82
253
- msgid "Ad Groups"
254
- msgstr "Groupes de pubs"
255
-
256
- #: ../admin/class-advanced-ads-admin.php:298 ../public/class-advanced-ads.php:563
257
- msgid "Groups"
258
- msgstr "Groupes"
259
-
260
- #: ../admin/class-advanced-ads-admin.php:303
261
- msgid "Ad Placements"
262
- msgstr "Emplacements de la pub"
263
-
264
- #: ../admin/class-advanced-ads-admin.php:303 ../admin/includes/class-shortcode-
265
- #: creator.php:91 ../admin/views/placements.php:18 ../classes/widget.php:75
266
- msgid "Placements"
267
- msgstr "Placements"
268
-
269
- #: ../admin/class-advanced-ads-admin.php:307
270
- msgid "Advanced Ads Settings"
271
- msgstr "Réglages d’Advanced Ads"
272
-
273
- #: ../admin/class-advanced-ads-admin.php:307 ../admin/class-advanced-ads-admin.
274
- #: php:555 ../admin/views/debug.php:10
275
- msgid "Settings"
276
- msgstr "Réglages"
277
-
278
- #: ../admin/class-advanced-ads-admin.php:310
279
- msgid "Advanced Ads Debugging"
280
- msgstr "Débogage Advanced Ads"
281
-
282
- #: ../admin/class-advanced-ads-admin.php:310
283
- msgid "Debug"
284
- msgstr "Débogage"
285
-
286
- #: ../admin/class-advanced-ads-admin.php:314 ../admin/class-advanced-ads-admin.
287
- #: php:314
288
- msgid "Advanced Ads Intro"
289
- msgstr "Introduction à Advanced Ads"
290
-
291
- #: ../admin/class-advanced-ads-admin.php:318 ../admin/class-advanced-ads-admin.
292
- #: php:318 ../admin/class-advanced-ads-admin.php:2110
293
- msgid "Support"
294
- msgstr "Support"
295
-
296
- #: ../admin/class-advanced-ads-admin.php:430
297
- msgid "Please enter a message"
298
- msgstr "Veuillez saisir un message"
299
-
300
- #: ../admin/class-advanced-ads-admin.php:440
301
- #, php-format
302
- msgid "Email could NOT be sent. Please contact us directly at %s."
303
- msgstr "L’email n’a pas pu être envoyé. Veuillez nous contacter directement à %s."
304
-
305
- #: ../admin/class-advanced-ads-admin.php:443
306
- msgid "Please enter a valid email address"
307
- msgstr "Veuillez entrer un Email valide"
308
-
309
- #: ../admin/class-advanced-ads-admin.php:469 ../admin/class-advanced-ads-admin.
310
- #: php:496
311
- msgid "Sorry, you are not allowed to access this feature."
312
- msgstr "Désolé, vous n’êtes pas autorisé à accéder à cette fonctionnalité."
313
-
314
- #: ../admin/class-advanced-ads-admin.php:482
315
- msgid ""
316
- "You attempted to edit an ad group that doesn&#8217;t exist. Perhaps it was "
317
- "deleted?"
318
- msgstr ""
319
- "Vous avez essayé de modifier un groupe de pubs qui n’existe pas. Peut-être a-"
320
- "t-il été supprimé?"
321
-
322
- #: ../admin/class-advanced-ads-admin.php:650
323
- msgid "Ad Type"
324
- msgstr "Type de pub"
325
-
326
- #: ../admin/class-advanced-ads-admin.php:656
327
- msgid "Ad Parameters"
328
- msgstr "Paramètres de pub"
329
-
330
- #: ../admin/class-advanced-ads-admin.php:659
331
- msgid "Layout / Output"
332
- msgstr "Mise en page / sortie"
333
-
334
- #: ../admin/class-advanced-ads-admin.php:662
335
- msgid "Display Conditions"
336
- msgstr "Conditions d’affichage"
337
-
338
- #: ../admin/class-advanced-ads-admin.php:665
339
- msgid "Visitor Conditions"
340
- msgstr "Conditions de visiteur"
341
-
342
- #: ../admin/class-advanced-ads-admin.php:736 ../admin/class-advanced-ads-admin.
343
- #: php:747 ../admin/class-advanced-ads-admin.php:752 ../admin/views/ad-output-
344
- #: metabox.php:50
345
- msgid "Manual"
346
- msgstr "Manuel"
347
-
348
- #: ../admin/class-advanced-ads-admin.php:924 ../admin/class-advanced-ads-admin.
349
- #: php:925
350
- msgid "Ad updated."
351
- msgstr "Pub mise à jour."
352
-
353
- #. translators: %s: date and time of the revision
354
- #: ../admin/class-advanced-ads-admin.php:927
355
- #, php-format
356
- msgid "Ad restored to revision from %s"
357
- msgstr "Pub restaurée à partir de la révision du %s"
358
-
359
- #: ../admin/class-advanced-ads-admin.php:928
360
- msgid "Ad published."
361
- msgstr "Pub publiée."
362
-
363
- #: ../admin/class-advanced-ads-admin.php:929
364
- msgid "Ad saved."
365
- msgstr "Pub enregistrée."
366
-
367
- #: ../admin/class-advanced-ads-admin.php:930
368
- msgid "Ad submitted."
369
- msgstr "Pub soumise."
370
-
371
- #: ../admin/class-advanced-ads-admin.php:932
372
- #, php-format
373
- msgid "Ad scheduled for: <strong>%1$s</strong>."
374
- msgstr "Pub programmée pour: <strong>%1$s.</strong>"
375
-
376
- #. translators: Publish box date format, see http://php.net/date
377
- #: ../admin/class-advanced-ads-admin.php:934
378
- msgid "M j, Y @ G:i"
379
- msgstr "M j, Y @ G:i"
380
-
381
- #: ../admin/class-advanced-ads-admin.php:936
382
- msgid "Ad draft updated."
383
- msgstr "Brouillon de la pub mis à jour."
384
-
385
- #: ../admin/class-advanced-ads-admin.php:955
386
- #, php-format
387
- msgid "%s ad updated."
388
- msgid_plural "%s ads updated."
389
- msgstr[0] "la pub %s à été mise à jour."
390
- msgstr[1] "les pubs %s ont été mises à jour."
391
-
392
- #: ../admin/class-advanced-ads-admin.php:956
393
- #, php-format
394
- msgid "%s ad not updated, somebody is editing it."
395
- msgid_plural "%s ads not updated, somebody is editing them."
396
- msgstr[0] ""
397
- "La pub %s n’a pas été mise à jour, quelqu’un d’autre est en train de la "
398
- "modifier."
399
- msgstr[1] ""
400
- "Les pubs %s n’ont pas été mises à jour, quelqu’un d’autre est en train de "
401
- "les modifier."
402
-
403
- #: ../admin/class-advanced-ads-admin.php:957
404
- #, php-format
405
- msgid "%s ad permanently deleted."
406
- msgid_plural "%s ads permanently deleted."
407
- msgstr[0] "La pub %s a été supprimée définitivement."
408
- msgstr[1] "Les pubs %s ont été supprimées définitivement."
409
-
410
- #: ../admin/class-advanced-ads-admin.php:958
411
- #, php-format
412
- msgid "%s ad moved to the Trash."
413
- msgid_plural "%s ads moved to the Trash."
414
- msgstr[0] "La pub %s a été déplacée dans la corbeille."
415
- msgstr[1] "Les pubs %s ont été déplacées dans la corbeille."
416
-
417
- #: ../admin/class-advanced-ads-admin.php:959
418
- #, php-format
419
- msgid "%s ad restored from the Trash."
420
- msgid_plural "%s ads restored from the Trash."
421
- msgstr[0] "La pub %s a été récupérée de la corbeille."
422
- msgstr[1] "Les pubs %s ont été récupérées de la corbeille."
423
-
424
- #: ../admin/class-advanced-ads-admin.php:994 ../admin/views/settings.php:12
425
- msgid "General"
426
- msgstr "Général"
427
-
428
- #: ../admin/class-advanced-ads-admin.php:1006 ../admin/class-advanced-ads-admin.
429
- #: php:1118
430
- msgid "Licenses"
431
- msgstr "Licences"
432
-
433
- #: ../admin/class-advanced-ads-admin.php:1017
434
- msgid "Disable ads"
435
- msgstr "Désactiver les pubs"
436
-
437
- #: ../admin/class-advanced-ads-admin.php:1025
438
- msgid "Hide ads for logged in users"
439
- msgstr "Cacher les pubs pour les utilisateurs connectés"
440
-
441
- #: ../admin/class-advanced-ads-admin.php:1033
442
- msgid "Use advanced JavaScript"
443
- msgstr "Utiliser du JavaScript avancé"
444
-
445
- #: ../admin/class-advanced-ads-admin.php:1041
446
- msgid "Unlimited ad injection"
447
- msgstr "Injection de pub illimitée"
448
-
449
- #: ../admin/class-advanced-ads-admin.php:1049
450
- msgid "Priority of content injection filter"
451
- msgstr "Filtre de priorité d’injection de contenu"
452
-
453
- #: ../admin/class-advanced-ads-admin.php:1057
454
- msgid "Hide ads from bots"
455
- msgstr "Cacher les publicités aux robots"
456
-
457
- #: ../admin/class-advanced-ads-admin.php:1065
458
- msgid "Disable notices"
459
- msgstr "Désactiver les avis"
460
-
461
- #: ../admin/class-advanced-ads-admin.php:1073
462
- msgid "ID prefix"
463
- msgstr "Préfixe ID"
464
-
465
- #: ../admin/class-advanced-ads-admin.php:1081
466
- msgid "Remove Widget ID"
467
- msgstr "Supprimer le Widget ID"
468
-
469
- #: ../admin/class-advanced-ads-admin.php:1089
470
- msgid "Allow editors to manage ads"
471
- msgstr "Permettre aux éditeurs de gérer des pubs"
472
-
473
- #: ../admin/class-advanced-ads-admin.php:1174
474
- msgid "(display to all)"
475
- msgstr "(afficher à tous)"
476
-
477
- #: ../admin/class-advanced-ads-admin.php:1175
478
- msgid "Subscriber"
479
- msgstr "Abonné"
480
-
481
- #: ../admin/class-advanced-ads-admin.php:1176
482
- msgid "Contributor"
483
- msgstr "Contributeur"
484
-
485
- #: ../admin/class-advanced-ads-admin.php:1177
486
- msgid "Author"
487
- msgstr "Auteur"
488
-
489
- #: ../admin/class-advanced-ads-admin.php:1178
490
- msgid "Editor"
491
- msgstr "Éditeur"
492
-
493
- #: ../admin/class-advanced-ads-admin.php:1179
494
- msgid "Admin"
495
- msgstr "Administrateur"
496
-
497
- #: ../admin/class-advanced-ads-admin.php:1187
498
- msgid "Choose the lowest role a user must have in order to not see any ads."
499
- msgstr ""
500
- "Choisissez le rôle le plus faible dont un utilisateur doit disposer afin de "
501
- "ne pas voir de pubs."
502
-
503
- #: ../admin/class-advanced-ads-admin.php:1201
504
- msgid ""
505
- "<strong>notice: </strong>the file is currently enabled by an add-on that "
506
- "needs it."
507
- msgstr ""
508
- "<strong>avis: </strong>le fichier est actuellement activé par un module "
509
- "complémentaire dont il a besoin."
510
-
511
- #: ../admin/class-advanced-ads-admin.php:1204
512
- #, php-format
513
- msgid ""
514
- "Enable advanced JavaScript functions (<a href=\"%s\" target=\"_blank\">here</a>)."
515
- " Some features and add-ons might override this setting if they need features "
516
- "from this file."
517
- msgstr ""
518
- "Activer les fonctions JavaScript avancées (<a href=\"%s\" "
519
- "target=\"_blank\">here</a>). Certaines fonctionnalités et modules "
520
- "complémentaires peuvent remplacer ce paramètre si elles ont besoin des "
521
- "fonctionnalités de ce fichier."
522
-
523
- #: ../admin/class-advanced-ads-admin.php:1217
524
- msgid ""
525
- "Some plugins and themes trigger ad injection where it shouldn’t happen. "
526
- "Therefore, Advanced Ads ignores injected placements on non-singular pages "
527
- "and outside the loop. However, this can cause problems with some themes. You "
528
- "can enable this option if you don’t see ads or want to enable ad injections "
529
- "on archive pages AT YOUR OWN RISK."
530
- msgstr ""
531
- "Certains plugins et thèmes place l’injection de la pub où il ne devrait pas. "
532
- "Par conséquent, Advanced Ads ignore les placements injecté sur des pages non "
533
- "singulière et en dehors de la boucle. Cependant, cela peut poser des "
534
- "problèmes avec certains thèmes. Vous pouvez activer cette option si vous ne "
535
- "voyez pas de pubs ou si vous désirez activer les injections de pub sur les "
536
- "pages d’archives ceci À VOS PROPRE RISQUES."
537
-
538
- #: ../admin/class-advanced-ads-admin.php:1233
539
- msgid ""
540
- "Please check your post content. A priority of 10 and below might cause "
541
- "issues (wpautop function might run twice)."
542
- msgstr ""
543
- "Veuillez vérifier le contenu de votre article. Une priorité de 10 et moins "
544
- "pourrait causer des problèmes (la fonction « wpautop » pourrait s’exécuter "
545
- "deux fois)."
546
-
547
- #: ../admin/class-advanced-ads-admin.php:1235
548
- msgid ""
549
- "Play with this value in order to change the priority of the injected ads "
550
- "compared to other auto injected elements in the post content."
551
- msgstr ""
552
- "Jouer avec cette valeur pour modifier la priorité des publicités injectées "
553
- "par rapport aux autres éléments automatiquement injecté dans le contenu de "
554
- "l’article."
555
-
556
- #: ../admin/class-advanced-ads-admin.php:1249
557
- #, php-format
558
- msgid ""
559
- "Hide ads from crawlers, bots and empty user agents. Also prevents counting "
560
- "impressions for bots when using the <a href=\"%s\" target=\"_blank\">Tracking "
561
- "Add-On</a>."
562
- msgstr ""
563
- "Cacher les pubs des moteurs de recherche, des robots et des agents "
564
- "utilisateurs vide. Empêche également le comptage des impressions pour les "
565
- "robots lorsque vous utilisez l’ <a href=\"%s\" target=\"_blank\">Tracking Add-"
566
- "On</a>."
567
-
568
- #: ../admin/class-advanced-ads-admin.php:1250
569
- msgid ""
570
- "Disabling this option only makes sense if your ads contain content you want "
571
- "to display to bots (like search engines) or your site is cached and bots "
572
- "could create a cached version without the ads."
573
- msgstr ""
574
- "La désactivation de cette option n’a de sens que si vos pubs contiennent un "
575
- "contenu à afficher aux robots (comme les moteurs de recherche) ou votre site "
576
- "est mis en cache et les robots pourraient créer une version mise en cache "
577
- "sans les publicités."
578
-
579
- #: ../admin/class-advanced-ads-admin.php:1263
580
- msgid ""
581
- "Disable internal notices like tips, tutorials, email newsletters and update "
582
- "notices. Disabling notices is recommended if you run multiple blogs with "
583
- "Advanced Ads already."
584
- msgstr ""
585
- "Désactiver les avis internes comme les conseils, les tutoriels, les "
586
- "newsletters et les avis de mise à jour. La désactivation des avis est "
587
- "recommandé si vous exécutez déjà plusieurs blogs (multi-sites) avec Advanced "
588
- "Ads."
589
-
590
- #: ../admin/class-advanced-ads-admin.php:1280
591
- msgid ""
592
- "Prefix of class or id attributes in the frontend. Change it if you don’t "
593
- "want <strong>ad blockers</strong> to mark these blocks as ads.<br/>You might "
594
- "need to <strong>rewrite css rules afterwards</strong>."
595
- msgstr ""
596
- "Préfixe de classe ou d’attributs d’Identifiant au niveau du Frontend. "
597
- "Changez-le si vous ne voulez pas que les <strong>bloqueurs de "
598
- "publicité</strong> marque ces blocs comme pubs.<br>Vous devrez peut-être "
599
- "<strong>réécrire les règles css par la suite</strong>."
600
-
601
- #: ../admin/class-advanced-ads-admin.php:1301
602
- msgid ""
603
- "Remove the ID attribute from widgets in order to not make them an easy "
604
- "target of ad blockers."
605
- msgstr ""
606
- "Supprimer l’attribut ID des widgets pour ne pas qu’ils soient une cible "
607
- "facile des bloqueurs de publicité."
608
-
609
- #: ../admin/class-advanced-ads-admin.php:1304
610
- msgid ""
611
- "If checked, the Advanced Ads Widget will not work with the fixed option of "
612
- "the <strong>Q2W3 Fixed Widget</strong> plugin."
613
- msgstr ""
614
- "Si cochée, l’Avanced Ads Widget ne fonctionnera pas avec l’option fixe du "
615
- "plugin <strong>Q2W3 Fixed Widget</strong> ."
616
-
617
- #: ../admin/class-advanced-ads-admin.php:1326
618
- msgid "Allow editors to also manage and publish ads."
619
- msgstr "Permettre aussi aux éditeurs de gérer et publier des pubs."
620
-
621
- #: ../admin/class-advanced-ads-admin.php:1327
622
- #, php-format
623
- msgid ""
624
- "You can assign different ad-related roles on a user basis with <a href=\"%s\" "
625
- "target=\"_blank\">Advanced Ads Pro</a>."
626
- msgstr ""
627
- "Vous pouvez assigner différents rôles liés à la pub sur une base "
628
- "d’utilisateur avec <a href=\"%s\" target=\"_blank\">Advanced Ads Pro</a>."
629
-
630
- #: ../admin/class-advanced-ads-admin.php:1404
631
- msgid "Ad Details"
632
- msgstr "Détails de la pub"
633
-
634
- #: ../admin/class-advanced-ads-admin.php:1405
635
- msgid "Ad Planning"
636
- msgstr "Planification de la pub"
637
-
638
- #: ../admin/class-advanced-ads-admin.php:1540
639
- msgid "Ad Settings"
640
- msgstr "Paramètres de la pub"
641
-
642
- #: ../admin/class-advanced-ads-admin.php:1619 ../admin/views/overview.php:23
643
- msgid "Ads Dashboard"
644
- msgstr "Tableau de bord des pubs"
645
-
646
- #: ../admin/class-advanced-ads-admin.php:1631
647
- msgid "From the ad optimization universe"
648
- msgstr "De l’univers d’optimisation de pub"
649
-
650
- #: ../admin/class-advanced-ads-admin.php:1640
651
- msgid "Advanced Ads Tutorials"
652
- msgstr "Tutoriels Advanced Ads"
653
-
654
- #: ../admin/class-advanced-ads-admin.php:1651
655
- #, php-format
656
- msgid "%d ads – <a href=\"%s\">manage</a> - <a href=\"%s\">new</a>"
657
- msgstr "%d pubs – <a href=\"%s\">gérer</a> – <a href=\"%s\">nouveau</a>"
658
-
659
- #: ../admin/class-advanced-ads-admin.php:1662
660
- msgid "plugin manual and homepage"
661
- msgstr "Page d’accueil et manuel du plugin"
662
-
663
- #: ../admin/class-advanced-ads-admin.php:1669
664
- msgid "Get the tutorial via email"
665
- msgstr "Téléchargez le tutoriel par e-mail"
666
-
667
- #: ../admin/class-advanced-ads-admin.php:1676
668
- msgid "Get AdSense tips via email"
669
- msgstr "Recevez des conseils de Adsense par e-mail"
670
-
671
- #: ../admin/class-advanced-ads-admin.php:1766
672
- #, php-format
673
- msgid "time of %s"
674
- msgstr "temps de %s"
675
-
676
- #: ../admin/class-advanced-ads-admin.php:1802
677
- msgid "Error while trying to register the license. Please contact support."
678
- msgstr "Erreur en essayant d’enregistrer la licence. Veuillez contacter le support."
679
-
680
- #: ../admin/class-advanced-ads-admin.php:1807 ../admin/views/setting-license.php:37
681
- msgid "Please enter a valid license key"
682
- msgstr "Veuillez entrer une clé de licence valide"
683
-
684
- #: ../admin/class-advanced-ads-admin.php:1845
685
- msgid "This is the bundle license key."
686
- msgstr "Il s’agit de la clé de licence du package (bundle)."
687
-
688
- #: ../admin/class-advanced-ads-admin.php:1846
689
- msgid "This is not the correct key for this add-on."
690
- msgstr "Ce n’est pas la clé correcte pour ce module."
691
-
692
- #: ../admin/class-advanced-ads-admin.php:1856
693
- #, php-format
694
- msgid "License is invalid. Reason: %s"
695
- msgstr "Licence n’est pas valide. Raison: %s"
696
-
697
- #: ../admin/class-advanced-ads-admin.php:1910
698
- msgid "Error while trying to disable the license. Please contact support."
699
- msgstr "Erreur en essayant de désactiver la licence. Veuillez contacter le support."
700
-
701
- #: ../admin/class-advanced-ads-admin.php:2114
702
- msgid "Add-Ons"
703
- msgstr "Extensions (Add-Ons)"
704
-
705
- #: ../admin/includes/class-ad-groups-list.php:156
706
- msgid "Ad weight"
707
- msgstr "Poids de la pub"
708
-
709
- #: ../admin/includes/class-ad-groups-list.php:164 ../admin/views/ad-list-timing-
710
- #: column.php:4
711
- #, php-format
712
- msgid "starts %s"
713
- msgstr "commence le %s"
714
-
715
- #: ../admin/includes/class-ad-groups-list.php:183 ../admin/views/ad-list-timing-
716
- #: column.php:21
717
- #, php-format
718
- msgid "expires %s"
719
- msgstr "Expire le %s"
720
-
721
- #: ../admin/includes/class-ad-groups-list.php:185 ../admin/views/ad-list-timing-
722
- #: column.php:23
723
- #, php-format
724
- msgid "<strong>expired</strong> %s"
725
- msgstr "<strong>expiré</strong> %s"
726
-
727
- #: ../admin/includes/class-ad-groups-list.php:198
728
- msgid "all published ads are displayed"
729
- msgstr "toutes les pubs publiées sont affichées"
730
-
731
- #: ../admin/includes/class-ad-groups-list.php:200
732
- #, php-format
733
- msgid "up to %d ads displayed"
734
- msgstr "jusqu’à %d pubs affichées"
735
-
736
- #: ../admin/includes/class-ad-groups-list.php:203 ../admin/views/ad-group-list-
737
- #: form-row.php:37
738
- msgid "No ads assigned"
739
- msgstr "Aucune pub assignée"
740
-
741
- #: ../admin/includes/class-ad-groups-list.php:251
742
- msgid "Random ads"
743
- msgstr "Pubs aléatoires"
744
-
745
- #: ../admin/includes/class-ad-groups-list.php:252
746
- msgid "Display random ads based on ad weight"
747
- msgstr "Afficher des pubs aléatoirement selon le poids de la pub"
748
-
749
- #: ../admin/includes/class-ad-groups-list.php:255
750
- msgid "Ordered ads"
751
- msgstr "Pubs ordonnées"
752
-
753
- #: ../admin/includes/class-ad-groups-list.php:256
754
- msgid "Display ads with the highest ad weight first"
755
- msgstr "Afficher les pubs avec le poids le plus élevé tout d’abord"
756
-
757
- #: ../admin/includes/class-ad-groups-list.php:275 ../public/class-advanced-ads.
758
- #: php:594
759
- msgid "Edit"
760
- msgstr "Éditer"
761
-
762
- #: ../admin/includes/class-ad-groups-list.php:276
763
- msgid "Usage"
764
- msgstr "Utilisation"
765
-
766
- #: ../admin/includes/class-ad-groups-list.php:285
767
- msgid "Delete"
768
- msgstr "Supprimer"
769
-
770
- #: ../admin/includes/class-ad-groups-list.php:306
771
- msgid "Invalid Ad Group"
772
- msgstr "Groupe de pubs invalide."
773
-
774
- #: ../admin/includes/class-ad-groups-list.php:311
775
- msgid "You don’t have permission to change the ad groups"
776
- msgstr "Vous n’avez pas l’autorisation de modifier les groupes de pubs"
777
-
778
- #: ../admin/includes/class-notices.php:406
779
- #, php-format
780
- msgid ""
781
- "You don’t seem to have an email address. Please use <a href=\"%s\" "
782
- "target=\"_blank\">this form</a> to sign up."
783
- msgstr ""
784
- "Vous ne semblez pas avoir une adresse e-mail. Veuillez utiliser <a href=\"%s\" "
785
- "target=\"_blank\">ce formulaire</a> pour vous inscrire."
786
-
787
- #: ../admin/includes/class-notices.php:424
788
- msgid "How embarrassing. The email server seems to be down. Please try again later."
789
- msgstr ""
790
- "Quelle honte. Le serveur de messagerie semble être à l’arrêt. Veuillez "
791
- "réessayer ultérieurement."
792
-
793
- #: ../admin/includes/class-notices.php:429
794
- #, php-format
795
- msgid ""
796
- "Please check your email (%s) for the confirmation message. If you didn’t "
797
- "receive one or want to use another email address then please use <a "
798
- "href=\"%s\" target=\"_blank\">this form</a> to sign up."
799
- msgstr ""
800
- "Veuillez vérifier votre client mail (%s) pour le message de confirmation. Si "
801
- "vous n’avez reçu d’email ou voulez utiliser une autre adresse e-mail "
802
- "veuillez utiliser <a href=\"%s\" target=\"_blank\">ce formulaire</a> pour vous "
803
- "inscrire."
804
-
805
- #: ../admin/includes/class-overview-widgets.php:45
806
- msgid "Tips and Tutorials"
807
- msgstr "Tutoriels et astuces"
808
-
809
- #: ../admin/includes/class-overview-widgets.php:47
810
- msgid "Setup and Optimization Help"
811
- msgstr "Aide pour la configuration et l’optimisation"
812
-
813
- #: ../admin/includes/class-overview-widgets.php:49
814
- msgid "Manual and Support"
815
- msgstr "Manuel et Support"
816
-
817
- #: ../admin/includes/class-overview-widgets.php:53
818
- msgid "Advanced Ads Pro"
819
- msgstr "Advanced Ads Pro"
820
-
821
- #: ../admin/includes/class-overview-widgets.php:55
822
- msgid "Tracking and Stats"
823
- msgstr "Suivi et statistiques"
824
-
825
- #: ../admin/includes/class-overview-widgets.php:57
826
- msgid "Responsive and Mobile ads"
827
- msgstr "Pubs responsives et pour Mobile"
828
-
829
- #: ../admin/includes/class-overview-widgets.php:59
830
- msgid "Geo Targeting"
831
- msgstr "Géociblage"
832
-
833
- #: ../admin/includes/class-overview-widgets.php:61
834
- msgid "Sticky ads"
835
- msgstr "Sticky ads"
836
-
837
- #: ../admin/includes/class-overview-widgets.php:63
838
- msgid "PopUps and Layers"
839
- msgstr "PopUps and Layers"
840
-
841
- #: ../admin/includes/class-overview-widgets.php:65
842
- msgid "Ad Slider"
843
- msgstr "Ad Slider"
844
-
845
- #: ../admin/includes/class-overview-widgets.php:83
846
- msgid "Get 2 <strong>free add-ons</strong> for joining the newsletter."
847
- msgstr ""
848
- "Obtenez 2 <strong>Add-ons gratuits</strong> en vous inscrivant à la lettre "
849
- "d’information."
850
-
851
- #: ../admin/includes/class-overview-widgets.php:84
852
- msgid "Join now"
853
- msgstr "Inscrivez-vous maintenant"
854
-
855
- #: ../admin/includes/class-overview-widgets.php:91
856
- msgid ""
857
- "Learn more about how and <strong>how much you can earn with AdSense</strong> "
858
- "and Advanced Ads from the dedicated newsletter group."
859
- msgstr ""
860
- "En savoir plus sur comment et <strong>combien vous pouvez gagner avec "
861
- "AdSense</strong> et Advanced Ads via la newsletter du groupe dédié."
862
-
863
- #: ../admin/includes/class-overview-widgets.php:92 ../admin/includes/notices.php:
864
- #: 35 ../admin/views/intro.php:73 ../admin/views/notices/inline.php:3 ..
865
- #: admin/views/notices/subscribe.php:3
866
- msgid "Subscribe me now"
867
- msgstr "Inscrivez-moi maintenant"
868
-
869
- #: ../admin/includes/class-overview-widgets.php:99
870
- msgid "Get the first steps and more tutorials to your inbox."
871
- msgstr ""
872
- "Recevez les premières étapes et plus de tutoriels dans votre boîte de "
873
- "réception."
874
-
875
- #: ../admin/includes/class-overview-widgets.php:100
876
- msgid "Send it now"
877
- msgstr "Envoyer maintenant"
878
-
879
- #: ../admin/includes/class-overview-widgets.php:123 ../admin/views/intro.php:78
880
- msgid "Create your first ad"
881
- msgstr "Créez votre première pub"
882
-
883
- #: ../admin/includes/class-overview-widgets.php:126
884
- msgid ""
885
- "Ad Groups contain ads and are currently used to rotate multiple ads on a "
886
- "single spot."
887
- msgstr ""
888
- "Groupes de pubs contiennent des pubs et sont utilisées pour faire tourner "
889
- "plusieurs pubs sur un seul point."
890
-
891
- #: ../admin/includes/class-overview-widgets.php:128
892
- msgid "Create your first group"
893
- msgstr "Créez votre premier groupe"
894
-
895
- #: ../admin/includes/class-overview-widgets.php:131
896
- msgid "Ad Placements are the best way to manage where to display ads and groups."
897
- msgstr ""
898
- "Les placements de pubs sont la meilleure façon de gérer où afficher des pubs "
899
- "et des groupes."
900
-
901
- #: ../admin/includes/class-overview-widgets.php:133
902
- msgid "Create your first placement"
903
- msgstr "Créez votre premier placement"
904
-
905
- #: ../admin/includes/class-overview-widgets.php:138
906
- msgid "Next steps"
907
- msgstr "Prochaines étapes"
908
-
909
- #: ../admin/includes/class-overview-widgets.php:150
910
- #, php-format
911
- msgid "<a href=\"%s\" target=\"_blank\">Manual</a>"
912
- msgstr "<a href=\"%s\" target=\"_blank\">Manuel</a>"
913
-
914
- #: ../admin/includes/class-overview-widgets.php:151
915
- #, php-format
916
- msgid "<a href=\"%s\" target=\"_blank\">FAQ and Support</a>"
917
- msgstr "<a href=\"%s\" target=\"_blank\">FAQ et Support</a>"
918
-
919
- #: ../admin/includes/class-overview-widgets.php:152
920
- #, php-format
921
- msgid "Vote for a <a href=\"%s\" target=\"_blank\">feature</a>"
922
- msgstr "Votez pour une <a href=\"%s\" target=\"_blank\">fonctionnalité</a>"
923
-
924
- #: ../admin/includes/class-overview-widgets.php:153
925
- #, php-format
926
- msgid ""
927
- "Thank the developer with a &#9733;&#9733;&#9733;&#9733;&#9733; review on <a "
928
- "href=\"%s\" target=\"_blank\">wordpress.org</a>"
929
- msgstr ""
930
- "Remerciez le développeur avec un avis &#9733;&#9733;&#9733;&#9733;&#9733; "
931
- "sur <a href=\"%s\" target=\"_blank\">wordpress.org</a>"
932
-
933
- #: ../admin/includes/class-overview-widgets.php:162
934
- msgid ""
935
- "Need help to set up and optimize your ads? Need custom coding on your site? "
936
- "Ask me for a quote."
937
- msgstr ""
938
- "Besoin d’aide pour configurer et optimiser vos pubs ? Besoin d’un codage "
939
- "personnalisé sur votre site ? Demandez-moi un devis."
940
-
941
- #: ../admin/includes/class-overview-widgets.php:163
942
- #, php-format
943
- msgid "Help with ads on %s"
944
- msgstr "Aide sur les pubs activée %s"
945
-
946
- #: ../admin/includes/class-overview-widgets.php:164
947
- msgid "Get an offer"
948
- msgstr "Obtenir une offre"
949
-
950
- #: ../admin/includes/class-overview-widgets.php:172
951
- msgid "Ad management for advanced websites."
952
- msgstr "Gestion de pubs pour des sites Web avancés."
953
-
954
- #: ../admin/includes/class-overview-widgets.php:173
955
- msgid "Cache-busting"
956
- msgstr "Suppression du cache"
957
-
958
- #: ../admin/includes/class-overview-widgets.php:174
959
- msgid "Advanced visitor conditions"
960
- msgstr "Conditions de visiteur avancées"
961
-
962
- #: ../admin/includes/class-overview-widgets.php:175
963
- msgid "Flash ads with fallback"
964
- msgstr "Pubs en Flash avec alternative"
965
-
966
- #: ../admin/includes/class-overview-widgets.php:177
967
- msgid "Get Pro"
968
- msgstr "Obtenir la version Pro"
969
-
970
- #: ../admin/includes/class-overview-widgets.php:185
971
- msgid "Track the impressions of and clicks on your ads."
972
- msgstr "Suivre les impressions et les clics sur vos pubs."
973
-
974
- #: ../admin/includes/class-overview-widgets.php:186
975
- msgid "2 methods to count impressions"
976
- msgstr "2 méthodes pour compter les impressions"
977
-
978
- #: ../admin/includes/class-overview-widgets.php:187
979
- msgid "beautiful stats for all or single ads"
980
- msgstr "belles statistiques pour une ou toutes les pubs"
981
-
982
- #: ../admin/includes/class-overview-widgets.php:188
983
- msgid "group stats by day, week or month"
984
- msgstr "grouper les statistiques par jour, semaine ou mois"
985
-
986
- #: ../admin/includes/class-overview-widgets.php:190
987
- msgid "Get the Tracking add-on"
988
- msgstr "Obtenir le module de statistiques « Tracking add-on »"
989
-
990
- #: ../admin/includes/class-overview-widgets.php:198
991
- msgid "Display ads based on the size of your visitor’s browser or device."
992
- msgstr ""
993
- "Afficher des pubs basées sur la taille du navigateur ou le périphérique de "
994
- "votre visiteur."
995
-
996
- #: ../admin/includes/class-overview-widgets.php:199
997
- msgid "set a range (from … to …) pixels for the browser size"
998
- msgstr "définir une plage (de… à…) pixels pour la taille du navigateur"
999
-
1000
- #: ../admin/includes/class-overview-widgets.php:200
1001
- msgid "set custom sizes for AdSense responsive ads"
1002
- msgstr "définir des formats personnalisés pour les pubs responsives AdSense"
1003
-
1004
- #: ../admin/includes/class-overview-widgets.php:201
1005
- msgid "list all ads by their responsive settings"
1006
- msgstr "lister toutes les pubs par leurs paramètres responsifs"
1007
-
1008
- #: ../admin/includes/class-overview-widgets.php:203
1009
- msgid "Get the Responsive add-on"
1010
- msgstr "Obtenir le module « Responsive add-on »"
1011
-
1012
- #: ../admin/includes/class-overview-widgets.php:211
1013
- msgid "Target visitors by their geo location."
1014
- msgstr "Cibler les visiteurs par leur géolocalisation."
1015
-
1016
- #: ../admin/includes/class-overview-widgets.php:213
1017
- msgid "Get the Geo Targeting add-on"
1018
- msgstr "Obtenir le module de ciblage géolocalisé « Geo Targeting add-on »"
1019
-
1020
- #: ../admin/includes/class-overview-widgets.php:221
1021
- msgid ""
1022
- "Fix ads to the browser while users are scrolling and create best performing "
1023
- "anchor ads."
1024
- msgstr ""
1025
- "Fixer les pubs sur le navigateur pendant que les utilisateurs font défiler "
1026
- "la page et créer des publicités à ancrage plus performants."
1027
-
1028
- #: ../admin/includes/class-overview-widgets.php:222
1029
- msgid "position ads that don’t scroll with the screen"
1030
- msgstr "positionner des pubs qui ne défilent à l’écran"
1031
-
1032
- #: ../admin/includes/class-overview-widgets.php:223
1033
- msgid "build anchor ads not only on mobile devices"
1034
- msgstr "construire des pubs à ancrage pas seulement sur les appareils mobiles"
1035
-
1036
- #: ../admin/includes/class-overview-widgets.php:225
1037
- msgid "Get the Sticky add-on"
1038
- msgstr "Obtenir le module « Sticky add-on »"
1039
-
1040
- #: ../admin/includes/class-overview-widgets.php:233
1041
- msgid "Display content and ads in layers and popups on custom events."
1042
- msgstr ""
1043
- "Afficher le contenu et les pubs dans des couches et des fenêtres pop-up lors "
1044
- "des événements personnalisés."
1045
-
1046
- #: ../admin/includes/class-overview-widgets.php:234
1047
- msgid "display a popup after a user interaction like scrolling"
1048
- msgstr "afficher une popup après une action de l’utilisateur comme le défilement"
1049
-
1050
- #: ../admin/includes/class-overview-widgets.php:235
1051
- msgid "optional background overlay"
1052
- msgstr "option de recouvrement d’arrière plan"
1053
-
1054
- #: ../admin/includes/class-overview-widgets.php:236
1055
- msgid "allow users to close the popup"
1056
- msgstr "permettre aux utilisateurs de fermer les popup"
1057
-
1058
- #: ../admin/includes/class-overview-widgets.php:238
1059
- msgid "Get the PopUp and Layer add-on"
1060
- msgstr "Obtenir le module « PopUp and Layer add-on »"
1061
-
1062
- #: ../admin/includes/class-overview-widgets.php:246
1063
- msgid "Create a beautiful and simple slider from your ads."
1064
- msgstr "Créer un simple et beau diaporama avec vos pubs."
1065
-
1066
- #: ../admin/includes/class-overview-widgets.php:248
1067
- msgid "Get the Slider add-on"
1068
- msgstr "Obtenir le module « Slider add-on »"
1069
-
1070
- #: ../admin/includes/class-shortcode-creator.php:75 ../classes/widget.php:73
1071
- msgid "--empty--"
1072
- msgstr "--vide--"
1073
-
1074
- #: ../admin/includes/notices.php:14
1075
- #, php-format
1076
- msgid ""
1077
- "Advanced Ads successfully installed. Take a look at the <a href=\"%s\">First "
1078
- "Steps</a>."
1079
- msgstr ""
1080
- "Advanced Ads installé avec succès. Jetez un oeil sur les <a "
1081
- "href=\"%s\">Premières étapes</a>."
1082
-
1083
- #: ../admin/includes/notices.php:20
1084
- msgid ""
1085
- "Thank you for activating <strong>Advanced Ads</strong>. Would you like to "
1086
- "receive the first steps via email?"
1087
- msgstr ""
1088
- "Merci d’activer <strong>Advanced Ads</strong>. Souhaitez-vous recevoir les "
1089
- "premières étapes par e-mail?"
1090
-
1091
- #: ../admin/includes/notices.php:21
1092
- msgid "Yes, send it"
1093
- msgstr "Oui, envoyez"
1094
-
1095
- #: ../admin/includes/notices.php:27
1096
- msgid ""
1097
- "Thank you for using <strong>Advanced Ads</strong>. Stay informed and receive "
1098
- "<strong>2 free add-ons</strong> for joining the newsletter."
1099
- msgstr ""
1100
- "Merci d’utiliser <strong>Advanced Ads</strong>. Restez informé et recevez "
1101
- "<strong>2 Add-ons gratuits</strong> en vous inscrivant à la lettre "
1102
- "d’information."
1103
-
1104
- #: ../admin/includes/notices.php:28
1105
- msgid "Add me now"
1106
- msgstr "Ajouter moi maintenant"
1107
-
1108
- #: ../admin/includes/notices.php:34
1109
- msgid ""
1110
- "Learn more about how and <strong>how much you can earn with AdSense</strong> "
1111
- "and Advanced Ads from my dedicated newsletter."
1112
- msgstr ""
1113
- "En savoir plus sur comment et <strong>combien vous pouvez gagner avec "
1114
- "AdSense</strong> et Advanced Ads via la newsletter dédiée."
1115
-
1116
- #: ../admin/includes/notices.php:61
1117
- msgid ""
1118
- "One or more license keys for <strong>Advanced Ads add-ons are invalid or "
1119
- "missing</strong>."
1120
- msgstr ""
1121
- "Une ou plusieurs clés de licence pour des <strong>Advanced Ads add-ons sont "
1122
- "manquant ou incorrect</strong>."
1123
-
1124
- #: ../admin/includes/notices.php:61
1125
- #, php-format
1126
- msgid "Please add valid license keys <a href=\"%s\">here</a>."
1127
- msgstr "S’il vous plaît ajoutez des clés de licences valides <a href=\"%s\">ici</a>."
1128
-
1129
- #: ../admin/includes/notices.php:67
1130
- #, php-format
1131
- msgid ""
1132
- "One or more licenses for your <strong>Advanced Ads add-ons are expiring "
1133
- "soon</strong>. Don’t risk to lose support and updates and renew your license "
1134
- "before it expires with a significant discount on <a href=\"%s\" "
1135
- "target=\"_blank\">the add-on page</a>."
1136
- msgstr ""
1137
- "Une ou plusieurs licences pour vos <strong>Advanced Ads Add-ons arrivent "
1138
- "bientôt à expiration</strong>. Ne risquez pas de perdre le support et mises "
1139
- "à jour et renouveler votre licence avant sa date d’expiration avec un rabais "
1140
- "significatif sur <a href=\"%s\" target=\"_blank\">la page Add-on</a>."
1141
-
1142
- #: ../admin/includes/notices.php:73 ../admin/views/support.php:28
1143
- #, php-format
1144
- msgid ""
1145
- "<strong>Advanced Ads</strong> license(s) expired. Support and updates are "
1146
- "disabled. Please visit <a href=\"%s\"> the license page</a> for more "
1147
- "information."
1148
- msgstr ""
1149
- "Licence(s) <strong>Advanced Ads</strong> expiré(es). Le support et les mises "
1150
- "à jour sont désactivées. S’il vous plaît, visitez <a href=\"%s\">la page de "
1151
- "licence</a> pour plus d’informations."
1152
-
1153
- #: ../admin/includes/notices.php:79
1154
- #, php-format
1155
- msgid ""
1156
- "<img src=\"%3$s\" alt=\"Thomas\" width=\"80\" height=\"115\" class=\"advads-review-"
1157
- "image\"/>You are using <strong>Advanced Ads</strong> for some time now. Thank "
1158
- "you! If you need my help then please visit the <a href=\"%1$s\" "
1159
- "target=\"_blank\">Support page</a> to get free help.</p><h3>Thanks for your "
1160
- "Review</h3><p>If you share my passion and find Advanced Ads useful then "
1161
- "please <a href=\"%2$s\" target=\"_blank\">leave a 5-star review on wordpress."
1162
- "org</a>.</p><p><em>Thomas</em>"
1163
- msgstr ""
1164
- "<img src=\"%3$s\" alt=\"Thomas\" width=\"80\" height=\"115\" class=\"advads-review-"
1165
- "image\"/>Vous utilisez <strong>Advanced Ads</strong> depuis quelques temps "
1166
- "maintenant. Je vous en remercie! Si vous avez besoin d’aide, visitez <a "
1167
- "href=\"%1$s\" target=\"_blank\">la page de support</a> et obtenez une aide "
1168
- "gratuite.</p><h3>Merci pour votre avis</h3><p>Si vous partagez ma passion et "
1169
- "trouvez Advanced Ads utile, alors s’il vous plaît <a href=\"%2$s\" "
1170
- "target=\"_blank\">laissez un avis de 5 étoiles sur wordpress.org</a>."
1171
- "</p><p><em>Thomas</em>"
1172
-
1173
- #: ../admin/includes/notices.php:85
1174
- #, php-format
1175
- msgid ""
1176
- "Some assets were changed. Please <strong>rebuild the asset folder</strong> "
1177
- "in the <a href=\"%s\">Advanced Ads settings</a> to update the ad blocker "
1178
- "disguise."
1179
- msgstr ""
1180
- "Certains éléments (assets) ont été changés. S’il vous plaît ,"
1181
- "<strong>reconstruisez le dossier des éléments (assets)</strong> dans les <a "
1182
- "href=« %s »>Paramètres Advanced Ads</a> pour mettre à jour la dissimulation "
1183
- "vis-à-vis des bloqueurs de publicités."
1184
-
1185
- #: ../admin/includes/shortcode-creator-l10n.php:10
1186
- msgctxt "shortcode creator"
1187
- msgid "Add an ad"
1188
- msgstr "Ajouter une pub"
1189
-
1190
- #: ../admin/includes/shortcode-creator-l10n.php:11
1191
- msgctxt "shortcode creator"
1192
- msgid "Add shortcode"
1193
- msgstr "Ajouter un shortcode"
1194
-
1195
- #: ../admin/includes/shortcode-creator-l10n.php:12
1196
- msgctxt "shortcode creator"
1197
- msgid "Cancel"
1198
- msgstr "Annuler"
1199
-
1200
- #: ../admin/views/ad-display-metabox.php:6
1201
- msgid "Set Display Conditions to allow or hide the ad on specific pages."
1202
- msgstr ""
1203
- "Fixer les Conditions d’affichage afin d’autoriser ou de cacher la publicité "
1204
- "sur des pages spécifiques."
1205
-
1206
- #: ../admin/views/ad-display-metabox.php:8 ../admin/views/notices/jqueryui_error.
1207
- #: php:2
1208
- #, php-format
1209
- msgid ""
1210
- "There might be a problem with layouts and scripts in your dashboard. Please "
1211
- "check <a href=\"%s\" target=\"_blank\">this article to learn more</a>."
1212
- msgstr ""
1213
- "Il pourrait y avoir un problème avec les mises en page et les scripts dans "
1214
- "votre tableau de bord. Veuillez consulter <a href=\"%s\" target=\"_blank\">cet "
1215
- "article pour en savoir plus</a>."
1216
-
1217
- #: ../admin/views/ad-display-metabox.php:39
1218
- msgid "If you want to display the ad everywhere, don't do anything here. "
1219
- msgstr "Si vous souhaitez afficher la publicité partout, ne faites rien ici. "
1220
-
1221
- #: ../admin/views/ad-display-metabox.php:42 ../admin/views/ad-visitor-metabox.php:
1222
- #: 34
1223
- msgid "New condition"
1224
- msgstr "Nouvelle condition"
1225
-
1226
- #: ../admin/views/ad-display-metabox.php:45 ../admin/views/ad-visitor-metabox.php:
1227
- #: 37
1228
- msgid "-- choose a condition --"
1229
- msgstr "—Choisissez une condition—"
1230
-
1231
- #: ../admin/views/ad-display-metabox.php:50 ../admin/views/ad-visitor-metabox.php:
1232
- #: 42
1233
- msgid "add"
1234
- msgstr "ajouter"
1235
-
1236
- #: ../admin/views/ad-group-edit.php:14
1237
- msgid "You did not select an item for editing."
1238
- msgstr "Vous n’avez pas sélectionné un élément pour le modifier."
1239
-
1240
- #: ../admin/views/ad-group-edit.php:33
1241
- msgctxt "Taxonomy Name"
1242
- msgid "Name"
1243
- msgstr "Nom"
1244
-
1245
- #: ../admin/views/ad-group-edit.php:38
1246
- msgctxt "Taxonomy Slug"
1247
- msgid "Slug"
1248
- msgstr "Identifiant"
1249
-
1250
- #: ../admin/views/ad-group-edit.php:40
1251
- msgid "An id-like string with only letters in lower case, numbers, and hyphens."
1252
- msgstr ""
1253
- "Une chaîne de caractères (à l’image des identifiants) avec seulement des "
1254
- "lettres en minuscules, des chiffres et des traits d’Union."
1255
-
1256
- #: ../admin/views/ad-group-edit.php:45
1257
- msgctxt "Taxonomy Description"
1258
- msgid "Description"
1259
- msgstr "Description"
1260
-
1261
- #: ../admin/views/ad-group-edit.php:57
1262
- msgid "Create new Ad Group"
1263
- msgstr "Créer un nouveau groupe"
1264
-
1265
- #: ../admin/views/ad-group-edit.php:59
1266
- msgid "Update"
1267
- msgstr "Mettre à jour"
1268
-
1269
- #: ../admin/views/ad-group-list-form-row.php:3 ../admin/views/placements.php:24
1270
- msgid "Name"
1271
- msgstr "Nom"
1272
-
1273
- #: ../admin/views/ad-group-list-form-row.php:5
1274
- msgid "Description"
1275
- msgstr "Description"
1276
-
1277
- #: ../admin/views/ad-group-list-form-row.php:7 ../admin/views/placements.php:23 ..
1278
- #: modules/gadsense/admin/views/adsense-ad-parameters.php:48
1279
- msgid "Type"
1280
- msgstr "Type"
1281
-
1282
- #: ../admin/views/ad-group-list-form-row.php:16
1283
- msgid "Number of visible ads"
1284
- msgstr "Nombre de pubs visibles"
1285
-
1286
- #: ../admin/views/ad-group-list-form-row.php:22
1287
- msgctxt "option to display all ads in an ad groups"
1288
- msgid "all"
1289
- msgstr "toutes"
1290
-
1291
- #: ../admin/views/ad-group-list-form-row.php:25
1292
- msgid "Number of ads that are visible at the same time"
1293
- msgstr "Nombre de pubs qui sont visibles en même temps"
1294
-
1295
- #: ../admin/views/ad-group-list-form-row.php:31 ../public/class-advanced-ads.php:
1296
- #: 591
1297
- msgid "Ad"
1298
- msgstr "Pub"
1299
-
1300
- #: ../admin/views/ad-group-list-form-row.php:32
1301
- msgid "weight"
1302
- msgstr "poids"
1303
-
1304
- #: ../admin/views/ad-group-list-header.php:3 ../classes/ad_type_group.php:30
1305
- msgid "Ad Group"
1306
- msgstr "Groupe de pubs"
1307
-
1308
- #: ../admin/views/ad-group-list-header.php:4
1309
- msgid "Details"
1310
- msgstr " Détails"
1311
-
1312
- #: ../admin/views/ad-group-list-row.php:8 ../admin/views/ad-group.php:63 ..
1313
- #: admin/views/ad-info.php:3 ../admin/views/placements.php:59
1314
- msgid "shortcode"
1315
- msgstr "shortcode"
1316
-
1317
- #: ../admin/views/ad-group-list-row.php:11 ../admin/views/ad-group.php:66 ..
1318
- #: admin/views/placements.php:62
1319
- msgid "template"
1320
- msgstr "modèle"
1321
-
1322
- #: ../admin/views/ad-group-list-row.php:14
1323
- #, php-format
1324
- msgid "Learn more about using groups in the <a href=\"%s\" target=\"_blank\">manual</a>."
1325
- msgstr ""
1326
- "En savoir plus sur l’utilisation de groupes dans le <a href=\"%s\" "
1327
- "target=\"_blank\">Manuel</a>."
1328
-
1329
- #: ../admin/views/ad-group-list-row.php:19
1330
- #, php-format
1331
- msgid "Type: %s"
1332
- msgstr "Type: %s"
1333
-
1334
- #: ../admin/views/ad-group-list-row.php:20
1335
- #, php-format
1336
- msgid "ID: %s"
1337
- msgstr "ID: %s"
1338
-
1339
- #: ../admin/views/ad-group.php:18
1340
- msgid "Ad Groups successfully updated"
1341
- msgstr "Groupes de pubs mis à jour avec succès"
1342
-
1343
- #: ../admin/views/ad-group.php:46
1344
- #, php-format
1345
- msgid "Search results for &#8220;%s&#8221;"
1346
- msgstr "Résultats de recherche pour &#8220;%s&#8221;"
1347
-
1348
- #: ../admin/views/ad-group.php:52
1349
- msgid ""
1350
- "Ad Groups are a very flexible method to bundle ads. You can use them to "
1351
- "display random ads in the frontend or run split tests, but also just for "
1352
- "informational purposes. Not only can an Ad Groups have multiple ads, but an "
1353
- "ad can belong to multiple ad groups."
1354
- msgstr ""
1355
- "Les groupes de pubs sont une méthode très flexible pour regrouper les pubs. "
1356
- "Vous pouvez les utiliser pour afficher des pubs au hasard au niveau du "
1357
- "Frontend ou effectuer des tests de versions, mais aussi juste à titre "
1358
- "d’informatif. Non seulement un groupes de pubs peut avoir des pubs multiples,"
1359
- " mais une pub peut aussi appartenir à plusieurs groupes de pubs."
1360
-
1361
- #: ../admin/views/ad-group.php:60
1362
- msgid "How to display an Ad Group?"
1363
- msgstr "Comment afficher un groupe de pubs ?"
1364
-
1365
- #: ../admin/views/ad-group.php:62
1366
- #, php-format
1367
- msgid ""
1368
- "Examples on how to display an ad group? Find more help and examples in the "
1369
- "<a href=\"%s\" target=\"_blank\">manual</a>"
1370
- msgstr ""
1371
- "Exemples sur la façon d’afficher un groupe de pubs? Trouver plus d’aide et "
1372
- "des exemples dans le <a href=\"%s\" target=\"_blank\">Manuel</a>"
1373
-
1374
- #: ../admin/views/ad-group.php:64
1375
- msgid "To display an ad group with the ID 6 in content fields"
1376
- msgstr "Pour afficher un groupe de pubs avec l’ID 6 dans les champs de contenu"
1377
-
1378
- #: ../admin/views/ad-group.php:67
1379
- msgid "To display an ad group with the ID 6 in template files"
1380
- msgstr "Pour afficher un groupe de pubs avec l’ID 6 dans les fichiers modèles"
1381
-
1382
- #: ../admin/views/ad-group.php:87
1383
- msgid "Update Groups"
1384
- msgstr "Mettre à jour les Groupes"
1385
-
1386
- #: ../admin/views/ad-info-top.php:6 ../classes/ad_placements.php:46
1387
- msgid "Before Content"
1388
- msgstr "Avant le contenu"
1389
-
1390
- #: ../admin/views/ad-info-top.php:8 ../classes/ad_placements.php:51
1391
- msgid "After Content"
1392
- msgstr "Après le contenu"
1393
-
1394
- #: ../admin/views/ad-info-top.php:22
1395
- #, php-format
1396
- msgid ""
1397
- "Learn more about your choices to display an ad in the <a href=\"%s\" "
1398
- "target=\"_blank\">manual</a>."
1399
- msgstr ""
1400
- "En savoir plus sur les choix pour afficher une pub dans le <a href=\"%s\" "
1401
- "target=\"_blank\">Manuel</a>."
1402
-
1403
- #: ../admin/views/ad-info.php:2
1404
- #, php-format
1405
- msgid "Ad Id: %s"
1406
- msgstr "Id de la pub: %s"
1407
-
1408
- #: ../admin/views/ad-info.php:5
1409
- msgid "theme function"
1410
- msgstr "fonction du thème"
1411
-
1412
- #: ../admin/views/ad-info.php:7
1413
- #, php-format
1414
- msgid "Find more display options in the <a href=\"%s\" target=\"_blank\">manual</a>."
1415
- msgstr ""
1416
- "Trouver plus d’options d’affichage dans le <a href=\"%s\" "
1417
- "target=\"_blank\">Manuel</a>."
1418
-
1419
- #: ../admin/views/ad-info.php:12
1420
- msgid "click to change"
1421
- msgstr "Cliquez pour modifier"
1422
-
1423
- #: ../admin/views/ad-info.php:16
1424
- msgid "Add a description"
1425
- msgstr "Ajoutez une description"
1426
-
1427
- #: ../admin/views/ad-info.php:19
1428
- msgid "Internal description or your own notes about this ad."
1429
- msgstr "Description interne ou vos propres notes sur cette pub."
1430
-
1431
- #: ../admin/views/ad-list-filters.php:2
1432
- msgid "all ad types"
1433
- msgstr "tous les types de pub"
1434
-
1435
- #: ../admin/views/ad-list-filters.php:5
1436
- msgid "all ad sizes"
1437
- msgstr "toutes les tailles de pub"
1438
-
1439
- #: ../admin/views/ad-list-filters.php:8
1440
- msgid "all ad dates"
1441
- msgstr "toutes les dates de pub"
1442
-
1443
- #: ../admin/views/ad-list-filters.php:9
1444
- msgid "expired"
1445
- msgstr "expiré"
1446
-
1447
- #: ../admin/views/ad-list-filters.php:10
1448
- msgid "any expiry date"
1449
- msgstr "toute date d’expiration"
1450
-
1451
- #: ../admin/views/ad-list-filters.php:11
1452
- msgid "planned"
1453
- msgstr "planifiée(s)"
1454
-
1455
- #: ../admin/views/ad-list-filters.php:14
1456
- msgid "all ad groups"
1457
- msgstr "tous les groupes de pubs"
1458
-
1459
- #: ../admin/views/ad-main-metabox.php:3
1460
- msgid "No ad types defined"
1461
- msgstr "Aucun type de pub définies"
1462
-
1463
- #: ../admin/views/ad-output-metabox.php:1
1464
- msgid "Everything connected to the ads layout and output."
1465
- msgstr "Tout ce qui est lié à la l’agencement et à la sortie des pubs."
1466
-
1467
- #: ../admin/views/ad-output-metabox.php:4
1468
- msgid "Position"
1469
- msgstr "Position"
1470
-
1471
- #: ../admin/views/ad-output-metabox.php:6
1472
- msgid "- default -"
1473
- msgstr "- par défaut -"
1474
-
1475
- #: ../admin/views/ad-output-metabox.php:7 ../admin/views/placements.php:52
1476
- msgid "default"
1477
- msgstr "défaut"
1478
-
1479
- #: ../admin/views/ad-output-metabox.php:8
1480
- msgid "left"
1481
- msgstr "gauche"
1482
-
1483
- #: ../admin/views/ad-output-metabox.php:11
1484
- msgid "center"
1485
- msgstr "centre"
1486
-
1487
- #: ../admin/views/ad-output-metabox.php:14
1488
- msgid "right"
1489
- msgstr "droite"
1490
-
1491
- #: ../admin/views/ad-output-metabox.php:18
1492
- msgid ""
1493
- "Check this if you don't want the following elements to float around the ad. "
1494
- "(adds a clearfix)"
1495
- msgstr ""
1496
- "Cochez cette case si vous ne voulez pas que les éléments suivants flottent "
1497
- "autour de la pub. (ajoute un clearfix)"
1498
-
1499
- #: ../admin/views/ad-output-metabox.php:22
1500
- msgid "Margin"
1501
- msgstr "Marge"
1502
-
1503
- #: ../admin/views/ad-output-metabox.php:24
1504
- msgid "top:"
1505
- msgstr "haut:"
1506
-
1507
- #: ../admin/views/ad-output-metabox.php:26
1508
- msgid "right:"
1509
- msgstr "droite:"
1510
-
1511
- #: ../admin/views/ad-output-metabox.php:28
1512
- msgid "bottom:"
1513
- msgstr "bas:"
1514
-
1515
- #: ../admin/views/ad-output-metabox.php:30
1516
- msgid "left:"
1517
- msgstr "gauche:"
1518
-
1519
- #: ../admin/views/ad-output-metabox.php:32
1520
- msgid "tip: use this to add a margin around the ad"
1521
- msgstr "Astuce : utilisez cela pour ajouter une marge autour de la pub"
1522
-
1523
- #: ../admin/views/ad-output-metabox.php:35
1524
- msgid "container ID"
1525
- msgstr "ID de conteneur"
1526
-
1527
- #: ../admin/views/ad-output-metabox.php:38
1528
- msgid "Specify the id of the ad container. Leave blank for random or no id."
1529
- msgstr ""
1530
- "Spécifiez l’ID du conteneur de pub. Laissez vide pour aléatoire ou sans "
1531
- "identité."
1532
-
1533
- #: ../admin/views/ad-output-metabox.php:41
1534
- msgid "container classes"
1535
- msgstr "classes de conteneur"
1536
-
1537
- #: ../admin/views/ad-output-metabox.php:44
1538
- msgid ""
1539
- "Specify one or more classes for the container. Separate multiple classes "
1540
- "with a space"
1541
- msgstr ""
1542
- "Spécifier une ou plusieurs classe pour le conteneur. Séparez les classes "
1543
- "multiples par un espace"
1544
-
1545
- #: ../admin/views/ad-parameters-size.php:1
1546
- msgid "size"
1547
- msgstr "Taille"
1548
-
1549
- #: ../admin/views/ad-parameters-size.php:3
1550
- msgid "width"
1551
- msgstr "largeur"
1552
-
1553
- #: ../admin/views/ad-parameters-size.php:4
1554
- msgid "height"
1555
- msgstr "hauteur"
1556
-
1557
- #: ../admin/views/ad-submitbox-meta.php:6
1558
- msgid "Set expiry date"
1559
- msgstr "Date d’expiration"
1560
-
1561
- #: ../admin/views/ad-submitbox-meta.php:12
1562
- msgid "Month"
1563
- msgstr "Mois"
1564
-
1565
- #: ../admin/views/ad-submitbox-meta.php:16
1566
- #, php-format
1567
- msgctxt "1: month number (01, 02, etc.), 2: month abbreviation"
1568
- msgid "%1$s-%2$s"
1569
- msgstr "%1$s-%2$s"
1570
-
1571
- #: ../admin/views/ad-submitbox-meta.php:21
1572
- msgid "Day"
1573
- msgstr "Jour"
1574
-
1575
- #: ../admin/views/ad-submitbox-meta.php:22
1576
- msgid "Year"
1577
- msgstr "Année"
1578
-
1579
- #: ../admin/views/ad-submitbox-meta.php:23
1580
- msgid "Hour"
1581
- msgstr "Heure"
1582
-
1583
- #: ../admin/views/ad-submitbox-meta.php:24
1584
- msgid "Minute"
1585
- msgstr "Minute"
1586
-
1587
- #: ../admin/views/ad-submitbox-meta.php:29
1588
- #, php-format
1589
- msgctxt "order of expiry date fields 1: month, 2: day, 3: year, 4: hour, 5: minute"
1590
- msgid "%1$s %2$s, %3$s @ %4$s %5$s"
1591
- msgstr "%1$s %2$s, %3$s @ %4$s %5$s"
1592
-
1593
- #: ../admin/views/ad-visitor-metabox.php:4
1594
- msgid ""
1595
- "Display conditions that are based on the user. Use with caution on cached "
1596
- "websites."
1597
- msgstr ""
1598
- "Afficher les conditions qui sont basées sur l’utilisateur. Utilisez avec "
1599
- "prudence sur les sites Web mis en cache."
1600
-
1601
- #: ../admin/views/ad-visitor-metabox.php:28
1602
- msgid ""
1603
- "Visitor conditions limit the number of users who can see your ad. There is "
1604
- "no need to set visitor conditions if you want all users to see the ad."
1605
- msgstr ""
1606
- "Les conditions de visiteur limitent le nombre d’utilisateurs qui peuvent "
1607
- "voir votre pub. Il n’y a pas besoin de définir des conditions de visiteur si "
1608
- "vous souhaitez que tous les utilisateurs voient cette pub."
1609
-
1610
- #: ../admin/views/ad-visitor-metabox.php:30
1611
- #, php-format
1612
- msgid ""
1613
- "Check out cache-busting in <a href=\"%s\" target=\"_blank\">Advanced Ads Pro</a> "
1614
- "if dynamic features get cached."
1615
- msgstr ""
1616
- "Consultez la suppression du cache (cache-busting) dans <a href=\"%s\" "
1617
- "target=\"_blank\">Advanced Ads Pro</a> si les fonctionnalités dynamiques sont "
1618
- "mises en cache."
1619
-
1620
- #: ../admin/views/ad-visitor-metabox.php:47
1621
- #, php-format
1622
- msgid ""
1623
- "Define the exact browser width for which an ad should be visible using the "
1624
- "<a href=\"%s\" target=\"_blank\">Responsive add-on</a>."
1625
- msgstr ""
1626
- "Définir la largeur exacte de navigateur pour lequel une pub doit être "
1627
- "visible à l’aide du <a href=\"%s\" target=\"_blank\">Responsive add-on</a>."
1628
-
1629
- #: ../admin/views/ad-visitor-metabox.php:92
1630
- msgid ""
1631
- "The visitor conditions below are deprecated. Please use the new version of "
1632
- "visitor conditions to replace it."
1633
- msgstr ""
1634
- "Les conditions des visiteurs ci-dessous sont obsolètes. S’il vous plaît "
1635
- "utiliser la nouvelle version des conditions des visiteurs pour le remplacer."
1636
-
1637
- #: ../admin/views/ad-visitor-metabox.php:98
1638
- msgid "Display on all devices"
1639
- msgstr "Afficher sur tous les appareils"
1640
-
1641
- #: ../admin/views/ad-visitor-metabox.php:102
1642
- msgid "only on mobile devices"
1643
- msgstr "seulement sur les appareils mobiles"
1644
-
1645
- #: ../admin/views/ad-visitor-metabox.php:106
1646
- msgid "not on mobile devices"
1647
- msgstr "pas sur les appareils mobiles"
1648
-
1649
- #: ../admin/views/debug.php:6 ../admin/views/settings.php:47
1650
- msgid "Debug Page"
1651
- msgstr "Page de débogage"
1652
-
1653
- #: ../admin/views/debug.php:7
1654
- msgid "Work in progress"
1655
- msgstr "Travail en cours"
1656
-
1657
- #: ../admin/views/feedback_disable.php:3
1658
- msgid "Thank you for helping to improve Advanced Ads."
1659
- msgstr "Merci de nous aider à améliorer Advanced Ads."
1660
-
1661
- #: ../admin/views/feedback_disable.php:4
1662
- msgid ""
1663
- "Your feedback will motivates me to work harder towards a professional ad "
1664
- "management solution."
1665
- msgstr ""
1666
- "Vos commentaires vont me motiver à travailler plus fort vers une solution de "
1667
- "gestion professionnelle de pubs."
1668
-
1669
- #: ../admin/views/feedback_disable.php:5
1670
- msgid "Why did you decide to disable Advanced Ads?"
1671
- msgstr "Pourquoi avez-vous décidé de désactiver Advanced Ads?"
1672
-
1673
- #: ../admin/views/feedback_disable.php:7
1674
- msgid "I stopped showing ads on my site"
1675
- msgstr "J’ai arrêté la diffusion de pubs sur mon site"
1676
-
1677
- #: ../admin/views/feedback_disable.php:8
1678
- #, php-format
1679
- msgid "I miss a feature or <a href=\"%s\">add-on</a>"
1680
- msgstr "Il manque une fonctionnalité ou un <a href=\"%s\">Add-on</a>"
1681
-
1682
- #: ../admin/views/feedback_disable.php:9
1683
- msgid "I have a technical problem"
1684
- msgstr "J’ai un problème technique"
1685
-
1686
- #: ../admin/views/feedback_disable.php:10
1687
- msgid "other reason"
1688
- msgstr "autre raison"
1689
-
1690
- #: ../admin/views/feedback_disable.php:12
1691
- msgid "Please specify, if possible"
1692
- msgstr "Veuillez préciser, si possible"
1693
-
1694
- #: ../admin/views/feedback_disable.php:13
1695
- msgid "What would be a reason to return to Advanced Ads?"
1696
- msgstr "Quelle serait une raison de revenir à Advanced Ads?"
1697
-
1698
- #: ../admin/views/intro.php:18
1699
- msgid "5-Star Usability"
1700
- msgstr "5 étoiles pour la facilité d’utilisation"
1701
-
1702
- #: ../admin/views/intro.php:19
1703
- msgid ""
1704
- "Advanced Ads is powerful and easy to use, because it is build on WordPress "
1705
- "standards. If you know how to publish a post then you know how to create an "
1706
- "ad."
1707
- msgstr ""
1708
- "Advanced Ads est puissant et facile à utiliser, car il est construit sur les "
1709
- "normes et standards de WordPress. Si vous savez comment faire pour publier "
1710
- "un billet, alors vous savez comment créer une pub."
1711
-
1712
- #: ../admin/views/intro.php:23
1713
- msgid "5-Star Support"
1714
- msgstr "5 étoiles pour le support"
1715
-
1716
- #: ../admin/views/intro.php:24
1717
- msgid ""
1718
- "I promise you the best supported ad management plugin for WordPress. Whether "
1719
- "a pro user or not, you can reach me easily through the support page, in the "
1720
- "chat on the homepage or replying to a newsletter."
1721
- msgstr ""
1722
- "Je vous promets le plugin de gestion de pubs pour WordPress avec le meilleur "
1723
- "support. Utilisateur pro ou pas, vous pouvez me joindre facilement par le "
1724
- "biais de la page de support, dans le chat sur la page d’accueil ou en "
1725
- "réponse à une newsletter."
1726
-
1727
- #: ../admin/views/intro.php:28
1728
- msgid "5-Star Experience"
1729
- msgstr "5 étoiles pour l’expérience"
1730
-
1731
- #: ../admin/views/intro.php:29
1732
- msgid ""
1733
- "Advanced Ads was built out of my own experience. I am personally using it to "
1734
- "serve millions of ad impressions per month and constantly test new ways to "
1735
- "optimize ad settings."
1736
- msgstr ""
1737
- "Advanced Ads a été conçu de ma propre expérience. Je l’utilise "
1738
- "personnellement pour servir des millions d’impressions de pubs par mois et "
1739
- "sans cesse tester de nouvelles façons d’optimiser les paramètres des pubs."
1740
-
1741
- #: ../admin/views/intro.php:34
1742
- msgid "Welcome to <strong>Advanced Ads</strong>"
1743
- msgstr "Bienvenue sur <strong>Advanced Ads</strong>"
1744
-
1745
- #: ../admin/views/intro.php:36
1746
- msgid "Let me give you an introduction into your future ad management solution."
1747
- msgstr ""
1748
- "Permettez-moi de vous faire une introduction à votre future solution de "
1749
- "gestion de pubs."
1750
-
1751
- #: ../admin/views/intro.php:61
1752
- msgid "Next Steps"
1753
- msgstr "Étapes suivantes"
1754
-
1755
- #: ../admin/views/intro.php:64
1756
- msgid "Subscribe to the Mailing List"
1757
- msgstr "Inscription à la liste de diffusion"
1758
-
1759
- #: ../admin/views/intro.php:65
1760
- msgid "Subscribe to the newsletter and instantly"
1761
- msgstr "S’abonner à la newsletter et instantanément"
1762
-
1763
- #: ../admin/views/intro.php:67
1764
- msgid "get 2 free add-ons."
1765
- msgstr "obtenez 2 Add-ons gratuits."
1766
-
1767
- #: ../admin/views/intro.php:68
1768
- msgid "reply to the welcome message with a question."
1769
- msgstr "répondre au message d’accueil par une question."
1770
-
1771
- #: ../admin/views/intro.php:69
1772
- msgid "subscribe to a dedicated group for the tutorial or AdSense tips."
1773
- msgstr "s’abonner à un groupe dédié pour le tutoriel ou astuces sur AdSense."
1774
-
1775
- #: ../admin/views/intro.php:79
1776
- #, php-format
1777
- msgid ""
1778
- "Get started by creating an ad <a href=\"%1$s\" target=\"blank\">right now</a> or "
1779
- "watch the <a href=\"%2$s\" target=\"blank\">tutorial video (3:29min)</a> first."
1780
- msgstr ""
1781
- "Se lancer en créant une pub <a href=\"%1$s\" target=\"blank\">dès maintenant</a> "
1782
- "ou regardez en premier le <a href=\"%2$s\" target=\"blank\">tutoriel vidéo (03:"
1783
- "29 min)</a>."
1784
-
1785
- #: ../admin/views/intro.php:82
1786
- msgid "Display your ad"
1787
- msgstr "Affichez votre pub"
1788
-
1789
- #: ../admin/views/intro.php:83
1790
- msgid ""
1791
- "You can display your ad using a shortcode, widget or one of the powerful "
1792
- "placements. Placements help you to inject ads into the content or place them "
1793
- "on your site without coding."
1794
- msgstr ""
1795
- "Vous pouvez afficher votre pub à l’aide d’un shortcode, d’un widget ou de "
1796
- "l’un des placements disponibles très efficaces. Les placements vous aideront "
1797
- "à injecter des pubs dans le contenu ou de les placer sur votre sites et cela "
1798
- "sans codage."
1799
-
1800
- #: ../admin/views/intro.php:85
1801
- msgid "List of all available placements"
1802
- msgstr "Liste de tous les placements disponibles"
1803
-
1804
- #: ../admin/views/intro.php:86
1805
- msgid "Create a placement"
1806
- msgstr "Créer un placement"
1807
-
1808
- #: ../admin/views/placements.php:8
1809
- msgid ""
1810
- "Couldn’t create the new placement. Please check your form field and whether "
1811
- "the name is already in use."
1812
- msgstr ""
1813
- "Impossible de créer le nouveau placement. S’il vous plaît vérifier votre "
1814
- "champ de formulaire ou si le nom est déjà utilisé."
1815
-
1816
- #: ../admin/views/placements.php:10
1817
- msgid "Placements updated"
1818
- msgstr "Mise à jour des placements"
1819
-
1820
- #: ../admin/views/placements.php:15
1821
- msgid ""
1822
- "Placements are physically places in your theme and posts. You can use them "
1823
- "if you plan to change ads and ad groups on the same place without the need "
1824
- "to change your templates."
1825
- msgstr ""
1826
- "Les placements sont physiquement positionnés dans votre thème et vos "
1827
- "articles. Vous pouvez les utiliser si vous envisagez de modifier les pubs et "
1828
- "les groupes de pubs sur une même position sans avoir besoin de changer vos "
1829
- "modèles."
1830
-
1831
- #: ../admin/views/placements.php:16
1832
- #, php-format
1833
- msgid "See also the manual for more information on <a href=\"%s\">placements</a>."
1834
- msgstr ""
1835
- "Voir aussi le manuel pour plus d’informations sur les <a "
1836
- "href=\"%s\">placements</a>."
1837
-
1838
- #: ../admin/views/placements.php:25
1839
- msgid "Options"
1840
- msgstr "Options"
1841
-
1842
- #: ../admin/views/placements.php:42
1843
- #, php-format
1844
- msgid ""
1845
- "Placement type \"%s\" is missing and was reset to \"default\".<br/>Please check "
1846
- "if the responsible add-on is activated."
1847
- msgstr ""
1848
- "Type de placement \"%s\" est absent et a été remis à zéro « par défaut »."
1849
- "<br>S’il vous plaît, vérifiez si l’Add-on responsable de cela est activé."
1850
-
1851
- #: ../admin/views/placements.php:58
1852
- msgid "show usage"
1853
- msgstr "montrer son utilisation"
1854
-
1855
- #: ../admin/views/placements.php:70
1856
- msgid "Item"
1857
- msgstr "élément"
1858
-
1859
- #: ../admin/views/placements.php:72 ../admin/views/placements.php:176
1860
- msgid "--not selected--"
1861
- msgstr "--non sélectionné--"
1862
-
1863
- #: ../admin/views/placements.php:92
1864
- msgid "Inject"
1865
- msgstr "Injecter"
1866
-
1867
- #: ../admin/views/placements.php:93
1868
- msgid "after"
1869
- msgstr "après"
1870
-
1871
- #: ../admin/views/placements.php:93
1872
- msgid "before"
1873
- msgstr "avant"
1874
-
1875
- #: ../admin/views/placements.php:113
1876
- msgid "start counting from bottom"
1877
- msgstr "commencer à compter à partir du bas"
1878
-
1879
- #: ../admin/views/placements.php:116
1880
- msgid "Important Notice"
1881
- msgstr "Remarque importante"
1882
-
1883
- #: ../admin/views/placements.php:116
1884
- msgid ""
1885
- "Your server is missing an extension. This might break the content injection."
1886
- "<br/>Ignore this warning if everything works fine or else ask your hosting "
1887
- "provider to enable <em>mbstring</em>."
1888
- msgstr ""
1889
- "Une extension est manquante sur votre serveur. Cela pourrait casser "
1890
- "l’injection de contenu.<br>Ignorer cet avertissement si tout fonctionne très "
1891
- "bien, ou bien demander à votre d’hébergeur d’activer <em>l’extension "
1892
- "mbstring</em>."
1893
-
1894
- #: ../admin/views/placements.php:126
1895
- msgid "advanced options"
1896
- msgstr "options avancées"
1897
-
1898
- #: ../admin/views/placements.php:134
1899
- msgctxt "checkbox to remove placement"
1900
- msgid "delete"
1901
- msgstr "supprimer"
1902
-
1903
- #: ../admin/views/placements.php:140
1904
- msgid "Save Placements"
1905
- msgstr "Enregistrer les placements"
1906
-
1907
- #: ../admin/views/placements.php:142
1908
- msgid "Create a new placement"
1909
- msgstr "Créer un nouveau placement"
1910
-
1911
- #: ../admin/views/placements.php:143
1912
- msgid "New Placement"
1913
- msgstr "Nouveau Placement"
1914
-
1915
- #: ../admin/views/placements.php:149
1916
- msgid "Choose a placement type"
1917
- msgstr "Choisissez un type de placement"
1918
-
1919
- #: ../admin/views/placements.php:150
1920
- #, php-format
1921
- msgid ""
1922
- "Placement types define where the ad is going to be displayed. Learn more "
1923
- "about the different types from the <a href=\"%s\">manual</a>"
1924
- msgstr ""
1925
- "Les types de placement défini la où publicité va s’afficher. En savoir plus "
1926
- "sur les différents types de placement dans <a href=\"%s\">manuelle</a>"
1927
-
1928
- #: ../admin/views/placements.php:167
1929
- msgid "Please select a placement type."
1930
- msgstr "Veuillez sélectionner un type de placement."
1931
-
1932
- #: ../admin/views/placements.php:169
1933
- msgid "Choose a Name"
1934
- msgstr "Choisissez un nom"
1935
-
1936
- #: ../admin/views/placements.php:170
1937
- msgid ""
1938
- "The name of the placement is only visible to you. Tip: choose a descriptive "
1939
- "one, e.g. <em>Below Post Headline</em>."
1940
- msgstr ""
1941
- "Le nom du placement est uniquement visible par vous. Conseil: choisir un "
1942
- "descriptif, par exemple <em>Sous le titre des articles</em>."
1943
-
1944
- #: ../admin/views/placements.php:171
1945
- msgid "Placement Name"
1946
- msgstr "Nom de placement"
1947
-
1948
- #: ../admin/views/placements.php:172
1949
- msgid "Please enter a name for your placement."
1950
- msgstr "Entrez un nom pour votre placement."
1951
-
1952
- #: ../admin/views/placements.php:173
1953
- msgid "Choose the Ad or Group"
1954
- msgstr "Choisissez la pub ou le groupe"
1955
-
1956
- #: ../admin/views/placements.php:174
1957
- msgid "The ad or group that should be displayed."
1958
- msgstr "Pub ou groupe qui doit être affichée."
1959
-
1960
- #: ../admin/views/placements.php:193
1961
- msgid "Save New Placement"
1962
- msgstr "Enregistrez le nouveau placement"
1963
-
1964
- #: ../admin/views/post-ad-settings-metabox.php:3
1965
- msgid "Disable ads on this page"
1966
- msgstr "Désactiver les pubs sur cette page"
1967
-
1968
- #: ../admin/views/setting-license.php:5
1969
- msgid "Your license expired."
1970
- msgstr "Votre licence est expirée."
1971
-
1972
- #: ../admin/views/setting-license.php:14
1973
- #, php-format
1974
- msgid "(%d days left)"
1975
- msgstr "(%d jours restants)"
1976
-
1977
- #: ../admin/views/setting-license.php:18
1978
- msgid "License key"
1979
- msgstr "Clef de la licence"
1980
-
1981
- #: ../admin/views/setting-license.php:28
1982
- msgid "Deactivate License"
1983
- msgstr "Désactiver la licence"
1984
-
1985
- #: ../admin/views/setting-license.php:35
1986
- msgid "Activate License"
1987
- msgstr "Activer la licence"
1988
-
1989
- #: ../admin/views/setting-license.php:39
1990
- msgid "License key invalid"
1991
- msgstr "Clé de licence invalide"
1992
-
1993
- #: ../admin/views/setting-license.php:42
1994
- msgid "active"
1995
- msgstr "active"
1996
-
1997
- #: ../admin/views/settings-disable-ads.php:3
1998
- msgid "Disable all ads in frontend"
1999
- msgstr "Désactiver toutes les pubs sur le Frontend"
2000
-
2001
- #: ../admin/views/settings-disable-ads.php:4
2002
- msgid ""
2003
- "Use this option to disable all ads in the frontend, but still be able to use "
2004
- "the plugin."
2005
- msgstr ""
2006
- "Utilisez cette option pour désactiver toutes les pubs sur Frontend, mais "
2007
- "toujours être en mesure d’utiliser le plugin."
2008
-
2009
- #: ../admin/views/settings-disable-ads.php:8
2010
- msgid "Disable ads on 404 error pages"
2011
- msgstr "Désactiver les pubs sur les pages d’erreur 404"
2012
-
2013
- #: ../admin/views/settings-disable-ads.php:12
2014
- msgid "Disable ads on non-singular pages"
2015
- msgstr "Désactiver les pubs sur les pages non singulière"
2016
-
2017
- #: ../admin/views/settings-disable-ads.php:13
2018
- msgid "e.g. archive pages like categories, tags, authors, front page (if a list)"
2019
- msgstr ""
2020
- "par exemple les pages d’archives comme catégories, mots-clés, auteurs, page "
2021
- "de couverture (si une liste)"
2022
-
2023
- #: ../admin/views/settings-disable-ads.php:16
2024
- msgid "Disable ads on secondary queries"
2025
- msgstr "Désactiver les pubs sur les requêtes secondaires"
2026
-
2027
- #: ../admin/views/settings-disable-ads.php:17
2028
- msgid ""
2029
- "Secondary queries are custom queries of posts outside the main query of a "
2030
- "page. Try this option if you see ads injected on places where they shouldn’t "
2031
- "appear."
2032
- msgstr ""
2033
- "Les requêtes secondaires sont des requêtes personnalisées d’articles à "
2034
- "l’extérieur de la requête principale d’une page. Essayez cette option si "
2035
- "vous voyez des pubs injectées à des endroits où elles ne devraient pas "
2036
- "apparaître."
2037
-
2038
- #: ../admin/views/settings.php:36
2039
- msgid "Save settings on this page"
2040
- msgstr "Enregistrer les paramètres sur cette page"
2041
-
2042
- #: ../admin/views/settings.php:48
2043
- msgid "Welcome Page"
2044
- msgstr "Page de Bienvenue"
2045
-
2046
- #: ../admin/views/settings.php:49
2047
- msgid "Advanced Ads on WordPress.org"
2048
- msgstr "Advanced Ads sur WordPress.org"
2049
-
2050
- #: ../admin/views/settings.php:49
2051
- msgid "Advanced Ads on wp.org"
2052
- msgstr "Advanced Ads sur wp.org"
2053
-
2054
- #: ../admin/views/settings.php:50
2055
- msgid "the company behind Advanced Ads"
2056
- msgstr "la compagnie derrière Advanced Ads"
2057
-
2058
- #: ../admin/views/support.php:8
2059
- msgid "Possible Issues"
2060
- msgstr "Problèmes possibles"
2061
-
2062
- #: ../admin/views/support.php:9
2063
- msgid ""
2064
- "Please fix the red highlighted issues on this page or try to understand "
2065
- "their consequences before contacting support."
2066
- msgstr ""
2067
- "S’il vous plaît, réglez les problèmes (surligné en rouge) sur cette page ou "
2068
- "essayer de comprendre leurs conséquences avant de contacter notre assistance."
2069
-
2070
- #: ../admin/views/support.php:13
2071
- #, php-format
2072
- msgid ""
2073
- "Your <strong>PHP version (%s) is too low</strong>. Advanced Ads is built for "
2074
- "PHP 5.3 and higher. It might work, but updating PHP is highly recommended. "
2075
- "Please ask your hosting provider for more information."
2076
- msgstr ""
2077
- "Votre <strong>version de PHP (%s) est trop ancienne</strong>. Pubs avancés "
2078
- "est construit pour PHP 5.3 et supérieur. Il pourrait fonctionner, mais mise "
2079
- "à jour de PHP est vivement recommandé. Demandez à votre hébergeur pour plus "
2080
- "d’informations."
2081
-
2082
- #: ../admin/views/support.php:16
2083
- #, php-format
2084
- msgid ""
2085
- "Your <strong>website uses cache</strong>. Some dynamic features like ad "
2086
- "rotation or visitor conditions might not work properly. Use the cache-"
2087
- "busting feature of <a href=\"%s\" target=\"_blank\">Advanced Ads Pro</a> to load "
2088
- "ads dynamically."
2089
- msgstr ""
2090
- "Votre <strong>site Web utilise le cache</strong>. Quelques fonctionnalités "
2091
- "dynamiques comme la rotation (alternance) de pubs ou les conditions de "
2092
- "visiteur ne peuvent pas fonctionner correctement. Utilisez la fonctionnalité "
2093
- "de suppression de cache (cache-busting) de <a href=\"%s\" "
2094
- "target=\"_blank\">Advanced Ads Pro</a> pour charger dynamiquement les pubs."
2095
-
2096
- #: ../admin/views/support.php:19
2097
- msgid "There is a <strong>new WordPress version available</strong>. Please update."
2098
- msgstr ""
2099
- "Il existe une <strong>nouvelle version de WordPress disponible</strong>. "
2100
- "Veuillez mettre à jour."
2101
-
2102
- #: ../admin/views/support.php:22
2103
- msgid "There are <strong>plugin updates available</strong>. Please update."
2104
- msgstr ""
2105
- "Il y a des <strong>mises à jour du plugin disponible</strong>. Veuillez "
2106
- "mettre à jour."
2107
-
2108
- #: ../admin/views/support.php:25
2109
- #, php-format
2110
- msgid ""
2111
- "One or more license keys for <strong>Advanced Ads add-ons are invalid or "
2112
- "missing</strong>. Please add valid license keys <a href=\"%s\">here</a>."
2113
- msgstr ""
2114
- "Une ou plusieurs clés de licences pour <strong>Advanced Ads add-ons sont "
2115
- "manquantes ou incorrectes</strong>. S’il vous plaît ajouter les clés de "
2116
- "licences valides <a href=\"%s\">ici</a>."
2117
-
2118
- #: ../admin/views/support.php:31
2119
- #, php-format
2120
- msgid ""
2121
- "<strong>Autoptimize plugin detected</strong>. While this plugin is great for "
2122
- "site performance, it is known to alter code, including scripts from ad "
2123
- "networks. <a href=\"%s\" target=\"_blank\">Advanced Ads Pro</a> has a build-in "
2124
- "support for Autoptimize."
2125
- msgstr ""
2126
- "<strong>Autoptimize plugin détecté</strong>. Ce plugin est excellent pour la "
2127
- "performance du site, mais il est reconnu pour modifier le code, y compris "
2128
- "les scripts de réseaux publicitaires. <a href=\"%s\" target=\"_blank\">Advanced "
2129
- "Ads Pro</a> propose le support intégré d’Autoptimize."
2130
-
2131
- #: ../admin/views/support.php:34
2132
- #, php-format
2133
- msgid ""
2134
- "Plugins that are known to cause (partial) problems: <strong>%1$s</strong>. "
2135
- "<a href=\"%2$s\" target=\"_blank\">Learn more</a>."
2136
- msgstr ""
2137
- "Les plugins qui sont connus pour causer des problèmes (partielles): "
2138
- "<strong>%1$s</strong>. <a href=\"%2$s\" target=\"_blank\">En savoir plus</a>."
2139
-
2140
- #: ../admin/views/support.php:38
2141
- #, php-format
2142
- msgid ""
2143
- "Ads are disabled for all or some pages. See \"disabled ads\" in <a "
2144
- "href=\"%s\">settings</a>."
2145
- msgstr ""
2146
- "Les pubs sont désactivées pour toutes ou certaines pages. Voir « pubs "
2147
- "désactivées » dans les <a href=\"%s\">paramètres</a>."
2148
-
2149
- #: ../admin/views/support.php:49
2150
- msgid "Search"
2151
- msgstr "Recherche"
2152
-
2153
- #: ../admin/views/support.php:50
2154
- msgid ""
2155
- "Use the following form to search for solutions in the manual on "
2156
- "wpadvancedads.com"
2157
- msgstr ""
2158
- "Utilisez le formulaire ci-dessous pour rechercher des solutions dans le "
2159
- "manuel sur wpadvancedads.com"
2160
-
2161
- #: ../admin/views/support.php:53
2162
- msgid "search"
2163
- msgstr "rechercher"
2164
-
2165
- #: ../admin/views/support.php:55
2166
- msgid "Contact"
2167
- msgstr "Contact"
2168
-
2169
- #: ../admin/views/support.php:56
2170
- #, php-format
2171
- msgid ""
2172
- "Please search the manual for a solution and take a look at <a href=\"%s\" "
2173
- "target=\"_blank\">Ads not showing up?</a> before contacting me for help."
2174
- msgstr ""
2175
- "Veuillez rechercher une solution dans le manuel et jetez un oeil à <a "
2176
- "href=\"%s\" target=\"_blank\">pubs n’apparaissant-pas?</a> avant de me contacter "
2177
- "pour de l’aide."
2178
-
2179
- #: ../admin/views/support.php:58
2180
- msgid "Email was successfully sent."
2181
- msgstr "Votre e-mail a bien été envoyé."
2182
-
2183
- #: ../admin/views/support.php:67
2184
- msgid "your email"
2185
- msgstr "votre email"
2186
-
2187
- #: ../admin/views/support.php:71
2188
- msgid "your name"
2189
- msgstr "Votre nom"
2190
-
2191
- #: ../admin/views/support.php:75
2192
- msgid "your message"
2193
- msgstr "Votre message"
2194
-
2195
- #: ../admin/views/support.php:80
2196
- msgid "send"
2197
- msgstr "envoyer"
2198
-
2199
- #: ../admin/views/notices/adblock.php:3
2200
- msgid ""
2201
- "Please disable your <strong>AdBlocker</strong> to prevent problems with your "
2202
- "ad setup."
2203
- msgstr ""
2204
- "Veuillez désactiver votre <strong>bloqueur de publicité</strong> pour éviter "
2205
- "tout problème avec la configuration de pub."
2206
-
2207
- #: ../classes/ad_placements.php:31
2208
- msgid "Manual Placement"
2209
- msgstr "Placement manuel"
2210
-
2211
- #: ../classes/ad_placements.php:32
2212
- msgid "Manual placement to use as function or shortcode."
2213
- msgstr "Placement manuel à utiliser comme fonction ou shortcode."
2214
-
2215
- #: ../classes/ad_placements.php:36
2216
- msgid "Header Code"
2217
- msgstr "Code d’en-tête"
2218
-
2219
- #: ../classes/ad_placements.php:37
2220
- msgid "Injected in Header (before closing &lt;/head&gt; Tag, often not visible)."
2221
- msgstr ""
2222
- "Injecté dans l’en-tête (avant fermeture de la balise &lt;/head&gt; , souvent "
2223
- "non visible)."
2224
-
2225
- #: ../classes/ad_placements.php:41
2226
- msgid "Footer Code"
2227
- msgstr "Code du pied de page"
2228
-
2229
- #: ../classes/ad_placements.php:42
2230
- msgid "Injected in Footer (before closing &lt;/body&gt; Tag)."
2231
- msgstr "Injecté en pied de page (avant la fermeture de la balise &lt;/body&gt;)."
2232
-
2233
- #: ../classes/ad_placements.php:47
2234
- msgid "Injected before the post content."
2235
- msgstr "Injecté avant le contenu de l’article."
2236
-
2237
- #: ../classes/ad_placements.php:52
2238
- msgid "Injected after the post content."
2239
- msgstr "Injecté après le contenu de l’article."
2240
-
2241
- #: ../classes/ad_placements.php:56
2242
- msgid "Post Content"
2243
- msgstr "Contenu d’article"
2244
-
2245
- #: ../classes/ad_placements.php:57
2246
- msgid ""
2247
- "Injected into the post content. You can choose the paragraph after which the "
2248
- "ad content is displayed."
2249
- msgstr ""
2250
- "Injecté dans le contenu de l’article. Vous pouvez choisir le paragraphe "
2251
- "après lequel le contenu de la pub est affiché."
2252
-
2253
- #: ../classes/ad_placements.php:61
2254
- msgid "Sidebar Widget"
2255
- msgstr "Widget de barre latérale"
2256
-
2257
- #: ../classes/ad_placements.php:62
2258
- msgid ""
2259
- "Create a sidebar widget with an ad. Can be placed and used like any other "
2260
- "widget."
2261
- msgstr ""
2262
- "Créer un widget de barre latérale avec une pub. Peuvent être placé et "
2263
- "utilisé comme n’importe quel autre widget."
2264
-
2265
- #: ../classes/ad_placements.php:210
2266
- #, php-format
2267
- msgid "paragraph (%s)"
2268
- msgstr "paragraphe (%s)"
2269
-
2270
- #: ../classes/ad_placements.php:212
2271
- #, php-format
2272
- msgid "headline 2 (%s)"
2273
- msgstr "titre 2 (%s)"
2274
-
2275
- #: ../classes/ad_placements.php:213
2276
- #, php-format
2277
- msgid "headline 3 (%s)"
2278
- msgstr "titre 3 (%s)"
2279
-
2280
- #: ../classes/ad_placements.php:214
2281
- #, php-format
2282
- msgid "headline 4 (%s)"
2283
- msgstr "titre 4 (%s)"
2284
-
2285
- #: ../classes/ad_type_content.php:35
2286
- msgid "Rich Content"
2287
- msgstr "Contenu riche"
2288
-
2289
- #: ../classes/ad_type_content.php:36
2290
- msgid ""
2291
- "The full content editor from WordPress with all features like shortcodes, "
2292
- "image upload or styling, but also simple text/html mode for scripts and code."
2293
- msgstr ""
2294
- "L’éditeur de contenu complet de WordPress avec toutes les fonctionnalités "
2295
- "comme les shortcodes, téléchargement d’images, ou styles, mais aussi en mode "
2296
- "texte/html pour les scripts et le code."
2297
-
2298
- #: ../classes/ad_type_image.php:34
2299
- msgid "Image Ad"
2300
- msgstr "Image de la pub"
2301
-
2302
- #: ../classes/ad_type_image.php:35
2303
- msgid "Ads in various image formats."
2304
- msgstr "Pubs dans divers formats d’image."
2305
-
2306
- #: ../classes/ad_type_image.php:55
2307
- msgid "Insert File"
2308
- msgstr "Insérer un fichier"
2309
-
2310
- #: ../classes/ad_type_image.php:55
2311
- msgid "Insert"
2312
- msgstr "Insérer"
2313
-
2314
- #: ../classes/ad_type_image.php:55
2315
- msgid "select image"
2316
- msgstr "sélectionnez une image"
2317
-
2318
- #: ../classes/ad_type_image.php:56
2319
- msgid "edit"
2320
- msgstr "modifier"
2321
-
2322
- #: ../classes/ad_type_image.php:65
2323
- msgid "url"
2324
- msgstr "url"
2325
-
2326
- #: ../classes/ad_type_image.php:67
2327
- #, php-format
2328
- msgid ""
2329
- "Pro: Open this url in a new window and track impressions and clicks with the "
2330
- "<a href=\"%s\" target=\"_blank\">Tracking add-on</a>"
2331
- msgstr ""
2332
- "Pro : Ouvrir cette url dans une nouvelle fenêtre et suivre les impressions "
2333
- "et les clics avec <a href=\"%s\" target=\"_blank\">le module de suivi « Tracking "
2334
- "add-on »</a>"
2335
-
2336
- #: ../classes/ad_type_plain.php:31
2337
- msgid "Plain Text and Code"
2338
- msgstr "Texte brut et code"
2339
-
2340
- #: ../classes/ad_type_plain.php:32
2341
- msgid ""
2342
- "Simple text editor without any filters. You might use it to display "
2343
- "unfiltered content, php code or javascript. Shortcodes and other WordPress "
2344
- "content field magic does not work here."
2345
- msgstr ""
2346
- "Éditeur de texte simple sans aucun filtre. Vous pouvez l’utiliser pour "
2347
- "afficher le contenu non filtrée, code php ou javascript. Shortcodes et autre "
2348
- "champs de contenus de WordPress ne fonctionnent pas ici."
2349
-
2350
- #: ../classes/ad_type_plain.php:52
2351
- msgid "Insert plain text or code into this field."
2352
- msgstr "Insérez le code ou texte brut dans ce champ."
2353
-
2354
- #: ../classes/ad_type_plain.php:88
2355
- msgid "Execute PHP code (wrapped in <code>&lt;?php ?&gt;</code>)"
2356
- msgstr "Exécuter du code PHP (inséré dans <code>&lt;?php ?&gt;</code>)"
2357
-
2358
- #: ../classes/checks.php:223
2359
- #, php-format
2360
- msgid ""
2361
- "Possible conflict between jQueryUI library, used by Advanced Ads and other "
2362
- "libraries (probably <a href=\"%s\">Twitter Bootstrap</a>). This might lead to "
2363
- "misfortunate formats in forms, but should not damage features."
2364
- msgstr ""
2365
- "Conflits possibles entre les bibliothèques jQueryUI, utilisée par Advanced "
2366
- "Ads et d’autres bibliothèques (probablement <a href=\"%s\">Twitter "
2367
- "Bootstrap</a>). Cela pourrait conduire à des formats malheureux, mais ne "
2368
- "devrait pas endommager les fonctionnalités."
2369
-
2370
- #: ../classes/display-conditions.php:69
2371
- msgid "post type"
2372
- msgstr "Type d’article"
2373
-
2374
- #: ../classes/display-conditions.php:70 ../includes/array_ad_conditions.php:40
2375
- msgid "Choose the public post types on which to display the ad."
2376
- msgstr "Choisir les types d’article public sur lequel afficher la pub."
2377
-
2378
- #: ../classes/display-conditions.php:76
2379
- msgid "specific pages"
2380
- msgstr "pages spécifiques"
2381
-
2382
- #: ../classes/display-conditions.php:77 ../includes/array_ad_conditions.php:58
2383
- msgid ""
2384
- "Choose on which individual posts, pages and public post type pages you want "
2385
- "to display or hide ads."
2386
- msgstr ""
2387
- "Choisir sur quels articles individuels, pages et pages de type article "
2388
- "public vous souhaitez afficher ou masquer les pubs."
2389
-
2390
- #: ../classes/display-conditions.php:82
2391
- msgid "general conditions"
2392
- msgstr "conditions générales"
2393
-
2394
- #: ../classes/display-conditions.php:88
2395
- msgid "author"
2396
- msgstr "auteur"
2397
-
2398
- #: ../classes/display-conditions.php:113
2399
- #, php-format
2400
- msgid "archive: %s"
2401
- msgstr "archive: %s"
2402
-
2403
- #: ../classes/display-conditions.php:214 ../classes/display-conditions.php:258 ..
2404
- #: classes/display-conditions.php:346
2405
- msgctxt "Error message shown when no display condition term is selected"
2406
- msgid "Please select some items."
2407
- msgstr "Veuillez sélectionner quelques éléments."
2408
-
2409
- #: ../classes/display-conditions.php:243 ../classes/display-conditions.php:296 ..
2410
- #: classes/display-conditions.php:371
2411
- msgid "show"
2412
- msgstr "montrer"
2413
-
2414
- #: ../classes/display-conditions.php:244 ../classes/display-conditions.php:297 ..
2415
- #: classes/display-conditions.php:372
2416
- msgid "hide"
2417
- msgstr "masquer"
2418
-
2419
- #: ../classes/display-conditions.php:336
2420
- msgctxt "display the terms search field on ad edit page"
2421
- msgid "add more terms"
2422
- msgstr "ajouter plus de termes"
2423
-
2424
- #: ../classes/display-conditions.php:337
2425
- msgid "add more terms"
2426
- msgstr "ajouter plus de termes"
2427
-
2428
- #: ../classes/display-conditions.php:339
2429
- msgid "term name or id"
2430
- msgstr "nom du terme ou id"
2431
-
2432
- #: ../classes/display-conditions.php:445 ../includes/array_ad_conditions.php:63
2433
- msgid "Home Page"
2434
- msgstr "Page d’accueil"
2435
-
2436
- #: ../classes/display-conditions.php:446 ../includes/array_ad_conditions.php:64
2437
- msgid "show on Home page"
2438
- msgstr "voir sur page d’accueil"
2439
-
2440
- #: ../classes/display-conditions.php:450 ../includes/array_ad_conditions.php:68
2441
- msgid "Singular Pages"
2442
- msgstr "Pages particulières"
2443
-
2444
- #: ../classes/display-conditions.php:451 ../includes/array_ad_conditions.php:69
2445
- msgid "show on singular pages/posts"
2446
- msgstr "afficher sur les articles particuliers ou pages particulières"
2447
-
2448
- #: ../classes/display-conditions.php:455 ../includes/array_ad_conditions.php:73
2449
- msgid "Archive Pages"
2450
- msgstr "Pages d’archive"
2451
-
2452
- #: ../classes/display-conditions.php:456 ../includes/array_ad_conditions.php:74
2453
- msgid "show on any type of archive page (category, tag, author and date)"
2454
- msgstr ""
2455
- "afficher sur n’importe quel type de page d’archive (catégorie, mot-clé, "
2456
- "auteur et date)"
2457
-
2458
- #: ../classes/display-conditions.php:460 ../includes/array_ad_conditions.php:78
2459
- msgid "Search Results"
2460
- msgstr "Résultats de recherche"
2461
-
2462
- #: ../classes/display-conditions.php:461 ../includes/array_ad_conditions.php:79
2463
- msgid "show on search result pages"
2464
- msgstr "montrer sur les pages de résultats de recherche"
2465
-
2466
- #: ../classes/display-conditions.php:465 ../includes/array_ad_conditions.php:83
2467
- msgid "404 Page"
2468
- msgstr "Page 404"
2469
-
2470
- #: ../classes/display-conditions.php:466 ../includes/array_ad_conditions.php:84
2471
- msgid "show on 404 error page"
2472
- msgstr "afficher sur la page d’erreur 404"
2473
-
2474
- #: ../classes/display-conditions.php:470 ../includes/array_ad_conditions.php:88
2475
- msgid "Attachment Pages"
2476
- msgstr "Pages de pièce jointe"
2477
-
2478
- #: ../classes/display-conditions.php:471 ../includes/array_ad_conditions.php:89
2479
- msgid "show on attachment pages"
2480
- msgstr "afficher sur les pages de pièce jointe"
2481
-
2482
- #: ../classes/display-conditions.php:475 ../includes/array_ad_conditions.php:93
2483
- msgid "Secondary Queries"
2484
- msgstr "Requêtes secondaires"
2485
-
2486
- #: ../classes/display-conditions.php:476 ../includes/array_ad_conditions.php:94
2487
- msgid "allow ads in secondary queries"
2488
- msgstr "autoriser les pubs dans les requêtes secondaires"
2489
-
2490
- #: ../classes/EDD_SL_Plugin_Updater.php:177
2491
- #, php-format
2492
- msgid ""
2493
- "There is a new version of %1$s available. <a target=\"_blank\" "
2494
- "class=\"thickbox\" href=\"%2$s\">View version %3$s details</a>."
2495
- msgstr ""
2496
- "Il y a une nouvelle version de %1$s disponible. <a target=\"_blank\" "
2497
- "class=\"thickbox\" href=\"%2$s\">Voir les détails de la version %3$s </a>."
2498
-
2499
- #: ../classes/EDD_SL_Plugin_Updater.php:184
2500
- #, php-format
2501
- msgid ""
2502
- "There is a new version of %1$s available. <a target=\"_blank\" "
2503
- "class=\"thickbox\" href=\"%2$s\">View version %3$s details</a> or <a "
2504
- "href=\"%4$s\">update now</a>."
2505
- msgstr ""
2506
- "Il y a une nouvelle version de %1$s disponible. <a target=\"_blank\" "
2507
- "class=\"thickbox\" href=\"%2$s\">Voir les détails de la version %3$s</a> or <a "
2508
- "href=\"%4$s\">Mettre à jour maintenant</a>."
2509
-
2510
- #: ../classes/EDD_SL_Plugin_Updater.php:324
2511
- msgid "You do not have permission to install plugin updates"
2512
- msgstr "Vous n’avez pas la permission d’installer les mises à jour de l’extension"
2513
-
2514
- #: ../classes/EDD_SL_Plugin_Updater.php:324
2515
- msgid "Error"
2516
- msgstr "Erreur"
2517
-
2518
- #: ../classes/visitor-conditions.php:32
2519
- msgid "mobile device"
2520
- msgstr "appareil mobile"
2521
-
2522
- #: ../classes/visitor-conditions.php:33
2523
- msgid "Display ads only on mobile devices or hide them."
2524
- msgstr "Afficher les pubs uniquement sur les appareils mobiles ou les masquer."
2525
-
2526
- #: ../classes/visitor-conditions.php:39
2527
- msgid "logged in visitor"
2528
- msgstr "visiteur connecté"
2529
-
2530
- #: ../classes/visitor-conditions.php:40
2531
- msgid "Whether the visitor has to be logged in or not in order to see the ads."
2532
- msgstr "Si le visiteur doit se connecter ou non afin de voir les pubs."
2533
-
2534
- #: ../classes/visitor-conditions.php:73
2535
- #, php-format
2536
- msgid ""
2537
- "Pro: Display ads by the available space on the device using the <a href=\"%s\" "
2538
- "target=\"_blank\">Responsive add-on</a>"
2539
- msgstr ""
2540
- "Pro: Afficher les pubs par l’espace disponible sur l’appareil à l’aide du <a "
2541
- "href=\"%s\" target=\"_blank\">Responsive add-on</a>"
2542
-
2543
- #: ../classes/visitor-conditions.php:101
2544
- msgid "is"
2545
- msgstr "est"
2546
-
2547
- #: ../classes/visitor-conditions.php:102
2548
- msgid "is not"
2549
- msgstr "n’est pas"
2550
-
2551
- #: ../classes/visitor-conditions.php:107
2552
- msgid "Manual and Troubleshooting"
2553
- msgstr "Manuel et dépannage"
2554
-
2555
- #: ../classes/visitor-conditions.php:136
2556
- msgid "equal"
2557
- msgstr "égal"
2558
-
2559
- #: ../classes/visitor-conditions.php:137
2560
- msgid "equal or higher"
2561
- msgstr "égal ou supérieur"
2562
-
2563
- #: ../classes/visitor-conditions.php:138
2564
- msgid "equal or lower"
2565
- msgstr "égal ou inférieur"
2566
-
2567
- #: ../classes/visitor-conditions.php:168
2568
- msgid "contains"
2569
- msgstr "contient"
2570
-
2571
- #: ../classes/visitor-conditions.php:169
2572
- msgid "starts with"
2573
- msgstr "commence par"
2574
-
2575
- #: ../classes/visitor-conditions.php:170
2576
- msgid "ends with"
2577
- msgstr "finit par"
2578
-
2579
- #: ../classes/visitor-conditions.php:171
2580
- msgid "matches"
2581
- msgstr "correspond"
2582
-
2583
- #: ../classes/visitor-conditions.php:172
2584
- msgid "matches regex"
2585
- msgstr "expression régulière correspondante"
2586
-
2587
- #: ../classes/visitor-conditions.php:173
2588
- msgid "does not contain"
2589
- msgstr "ne contient pas"
2590
-
2591
- #: ../classes/visitor-conditions.php:174
2592
- msgid "does not start with"
2593
- msgstr "ne commence pas par"
2594
-
2595
- #: ../classes/visitor-conditions.php:175
2596
- msgid "does not end with"
2597
- msgstr "ne se termine pas par"
2598
-
2599
- #: ../classes/visitor-conditions.php:176
2600
- msgid "does not match"
2601
- msgstr "ne correspond pas"
2602
-
2603
- #: ../classes/visitor-conditions.php:177
2604
- msgid "does not match regex"
2605
- msgstr "expression régulière non-correspondante"
2606
-
2607
- #: ../classes/widget.php:25
2608
- msgid "Display Ads and Ad Groups."
2609
- msgstr "Afficher des pubs et des groupes de pubs."
2610
-
2611
- #: ../classes/widget.php:67
2612
- msgid "Title:"
2613
- msgstr "Titre:"
2614
-
2615
- #: ../includes/array_ad_conditions.php:39
2616
- msgid "Post Types"
2617
- msgstr "Types d’article"
2618
-
2619
- #: ../includes/array_ad_conditions.php:45
2620
- msgid "Categories, Tags and Taxonomies"
2621
- msgstr "Catégories, mots-clés et taxonomies"
2622
-
2623
- #: ../includes/array_ad_conditions.php:46
2624
- msgid ""
2625
- "Choose terms from public category, tag and other taxonomies a post must "
2626
- "belong to in order to have ads."
2627
- msgstr ""
2628
- "Choisissez des termes dans la catégorie public, mot-clé et autres taxonomies "
2629
- "pour lesquels un article doit appartenir à afin d’avoir des pubs."
2630
-
2631
- #: ../includes/array_ad_conditions.php:51
2632
- msgid "Category Archives"
2633
- msgstr "Catégorie des Archives"
2634
-
2635
- #: ../includes/array_ad_conditions.php:52
2636
- msgid "comma seperated IDs of category archives"
2637
- msgstr "Identifiants (séparés de virgules) de catégorie d’archive"
2638
-
2639
- #: ../includes/array_ad_conditions.php:57
2640
- msgid "Individual Posts, Pages and Public Post Types"
2641
- msgstr "Articles individuels, pages et types d’article public"
2642
-
2643
- #: ../modules/ad-blocker/admin/admin.php:133
2644
- msgid "The asset folder was rebuilt successfully"
2645
- msgstr "Le dossier d’éléments (assets) a été reconstruit avec succès"
2646
-
2647
- #: ../modules/ad-blocker/admin/admin.php:218
2648
- msgid "Ad blocker fix"
2649
- msgstr "Réparation bloqueur de publicité"
2650
-
2651
- #: ../modules/ad-blocker/admin/admin.php:257
2652
- msgid "There is no writable upload folder"
2653
- msgstr "Il n’y a aucun dossier de transfert avec des droits d’écriture (writable)"
2654
-
2655
- #: ../modules/ad-blocker/admin/admin.php:278
2656
- #, php-format
2657
- msgid "Unable to rename \"%s\" directory"
2658
- msgstr "Impossible de renommer le répertoire \"%s\""
2659
-
2660
- #: ../modules/ad-blocker/admin/admin.php:294 ../modules/ad-blocker/admin/admin.
2661
- #: php:307 ../modules/ad-blocker/admin/admin.php:324
2662
- #, php-format
2663
- msgid "Unable to copy assets to the \"%s\" directory"
2664
- msgstr "Impossible de copier des éléments (assets) dans le répertoire \"%s\""
2665
-
2666
- #: ../modules/ad-blocker/admin/admin.php:358 ../modules/ad-blocker/admin/admin.
2667
- #: php:378
2668
- #, php-format
2669
- msgid "We do not have direct write access to the \"%s\" directory"
2670
- msgstr "Vous n’avez pas de droit direct d’écriture pour le répertoire \"%s\""
2671
-
2672
- #: ../modules/ad-blocker/admin/admin.php:445
2673
- #, php-format
2674
- msgid ""
2675
- "Unable to create \"%s\" directory. Is its parent directory writable by the "
2676
- "server?"
2677
- msgstr ""
2678
- "Impossible de créer le répertoire \"%s\". Son répertoire parent est-il "
2679
- "modifiable par le serveur ?"
2680
-
2681
- #: ../modules/ad-blocker/admin/admin.php:456
2682
- #, php-format
2683
- msgid "Unable to copy files to %s"
2684
- msgstr "Impossible de copier les fichiers vers %s"
2685
-
2686
- #: ../modules/ad-blocker/admin/admin.php:592
2687
- msgid ""
2688
- "Prevents ad block software from breaking your website when blocking asset "
2689
- "files (.js, .css)."
2690
- msgstr ""
2691
- "Empêcher le logiciel de blocage de publicités de casser votre site Internet "
2692
- "lors du blocage des fichiers de composants (.js, .css)."
2693
-
2694
- #: ../modules/ad-blocker/admin/views/rebuild_form.php:1
2695
- msgid "Ad blocker file folder"
2696
- msgstr "Dossier de fichier ad bloquer"
2697
-
2698
- #: ../modules/ad-blocker/admin/views/rebuild_form.php:10
2699
- msgid "Upload folder is not writable"
2700
- msgstr "Dossier de transfert n’est pas accessible en écriture"
2701
-
2702
- #: ../modules/ad-blocker/admin/views/rebuild_form.php:23
2703
- msgid "Asset path"
2704
- msgstr "Chemin d’élément (asset)"
2705
-
2706
- #: ../modules/ad-blocker/admin/views/rebuild_form.php:27
2707
- msgid "Asset URL"
2708
- msgstr "URL de l’actif (asset)"
2709
-
2710
- #: ../modules/ad-blocker/admin/views/rebuild_form.php:46
2711
- msgid "Rebuild asset folder"
2712
- msgstr "Reconstruire le dossier d’éléments (asset folder)"
2713
-
2714
- #: ../modules/gadsense/main.php:19
2715
- msgid " at "
2716
- msgstr "à"
2717
-
2718
- #: ../modules/gadsense/admin/admin.php:26 ../modules/gadsense/admin/views/adsense-
2719
- #: ad-parameters.php:51
2720
- msgid "Responsive"
2721
- msgstr "Responsive"
2722
-
2723
- #: ../modules/gadsense/admin/admin.php:44
2724
- msgid "The ad details couldn't be retrieved from the ad code"
2725
- msgstr "Les détails de la pub n’ont pas pu être récupérés à partir du code de la pub"
2726
-
2727
- #: ../modules/gadsense/admin/admin.php:45
2728
- msgid ""
2729
- "Warning : The AdSense account from this code does not match the one set with "
2730
- "the Advanced Ads Plugin. This ad might cause troubles when used in the front "
2731
- "end."
2732
- msgstr ""
2733
- "Avertissement : Le compte AdSense à partir de ce code ne correspond pas à "
2734
- "celui fixé avec le Plugin Advanced Ads. Cette pub pourrait entraîner des "
2735
- "problèmes lorsqu’elle est utilisée sur le Frontend."
2736
-
2737
- #: ../modules/gadsense/admin/admin.php:123 ../modules/gadsense/admin/admin.php:262
2738
- msgid "AdSense"
2739
- msgstr "Adsense"
2740
-
2741
- #: ../modules/gadsense/admin/admin.php:131
2742
- msgid "AdSense ID"
2743
- msgstr "ID AdSense"
2744
-
2745
- #: ../modules/gadsense/admin/admin.php:140
2746
- msgid "Limit to 3 ads"
2747
- msgstr "Limiter à 3 pubs"
2748
-
2749
- #: ../modules/gadsense/admin/admin.php:149
2750
- msgid "Activate Page-Level ads"
2751
- msgstr "Activer les pubs de niveau de Page"
2752
-
2753
- #: ../modules/gadsense/admin/admin.php:169
2754
- #, php-format
2755
- msgid ""
2756
- "Please enter your Publisher ID in order to use AdSense on your page. See the "
2757
- "<a href=\"%s\" target=\"_blank\">manual</a> for more information."
2758
- msgstr ""
2759
- "Veuillez entrer votre Référence éditeur (Publisher ID) pour utiliser AdSense "
2760
- "sur votre page. Voir le <a href=\"%s\" target=\"_blank\">manuel</a> pour plus "
2761
- "d’informations."
2762
-
2763
- #: ../modules/gadsense/admin/admin.php:183
2764
- msgid "Your AdSense Publisher ID <em>(pub-xxxxxxxxxxxxxx)</em>"
2765
- msgstr ""
2766
- "Votre Référence éditeur (Publisher ID) d’ AdSense <em>(pub-"
2767
- "xxxxxxxxxxxxxx)</em>"
2768
-
2769
- #: ../modules/gadsense/admin/admin.php:195
2770
- #, php-format
2771
- msgid "Limit to %d AdSense ads"
2772
- msgstr "Limiter à %d pubs AdSense"
2773
-
2774
- #: ../modules/gadsense/admin/admin.php:199
2775
- #, php-format
2776
- msgid ""
2777
- "Currently, Google AdSense <a target=\"_blank\" href=\"%s\" title=\"Terms Of "
2778
- "Service\">TOS</a> imposes a limit of %d display ads per page. You can disable "
2779
- "this limitation at your own risks."
2780
- msgstr ""
2781
- "Actuellement, les <a target=\"_blank\" href=\"%s\" title=\"TOS »>Conditions "
2782
- "d’utilisation</a> Google AdSense impose une limite d’affichage de %d pubs "
2783
- "par page. Vous pouvez désactiver cette limitation à vos propres risques."
2784
-
2785
- #: ../modules/gadsense/admin/admin.php:202
2786
- msgid "Notice: Advanced Ads only considers the AdSense ad type for this limit."
2787
- msgstr ""
2788
- "Avis: Advanced Ads considère uniquement le type de publicité AdSense pour "
2789
- "cette limite."
2790
-
2791
- #: ../modules/gadsense/admin/admin.php:205
2792
- msgid ""
2793
- "Due to technical restrictions, the limit does not work on placements with "
2794
- "cache-busting enabled."
2795
- msgstr ""
2796
- "En raison de restrictions techniques, la limite ne fonctionne pas sur les "
2797
- "placements avec la suppression du cache (cache-busting) activé."
2798
-
2799
- #: ../modules/gadsense/admin/admin.php:219
2800
- msgid "Insert Page-Level ads code on all pages."
2801
- msgstr "Insérez le code des pubs de niveau de page sur toutes les pages."
2802
-
2803
- #: ../modules/gadsense/admin/admin.php:221
2804
- msgid ""
2805
- "You still need to enable Page-Level ads in your AdSense account. See <a "
2806
- "href=\"https://support.google.com/adsense/answer/6245304\" "
2807
- "target=\"_blank\">AdSense Help</a> (requires AdSense-login) for more "
2808
- "information"
2809
- msgstr ""
2810
- "Vous devez toujours activer les pubs de niveau de page dans votre compte "
2811
- "Adsense. Consultez l’ <a href=\"https://support.google."
2812
- "com/adsense/answer/6245304\" target=\"_blank\">Aide d’AdSense</a> (compte "
2813
- "AdSense obligatoire) pour plus d’informations"
2814
-
2815
- #: ../modules/gadsense/admin/admin.php:240 ../modules/gadsense/includes/class-ad-
2816
- #: type-adsense.php:73
2817
- msgid "The Publisher ID has an incorrect format. (must start with \"pub-\")"
2818
- msgstr ""
2819
- "L’ID de l’éditeur (Publisher ID) a un format incorrect. (doit commencer par "
2820
- "« pub- »)"
2821
-
2822
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:23
2823
- msgid "Copy&Paste existing ad code"
2824
- msgstr "Copiez et collez le code existant de la pub"
2825
-
2826
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:29
2827
- msgid "Ad Slot ID"
2828
- msgstr "ID de l’emplacement de pub"
2829
-
2830
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:37
2831
- #, php-format
2832
- msgid "Publisher ID: %s"
2833
- msgstr "ID de l’éditeur (Publisher ID): %s"
2834
-
2835
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:44
2836
- #, php-format
2837
- msgid "Please <a href=\"%s\" target=\"_blank\">change it here</a>."
2838
- msgstr "S’il vous plaît <a href=\"%s\" target=\"_blank\">changez le ici</a>."
2839
-
2840
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:50
2841
- msgid "Normal"
2842
- msgstr "Normal"
2843
-
2844
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:55
2845
- #, php-format
2846
- msgid ""
2847
- "Use the <a href=\"%s\" target=\"_blank\">Responsive add-on</a> in order to "
2848
- "define the exact creative for each browser width."
2849
- msgstr ""
2850
- "Utilisez le <a href=\"%s\" target=\"_blank\">Responsive add-on</a> afin de "
2851
- "définir la création exacte pour chaque largeur de navigateur."
2852
-
2853
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:60
2854
- msgid "Resizing"
2855
- msgstr "Redimensionnement"
2856
-
2857
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:72
2858
- msgid "Copy the ad code from your AdSense account and paste it in the area below"
2859
- msgstr ""
2860
- "Copiez le code de pub de votre compte AdSense et collez-le dans la zone ci-"
2861
- "dessous"
2862
-
2863
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:75
2864
- msgid "Get details"
2865
- msgstr "Plus de Détails"
2866
-
2867
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:76
2868
- msgid "Close"
2869
- msgstr "Fermer"
2870
-
2871
- #: ../modules/gadsense/includes/class-ad-type-adsense.php:35
2872
- msgid "AdSense ad"
2873
- msgstr "Pub AdSense"
2874
-
2875
- #: ../modules/gadsense/includes/class-ad-type-adsense.php:36
2876
- msgid "Use ads from your Google AdSense account"
2877
- msgstr "Utiliser les pubs de votre compte Google AdSense"
2878
-
2879
- #: ../modules/gadsense/includes/class-ad-type-adsense.php:105
2880
- msgid "Your AdSense Publisher ID is missing."
2881
- msgstr "Votre identifiant d’éditeur (Publisher ID) AdSense est manquant."
2882
-
2883
- #: ../modules/gadsense/includes/class-gadsense-data.php:46
2884
- msgid "Auto"
2885
- msgstr "Auto"
2886
-
2887
- #: ../public/class-advanced-ads.php:309
2888
- msgid "Advanced Ads Error following:"
2889
- msgstr "Erreur d’Advanced Ads suivante :"
2890
-
2891
- #: ../public/class-advanced-ads.php:312
2892
- #, php-format
2893
- msgid "Advanced Ads Error: %s"
2894
- msgstr "Erreur Advanced Ads: %s"
2895
-
2896
- #: ../public/class-advanced-ads.php:553
2897
- msgctxt "ad group general name"
2898
- msgid "Ad Groups"
2899
- msgstr "Groupes de pubs"
2900
-
2901
- #: ../public/class-advanced-ads.php:554
2902
- msgctxt "ad group singular name"
2903
- msgid "Ad Group"
2904
- msgstr "Groupe de pubs"
2905
-
2906
- #: ../public/class-advanced-ads.php:555
2907
- msgid "Search Ad Groups"
2908
- msgstr "Rechercher des groupes de pubs"
2909
-
2910
- #: ../public/class-advanced-ads.php:556
2911
- msgid "All Ad Groups"
2912
- msgstr "Tous les groupes de pubs"
2913
-
2914
- #: ../public/class-advanced-ads.php:557
2915
- msgid "Parent Ad Groups"
2916
- msgstr "Groupes de pubs parents"
2917
-
2918
- #: ../public/class-advanced-ads.php:558
2919
- msgid "Parent Ad Groups:"
2920
- msgstr "Groupes de pubs parents :"
2921
-
2922
- #: ../public/class-advanced-ads.php:559
2923
- msgid "Edit Ad Group"
2924
- msgstr "Modifier le groupe de pubs"
2925
-
2926
- #: ../public/class-advanced-ads.php:560
2927
- msgid "Update Ad Group"
2928
- msgstr "Mettre à jour le groupe de pubs"
2929
-
2930
- #: ../public/class-advanced-ads.php:561
2931
- msgid "Add New Ad Group"
2932
- msgstr "Ajouter un nouveau groupe de pubs"
2933
-
2934
- #: ../public/class-advanced-ads.php:562
2935
- msgid "New Ad Groups Name"
2936
- msgstr "Nouveau nom de groupes de pubs"
2937
-
2938
- #: ../public/class-advanced-ads.php:564
2939
- msgid "No Ad Group found"
2940
- msgstr "Aucun groupe de pubs trouvé"
2941
-
2942
- #: ../public/class-advanced-ads.php:595
2943
- msgid "Edit Ad"
2944
- msgstr "Modifier la pub"
2945
-
2946
- #: ../public/class-advanced-ads.php:597
2947
- msgid "View"
2948
- msgstr "Voir"
2949
-
2950
- #: ../public/class-advanced-ads.php:598
2951
- msgid "View the Ad"
2952
- msgstr "Voir la pub"
2953
-
2954
- #: ../public/class-advanced-ads.php:599
2955
- msgid "Search Ads"
2956
- msgstr "Rechercher des pubs"
2957
-
2958
- #: ../public/class-advanced-ads.php:600
2959
- msgid "No Ads found"
2960
- msgstr "Aucune pub n’a été trouvée"
2961
-
2962
- #: ../public/class-advanced-ads.php:601
2963
- msgid "No Ads found in Trash"
2964
- msgstr "Aucune pub n’a été trouvée dans la corbeille"
2965
-
2966
- #: ../public/class-advanced-ads.php:602
2967
- msgid "Parent Ad"
2968
- msgstr "Pub parente"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/advanced-ads-it_IT.mo DELETED
Binary file
languages/advanced-ads-it_IT.po DELETED
@@ -1,2677 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: Advanved Ads\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2015-01-27 16:47+0100\n"
6
- "PO-Revision-Date: Tue Apr 26 2016 18:47:39 GMT+0200 (CEST)\n"
7
- "Last-Translator: admin <post@webzunft.de>\n"
8
- "Language-Team: webgilde <thomas.maier@webgilde.com>\n"
9
- "Language: Italian\n"
10
- "Plural-Forms: nplurals=2; plural=n != 1\n"
11
- "MIME-Version: 1.0\n"
12
- "Content-Type: text/plain; charset=UTF-8\n"
13
- "Content-Transfer-Encoding: 8bit\n"
14
- "X-Poedit-SourceCharset: UTF-8\n"
15
- "X-Generator: Loco - https://localise.biz/\n"
16
- "X-Poedit-Basepath: ..\n"
17
- "X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;"
18
- "__:1;_e:1;_c:1;_n:1,2;_n_noop:1,2;_nc:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
19
- "_x:1,2c;_ex:1,2c;_nx:1,2,4c;_nx_noop:1,2,3c;_n_js:1,2;_nx_js:1,2,3c;"
20
- "esc_attr__:1;esc_html__:1;esc_attr_e:1;esc_html_e:1;esc_attr_x:1,2c;"
21
- "esc_html_x:1,2c;comments_number_link:2,3;t:1;st:1;trans:1;transChoice:1,2\n"
22
- "X-Poedit-SearchPath-0: .\n"
23
- "X-Loco-Target-Locale: it_IT"
24
-
25
- #. URI of the plugin
26
- msgid "https://wpadvancedads.com"
27
- msgstr ""
28
-
29
- #. Description of the plugin
30
- msgid "Manage and optimize your ads in WordPress"
31
- msgstr ""
32
-
33
- #. Author of the plugin
34
- msgid "Thomas Maier"
35
- msgstr ""
36
-
37
- #. Author URI of the plugin
38
- msgid "http://webgilde.com"
39
- msgstr ""
40
-
41
- #: ../admin/class-advanced-ads-admin.php:212 ../classes/display-conditions.php:
42
- #: 171 ../classes/visitor-conditions.php:214
43
- msgid "or"
44
- msgstr ""
45
-
46
- #: ../admin/class-advanced-ads-admin.php:213 ../admin/views/ad-display-metabox.
47
- #: php:76 ../admin/views/ad-visitor-metabox.php:68 ../classes/display-conditions.
48
- #: php:171 ../classes/visitor-conditions.php:214
49
- msgid "and"
50
- msgstr ""
51
-
52
- #: ../admin/class-advanced-ads-admin.php:309 ../admin/class-advanced-ads-admin.
53
- #: php:309
54
- msgid "Advanced Ads Intro"
55
- msgstr ""
56
-
57
- #: ../admin/class-advanced-ads-admin.php:313 ../admin/class-advanced-ads-admin.
58
- #: php:313 ../admin/class-advanced-ads-admin.php:1987
59
- msgid "Support"
60
- msgstr ""
61
-
62
- #: ../admin/class-advanced-ads-admin.php:425
63
- msgid "Please enter a message"
64
- msgstr ""
65
-
66
- #: ../admin/class-advanced-ads-admin.php:435
67
- #, php-format
68
- msgid "Email could NOT be sent. Please contact us directly at %s."
69
- msgstr ""
70
-
71
- #: ../admin/class-advanced-ads-admin.php:438
72
- msgid "Please enter a valid email address"
73
- msgstr ""
74
-
75
- #: ../admin/class-advanced-ads-admin.php:464 ../admin/class-advanced-ads-admin.
76
- #: php:491
77
- msgid "Sorry, you are not allowed to access this feature."
78
- msgstr ""
79
-
80
- #: ../admin/class-advanced-ads-admin.php:477
81
- msgid ""
82
- "You attempted to edit an ad group that doesn&#8217;t exist. Perhaps it was "
83
- "deleted?"
84
- msgstr ""
85
-
86
- #: ../admin/class-advanced-ads-admin.php:598
87
- msgid "Layout / Output"
88
- msgstr ""
89
-
90
- #: ../admin/class-advanced-ads-admin.php:829 ../admin/class-advanced-ads-admin.
91
- #: php:830
92
- msgid "Ad updated."
93
- msgstr ""
94
-
95
- #. translators: %s: date and time of the revision
96
- #: ../admin/class-advanced-ads-admin.php:832
97
- #, php-format
98
- msgid "Ad restored to revision from %s"
99
- msgstr ""
100
-
101
- #: ../admin/class-advanced-ads-admin.php:833
102
- msgid "Ad published."
103
- msgstr ""
104
-
105
- #: ../admin/class-advanced-ads-admin.php:834
106
- msgid "Ad saved."
107
- msgstr ""
108
-
109
- #: ../admin/class-advanced-ads-admin.php:835
110
- msgid "Ad submitted."
111
- msgstr ""
112
-
113
- #: ../admin/class-advanced-ads-admin.php:837
114
- #, php-format
115
- msgid "Ad scheduled for: <strong>%1$s</strong>."
116
- msgstr ""
117
-
118
- #. translators: Publish box date format, see http://php.net/date
119
- #: ../admin/class-advanced-ads-admin.php:839
120
- msgid "M j, Y @ G:i"
121
- msgstr ""
122
-
123
- #: ../admin/class-advanced-ads-admin.php:841
124
- msgid "Ad draft updated."
125
- msgstr ""
126
-
127
- #: ../admin/class-advanced-ads-admin.php:860
128
- #, php-format
129
- msgid "%s ad updated."
130
- msgid_plural "%s ads updated."
131
- msgstr[0] ""
132
- msgstr[1] ""
133
-
134
- #: ../admin/class-advanced-ads-admin.php:861
135
- #, php-format
136
- msgid "%s ad not updated, somebody is editing it."
137
- msgid_plural "%s ads not updated, somebody is editing them."
138
- msgstr[0] ""
139
- msgstr[1] ""
140
-
141
- #: ../admin/class-advanced-ads-admin.php:862
142
- #, php-format
143
- msgid "%s ad permanently deleted."
144
- msgid_plural "%s ads permanently deleted."
145
- msgstr[0] ""
146
- msgstr[1] ""
147
-
148
- #: ../admin/class-advanced-ads-admin.php:863
149
- #, php-format
150
- msgid "%s ad moved to the Trash."
151
- msgid_plural "%s ads moved to the Trash."
152
- msgstr[0] ""
153
- msgstr[1] ""
154
-
155
- #: ../admin/class-advanced-ads-admin.php:864
156
- #, php-format
157
- msgid "%s ad restored from the Trash."
158
- msgid_plural "%s ads restored from the Trash."
159
- msgstr[0] ""
160
- msgstr[1] ""
161
-
162
- #: ../admin/class-advanced-ads-admin.php:911 ../admin/class-advanced-ads-admin.
163
- #: php:1015
164
- msgid "Licenses"
165
- msgstr ""
166
-
167
- #: ../admin/class-advanced-ads-admin.php:922
168
- msgid "Disable ads"
169
- msgstr ""
170
-
171
- #: ../admin/class-advanced-ads-admin.php:946
172
- msgid "Unlimited ad injection"
173
- msgstr ""
174
-
175
- #: ../admin/class-advanced-ads-admin.php:954
176
- msgid "Priority of content injection filter"
177
- msgstr ""
178
-
179
- #: ../admin/class-advanced-ads-admin.php:962
180
- msgid "Hide ads from bots"
181
- msgstr ""
182
-
183
- #: ../admin/class-advanced-ads-admin.php:970
184
- msgid "Disable notices"
185
- msgstr ""
186
-
187
- #: ../admin/class-advanced-ads-admin.php:978
188
- msgid "ID prefix"
189
- msgstr ""
190
-
191
- #: ../admin/class-advanced-ads-admin.php:986
192
- msgid "Remove Widget ID"
193
- msgstr ""
194
-
195
- #: ../admin/class-advanced-ads-admin.php:994
196
- msgid "Allow editors to manage ads"
197
- msgstr ""
198
-
199
- #: ../admin/class-advanced-ads-admin.php:1098
200
- msgid ""
201
- "<strong>notice: </strong>the file is currently enabled by an add-on that "
202
- "needs it."
203
- msgstr ""
204
-
205
- #: ../admin/class-advanced-ads-admin.php:1101
206
- #, php-format
207
- msgid ""
208
- "Enable advanced JavaScript functions (<a href=\"%s\" target=\"_blank\">here</a>)."
209
- " Some features and add-ons might override this setting if they need features "
210
- "from this file."
211
- msgstr ""
212
-
213
- #: ../admin/class-advanced-ads-admin.php:1114
214
- msgid ""
215
- "Some plugins and themes trigger ad injection where it shouldn’t happen. "
216
- "Therefore, Advanced Ads ignores injected placements on non-singular pages "
217
- "and outside the loop. However, this can cause problems with some themes. You "
218
- "can enable this option if you don’t see ads or want to enable ad injections "
219
- "on archive pages AT YOUR OWN RISK."
220
- msgstr ""
221
-
222
- #: ../admin/class-advanced-ads-admin.php:1130
223
- msgid ""
224
- "Please check your post content. A priority of 10 and below might cause "
225
- "issues (wpautop function might run twice)."
226
- msgstr ""
227
-
228
- #: ../admin/class-advanced-ads-admin.php:1132
229
- msgid ""
230
- "Play with this value in order to change the priority of the injected ads "
231
- "compared to other auto injected elements in the post content."
232
- msgstr ""
233
-
234
- #: ../admin/class-advanced-ads-admin.php:1146
235
- #, php-format
236
- msgid ""
237
- "Hide ads from crawlers, bots and empty user agents. Also prevents counting "
238
- "impressions for bots when using the <a href=\"%s\" target=\"_blank\">Tracking "
239
- "Add-On</a>."
240
- msgstr ""
241
-
242
- #: ../admin/class-advanced-ads-admin.php:1147
243
- msgid ""
244
- "Disabling this option only makes sense if your ads contain content you want "
245
- "to display to bots (like search engines) or your site is cached and bots "
246
- "could create a cached version without the ads."
247
- msgstr ""
248
-
249
- #: ../admin/class-advanced-ads-admin.php:1160
250
- msgid ""
251
- "Disable internal notices like tips, tutorials, email newsletters and update "
252
- "notices. Disabling notices is recommended if you run multiple blogs with "
253
- "Advanced Ads already."
254
- msgstr ""
255
-
256
- #: ../admin/class-advanced-ads-admin.php:1177
257
- msgid ""
258
- "Prefix of class or id attributes in the frontend. Change it if you don’t "
259
- "want <strong>ad blockers</strong> to mark these blocks as ads.<br/>You might "
260
- "need to <strong>rewrite css rules afterwards</strong>."
261
- msgstr ""
262
-
263
- #: ../admin/class-advanced-ads-admin.php:1198
264
- msgid ""
265
- "Remove the ID attribute from widgets in order to not make them an easy "
266
- "target of ad blockers."
267
- msgstr ""
268
-
269
- #: ../admin/class-advanced-ads-admin.php:1201
270
- msgid ""
271
- "If checked, the Advanced Ads Widget will not work with the fixed option of "
272
- "the <strong>Q2W3 Fixed Widget</strong> plugin."
273
- msgstr ""
274
-
275
- #: ../admin/class-advanced-ads-admin.php:1223
276
- msgid "Allow editors to also manage and publish ads."
277
- msgstr ""
278
-
279
- #: ../admin/class-advanced-ads-admin.php:1224
280
- #, php-format
281
- msgid ""
282
- "You can assign different ad-related roles on a user basis with <a href=\"%s\" "
283
- "target=\"_blank\">Advanced Ads Pro</a>."
284
- msgstr ""
285
-
286
- #: ../admin/class-advanced-ads-admin.php:1281
287
- msgid "Ad Details"
288
- msgstr ""
289
-
290
- #: ../admin/class-advanced-ads-admin.php:1282
291
- msgid "Ad Planning"
292
- msgstr ""
293
-
294
- #: ../admin/class-advanced-ads-admin.php:1417
295
- msgid "Ad Settings"
296
- msgstr ""
297
-
298
- #: ../admin/class-advanced-ads-admin.php:1496 ../admin/views/overview.php:23
299
- msgid "Ads Dashboard"
300
- msgstr ""
301
-
302
- #: ../admin/class-advanced-ads-admin.php:1508
303
- msgid "From the ad optimization universe"
304
- msgstr ""
305
-
306
- #: ../admin/class-advanced-ads-admin.php:1517
307
- msgid "Advanced Ads Tutorials"
308
- msgstr ""
309
-
310
- #: ../admin/class-advanced-ads-admin.php:1528
311
- #, php-format
312
- msgid "%d ads – <a href=\"%s\">manage</a> - <a href=\"%s\">new</a>"
313
- msgstr ""
314
-
315
- #: ../admin/class-advanced-ads-admin.php:1539
316
- msgid "plugin manual and homepage"
317
- msgstr ""
318
-
319
- #: ../admin/class-advanced-ads-admin.php:1546
320
- msgid "Get the tutorial via email"
321
- msgstr ""
322
-
323
- #: ../admin/class-advanced-ads-admin.php:1553
324
- msgid "Get AdSense tips via email"
325
- msgstr ""
326
-
327
- #: ../admin/class-advanced-ads-admin.php:1643
328
- #, php-format
329
- msgid "time of %s"
330
- msgstr ""
331
-
332
- #: ../admin/class-advanced-ads-admin.php:1679
333
- msgid "Error while trying to register the license. Please contact support."
334
- msgstr ""
335
-
336
- #: ../admin/class-advanced-ads-admin.php:1684 ../admin/views/setting-license.php:37
337
- msgid "Please enter a valid license key"
338
- msgstr ""
339
-
340
- #: ../admin/class-advanced-ads-admin.php:1710
341
- msgid "License couldn’t be activated. Please try again later."
342
- msgstr ""
343
-
344
- #: ../admin/class-advanced-ads-admin.php:1722
345
- msgid "This is the bundle license key."
346
- msgstr ""
347
-
348
- #: ../admin/class-advanced-ads-admin.php:1723
349
- msgid "This is not the correct key for this add-on."
350
- msgstr ""
351
-
352
- #: ../admin/class-advanced-ads-admin.php:1724
353
- msgid "There are no activations left."
354
- msgstr ""
355
-
356
- #: ../admin/class-advanced-ads-admin.php:1733
357
- #, php-format
358
- msgid "License is invalid. Reason: %s"
359
- msgstr ""
360
-
361
- #: ../admin/class-advanced-ads-admin.php:1787
362
- msgid "Error while trying to disable the license. Please contact support."
363
- msgstr ""
364
-
365
- #: ../admin/class-advanced-ads-admin.php:1810 ../admin/class-advanced-ads-admin.
366
- #: php:1827
367
- msgid "License couldn’t be deactivated. Please try again later."
368
- msgstr ""
369
-
370
- #: ../admin/class-advanced-ads-admin.php:1991
371
- msgid "Add-Ons"
372
- msgstr ""
373
-
374
- #: ../admin/includes/class-ad-groups-list.php:164 ../admin/views/ad-list-timing-
375
- #: column.php:4
376
- #, php-format
377
- msgid "starts %s"
378
- msgstr ""
379
-
380
- #: ../admin/includes/class-ad-groups-list.php:183 ../admin/views/ad-list-timing-
381
- #: column.php:21
382
- #, php-format
383
- msgid "expires %s"
384
- msgstr ""
385
-
386
- #: ../admin/includes/class-ad-groups-list.php:185 ../admin/views/ad-list-timing-
387
- #: column.php:23
388
- #, php-format
389
- msgid "<strong>expired</strong> %s"
390
- msgstr ""
391
-
392
- #: ../admin/includes/class-ad-groups-list.php:198
393
- msgid "all published ads are displayed"
394
- msgstr ""
395
-
396
- #: ../admin/includes/class-ad-groups-list.php:200
397
- #, php-format
398
- msgid "up to %d ads displayed"
399
- msgstr ""
400
-
401
- #: ../admin/includes/class-ad-groups-list.php:203 ../admin/views/ad-group-list-
402
- #: form-row.php:37
403
- msgid "No ads assigned"
404
- msgstr ""
405
-
406
- #: ../admin/includes/class-ad-groups-list.php:251
407
- msgid "Random ads"
408
- msgstr ""
409
-
410
- #: ../admin/includes/class-ad-groups-list.php:252
411
- msgid "Display random ads based on ad weight"
412
- msgstr ""
413
-
414
- #: ../admin/includes/class-ad-groups-list.php:255
415
- msgid "Ordered ads"
416
- msgstr ""
417
-
418
- #: ../admin/includes/class-ad-groups-list.php:256
419
- msgid "Display ads with the highest ad weight first"
420
- msgstr ""
421
-
422
- #: ../admin/includes/class-ad-groups-list.php:276
423
- msgid "Usage"
424
- msgstr ""
425
-
426
- #: ../admin/includes/class-ad-groups-list.php:306
427
- msgid "Invalid Ad Group"
428
- msgstr ""
429
-
430
- #: ../admin/includes/class-ad-groups-list.php:311
431
- msgid "You don’t have permission to change the ad groups"
432
- msgstr ""
433
-
434
- #: ../admin/includes/class-notices.php:406
435
- #, php-format
436
- msgid ""
437
- "You don’t seem to have an email address. Please use <a href=\"%s\" "
438
- "target=\"_blank\">this form</a> to sign up."
439
- msgstr ""
440
-
441
- #: ../admin/includes/class-notices.php:424
442
- msgid "How embarrassing. The email server seems to be down. Please try again later."
443
- msgstr ""
444
-
445
- #: ../admin/includes/class-notices.php:429
446
- #, php-format
447
- msgid ""
448
- "Please check your email (%s) for the confirmation message. If you didn’t "
449
- "receive one or want to use another email address then please use <a "
450
- "href=\"%s\" target=\"_blank\">this form</a> to sign up."
451
- msgstr ""
452
-
453
- #: ../admin/includes/class-overview-widgets.php:45
454
- msgid "Tips and Tutorials"
455
- msgstr ""
456
-
457
- #: ../admin/includes/class-overview-widgets.php:47
458
- msgid "Setup and Optimization Help"
459
- msgstr ""
460
-
461
- #: ../admin/includes/class-overview-widgets.php:53
462
- msgid "Advanced Ads Pro"
463
- msgstr ""
464
-
465
- #: ../admin/includes/class-overview-widgets.php:55
466
- msgid "Tracking and Stats"
467
- msgstr ""
468
-
469
- #: ../admin/includes/class-overview-widgets.php:57
470
- msgid "Responsive and Mobile ads"
471
- msgstr ""
472
-
473
- #: ../admin/includes/class-overview-widgets.php:59
474
- msgid "Geo Targeting"
475
- msgstr ""
476
-
477
- #: ../admin/includes/class-overview-widgets.php:61
478
- msgid "Sticky ads"
479
- msgstr ""
480
-
481
- #: ../admin/includes/class-overview-widgets.php:63
482
- msgid "PopUps and Layers"
483
- msgstr ""
484
-
485
- #: ../admin/includes/class-overview-widgets.php:65
486
- msgid "Ad Slider"
487
- msgstr ""
488
-
489
- #: ../admin/includes/class-overview-widgets.php:83
490
- msgid "Get 2 <strong>free add-ons</strong> for joining the newsletter."
491
- msgstr ""
492
-
493
- #: ../admin/includes/class-overview-widgets.php:84
494
- msgid "Join now"
495
- msgstr ""
496
-
497
- #: ../admin/includes/class-overview-widgets.php:91
498
- msgid ""
499
- "Learn more about how and <strong>how much you can earn with AdSense</strong> "
500
- "and Advanced Ads from the dedicated newsletter group."
501
- msgstr ""
502
-
503
- #: ../admin/includes/class-overview-widgets.php:92 ../admin/includes/notices.php:
504
- #: 35 ../admin/views/intro.php:73 ../admin/views/notices/inline.php:3 ..
505
- #: admin/views/notices/subscribe.php:3
506
- msgid "Subscribe me now"
507
- msgstr ""
508
-
509
- #: ../admin/includes/class-overview-widgets.php:99
510
- msgid "Get the first steps and more tutorials to your inbox."
511
- msgstr ""
512
-
513
- #: ../admin/includes/class-overview-widgets.php:100
514
- msgid "Send it now"
515
- msgstr ""
516
-
517
- #: ../admin/includes/class-overview-widgets.php:138
518
- msgid "Next steps"
519
- msgstr ""
520
-
521
- #: ../admin/includes/class-overview-widgets.php:150
522
- #, php-format
523
- msgid "<a href=\"%s\" target=\"_blank\">Manual</a>"
524
- msgstr ""
525
-
526
- #: ../admin/includes/class-overview-widgets.php:151
527
- #, php-format
528
- msgid "<a href=\"%s\" target=\"_blank\">FAQ and Support</a>"
529
- msgstr ""
530
-
531
- #: ../admin/includes/class-overview-widgets.php:152
532
- #, php-format
533
- msgid "Vote for a <a href=\"%s\" target=\"_blank\">feature</a>"
534
- msgstr ""
535
-
536
- #: ../admin/includes/class-overview-widgets.php:153
537
- #, php-format
538
- msgid ""
539
- "Thank the developer with a &#9733;&#9733;&#9733;&#9733;&#9733; review on <a "
540
- "href=\"%s\" target=\"_blank\">wordpress.org</a>"
541
- msgstr ""
542
-
543
- #: ../admin/includes/class-overview-widgets.php:162
544
- msgid ""
545
- "Need help to set up and optimize your ads? Need custom coding on your site? "
546
- "Ask me for a quote."
547
- msgstr ""
548
-
549
- #: ../admin/includes/class-overview-widgets.php:163
550
- #, php-format
551
- msgid "Help with ads on %s"
552
- msgstr ""
553
-
554
- #: ../admin/includes/class-overview-widgets.php:164
555
- msgid "Get an offer"
556
- msgstr ""
557
-
558
- #: ../admin/includes/class-overview-widgets.php:172
559
- msgid "Ad management for advanced websites."
560
- msgstr ""
561
-
562
- #: ../admin/includes/class-overview-widgets.php:173
563
- msgid "Cache-busting"
564
- msgstr ""
565
-
566
- #: ../admin/includes/class-overview-widgets.php:174
567
- msgid "Advanced visitor conditions"
568
- msgstr ""
569
-
570
- #: ../admin/includes/class-overview-widgets.php:175
571
- msgid "Flash ads with fallback"
572
- msgstr ""
573
-
574
- #: ../admin/includes/class-overview-widgets.php:177
575
- msgid "Get Pro"
576
- msgstr ""
577
-
578
- #: ../admin/includes/class-overview-widgets.php:185
579
- msgid "Track the impressions of and clicks on your ads."
580
- msgstr ""
581
-
582
- #: ../admin/includes/class-overview-widgets.php:186
583
- msgid "2 methods to count impressions"
584
- msgstr ""
585
-
586
- #: ../admin/includes/class-overview-widgets.php:187
587
- msgid "beautiful stats for all or single ads"
588
- msgstr ""
589
-
590
- #: ../admin/includes/class-overview-widgets.php:188
591
- msgid "group stats by day, week or month"
592
- msgstr ""
593
-
594
- #: ../admin/includes/class-overview-widgets.php:190
595
- msgid "Get the Tracking add-on"
596
- msgstr ""
597
-
598
- #: ../admin/includes/class-overview-widgets.php:198
599
- msgid "Display ads based on the size of your visitor’s browser or device."
600
- msgstr ""
601
-
602
- #: ../admin/includes/class-overview-widgets.php:199
603
- msgid "set a range (from … to …) pixels for the browser size"
604
- msgstr ""
605
-
606
- #: ../admin/includes/class-overview-widgets.php:200
607
- msgid "set custom sizes for AdSense responsive ads"
608
- msgstr ""
609
-
610
- #: ../admin/includes/class-overview-widgets.php:201
611
- msgid "list all ads by their responsive settings"
612
- msgstr ""
613
-
614
- #: ../admin/includes/class-overview-widgets.php:203
615
- msgid "Get the Responsive add-on"
616
- msgstr ""
617
-
618
- #: ../admin/includes/class-overview-widgets.php:211
619
- msgid "Target visitors by their geo location."
620
- msgstr ""
621
-
622
- #: ../admin/includes/class-overview-widgets.php:213
623
- msgid "Get the Geo Targeting add-on"
624
- msgstr ""
625
-
626
- #: ../admin/includes/class-overview-widgets.php:221 ../admin/views/ad-info-top.
627
- #: php:30
628
- msgid ""
629
- "Fix ads to the browser while users are scrolling and create best performing "
630
- "anchor ads."
631
- msgstr ""
632
-
633
- #: ../admin/includes/class-overview-widgets.php:222
634
- msgid "position ads that don’t scroll with the screen"
635
- msgstr ""
636
-
637
- #: ../admin/includes/class-overview-widgets.php:223
638
- msgid "build anchor ads not only on mobile devices"
639
- msgstr ""
640
-
641
- #: ../admin/includes/class-overview-widgets.php:225 ../admin/views/ad-info-top.
642
- #: php:32
643
- msgid "Get the Sticky add-on"
644
- msgstr ""
645
-
646
- #: ../admin/includes/class-overview-widgets.php:233 ../admin/views/ad-info-top.
647
- #: php:37
648
- msgid "Display content and ads in layers and popups on custom events."
649
- msgstr ""
650
-
651
- #: ../admin/includes/class-overview-widgets.php:234
652
- msgid "display a popup after a user interaction like scrolling"
653
- msgstr ""
654
-
655
- #: ../admin/includes/class-overview-widgets.php:235
656
- msgid "optional background overlay"
657
- msgstr ""
658
-
659
- #: ../admin/includes/class-overview-widgets.php:236
660
- msgid "allow users to close the popup"
661
- msgstr ""
662
-
663
- #: ../admin/includes/class-overview-widgets.php:238 ../admin/views/ad-info-top.
664
- #: php:39
665
- msgid "Get the PopUp and Layer add-on"
666
- msgstr ""
667
-
668
- #: ../admin/includes/class-overview-widgets.php:246
669
- msgid "Create a beautiful and simple slider from your ads."
670
- msgstr ""
671
-
672
- #: ../admin/includes/class-overview-widgets.php:248
673
- msgid "Get the Slider add-on"
674
- msgstr ""
675
-
676
- #: ../admin/includes/notices.php:14
677
- #, php-format
678
- msgid ""
679
- "Advanced Ads successfully installed. Take a look at the <a href=\"%s\">First "
680
- "Steps</a>."
681
- msgstr ""
682
-
683
- #: ../admin/includes/notices.php:20
684
- msgid ""
685
- "Thank you for activating <strong>Advanced Ads</strong>. Would you like to "
686
- "receive the first steps via email?"
687
- msgstr ""
688
-
689
- #: ../admin/includes/notices.php:21
690
- msgid "Yes, send it"
691
- msgstr ""
692
-
693
- #: ../admin/includes/notices.php:27
694
- msgid ""
695
- "Thank you for using <strong>Advanced Ads</strong>. Stay informed and receive "
696
- "<strong>2 free add-ons</strong> for joining the newsletter."
697
- msgstr ""
698
-
699
- #: ../admin/includes/notices.php:28
700
- msgid "Add me now"
701
- msgstr ""
702
-
703
- #: ../admin/includes/notices.php:34
704
- msgid ""
705
- "Learn more about how and <strong>how much you can earn with AdSense</strong> "
706
- "and Advanced Ads from my dedicated newsletter."
707
- msgstr ""
708
-
709
- #: ../admin/includes/notices.php:61
710
- msgid ""
711
- "One or more license keys for <strong>Advanced Ads add-ons are invalid or "
712
- "missing</strong>."
713
- msgstr ""
714
-
715
- #: ../admin/includes/notices.php:61
716
- #, php-format
717
- msgid "Please add valid license keys <a href=\"%s\">here</a>."
718
- msgstr ""
719
-
720
- #: ../admin/includes/notices.php:67
721
- #, php-format
722
- msgid ""
723
- "One or more licenses for your <strong>Advanced Ads add-ons are expiring "
724
- "soon</strong>. Don’t risk to lose support and updates and renew your license "
725
- "before it expires with a significant discount on <a href=\"%s\" "
726
- "target=\"_blank\">the add-on page</a>."
727
- msgstr ""
728
-
729
- #: ../admin/includes/notices.php:73 ../admin/views/support.php:28
730
- #, php-format
731
- msgid ""
732
- "<strong>Advanced Ads</strong> license(s) expired. Support and updates are "
733
- "disabled. Please visit <a href=\"%s\"> the license page</a> for more "
734
- "information."
735
- msgstr ""
736
-
737
- #: ../admin/includes/notices.php:79
738
- #, php-format
739
- msgid ""
740
- "<img src=\"%3$s\" alt=\"Thomas\" width=\"80\" height=\"115\" class=\"advads-review-"
741
- "image\"/>You are using <strong>Advanced Ads</strong> for some time now. Thank "
742
- "you! If you need my help then please visit the <a href=\"%1$s\" "
743
- "target=\"_blank\">Support page</a> to get free help.</p><h3>Thanks for your "
744
- "Review</h3><p>If you share my passion and find Advanced Ads useful then "
745
- "please <a href=\"%2$s\" target=\"_blank\">leave a 5-star review on wordpress."
746
- "org</a>.</p><p><em>Thomas</em>"
747
- msgstr ""
748
-
749
- #: ../admin/includes/notices.php:85
750
- #, php-format
751
- msgid ""
752
- "Some assets were changed. Please <strong>rebuild the asset folder</strong> "
753
- "in the <a href=\"%s\">Advanced Ads settings</a> to update the ad blocker "
754
- "disguise."
755
- msgstr ""
756
-
757
- #: ../admin/includes/shortcode-creator-l10n.php:10
758
- msgctxt "shortcode creator"
759
- msgid "Add an ad"
760
- msgstr ""
761
-
762
- #: ../admin/includes/shortcode-creator-l10n.php:11
763
- msgctxt "shortcode creator"
764
- msgid "Add shortcode"
765
- msgstr ""
766
-
767
- #: ../admin/includes/shortcode-creator-l10n.php:12
768
- msgctxt "shortcode creator"
769
- msgid "Cancel"
770
- msgstr ""
771
-
772
- #: ../admin/views/ad-display-metabox.php:6
773
- msgid "Set Display Conditions to allow or hide the ad on specific pages."
774
- msgstr ""
775
-
776
- #: ../admin/views/ad-display-metabox.php:6 ../admin/views/ad-output-metabox.php:
777
- #: 46 ../admin/views/ad-visitor-metabox.php:4
778
- msgid "Manual"
779
- msgstr ""
780
-
781
- #: ../admin/views/ad-display-metabox.php:8 ../admin/views/notices/jqueryui_error.
782
- #: php:2
783
- #, php-format
784
- msgid ""
785
- "There might be a problem with layouts and scripts in your dashboard. Please "
786
- "check <a href=\"%s\" target=\"_blank\">this article to learn more</a>."
787
- msgstr ""
788
-
789
- #: ../admin/views/ad-display-metabox.php:42 ../admin/views/ad-visitor-metabox.php:
790
- #: 34
791
- msgid "New condition"
792
- msgstr ""
793
-
794
- #: ../admin/views/ad-display-metabox.php:45 ../admin/views/ad-visitor-metabox.php:
795
- #: 37
796
- msgid "-- choose a condition --"
797
- msgstr ""
798
-
799
- #: ../admin/views/ad-display-metabox.php:50 ../admin/views/ad-visitor-metabox.php:
800
- #: 42
801
- msgid "add"
802
- msgstr ""
803
-
804
- #: ../admin/views/ad-group-list-form-row.php:5
805
- msgid "Description"
806
- msgstr ""
807
-
808
- #: ../admin/views/ad-group-list-form-row.php:16
809
- msgid "Number of visible ads"
810
- msgstr ""
811
-
812
- #: ../admin/views/ad-group-list-form-row.php:22
813
- msgctxt "option to display all ads in an ad groups"
814
- msgid "all"
815
- msgstr ""
816
-
817
- #: ../admin/views/ad-group-list-form-row.php:25
818
- msgid "Number of ads that are visible at the same time"
819
- msgstr ""
820
-
821
- #: ../admin/views/ad-group-list-form-row.php:32
822
- msgid "weight"
823
- msgstr ""
824
-
825
- #: ../admin/views/ad-group-list-header.php:4
826
- msgid "Details"
827
- msgstr ""
828
-
829
- #: ../admin/views/ad-group-list-row.php:14
830
- #, php-format
831
- msgid "Learn more about using groups in the <a href=\"%s\" target=\"_blank\">manual</a>."
832
- msgstr ""
833
-
834
- #: ../admin/views/ad-group-list-row.php:19
835
- #, php-format
836
- msgid "Type: %s"
837
- msgstr ""
838
-
839
- #: ../admin/views/ad-group-list-row.php:20
840
- #, php-format
841
- msgid "ID: %s"
842
- msgstr ""
843
-
844
- #: ../admin/views/ad-group.php:18
845
- msgid "Ad Groups successfully updated"
846
- msgstr ""
847
-
848
- #: ../admin/views/ad-group.php:87
849
- msgid "Update Groups"
850
- msgstr ""
851
-
852
- #: ../admin/views/ad-info-top.php:4
853
- msgid "Cool, you just published an ad. What now?"
854
- msgstr ""
855
-
856
- #: ../admin/views/ad-info-top.php:5
857
- msgid "Display the ad in …"
858
- msgstr ""
859
-
860
- #: ../admin/views/ad-info-top.php:7
861
- msgid "… every post or page"
862
- msgstr ""
863
-
864
- #: ../admin/views/ad-info-top.php:9
865
- msgid "Use placements to inject the ad automatically into posts and pages."
866
- msgstr ""
867
-
868
- #: ../admin/views/ad-info-top.php:10
869
- msgid "Configure Placements"
870
- msgstr ""
871
-
872
- #: ../admin/views/ad-info-top.php:12
873
- msgid "… Sidebar or Widget Area"
874
- msgstr ""
875
-
876
- #: ../admin/views/ad-info-top.php:14
877
- msgid "Use the <em>Advanced Ads</em> Widget to display ads in your sidebars."
878
- msgstr ""
879
-
880
- #: ../admin/views/ad-info-top.php:15
881
- msgid "Configure a Widget"
882
- msgstr ""
883
-
884
- #: ../admin/views/ad-info-top.php:17
885
- msgid "… a few hand selected posts or pages"
886
- msgstr ""
887
-
888
- #: ../admin/views/ad-info-top.php:19
889
- msgid ""
890
- "Use the shortcode below to manually place the ad in the content editor of "
891
- "posts and pages."
892
- msgstr ""
893
-
894
- #: ../admin/views/ad-info-top.php:22
895
- msgid "… in a custom position in your theme"
896
- msgstr ""
897
-
898
- #: ../admin/views/ad-info-top.php:24
899
- msgid ""
900
- "Use the function below to manually place the ad into your template files. "
901
- "This method is needed for more advanced placements like in the header of "
902
- "your theme."
903
- msgstr ""
904
-
905
- #: ../admin/views/ad-info-top.php:27
906
- msgid "… in an anchor ad or pop-up"
907
- msgstr ""
908
-
909
- #: ../admin/views/ad-info-top.php:34
910
- msgid "You find the settings for the Sticky Ads below."
911
- msgstr ""
912
-
913
- #: ../admin/views/ad-info-top.php:41
914
- msgid "You find the settings for the Layer and PopUp effects below."
915
- msgstr ""
916
-
917
- #: ../admin/views/ad-info-top.php:46
918
- #, php-format
919
- msgid ""
920
- "Learn more about your choices to display an ad in the <a href=\"%s\" "
921
- "target=\"_blank\">manual</a>."
922
- msgstr ""
923
-
924
- #: ../admin/views/ad-info.php:5
925
- msgid "theme function"
926
- msgstr ""
927
-
928
- #: ../admin/views/ad-info.php:7
929
- #, php-format
930
- msgid "Find more display options in the <a href=\"%s\" target=\"_blank\">manual</a>."
931
- msgstr ""
932
-
933
- #: ../admin/views/ad-info.php:12
934
- msgid "click to change"
935
- msgstr ""
936
-
937
- #: ../admin/views/ad-info.php:16
938
- msgid "Add a description"
939
- msgstr ""
940
-
941
- #: ../admin/views/ad-info.php:19
942
- msgid "Internal description or your own notes about this ad."
943
- msgstr ""
944
-
945
- #: ../admin/views/ad-list-filters.php:2
946
- msgid "all ad types"
947
- msgstr ""
948
-
949
- #: ../admin/views/ad-list-filters.php:5
950
- msgid "all ad sizes"
951
- msgstr ""
952
-
953
- #: ../admin/views/ad-list-filters.php:8
954
- msgid "all ad dates"
955
- msgstr ""
956
-
957
- #: ../admin/views/ad-list-filters.php:9
958
- msgid "expired"
959
- msgstr ""
960
-
961
- #: ../admin/views/ad-list-filters.php:10
962
- msgid "any expiry date"
963
- msgstr ""
964
-
965
- #: ../admin/views/ad-list-filters.php:11
966
- msgid "planned"
967
- msgstr ""
968
-
969
- #: ../admin/views/ad-list-filters.php:14
970
- msgid "all ad groups"
971
- msgstr ""
972
-
973
- #: ../admin/views/ad-output-metabox.php:1
974
- msgid "Everything connected to the ads layout and output."
975
- msgstr ""
976
-
977
- #: ../admin/views/ad-output-metabox.php:8
978
- msgid "left"
979
- msgstr ""
980
-
981
- #: ../admin/views/ad-output-metabox.php:11
982
- msgid "center"
983
- msgstr ""
984
-
985
- #: ../admin/views/ad-output-metabox.php:19
986
- msgid ""
987
- "Check this if you don't want the following elements to float around the ad. "
988
- "(adds a clearfix)"
989
- msgstr ""
990
-
991
- #: ../admin/views/ad-output-metabox.php:22
992
- msgid "Margin"
993
- msgstr ""
994
-
995
- #: ../admin/views/ad-output-metabox.php:23
996
- msgid "top:"
997
- msgstr ""
998
-
999
- #: ../admin/views/ad-output-metabox.php:27
1000
- msgid "bottom:"
1001
- msgstr ""
1002
-
1003
- #: ../admin/views/ad-output-metabox.php:29
1004
- msgid "left:"
1005
- msgstr ""
1006
-
1007
- #: ../admin/views/ad-output-metabox.php:31
1008
- msgid "tip: use this to add a margin around the ad"
1009
- msgstr ""
1010
-
1011
- #: ../admin/views/ad-output-metabox.php:33
1012
- msgid "container ID"
1013
- msgstr ""
1014
-
1015
- #: ../admin/views/ad-output-metabox.php:36
1016
- msgid "Specify the id of the ad container. Leave blank for random or no id."
1017
- msgstr ""
1018
-
1019
- #: ../admin/views/ad-output-metabox.php:38
1020
- msgid "container classes"
1021
- msgstr ""
1022
-
1023
- #: ../admin/views/ad-output-metabox.php:41
1024
- msgid ""
1025
- "Specify one or more classes for the container. Separate multiple classes "
1026
- "with a space"
1027
- msgstr ""
1028
-
1029
- #: ../admin/views/ad-output-metabox.php:44
1030
- msgid "Enable debug mode"
1031
- msgstr ""
1032
-
1033
- #: ../admin/views/ad-parameters-size.php:6
1034
- msgid "reserve this space"
1035
- msgstr ""
1036
-
1037
- #: ../admin/views/ad-submitbox-meta.php:6
1038
- msgid "Set expiry date"
1039
- msgstr ""
1040
-
1041
- #: ../admin/views/ad-submitbox-meta.php:12
1042
- msgid "Month"
1043
- msgstr ""
1044
-
1045
- #: ../admin/views/ad-submitbox-meta.php:16
1046
- #, php-format
1047
- msgctxt "1: month number (01, 02, etc.), 2: month abbreviation"
1048
- msgid "%1$s-%2$s"
1049
- msgstr ""
1050
-
1051
- #: ../admin/views/ad-submitbox-meta.php:21
1052
- msgid "Day"
1053
- msgstr ""
1054
-
1055
- #: ../admin/views/ad-submitbox-meta.php:22
1056
- msgid "Year"
1057
- msgstr ""
1058
-
1059
- #: ../admin/views/ad-submitbox-meta.php:23
1060
- msgid "Hour"
1061
- msgstr ""
1062
-
1063
- #: ../admin/views/ad-submitbox-meta.php:24
1064
- msgid "Minute"
1065
- msgstr ""
1066
-
1067
- #: ../admin/views/ad-submitbox-meta.php:29
1068
- #, php-format
1069
- msgctxt "order of expiry date fields 1: month, 2: day, 3: year, 4: hour, 5: minute"
1070
- msgid "%1$s %2$s, %3$s @ %4$s %5$s"
1071
- msgstr ""
1072
-
1073
- #: ../admin/views/ad-visitor-metabox.php:28
1074
- msgid ""
1075
- "Visitor conditions limit the number of users who can see your ad. There is "
1076
- "no need to set visitor conditions if you want all users to see the ad."
1077
- msgstr ""
1078
-
1079
- #: ../admin/views/ad-visitor-metabox.php:30
1080
- #, php-format
1081
- msgid ""
1082
- "Check out cache-busting in <a href=\"%s\" target=\"_blank\">Advanced Ads Pro</a> "
1083
- "if dynamic features get cached."
1084
- msgstr ""
1085
-
1086
- #: ../admin/views/ad-visitor-metabox.php:47
1087
- #, php-format
1088
- msgid ""
1089
- "Define the exact browser width for which an ad should be visible using the "
1090
- "<a href=\"%s\" target=\"_blank\">Responsive add-on</a>."
1091
- msgstr ""
1092
-
1093
- #: ../admin/views/ad-visitor-metabox.php:92
1094
- msgid ""
1095
- "The visitor conditions below are deprecated. Please use the new version of "
1096
- "visitor conditions to replace it."
1097
- msgstr ""
1098
-
1099
- #: ../admin/views/feedback_disable.php:3
1100
- msgid "Thank you for helping to improve Advanced Ads."
1101
- msgstr ""
1102
-
1103
- #: ../admin/views/feedback_disable.php:4
1104
- msgid ""
1105
- "Your feedback will motivates me to work harder towards a professional ad "
1106
- "management solution."
1107
- msgstr ""
1108
-
1109
- #: ../admin/views/feedback_disable.php:5
1110
- msgid "Why did you decide to disable Advanced Ads?"
1111
- msgstr ""
1112
-
1113
- #: ../admin/views/feedback_disable.php:7
1114
- msgid "I stopped showing ads on my site"
1115
- msgstr ""
1116
-
1117
- #: ../admin/views/feedback_disable.php:8
1118
- #, php-format
1119
- msgid "I miss a feature or <a href=\"%s\">add-on</a>"
1120
- msgstr ""
1121
-
1122
- #: ../admin/views/feedback_disable.php:9
1123
- msgid "I have a technical problem"
1124
- msgstr ""
1125
-
1126
- #: ../admin/views/feedback_disable.php:10
1127
- msgid "other reason"
1128
- msgstr ""
1129
-
1130
- #: ../admin/views/feedback_disable.php:12
1131
- msgid "Please specify, if possible"
1132
- msgstr ""
1133
-
1134
- #: ../admin/views/feedback_disable.php:13
1135
- msgid "What would be a reason to return to Advanced Ads?"
1136
- msgstr ""
1137
-
1138
- #: ../admin/views/intro.php:18
1139
- msgid "5-Star Usability"
1140
- msgstr ""
1141
-
1142
- #: ../admin/views/intro.php:19
1143
- msgid ""
1144
- "Advanced Ads is powerful and easy to use, because it is build on WordPress "
1145
- "standards. If you know how to publish a post then you know how to create an "
1146
- "ad."
1147
- msgstr ""
1148
-
1149
- #: ../admin/views/intro.php:23
1150
- msgid "5-Star Support"
1151
- msgstr ""
1152
-
1153
- #: ../admin/views/intro.php:24
1154
- msgid ""
1155
- "I promise you the best supported ad management plugin for WordPress. Whether "
1156
- "a pro user or not, you can reach me easily through the support page, in the "
1157
- "chat on the homepage or replying to a newsletter."
1158
- msgstr ""
1159
-
1160
- #: ../admin/views/intro.php:28
1161
- msgid "5-Star Experience"
1162
- msgstr ""
1163
-
1164
- #: ../admin/views/intro.php:29
1165
- msgid ""
1166
- "Advanced Ads was built out of my own experience. I am personally using it to "
1167
- "serve millions of ad impressions per month and constantly test new ways to "
1168
- "optimize ad settings."
1169
- msgstr ""
1170
-
1171
- #: ../admin/views/intro.php:34
1172
- msgid "Welcome to <strong>Advanced Ads</strong>"
1173
- msgstr ""
1174
-
1175
- #: ../admin/views/intro.php:36
1176
- msgid "Let me give you an introduction into your future ad management solution."
1177
- msgstr ""
1178
-
1179
- #: ../admin/views/intro.php:61
1180
- msgid "Next Steps"
1181
- msgstr ""
1182
-
1183
- #: ../admin/views/intro.php:64
1184
- msgid "Subscribe to the Mailing List"
1185
- msgstr ""
1186
-
1187
- #: ../admin/views/intro.php:65
1188
- msgid "Subscribe to the newsletter and instantly"
1189
- msgstr ""
1190
-
1191
- #: ../admin/views/intro.php:67
1192
- msgid "get 2 free add-ons."
1193
- msgstr ""
1194
-
1195
- #: ../admin/views/intro.php:68
1196
- msgid "reply to the welcome message with a question."
1197
- msgstr ""
1198
-
1199
- #: ../admin/views/intro.php:69
1200
- msgid "subscribe to a dedicated group for the tutorial or AdSense tips."
1201
- msgstr ""
1202
-
1203
- #: ../admin/views/intro.php:79
1204
- #, php-format
1205
- msgid ""
1206
- "Get started by creating an ad <a href=\"%1$s\" target=\"blank\">right now</a> or "
1207
- "watch the <a href=\"%2$s\" target=\"blank\">tutorial video (3:29min)</a> first."
1208
- msgstr ""
1209
-
1210
- #: ../admin/views/intro.php:82
1211
- msgid "Display your ad"
1212
- msgstr ""
1213
-
1214
- #: ../admin/views/intro.php:83
1215
- msgid ""
1216
- "You can display your ad using a shortcode, widget or one of the powerful "
1217
- "placements. Placements help you to inject ads into the content or place them "
1218
- "on your site without coding."
1219
- msgstr ""
1220
-
1221
- #: ../admin/views/intro.php:85
1222
- msgid "List of all available placements"
1223
- msgstr ""
1224
-
1225
- #: ../admin/views/intro.php:86
1226
- msgid "Create a placement"
1227
- msgstr ""
1228
-
1229
- #: ../admin/views/placements.php:8
1230
- msgid ""
1231
- "Couldn’t create the new placement. Please check your form field and whether "
1232
- "the name is already in use."
1233
- msgstr ""
1234
-
1235
- #: ../admin/views/placements.php:16
1236
- #, php-format
1237
- msgid "See also the manual for more information on <a href=\"%s\">placements</a>."
1238
- msgstr ""
1239
-
1240
- #: ../admin/views/placements.php:42
1241
- #, php-format
1242
- msgid ""
1243
- "Placement type \"%s\" is missing and was reset to \"default\".<br/>Please check "
1244
- "if the responsible add-on is activated."
1245
- msgstr ""
1246
-
1247
- #: ../admin/views/placements.php:57
1248
- msgid "show usage"
1249
- msgstr ""
1250
-
1251
- #: ../admin/views/placements.php:71 ../admin/views/placements.php:175
1252
- msgid "--not selected--"
1253
- msgstr ""
1254
-
1255
- #: ../admin/views/placements.php:91
1256
- msgid "Inject"
1257
- msgstr ""
1258
-
1259
- #: ../admin/views/placements.php:92
1260
- msgid "after"
1261
- msgstr ""
1262
-
1263
- #: ../admin/views/placements.php:92
1264
- msgid "before"
1265
- msgstr ""
1266
-
1267
- #: ../admin/views/placements.php:112
1268
- msgid "start counting from bottom"
1269
- msgstr ""
1270
-
1271
- #: ../admin/views/placements.php:115
1272
- msgid "Important Notice"
1273
- msgstr ""
1274
-
1275
- #: ../admin/views/placements.php:115
1276
- msgid ""
1277
- "Your server is missing an extension. This might break the content injection."
1278
- "<br/>Ignore this warning if everything works fine or else ask your hosting "
1279
- "provider to enable <em>mbstring</em>."
1280
- msgstr ""
1281
-
1282
- #: ../admin/views/placements.php:125
1283
- msgid "advanced options"
1284
- msgstr ""
1285
-
1286
- #: ../admin/views/placements.php:133
1287
- msgctxt "checkbox to remove placement"
1288
- msgid "delete"
1289
- msgstr ""
1290
-
1291
- #: ../admin/views/placements.php:142
1292
- msgid "New Placement"
1293
- msgstr ""
1294
-
1295
- #: ../admin/views/placements.php:148
1296
- msgid "Choose a placement type"
1297
- msgstr ""
1298
-
1299
- #: ../admin/views/placements.php:149
1300
- #, php-format
1301
- msgid ""
1302
- "Placement types define where the ad is going to be displayed. Learn more "
1303
- "about the different types from the <a href=\"%s\">manual</a>"
1304
- msgstr ""
1305
-
1306
- #: ../admin/views/placements.php:166
1307
- msgid "Please select a placement type."
1308
- msgstr ""
1309
-
1310
- #: ../admin/views/placements.php:168
1311
- msgid "Choose a Name"
1312
- msgstr ""
1313
-
1314
- #: ../admin/views/placements.php:169
1315
- msgid ""
1316
- "The name of the placement is only visible to you. Tip: choose a descriptive "
1317
- "one, e.g. <em>Below Post Headline</em>."
1318
- msgstr ""
1319
-
1320
- #: ../admin/views/placements.php:170
1321
- msgid "Placement Name"
1322
- msgstr ""
1323
-
1324
- #: ../admin/views/placements.php:171
1325
- msgid "Please enter a name for your placement."
1326
- msgstr ""
1327
-
1328
- #: ../admin/views/placements.php:172
1329
- msgid "Choose the Ad or Group"
1330
- msgstr ""
1331
-
1332
- #: ../admin/views/placements.php:173
1333
- msgid "The ad or group that should be displayed."
1334
- msgstr ""
1335
-
1336
- #: ../admin/views/post-ad-settings-metabox.php:3
1337
- msgid "Disable ads on this page"
1338
- msgstr ""
1339
-
1340
- #: ../admin/views/setting-license.php:5
1341
- msgid "Your license expired."
1342
- msgstr ""
1343
-
1344
- #: ../admin/views/setting-license.php:6
1345
- #, php-format
1346
- msgid "<a href=\"%s\" target=\"_blank\">Renew it with a discount</a>."
1347
- msgstr ""
1348
-
1349
- #: ../admin/views/setting-license.php:14
1350
- #, php-format
1351
- msgid "(%d days left)"
1352
- msgstr ""
1353
-
1354
- #: ../admin/views/setting-license.php:18
1355
- msgid "License key"
1356
- msgstr ""
1357
-
1358
- #: ../admin/views/setting-license.php:28
1359
- msgid "Deactivate License"
1360
- msgstr ""
1361
-
1362
- #: ../admin/views/setting-license.php:35
1363
- msgid "Activate License"
1364
- msgstr ""
1365
-
1366
- #: ../admin/views/setting-license.php:39
1367
- msgid "License key invalid"
1368
- msgstr ""
1369
-
1370
- #: ../admin/views/setting-license.php:42
1371
- msgid "active"
1372
- msgstr ""
1373
-
1374
- #: ../admin/views/settings-disable-ads.php:3
1375
- msgid "Disable all ads in frontend"
1376
- msgstr ""
1377
-
1378
- #: ../admin/views/settings-disable-ads.php:4
1379
- msgid ""
1380
- "Use this option to disable all ads in the frontend, but still be able to use "
1381
- "the plugin."
1382
- msgstr ""
1383
-
1384
- #: ../admin/views/settings-disable-ads.php:8
1385
- msgid "Disable ads on 404 error pages"
1386
- msgstr ""
1387
-
1388
- #: ../admin/views/settings-disable-ads.php:12
1389
- msgid "Disable ads on non-singular pages"
1390
- msgstr ""
1391
-
1392
- #: ../admin/views/settings-disable-ads.php:13
1393
- msgid "e.g. archive pages like categories, tags, authors, front page (if a list)"
1394
- msgstr ""
1395
-
1396
- #: ../admin/views/settings-disable-ads.php:16
1397
- msgid "Disable ads on secondary queries"
1398
- msgstr ""
1399
-
1400
- #: ../admin/views/settings-disable-ads.php:17
1401
- msgid ""
1402
- "Secondary queries are custom queries of posts outside the main query of a "
1403
- "page. Try this option if you see ads injected on places where they shouldn’t "
1404
- "appear."
1405
- msgstr ""
1406
-
1407
- #: ../admin/views/settings-disable-ads.php:21
1408
- msgid "Disable ads in Feed"
1409
- msgstr ""
1410
-
1411
- #: ../admin/views/settings.php:36
1412
- msgid "Save settings on this page"
1413
- msgstr ""
1414
-
1415
- #: ../admin/views/settings.php:48
1416
- msgid "Welcome Page"
1417
- msgstr ""
1418
-
1419
- #: ../admin/views/support.php:8
1420
- msgid "Possible Issues"
1421
- msgstr ""
1422
-
1423
- #: ../admin/views/support.php:9
1424
- msgid ""
1425
- "Please fix the red highlighted issues on this page or try to understand "
1426
- "their consequences before contacting support."
1427
- msgstr ""
1428
-
1429
- #: ../admin/views/support.php:13
1430
- #, php-format
1431
- msgid ""
1432
- "Your <strong>PHP version (%s) is too low</strong>. Advanced Ads is built for "
1433
- "PHP 5.3 and higher. It might work, but updating PHP is highly recommended. "
1434
- "Please ask your hosting provider for more information."
1435
- msgstr ""
1436
-
1437
- #: ../admin/views/support.php:16
1438
- #, php-format
1439
- msgid ""
1440
- "Your <strong>website uses cache</strong>. Some dynamic features like ad "
1441
- "rotation or visitor conditions might not work properly. Use the cache-"
1442
- "busting feature of <a href=\"%s\" target=\"_blank\">Advanced Ads Pro</a> to load "
1443
- "ads dynamically."
1444
- msgstr ""
1445
-
1446
- #: ../admin/views/support.php:19
1447
- msgid "There is a <strong>new WordPress version available</strong>. Please update."
1448
- msgstr ""
1449
-
1450
- #: ../admin/views/support.php:22
1451
- msgid "There are <strong>plugin updates available</strong>. Please update."
1452
- msgstr ""
1453
-
1454
- #: ../admin/views/support.php:25
1455
- #, php-format
1456
- msgid ""
1457
- "One or more license keys for <strong>Advanced Ads add-ons are invalid or "
1458
- "missing</strong>. Please add valid license keys <a href=\"%s\">here</a>."
1459
- msgstr ""
1460
-
1461
- #: ../admin/views/support.php:31
1462
- #, php-format
1463
- msgid ""
1464
- "<strong>Autoptimize plugin detected</strong>. While this plugin is great for "
1465
- "site performance, it is known to alter code, including scripts from ad "
1466
- "networks. <a href=\"%s\" target=\"_blank\">Advanced Ads Pro</a> has a build-in "
1467
- "support for Autoptimize."
1468
- msgstr ""
1469
-
1470
- #: ../admin/views/support.php:34
1471
- #, php-format
1472
- msgid ""
1473
- "Plugins that are known to cause (partial) problems: <strong>%1$s</strong>. "
1474
- "<a href=\"%2$s\" target=\"_blank\">Learn more</a>."
1475
- msgstr ""
1476
-
1477
- #: ../admin/views/support.php:38
1478
- #, php-format
1479
- msgid ""
1480
- "Ads are disabled for all or some pages. See \"disabled ads\" in <a "
1481
- "href=\"%s\">settings</a>."
1482
- msgstr ""
1483
-
1484
- #: ../admin/views/support.php:49
1485
- msgid "Search"
1486
- msgstr ""
1487
-
1488
- #: ../admin/views/support.php:50
1489
- msgid ""
1490
- "Use the following form to search for solutions in the manual on "
1491
- "wpadvancedads.com"
1492
- msgstr ""
1493
-
1494
- #: ../admin/views/support.php:53
1495
- msgid "search"
1496
- msgstr ""
1497
-
1498
- #: ../admin/views/support.php:55
1499
- msgid "Contact"
1500
- msgstr ""
1501
-
1502
- #: ../admin/views/support.php:56
1503
- #, php-format
1504
- msgid ""
1505
- "Please search the manual for a solution and take a look at <a href=\"%s\" "
1506
- "target=\"_blank\">Ads not showing up?</a> before contacting me for help."
1507
- msgstr ""
1508
-
1509
- #: ../admin/views/support.php:58
1510
- msgid "Email was successfully sent."
1511
- msgstr ""
1512
-
1513
- #: ../admin/views/support.php:67
1514
- msgid "your email"
1515
- msgstr ""
1516
-
1517
- #: ../admin/views/support.php:71
1518
- msgid "your name"
1519
- msgstr ""
1520
-
1521
- #: ../admin/views/support.php:75
1522
- msgid "your message"
1523
- msgstr ""
1524
-
1525
- #: ../admin/views/support.php:80
1526
- msgid "send"
1527
- msgstr ""
1528
-
1529
- #: ../admin/views/notices/adblock.php:3
1530
- msgid ""
1531
- "Please disable your <strong>AdBlocker</strong> to prevent problems with your "
1532
- "ad setup."
1533
- msgstr ""
1534
-
1535
- #: ../classes/ad_placements.php:31
1536
- msgid "Manual Placement"
1537
- msgstr ""
1538
-
1539
- #: ../classes/ad_placements.php:32
1540
- msgid "Manual placement to use as function or shortcode."
1541
- msgstr ""
1542
-
1543
- #: ../classes/ad_placements.php:36
1544
- msgid "Header Code"
1545
- msgstr ""
1546
-
1547
- #: ../classes/ad_placements.php:37
1548
- msgid "Injected in Header (before closing &lt;/head&gt; Tag, often not visible)."
1549
- msgstr ""
1550
-
1551
- #: ../classes/ad_placements.php:41
1552
- msgid "Footer Code"
1553
- msgstr ""
1554
-
1555
- #: ../classes/ad_placements.php:42
1556
- msgid "Injected in Footer (before closing &lt;/body&gt; Tag)."
1557
- msgstr ""
1558
-
1559
- #: ../classes/ad_placements.php:46
1560
- msgid "Before Content"
1561
- msgstr ""
1562
-
1563
- #: ../classes/ad_placements.php:51
1564
- msgid "After Content"
1565
- msgstr ""
1566
-
1567
- #: ../classes/ad_placements.php:56
1568
- msgid "Post Content"
1569
- msgstr ""
1570
-
1571
- #: ../classes/ad_placements.php:61
1572
- msgid "Sidebar Widget"
1573
- msgstr ""
1574
-
1575
- #: ../classes/ad_placements.php:62
1576
- msgid ""
1577
- "Create a sidebar widget with an ad. Can be placed and used like any other "
1578
- "widget."
1579
- msgstr ""
1580
-
1581
- #: ../classes/ad_placements.php:203
1582
- #, php-format
1583
- msgid "paragraph (%s)"
1584
- msgstr ""
1585
-
1586
- #: ../classes/ad_placements.php:204
1587
- #, php-format
1588
- msgid "paragraph without image (%s)"
1589
- msgstr ""
1590
-
1591
- #: ../classes/ad_placements.php:205
1592
- #, php-format
1593
- msgid "headline 2 (%s)"
1594
- msgstr ""
1595
-
1596
- #: ../classes/ad_placements.php:206
1597
- #, php-format
1598
- msgid "headline 3 (%s)"
1599
- msgstr ""
1600
-
1601
- #: ../classes/ad_placements.php:207
1602
- #, php-format
1603
- msgid "headline 4 (%s)"
1604
- msgstr ""
1605
-
1606
- #: ../classes/ad_type_content.php:36
1607
- msgid ""
1608
- "The full content editor from WordPress with all features like shortcodes, "
1609
- "image upload or styling, but also simple text/html mode for scripts and code."
1610
- msgstr ""
1611
-
1612
- #: ../classes/ad_type_group.php:31
1613
- msgid ""
1614
- "Choose an existing ad group. Use this type when you want to assign the same "
1615
- "display and visitor conditions to all ads in that group."
1616
- msgstr ""
1617
-
1618
- #: ../classes/ad_type_group.php:60
1619
- msgid "ad group"
1620
- msgstr ""
1621
-
1622
- #: ../classes/ad_type_image.php:34
1623
- msgid "Image Ad"
1624
- msgstr ""
1625
-
1626
- #: ../classes/ad_type_image.php:35
1627
- msgid "Ads in various image formats."
1628
- msgstr ""
1629
-
1630
- #: ../classes/ad_type_image.php:55
1631
- msgid "Insert File"
1632
- msgstr ""
1633
-
1634
- #: ../classes/ad_type_image.php:55
1635
- msgid "Insert"
1636
- msgstr ""
1637
-
1638
- #: ../classes/ad_type_image.php:55
1639
- msgid "select image"
1640
- msgstr ""
1641
-
1642
- #: ../classes/ad_type_image.php:56
1643
- msgid "edit"
1644
- msgstr ""
1645
-
1646
- #: ../classes/ad_type_image.php:65
1647
- msgid "url"
1648
- msgstr ""
1649
-
1650
- #: ../classes/ad_type_image.php:67
1651
- #, php-format
1652
- msgid ""
1653
- "Pro: Open this url in a new window and track impressions and clicks with the "
1654
- "<a href=\"%s\" target=\"_blank\">Tracking add-on</a>"
1655
- msgstr ""
1656
-
1657
- #: ../classes/ad_type_plain.php:86
1658
- msgid "Execute PHP code (wrapped in <code>&lt;?php ?&gt;</code>)"
1659
- msgstr ""
1660
-
1661
- #: ../classes/checks.php:223
1662
- #, php-format
1663
- msgid ""
1664
- "Possible conflict between jQueryUI library, used by Advanced Ads and other "
1665
- "libraries (probably <a href=\"%s\">Twitter Bootstrap</a>). This might lead to "
1666
- "misfortunate formats in forms, but should not damage features."
1667
- msgstr ""
1668
-
1669
- #: ../classes/display-conditions.php:69
1670
- msgid "post type"
1671
- msgstr ""
1672
-
1673
- #: ../classes/display-conditions.php:76
1674
- msgid "specific pages"
1675
- msgstr ""
1676
-
1677
- #: ../classes/display-conditions.php:88
1678
- msgid "author"
1679
- msgstr ""
1680
-
1681
- #: ../classes/display-conditions.php:113
1682
- #, php-format
1683
- msgid "archive: %s"
1684
- msgstr ""
1685
-
1686
- #: ../classes/display-conditions.php:214 ../classes/display-conditions.php:258 ..
1687
- #: classes/display-conditions.php:346
1688
- msgctxt "Error message shown when no display condition term is selected"
1689
- msgid "Please select some items."
1690
- msgstr ""
1691
-
1692
- #: ../classes/display-conditions.php:243 ../classes/display-conditions.php:296 ..
1693
- #: classes/display-conditions.php:371
1694
- msgid "show"
1695
- msgstr ""
1696
-
1697
- #: ../classes/display-conditions.php:244 ../classes/display-conditions.php:297 ..
1698
- #: classes/display-conditions.php:372
1699
- msgid "hide"
1700
- msgstr ""
1701
-
1702
- #: ../classes/display-conditions.php:336
1703
- msgctxt "display the terms search field on ad edit page"
1704
- msgid "add more terms"
1705
- msgstr ""
1706
-
1707
- #: ../classes/display-conditions.php:337
1708
- msgid "add more terms"
1709
- msgstr ""
1710
-
1711
- #: ../classes/display-conditions.php:339
1712
- msgid "term name or id"
1713
- msgstr ""
1714
-
1715
- #: ../classes/display-conditions.php:400
1716
- msgid "title or id"
1717
- msgstr ""
1718
-
1719
- #: ../classes/display-conditions.php:446 ../includes/array_ad_conditions.php:64
1720
- msgid "show on Home page"
1721
- msgstr ""
1722
-
1723
- #: ../classes/display-conditions.php:451 ../includes/array_ad_conditions.php:69
1724
- msgid "show on singular pages/posts"
1725
- msgstr ""
1726
-
1727
- #: ../classes/display-conditions.php:456 ../includes/array_ad_conditions.php:74
1728
- msgid "show on any type of archive page (category, tag, author and date)"
1729
- msgstr ""
1730
-
1731
- #: ../classes/display-conditions.php:461 ../includes/array_ad_conditions.php:79
1732
- msgid "show on search result pages"
1733
- msgstr ""
1734
-
1735
- #: ../classes/display-conditions.php:466 ../includes/array_ad_conditions.php:84
1736
- msgid "show on 404 error page"
1737
- msgstr ""
1738
-
1739
- #: ../classes/display-conditions.php:471 ../includes/array_ad_conditions.php:89
1740
- msgid "show on attachment pages"
1741
- msgstr ""
1742
-
1743
- #: ../classes/display-conditions.php:475 ../includes/array_ad_conditions.php:93
1744
- msgid "Secondary Queries"
1745
- msgstr ""
1746
-
1747
- #: ../classes/display-conditions.php:476 ../includes/array_ad_conditions.php:94
1748
- msgid "allow ads in secondary queries"
1749
- msgstr ""
1750
-
1751
- #: ../classes/display-conditions.php:480
1752
- msgid "Feed"
1753
- msgstr ""
1754
-
1755
- #: ../classes/display-conditions.php:481
1756
- msgid "allow ads in Feed"
1757
- msgstr ""
1758
-
1759
- #: ../classes/EDD_SL_Plugin_Updater.php:177
1760
- #, php-format
1761
- msgid ""
1762
- "There is a new version of %1$s available. <a target=\"_blank\" "
1763
- "class=\"thickbox\" href=\"%2$s\">View version %3$s details</a>."
1764
- msgstr ""
1765
-
1766
- #: ../classes/EDD_SL_Plugin_Updater.php:184
1767
- #, php-format
1768
- msgid ""
1769
- "There is a new version of %1$s available. <a target=\"_blank\" "
1770
- "class=\"thickbox\" href=\"%2$s\">View version %3$s details</a> or <a "
1771
- "href=\"%4$s\">update now</a>."
1772
- msgstr ""
1773
-
1774
- #: ../classes/EDD_SL_Plugin_Updater.php:324
1775
- msgid "You do not have permission to install plugin updates"
1776
- msgstr ""
1777
-
1778
- #: ../classes/EDD_SL_Plugin_Updater.php:324
1779
- msgid "Error"
1780
- msgstr ""
1781
-
1782
- #: ../classes/visitor-conditions.php:32
1783
- msgid "mobile device"
1784
- msgstr ""
1785
-
1786
- #: ../classes/visitor-conditions.php:33
1787
- msgid "Display ads only on mobile devices or hide them."
1788
- msgstr ""
1789
-
1790
- #: ../classes/visitor-conditions.php:39
1791
- msgid "logged in visitor"
1792
- msgstr ""
1793
-
1794
- #: ../classes/visitor-conditions.php:40
1795
- msgid "Whether the visitor has to be logged in or not in order to see the ads."
1796
- msgstr ""
1797
-
1798
- #: ../classes/visitor-conditions.php:73
1799
- #, php-format
1800
- msgid ""
1801
- "Pro: Display ads by the available space on the device using the <a href=\"%s\" "
1802
- "target=\"_blank\">Responsive add-on</a>"
1803
- msgstr ""
1804
-
1805
- #: ../classes/visitor-conditions.php:101
1806
- msgid "is"
1807
- msgstr ""
1808
-
1809
- #: ../classes/visitor-conditions.php:102
1810
- msgid "is not"
1811
- msgstr ""
1812
-
1813
- #: ../classes/visitor-conditions.php:107
1814
- msgid "Manual and Troubleshooting"
1815
- msgstr ""
1816
-
1817
- #: ../classes/visitor-conditions.php:136
1818
- msgid "equal"
1819
- msgstr ""
1820
-
1821
- #: ../classes/visitor-conditions.php:137
1822
- msgid "equal or higher"
1823
- msgstr ""
1824
-
1825
- #: ../classes/visitor-conditions.php:138
1826
- msgid "equal or lower"
1827
- msgstr ""
1828
-
1829
- #: ../classes/visitor-conditions.php:168
1830
- msgid "contains"
1831
- msgstr ""
1832
-
1833
- #: ../classes/visitor-conditions.php:169
1834
- msgid "starts with"
1835
- msgstr ""
1836
-
1837
- #: ../classes/visitor-conditions.php:170
1838
- msgid "ends with"
1839
- msgstr ""
1840
-
1841
- #: ../classes/visitor-conditions.php:171
1842
- msgid "matches"
1843
- msgstr ""
1844
-
1845
- #: ../classes/visitor-conditions.php:172
1846
- msgid "matches regex"
1847
- msgstr ""
1848
-
1849
- #: ../classes/visitor-conditions.php:173
1850
- msgid "does not contain"
1851
- msgstr ""
1852
-
1853
- #: ../classes/visitor-conditions.php:174
1854
- msgid "does not start with"
1855
- msgstr ""
1856
-
1857
- #: ../classes/visitor-conditions.php:175
1858
- msgid "does not end with"
1859
- msgstr ""
1860
-
1861
- #: ../classes/visitor-conditions.php:176
1862
- msgid "does not match"
1863
- msgstr ""
1864
-
1865
- #: ../classes/visitor-conditions.php:177
1866
- msgid "does not match regex"
1867
- msgstr ""
1868
-
1869
- #: ../modules/ad-blocker/admin/admin.php:133
1870
- msgid "The asset folder was rebuilt successfully"
1871
- msgstr ""
1872
-
1873
- #: ../modules/ad-blocker/admin/admin.php:218
1874
- msgid "Ad blocker fix"
1875
- msgstr ""
1876
-
1877
- #: ../modules/ad-blocker/admin/admin.php:257
1878
- msgid "There is no writable upload folder"
1879
- msgstr ""
1880
-
1881
- #: ../modules/ad-blocker/admin/admin.php:278
1882
- #, php-format
1883
- msgid "Unable to rename \"%s\" directory"
1884
- msgstr ""
1885
-
1886
- #: ../modules/ad-blocker/admin/admin.php:294 ../modules/ad-blocker/admin/admin.
1887
- #: php:307 ../modules/ad-blocker/admin/admin.php:324
1888
- #, php-format
1889
- msgid "Unable to copy assets to the \"%s\" directory"
1890
- msgstr ""
1891
-
1892
- #: ../modules/ad-blocker/admin/admin.php:358 ../modules/ad-blocker/admin/admin.
1893
- #: php:378
1894
- #, php-format
1895
- msgid "We do not have direct write access to the \"%s\" directory"
1896
- msgstr ""
1897
-
1898
- #: ../modules/ad-blocker/admin/admin.php:445
1899
- #, php-format
1900
- msgid ""
1901
- "Unable to create \"%s\" directory. Is its parent directory writable by the "
1902
- "server?"
1903
- msgstr ""
1904
-
1905
- #: ../modules/ad-blocker/admin/admin.php:456
1906
- #, php-format
1907
- msgid "Unable to copy files to %s"
1908
- msgstr ""
1909
-
1910
- #: ../modules/ad-blocker/admin/admin.php:592
1911
- msgid ""
1912
- "Prevents ad block software from breaking your website when blocking asset "
1913
- "files (.js, .css)."
1914
- msgstr ""
1915
-
1916
- #: ../modules/ad-blocker/admin/views/rebuild_form.php:1
1917
- msgid "Ad blocker file folder"
1918
- msgstr ""
1919
-
1920
- #: ../modules/ad-blocker/admin/views/rebuild_form.php:10
1921
- msgid "Upload folder is not writable"
1922
- msgstr ""
1923
-
1924
- #: ../modules/ad-blocker/admin/views/rebuild_form.php:23
1925
- msgid "Asset path"
1926
- msgstr ""
1927
-
1928
- #: ../modules/ad-blocker/admin/views/rebuild_form.php:27
1929
- msgid "Asset URL"
1930
- msgstr ""
1931
-
1932
- #: ../modules/ad-blocker/admin/views/rebuild_form.php:31
1933
- msgid "Rename assets"
1934
- msgstr ""
1935
-
1936
- #: ../modules/ad-blocker/admin/views/rebuild_form.php:34
1937
- msgid "Check if you want to change the names of the assets"
1938
- msgstr ""
1939
-
1940
- #: ../modules/ad-blocker/admin/views/rebuild_form.php:43
1941
- #, php-format
1942
- msgid ""
1943
- "Please, rebuild the asset folder. All assets will be located in "
1944
- "<strong>%s</strong>"
1945
- msgstr ""
1946
-
1947
- #: ../modules/ad-blocker/admin/views/rebuild_form.php:46
1948
- msgid "Rebuild asset folder"
1949
- msgstr ""
1950
-
1951
- #: ../modules/gadsense/main.php:19
1952
- msgid " at "
1953
- msgstr ""
1954
-
1955
- #: ../modules/gadsense/admin/admin.php:26 ../modules/gadsense/admin/views/adsense-
1956
- #: ad-parameters.php:51
1957
- msgid "Responsive"
1958
- msgstr ""
1959
-
1960
- #: ../modules/gadsense/admin/admin.php:44
1961
- msgid "The ad details couldn't be retrieved from the ad code"
1962
- msgstr ""
1963
-
1964
- #: ../modules/gadsense/admin/admin.php:45
1965
- msgid ""
1966
- "Warning : The AdSense account from this code does not match the one set with "
1967
- "the Advanced Ads Plugin. This ad might cause troubles when used in the front "
1968
- "end."
1969
- msgstr ""
1970
-
1971
- #: ../modules/gadsense/admin/admin.php:123 ../modules/gadsense/admin/admin.php:262
1972
- msgid "AdSense"
1973
- msgstr ""
1974
-
1975
- #: ../modules/gadsense/admin/admin.php:131
1976
- msgid "AdSense ID"
1977
- msgstr ""
1978
-
1979
- #: ../modules/gadsense/admin/admin.php:140
1980
- msgid "Limit to 3 ads"
1981
- msgstr ""
1982
-
1983
- #: ../modules/gadsense/admin/admin.php:149
1984
- msgid "Activate Page-Level ads"
1985
- msgstr ""
1986
-
1987
- #: ../modules/gadsense/admin/admin.php:169
1988
- #, php-format
1989
- msgid ""
1990
- "Please enter your Publisher ID in order to use AdSense on your page. See the "
1991
- "<a href=\"%s\" target=\"_blank\">manual</a> for more information."
1992
- msgstr ""
1993
-
1994
- #: ../modules/gadsense/admin/admin.php:183
1995
- msgid "Your AdSense Publisher ID <em>(pub-xxxxxxxxxxxxxx)</em>"
1996
- msgstr ""
1997
-
1998
- #: ../modules/gadsense/admin/admin.php:195
1999
- #, php-format
2000
- msgid "Limit to %d AdSense ads"
2001
- msgstr ""
2002
-
2003
- #: ../modules/gadsense/admin/admin.php:199
2004
- #, php-format
2005
- msgid ""
2006
- "Currently, Google AdSense <a target=\"_blank\" href=\"%s\" title=\"Terms Of "
2007
- "Service\">TOS</a> imposes a limit of %d display ads per page. You can disable "
2008
- "this limitation at your own risks."
2009
- msgstr ""
2010
-
2011
- #: ../modules/gadsense/admin/admin.php:202
2012
- msgid "Notice: Advanced Ads only considers the AdSense ad type for this limit."
2013
- msgstr ""
2014
-
2015
- #: ../modules/gadsense/admin/admin.php:205
2016
- msgid ""
2017
- "Due to technical restrictions, the limit does not work on placements with "
2018
- "cache-busting enabled."
2019
- msgstr ""
2020
-
2021
- #: ../modules/gadsense/admin/admin.php:219
2022
- msgid "Insert Page-Level ads code on all pages."
2023
- msgstr ""
2024
-
2025
- #: ../modules/gadsense/admin/admin.php:221
2026
- msgid ""
2027
- "You still need to enable Page-Level ads in your AdSense account. See <a "
2028
- "href=\"https://support.google.com/adsense/answer/6245304\" "
2029
- "target=\"_blank\">AdSense Help</a> (requires AdSense-login) for more "
2030
- "information"
2031
- msgstr ""
2032
-
2033
- #: ../modules/gadsense/admin/admin.php:240 ../modules/gadsense/includes/class-ad-
2034
- #: type-adsense.php:73
2035
- msgid "The Publisher ID has an incorrect format. (must start with \"pub-\")"
2036
- msgstr ""
2037
-
2038
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:23
2039
- msgid "Copy&Paste existing ad code"
2040
- msgstr ""
2041
-
2042
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:29
2043
- msgid "Ad Slot ID"
2044
- msgstr ""
2045
-
2046
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:37
2047
- #, php-format
2048
- msgid "Publisher ID: %s"
2049
- msgstr ""
2050
-
2051
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:44
2052
- #, php-format
2053
- msgid "Please <a href=\"%s\" target=\"_blank\">change it here</a>."
2054
- msgstr ""
2055
-
2056
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:50
2057
- msgid "Normal"
2058
- msgstr ""
2059
-
2060
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:55
2061
- #, php-format
2062
- msgid ""
2063
- "Use the <a href=\"%s\" target=\"_blank\">Responsive add-on</a> in order to "
2064
- "define the exact creative for each browser width."
2065
- msgstr ""
2066
-
2067
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:60
2068
- msgid "Resizing"
2069
- msgstr ""
2070
-
2071
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:72
2072
- msgid "Copy the ad code from your AdSense account and paste it in the area below"
2073
- msgstr ""
2074
-
2075
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:75
2076
- msgid "Get details"
2077
- msgstr ""
2078
-
2079
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:76
2080
- msgid "Close"
2081
- msgstr ""
2082
-
2083
- #: ../modules/gadsense/includes/class-ad-type-adsense.php:35
2084
- msgid "AdSense ad"
2085
- msgstr ""
2086
-
2087
- #: ../modules/gadsense/includes/class-ad-type-adsense.php:36
2088
- msgid "Use ads from your Google AdSense account"
2089
- msgstr ""
2090
-
2091
- #: ../modules/gadsense/includes/class-ad-type-adsense.php:105
2092
- msgid "Your AdSense Publisher ID is missing."
2093
- msgstr ""
2094
-
2095
- #: ../modules/gadsense/includes/class-gadsense-data.php:46
2096
- msgid "Auto"
2097
- msgstr ""
2098
-
2099
- #: ../public/class-advanced-ads.php:307
2100
- msgid "Advanced Ads Error following:"
2101
- msgstr ""
2102
-
2103
- #: ../admin/views/ad-display-metabox.php:39
2104
- #, fuzzy
2105
- msgid "If you want to display the ad everywhere, don't do anything here. "
2106
- msgstr "Se vuoi mostrare gli ad ovunque, non modificare nulla."
2107
-
2108
- #: ../admin/views/ad-output-metabox.php:5
2109
- #, fuzzy
2110
- msgid "Position"
2111
- msgstr "Descrizione"
2112
-
2113
- #: ../admin/views/ad-output-metabox.php:6
2114
- #, fuzzy
2115
- msgid "- default -"
2116
- msgstr "default"
2117
-
2118
- #: ../admin/views/ad-output-metabox.php:14
2119
- #, fuzzy
2120
- msgid "right"
2121
- msgstr "altezza"
2122
-
2123
- #: ../admin/views/ad-output-metabox.php:25
2124
- #, fuzzy
2125
- msgid "right:"
2126
- msgstr "altezza"
2127
-
2128
- msgid "Advanced Ads"
2129
- msgstr "Gestione Ad"
2130
-
2131
- #: ../admin/class-advanced-ads-admin.php:278
2132
- msgid "Overview"
2133
- msgstr "Sommario"
2134
-
2135
- #: ../admin/class-advanced-ads-admin.php:282 ../admin/class-advanced-ads-admin.
2136
- #: php:282 ../admin/includes/class-shortcode-creator.php:77 ../admin/views/ad-
2137
- #: group-list-form-row.php:28 ../admin/views/ad-group-list-header.php:5 ..
2138
- #: admin/views/placements.php:80 ../admin/views/placements.php:184 ..
2139
- #: classes/widget.php:89 ../public/class-advanced-ads.php:588
2140
- msgid "Ads"
2141
- msgstr "Ad"
2142
-
2143
- #: ../admin/class-advanced-ads-admin.php:288 ../public/class-advanced-ads.php:591
2144
- msgid "Add New Ad"
2145
- msgstr "Aggiungi nuovo Ad"
2146
-
2147
- #: ../admin/class-advanced-ads-admin.php:288 ../public/class-advanced-ads.php:590
2148
- #: ../public/class-advanced-ads.php:594
2149
- msgid "New Ad"
2150
- msgstr "Nuovo Ad"
2151
-
2152
- #: ../admin/class-advanced-ads-admin.php:293 ../admin/includes/class-shortcode-
2153
- #: creator.php:84 ../admin/views/placements.php:73 ../admin/views/placements.php:
2154
- #: 177 ../classes/widget.php:82
2155
- msgid "Ad Groups"
2156
- msgstr "Gruppi Ad"
2157
-
2158
- #: ../admin/class-advanced-ads-admin.php:293 ../public/class-advanced-ads.php:561
2159
- msgid "Groups"
2160
- msgstr "Gruppi"
2161
-
2162
- #: ../admin/class-advanced-ads-admin.php:298
2163
- msgid "Ad Placements"
2164
- msgstr "Posizionamento"
2165
-
2166
- #: ../admin/class-advanced-ads-admin.php:298 ../admin/includes/class-shortcode-
2167
- #: creator.php:91 ../admin/views/placements.php:18 ../classes/widget.php:75
2168
- msgid "Placements"
2169
- msgstr "Posizionamento"
2170
-
2171
- #: ../admin/class-advanced-ads-admin.php:302
2172
- msgid "Advanced Ads Settings"
2173
- msgstr "Opzioni"
2174
-
2175
- #: ../admin/class-advanced-ads-admin.php:302 ../admin/class-advanced-ads-admin.
2176
- #: php:550 ../admin/views/debug.php:10
2177
- msgid "Settings"
2178
- msgstr "Opzioni"
2179
-
2180
- #: ../admin/class-advanced-ads-admin.php:305
2181
- msgid "Advanced Ads Debugging"
2182
- msgstr "Debugging"
2183
-
2184
- #: ../admin/class-advanced-ads-admin.php:305
2185
- msgid "Debug"
2186
- msgstr "Debug"
2187
-
2188
- #: ../admin/class-advanced-ads-admin.php:592
2189
- msgid "Ad Type"
2190
- msgstr "Tipo Ad"
2191
-
2192
- #: ../admin/class-advanced-ads-admin.php:595
2193
- msgid "Ad Parameters"
2194
- msgstr "Parametri Ad"
2195
-
2196
- #: ../admin/class-advanced-ads-admin.php:601
2197
- msgid "Display Conditions"
2198
- msgstr "Condizioni di Visualizzazione"
2199
-
2200
- #: ../admin/class-advanced-ads-admin.php:604
2201
- msgid "Visitor Conditions"
2202
- msgstr "Condizioni per Visitatore"
2203
-
2204
- #: ../admin/class-advanced-ads-admin.php:899 ../admin/views/settings.php:12
2205
- msgid "General"
2206
- msgstr "Generale"
2207
-
2208
- #: ../admin/class-advanced-ads-admin.php:930
2209
- msgid "Hide ads for logged in users"
2210
- msgstr "Nascondi Ad for utenti loggati"
2211
-
2212
- #: ../admin/class-advanced-ads-admin.php:938
2213
- msgid "Use advanced JavaScript"
2214
- msgstr "Usa Js avanzato"
2215
-
2216
- #: ../admin/class-advanced-ads-admin.php:1071
2217
- msgid "(display to all)"
2218
- msgstr "(mostra a tutti)"
2219
-
2220
- #: ../admin/class-advanced-ads-admin.php:1072
2221
- msgid "Subscriber"
2222
- msgstr "Sottoscrittore"
2223
-
2224
- #: ../admin/class-advanced-ads-admin.php:1073
2225
- msgid "Contributor"
2226
- msgstr "Collaboratore"
2227
-
2228
- #: ../admin/class-advanced-ads-admin.php:1074
2229
- msgid "Author"
2230
- msgstr "Autore"
2231
-
2232
- #: ../admin/class-advanced-ads-admin.php:1075
2233
- msgid "Editor"
2234
- msgstr "Editore"
2235
-
2236
- #: ../admin/class-advanced-ads-admin.php:1076
2237
- msgid "Admin"
2238
- msgstr "Amministratore"
2239
-
2240
- #: ../admin/class-advanced-ads-admin.php:1084
2241
- msgid "Choose the lowest role a user must have in order to not see any ads."
2242
- msgstr "Scegli il ruolo minimo per non visualizzare gli ad."
2243
-
2244
- #: ../admin/includes/class-ad-groups-list.php:156
2245
- msgid "Ad weight"
2246
- msgstr "Rilevanza Ad"
2247
-
2248
- #: ../admin/includes/class-ad-groups-list.php:275 ../public/class-advanced-ads.
2249
- #: php:592
2250
- msgid "Edit"
2251
- msgstr "Modifica"
2252
-
2253
- #: ../admin/includes/class-ad-groups-list.php:285
2254
- msgid "Delete"
2255
- msgstr "Cancella"
2256
-
2257
- #: ../admin/includes/class-overview-widgets.php:49
2258
- msgid "Manual and Support"
2259
- msgstr "Documentazione e Supporto"
2260
-
2261
- #: ../admin/includes/class-overview-widgets.php:123 ../admin/views/intro.php:78
2262
- msgid "Create your first ad"
2263
- msgstr "Crea il tuo primo ad"
2264
-
2265
- #: ../admin/includes/class-overview-widgets.php:126
2266
- msgid ""
2267
- "Ad Groups contain ads and are currently used to rotate multiple ads on a "
2268
- "single spot."
2269
- msgstr ""
2270
- "Un Gruppo Ad contiene ad ed è usato per far ruotare ad multipli in un "
2271
- "singolo spazio."
2272
-
2273
- #: ../admin/includes/class-overview-widgets.php:128
2274
- msgid "Create your first group"
2275
- msgstr "Crea il tuo primo gruppo"
2276
-
2277
- #: ../admin/includes/class-overview-widgets.php:131
2278
- msgid "Ad Placements are the best way to manage where to display ads and groups."
2279
- msgstr ""
2280
- "Il posizionamento degli ad è il miglior modo per gestire dove mostrare ad e "
2281
- "gruppi."
2282
-
2283
- #: ../admin/includes/class-overview-widgets.php:133
2284
- msgid "Create your first placement"
2285
- msgstr "Crea il tuo primo posizionamento"
2286
-
2287
- #: ../admin/includes/class-shortcode-creator.php:75 ../classes/widget.php:73
2288
- msgid "--empty--"
2289
- msgstr "--vuoto--"
2290
-
2291
- #: ../admin/views/ad-group-edit.php:14
2292
- msgid "You did not select an item for editing."
2293
- msgstr "Non hai selezionato nessun elemento da modificare"
2294
-
2295
- #: ../admin/views/ad-group-edit.php:33
2296
- msgctxt "Taxonomy Name"
2297
- msgid "Name"
2298
- msgstr "Nome"
2299
-
2300
- #: ../admin/views/ad-group-edit.php:38
2301
- msgctxt "Taxonomy Slug"
2302
- msgid "Slug"
2303
- msgstr "Abbreviazione"
2304
-
2305
- #: ../admin/views/ad-group-edit.php:40
2306
- msgid "An id-like string with only letters in lower case, numbers, and hyphens."
2307
- msgstr "An id-like string with only letters in lower case, numbers, and hyphens."
2308
-
2309
- #: ../admin/views/ad-group-edit.php:45
2310
- msgctxt "Taxonomy Description"
2311
- msgid "Description"
2312
- msgstr "Descrizione"
2313
-
2314
- #: ../admin/views/ad-group-edit.php:57
2315
- msgid "Create new Ad Group"
2316
- msgstr "Crea nuovo Gruppo Ad"
2317
-
2318
- #: ../admin/views/ad-group-edit.php:59
2319
- msgid "Update"
2320
- msgstr "Aggiorna"
2321
-
2322
- #: ../admin/views/ad-group-list-form-row.php:3 ../admin/views/placements.php:24
2323
- msgid "Name"
2324
- msgstr "Nome"
2325
-
2326
- #: ../admin/views/ad-group-list-form-row.php:7 ../admin/views/placements.php:23 ..
2327
- #: modules/gadsense/admin/views/adsense-ad-parameters.php:48
2328
- msgid "Type"
2329
- msgstr "Tipo"
2330
-
2331
- #: ../admin/views/ad-group-list-form-row.php:31 ../public/class-advanced-ads.php:
2332
- #: 589
2333
- msgid "Ad"
2334
- msgstr "Ad"
2335
-
2336
- #: ../admin/views/ad-group-list-header.php:3 ../classes/ad_type_group.php:30
2337
- msgid "Ad Group"
2338
- msgstr "Gruppo Ad"
2339
-
2340
- #: ../admin/views/ad-group-list-row.php:8 ../admin/views/ad-group.php:63 ..
2341
- #: admin/views/ad-info.php:3 ../admin/views/placements.php:58
2342
- msgid "shortcode"
2343
- msgstr "shortcode"
2344
-
2345
- #: ../admin/views/ad-group-list-row.php:11 ../admin/views/ad-group.php:66 ..
2346
- #: admin/views/placements.php:61
2347
- msgid "template"
2348
- msgstr "template"
2349
-
2350
- #: ../admin/views/ad-group.php:46
2351
- #, php-format
2352
- msgid "Search results for &#8220;%s&#8221;"
2353
- msgstr "Risultati di ricerca per &#8220;%s&#8221;"
2354
-
2355
- #: ../admin/views/ad-group.php:52
2356
- msgid ""
2357
- "Ad Groups are a very flexible method to bundle ads. You can use them to "
2358
- "display random ads in the frontend or run split tests, but also just for "
2359
- "informational purposes. Not only can an Ad Groups have multiple ads, but an "
2360
- "ad can belong to multiple ad groups."
2361
- msgstr ""
2362
- "I gruppi Ad sono un metodo molto flessibile per raggruppare gli ad. Puoi "
2363
- "usarli per mostrare ad casuali nel frontend o per split test, ma anche per "
2364
- "finalità informative. Un Gruppo Ad può quindi avere ad multipli, ma anche un "
2365
- "ad può appartenere a Gruppi Ad multipli. "
2366
-
2367
- #: ../admin/views/ad-group.php:60
2368
- msgid "How to display an Ad Group?"
2369
- msgstr "Come mostrare un Gruppo Ad?"
2370
-
2371
- #: ../admin/views/ad-group.php:62
2372
- #, php-format
2373
- msgid ""
2374
- "Examples on how to display an ad group? Find more help and examples in the "
2375
- "<a href=\"%s\" target=\"_blank\">manual</a>"
2376
- msgstr ""
2377
- "Esempi su come mostrare un Gruppo Ad? Leggi <a href=\"%s\" "
2378
- "target=\"_blank\">qui</a>."
2379
-
2380
- #: ../admin/views/ad-group.php:64
2381
- msgid "To display an ad group with the ID 6 in content fields"
2382
- msgstr "Per mostrare un gruppo ad con ID 6 nel contenuto"
2383
-
2384
- #: ../admin/views/ad-group.php:67
2385
- msgid "To display an ad group with the ID 6 in template files"
2386
- msgstr "Per mostrare un gruppo con ID 6 in un template"
2387
-
2388
- #: ../admin/views/ad-info.php:2
2389
- #, php-format
2390
- msgid "Ad Id: %s"
2391
- msgstr "Id Ad: %s"
2392
-
2393
- #: ../admin/views/ad-main-metabox.php:3
2394
- msgid "No ad types defined"
2395
- msgstr "Nessun tipo di ad definito"
2396
-
2397
- #: ../admin/views/ad-output-metabox.php:7 ../admin/views/placements.php:51
2398
- msgid "default"
2399
- msgstr "default"
2400
-
2401
- #: ../admin/views/ad-parameters-size.php:2
2402
- msgid "size"
2403
- msgstr "dimensione"
2404
-
2405
- #: ../admin/views/ad-parameters-size.php:3
2406
- msgid "width"
2407
- msgstr "larghezza"
2408
-
2409
- #: ../admin/views/ad-parameters-size.php:4
2410
- msgid "height"
2411
- msgstr "altezza"
2412
-
2413
- #: ../admin/views/ad-visitor-metabox.php:4
2414
- msgid ""
2415
- "Display conditions that are based on the user. Use with caution on cached "
2416
- "websites."
2417
- msgstr ""
2418
- "Condizioni di visualizzazione basate sul tipo di supporto. Usa con cautela "
2419
- "su siti web che utilizzano la cache."
2420
-
2421
- #: ../admin/views/ad-visitor-metabox.php:98
2422
- msgid "Display on all devices"
2423
- msgstr "Mostra su tutti gli apparecchi"
2424
-
2425
- #: ../admin/views/ad-visitor-metabox.php:102
2426
- msgid "only on mobile devices"
2427
- msgstr "solo su mobile"
2428
-
2429
- #: ../admin/views/ad-visitor-metabox.php:106
2430
- msgid "not on mobile devices"
2431
- msgstr "solo su apparecchi non mobile"
2432
-
2433
- #: ../admin/views/debug.php:6 ../admin/views/settings.php:47
2434
- msgid "Debug Page"
2435
- msgstr "Pagina Debug"
2436
-
2437
- #: ../admin/views/debug.php:7
2438
- msgid "Work in progress"
2439
- msgstr "Work in progress"
2440
-
2441
- #: ../admin/views/placements.php:10
2442
- msgid "Placements updated"
2443
- msgstr "Posizionamento aggiornato"
2444
-
2445
- #: ../admin/views/placements.php:15
2446
- msgid ""
2447
- "Placements are physically places in your theme and posts. You can use them "
2448
- "if you plan to change ads and ad groups on the same place without the need "
2449
- "to change your templates."
2450
- msgstr ""
2451
- "Il posizionamento è uno spazio fisico nel tuo tema o nei post. Puoi usarlo "
2452
- "se hai bisogno di far ruotare ad e gruppi nello stesso spazio senza aver "
2453
- "bisogno di cambiare i tuoi templates."
2454
-
2455
- #: ../admin/views/placements.php:25
2456
- msgid "Options"
2457
- msgstr "Opzioni"
2458
-
2459
- #: ../admin/views/placements.php:69
2460
- msgid "Item"
2461
- msgstr "Elemento"
2462
-
2463
- #: ../admin/views/placements.php:139
2464
- msgid "Save Placements"
2465
- msgstr "Salva Posizionamento"
2466
-
2467
- #: ../admin/views/placements.php:141
2468
- msgid "Create a new placement"
2469
- msgstr "Crea un nuovo posizionamento"
2470
-
2471
- #: ../admin/views/placements.php:192
2472
- msgid "Save New Placement"
2473
- msgstr "Salva Nuovo Posizionamento"
2474
-
2475
- #: ../admin/views/settings.php:49
2476
- msgid "Advanced Ads on WordPress.org"
2477
- msgstr "Advanced Ads su WordPress.org"
2478
-
2479
- #: ../admin/views/settings.php:49
2480
- msgid "Advanced Ads on wp.org"
2481
- msgstr "Advanced Ads su wp.org"
2482
-
2483
- #: ../admin/views/settings.php:50
2484
- msgid "the company behind Advanced Ads"
2485
- msgstr "la società dietro Advanced Ads"
2486
-
2487
- #: ../classes/ad_placements.php:47
2488
- msgid "Injected before the post content."
2489
- msgstr "Injected prima del contenuto del post."
2490
-
2491
- #: ../classes/ad_placements.php:52
2492
- msgid "Injected after the post content."
2493
- msgstr "Injected dopo il contenuto del post."
2494
-
2495
- #: ../classes/ad_placements.php:57
2496
- msgid ""
2497
- "Injected into the post content. You can choose the paragraph after which the "
2498
- "ad content is displayed."
2499
- msgstr ""
2500
- "Injected nel contenuto di un articolo. Puoi scegliere il paragrafo dopo il "
2501
- "quale mostrare l'ad."
2502
-
2503
- #: ../classes/ad_type_content.php:35
2504
- msgid "Rich Content"
2505
- msgstr "Rich Content"
2506
-
2507
- #: ../classes/ad_type_plain.php:31
2508
- msgid "Plain Text and Code"
2509
- msgstr "Testo semplice e Codice"
2510
-
2511
- #: ../classes/ad_type_plain.php:32
2512
- msgid ""
2513
- "Simple text editor without any filters. You might use it to display "
2514
- "unfiltered content, php code or javascript. Shortcodes and other WordPress "
2515
- "content field magic does not work here."
2516
- msgstr ""
2517
- "Editor di testo semplice senza filtri. Puoi usarlo per mostrare contenuti "
2518
- "non filtrati, codice php o javascript. Gli shortcodes non funzionano qui."
2519
-
2520
- #: ../classes/ad_type_plain.php:52
2521
- msgid "Insert plain text or code into this field."
2522
- msgstr "Inserisci testo semplice o codice in questo campo."
2523
-
2524
- #: ../classes/display-conditions.php:70 ../includes/array_ad_conditions.php:40
2525
- msgid "Choose the public post types on which to display the ad."
2526
- msgstr "Scegli i tipi di pagina in cui mostrare gli ad."
2527
-
2528
- #: ../classes/display-conditions.php:77 ../includes/array_ad_conditions.php:58
2529
- msgid ""
2530
- "Choose on which individual posts, pages and public post type pages you want "
2531
- "to display or hide ads."
2532
- msgstr ""
2533
- "Scegli in quali articoli, pagine e tipi di pagina vuoi mostrare o nascondere "
2534
- "gli ad."
2535
-
2536
- #: ../classes/display-conditions.php:82
2537
- msgid "general conditions"
2538
- msgstr "Altre condizioni"
2539
-
2540
- #: ../classes/display-conditions.php:445 ../includes/array_ad_conditions.php:63
2541
- msgid "Home Page"
2542
- msgstr "Home Page"
2543
-
2544
- #: ../classes/display-conditions.php:450 ../includes/array_ad_conditions.php:68
2545
- msgid "Singular Pages"
2546
- msgstr "Pagine singole"
2547
-
2548
- #: ../classes/display-conditions.php:455 ../includes/array_ad_conditions.php:73
2549
- msgid "Archive Pages"
2550
- msgstr "Pagine Archivio"
2551
-
2552
- #: ../classes/display-conditions.php:460 ../includes/array_ad_conditions.php:78
2553
- msgid "Search Results"
2554
- msgstr "Risultati Ricerca"
2555
-
2556
- #: ../classes/display-conditions.php:465 ../includes/array_ad_conditions.php:83
2557
- msgid "404 Page"
2558
- msgstr "Pagina 404"
2559
-
2560
- #: ../classes/display-conditions.php:470 ../includes/array_ad_conditions.php:88
2561
- msgid "Attachment Pages"
2562
- msgstr "Pagine Allegato"
2563
-
2564
- #: ../classes/widget.php:25
2565
- msgid "Display Ads and Ad Groups."
2566
- msgstr "Mostra Ad e Gruppi Ad"
2567
-
2568
- #: ../classes/widget.php:67
2569
- msgid "Title:"
2570
- msgstr "Titolo:"
2571
-
2572
- #: ../includes/array_ad_conditions.php:39
2573
- msgid "Post Types"
2574
- msgstr "Tipi di Pagina"
2575
-
2576
- #: ../includes/array_ad_conditions.php:45
2577
- msgid "Categories, Tags and Taxonomies"
2578
- msgstr "Categorie, Tag e Tassonomie"
2579
-
2580
- #: ../includes/array_ad_conditions.php:46
2581
- msgid ""
2582
- "Choose terms from public category, tag and other taxonomies a post must "
2583
- "belong to in order to have ads."
2584
- msgstr ""
2585
- "Scegli i requisiti che una categoria, un tag o altra tassonomia deve "
2586
- "possedere per avere gli ad."
2587
-
2588
- #: ../includes/array_ad_conditions.php:51
2589
- msgid "Category Archives"
2590
- msgstr "Archivi di Categoria"
2591
-
2592
- #: ../includes/array_ad_conditions.php:52
2593
- msgid "comma seperated IDs of category archives"
2594
- msgstr "ID di archivi categorie separati da virgola"
2595
-
2596
- #: ../includes/array_ad_conditions.php:57
2597
- msgid "Individual Posts, Pages and Public Post Types"
2598
- msgstr "Post singoli, Pagine e tipi Post pubblici"
2599
-
2600
- #: ../public/class-advanced-ads.php:310
2601
- #, php-format
2602
- msgid "Advanced Ads Error: %s"
2603
- msgstr "Errore: %s"
2604
-
2605
- #: ../public/class-advanced-ads.php:551
2606
- msgctxt "ad group general name"
2607
- msgid "Ad Groups"
2608
- msgstr "Gruppi Ad"
2609
-
2610
- #: ../public/class-advanced-ads.php:552
2611
- msgctxt "ad group singular name"
2612
- msgid "Ad Group"
2613
- msgstr "Gruppo Ad"
2614
-
2615
- #: ../public/class-advanced-ads.php:553
2616
- msgid "Search Ad Groups"
2617
- msgstr "Cerca Gruppo Ad"
2618
-
2619
- #: ../public/class-advanced-ads.php:554
2620
- msgid "All Ad Groups"
2621
- msgstr "Tutti i Gruppi"
2622
-
2623
- #: ../public/class-advanced-ads.php:555
2624
- msgid "Parent Ad Groups"
2625
- msgstr "Genitore Gruppo Ad:"
2626
-
2627
- #: ../public/class-advanced-ads.php:556
2628
- msgid "Parent Ad Groups:"
2629
- msgstr "Genitore Gruppi Ad:"
2630
-
2631
- #: ../public/class-advanced-ads.php:557
2632
- msgid "Edit Ad Group"
2633
- msgstr "Aggiorna Gruppo Ad"
2634
-
2635
- #: ../public/class-advanced-ads.php:558
2636
- msgid "Update Ad Group"
2637
- msgstr "Aggiorna Gruppo Ad"
2638
-
2639
- #: ../public/class-advanced-ads.php:559
2640
- msgid "Add New Ad Group"
2641
- msgstr "Aggiungi nuovo gruppo Ad"
2642
-
2643
- #: ../public/class-advanced-ads.php:560
2644
- msgid "New Ad Groups Name"
2645
- msgstr "Nuovo nome gruppo"
2646
-
2647
- #: ../public/class-advanced-ads.php:562
2648
- msgid "No Ad Group found"
2649
- msgstr "Nessun Gruppo Ad trovato"
2650
-
2651
- #: ../public/class-advanced-ads.php:593
2652
- msgid "Edit Ad"
2653
- msgstr "Modifica Ad"
2654
-
2655
- #: ../public/class-advanced-ads.php:595
2656
- msgid "View"
2657
- msgstr "Vedi"
2658
-
2659
- #: ../public/class-advanced-ads.php:596
2660
- msgid "View the Ad"
2661
- msgstr "Vedi l'Ad"
2662
-
2663
- #: ../public/class-advanced-ads.php:597
2664
- msgid "Search Ads"
2665
- msgstr "Cerca Ad"
2666
-
2667
- #: ../public/class-advanced-ads.php:598
2668
- msgid "No Ads found"
2669
- msgstr "Nessun Ad trovato"
2670
-
2671
- #: ../public/class-advanced-ads.php:599
2672
- msgid "No Ads found in Trash"
2673
- msgstr "Nessun Ad trovato in cestino"
2674
-
2675
- #: ../public/class-advanced-ads.php:600
2676
- msgid "Parent Ad"
2677
- msgstr "Genitore Ad"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/advanced-ads-nl_NL.mo DELETED
Binary file
languages/advanced-ads-nl_NL.po DELETED
@@ -1,2855 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: Advanved Ads\n"
4
- "Report-Msgid-Bugs-To: http://wordpress.org/plugins/plugin-name\n"
5
- "POT-Creation-Date: 2015-01-27 16:47+0100\n"
6
- "PO-Revision-Date: Tue Apr 26 2016 18:47:46 GMT+0200 (CEST)\n"
7
- "Last-Translator: admin <post@webzunft.de>\n"
8
- "Language-Team: webgilde <thomas.maier@webgilde.com>\n"
9
- "Language: Dutch\n"
10
- "Plural-Forms: nplurals=2; plural=n != 1\n"
11
- "MIME-Version: 1.0\n"
12
- "Content-Type: text/plain; charset=UTF-8\n"
13
- "Content-Transfer-Encoding: 8bit\n"
14
- "X-Poedit-SourceCharset: UTF-8\n"
15
- "X-Generator: Loco - https://localise.biz/\n"
16
- "X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;"
17
- "__:1;_e:1;_c:1;_n:1,2;_n_noop:1,2;_nc:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
18
- "_x:1,2c;_ex:1,2c;_nx:1,2,4c;_nx_noop:1,2,3c;_n_js:1,2;_nx_js:1,2,3c;"
19
- "esc_attr__:1;esc_html__:1;esc_attr_e:1;esc_html_e:1;esc_attr_x:1,2c;"
20
- "esc_html_x:1,2c;comments_number_link:2,3;t:1;st:1;trans:1;transChoice:1,2\n"
21
- "X-Poedit-Basepath: ../\n"
22
- "X-Poedit-SearchPath-0: .\n"
23
- "X-Loco-Target-Locale: nl_NL"
24
-
25
- #. Name of the plugin
26
- msgid "Advanced Ads"
27
- msgstr ""
28
-
29
- #. URI of the plugin
30
- msgid "https://wpadvancedads.com"
31
- msgstr ""
32
-
33
- #. Description of the plugin
34
- msgid "Manage and optimize your ads in WordPress"
35
- msgstr ""
36
-
37
- #. Author of the plugin
38
- msgid "Thomas Maier"
39
- msgstr ""
40
-
41
- #. Author URI of the plugin
42
- msgid "http://webgilde.com"
43
- msgstr ""
44
-
45
- #: ../admin/class-advanced-ads-admin.php:212 ../classes/display-conditions.php:
46
- #: 171 ../classes/visitor-conditions.php:214
47
- msgid "or"
48
- msgstr ""
49
-
50
- #: ../admin/class-advanced-ads-admin.php:213 ../admin/views/ad-display-metabox.
51
- #: php:76 ../admin/views/ad-visitor-metabox.php:68 ../classes/display-conditions.
52
- #: php:171 ../classes/visitor-conditions.php:214
53
- msgid "and"
54
- msgstr ""
55
-
56
- #: ../admin/class-advanced-ads-admin.php:425
57
- msgid "Please enter a message"
58
- msgstr ""
59
-
60
- #: ../admin/class-advanced-ads-admin.php:435
61
- #, php-format
62
- msgid "Email could NOT be sent. Please contact us directly at %s."
63
- msgstr ""
64
-
65
- #: ../admin/class-advanced-ads-admin.php:438
66
- msgid "Please enter a valid email address"
67
- msgstr ""
68
-
69
- #: ../admin/class-advanced-ads-admin.php:994
70
- msgid "Allow editors to manage ads"
71
- msgstr ""
72
-
73
- #: ../admin/class-advanced-ads-admin.php:1130
74
- msgid ""
75
- "Please check your post content. A priority of 10 and below might cause "
76
- "issues (wpautop function might run twice)."
77
- msgstr ""
78
-
79
- #: ../admin/class-advanced-ads-admin.php:1201
80
- msgid ""
81
- "If checked, the Advanced Ads Widget will not work with the fixed option of "
82
- "the <strong>Q2W3 Fixed Widget</strong> plugin."
83
- msgstr ""
84
-
85
- #: ../admin/class-advanced-ads-admin.php:1223
86
- msgid "Allow editors to also manage and publish ads."
87
- msgstr ""
88
-
89
- #: ../admin/class-advanced-ads-admin.php:1224
90
- #, php-format
91
- msgid ""
92
- "You can assign different ad-related roles on a user basis with <a href=\"%s\" "
93
- "target=\"_blank\">Advanced Ads Pro</a>."
94
- msgstr ""
95
-
96
- #: ../admin/class-advanced-ads-admin.php:1282
97
- msgid "Ad Planning"
98
- msgstr ""
99
-
100
- #: ../admin/class-advanced-ads-admin.php:1643
101
- #, php-format
102
- msgid "time of %s"
103
- msgstr ""
104
-
105
- #: ../admin/class-advanced-ads-admin.php:1684 ../admin/views/setting-license.php:37
106
- msgid "Please enter a valid license key"
107
- msgstr ""
108
-
109
- #: ../admin/class-advanced-ads-admin.php:1710
110
- msgid "License couldn’t be activated. Please try again later."
111
- msgstr ""
112
-
113
- #: ../admin/class-advanced-ads-admin.php:1722
114
- msgid "This is the bundle license key."
115
- msgstr ""
116
-
117
- #: ../admin/class-advanced-ads-admin.php:1723
118
- msgid "This is not the correct key for this add-on."
119
- msgstr ""
120
-
121
- #: ../admin/class-advanced-ads-admin.php:1724
122
- msgid "There are no activations left."
123
- msgstr ""
124
-
125
- #: ../admin/class-advanced-ads-admin.php:1787
126
- msgid "Error while trying to disable the license. Please contact support."
127
- msgstr ""
128
-
129
- #: ../admin/class-advanced-ads-admin.php:1810 ../admin/class-advanced-ads-admin.
130
- #: php:1827
131
- msgid "License couldn’t be deactivated. Please try again later."
132
- msgstr ""
133
-
134
- #: ../admin/class-advanced-ads-admin.php:1991
135
- msgid "Add-Ons"
136
- msgstr ""
137
-
138
- #: ../admin/includes/class-ad-groups-list.php:164 ../admin/views/ad-list-timing-
139
- #: column.php:4
140
- #, php-format
141
- msgid "starts %s"
142
- msgstr ""
143
-
144
- #: ../admin/includes/class-ad-groups-list.php:183 ../admin/views/ad-list-timing-
145
- #: column.php:21
146
- #, php-format
147
- msgid "expires %s"
148
- msgstr ""
149
-
150
- #: ../admin/includes/class-ad-groups-list.php:185 ../admin/views/ad-list-timing-
151
- #: column.php:23
152
- #, php-format
153
- msgid "<strong>expired</strong> %s"
154
- msgstr ""
155
-
156
- #: ../admin/includes/class-overview-widgets.php:59
157
- msgid "Geo Targeting"
158
- msgstr ""
159
-
160
- #: ../admin/includes/class-overview-widgets.php:151
161
- #, php-format
162
- msgid "<a href=\"%s\" target=\"_blank\">FAQ and Support</a>"
163
- msgstr ""
164
-
165
- #: ../admin/includes/class-overview-widgets.php:211
166
- msgid "Target visitors by their geo location."
167
- msgstr ""
168
-
169
- #: ../admin/includes/class-overview-widgets.php:213
170
- msgid "Get the Geo Targeting add-on"
171
- msgstr ""
172
-
173
- #: ../admin/includes/class-overview-widgets.php:235
174
- msgid "optional background overlay"
175
- msgstr ""
176
-
177
- #: ../admin/includes/notices.php:61
178
- msgid ""
179
- "One or more license keys for <strong>Advanced Ads add-ons are invalid or "
180
- "missing</strong>."
181
- msgstr ""
182
-
183
- #: ../admin/includes/notices.php:61
184
- #, php-format
185
- msgid "Please add valid license keys <a href=\"%s\">here</a>."
186
- msgstr ""
187
-
188
- #: ../admin/includes/notices.php:79
189
- #, php-format
190
- msgid ""
191
- "<img src=\"%3$s\" alt=\"Thomas\" width=\"80\" height=\"115\" class=\"advads-review-"
192
- "image\"/>You are using <strong>Advanced Ads</strong> for some time now. Thank "
193
- "you! If you need my help then please visit the <a href=\"%1$s\" "
194
- "target=\"_blank\">Support page</a> to get free help.</p><h3>Thanks for your "
195
- "Review</h3><p>If you share my passion and find Advanced Ads useful then "
196
- "please <a href=\"%2$s\" target=\"_blank\">leave a 5-star review on wordpress."
197
- "org</a>.</p><p><em>Thomas</em>"
198
- msgstr ""
199
-
200
- #: ../admin/includes/notices.php:85
201
- #, php-format
202
- msgid ""
203
- "Some assets were changed. Please <strong>rebuild the asset folder</strong> "
204
- "in the <a href=\"%s\">Advanced Ads settings</a> to update the ad blocker "
205
- "disguise."
206
- msgstr ""
207
-
208
- #: ../admin/includes/shortcode-creator-l10n.php:10
209
- msgctxt "shortcode creator"
210
- msgid "Add an ad"
211
- msgstr ""
212
-
213
- #: ../admin/includes/shortcode-creator-l10n.php:11
214
- msgctxt "shortcode creator"
215
- msgid "Add shortcode"
216
- msgstr ""
217
-
218
- #: ../admin/includes/shortcode-creator-l10n.php:12
219
- msgctxt "shortcode creator"
220
- msgid "Cancel"
221
- msgstr ""
222
-
223
- #: ../admin/views/ad-display-metabox.php:6
224
- msgid "Set Display Conditions to allow or hide the ad on specific pages."
225
- msgstr ""
226
-
227
- #: ../admin/views/ad-display-metabox.php:6 ../admin/views/ad-output-metabox.php:
228
- #: 46 ../admin/views/ad-visitor-metabox.php:4
229
- msgid "Manual"
230
- msgstr ""
231
-
232
- #: ../admin/views/ad-display-metabox.php:8 ../admin/views/notices/jqueryui_error.
233
- #: php:2
234
- #, php-format
235
- msgid ""
236
- "There might be a problem with layouts and scripts in your dashboard. Please "
237
- "check <a href=\"%s\" target=\"_blank\">this article to learn more</a>."
238
- msgstr ""
239
-
240
- #: ../admin/views/ad-list-filters.php:2
241
- msgid "all ad types"
242
- msgstr ""
243
-
244
- #: ../admin/views/ad-list-filters.php:5
245
- msgid "all ad sizes"
246
- msgstr ""
247
-
248
- #: ../admin/views/ad-list-filters.php:8
249
- msgid "all ad dates"
250
- msgstr ""
251
-
252
- #: ../admin/views/ad-list-filters.php:10
253
- msgid "any expiry date"
254
- msgstr ""
255
-
256
- #: ../admin/views/ad-list-filters.php:11
257
- msgid "planned"
258
- msgstr ""
259
-
260
- #: ../admin/views/ad-list-filters.php:14
261
- msgid "all ad groups"
262
- msgstr ""
263
-
264
- #: ../admin/views/ad-output-metabox.php:33
265
- msgid "container id"
266
- msgstr ""
267
-
268
- #: ../admin/views/ad-output-metabox.php:36
269
- msgid "Specify the id of the ad container. Leave blank for random or no id."
270
- msgstr ""
271
-
272
- #: ../admin/views/ad-output-metabox.php:38
273
- msgid "container classes"
274
- msgstr ""
275
-
276
- #: ../admin/views/ad-output-metabox.php:41
277
- msgid ""
278
- "Specify one or more classes for the container. Separate multiple classes "
279
- "with a space"
280
- msgstr ""
281
-
282
- #: ../admin/views/ad-output-metabox.php:44
283
- msgid "Enable debug mode"
284
- msgstr ""
285
-
286
- #: ../admin/views/ad-parameters-size.php:6
287
- msgid "reserve this space"
288
- msgstr ""
289
-
290
- #: ../admin/views/ad-submitbox-meta.php:12
291
- msgid "Month"
292
- msgstr ""
293
-
294
- #: ../admin/views/ad-submitbox-meta.php:21
295
- msgid "Day"
296
- msgstr ""
297
-
298
- #: ../admin/views/ad-submitbox-meta.php:22
299
- msgid "Year"
300
- msgstr ""
301
-
302
- #: ../admin/views/ad-submitbox-meta.php:23
303
- msgid "Hour"
304
- msgstr ""
305
-
306
- #: ../admin/views/ad-submitbox-meta.php:24
307
- msgid "Minute"
308
- msgstr ""
309
-
310
- #: ../admin/views/ad-submitbox-meta.php:29
311
- #, php-format
312
- msgctxt "order of expiry date fields 1: month, 2: day, 3: year, 4: hour, 5: minute"
313
- msgid "%1$s %2$s, %3$s @ %4$s %5$s"
314
- msgstr ""
315
-
316
- #: ../admin/views/ad-visitor-metabox.php:30
317
- #, php-format
318
- msgid ""
319
- "Check out cache-busting in <a href=\"%s\" target=\"_blank\">Advanced Ads Pro</a> "
320
- "if dynamic features get cached."
321
- msgstr ""
322
-
323
- #: ../admin/views/feedback_disable.php:3
324
- msgid "Thank you for helping to improve Advanced Ads."
325
- msgstr ""
326
-
327
- #: ../admin/views/feedback_disable.php:4
328
- msgid ""
329
- "Your feedback will motivates me to work harder towards a professional ad "
330
- "management solution."
331
- msgstr ""
332
-
333
- #: ../admin/views/feedback_disable.php:5
334
- msgid "Why did you decide to disable Advanced Ads?"
335
- msgstr ""
336
-
337
- #: ../admin/views/feedback_disable.php:7
338
- msgid "I stopped showing ads on my site"
339
- msgstr ""
340
-
341
- #: ../admin/views/feedback_disable.php:8
342
- #, php-format
343
- msgid "I miss a feature or <a href=\"%s\">add-on</a>"
344
- msgstr ""
345
-
346
- #: ../admin/views/feedback_disable.php:9
347
- msgid "I have a technical problem"
348
- msgstr ""
349
-
350
- #: ../admin/views/feedback_disable.php:10
351
- msgid "other reason"
352
- msgstr ""
353
-
354
- #: ../admin/views/feedback_disable.php:12
355
- msgid "Please specify, if possible"
356
- msgstr ""
357
-
358
- #: ../admin/views/feedback_disable.php:13
359
- msgid "What would be a reason to return to Advanced Ads?"
360
- msgstr ""
361
-
362
- #: ../admin/views/intro.php:79
363
- #, php-format
364
- msgid ""
365
- "Get started by creating an ad <a href=\"%1$s\" target=\"blank\">right now</a> or "
366
- "watch the <a href=\"%2$s\" target=\"blank\">tutorial video (3:29min)</a> first."
367
- msgstr ""
368
-
369
- #: ../admin/views/placements.php:115
370
- msgid "Important Notice"
371
- msgstr ""
372
-
373
- #: ../admin/views/placements.php:115
374
- msgid ""
375
- "Your server is missing an extension. This might break the content injection."
376
- "<br/>Ignore this warning if everything works fine or else ask your hosting "
377
- "provider to enable <em>mbstring</em>."
378
- msgstr ""
379
-
380
- #: ../admin/views/placements.php:125
381
- msgid "advanced options"
382
- msgstr ""
383
-
384
- #: ../admin/views/placements.php:133
385
- msgctxt "checkbox to remove placement"
386
- msgid "delete"
387
- msgstr ""
388
-
389
- #: ../admin/views/setting-license.php:5
390
- msgid "Your license expired."
391
- msgstr ""
392
-
393
- #: ../admin/views/setting-license.php:6
394
- #, php-format
395
- msgid "<a href=\"%s\" target=\"_blank\">Renew it with a discount</a>."
396
- msgstr ""
397
-
398
- #: ../admin/views/setting-license.php:28
399
- msgid "Deactivate License"
400
- msgstr ""
401
-
402
- #: ../admin/views/setting-license.php:39
403
- msgid "License key invalid"
404
- msgstr ""
405
-
406
- #: ../admin/views/settings-disable-ads.php:21
407
- msgid "Disable ads in Feed"
408
- msgstr ""
409
-
410
- #: ../admin/views/support.php:8
411
- msgid "Possible Issues"
412
- msgstr ""
413
-
414
- #: ../admin/views/support.php:9
415
- msgid ""
416
- "Please fix the red highlighted issues on this page or try to understand "
417
- "their consequences before contacting support."
418
- msgstr ""
419
-
420
- #: ../admin/views/support.php:13
421
- #, php-format
422
- msgid ""
423
- "Your <strong>PHP version (%s) is too low</strong>. Advanced Ads is built for "
424
- "PHP 5.3 and higher. It might work, but updating PHP is highly recommended. "
425
- "Please ask your hosting provider for more information."
426
- msgstr ""
427
-
428
- #: ../admin/views/support.php:16
429
- #, php-format
430
- msgid ""
431
- "Your <strong>website uses cache</strong>. Some dynamic features like ad "
432
- "rotation or visitor conditions might not work properly. Use the cache-"
433
- "busting feature of <a href=\"%s\" target=\"_blank\">Advanced Ads Pro</a> to load "
434
- "ads dynamically."
435
- msgstr ""
436
-
437
- #: ../admin/views/support.php:19
438
- msgid "There is a <strong>new WordPress version available</strong>. Please update."
439
- msgstr ""
440
-
441
- #: ../admin/views/support.php:22
442
- msgid "There are <strong>plugin updates available</strong>. Please update."
443
- msgstr ""
444
-
445
- #: ../admin/views/support.php:31
446
- #, php-format
447
- msgid ""
448
- "<strong>Autoptimize plugin detected</strong>. While this plugin is great for "
449
- "site performance, it is known to alter code, including scripts from ad "
450
- "networks. <a href=\"%s\" target=\"_blank\">Advanced Ads Pro</a> has a build-in "
451
- "support for Autoptimize."
452
- msgstr ""
453
-
454
- #: ../admin/views/support.php:34
455
- #, php-format
456
- msgid ""
457
- "Plugins that are known to cause (partial) problems: <strong>%1$s</strong>. "
458
- "<a href=\"%2$s\" target=\"_blank\">Learn more</a>."
459
- msgstr ""
460
-
461
- #: ../admin/views/support.php:38
462
- #, php-format
463
- msgid ""
464
- "Ads are disabled for all or some pages. See \"disabled ads\" in <a "
465
- "href=\"%s\">settings</a>."
466
- msgstr ""
467
-
468
- #: ../admin/views/notices/adblock.php:3
469
- msgid ""
470
- "Please disable your <strong>AdBlocker</strong> to prevent problems with your "
471
- "ad setup."
472
- msgstr ""
473
-
474
- #: ../classes/ad_placements.php:61
475
- msgid "Sidebar Widget"
476
- msgstr ""
477
-
478
- #: ../classes/ad_placements.php:62
479
- msgid ""
480
- "Create a sidebar widget with an ad. Can be placed and used like any other "
481
- "widget."
482
- msgstr ""
483
-
484
- #: ../classes/ad_placements.php:204
485
- #, php-format
486
- msgid "paragraph without image (%s)"
487
- msgstr ""
488
-
489
- #: ../classes/ad_type_group.php:31
490
- msgid ""
491
- "Choose an existing ad group. Use this type when you want to assign the same "
492
- "display and visitor conditions to all ads in that group."
493
- msgstr ""
494
-
495
- #: ../classes/ad_type_group.php:60
496
- msgid "ad group"
497
- msgstr ""
498
-
499
- #: ../classes/ad_type_image.php:34
500
- msgid "Image Ad"
501
- msgstr ""
502
-
503
- #: ../classes/ad_type_image.php:35
504
- msgid "Ads in various image formats."
505
- msgstr ""
506
-
507
- #: ../classes/ad_type_image.php:55
508
- msgid "Insert File"
509
- msgstr ""
510
-
511
- #: ../classes/ad_type_image.php:55
512
- msgid "Insert"
513
- msgstr ""
514
-
515
- #: ../classes/ad_type_image.php:55
516
- msgid "select image"
517
- msgstr ""
518
-
519
- #: ../classes/ad_type_image.php:56
520
- msgid "edit"
521
- msgstr ""
522
-
523
- #: ../classes/ad_type_image.php:65
524
- msgid "url"
525
- msgstr ""
526
-
527
- #: ../classes/ad_type_image.php:67
528
- #, php-format
529
- msgid ""
530
- "Pro: Open this url in a new window and track impressions and clicks with the "
531
- "<a href=\"%s\" target=\"_blank\">Tracking add-on</a>"
532
- msgstr ""
533
-
534
- #: ../classes/checks.php:223
535
- #, php-format
536
- msgid ""
537
- "Possible conflict between jQueryUI library, used by Advanced Ads and other "
538
- "libraries (probably <a href=\"%s\">Twitter Bootstrap</a>). This might lead to "
539
- "misfortunate formats in forms, but should not damage features."
540
- msgstr ""
541
-
542
- #: ../classes/display-conditions.php:69
543
- msgid "post type"
544
- msgstr ""
545
-
546
- #: ../classes/display-conditions.php:76
547
- msgid "specific pages"
548
- msgstr ""
549
-
550
- #: ../classes/display-conditions.php:88
551
- msgid "author"
552
- msgstr ""
553
-
554
- #: ../classes/display-conditions.php:113
555
- #, php-format
556
- msgid "archive: %s"
557
- msgstr ""
558
-
559
- #: ../classes/display-conditions.php:214 ../classes/display-conditions.php:258 ..
560
- #: classes/display-conditions.php:346
561
- msgctxt "Error message shown when no display condition term is selected"
562
- msgid "Please select some items."
563
- msgstr ""
564
-
565
- #: ../classes/display-conditions.php:243 ../classes/display-conditions.php:296 ..
566
- #: classes/display-conditions.php:371
567
- msgid "show"
568
- msgstr ""
569
-
570
- #: ../classes/display-conditions.php:244 ../classes/display-conditions.php:297 ..
571
- #: classes/display-conditions.php:372
572
- msgid "hide"
573
- msgstr ""
574
-
575
- #: ../classes/display-conditions.php:400
576
- msgid "title or id"
577
- msgstr ""
578
-
579
- #: ../classes/display-conditions.php:480
580
- msgid "Feed"
581
- msgstr ""
582
-
583
- #: ../classes/display-conditions.php:481
584
- msgid "allow ads in Feed"
585
- msgstr ""
586
-
587
- #: ../classes/visitor-conditions.php:73
588
- #, php-format
589
- msgid ""
590
- "Pro: Display ads by the available space on the device using the <a href=\"%s\" "
591
- "target=\"_blank\">Responsive add-on</a>"
592
- msgstr ""
593
-
594
- #: ../classes/visitor-conditions.php:107
595
- msgid "Manual and Troubleshooting"
596
- msgstr ""
597
-
598
- #: ../modules/ad-blocker/admin/admin.php:133
599
- msgid "The asset folder was rebuilt successfully"
600
- msgstr ""
601
-
602
- #: ../modules/ad-blocker/admin/admin.php:218
603
- msgid "Ad blocker fix"
604
- msgstr ""
605
-
606
- #: ../modules/ad-blocker/admin/admin.php:257
607
- msgid "There is no writable upload folder"
608
- msgstr ""
609
-
610
- #: ../modules/ad-blocker/admin/admin.php:278
611
- #, php-format
612
- msgid "Unable to rename \"%s\" directory"
613
- msgstr ""
614
-
615
- #: ../modules/ad-blocker/admin/admin.php:294 ../modules/ad-blocker/admin/admin.
616
- #: php:307 ../modules/ad-blocker/admin/admin.php:324
617
- #, php-format
618
- msgid "Unable to copy assets to the \"%s\" directory"
619
- msgstr ""
620
-
621
- #: ../modules/ad-blocker/admin/admin.php:358 ../modules/ad-blocker/admin/admin.
622
- #: php:378
623
- #, php-format
624
- msgid "We do not have direct write access to the \"%s\" directory"
625
- msgstr ""
626
-
627
- #: ../modules/ad-blocker/admin/admin.php:445
628
- #, php-format
629
- msgid ""
630
- "Unable to create \"%s\" directory. Is its parent directory writable by the "
631
- "server?"
632
- msgstr ""
633
-
634
- #: ../modules/ad-blocker/admin/admin.php:456
635
- #, php-format
636
- msgid "Unable to copy files to %s"
637
- msgstr ""
638
-
639
- #: ../modules/ad-blocker/admin/admin.php:592
640
- msgid ""
641
- "Prevents ad block software from breaking your website when blocking asset "
642
- "files (.js, .css)."
643
- msgstr ""
644
-
645
- #: ../modules/ad-blocker/admin/views/rebuild_form.php:1
646
- msgid "Ad blocker file folder"
647
- msgstr ""
648
-
649
- #: ../modules/ad-blocker/admin/views/rebuild_form.php:10
650
- msgid "Upload folder is not writable"
651
- msgstr ""
652
-
653
- #: ../modules/ad-blocker/admin/views/rebuild_form.php:23
654
- msgid "Asset path"
655
- msgstr ""
656
-
657
- #: ../modules/ad-blocker/admin/views/rebuild_form.php:27
658
- msgid "Asset URL"
659
- msgstr ""
660
-
661
- #: ../modules/ad-blocker/admin/views/rebuild_form.php:31
662
- msgid "Rename assets"
663
- msgstr ""
664
-
665
- #: ../modules/ad-blocker/admin/views/rebuild_form.php:34
666
- msgid "Check if you want to change the names of the assets"
667
- msgstr ""
668
-
669
- #: ../modules/ad-blocker/admin/views/rebuild_form.php:43
670
- #, php-format
671
- msgid ""
672
- "Please, rebuild the asset folder. All assets will be located in "
673
- "<strong>%s</strong>"
674
- msgstr ""
675
-
676
- #: ../modules/ad-blocker/admin/views/rebuild_form.php:46
677
- msgid "Rebuild asset folder"
678
- msgstr ""
679
-
680
- #: ../modules/gadsense/admin/admin.php:149
681
- msgid "Activate Page-Level ads"
682
- msgstr ""
683
-
684
- #: ../modules/gadsense/admin/admin.php:169
685
- #, php-format
686
- msgid ""
687
- "Please enter your Publisher ID in order to use AdSense on your page. See the "
688
- "<a href=\"%s\" target=\"_blank\">manual</a> for more information."
689
- msgstr ""
690
-
691
- #: ../modules/gadsense/admin/admin.php:205
692
- msgid ""
693
- "Due to technical restrictions, the limit does not work on placements with "
694
- "cache-busting enabled."
695
- msgstr ""
696
-
697
- #: ../modules/gadsense/admin/admin.php:219
698
- msgid "Insert Page-Level ads code on all pages."
699
- msgstr ""
700
-
701
- #: ../modules/gadsense/admin/admin.php:221
702
- msgid ""
703
- "You still need to enable Page-Level ads in your AdSense account. See <a "
704
- "href=\"https://support.google.com/adsense/answer/6245304\" "
705
- "target=\"_blank\">AdSense Help</a> (requires AdSense-login) for more "
706
- "information"
707
- msgstr ""
708
-
709
- #: ../public/class-advanced-ads.php:307
710
- msgid "Advanced Ads Error following:"
711
- msgstr ""
712
-
713
- #: ../admin/includes/class-overview-widgets.php:221 ../admin/views/ad-info-top.
714
- #: php:30
715
- #, fuzzy
716
- msgid ""
717
- "Fix ads to the browser while users are scrolling and create best performing "
718
- "anchor ads."
719
- msgstr ""
720
- "Zet advertenties vast in de browser terwijl een gebruiker scrollt voor de "
721
- "best presterende verankerde advertenties"
722
-
723
- #: ../modules/gadsense/main.php:19
724
- #, fuzzy
725
- msgid " at "
726
- msgstr "bij"
727
-
728
- #: ../admin/class-advanced-ads-admin.php:278
729
- msgid "Overview"
730
- msgstr "Overzicht"
731
-
732
- #: ../admin/class-advanced-ads-admin.php:282 ../admin/class-advanced-ads-admin.
733
- #: php:282 ../admin/includes/class-shortcode-creator.php:77 ../admin/views/ad-
734
- #: group-list-form-row.php:28 ../admin/views/ad-group-list-header.php:5 ..
735
- #: admin/views/placements.php:80 ../admin/views/placements.php:184 ..
736
- #: classes/widget.php:89 ../public/class-advanced-ads.php:588
737
- msgid "Ads"
738
- msgstr "Advertenties"
739
-
740
- #: ../admin/class-advanced-ads-admin.php:288 ../public/class-advanced-ads.php:591
741
- msgid "Add New Ad"
742
- msgstr "Nieuwe advertentie toevoegen"
743
-
744
- #: ../admin/class-advanced-ads-admin.php:288 ../public/class-advanced-ads.php:590
745
- #: ../public/class-advanced-ads.php:594
746
- msgid "New Ad"
747
- msgstr "Nieuwe advertentie"
748
-
749
- #: ../admin/class-advanced-ads-admin.php:293 ../admin/includes/class-shortcode-
750
- #: creator.php:84 ../admin/views/placements.php:73 ../admin/views/placements.php:
751
- #: 177 ../classes/widget.php:82
752
- msgid "Ad Groups"
753
- msgstr "Advertentiegroep"
754
-
755
- #: ../admin/class-advanced-ads-admin.php:293 ../public/class-advanced-ads.php:561
756
- msgid "Groups"
757
- msgstr "Groepen"
758
-
759
- #: ../admin/class-advanced-ads-admin.php:298
760
- msgid "Ad Placements"
761
- msgstr "Advertentie plaatsingen"
762
-
763
- #: ../admin/class-advanced-ads-admin.php:298 ../admin/includes/class-shortcode-
764
- #: creator.php:91 ../admin/views/placements.php:18 ../classes/widget.php:75
765
- msgid "Placements"
766
- msgstr "Plaatsingen"
767
-
768
- #: ../admin/class-advanced-ads-admin.php:302
769
- msgid "Advanced Ads Settings"
770
- msgstr "Advanced Ads instellingen"
771
-
772
- #: ../admin/class-advanced-ads-admin.php:302 ../admin/class-advanced-ads-admin.
773
- #: php:550 ../admin/views/debug.php:10
774
- msgid "Settings"
775
- msgstr "Instellingen"
776
-
777
- #: ../admin/class-advanced-ads-admin.php:305
778
- msgid "Advanced Ads Debugging"
779
- msgstr ""
780
- "Advanced Ads \n"
781
- "Debugging"
782
-
783
- #: ../admin/class-advanced-ads-admin.php:305
784
- msgid "Debug"
785
- msgstr "Debug"
786
-
787
- #: ../admin/class-advanced-ads-admin.php:309 ../admin/class-advanced-ads-admin.
788
- #: php:309
789
- msgid "Advanced Ads Intro"
790
- msgstr "Advanced Ads Introductie"
791
-
792
- #: ../admin/class-advanced-ads-admin.php:313 ../admin/class-advanced-ads-admin.
793
- #: php:313 ../admin/class-advanced-ads-admin.php:1987
794
- msgid "Support"
795
- msgstr "Ondersteuning"
796
-
797
- #: ../admin/class-advanced-ads-admin.php:464 ../admin/class-advanced-ads-admin.
798
- #: php:491
799
- msgid "Sorry, you are not allowed to access this feature."
800
- msgstr "Sorry, u heeft niet genoeg rechten om deze functionaliteit te gebruiken."
801
-
802
- #: ../admin/class-advanced-ads-admin.php:477
803
- msgid ""
804
- "You attempted to edit an ad group that doesn&#8217;t exist. Perhaps it was "
805
- "deleted?"
806
- msgstr ""
807
- "U heeft geprobeerd een advertentie te bewerken die niet bestaat. Wellicht is "
808
- "deze advertentie verwijderd?"
809
-
810
- #: ../admin/class-advanced-ads-admin.php:592
811
- msgid "Ad Type"
812
- msgstr "Advertentietype"
813
-
814
- #: ../admin/class-advanced-ads-admin.php:595
815
- msgid "Ad Parameters"
816
- msgstr "Advertentie parameters"
817
-
818
- #: ../admin/class-advanced-ads-admin.php:598
819
- msgid "Layout / Output"
820
- msgstr "Layout / Output"
821
-
822
- #: ../admin/class-advanced-ads-admin.php:601
823
- msgid "Display Conditions"
824
- msgstr "Vertoningsvoorwaarden"
825
-
826
- #: ../admin/class-advanced-ads-admin.php:604
827
- msgid "Visitor Conditions"
828
- msgstr "Bezoekersvoorwaarden"
829
-
830
- #: ../admin/class-advanced-ads-admin.php:829 ../admin/class-advanced-ads-admin.
831
- #: php:830
832
- msgid "Ad updated."
833
- msgstr "Advertentie bijgewerkt."
834
-
835
- #. translators: %s: date and time of the revision
836
- #: ../admin/class-advanced-ads-admin.php:832
837
- #, php-format
838
- msgid "Ad restored to revision from %s"
839
- msgstr "Advertentie hersteld naar revisie %s"
840
-
841
- #: ../admin/class-advanced-ads-admin.php:833
842
- msgid "Ad published."
843
- msgstr "Advertentie gepubliceerd."
844
-
845
- #: ../admin/class-advanced-ads-admin.php:834
846
- msgid "Ad saved."
847
- msgstr "Advertentie opgeslagen."
848
-
849
- #: ../admin/class-advanced-ads-admin.php:835
850
- msgid "Ad submitted."
851
- msgstr ""
852
- "Advertentie\n"
853
- " ingediend."
854
-
855
- #: ../admin/class-advanced-ads-admin.php:837
856
- #, php-format
857
- msgid "Ad scheduled for: <strong>%1$s</strong>."
858
- msgstr "Advertentie is ingepland voor: <strong>%1$s</strong>."
859
-
860
- #. translators: Publish box date format, see http://php.net/date
861
- #: ../admin/class-advanced-ads-admin.php:839
862
- msgid "M j, Y @ G:i"
863
- msgstr "d-m-Y @ H:i"
864
-
865
- #: ../admin/class-advanced-ads-admin.php:841
866
- msgid "Ad draft updated."
867
- msgstr "Advertentie concept bijgewerkt."
868
-
869
- #: ../admin/class-advanced-ads-admin.php:860
870
- #, php-format
871
- msgid "%s ad updated."
872
- msgid_plural "%s ads updated."
873
- msgstr[0] "%s advertentie bijgewerkt."
874
- msgstr[1] "%s advertenties bijgewerkt."
875
-
876
- #: ../admin/class-advanced-ads-admin.php:861
877
- #, php-format
878
- msgid "%s ad not updated, somebody is editing it."
879
- msgid_plural "%s ads not updated, somebody is editing them."
880
- msgstr[0] "%s advertentie niet bijgewerkt, iemand anders is deze aan het bewerken."
881
- msgstr[1] ""
882
- "%s advertenties niet bijgewerkt, iemand anders is deze aan het \n"
883
- "bewerken\n"
884
- "."
885
-
886
- #: ../admin/class-advanced-ads-admin.php:862
887
- #, php-format
888
- msgid "%s ad permanently deleted."
889
- msgid_plural "%s ads permanently deleted."
890
- msgstr[0] "%s advertentie permanent verwijderd."
891
- msgstr[1] "%s advertenties permanent verwijderd."
892
-
893
- #: ../admin/class-advanced-ads-admin.php:863
894
- #, php-format
895
- msgid "%s ad moved to the Trash."
896
- msgid_plural "%s ads moved to the Trash."
897
- msgstr[0] "%s advertentie verplaatst naar de prullenbak."
898
- msgstr[1] "%s advertenties verplaatst naar de prullenbak."
899
-
900
- #: ../admin/class-advanced-ads-admin.php:864
901
- #, php-format
902
- msgid "%s ad restored from the Trash."
903
- msgid_plural "%s ads restored from the Trash."
904
- msgstr[0] "%s advertentie teruggezet vanuit de prullenbak."
905
- msgstr[1] "%s advertenties teruggezet vanuit de prullenbak."
906
-
907
- #: ../admin/class-advanced-ads-admin.php:899 ../admin/views/settings.php:12
908
- msgid "General"
909
- msgstr "Algemeen"
910
-
911
- #: ../admin/class-advanced-ads-admin.php:911 ../admin/class-advanced-ads-admin.
912
- #: php:1015
913
- msgid "Licenses"
914
- msgstr "Licenties"
915
-
916
- #: ../admin/class-advanced-ads-admin.php:922
917
- msgid "Disable ads"
918
- msgstr "Advertenties uitschakelen"
919
-
920
- #: ../admin/class-advanced-ads-admin.php:930
921
- msgid "Hide ads for logged in users"
922
- msgstr "Advertenties verbergen voor ingelogde gebruikers"
923
-
924
- #: ../admin/class-advanced-ads-admin.php:938
925
- msgid "Use advanced JavaScript"
926
- msgstr "Geavanceerde JavaScript gebruiken"
927
-
928
- #: ../admin/class-advanced-ads-admin.php:946
929
- msgid "Unlimited ad injection"
930
- msgstr "Ongelimiteerde advertentie injectie"
931
-
932
- #: ../admin/class-advanced-ads-admin.php:954
933
- msgid "Priority of content injection filter"
934
- msgstr "Prioriteit van content injectie filter"
935
-
936
- #: ../admin/class-advanced-ads-admin.php:962
937
- msgid "Hide ads from bots"
938
- msgstr "Advertenties verbergen voor bots"
939
-
940
- #: ../admin/class-advanced-ads-admin.php:970
941
- msgid "Disable notices"
942
- msgstr "Notificaties uitschakelen"
943
-
944
- #: ../admin/class-advanced-ads-admin.php:978
945
- msgid "ID prefix"
946
- msgstr "ID voorvoegsel"
947
-
948
- #: ../admin/class-advanced-ads-admin.php:986
949
- msgid "Remove Widget ID"
950
- msgstr "Widget ID verwijderen"
951
-
952
- #: ../admin/class-advanced-ads-admin.php:1071
953
- msgid "(display to all)"
954
- msgstr "(aan iedereen tonen)"
955
-
956
- #: ../admin/class-advanced-ads-admin.php:1072
957
- msgid "Subscriber"
958
- msgstr "Abonnee"
959
-
960
- #: ../admin/class-advanced-ads-admin.php:1073
961
- msgid "Contributor"
962
- msgstr "Schrijver"
963
-
964
- #: ../admin/class-advanced-ads-admin.php:1074
965
- msgid "Author"
966
- msgstr "Auteur"
967
-
968
- #: ../admin/class-advanced-ads-admin.php:1075
969
- msgid "Editor"
970
- msgstr "Redacteur"
971
-
972
- #: ../admin/class-advanced-ads-admin.php:1076
973
- msgid "Admin"
974
- msgstr "Beheerder"
975
-
976
- #: ../admin/class-advanced-ads-admin.php:1084
977
- msgid "Choose the lowest role a user must have in order to not see any ads."
978
- msgstr ""
979
- "Kies de laagste rol die een gebruiker moet hebben om geen advertenties te "
980
- "zien."
981
-
982
- #: ../admin/class-advanced-ads-admin.php:1098
983
- msgid ""
984
- "<strong>notice: </strong>the file is currently enabled by an add-on that "
985
- "needs it."
986
- msgstr ""
987
- "<strong>Notificatie: </strong>het bestand is ingeschakeld door een add-on "
988
- "die het vereist. "
989
-
990
- #: ../admin/class-advanced-ads-admin.php:1101
991
- #, php-format
992
- msgid ""
993
- "Enable advanced JavaScript functions (<a href=\"%s\" target=\"_blank\">here</a>)."
994
- " Some features and add-ons might override this setting if they need features "
995
- "from this file."
996
- msgstr ""
997
- "Schakel geavanceerde JavaScript functies in (<a href=\"%s\" "
998
- "target=\"_blank\">hier</a>). Functies en add-ons kunnen deze instelling "
999
- "overschrijven als dat nodig is."
1000
-
1001
- #: ../admin/class-advanced-ads-admin.php:1114
1002
- msgid ""
1003
- "Some plugins and themes trigger ad injection where it shouldn’t happen. "
1004
- "Therefore, Advanced Ads ignores injected placements on non-singular pages "
1005
- "and outside the loop. However, this can cause problems with some themes. You "
1006
- "can enable this option if you don’t see ads or want to enable ad injections "
1007
- "on archive pages AT YOUR OWN RISK."
1008
- msgstr ""
1009
- "Sommige plugins en thema's injecteren advertenties op plekken waar dat niet "
1010
- "zou moeten. Om die reden negeert Advanced Ads plaatsingen op non-singulaire "
1011
- "pagina's en buiten de WordPress loop. Soms kan dit problemen opleveren, "
1012
- "indien dat het geval is kan je deze instelling aan zetten om het injecteren "
1013
- "van advertenties op dat soort pagina's toe te staan. GEBRUIKEN OP EIGEN "
1014
- "RISICO!"
1015
-
1016
- #: ../admin/class-advanced-ads-admin.php:1132
1017
- msgid ""
1018
- "Play with this value in order to change the priority of the injected ads "
1019
- "compared to other auto injected elements in the post content."
1020
- msgstr ""
1021
- "Door deze waarde aan te passen kunt u de prioriteit van geïnjecteerde "
1022
- "advertenties veranderen ten opzichte van ander automatisch geïnjecteerde "
1023
- "content en/of elementen."
1024
-
1025
- #: ../admin/class-advanced-ads-admin.php:1146
1026
- #, php-format
1027
- msgid ""
1028
- "Hide ads from crawlers, bots and empty user agents. Also prevents counting "
1029
- "impressions for bots when using the <a href=\"%s\" target=\"_blank\">Tracking "
1030
- "Add-On</a>."
1031
- msgstr ""
1032
- "Verberg advertenties van crawlers, bots en lege user agents. Voorkomt ook "
1033
- "het tellen van vertoningen voor bots als je gebruik maakt van de <a "
1034
- "href=\"%s\" target=\"_blank\">Tracking Add-On</a>."
1035
-
1036
- #: ../admin/class-advanced-ads-admin.php:1147
1037
- msgid ""
1038
- "Disabling this option only makes sense if your ads contain content you want "
1039
- "to display to bots (like search engines) or your site is cached and bots "
1040
- "could create a cached version without the ads."
1041
- msgstr ""
1042
- "Het uitzetten van deze optie heeft alleen nut als uw advertenties inhoud "
1043
- "bevatten die u wilt tonen aan bots (zoals zoekmachines) of uw website is "
1044
- "gecached en bots een gecachete versie kunnen maken zonder advertenties."
1045
-
1046
- #: ../admin/class-advanced-ads-admin.php:1160
1047
- msgid ""
1048
- "Disable internal notices like tips, tutorials, email newsletters and update "
1049
- "notices. Disabling notices is recommended if you run multiple blogs with "
1050
- "Advanced Ads already."
1051
- msgstr ""
1052
- "Schakel interne notificaties als tips, tutorials, email nieuwsbrief en "
1053
- "update notificaties uit. Het uitschakelen van deze notificaties is aan te "
1054
- "raden als u al meerdere blogs heeft met Advanced Ads geïnstalleerd."
1055
-
1056
- #: ../admin/class-advanced-ads-admin.php:1177
1057
- msgid ""
1058
- "Prefix of class or id attributes in the frontend. Change it if you don’t "
1059
- "want <strong>ad blockers</strong> to mark these blocks as ads.<br/>You might "
1060
- "need to <strong>rewrite css rules afterwards</strong>."
1061
- msgstr ""
1062
- "Voorvoegsel voor class of ID attributen aan de voorkant van uw website. "
1063
- "Verander deze waarde als u wilt voorkomen dat <strong>ad blockers</strong> "
1064
- "deze elementen blokkeert als zijnde advertenties."
1065
-
1066
- #: ../admin/class-advanced-ads-admin.php:1198
1067
- msgid ""
1068
- "Remove the ID attribute from widgets in order to not make them an easy "
1069
- "target of ad blockers."
1070
- msgstr ""
1071
- "Verwijder het ID attribuut van widgets om te voorkomen dat ze een makkelijk "
1072
- "doelwit zijn voor ad blockers."
1073
-
1074
- #: ../admin/class-advanced-ads-admin.php:1281
1075
- msgid "Ad Details"
1076
- msgstr "Advertentie details"
1077
-
1078
- #: ../admin/class-advanced-ads-admin.php:1417
1079
- msgid "Ad Settings"
1080
- msgstr "Advertentie instellingen"
1081
-
1082
- #: ../admin/class-advanced-ads-admin.php:1496 ../admin/views/overview.php:23
1083
- msgid "Ads Dashboard"
1084
- msgstr "Advertentie dashboard"
1085
-
1086
- #: ../admin/class-advanced-ads-admin.php:1508
1087
- msgid "From the ad optimization universe"
1088
- msgstr "Van het advertentie-optimalisatie universum."
1089
-
1090
- #: ../admin/class-advanced-ads-admin.php:1517
1091
- msgid "Advanced Ads Tutorials"
1092
- msgstr "Advanced Ads Tutorials"
1093
-
1094
- #: ../admin/class-advanced-ads-admin.php:1528
1095
- #, php-format
1096
- msgid "%d ads – <a href=\"%s\">manage</a> - <a href=\"%s\">new</a>"
1097
- msgstr "%d advertenties – <a href=\"%s\">bewerken</a> - <a href=\"%s\">nieuwe</a>"
1098
-
1099
- #: ../admin/class-advanced-ads-admin.php:1539
1100
- msgid "plugin manual and homepage"
1101
- msgstr "plugin handleiding en voorpagina"
1102
-
1103
- #: ../admin/class-advanced-ads-admin.php:1546
1104
- msgid "Get the tutorial via email"
1105
- msgstr "Verkrijg de tutorial via e-mail"
1106
-
1107
- #: ../admin/class-advanced-ads-admin.php:1553
1108
- msgid "Get AdSense tips via email"
1109
- msgstr "Verkrijg AdSense tips via e-mail"
1110
-
1111
- #: ../admin/class-advanced-ads-admin.php:1679
1112
- msgid "Error while trying to register the license. Please contact support."
1113
- msgstr ""
1114
- "Er is een fout opgetreden tijdens de registratie van uw licentie. Neem "
1115
- "alstublieft contact op met support."
1116
-
1117
- #: ../admin/class-advanced-ads-admin.php:1733
1118
- #, php-format
1119
- msgid "License is invalid. Reason: %s"
1120
- msgstr "Licentie is niet legitiem. Namelijk: %s"
1121
-
1122
- #: ../admin/includes/class-ad-groups-list.php:156
1123
- msgid "Ad weight"
1124
- msgstr "Advertentie gewicht/prioriteit"
1125
-
1126
- #: ../admin/includes/class-ad-groups-list.php:198
1127
- msgid "all published ads are displayed"
1128
- msgstr "Alle gepubliceerde advertenties worden getoond"
1129
-
1130
- #: ../admin/includes/class-ad-groups-list.php:200
1131
- #, php-format
1132
- msgid "up to %d ads displayed"
1133
- msgstr "tot %s advertenties getoond."
1134
-
1135
- #: ../admin/includes/class-ad-groups-list.php:203 ../admin/views/ad-group-list-
1136
- #: form-row.php:37
1137
- msgid "No ads assigned"
1138
- msgstr "Geen advertenties toegewezen"
1139
-
1140
- #: ../admin/includes/class-ad-groups-list.php:251
1141
- msgid "Random ads"
1142
- msgstr "Willekeurige advertenties"
1143
-
1144
- #: ../admin/includes/class-ad-groups-list.php:252
1145
- msgid "Display random ads based on ad weight"
1146
- msgstr "Toon willekeurige advertenties op basis van hun gewicht/prioriteit"
1147
-
1148
- #: ../admin/includes/class-ad-groups-list.php:255
1149
- msgid "Ordered ads"
1150
- msgstr "Gesorteerde advertenties"
1151
-
1152
- #: ../admin/includes/class-ad-groups-list.php:256
1153
- msgid "Display ads with the highest ad weight first"
1154
- msgstr "Toon advertenties met het hoogste gewicht/prioriteit eerst"
1155
-
1156
- #: ../admin/includes/class-ad-groups-list.php:275 ../public/class-advanced-ads.
1157
- #: php:592
1158
- msgid "Edit"
1159
- msgstr "Bewerken"
1160
-
1161
- #: ../admin/includes/class-ad-groups-list.php:276
1162
- msgid "Usage"
1163
- msgstr "Gebruik"
1164
-
1165
- #: ../admin/includes/class-ad-groups-list.php:285
1166
- msgid "Delete"
1167
- msgstr "Verwijderen"
1168
-
1169
- #: ../admin/includes/class-ad-groups-list.php:306
1170
- msgid "Invalid Ad Group"
1171
- msgstr "Incorrecte advertentiegroep"
1172
-
1173
- #: ../admin/includes/class-ad-groups-list.php:311
1174
- msgid "You don’t have permission to change the ad groups"
1175
- msgstr "U heeft onvoldoende rechten om de advertentiegroepen aan te passen."
1176
-
1177
- #: ../admin/includes/class-notices.php:406
1178
- #, php-format
1179
- msgid ""
1180
- "You don’t seem to have an email address. Please use <a href=\"%s\" "
1181
- "target=\"_blank\">this form</a> to sign up."
1182
- msgstr ""
1183
- "Het lijkt erop dat u geen e-mailadres heeft. Gebruik alstublieft <a "
1184
- "href=\"%s\" target=\"_blank\">dit formulier</a> om u in te schrijven."
1185
-
1186
- #: ../admin/includes/class-notices.php:424
1187
- msgid "How embarrassing. The email server seems to be down. Please try again later."
1188
- msgstr ""
1189
- "Het lijkt er op dat de e-mail server offline is. Probeer het later nog eens. "
1190
- "Onze excuses voor het ongemak."
1191
-
1192
- #: ../admin/includes/class-notices.php:429
1193
- #, php-format
1194
- msgid ""
1195
- "Please check your email (%s) for the confirmation message. If you didn’t "
1196
- "receive one or want to use another email address then please use <a "
1197
- "href=\"%s\" target=\"_blank\">this form</a> to sign up."
1198
- msgstr ""
1199
- "Kijk alstublieft in uw mailbox voor de bevestigingsmail. Als u deze e-mail "
1200
- "niet heeft ontvangen of u een ander e-mailadres wilt gebruiken kunt u <a "
1201
- "href=\"%s\" target=\"_blank\">dit formulier</a> gebruiken."
1202
-
1203
- #: ../admin/includes/class-overview-widgets.php:45
1204
- msgid "Tips and Tutorials"
1205
- msgstr "Tips en tutorials"
1206
-
1207
- #: ../admin/includes/class-overview-widgets.php:47
1208
- msgid "Setup and Optimization Help"
1209
- msgstr "Hulp bij installatie en optimalisatie"
1210
-
1211
- #: ../admin/includes/class-overview-widgets.php:49
1212
- msgid "Manual and Support"
1213
- msgstr "Handleiding en ondersteuning"
1214
-
1215
- #: ../admin/includes/class-overview-widgets.php:53
1216
- msgid "Advanced Ads Pro"
1217
- msgstr "Advanced Ads Pro"
1218
-
1219
- #: ../admin/includes/class-overview-widgets.php:55
1220
- msgid "Tracking and Stats"
1221
- msgstr "Meten en statistieken"
1222
-
1223
- #: ../admin/includes/class-overview-widgets.php:57
1224
- msgid "Responsive and Mobile ads"
1225
- msgstr "Responsive en mobiele advertenties"
1226
-
1227
- #: ../admin/includes/class-overview-widgets.php:61
1228
- msgid "Sticky ads"
1229
- msgstr "Sticky advertenties"
1230
-
1231
- #: ../admin/includes/class-overview-widgets.php:63
1232
- msgid "PopUps and Layers"
1233
- msgstr "Pop-ups en lagen"
1234
-
1235
- #: ../admin/includes/class-overview-widgets.php:65
1236
- msgid "Ad Slider"
1237
- msgstr "Advertentie slider"
1238
-
1239
- #: ../admin/includes/class-overview-widgets.php:83
1240
- msgid "Get 2 <strong>free add-ons</strong> for joining the newsletter."
1241
- msgstr ""
1242
- "Ontvang 2 <strong>gratis add-ons</strong> als u zich inschrijft voor de "
1243
- "nieuwsbrief."
1244
-
1245
- #: ../admin/includes/class-overview-widgets.php:84
1246
- msgid "Join now"
1247
- msgstr "Schrijf u nu in"
1248
-
1249
- #: ../admin/includes/class-overview-widgets.php:91
1250
- msgid ""
1251
- "Learn more about how and <strong>how much you can earn with AdSense</strong> "
1252
- "and Advanced Ads from the dedicated newsletter group."
1253
- msgstr ""
1254
- "Ontdek hoe, en <strong>hoe u meer kunt verdienen met AdSense</strong> en "
1255
- "Advanced Ads door u in te schrijven voor deze nieuwsbrief."
1256
-
1257
- #: ../admin/includes/class-overview-widgets.php:92 ../admin/includes/notices.php:
1258
- #: 35 ../admin/views/intro.php:73 ../admin/views/notices/inline.php:3 ..
1259
- #: admin/views/notices/subscribe.php:3
1260
- msgid "Subscribe me now"
1261
- msgstr "Schrijf mij in"
1262
-
1263
- #: ../admin/includes/class-overview-widgets.php:99
1264
- msgid "Get the first steps and more tutorials to your inbox."
1265
- msgstr "Ontvang de eerste stappen en tutorials in uw mailbox."
1266
-
1267
- #: ../admin/includes/class-overview-widgets.php:100
1268
- msgid "Send it now"
1269
- msgstr "Stuur het op"
1270
-
1271
- #: ../admin/includes/class-overview-widgets.php:123 ../admin/views/intro.php:78
1272
- msgid "Create your first ad"
1273
- msgstr "Maak je eerste advertentie aan"
1274
-
1275
- #: ../admin/includes/class-overview-widgets.php:126
1276
- msgid ""
1277
- "Ad Groups contain ads and are currently used to rotate multiple ads on a "
1278
- "single spot."
1279
- msgstr ""
1280
- "Advertentiegroepen bevatten advertenties en worden gebruikt om te af te "
1281
- "wisselen tussen verschillende advertenties op een bepaalde plek."
1282
-
1283
- #: ../admin/includes/class-overview-widgets.php:128
1284
- msgid "Create your first group"
1285
- msgstr "Maak je eerste groep aan"
1286
-
1287
- #: ../admin/includes/class-overview-widgets.php:131
1288
- msgid "Ad Placements are the best way to manage where to display ads and groups."
1289
- msgstr ""
1290
- "Advertentie plaatsingen zijn de beste manier om te beheren waar advertenties "
1291
- "en advertentiegroepen getoond worden."
1292
-
1293
- #: ../admin/includes/class-overview-widgets.php:133
1294
- msgid "Create your first placement"
1295
- msgstr "Maak je eerste plaatsing aan."
1296
-
1297
- #: ../admin/includes/class-overview-widgets.php:138
1298
- msgid "Next steps"
1299
- msgstr "Volgende stappen"
1300
-
1301
- #: ../admin/includes/class-overview-widgets.php:150
1302
- #, php-format
1303
- msgid "<a href=\"%s\" target=\"_blank\">Manual</a>"
1304
- msgstr "<a href=\"%s\" target=\"_blank\">Handleiding</a>"
1305
-
1306
- #: ../admin/includes/class-overview-widgets.php:152
1307
- #, php-format
1308
- msgid "Vote for a <a href=\"%s\" target=\"_blank\">feature</a>"
1309
- msgstr "Stem op <a href=\"%s\" target=\"_blank\">nieuwe functionaliteiten</a>"
1310
-
1311
- #: ../admin/includes/class-overview-widgets.php:153
1312
- #, php-format
1313
- msgid ""
1314
- "Thank the developer with a &#9733;&#9733;&#9733;&#9733;&#9733; review on <a "
1315
- "href=\"%s\" target=\"_blank\">wordpress.org</a>"
1316
- msgstr ""
1317
- "Bedank de ontwikkelaar van deze plugin met een &#9733;&#9733;&#9733;&#9733;"
1318
- "&#9733; beoordeling op <a href=\"%s\" target=\"_blank\">wordpress.org</a>"
1319
-
1320
- #: ../admin/includes/class-overview-widgets.php:162
1321
- msgid ""
1322
- "Need help to set up and optimize your ads? Need custom coding on your site? "
1323
- "Ask me for a quote."
1324
- msgstr ""
1325
- "Hulp nodig bij het opzetten en optimaliseren van uw advertenties? Heeft u "
1326
- "behoefte aan code op maat? Vraag een offerte aan."
1327
-
1328
- #: ../admin/includes/class-overview-widgets.php:163
1329
- #, php-format
1330
- msgid "Help with ads on %s"
1331
- msgstr "Hulp met advertenties op %s"
1332
-
1333
- #: ../admin/includes/class-overview-widgets.php:164
1334
- msgid "Get an offer"
1335
- msgstr "Ontvang een offerte"
1336
-
1337
- #: ../admin/includes/class-overview-widgets.php:172
1338
- msgid "Ad management for advanced websites."
1339
- msgstr "Advertentiebeheer voor geavanceerde websites."
1340
-
1341
- #: ../admin/includes/class-overview-widgets.php:173
1342
- msgid "Cache-busting"
1343
- msgstr "Cache-busting"
1344
-
1345
- #: ../admin/includes/class-overview-widgets.php:174
1346
- msgid "Advanced visitor conditions"
1347
- msgstr "Geavanceerde bezoekersvoorwaarden"
1348
-
1349
- #: ../admin/includes/class-overview-widgets.php:175
1350
- msgid "Flash ads with fallback"
1351
- msgstr "Flash advertenties met 'fallback'"
1352
-
1353
- #: ../admin/includes/class-overview-widgets.php:177
1354
- msgid "Get Pro"
1355
- msgstr "Neem Pro"
1356
-
1357
- #: ../admin/includes/class-overview-widgets.php:185
1358
- msgid "Track the impressions of and clicks on your ads."
1359
- msgstr "Meet het aantal vertoningen en clicks op uw advertenties."
1360
-
1361
- #: ../admin/includes/class-overview-widgets.php:186
1362
- msgid "2 methods to count impressions"
1363
- msgstr "2 methoden om vertoningen te meten"
1364
-
1365
- #: ../admin/includes/class-overview-widgets.php:187
1366
- msgid "beautiful stats for all or single ads"
1367
- msgstr "Beeldschone statistieken voor alle of specifieke advertenties"
1368
-
1369
- #: ../admin/includes/class-overview-widgets.php:188
1370
- msgid "group stats by day, week or month"
1371
- msgstr "groepeer statistieken op dag, week of maand"
1372
-
1373
- #: ../admin/includes/class-overview-widgets.php:190
1374
- msgid "Get the Tracking add-on"
1375
- msgstr "Haal de Tracking add-on"
1376
-
1377
- #: ../admin/includes/class-overview-widgets.php:198
1378
- msgid "Display ads based on the size of your visitor’s browser or device."
1379
- msgstr ""
1380
- "Toon advertenties op basis van de grootte van de browser of het toestel van "
1381
- "uw gebruiker."
1382
-
1383
- #: ../admin/includes/class-overview-widgets.php:199
1384
- msgid "set a range (from … to …) pixels for the browser size"
1385
- msgstr "stel een bereik (van ... tot ...) in pixels in voor de browser afmeting."
1386
-
1387
- #: ../admin/includes/class-overview-widgets.php:200
1388
- msgid "set custom sizes for AdSense responsive ads"
1389
- msgstr "Stel aangepaste maten in voor AdSense responsive advertenties"
1390
-
1391
- #: ../admin/includes/class-overview-widgets.php:201
1392
- msgid "list all ads by their responsive settings"
1393
- msgstr "Toon alle advertenties gesorteerd op responsive instellingen"
1394
-
1395
- #: ../admin/includes/class-overview-widgets.php:203
1396
- msgid "Get the Responsive add-on"
1397
- msgstr "Neem de Responsive add-on"
1398
-
1399
- #: ../admin/includes/class-overview-widgets.php:222
1400
- msgid "position ads that don’t scroll with the screen"
1401
- msgstr "Positioneer advertenties die niet met het scherm mee scrollen"
1402
-
1403
- #: ../admin/includes/class-overview-widgets.php:223
1404
- msgid "build anchor ads not only on mobile devices"
1405
- msgstr "Maak verankerde advertenties niet alleen voor mobiele aparaten"
1406
-
1407
- #: ../admin/includes/class-overview-widgets.php:225 ../admin/views/ad-info-top.
1408
- #: php:32
1409
- msgid "Get the Sticky add-on"
1410
- msgstr "Neem de Sticky add-on"
1411
-
1412
- #: ../admin/includes/class-overview-widgets.php:233 ../admin/views/ad-info-top.
1413
- #: php:37
1414
- msgid "Display content and ads in layers and popups on custom events."
1415
- msgstr "Toon content en advertenties in lagen en pop-ups op aangepaste momenten."
1416
-
1417
- #: ../admin/includes/class-overview-widgets.php:234
1418
- msgid "display a popup after a user interaction like scrolling"
1419
- msgstr ""
1420
- "Toon een pop-up na interactie van de gebruiker, bijvoorbeeld als iemand "
1421
- "scrollt"
1422
-
1423
- #: ../admin/includes/class-overview-widgets.php:236
1424
- msgid "allow users to close the popup"
1425
- msgstr "sta gebruikers toe de pop-up te sluiten"
1426
-
1427
- #: ../admin/includes/class-overview-widgets.php:238 ../admin/views/ad-info-top.
1428
- #: php:39
1429
- msgid "Get the PopUp and Layer add-on"
1430
- msgstr "Neem de PopUp and Layer add-on"
1431
-
1432
- #: ../admin/includes/class-overview-widgets.php:246
1433
- msgid "Create a beautiful and simple slider from your ads."
1434
- msgstr "Maak prachtige doch simpele sliders met uw advertenties."
1435
-
1436
- #: ../admin/includes/class-overview-widgets.php:248
1437
- msgid "Get the Slider add-on"
1438
- msgstr "Naam de Slider add-on"
1439
-
1440
- #: ../admin/includes/class-shortcode-creator.php:75 ../classes/widget.php:73
1441
- msgid "--empty--"
1442
- msgstr "--leeg--"
1443
-
1444
- #: ../admin/includes/notices.php:14
1445
- #, php-format
1446
- msgid ""
1447
- "Advanced Ads successfully installed. Take a look at the <a href=\"%s\">First "
1448
- "Steps</a>."
1449
- msgstr ""
1450
- "Advanced Ads is succesvol geïnstalleerd. Kijk ook eens naar de <a "
1451
- "href=\"%s\">eerste stappen</a>."
1452
-
1453
- #: ../admin/includes/notices.php:20
1454
- msgid ""
1455
- "Thank you for activating <strong>Advanced Ads</strong>. Would you like to "
1456
- "receive the first steps via email?"
1457
- msgstr ""
1458
- "Bedankt voor het activeren van <strong>Advanced Ads</strong>. Wilt u een e-"
1459
- "mail ontvangen met daarin de eerst volgende stappen?"
1460
-
1461
- #: ../admin/includes/notices.php:21
1462
- msgid "Yes, send it"
1463
- msgstr "Ja, stuur maar op"
1464
-
1465
- #: ../admin/includes/notices.php:27
1466
- msgid ""
1467
- "Thank you for using <strong>Advanced Ads</strong>. Stay informed and receive "
1468
- "<strong>2 free add-ons</strong> for joining the newsletter."
1469
- msgstr ""
1470
- "Bedankt voor het gebruiken van <strong>Advanced Ads</strong>. Blijf up-to-"
1471
- "date en ontvang <strong>2 gratis add-ons</strong> als u zich inschrijft voor "
1472
- "de nieuwsbrief."
1473
-
1474
- #: ../admin/includes/notices.php:28
1475
- msgid "Add me now"
1476
- msgstr "Voeg mij toe"
1477
-
1478
- #: ../admin/includes/notices.php:34
1479
- msgid ""
1480
- "Learn more about how and <strong>how much you can earn with AdSense</strong> "
1481
- "and Advanced Ads from my dedicated newsletter."
1482
- msgstr ""
1483
- "Ontdek hoe, en <strong>hoe u meer kunt verdienen met AdSense</strong> en "
1484
- "Advanced Ads door u in te schrijven voor deze nieuwsbrief."
1485
-
1486
- #: ../admin/includes/notices.php:67
1487
- #, php-format
1488
- msgid ""
1489
- "One or more licenses for your <strong>Advanced Ads add-ons are expiring "
1490
- "soon</strong>. Don’t risk to lose support and updates and renew your license "
1491
- "before it expires with a significant discount on <a href=\"%s\" "
1492
- "target=\"_blank\">the add-on page</a>."
1493
- msgstr ""
1494
- "Één of meer <strong>licenties voor Advanced Ads add-ons zullen binnenkort "
1495
- "verlopen</strong>. Voorkom het verlies van updates en ondersteuning en "
1496
- "vernieuw uw licentie voordat deze verloopt en ontvang en flinke korting op "
1497
- "<a href=\"%s\" target=\"_blank\">de add-on pagina</a>."
1498
-
1499
- #: ../admin/includes/notices.php:73 ../admin/views/support.php:28
1500
- #, php-format
1501
- msgid ""
1502
- "<strong>Advanced Ads</strong> license(s) expired. Support and updates are "
1503
- "disabled. Please visit <a href=\"%s\"> the license page</a> for more "
1504
- "information."
1505
- msgstr ""
1506
- "Een <strong>Advanced Ads</strong> licentie(s) is verlopen. Ondersteuning en "
1507
- "updates zijn nu uitgeschakeld. Kijk op de <a href=\"%s\">licentie pagina</a> "
1508
- "voor meer informatie."
1509
-
1510
- #: ../admin/views/ad-display-metabox.php:39
1511
- msgid "If you want to display the ad everywhere, don't do anything here. "
1512
- msgstr "Als u deze advertentie overal wilt tonen, stel hier dan niks in."
1513
-
1514
- #: ../admin/views/ad-display-metabox.php:42 ../admin/views/ad-visitor-metabox.php:
1515
- #: 34
1516
- msgid "New condition"
1517
- msgstr "Nieuwe voorwaarde"
1518
-
1519
- #: ../admin/views/ad-display-metabox.php:45 ../admin/views/ad-visitor-metabox.php:
1520
- #: 37
1521
- msgid "-- choose a condition --"
1522
- msgstr "-- kies een voorwaarde --"
1523
-
1524
- #: ../admin/views/ad-display-metabox.php:50 ../admin/views/ad-visitor-metabox.php:
1525
- #: 42
1526
- msgid "add"
1527
- msgstr "toevoegen"
1528
-
1529
- #: ../admin/views/ad-group-edit.php:14
1530
- msgid "You did not select an item for editing."
1531
- msgstr "U heeft geen item geselecteerd om te bewerken."
1532
-
1533
- #: ../admin/views/ad-group-edit.php:33
1534
- msgctxt "Taxonomy Name"
1535
- msgid "Name"
1536
- msgstr "Naam"
1537
-
1538
- #: ../admin/views/ad-group-edit.php:38
1539
- msgctxt "Taxonomy Slug"
1540
- msgid "Slug"
1541
- msgstr "Slug"
1542
-
1543
- #: ../admin/views/ad-group-edit.php:40
1544
- msgid "An id-like string with only letters in lower case, numbers, and hyphens."
1545
- msgstr ""
1546
- "Een tekenreeks te vergelijken met een ID met alleen onderkast letters, "
1547
- "nummers en streepjes (hyphens)."
1548
-
1549
- #: ../admin/views/ad-group-edit.php:45
1550
- msgctxt "Taxonomy Description"
1551
- msgid "Description"
1552
- msgstr "Beschrijving"
1553
-
1554
- #: ../admin/views/ad-group-edit.php:57
1555
- msgid "Create new Ad Group"
1556
- msgstr "Maak een nieuwe advertentiegroep"
1557
-
1558
- #: ../admin/views/ad-group-edit.php:59
1559
- msgid "Update"
1560
- msgstr "Opslaan"
1561
-
1562
- #: ../admin/views/ad-group-list-form-row.php:3 ../admin/views/placements.php:24
1563
- msgid "Name"
1564
- msgstr "Naam"
1565
-
1566
- #: ../admin/views/ad-group-list-form-row.php:5
1567
- msgid "Description"
1568
- msgstr "Beschrijving"
1569
-
1570
- #: ../admin/views/ad-group-list-form-row.php:7 ../admin/views/placements.php:23 ..
1571
- #: modules/gadsense/admin/views/adsense-ad-parameters.php:48
1572
- msgid "Type"
1573
- msgstr "Type"
1574
-
1575
- #: ../admin/views/ad-group-list-form-row.php:16
1576
- msgid "Number of visible ads"
1577
- msgstr "Aantal zichtbare advertenties"
1578
-
1579
- #: ../admin/views/ad-group-list-form-row.php:22
1580
- msgctxt "option to display all ads in an ad groups"
1581
- msgid "all"
1582
- msgstr "alle"
1583
-
1584
- #: ../admin/views/ad-group-list-form-row.php:25
1585
- msgid "Number of ads that are visible at the same time"
1586
- msgstr "Aantal advertenties dat simultaan zichtbaar is"
1587
-
1588
- #: ../admin/views/ad-group-list-form-row.php:31 ../public/class-advanced-ads.php:
1589
- #: 589
1590
- msgid "Ad"
1591
- msgstr "Advertentie"
1592
-
1593
- #: ../admin/views/ad-group-list-form-row.php:32
1594
- msgid "weight"
1595
- msgstr "gewicht"
1596
-
1597
- #: ../admin/views/ad-group-list-header.php:3 ../classes/ad_type_group.php:30
1598
- msgid "Ad Group"
1599
- msgstr "Advertentiegroep"
1600
-
1601
- #: ../admin/views/ad-group-list-header.php:4
1602
- msgid "Details"
1603
- msgstr "Details"
1604
-
1605
- #: ../admin/views/ad-group-list-row.php:8 ../admin/views/ad-group.php:63 ..
1606
- #: admin/views/ad-info.php:3 ../admin/views/placements.php:58
1607
- msgid "shortcode"
1608
- msgstr "shortcode"
1609
-
1610
- #: ../admin/views/ad-group-list-row.php:11 ../admin/views/ad-group.php:66 ..
1611
- #: admin/views/placements.php:61
1612
- msgid "template"
1613
- msgstr "template"
1614
-
1615
- #: ../admin/views/ad-group-list-row.php:14
1616
- #, php-format
1617
- msgid "Learn more about using groups in the <a href=\"%s\" target=\"_blank\">manual</a>."
1618
- msgstr ""
1619
- "Lees de <a href=\"%s\" target=\"_blank\">handleiding</a> om meer te weten te "
1620
- "komen over het gebruik van groepen."
1621
-
1622
- #: ../admin/views/ad-group-list-row.php:19
1623
- #, php-format
1624
- msgid "Type: %s"
1625
- msgstr "Type: %s"
1626
-
1627
- #: ../admin/views/ad-group-list-row.php:20
1628
- #, php-format
1629
- msgid "ID: %s"
1630
- msgstr "ID: %s"
1631
-
1632
- #: ../admin/views/ad-group.php:18
1633
- msgid "Ad Groups successfully updated"
1634
- msgstr "Advertentiegroep succesvol opgeslagen"
1635
-
1636
- #: ../admin/views/ad-group.php:46
1637
- #, php-format
1638
- msgid "Search results for &#8220;%s&#8221;"
1639
- msgstr ""
1640
- "Zoekresultaten voor \n"
1641
- "&#8220;%s&#8221;"
1642
-
1643
- #: ../admin/views/ad-group.php:52
1644
- msgid ""
1645
- "Ad Groups are a very flexible method to bundle ads. You can use them to "
1646
- "display random ads in the frontend or run split tests, but also just for "
1647
- "informational purposes. Not only can an Ad Groups have multiple ads, but an "
1648
- "ad can belong to multiple ad groups."
1649
- msgstr ""
1650
- "Advertentiegroepen zijn een flexibele methode om advertenties te bundelen. U "
1651
- "kunt ze gebruiken om willekeurig advertenties te tonen aan de voorkant van "
1652
- "uw website, split tests te doen maar ook puur voor informationele doeleinden."
1653
- " Niet alleen kunnen advertentiegroepen meerdere advertenties bezitten maar "
1654
- "kan een advertentie ook in meerdere advertentiegroepen voor komen."
1655
-
1656
- #: ../admin/views/ad-group.php:60
1657
- msgid "How to display an Ad Group?"
1658
- msgstr "Hoe toon ik een advertentiegroep?"
1659
-
1660
- #: ../admin/views/ad-group.php:62
1661
- #, php-format
1662
- msgid ""
1663
- "Examples on how to display an ad group? Find more help and examples in the "
1664
- "<a href=\"%s\" target=\"_blank\">manual</a>"
1665
- msgstr ""
1666
- "Zoekt u voorbeelden voor het tonen van een advertentiegroep? Hulp en "
1667
- "voorbeelden vind u in de <a href=\"%s\" target=\"_blank\">handleiding</a>."
1668
-
1669
- #: ../admin/views/ad-group.php:64
1670
- msgid "To display an ad group with the ID 6 in content fields"
1671
- msgstr "Om een advertentiegroep met het ID 6 te tonen in content velden"
1672
-
1673
- #: ../admin/views/ad-group.php:67
1674
- msgid "To display an ad group with the ID 6 in template files"
1675
- msgstr "Om een advertentiegroep met het ID 6 te tonen in template files"
1676
-
1677
- #: ../admin/views/ad-group.php:87
1678
- msgid "Update Groups"
1679
- msgstr "Groepen opslaan"
1680
-
1681
- #: ../admin/views/ad-info-top.php:4
1682
- msgid "Cool, you just published an ad. What now?"
1683
- msgstr "Cool, u heeft zojuist een advertentie gepubliceerd. Wat nu?"
1684
-
1685
- #: ../admin/views/ad-info-top.php:5
1686
- msgid "Display the ad in …"
1687
- msgstr "Toon de advertentie in ..."
1688
-
1689
- #: ../admin/views/ad-info-top.php:7
1690
- msgid "… every post or page"
1691
- msgstr "... ieder bericht of pagina"
1692
-
1693
- #: ../admin/views/ad-info-top.php:9
1694
- msgid "Use placements to inject the ad automatically into posts and pages."
1695
- msgstr ""
1696
- "Gebruik plaatsingen om advertenties automatisch in berichten of pagina's te "
1697
- "injecteren."
1698
-
1699
- #: ../admin/views/ad-info-top.php:10
1700
- msgid "Configure Placements"
1701
- msgstr "Stel plaatsingen in"
1702
-
1703
- #: ../admin/views/ad-info-top.php:12
1704
- msgid "… Sidebar or Widget Area"
1705
- msgstr "... Sidebar of Widget gebieden"
1706
-
1707
- #: ../admin/views/ad-info-top.php:14
1708
- msgid "Use the <em>Advanced Ads</em> Widget to display ads in your sidebars."
1709
- msgstr ""
1710
- "Gebruik de <em>Advanced Ads</em> Widget om advertenties te tonen in uw "
1711
- "Sidebars."
1712
-
1713
- #: ../admin/views/ad-info-top.php:15
1714
- msgid "Configure a Widget"
1715
- msgstr "Stel een widget in"
1716
-
1717
- #: ../admin/views/ad-info-top.php:17
1718
- msgid "… a few hand selected posts or pages"
1719
- msgstr "... een paar handgeselecteerde berichten of pagina's"
1720
-
1721
- #: ../admin/views/ad-info-top.php:19
1722
- msgid ""
1723
- "Use the shortcode below to manually place the ad in the content editor of "
1724
- "posts and pages."
1725
- msgstr ""
1726
- "Gebruik deze shortcode om de advertentie met de hand te plaatsen in de "
1727
- "content editor van berichten of pagina's."
1728
-
1729
- #: ../admin/views/ad-info-top.php:22
1730
- msgid "… in a custom position in your theme"
1731
- msgstr "... op een aangepaste locatie in uw thema"
1732
-
1733
- #: ../admin/views/ad-info-top.php:24
1734
- msgid ""
1735
- "Use the function below to manually place the ad into your template files. "
1736
- "This method is needed for more advanced placements like in the header of "
1737
- "your theme."
1738
- msgstr ""
1739
- "Gebruik de functie hieronder om advertenties met de hand te verwerken in uw "
1740
- "template files. Deze methode is vereist als u specifiekere plaatsingen in uw "
1741
- "thema vereist."
1742
-
1743
- #: ../admin/views/ad-info-top.php:27
1744
- msgid "… in an anchor ad or pop-up"
1745
- msgstr "... in een verankerde advertentie of pop-up"
1746
-
1747
- #: ../admin/views/ad-info-top.php:34
1748
- msgid "You find the settings for the Sticky Ads below."
1749
- msgstr "U vind de instellingen voor Sticky Ads hieronder."
1750
-
1751
- #: ../admin/views/ad-info-top.php:41
1752
- msgid "You find the settings for the Layer and PopUp effects below."
1753
- msgstr "U vind de instellingen voor de Laag en Pop-up effecten hieronder."
1754
-
1755
- #: ../admin/views/ad-info-top.php:46
1756
- #, php-format
1757
- msgid ""
1758
- "Learn more about your choices to display an ad in the <a href=\"%s\" "
1759
- "target=\"_blank\">manual</a>."
1760
- msgstr ""
1761
- "Om meer te weten te komen over de mogelijkheden om uw advertenties te tonen "
1762
- "kunt u de <a href=\"%s\" target=\"_blank\">handleiding</a> raadplegen."
1763
-
1764
- #: ../admin/views/ad-info.php:2
1765
- #, php-format
1766
- msgid "Ad Id: %s"
1767
- msgstr "Advertentie ID: %s"
1768
-
1769
- #: ../admin/views/ad-info.php:5
1770
- msgid "theme function"
1771
- msgstr "thema functie"
1772
-
1773
- #: ../admin/views/ad-info.php:7
1774
- #, php-format
1775
- msgid "Find more display options in the <a href=\"%s\" target=\"_blank\">manual</a>."
1776
- msgstr ""
1777
- "U kunt meer opties voor het vertonen van uw advertenties vinden in de <a "
1778
- "href=\"%s\" target=\"_blank\">handleiding</a>."
1779
-
1780
- #: ../admin/views/ad-info.php:12
1781
- msgid "click to change"
1782
- msgstr "klik om te veranderen"
1783
-
1784
- #: ../admin/views/ad-info.php:16
1785
- msgid "Add a description"
1786
- msgstr "Voeg een beschrijving toe"
1787
-
1788
- #: ../admin/views/ad-info.php:19
1789
- msgid "Internal description or your own notes about this ad."
1790
- msgstr "Interne beschrijving of eigen notitie voor deze advertentie."
1791
-
1792
- #: ../admin/views/ad-list-filters.php:9
1793
- msgid "expired"
1794
- msgstr "verlopen"
1795
-
1796
- #: ../admin/views/ad-main-metabox.php:3
1797
- msgid "No ad types defined"
1798
- msgstr "Geen advertentie types gedefinieerd"
1799
-
1800
- #: ../admin/views/ad-output-metabox.php:1
1801
- msgid "Everything connected to the ads layout and output."
1802
- msgstr "Alles wat in verbinding staat met de advertentie indeling en output."
1803
-
1804
- #: ../admin/views/ad-output-metabox.php:5
1805
- msgid "Position"
1806
- msgstr "Positie"
1807
-
1808
- #: ../admin/views/ad-output-metabox.php:6
1809
- msgid "- default -"
1810
- msgstr "- standaard -"
1811
-
1812
- #: ../admin/views/ad-output-metabox.php:7 ../admin/views/placements.php:51
1813
- msgid "default"
1814
- msgstr "standaard"
1815
-
1816
- #: ../admin/views/ad-output-metabox.php:8
1817
- msgid "left"
1818
- msgstr "links"
1819
-
1820
- #: ../admin/views/ad-output-metabox.php:11
1821
- msgid "center"
1822
- msgstr "center"
1823
-
1824
- #: ../admin/views/ad-output-metabox.php:14
1825
- msgid "right"
1826
- msgstr "rechts"
1827
-
1828
- #: ../admin/views/ad-output-metabox.php:19
1829
- msgid ""
1830
- "Check this if you don't want the following elements to float around the ad. "
1831
- "(adds a clearfix)"
1832
- msgstr ""
1833
- "Vink dit aan als u wilt voorkomen dat andere elementen om uw advertentie "
1834
- "heen 'zweven'. (Voegt een clearfix toe)"
1835
-
1836
- #: ../admin/views/ad-output-metabox.php:22
1837
- msgid "Margin"
1838
- msgstr "Margin"
1839
-
1840
- #: ../admin/views/ad-output-metabox.php:23
1841
- msgid "top:"
1842
- msgstr "bovenkant:"
1843
-
1844
- #: ../admin/views/ad-output-metabox.php:25
1845
- msgid "right:"
1846
- msgstr "rechts:"
1847
-
1848
- #: ../admin/views/ad-output-metabox.php:27
1849
- msgid "bottom:"
1850
- msgstr "onderkant:"
1851
-
1852
- #: ../admin/views/ad-output-metabox.php:29
1853
- msgid "left:"
1854
- msgstr "links:"
1855
-
1856
- #: ../admin/views/ad-output-metabox.php:31
1857
- msgid "tip: use this to add a margin around the ad"
1858
- msgstr "tip: gebruik dit om een margin toe te voegen rondom de advertentie"
1859
-
1860
- #: ../admin/views/ad-parameters-size.php:2
1861
- msgid "size"
1862
- msgstr "formaat"
1863
-
1864
- #: ../admin/views/ad-parameters-size.php:3
1865
- msgid "width"
1866
- msgstr "breedte"
1867
-
1868
- #: ../admin/views/ad-parameters-size.php:4
1869
- msgid "height"
1870
- msgstr "hoogte"
1871
-
1872
- #: ../admin/views/ad-submitbox-meta.php:6
1873
- msgid "Set expiry date"
1874
- msgstr "Stel vervaldatum in"
1875
-
1876
- #: ../admin/views/ad-submitbox-meta.php:16
1877
- #, php-format
1878
- msgctxt "1: month number (01, 02, etc.), 2: month abbreviation"
1879
- msgid "%1$s-%2$s"
1880
- msgstr "%1$s-%2$s"
1881
-
1882
- #: ../admin/views/ad-visitor-metabox.php:4
1883
- msgid ""
1884
- "Display conditions that are based on the user. Use with caution on cached "
1885
- "websites."
1886
- msgstr ""
1887
- "Vertoningsvoorwaarden die zijn gebaseerd op de gebruiker. Wees voorzichtig "
1888
- "met het gebruik van deze voorwaarden op websites die worden gecached."
1889
-
1890
- #: ../admin/views/ad-visitor-metabox.php:28
1891
- msgid ""
1892
- "Visitor conditions limit the number of users who can see your ad. There is "
1893
- "no need to set visitor conditions if you want all users to see the ad."
1894
- msgstr ""
1895
- "Bezoekersvoorwaarden limiteren het aantal bezoekers dat uw advertentie "
1896
- "kunnen zien. Er is geen rede om deze instellingen te gebruiken als u wilt "
1897
- "dat iedereen de advertentie kan zien."
1898
-
1899
- #: ../admin/views/ad-visitor-metabox.php:47
1900
- #, php-format
1901
- msgid ""
1902
- "Define the exact browser width for which an ad should be visible using the "
1903
- "<a href=\"%s\" target=\"_blank\">Responsive add-on</a>."
1904
- msgstr ""
1905
- "Stel de exacte browser breedte in waarbij een advertentie zichtbaar zou "
1906
- "moeten zijn bij het gebruik van de <a href=\"%s\" target=\"_blank\">Responsive "
1907
- "add-on</a>."
1908
-
1909
- #: ../admin/views/ad-visitor-metabox.php:92
1910
- msgid ""
1911
- "The visitor conditions below are deprecated. Please use the new version of "
1912
- "visitor conditions to replace it."
1913
- msgstr ""
1914
- "De bezoekersvoorwaarden hieronder zijn niet langer in gebruik. Gebruik "
1915
- "inplaats hiervan de vernieuwde versie van bezoekersvoorwaarden om ze te "
1916
- "vervangen."
1917
-
1918
- #: ../admin/views/ad-visitor-metabox.php:98
1919
- msgid "Display on all devices"
1920
- msgstr "Toon op alle apparaten"
1921
-
1922
- #: ../admin/views/ad-visitor-metabox.php:102
1923
- msgid "only on mobile devices"
1924
- msgstr "alleen op mobiele apparaten"
1925
-
1926
- #: ../admin/views/ad-visitor-metabox.php:106
1927
- msgid "not on mobile devices"
1928
- msgstr "niet op mobiele apparaten"
1929
-
1930
- #: ../admin/views/debug.php:6 ../admin/views/settings.php:47
1931
- msgid "Debug Page"
1932
- msgstr "Debug Pagina"
1933
-
1934
- #: ../admin/views/debug.php:7
1935
- msgid "Work in progress"
1936
- msgstr "In ontwikkeling"
1937
-
1938
- #: ../admin/views/intro.php:18
1939
- msgid "5-Star Usability"
1940
- msgstr "5-Sterren gebruikersvriendelijkheid"
1941
-
1942
- #: ../admin/views/intro.php:19
1943
- msgid ""
1944
- "Advanced Ads is powerful and easy to use, because it is build on WordPress "
1945
- "standards. If you know how to publish a post then you know how to create an "
1946
- "ad."
1947
- msgstr ""
1948
- "Advanced Ads is krachtig en simpel in gebruik omdat het is gebouwd op de "
1949
- "WordPress standaarden. Als u weet hoe u een bericht kunt publiceren weet u "
1950
- "ook direct hoe u een advertentie kunt creëren."
1951
-
1952
- #: ../admin/views/intro.php:23
1953
- msgid "5-Star Support"
1954
- msgstr "5-Sterren ondersteuning"
1955
-
1956
- #: ../admin/views/intro.php:24
1957
- msgid ""
1958
- "I promise you the best supported ad management plugin for WordPress. Whether "
1959
- "a pro user or not, you can reach me easily through the support page, in the "
1960
- "chat on the homepage or replying to a newsletter."
1961
- msgstr ""
1962
- "Ik beloof u de best ondersteunde advertentie-beheer plugin voor WordPress. "
1963
- "Of u nou een pro gebruiker bent of niet, u kunt mij altijd bereiken via de "
1964
- "ondersteuningspagina, in de chat op de website of door op een nieuwsbrief te "
1965
- "reageren."
1966
-
1967
- #: ../admin/views/intro.php:28
1968
- msgid "5-Star Experience"
1969
- msgstr "5-Sterren ervaring"
1970
-
1971
- #: ../admin/views/intro.php:29
1972
- msgid ""
1973
- "Advanced Ads was built out of my own experience. I am personally using it to "
1974
- "serve millions of ad impressions per month and constantly test new ways to "
1975
- "optimize ad settings."
1976
- msgstr ""
1977
- "Advanced Ads is voortgekomen uit mijn eigen ervaring. Ik gebruik het zelf om "
1978
- "miljoenen vertoningen van advertenties per maand te verwerken en constant op "
1979
- "zoek naar betere manieren om advertenties in te stellen."
1980
-
1981
- #: ../admin/views/intro.php:34
1982
- msgid "Welcome to <strong>Advanced Ads</strong>"
1983
- msgstr "Welkom bij <strong>Advanced Ads</strong>"
1984
-
1985
- #: ../admin/views/intro.php:36
1986
- msgid "Let me give you an introduction into your future ad management solution."
1987
- msgstr "Laat mij u introduceren aan uw toekomstige advertentie-beheer oplossing."
1988
-
1989
- #: ../admin/views/intro.php:61
1990
- msgid "Next Steps"
1991
- msgstr "Volgende stappen"
1992
-
1993
- #: ../admin/views/intro.php:64
1994
- msgid "Subscribe to the Mailing List"
1995
- msgstr "Schrijf u in op de nieuwsbrief"
1996
-
1997
- #: ../admin/views/intro.php:65
1998
- msgid "Subscribe to the newsletter and instantly"
1999
- msgstr "Schrijf u in op de nieuwsbrief en ontvang direct"
2000
-
2001
- #: ../admin/views/intro.php:67
2002
- msgid "get 2 free add-ons."
2003
- msgstr "2 gratis add-ons."
2004
-
2005
- #: ../admin/views/intro.php:68
2006
- msgid "reply to the welcome message with a question."
2007
- msgstr "Reageer op het welkomstbericht met een vraag."
2008
-
2009
- #: ../admin/views/intro.php:69
2010
- msgid "subscribe to a dedicated group for the tutorial or AdSense tips."
2011
- msgstr ""
2012
- "Schrijf u in voor een speciaal toegewijde groep voor tutorials of AdSense "
2013
- "tips."
2014
-
2015
- #: ../admin/views/intro.php:82
2016
- msgid "Display your ad"
2017
- msgstr "Toon uw advertentie"
2018
-
2019
- #: ../admin/views/intro.php:83
2020
- msgid ""
2021
- "You can display your ad using a shortcode, widget or one of the powerful "
2022
- "placements. Placements help you to inject ads into the content or place them "
2023
- "on your site without coding."
2024
- msgstr ""
2025
- "U kunt uw advertenties tonen door middel van een shortcode, widget of een "
2026
- "specifieke plaatsing. Plaatsingen helpen u bij het injecteren van "
2027
- "advertenties in uw content zonder kennis nodig te hebben van programmeren."
2028
-
2029
- #: ../admin/views/intro.php:85
2030
- msgid "List of all available placements"
2031
- msgstr "Toon alle mogelijke plaatsingen"
2032
-
2033
- #: ../admin/views/intro.php:86
2034
- msgid "Create a placement"
2035
- msgstr "Maak een nieuwe plaatsing"
2036
-
2037
- #: ../admin/views/placements.php:8
2038
- msgid ""
2039
- "Couldn’t create the new placement. Please check your form field and whether "
2040
- "the name is already in use."
2041
- msgstr ""
2042
- "We konden de plaatsing niet aanmaken. Controleer of de naam niet al in "
2043
- "gebruik is en of de ingevulde waardes kloppen."
2044
-
2045
- #: ../admin/views/placements.php:10
2046
- msgid "Placements updated"
2047
- msgstr "Plaatsingen opgeslagen"
2048
-
2049
- #: ../admin/views/placements.php:15
2050
- msgid ""
2051
- "Placements are physically places in your theme and posts. You can use them "
2052
- "if you plan to change ads and ad groups on the same place without the need "
2053
- "to change your templates."
2054
- msgstr ""
2055
- "Plaatsingen zijn fysieke locaties in uw thema of berichten. U kunt ze "
2056
- "gebruiken als u van plan bent om advertenties en advertentiegroepen aan te "
2057
- "passen zonder uw templates aan te hoeven passen."
2058
-
2059
- #: ../admin/views/placements.php:16
2060
- #, php-format
2061
- msgid "See also the manual for more information on <a href=\"%s\">placements</a>."
2062
- msgstr ""
2063
- "Voor meer informatie over plaatsingen kunt u de <a "
2064
- "href=\"$1%s\">handleiding</a> raadplegen."
2065
-
2066
- #: ../admin/views/placements.php:25
2067
- msgid "Options"
2068
- msgstr "Opties"
2069
-
2070
- #: ../admin/views/placements.php:42
2071
- #, php-format
2072
- msgid ""
2073
- "Placement type \"%s\" is missing and was reset to \"default\".<br/>Please check "
2074
- "if the responsible add-on is activated."
2075
- msgstr ""
2076
- "Plaatsingstype \"%s\" ontbreekt en is terug gezet naar \"standaard\".<br "
2077
- "/>Controleer of de verantwoordelijke add-on wel geactiveerd is."
2078
-
2079
- #: ../admin/views/placements.php:57
2080
- msgid "show usage"
2081
- msgstr "toon gebruik"
2082
-
2083
- #: ../admin/views/placements.php:69
2084
- msgid "Item"
2085
- msgstr "Item"
2086
-
2087
- #: ../admin/views/placements.php:71 ../admin/views/placements.php:175
2088
- msgid "--not selected--"
2089
- msgstr "--niet geselecteerd--"
2090
-
2091
- #: ../admin/views/placements.php:91
2092
- msgid "Inject"
2093
- msgstr "Injecteer"
2094
-
2095
- #: ../admin/views/placements.php:92
2096
- msgid "after"
2097
- msgstr "na"
2098
-
2099
- #: ../admin/views/placements.php:92
2100
- msgid "before"
2101
- msgstr "voor"
2102
-
2103
- #: ../admin/views/placements.php:112
2104
- msgid "start counting from bottom"
2105
- msgstr "start met tellen van beneden"
2106
-
2107
- #: ../admin/views/placements.php:139
2108
- msgid "Save Placements"
2109
- msgstr "Plaatsingen opslaan"
2110
-
2111
- #: ../admin/views/placements.php:141
2112
- msgid "Create a new placement"
2113
- msgstr "Maak een nieuwe plaatsing"
2114
-
2115
- #: ../admin/views/placements.php:142
2116
- msgid "New Placement"
2117
- msgstr "Nieuwe plaatsing"
2118
-
2119
- #: ../admin/views/placements.php:148
2120
- msgid "Choose a placement type"
2121
- msgstr "Kies een plaatsingstype"
2122
-
2123
- #: ../admin/views/placements.php:149
2124
- #, php-format
2125
- msgid ""
2126
- "Placement types define where the ad is going to be displayed. Learn more "
2127
- "about the different types from the <a href=\"%s\">manual</a>"
2128
- msgstr ""
2129
- "Plaatsingstypes stellen vast waar een advertentie getoond zal worden. Voor "
2130
- "meer informatie over plaatsingstypes kunt u de <a "
2131
- "href=\"$1%s\">handleiding</a> raadplegen."
2132
-
2133
- #: ../admin/views/placements.php:166
2134
- msgid "Please select a placement type."
2135
- msgstr "Selecteer alstublieft een plaatsingstype"
2136
-
2137
- #: ../admin/views/placements.php:168
2138
- msgid "Choose a Name"
2139
- msgstr "Kies een naam"
2140
-
2141
- #: ../admin/views/placements.php:169
2142
- msgid ""
2143
- "The name of the placement is only visible to you. Tip: choose a descriptive "
2144
- "one, e.g. <em>Below Post Headline</em>."
2145
- msgstr ""
2146
- "De naam van een plaatsing is alleen zichtbaar voor u. Tip: kies een naam die "
2147
- "de plaatsing goed omschrijft. (Voorbeeld: <em>Onder bericht titel</em>)"
2148
-
2149
- #: ../admin/views/placements.php:170
2150
- msgid "Placement Name"
2151
- msgstr "Plaatsing naam"
2152
-
2153
- #: ../admin/views/placements.php:171
2154
- msgid "Please enter a name for your placement."
2155
- msgstr "Vul alstublieft de naam van uw plaatsing in."
2156
-
2157
- #: ../admin/views/placements.php:172
2158
- msgid "Choose the Ad or Group"
2159
- msgstr "Kies de advertentie of advertentiegroep"
2160
-
2161
- #: ../admin/views/placements.php:173
2162
- msgid "The ad or group that should be displayed."
2163
- msgstr "De advertentie of advertentiegroep die getoond moet worden."
2164
-
2165
- #: ../admin/views/placements.php:192
2166
- msgid "Save New Placement"
2167
- msgstr "Nieuwe plaatsing opslaan"
2168
-
2169
- #: ../admin/views/post-ad-settings-metabox.php:3
2170
- msgid "Disable ads on this page"
2171
- msgstr "Advertenties op deze pagina uitschakelen"
2172
-
2173
- #: ../admin/views/setting-license.php:14
2174
- #, php-format
2175
- msgid "(%d days left)"
2176
- msgstr "(%d dagen over)"
2177
-
2178
- #: ../admin/views/setting-license.php:18
2179
- msgid "License key"
2180
- msgstr "Licentiecode"
2181
-
2182
- #: ../admin/views/setting-license.php:35
2183
- msgid "Activate License"
2184
- msgstr "Activeer licentie"
2185
-
2186
- #: ../admin/views/setting-license.php:42
2187
- msgid "active"
2188
- msgstr "actief"
2189
-
2190
- #: ../admin/views/settings-disable-ads.php:3
2191
- msgid "Disable all ads in frontend"
2192
- msgstr "Schakel alle advertenties aan de voorkant van uw website uit"
2193
-
2194
- #: ../admin/views/settings-disable-ads.php:4
2195
- msgid ""
2196
- "Use this option to disable all ads in the frontend, but still be able to use "
2197
- "the plugin."
2198
- msgstr ""
2199
- "Gebruik deze instelling om alle advertenties in de voorkant van uw website "
2200
- "uit te schakelen. U kunt wel gewoon gebruik blijven maken van de plugin."
2201
-
2202
- #: ../admin/views/settings-disable-ads.php:8
2203
- msgid "Disable ads on 404 error pages"
2204
- msgstr "Schakel advertenties uit op 404 error pagina's"
2205
-
2206
- #: ../admin/views/settings-disable-ads.php:12
2207
- msgid "Disable ads on non-singular pages"
2208
- msgstr "Schakel advertenties uit op niet-singulaire pagina's"
2209
-
2210
- #: ../admin/views/settings-disable-ads.php:13
2211
- msgid "e.g. archive pages like categories, tags, authors, front page (if a list)"
2212
- msgstr ""
2213
- "Bijvoorbeeld: archief pagina's zoals categorieën, tags, auteurs en de "
2214
- "homepagina (indien lijst)"
2215
-
2216
- #: ../admin/views/settings-disable-ads.php:16
2217
- msgid "Disable ads on secondary queries"
2218
- msgstr "Schakel advertenties uit op secundaire queries"
2219
-
2220
- #: ../admin/views/settings-disable-ads.php:17
2221
- msgid ""
2222
- "Secondary queries are custom queries of posts outside the main query of a "
2223
- "page. Try this option if you see ads injected on places where they shouldn’t "
2224
- "appear."
2225
- msgstr ""
2226
- "Secundaire queries zijn aangepaste queries van berichten buiten de hoofd-"
2227
- "query van een pagina. Probeer deze optie als u advertenties ziet verschijnen "
2228
- "op plekken waar dit niet hoort."
2229
-
2230
- #: ../admin/views/settings.php:36
2231
- msgid "Save settings on this page"
2232
- msgstr "Instellingen op deze pagina opslaan"
2233
-
2234
- #: ../admin/views/settings.php:48
2235
- msgid "Welcome Page"
2236
- msgstr "Welkomstpagina"
2237
-
2238
- #: ../admin/views/settings.php:49
2239
- msgid "Advanced Ads on WordPress.org"
2240
- msgstr "Advanced Ads op WordPress.org"
2241
-
2242
- #: ../admin/views/settings.php:49
2243
- msgid "Advanced Ads on wp.org"
2244
- msgstr "Advanced Ads op wp.org"
2245
-
2246
- #: ../admin/views/settings.php:50
2247
- msgid "the company behind Advanced Ads"
2248
- msgstr "het bedrijf achter Advanced Ads"
2249
-
2250
- #: ../admin/views/support.php:25
2251
- #, php-format
2252
- msgid ""
2253
- "One or more license keys for <strong>Advanced Ads add-ons are invalid or "
2254
- "missing</strong>. Please add valid license keys <a href=\"%s\">here</a>."
2255
- msgstr ""
2256
- "Één of meer <strong>licenties voor Advanced Ads add-ons zijn niet "
2257
- "geactiveerd</strong>. Voeg <a href=\"%s\">hier</a> alstublieft een correcte "
2258
- "licentiecode in."
2259
-
2260
- #: ../admin/views/support.php:49
2261
- msgid "Search"
2262
- msgstr "Zoeken"
2263
-
2264
- #: ../admin/views/support.php:50
2265
- msgid ""
2266
- "Use the following form to search for solutions in the manual on "
2267
- "wpadvancedads.com"
2268
- msgstr ""
2269
- "Gebruik het formulier om te zoeken naar oplossingen in de handleiding op "
2270
- "wpadvancedads.com"
2271
-
2272
- #: ../admin/views/support.php:53
2273
- msgid "search"
2274
- msgstr "zoeken"
2275
-
2276
- #: ../admin/views/support.php:55
2277
- msgid "Contact"
2278
- msgstr "Contact"
2279
-
2280
- #: ../admin/views/support.php:56
2281
- #, php-format
2282
- msgid ""
2283
- "Please search the manual for a solution and take a look at <a href=\"%s\" "
2284
- "target=\"_blank\">Ads not showing up?</a> before contacting me for help."
2285
- msgstr ""
2286
- "Probeer gelieve eerst te zoeken naar oplossingen in de handleiding of op de "
2287
- "pagina <a href=\"%s\" target=\"_blank\">Advertenties verschijnen niet?</a> "
2288
- "alvorens u contact opneemt voor ondersteuning. "
2289
-
2290
- #: ../admin/views/support.php:58
2291
- msgid "Email was successfully sent."
2292
- msgstr "De e-mail is succesvol verstuurd."
2293
-
2294
- #: ../admin/views/support.php:67
2295
- msgid "your email"
2296
- msgstr "uw e-mailadres"
2297
-
2298
- #: ../admin/views/support.php:71
2299
- msgid "your name"
2300
- msgstr "uw naam"
2301
-
2302
- #: ../admin/views/support.php:75
2303
- msgid "your message"
2304
- msgstr "uw bericht"
2305
-
2306
- #: ../admin/views/support.php:80
2307
- msgid "send"
2308
- msgstr "versturen"
2309
-
2310
- #: ../classes/ad_placements.php:31
2311
- msgid "Manual Placement"
2312
- msgstr "Handmatige plaatsing"
2313
-
2314
- #: ../classes/ad_placements.php:32
2315
- msgid "Manual placement to use as function or shortcode."
2316
- msgstr "Handmatige plaatsing door middel van een functie of shortcode"
2317
-
2318
- #: ../classes/ad_placements.php:36
2319
- msgid "Header Code"
2320
- msgstr "Header Code"
2321
-
2322
- #: ../classes/ad_placements.php:37
2323
- msgid "Injected in Header (before closing &lt;/head&gt; Tag, often not visible)."
2324
- msgstr ""
2325
- "Geïnjecteerd in de Header (voor de sluitende &lt;/head&gt; tag, meestal niet "
2326
- "zichtbaar)."
2327
-
2328
- #: ../classes/ad_placements.php:41
2329
- msgid "Footer Code"
2330
- msgstr "Footer code"
2331
-
2332
- #: ../classes/ad_placements.php:42
2333
- msgid "Injected in Footer (before closing &lt;/body&gt; Tag)."
2334
- msgstr "Geïnjecteerd in de Footer (voor de sluitende &lt;/body&gt; tag)."
2335
-
2336
- #: ../classes/ad_placements.php:46
2337
- msgid "Before Content"
2338
- msgstr "Voor de content"
2339
-
2340
- #: ../classes/ad_placements.php:47
2341
- msgid "Injected before the post content."
2342
- msgstr "Geïnjecteerd voor de post content"
2343
-
2344
- #: ../classes/ad_placements.php:51
2345
- msgid "After Content"
2346
- msgstr "Na de content"
2347
-
2348
- #: ../classes/ad_placements.php:52
2349
- msgid "Injected after the post content."
2350
- msgstr "Geïnjecteerd na de post content"
2351
-
2352
- #: ../classes/ad_placements.php:56
2353
- msgid "Post Content"
2354
- msgstr "In de content"
2355
-
2356
- #: ../classes/ad_placements.php:57
2357
- msgid ""
2358
- "Injected into the post content. You can choose the paragraph after which the "
2359
- "ad content is displayed."
2360
- msgstr ""
2361
- "Geïnjecteerd in de post content. U kunt een paragraaf kiezen achter welke de "
2362
- "advertentie getoond zal worden."
2363
-
2364
- #: ../classes/ad_placements.php:203
2365
- #, php-format
2366
- msgid "paragraph (%s)"
2367
- msgstr "paragraaf (%s)"
2368
-
2369
- #: ../classes/ad_placements.php:205
2370
- #, php-format
2371
- msgid "headline 2 (%s)"
2372
- msgstr "koptekst 2 (%s)"
2373
-
2374
- #: ../classes/ad_placements.php:206
2375
- #, php-format
2376
- msgid "headline 3 (%s)"
2377
- msgstr "koptekst 3 (%s)"
2378
-
2379
- #: ../classes/ad_placements.php:207
2380
- #, php-format
2381
- msgid "headline 4 (%s)"
2382
- msgstr "koptekst 4 (%s)"
2383
-
2384
- #: ../classes/ad_type_content.php:35
2385
- msgid "Rich Content"
2386
- msgstr "Rijke tekstopmaak"
2387
-
2388
- #: ../classes/ad_type_content.php:36
2389
- msgid ""
2390
- "The full content editor from WordPress with all features like shortcodes, "
2391
- "image upload or styling, but also simple text/html mode for scripts and code."
2392
- msgstr ""
2393
- "De volledige text-editor van WordPress met alle functionaliteiten zoals "
2394
- "shortcodes, afbeelding uploads en stijlen maar ook de simpele text/html "
2395
- "modus voor scripts en andere code."
2396
-
2397
- #: ../classes/ad_type_plain.php:31
2398
- msgid "Plain Text and Code"
2399
- msgstr "Platte tekst en code"
2400
-
2401
- #: ../classes/ad_type_plain.php:32
2402
- msgid ""
2403
- "Simple text editor without any filters. You might use it to display "
2404
- "unfiltered content, php code or javascript. Shortcodes and other WordPress "
2405
- "content field magic does not work here."
2406
- msgstr ""
2407
- "Simpele text-editor zonder enige filters. U kunt deze optie gebruiken om "
2408
- "ongefilterde content, PHP code of JavaScript in te zetten. Shortcodes en "
2409
- "andere WordPress magie is hierin niet te gebruiken."
2410
-
2411
- #: ../classes/ad_type_plain.php:52
2412
- msgid "Insert plain text or code into this field."
2413
- msgstr "Vul hier uw platte tekst of code in."
2414
-
2415
- #: ../classes/ad_type_plain.php:86
2416
- msgid "Execute PHP code (wrapped in <code>&lt;?php ?&gt;</code>)"
2417
- msgstr ""
2418
- "Voer PHP code uit (zorg dat uw code omwikkeld is met <code>&lt;?php ?&gt;"
2419
- "</code>)"
2420
-
2421
- #: ../classes/display-conditions.php:70 ../includes/array_ad_conditions.php:40
2422
- msgid "Choose the public post types on which to display the ad."
2423
- msgstr "Kies de publieke post types waar u deze advertentie wilt tonen."
2424
-
2425
- #: ../classes/display-conditions.php:77 ../includes/array_ad_conditions.php:58
2426
- msgid ""
2427
- "Choose on which individual posts, pages and public post type pages you want "
2428
- "to display or hide ads."
2429
- msgstr ""
2430
- "Kies op welke individuele berichten, pagina's en publieke post type pagina's "
2431
- "u advertenties wilt tonen of verbergen."
2432
-
2433
- #: ../classes/display-conditions.php:82
2434
- msgid "general conditions"
2435
- msgstr "Andere voorwaarden"
2436
-
2437
- #: ../classes/display-conditions.php:336
2438
- msgctxt "display the terms search field on ad edit page"
2439
- msgid "add more terms"
2440
- msgstr ""
2441
- "Meer termen toevoegen [ toon het term-zoekveld op het advertentie bewerken "
2442
- "scherm ]"
2443
-
2444
- #: ../classes/display-conditions.php:337
2445
- msgid "add more terms"
2446
- msgstr "Meer termen toevoegen"
2447
-
2448
- #: ../classes/display-conditions.php:339
2449
- msgid "term name or id"
2450
- msgstr "Term naam of ID"
2451
-
2452
- #: ../classes/display-conditions.php:445 ../includes/array_ad_conditions.php:63
2453
- msgid "Home Page"
2454
- msgstr "Home pagina"
2455
-
2456
- #: ../classes/display-conditions.php:446 ../includes/array_ad_conditions.php:64
2457
- msgid "show on Home page"
2458
- msgstr "toon op home pagina"
2459
-
2460
- #: ../classes/display-conditions.php:450 ../includes/array_ad_conditions.php:68
2461
- msgid "Singular Pages"
2462
- msgstr "Singulaire pagina's"
2463
-
2464
- #: ../classes/display-conditions.php:451 ../includes/array_ad_conditions.php:69
2465
- msgid "show on singular pages/posts"
2466
- msgstr "toon op singulaire pagina's/berichten"
2467
-
2468
- #: ../classes/display-conditions.php:455 ../includes/array_ad_conditions.php:73
2469
- msgid "Archive Pages"
2470
- msgstr "Archief pagina's"
2471
-
2472
- #: ../classes/display-conditions.php:456 ../includes/array_ad_conditions.php:74
2473
- msgid "show on any type of archive page (category, tag, author and date)"
2474
- msgstr "toon op ieder type archief pagina (categorie, tag, auteur en datum)"
2475
-
2476
- #: ../classes/display-conditions.php:460 ../includes/array_ad_conditions.php:78
2477
- msgid "Search Results"
2478
- msgstr "Zoekresultaten"
2479
-
2480
- #: ../classes/display-conditions.php:461 ../includes/array_ad_conditions.php:79
2481
- msgid "show on search result pages"
2482
- msgstr "toon op zoekresultaten pagina's"
2483
-
2484
- #: ../classes/display-conditions.php:465 ../includes/array_ad_conditions.php:83
2485
- msgid "404 Page"
2486
- msgstr "404 pagina"
2487
-
2488
- #: ../classes/display-conditions.php:466 ../includes/array_ad_conditions.php:84
2489
- msgid "show on 404 error page"
2490
- msgstr "toon op 404 error pagina"
2491
-
2492
- #: ../classes/display-conditions.php:470 ../includes/array_ad_conditions.php:88
2493
- msgid "Attachment Pages"
2494
- msgstr "Bijlage pagina's"
2495
-
2496
- #: ../classes/display-conditions.php:471 ../includes/array_ad_conditions.php:89
2497
- msgid "show on attachment pages"
2498
- msgstr "toon op bijlage pagina's"
2499
-
2500
- #: ../classes/display-conditions.php:475 ../includes/array_ad_conditions.php:93
2501
- msgid "Secondary Queries"
2502
- msgstr "Secundaire queries"
2503
-
2504
- #: ../classes/display-conditions.php:476 ../includes/array_ad_conditions.php:94
2505
- msgid "allow ads in secondary queries"
2506
- msgstr "sta advertenties toe in secundaire queries"
2507
-
2508
- #: ../classes/EDD_SL_Plugin_Updater.php:177
2509
- #, php-format
2510
- msgid ""
2511
- "There is a new version of %1$s available. <a target=\"_blank\" "
2512
- "class=\"thickbox\" href=\"%2$s\">View version %3$s details</a>."
2513
- msgstr ""
2514
- "Er is een nieuwe versie van %1$s beschikbaar. <a target=\"_blank\" "
2515
- "class=\"thickbox\" href=\"%2$s\">Bekijk versie %3$s details</a>."
2516
-
2517
- #: ../classes/EDD_SL_Plugin_Updater.php:184
2518
- #, php-format
2519
- msgid ""
2520
- "There is a new version of %1$s available. <a target=\"_blank\" "
2521
- "class=\"thickbox\" href=\"%2$s\">View version %3$s details</a> or <a "
2522
- "href=\"%4$s\">update now</a>."
2523
- msgstr ""
2524
- "Er is een nieuwe versie van %1$s beschikbaar. <a target=\"_blank\" "
2525
- "class=\"thickbox\" href=\"%2$s\">Bekijk versie %3$s details</a> of <a "
2526
- "href=\"%4$s\">update nu</a>."
2527
-
2528
- #: ../classes/EDD_SL_Plugin_Updater.php:324
2529
- msgid "You do not have permission to install plugin updates"
2530
- msgstr "U heeft niet genoeg rechten om plugin updates uit te voeren"
2531
-
2532
- #: ../classes/EDD_SL_Plugin_Updater.php:324
2533
- msgid "Error"
2534
- msgstr "Foutmelding"
2535
-
2536
- #: ../classes/visitor-conditions.php:32
2537
- msgid "mobile device"
2538
- msgstr "mobiel apparaat"
2539
-
2540
- #: ../classes/visitor-conditions.php:33
2541
- msgid "Display ads only on mobile devices or hide them."
2542
- msgstr "Toon advertenties alleen op mobiele apparaten of verberg ze."
2543
-
2544
- #: ../classes/visitor-conditions.php:39
2545
- msgid "logged in visitor"
2546
- msgstr "ingelogde bezoeker"
2547
-
2548
- #: ../classes/visitor-conditions.php:40
2549
- msgid "Whether the visitor has to be logged in or not in order to see the ads."
2550
- msgstr ""
2551
- "Of de bezoeker wel of niet ingelogd moet zijn om de advertentie te kunnen "
2552
- "zien."
2553
-
2554
- #: ../classes/visitor-conditions.php:101
2555
- msgid "is"
2556
- msgstr "is"
2557
-
2558
- #: ../classes/visitor-conditions.php:102
2559
- msgid "is not"
2560
- msgstr "is niet"
2561
-
2562
- #: ../classes/visitor-conditions.php:136
2563
- msgid "equal"
2564
- msgstr "gelijk aan"
2565
-
2566
- #: ../classes/visitor-conditions.php:137
2567
- msgid "equal or higher"
2568
- msgstr "gelijk aan of hoger"
2569
-
2570
- #: ../classes/visitor-conditions.php:138
2571
- msgid "equal or lower"
2572
- msgstr "gelijk aan of lager"
2573
-
2574
- #: ../classes/visitor-conditions.php:168
2575
- msgid "contains"
2576
- msgstr "bevat"
2577
-
2578
- #: ../classes/visitor-conditions.php:169
2579
- msgid "starts with"
2580
- msgstr "begint met"
2581
-
2582
- #: ../classes/visitor-conditions.php:170
2583
- msgid "ends with"
2584
- msgstr "eindigd met"
2585
-
2586
- #: ../classes/visitor-conditions.php:171
2587
- msgid "matches"
2588
- msgstr "komt overeen met"
2589
-
2590
- #: ../classes/visitor-conditions.php:172
2591
- msgid "matches regex"
2592
- msgstr "komt overeen met regex"
2593
-
2594
- #: ../classes/visitor-conditions.php:173
2595
- msgid "does not contain"
2596
- msgstr "bevat niet"
2597
-
2598
- #: ../classes/visitor-conditions.php:174
2599
- msgid "does not start with"
2600
- msgstr "start niet met"
2601
-
2602
- #: ../classes/visitor-conditions.php:175
2603
- msgid "does not end with"
2604
- msgstr "eindigd niet met"
2605
-
2606
- #: ../classes/visitor-conditions.php:176
2607
- msgid "does not match"
2608
- msgstr "komt niet overeen met"
2609
-
2610
- #: ../classes/visitor-conditions.php:177
2611
- msgid "does not match regex"
2612
- msgstr "komt niet overeen met regex"
2613
-
2614
- #: ../classes/widget.php:25
2615
- msgid "Display Ads and Ad Groups."
2616
- msgstr "Toon advertenties en advertentiegroepen"
2617
-
2618
- #: ../classes/widget.php:67
2619
- msgid "Title:"
2620
- msgstr "Titel:"
2621
-
2622
- #: ../includes/array_ad_conditions.php:39
2623
- msgid "Post Types"
2624
- msgstr "Post Types"
2625
-
2626
- #: ../includes/array_ad_conditions.php:45
2627
- msgid "Categories, Tags and Taxonomies"
2628
- msgstr "Categorieën, Tags en Taxonomieën"
2629
-
2630
- #: ../includes/array_ad_conditions.php:46
2631
- msgid ""
2632
- "Choose terms from public category, tag and other taxonomies a post must "
2633
- "belong to in order to have ads."
2634
- msgstr ""
2635
- "Kies hier de termen van publieke categorieën, tags en andere taxonomieën "
2636
- "waar een bericht bij moet horen om advertenties te tonen."
2637
-
2638
- #: ../includes/array_ad_conditions.php:51
2639
- msgid "Category Archives"
2640
- msgstr "Categorie archieven"
2641
-
2642
- #: ../includes/array_ad_conditions.php:52
2643
- msgid "comma seperated IDs of category archives"
2644
- msgstr "komma-gescheiden ID's of categorie archieven"
2645
-
2646
- #: ../includes/array_ad_conditions.php:57
2647
- msgid "Individual Posts, Pages and Public Post Types"
2648
- msgstr "Individuele berichten, pagina's en publieke post types"
2649
-
2650
- #: ../modules/gadsense/admin/admin.php:26 ../modules/gadsense/admin/views/adsense-
2651
- #: ad-parameters.php:51
2652
- msgid "Responsive"
2653
- msgstr "Responsive"
2654
-
2655
- #: ../modules/gadsense/admin/admin.php:44
2656
- msgid "The ad details couldn't be retrieved from the ad code"
2657
- msgstr "De advertentiedetails konden niet worden opgehaald vanuit de advertentiecode"
2658
-
2659
- #: ../modules/gadsense/admin/admin.php:45
2660
- msgid ""
2661
- "Warning : The AdSense account from this code does not match the one set with "
2662
- "the Advanced Ads Plugin. This ad might cause troubles when used in the front "
2663
- "end."
2664
- msgstr ""
2665
- "Waarschuwing: Het AdSense account van deze code komt niet overeen met het "
2666
- "account wat is ingesteld in de Advanced Ads plugin. Deze advertentie kan "
2667
- "problemen veroorzaken wanneer deze wordt gebruikt op de voorkant van de "
2668
- "website."
2669
-
2670
- #: ../modules/gadsense/admin/admin.php:123 ../modules/gadsense/admin/admin.php:262
2671
- msgid "AdSense"
2672
- msgstr "AdSense"
2673
-
2674
- #: ../modules/gadsense/admin/admin.php:131
2675
- msgid "AdSense ID"
2676
- msgstr "AdSense ID"
2677
-
2678
- #: ../modules/gadsense/admin/admin.php:140
2679
- msgid "Limit to 3 ads"
2680
- msgstr "Limiteer tot 3 advertenties"
2681
-
2682
- #: ../modules/gadsense/admin/admin.php:183
2683
- msgid "Your AdSense Publisher ID <em>(pub-xxxxxxxxxxxxxx)</em>"
2684
- msgstr "Uw AdSense Publisher ID <em>(pub-xxxxxxxxxxxxxx)</em>"
2685
-
2686
- #: ../modules/gadsense/admin/admin.php:195
2687
- #, php-format
2688
- msgid "Limit to %d AdSense ads"
2689
- msgstr "Limiteer tot %d AdSense advertenties"
2690
-
2691
- #: ../modules/gadsense/admin/admin.php:199
2692
- #, php-format
2693
- msgid ""
2694
- "Currently, Google AdSense <a target=\"_blank\" href=\"%s\" title=\"Terms Of "
2695
- "Service\">TOS</a> imposes a limit of %d display ads per page. You can disable "
2696
- "this limitation at your own risks."
2697
- msgstr ""
2698
- "Op dit moment hanteert de Google AdSense <a target=\"_blank\" href=\"%s\" "
2699
- "title=\"Terms Of Service\">TOS</a> een limiet van %d vertoningen per "
2700
- "advertentie per pagina. U kunt deze limitatie op eigen risico uitschakelen."
2701
-
2702
- #: ../modules/gadsense/admin/admin.php:202
2703
- msgid "Notice: Advanced Ads only considers the AdSense ad type for this limit."
2704
- msgstr ""
2705
- "Notificatie: Advanced Ads beschouwt alleen AdSense advertenties voor deze "
2706
- "limiet."
2707
-
2708
- #: ../modules/gadsense/admin/admin.php:240 ../modules/gadsense/includes/class-ad-
2709
- #: type-adsense.php:73
2710
- msgid "The Publisher ID has an incorrect format. (must start with \"pub-\")"
2711
- msgstr "Het Publisher ID heeft een incorrect format. (moet starten met \"pub-\")"
2712
-
2713
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:23
2714
- msgid "Copy&Paste existing ad code"
2715
- msgstr "Kopieer & Plak bestaande advertentiecode"
2716
-
2717
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:29
2718
- msgid "Ad Slot ID"
2719
- msgstr "Ad Slot ID"
2720
-
2721
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:37
2722
- #, php-format
2723
- msgid "Publisher ID: %s"
2724
- msgstr "Publisher ID: %s"
2725
-
2726
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:44
2727
- #, php-format
2728
- msgid "Please <a href=\"%s\" target=\"_blank\">change it here</a>."
2729
- msgstr "<a href=\"%s\" target=\"_blank\">Pas het alstublieft hier aan</a>."
2730
-
2731
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:50
2732
- msgid "Normal"
2733
- msgstr "Normaal"
2734
-
2735
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:55
2736
- #, php-format
2737
- msgid ""
2738
- "Use the <a href=\"%s\" target=\"_blank\">Responsive add-on</a> in order to "
2739
- "define the exact creative for each browser width."
2740
- msgstr ""
2741
- "Gebruik de <a href=\"%s\" target=\"_blank\">Responsive add-on</a> om de exacte "
2742
- "creative in te stellen voor iedere browser breedte. "
2743
-
2744
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:60
2745
- msgid "Resizing"
2746
- msgstr "Schalen"
2747
-
2748
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:72
2749
- msgid "Copy the ad code from your AdSense account and paste it in the area below"
2750
- msgstr ""
2751
- "Kopieer de advertentiecode van uw AdSense account en plak de code in het "
2752
- "tekstveld hieronder."
2753
-
2754
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:75
2755
- msgid "Get details"
2756
- msgstr "Verkrijg details"
2757
-
2758
- #: ../modules/gadsense/admin/views/adsense-ad-parameters.php:76
2759
- msgid "Close"
2760
- msgstr "Sluiten"
2761
-
2762
- #: ../modules/gadsense/includes/class-ad-type-adsense.php:35
2763
- msgid "AdSense ad"
2764
- msgstr "AdSense advertentie"
2765
-
2766
- #: ../modules/gadsense/includes/class-ad-type-adsense.php:36
2767
- msgid "Use ads from your Google AdSense account"
2768
- msgstr "Gebruik advertenties van uw Google AdSense account"
2769
-
2770
- #: ../modules/gadsense/includes/class-ad-type-adsense.php:105
2771
- msgid "Your AdSense Publisher ID is missing."
2772
- msgstr "Uw AdSense Publisher ID ontbreekt."
2773
-
2774
- #: ../modules/gadsense/includes/class-gadsense-data.php:46
2775
- msgid "Auto"
2776
- msgstr "Automatisch"
2777
-
2778
- #: ../public/class-advanced-ads.php:310
2779
- #, php-format
2780
- msgid "Advanced Ads Error: %s"
2781
- msgstr "Advanced Ads Foutmelding: %s"
2782
-
2783
- #: ../public/class-advanced-ads.php:551
2784
- msgctxt "ad group general name"
2785
- msgid "Ad Groups"
2786
- msgstr "Advertentiegroepen"
2787
-
2788
- #: ../public/class-advanced-ads.php:552
2789
- msgctxt "ad group singular name"
2790
- msgid "Ad Group"
2791
- msgstr "Advertentiegroep"
2792
-
2793
- #: ../public/class-advanced-ads.php:553
2794
- msgid "Search Ad Groups"
2795
- msgstr "Zoek advertentiegroepen"
2796
-
2797
- #: ../public/class-advanced-ads.php:554
2798
- msgid "All Ad Groups"
2799
- msgstr "Alle advertentiegroepen"
2800
-
2801
- #: ../public/class-advanced-ads.php:555
2802
- msgid "Parent Ad Groups"
2803
- msgstr "Bovenliggende advertentiegroepen"
2804
-
2805
- #: ../public/class-advanced-ads.php:556
2806
- msgid "Parent Ad Groups:"
2807
- msgstr "Bovenliggende advertentiegroepen:"
2808
-
2809
- #: ../public/class-advanced-ads.php:557
2810
- msgid "Edit Ad Group"
2811
- msgstr "Advertentiegroep bewerken"
2812
-
2813
- #: ../public/class-advanced-ads.php:558
2814
- msgid "Update Ad Group"
2815
- msgstr "Advertentiegroep bijwerken"
2816
-
2817
- #: ../public/class-advanced-ads.php:559
2818
- msgid "Add New Ad Group"
2819
- msgstr "Nieuwe advertentiegroep toevoegen"
2820
-
2821
- #: ../public/class-advanced-ads.php:560
2822
- msgid "New Ad Groups Name"
2823
- msgstr "Nieuwe advertentiegroep naam"
2824
-
2825
- #: ../public/class-advanced-ads.php:562
2826
- msgid "No Ad Group found"
2827
- msgstr "Geen advertentiegroep gevonden"
2828
-
2829
- #: ../public/class-advanced-ads.php:593
2830
- msgid "Edit Ad"
2831
- msgstr "Advertentie bewerken"
2832
-
2833
- #: ../public/class-advanced-ads.php:595
2834
- msgid "View"
2835
- msgstr "Bekijken"
2836
-
2837
- #: ../public/class-advanced-ads.php:596
2838
- msgid "View the Ad"
2839
- msgstr "Bekijk de advertentie"
2840
-
2841
- #: ../public/class-advanced-ads.php:597
2842
- msgid "Search Ads"
2843
- msgstr "Advertenties zoeken"
2844
-
2845
- #: ../public/class-advanced-ads.php:598
2846
- msgid "No Ads found"
2847
- msgstr "Geen advertenties gevonden"
2848
-
2849
- #: ../public/class-advanced-ads.php:599
2850
- msgid "No Ads found in Trash"
2851
- msgstr "Geen advertenties gevonden in de prullenbak"
2852
-
2853
- #: ../public/class-advanced-ads.php:600
2854
- msgid "Parent Ad"
2855
- msgstr "Bovenliggende advertentie"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/advanced-ads-pt_BR.mo DELETED
Binary file
languages/advanced-ads-pt_BR.po DELETED
@@ -1,2930 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: Advanved Ads\n"
4
- "Report-Msgid-Bugs-To: http://wordpress.org/plugins/plugin-name\n"
5
- "POT-Creation-Date: 2015-01-27 16:47+0100\n"
6
- "PO-Revision-Date: Sun May 15 2016 18:10:34 GMT+0200 (CEST)\n"
7
- "Last-Translator: admin <post@webzunft.de>\n"
8
- "Language-Team: webgilde <thomas.maier@webgilde.com>\n"
9
- "Language: Portuguese (Brazil)\n"
10
- "Plural-Forms: nplurals=2; plural=n != 1\n"
11
- "MIME-Version: 1.0\n"
12
- "Content-Type: text/plain; charset=UTF-8\n"
13
- "Content-Transfer-Encoding: 8bit\n"
14
- "X-Poedit-SourceCharset: UTF-8\n"
15
- "X-Generator: Loco - https://localise.biz/\n"
16
- "X-Poedit-KeywordsList: _:1;gettext:1;dgettext:2;ngettext:1,2;dngettext:2,3;"
17
- "__:1;_e:1;_c:1;_n:1,2;_n_noop:1,2;_nc:1,2;__ngettext:1,2;__ngettext_noop:1,2;"
18
- "_x:1,2c;_ex:1,2c;_nx:1,2,4c;_nx_noop:1,2,3c;_n_js:1,2;_nx_js:1,2,3c;"
19
- "esc_attr__:1;esc_html__:1;esc_attr_e:1;esc_html_e:1;esc_attr_x:1,2c;"
20
- "esc_html_x:1,2c;comments_number_link:2,3;t:1;st:1;trans:1;transChoice:1,2\n"
21
- "X-Poedit-Basepath: ../\n"
22
- "X-Poedit-SearchPath-0: .\n"
23
- "X-Loco-Target-Locale: pt_BR"
24
-
25
- #: ../admin/views/ad-info-bottom.php:2
26
- msgctxt "wizard navigation"
27
- msgid "previous"
28
- msgstr ""
29
-
30
- #: ../admin/views/ad-info-bottom.php:3
31
- msgctxt "wizard navigation"
32
- msgid "save"
33
- msgstr ""
34
-
35
- #: ../admin/views/ad-info-bottom.php:4
36
- msgctxt "wizard navigation"
37
- msgid "next"
38
- msgstr ""
39
-
40
- #: ../admin/views/ad-info-top.php:31 ../admin/views/ad-info-top.php:43
41
- msgid "Start Wizard"
42
- msgstr ""
43
-
44
- #: ../admin/views/ad-info-top.php:32
45
- msgid "Stop Wizard"
46
- msgstr ""
47
-
48
- #: ../admin/views/ad-info-top.php:41
49
- msgid "Welcome to the Wizard"
50
- msgstr ""
51
-
52
- #: ../admin/views/ad-info-top.php:42
53
- msgid ""
54
- "The Wizard helps you to quickly create and publish an ad. Therefore, only "
55
- "the most common options are visible.<br/>You can access all options when "
56
- "<strong>switching off</strong> the Wizard using the <em>Stop Wizard</em> "
57
- "button.<br/>You can <strong>switch on</strong> the Wizard at any time using "
58
- "the <em>Start Wizard</em> button."
59
- msgstr ""
60
-
61
- #: ../admin/views/ad-info-top.php:44
62
- msgid "Stop Wizard and show all options"
63
- msgstr ""
64
-
65
- #: ../classes/ad_type_plain.php:86
66
- msgid "Allow PHP"
67
- msgstr ""
68
-
69
- msgid "Advanced Ads"
70
- msgstr "Anúncios Avançados"
71
-
72
- #. URI of the plugin
73
- msgid "https://wpadvancedads.com"
74
- msgstr "https://wpadvancedads.com"
75
-
76
- #. Description of the plugin
77
- msgid "Manage and optimize your ads in WordPress"
78
- msgstr "Gerenciar e otimizar seus anúncios em WordPress"
79
-
80
- #. Author of the plugin
81
- msgid "Thomas Maier"
82
- msgstr "Thomas Maier"
83
-
84
- #. Author URI of the plugin
85
- msgid "http://webgilde.com"
86
- msgstr "http://webgilde.com"
87
-
88
- #: ../admin/class-advanced-ads-admin.php:215 ../classes/display-conditions.php:
89
- #: 171 ../classes/visitor-conditions.php:214
90
- msgid "or"
91
- msgstr "ou"
92
-
93
- #: ../admin/class-advanced-ads-admin.php:216 ../admin/views/ad-display-metabox.
94
- #: php:76 ../admin/views/ad-visitor-metabox.php:68 ../classes/display-conditions.
95
- #: php:171 ../classes/visitor-conditions.php:214
96
- msgid "and"
97
- msgstr "e"
98
-
99
- #: ../admin/class-advanced-ads-admin.php:217
100
- msgid "After which paragraph?"
101
- msgstr "Após o qual parágrafo?"
102
-
103
- #: ../admin/class-advanced-ads-admin.php:283
104
- msgid "Overview"
105
- msgstr "Visão geral"
106
-
107
- #: ../admin/class-advanced-ads-admin.php:287 ../admin/class-advanced-ads-admin.
108
- #: php:287 ../admin/includes/class-shortcode-creator.php:77 ../admin/views/ad-
109
- #: group-list-form-row.php:28 ../admin/views/ad-group-list-header.php:5 ..
110
- #: admin/views/placements.php:81 ../admin/views/placements.php:185 ..
111
- #: classes/widget.php:89 ../public/class-advanced-ads.php:590
112
- msgid "Ads"
113
- msgstr "Anúncios"
114
-
115
- #: ../admin/class-advanced-ads-admin.php:293 ../public/class-advanced-ads.php:593
116
- msgid "Add New Ad"
117
- msgstr "Adicionar Novo Anúncio"
118
-
119
- #: ../admin/class-advanced-ads-admin.php:293 ../public/class-advanced-ads.php:592
120
- #: ../public/class-advanced-ads.php:596
121
- msgid "New Ad"
122
- msgstr "Novo Anúncio"
123
-
124
- #: ../admin/class-advanced-ads-admin.php:298 ../admin/includes/class-shortcode-
125
- #: creator.php:84 ../admin/views/placements.php:74 ../admin/views/placements.php:
126
- #: 178 ../classes/widget.php:82
127
- msgid "Ad Groups"
128
- msgstr "Grupos de Anúncios"
129
-
130
- #: ../admin/class-advanced-ads-admin.php:298 ../public/class-advanced-ads.php:563
131
- msgid "Groups"
132
- msgstr "Grupos"
133
-
134
- #: ../admin/class-advanced-ads-admin.php:303
135
- msgid "Ad Placements"
136
- msgstr "Locais de Anúncio"
137
-
138
- #: ../admin/class-advanced-ads-admin.php:303 ../admin/includes/class-shortcode-
139
- #: creator.php:91 ../admin/views/placements.php:18 ../classes/widget.php:75
140
- msgid "Placements"
141
- msgstr "Locais"
142
-
143
- #: ../admin/class-advanced-ads-admin.php:307
144
- msgid "Advanced Ads Settings"
145
- msgstr "Configurações de Anúncios Avançados"
146
-
147
- #: ../admin/class-advanced-ads-admin.php:307 ../admin/class-advanced-ads-admin.
148
- #: php:555 ../admin/views/debug.php:10
149
- msgid "Settings"
150
- msgstr "Configurações"
151
-
152
- #: ../admin/class-advanced-ads-admin.php:310
153
- msgid "Advanced Ads Debugging"
154
- msgstr "Debug de Anúncios Avançados"
155
-
156
- #: ../admin/class-advanced-ads-admin.php:310
157
- msgid "Debug"
158
- msgstr "Debug"
159
-
160
- #: ../admin/class-advanced-ads-admin.php:314 ../admin/class-advanced-ads-admin.
161
- #: php:314
162
- msgid "Advanced Ads Intro"
163
- msgstr "Introdução ao Anúncios Avançados"
164
-
165
- #: ../admin/class-advanced-ads-admin.php:318 ../admin/class-advanced-ads-admin.
166
- #: php:318 ../admin/class-advanced-ads-admin.php:2110
167
- msgid "Support"
168
- msgstr "Suporte"
169
-
170
- #: ../admin/class-advanced-ads-admin.php:430
171
- msgid "Please enter a message"
172
- msgstr "Por favor digite uma mensagem"
173
-
174
- #: ../admin/class-advanced-ads-admin.php:440
175
- #, php-format
176
- msgid "Email could NOT be sent. Please contact us directly at %s."
177
- msgstr "E-mail não pôde ser enviado. Por favor contate-nos diretamente por %s."
178
-
179
- #: ../admin/class-advanced-ads-admin.php:443
180
- msgid "Please enter a valid email address"
181
- msgstr "Por favor digite um endereço de e-mail válido"
182
-
183
- #: ../admin/class-advanced-ads-admin.php:469 ../admin/class-advanced-ads-admin.
184
- #: php:496
185
- msgid "Sorry, you are not allowed to access this feature."
186
- msgstr "Desculpe, você não tem permissão para acessar esta função."
187
-
188
- #: ../admin/class-advanced-ads-admin.php:482
189
- msgid ""
190
- "You attempted to edit an ad group that doesn&#8217;t exist. Perhaps it was "
191
- "deleted?"
192
- msgstr "Você está tentando editar um Grupo que não existe. Talvez tenha sido apagado?"
193
-
194
- #: ../admin/class-advanced-ads-admin.php:650
195
- msgid "Ad Type"
196
- msgstr "Tipo de Anúncio"
197
-
198
- #: ../admin/class-advanced-ads-admin.php:656
199
- msgid "Ad Parameters"
200
- msgstr "Parâmetros do Anúncio"
201
-
202
- #: ../admin/class-advanced-ads-admin.php:659
203
- msgid "Layout / Output"
204
- msgstr "Layout / Exibição"
205
-
206
- #: ../admin/class-advanced-ads-admin.php:662
207
- msgid "Display Conditions"
208
- msgstr "Condições de exibição"
209
-
210
- #: ../admin/class-advanced-ads-admin.php:665
211
- msgid "Visitor Conditions"
212
- msgstr "Condições para Visitantes"
213
-
214
- #: ../admin/class-advanced-ads-admin.php:736 ../admin/class-advanced-ads-admin.
215
- #: php:747 ../admin/class-advanced-ads-admin.php:752 ../admin/views/ad-output-
216
- #: metabox.php:50
217
- msgid "Manual"
218
- msgstr "Manual"
219
-
220
- #: ../admin/class-advanced-ads-admin.php:746
221
- msgid "Video"
222
- msgstr "Vídeo"
223
-
224
- #: ../admin/class-advanced-ads-admin.php:924 ../admin/class-advanced-ads-admin.
225
- #: php:925
226
- msgid "Ad updated."
227
- msgstr "Anúncio atualizado."
228
-
229
- #. translators: %s: date and time of the revision
230
- #: ../admin/class-advanced-ads-admin.php:927
231
- #, php-format
232
- msgid "Ad restored to revision from %s"
233
- msgstr "Anúncio restaurado para revisão de %s"
234
-
235
- #: ../admin/class-advanced-ads-admin.php:928
236
- msgid "Ad published."
237
- msgstr "Anúncio publicado."
238
-
239
- #: ../admin/class-advanced-ads-admin.php:929
240
- msgid "Ad saved."
241
- msgstr "Anúncio salvo."
242
-
243
- #: ../admin/class-advanced-ads-admin.php:930
244
- msgid "Ad submitted."
245
- msgstr "Anúncio enviado."
246
-
247
- #: ../admin/class-advanced-ads-admin.php:932
248
- #, php-format
249
- msgid "Ad scheduled for: <strong>%1$s</strong>."
250
- msgstr "Anúncio previsto para: <strong>%1$s</strong>."
251
-
252
- #. translators: Publish box date format, see http://php.net/date
253
- #: ../admin/class-advanced-ads-admin.php:934
254
- msgid "M j, Y @ G:i"
255
- msgstr "M j, Y @ G:i"
256
-
257
- #: ../admin/class-advanced-ads-admin.php:936
258
- msgid "Ad draft updated."
259
- msgstr "Rascunho do Anúncio atualizado."
260
-
261
- #: ../admin/class-advanced-ads-admin.php:955
262
- #, php-format
263
- msgid "%s ad updated."
264
- msgid_plural "%s ads updated."
265
- msgstr[0] "%s anúncio atualizado."
266
- msgstr[1] "%s anúncios atualizados."
267
-
268
- #: ../admin/class-advanced-ads-admin.php:956
269
- #, php-format
270
- msgid "%s ad not updated, somebody is editing it."
271
- msgid_plural "%s ads not updated, somebody is editing them."
272
- msgstr[0] "%s anúncio não atualizado, alguém está editando."
273
- msgstr[1] "%s anúncios não atualizados, alguém está editando-os."
274
-
275
- #: ../admin/class-advanced-ads-admin.php:957
276
- #, php-format
277
- msgid "%s ad permanently deleted."
278
- msgid_plural "%s ads permanently deleted."
279
- msgstr[0] "%s anúncio excluído permanentemente."
280
- msgstr[1] "%s anúncios excluídos permanentemente."
281
-
282
- #: ../admin/class-advanced-ads-admin.php:958
283
- #, php-format
284
- msgid "%s ad moved to the Trash."
285
- msgid_plural "%s ads moved to the Trash."
286
- msgstr[0] "%s anúncio movido para a Lixeira."
287
- msgstr[1] "%s anúncios movidos para a Lixeira."
288
-
289
- #: ../admin/class-advanced-ads-admin.php:959
290
- #, php-format
291
- msgid "%s ad restored from the Trash."
292
- msgid_plural "%s ads restored from the Trash."
293
- msgstr[0] "%s anúncio restaurado a partir da Lixeira."
294
- msgstr[1] "%s anúncios restaurados a partir da Lixeira."
295
-
296
- #: ../admin/class-advanced-ads-admin.php:994 ../admin/views/settings.php:12
297
- msgid "General"
298
- msgstr "Geral"
299
-
300
- #: ../admin/class-advanced-ads-admin.php:1006 ../admin/class-advanced-ads-admin.
301
- #: php:1118
302
- msgid "Licenses"
303
- msgstr "Licenças"
304
-
305
- #: ../admin/class-advanced-ads-admin.php:1017
306
- msgid "Disable ads"
307
- msgstr "Desativar anúncios"
308
-
309
- #: ../admin/class-advanced-ads-admin.php:1025
310
- msgid "Hide ads for logged in users"
311
- msgstr "Não exibir anúncios para usuários logados"
312
-
313
- #: ../admin/class-advanced-ads-admin.php:1033
314
- msgid "Use advanced JavaScript"
315
- msgstr "Usar JavaScript avançado"
316
-
317
- #: ../admin/class-advanced-ads-admin.php:1041
318
- msgid "Unlimited ad injection"
319
- msgstr "Injeção de anúncios ilimitados"
320
-
321
- #: ../admin/class-advanced-ads-admin.php:1049
322
- msgid "Priority of content injection filter"
323
- msgstr "Prioridade de filtro de injeção de conteúdo"
324
-
325
- #: ../admin/class-advanced-ads-admin.php:1057
326
- msgid "Hide ads from bots"
327
- msgstr "Esconder anúncios de robôs (google, yahoo, bing, etc...)"
328
-
329
- #: ../admin/class-advanced-ads-admin.php:1065
330
- msgid "Disable notices"
331
- msgstr "desabilitar notificações"
332
-
333
- #: ../admin/class-advanced-ads-admin.php:1073
334
- msgid "ID prefix"
335
- msgstr "Prefixo ID"
336
-
337
- #: ../admin/class-advanced-ads-admin.php:1081
338
- msgid "Remove Widget ID"
339
- msgstr "Remover ID do Widget"
340
-
341
- #: ../admin/class-advanced-ads-admin.php:1089
342
- msgid "Allow editors to manage ads"
343
- msgstr "Permitir que editores gerenciem anúncios"
344
-
345
- #: ../admin/class-advanced-ads-admin.php:1097
346
- msgid "Ad label"
347
- msgstr "Rótulo do Anúncio"
348
-
349
- #: ../admin/class-advanced-ads-admin.php:1174
350
- msgid "(display to all)"
351
- msgstr "(exibir para todos)"
352
-
353
- #: ../admin/class-advanced-ads-admin.php:1175
354
- msgid "Subscriber"
355
- msgstr "Assinante"
356
-
357
- #: ../admin/class-advanced-ads-admin.php:1176
358
- msgid "Contributor"
359
- msgstr "Contribuidor"
360
-
361
- #: ../admin/class-advanced-ads-admin.php:1177
362
- msgid "Author"
363
- msgstr "Autor"
364
-
365
- #: ../admin/class-advanced-ads-admin.php:1178
366
- msgid "Editor"
367
- msgstr "Editor"
368
-
369
- #: ../admin/class-advanced-ads-admin.php:1179
370
- msgid "Admin"
371
- msgstr "Administrador"
372
-
373
- #: ../admin/class-advanced-ads-admin.php:1187
374
- msgid "Choose the lowest role a user must have in order to not see any ads."
375
- msgstr "Escolha o nível de usuário mais baixo para não ver os anúncios."
376
-
377
- #: ../admin/class-advanced-ads-admin.php:1201
378
- msgid ""
379
- "<strong>notice: </strong>the file is currently enabled by an add-on that "
380
- "needs it."
381
- msgstr ""
382
- "<strong>Aviso:</strong> o arquivo está atualmente habilitado por um add-on "
383
- "que precisa dele."
384
-
385
- #: ../admin/class-advanced-ads-admin.php:1204
386
- #, php-format
387
- msgid ""
388
- "Enable advanced JavaScript functions (<a href=\"%s\" target=\"_blank\">here</a>)."
389
- " Some features and add-ons might override this setting if they need features "
390
- "from this file."
391
- msgstr ""
392
- "Habilitar funções JavaScript avançadas (<a href=\"%s\" "
393
- "target=\"_blank\">aqui</a>). Algumas funcionalidades e complementos podem "
394
- "substituir essa configuração se eles precisarem de recursos a partir deste "
395
- "arquivo."
396
-
397
- #: ../admin/class-advanced-ads-admin.php:1217
398
- msgid ""
399
- "Some plugins and themes trigger ad injection where it shouldn’t happen. "
400
- "Therefore, Advanced Ads ignores injected placements on non-singular pages "
401
- "and outside the loop. However, this can cause problems with some themes. You "
402
- "can enable this option if you don’t see ads or want to enable ad injections "
403
- "on archive pages AT YOUR OWN RISK."
404
- msgstr ""
405
- "Alguns plugins e temas desencadear injeção de anúncio onde ele não deveria "
406
- "acontecer. Portanto, Anúncios Avançados ignora posicionamentos injetados em "
407
- "páginas não singulares e fora do loop. No entanto, isso pode causar "
408
- "problemas com alguns temas. Você pode ativar essa opção se você não vê "
409
- "anúncios ou deseja ativar injeções de anúncios em páginas de arquivos POR "
410
- "SUA CONTA E RISCO."
411
-
412
- #: ../admin/class-advanced-ads-admin.php:1233
413
- msgid ""
414
- "Please check your post content. A priority of 10 and below might cause "
415
- "issues (wpautop function might run twice)."
416
- msgstr ""
417
- "Por favor, verifique o conteúdo do post. A prioridade de 10 e abaixo pode "
418
- "causar problemas (função wpautop pode ser executado duas vezes)."
419
-
420
- #: ../admin/class-advanced-ads-admin.php:1235
421
- msgid ""
422
- "Play with this value in order to change the priority of the injected ads "
423
- "compared to other auto injected elements in the post content."
424
- msgstr ""
425
- "Jogar com este valor, a fim de alterar a prioridade dos anúncios injetados "
426
- "em comparação com outros elementos injetados automaticamente no conteúdo do "
427
- "post."
428
-
429
- #: ../admin/class-advanced-ads-admin.php:1249
430
- #, php-format
431
- msgid ""
432
- "Hide ads from crawlers, bots and empty user agents. Also prevents counting "
433
- "impressions for bots when using the <a href=\"%s\" target=\"_blank\">Tracking "
434
- "Add-On</a>."
435
- msgstr ""
436
- "Ocultar anúncios de rastreadores, robô e agentes de usuário vazio. Também "
437
- "impede contagem de impressões para robôs ao usar o <a href=\"%s\" "
438
- "target=\"_blank\">Add-On Rastreamento</a>."
439
-
440
- #: ../admin/class-advanced-ads-admin.php:1250
441
- msgid ""
442
- "Disabling this option only makes sense if your ads contain content you want "
443
- "to display to bots (like search engines) or your site is cached and bots "
444
- "could create a cached version without the ads."
445
- msgstr ""
446
- "A desativação dessa opção só faz sentido se os seus anúncios contêm conteúdo "
447
- "que você deseja exibir para robôs (como motores de busca) ou o seu site é "
448
- "armazenado em cache e robôs podem criar uma versão em cache sem os anúncios."
449
-
450
- #: ../admin/class-advanced-ads-admin.php:1263
451
- msgid ""
452
- "Disable internal notices like tips, tutorials, email newsletters and update "
453
- "notices. Disabling notices is recommended if you run multiple blogs with "
454
- "Advanced Ads already."
455
- msgstr ""
456
- "Desativar avisos internos, como dicas, tutoriais, boletins de e-mail e "
457
- "avisos de atualização. Desabilitar notificações é recomendado se você já "
458
- "executar vários blogs com Anúncios Avançados."
459
-
460
- #: ../admin/class-advanced-ads-admin.php:1280
461
- msgid ""
462
- "Prefix of class or id attributes in the frontend. Change it if you don’t "
463
- "want <strong>ad blockers</strong> to mark these blocks as ads.<br/>You might "
464
- "need to <strong>rewrite css rules afterwards</strong>."
465
- msgstr ""
466
- "Prefixo de classe ou atributos id no editor frontal. Mudá-lo se você não "
467
- "quer <strong>bloqueadores de anúncios</strong> para marcar estes blocos como "
468
- "anúncios. <br/>Talvez seja necessário <strong>reescrever as regras css "
469
- "depois</strong>."
470
-
471
- #: ../admin/class-advanced-ads-admin.php:1301
472
- msgid ""
473
- "Remove the ID attribute from widgets in order to not make them an easy "
474
- "target of ad blockers."
475
- msgstr ""
476
- "Remova o atributo ID de Widgets para não torná-los um alvo fácil de "
477
- "bloqueadores de anúncios."
478
-
479
- #: ../admin/class-advanced-ads-admin.php:1304
480
- msgid ""
481
- "If checked, the Advanced Ads Widget will not work with the fixed option of "
482
- "the <strong>Q2W3 Fixed Widget</strong> plugin."
483
- msgstr ""
484
- "Se marcada, o Widget Anúncios Avançados não funcionará com a opção fixa do "
485
- "plugin <strong>Widget Q2W3 Fixo</strong>."
486
-
487
- #: ../admin/class-advanced-ads-admin.php:1326
488
- msgid "Allow editors to also manage and publish ads."
489
- msgstr "Permite aos editores gerenciar e publicar anúncios também."
490
-
491
- #: ../admin/class-advanced-ads-admin.php:1327
492
- #, php-format
493
- msgid ""
494
- "You can assign different ad-related roles on a user basis with <a href=\"%s\" "
495
- "target=\"_blank\">Advanced Ads Pro</a>."
496
- msgstr ""
497
- "Você pode atribuir diferentes funções de anúncios relacionados em uma base "
498
- "de usuário com <a href=\"%s\" target=\"_blank\">Anúncios Avançados Pro</a>."
499
-
500
- #: ../admin/class-advanced-ads-admin.php:1339 ../public/class-advanced-ads.php:711
501
- msgctxt "label before ads"
502
- msgid "Advertisements"
503
- msgstr "Propagandas"
504
-
505
- #: ../admin/class-advanced-ads-admin.php:1346
506
- msgid "Displayed above ads."
507
- msgstr "Exibido anúncios acima."
508
-
509
- #: ../admin/class-advanced-ads-admin.php:1404
510
- msgid "Ad Details"
511
- msgstr "Detalhes do Anúncio"
512
-
513
- #: ../admin/class-advanced-ads-admin.php:1405
514
- msgid "Ad Planning"
515
- msgstr "Planejamento de Anúncio"
516
-
517
- #: ../admin/class-advanced-ads-admin.php:1540
518
- msgid "Ad Settings"
519
- msgstr "Configurações do Anúncio"
520
-
521
- #: ../admin/class-advanced-ads-admin.php:1619 ../admin/views/overview.php:23
522
- msgid "Ads Dashboard"
523
- msgstr "Painel de Anúncios"
524
-
525
- #: ../admin/class-advanced-ads-admin.php:1631
526
- msgid "From the ad optimization universe"
527
- msgstr "Universo de otimizações de anúncios"
528
-
529
- #: ../admin/class-advanced-ads-admin.php:1640
530
- msgid "Advanced Ads Tutorials"
531
- msgstr "Tutoriais do Anúncios Avançados"
532
-
533
- #: ../admin/class-advanced-ads-admin.php:1651
534
- #, php-format
535
- msgid "%d ads – <a href=\"%s\">manage</a> - <a href=\"%s\">new</a>"
536
- msgstr "%d anúncios – <a href=\"%s\">gerir</a> - <a href=\"%s\">novos</a>"
537
-
538
- #: ../admin/class-advanced-ads-admin.php:1662
539
- msgid "plugin manual and homepage"
540
- msgstr "manual e página do plugin"
541
-
542
- #: ../admin/class-advanced-ads-admin.php:1669
543
- msgid "Get the tutorial via email"
544
- msgstr "Receba o tutorial por e-mail"
545
-
546
- #: ../admin/class-advanced-ads-admin.php:1676
547
- msgid "Get AdSense tips via email"
548
- msgstr "Receba dicas do AdSense via e-mail"
549
-
550
- #: ../admin/class-advanced-ads-admin.php:1766
551
- #, php-format
552
- msgid "time of %s"
553
- msgstr "tempo de %s"
554
-
555
- #: ../admin/class-advanced-ads-admin.php:1802
556
- msgid "Error while trying to register the license. Please contact support."
557
- msgstr "Erro ao tentar registrar a licença. Entre em contato com o suporte."
558
-
559
- #: ../admin/class-advanced-ads-admin.php:1807 ../admin/views/setting-license.php:37
560
- msgid "Please enter a valid license key"
561
- msgstr "Por favor digite uma chave de licença válida"
562
-
563
- #: ../admin/class-advanced-ads-admin.php:1833
564
- msgid "License couldn’t be activated. Please try again later."
565
- msgstr "Licença não pôde ser ativada. Por favor, tente novamente mais tarde."
566
-
567
- #: ../admin/class-advanced-ads-admin.php:1845
568
- msgid "This is the bundle license key."
569
- msgstr "Esta é a chave de licença do pacote."
570
-
571
- #: ../admin/class-advanced-ads-admin.php:1846
572
- msgid "This is not the correct key for this add-on."
573
- msgstr "Esta não é a chave correta para este add-on."
574
-
575
- #: ../admin/class-advanced-ads-admin.php:1847
576
- msgid "There are no activations left."
577
- msgstr "Não há ativações deixadas."
578
-
579
- #: ../admin/class-advanced-ads-admin.php:1856
580
- #, php-format
581
- msgid "License is invalid. Reason: %s"
582
- msgstr "A Licença é inválida. Motivo: %s"
583
-
584
- #: ../admin/class-advanced-ads-admin.php:1910
585
- msgid "Error while trying to disable the license. Please contact support."
586
- msgstr "Erro ao tentar desativar a licença. Entre em contato com o suporte."
587
-
588
- #: ../admin/class-advanced-ads-admin.php:1933 ../admin/class-advanced-ads-admin.
589
- #: php:1950
590
- msgid "License couldn’t be deactivated. Please try again later."
591
- msgstr "Licença não pôde ser desativada. Por favor, tente novamente mais tarde."
592
-
593
- #: ../admin/class-advanced-ads-admin.php:2114
594
- msgid "Add-Ons"
595
- msgstr "Add-Ons"
596
-
597
- #: ../admin/includes/class-ad-groups-list.php:156
598
- msgid "Ad weight"
599
- msgstr "Peso do Anúncio"
600
-
601
- #: ../admin/includes/class-ad-groups-list.php:164 ../admin/views/ad-list-timing-
602
- #: column.php:4
603
- #, php-format
604
- msgid "starts %s"
605
- msgstr "inicia %s"
606
-
607
- #: ../admin/includes/class-ad-groups-list.php:183 ../admin/views/ad-list-timing-
608
- #: column.php:21
609
- #, php-format
610
- msgid "expires %s"
611
- msgstr "expira %s"
612
-
613
- #: ../admin/includes/class-ad-groups-list.php:185 ../admin/views/ad-list-timing-
614
- #: column.php:23
615
- #, php-format
616
- msgid "<strong>expired</strong> %s"
617
- msgstr "<strong>expirado</strong> %s"
618
-
619
- #: ../admin/includes/class-ad-groups-list.php:198
620
- msgid "all published ads are displayed"
621
- msgstr "todos os anúncios publicados estão sendo exibidos"
622
-
623
- #: ../admin/includes/class-ad-groups-list.php:200
624
- #, php-format
625
- msgid "up to %d ads displayed"
626
- msgstr "vá para %d anúncios exibidos"
627
-
628
- #: ../admin/includes/class-ad-groups-list.php:203 ../admin/views/ad-group-list-
629
- #: form-row.php:37
630
- msgid "No ads assigned"
631
- msgstr "Não há anúncios atribuídos"
632
-
633
- #: ../admin/includes/class-ad-groups-list.php:251
634
- msgid "Random ads"
635
- msgstr "Anúncios aleatórios"
636
-
637
- #: ../admin/includes/class-ad-groups-list.php:252
638
- msgid "Display random ads based on ad weight"
639
- msgstr "Exibir anúncios aleatórios com base no peso anúncio"
640
-
641
- #: ../admin/includes/class-ad-groups-list.php:255
642
- msgid "Ordered ads"
643
- msgstr "Anúncios ordenados"
644
-
645
- #: ../admin/includes/class-ad-groups-list.php:256
646
- msgid "Display ads with the highest ad weight first"
647
- msgstr "Os anúncios gráficos com maior peso em primeiro lugar"
648
-
649
- #: ../admin/includes/class-ad-groups-list.php:275 ../public/class-advanced-ads.
650
- #: php:594
651
- msgid "Edit"
652
- msgstr "Editar"
653
-
654
- #: ../admin/includes/class-ad-groups-list.php:276
655
- msgid "Usage"
656
- msgstr "Usar"
657
-
658
- #: ../admin/includes/class-ad-groups-list.php:285
659
- msgid "Delete"
660
- msgstr "Excluir"
661
-
662
- #: ../admin/includes/class-ad-groups-list.php:306
663
- msgid "Invalid Ad Group"
664
- msgstr "Grupo de Anúncios Inválido"
665
-
666
- #: ../admin/includes/class-ad-groups-list.php:311
667
- msgid "You don’t have permission to change the ad groups"
668
- msgstr "Você não tem permissão para alterar os grupos de anúncios"
669
-
670
- #: ../admin/includes/class-notices.php:406
671
- #, php-format
672
- msgid ""
673
- "You don’t seem to have an email address. Please use <a href=\"%s\" "
674
- "target=\"_blank\">this form</a> to sign up."
675
- msgstr ""
676
- "Você não parece ter um endereço de e-mail. Utilize <a href=\"%s\" "
677
- "target=\"_blank\">este formulário</a> para se inscrever."
678
-
679
- #: ../admin/includes/class-notices.php:424
680
- msgid "How embarrassing. The email server seems to be down. Please try again later."
681
- msgstr ""
682
- "Como é embaraçoso. O servidor de e-mail parece ser ruim. Por favor tente de "
683
- "novo mais tarde."
684
-
685
- #: ../admin/includes/class-notices.php:429
686
- #, php-format
687
- ms