Version Description
- Fix: Never show ads on ajax generated pages
- New: Filter to ignore display conditions for short code generated ads
- New: Announcement for the integration of the video SSP vi.ai
- New: Add filter 'quads_show_ads' to overwrite the default ad visibility conditions
Download this release
Release Info
Developer | ReneHermi |
Plugin | AdSense Plugin WP QUADS |
Version | 1.6.1 |
Comparing to | |
See all releases |
Code changes from version 1.6.0 to 1.6.1
- assets/css/quads-admin-all.css +121 -0
- assets/css/quads-admin.css +987 -875
- assets/css/quads-admin.min.css +1 -1
- assets/images/vi_quads_logo.png +0 -0
- assets/images/vi_quads_logo_1.png +0 -0
- includes/admin/admin-actions.php +63 -43
- includes/admin/admin-notices.php +449 -401
- includes/admin/admin-pages.php +83 -85
- includes/admin/settings/display-settings.php +350 -349
- includes/admin/settings/register-settings.php +2160 -2230
- includes/admin/welcome.php +1 -9
- includes/conditions.php +204 -194
- includes/post_types.php +49 -47
- includes/scripts.php +278 -258
- includes/shortcodes.php +133 -133
- includes/template-functions.php +810 -810
- includes/viIntegration.php +96 -0
- quick-adsense-reloaded.php +2 -2
- readme.txt +205 -199
assets/css/quads-admin-all.css
ADDED
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* QUADS Admin All CSS
|
3 |
+
*
|
4 |
+
* @package QUADS
|
5 |
+
* @subpackage Admin CSS
|
6 |
+
* @copyright Copyright (c) 2017, René Hermenau
|
7 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
8 |
+
*/
|
9 |
+
|
10 |
+
|
11 |
+
@media (max-width:506px){
|
12 |
+
.quads-banner-columns {
|
13 |
+
display: block !important;
|
14 |
+
}
|
15 |
+
.quads-banner-sidebar-second{
|
16 |
+
width: 100% !important;
|
17 |
+
}
|
18 |
+
}
|
19 |
+
@media (max-width:780px){
|
20 |
+
.quads-banner-wrapper{
|
21 |
+
margin-right:12px !important;
|
22 |
+
}
|
23 |
+
}
|
24 |
+
|
25 |
+
.quads-banner-wrapper{
|
26 |
+
display: flex;
|
27 |
+
flex-direction: column;
|
28 |
+
clear:both;
|
29 |
+
background: #fff;
|
30 |
+
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
|
31 |
+
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
|
32 |
+
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
|
33 |
+
margin: 5px 5px 2px;
|
34 |
+
margin-right:20px;
|
35 |
+
padding: 1px 12px;
|
36 |
+
}
|
37 |
+
.quads-banner-content {
|
38 |
+
display: flex;
|
39 |
+
flex: 1;
|
40 |
+
color: #000;
|
41 |
+
}
|
42 |
+
.quads-banner-columns{
|
43 |
+
display: flex;
|
44 |
+
flex:1;
|
45 |
+
-ms-flex-align: center;
|
46 |
+
-webkit-align-items: center;
|
47 |
+
-webkit-box-align: center;
|
48 |
+
|
49 |
+
align-items: center;
|
50 |
+
}
|
51 |
+
.quads-banner-main{
|
52 |
+
flex: 1;
|
53 |
+
order: 2;
|
54 |
+
}
|
55 |
+
.quads-banner-sidebar-first{
|
56 |
+
min-width: 160px;
|
57 |
+
width: 13%;
|
58 |
+
order: 1;
|
59 |
+
}
|
60 |
+
.quads-banner-sidebar-second{
|
61 |
+
width: 19%;
|
62 |
+
order: 3;
|
63 |
+
}
|
64 |
+
|
65 |
+
|
66 |
+
.quads-button-primary {
|
67 |
+
display: inline-block;
|
68 |
+
text-decoration: none;
|
69 |
+
font-size: 16px;
|
70 |
+
line-height: 32px;
|
71 |
+
height: 36px;
|
72 |
+
margin: 0;
|
73 |
+
padding: 0 13px 1px;
|
74 |
+
cursor: pointer;
|
75 |
+
border-width: 1px;
|
76 |
+
border-style: solid;
|
77 |
+
-webkit-appearance: none;
|
78 |
+
-webkit-border-radius: 3px;
|
79 |
+
border-radius: 3px;
|
80 |
+
white-space: nowrap;
|
81 |
+
-webkit-box-sizing: border-box;
|
82 |
+
-moz-box-sizing: border-box;
|
83 |
+
box-sizing: border-box;
|
84 |
+
font-weight: bold;
|
85 |
+
}
|
86 |
+
|
87 |
+
.quads-button-primary {
|
88 |
+
background: #0085ba;
|
89 |
+
border-color: #0073aa #006799 #006799;
|
90 |
+
-webkit-box-shadow: 0 1px 0 #006799;
|
91 |
+
box-shadow: 0 1px 0 #006799;
|
92 |
+
color: #fff;
|
93 |
+
text-decoration: none;
|
94 |
+
text-shadow: 0 -1px 1px #006799, 1px 0 1px #006799, 0 1px 1px #006799, -1px 0 1px #006799;
|
95 |
+
}
|
96 |
+
|
97 |
+
.quads-notice-dismiss {
|
98 |
+
display: inline-block;
|
99 |
+
position: relative;
|
100 |
+
top: 0;
|
101 |
+
right: 1px;
|
102 |
+
border: none;
|
103 |
+
margin: 0;
|
104 |
+
padding: 0px;
|
105 |
+
background: 0 0;
|
106 |
+
color: #72777c;
|
107 |
+
cursor: pointer;
|
108 |
+
}
|
109 |
+
|
110 |
+
.quads-notice-dismiss:before{
|
111 |
+
display: inline-block;
|
112 |
+
background: 0 0;
|
113 |
+
color: #72777c;
|
114 |
+
content: "\f153";
|
115 |
+
font: 400 16px/20px dashicons;
|
116 |
+
speak: none;
|
117 |
+
height: 20px;
|
118 |
+
text-align: center;
|
119 |
+
width: 20px;
|
120 |
+
-webkit-font-smoothing: antialiased;
|
121 |
+
}
|
assets/css/quads-admin.css
CHANGED
@@ -1,875 +1,987 @@
|
|
1 |
-
/**
|
2 |
-
* QUADS Admin CSS
|
3 |
-
*
|
4 |
-
* @package QUADS
|
5 |
-
* @subpackage Admin CSS
|
6 |
-
* @copyright Copyright (c) 2015, René Hermenau
|
7 |
-
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
8 |
-
*/
|
9 |
-
|
10 |
-
.quads-share-button-container{
|
11 |
-
margin: 5px 0;
|
12 |
-
}
|
13 |
-
|
14 |
-
.quads-share-button-container p{
|
15 |
-
margin:0px 0 10px 0;
|
16 |
-
}
|
17 |
-
|
18 |
-
.quads-share-button {
|
19 |
-
display: inline-block;
|
20 |
-
}
|
21 |
-
|
22 |
-
.quads-share-button a{
|
23 |
-
text-decoration:none;
|
24 |
-
}
|
25 |
-
|
26 |
-
.quads-share-button .quads-share {
|
27 |
-
font-family:sans-serif;
|
28 |
-
font-weight:bold;
|
29 |
-
text-decoration:none;
|
30 |
-
text-align:center;
|
31 |
-
}
|
32 |
-
|
33 |
-
|
34 |
-
.quads-share-button .quads-share {
|
35 |
-
-webkit-border-radius:2px;
|
36 |
-
-moz-border-radius:2px;
|
37 |
-
border-radius:2px;
|
38 |
-
color:#FFF;
|
39 |
-
display:inline;
|
40 |
-
font-size:16px;
|
41 |
-
width:40px;
|
42 |
-
padding:4px 8px;
|
43 |
-
}
|
44 |
-
|
45 |
-
.quads-share-button-twitter .quads-share {
|
46 |
-
background-color:#00ABF0;
|
47 |
-
}
|
48 |
-
|
49 |
-
.quads-share-button-facebook .quads-share {
|
50 |
-
background-color:#3b5998;
|
51 |
-
}
|
52 |
-
|
53 |
-
.quads-share-button-googleplus .quads-share {
|
54 |
-
background-color:#F53424;
|
55 |
-
}
|
56 |
-
|
57 |
-
.quads-share-button-twitter .share:active,.quads-share-button-facebook .share:active,.quads-share-button-googleplus .share:active {
|
58 |
-
background-color:#353535;
|
59 |
-
}
|
60 |
-
|
61 |
-
/* Responsive */
|
62 |
-
@media (max-width: 925px) {
|
63 |
-
.quads-share-button .quads-share{
|
64 |
-
font-size:15px;
|
65 |
-
padding: 8px 16px; /* Double the padding */
|
66 |
-
}
|
67 |
-
|
68 |
-
}
|
69 |
-
|
70 |
-
|
71 |
-
/* Input forms */
|
72 |
-
/*.quads-textarea{
|
73 |
-
font-size:11px;
|
74 |
-
}*/
|
75 |
-
.quads-richeditor{
|
76 |
-
font-size:11px;
|
77 |
-
}
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
/* =Add Ons Styles
|
82 |
-
-------------------------------------------------------------- */
|
83 |
-
#quads-add-ons h2 { margin: 0 0 15px; }
|
84 |
-
#quads-add-ons .quadsshare-addons { float: left; margin: 0 15px 15px 0; background: #f0f0f0; border: 1px solid #ccc; width: 320px; padding: 8px; height: 315px; position: relative; }
|
85 |
-
#quads-add-ons .quadsshare-addons h3 { margin: 0 0 8px; font-size: 13px; }
|
86 |
-
#quads-add-ons .quadsshare-addons .button-secondary { position: absolute; bottom: 8px; left: 8px; }
|
87 |
-
/*#quads-add-ons .quadsshare-addons { clear:both; width:100%; }*/
|
88 |
-
#quads-add-ons .quadsshare-addons .third-party { display: none; }
|
89 |
-
|
90 |
-
|
91 |
-
/* System Info page styles
|
92 |
-
-------------------------------------------------------------- */
|
93 |
-
#system-info-textarea { width: 580px; height: 400px; font-family: Menlo, Monaco, monospace; background: none; white-space: pre; overflow: auto; display: block; }
|
94 |
-
|
95 |
-
|
96 |
-
/* General styles
|
97 |
-
-------------------------------------------------------------- */
|
98 |
-
.quads-select-chosen { width: 300px; }
|
99 |
-
|
100 |
-
input.large-text, textarea.large-text {
|
101 |
-
max-width: 600px;
|
102 |
-
}
|
103 |
-
input.medium-text, textarea.medium-text {
|
104 |
-
min-width: 190px;
|
105 |
-
}
|
106 |
-
|
107 |
-
/* CSS for Tabs */
|
108 |
-
|
109 |
-
#quads_tab_container ul {
|
110 |
-
/*height: 200px;*/
|
111 |
-
list-style: none;
|
112 |
-
margin: 0;
|
113 |
-
padding: 0;
|
114 |
-
background: #fff;
|
115 |
-
float: left;
|
116 |
-
padding-top: 0px;
|
117 |
-
/*list-style-type: square;*/
|
118 |
-
}
|
119 |
-
|
120 |
-
#quads_tab_container ul li:first-child.selected-tab {
|
121 |
-
border-top: none;
|
122 |
-
}
|
123 |
-
|
124 |
-
#quads_tab_container ul li a.selected-tab {
|
125 |
-
font-weight: bold;
|
126 |
-
text-decoration: none;
|
127 |
-
}
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
#quads_tab_container .quads-row{
|
132 |
-
padding-top:12px;
|
133 |
-
padding-bottom:12px;
|
134 |
-
}
|
135 |
-
|
136 |
-
|
137 |
-
#quads_tab_container .quads-row label strong, #tab_container .quads-row strong {
|
138 |
-
font-weight: bold;
|
139 |
-
}
|
140 |
-
|
141 |
-
.quads-tabs a {
|
142 |
-
padding:5px;
|
143 |
-
color:#a1a1a1;
|
144 |
-
text-transform: uppercase;
|
145 |
-
}
|
146 |
-
.quads-tabs a strong {
|
147 |
-
font-weight: 700;
|
148 |
-
}
|
149 |
-
|
150 |
-
li.quads-tabs {
|
151 |
-
float:left;
|
152 |
-
margin-left:0px;
|
153 |
-
background-color: #e5e5e5;
|
154 |
-
}
|
155 |
-
|
156 |
-
/*@media only screen and (min-width:400px) {
|
157 |
-
li.quads-tabs {
|
158 |
-
float:left;
|
159 |
-
margin-left:14px;
|
160 |
-
}
|
161 |
-
}*/
|
162 |
-
|
163 |
-
#quads_tab_container > ul > li.quads-tabs.active {
|
164 |
-
background-color:#fff;
|
165 |
-
}
|
166 |
-
#quads_tab_container > ul > li.quads-tabs.active a {
|
167 |
-
color: #83c11f;
|
168 |
-
}
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
/* Layout of admin table and rows
|
173 |
-
*/
|
174 |
-
|
175 |
-
|
176 |
-
#quads_tab_container .quads-panel-container {
|
177 |
-
background: #FFF;
|
178 |
-
padding:20px;
|
179 |
-
overflow:auto;
|
180 |
-
text-align:left;
|
181 |
-
margin-bottom:10px;
|
182 |
-
max-width: 640px;
|
183 |
-
float: left;
|
184 |
-
clear:both;
|
185 |
-
}
|
186 |
-
|
187 |
-
.form-table{
|
188 |
-
margin-top:-20px;
|
189 |
-
}
|
190 |
-
|
191 |
-
#quads_tab_container .form-table th {
|
192 |
-
vertical-align: top;
|
193 |
-
text-align: left;
|
194 |
-
padding: 20px 10px 20px 0;
|
195 |
-
width: 200px;
|
196 |
-
line-height: 1.3;
|
197 |
-
font-weight: bold;
|
198 |
-
font-size: 14px;
|
199 |
-
color:#484848;
|
200 |
-
width: 30%;
|
201 |
-
}
|
202 |
-
|
203 |
-
/*#quads_tab_container .form-table tr{
|
204 |
-
padding:0px;
|
205 |
-
}*/
|
206 |
-
|
207 |
-
#quads_tab_container .form-table tr {
|
208 |
-
border-bottom: 1px solid #E7E7E7;
|
209 |
-
}
|
210 |
-
|
211 |
-
#quads_tab_container span.description{
|
212 |
-
display: block;
|
213 |
-
font-weight: 400;
|
214 |
-
font-style: normal;
|
215 |
-
font-size: 13px;
|
216 |
-
margin-top: 7px;
|
217 |
-
color:#484848;
|
218 |
-
}
|
219 |
-
|
220 |
-
#quads_tab_container .col-title{
|
221 |
-
font-size: 18px;
|
222 |
-
color:#484848;
|
223 |
-
}
|
224 |
-
|
225 |
-
@media only screen and (max-width:680px) {
|
226 |
-
#quads_tab_container ul {
|
227 |
-
float:none;
|
228 |
-
background: #fff;
|
229 |
-
}
|
230 |
-
#quads_tab_container .form-table tr > th {
|
231 |
-
width:100%;
|
232 |
-
}
|
233 |
-
#quads_tab_container span.description{
|
234 |
-
font-size: 14px;
|
235 |
-
}
|
236 |
-
#quads_tab_container .form-table tr > th, #tab_container .form-table tr > td {
|
237 |
-
padding:10px;
|
238 |
-
}
|
239 |
-
#quads_tab_container .quads-tabs a{
|
240 |
-
text-align: left;
|
241 |
-
}
|
242 |
-
#quads_tab_container li.quads-tabs {
|
243 |
-
float:none;
|
244 |
-
margin-left:0px;
|
245 |
-
}
|
246 |
-
}
|
247 |
-
|
248 |
-
#quads_tab_container ul li.quads-tabs {
|
249 |
-
margin-bottom:0px;
|
250 |
-
}
|
251 |
-
|
252 |
-
#quads_tab_container ul li.quads-tabs a {
|
253 |
-
display: block;
|
254 |
-
padding:10px 10px 10px 10px;
|
255 |
-
text-decoration: none;
|
256 |
-
font-weight: bold;
|
257 |
-
}
|
258 |
-
#quads_tab_container ul li.quads-tabs a:hover {
|
259 |
-
color:#383838;
|
260 |
-
}
|
261 |
-
#quads_tab_container ul li.quads-tabs a.active {
|
262 |
-
text-decoration: underline;
|
263 |
-
}
|
264 |
-
|
265 |
-
|
266 |
-
#quads_tab_container table tbody tr:nth-child(1) > th > div {
|
267 |
-
font-size: 20px;
|
268 |
-
}
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
/* End layout of admin table and rows
|
273 |
-
*/
|
274 |
-
#quadstabcontainer > .quadstabs {
|
275 |
-
background-color: #ffffff;
|
276 |
-
}
|
277 |
-
|
278 |
-
#quadstabcontainer ul .active {
|
279 |
-
background-color: #00adef;
|
280 |
-
color: white;
|
281 |
-
border-bottom-color: #0098D2;
|
282 |
-
}
|
283 |
-
|
284 |
-
#quadstabcontainer ul .active:hover {
|
285 |
-
background-color: #00A4E2;
|
286 |
-
color: white;
|
287 |
-
border-bottom-color: #0098D2;
|
288 |
-
}
|
289 |
-
|
290 |
-
#quadstabcontainer ul li a {
|
291 |
-
padding: 10px 14px 10px 14px;
|
292 |
-
background-color: #f3f3f3
|
293 |
-
|
294 |
-
}
|
295 |
-
|
296 |
-
#quadstabcontainer .quadstab-container {
|
297 |
-
border: 0px solid #ececec;
|
298 |
-
}
|
299 |
-
|
300 |
-
.quads-quote-docs {
|
301 |
-
font-family:Courier New,Courier,Fixed;
|
302 |
-
color:#050;
|
303 |
-
}
|
304 |
-
|
305 |
-
.quads-desc{
|
306 |
-
display:block;
|
307 |
-
font-style:italic;
|
308 |
-
padding-top:10px;
|
309 |
-
}
|
310 |
-
|
311 |
-
.quads-postbox {
|
312 |
-
padding:10px;
|
313 |
-
position: relative;
|
314 |
-
min-width: 255px;
|
315 |
-
border: 1px solid #e5e5e5;
|
316 |
-
-webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.04);
|
317 |
-
box-shadow: 0 1px 1px rgba(0,0,0,0.04);
|
318 |
-
background: #fff;
|
319 |
-
margin-bottom:20px;
|
320 |
-
}
|
321 |
-
|
322 |
-
.nav-tab-active{
|
323 |
-
background-color: white;
|
324 |
-
border-bottom:0px;
|
325 |
-
}
|
326 |
-
|
327 |
-
/*.wp-admin .quads-align-input{
|
328 |
-
padding: 0px;
|
329 |
-
line-height: 23px;
|
330 |
-
height: 24px;
|
331 |
-
vertical-align: top;
|
332 |
-
}*/
|
333 |
-
|
334 |
-
|
335 |
-
#quads-add-ons {
|
336 |
-
padding: 20px;
|
337 |
-
}
|
338 |
-
.quads-toggle {
|
339 |
-
position: absolute;
|
340 |
-
right: 0px;
|
341 |
-
top: 0px;
|
342 |
-
}
|
343 |
-
|
344 |
-
.quads-box-close .quads-close-open-icon {
|
345 |
-
background-position: 0px -38px;
|
346 |
-
}
|
347 |
-
|
348 |
-
.quads-close-open-icon {
|
349 |
-
width: 38px;
|
350 |
-
height: 38px;
|
351 |
-
background: #f4f4f4 url("../images/arrow-close.png") repeat-y;
|
352 |
-
background-position: 0px 0px;
|
353 |
-
}
|
354 |
-
.quads-ad-toggle-header {
|
355 |
-
position: relative;
|
356 |
-
background-color: #f4f4f4;
|
357 |
-
margin-bottom: 2px;
|
358 |
-
padding: 10px 10px 10px 15px;
|
359 |
-
-moz-user-select: -moz-none;
|
360 |
-
-khtml-user-select: none;
|
361 |
-
-webkit-user-select: none;
|
362 |
-
-o-user-select: none;
|
363 |
-
user-select: none;
|
364 |
-
cursor: pointer !important;
|
365 |
-
min-height: 20px;
|
366 |
-
}
|
367 |
-
|
368 |
-
.quads-ad-toggle-container{
|
369 |
-
padding:20px;
|
370 |
-
background-color: #f4f4f4;
|
371 |
-
}
|
372 |
-
|
373 |
-
.quads-toogle-title{
|
374 |
-
font-size:16px;
|
375 |
-
font-weight: bold;
|
376 |
-
}
|
377 |
-
|
378 |
-
.quads-advanced-description label{
|
379 |
-
float:left;
|
380 |
-
width:215px;
|
381 |
-
font-size: 12px;
|
382 |
-
font-weight: 600;
|
383 |
-
text-transform: uppercase;
|
384 |
-
}
|
385 |
-
|
386 |
-
.quads-advanced-ad-box{
|
387 |
-
clear: both;
|
388 |
-
margin-top:20px;
|
389 |
-
margin-bottom:20px;
|
390 |
-
}
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
.adsense-size-title {
|
395 |
-
margin-right: 0px;
|
396 |
-
float: left;
|
397 |
-
line-height: 32px;
|
398 |
-
margin-left: 14px;
|
399 |
-
min-width: 100px;
|
400 |
-
font-weight: 600;
|
401 |
-
font-size: 12px;
|
402 |
-
text-transform: uppercase;
|
403 |
-
}
|
404 |
-
|
405 |
-
.quads-select-style-overwrite {
|
406 |
-
border: 1px solid #e6e6e6;
|
407 |
-
width: 150px;
|
408 |
-
overflow: hidden;
|
409 |
-
background: #ffffff url("../images/box_arrow.png") repeat-y 120px 0px;
|
410 |
-
margin: 0px 0px 5px 0px;
|
411 |
-
}
|
412 |
-
.quads-select-style-overwrite select {
|
413 |
-
width:150px;
|
414 |
-
}
|
415 |
-
|
416 |
-
/*.quads-select{
|
417 |
-
max-width:100px;
|
418 |
-
}*/
|
419 |
-
|
420 |
-
.quads-size-input {
|
421 |
-
position: relative;
|
422 |
-
top: -1px;
|
423 |
-
width: 110%;
|
424 |
-
border: none;
|
425 |
-
box-shadow: none;
|
426 |
-
background: transparent;
|
427 |
-
background-image: none;
|
428 |
-
-webkit-appearance: none;
|
429 |
-
font-family: 'Open Sans', arial, sans-serif;
|
430 |
-
color: #555555;
|
431 |
-
font-size: 12px;
|
432 |
-
/*margin-left:5px;*/
|
433 |
-
}
|
434 |
-
|
435 |
-
.quads-pro-overlay{
|
436 |
-
height: 200px;
|
437 |
-
}
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
.quads-license-error-notice,
|
442 |
-
.quads-license-expires-soon-notice {
|
443 |
-
background-color: #fff;
|
444 |
-
padding: 10px;
|
445 |
-
border-left: 4px solid #7ad03a;
|
446 |
-
overflow: auto;
|
447 |
-
-webkit-box-shadow: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 );
|
448 |
-
box-shadow: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 );
|
449 |
-
border: 1px solid #ECECEC;
|
450 |
-
border-radius: 3px;
|
451 |
-
}
|
452 |
-
.quads-license-error-notice a {
|
453 |
-
color: #0097df;
|
454 |
-
text-decoration: underline;
|
455 |
-
}
|
456 |
-
.quads-license-error-notice { border-left: 4px solid #dd3d36; }
|
457 |
-
.quads-license-lifetime-notice,
|
458 |
-
.quads-license-expiration-date-notice,
|
459 |
-
.quads-license-null { padding: 0 0 0 0px; }
|
460 |
-
.quads-license-lifetime-notice .quads-license-data p,
|
461 |
-
.quads-license-expiration-date-notice .quads-license-data p { color: #666; font-size: 14px; font-style: italic; margin: 4px 0 0; }
|
462 |
-
|
463 |
-
#quads_settingslicenses_header-nav{
|
464 |
-
display:none;
|
465 |
-
}
|
466 |
-
|
467 |
-
#quads_settingslicenses_header{
|
468 |
-
max-width:640px;
|
469 |
-
}
|
470 |
-
|
471 |
-
#quads_settingslicenses_header .quads-row.th{
|
472 |
-
min-width:250px;
|
473 |
-
}
|
474 |
-
|
475 |
-
.quads-notice{
|
476 |
-
background: #fff;
|
477 |
-
border-left: 4px solid #46b450;
|
478 |
-
-webkit-box-shadow: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 );
|
479 |
-
box-shadow: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 );
|
480 |
-
margin: 5px 15px 2px;
|
481 |
-
padding: 1px 12px;
|
482 |
-
}
|
483 |
-
|
484 |
-
.quads_admin h2.nav-tab-wrapper{
|
485 |
-
border:0px;
|
486 |
-
}
|
487 |
-
|
488 |
-
.quads_admin .nav-tab{
|
489 |
-
border:0px;
|
490 |
-
text-transform: uppercase;
|
491 |
-
color: #a1a1a1;
|
492 |
-
font-weight: 700;
|
493 |
-
}
|
494 |
-
|
495 |
-
.quads-h1 {
|
496 |
-
font-size: 2.75em;
|
497 |
-
margin-bottom: 1.35rem;
|
498 |
-
font-size: 2.5em;
|
499 |
-
line-height: 3.68rem;
|
500 |
-
letter-spacing: normal;
|
501 |
-
}
|
502 |
-
|
503 |
-
.quads-h2 {
|
504 |
-
margin-top:0px;
|
505 |
-
margin-bottom: 1.2rem;
|
506 |
-
font-size: 30px;
|
507 |
-
line-height: 2.5rem;
|
508 |
-
}
|
509 |
-
|
510 |
-
.quads-heading-pro{
|
511 |
-
color: #83c11f;
|
512 |
-
font-weight: bold;
|
513 |
-
}
|
514 |
-
|
515 |
-
.quads-button.green {
|
516 |
-
display:inline-block;
|
517 |
-
background-color: #83c11f;
|
518 |
-
padding:10px;
|
519 |
-
min-width: 170px;
|
520 |
-
color: white;
|
521 |
-
font-size: 16px;
|
522 |
-
text-decoration: none;
|
523 |
-
text-align:center;
|
524 |
-
margin-top:20px;
|
525 |
-
}
|
526 |
-
|
527 |
-
#quads-add-ons .quads-footer {
|
528 |
-
clear:both;
|
529 |
-
margin-top:20px;
|
530 |
-
font-style: italic;
|
531 |
-
}
|
532 |
-
|
533 |
-
#quads-add-ons li {
|
534 |
-
font-size:18px;
|
535 |
-
line-height: 29px;
|
536 |
-
position: relative;
|
537 |
-
padding-left: 23px;
|
538 |
-
list-style: none!important;
|
539 |
-
}
|
540 |
-
|
541 |
-
#quads-add-ons li:before {
|
542 |
-
width: 1em;
|
543 |
-
height: 100%;
|
544 |
-
background: url(data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%2377B227%22%20d%3D%22M1671%20566q0%2040%2D28%2068l%2D724%20724%2D136%20136q%2D28%2028%2D68%2028t%2D68%2D28l%2D136%2D136%2D362%2D362q%2D28%2D28%2D28%2D68t28%2D68l136%2D136q28%2D28%2068%2D28t68%2028l294%20295%20656%2D657q28%2D28%2068%2D28t68%2028l136%20136q28%2028%2028%2068z%22%2F%3E%3C%2Fsvg%3E) left .4em no-repeat;
|
545 |
-
background-size: contain;
|
546 |
-
content: "";
|
547 |
-
position: absolute;
|
548 |
-
top: 0;
|
549 |
-
left: 0;
|
550 |
-
color: #77b227;
|
551 |
-
}
|
552 |
-
|
553 |
-
.adsense_admin_header {
|
554 |
-
font-size: 14px;
|
555 |
-
font-weight: 500;
|
556 |
-
}
|
557 |
-
|
558 |
-
#quads-adsense-bg-div{
|
559 |
-
position: fixed;
|
560 |
-
top: 0;
|
561 |
-
left: 0;
|
562 |
-
width: 100%;
|
563 |
-
height: 100%;
|
564 |
-
background-color: rgba(0, 0, 0, 0.65);
|
565 |
-
z-index: 250000;
|
566 |
-
}
|
567 |
-
|
568 |
-
#quads-adsense-container {
|
569 |
-
text-align: center;
|
570 |
-
width: 480px;
|
571 |
-
margin: 85px auto 0 auto;
|
572 |
-
background-color: #fff;
|
573 |
-
padding: 2%;
|
574 |
-
border-radius: 2px;
|
575 |
-
}
|
576 |
-
#quads-adsense-container h3{
|
577 |
-
margin-top:0px;
|
578 |
-
}
|
579 |
-
|
580 |
-
#quads-adsense-container textarea{
|
581 |
-
width: 100%;
|
582 |
-
}
|
583 |
-
|
584 |
-
|
585 |
-
.quads-ad-toggle-container textarea{
|
586 |
-
width: 100%;
|
587 |
-
}
|
588 |
-
|
589 |
-
.quads-ad-toggle-container input{
|
590 |
-
margin-top: 7px;
|
591 |
-
margin-bottom:10px;
|
592 |
-
}
|
593 |
-
|
594 |
-
.quads-adsense-code label, input{
|
595 |
-
margin-right:2px;
|
596 |
-
}
|
597 |
-
|
598 |
-
#quads_settings\5b ad2\5d \5b g_data_ad_client\5d {
|
599 |
-
width:200px;
|
600 |
-
}
|
601 |
-
|
602 |
-
.quads-ad-toggle-container label {
|
603 |
-
display: inline-block;
|
604 |
-
margin-right:2px;
|
605 |
-
margin-top:-3px;
|
606 |
-
}
|
607 |
-
|
608 |
-
/*.quads-adsense-code > label:nth-child(1){
|
609 |
-
min-width: 74px;
|
610 |
-
}*/
|
611 |
-
|
612 |
-
.quads_adsense_code .quads-add-adsense {
|
613 |
-
margin:20px;
|
614 |
-
margin-left:0px;
|
615 |
-
margin-right:5px;
|
616 |
-
}
|
617 |
-
|
618 |
-
.quads-label-left {
|
619 |
-
min-width: 71px;
|
620 |
-
}
|
621 |
-
|
622 |
-
#quads-label-Type {
|
623 |
-
min-width: 67px;
|
624 |
-
}
|
625 |
-
|
626 |
-
.quads-medium-size{
|
627 |
-
width: 110px;
|
628 |
-
}
|
629 |
-
|
630 |
-
#quads-msg{
|
631 |
-
display:none;
|
632 |
-
margin: 5px;
|
633 |
-
background-color: #c55c5c;
|
634 |
-
color: white;
|
635 |
-
}
|
636 |
-
|
637 |
-
.quads-success-modal {
|
638 |
-
display: block;
|
639 |
-
position: fixed;
|
640 |
-
top: 45%;
|
641 |
-
left: 25%;
|
642 |
-
width: 200px;
|
643 |
-
height: auto;
|
644 |
-
padding: 5px 20px;
|
645 |
-
z-index:1002;
|
646 |
-
overflow: auto;
|
647 |
-
}
|
648 |
-
.quads-loader {
|
649 |
-
display: block;
|
650 |
-
position: fixed;
|
651 |
-
top: 45%;
|
652 |
-
left: 25%;
|
653 |
-
width: 200px;
|
654 |
-
height: auto;
|
655 |
-
padding: 5px 20px;
|
656 |
-
z-index:1002;
|
657 |
-
overflow: auto;
|
658 |
-
}
|
659 |
-
|
660 |
-
.quads-form-table{
|
661 |
-
width: 100%;
|
662 |
-
}
|
663 |
-
|
664 |
-
.quads-left-box{
|
665 |
-
width:45%;
|
666 |
-
min-height:100px;
|
667 |
-
float:left;
|
668 |
-
line-height: 35px;
|
669 |
-
min-width: 300px;
|
670 |
-
}
|
671 |
-
|
672 |
-
@media screen and (max-width:700px){
|
673 |
-
.adsense-size-title {
|
674 |
-
margin-left: 0px;
|
675 |
-
}
|
676 |
-
.quads-left-box{
|
677 |
-
width:45%;
|
678 |
-
min-height:100px;
|
679 |
-
float:none;
|
680 |
-
line-height: 35px;
|
681 |
-
min-width: 300px;
|
682 |
-
}
|
683 |
-
|
684 |
-
.quads-style img{
|
685 |
-
max-width: 50px;
|
686 |
-
}
|
687 |
-
|
688 |
-
}
|
689 |
-
|
690 |
-
.adsense_admin_header ul li{
|
691 |
-
margin-top:2px;
|
692 |
-
margin-left:20px;
|
693 |
-
list-style-type: square;
|
694 |
-
}
|
695 |
-
|
696 |
-
.quads-helper {
|
697 |
-
border-radius: 50%;
|
698 |
-
border: 2px solid #fff;
|
699 |
-
background-color: #83c11f;
|
700 |
-
width: 15px;
|
701 |
-
height: 15px;
|
702 |
-
display: inline-block;
|
703 |
-
position: relative;
|
704 |
-
top: 4px;
|
705 |
-
margin-top: -4px;
|
706 |
-
cursor: pointer;
|
707 |
-
margin-left: 2px;
|
708 |
-
}
|
709 |
-
|
710 |
-
.quads-helper:after {
|
711 |
-
height: 20px;
|
712 |
-
font-family: sans-serif;
|
713 |
-
content: "?";
|
714 |
-
color: #fff;
|
715 |
-
font-size: 11px;
|
716 |
-
font-weight: bold;
|
717 |
-
left: 4px;
|
718 |
-
position: absolute;
|
719 |
-
margin-top: -10px;
|
720 |
-
}
|
721 |
-
|
722 |
-
.quads-general-helper:after {
|
723 |
-
height: 20px;
|
724 |
-
font-family: sans-serif;
|
725 |
-
content: "?";
|
726 |
-
color: #fff;
|
727 |
-
font-size: 11px;
|
728 |
-
font-weight: bold;
|
729 |
-
left: 4px;
|
730 |
-
position: absolute;
|
731 |
-
margin-top: -2px;
|
732 |
-
}
|
733 |
-
.quads-general-helper {
|
734 |
-
border-radius: 50%;
|
735 |
-
border: 2px solid #fff;
|
736 |
-
background-color: #83c11f;
|
737 |
-
width: 15px;
|
738 |
-
height: 15px;
|
739 |
-
display: inline-block;
|
740 |
-
position: relative;
|
741 |
-
top: 4px;
|
742 |
-
margin-top: -4px;
|
743 |
-
cursor: pointer;
|
744 |
-
margin-left: 2px;
|
745 |
-
}
|
746 |
-
|
747 |
-
.quads-message{
|
748 |
-
display:block;
|
749 |
-
padding: 10px;
|
750 |
-
border: 1px solid #FBFBFB;
|
751 |
-
border-radius: 2px;
|
752 |
-
background-color: #F8F8F8;
|
753 |
-
position: absolute;
|
754 |
-
max-width: 500px;
|
755 |
-
z-index: 9999;
|
756 |
-
display: none;
|
757 |
-
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
|
758 |
-
font-weight: normal;
|
759 |
-
line-height: 20px;
|
760 |
-
text-transform: none;
|
761 |
-
font-size: 14px;
|
762 |
-
}
|
763 |
-
|
764 |
-
#quads-pro-hover{
|
765 |
-
background-color: #83c11f;
|
766 |
-
padding:20px;
|
767 |
-
min-width: 150px;
|
768 |
-
color:white;
|
769 |
-
display: block;
|
770 |
-
position: relative;
|
771 |
-
margin-top: -100px;
|
772 |
-
margin-left: 50%;
|
773 |
-
}
|
774 |
-
|
775 |
-
#quads-pro-hover-background{
|
776 |
-
width: 100%; height:100%;background:rgba(0,0,0,0.6);
|
777 |
-
}
|
778 |
-
|
779 |
-
#quads-open-toggle{
|
780 |
-
clear: both;
|
781 |
-
float:left;
|
782 |
-
margin-top:10px;
|
783 |
-
}
|
784 |
-
|
785 |
-
#quads_settingsadsense_header input[type="number"].small-text{
|
786 |
-
width: 55px;
|
787 |
-
}
|
788 |
-
|
789 |
-
.quads_adsense_code input.quads-bggrey {
|
790 |
-
background-color: whitesmoke;
|
791 |
-
color: #939393;
|
792 |
-
}
|
793 |
-
|
794 |
-
.quads-amp-code{
|
795 |
-
color: #939393;
|
796 |
-
height: 130px;
|
797 |
-
}
|
798 |
-
|
799 |
-
.quads-chosen-select .chosen-choices li.search-field input{
|
800 |
-
min-height: 25px;
|
801 |
-
}
|
802 |
-
|
803 |
-
|
804 |
-
#quads-validate{
|
805 |
-
display: block;
|
806 |
-
margin-left: 2px;
|
807 |
-
margin-bottom: 20px;
|
808 |
-
font-weight: bold;
|
809 |
-
clear: both;
|
810 |
-
}
|
811 |
-
|
812 |
-
@font-face {
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
}
|
817 |
-
#quads-add-new-ad:before {
|
818 |
-
font-family: 'quads';
|
819 |
-
content: '\e801';
|
820 |
-
text-decoration: none;
|
821 |
-
margin-right:5px;
|
822 |
-
color: #383838;
|
823 |
-
}
|
824 |
-
|
825 |
-
#quads-add-new-ad{
|
826 |
-
margin-left: 3px;
|
827 |
-
margin-top: 5px;
|
828 |
-
display: block;
|
829 |
-
margin-bottom: 20px;
|
830 |
-
text-decoration: none;
|
831 |
-
font-size: 14px;
|
832 |
-
font-weight: 600;
|
833 |
-
color: #383838;
|
834 |
-
}
|
835 |
-
|
836 |
-
#quads-submit-button{
|
837 |
-
z-index: 999999;
|
838 |
-
}
|
839 |
-
|
840 |
-
p.submit{
|
841 |
-
float:left;
|
842 |
-
padding-top:0px;
|
843 |
-
padding-bottom:0px;
|
844 |
-
}
|
845 |
-
|
846 |
-
.quads-delete-ad{
|
847 |
-
clear:both;
|
848 |
-
display:block;
|
849 |
-
//background: url('../images/remove-icon.png');
|
850 |
-
//background-size: 20px 20px;
|
851 |
-
//background-repeat: no-repeat;
|
852 |
-
//height: 20px;
|
853 |
-
//padding-left:30px;
|
854 |
-
margin-right:5px;
|
855 |
-
font-size: 14px;
|
856 |
-
font-weight: 600;
|
857 |
-
text-decoration: none;
|
858 |
-
color: #383838;
|
859 |
-
}
|
860 |
-
.quads-delete-ad:before{
|
861 |
-
font-family: 'quads';
|
862 |
-
content: '\e800';
|
863 |
-
margin-right:5px;
|
864 |
-
color: #383838;
|
865 |
-
}
|
866 |
-
|
867 |
-
#backup-settings-textarea{
|
868 |
-
width: 580px;
|
869 |
-
height: 400px;
|
870 |
-
font-family: Menlo, Monaco, monospace;
|
871 |
-
background: none;
|
872 |
-
white-space: normal;
|
873 |
-
overflow: auto;
|
874 |
-
display: block;
|
875 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* QUADS Admin CSS
|
3 |
+
*
|
4 |
+
* @package QUADS
|
5 |
+
* @subpackage Admin CSS
|
6 |
+
* @copyright Copyright (c) 2015, René Hermenau
|
7 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
8 |
+
*/
|
9 |
+
|
10 |
+
.quads-share-button-container{
|
11 |
+
margin: 5px 0;
|
12 |
+
}
|
13 |
+
|
14 |
+
.quads-share-button-container p{
|
15 |
+
margin:0px 0 10px 0;
|
16 |
+
}
|
17 |
+
|
18 |
+
.quads-share-button {
|
19 |
+
display: inline-block;
|
20 |
+
}
|
21 |
+
|
22 |
+
.quads-share-button a{
|
23 |
+
text-decoration:none;
|
24 |
+
}
|
25 |
+
|
26 |
+
.quads-share-button .quads-share {
|
27 |
+
font-family:sans-serif;
|
28 |
+
font-weight:bold;
|
29 |
+
text-decoration:none;
|
30 |
+
text-align:center;
|
31 |
+
}
|
32 |
+
|
33 |
+
|
34 |
+
.quads-share-button .quads-share {
|
35 |
+
-webkit-border-radius:2px;
|
36 |
+
-moz-border-radius:2px;
|
37 |
+
border-radius:2px;
|
38 |
+
color:#FFF;
|
39 |
+
display:inline;
|
40 |
+
font-size:16px;
|
41 |
+
width:40px;
|
42 |
+
padding:4px 8px;
|
43 |
+
}
|
44 |
+
|
45 |
+
.quads-share-button-twitter .quads-share {
|
46 |
+
background-color:#00ABF0;
|
47 |
+
}
|
48 |
+
|
49 |
+
.quads-share-button-facebook .quads-share {
|
50 |
+
background-color:#3b5998;
|
51 |
+
}
|
52 |
+
|
53 |
+
.quads-share-button-googleplus .quads-share {
|
54 |
+
background-color:#F53424;
|
55 |
+
}
|
56 |
+
|
57 |
+
.quads-share-button-twitter .share:active,.quads-share-button-facebook .share:active,.quads-share-button-googleplus .share:active {
|
58 |
+
background-color:#353535;
|
59 |
+
}
|
60 |
+
|
61 |
+
/* Responsive */
|
62 |
+
@media (max-width: 925px) {
|
63 |
+
.quads-share-button .quads-share{
|
64 |
+
font-size:15px;
|
65 |
+
padding: 8px 16px; /* Double the padding */
|
66 |
+
}
|
67 |
+
|
68 |
+
}
|
69 |
+
|
70 |
+
|
71 |
+
/* Input forms */
|
72 |
+
/*.quads-textarea{
|
73 |
+
font-size:11px;
|
74 |
+
}*/
|
75 |
+
.quads-richeditor{
|
76 |
+
font-size:11px;
|
77 |
+
}
|
78 |
+
|
79 |
+
|
80 |
+
|
81 |
+
/* =Add Ons Styles
|
82 |
+
-------------------------------------------------------------- */
|
83 |
+
#quads-add-ons h2 { margin: 0 0 15px; }
|
84 |
+
#quads-add-ons .quadsshare-addons { float: left; margin: 0 15px 15px 0; background: #f0f0f0; border: 1px solid #ccc; width: 320px; padding: 8px; height: 315px; position: relative; }
|
85 |
+
#quads-add-ons .quadsshare-addons h3 { margin: 0 0 8px; font-size: 13px; }
|
86 |
+
#quads-add-ons .quadsshare-addons .button-secondary { position: absolute; bottom: 8px; left: 8px; }
|
87 |
+
/*#quads-add-ons .quadsshare-addons { clear:both; width:100%; }*/
|
88 |
+
#quads-add-ons .quadsshare-addons .third-party { display: none; }
|
89 |
+
|
90 |
+
|
91 |
+
/* System Info page styles
|
92 |
+
-------------------------------------------------------------- */
|
93 |
+
#system-info-textarea { width: 580px; height: 400px; font-family: Menlo, Monaco, monospace; background: none; white-space: pre; overflow: auto; display: block; }
|
94 |
+
|
95 |
+
|
96 |
+
/* General styles
|
97 |
+
-------------------------------------------------------------- */
|
98 |
+
.quads-select-chosen { width: 300px; }
|
99 |
+
|
100 |
+
input.large-text, textarea.large-text {
|
101 |
+
max-width: 600px;
|
102 |
+
}
|
103 |
+
input.medium-text, textarea.medium-text {
|
104 |
+
min-width: 190px;
|
105 |
+
}
|
106 |
+
|
107 |
+
/* CSS for Tabs */
|
108 |
+
|
109 |
+
#quads_tab_container ul {
|
110 |
+
/*height: 200px;*/
|
111 |
+
list-style: none;
|
112 |
+
margin: 0;
|
113 |
+
padding: 0;
|
114 |
+
background: #fff;
|
115 |
+
float: left;
|
116 |
+
padding-top: 0px;
|
117 |
+
/*list-style-type: square;*/
|
118 |
+
}
|
119 |
+
|
120 |
+
#quads_tab_container ul li:first-child.selected-tab {
|
121 |
+
border-top: none;
|
122 |
+
}
|
123 |
+
|
124 |
+
#quads_tab_container ul li a.selected-tab {
|
125 |
+
font-weight: bold;
|
126 |
+
text-decoration: none;
|
127 |
+
}
|
128 |
+
|
129 |
+
|
130 |
+
|
131 |
+
#quads_tab_container .quads-row{
|
132 |
+
padding-top:12px;
|
133 |
+
padding-bottom:12px;
|
134 |
+
}
|
135 |
+
|
136 |
+
|
137 |
+
#quads_tab_container .quads-row label strong, #tab_container .quads-row strong {
|
138 |
+
font-weight: bold;
|
139 |
+
}
|
140 |
+
|
141 |
+
.quads-tabs a {
|
142 |
+
padding:5px;
|
143 |
+
color:#a1a1a1;
|
144 |
+
text-transform: uppercase;
|
145 |
+
}
|
146 |
+
.quads-tabs a strong {
|
147 |
+
font-weight: 700;
|
148 |
+
}
|
149 |
+
|
150 |
+
li.quads-tabs {
|
151 |
+
float:left;
|
152 |
+
margin-left:0px;
|
153 |
+
background-color: #e5e5e5;
|
154 |
+
}
|
155 |
+
|
156 |
+
/*@media only screen and (min-width:400px) {
|
157 |
+
li.quads-tabs {
|
158 |
+
float:left;
|
159 |
+
margin-left:14px;
|
160 |
+
}
|
161 |
+
}*/
|
162 |
+
|
163 |
+
#quads_tab_container > ul > li.quads-tabs.active {
|
164 |
+
background-color:#fff;
|
165 |
+
}
|
166 |
+
#quads_tab_container > ul > li.quads-tabs.active a {
|
167 |
+
color: #83c11f;
|
168 |
+
}
|
169 |
+
|
170 |
+
|
171 |
+
|
172 |
+
/* Layout of admin table and rows
|
173 |
+
*/
|
174 |
+
|
175 |
+
|
176 |
+
#quads_tab_container .quads-panel-container {
|
177 |
+
background: #FFF;
|
178 |
+
padding:20px;
|
179 |
+
overflow:auto;
|
180 |
+
text-align:left;
|
181 |
+
margin-bottom:10px;
|
182 |
+
max-width: 640px;
|
183 |
+
float: left;
|
184 |
+
clear:both;
|
185 |
+
}
|
186 |
+
|
187 |
+
.form-table{
|
188 |
+
margin-top:-20px;
|
189 |
+
}
|
190 |
+
|
191 |
+
#quads_tab_container .form-table th {
|
192 |
+
vertical-align: top;
|
193 |
+
text-align: left;
|
194 |
+
padding: 20px 10px 20px 0;
|
195 |
+
width: 200px;
|
196 |
+
line-height: 1.3;
|
197 |
+
font-weight: bold;
|
198 |
+
font-size: 14px;
|
199 |
+
color:#484848;
|
200 |
+
width: 30%;
|
201 |
+
}
|
202 |
+
|
203 |
+
/*#quads_tab_container .form-table tr{
|
204 |
+
padding:0px;
|
205 |
+
}*/
|
206 |
+
|
207 |
+
#quads_tab_container .form-table tr {
|
208 |
+
border-bottom: 1px solid #E7E7E7;
|
209 |
+
}
|
210 |
+
|
211 |
+
#quads_tab_container span.description{
|
212 |
+
display: block;
|
213 |
+
font-weight: 400;
|
214 |
+
font-style: normal;
|
215 |
+
font-size: 13px;
|
216 |
+
margin-top: 7px;
|
217 |
+
color:#484848;
|
218 |
+
}
|
219 |
+
|
220 |
+
#quads_tab_container .col-title{
|
221 |
+
font-size: 18px;
|
222 |
+
color:#484848;
|
223 |
+
}
|
224 |
+
|
225 |
+
@media only screen and (max-width:680px) {
|
226 |
+
#quads_tab_container ul {
|
227 |
+
float:none;
|
228 |
+
background: #fff;
|
229 |
+
}
|
230 |
+
#quads_tab_container .form-table tr > th {
|
231 |
+
width:100%;
|
232 |
+
}
|
233 |
+
#quads_tab_container span.description{
|
234 |
+
font-size: 14px;
|
235 |
+
}
|
236 |
+
#quads_tab_container .form-table tr > th, #tab_container .form-table tr > td {
|
237 |
+
padding:10px;
|
238 |
+
}
|
239 |
+
#quads_tab_container .quads-tabs a{
|
240 |
+
text-align: left;
|
241 |
+
}
|
242 |
+
#quads_tab_container li.quads-tabs {
|
243 |
+
float:none;
|
244 |
+
margin-left:0px;
|
245 |
+
}
|
246 |
+
}
|
247 |
+
|
248 |
+
#quads_tab_container ul li.quads-tabs {
|
249 |
+
margin-bottom:0px;
|
250 |
+
}
|
251 |
+
|
252 |
+
#quads_tab_container ul li.quads-tabs a {
|
253 |
+
display: block;
|
254 |
+
padding:10px 10px 10px 10px;
|
255 |
+
text-decoration: none;
|
256 |
+
font-weight: bold;
|
257 |
+
}
|
258 |
+
#quads_tab_container ul li.quads-tabs a:hover {
|
259 |
+
color:#383838;
|
260 |
+
}
|
261 |
+
#quads_tab_container ul li.quads-tabs a.active {
|
262 |
+
text-decoration: underline;
|
263 |
+
}
|
264 |
+
|
265 |
+
|
266 |
+
#quads_tab_container table tbody tr:nth-child(1) > th > div {
|
267 |
+
font-size: 20px;
|
268 |
+
}
|
269 |
+
|
270 |
+
|
271 |
+
|
272 |
+
/* End layout of admin table and rows
|
273 |
+
*/
|
274 |
+
#quadstabcontainer > .quadstabs {
|
275 |
+
background-color: #ffffff;
|
276 |
+
}
|
277 |
+
|
278 |
+
#quadstabcontainer ul .active {
|
279 |
+
background-color: #00adef;
|
280 |
+
color: white;
|
281 |
+
border-bottom-color: #0098D2;
|
282 |
+
}
|
283 |
+
|
284 |
+
#quadstabcontainer ul .active:hover {
|
285 |
+
background-color: #00A4E2;
|
286 |
+
color: white;
|
287 |
+
border-bottom-color: #0098D2;
|
288 |
+
}
|
289 |
+
|
290 |
+
#quadstabcontainer ul li a {
|
291 |
+
padding: 10px 14px 10px 14px;
|
292 |
+
background-color: #f3f3f3
|
293 |
+
|
294 |
+
}
|
295 |
+
|
296 |
+
#quadstabcontainer .quadstab-container {
|
297 |
+
border: 0px solid #ececec;
|
298 |
+
}
|
299 |
+
|
300 |
+
.quads-quote-docs {
|
301 |
+
font-family:Courier New,Courier,Fixed;
|
302 |
+
color:#050;
|
303 |
+
}
|
304 |
+
|
305 |
+
.quads-desc{
|
306 |
+
display:block;
|
307 |
+
font-style:italic;
|
308 |
+
padding-top:10px;
|
309 |
+
}
|
310 |
+
|
311 |
+
.quads-postbox {
|
312 |
+
padding:10px;
|
313 |
+
position: relative;
|
314 |
+
min-width: 255px;
|
315 |
+
border: 1px solid #e5e5e5;
|
316 |
+
-webkit-box-shadow: 0 1px 1px rgba(0,0,0,0.04);
|
317 |
+
box-shadow: 0 1px 1px rgba(0,0,0,0.04);
|
318 |
+
background: #fff;
|
319 |
+
margin-bottom:20px;
|
320 |
+
}
|
321 |
+
|
322 |
+
.nav-tab-active{
|
323 |
+
background-color: white;
|
324 |
+
border-bottom:0px;
|
325 |
+
}
|
326 |
+
|
327 |
+
/*.wp-admin .quads-align-input{
|
328 |
+
padding: 0px;
|
329 |
+
line-height: 23px;
|
330 |
+
height: 24px;
|
331 |
+
vertical-align: top;
|
332 |
+
}*/
|
333 |
+
|
334 |
+
|
335 |
+
#quads-add-ons {
|
336 |
+
padding: 20px;
|
337 |
+
}
|
338 |
+
.quads-toggle {
|
339 |
+
position: absolute;
|
340 |
+
right: 0px;
|
341 |
+
top: 0px;
|
342 |
+
}
|
343 |
+
|
344 |
+
.quads-box-close .quads-close-open-icon {
|
345 |
+
background-position: 0px -38px;
|
346 |
+
}
|
347 |
+
|
348 |
+
.quads-close-open-icon {
|
349 |
+
width: 38px;
|
350 |
+
height: 38px;
|
351 |
+
background: #f4f4f4 url("../images/arrow-close.png") repeat-y;
|
352 |
+
background-position: 0px 0px;
|
353 |
+
}
|
354 |
+
.quads-ad-toggle-header {
|
355 |
+
position: relative;
|
356 |
+
background-color: #f4f4f4;
|
357 |
+
margin-bottom: 2px;
|
358 |
+
padding: 10px 10px 10px 15px;
|
359 |
+
-moz-user-select: -moz-none;
|
360 |
+
-khtml-user-select: none;
|
361 |
+
-webkit-user-select: none;
|
362 |
+
-o-user-select: none;
|
363 |
+
user-select: none;
|
364 |
+
cursor: pointer !important;
|
365 |
+
min-height: 20px;
|
366 |
+
}
|
367 |
+
|
368 |
+
.quads-ad-toggle-container{
|
369 |
+
padding:20px;
|
370 |
+
background-color: #f4f4f4;
|
371 |
+
}
|
372 |
+
|
373 |
+
.quads-toogle-title{
|
374 |
+
font-size:16px;
|
375 |
+
font-weight: bold;
|
376 |
+
}
|
377 |
+
|
378 |
+
.quads-advanced-description label{
|
379 |
+
float:left;
|
380 |
+
width:215px;
|
381 |
+
font-size: 12px;
|
382 |
+
font-weight: 600;
|
383 |
+
text-transform: uppercase;
|
384 |
+
}
|
385 |
+
|
386 |
+
.quads-advanced-ad-box{
|
387 |
+
clear: both;
|
388 |
+
margin-top:20px;
|
389 |
+
margin-bottom:20px;
|
390 |
+
}
|
391 |
+
|
392 |
+
|
393 |
+
|
394 |
+
.adsense-size-title {
|
395 |
+
margin-right: 0px;
|
396 |
+
float: left;
|
397 |
+
line-height: 32px;
|
398 |
+
margin-left: 14px;
|
399 |
+
min-width: 100px;
|
400 |
+
font-weight: 600;
|
401 |
+
font-size: 12px;
|
402 |
+
text-transform: uppercase;
|
403 |
+
}
|
404 |
+
|
405 |
+
.quads-select-style-overwrite {
|
406 |
+
border: 1px solid #e6e6e6;
|
407 |
+
width: 150px;
|
408 |
+
overflow: hidden;
|
409 |
+
background: #ffffff url("../images/box_arrow.png") repeat-y 120px 0px;
|
410 |
+
margin: 0px 0px 5px 0px;
|
411 |
+
}
|
412 |
+
.quads-select-style-overwrite select {
|
413 |
+
width:150px;
|
414 |
+
}
|
415 |
+
|
416 |
+
/*.quads-select{
|
417 |
+
max-width:100px;
|
418 |
+
}*/
|
419 |
+
|
420 |
+
.quads-size-input {
|
421 |
+
position: relative;
|
422 |
+
top: -1px;
|
423 |
+
width: 110%;
|
424 |
+
border: none;
|
425 |
+
box-shadow: none;
|
426 |
+
background: transparent;
|
427 |
+
background-image: none;
|
428 |
+
-webkit-appearance: none;
|
429 |
+
font-family: 'Open Sans', arial, sans-serif;
|
430 |
+
color: #555555;
|
431 |
+
font-size: 12px;
|
432 |
+
/*margin-left:5px;*/
|
433 |
+
}
|
434 |
+
|
435 |
+
.quads-pro-overlay{
|
436 |
+
height: 200px;
|
437 |
+
}
|
438 |
+
|
439 |
+
|
440 |
+
|
441 |
+
.quads-license-error-notice,
|
442 |
+
.quads-license-expires-soon-notice {
|
443 |
+
background-color: #fff;
|
444 |
+
padding: 10px;
|
445 |
+
border-left: 4px solid #7ad03a;
|
446 |
+
overflow: auto;
|
447 |
+
-webkit-box-shadow: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 );
|
448 |
+
box-shadow: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 );
|
449 |
+
border: 1px solid #ECECEC;
|
450 |
+
border-radius: 3px;
|
451 |
+
}
|
452 |
+
.quads-license-error-notice a {
|
453 |
+
color: #0097df;
|
454 |
+
text-decoration: underline;
|
455 |
+
}
|
456 |
+
.quads-license-error-notice { border-left: 4px solid #dd3d36; }
|
457 |
+
.quads-license-lifetime-notice,
|
458 |
+
.quads-license-expiration-date-notice,
|
459 |
+
.quads-license-null { padding: 0 0 0 0px; }
|
460 |
+
.quads-license-lifetime-notice .quads-license-data p,
|
461 |
+
.quads-license-expiration-date-notice .quads-license-data p { color: #666; font-size: 14px; font-style: italic; margin: 4px 0 0; }
|
462 |
+
|
463 |
+
#quads_settingslicenses_header-nav{
|
464 |
+
display:none;
|
465 |
+
}
|
466 |
+
|
467 |
+
#quads_settingslicenses_header{
|
468 |
+
max-width:640px;
|
469 |
+
}
|
470 |
+
|
471 |
+
#quads_settingslicenses_header .quads-row.th{
|
472 |
+
min-width:250px;
|
473 |
+
}
|
474 |
+
|
475 |
+
.quads-notice{
|
476 |
+
background: #fff;
|
477 |
+
border-left: 4px solid #46b450;
|
478 |
+
-webkit-box-shadow: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 );
|
479 |
+
box-shadow: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 );
|
480 |
+
margin: 5px 15px 2px;
|
481 |
+
padding: 1px 12px;
|
482 |
+
}
|
483 |
+
|
484 |
+
.quads_admin h2.nav-tab-wrapper{
|
485 |
+
border:0px;
|
486 |
+
}
|
487 |
+
|
488 |
+
.quads_admin .nav-tab{
|
489 |
+
border:0px;
|
490 |
+
text-transform: uppercase;
|
491 |
+
color: #a1a1a1;
|
492 |
+
font-weight: 700;
|
493 |
+
}
|
494 |
+
|
495 |
+
.quads-h1 {
|
496 |
+
font-size: 2.75em;
|
497 |
+
margin-bottom: 1.35rem;
|
498 |
+
font-size: 2.5em;
|
499 |
+
line-height: 3.68rem;
|
500 |
+
letter-spacing: normal;
|
501 |
+
}
|
502 |
+
|
503 |
+
.quads-h2 {
|
504 |
+
margin-top:0px;
|
505 |
+
margin-bottom: 1.2rem;
|
506 |
+
font-size: 30px;
|
507 |
+
line-height: 2.5rem;
|
508 |
+
}
|
509 |
+
|
510 |
+
.quads-heading-pro{
|
511 |
+
color: #83c11f;
|
512 |
+
font-weight: bold;
|
513 |
+
}
|
514 |
+
|
515 |
+
.quads-button.green {
|
516 |
+
display:inline-block;
|
517 |
+
background-color: #83c11f;
|
518 |
+
padding:10px;
|
519 |
+
min-width: 170px;
|
520 |
+
color: white;
|
521 |
+
font-size: 16px;
|
522 |
+
text-decoration: none;
|
523 |
+
text-align:center;
|
524 |
+
margin-top:20px;
|
525 |
+
}
|
526 |
+
|
527 |
+
#quads-add-ons .quads-footer {
|
528 |
+
clear:both;
|
529 |
+
margin-top:20px;
|
530 |
+
font-style: italic;
|
531 |
+
}
|
532 |
+
|
533 |
+
#quads-add-ons li {
|
534 |
+
font-size:18px;
|
535 |
+
line-height: 29px;
|
536 |
+
position: relative;
|
537 |
+
padding-left: 23px;
|
538 |
+
list-style: none!important;
|
539 |
+
}
|
540 |
+
|
541 |
+
#quads-add-ons li:before {
|
542 |
+
width: 1em;
|
543 |
+
height: 100%;
|
544 |
+
background: url(data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%2377B227%22%20d%3D%22M1671%20566q0%2040%2D28%2068l%2D724%20724%2D136%20136q%2D28%2028%2D68%2028t%2D68%2D28l%2D136%2D136%2D362%2D362q%2D28%2D28%2D28%2D68t28%2D68l136%2D136q28%2D28%2068%2D28t68%2028l294%20295%20656%2D657q28%2D28%2068%2D28t68%2028l136%20136q28%2028%2028%2068z%22%2F%3E%3C%2Fsvg%3E) left .4em no-repeat;
|
545 |
+
background-size: contain;
|
546 |
+
content: "";
|
547 |
+
position: absolute;
|
548 |
+
top: 0;
|
549 |
+
left: 0;
|
550 |
+
color: #77b227;
|
551 |
+
}
|
552 |
+
|
553 |
+
.adsense_admin_header {
|
554 |
+
font-size: 14px;
|
555 |
+
font-weight: 500;
|
556 |
+
}
|
557 |
+
|
558 |
+
#quads-adsense-bg-div{
|
559 |
+
position: fixed;
|
560 |
+
top: 0;
|
561 |
+
left: 0;
|
562 |
+
width: 100%;
|
563 |
+
height: 100%;
|
564 |
+
background-color: rgba(0, 0, 0, 0.65);
|
565 |
+
z-index: 250000;
|
566 |
+
}
|
567 |
+
|
568 |
+
#quads-adsense-container {
|
569 |
+
text-align: center;
|
570 |
+
width: 480px;
|
571 |
+
margin: 85px auto 0 auto;
|
572 |
+
background-color: #fff;
|
573 |
+
padding: 2%;
|
574 |
+
border-radius: 2px;
|
575 |
+
}
|
576 |
+
#quads-adsense-container h3{
|
577 |
+
margin-top:0px;
|
578 |
+
}
|
579 |
+
|
580 |
+
#quads-adsense-container textarea{
|
581 |
+
width: 100%;
|
582 |
+
}
|
583 |
+
|
584 |
+
|
585 |
+
.quads-ad-toggle-container textarea{
|
586 |
+
width: 100%;
|
587 |
+
}
|
588 |
+
|
589 |
+
.quads-ad-toggle-container input{
|
590 |
+
margin-top: 7px;
|
591 |
+
margin-bottom:10px;
|
592 |
+
}
|
593 |
+
|
594 |
+
.quads-adsense-code label, input{
|
595 |
+
margin-right:2px;
|
596 |
+
}
|
597 |
+
|
598 |
+
#quads_settings\5b ad2\5d \5b g_data_ad_client\5d {
|
599 |
+
width:200px;
|
600 |
+
}
|
601 |
+
|
602 |
+
.quads-ad-toggle-container label {
|
603 |
+
display: inline-block;
|
604 |
+
margin-right:2px;
|
605 |
+
margin-top:-3px;
|
606 |
+
}
|
607 |
+
|
608 |
+
/*.quads-adsense-code > label:nth-child(1){
|
609 |
+
min-width: 74px;
|
610 |
+
}*/
|
611 |
+
|
612 |
+
.quads_adsense_code .quads-add-adsense {
|
613 |
+
margin:20px;
|
614 |
+
margin-left:0px;
|
615 |
+
margin-right:5px;
|
616 |
+
}
|
617 |
+
|
618 |
+
.quads-label-left {
|
619 |
+
min-width: 71px;
|
620 |
+
}
|
621 |
+
|
622 |
+
#quads-label-Type {
|
623 |
+
min-width: 67px;
|
624 |
+
}
|
625 |
+
|
626 |
+
.quads-medium-size{
|
627 |
+
width: 110px;
|
628 |
+
}
|
629 |
+
|
630 |
+
#quads-msg{
|
631 |
+
display:none;
|
632 |
+
margin: 5px;
|
633 |
+
background-color: #c55c5c;
|
634 |
+
color: white;
|
635 |
+
}
|
636 |
+
|
637 |
+
.quads-success-modal {
|
638 |
+
display: block;
|
639 |
+
position: fixed;
|
640 |
+
top: 45%;
|
641 |
+
left: 25%;
|
642 |
+
width: 200px;
|
643 |
+
height: auto;
|
644 |
+
padding: 5px 20px;
|
645 |
+
z-index:1002;
|
646 |
+
overflow: auto;
|
647 |
+
}
|
648 |
+
.quads-loader {
|
649 |
+
display: block;
|
650 |
+
position: fixed;
|
651 |
+
top: 45%;
|
652 |
+
left: 25%;
|
653 |
+
width: 200px;
|
654 |
+
height: auto;
|
655 |
+
padding: 5px 20px;
|
656 |
+
z-index:1002;
|
657 |
+
overflow: auto;
|
658 |
+
}
|
659 |
+
|
660 |
+
.quads-form-table{
|
661 |
+
width: 100%;
|
662 |
+
}
|
663 |
+
|
664 |
+
.quads-left-box{
|
665 |
+
width:45%;
|
666 |
+
min-height:100px;
|
667 |
+
float:left;
|
668 |
+
line-height: 35px;
|
669 |
+
min-width: 300px;
|
670 |
+
}
|
671 |
+
|
672 |
+
@media screen and (max-width:700px){
|
673 |
+
.adsense-size-title {
|
674 |
+
margin-left: 0px;
|
675 |
+
}
|
676 |
+
.quads-left-box{
|
677 |
+
width:45%;
|
678 |
+
min-height:100px;
|
679 |
+
float:none;
|
680 |
+
line-height: 35px;
|
681 |
+
min-width: 300px;
|
682 |
+
}
|
683 |
+
|
684 |
+
.quads-style img{
|
685 |
+
max-width: 50px;
|
686 |
+
}
|
687 |
+
|
688 |
+
}
|
689 |
+
|
690 |
+
.adsense_admin_header ul li{
|
691 |
+
margin-top:2px;
|
692 |
+
margin-left:20px;
|
693 |
+
list-style-type: square;
|
694 |
+
}
|
695 |
+
|
696 |
+
.quads-helper {
|
697 |
+
border-radius: 50%;
|
698 |
+
border: 2px solid #fff;
|
699 |
+
background-color: #83c11f;
|
700 |
+
width: 15px;
|
701 |
+
height: 15px;
|
702 |
+
display: inline-block;
|
703 |
+
position: relative;
|
704 |
+
top: 4px;
|
705 |
+
margin-top: -4px;
|
706 |
+
cursor: pointer;
|
707 |
+
margin-left: 2px;
|
708 |
+
}
|
709 |
+
|
710 |
+
.quads-helper:after {
|
711 |
+
height: 20px;
|
712 |
+
font-family: sans-serif;
|
713 |
+
content: "?";
|
714 |
+
color: #fff;
|
715 |
+
font-size: 11px;
|
716 |
+
font-weight: bold;
|
717 |
+
left: 4px;
|
718 |
+
position: absolute;
|
719 |
+
margin-top: -10px;
|
720 |
+
}
|
721 |
+
|
722 |
+
.quads-general-helper:after {
|
723 |
+
height: 20px;
|
724 |
+
font-family: sans-serif;
|
725 |
+
content: "?";
|
726 |
+
color: #fff;
|
727 |
+
font-size: 11px;
|
728 |
+
font-weight: bold;
|
729 |
+
left: 4px;
|
730 |
+
position: absolute;
|
731 |
+
margin-top: -2px;
|
732 |
+
}
|
733 |
+
.quads-general-helper {
|
734 |
+
border-radius: 50%;
|
735 |
+
border: 2px solid #fff;
|
736 |
+
background-color: #83c11f;
|
737 |
+
width: 15px;
|
738 |
+
height: 15px;
|
739 |
+
display: inline-block;
|
740 |
+
position: relative;
|
741 |
+
top: 4px;
|
742 |
+
margin-top: -4px;
|
743 |
+
cursor: pointer;
|
744 |
+
margin-left: 2px;
|
745 |
+
}
|
746 |
+
|
747 |
+
.quads-message{
|
748 |
+
display:block;
|
749 |
+
padding: 10px;
|
750 |
+
border: 1px solid #FBFBFB;
|
751 |
+
border-radius: 2px;
|
752 |
+
background-color: #F8F8F8;
|
753 |
+
position: absolute;
|
754 |
+
max-width: 500px;
|
755 |
+
z-index: 9999;
|
756 |
+
display: none;
|
757 |
+
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2);
|
758 |
+
font-weight: normal;
|
759 |
+
line-height: 20px;
|
760 |
+
text-transform: none;
|
761 |
+
font-size: 14px;
|
762 |
+
}
|
763 |
+
|
764 |
+
#quads-pro-hover{
|
765 |
+
background-color: #83c11f;
|
766 |
+
padding:20px;
|
767 |
+
min-width: 150px;
|
768 |
+
color:white;
|
769 |
+
display: block;
|
770 |
+
position: relative;
|
771 |
+
margin-top: -100px;
|
772 |
+
margin-left: 50%;
|
773 |
+
}
|
774 |
+
|
775 |
+
#quads-pro-hover-background{
|
776 |
+
width: 100%; height:100%;background:rgba(0,0,0,0.6);
|
777 |
+
}
|
778 |
+
|
779 |
+
#quads-open-toggle{
|
780 |
+
clear: both;
|
781 |
+
float:left;
|
782 |
+
margin-top:10px;
|
783 |
+
}
|
784 |
+
|
785 |
+
#quads_settingsadsense_header input[type="number"].small-text{
|
786 |
+
width: 55px;
|
787 |
+
}
|
788 |
+
|
789 |
+
.quads_adsense_code input.quads-bggrey {
|
790 |
+
background-color: whitesmoke;
|
791 |
+
color: #939393;
|
792 |
+
}
|
793 |
+
|
794 |
+
.quads-amp-code{
|
795 |
+
color: #939393;
|
796 |
+
height: 130px;
|
797 |
+
}
|
798 |
+
|
799 |
+
.quads-chosen-select .chosen-choices li.search-field input{
|
800 |
+
min-height: 25px;
|
801 |
+
}
|
802 |
+
|
803 |
+
|
804 |
+
#quads-validate{
|
805 |
+
display: block;
|
806 |
+
margin-left: 2px;
|
807 |
+
margin-bottom: 20px;
|
808 |
+
font-weight: bold;
|
809 |
+
clear: both;
|
810 |
+
}
|
811 |
+
|
812 |
+
@font-face {
|
813 |
+
font-family: 'quads';
|
814 |
+
src: url('data:application/octet-stream;base64,d09GRgABAAAAAAxYAA8AAAAAFUQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABWAAAADsAAABUIIslek9TLzIAAAGUAAAAQwAAAFY+IEkBY21hcAAAAdgAAABQAAABfohD7KljdnQgAAACKAAAABMAAAAgBtX/BGZwZ20AAAI8AAAFkAAAC3CKkZBZZ2FzcAAAB8wAAAAIAAAACAAAABBnbHlmAAAH1AAAAdIAAAJWlz85pGhlYWQAAAmoAAAAMwAAADYNxZM1aGhlYQAACdwAAAAfAAAAJAc6A1BobXR4AAAJ/AAAAAwAAAAM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35MuXrwFwjW8I5M8TR84CZ4xyPsEpepYL9M+Wi+QXyyVU8Wa5TP9uuYIHBJaruMEHK4jiOaMFPi0LXIlLyye4EHeWC/SPlovknuUSbsWr5TK9Z7mCiUgtV3EvvgZqtdVREBpZG9Rlu9nqyOlWKqoocWPprk2odCr7cq4S48excjy13PPYD9axq/fhfp74Oo1UIltOc69GfuJr1/izXfV0E7SNmcu5Vks5tBlypdXC94wTGrPqNhp/z8MACitsoRHxqkIYSNRo65zbaKKFDmnKDMnMPCtCAhcxjYs1d4TZSsq4zzFnlND6zIjJDjx+l0d+TAq4P2YVfbR6GE9IuzOizEv25bC7w6wRKcky3czOfntPseFpbVrDXbsuddaVxPCghuR97NYWNB69k92Koe2iwfef//sB5m6EUQB4nGNgYoAALgbsgJmRiZGZkYWBu6QosThDNzW3oKSSpyCntFg3ObMoOSc1hYEBAI3CCXgAeJxj8N7BcCIoYiMjY1/kBsadHAwcDMkFGxlYnTYxMDJogRibuZgYOSAsPgYwi81pF9MBoDQnkM3utIvBAcJmZnDZqMLYERixwaEjYiNzistGNRBvF0cDAyOLQ0dySARISSQQbOZhYuTR2sH4v3UDS+9GJgYXAAx2I/QAAA==') format('woff'),
|
815 |
+
url('data:application/octet-stream;base64,AAEAAAAPAIAAAwBwR1NVQiCLJXoAAAD8AAAAVE9TLzI+IEkBAAABUAAAAFZjbWFwiEPsqQAAAagAAAF+Y3Z0IAbV/wQAAAksAAAAIGZwZ22KkZBZAAAJTAAAC3BnYXNwAAAAEAAACSQAAAAIZ2x5Zpc/OaQAAAMoAAACVmhlYWQNxZM1AAAFgAAAADZoaGVhBzoDUAAABbgAAAAkaG10eApS//0AAAXcAAAADGxvY2EAxAErAAAF6AAAAAhtYXhwARIMCgAABfAAAAAgbmFtZcydHR8AAAYQAAACzXBvc3SFVFBUAAAI4AAAAERwcmVw5UErvAAAFLwAAACGAAEAAAAKADAAPgACREZMVAAObGF0bgAaAAQAAAAAAAAAAQAAAAQAAAAAAAAAAQAAAAFs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o4LbA7LCMgLkawAiVGUlggPFkusSsBFCstsDwsIyAuRrACJUZQWCA8WS6xKwEUKy2wPSwjIC5GsAIlRlJYIDxZIyAuRrACJUZQWCA8WS6xKwEUKy2wPiywNSsjIC5GsAIlRlJYIDxZLrErARQrLbA/LLA2K4ogIDywBCNCijgjIC5GsAIlRlJYIDxZLrErARQrsARDLrArKy2wQCywABawBCWwBCYgLkcjRyNhsAlDKyMgPCAuIzixKwEUKy2wQSyxCAQlQrAAFrAEJbAEJSAuRyNHI2EgsAQjQrAJQysgsGBQWCCwQFFYswIgAyAbswImAxpZQkIjIEewBEOwAmIgsABQWLBAYFlmsAFjYCCwASsgiophILACQ2BkI7ADQ2FkUFiwAkNhG7ADQ2BZsAMlsAJiILAAUFiwQGBZZrABY2GwAiVGYTgjIDwjOBshICBGI0ewASsjYTghWbErARQrLbBCLLA1Ky6xKwEUKy2wQyywNishIyAgPLAEI0IjOLErARQrsARDLrArKy2wRCywABUgR7AAI0KyAAEBFRQTLrAxKi2wRSywABUgR7AAI0KyAAEBFRQTLrAxKi2wRiyxAAEUE7AyKi2wRyywNCotsEgssAAWRSMgLiBGiiNhOLErARQrLbBJLLAII0KwSCstsEossgAAQSstsEsssgABQSstsEwssgEAQSstsE0ssgEBQSstsE4ssgAAQistsE8ssgABQistsFAssgEAQistsFEssgEBQistsFIssgAAPistsFMssgABPistsFQssgEAPistsFUssgEBPistsFYssgAAQCstsFcssgABQCstsFgssgEAQCstsFkssgEBQCstsFossgAAQystsFsssgABQystsFwssgEAQystsF0ssgEBQystsF4ssgAAPystsF8ssgABPystsGAssgEAPystsGEssgEBPystsGIssDcrLrErARQrLbBjLLA3K7A7Ky2wZCywNyuwPCstsGUssAAWsDcrsD0rLbBmLLA4Ky6xKwEUKy2wZyywOCuwOystsGgssDgrsDwrLbBpLLA4K7A9Ky2waiywOSsusSsBFCstsGsssDkrsDsrLbBsLLA5K7A8Ky2wbSywOSuwPSstsG4ssDorLrErARQrLbBvLLA6K7A7Ky2wcCywOiuwPCstsHEssDorsD0rLbByLLMJBAIDRVghGyMhWUIrsAhlsAMkUHiwARUwLQBLuADIUlixAQGOWbABuQgACABjcLEABUKyAAEAKrEABUKzCgIBCCqxAAVCsw4AAQgqsQAGQroCwAABAAkqsQAHQroAQAABAAkqsQMARLEkAYhRWLBAiFixA2REsSYBiFFYugiAAAEEQIhjVFixAwBEWVlZWbMMAgEMKrgB/4WwBI2xAgBEAAA=') format('truetype');
|
816 |
+
}
|
817 |
+
#quads-add-new-ad:before {
|
818 |
+
font-family: 'quads';
|
819 |
+
content: '\e801';
|
820 |
+
text-decoration: none;
|
821 |
+
margin-right:5px;
|
822 |
+
color: #383838;
|
823 |
+
}
|
824 |
+
|
825 |
+
#quads-add-new-ad{
|
826 |
+
margin-left: 3px;
|
827 |
+
margin-top: 5px;
|
828 |
+
display: block;
|
829 |
+
margin-bottom: 20px;
|
830 |
+
text-decoration: none;
|
831 |
+
font-size: 14px;
|
832 |
+
font-weight: 600;
|
833 |
+
color: #383838;
|
834 |
+
}
|
835 |
+
|
836 |
+
#quads-submit-button{
|
837 |
+
z-index: 999999;
|
838 |
+
}
|
839 |
+
|
840 |
+
p.submit{
|
841 |
+
float:left;
|
842 |
+
padding-top:0px;
|
843 |
+
padding-bottom:0px;
|
844 |
+
}
|
845 |
+
|
846 |
+
.quads-delete-ad{
|
847 |
+
clear:both;
|
848 |
+
display:block;
|
849 |
+
//background: url('../images/remove-icon.png');
|
850 |
+
//background-size: 20px 20px;
|
851 |
+
//background-repeat: no-repeat;
|
852 |
+
//height: 20px;
|
853 |
+
//padding-left:30px;
|
854 |
+
margin-right:5px;
|
855 |
+
font-size: 14px;
|
856 |
+
font-weight: 600;
|
857 |
+
text-decoration: none;
|
858 |
+
color: #383838;
|
859 |
+
}
|
860 |
+
.quads-delete-ad:before{
|
861 |
+
font-family: 'quads';
|
862 |
+
content: '\e800';
|
863 |
+
margin-right:5px;
|
864 |
+
color: #383838;
|
865 |
+
}
|
866 |
+
|
867 |
+
#backup-settings-textarea{
|
868 |
+
width: 580px;
|
869 |
+
height: 400px;
|
870 |
+
font-family: Menlo, Monaco, monospace;
|
871 |
+
background: none;
|
872 |
+
white-space: normal;
|
873 |
+
overflow: auto;
|
874 |
+
display: block;
|
875 |
+
}
|
876 |
+
|
877 |
+
@media (max-width:506px){
|
878 |
+
.quads-banner-columns {
|
879 |
+
display: block !important;
|
880 |
+
}
|
881 |
+
.quads-banner-sidebar-second{
|
882 |
+
width: 100% !important;
|
883 |
+
}
|
884 |
+
}
|
885 |
+
@media (max-width:780px){
|
886 |
+
.quads-banner-wrapper{
|
887 |
+
margin-right:12px !important;
|
888 |
+
}
|
889 |
+
}
|
890 |
+
|
891 |
+
.quads-banner-wrapper{
|
892 |
+
display: flex;
|
893 |
+
flex-direction: column;
|
894 |
+
clear:both;
|
895 |
+
background: #fff;
|
896 |
+
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
|
897 |
+
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
|
898 |
+
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
|
899 |
+
margin: 5px 5px 2px;
|
900 |
+
margin-right:20px;
|
901 |
+
padding: 1px 12px;
|
902 |
+
}
|
903 |
+
.quads-banner-content {
|
904 |
+
display: flex;
|
905 |
+
flex: 1;
|
906 |
+
color: #000;
|
907 |
+
}
|
908 |
+
.quads-banner-columns{
|
909 |
+
display: flex;
|
910 |
+
flex:1;
|
911 |
+
-ms-flex-align: center;
|
912 |
+
-webkit-align-items: center;
|
913 |
+
-webkit-box-align: center;
|
914 |
+
|
915 |
+
align-items: center;
|
916 |
+
}
|
917 |
+
.quads-banner-main{
|
918 |
+
flex: 1;
|
919 |
+
order: 2;
|
920 |
+
}
|
921 |
+
.quads-banner-sidebar-first{
|
922 |
+
min-width: 160px;
|
923 |
+
width: 13%;
|
924 |
+
order: 1;
|
925 |
+
}
|
926 |
+
.quads-banner-sidebar-second{
|
927 |
+
width: 19%;
|
928 |
+
order: 3;
|
929 |
+
}
|
930 |
+
|
931 |
+
|
932 |
+
.quads-button-primary {
|
933 |
+
display: inline-block;
|
934 |
+
text-decoration: none;
|
935 |
+
font-size: 16px;
|
936 |
+
line-height: 32px;
|
937 |
+
height: 36px;
|
938 |
+
margin: 0;
|
939 |
+
padding: 0 13px 1px;
|
940 |
+
cursor: pointer;
|
941 |
+
border-width: 1px;
|
942 |
+
border-style: solid;
|
943 |
+
-webkit-appearance: none;
|
944 |
+
-webkit-border-radius: 3px;
|
945 |
+
border-radius: 3px;
|
946 |
+
white-space: nowrap;
|
947 |
+
-webkit-box-sizing: border-box;
|
948 |
+
-moz-box-sizing: border-box;
|
949 |
+
box-sizing: border-box;
|
950 |
+
font-weight: bold;
|
951 |
+
}
|
952 |
+
|
953 |
+
.quads-button-primary {
|
954 |
+
background: #0085ba;
|
955 |
+
border-color: #0073aa #006799 #006799;
|
956 |
+
-webkit-box-shadow: 0 1px 0 #006799;
|
957 |
+
box-shadow: 0 1px 0 #006799;
|
958 |
+
color: #fff;
|
959 |
+
text-decoration: none;
|
960 |
+
text-shadow: 0 -1px 1px #006799, 1px 0 1px #006799, 0 1px 1px #006799, -1px 0 1px #006799;
|
961 |
+
}
|
962 |
+
|
963 |
+
.quads-notice-dismiss {
|
964 |
+
display: inline-block;
|
965 |
+
position: relative;
|
966 |
+
top: 0;
|
967 |
+
right: 1px;
|
968 |
+
border: none;
|
969 |
+
margin: 0;
|
970 |
+
padding: 0px;
|
971 |
+
background: 0 0;
|
972 |
+
color: #72777c;
|
973 |
+
cursor: pointer;
|
974 |
+
}
|
975 |
+
|
976 |
+
.quads-notice-dismiss:before{
|
977 |
+
display: inline-block;
|
978 |
+
background: 0 0;
|
979 |
+
color: #72777c;
|
980 |
+
content: "\f153";
|
981 |
+
font: 400 16px/20px dashicons;
|
982 |
+
speak: none;
|
983 |
+
height: 20px;
|
984 |
+
text-align: center;
|
985 |
+
width: 20px;
|
986 |
+
-webkit-font-smoothing: antialiased;
|
987 |
+
}
|
assets/css/quads-admin.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.quads-share-button-container{margin:5px 0}.quads-share-button-container p{margin:0 0 10px}.quads-share-button{display:inline-block}.quads-share-button a{text-decoration:none}.quads-share-button .quads-share{font-family:sans-serif;font-weight:700;text-decoration:none;text-align:center;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;color:#FFF;display:inline;font-size:16px;width:40px;padding:4px 8px}.quads-share-button-twitter .quads-share{background-color:#00ABF0}.quads-share-button-facebook .quads-share{background-color:#3b5998}.quads-share-button-googleplus .quads-share{background-color:#F53424}.quads-share-button-facebook .share:active,.quads-share-button-googleplus .share:active,.quads-share-button-twitter .share:active{background-color:#353535}@media (max-width:925px){.quads-share-button .quads-share{font-size:15px;padding:8px 16px}}.quads-richeditor{font-size:11px}#quads-add-ons h2{margin:0 0 15px}#quads-add-ons .quadsshare-addons{float:left;margin:0 15px 15px 0;background:#f0f0f0;border:1px solid #ccc;width:320px;padding:8px;height:315px;position:relative}#quads-add-ons .quadsshare-addons h3{margin:0 0 8px;font-size:13px}#quads-add-ons .quadsshare-addons .button-secondary{position:absolute;bottom:8px;left:8px}#quads-add-ons .quadsshare-addons .third-party{display:none}#system-info-textarea{width:580px;height:400px;font-family:Menlo,Monaco,monospace;background:0 0;white-space:pre;overflow:auto;display:block}.quads-select-chosen{width:300px}input.large-text,textarea.large-text{max-width:600px}input.medium-text,textarea.medium-text{min-width:190px}#quads_tab_container ul{list-style:none;margin:0;padding:0;background:#fff;float:left}#quads_tab_container ul li:first-child.selected-tab{border-top:none}#quads_tab_container ul li a.selected-tab{font-weight:700;text-decoration:none}#quads_tab_container .quads-row{padding-top:12px;padding-bottom:12px}#quads_tab_container .quads-row label strong,#tab_container .quads-row strong{font-weight:700}.quads-tabs a{padding:5px;color:#a1a1a1;text-transform:uppercase}.quads-tabs a strong{font-weight:700}li.quads-tabs{float:left;margin-left:0;background-color:#e5e5e5}#quads_tab_container>ul>li.quads-tabs.active{background-color:#fff}#quads_tab_container>ul>li.quads-tabs.active a{color:#83c11f}#quads_tab_container .quads-panel-container{background:#FFF;padding:20px;overflow:auto;text-align:left;margin-bottom:10px;max-width:640px;float:left;clear:both}.form-table{margin-top:-20px}#quads_tab_container .form-table th{vertical-align:top;text-align:left;padding:20px 10px 20px 0;line-height:1.3;font-weight:700;font-size:14px;color:#484848;width:30%}#quads_tab_container .form-table tr{border-bottom:1px solid #E7E7E7}#quads_tab_container span.description{display:block;font-weight:400;font-style:normal;font-size:13px;margin-top:7px;color:#484848}#quads_tab_container .col-title{font-size:18px;color:#484848}@media only screen and (max-width:680px){#quads_tab_container ul{float:none;background:#fff}#quads_tab_container .form-table tr>th{width:100%}#quads_tab_container span.description{font-size:14px}#quads_tab_container .form-table tr>th,#tab_container .form-table tr>td{padding:10px}#quads_tab_container .quads-tabs a{text-align:left}#quads_tab_container li.quads-tabs{float:none;margin-left:0}}#quads_tab_container ul li.quads-tabs{margin-bottom:0}#quads_tab_container ul li.quads-tabs a{display:block;padding:10px;text-decoration:none;font-weight:700}#quads_tab_container ul li.quads-tabs a:hover{color:#383838}#quads_tab_container ul li.quads-tabs a.active{text-decoration:underline}#quads_tab_container table tbody tr:nth-child(1)>th>div{font-size:20px}#quadstabcontainer>.quadstabs{background-color:#fff}#quadstabcontainer ul .active{background-color:#00adef;color:#fff;border-bottom-color:#0098D2}#quadstabcontainer ul .active:hover{background-color:#00A4E2;color:#fff;border-bottom-color:#0098D2}#quadstabcontainer ul li a{padding:10px 14px;background-color:#f3f3f3}#quadstabcontainer .quadstab-container{border:0 solid #ececec}.quads-quote-docs{font-family:Courier New,Courier,Fixed;color:#050}.quads-desc{display:block;font-style:italic;padding-top:10px}.quads-postbox{padding:10px;position:relative;min-width:255px;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);background:#fff;margin-bottom:20px}.nav-tab-active{background-color:#fff;border-bottom:0}#quads-add-ons{padding:20px}.quads-toggle{position:absolute;right:0;top:0}.quads-box-close .quads-close-open-icon{background-position:0 -38px}.quads-close-open-icon{width:38px;height:38px;background:url(../images/arrow-close.png) repeat-y #f4f4f4}.quads-ad-toggle-header{position:relative;background-color:#f4f4f4;margin-bottom:2px;padding:10px 10px 10px 15px;-moz-user-select:-moz-none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none;cursor:pointer!important;min-height:20px}.quads-ad-toggle-container{padding:20px;background-color:#f4f4f4}.quads-toogle-title{font-size:16px;font-weight:700}.adsense-size-title,.quads-advanced-description label{font-weight:600;font-size:12px;text-transform:uppercase;float:left}.quads-advanced-description label{width:215px}.quads-advanced-ad-box{clear:both;margin-top:20px;margin-bottom:20px}.adsense-size-title{margin-right:0;line-height:32px;margin-left:14px;min-width:100px}.quads-select-style-overwrite{border:1px solid #e6e6e6;width:150px;overflow:hidden;background:url(../images/box_arrow.png) 120px 0 repeat-y #fff;margin:0 0 5px}.quads-select-style-overwrite select{width:150px}.quads-size-input{position:relative;top:-1px;width:110%;border:none;box-shadow:none;background:0 0;-webkit-appearance:none;font-family:'Open Sans',arial,sans-serif;color:#555;font-size:12px}.quads-pro-overlay{height:200px}.quads-license-error-notice,.quads-license-expires-soon-notice{background-color:#fff;padding:10px;overflow:auto;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1);border:1px solid #ECECEC;border-radius:3px}.quads-license-error-notice a{color:#0097df;text-decoration:underline}.quads-license-error-notice{border-left:4px solid #dd3d36}.quads-license-expiration-date-notice,.quads-license-lifetime-notice,.quads-license-null{padding:0}.quads-license-expiration-date-notice .quads-license-data p,.quads-license-lifetime-notice .quads-license-data p{color:#666;font-size:14px;font-style:italic;margin:4px 0 0}#quads_settingslicenses_header-nav{display:none}#quads_settingslicenses_header{max-width:640px}#quads_settingslicenses_header .quads-row.th{min-width:250px}.quads-notice{background:#fff;border-left:4px solid #46b450;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1);margin:5px 15px 2px;padding:1px 12px}.quads_admin h2.nav-tab-wrapper{border:0}.quads_admin .nav-tab{border:0;text-transform:uppercase;color:#a1a1a1;font-weight:700}.quads-h1{margin-bottom:1.35rem;font-size:2.5em;line-height:3.68rem;letter-spacing:normal}.quads-h2{margin-top:0;margin-bottom:1.2rem;font-size:30px;line-height:2.5rem}.quads-heading-pro{color:#83c11f;font-weight:700}.quads-button.green{display:inline-block;background-color:#83c11f;padding:10px;min-width:170px;color:#fff;font-size:16px;text-decoration:none;text-align:center;margin-top:20px}#quads-add-ons .quads-footer{clear:both;margin-top:20px;font-style:italic}#quads-add-ons li{font-size:18px;line-height:29px;position:relative;padding-left:23px;list-style:none!important}#quads-add-ons li:before{width:1em;height:100%;background:url(data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%2377B227%22%20d%3D%22M1671%20566q0%2040%2D28%2068l%2D724%20724%2D136%20136q%2D28%2028%2D68%2028t%2D68%2D28l%2D136%2D136%2D362%2D362q%2D28%2D28%2D28%2D68t28%2D68l136%2D136q28%2D28%2068%2D28t68%2028l294%20295%20656%2D657q28%2D28%2068%2D28t68%2028l136%20136q28%2028%2028%2068z%22%2F%3E%3C%2Fsvg%3E) left .4em no-repeat;background-size:contain;content:"";position:absolute;top:0;left:0;color:#77b227}.adsense_admin_header{font-size:14px;font-weight:500}#quads-adsense-bg-div{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.65);z-index:250000}#quads-adsense-container{text-align:center;width:480px;margin:85px auto 0;background-color:#fff;padding:2%;border-radius:2px}#quads-adsense-container h3{margin-top:0}#quads-adsense-container textarea,.quads-ad-toggle-container textarea{width:100%}.quads-ad-toggle-container input{margin-top:7px;margin-bottom:10px}.quads-adsense-code label,input{margin-right:2px}#quads_settings\5b ad2\5d \5b g_data_ad_client\5d{width:200px}.quads-ad-toggle-container label{display:inline-block;margin-right:2px;margin-top:-3px}.quads_adsense_code .quads-add-adsense{margin:20px 5px 20px 0}.quads-label-left{min-width:71px}#quads-label-Type{min-width:67px}.quads-medium-size{width:110px}#quads-msg{display:none;margin:5px;background-color:#c55c5c;color:#fff}.quads-loader,.quads-success-modal{display:block;position:fixed;top:45%;left:25%;width:200px;height:auto;padding:5px 20px;z-index:1002;overflow:auto}.quads-form-table{width:100%}.quads-left-box{width:45%;min-height:100px;float:left;line-height:35px;min-width:300px}@media screen and (max-width:700px){.adsense-size-title{margin-left:0}.quads-left-box{width:45%;min-height:100px;float:none;line-height:35px;min-width:300px}.quads-style img{max-width:50px}}.quads-general-helper,.quads-helper{width:15px;display:inline-block;top:4px;cursor:pointer}.adsense_admin_header ul li{margin-top:2px;margin-left:20px;list-style-type:square}.quads-helper{border-radius:50%;border:2px solid #fff;background-color:#83c11f;height:15px;position:relative;margin-top:-4px;margin-left:2px}.quads-general-helper:after,.quads-helper:after{height:20px;font-family:sans-serif;content:"?";font-size:11px;font-weight:700;left:4px;position:absolute;color:#fff}.quads-helper:after{margin-top:-10px}.quads-general-helper:after{margin-top:-2px}#quads-add-new-ad:before,.quads-delete-ad:before{font-family:quads;margin-right:5px}.quads-general-helper{border-radius:50%;border:2px solid #fff;background-color:#83c11f;height:15px;position:relative;margin-top:-4px;margin-left:2px}.quads-message{padding:10px;border:1px solid #FBFBFB;border-radius:2px;background-color:#F8F8F8;position:absolute;max-width:500px;z-index:9999;display:none;box-shadow:0 0 5px rgba(0,0,0,.2);font-weight:400;line-height:20px;text-transform:none;font-size:14px}#quads-pro-hover{background-color:#83c11f;padding:20px;min-width:150px;color:#fff;display:block;position:relative;margin-top:-100px;margin-left:50%}#quads-pro-hover-background{width:100%;height:100%;background:rgba(0,0,0,.6)}#quads-open-toggle{clear:both;float:left;margin-top:10px}#quads_settingsadsense_header input[type=number].small-text{width:55px}.quads_adsense_code input.quads-bggrey{background-color:#f5f5f5;color:#939393}.quads-amp-code{color:#939393;height:130px}.quads-chosen-select .chosen-choices li.search-field input{min-height:25px}#quads-validate{display:block;margin-left:2px;margin-bottom:20px;font-weight:700;clear:both}#quads-add-new-ad,.quads-delete-ad{font-size:14px;font-weight:600;text-decoration:none;color:#383838;display:block}@font-face{font-family:quads;src:url(data:application/octet-stream;base64,d09GRgABAAAAAAxYAA8AAAAAFUQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABWAAAADsAAABUIIslek9TLzIAAAGUAAAAQwAAAFY+IEkBY21hcAAAAdgAAABQAAABfohD7KljdnQgAAACKAAAABMAAAAgBtX/BGZwZ20AAAI8AAAFkAAAC3CKkZBZZ2FzcAAAB8wAAAAIAAAACAAAABBnbHlmAAAH1AAAAdIAAAJWlz85pGhlYWQAAAmoAAAAMwAAADYNxZM1aGhlYQAACdwAAAAfAAAAJAc6A1BobXR4AAAJ/AAAAAwAAAAMClL//WxvY2EAAAoIAAAACAAAAAgAxAErbWF4cAAAChAAAAAgAAAAIAESDApuYW1lAAAKMAAAAXcAAALNzJ0dH3Bvc3QAAAuoAAAAMwAAAESFVFBUcHJlcAAAC9wAAAB6AAAAhuVBK7x4nGNgZGBg4GIwYLBjYHJx8wlh4MtJLMljkGJgYYAAkDwymzEnMz2RgQPGA8qxgGkOIGaDiAIAJjsFSAB4nGNgZC5knMDAysDAVMW0h4GBoQdCMz5gMGRkAooysDIzYAUBaa4pDA4vGF4wMgf9z2KIYg5imAYUZgTJAQDj3AufAHic7ZCxDYAwDATPiaFAjEFBwTBU7F+yRfK2GYOX7qR/uTKwAF1cwsEejMit1XLvbLk7R9547K+NIRNW93STVv7s6fNrLf5U1OcK2gTMuAtdeJxjYEADEhDIHPQ/C4QBEmwD3QB4nK1WaXfTRhQdeUmchCwlCy1qYcTEabBGJmzBgAlBsmMgXZytlaC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sARDLrArKy2wRCywABUgR7AAI0KyAAEBFRQTLrAxKi2wRSywABUgR7AAI0KyAAEBFRQTLrAxKi2wRiyxAAEUE7AyKi2wRyywNCotsEgssAAWRSMgLiBGiiNhOLErARQrLbBJLLAII0KwSCstsEossgAAQSstsEsssgABQSstsEwssgEAQSstsE0ssgEBQSstsE4ssgAAQistsE8ssgABQistsFAssgEAQistsFEssgEBQistsFIssgAAPistsFMssgABPistsFQssgEAPistsFUssgEBPistsFYssgAAQCstsFcssgABQCstsFgssgEAQCstsFkssgEBQCstsFossgAAQystsFsssgABQystsFwssgEAQystsF0ssgEBQystsF4ssgAAPystsF8ssgABPystsGAssgEAPystsGEssgEBPystsGIssDcrLrErARQrLbBjLLA3K7A7Ky2wZCywNyuwPCstsGUssAAWsDcrsD0rLbBmLLA4Ky6xKwEUKy2wZyywOCuwOystsGgssDgrsDwrLbBpLLA4K7A9Ky2waiywOSsusSsBFCstsGsssDkrsDsrLbBsLLA5K7A8Ky2wbSywOSuwPSstsG4ssDorLrErARQrLbBvLLA6K7A7Ky2wcCywOiuwPCstsHEssDorsD0rLbByLLMJBAIDRVghGyMhWUIrsAhlsAMkUHiwARUwLQBLuADIUlixAQGOWbABuQgACABjcLEABUKyAAEAKrEABUKzCgIBCCqxAAVCsw4AAQgqsQAGQroCwAABAAkqsQAHQroAQAABAAkqsQMARLEkAYhRWLBAiFixA2REsSYBiFFYugiAAAEEQIhjVFixAwBEWVlZWbMMAgEMKrgB/4WwBI2xAgBEAAA=) format('truetype')}#quads-add-new-ad:before{content:'\e801';text-decoration:none;color:#383838}#quads-add-new-ad{margin-left:3px;margin-top:5px;margin-bottom:20px}#quads-submit-button{z-index:999999}p.submit{float:left;padding-top:0;padding-bottom:0}.quads-delete-ad{clear:both;//background:url(../images/remove-icon.png);//background-size:20px 20px;//background-repeat:no-repeat;//height:20px;//padding-left:30px;margin-right:5px}.quads-delete-ad:before{content:'\e800';color:#383838}#backup-settings-textarea{width:580px;height:400px;font-family:Menlo,Monaco,monospace;background:0 0;white-space:normal;overflow:auto;display:block}
|
1 |
+
.quads-share-button-container{margin:5px 0}.quads-share-button-container p{margin:0 0 10px}.quads-share-button{display:inline-block}.quads-share-button a{text-decoration:none}.quads-share-button .quads-share{font-family:sans-serif;font-weight:700;text-decoration:none;text-align:center;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;color:#FFF;display:inline;font-size:16px;width:40px;padding:4px 8px}.quads-share-button-twitter .quads-share{background-color:#00ABF0}.quads-share-button-facebook .quads-share{background-color:#3b5998}.quads-share-button-googleplus .quads-share{background-color:#F53424}.quads-share-button-facebook .share:active,.quads-share-button-googleplus .share:active,.quads-share-button-twitter .share:active{background-color:#353535}@media (max-width:925px){.quads-share-button .quads-share{font-size:15px;padding:8px 16px}}.quads-richeditor{font-size:11px}#quads-add-ons h2{margin:0 0 15px}#quads-add-ons .quadsshare-addons{float:left;margin:0 15px 15px 0;background:#f0f0f0;border:1px solid #ccc;width:320px;padding:8px;height:315px;position:relative}#quads-add-ons .quadsshare-addons h3{margin:0 0 8px;font-size:13px}#quads-add-ons .quadsshare-addons .button-secondary{position:absolute;bottom:8px;left:8px}#quads-add-ons .quadsshare-addons .third-party{display:none}#system-info-textarea{width:580px;height:400px;font-family:Menlo,Monaco,monospace;background:0 0;white-space:pre;overflow:auto;display:block}.quads-select-chosen{width:300px}input.large-text,textarea.large-text{max-width:600px}input.medium-text,textarea.medium-text{min-width:190px}#quads_tab_container ul{list-style:none;margin:0;padding:0;background:#fff;float:left}#quads_tab_container ul li:first-child.selected-tab{border-top:none}#quads_tab_container ul li a.selected-tab{font-weight:700;text-decoration:none}#quads_tab_container .quads-row{padding-top:12px;padding-bottom:12px}#quads_tab_container .quads-row label strong,#tab_container .quads-row strong{font-weight:700}.quads-tabs a{padding:5px;color:#a1a1a1;text-transform:uppercase}.quads-tabs a strong{font-weight:700}li.quads-tabs{float:left;margin-left:0;background-color:#e5e5e5}#quads_tab_container>ul>li.quads-tabs.active{background-color:#fff}#quads_tab_container>ul>li.quads-tabs.active a{color:#83c11f}#quads_tab_container .quads-panel-container{background:#FFF;padding:20px;overflow:auto;text-align:left;margin-bottom:10px;max-width:640px;float:left;clear:both}.form-table{margin-top:-20px}#quads_tab_container .form-table th{vertical-align:top;text-align:left;padding:20px 10px 20px 0;line-height:1.3;font-weight:700;font-size:14px;color:#484848;width:30%}#quads_tab_container .form-table tr{border-bottom:1px solid #E7E7E7}#quads_tab_container span.description{display:block;font-weight:400;font-style:normal;font-size:13px;margin-top:7px;color:#484848}#quads_tab_container .col-title{font-size:18px;color:#484848}@media only screen and (max-width:680px){#quads_tab_container ul{float:none;background:#fff}#quads_tab_container .form-table tr>th{width:100%}#quads_tab_container span.description{font-size:14px}#quads_tab_container .form-table tr>th,#tab_container .form-table tr>td{padding:10px}#quads_tab_container .quads-tabs a{text-align:left}#quads_tab_container li.quads-tabs{float:none;margin-left:0}}#quads_tab_container ul li.quads-tabs{margin-bottom:0}#quads_tab_container ul li.quads-tabs a{display:block;padding:10px;text-decoration:none;font-weight:700}#quads_tab_container ul li.quads-tabs a:hover{color:#383838}#quads_tab_container ul li.quads-tabs a.active{text-decoration:underline}#quads_tab_container table tbody tr:nth-child(1)>th>div{font-size:20px}#quadstabcontainer>.quadstabs{background-color:#fff}#quadstabcontainer ul .active{background-color:#00adef;color:#fff;border-bottom-color:#0098D2}#quadstabcontainer ul .active:hover{background-color:#00A4E2;color:#fff;border-bottom-color:#0098D2}#quadstabcontainer ul li a{padding:10px 14px;background-color:#f3f3f3}#quadstabcontainer .quadstab-container{border:0 solid #ececec}.quads-quote-docs{font-family:Courier New,Courier,Fixed;color:#050}.quads-desc{display:block;font-style:italic;padding-top:10px}.quads-postbox{padding:10px;position:relative;min-width:255px;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.04);box-shadow:0 1px 1px rgba(0,0,0,.04);background:#fff;margin-bottom:20px}.nav-tab-active{background-color:#fff;border-bottom:0}#quads-add-ons{padding:20px}.quads-toggle{position:absolute;right:0;top:0}.quads-box-close .quads-close-open-icon{background-position:0 -38px}.quads-close-open-icon{width:38px;height:38px;background:url(../images/arrow-close.png) repeat-y #f4f4f4}.quads-ad-toggle-header{position:relative;background-color:#f4f4f4;margin-bottom:2px;padding:10px 10px 10px 15px;-moz-user-select:-moz-none;-khtml-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none;cursor:pointer!important;min-height:20px}.quads-ad-toggle-container{padding:20px;background-color:#f4f4f4}.quads-toogle-title{font-size:16px;font-weight:700}.adsense-size-title,.quads-advanced-description label{font-weight:600;font-size:12px;text-transform:uppercase;float:left}.quads-advanced-description label{width:215px}.quads-advanced-ad-box{clear:both;margin-top:20px;margin-bottom:20px}.adsense-size-title{margin-right:0;line-height:32px;margin-left:14px;min-width:100px}.quads-select-style-overwrite{border:1px solid #e6e6e6;width:150px;overflow:hidden;background:url(../images/box_arrow.png) 120px 0 repeat-y #fff;margin:0 0 5px}.quads-select-style-overwrite select{width:150px}.quads-size-input{position:relative;top:-1px;width:110%;border:none;box-shadow:none;background:0 0;-webkit-appearance:none;font-family:'Open Sans',arial,sans-serif;color:#555;font-size:12px}.quads-pro-overlay{height:200px}.quads-license-error-notice,.quads-license-expires-soon-notice{background-color:#fff;padding:10px;overflow:auto;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1);border:1px solid #ECECEC;border-radius:3px}.quads-license-error-notice a{color:#0097df;text-decoration:underline}.quads-license-error-notice{border-left:4px solid #dd3d36}.quads-license-expiration-date-notice,.quads-license-lifetime-notice,.quads-license-null{padding:0}.quads-license-expiration-date-notice .quads-license-data p,.quads-license-lifetime-notice .quads-license-data p{color:#666;font-size:14px;font-style:italic;margin:4px 0 0}#quads_settingslicenses_header-nav{display:none}#quads_settingslicenses_header{max-width:640px}#quads_settingslicenses_header .quads-row.th{min-width:250px}.quads-notice{background:#fff;border-left:4px solid #46b450;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1);margin:5px 15px 2px;padding:1px 12px}.quads_admin h2.nav-tab-wrapper{border:0}.quads_admin .nav-tab{border:0;text-transform:uppercase;color:#a1a1a1;font-weight:700}.quads-h1{margin-bottom:1.35rem;font-size:2.5em;line-height:3.68rem;letter-spacing:normal}.quads-h2{margin-top:0;margin-bottom:1.2rem;font-size:30px;line-height:2.5rem}.quads-heading-pro{color:#83c11f;font-weight:700}.quads-button.green{display:inline-block;background-color:#83c11f;padding:10px;min-width:170px;color:#fff;font-size:16px;text-decoration:none;text-align:center;margin-top:20px}#quads-add-ons .quads-footer{clear:both;margin-top:20px;font-style:italic}#quads-add-ons li{font-size:18px;line-height:29px;position:relative;padding-left:23px;list-style:none!important}#quads-add-ons li:before{width:1em;height:100%;background:url(data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%221792%22%20height%3D%221792%22%20viewBox%3D%220%200%201792%201792%22%20xmlns%3D%22http%3A%2F%2Fwww%2Ew3%2Eorg%2F2000%2Fsvg%22%3E%3Cpath%20fill%3D%22%2377B227%22%20d%3D%22M1671%20566q0%2040%2D28%2068l%2D724%20724%2D136%20136q%2D28%2028%2D68%2028t%2D68%2D28l%2D136%2D136%2D362%2D362q%2D28%2D28%2D28%2D68t28%2D68l136%2D136q28%2D28%2068%2D28t68%2028l294%20295%20656%2D657q28%2D28%2068%2D28t68%2028l136%20136q28%2028%2028%2068z%22%2F%3E%3C%2Fsvg%3E) left .4em no-repeat;background-size:contain;content:"";position:absolute;top:0;left:0;color:#77b227}.adsense_admin_header{font-size:14px;font-weight:500}#quads-adsense-bg-div{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.65);z-index:250000}#quads-adsense-container{text-align:center;width:480px;margin:85px auto 0;background-color:#fff;padding:2%;border-radius:2px}#quads-adsense-container h3{margin-top:0}#quads-adsense-container textarea,.quads-ad-toggle-container textarea{width:100%}.quads-ad-toggle-container input{margin-top:7px;margin-bottom:10px}.quads-adsense-code label,input{margin-right:2px}#quads_settings\5b ad2\5d \5b g_data_ad_client\5d{width:200px}.quads-ad-toggle-container label{display:inline-block;margin-right:2px;margin-top:-3px}.quads_adsense_code .quads-add-adsense{margin:20px 5px 20px 0}.quads-label-left{min-width:71px}#quads-label-Type{min-width:67px}.quads-medium-size{width:110px}#quads-msg{display:none;margin:5px;background-color:#c55c5c;color:#fff}.quads-loader,.quads-success-modal{display:block;position:fixed;top:45%;left:25%;width:200px;height:auto;padding:5px 20px;z-index:1002;overflow:auto}.quads-form-table{width:100%}.quads-left-box{width:45%;min-height:100px;float:left;line-height:35px;min-width:300px}@media screen and (max-width:700px){.adsense-size-title{margin-left:0}.quads-left-box{width:45%;min-height:100px;float:none;line-height:35px;min-width:300px}.quads-style img{max-width:50px}}.quads-general-helper,.quads-helper{background-color:#83c11f;width:15px;cursor:pointer}.adsense_admin_header ul li{margin-top:2px;margin-left:20px;list-style-type:square}.quads-helper{border-radius:50%;border:2px solid #fff;height:15px;display:inline-block;position:relative;top:4px;margin-top:-4px;margin-left:2px}.quads-general-helper:after,.quads-helper:after{height:20px;font-family:sans-serif;content:"?";font-size:11px;font-weight:700;left:4px;position:absolute;color:#fff}.quads-helper:after{margin-top:-10px}.quads-general-helper:after{margin-top:-2px}#quads-add-new-ad:before,.quads-delete-ad:before{font-family:quads;margin-right:5px}.quads-general-helper{border-radius:50%;border:2px solid #fff;height:15px;display:inline-block;position:relative;top:4px;margin-top:-4px;margin-left:2px}.quads-message{padding:10px;border:1px solid #FBFBFB;border-radius:2px;background-color:#F8F8F8;position:absolute;max-width:500px;z-index:9999;display:none;box-shadow:0 0 5px rgba(0,0,0,.2);font-weight:400;line-height:20px;text-transform:none;font-size:14px}#quads-pro-hover{background-color:#83c11f;padding:20px;min-width:150px;color:#fff;display:block;position:relative;margin-top:-100px;margin-left:50%}#quads-pro-hover-background{width:100%;height:100%;background:rgba(0,0,0,.6)}#quads-open-toggle{clear:both;float:left;margin-top:10px}#quads_settingsadsense_header input[type=number].small-text{width:55px}.quads_adsense_code input.quads-bggrey{background-color:#f5f5f5;color:#939393}.quads-amp-code{color:#939393;height:130px}.quads-chosen-select .chosen-choices li.search-field input{min-height:25px}#quads-validate{display:block;margin-left:2px;margin-bottom:20px;font-weight:700;clear:both}#quads-add-new-ad,.quads-delete-ad{font-size:14px;font-weight:600;color:#383838;display:block;text-decoration:none}@font-face{font-family:quads;src:url(data:application/octet-stream;base64,d09GRgABAAAAAAxYAA8AAAAAFUQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABWAAAADsAAABUIIslek9TLzIAAAGUAAAAQwAAAFY+IEkBY21hcAAAAdgAAABQAAABfohD7KljdnQgAAACKAAAABMAAAAgBtX/BGZwZ20AAAI8AAAFkAAAC3CKkZBZZ2FzcAAAB8wAAAAIAAAACAAAABBnbHlmAAAH1AAAAdIAAAJWlz85pGhlYWQAAAmoAAAAMwAAADYNxZM1aGhlYQAACdwAAAAfAAAAJAc6A1BobXR4AAAJ/AAAAAwAAAAMClL//WxvY2EAAAoIAAAACAAAAAgAxAErbWF4cAAAChAAAAAgAAAAIAESDApuYW1lAAAKMAAAAXcAAALNzJ0dH3Bvc3QAAAuoAAAAMwAAAESFVFBUcHJlcAAAC9wAAAB6AAAAhuVBK7x4nGNgZGBg4GIwYLBjYHJx8wlh4MtJLMljkGJgYYAAkDwymzEnMz2RgQPGA8qxgGkOIGaDiAIAJjsFSAB4nGNgZC5knMDAysDAVMW0h4GBoQdCMz5gMGRkAooysDIzYAUBaa4pDA4vGF4wMgf9z2KIYg5imAYUZgTJAQDj3AufAHic7ZCxDYAwDATPiaFAjEFBwTBU7F+yRfK2GYOX7qR/uTKwAF1cwsEejMit1XLvbLk7R9547K+NIRNW93STVv7s6fNrLf5U1OcK2gTMuAtdeJxjYEADEhDIHPQ/C4QBEmwD3QB4nK1WaXfTRhQdeUmchCwlCy1qYcTEabBGJmzBgAlBsmMgXZytlaCLFDvpvvGJ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RCywABUgR7AAI0KyAAEBFRQTLrAxKi2wRSywABUgR7AAI0KyAAEBFRQTLrAxKi2wRiyxAAEUE7AyKi2wRyywNCotsEgssAAWRSMgLiBGiiNhOLErARQrLbBJLLAII0KwSCstsEossgAAQSstsEsssgABQSstsEwssgEAQSstsE0ssgEBQSstsE4ssgAAQistsE8ssgABQistsFAssgEAQistsFEssgEBQistsFIssgAAPistsFMssgABPistsFQssgEAPistsFUssgEBPistsFYssgAAQCstsFcssgABQCstsFgssgEAQCstsFkssgEBQCstsFossgAAQystsFsssgABQystsFwssgEAQystsF0ssgEBQystsF4ssgAAPystsF8ssgABPystsGAssgEAPystsGEssgEBPystsGIssDcrLrErARQrLbBjLLA3K7A7Ky2wZCywNyuwPCstsGUssAAWsDcrsD0rLbBmLLA4Ky6xKwEUKy2wZyywOCuwOystsGgssDgrsDwrLbBpLLA4K7A9Ky2waiywOSsusSsBFCstsGsssDkrsDsrLbBsLLA5K7A8Ky2wbSywOSuwPSstsG4ssDorLrErARQrLbBvLLA6K7A7Ky2wcCywOiuwPCstsHEssDorsD0rLbByLLMJBAIDRVghGyMhWUIrsAhlsAMkUHiwARUwLQBLuADIUlixAQGOWbABuQgACABjcLEABUKyAAEAKrEABUKzCgIBCCqxAAVCsw4AAQgqsQAGQroCwAABAAkqsQAHQroAQAABAAkqsQMARLEkAYhRWLBAiFixA2REsSYBiFFYugiAAAEEQIhjVFixAwBEWVlZWbMMAgEMKrgB/4WwBI2xAgBEAAA=) format('truetype')}#quads-add-new-ad:before{content:'\e801';text-decoration:none;color:#383838}#quads-add-new-ad{margin-left:3px;margin-top:5px;margin-bottom:20px}#quads-submit-button{z-index:999999}p.submit{float:left;padding-top:0;padding-bottom:0}.quads-delete-ad{clear:both;//background:url(../images/remove-icon.png);//background-size:20px 20px;//background-repeat:no-repeat;//height:20px;//padding-left:30px;margin-right:5px}.quads-delete-ad:before{content:'\e800';color:#383838}#backup-settings-textarea{width:580px;height:400px;font-family:Menlo,Monaco,monospace;background:0 0;white-space:normal;overflow:auto;display:block}@media (max-width:506px){.quads-banner-columns{display:block!important}.quads-banner-sidebar-second{width:100%!important}}@media (max-width:780px){.quads-banner-wrapper{margin-right:12px!important}}.quads-banner-wrapper{display:flex;flex-direction:column;clear:both;background:#fff;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 1px 0 rgba(0,0,0,.1);margin:5px 20px 2px 5px;padding:1px 12px}.quads-banner-content{display:flex;flex:1;color:#000}.quads-banner-columns{display:flex;flex:1;-ms-flex-align:center;-webkit-align-items:center;-webkit-box-align:center;align-items:center}.quads-banner-main{flex:1;order:2}.quads-banner-sidebar-first{min-width:160px;width:13%;order:1}.quads-banner-sidebar-second{width:19%;order:3}.quads-button-primary{display:inline-block;font-size:16px;line-height:32px;height:36px;margin:0;padding:0 13px 1px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;-webkit-border-radius:3px;border-radius:3px;white-space:nowrap;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;font-weight:700;background:#0085ba;border-color:#0073aa #006799 #006799;-webkit-box-shadow:0 1px 0 #006799;box-shadow:0 1px 0 #006799;color:#fff;text-decoration:none;text-shadow:0 -1px 1px #006799,1px 0 1px #006799,0 1px 1px #006799,-1px 0 1px #006799}.quads-notice-dismiss{display:inline-block;position:relative;top:0;right:1px;border:none;margin:0;padding:0;background:0 0;color:#72777c;cursor:pointer}.quads-notice-dismiss:before{display:inline-block;background:0 0;color:#72777c;content:"\f153";font:400 16px/20px dashicons;speak:none;height:20px;text-align:center;width:20px;-webkit-font-smoothing:antialiased}
|
assets/images/vi_quads_logo.png
ADDED
Binary file
|
assets/images/vi_quads_logo_1.png
ADDED
Binary file
|
includes/admin/admin-actions.php
CHANGED
@@ -1,43 +1,63 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Admin Actions
|
4 |
-
*
|
5 |
-
* @package QUADS
|
6 |
-
* @subpackage Admin/Actions
|
7 |
-
* @copyright Copyright (c) 2015, René Hermenau
|
8 |
-
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
9 |
-
* @since 1.0
|
10 |
-
*/
|
11 |
-
|
12 |
-
// Exit if accessed directly
|
13 |
-
if ( ! defined( 'ABSPATH' ) ) exit;
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Processes all QUADS actions sent via POST and GET by looking for the 'quads-action'
|
17 |
-
* request and running do_action() to call the function
|
18 |
-
*
|
19 |
-
* @since 1.0
|
20 |
-
* @return void
|
21 |
-
*/
|
22 |
-
function quads_process_actions() {
|
23 |
-
if ( isset( $_POST['quads-action'] ) ) {
|
24 |
-
do_action( 'quads_' . $_POST['quads-action'], $_POST );
|
25 |
-
}
|
26 |
-
|
27 |
-
if ( isset( $_GET['quads-action'] ) ) {
|
28 |
-
do_action( 'quads_' . $_GET['quads-action'], $_GET );
|
29 |
-
}
|
30 |
-
}
|
31 |
-
add_action( 'admin_init', 'quads_process_actions' );
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Update option quads_show_theme_notice
|
35 |
-
* "no" means no further upgrade notices are shown
|
36 |
-
*/
|
37 |
-
function quads_close_upgrade_notice(){
|
38 |
-
update_option ('quads_show_theme_notice', 'no');
|
39 |
-
}
|
40 |
-
add_action('quads_close_upgrade_notice', 'quads_close_upgrade_notice');
|
41 |
-
|
42 |
-
|
43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Admin Actions
|
4 |
+
*
|
5 |
+
* @package QUADS
|
6 |
+
* @subpackage Admin/Actions
|
7 |
+
* @copyright Copyright (c) 2015, René Hermenau
|
8 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
9 |
+
* @since 1.0
|
10 |
+
*/
|
11 |
+
|
12 |
+
// Exit if accessed directly
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Processes all QUADS actions sent via POST and GET by looking for the 'quads-action'
|
17 |
+
* request and running do_action() to call the function
|
18 |
+
*
|
19 |
+
* @since 1.0
|
20 |
+
* @return void
|
21 |
+
*/
|
22 |
+
function quads_process_actions() {
|
23 |
+
if ( isset( $_POST['quads-action'] ) ) {
|
24 |
+
do_action( 'quads_' . $_POST['quads-action'], $_POST );
|
25 |
+
}
|
26 |
+
|
27 |
+
if ( isset( $_GET['quads-action'] ) ) {
|
28 |
+
do_action( 'quads_' . $_GET['quads-action'], $_GET );
|
29 |
+
}
|
30 |
+
}
|
31 |
+
add_action( 'admin_init', 'quads_process_actions' );
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Update option quads_show_theme_notice
|
35 |
+
* "no" means no further upgrade notices are shown
|
36 |
+
*/
|
37 |
+
function quads_close_upgrade_notice(){
|
38 |
+
update_option ('quads_show_theme_notice', 'no');
|
39 |
+
}
|
40 |
+
add_action('quads_close_upgrade_notice', 'quads_close_upgrade_notice');
|
41 |
+
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Close vi notice and do not show again
|
45 |
+
*/
|
46 |
+
function quads_close_vi_notice(){
|
47 |
+
update_option ('quads_close_vi_notice', 'yes');
|
48 |
+
delete_option('quads_show_vi_notice_later');
|
49 |
+
}
|
50 |
+
add_action('quads_close_vi_notice', 'quads_close_vi_notice');
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Close vi update notice and show it one week later again
|
54 |
+
*/
|
55 |
+
function quads_show_vi_notice_later(){
|
56 |
+
$nextweek = time() + (7 * 24 * 60 * 60);
|
57 |
+
$human_date = date( 'Y-m-d h:i:s', $nextweek );
|
58 |
+
update_option( 'quads_show_vi_notice_later', $human_date );
|
59 |
+
update_option( 'quads_close_vi_notice', 'yes' );
|
60 |
+
|
61 |
+
}
|
62 |
+
add_action('quads_show_vi_notice_later', 'quads_show_vi_notice_later');
|
63 |
+
|
includes/admin/admin-notices.php
CHANGED
@@ -1,401 +1,449 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Admin Notices
|
4 |
-
*
|
5 |
-
* @package QUADS
|
6 |
-
* @subpackage Admin/Notices
|
7 |
-
* @copyright Copyright (c) 2015, René Hermenau
|
8 |
-
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
9 |
-
* @since 1.0.9
|
10 |
-
*/
|
11 |
-
// Exit if accessed directly
|
12 |
-
if( !defined( 'ABSPATH' ) )
|
13 |
-
exit;
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Admin Messages
|
17 |
-
*
|
18 |
-
* @since 2.2.3
|
19 |
-
* @global $mashsb_options Array of all the MASHSB Options
|
20 |
-
* @return void
|
21 |
-
*/
|
22 |
-
function quads_admin_messages() {
|
23 |
-
global $quads_options;
|
24 |
-
|
25 |
-
if( !current_user_can( 'update_plugins' ) ) {
|
26 |
-
return;
|
27 |
-
}
|
28 |
-
|
29 |
-
quads_theme_notice();
|
30 |
-
|
31 |
-
quads_update_notice();
|
32 |
-
|
33 |
-
quads_update_notice_v2();
|
34 |
-
|
35 |
-
quads_update_notice_1_5_3();
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
$
|
61 |
-
$
|
62 |
-
$
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
<li><a href="
|
74 |
-
<
|
75 |
-
<li><a href="javascript:void(0);" class="
|
76 |
-
<
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
jQuery(
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
}
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
}
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
*
|
136 |
-
* @
|
137 |
-
* @
|
138 |
-
*
|
139 |
-
* @
|
140 |
-
*
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
$
|
180 |
-
$
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
*
|
191 |
-
*
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
$message = __( "WP QUADS and WP QUADS Pro cannot be activated both. We've automatically deactivated WP QUADS
|
199 |
-
}
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
*
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
<
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
<
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
<
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
<
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
//
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
<
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
*
|
327 |
-
*
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
if
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
if
|
349 |
-
|
350 |
-
isset( $quads_options['
|
351 |
-
isset( $quads_options['
|
352 |
-
isset( $quads_options['
|
353 |
-
isset( $quads_options['
|
354 |
-
isset( $quads_options['
|
355 |
-
isset( $quads_options['
|
356 |
-
isset( $quads_options['
|
357 |
-
|
358 |
-
|
359 |
-
return true;
|
360 |
-
}
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
*
|
368 |
-
*
|
369 |
-
* @
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
*
|
383 |
-
*
|
384 |
-
* @
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Admin Notices
|
4 |
+
*
|
5 |
+
* @package QUADS
|
6 |
+
* @subpackage Admin/Notices
|
7 |
+
* @copyright Copyright (c) 2015, René Hermenau
|
8 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
9 |
+
* @since 1.0.9
|
10 |
+
*/
|
11 |
+
// Exit if accessed directly
|
12 |
+
if( !defined( 'ABSPATH' ) )
|
13 |
+
exit;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Admin Messages
|
17 |
+
*
|
18 |
+
* @since 2.2.3
|
19 |
+
* @global $mashsb_options Array of all the MASHSB Options
|
20 |
+
* @return void
|
21 |
+
*/
|
22 |
+
function quads_admin_messages() {
|
23 |
+
global $quads_options;
|
24 |
+
|
25 |
+
if( !current_user_can( 'update_plugins' ) || quads_is_addon_page() ) {
|
26 |
+
return;
|
27 |
+
}
|
28 |
+
|
29 |
+
quads_theme_notice();
|
30 |
+
|
31 |
+
quads_update_notice();
|
32 |
+
|
33 |
+
quads_update_notice_v2();
|
34 |
+
|
35 |
+
quads_update_notice_1_5_3();
|
36 |
+
|
37 |
+
echo quads_get_vi_notice();
|
38 |
+
|
39 |
+
if( quads_is_admin_page() ) {
|
40 |
+
echo '<div class="notice notice-error" id="wpquads-adblock-notice" style="display:none;">' . sprintf( __( '<strong><p>You need to deactivate your ad blocker to use WP QUADS settings.</strong> Your ad blocker browser extension is removing WP QUADS css ressources and is breaking the settings screen! Deactivating the ad blocker will resolve it. WP QUADS is used on 60.000 websites and is into focus of the big adblocking companies. That\'s the downside of our success but nothing you need to worry about.</p>', 'quick-adsense-reloaded' ), admin_url() . 'admin.php?page=quads-settings#quads_settingsgeneral_header' ) . '</div>';
|
41 |
+
}
|
42 |
+
|
43 |
+
if( !quads_is_any_ad_activated() && quads_is_admin_page() ) {
|
44 |
+
echo '<div class="notice notice-warning">' . sprintf( __( '<strong>No ads are activated!</strong> You need to assign at least 1 ad to an ad spot. Fix this in <a href="%s">General Settings</a>! Alternatively you need to use a shortcode in your posts or no ads are shown at all.', 'quick-adsense-reloaded' ), admin_url() . 'admin.php?page=quads-settings#quads_settingsgeneral_header' ) . '</div>';
|
45 |
+
}
|
46 |
+
|
47 |
+
if( quads_get_active_ads() === 0 && quads_is_admin_page() ) {
|
48 |
+
echo '<div class="notice notice-warning">' . sprintf( __( '<strong>No ads defined!</strong> You need to create at least one ad code. Fix this in <a href="%s">ADSENSE CODE</a>.', 'quick-adsense-reloaded' ), admin_url() . 'admin.php?page=quads-settings#quads_settingsadsense_header' ) . '</div>';
|
49 |
+
}
|
50 |
+
|
51 |
+
if( !quads_is_post_type_activated() && quads_is_admin_page() ) {
|
52 |
+
echo '<div class="notice notice-warning">' . sprintf( __( '<strong>No ads are shown - No post type chosen!</strong> You need to select at least 1 post type like <i>blog</i> or <i>page</i>. Fix this in <a href="%s">General Settings</a> or no ads are shown at all.', 'quick-adsense-reloaded' ), admin_url() . 'admin.php?page=quads-settings#quads_settingsgeneral_header' ) . '</div>';
|
53 |
+
}
|
54 |
+
|
55 |
+
if( isset( $_GET['quads-action'] ) && $_GET['quads-action'] === 'validate' && quads_is_admin_page() && quads_is_any_ad_activated() && quads_is_post_type_activated() && quads_get_active_ads() > 0 ) {
|
56 |
+
echo '<div class="notice notice-success">' . sprintf( __( '<strong>No errors detected in WP QUADS settings.</strong> If ads are still not shown read the <a href="%s" target="_blank">troubleshooting guide</a>' ), 'http://wpquads.com/docs/adsense-ads-are-not-showing/?utm_source=plugin&utm_campaign=wpquads-settings&utm_medium=website&utm_term=toplink' ) . '</div>';
|
57 |
+
}
|
58 |
+
|
59 |
+
|
60 |
+
$install_date = get_option( 'quads_install_date' );
|
61 |
+
$display_date = date( 'Y-m-d h:i:s' );
|
62 |
+
$datetime1 = new DateTime( $install_date );
|
63 |
+
$datetime2 = new DateTime( $display_date );
|
64 |
+
$diff_intrval = round( ($datetime2->format( 'U' ) - $datetime1->format( 'U' )) / (60 * 60 * 24) );
|
65 |
+
|
66 |
+
$rate = get_option( 'quads_rating_div', false);
|
67 |
+
if( $diff_intrval >= 7 && ($rate === "no" || false === $rate || quads_rate_again() ) ) {
|
68 |
+
echo '<div class="quads_fivestar updated " style="box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);background-color:white;">
|
69 |
+
<p>Awesome, you\'ve been using <strong>WP QUADS</strong> for more than 1 week. <br> May i ask you to give it a <strong>5-star rating</strong> on Wordpress? </br>
|
70 |
+
This will help to spread its popularity and to make this plugin a better one.
|
71 |
+
<br><br>Your help is much appreciated. Thank you very much,<br> ~René Hermenau
|
72 |
+
<ul>
|
73 |
+
<li><a href="https://wordpress.org/support/plugin/quick-adsense-reloaded/reviews/?filter=5#new-post" class="thankyou" target="_new" title="Ok, you deserved it" style="font-weight:bold;">Ok, you deserved it</a></li>
|
74 |
+
<li><a href="javascript:void(0);" class="quadsHideRating" title="I already did" style="font-weight:bold;">I already did</a></li>
|
75 |
+
<li><a href="javascript:void(0);" class="quadsHideRating" title="No, not good enough" style="font-weight:bold;">No, not good enough</a></li>
|
76 |
+
<br>
|
77 |
+
<li><a href="javascript:void(0);" class="quadsHideRatingWeek" title="No, not good enough" style="font-weight:bold;">I want to rate it later. Ask me again in a week!</a></li>
|
78 |
+
<li class="spinner" style="float:none;display:list-item;margin:0px;"></li>
|
79 |
+
</ul>
|
80 |
+
|
81 |
+
</div>
|
82 |
+
<script>
|
83 |
+
jQuery( document ).ready(function( $ ) {
|
84 |
+
|
85 |
+
jQuery(\'.quadsHideRating\').click(function(){
|
86 |
+
jQuery(".spinner").addClass("is-active");
|
87 |
+
var data={\'action\':\'quads_hide_rating\'}
|
88 |
+
jQuery.ajax({
|
89 |
+
|
90 |
+
url: "' . admin_url( 'admin-ajax.php' ) . '",
|
91 |
+
type: "post",
|
92 |
+
data: data,
|
93 |
+
dataType: "json",
|
94 |
+
async: !0,
|
95 |
+
success: function(e) {
|
96 |
+
if (e=="success") {
|
97 |
+
jQuery(".spinner").removeClass("is-active");
|
98 |
+
jQuery(\'.quads_fivestar\').slideUp(\'fast\');
|
99 |
+
|
100 |
+
}
|
101 |
+
}
|
102 |
+
});
|
103 |
+
})
|
104 |
+
|
105 |
+
jQuery(\'.quadsHideRatingWeek\').click(function(){
|
106 |
+
jQuery(".spinner").addClass("is-active");
|
107 |
+
var data={\'action\':\'quads_hide_rating_week\'}
|
108 |
+
jQuery.ajax({
|
109 |
+
|
110 |
+
url: "' . admin_url( 'admin-ajax.php' ) . '",
|
111 |
+
type: "post",
|
112 |
+
data: data,
|
113 |
+
dataType: "json",
|
114 |
+
async: !0,
|
115 |
+
success: function(e) {
|
116 |
+
if (e=="success") {
|
117 |
+
jQuery(".spinner").removeClass("is-active");
|
118 |
+
jQuery(\'.quads_fivestar\').slideUp(\'fast\');
|
119 |
+
|
120 |
+
}
|
121 |
+
}
|
122 |
+
});
|
123 |
+
})
|
124 |
+
|
125 |
+
});
|
126 |
+
</script>
|
127 |
+
';
|
128 |
+
}
|
129 |
+
}
|
130 |
+
|
131 |
+
add_action( 'admin_notices', 'quads_admin_messages' );
|
132 |
+
|
133 |
+
|
134 |
+
/* Hide the rating div
|
135 |
+
*
|
136 |
+
* @subpackage Admin/Notices
|
137 |
+
* @copyright Copyright (c) 2016, René Hermenau
|
138 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
139 |
+
* @since 1.0.9
|
140 |
+
*
|
141 |
+
* @return json string
|
142 |
+
*
|
143 |
+
*/
|
144 |
+
|
145 |
+
function quads_hide_rating_div() {
|
146 |
+
update_option( 'quads_rating_div', 'yes' );
|
147 |
+
delete_option( 'quads_date_next_notice' );
|
148 |
+
echo json_encode( array("success") );
|
149 |
+
exit;
|
150 |
+
}
|
151 |
+
add_action( 'wp_ajax_quads_hide_rating', 'quads_hide_rating_div' );
|
152 |
+
|
153 |
+
/**
|
154 |
+
* Write the timestamp when rating notice will be opened again
|
155 |
+
*/
|
156 |
+
function quads_hide_rating_notice_week() {
|
157 |
+
$nextweek = time() + (7 * 24 * 60 * 60);
|
158 |
+
$human_date = date( 'Y-m-d h:i:s', $nextweek );
|
159 |
+
update_option( 'quads_date_next_notice', $human_date );
|
160 |
+
update_option( 'quads_rating_div', 'yes' );
|
161 |
+
echo json_encode( array("success") );
|
162 |
+
exit;
|
163 |
+
}
|
164 |
+
|
165 |
+
add_action( 'wp_ajax_quads_hide_rating_week', 'quads_hide_rating_notice_week' );
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Check if admin notice will open again after one week of closing
|
169 |
+
* @return boolean
|
170 |
+
*/
|
171 |
+
function quads_rate_again() {
|
172 |
+
|
173 |
+
$rate_again_date = get_option( 'quads_date_next_notice' );
|
174 |
+
|
175 |
+
if( false === $rate_again_date ) {
|
176 |
+
return false;
|
177 |
+
}
|
178 |
+
|
179 |
+
$current_date = date( 'Y-m-d h:i:s' );
|
180 |
+
$datetime1 = new DateTime( $rate_again_date );
|
181 |
+
$datetime2 = new DateTime( $current_date );
|
182 |
+
$diff_intrval = round( ($datetime2->format( 'U' ) - $datetime1->format( 'U' )) / (60 * 60 * 24) );
|
183 |
+
|
184 |
+
if( $diff_intrval >= 0 ) {
|
185 |
+
return true;
|
186 |
+
}
|
187 |
+
}
|
188 |
+
|
189 |
+
/**
|
190 |
+
* Show a message when pro or free plugin gets disabled
|
191 |
+
*
|
192 |
+
* @return void
|
193 |
+
* @not used
|
194 |
+
*/
|
195 |
+
function quads_plugin_deactivated_notice() {
|
196 |
+
if( false !== ( $deactivated_notice_id = get_transient( 'quads_deactivated_notice_id' ) ) ) {
|
197 |
+
if( '1' === $deactivated_notice_id ) {
|
198 |
+
$message = __( "WP QUADS and WP QUADS Pro cannot be activated both. We've automatically deactivated WP QUADS.", 'wpstg' );
|
199 |
+
} else {
|
200 |
+
$message = __( "WP QUADS and WP QUADS Pro cannot be activated both. We've automatically deactivated WP QUADS Pro.", 'wpstg' );
|
201 |
+
}
|
202 |
+
?>
|
203 |
+
<div class="updated notice is-dismissible" style="border-left: 4px solid #ffba00;">
|
204 |
+
<p><?php echo esc_html( $message ); ?></p>
|
205 |
+
</div> <?php
|
206 |
+
delete_transient( 'quads_deactivated_notice_id' );
|
207 |
+
}
|
208 |
+
}
|
209 |
+
|
210 |
+
/**
|
211 |
+
* This notice is shown for user of the bimber and bunchy theme
|
212 |
+
*
|
213 |
+
* Not used at the moment
|
214 |
+
*/
|
215 |
+
function quads_theme_notice() {
|
216 |
+
|
217 |
+
$show_notice = get_option( 'quads_show_theme_notice' );
|
218 |
+
|
219 |
+
if( false !== $show_notice && 'no' !== $show_notice && quads_is_commercial_theme() ) {
|
220 |
+
$message = __( '<strong>Extend the' . quads_is_commercial_theme() . '</strong> theme with <strong>WP QUADS PRO!</strong><br>Save time and earn more - Bring your AdSense earnings to next level. <a href="http://wpquads.com?utm_campaign=adminnotice&utm_source=admin_notice&utm_medium=admin&utm_content=bimber_upgrade_notice" target="_blank"> Purchase Now</a> or <a href="http://wpquads.com?utm_campaign=free_plugin&utm_source=admin_notice&utm_medium=admin&utm_content=bimber_upgrade_notice" target="_blank">Get Details</a> <p> <a href="' . admin_url() . 'admin.php?page=quads-settings&quads-action=close_upgrade_notice" class="button">Close Notice</a>', 'quick-adsense-reloaded' );
|
221 |
+
?>
|
222 |
+
<div class="updated notice" style="border-left: 4px solid #ffba00;">
|
223 |
+
<p><?php echo $message; ?></p>
|
224 |
+
</div> <?php
|
225 |
+
//update_option ('quads_show_theme_notice', 'no');
|
226 |
+
}
|
227 |
+
}
|
228 |
+
|
229 |
+
/**
|
230 |
+
* This notice is shown after updating to 1.3.9
|
231 |
+
*
|
232 |
+
*/
|
233 |
+
function quads_update_notice() {
|
234 |
+
|
235 |
+
$show_notice = get_option( 'quads_show_update_notice' );
|
236 |
+
|
237 |
+
// do not do anything
|
238 |
+
if( false !== $show_notice ) {
|
239 |
+
return false;
|
240 |
+
}
|
241 |
+
|
242 |
+
if( (version_compare( QUADS_VERSION, '1.3.9', '>=' ) ) && quads_is_pro_active() && (version_compare( QUADS_PRO_VERSION, '1.3.0', '<' ) ) ) {
|
243 |
+
$message = sprintf( __( '<strong>WP QUADS ' . QUADS_VERSION . ': </strong> Update WP QUADS PRO to get custom post type support from <a href="%s">General Settings</a>.', 'quick-adsense-reloaded' ), admin_url() . 'admin.php?page=quads-settings' );
|
244 |
+
$message .= '<br><br><a href="' . admin_url() . 'admin.php?page=quads-settings&quads-action=hide_update_notice" class="button-primary thankyou" target="_self" title="Close Notice" style="font-weight:bold;">Close Notice</a>';
|
245 |
+
?>
|
246 |
+
<div class="updated notice" style="border-left: 4px solid #ffba00;">
|
247 |
+
<p><?php echo $message; ?></p>
|
248 |
+
</div> <?php
|
249 |
+
//update_option ('quads_show_update_notice', 'no');
|
250 |
+
} else
|
251 |
+
if( !quads_is_extra() ) {
|
252 |
+
$message = sprintf( __( '<strong>WP QUADS ' . QUADS_VERSION . ': </strong> Install <a href="%1s" target="_blank">WP QUADS PRO</a> to get custom post type support in <a href="%2s">General Settings</a>.', 'quick-adsense-reloaded' ), 'http://wpquads.com?utm_campaign=admin_notice&utm_source=admin_notice&utm_medium=admin&utm_content=custom_post_type', admin_url() . 'admin.php?page=quads-settings' );
|
253 |
+
$message .= '<br><br><a href="' . admin_url() . 'admin.php?page=quads-settings&quads-action=hide_update_notice" class="button-primary thankyou" target="_self" title="Close Notice" style="font-weight:bold;">Close Notice</a>';
|
254 |
+
?>
|
255 |
+
<div class="updated notice" style="border-left: 4px solid #ffba00;">
|
256 |
+
<p><?php echo $message; ?></p>
|
257 |
+
</div>
|
258 |
+
<?php
|
259 |
+
}
|
260 |
+
}
|
261 |
+
|
262 |
+
/**
|
263 |
+
* Show upgrade notice if wp quads pro is lower than 1.3.6
|
264 |
+
* @return boolean
|
265 |
+
*/
|
266 |
+
function quads_update_notice_v2(){
|
267 |
+
|
268 |
+
if( quads_is_pro_active() && (version_compare( QUADS_PRO_VERSION, '1.3.6', '<' ) ) ) {
|
269 |
+
$message = sprintf( __( 'You need to update <strong>WP QUADS PRO to version 1.3.6</strong> or higher. Your version of <strong>WP QUADS Pro</strong> is '.QUADS_PRO_VERSION. '.<br>WP QUADS Pro '.QUADS_PRO_VERSION.' supports unlimited amount of ads. <br>Updating requires a valid <a href="%s" target="_new">license key</a>.', 'quick-adsense-reloaded' ), 'https://wpquads.com/#buy-wpquads?utm_source=plugin_notice&utm_medium=admin&utm_campaign=activate_license' );
|
270 |
+
?>
|
271 |
+
<div class="notice notice-error">
|
272 |
+
<p><?php echo $message; ?></p>
|
273 |
+
</div> <?php
|
274 |
+
}
|
275 |
+
}
|
276 |
+
|
277 |
+
/**
|
278 |
+
* Show upgrade notice after updating from 1.5.2 to 1.5.3 and higher
|
279 |
+
* @return boolean
|
280 |
+
*/
|
281 |
+
function quads_update_notice_1_5_3(){
|
282 |
+
|
283 |
+
// do not show anything
|
284 |
+
if( false !== get_option( 'quads_hide_update_notice_1_5_3' )) {
|
285 |
+
return false;
|
286 |
+
}
|
287 |
+
|
288 |
+
$previous_version = get_option('quads_version_upgraded_from');
|
289 |
+
|
290 |
+
//wp_die(QUADS_VERSION);
|
291 |
+
|
292 |
+
// Show update message if previous version was lower than 1.7 - This makes sure that the message is shown for future updates without complicated version number conditions
|
293 |
+
if( !empty($previous_version) && version_compare( QUADS_VERSION, '1.7.0', '<=' ) ) {
|
294 |
+
|
295 |
+
$message = sprintf( __( 'This is a huge update! The data structure of WP QUADS has been modified and improved for better performance and great new features. <br> For the case you\'d experience issues, we made a <a href="%1s" target="_self">backup of previous WP QUADS data</a>. So you can <a href="%2s" target="_new">switch back to the previous version</a> anytime. <br><br>Please <a href="%3s" target="_new">open first a support ticket</a> if you experience any issue.', 'quick-adsense-reloaded' ), admin_url() . '?page=quads-settings&tab=help', 'https://wpquads.com/docs/install-older-plugin-version/?utm_source=plugin_notice&utm_medium=admin&utm_campaign=install_older_version', 'https://wordpress.org/support/plugin/quick-adsense-reloaded' );
|
296 |
+
?>
|
297 |
+
<div class="notice notice-error">
|
298 |
+
<p><?php echo $message; ?></p>
|
299 |
+
<?php
|
300 |
+
echo '<p><a href="' . admin_url() . 'admin.php?page=quads-settings&quads-action=hide_update_notice_1_5_3" class="button-primary" target="_self" title="Close Notice" style="font-weight:bold;">' . __('Close Notice','quick-adsense-reloaded') . '</a>';
|
301 |
+
?>
|
302 |
+
</div> <?php
|
303 |
+
}
|
304 |
+
}
|
305 |
+
|
306 |
+
|
307 |
+
/**
|
308 |
+
* Hide Notice and update db option quads_hide_notice
|
309 |
+
*/
|
310 |
+
function quads_hide_notice() {
|
311 |
+
update_option( 'quads_show_update_notice', 'no' );
|
312 |
+
}
|
313 |
+
|
314 |
+
add_action( 'quads_hide_update_notice', 'quads_hide_notice', 10 );
|
315 |
+
|
316 |
+
/**
|
317 |
+
* Set option to hide admin notice 1.5.3
|
318 |
+
* @return boolean
|
319 |
+
*/
|
320 |
+
function quads_hide_notice_1_5_3(){
|
321 |
+
update_option('quads_hide_update_notice_1_5_3', '1');
|
322 |
+
}
|
323 |
+
add_action('quads_hide_update_notice_1_5_3', 'quads_hide_notice_1_5_3');
|
324 |
+
|
325 |
+
/**
|
326 |
+
* Check if any ad is activated and assigned in general settings
|
327 |
+
*
|
328 |
+
* @global array $quads_options
|
329 |
+
* @return boolean
|
330 |
+
*/
|
331 |
+
function quads_is_any_ad_activated() {
|
332 |
+
global $quads_options;
|
333 |
+
|
334 |
+
// Check if custom positions location_settings is empty or does not exists
|
335 |
+
$check = array();
|
336 |
+
if( isset( $quads_options['location_settings'] ) ) {
|
337 |
+
foreach ( $quads_options['location_settings'] as $location_array ) {
|
338 |
+
if( isset( $location_array['status'] ) ) {
|
339 |
+
$check[] = $location_array['status'];
|
340 |
+
}
|
341 |
+
}
|
342 |
+
}
|
343 |
+
|
344 |
+
// ad activated with api (custom position)
|
345 |
+
if( count( $check ) > 0 ) {
|
346 |
+
return true;
|
347 |
+
}
|
348 |
+
// check if any other ad is assigned and activated
|
349 |
+
if( isset( $quads_options['pos1']['BegnAds'] ) ||
|
350 |
+
isset( $quads_options['pos2']['MiddAds'] ) ||
|
351 |
+
isset( $quads_options['pos3']['EndiAds'] ) ||
|
352 |
+
isset( $quads_options['pos4']['MoreAds'] ) ||
|
353 |
+
isset( $quads_options['pos5']['LapaAds'] ) ||
|
354 |
+
isset( $quads_options['pos6']['Par1Ads'] ) ||
|
355 |
+
isset( $quads_options['pos7']['Par2Ads'] ) ||
|
356 |
+
isset( $quads_options['pos8']['Par3Ads'] ) ||
|
357 |
+
isset( $quads_options['pos9']['Img1Ads'] )
|
358 |
+
) {
|
359 |
+
return true;
|
360 |
+
}
|
361 |
+
// no ad is activated
|
362 |
+
return false;
|
363 |
+
}
|
364 |
+
|
365 |
+
/**
|
366 |
+
* Check if any post type is enabled
|
367 |
+
*
|
368 |
+
* @global array $quads_options
|
369 |
+
* @return boolean
|
370 |
+
*/
|
371 |
+
function quads_is_post_type_activated() {
|
372 |
+
global $quads_options;
|
373 |
+
|
374 |
+
if( empty( $quads_options['post_types'] ) ) {
|
375 |
+
return false;
|
376 |
+
}
|
377 |
+
return true;
|
378 |
+
}
|
379 |
+
|
380 |
+
/**
|
381 |
+
* Check if ad codes are populated
|
382 |
+
*
|
383 |
+
* @global array $quads_options
|
384 |
+
* @return booleantrue if ads are empty
|
385 |
+
*/
|
386 |
+
function quads_ads_empty() {
|
387 |
+
global $quads_options;
|
388 |
+
|
389 |
+
$check = array();
|
390 |
+
|
391 |
+
for ( $i = 1; $i <= 10; $i++ ) {
|
392 |
+
if( !empty( $quads_options['ads']['ad' . $i]['code'] ) ) {
|
393 |
+
$check[] = 'true';
|
394 |
+
}
|
395 |
+
}
|
396 |
+
if( count( $check ) === 0 ) {
|
397 |
+
return true;
|
398 |
+
}
|
399 |
+
return false;
|
400 |
+
}
|
401 |
+
|
402 |
+
/**
|
403 |
+
* Return VI admin notice
|
404 |
+
* @return string
|
405 |
+
*/
|
406 |
+
function quads_get_vi_notice() {
|
407 |
+
if (false !== get_option ('quads_close_vi_notice') && false == quads_show_vi_notice_again() ) {
|
408 |
+
return false;
|
409 |
+
}
|
410 |
+
|
411 |
+
$content = __("Coming soon: the next update to <strong>WP QUADS</strong> – vi stories from video intelligence.
|
412 |
+
A video player that will supply both video content and video advertising. It will increase your revenue by up to 10x.
|
413 |
+
<a href='https://www.vi.ai/frequently-asked-questions-vi-stories-for-wordpress/?utm_source=WordPress&utm_medium=Plugin%20FAQ&utm_campaign=WP%20QUADS' target='_blank' rel='external nofollow'> FAQ</a>");
|
414 |
+
|
415 |
+
$html = '<div class="quads-banner-wrapper">
|
416 |
+
<section class="quads-banner-content">
|
417 |
+
<div class="quads-banner-columns">
|
418 |
+
<main class="quads-banner-main"><p>' . $content. '</p></main>
|
419 |
+
<aside class="quads-banner-sidebar-first"><p><img src="' . QUADS_PLUGIN_URL . 'assets/images/vi_quads_logo.png" width="152" height="70"></p></aside>
|
420 |
+
<aside class="quads-banner-sidebar-second"><p style="text-align:center;"><a href="https://www.vi.ai/frequently-asked-questions-vi-stories-for-wordpress/?utm_source=WordPress&utm_medium=Plugin%20FAQ&utm_campaign=WP%20QUADS" class="quads-button-primary" target="_blank" rel="external nofollow">Learn More</a><a href="'.admin_url().'admin.php?page=quads-settings&quads-action=show_vi_notice_later" style="line-height:25px;"><br>Show again later</a></p></aside>
|
421 |
+
</div>
|
422 |
+
<aside class="quads-banner-close"><div style="margin-top:5px;"><a href="'.admin_url().'admin.php?page=quads-settings&quads-action=close_vi_notice" class="quads-notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></a></div></aside>
|
423 |
+
</section>
|
424 |
+
</div>';
|
425 |
+
|
426 |
+
return $html;
|
427 |
+
}
|
428 |
+
|
429 |
+
/**
|
430 |
+
* Check if vi admin notice should be opened again again one week after closing
|
431 |
+
* @return boolean
|
432 |
+
*/
|
433 |
+
function quads_show_vi_notice_again() {
|
434 |
+
|
435 |
+
$show_again_date = get_option( 'quads_show_vi_notice_later' );
|
436 |
+
|
437 |
+
if( false === $show_again_date ) {
|
438 |
+
return false;
|
439 |
+
}
|
440 |
+
|
441 |
+
$current_date = date( 'Y-m-d h:i:s' );
|
442 |
+
$datetime1 = new DateTime( $show_again_date );
|
443 |
+
$datetime2 = new DateTime( $current_date );
|
444 |
+
$diff_intrval = round( ($datetime2->format( 'U' ) - $datetime1->format( 'U' )) / (60 * 60 * 24) );
|
445 |
+
|
446 |
+
if( $diff_intrval >= 0 ) {
|
447 |
+
return true;
|
448 |
+
}
|
449 |
+
}
|
includes/admin/admin-pages.php
CHANGED
@@ -1,85 +1,83 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Admin Pages
|
4 |
-
*
|
5 |
-
* @package QUADS
|
6 |
-
* @subpackage Admin/Pages
|
7 |
-
* @copyright Copyright (c) 2015, René Hermenau
|
8 |
-
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
9 |
-
* @since 2.0
|
10 |
-
*/
|
11 |
-
|
12 |
-
// Exit if accessed directly
|
13 |
-
if ( ! defined( 'ABSPATH' ) ) exit;
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Creates the admin submenu pages under the Quick AdSense Reloaded menu and assigns their
|
17 |
-
* links to global variables
|
18 |
-
*
|
19 |
-
* @since 1.0
|
20 |
-
* @global $quads_settings_page
|
21 |
-
* @global $quads_add_ons_page
|
22 |
-
* @return void
|
23 |
-
*/
|
24 |
-
function quads_add_options_link() {
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
$wpquads_logo ="PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjxzdmcgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgd2lkdGg9IjYxMS42OHB4IiBoZWlnaHQ9IjU0NXB4IiB2aWV3Qm94PSIwIDAgNjExLjY4IDU0NSIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgNjExLjY4IDU0NSIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQoJIDxzdHlsZT4uc3R5bGUwe2ZpbGw6I2ZmZjt9PC9zdHlsZT4NCjxnIGlkP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-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
}
|
85 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Admin Pages
|
4 |
+
*
|
5 |
+
* @package QUADS
|
6 |
+
* @subpackage Admin/Pages
|
7 |
+
* @copyright Copyright (c) 2015, René Hermenau
|
8 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
9 |
+
* @since 2.0
|
10 |
+
*/
|
11 |
+
|
12 |
+
// Exit if accessed directly
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Creates the admin submenu pages under the Quick AdSense Reloaded menu and assigns their
|
17 |
+
* links to global variables
|
18 |
+
*
|
19 |
+
* @since 1.0
|
20 |
+
* @global $quads_settings_page
|
21 |
+
* @global $quads_add_ons_page
|
22 |
+
* @return void
|
23 |
+
*/
|
24 |
+
function quads_add_options_link() {
|
25 |
+
global $quads_options, $quads_parent_page, $quads_add_ons_page, $quads_add_ons_page2, $quads_settings_page;
|
26 |
+
|
27 |
+
$label = quads_is_extra() ? 'WP QUADS PRO' : 'WP QUADS';
|
28 |
+
|
29 |
+
$create_settings = isset($quads_options['create_settings']) ? true : false;
|
30 |
+
if ($create_settings) {
|
31 |
+
$quads_settings_page = add_submenu_page('options-general.php', __('WP QUADS Settings', 'quick-adsense-reloaded'), __('WPQUADS', 'quick-adsense-reloaded'), 'manage_options', 'quads-settings', 'quads_options_page');
|
32 |
+
} else {
|
33 |
+
$wpquads_logo = "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjxzdmcgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiI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QUlBQUFBZGZ2UmRBQUFBQ1hCSVdYTUFBQXNTQUFBTEVnSFMzWDc4QUFBQQpHWFJGV0hSVGIyWjBkMkZ5WlFCQlpHOWlaU0JKYldGblpWSmxZV1I1Y2NsbFBBQUFBWDlKUkVGVWVOcnN6MEVSQUFBSUF5RFhQL1JzCjRjT0RCcVR0ZkJReE1URXhNVEV4TVRFeE1URXhNVEV4TVRFeE1URXhNVEV4TVRFeE1URXhNVEV4TVRFeE1URXhNVEV4TVRFeE1URXgKTVRFeE1URXhNVEV4TVRFeE1URXhNVEV4TVRFeE1URXhNVEV4TVRFeE1URXhNVEV4TVRFeE1URXhNVEV4TVRFeE1URXhNVEV4TVRFeApNVEV4TVRFeE1URXhNVEV4TVRFeE1URXhNVEV4TVRFeE1URXhNVEV4TVRFeE1URXhNVEV4TVRFeE1URXhNVEV4TVRFeE1URXhNVEV4Ck1URXhNVEV4TVRFeE1URXhNVEV4TVRFeE1URXhNVEV4TVRFeE1URXhNVEV4TVRFeE1URXhNVEV4TVRFeE1URXhNVEV4TVRFeE1URXgKTVRFeE1URXhNVEV4TVRFeE1URXhNVEV4TVRFeE1URXhNVEV4TVRFeE1URXhNVEV4TVRFeE1URXhNVEV4TVRFeE1URXhNVEV4TVRFeApNVEV4TVRFeE1URXhNVEV4TVRFeE1URXhNVEV4TVRFeE1URXhNVEV4TVRFeE1URXhNVEV4TVRFeE1URXhNVEV4TVRFeE1URXhNVEV4Ck1URXhNVEV4TVRFeE1URXhNVEV4TVRHeE95dkFBRTYvNlBYS29tdGZBQUFBQUVsRlRrU3VRbUNDIiB0cmFuc2Zvcm09Im1hdHJpeCgxIDAgMCAxIDUzNiAwKSI+DQoJPC9pbWFnZT4NCjwvZz4NCjwvc3ZnPg0K
|
34 |
+
";
|
35 |
+
$quads_parent_page = add_menu_page('Quick AdSense Reloaded Settings', $label, 'manage_options', 'quads-settings', 'quads_options_page', 'data:image/svg+xml;base64,' . $wpquads_logo);
|
36 |
+
$quads_settings_page = add_submenu_page('quads-settings', __('Ad Settings', 'quick-adsense-reloaded'), 'Ad Settings', 'manage_options', 'quads-settings', 'quads_options_page');
|
37 |
+
|
38 |
+
if (!quads_is_extra()) {
|
39 |
+
$quads_add_ons_page = add_submenu_page('quads-settings', __('Get Add-On', 'quick-adsense-reloaded'), 'Get WP QUADS PRO', 'manage_options', 'quads-addons', 'quads_add_ons_page');
|
40 |
+
}
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
add_action( 'admin_menu', 'quads_add_options_link', 10 );
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Determines whether the current admin page is an QUADS admin page.
|
48 |
+
*
|
49 |
+
* Only works after the `wp_loaded` hook, & most effective
|
50 |
+
* starting on `admin_menu` hook.
|
51 |
+
*
|
52 |
+
* @since 1.9.6
|
53 |
+
* @return bool True if QUADS admin page.
|
54 |
+
*/
|
55 |
+
function quads_is_admin_page() {
|
56 |
+
$currentpage = isset($_GET['page']) ? $_GET['page'] : '';
|
57 |
+
if ( ! is_admin() || ! did_action( 'wp_loaded' ) ) {
|
58 |
+
return false;
|
59 |
+
}
|
60 |
+
|
61 |
+
if ( 'quads-settings' == $currentpage ) {
|
62 |
+
return true;
|
63 |
+
}
|
64 |
+
}
|
65 |
+
/**
|
66 |
+
* Determines whether the current admin page is an QUADS add-on page.
|
67 |
+
*
|
68 |
+
* Only works after the `wp_loaded` hook, & most effective
|
69 |
+
* starting on `admin_menu` hook.
|
70 |
+
*
|
71 |
+
* @since 1.4.9
|
72 |
+
* @return bool True if QUADS admin page.
|
73 |
+
*/
|
74 |
+
function quads_is_addon_page() {
|
75 |
+
$currentpage = isset($_GET['page']) ? $_GET['page'] : '';
|
76 |
+
if ( ! is_admin() || ! did_action( 'wp_loaded' ) ) {
|
77 |
+
return false;
|
78 |
+
}
|
79 |
+
|
80 |
+
if ( 'quads-addons' == $currentpage ) {
|
81 |
+
return true;
|
82 |
+
}
|
83 |
+
}
|
|
|
|
includes/admin/settings/display-settings.php
CHANGED
@@ -1,349 +1,350 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Admin Options Page
|
4 |
-
*
|
5 |
-
* @package QUADS
|
6 |
-
* @subpackage Admin/Settings
|
7 |
-
* @copyright Copyright (c) 2015, René Hermenau
|
8 |
-
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
9 |
-
* @since 1.0
|
10 |
-
*/
|
11 |
-
|
12 |
-
// Exit if accessed directly
|
13 |
-
if ( ! defined( 'ABSPATH' ) ) exit;
|
14 |
-
|
15 |
-
/* Returns list elements for jQuery tab navigation
|
16 |
-
* based on header callback
|
17 |
-
*
|
18 |
-
* @since 2.1.2
|
19 |
-
* @todo Use sprintf to sanitize $field['id'] instead using str_replace() Should be much faster?
|
20 |
-
* @return string
|
21 |
-
*/
|
22 |
-
|
23 |
-
function quads_get_tab_header($page, $section){
|
24 |
-
global $quads_options;
|
25 |
-
global $wp_settings_fields;
|
26 |
-
|
27 |
-
if (!isset($wp_settings_fields[$page][$section]))
|
28 |
-
return;
|
29 |
-
|
30 |
-
echo '<ul>';
|
31 |
-
foreach ((array) $wp_settings_fields[$page][$section] as $field) {
|
32 |
-
$sanitizedID = str_replace('[', '', $field['id'] );
|
33 |
-
$sanitizedID = str_replace(']', '', $sanitizedID );
|
34 |
-
if ( strpos($field['callback'],'header') !== false && !quads_is_excluded(array('help', 'licenses') ) ) {
|
35 |
-
echo '<li class="quads-tabs"><a href="#' . $sanitizedID . '">' . $field['title'] .'</a></li>';
|
36 |
-
}
|
37 |
-
}
|
38 |
-
echo '</ul>';
|
39 |
-
}
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Check if current page is excluded
|
43 |
-
*
|
44 |
-
* @param array $pages
|
45 |
-
* @return boolean
|
46 |
-
*/
|
47 |
-
function quads_is_excluded($pages){
|
48 |
-
if (isset($_GET['tab'])){
|
49 |
-
$currentpage = $_GET['tab'];
|
50 |
-
if (isset($currentpage) && in_array($currentpage, $pages))
|
51 |
-
return true;
|
52 |
-
}
|
53 |
-
}
|
54 |
-
|
55 |
-
/**
|
56 |
-
* Print out the settings fields for a particular settings section
|
57 |
-
*
|
58 |
-
* Part of the Settings API. Use this in a settings page to output
|
59 |
-
* a specific section. Should normally be called by do_settings_sections()
|
60 |
-
* rather than directly.
|
61 |
-
*
|
62 |
-
* @global $wp_settings_fields Storage array of settings fields and their pages/sections
|
63 |
-
* @return string
|
64 |
-
*
|
65 |
-
* @since 2.1.2
|
66 |
-
*
|
67 |
-
* @param string $page Slug title of the admin page who's settings fields you want to show.
|
68 |
-
* @param section $section Slug title of the settings section who's fields you want to show.
|
69 |
-
*
|
70 |
-
* Copied from WP Core 4.0 /wp-admin/includes/template.php do_settings_fields()
|
71 |
-
* We use our own function to be able to create jQuery tabs with easytabs()
|
72 |
-
*
|
73 |
-
* We dont use tables here any longer. Are we stuck in the nineties?
|
74 |
-
* @todo Use sprintf to sanitize $field['id'] instead using str_replace() Should be faster?
|
75 |
-
* @todo some media queries for better responisbility
|
76 |
-
*/
|
77 |
-
function quads_do_settings_fields($page, $section) {
|
78 |
-
global $wp_settings_fields;
|
79 |
-
$header = false;
|
80 |
-
$firstHeader = false;
|
81 |
-
|
82 |
-
if (!isset($wp_settings_fields[$page][$section]))
|
83 |
-
return;
|
84 |
-
|
85 |
-
// Check first if any callback header registered
|
86 |
-
foreach ((array) $wp_settings_fields[$page][$section] as $field) {
|
87 |
-
strpos($field['callback'],'header') !== false ? $header = true : $header = false;
|
88 |
-
|
89 |
-
if ($header === true)
|
90 |
-
break;
|
91 |
-
}
|
92 |
-
|
93 |
-
foreach ((array) $wp_settings_fields[$page][$section] as $field) {
|
94 |
-
|
95 |
-
$sanitizedID = str_replace('[', '', $field['id'] );
|
96 |
-
$sanitizedID = str_replace(']', '', $sanitizedID );
|
97 |
-
|
98 |
-
// Check if header has been created previously
|
99 |
-
if (strpos($field['callback'],'header') !== false && $firstHeader === false) {
|
100 |
-
|
101 |
-
echo '<div id="' . $sanitizedID . '">';
|
102 |
-
echo '<table class="quads-form-table"><tbody>';
|
103 |
-
$firstHeader = true;
|
104 |
-
|
105 |
-
} elseif (strpos($field['callback'],'header') !== false && $firstHeader === true) {
|
106 |
-
// Header has been created previously so we have to close the first opened div
|
107 |
-
echo '</table></div><div id="' . $sanitizedID . '">';
|
108 |
-
echo '<table class="quads-form-table"><tbody>';
|
109 |
-
}
|
110 |
-
|
111 |
-
if (!empty($field['args']['label_for']) && !quads_is_excluded_title( $field['args']['id'] )){
|
112 |
-
echo '<tr class="quads-row">';
|
113 |
-
echo '<td class="quads-row th">';
|
114 |
-
echo '<label for="' . esc_attr($field['args']['label_for']) . '">' . $field['title'] . '</label>';
|
115 |
-
echo '</td></tr>';
|
116 |
-
}else if (!empty($field['title']) && !quads_is_excluded_title( $field['args']['id'] ) && !empty($field['args']['helper-desc'])){
|
117 |
-
echo '<tr class="quads-row">';
|
118 |
-
echo '<td class="quads-row th">';
|
119 |
-
echo '<div class="col-title">' . $field['title'] . '<a class="quads-general-helper" href="#"></a><div class="quads-message">' . $field['args']['helper-desc']. '</div></div>';
|
120 |
-
echo '</td></tr>';
|
121 |
-
}else if (!empty($field['title']) && !quads_is_excluded_title( $field['args']['id'] ) ){
|
122 |
-
echo '<tr class="quads-row">';
|
123 |
-
echo '<td class="quads-row th">';
|
124 |
-
echo '<div class="col-title">' . $field['title'] . '</div>';
|
125 |
-
echo '</td></tr>';
|
126 |
-
}
|
127 |
-
|
128 |
-
else {
|
129 |
-
echo '';
|
130 |
-
}
|
131 |
-
|
132 |
-
|
133 |
-
echo '<tr><td>';
|
134 |
-
call_user_func($field['callback'], $field['args']);
|
135 |
-
echo '</td></tr>';
|
136 |
-
}
|
137 |
-
echo '</tbody></table>';
|
138 |
-
if ($header === true){
|
139 |
-
echo '</div>';
|
140 |
-
}
|
141 |
-
}
|
142 |
-
|
143 |
-
/**
|
144 |
-
* If title is one of these entries do not show it
|
145 |
-
*/
|
146 |
-
function quads_is_excluded_title($string){
|
147 |
-
$haystack = array('ad1','ad2','ad3','ad4','ad5','ad6','ad7','ad8','ad9','ad10',
|
148 |
-
'ad1_widget',
|
149 |
-
'ad2_widget',
|
150 |
-
'ad3_widget',
|
151 |
-
'ad4_widget',
|
152 |
-
'ad5_widget',
|
153 |
-
'ad6_widget',
|
154 |
-
'ad7_widget',
|
155 |
-
'ad8_widget',
|
156 |
-
'ad9_widget',
|
157 |
-
'ad10_widget'
|
158 |
-
);
|
159 |
-
|
160 |
-
if (in_array($string, $haystack)){
|
161 |
-
return true;
|
162 |
-
}
|
163 |
-
return false;
|
164 |
-
}
|
165 |
-
|
166 |
-
/**
|
167 |
-
* Options Page
|
168 |
-
*
|
169 |
-
* Renders the options page contents.
|
170 |
-
*
|
171 |
-
* @since 1.0
|
172 |
-
* @global $quads_options Array of all the QUADS Options
|
173 |
-
* @return void
|
174 |
-
*/
|
175 |
-
function quads_options_page() {
|
176 |
-
global $quads_options;
|
177 |
-
|
178 |
-
$active_tab = isset( $_GET[ 'tab' ] ) && array_key_exists( $_GET['tab'], quads_get_settings_tabs() ) ? $_GET[ 'tab' ] : 'general';
|
179 |
-
|
180 |
-
ob_start();
|
181 |
-
?>
|
182 |
-
<div class="wrap quads_admin">
|
183 |
-
<h1 style="text-align:center;"> <?php echo QUADS_NAME . ' ' . QUADS_VERSION; ?></h1>
|
184 |
-
<div class="about-text" style="font-weight: 400;line-height: 1.6em;text-align:center;">
|
185 |
-
<div class='quads-share-button-container'>
|
186 |
-
<div class='quads-share-button quads-share-button-twitter' data-share-url="https://wordpress.org/plugins/quick-adsense-reloaded">
|
187 |
-
<div clas='box'>
|
188 |
-
<a href="https://twitter.com/share?url=http://wpquads.com&text=WPQUADS+-+The quickest+and+most+easiest+way+to+integrate+AdSense+into+WordPress+websites+@wpquads" target='_blank'>
|
189 |
-
<span class='quads-share'><?php echo __('Shout out a tweet','quick-adsense-reloaded'); ?></span>
|
190 |
-
</a>
|
191 |
-
</div>
|
192 |
-
</div>
|
193 |
-
<div class="quads-share-button quads-share-button-facebook" data-share-url="https://wordpress.org/plugins/quick-adsense-reloaded">
|
194 |
-
<div class="box">
|
195 |
-
<a href="https://www.facebook.com/sharer/sharer.php?u=http://wpquads.com" target="_blank">
|
196 |
-
<span class='quads-share'><?php echo __('Share on Facebook','quick-adsense-reloaded'); ?></span>
|
197 |
-
</a>
|
198 |
-
</div>
|
199 |
-
</div>
|
200 |
-
</div>
|
201 |
-
</div>
|
202 |
-
<h2 class="nav-tab-wrapper">
|
203 |
-
<?php
|
204 |
-
foreach( quads_get_settings_tabs() as $tab_id => $tab_name ) {
|
205 |
-
|
206 |
-
$tab_url = esc_url(add_query_arg( array(
|
207 |
-
'settings-updated' => false,
|
208 |
-
'tab' => $tab_id
|
209 |
-
) ));
|
210 |
-
|
211 |
-
$active = $active_tab == $tab_id ? ' nav-tab-active' : '';
|
212 |
-
|
213 |
-
echo '<a href="' . esc_url( $tab_url ) . '" title="' . esc_attr( $tab_name ) . '" class="nav-tab' . $active . '">';
|
214 |
-
echo esc_html( $tab_name );
|
215 |
-
echo '</a>';
|
216 |
-
}
|
217 |
-
?>
|
218 |
-
</h2>
|
219 |
-
<div id="quads_tab_container" class="quads_tab_container">
|
220 |
-
<?php quads_get_tab_header( 'quads_settings_' . $active_tab, 'quads_settings_' . $active_tab ); ?>
|
221 |
-
<div class="quads-panel-container"> <!-- new //-->
|
222 |
-
<form method="post" action="options.php" id="quads_settings">
|
223 |
-
|
224 |
-
<?php
|
225 |
-
settings_fields( 'quads_settings' );
|
226 |
-
quads_do_settings_fields( 'quads_settings_' . $active_tab, 'quads_settings_' . $active_tab );
|
227 |
-
?>
|
228 |
-
<!--</table>-->
|
229 |
-
|
230 |
-
<?php settings_errors(); ?>
|
231 |
-
<?php
|
232 |
-
// do not show save button on add-on page
|
233 |
-
if ($active_tab !== 'addons' && $active_tab !== 'imexport' && $active_tab !== 'help'){
|
234 |
-
$other_attributes = array( 'id' => 'quads-submit-button' );
|
235 |
-
submit_button(null, 'primary', 'quads-save-settings' , true, $other_attributes );
|
236 |
-
if ($active_tab !== 'licenses'){
|
237 |
-
?>
|
238 |
-
<a href="<?php echo admin_url() . '/admin.php?page=quads-settings&quads-action=validate'; ?> " id="quads-validate"><?php _e('Validate Ad Settings','quick-adsense-reloaded')?></a>
|
239 |
-
<?php
|
240 |
-
}
|
241 |
-
|
242 |
-
}
|
243 |
-
?>
|
244 |
-
</form>
|
245 |
-
<?php
|
246 |
-
if ($active_tab !== 'addons' && $active_tab !== 'licenses'){
|
247 |
-
echo sprintf( __( '<strong>If you like this plugin please do us a BIG favor and give us a 5 star rating <a href="%s" target="_blank">here</a> . If you have issues, open a <a href="%2s" target="_blank">support ticket</a>, so that we can sort it out. Thank you!</strong>', 'quick-adsense-reloaded' ),
|
248 |
-
'https://wordpress.org/support/plugin/quick-adsense-reloaded/reviews/#new-post',
|
249 |
-
'http://wpquads.com/support/'
|
250 |
-
);
|
251 |
-
echo '<p>' . sprintf( __( '<strong>Ads are not showing? Read the <a href="%s" target="_blank">troubleshooting guide</a> to find out how to resolve it.', 'quick-adsense-reloaded' ),
|
252 |
-
'http://wpquads.com/docs/adsense-ads-are-not-showing/?utm_source=plugin&utm_campaign=wpquads-settings&utm_medium=website&utm_term=bottomlink'
|
253 |
-
);
|
254 |
-
}
|
255 |
-
?>
|
256 |
-
</div> <!-- new //-->
|
257 |
-
<?php quads_get_advertising(); ?>
|
258 |
-
</div><!-- #tab_container-->
|
259 |
-
<div id="quads-save-result"></div>
|
260 |
-
<div class="quads-admin-debug"><?php echo quads_get_debug_messages(); ?></div>
|
261 |
-
<?php echo quads_render_adsense_form(); ?>
|
262 |
-
</div><!-- .wrap -->
|
263 |
-
<?php
|
264 |
-
echo ob_get_clean();
|
265 |
-
}
|
266 |
-
|
267 |
-
function quads_get_debug_messages(){
|
268 |
-
global $quads_options;
|
269 |
-
|
270 |
-
if (isset($quads_options['debug_mode'])){
|
271 |
-
echo '<pre style="clear:both;">';
|
272 |
-
var_dump($quads_options);
|
273 |
-
echo '</pre>';
|
274 |
-
}
|
275 |
-
}
|
276 |
-
|
277 |
-
/**
|
278 |
-
* Render ad and return it when plugin is not pro version
|
279 |
-
* @return string
|
280 |
-
*/
|
281 |
-
function quads_get_advertising() {
|
282 |
-
|
283 |
-
if ( quads_is_extra() ){
|
284 |
-
return '';
|
285 |
-
}
|
286 |
-
ob_start();
|
287 |
-
?>
|
288 |
-
<div class="quads-panel-sidebar" style="float:left;min-width: 301px;margin-left: 1px;margin-top:0px;">
|
289 |
-
<a href="http://wpquads.com/?utm_source=wpquads&utm_medium=banner&utm_term=click-quads&utm_campaign=wpquads" target="_blank">
|
290 |
-
<img src="<?php echo QUADS_PLUGIN_URL . '/assets/images/quads_banner_250x521_buy.png'; ?>">
|
291 |
-
</a>
|
292 |
-
<br>
|
293 |
-
<a style="display:block;" href="http://demo.clickfraud-monitoring.com/?utm_source=wpquads&utm_medium=banner&utm_term=click-cfm&utm_campaign=wpquads" target="_blank">
|
294 |
-
<img src="<?php echo QUADS_PLUGIN_URL . '/assets/images/banner_250x296-cfm.png'; ?>">
|
295 |
-
</a>
|
296 |
-
</div>
|
297 |
-
<?php
|
298 |
-
echo ob_get_clean();
|
299 |
-
}
|
300 |
-
|
301 |
-
/**
|
302 |
-
* Render social buttons
|
303 |
-
*
|
304 |
-
* @return void
|
305 |
-
*/
|
306 |
-
function quads_render_social(){
|
307 |
-
ob_start()?>
|
308 |
-
|
309 |
-
<div class='quads-share-button-container'>
|
310 |
-
<div class='quads-share-button quads-share-button-twitter' data-share-url="https://wordpress.org/plugins/quick-adsense-reloaded">
|
311 |
-
<div clas='box'>
|
312 |
-
<a href="https://twitter.com/share?url=https://wordpress.org/plugins/quick-adsense-reloaded&text=Quick%20AdSense%20reloaded%20-%20a%20brand%20new%20fork%20of%20the%20popular%20AdSense%20Plugin%20Quick%20Adsense!" target='_blank'>
|
313 |
-
<span class='quads-share'><?php echo __('Tweet','quick-adsense-reloaded'); ?></span>
|
314 |
-
</a>
|
315 |
-
</div>
|
316 |
-
</div>
|
317 |
-
|
318 |
-
<div class="quads-share-button quads-share-button-facebook" data-share-url="https://wordpress.org/plugins/quick-adsense-reloaded">
|
319 |
-
<div class="box">
|
320 |
-
<a href="https://www.facebook.com/sharer/sharer.php?u=https://wordpress.org/plugins/quick-adsense-reloaded" target="_blank">
|
321 |
-
<span class='quads-share'><?php echo __('Share','quick-adsense-reloaded'); ?></span>
|
322 |
-
</a>
|
323 |
-
</div>
|
324 |
-
</div>
|
325 |
-
</div>
|
326 |
-
|
327 |
-
<?php
|
328 |
-
echo ob_get_clean();
|
329 |
-
}
|
330 |
-
|
331 |
-
|
332 |
-
/**
|
333 |
-
* Render AdSense Form
|
334 |
-
*/
|
335 |
-
function quads_render_adsense_form(){
|
336 |
-
|
337 |
-
?>
|
338 |
-
<div id="quads-adsense-bg-div" style="display: none;">
|
339 |
-
<div id="quads-adsense-container">
|
340 |
-
<h3><?php _e( 'Copy ad code from AdSense account and paste it here', 'quick-adsense-reloaded' ); ?></h3>
|
341 |
-
<
|
342 |
-
<
|
343 |
-
<button class="button button-
|
344 |
-
<
|
345 |
-
<
|
346 |
-
|
347 |
-
</div>
|
348 |
-
|
349 |
-
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Admin Options Page
|
4 |
+
*
|
5 |
+
* @package QUADS
|
6 |
+
* @subpackage Admin/Settings
|
7 |
+
* @copyright Copyright (c) 2015, René Hermenau
|
8 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
9 |
+
* @since 1.0
|
10 |
+
*/
|
11 |
+
|
12 |
+
// Exit if accessed directly
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
14 |
+
|
15 |
+
/* Returns list elements for jQuery tab navigation
|
16 |
+
* based on header callback
|
17 |
+
*
|
18 |
+
* @since 2.1.2
|
19 |
+
* @todo Use sprintf to sanitize $field['id'] instead using str_replace() Should be much faster?
|
20 |
+
* @return string
|
21 |
+
*/
|
22 |
+
|
23 |
+
function quads_get_tab_header($page, $section){
|
24 |
+
global $quads_options;
|
25 |
+
global $wp_settings_fields;
|
26 |
+
|
27 |
+
if (!isset($wp_settings_fields[$page][$section]))
|
28 |
+
return;
|
29 |
+
|
30 |
+
echo '<ul>';
|
31 |
+
foreach ((array) $wp_settings_fields[$page][$section] as $field) {
|
32 |
+
$sanitizedID = str_replace('[', '', $field['id'] );
|
33 |
+
$sanitizedID = str_replace(']', '', $sanitizedID );
|
34 |
+
if ( strpos($field['callback'],'header') !== false && !quads_is_excluded(array('help', 'licenses') ) ) {
|
35 |
+
echo '<li class="quads-tabs"><a href="#' . $sanitizedID . '">' . $field['title'] .'</a></li>';
|
36 |
+
}
|
37 |
+
}
|
38 |
+
echo '</ul>';
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Check if current page is excluded
|
43 |
+
*
|
44 |
+
* @param array $pages
|
45 |
+
* @return boolean
|
46 |
+
*/
|
47 |
+
function quads_is_excluded($pages){
|
48 |
+
if (isset($_GET['tab'])){
|
49 |
+
$currentpage = $_GET['tab'];
|
50 |
+
if (isset($currentpage) && in_array($currentpage, $pages))
|
51 |
+
return true;
|
52 |
+
}
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Print out the settings fields for a particular settings section
|
57 |
+
*
|
58 |
+
* Part of the Settings API. Use this in a settings page to output
|
59 |
+
* a specific section. Should normally be called by do_settings_sections()
|
60 |
+
* rather than directly.
|
61 |
+
*
|
62 |
+
* @global $wp_settings_fields Storage array of settings fields and their pages/sections
|
63 |
+
* @return string
|
64 |
+
*
|
65 |
+
* @since 2.1.2
|
66 |
+
*
|
67 |
+
* @param string $page Slug title of the admin page who's settings fields you want to show.
|
68 |
+
* @param section $section Slug title of the settings section who's fields you want to show.
|
69 |
+
*
|
70 |
+
* Copied from WP Core 4.0 /wp-admin/includes/template.php do_settings_fields()
|
71 |
+
* We use our own function to be able to create jQuery tabs with easytabs()
|
72 |
+
*
|
73 |
+
* We dont use tables here any longer. Are we stuck in the nineties?
|
74 |
+
* @todo Use sprintf to sanitize $field['id'] instead using str_replace() Should be faster?
|
75 |
+
* @todo some media queries for better responisbility
|
76 |
+
*/
|
77 |
+
function quads_do_settings_fields($page, $section) {
|
78 |
+
global $wp_settings_fields;
|
79 |
+
$header = false;
|
80 |
+
$firstHeader = false;
|
81 |
+
|
82 |
+
if (!isset($wp_settings_fields[$page][$section]))
|
83 |
+
return;
|
84 |
+
|
85 |
+
// Check first if any callback header registered
|
86 |
+
foreach ((array) $wp_settings_fields[$page][$section] as $field) {
|
87 |
+
strpos($field['callback'],'header') !== false ? $header = true : $header = false;
|
88 |
+
|
89 |
+
if ($header === true)
|
90 |
+
break;
|
91 |
+
}
|
92 |
+
|
93 |
+
foreach ((array) $wp_settings_fields[$page][$section] as $field) {
|
94 |
+
|
95 |
+
$sanitizedID = str_replace('[', '', $field['id'] );
|
96 |
+
$sanitizedID = str_replace(']', '', $sanitizedID );
|
97 |
+
|
98 |
+
// Check if header has been created previously
|
99 |
+
if (strpos($field['callback'],'header') !== false && $firstHeader === false) {
|
100 |
+
|
101 |
+
echo '<div id="' . $sanitizedID . '">';
|
102 |
+
echo '<table class="quads-form-table"><tbody>';
|
103 |
+
$firstHeader = true;
|
104 |
+
|
105 |
+
} elseif (strpos($field['callback'],'header') !== false && $firstHeader === true) {
|
106 |
+
// Header has been created previously so we have to close the first opened div
|
107 |
+
echo '</table></div><div id="' . $sanitizedID . '">';
|
108 |
+
echo '<table class="quads-form-table"><tbody>';
|
109 |
+
}
|
110 |
+
|
111 |
+
if (!empty($field['args']['label_for']) && !quads_is_excluded_title( $field['args']['id'] )){
|
112 |
+
echo '<tr class="quads-row">';
|
113 |
+
echo '<td class="quads-row th">';
|
114 |
+
echo '<label for="' . esc_attr($field['args']['label_for']) . '">' . $field['title'] . '</label>';
|
115 |
+
echo '</td></tr>';
|
116 |
+
}else if (!empty($field['title']) && !quads_is_excluded_title( $field['args']['id'] ) && !empty($field['args']['helper-desc'])){
|
117 |
+
echo '<tr class="quads-row">';
|
118 |
+
echo '<td class="quads-row th">';
|
119 |
+
echo '<div class="col-title">' . $field['title'] . '<a class="quads-general-helper" href="#"></a><div class="quads-message">' . $field['args']['helper-desc']. '</div></div>';
|
120 |
+
echo '</td></tr>';
|
121 |
+
}else if (!empty($field['title']) && !quads_is_excluded_title( $field['args']['id'] ) ){
|
122 |
+
echo '<tr class="quads-row">';
|
123 |
+
echo '<td class="quads-row th">';
|
124 |
+
echo '<div class="col-title">' . $field['title'] . '</div>';
|
125 |
+
echo '</td></tr>';
|
126 |
+
}
|
127 |
+
|
128 |
+
else {
|
129 |
+
echo '';
|
130 |
+
}
|
131 |
+
|
132 |
+
|
133 |
+
echo '<tr><td>';
|
134 |
+
call_user_func($field['callback'], $field['args']);
|
135 |
+
echo '</td></tr>';
|
136 |
+
}
|
137 |
+
echo '</tbody></table>';
|
138 |
+
if ($header === true){
|
139 |
+
echo '</div>';
|
140 |
+
}
|
141 |
+
}
|
142 |
+
|
143 |
+
/**
|
144 |
+
* If title is one of these entries do not show it
|
145 |
+
*/
|
146 |
+
function quads_is_excluded_title($string){
|
147 |
+
$haystack = array('ad1','ad2','ad3','ad4','ad5','ad6','ad7','ad8','ad9','ad10',
|
148 |
+
'ad1_widget',
|
149 |
+
'ad2_widget',
|
150 |
+
'ad3_widget',
|
151 |
+
'ad4_widget',
|
152 |
+
'ad5_widget',
|
153 |
+
'ad6_widget',
|
154 |
+
'ad7_widget',
|
155 |
+
'ad8_widget',
|
156 |
+
'ad9_widget',
|
157 |
+
'ad10_widget'
|
158 |
+
);
|
159 |
+
|
160 |
+
if (in_array($string, $haystack)){
|
161 |
+
return true;
|
162 |
+
}
|
163 |
+
return false;
|
164 |
+
}
|
165 |
+
|
166 |
+
/**
|
167 |
+
* Options Page
|
168 |
+
*
|
169 |
+
* Renders the options page contents.
|
170 |
+
*
|
171 |
+
* @since 1.0
|
172 |
+
* @global $quads_options Array of all the QUADS Options
|
173 |
+
* @return void
|
174 |
+
*/
|
175 |
+
function quads_options_page() {
|
176 |
+
global $quads_options;
|
177 |
+
|
178 |
+
$active_tab = isset( $_GET[ 'tab' ] ) && array_key_exists( $_GET['tab'], quads_get_settings_tabs() ) ? $_GET[ 'tab' ] : 'general';
|
179 |
+
|
180 |
+
ob_start();
|
181 |
+
?>
|
182 |
+
<div class="wrap quads_admin">
|
183 |
+
<h1 style="text-align:center;"> <?php echo QUADS_NAME . ' ' . QUADS_VERSION; ?></h1>
|
184 |
+
<div class="about-text" style="font-weight: 400;line-height: 1.6em;text-align:center;">
|
185 |
+
<div class='quads-share-button-container'>
|
186 |
+
<div class='quads-share-button quads-share-button-twitter' data-share-url="https://wordpress.org/plugins/quick-adsense-reloaded">
|
187 |
+
<div clas='box'>
|
188 |
+
<a href="https://twitter.com/share?url=http://wpquads.com&text=WPQUADS+-+The quickest+and+most+easiest+way+to+integrate+AdSense+into+WordPress+websites+@wpquads" target='_blank'>
|
189 |
+
<span class='quads-share'><?php echo __('Shout out a tweet','quick-adsense-reloaded'); ?></span>
|
190 |
+
</a>
|
191 |
+
</div>
|
192 |
+
</div>
|
193 |
+
<div class="quads-share-button quads-share-button-facebook" data-share-url="https://wordpress.org/plugins/quick-adsense-reloaded">
|
194 |
+
<div class="box">
|
195 |
+
<a href="https://www.facebook.com/sharer/sharer.php?u=http://wpquads.com" target="_blank">
|
196 |
+
<span class='quads-share'><?php echo __('Share on Facebook','quick-adsense-reloaded'); ?></span>
|
197 |
+
</a>
|
198 |
+
</div>
|
199 |
+
</div>
|
200 |
+
</div>
|
201 |
+
</div>
|
202 |
+
<h2 class="nav-tab-wrapper">
|
203 |
+
<?php
|
204 |
+
foreach( quads_get_settings_tabs() as $tab_id => $tab_name ) {
|
205 |
+
|
206 |
+
$tab_url = esc_url(add_query_arg( array(
|
207 |
+
'settings-updated' => false,
|
208 |
+
'tab' => $tab_id
|
209 |
+
) ));
|
210 |
+
|
211 |
+
$active = $active_tab == $tab_id ? ' nav-tab-active' : '';
|
212 |
+
|
213 |
+
echo '<a href="' . esc_url( $tab_url ) . '" title="' . esc_attr( $tab_name ) . '" class="nav-tab' . $active . '">';
|
214 |
+
echo esc_html( $tab_name );
|
215 |
+
echo '</a>';
|
216 |
+
}
|
217 |
+
?>
|
218 |
+
</h2>
|
219 |
+
<div id="quads_tab_container" class="quads_tab_container">
|
220 |
+
<?php quads_get_tab_header( 'quads_settings_' . $active_tab, 'quads_settings_' . $active_tab ); ?>
|
221 |
+
<div class="quads-panel-container"> <!-- new //-->
|
222 |
+
<form method="post" action="options.php" id="quads_settings">
|
223 |
+
|
224 |
+
<?php
|
225 |
+
settings_fields( 'quads_settings' );
|
226 |
+
quads_do_settings_fields( 'quads_settings_' . $active_tab, 'quads_settings_' . $active_tab );
|
227 |
+
?>
|
228 |
+
<!--</table>-->
|
229 |
+
|
230 |
+
<?php settings_errors(); ?>
|
231 |
+
<?php
|
232 |
+
// do not show save button on add-on page
|
233 |
+
if ($active_tab !== 'addons' && $active_tab !== 'imexport' && $active_tab !== 'help'){
|
234 |
+
$other_attributes = array( 'id' => 'quads-submit-button' );
|
235 |
+
submit_button(null, 'primary', 'quads-save-settings' , true, $other_attributes );
|
236 |
+
if ($active_tab !== 'licenses'){
|
237 |
+
?>
|
238 |
+
<a href="<?php echo admin_url() . '/admin.php?page=quads-settings&quads-action=validate'; ?> " id="quads-validate"><?php _e('Validate Ad Settings','quick-adsense-reloaded')?></a>
|
239 |
+
<?php
|
240 |
+
}
|
241 |
+
|
242 |
+
}
|
243 |
+
?>
|
244 |
+
</form>
|
245 |
+
<?php
|
246 |
+
if ($active_tab !== 'addons' && $active_tab !== 'licenses'){
|
247 |
+
echo sprintf( __( '<strong>If you like this plugin please do us a BIG favor and give us a 5 star rating <a href="%s" target="_blank">here</a> . If you have issues, open a <a href="%2s" target="_blank">support ticket</a>, so that we can sort it out. Thank you!</strong>', 'quick-adsense-reloaded' ),
|
248 |
+
'https://wordpress.org/support/plugin/quick-adsense-reloaded/reviews/#new-post',
|
249 |
+
'http://wpquads.com/support/'
|
250 |
+
);
|
251 |
+
echo '<p>' . sprintf( __( '<strong>Ads are not showing? Read the <a href="%s" target="_blank">troubleshooting guide</a> to find out how to resolve it.', 'quick-adsense-reloaded' ),
|
252 |
+
'http://wpquads.com/docs/adsense-ads-are-not-showing/?utm_source=plugin&utm_campaign=wpquads-settings&utm_medium=website&utm_term=bottomlink'
|
253 |
+
);
|
254 |
+
}
|
255 |
+
?>
|
256 |
+
</div> <!-- new //-->
|
257 |
+
<?php quads_get_advertising(); ?>
|
258 |
+
</div><!-- #tab_container-->
|
259 |
+
<div id="quads-save-result"></div>
|
260 |
+
<div class="quads-admin-debug"><?php echo quads_get_debug_messages(); ?></div>
|
261 |
+
<?php echo quads_render_adsense_form(); ?>
|
262 |
+
</div><!-- .wrap -->
|
263 |
+
<?php
|
264 |
+
echo ob_get_clean();
|
265 |
+
}
|
266 |
+
|
267 |
+
function quads_get_debug_messages(){
|
268 |
+
global $quads_options;
|
269 |
+
|
270 |
+
if (isset($quads_options['debug_mode'])){
|
271 |
+
echo '<pre style="clear:both;">';
|
272 |
+
var_dump($quads_options);
|
273 |
+
echo '</pre>';
|
274 |
+
}
|
275 |
+
}
|
276 |
+
|
277 |
+
/**
|
278 |
+
* Render ad and return it when plugin is not pro version
|
279 |
+
* @return string
|
280 |
+
*/
|
281 |
+
function quads_get_advertising() {
|
282 |
+
|
283 |
+
if ( quads_is_extra() ){
|
284 |
+
return '';
|
285 |
+
}
|
286 |
+
ob_start();
|
287 |
+
?>
|
288 |
+
<div class="quads-panel-sidebar" style="float:left;min-width: 301px;margin-left: 1px;margin-top:0px;">
|
289 |
+
<a href="http://wpquads.com/?utm_source=wpquads&utm_medium=banner&utm_term=click-quads&utm_campaign=wpquads" target="_blank">
|
290 |
+
<img src="<?php echo QUADS_PLUGIN_URL . '/assets/images/quads_banner_250x521_buy.png'; ?>">
|
291 |
+
</a>
|
292 |
+
<br>
|
293 |
+
<a style="display:block;" href="http://demo.clickfraud-monitoring.com/?utm_source=wpquads&utm_medium=banner&utm_term=click-cfm&utm_campaign=wpquads" target="_blank">
|
294 |
+
<img src="<?php echo QUADS_PLUGIN_URL . '/assets/images/banner_250x296-cfm.png'; ?>">
|
295 |
+
</a>
|
296 |
+
</div>
|
297 |
+
<?php
|
298 |
+
echo ob_get_clean();
|
299 |
+
}
|
300 |
+
|
301 |
+
/**
|
302 |
+
* Render social buttons
|
303 |
+
*
|
304 |
+
* @return void
|
305 |
+
*/
|
306 |
+
function quads_render_social(){
|
307 |
+
ob_start()?>
|
308 |
+
|
309 |
+
<div class='quads-share-button-container'>
|
310 |
+
<div class='quads-share-button quads-share-button-twitter' data-share-url="https://wordpress.org/plugins/quick-adsense-reloaded">
|
311 |
+
<div clas='box'>
|
312 |
+
<a href="https://twitter.com/share?url=https://wordpress.org/plugins/quick-adsense-reloaded&text=Quick%20AdSense%20reloaded%20-%20a%20brand%20new%20fork%20of%20the%20popular%20AdSense%20Plugin%20Quick%20Adsense!" target='_blank'>
|
313 |
+
<span class='quads-share'><?php echo __('Tweet','quick-adsense-reloaded'); ?></span>
|
314 |
+
</a>
|
315 |
+
</div>
|
316 |
+
</div>
|
317 |
+
|
318 |
+
<div class="quads-share-button quads-share-button-facebook" data-share-url="https://wordpress.org/plugins/quick-adsense-reloaded">
|
319 |
+
<div class="box">
|
320 |
+
<a href="https://www.facebook.com/sharer/sharer.php?u=https://wordpress.org/plugins/quick-adsense-reloaded" target="_blank">
|
321 |
+
<span class='quads-share'><?php echo __('Share','quick-adsense-reloaded'); ?></span>
|
322 |
+
</a>
|
323 |
+
</div>
|
324 |
+
</div>
|
325 |
+
</div>
|
326 |
+
|
327 |
+
<?php
|
328 |
+
echo ob_get_clean();
|
329 |
+
}
|
330 |
+
|
331 |
+
|
332 |
+
/**
|
333 |
+
* Render AdSense Form
|
334 |
+
*/
|
335 |
+
function quads_render_adsense_form(){
|
336 |
+
|
337 |
+
?>
|
338 |
+
<div id="quads-adsense-bg-div" style="display: none;">
|
339 |
+
<div id="quads-adsense-container">
|
340 |
+
<h3><?php _e( 'Copy ad code from AdSense account and paste it here', 'quick-adsense-reloaded' ); ?></h3>
|
341 |
+
<?php _e('Do not enter code for <a href="https://wpquads.com/docs/integrate-page-level-ads-wordpress/" target="_blank">AdSense page level ads</a> here! <br> <a href="https://wpquads.com/docs/how-to-create-and-where-to-get-adsense-code/" target="_blank">Learn how to create AdSense ad code</a>', 'quick-adsense-reloaded'); ?>
|
342 |
+
<textarea rows="15" cols="55" id="quads-adsense-form"></textarea><hr />
|
343 |
+
<button class="button button-primary" id="quads-paste-button"><?php _e( 'Get Code', 'quick-adsense-reloaded' ); ?></button>
|
344 |
+
<button class="button button-secondary" id="quads-close-button"><?php _e( 'Close', 'quick-adsense-reloaded' ); ?></button>
|
345 |
+
<div id="quads-msg"></div>
|
346 |
+
<input type="hidden" id="quads-adsense-id" value="">
|
347 |
+
</div>
|
348 |
+
</div>
|
349 |
+
<?php
|
350 |
+
}
|
includes/admin/settings/register-settings.php
CHANGED
@@ -1,2231 +1,2161 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Register Settings
|
4 |
-
*
|
5 |
-
* @package QUADS
|
6 |
-
* @subpackage Admin/Settings
|
7 |
-
* @copyright Copyright (c) 2015, René Hermenau
|
8 |
-
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
9 |
-
* @since 1.0
|
10 |
-
*/
|
11 |
-
// Exit if accessed directly
|
12 |
-
if( !defined( 'ABSPATH' ) )
|
13 |
-
exit;
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Get an option
|
17 |
-
*
|
18 |
-
* Looks to see if the specified setting exists, returns default if not
|
19 |
-
*
|
20 |
-
* @since 1.0.0
|
21 |
-
* @return mixed
|
22 |
-
*/
|
23 |
-
function quads_get_option( $key = '', $default = false ) {
|
24 |
-
global $quads_options;
|
25 |
-
$value = !empty( $quads_options[$key] ) ? $quads_options[$key] : $default;
|
26 |
-
$value = apply_filters( 'quads_get_option', $value, $key, $default );
|
27 |
-
return apply_filters( 'quads_get_option_' . $key, $value, $key, $default );
|
28 |
-
}
|
29 |
-
|
30 |
-
/**
|
31 |
-
* Get Settings
|
32 |
-
*
|
33 |
-
* Retrieves all plugin settings
|
34 |
-
*
|
35 |
-
* @since 1.0
|
36 |
-
* @return array QUADS settings
|
37 |
-
*/
|
38 |
-
function quads_get_settings() {
|
39 |
-
$settings = get_option( 'quads_settings' );
|
40 |
-
|
41 |
-
|
42 |
-
if( empty( $settings ) ) {
|
43 |
-
// Update old settings with new single option
|
44 |
-
$general_settings = is_array( get_option( 'quads_settings_general' ) ) ? get_option( 'quads_settings_general' ) : array();
|
45 |
-
$ext_settings = is_array( get_option( 'quads_settings_extensions' ) ) ? get_option( 'quads_settings_extensions' ) : array();
|
46 |
-
$license_settings = is_array( get_option( 'quads_settings_licenses' ) ) ? get_option( 'quads_settings_licenses' ) : array();
|
47 |
-
$addons_settings = is_array( get_option( 'quads_settings_addons' ) ) ? get_option( 'quads_settings_addons' ) : array();
|
48 |
-
$imexport_settings = is_array( get_option( 'quads_settings_imexport' ) ) ? get_option( 'quads_settings_imexport' ) : array();
|
49 |
-
$help_settings = is_array( get_option( 'quads_settings_help' ) ) ? get_option( 'quads_settings_help' ) : array();
|
50 |
-
|
51 |
-
$settings = array_merge( $general_settings, $ext_settings, $imexport_settings, $help_settings );
|
52 |
-
|
53 |
-
update_option( 'quads_settings', $settings );
|
54 |
-
}
|
55 |
-
return apply_filters( 'quads_get_settings', $settings );
|
56 |
-
}
|
57 |
-
|
58 |
-
/**
|
59 |
-
* Add all settings sections and fields
|
60 |
-
*
|
61 |
-
* @since 1.0
|
62 |
-
* @return void
|
63 |
-
*/
|
64 |
-
function quads_register_settings() {
|
65 |
-
|
66 |
-
if( false == get_option( 'quads_settings' ) ) {
|
67 |
-
add_option( 'quads_settings' );
|
68 |
-
}
|
69 |
-
|
70 |
-
foreach ( quads_get_registered_settings() as $tab => $settings ) {
|
71 |
-
|
72 |
-
add_settings_section(
|
73 |
-
'quads_settings_' . $tab, __return_null(), '__return_false', 'quads_settings_' . $tab
|
74 |
-
);
|
75 |
-
|
76 |
-
foreach ( $settings as $option ) {
|
77 |
-
|
78 |
-
$name = isset( $option['name'] ) ? $option['name'] : '';
|
79 |
-
|
80 |
-
add_settings_field(
|
81 |
-
'quads_settings[' . $option['id'] . ']', $name, function_exists( 'quads_' . $option['type'] . '_callback' ) ? 'quads_' . $option['type'] . '_callback' : 'quads_missing_callback', 'quads_settings_' . $tab, 'quads_settings_' . $tab, array(
|
82 |
-
'id' => isset( $option['id'] ) ? $option['id'] : null,
|
83 |
-
'desc' => !empty( $option['desc'] ) ? $option['desc'] : '',
|
84 |
-
'desc2' => !empty( $option['desc2'] ) ? $option['desc2'] : '',
|
85 |
-
'helper-desc' => !empty( $option['helper-desc'] ) ? $option['helper-desc'] : '',
|
86 |
-
'name' => isset( $option['name'] ) ? $option['name'] : null,
|
87 |
-
'section' => $tab,
|
88 |
-
'size' => isset( $option['size'] ) ? $option['size'] : null,
|
89 |
-
'options' => isset( $option['options'] ) ? $option['options'] : '',
|
90 |
-
'std' => isset( $option['std'] ) ? $option['std'] : '',
|
91 |
-
'placeholder' => isset( $option['placeholder'] ) ? $option['placeholder'] : '',
|
92 |
-
'textarea_rows' => isset( $option['textarea_rows'] ) ? $option['textarea_rows'] : ''
|
93 |
-
)
|
94 |
-
);
|
95 |
-
}
|
96 |
-
}
|
97 |
-
|
98 |
-
// Store adsense values
|
99 |
-
quads_store_adsense_args();
|
100 |
-
// Store AdSense value
|
101 |
-
//quads_fix_ad_not_shown();
|
102 |
-
// Creates our settings in the options table
|
103 |
-
register_setting( 'quads_settings', 'quads_settings', 'quads_settings_sanitize' );
|
104 |
-
}
|
105 |
-
|
106 |
-
add_action( 'admin_init', 'quads_register_settings' );
|
107 |
-
|
108 |
-
/**
|
109 |
-
* Retrieve the array of plugin settings
|
110 |
-
*
|
111 |
-
* @since 1.8
|
112 |
-
* @return array
|
113 |
-
*/
|
114 |
-
function quads_get_registered_settings() {
|
115 |
-
|
116 |
-
/**
|
117 |
-
* 'Whitelisted' QUADS settings, filters are provided for each settings
|
118 |
-
* section to allow extensions and other plugins to add their own settings
|
119 |
-
*/
|
120 |
-
$quads_settings = array(
|
121 |
-
/** General Settings */
|
122 |
-
'general' => apply_filters( 'quads_settings_general', array(
|
123 |
-
array(
|
124 |
-
'id' => 'general_header',
|
125 |
-
'name' => '<strong>' . __( 'General & Position', 'quick-adsense-reloaded' ) . '</strong>',
|
126 |
-
'desc' => __( '', 'quick-adsense-reloaded' ),
|
127 |
-
'type' => 'header'
|
128 |
-
),
|
129 |
-
'maxads' => array(
|
130 |
-
'id' => 'maxads',
|
131 |
-
'name' => __( 'Limit Amount of ads:', 'quick-adsense-reloaded' ),
|
132 |
-
'desc' => __( ' ads on a page.', 'quick-adsense-reloaded' ),
|
133 |
-
'desc2' => sprintf( __( '<a href="%s" target="_blank">Read here</a> to learn how many AdSense ads are allowed. If you are unsure set the value to unlimited.', 'quick-adsense-reloaded' ), 'http://wpquads.com/google-adsense-allowed-number-ads/' ),
|
134 |
-
'type' => 'select',
|
135 |
-
'std' => 100,
|
136 |
-
'options' => array(
|
137 |
-
1 => '1',
|
138 |
-
2 => '2',
|
139 |
-
3 => '3',
|
140 |
-
4 => '4',
|
141 |
-
5 => '5',
|
142 |
-
6 => '6',
|
143 |
-
7 => '7',
|
144 |
-
8 => '8',
|
145 |
-
9 => '9',
|
146 |
-
10 => '10',
|
147 |
-
11 => '11',
|
148 |
-
12 => '12',
|
149 |
-
13 => '13',
|
150 |
-
14 => '14',
|
151 |
-
15 => '15',
|
152 |
-
16 => '16',
|
153 |
-
17 => '17',
|
154 |
-
18 => '18',
|
155 |
-
19 => '19',
|
156 |
-
20 => '20',
|
157 |
-
100 => 'Unlimited',
|
158 |
-
),
|
159 |
-
),
|
160 |
-
array(
|
161 |
-
'id' => 'ad_position',
|
162 |
-
'name' => __( 'Position - Default Ads', 'quick-adsense-reloaded' ),
|
163 |
-
'desc' => __( 'Assign and activate ads on specific ad places', 'quick-adsense-reloaded' ),
|
164 |
-
'type' => 'ad_position'
|
165 |
-
),
|
166 |
-
array(
|
167 |
-
'id' => 'visibility',
|
168 |
-
'name' => __( 'Visibility', 'quick-adsense-reloaded' ),
|
169 |
-
'desc' => __( '', 'quick-adsense-reloaded' ),
|
170 |
-
'type' => 'visibility'
|
171 |
-
),
|
172 |
-
array(
|
173 |
-
"id" => "post_types",
|
174 |
-
"name" => __( "Post Types", "quick-adsense-reloaded" ),
|
175 |
-
"desc" => __( "Select post types where ads are visible.", "quick-adsense-reloaded" ),
|
176 |
-
"helper-desc" => __( "Select post types where ads are visible.", "quick-adsense-reloaded" ),
|
177 |
-
"type" => "multiselect",
|
178 |
-
"options" => quads_get_post_types(),
|
179 |
-
"placeholder" => __( "Select Post Type", "quick-adsense-reloaded" )
|
180 |
-
),
|
181 |
-
array(
|
182 |
-
'id' => 'quicktags',
|
183 |
-
'name' => __( 'Quicktags', 'quick-adsense-reloaded' ),
|
184 |
-
'desc' => __( '', 'quick-adsense-reloaded' ),
|
185 |
-
'type' => 'quicktags'
|
186 |
-
),
|
187 |
-
/* 'load_scripts_footer' => array(
|
188 |
-
'id' => 'load_scripts_footer',
|
189 |
-
'name' => __( 'JS Load Order', 'quick-adsense-reloaded' ),
|
190 |
-
'desc' => __( 'Enable this to load all *.js files into footer. Make sure your theme uses the wp_footer() template tag in the appropriate place. Default: Disabled', 'quick-adsense-reloaded' ),
|
191 |
-
'type' => 'checkbox'
|
192 |
-
), */
|
193 |
-
'adsense_header' => array(
|
194 |
-
'id' => 'adsense_header',
|
195 |
-
'name' => '<strong>' . __( 'AdSense Code', 'quick-adsense-reloaded' ) . '</strong>',
|
196 |
-
'desc' => '<div class="adsense_admin_header">' . sprintf( __( 'Enter your
|
197 |
-
. '<ul style="margin-top:10px;">'
|
198 |
-
. '<li style="font-weight:600;">Select <i>AdSense</i>
|
199 |
-
. '<li style="font-weight:600;">Use <i>Plain Text / HTML / JS</i> for all other ads! <br><strong>Caution:</strong> Adding AdSense code into <i>Plain Text</i> option can result in non-displayed ads!</li></ul>', 'quick-adsense-reloaded' ), 'http://wpquads.com/effective-adsense-banner-size-formats/?utm_campaign=plugin&utm_source=general_tab&utm_medium=admin&utm_content=best_banner_sizes' )
|
200 |
-
. '</ul>'
|
201 |
-
. '<div style="clear:both;">' . sprintf( __( '<strong>Ads are not showing? Read the <a href="%s" target="_blank">troubleshooting guide</a> to find out how to resolve it.', 'quick-adsense-reloaded' ), 'http://wpquads.com/docs/adsense-ads-are-not-showing/?utm_source=plugin&utm_campaign=wpquads-settings&utm_medium=website&utm_term=toplink' ) . ''
|
202 |
-
. '<br><a href="%s" target="_blank">Read here</a> to find out the most effective AdSense banner sizes. </div>'
|
203 |
-
. '<div id="quads-open-toggle" class="button">' . __( 'Open All Ads', 'quick-adsense-reloaded' ) . '</div>',
|
204 |
-
'type' => 'header'
|
205 |
-
),
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
'
|
280 |
-
|
281 |
-
|
282 |
-
'
|
283 |
-
'
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
'
|
288 |
-
'
|
289 |
-
'
|
290 |
-
'
|
291 |
-
),
|
292 |
-
|
293 |
-
'id' => '
|
294 |
-
'name' => __( '
|
295 |
-
'desc' => __( '', 'quick-adsense-reloaded' ),
|
296 |
-
'type' => '
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
'
|
301 |
-
'
|
302 |
-
'desc' => __( '', 'quick-adsense-reloaded' ),
|
303 |
-
'type' => '
|
304 |
-
'size' =>
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
'
|
309 |
-
'
|
310 |
-
'
|
311 |
-
'
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
'
|
317 |
-
'
|
318 |
-
'
|
319 |
-
|
320 |
-
|
321 |
-
'
|
322 |
-
|
323 |
-
|
324 |
-
'
|
325 |
-
'
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
'
|
333 |
-
|
334 |
-
|
335 |
-
'
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
'
|
342 |
-
'id' => '
|
343 |
-
'name' => __( '
|
344 |
-
'desc' => __( '', 'quick-adsense-reloaded' ),
|
345 |
-
'type' => '
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
'
|
352 |
-
'
|
353 |
-
'
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
'
|
361 |
-
|
362 |
-
|
363 |
-
'
|
364 |
-
|
365 |
-
|
366 |
-
'
|
367 |
-
|
368 |
-
|
369 |
-
'
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
*
|
458 |
-
*
|
459 |
-
*
|
460 |
-
*
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
$
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
*
|
527 |
-
*
|
528 |
-
*
|
529 |
-
* @
|
530 |
-
* @
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
*
|
543 |
-
*
|
544 |
-
*
|
545 |
-
*
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
*
|
613 |
-
*
|
614 |
-
*
|
615 |
-
*
|
616 |
-
* @
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
*
|
638 |
-
*
|
639 |
-
*
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
*
|
708 |
-
*
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
*
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
$
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
$
|
867 |
-
$html
|
868 |
-
$html .= '<
|
869 |
-
|
870 |
-
echo $html;
|
871 |
-
}
|
872 |
-
|
873 |
-
/**
|
874 |
-
*
|
875 |
-
*
|
876 |
-
* Renders
|
877 |
-
*
|
878 |
-
* @since 1.
|
879 |
-
* @
|
880 |
-
* @
|
881 |
-
* @
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
$
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
*
|
913 |
-
*
|
914 |
-
*
|
915 |
-
*
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
$
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
*
|
1010 |
-
*
|
1011 |
-
*
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
$
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
*
|
1037 |
-
*
|
1038 |
-
* @since
|
1039 |
-
* @param array $args Arguments passed by the setting
|
1040 |
-
* @global $quads_options Array of all the QUADS
|
1041 |
-
* @return void
|
1042 |
-
*/
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
*
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
|
1270 |
-
|
1271 |
-
*
|
1272 |
-
*
|
1273 |
-
* @
|
1274 |
-
* @
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
$html
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
$html
|
1292 |
-
echo $html;
|
1293 |
-
}
|
1294 |
-
|
1295 |
-
/**
|
1296 |
-
*
|
1297 |
-
*
|
1298 |
-
*
|
1299 |
-
*
|
1300 |
-
* @
|
1301 |
-
* @
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
*
|
1325 |
-
*
|
1326 |
-
* @
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
*
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
$
|
1447 |
-
|
1448 |
-
$
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
//
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
//
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
|
1489 |
-
|
1490 |
-
$
|
1491 |
-
|
1492 |
-
|
1493 |
-
|
1494 |
-
|
1495 |
-
|
1496 |
-
|
1497 |
-
|
1498 |
-
|
1499 |
-
|
1500 |
-
|
1501 |
-
|
1502 |
-
|
1503 |
-
|
1504 |
-
|
1505 |
-
|
1506 |
-
|
1507 |
-
|
1508 |
-
|
1509 |
-
|
1510 |
-
|
1511 |
-
$html
|
1512 |
-
$html .= $quads->html->checkbox( array('name' => 'quads_settings[
|
1513 |
-
$html .=
|
1514 |
-
|
1515 |
-
|
1516 |
-
$html .= $quads->html->checkbox( array('name' => 'quads_settings[
|
1517 |
-
|
1518 |
-
|
1519 |
-
|
1520 |
-
|
1521 |
-
|
1522 |
-
|
1523 |
-
|
1524 |
-
|
1525 |
-
|
1526 |
-
|
1527 |
-
|
1528 |
-
|
1529 |
-
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
|
1535 |
-
|
1536 |
-
|
1537 |
-
|
1538 |
-
|
1539 |
-
|
1540 |
-
|
1541 |
-
|
1542 |
-
|
1543 |
-
|
1544 |
-
|
1545 |
-
|
1546 |
-
|
1547 |
-
|
1548 |
-
|
1549 |
-
|
1550 |
-
|
1551 |
-
$
|
1552 |
-
|
1553 |
-
//
|
1554 |
-
$html
|
1555 |
-
|
1556 |
-
|
1557 |
-
|
1558 |
-
|
1559 |
-
|
1560 |
-
$html .= $quads->html->checkbox( array('name' => 'quads_settings[
|
1561 |
-
$html .=
|
1562 |
-
$html .=
|
1563 |
-
$html
|
1564 |
-
|
1565 |
-
|
1566 |
-
|
1567 |
-
|
1568 |
-
|
1569 |
-
|
1570 |
-
|
1571 |
-
$
|
1572 |
-
|
1573 |
-
$
|
1574 |
-
|
1575 |
-
|
1576 |
-
$
|
1577 |
-
|
1578 |
-
$
|
1579 |
-
|
1580 |
-
$
|
1581 |
-
$
|
1582 |
-
|
1583 |
-
|
1584 |
-
|
1585 |
-
|
1586 |
-
$
|
1587 |
-
|
1588 |
-
|
1589 |
-
$html
|
1590 |
-
$html
|
1591 |
-
$html
|
1592 |
-
|
1593 |
-
|
1594 |
-
|
1595 |
-
|
1596 |
-
|
1597 |
-
|
1598 |
-
|
1599 |
-
|
1600 |
-
|
1601 |
-
|
1602 |
-
|
1603 |
-
|
1604 |
-
|
1605 |
-
|
1606 |
-
|
1607 |
-
|
1608 |
-
}
|
1609 |
-
|
1610 |
-
|
1611 |
-
|
1612 |
-
|
1613 |
-
|
1614 |
-
|
1615 |
-
|
1616 |
-
|
1617 |
-
|
1618 |
-
|
1619 |
-
|
1620 |
-
|
1621 |
-
|
1622 |
-
|
1623 |
-
|
1624 |
-
|
1625 |
-
|
1626 |
-
|
1627 |
-
|
1628 |
-
|
1629 |
-
|
1630 |
-
|
1631 |
-
|
1632 |
-
|
1633 |
-
|
1634 |
-
|
1635 |
-
|
1636 |
-
|
1637 |
-
|
1638 |
-
|
1639 |
-
|
1640 |
-
|
1641 |
-
|
1642 |
-
|
1643 |
-
|
1644 |
-
|
1645 |
-
|
1646 |
-
|
1647 |
-
|
1648 |
-
|
1649 |
-
|
1650 |
-
|
1651 |
-
|
1652 |
-
|
1653 |
-
|
1654 |
-
|
1655 |
-
|
1656 |
-
|
1657 |
-
|
1658 |
-
|
1659 |
-
|
1660 |
-
|
1661 |
-
|
1662 |
-
|
1663 |
-
|
1664 |
-
|
1665 |
-
|
1666 |
-
|
1667 |
-
|
1668 |
-
|
1669 |
-
|
1670 |
-
|
1671 |
-
|
1672 |
-
|
1673 |
-
|
1674 |
-
|
1675 |
-
|
1676 |
-
|
1677 |
-
|
1678 |
-
|
1679 |
-
|
1680 |
-
|
1681 |
-
|
1682 |
-
|
1683 |
-
|
1684 |
-
|
1685 |
-
|
1686 |
-
|
1687 |
-
|
1688 |
-
|
1689 |
-
|
1690 |
-
|
1691 |
-
|
1692 |
-
|
1693 |
-
|
1694 |
-
|
1695 |
-
|
1696 |
-
|
1697 |
-
|
1698 |
-
|
1699 |
-
|
1700 |
-
|
1701 |
-
|
1702 |
-
|
1703 |
-
|
1704 |
-
|
1705 |
-
|
1706 |
-
|
1707 |
-
|
1708 |
-
|
1709 |
-
|
1710 |
-
|
1711 |
-
|
1712 |
-
|
1713 |
-
|
1714 |
-
|
1715 |
-
|
1716 |
-
|
1717 |
-
|
1718 |
-
|
1719 |
-
|
1720 |
-
|
1721 |
-
|
1722 |
-
|
1723 |
-
|
1724 |
-
|
1725 |
-
|
1726 |
-
|
1727 |
-
|
1728 |
-
|
1729 |
-
|
1730 |
-
|
1731 |
-
|
1732 |
-
|
1733 |
-
|
1734 |
-
|
1735 |
-
|
1736 |
-
|
1737 |
-
|
1738 |
-
|
1739 |
-
|
1740 |
-
|
1741 |
-
|
1742 |
-
|
1743 |
-
|
1744 |
-
|
1745 |
-
|
1746 |
-
|
1747 |
-
|
1748 |
-
|
1749 |
-
|
1750 |
-
|
1751 |
-
|
1752 |
-
|
1753 |
-
|
1754 |
-
|
1755 |
-
|
1756 |
-
|
1757 |
-
|
1758 |
-
|
1759 |
-
|
1760 |
-
|
1761 |
-
|
1762 |
-
|
1763 |
-
|
1764 |
-
|
1765 |
-
|
1766 |
-
|
1767 |
-
|
1768 |
-
|
1769 |
-
|
1770 |
-
|
1771 |
-
|
1772 |
-
|
1773 |
-
|
1774 |
-
$
|
1775 |
-
|
1776 |
-
|
1777 |
-
|
1778 |
-
|
1779 |
-
|
1780 |
-
|
1781 |
-
|
1782 |
-
|
1783 |
-
|
1784 |
-
|
1785 |
-
|
1786 |
-
|
1787 |
-
//
|
1788 |
-
|
1789 |
-
|
1790 |
-
|
1791 |
-
|
1792 |
-
|
1793 |
-
|
1794 |
-
|
1795 |
-
|
1796 |
-
|
1797 |
-
|
1798 |
-
|
1799 |
-
|
1800 |
-
|
1801 |
-
|
1802 |
-
|
1803 |
-
|
1804 |
-
|
1805 |
-
|
1806 |
-
|
1807 |
-
|
1808 |
-
|
1809 |
-
|
1810 |
-
|
1811 |
-
|
1812 |
-
|
1813 |
-
|
1814 |
-
|
1815 |
-
|
1816 |
-
|
1817 |
-
|
1818 |
-
|
1819 |
-
|
1820 |
-
|
1821 |
-
|
1822 |
-
|
1823 |
-
|
1824 |
-
|
1825 |
-
'
|
1826 |
-
|
1827 |
-
'
|
1828 |
-
|
1829 |
-
|
1830 |
-
|
1831 |
-
|
1832 |
-
|
1833 |
-
|
1834 |
-
|
1835 |
-
|
1836 |
-
|
1837 |
-
|
1838 |
-
|
1839 |
-
|
1840 |
-
|
1841 |
-
<div
|
1842 |
-
|
1843 |
-
|
1844 |
-
|
1845 |
-
'
|
1846 |
-
'
|
1847 |
-
'
|
1848 |
-
'
|
1849 |
-
|
1850 |
-
'
|
1851 |
-
|
1852 |
-
|
1853 |
-
|
1854 |
-
|
1855 |
-
|
1856 |
-
|
1857 |
-
|
1858 |
-
|
1859 |
-
|
1860 |
-
|
1861 |
-
|
1862 |
-
|
1863 |
-
|
1864 |
-
|
1865 |
-
|
1866 |
-
|
1867 |
-
|
1868 |
-
|
1869 |
-
|
1870 |
-
|
1871 |
-
|
1872 |
-
|
1873 |
-
|
1874 |
-
|
1875 |
-
|
1876 |
-
|
1877 |
-
|
1878 |
-
|
1879 |
-
|
1880 |
-
|
1881 |
-
|
1882 |
-
|
1883 |
-
|
1884 |
-
|
1885 |
-
|
1886 |
-
|
1887 |
-
|
1888 |
-
|
1889 |
-
|
1890 |
-
|
1891 |
-
|
1892 |
-
|
1893 |
-
|
1894 |
-
|
1895 |
-
|
1896 |
-
|
1897 |
-
|
1898 |
-
|
1899 |
-
|
1900 |
-
|
1901 |
-
|
1902 |
-
|
1903 |
-
|
1904 |
-
|
1905 |
-
|
1906 |
-
|
1907 |
-
|
1908 |
-
|
1909 |
-
|
1910 |
-
|
1911 |
-
|
1912 |
-
|
1913 |
-
|
1914 |
-
|
1915 |
-
|
1916 |
-
|
1917 |
-
|
1918 |
-
|
1919 |
-
|
1920 |
-
|
1921 |
-
|
1922 |
-
|
1923 |
-
|
1924 |
-
|
1925 |
-
|
1926 |
-
|
1927 |
-
<
|
1928 |
-
|
1929 |
-
|
1930 |
-
|
1931 |
-
|
1932 |
-
|
1933 |
-
|
1934 |
-
|
1935 |
-
|
1936 |
-
|
1937 |
-
|
1938 |
-
|
1939 |
-
|
1940 |
-
|
1941 |
-
|
1942 |
-
|
1943 |
-
|
1944 |
-
|
1945 |
-
|
1946 |
-
|
1947 |
-
|
1948 |
-
|
1949 |
-
|
1950 |
-
|
1951 |
-
|
1952 |
-
|
1953 |
-
|
1954 |
-
|
1955 |
-
|
1956 |
-
|
1957 |
-
|
1958 |
-
|
1959 |
-
|
1960 |
-
|
1961 |
-
|
1962 |
-
|
1963 |
-
|
1964 |
-
|
1965 |
-
|
1966 |
-
|
1967 |
-
|
1968 |
-
|
1969 |
-
|
1970 |
-
|
1971 |
-
|
1972 |
-
|
1973 |
-
|
1974 |
-
|
1975 |
-
|
1976 |
-
|
1977 |
-
|
1978 |
-
|
1979 |
-
|
1980 |
-
|
1981 |
-
|
1982 |
-
|
1983 |
-
|
1984 |
-
|
1985 |
-
|
1986 |
-
|
1987 |
-
|
1988 |
-
|
1989 |
-
|
1990 |
-
|
1991 |
-
|
1992 |
-
|
1993 |
-
|
1994 |
-
|
1995 |
-
|
1996 |
-
|
1997 |
-
$
|
1998 |
-
|
1999 |
-
|
2000 |
-
|
2001 |
-
|
2002 |
-
|
2003 |
-
|
2004 |
-
|
2005 |
-
|
2006 |
-
|
2007 |
-
|
2008 |
-
|
2009 |
-
|
2010 |
-
|
2011 |
-
|
2012 |
-
|
2013 |
-
|
2014 |
-
|
2015 |
-
|
2016 |
-
|
2017 |
-
|
2018 |
-
|
2019 |
-
|
2020 |
-
|
2021 |
-
|
2022 |
-
|
2023 |
-
|
2024 |
-
|
2025 |
-
|
2026 |
-
|
2027 |
-
|
2028 |
-
|
2029 |
-
|
2030 |
-
|
2031 |
-
|
2032 |
-
|
2033 |
-
|
2034 |
-
|
2035 |
-
|
2036 |
-
|
2037 |
-
|
2038 |
-
|
2039 |
-
|
2040 |
-
|
2041 |
-
|
2042 |
-
|
2043 |
-
|
2044 |
-
|
2045 |
-
|
2046 |
-
|
2047 |
-
|
2048 |
-
|
2049 |
-
|
2050 |
-
|
2051 |
-
|
2052 |
-
|
2053 |
-
|
2054 |
-
|
2055 |
-
|
2056 |
-
|
2057 |
-
|
2058 |
-
|
2059 |
-
|
2060 |
-
|
2061 |
-
|
2062 |
-
|
2063 |
-
|
2064 |
-
|
2065 |
-
|
2066 |
-
|
2067 |
-
|
2068 |
-
|
2069 |
-
|
2070 |
-
|
2071 |
-
|
2072 |
-
|
2073 |
-
|
2074 |
-
|
2075 |
-
|
2076 |
-
|
2077 |
-
|
2078 |
-
|
2079 |
-
|
2080 |
-
|
2081 |
-
|
2082 |
-
|
2083 |
-
|
2084 |
-
|
2085 |
-
|
2086 |
-
|
2087 |
-
|
2088 |
-
|
2089 |
-
|
2090 |
-
|
2091 |
-
|
2092 |
-
|
2093 |
-
|
2094 |
-
|
2095 |
-
|
2096 |
-
|
2097 |
-
|
2098 |
-
|
2099 |
-
|
2100 |
-
|
2101 |
-
|
2102 |
-
|
2103 |
-
|
2104 |
-
|
2105 |
-
|
2106 |
-
|
2107 |
-
|
2108 |
-
|
2109 |
-
|
2110 |
-
|
2111 |
-
|
2112 |
-
|
2113 |
-
|
2114 |
-
*
|
2115 |
-
|
2116 |
-
|
2117 |
-
|
2118 |
-
|
2119 |
-
|
2120 |
-
|
2121 |
-
|
2122 |
-
|
2123 |
-
|
2124 |
-
|
2125 |
-
|
2126 |
-
|
2127 |
-
|
2128 |
-
|
2129 |
-
|
2130 |
-
|
2131 |
-
|
2132 |
-
|
2133 |
-
|
2134 |
-
|
2135 |
-
|
2136 |
-
|
2137 |
-
|
2138 |
-
|
2139 |
-
|
2140 |
-
|
2141 |
-
|
2142 |
-
|
2143 |
-
|
2144 |
-
|
2145 |
-
|
2146 |
-
|
2147 |
-
|
2148 |
-
|
2149 |
-
|
2150 |
-
|
2151 |
-
|
2152 |
-
|
2153 |
-
|
2154 |
-
|
2155 |
-
|
2156 |
-
|
2157 |
-
|
2158 |
-
|
2159 |
-
|
2160 |
-
|
2161 |
-
}
|
2162 |
-
//wp_die( var_dump( $quads_options ) );
|
2163 |
-
update_option( 'quads_settings', $quads_options );
|
2164 |
-
}
|
2165 |
-
|
2166 |
-
/**
|
2167 |
-
* Populate AdSense Code field otherwise ads are not shown on frontpage (Bug).
|
2168 |
-
* @todo
|
2169 |
-
*
|
2170 |
-
* @global $quads_options $quads_options
|
2171 |
-
* @deprecated since 1.3.8
|
2172 |
-
*/
|
2173 |
-
//function quads_fix_ad_not_shown(){
|
2174 |
-
// global $quads_options;
|
2175 |
-
//
|
2176 |
-
// foreach ( $quads_options as $id => $values ) {
|
2177 |
-
// if( is_array( $values ) && array_key_exists( 'code', $values ) && array_key_exists( 'ad_type', $values ) && empty($values['code']) ) {
|
2178 |
-
// $quads_options[$id]['code'] = '...';
|
2179 |
-
// }
|
2180 |
-
// }
|
2181 |
-
//}
|
2182 |
-
|
2183 |
-
/**
|
2184 |
-
* Sanitizes a string key for QUADS Settings
|
2185 |
-
*
|
2186 |
-
* Keys are used as internal identifiers. Alphanumeric characters, dashes, underscores, stops, colons and slashes are allowed
|
2187 |
-
*
|
2188 |
-
* @since 2.0.0
|
2189 |
-
* @param string $key String key
|
2190 |
-
* @return string Sanitized key
|
2191 |
-
*/
|
2192 |
-
function quads_sanitize_key( $key ) {
|
2193 |
-
$raw_key = $key;
|
2194 |
-
$key = preg_replace( '/[^a-zA-Z0-9_\-\.\:\/]/', '', $key );
|
2195 |
-
/**
|
2196 |
-
* Filter a sanitized key string.
|
2197 |
-
*
|
2198 |
-
* @since 2.5.8
|
2199 |
-
* @param string $key Sanitized key.
|
2200 |
-
* @param string $raw_key The key prior to sanitization.
|
2201 |
-
*/
|
2202 |
-
return apply_filters( 'quads_sanitize_key', $key, $raw_key );
|
2203 |
-
}
|
2204 |
-
|
2205 |
-
/**
|
2206 |
-
* Multi Select Callback
|
2207 |
-
*
|
2208 |
-
* @since 1.3.8
|
2209 |
-
* @param array $args Arguments passed by the settings
|
2210 |
-
* @global $quads_options Array of all the QUADS Options
|
2211 |
-
* @return string $output dropdown
|
2212 |
-
*/
|
2213 |
-
function quads_multiselect_callback( $args = array() ) {
|
2214 |
-
global $quads_options;
|
2215 |
-
|
2216 |
-
$placeholder = !empty( $args['placeholder'] ) ? $args['placeholder'] : '';
|
2217 |
-
$selected = isset( $quads_options[$args['id']] ) ? $quads_options[$args['id']] : '';
|
2218 |
-
$checked = '';
|
2219 |
-
|
2220 |
-
$html = '<select id="quads_select_'. $args['id'] .'" name="quads_settings[' . $args['id'] . '][]" data-placeholder="' . $placeholder . '" style="width:550px;" multiple tabindex="4" class="quads-select quads-chosen-select">';
|
2221 |
-
$i = 0;
|
2222 |
-
foreach ( $args['options'] as $key => $value ) :
|
2223 |
-
if( is_array( $selected ) ) {
|
2224 |
-
$checked = selected( true, in_array( $key, $selected ), false );
|
2225 |
-
}
|
2226 |
-
$html .= '<option value="' . $key . '" ' . $checked . '>' . $value . '</option>';
|
2227 |
-
endforeach;
|
2228 |
-
$html .= '</select>';
|
2229 |
-
echo $html;
|
2230 |
-
}
|
2231 |
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Register Settings
|
4 |
+
*
|
5 |
+
* @package QUADS
|
6 |
+
* @subpackage Admin/Settings
|
7 |
+
* @copyright Copyright (c) 2015, René Hermenau
|
8 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
9 |
+
* @since 1.0
|
10 |
+
*/
|
11 |
+
// Exit if accessed directly
|
12 |
+
if( !defined( 'ABSPATH' ) )
|
13 |
+
exit;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Get an option
|
17 |
+
*
|
18 |
+
* Looks to see if the specified setting exists, returns default if not
|
19 |
+
*
|
20 |
+
* @since 1.0.0
|
21 |
+
* @return mixed
|
22 |
+
*/
|
23 |
+
function quads_get_option( $key = '', $default = false ) {
|
24 |
+
global $quads_options;
|
25 |
+
$value = !empty( $quads_options[$key] ) ? $quads_options[$key] : $default;
|
26 |
+
$value = apply_filters( 'quads_get_option', $value, $key, $default );
|
27 |
+
return apply_filters( 'quads_get_option_' . $key, $value, $key, $default );
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Get Settings
|
32 |
+
*
|
33 |
+
* Retrieves all plugin settings
|
34 |
+
*
|
35 |
+
* @since 1.0
|
36 |
+
* @return array QUADS settings
|
37 |
+
*/
|
38 |
+
function quads_get_settings() {
|
39 |
+
$settings = get_option( 'quads_settings' );
|
40 |
+
|
41 |
+
|
42 |
+
if( empty( $settings ) ) {
|
43 |
+
// Update old settings with new single option
|
44 |
+
$general_settings = is_array( get_option( 'quads_settings_general' ) ) ? get_option( 'quads_settings_general' ) : array();
|
45 |
+
$ext_settings = is_array( get_option( 'quads_settings_extensions' ) ) ? get_option( 'quads_settings_extensions' ) : array();
|
46 |
+
$license_settings = is_array( get_option( 'quads_settings_licenses' ) ) ? get_option( 'quads_settings_licenses' ) : array();
|
47 |
+
$addons_settings = is_array( get_option( 'quads_settings_addons' ) ) ? get_option( 'quads_settings_addons' ) : array();
|
48 |
+
$imexport_settings = is_array( get_option( 'quads_settings_imexport' ) ) ? get_option( 'quads_settings_imexport' ) : array();
|
49 |
+
$help_settings = is_array( get_option( 'quads_settings_help' ) ) ? get_option( 'quads_settings_help' ) : array();
|
50 |
+
|
51 |
+
$settings = array_merge( $general_settings, $ext_settings, $imexport_settings, $help_settings );
|
52 |
+
|
53 |
+
update_option( 'quads_settings', $settings );
|
54 |
+
}
|
55 |
+
return apply_filters( 'quads_get_settings', $settings );
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Add all settings sections and fields
|
60 |
+
*
|
61 |
+
* @since 1.0
|
62 |
+
* @return void
|
63 |
+
*/
|
64 |
+
function quads_register_settings() {
|
65 |
+
|
66 |
+
if( false == get_option( 'quads_settings' ) ) {
|
67 |
+
add_option( 'quads_settings' );
|
68 |
+
}
|
69 |
+
|
70 |
+
foreach ( quads_get_registered_settings() as $tab => $settings ) {
|
71 |
+
|
72 |
+
add_settings_section(
|
73 |
+
'quads_settings_' . $tab, __return_null(), '__return_false', 'quads_settings_' . $tab
|
74 |
+
);
|
75 |
+
|
76 |
+
foreach ( $settings as $option ) {
|
77 |
+
|
78 |
+
$name = isset( $option['name'] ) ? $option['name'] : '';
|
79 |
+
|
80 |
+
add_settings_field(
|
81 |
+
'quads_settings[' . $option['id'] . ']', $name, function_exists( 'quads_' . $option['type'] . '_callback' ) ? 'quads_' . $option['type'] . '_callback' : 'quads_missing_callback', 'quads_settings_' . $tab, 'quads_settings_' . $tab, array(
|
82 |
+
'id' => isset( $option['id'] ) ? $option['id'] : null,
|
83 |
+
'desc' => !empty( $option['desc'] ) ? $option['desc'] : '',
|
84 |
+
'desc2' => !empty( $option['desc2'] ) ? $option['desc2'] : '',
|
85 |
+
'helper-desc' => !empty( $option['helper-desc'] ) ? $option['helper-desc'] : '',
|
86 |
+
'name' => isset( $option['name'] ) ? $option['name'] : null,
|
87 |
+
'section' => $tab,
|
88 |
+
'size' => isset( $option['size'] ) ? $option['size'] : null,
|
89 |
+
'options' => isset( $option['options'] ) ? $option['options'] : '',
|
90 |
+
'std' => isset( $option['std'] ) ? $option['std'] : '',
|
91 |
+
'placeholder' => isset( $option['placeholder'] ) ? $option['placeholder'] : '',
|
92 |
+
'textarea_rows' => isset( $option['textarea_rows'] ) ? $option['textarea_rows'] : ''
|
93 |
+
)
|
94 |
+
);
|
95 |
+
}
|
96 |
+
}
|
97 |
+
|
98 |
+
// Store adsense values
|
99 |
+
quads_store_adsense_args();
|
100 |
+
// Store AdSense value
|
101 |
+
//quads_fix_ad_not_shown();
|
102 |
+
// Creates our settings in the options table
|
103 |
+
register_setting( 'quads_settings', 'quads_settings', 'quads_settings_sanitize' );
|
104 |
+
}
|
105 |
+
|
106 |
+
add_action( 'admin_init', 'quads_register_settings' );
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Retrieve the array of plugin settings
|
110 |
+
*
|
111 |
+
* @since 1.8
|
112 |
+
* @return array
|
113 |
+
*/
|
114 |
+
function quads_get_registered_settings() {
|
115 |
+
|
116 |
+
/**
|
117 |
+
* 'Whitelisted' QUADS settings, filters are provided for each settings
|
118 |
+
* section to allow extensions and other plugins to add their own settings
|
119 |
+
*/
|
120 |
+
$quads_settings = array(
|
121 |
+
/** General Settings */
|
122 |
+
'general' => apply_filters( 'quads_settings_general', array(
|
123 |
+
array(
|
124 |
+
'id' => 'general_header',
|
125 |
+
'name' => '<strong>' . __( 'General & Position', 'quick-adsense-reloaded' ) . '</strong>',
|
126 |
+
'desc' => __( '', 'quick-adsense-reloaded' ),
|
127 |
+
'type' => 'header'
|
128 |
+
),
|
129 |
+
'maxads' => array(
|
130 |
+
'id' => 'maxads',
|
131 |
+
'name' => __( 'Limit Amount of ads:', 'quick-adsense-reloaded' ),
|
132 |
+
'desc' => __( ' ads on a page.', 'quick-adsense-reloaded' ),
|
133 |
+
'desc2' => sprintf( __( '<a href="%s" target="_blank">Read here</a> to learn how many AdSense ads are allowed. If you are unsure set the value to unlimited.', 'quick-adsense-reloaded' ), 'http://wpquads.com/google-adsense-allowed-number-ads/' ),
|
134 |
+
'type' => 'select',
|
135 |
+
'std' => 100,
|
136 |
+
'options' => array(
|
137 |
+
1 => '1',
|
138 |
+
2 => '2',
|
139 |
+
3 => '3',
|
140 |
+
4 => '4',
|
141 |
+
5 => '5',
|
142 |
+
6 => '6',
|
143 |
+
7 => '7',
|
144 |
+
8 => '8',
|
145 |
+
9 => '9',
|
146 |
+
10 => '10',
|
147 |
+
11 => '11',
|
148 |
+
12 => '12',
|
149 |
+
13 => '13',
|
150 |
+
14 => '14',
|
151 |
+
15 => '15',
|
152 |
+
16 => '16',
|
153 |
+
17 => '17',
|
154 |
+
18 => '18',
|
155 |
+
19 => '19',
|
156 |
+
20 => '20',
|
157 |
+
100 => 'Unlimited',
|
158 |
+
),
|
159 |
+
),
|
160 |
+
array(
|
161 |
+
'id' => 'ad_position',
|
162 |
+
'name' => __( 'Position - Default Ads', 'quick-adsense-reloaded' ),
|
163 |
+
'desc' => __( 'Assign and activate ads on specific ad places', 'quick-adsense-reloaded' ),
|
164 |
+
'type' => 'ad_position'
|
165 |
+
),
|
166 |
+
array(
|
167 |
+
'id' => 'visibility',
|
168 |
+
'name' => __( 'Visibility', 'quick-adsense-reloaded' ),
|
169 |
+
'desc' => __( '', 'quick-adsense-reloaded' ),
|
170 |
+
'type' => 'visibility'
|
171 |
+
),
|
172 |
+
array(
|
173 |
+
"id" => "post_types",
|
174 |
+
"name" => __( "Post Types", "quick-adsense-reloaded" ),
|
175 |
+
"desc" => __( "Select post types where ads are visible.", "quick-adsense-reloaded" ),
|
176 |
+
"helper-desc" => __( "Select post types where ads are visible.", "quick-adsense-reloaded" ),
|
177 |
+
"type" => "multiselect",
|
178 |
+
"options" => quads_get_post_types(),
|
179 |
+
"placeholder" => __( "Select Post Type", "quick-adsense-reloaded" )
|
180 |
+
),
|
181 |
+
array(
|
182 |
+
'id' => 'quicktags',
|
183 |
+
'name' => __( 'Quicktags', 'quick-adsense-reloaded' ),
|
184 |
+
'desc' => __( '', 'quick-adsense-reloaded' ),
|
185 |
+
'type' => 'quicktags'
|
186 |
+
),
|
187 |
+
/* 'load_scripts_footer' => array(
|
188 |
+
'id' => 'load_scripts_footer',
|
189 |
+
'name' => __( 'JS Load Order', 'quick-adsense-reloaded' ),
|
190 |
+
'desc' => __( 'Enable this to load all *.js files into footer. Make sure your theme uses the wp_footer() template tag in the appropriate place. Default: Disabled', 'quick-adsense-reloaded' ),
|
191 |
+
'type' => 'checkbox'
|
192 |
+
), */
|
193 |
+
'adsense_header' => array(
|
194 |
+
'id' => 'adsense_header',
|
195 |
+
'name' => '<strong>' . __( 'AdSense Code', 'quick-adsense-reloaded' ) . '</strong>',
|
196 |
+
'desc' => '<div class="adsense_admin_header">' . sprintf( __( 'Enter your ads below:</div>'
|
197 |
+
. '<ul style="margin-top:10px;">'
|
198 |
+
. '<li style="font-weight:600;">Select <i>AdSense</i> for using <span style="font-weight:600;">AdSense Text & display Ads</span>!</li>'
|
199 |
+
. '<li style="font-weight:600;">Use <i>Plain Text / HTML / JS</i> for all other ads! <br><strong>Caution:</strong> Adding AdSense code into <i>Plain Text</i> option can result in non-displayed ads!</li></ul>', 'quick-adsense-reloaded' ), 'http://wpquads.com/effective-adsense-banner-size-formats/?utm_campaign=plugin&utm_source=general_tab&utm_medium=admin&utm_content=best_banner_sizes' )
|
200 |
+
. '</ul>'
|
201 |
+
. '<div style="clear:both;">' . sprintf( __( '<strong>Ads are not showing? Read the <a href="%s" target="_blank">troubleshooting guide</a> to find out how to resolve it.', 'quick-adsense-reloaded' ), 'http://wpquads.com/docs/adsense-ads-are-not-showing/?utm_source=plugin&utm_campaign=wpquads-settings&utm_medium=website&utm_term=toplink' ) . ''
|
202 |
+
. '<br><a href="%s" target="_blank">Read here</a> to find out the most effective AdSense banner sizes. </div>'
|
203 |
+
. '<div id="quads-open-toggle" class="button">' . __( 'Open All Ads', 'quick-adsense-reloaded' ) . '</div>',
|
204 |
+
'type' => 'header'
|
205 |
+
),
|
206 |
+
array(
|
207 |
+
'id' => 'quads_ads',
|
208 |
+
'name' => __( '', 'quick-adsense-reloaded' ),
|
209 |
+
'type' => 'ad_code'
|
210 |
+
),
|
211 |
+
array(
|
212 |
+
'id' => 'new_ad',
|
213 |
+
'name' => __( '', 'quick-adsense-reloaded' ),
|
214 |
+
'type' => 'new_ad',
|
215 |
+
),
|
216 |
+
'widget_header' => array(
|
217 |
+
'id' => 'widget_header',
|
218 |
+
'name' => '<strong>' . __( 'Widgets Ad Code', 'quick-adsense-reloaded' ) . '</strong>',
|
219 |
+
'desc' => sprintf( __( 'After creating your ads here go to <a href="%s" target="_self">Appearance->Widgets</a> and drag the WP QUADS widget into place.', 'quick-adsense-reloaded' ), admin_url() . 'widgets.php' ),
|
220 |
+
'type' => 'header'
|
221 |
+
),
|
222 |
+
'ad1_widget' => array(
|
223 |
+
'id' => 'ad1_widget',
|
224 |
+
'name' => __( 'Ad widget 1', 'quick-adsense-reloaded' ),
|
225 |
+
'desc' => __( '', 'quick-adsense-reloaded' ),
|
226 |
+
'type' => 'adsense_widget',
|
227 |
+
'size' => 4
|
228 |
+
),
|
229 |
+
'ad2_widget' => array(
|
230 |
+
'id' => 'ad2_widget',
|
231 |
+
'name' => __( 'Ad widget 2', 'quick-adsense-reloaded' ),
|
232 |
+
'desc' => __( '', 'quick-adsense-reloaded' ),
|
233 |
+
'type' => 'adsense_widget',
|
234 |
+
'size' => 4
|
235 |
+
),
|
236 |
+
'ad3_widget' => array(
|
237 |
+
'id' => 'ad3_widget',
|
238 |
+
'name' => __( 'Ad widget 3', 'quick-adsense-reloaded' ),
|
239 |
+
'desc' => __( '', 'quick-adsense-reloaded' ),
|
240 |
+
'type' => 'adsense_widget',
|
241 |
+
'size' => 4
|
242 |
+
),
|
243 |
+
'ad4_widget' => array(
|
244 |
+
'id' => 'ad4_widget',
|
245 |
+
'name' => __( 'Ad widget 4', 'quick-adsense-reloaded' ),
|
246 |
+
'desc' => __( '', 'quick-adsense-reloaded' ),
|
247 |
+
'type' => 'adsense_widget',
|
248 |
+
'size' => 4
|
249 |
+
),
|
250 |
+
'ad5_widget' => array(
|
251 |
+
'id' => 'ad5_widget',
|
252 |
+
'name' => __( 'Ad widget 5', 'quick-adsense-reloaded' ),
|
253 |
+
'desc' => __( '', 'quick-adsense-reloaded' ),
|
254 |
+
'type' => 'adsense_widget',
|
255 |
+
'size' => 4
|
256 |
+
),
|
257 |
+
'ad6_widget' => array(
|
258 |
+
'id' => 'ad6_widget',
|
259 |
+
'name' => __( 'Ad widget 6', 'quick-adsense-reloaded' ),
|
260 |
+
'desc' => __( '', 'quick-adsense-reloaded' ),
|
261 |
+
'type' => 'adsense_widget',
|
262 |
+
'size' => 4
|
263 |
+
),
|
264 |
+
'ad7_widget' => array(
|
265 |
+
'id' => 'ad7_widget',
|
266 |
+
'name' => __( 'Ad widget 7', 'quick-adsense-reloaded' ),
|
267 |
+
'desc' => __( '', 'quick-adsense-reloaded' ),
|
268 |
+
'type' => 'adsense_widget',
|
269 |
+
'size' => 4
|
270 |
+
),
|
271 |
+
'ad8_widget' => array(
|
272 |
+
'id' => 'ad8_widget',
|
273 |
+
'name' => __( 'Ad widget 8', 'quick-adsense-reloaded' ),
|
274 |
+
'desc' => __( '', 'quick-adsense-reloaded' ),
|
275 |
+
'type' => 'adsense_widget',
|
276 |
+
'size' => 4
|
277 |
+
),
|
278 |
+
'ad9_widget' => array(
|
279 |
+
'id' => 'ad9_widget',
|
280 |
+
'name' => __( 'Ad widget 9', 'quick-adsense-reloaded' ),
|
281 |
+
'desc' => __( '', 'quick-adsense-reloaded' ),
|
282 |
+
'type' => 'adsense_widget',
|
283 |
+
'size' => 4
|
284 |
+
),
|
285 |
+
'ad10_widget' => array(
|
286 |
+
'id' => 'ad10_widget',
|
287 |
+
'name' => __( 'Ad widget 10', 'quick-adsense-reloaded' ),
|
288 |
+
'desc' => __( '', 'quick-adsense-reloaded' ),
|
289 |
+
'type' => 'adsense_widget',
|
290 |
+
'size' => 4
|
291 |
+
),
|
292 |
+
array(
|
293 |
+
'id' => 'plugin_header',
|
294 |
+
'name' => '<strong>' . __( 'Plugin Settings', 'quick-adsense-reloaded' ) . '</strong>',
|
295 |
+
'desc' => __( '', 'quick-adsense-reloaded' ),
|
296 |
+
'type' => 'header'
|
297 |
+
),
|
298 |
+
'priority' => array(
|
299 |
+
'id' => 'priority',
|
300 |
+
'name' => __( 'Load Priority', 'quick-adsense-reloaded' ),
|
301 |
+
//'desc' => __( 'Do not change this until you know what you are doing. Usually the default value 20 is working fine. Changing this value can lead to unexpected results like ads not showing or loaded on wrong order. <strong>Default:</strong> 20', 'quick-adsense-reloaded' ),
|
302 |
+
'helper-desc' => __( 'Do not change this until you know what you are doing. Usually the default value 20 is working fine. Changing this value can lead to unexpected results like ads not showing or loaded on wrong order. <strong>Default:</strong> 20', 'quick-adsense-reloaded' ),
|
303 |
+
'type' => 'number',
|
304 |
+
'size' => 'small',
|
305 |
+
'std' => 20
|
306 |
+
),
|
307 |
+
'create_settings' => array(
|
308 |
+
'id' => 'create_settings',
|
309 |
+
'name' => __( 'Remove menu button', 'quick-adsense-reloaded' ),
|
310 |
+
//'desc' => __( 'Make the WPQUADS settings available from <strong>Settings->WPQUADS</strong>. This will remove the primary menu button from the admin sidebar', 'quick-adsense-reloaded' ),
|
311 |
+
'desc' => __( 'Remove it' ),
|
312 |
+
'helper-desc' => __( 'Make the WPQUADS settings available from <strong>Settings->WPQUADS</strong>. This will remove the primary menu button from the admin sidebar', 'quick-adsense-reloaded' ),
|
313 |
+
'type' => 'checkbox',
|
314 |
+
),
|
315 |
+
'uninstall_on_delete' => array(
|
316 |
+
'id' => 'uninstall_on_delete',
|
317 |
+
'name' => __( 'Delete Data on Uninstall?', 'quick-adsense-reloaded' ),
|
318 |
+
//'desc' => __( 'Check this box if you would like <strong>Settings->WPQUADS</strong> to completely remove all of its data when the plugin is deleted.', 'quick-adsense-reloaded' ),
|
319 |
+
'helper-desc' => __( 'Check this box if you would like <strong>Settings->WPQUADS</strong> to completely remove all of its data when the plugin is deleted.', 'quick-adsense-reloaded' ),
|
320 |
+
'desc' => 'Delete data',
|
321 |
+
'type' => 'checkbox'
|
322 |
+
),
|
323 |
+
'debug_mode' => array(
|
324 |
+
'id' => 'debug_mode',
|
325 |
+
'name' => __( 'Debug mode', 'quick-adsense-reloaded' ),
|
326 |
+
'desc' => __( 'Check this to not minify JavaScript and CSS files. This makes debugging much easier and is recommended setting for inspecting issues on your site', 'quick-adsense-reloaded' ),
|
327 |
+
'type' => 'checkbox'
|
328 |
+
)
|
329 |
+
)
|
330 |
+
),
|
331 |
+
'licenses' => apply_filters( 'quads_settings_licenses', array('licenses_header' => array(
|
332 |
+
'id' => 'licenses_header',
|
333 |
+
'name' => __( 'Activate Your License', 'quick-adsense-reloaded' ),
|
334 |
+
'desc' => '',
|
335 |
+
'type' => 'header'
|
336 |
+
),)
|
337 |
+
),
|
338 |
+
'extensions' => apply_filters( 'quads_settings_extension', array()
|
339 |
+
),
|
340 |
+
'addons' => apply_filters( 'quads_settings_addons', array(
|
341 |
+
'addons' => array(
|
342 |
+
'id' => 'addons',
|
343 |
+
'name' => __( '', 'quick-adsense-reloaded' ),
|
344 |
+
'desc' => __( '', 'quick-adsense-reloaded' ),
|
345 |
+
'type' => 'addons'
|
346 |
+
),
|
347 |
+
)
|
348 |
+
),
|
349 |
+
'imexport' => apply_filters( 'quads_settings_imexport', array(
|
350 |
+
'imexport' => array(
|
351 |
+
'id' => 'imexport',
|
352 |
+
'name' => __( '', 'quick-adsense-reloaded' ),
|
353 |
+
'desc' => __( '', 'quick-adsense-reloaded' ),
|
354 |
+
'type' => 'imexport'
|
355 |
+
)
|
356 |
+
)
|
357 |
+
),
|
358 |
+
'help' => apply_filters( 'quads_settings_help', array(
|
359 |
+
'help_header' => array(
|
360 |
+
'id' => 'help_header',
|
361 |
+
'name' => '<strong>' . __( 'Help', 'quick-adsense-reloaded' ) . '</strong>',
|
362 |
+
'desc' => quads_is_extra() ? sprintf( __( 'Something not working as expected? Open a <a href="%1s" target="_blank">support ticket</a>', 'quick-adsense-reloaded' ), 'http://wpquads.com/support/' ) : sprintf( __( 'Something not working as expected? Visit the WP<strong>QUADS</strong> <a href="%1s" target="_blank">Support Forum</a>', 'quick-adsense-reloaded' ), 'https://wordpress.org/support/plugin/quick-adsense-reloaded' ),
|
363 |
+
'type' => 'header'
|
364 |
+
),
|
365 |
+
'systeminfo' => array(
|
366 |
+
'id' => 'systeminfo',
|
367 |
+
'name' => __( 'Systeminfo', 'quick-adsense-reloaded' ),
|
368 |
+
'desc' => __( '', 'quick-adsense-reloaded' ),
|
369 |
+
'type' => 'systeminfo'
|
370 |
+
)
|
371 |
+
)
|
372 |
+
)
|
373 |
+
);
|
374 |
+
|
375 |
+
return $quads_settings;
|
376 |
+
}
|
377 |
+
|
378 |
+
/**
|
379 |
+
* return empty settings
|
380 |
+
* @return string empty one
|
381 |
+
*/
|
382 |
+
function quads_empty_callback() {
|
383 |
+
return '';
|
384 |
+
}
|
385 |
+
|
386 |
+
/**
|
387 |
+
* Settings Sanitization
|
388 |
+
*
|
389 |
+
* Adds a settings error (for the updated message)
|
390 |
+
* At some point this will validate input
|
391 |
+
*
|
392 |
+
* @since 0.9.0
|
393 |
+
*
|
394 |
+
* @param array $input The value input in the field
|
395 |
+
*
|
396 |
+
* @return string $input Sanitized value
|
397 |
+
*/
|
398 |
+
function quads_settings_sanitize( $input = array() ) {
|
399 |
+
|
400 |
+
global $quads_options;
|
401 |
+
|
402 |
+
|
403 |
+
if( empty( $_POST['_wp_http_referer'] ) ) {
|
404 |
+
return $input;
|
405 |
+
}
|
406 |
+
|
407 |
+
parse_str( $_POST['_wp_http_referer'], $referrer );
|
408 |
+
|
409 |
+
$settings = quads_get_registered_settings();
|
410 |
+
$tab = isset( $referrer['tab'] ) ? $referrer['tab'] : 'general';
|
411 |
+
|
412 |
+
|
413 |
+
$input = $input ? $input : array();
|
414 |
+
$input = apply_filters( 'quads_settings_' . $tab . '_sanitize', $input );
|
415 |
+
// Loop through each setting being saved and pass it through a sanitization filter
|
416 |
+
foreach ( $input as $key => $value ) {
|
417 |
+
|
418 |
+
// Get the setting type (checkbox, select, etc)
|
419 |
+
$type = isset( $settings[$tab][$key]['type'] ) ? $settings[$tab][$key]['type'] : false;
|
420 |
+
if( $type ) {
|
421 |
+
// Field type specific filter
|
422 |
+
$input[$key] = apply_filters( 'quads_settings_sanitize_' . $type, $value, $key );
|
423 |
+
}
|
424 |
+
|
425 |
+
// General filter
|
426 |
+
$input[$key] = apply_filters( 'quads_settings_sanitize', $value, $key );
|
427 |
+
}
|
428 |
+
//wp_die(var_dump($input));
|
429 |
+
|
430 |
+
|
431 |
+
// Loop through the whitelist and unset any that are empty for the tab being saved
|
432 |
+
if( !empty( $settings[$tab] ) ) {
|
433 |
+
foreach ( $settings[$tab] as $key => $value ) {
|
434 |
+
// settings used to have numeric keys, now they have keys that match the option ID. This ensures both methods work
|
435 |
+
if( is_numeric( $key ) ) {
|
436 |
+
$key = $value['id'];
|
437 |
+
}
|
438 |
+
|
439 |
+
if( empty( $input[$key] ) ) {
|
440 |
+
unset( $quads_options[$key] );
|
441 |
+
}
|
442 |
+
}
|
443 |
+
}
|
444 |
+
|
445 |
+
|
446 |
+
// Merge our new settings with the existing
|
447 |
+
$output = array_merge( $quads_options, $input );
|
448 |
+
|
449 |
+
|
450 |
+
add_settings_error( 'quads-notices', '', __( 'Settings updated.', 'quick-adsense-reloaded' ), 'updated' );
|
451 |
+
|
452 |
+
return $output;
|
453 |
+
}
|
454 |
+
|
455 |
+
/**
|
456 |
+
* Sanitize all fields and remove whitespaces
|
457 |
+
*
|
458 |
+
* @since 1.5.3
|
459 |
+
* @param array $input The field value
|
460 |
+
* @return string $input Sanitizied value
|
461 |
+
*/
|
462 |
+
function quads_sanitize_general_field( $input ){
|
463 |
+
if (!is_array( $input )){
|
464 |
+
return trim($input);
|
465 |
+
}
|
466 |
+
return array_map('quads_sanitize_general_field', $input);
|
467 |
+
}
|
468 |
+
add_filter( 'quads_settings_sanitize', 'quads_sanitize_general_field' );
|
469 |
+
|
470 |
+
/**
|
471 |
+
* Sanitize text fields
|
472 |
+
*
|
473 |
+
* @since 1.8
|
474 |
+
* @param array $input The field value
|
475 |
+
* @return string $input Sanitizied value
|
476 |
+
*/
|
477 |
+
function quads_sanitize_text_field( $input ) {
|
478 |
+
return trim( $input );
|
479 |
+
}
|
480 |
+
add_filter( 'quads_settings_sanitize_text', 'quads_sanitize_text_field' );
|
481 |
+
|
482 |
+
/**
|
483 |
+
* Retrieve settings tabs
|
484 |
+
*
|
485 |
+
* @since 1.8
|
486 |
+
* @param array $input The field value
|
487 |
+
* @return string $input Sanitizied value
|
488 |
+
*/
|
489 |
+
function quads_get_settings_tabs() {
|
490 |
+
|
491 |
+
$settings = quads_get_registered_settings();
|
492 |
+
|
493 |
+
$tabs = array();
|
494 |
+
$tabs['general'] = __( 'General', 'quick-adsense-reloaded' );
|
495 |
+
|
496 |
+
if( !empty( $settings['visual'] ) ) {
|
497 |
+
$tabs['visual'] = __( 'Visual', 'quick-adsense-reloaded' );
|
498 |
+
}
|
499 |
+
|
500 |
+
if( !empty( $settings['networks'] ) ) {
|
501 |
+
//$tabs['networks'] = __( 'Social Networks', 'quick-adsense-reloaded' );
|
502 |
+
}
|
503 |
+
|
504 |
+
if( !empty( $settings['extensions'] ) ) {
|
505 |
+
$tabs['extensions'] = __( 'Add-On Setting', 'quick-adsense-reloaded' );
|
506 |
+
}
|
507 |
+
|
508 |
+
|
509 |
+
if( !empty( $settings['licenses'] ) && quads_is_extra() || quads_is_advanced() ) {
|
510 |
+
$tabs['licenses'] = __( 'Licenses', 'quick-adsense-reloaded' );
|
511 |
+
}
|
512 |
+
|
513 |
+
//$tabs['addons'] = __( 'Add-Ons', 'quick-adsense-reloaded' );
|
514 |
+
|
515 |
+
$tabs['imexport'] = __( 'Import/Export', 'quick-adsense-reloaded' );
|
516 |
+
|
517 |
+
$tabs['help'] = __( 'Help', 'quick-adsense-reloaded' );
|
518 |
+
|
519 |
+
//$tabs['misc'] = __( 'Misc', 'quick-adsense-reloaded' );
|
520 |
+
|
521 |
+
return apply_filters( 'quads_settings_tabs', $tabs );
|
522 |
+
}
|
523 |
+
|
524 |
+
/**
|
525 |
+
* Header Callback
|
526 |
+
*
|
527 |
+
* Renders the header.
|
528 |
+
*
|
529 |
+
* @since 1.0
|
530 |
+
* @param array $args Arguments passed by the setting
|
531 |
+
* @return void
|
532 |
+
*/
|
533 |
+
function quads_header_callback( $args ) {
|
534 |
+
if( !empty( $args['desc'] ) ) {
|
535 |
+
echo $args['desc'];
|
536 |
+
} else {
|
537 |
+
echo ' ';
|
538 |
+
}
|
539 |
+
}
|
540 |
+
|
541 |
+
/**
|
542 |
+
* Checkbox Callback
|
543 |
+
*
|
544 |
+
* Renders checkboxes.
|
545 |
+
*
|
546 |
+
* @since 1.0
|
547 |
+
* @param array $args Arguments passed by the setting
|
548 |
+
* @global $quads_options Array of all the QUADS Options
|
549 |
+
* @return void
|
550 |
+
*/
|
551 |
+
function quads_checkbox_callback( $args ) {
|
552 |
+
global $quads_options;
|
553 |
+
|
554 |
+
$checked = isset( $quads_options[$args['id']] ) ? checked( 1, $quads_options[$args['id']], false ) : '';
|
555 |
+
$html = '<input type="checkbox" id="quads_settings[' . $args['id'] . ']" name="quads_settings[' . $args['id'] . ']" value="1" ' . $checked . '/>';
|
556 |
+
$html .= '<label class="quads_hidden" for="quads_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
|
557 |
+
|
558 |
+
echo $html;
|
559 |
+
}
|
560 |
+
|
561 |
+
/**
|
562 |
+
* Checkbox Callback
|
563 |
+
*
|
564 |
+
* Renders checkboxes.
|
565 |
+
*
|
566 |
+
* @since 1.0
|
567 |
+
* @param array $args Arguments passed by the setting
|
568 |
+
* @global $quads_options Array of all the QUADS Options
|
569 |
+
* @return void
|
570 |
+
*/
|
571 |
+
function quads_checkbox_adsense_callback( $args ) {
|
572 |
+
global $quads_options;
|
573 |
+
|
574 |
+
$checked = isset( $quads_options[$args['id']] ) ? checked( 1, $quads_options[$args['id']], false ) : '';
|
575 |
+
$html = '<input type="checkbox" id="quads_settings[' . $args['id'] . ']" name="quads_settings[' . $args['id'] . ']" value="1" ' . $checked . '/>';
|
576 |
+
$html .= '<label class="quads_hidden" for="quads_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
|
577 |
+
|
578 |
+
return $html;
|
579 |
+
}
|
580 |
+
|
581 |
+
/**
|
582 |
+
* Multicheck Callback
|
583 |
+
*
|
584 |
+
* Renders multiple checkboxes.
|
585 |
+
*
|
586 |
+
* @since 1.0
|
587 |
+
* @param array $args Arguments passed by the setting
|
588 |
+
* @global $quads_options Array of all the QUADS Options
|
589 |
+
* @return void
|
590 |
+
*/
|
591 |
+
function quads_multicheck_callback( $args ) {
|
592 |
+
global $quads_options;
|
593 |
+
|
594 |
+
if( !empty( $args['options'] ) ) {
|
595 |
+
foreach ( $args['options'] as $key => $option ):
|
596 |
+
if( isset( $quads_options[$args['id']][$key] ) ) {
|
597 |
+
$enabled = $option;
|
598 |
+
} else {
|
599 |
+
$enabled = NULL;
|
600 |
+
}
|
601 |
+
echo '<input name="quads_settings[' . $args['id'] . '][' . $key . ']" id="quads_settings[' . $args['id'] . '][' . $key . ']" type="checkbox" value="' . $option . '" ' . checked( $option, $enabled, false ) . '/> ';
|
602 |
+
echo '<label for="quads_settings[' . $args['id'] . '][' . $key . ']">' . $option . '</label><br/>';
|
603 |
+
endforeach;
|
604 |
+
echo '<p class="description quads_hidden">' . $args['desc'] . '</p>';
|
605 |
+
}
|
606 |
+
}
|
607 |
+
|
608 |
+
/**
|
609 |
+
* Radio Callback
|
610 |
+
*
|
611 |
+
* Renders radio boxes.
|
612 |
+
*
|
613 |
+
* @since 1.3.3
|
614 |
+
* @param array $args Arguments passed by the setting
|
615 |
+
* @global $quads_options Array of all the QUADS Options
|
616 |
+
* @return void
|
617 |
+
*/
|
618 |
+
function quads_radio_callback( $args ) {
|
619 |
+
global $quads_options;
|
620 |
+
|
621 |
+
foreach ( $args['options'] as $key => $option ) :
|
622 |
+
$checked = false;
|
623 |
+
|
624 |
+
if( isset( $quads_options[$args['id']] ) && $quads_options[$args['id']] == $key )
|
625 |
+
$checked = true;
|
626 |
+
elseif( isset( $args['std'] ) && $args['std'] == $key && !isset( $quads_options[$args['id']] ) )
|
627 |
+
$checked = true;
|
628 |
+
|
629 |
+
echo '<input name="quads_settings[' . $args['id'] . ']"" id="quads_settings[' . $args['id'] . '][' . $key . ']" type="radio" value="' . $key . '" ' . checked( true, $checked, false ) . '/> ';
|
630 |
+
echo '<label for="quads_settings[' . $args['id'] . '][' . $key . ']">' . $option . '</label><br/>';
|
631 |
+
endforeach;
|
632 |
+
|
633 |
+
echo '<p class="description quads_hidden">' . $args['desc'] . '</p>';
|
634 |
+
}
|
635 |
+
|
636 |
+
/**
|
637 |
+
* Radio Callback for ad types
|
638 |
+
*
|
639 |
+
* Renders radio boxes for specific ads
|
640 |
+
*
|
641 |
+
* @since 1.2.7
|
642 |
+
* @param1 array $args Arguments passed by the setting
|
643 |
+
* @param2 id int ID of the ad
|
644 |
+
*
|
645 |
+
* @global $quads_options Array of all the QUADS Options
|
646 |
+
* @return void
|
647 |
+
*/
|
648 |
+
function quads_adtype_callback( $id, $args ) {
|
649 |
+
global $quads_options;
|
650 |
+
|
651 |
+
foreach ( $args['options'] as $key => $option ) :
|
652 |
+
$checked = false;
|
653 |
+
|
654 |
+
if( isset( $quads_options['ads'][$id]['ad_type'] ) && $quads_options['ads'][$id]['ad_type'] == $key )
|
655 |
+
$checked = true;
|
656 |
+
elseif( isset( $args['std'] ) && $args['std'] == $key && !isset( $quads_options['ads'][$id]['ad_type'] ) )
|
657 |
+
$checked = true;
|
658 |
+
|
659 |
+
echo '<input name="quads_settings[ads][' . $id . '][ad_type]" class="quads_adsense_type" id="quads_settings[ads][' . $id . '][ad_type_' . $key . ']" type="radio" value="' . $key . '" ' . checked( true, $checked, false ) . '/> ';
|
660 |
+
echo '<label for="quads_settings[ads][' . $id . '][ad_type_' . $key . ']">' . $option . '</label> ';
|
661 |
+
endforeach;
|
662 |
+
|
663 |
+
echo '<p class="description quads_hidden">' . $args['desc'] . '</p>';
|
664 |
+
}
|
665 |
+
|
666 |
+
/**
|
667 |
+
* Radio Callback for ad positions
|
668 |
+
*
|
669 |
+
* Renders radio boxes for left center right alignment
|
670 |
+
*
|
671 |
+
* @since 1.2.7
|
672 |
+
* @param1 array $args Arguments passed by the setting
|
673 |
+
* @param2 id int ID of the ad
|
674 |
+
*
|
675 |
+
* @global $quads_options Array of all the QUADS Options
|
676 |
+
* @return void
|
677 |
+
*/
|
678 |
+
function quads_adposition_callback( $id, $args ) {
|
679 |
+
global $quads_options;
|
680 |
+
|
681 |
+
foreach ( $args['options'] as $key => $option ) :
|
682 |
+
$checked = false;
|
683 |
+
|
684 |
+
if( isset( $quads_options['ads'][$id]['align'] ) && $quads_options['ads'][$id]['align'] == $key )
|
685 |
+
$checked = true;
|
686 |
+
elseif( isset( $args['std'] ) && $args['std'] == $key && !isset( $quads_options['ads'][$id]['align'] ) )
|
687 |
+
$checked = true;
|
688 |
+
|
689 |
+
if( $key == '3' ) {
|
690 |
+
echo '<input name="quads_settings[ads][' . $id . '][align]" class="quads_adsense_align" id="quads_settings[ads][' . $id . '][align_' . $key . ']" type="radio" value="' . $key . '" ' . checked( true, $checked, false ) . '/> ';
|
691 |
+
echo '<label for="quads_settings[ads][' . $id . '][align_' . $key . ']">Default</label> ';
|
692 |
+
} else {
|
693 |
+
echo '<input name="quads_settings[ads][' . $id . '][align]" class="quads_adsense_positon" id="quads_settings[ads][' . $id . '][align_' . $key . ']" type="radio" value="' . $key . '" ' . checked( true, $checked, false ) . '/> ';
|
694 |
+
echo '<label for="quads_settings[ads][' . $id . '][align_' . $key . ']"><img src="' . QUADS_PLUGIN_URL . 'assets/images/align_' . $key . '.png" width="75" height="56"></label> ';
|
695 |
+
}
|
696 |
+
|
697 |
+
endforeach;
|
698 |
+
}
|
699 |
+
|
700 |
+
/**
|
701 |
+
* Gateways Callback
|
702 |
+
*
|
703 |
+
* Renders gateways fields.
|
704 |
+
*
|
705 |
+
* @since 1.0
|
706 |
+
* @param array $args Arguments passed by the setting
|
707 |
+
* @global $quads_options Array of all the QUADS Options
|
708 |
+
* @return void
|
709 |
+
*/
|
710 |
+
//function quads_gateways_callback( $args ) {
|
711 |
+
// global $quads_options;
|
712 |
+
//
|
713 |
+
// foreach ( $args['options'] as $key => $option ) :
|
714 |
+
// if( isset( $quads_options['gateways'][$key] ) )
|
715 |
+
// $enabled = '1';
|
716 |
+
// else
|
717 |
+
// $enabled = null;
|
718 |
+
//
|
719 |
+
// echo '<input name="quads_settings[' . $args['id'] . '][' . $key . ']"" id="quads_settings[' . $args['id'] . '][' . $key . ']" type="checkbox" value="1" ' . checked( '1', $enabled, false ) . '/> ';
|
720 |
+
// echo '<label for="quads_settings[' . $args['id'] . '][' . $key . ']">' . $option['admin_label'] . '</label><br/>';
|
721 |
+
// endforeach;
|
722 |
+
//}
|
723 |
+
|
724 |
+
/**
|
725 |
+
* Text Callback
|
726 |
+
*
|
727 |
+
* Renders text fields.
|
728 |
+
*
|
729 |
+
* @since 1.0
|
730 |
+
* @param array $args Arguments passed by the setting
|
731 |
+
* @global $quads_options Array of all the QUADS Options
|
732 |
+
* @return void
|
733 |
+
*/
|
734 |
+
function quads_text_callback( $args ) {
|
735 |
+
global $quads_options;
|
736 |
+
|
737 |
+
if( isset( $quads_options[$args['id']] ) )
|
738 |
+
$value = $quads_options[$args['id']];
|
739 |
+
else
|
740 |
+
$value = isset( $args['std'] ) ? $args['std'] : '';
|
741 |
+
|
742 |
+
$size = ( isset( $args['size'] ) && !is_null( $args['size'] ) ) ? $args['size'] : 'regular';
|
743 |
+
$html = '<input type="text" class="' . $size . '-text" id="quads_settings[' . $args['id'] . ']" name="quads_settings[' . $args['id'] . ']" value="' . esc_attr( stripslashes( $value ) ) . '"/>';
|
744 |
+
$html .= '<label class="quads_hidden" class="quads_hidden" for="quads_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
|
745 |
+
|
746 |
+
echo $html;
|
747 |
+
}
|
748 |
+
|
749 |
+
/**
|
750 |
+
* Number Callback
|
751 |
+
*
|
752 |
+
* Renders number fields.
|
753 |
+
*
|
754 |
+
* @since 1.9
|
755 |
+
* @param array $args Arguments passed by the setting
|
756 |
+
* @global $quads_options Array of all the QUADS Options
|
757 |
+
* @return void
|
758 |
+
*/
|
759 |
+
function quads_number_callback( $args ) {
|
760 |
+
global $quads_options;
|
761 |
+
|
762 |
+
if( isset( $quads_options[$args['id']] ) )
|
763 |
+
$value = $quads_options[$args['id']];
|
764 |
+
else
|
765 |
+
$value = isset( $args['std'] ) ? $args['std'] : '';
|
766 |
+
|
767 |
+
$max = isset( $args['max'] ) ? $args['max'] : 999999;
|
768 |
+
$min = isset( $args['min'] ) ? $args['min'] : 0;
|
769 |
+
$step = isset( $args['step'] ) ? $args['step'] : 1;
|
770 |
+
|
771 |
+
$size = ( isset( $args['size'] ) && !is_null( $args['size'] ) ) ? $args['size'] : 'regular';
|
772 |
+
$html = '<input type="number" step="' . esc_attr( $step ) . '" max="' . esc_attr( $max ) . '" min="' . esc_attr( $min ) . '" class="' . $size . '-text" id="quads_settings[' . $args['id'] . ']" name="quads_settings[' . $args['id'] . ']" value="' . esc_attr( stripslashes( $value ) ) . '"/>';
|
773 |
+
$html .= '<label class="quads_hidden" for="quads_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
|
774 |
+
|
775 |
+
echo $html;
|
776 |
+
}
|
777 |
+
|
778 |
+
/**
|
779 |
+
* Textarea Callback
|
780 |
+
*
|
781 |
+
* Renders textarea fields.
|
782 |
+
*
|
783 |
+
* @since 1.0
|
784 |
+
* @param array $args Arguments passed by the setting
|
785 |
+
* @global $quads_options Array of all the QUADS Options
|
786 |
+
* @return void
|
787 |
+
*/
|
788 |
+
function quads_textarea_callback( $args ) {
|
789 |
+
global $quads_options;
|
790 |
+
|
791 |
+
if( isset( $quads_options[$args['id']] ) )
|
792 |
+
$value = $quads_options[$args['id']];
|
793 |
+
else
|
794 |
+
$value = isset( $args['std'] ) ? $args['std'] : '';
|
795 |
+
|
796 |
+
$size = ( isset( $args['size'] ) && !is_null( $args['size'] ) ) ? $args['size'] : '40';
|
797 |
+
$html = '<textarea class="large-text quads-textarea" cols="50" rows="' . $size . '" id="quads_settings[' . $args['id'] . ']" name="quads_settings[' . $args['id'] . ']">' . esc_textarea( stripslashes( $value ) ) . '</textarea>';
|
798 |
+
$html .= '<label class="quads_hidden" for="quads_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
|
799 |
+
|
800 |
+
echo $html;
|
801 |
+
}
|
802 |
+
|
803 |
+
/**
|
804 |
+
* Password Callback
|
805 |
+
*
|
806 |
+
* Renders password fields.
|
807 |
+
*
|
808 |
+
* @since 1.3
|
809 |
+
* @param array $args Arguments passed by the setting
|
810 |
+
* @global $quads_options Array of all the QUADS Options
|
811 |
+
* @return void
|
812 |
+
*/
|
813 |
+
function quads_password_callback( $args ) {
|
814 |
+
global $quads_options;
|
815 |
+
|
816 |
+
if( isset( $quads_options[$args['id']] ) )
|
817 |
+
$value = $quads_options[$args['id']];
|
818 |
+
else
|
819 |
+
$value = isset( $args['std'] ) ? $args['std'] : '';
|
820 |
+
|
821 |
+
$size = ( isset( $args['size'] ) && !is_null( $args['size'] ) ) ? $args['size'] : 'regular';
|
822 |
+
$html = '<input type="password" class="' . $size . '-text" id="quads_settings[' . $args['id'] . ']" name="quads_settings[' . $args['id'] . ']" value="' . esc_attr( $value ) . '"/>';
|
823 |
+
$html .= '<label for="quads_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
|
824 |
+
|
825 |
+
echo $html;
|
826 |
+
}
|
827 |
+
|
828 |
+
/**
|
829 |
+
* Missing Callback
|
830 |
+
*
|
831 |
+
* If a function is missing for settings callbacks alert the user.
|
832 |
+
*
|
833 |
+
* @since 1.3.1
|
834 |
+
* @param array $args Arguments passed by the setting
|
835 |
+
* @return void
|
836 |
+
*/
|
837 |
+
function quads_missing_callback( $args ) {
|
838 |
+
printf( __( 'The callback function used for the <strong>%s</strong> setting is missing.', 'quick-adsense-reloaded' ), $args['id'] );
|
839 |
+
}
|
840 |
+
|
841 |
+
/**
|
842 |
+
* Select Callback
|
843 |
+
*
|
844 |
+
* Renders select fields.
|
845 |
+
*
|
846 |
+
* @since 1.0
|
847 |
+
* @param array $args Arguments passed by the setting
|
848 |
+
* @global $quads_options Array of all the QUADS Options
|
849 |
+
* @return void
|
850 |
+
*/
|
851 |
+
function quads_select_callback( $args ) {
|
852 |
+
global $quads_options;
|
853 |
+
|
854 |
+
if( isset( $quads_options[$args['id']] ) )
|
855 |
+
$value = $quads_options[$args['id']];
|
856 |
+
else
|
857 |
+
$value = isset( $args['std'] ) ? $args['std'] : '';
|
858 |
+
|
859 |
+
$html = '<select id="quads_settings[' . $args['id'] . ']" name="quads_settings[' . $args['id'] . ']">';
|
860 |
+
|
861 |
+
foreach ( $args['options'] as $option => $name ) :
|
862 |
+
$selected = selected( $option, $value, false );
|
863 |
+
$html .= '<option value="' . $option . '" ' . $selected . '>' . $name . '</option>';
|
864 |
+
endforeach;
|
865 |
+
|
866 |
+
$html .= '</select>';
|
867 |
+
$html .= '<label class="quads_hidden" for="quads_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
|
868 |
+
$html .= '<br>' . $args['desc2'];
|
869 |
+
|
870 |
+
echo $html;
|
871 |
+
}
|
872 |
+
|
873 |
+
/**
|
874 |
+
* AdSense Type Select Callback
|
875 |
+
*
|
876 |
+
* Renders Adsense adsense type fields.
|
877 |
+
*
|
878 |
+
* @since 1.0
|
879 |
+
* @param1 array $args Arguments passed by the setting
|
880 |
+
* @param2 int $id if od the ad
|
881 |
+
* @global $quads_options Array of all the QUADS Options
|
882 |
+
* @return void
|
883 |
+
*/
|
884 |
+
function quads_adense_select_callback( $id, $args ) {
|
885 |
+
global $quads_options;
|
886 |
+
|
887 |
+
if( isset( $quads_options['ads'][$id][$args['id']] ) )
|
888 |
+
$value = $quads_options['ads'][$id][$args['id']];
|
889 |
+
else
|
890 |
+
$value = isset( $args['std'] ) ? $args['std'] : '';
|
891 |
+
|
892 |
+
|
893 |
+
$size = !empty( $args['size'] ) ? $args['size'] : 'quads-medium-size';
|
894 |
+
|
895 |
+
$htmlNew = '<label class="quads_hidden" id="quads-label-' . $args['desc'] . '" for="quads_settings[ads][' . $id . '][' . $args['id'] . ']"> ' . $args['desc'] . ' </label>';
|
896 |
+
$htmlNew .= '<select class="quads-select-' . $args['desc'] . ' ' . $size . '" id="quads_settings[ads][' . $id . '][' . $args['id'] . ']" name="quads_settings[ads][' . $id . '][' . $args['id'] . ']" >';
|
897 |
+
|
898 |
+
foreach ( $args['options'] as $option => $name ) {
|
899 |
+
$selected = selected( $option, $value, false );
|
900 |
+
$htmlNew .= '<option value="' . $option . '" ' . $selected . '>' . $name . '</option>';
|
901 |
+
}
|
902 |
+
|
903 |
+
$htmlNew .= '</select>';
|
904 |
+
echo $htmlNew;
|
905 |
+
}
|
906 |
+
|
907 |
+
/**
|
908 |
+
* Color select Callback
|
909 |
+
*
|
910 |
+
* Renders color select fields.
|
911 |
+
*
|
912 |
+
* @since 2.1.2
|
913 |
+
* @param array $args Arguments passed by the setting
|
914 |
+
* @global $quads_options Array of all the QUADS Options
|
915 |
+
* @return void
|
916 |
+
*/
|
917 |
+
function quads_color_select_callback( $args ) {
|
918 |
+
global $quads_options;
|
919 |
+
|
920 |
+
if( isset( $quads_options[$args['id']] ) )
|
921 |
+
$value = $quads_options[$args['id']];
|
922 |
+
else
|
923 |
+
$value = isset( $args['std'] ) ? $args['std'] : '';
|
924 |
+
|
925 |
+
$html = '<strong>#:</strong><input type="text" style="max-width:80px;border:1px solid #' . esc_attr( stripslashes( $value ) ) . ';border-right:20px solid #' . esc_attr( stripslashes( $value ) ) . ';" id="quads_settings[' . $args['id'] . ']" class="medium-text ' . $args['id'] . '" name="quads_settings[' . $args['id'] . ']" value="' . esc_attr( stripslashes( $value ) ) . '"/>';
|
926 |
+
|
927 |
+
$html .= '</select>';
|
928 |
+
$html .= '<label class="quads_hidden" for="quads_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
|
929 |
+
|
930 |
+
echo $html;
|
931 |
+
}
|
932 |
+
|
933 |
+
/**
|
934 |
+
* Rich Editor Callback
|
935 |
+
*
|
936 |
+
* Renders rich editor fields.
|
937 |
+
*
|
938 |
+
* @since 1.0
|
939 |
+
* @param array $args Arguments passed by the setting
|
940 |
+
* @global $quads_options Array of all the QUADS Options
|
941 |
+
* @global $wp_version WordPress Version
|
942 |
+
*/
|
943 |
+
function quads_rich_editor_callback( $args ) {
|
944 |
+
global $quads_options, $wp_version;
|
945 |
+
if( isset( $quads_options[$args['id']] ) )
|
946 |
+
$value = $quads_options[$args['id']];
|
947 |
+
else
|
948 |
+
$value = isset( $args['std'] ) ? $args['std'] : '';
|
949 |
+
|
950 |
+
if( $wp_version >= 3.3 && function_exists( 'wp_editor' ) ) {
|
951 |
+
ob_start();
|
952 |
+
wp_editor( stripslashes( $value ), 'quads_settings_' . $args['id'], array('textarea_name' => 'quads_settings[' . $args['id'] . ']', 'textarea_rows' => $args['textarea_rows']) );
|
953 |
+
$html = ob_get_clean();
|
954 |
+
} else {
|
955 |
+
$html = '<textarea class="large-text quads-richeditor" rows="10" id="quads_settings[' . $args['id'] . ']" name="quads_settings[' . $args['id'] . ']">' . esc_textarea( stripslashes( $value ) ) . '</textarea>';
|
956 |
+
}
|
957 |
+
|
958 |
+
$html .= '<br/><label class="quads_hidden" for="quads_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
|
959 |
+
|
960 |
+
echo $html;
|
961 |
+
}
|
962 |
+
|
963 |
+
/**
|
964 |
+
* Upload Callback
|
965 |
+
*
|
966 |
+
* Renders upload fields.
|
967 |
+
*
|
968 |
+
* @since 1.0
|
969 |
+
* @param array $args Arguments passed by the setting
|
970 |
+
* @global $quads_options Array of all the QUADS Options
|
971 |
+
* @return void
|
972 |
+
*/
|
973 |
+
function quads_upload_callback( $args ) {
|
974 |
+
global $quads_options;
|
975 |
+
|
976 |
+
if( isset( $quads_options[$args['id']] ) )
|
977 |
+
$value = $quads_options[$args['id']];
|
978 |
+
else
|
979 |
+
$value = isset( $args['std'] ) ? $args['std'] : '';
|
980 |
+
|
981 |
+
$size = ( isset( $args['size'] ) && !is_null( $args['size'] ) ) ? $args['size'] : 'regular';
|
982 |
+
$html = '<input type="text" class="' . $size . '-text quads_upload_field" id="quads_settings[' . $args['id'] . ']" name="quads_settings[' . $args['id'] . ']" value="' . esc_attr( stripslashes( $value ) ) . '"/>';
|
983 |
+
$html .= '<span> <input type="button" class="quads_settings_upload_button button-secondary" value="' . __( 'Upload File', 'quick-adsense-reloaded' ) . '"/></span>';
|
984 |
+
$html .= '<label class="quads_hidden" for="quads_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
|
985 |
+
|
986 |
+
echo $html;
|
987 |
+
}
|
988 |
+
|
989 |
+
|
990 |
+
/**
|
991 |
+
* Check if extra settings are available and activated
|
992 |
+
*
|
993 |
+
* @return boolean
|
994 |
+
*/
|
995 |
+
function quads_is_extra() {
|
996 |
+
|
997 |
+
$lic = get_option( 'quads_wp_quads_pro_license_active' );
|
998 |
+
if( !$lic || (is_object( $lic ) && $lic->success !== true) ) {
|
999 |
+
return false;
|
1000 |
+
}
|
1001 |
+
|
1002 |
+
if( function_exists( 'quads_extra' ) ) {
|
1003 |
+
return true;
|
1004 |
+
}
|
1005 |
+
return false;
|
1006 |
+
}
|
1007 |
+
|
1008 |
+
/**
|
1009 |
+
* Color picker Callback
|
1010 |
+
*
|
1011 |
+
* Renders color picker fields.
|
1012 |
+
*
|
1013 |
+
* @since 1.6
|
1014 |
+
* @param array $args Arguments passed by the setting
|
1015 |
+
* @global $quads_options Array of all the QUADS Options
|
1016 |
+
* @return void
|
1017 |
+
*/
|
1018 |
+
function quads_color_callback( $args ) {
|
1019 |
+
global $quads_options;
|
1020 |
+
|
1021 |
+
if( isset( $quads_options[$args['id']] ) )
|
1022 |
+
$value = $quads_options[$args['id']];
|
1023 |
+
else
|
1024 |
+
$value = isset( $args['std'] ) ? $args['std'] : '';
|
1025 |
+
|
1026 |
+
$default = isset( $args['std'] ) ? $args['std'] : '';
|
1027 |
+
|
1028 |
+
$size = ( isset( $args['size'] ) && !is_null( $args['size'] ) ) ? $args['size'] : 'regular';
|
1029 |
+
$html = '<input type="text" class="quads-color-picker" id="quads_settings[' . $args['id'] . ']" name="quads_settings[' . $args['id'] . ']" value="' . esc_attr( $value ) . '" data-default-color="' . esc_attr( $default ) . '" />';
|
1030 |
+
$html .= '<label class="quads_hidden" for="quads_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
|
1031 |
+
|
1032 |
+
echo $html;
|
1033 |
+
}
|
1034 |
+
|
1035 |
+
/**
|
1036 |
+
* Registers the license field callback
|
1037 |
+
*
|
1038 |
+
* @since 3.0.0
|
1039 |
+
* @param array $args Arguments passed by the setting
|
1040 |
+
* @global $quads_options Array of all the QUADS options
|
1041 |
+
* @return void
|
1042 |
+
*/
|
1043 |
+
if( !function_exists( 'quads_license_key_callback' ) ) {
|
1044 |
+
|
1045 |
+
function quads_license_key_callback( $args ) {
|
1046 |
+
global $quads_options;
|
1047 |
+
|
1048 |
+
$class = '';
|
1049 |
+
|
1050 |
+
$messages = array();
|
1051 |
+
$license = get_option( $args['options']['is_valid_license_option'] );
|
1052 |
+
|
1053 |
+
|
1054 |
+
if( isset( $quads_options[$args['id']] ) ) {
|
1055 |
+
$value = $quads_options[$args['id']];
|
1056 |
+
} else {
|
1057 |
+
$value = isset( $args['std'] ) ? $args['std'] : '';
|
1058 |
+
}
|
1059 |
+
|
1060 |
+
if( !empty( $license ) && is_object( $license ) ) {
|
1061 |
+
|
1062 |
+
// activate_license 'invalid' on anything other than valid, so if there was an error capture it
|
1063 |
+
if( false === $license->success ) {
|
1064 |
+
|
1065 |
+
switch ( $license->error ) {
|
1066 |
+
|
1067 |
+
case 'expired' :
|
1068 |
+
|
1069 |
+
$class = 'error';
|
1070 |
+
$messages[] = sprintf(
|
1071 |
+
__( 'Your license key expired on %s. Please <a href="%s" target="_blank" title="Renew your license key">renew your license key</a>.', 'quick-adsense-reloaded' ), date_i18n( get_option( 'date_format' ), strtotime( $license->expires, current_time( 'timestamp' ) ) ), 'http://wpquads.com/checkout/?edd_license_key=' . $value . '&utm_campaign=notice&utm_source=license_tab&utm_medium=admin&utm_content=license-expired'
|
1072 |
+
);
|
1073 |
+
|
1074 |
+
$license_status = 'quads-license-' . $class . '-notice';
|
1075 |
+
|
1076 |
+
break;
|
1077 |
+
|
1078 |
+
case 'missing' :
|
1079 |
+
|
1080 |
+
$class = 'error';
|
1081 |
+
$messages[] = sprintf(
|
1082 |
+
__( 'Invalid license. Please <a href="%s" target="_blank" title="Visit account page">visit your account page</a> and verify it.', 'quick-adsense-reloaded' ), 'http://wpquads.com/your-account?utm_source=licenses-tab&utm_medium=admin&utm_content=invalid-license&utm_campaign=notice'
|
1083 |
+
);
|
1084 |
+
|
1085 |
+
$license_status = 'quads-license-' . $class . '-notice';
|
1086 |
+
|
1087 |
+
break;
|
1088 |
+
|
1089 |
+
case 'invalid' :
|
1090 |
+
case 'site_inactive' :
|
1091 |
+
|
1092 |
+
$class = 'error';
|
1093 |
+
$messages[] = sprintf(
|
1094 |
+
__( 'Your %s is not active for this URL. Please <a href="%s" target="_blank" title="Visit account page">visit your account page</a> to manage your license key URLs.', 'quick-adsense-reloaded' ), $args['name'], 'http://wpquads.com/your-account?utm_campaign=notice&utm_source=licenses-tab&utm_medium=admin&utm_content=invalid-license'
|
1095 |
+
);
|
1096 |
+
|
1097 |
+
$license_status = 'quads-license-' . $class . '-notice';
|
1098 |
+
|
1099 |
+
break;
|
1100 |
+
|
1101 |
+
case 'item_name_mismatch' :
|
1102 |
+
|
1103 |
+
$class = 'error';
|
1104 |
+
$messages[] = sprintf( __( 'This is not a %s.', 'quick-adsense-reloaded' ), $args['name'] );
|
1105 |
+
|
1106 |
+
$license_status = 'quads-license-' . $class . '-notice';
|
1107 |
+
|
1108 |
+
break;
|
1109 |
+
|
1110 |
+
case 'no_activations_left':
|
1111 |
+
|
1112 |
+
$class = 'error';
|
1113 |
+
$messages[] = sprintf( __( 'Your license key has reached its activation limit. <a href="%s" target="_blank">View possible upgrades</a> now.', 'quick-adsense-reloaded' ), 'http://wpquads.com/your-account?utm_campaign=notice&utm_source=licenses-tab&utm_medium=admin&utm_content=invalid-license' );
|
1114 |
+
|
1115 |
+
$license_status = 'quads-license-' . $class . '-notice';
|
1116 |
+
|
1117 |
+
break;
|
1118 |
+
}
|
1119 |
+
} else {
|
1120 |
+
|
1121 |
+
switch ( $license->license ) {
|
1122 |
+
|
1123 |
+
case 'valid' :
|
1124 |
+
default:
|
1125 |
+
|
1126 |
+
$class = 'valid';
|
1127 |
+
|
1128 |
+
$now = current_time( 'timestamp' );
|
1129 |
+
$expiration = strtotime( $license->expires, current_time( 'timestamp' ) );
|
1130 |
+
|
1131 |
+
if( 'lifetime' === $license->expires ) {
|
1132 |
+
|
1133 |
+
$messages[] = __( 'License key never expires.', 'quick-adsense-reloaded' );
|
1134 |
+
|
1135 |
+
$license_status = 'quads-license-lifetime-notice';
|
1136 |
+
} elseif( $expiration > $now && $expiration - $now < ( DAY_IN_SECONDS * 30 ) ) {
|
1137 |
+
|
1138 |
+
$messages[] = sprintf(
|
1139 |
+
__( 'Your license key expires soon! It expires on %s. <a href="%s" target="_blank" title="Renew license">Renew your license key</a>.', 'quick-adsense-reloaded' ), date_i18n( get_option( 'date_format' ), strtotime( $license->expires, current_time( 'timestamp' ) ) ), 'http://wpquads.com/checkout/?edd_license_key=' . $value . '&utm_campaign=notice&utm_source=licenses-tab&utm_medium=admin'
|
1140 |
+
);
|
1141 |
+
|
1142 |
+
$license_status = 'quads-license-expires-soon-notice';
|
1143 |
+
} else {
|
1144 |
+
|
1145 |
+
$messages[] = sprintf(
|
1146 |
+
__( 'Your license key expires on %s.', 'quick-adsense-reloaded' ), date_i18n( get_option( 'date_format' ), strtotime( $license->expires, current_time( 'timestamp' ) ) )
|
1147 |
+
);
|
1148 |
+
|
1149 |
+
$license_status = 'quads-license-expiration-date-notice';
|
1150 |
+
}
|
1151 |
+
|
1152 |
+
break;
|
1153 |
+
}
|
1154 |
+
}
|
1155 |
+
} else {
|
1156 |
+
$license_status = null;
|
1157 |
+
}
|
1158 |
+
|
1159 |
+
$size = ( isset( $args['size'] ) && !is_null( $args['size'] ) ) ? $args['size'] : 'regular';
|
1160 |
+
$html = '<input type="text" class="' . sanitize_html_class( $size ) . '-text" id="quads_settings[' . quads_sanitize_key( $args['id'] ) . ']" name="quads_settings[' . quads_sanitize_key( $args['id'] ) . ']" value="' . esc_attr( $value ) . '"/>';
|
1161 |
+
|
1162 |
+
if( ( is_object( $license ) && 'valid' == $license->license ) || 'valid' == $license ) {
|
1163 |
+
$html .= '<input type="submit" class="button-secondary" name="' . $args['id'] . '_deactivate" value="' . __( 'Deactivate License', 'quick-adsense-reloaded' ) . '"/>';
|
1164 |
+
}
|
1165 |
+
|
1166 |
+
$html .= '<label for="quads_settings[' . quads_sanitize_key( $args['id'] ) . ']"> ' . wp_kses_post( $args['desc'] ) . '</label>';
|
1167 |
+
|
1168 |
+
if( !empty( $messages ) ) {
|
1169 |
+
foreach ( $messages as $message ) {
|
1170 |
+
|
1171 |
+
$html .= '<div class="quads-license-data quads-license-' . $class . '">';
|
1172 |
+
$html .= '<p>' . $message . '</p>';
|
1173 |
+
$html .= '</div>';
|
1174 |
+
}
|
1175 |
+
}
|
1176 |
+
|
1177 |
+
wp_nonce_field( quads_sanitize_key( $args['id'] ) . '-nonce', quads_sanitize_key( $args['id'] ) . '-nonce' );
|
1178 |
+
|
1179 |
+
if( isset( $license_status ) ) {
|
1180 |
+
echo '<div class="' . $license_status . '">' . $html . '</div>';
|
1181 |
+
} else {
|
1182 |
+
echo '<div class="quads-license-null">' . $html . '</div>';
|
1183 |
+
}
|
1184 |
+
}
|
1185 |
+
|
1186 |
+
}
|
1187 |
+
|
1188 |
+
/**
|
1189 |
+
* Registers the Add-Ons field callback for WPQUADS Add-Ons
|
1190 |
+
*
|
1191 |
+
* @since 2.0.5
|
1192 |
+
* @param array $args Arguments passed by the setting
|
1193 |
+
* @return html
|
1194 |
+
*/
|
1195 |
+
function quads_addons_callback( $args ) {
|
1196 |
+
$html = quads_add_ons_page();
|
1197 |
+
echo $html;
|
1198 |
+
}
|
1199 |
+
|
1200 |
+
/**
|
1201 |
+
* Registers the im/export callback for WPQUADS
|
1202 |
+
*
|
1203 |
+
* @since 0.9.0
|
1204 |
+
* @param array $args Arguments passed by the setting
|
1205 |
+
* @return html
|
1206 |
+
*/
|
1207 |
+
function quads_imexport_callback( $args ) {
|
1208 |
+
$html = quads_tools_import_export_display();
|
1209 |
+
$html .= quads_import_quick_adsense_settings();
|
1210 |
+
echo $html;
|
1211 |
+
}
|
1212 |
+
|
1213 |
+
/**
|
1214 |
+
* Registers the system info for WPQUADS
|
1215 |
+
*
|
1216 |
+
* @since 0.9.0
|
1217 |
+
* @param array $args Arguments passed by the setting
|
1218 |
+
* @return html
|
1219 |
+
*/
|
1220 |
+
function quads_systeminfo_callback( $args ) {
|
1221 |
+
$html = quads_tools_sysinfo_display();
|
1222 |
+
echo $html;
|
1223 |
+
}
|
1224 |
+
|
1225 |
+
/**
|
1226 |
+
* Registers the image upload field
|
1227 |
+
*
|
1228 |
+
* @since 1.0
|
1229 |
+
* @param array $args Arguments passed by the setting
|
1230 |
+
* @global $quads_options Array of all the QUADS Options
|
1231 |
+
* @return void
|
1232 |
+
*/
|
1233 |
+
function quads_upload_image_callback( $args ) {
|
1234 |
+
global $quads_options;
|
1235 |
+
|
1236 |
+
if( isset( $quads_options[$args['id']] ) )
|
1237 |
+
$value = $quads_options[$args['id']];
|
1238 |
+
else
|
1239 |
+
$value = isset( $args['std'] ) ? $args['std'] : '';
|
1240 |
+
|
1241 |
+
$size = ( isset( $args['size'] ) && !is_null( $args['size'] ) ) ? $args['size'] : 'regular';
|
1242 |
+
$html = '<input type="text" class="' . $size . '-text ' . $args['id'] . '" id="quads_settings[' . $args['id'] . ']" name="quads_settings[' . $args['id'] . ']" value="' . esc_attr( $value ) . '"/>';
|
1243 |
+
|
1244 |
+
$html .= '<input type="submit" class="button-secondary quads_upload_image" name="' . $args['id'] . '_upload" value="' . __( 'Select Image', 'quick-adsense-reloaded' ) . '"/>';
|
1245 |
+
|
1246 |
+
$html .= '<label class="quads_hidden" for="quads_settings[' . $args['id'] . ']"> ' . $args['desc'] . '</label>';
|
1247 |
+
|
1248 |
+
echo $html;
|
1249 |
+
}
|
1250 |
+
|
1251 |
+
/*
|
1252 |
+
* Note Callback
|
1253 |
+
*
|
1254 |
+
* Show a note
|
1255 |
+
*
|
1256 |
+
* @since 2.2.8
|
1257 |
+
* @param array $args Arguments passed by the setting
|
1258 |
+
* @return void
|
1259 |
+
*
|
1260 |
+
*/
|
1261 |
+
|
1262 |
+
function quads_note_callback( $args ) {
|
1263 |
+
global $quads_options;
|
1264 |
+
$html = '';
|
1265 |
+
echo $html;
|
1266 |
+
}
|
1267 |
+
|
1268 |
+
/**
|
1269 |
+
* Additional content Callback
|
1270 |
+
* Adds several content text boxes selectable via jQuery easytabs()
|
1271 |
+
*
|
1272 |
+
* @param array $args
|
1273 |
+
* @return string $html
|
1274 |
+
* @scince 2.3.2
|
1275 |
+
*/
|
1276 |
+
function quads_add_content_callback( $args ) {
|
1277 |
+
global $quads_options;
|
1278 |
+
|
1279 |
+
$html = '<div id="quadstabcontainer" class="tabcontent_container"><ul class="quadstabs" style="width:99%;max-width:500px;">';
|
1280 |
+
foreach ( $args['options'] as $option => $name ) :
|
1281 |
+
$html .= '<li class="quadstab" style="float:left;margin-right:4px;"><a href="#' . $name['id'] . '">' . $name['name'] . '</a></li>';
|
1282 |
+
endforeach;
|
1283 |
+
$html .= '</ul>';
|
1284 |
+
$html .= '<div class="quadstab-container">';
|
1285 |
+
foreach ( $args['options'] as $option => $name ) :
|
1286 |
+
$value = isset( $quads_options[$name['id']] ) ? $quads_options[$name['id']] : '';
|
1287 |
+
$textarea = '<textarea class="large-text quads-textarea" cols="50" rows="15" id="quads_settings[' . $name['id'] . ']" name="quads_settings[' . $name['id'] . ']">' . esc_textarea( stripslashes( $value ) ) . '</textarea>';
|
1288 |
+
$html .= '<div id="' . $name['id'] . '" style="max-width:500px;"><span style="padding-top:60px;display:block;">' . $name['desc'] . ':</span><br>' . $textarea . '</div>';
|
1289 |
+
endforeach;
|
1290 |
+
$html .= '</div>';
|
1291 |
+
$html .= '</div>';
|
1292 |
+
echo $html;
|
1293 |
+
}
|
1294 |
+
|
1295 |
+
/**
|
1296 |
+
* Hook Callback
|
1297 |
+
*
|
1298 |
+
* Adds a do_action() hook in place of the field
|
1299 |
+
*
|
1300 |
+
* @since 1.0.8.2
|
1301 |
+
* @param array $args Arguments passed by the setting
|
1302 |
+
* @return void
|
1303 |
+
*/
|
1304 |
+
function quads_hook_callback( $args ) {
|
1305 |
+
do_action( 'quads_' . $args['id'] );
|
1306 |
+
}
|
1307 |
+
|
1308 |
+
/**
|
1309 |
+
* Set manage_options as the cap required to save QUADS settings pages
|
1310 |
+
*
|
1311 |
+
* @since 1.9
|
1312 |
+
* @return string capability required
|
1313 |
+
*/
|
1314 |
+
function quads_set_settings_cap() {
|
1315 |
+
return 'manage_options';
|
1316 |
+
}
|
1317 |
+
|
1318 |
+
add_filter( 'option_page_capability_quads_settings', 'quads_set_settings_cap' );
|
1319 |
+
|
1320 |
+
|
1321 |
+
|
1322 |
+
|
1323 |
+
/* returns Cache Status if enabled or disabled
|
1324 |
+
*
|
1325 |
+
* @since 2.0.4
|
1326 |
+
* @return string
|
1327 |
+
*/
|
1328 |
+
|
1329 |
+
function quads_cache_status() {
|
1330 |
+
global $quads_options;
|
1331 |
+
if( isset( $quads_options['disable_cache'] ) ) {
|
1332 |
+
return ' <strong style="color:red;">' . __( 'Transient Cache disabled! Enable it for performance increase.', 'quick-adsense-reloaded' ) . '</strong> ';
|
1333 |
+
}
|
1334 |
+
}
|
1335 |
+
|
1336 |
+
/* Permission check if logfile is writable
|
1337 |
+
*
|
1338 |
+
* @since 2.0.6
|
1339 |
+
* @return string
|
1340 |
+
*/
|
1341 |
+
|
1342 |
+
function quads_log_permissions() {
|
1343 |
+
global $quads_options;
|
1344 |
+
if( !$quads->logger->checkDir() ) {
|
1345 |
+
return '<br><strong style="color:red;">' . __( 'Log file directory not writable! Set FTP permission to 755 or 777 for /wp-content/plugins/quadssharer/logs/', 'quick-adsense-reloaded' ) . '</strong> <br> Read here more about <a href="http://codex.wordpress.org/Changing_File_Permissions" target="_blank">file permissions</a> ';
|
1346 |
+
}
|
1347 |
+
}
|
1348 |
+
|
1349 |
+
/**
|
1350 |
+
* Get number of available ads
|
1351 |
+
*
|
1352 |
+
* @global $quads_options $quads_options
|
1353 |
+
* @return array
|
1354 |
+
*/
|
1355 |
+
function quads_get_ads() {
|
1356 |
+
global $quads_options;
|
1357 |
+
|
1358 |
+
if (!isset($quads_options['ads']) || ( isset($quads_options['ads']) && count( $quads_options['ads'] ) === 0) ) {
|
1359 |
+
$ads = array(
|
1360 |
+
0 => __( 'Random Ads', 'quick-adsense-reloaded' ),
|
1361 |
+
1 => isset( $quads_options['ads']['ad1']['label'] ) ? $quads_options['ads']['ad1']['label'] : 'ad1',
|
1362 |
+
2 => isset( $quads_options['ads']['ad2']['label'] ) ? $quads_options['ads']['ad2']['label'] : 'ad2',
|
1363 |
+
3 => isset( $quads_options['ads']['ad3']['label'] ) ? $quads_options['ads']['ad3']['label'] : 'ad3',
|
1364 |
+
4 => isset( $quads_options['ads']['ad4']['label'] ) ? $quads_options['ads']['ad4']['label'] : 'ad4',
|
1365 |
+
5 => isset( $quads_options['ads']['ad5']['label'] ) ? $quads_options['ads']['ad5']['label'] : 'ad5',
|
1366 |
+
6 => isset( $quads_options['ads']['ad6']['label'] ) ? $quads_options['ads']['ad6']['label'] : 'ad6',
|
1367 |
+
7 => isset( $quads_options['ads']['ad7']['label'] ) ? $quads_options['ads']['ad7']['label'] : 'ad7',
|
1368 |
+
8 => isset( $quads_options['ads']['ad8']['label'] ) ? $quads_options['ads']['ad8']['label'] : 'ad8',
|
1369 |
+
9 => isset( $quads_options['ads']['ad9']['label'] ) ? $quads_options['ads']['ad9']['label'] : 'ad9',
|
1370 |
+
10 => isset( $quads_option['ads']['ad10']['label'] ) ? $quads_options['ads']['ad10']['label'] : 'ad10',
|
1371 |
+
);
|
1372 |
+
return $ads;
|
1373 |
+
}
|
1374 |
+
|
1375 |
+
// Start array with
|
1376 |
+
$arrHeader = array ( 0 => __( 'Random Ads', 'quick-adsense-reloaded' ) );
|
1377 |
+
|
1378 |
+
$ads = array();
|
1379 |
+
|
1380 |
+
foreach ( $quads_options['ads'] as $key => $value ){
|
1381 |
+
// Skip all widget ads
|
1382 |
+
if ( false !== strpos($key, '_widget') ){
|
1383 |
+
continue;
|
1384 |
+
}
|
1385 |
+
// Create array
|
1386 |
+
if (!empty( $value['label'] ) ) {
|
1387 |
+
$ads[] = $value['label'];
|
1388 |
+
} else {
|
1389 |
+
$ads[] = $key;
|
1390 |
+
}
|
1391 |
+
|
1392 |
+
}
|
1393 |
+
|
1394 |
+
return array_merge($arrHeader, $ads);
|
1395 |
+
|
1396 |
+
// $ads = array(
|
1397 |
+
// 0 => __( 'Random Ads', 'quick-adsense-reloaded' ),
|
1398 |
+
// 1 => isset( $quads_options['ads']['ad1']['label'] ) ? $quads_options['ads']['ad1']['label'] : 'ad1',
|
1399 |
+
// 2 => isset( $quads_options['ads']['ad2']['label'] ) ? $quads_options['ads']['ad2']['label'] : 'ad2',
|
1400 |
+
// 3 => isset( $quads_options['ads']['ad3']['label'] ) ? $quads_options['ads']['ad3']['label'] : 'ad3',
|
1401 |
+
// 4 => isset( $quads_options['ads']['ad4']['label'] ) ? $quads_options['ads']['ad4']['label'] : 'ad4',
|
1402 |
+
// 5 => isset( $quads_options['ads']['ad5']['label'] ) ? $quads_options['ads']['ad5']['label'] : 'ad5',
|
1403 |
+
// 6 => isset( $quads_options['ads']['ad6']['label'] ) ? $quads_options['ads']['ad6']['label'] : 'ad6',
|
1404 |
+
// 7 => isset( $quads_options['ads']['ad7']['label'] ) ? $quads_options['ads']['ad7']['label'] : 'ad7',
|
1405 |
+
// 8 => isset( $quads_options['ads']['ad8']['label'] ) ? $quads_options['ads']['ad8']['label'] : 'ad8',
|
1406 |
+
// 9 => isset( $quads_options['ads']['ad9']['label'] ) ? $quads_options['ads']['ad9']['label'] : 'ad9',
|
1407 |
+
// 10 => isset( $quads_option['ads']['ad10']['label'] ) ? $quads_options['ads']['ad10']['label'] : 'ad10',
|
1408 |
+
// );
|
1409 |
+
//return $ads;
|
1410 |
+
}
|
1411 |
+
|
1412 |
+
/**
|
1413 |
+
* Get array of 1 to 50 for image and paragraph dropdown values
|
1414 |
+
*
|
1415 |
+
* @global $quads_options $quads_options
|
1416 |
+
* @return array
|
1417 |
+
*/
|
1418 |
+
function quads_get_values() {
|
1419 |
+
|
1420 |
+
$array = array(1);
|
1421 |
+
for ( $i = 1; $i <= 50; $i++ ) {
|
1422 |
+
$array[] = $i;
|
1423 |
+
}
|
1424 |
+
unset( $array[0] ); // remove the 0 and start the array with 1
|
1425 |
+
return $array;
|
1426 |
+
}
|
1427 |
+
|
1428 |
+
/**
|
1429 |
+
* Visibility Callback
|
1430 |
+
*
|
1431 |
+
* Renders fields for ad visibility
|
1432 |
+
*
|
1433 |
+
* @since 0.9.0
|
1434 |
+
* @param array $args Arguments passed by the setting
|
1435 |
+
* @global $quads_options Array of all the QUADS Options
|
1436 |
+
* @return void
|
1437 |
+
*/
|
1438 |
+
function quads_visibility_callback( $args ) {
|
1439 |
+
global $quads_options, $quads;
|
1440 |
+
|
1441 |
+
$html = $quads->html->checkbox( array('name' => 'quads_settings[visibility][AppHome]', 'current' => !empty( $quads_options['visibility']['AppHome'] ) ? $quads_options['visibility']['AppHome'] : null, 'class' => 'quads-checkbox') ) . __( 'Homepage ', 'quick-adsense-reloaded' );
|
1442 |
+
$html .= $quads->html->checkbox( array('name' => 'quads_settings[visibility][AppCate]', 'current' => !empty( $quads_options['visibility']['AppCate'] ) ? $quads_options['visibility']['AppCate'] : null, 'class' => 'quads-checkbox') ) . __( 'Categories ', 'quick-adsense-reloaded' );
|
1443 |
+
$html .= $quads->html->checkbox( array('name' => 'quads_settings[visibility][AppArch]', 'current' => !empty( $quads_options['visibility']['AppArch'] ) ? $quads_options['visibility']['AppArch'] : null, 'class' => 'quads-checkbox') ) . __( 'Archives ', 'quick-adsense-reloaded' );
|
1444 |
+
$html .= $quads->html->checkbox( array('name' => 'quads_settings[visibility][AppTags]', 'current' => !empty( $quads_options['visibility']['AppTags'] ) ? $quads_options['visibility']['AppTags'] : null, 'class' => 'quads-checkbox') ) . __( 'Tags', 'quick-adsense-reloaded' ) . '<br>';
|
1445 |
+
$html .= $quads->html->checkbox( array('name' => 'quads_settings[visibility][AppSide]', 'current' => !empty( $quads_options['visibility']['AppSide'] ) ? $quads_options['visibility']['AppSide'] : null, 'class' => 'quads-checkbox') ) . __( 'Hide Ad Widgets on Homepage', 'quick-adsense-reloaded' ) . '<br>';
|
1446 |
+
$html .= $quads->html->checkbox( array('name' => 'quads_settings[visibility][AppLogg]', 'current' => !empty( $quads_options['visibility']['AppLogg'] ) ? $quads_options['visibility']['AppLogg'] : null, 'class' => 'quads-checkbox') ) . __( 'Hide Ads when user is logged in.', 'quick-adsense-reloaded' ) . '<br>';
|
1447 |
+
|
1448 |
+
echo $html;
|
1449 |
+
}
|
1450 |
+
|
1451 |
+
/**
|
1452 |
+
* Ad position Callback
|
1453 |
+
*
|
1454 |
+
* Renders multioptions fields for ad position
|
1455 |
+
*
|
1456 |
+
* @since 0.9.0
|
1457 |
+
* @param array $args Arguments passed by the setting
|
1458 |
+
* @global $quads_options Array of all the QUADS Options
|
1459 |
+
* @return void
|
1460 |
+
*/
|
1461 |
+
function quads_ad_position_callback( $args ) {
|
1462 |
+
global $quads_options, $quads;
|
1463 |
+
|
1464 |
+
|
1465 |
+
// Pos 1
|
1466 |
+
$html = $quads->html->checkbox( array('name' => 'quads_settings[pos1][BegnAds]', 'current' => !empty( $quads_options['pos1']['BegnAds'] ) ? $quads_options['pos1']['BegnAds'] : null, 'class' => 'quads-checkbox quads-assign') );
|
1467 |
+
$html .= ' ' . __( 'Assign', 'quick-adsense-reloaded' ) . ' ';
|
1468 |
+
$html .= $quads->html->select( array('options' => quads_get_ads(), 'id' => 'quads_settings[pos1][BegnRnd]', 'name' => 'quads_settings[pos1][BegnRnd]', 'selected' => !empty( $quads_options['pos1']['BegnRnd'] ) ? $quads_options['pos1']['BegnRnd'] : null, 'show_option_all' => false, 'show_option_none' => false) );
|
1469 |
+
$html .= ' ' . __( 'to <strong>Beginning of Post</strong>', 'quick-adsense-reloaded' ) . '</br>';
|
1470 |
+
|
1471 |
+
// Pos 2
|
1472 |
+
$html .= $quads->html->checkbox( array('name' => 'quads_settings[pos2][MiddAds]', 'current' => !empty( $quads_options['pos2']['MiddAds'] ) ? $quads_options['pos2']['MiddAds'] : null, 'class' => 'quads-checkbox quads-assign') );
|
1473 |
+
$html .= ' ' . __( 'Assign', 'quick-adsense-reloaded' ) . ' ';
|
1474 |
+
$html .= $quads->html->select( array('options' => quads_get_ads(), 'id' => 'quads_settings[pos2][MiddRnd]', 'name' => 'quads_settings[pos2][MiddRnd]', 'selected' => !empty( $quads_options['pos2']['MiddRnd'] ) ? $quads_options['pos2']['MiddRnd'] : null, 'show_option_all' => false, 'show_option_none' => false) );
|
1475 |
+
$html .= ' ' . __( 'to <strong>Middle of Post</strong>', 'quick-adsense-reloaded' ) . '</br>';
|
1476 |
+
|
1477 |
+
// Pos 3
|
1478 |
+
$html .= $quads->html->checkbox( array('name' => 'quads_settings[pos3][EndiAds]', 'current' => !empty( $quads_options['pos3']['EndiAds'] ) ? $quads_options['pos3']['EndiAds'] : null, 'class' => 'quads-checkbox quads-assign') );
|
1479 |
+
$html .= ' ' . __( 'Assign', 'quick-adsense-reloaded' ) . ' ';
|
1480 |
+
$html .= $quads->html->select( array('options' => quads_get_ads(), 'id' => 'quads_settings[pos3][EndiRnd]', 'name' => 'quads_settings[pos3][EndiRnd]', 'selected' => !empty( $quads_options['pos3']['EndiRnd'] ) ? $quads_options['pos3']['EndiRnd'] : null, 'show_option_all' => false, 'show_option_none' => false) );
|
1481 |
+
$html .= ' ' . __( 'to <strong>End of Post</strong>', 'quick-adsense-reloaded' ) . '</br>';
|
1482 |
+
|
1483 |
+
// Pos 4
|
1484 |
+
$html .= $quads->html->checkbox( array('name' => 'quads_settings[pos4][MoreAds]', 'current' => !empty( $quads_options['pos4']['MoreAds'] ) ? $quads_options['pos4']['MoreAds'] : null, 'class' => 'quads-checkbox quads-assign') );
|
1485 |
+
$html .= ' ' . __( 'Assign', 'quick-adsense-reloaded' ) . ' ';
|
1486 |
+
$html .= $quads->html->select( array('options' => quads_get_ads(), 'id' => 'quads_settings[pos4][MoreRnd]', 'name' => 'quads_settings[pos4][MoreRnd]', 'selected' => !empty( $quads_options['pos4']['MoreRnd'] ) ? $quads_options['pos4']['MoreRnd'] : null, 'show_option_all' => false, 'show_option_none' => false) );
|
1487 |
+
$html .= ' ' . __( 'right after <strong>the <span style="font-family:Courier New,Courier,Fixed;"><!--more--></span> tag</strong>', 'quick-adsense-reloaded' ) . '</br>';
|
1488 |
+
|
1489 |
+
// Pos 5
|
1490 |
+
$html .= $quads->html->checkbox( array('name' => 'quads_settings[pos5][LapaAds]', 'current' => !empty( $quads_options['pos5']['LapaAds'] ) ? $quads_options['pos5']['LapaAds'] : null, 'class' => 'quads-checkbox quads-assign') );
|
1491 |
+
$html .= ' ' . __( 'Assign', 'quick-adsense-reloaded' ) . ' ';
|
1492 |
+
$html .= $quads->html->select( array('options' => quads_get_ads(), 'id' => 'quads_settings[pos5][LapaRnd]', 'name' => 'quads_settings[pos5][LapaRnd]', 'selected' => !empty( $quads_options['pos5']['LapaRnd'] ) ? $quads_options['pos5']['LapaRnd'] : null, 'show_option_all' => false, 'show_option_none' => false) );
|
1493 |
+
$html .= ' ' . __( 'right before <strong>the last Paragraph</strong>', 'quick-adsense-reloaded' ) . ' </br>';
|
1494 |
+
|
1495 |
+
// Pos 6
|
1496 |
+
$html .= $quads->html->checkbox( array('name' => 'quads_settings[pos6][Par1Ads]', 'current' => !empty( $quads_options['pos6']['Par1Ads'] ) ? $quads_options['pos6']['Par1Ads'] : null, 'class' => 'quads-checkbox quads-assign') );
|
1497 |
+
$html .= ' ' . __( 'Assign', 'quick-adsense-reloaded' ) . ' ';
|
1498 |
+
$html .= $quads->html->select( array('options' => quads_get_ads(), 'id' => 'quads_settings[pos6][Par1Rnd]', 'name' => 'quads_settings[pos6][Par1Rnd]', 'selected' => !empty( $quads_options['pos6']['Par1Rnd'] ) ? $quads_options['pos6']['Par1Rnd'] : null, 'show_option_all' => false, 'show_option_none' => false) );
|
1499 |
+
$html .= ' ' . __( '<strong>After Paragraph</strong>', 'quick-adsense-reloaded' ) . ' ';
|
1500 |
+
$html .= $quads->html->select( array('options' => quads_get_values(), 'class' => 'quads-paragraph', 'id' => 'quads_settings[pos6][Par1Nup]', 'name' => 'quads_settings[pos6][Par1Nup]', 'selected' => !empty( $quads_options['pos6']['Par1Nup'] ) ? $quads_options['pos6']['Par1Nup'] : null, 'show_option_all' => false, 'show_option_none' => false) );
|
1501 |
+
$html .= ' ' . __( '→', 'quick-adsense-reloaded' ) . ' ';
|
1502 |
+
$html .= $quads->html->checkbox( array('name' => 'quads_settings[pos6][Par1Con]', 'current' => !empty( $quads_options['pos6']['Par1Con'] ) ? $quads_options['pos6']['Par1Con'] : null, 'class' => 'quads-checkbox quads-assign') );
|
1503 |
+
$html .= ' ' . __( 'to <strong>End of Post</strong> if fewer paragraphs are found.', 'quick-adsense-reloaded' ) . ' </br>';
|
1504 |
+
|
1505 |
+
// Pos 7
|
1506 |
+
$html .= $quads->html->checkbox( array('name' => 'quads_settings[pos7][Par2Ads]', 'current' => !empty( $quads_options['pos7']['Par2Ads'] ) ? $quads_options['pos7']['Par2Ads'] : null, 'class' => 'quads-checkbox quads-assign') );
|
1507 |
+
$html .= ' ' . __( 'Assign', 'quick-adsense-reloaded' ) . ' ';
|
1508 |
+
$html .= $quads->html->select( array('options' => quads_get_ads(), 'id' => 'quads_settings[pos7][Par2Rnd]', 'name' => 'quads_settings[pos7][Par2Rnd]', 'selected' => !empty( $quads_options['pos7']['Par2Rnd'] ) ? $quads_options['pos7']['Par2Rnd'] : null, 'show_option_all' => false, 'show_option_none' => false) );
|
1509 |
+
$html .= ' ' . __( '<strong>After Paragraph</strong>', 'quick-adsense-reloaded' ) . ' ';
|
1510 |
+
$html .= $quads->html->select( array('options' => quads_get_values(), 'id' => 'quads_settings[pos7][Par2Nup]', 'name' => 'quads_settings[pos7][Par2Nup]', 'selected' => !empty( $quads_options['pos7']['Par2Nup'] ) ? $quads_options['pos7']['Par2Nup'] : null, 'show_option_all' => false, 'show_option_none' => false) );
|
1511 |
+
$html .= ' ' . __( '→', 'quick-adsense-reloaded' ) . ' ';
|
1512 |
+
$html .= $quads->html->checkbox( array('name' => 'quads_settings[pos7][Par2Con]', 'current' => !empty( $quads_options['pos7']['Par2Con'] ) ? $quads_options['pos7']['Par2Con'] : null, 'class' => 'quads-checkbox quads-assign') );
|
1513 |
+
$html .= ' ' . __( 'to <strong>End of Post</strong> if fewer paragraphs are found.', 'quick-adsense-reloaded' ) . ' </br>';
|
1514 |
+
|
1515 |
+
// Pos 8
|
1516 |
+
$html .= $quads->html->checkbox( array('name' => 'quads_settings[pos8][Par3Ads]', 'current' => !empty( $quads_options['pos8']['Par3Ads'] ) ? $quads_options['pos8']['Par3Ads'] : null, 'class' => 'quads-checkbox quads-assign') );
|
1517 |
+
$html .= ' ' . __( 'Assign', 'quick-adsense-reloaded' ) . ' ';
|
1518 |
+
$html .= $quads->html->select( array('options' => quads_get_ads(), 'id' => 'quads_settings[pos8][Par3Rnd]', 'name' => 'quads_settings[pos8][Par3Rnd]', 'selected' => !empty( $quads_options['pos8']['Par3Rnd'] ) ? $quads_options['pos8']['Par3Rnd'] : null, 'show_option_all' => false, 'show_option_none' => false) );
|
1519 |
+
$html .= ' ' . __( '<strong>After Paragraph</strong>', 'quick-adsense-reloaded' ) . ' ';
|
1520 |
+
$html .= $quads->html->select( array('options' => quads_get_values(), 'id' => 'quads_settings[pos8][Par3Nup]', 'name' => 'quads_settings[pos8][Par3Nup]', 'selected' => !empty( $quads_options['pos8']['Par3Nup'] ) ? $quads_options['pos8']['Par3Nup'] : null, 'show_option_all' => false, 'show_option_none' => false) );
|
1521 |
+
$html .= ' ' . __( '→', 'quick-adsense-reloaded' ) . ' ';
|
1522 |
+
$html .= $quads->html->checkbox( array('name' => 'quads_settings[pos8][Par3Con]', 'current' => !empty( $quads_options['pos8']['Par3Con'] ) ? $quads_options['pos8']['Par3Con'] : null, 'class' => 'quads-checkbox quads-assign') );
|
1523 |
+
$html .= ' ' . __( 'to <strong>End of Post</strong> if fewer paragraphs are found.', 'quick-adsense-reloaded' ) . ' </br>';
|
1524 |
+
|
1525 |
+
$html .= apply_filters( 'quads_extra_paragraph', '' );
|
1526 |
+
|
1527 |
+
// Pos 9
|
1528 |
+
$html .= $quads->html->checkbox( array('name' => 'quads_settings[pos9][Img1Ads]', 'current' => !empty( $quads_options['pos9']['Img1Ads'] ) ? $quads_options['pos9']['Img1Ads'] : null, 'class' => 'quads-checkbox quads-assign') );
|
1529 |
+
$html .= ' ' . __( 'Assign', 'quick-adsense-reloaded' ) . ' ';
|
1530 |
+
$html .= $quads->html->select( array('options' => quads_get_ads(), 'name' => 'quads_settings[pos9][Img1Rnd]', 'selected' => !empty( $quads_options['pos9']['Img1Rnd'] ) ? $quads_options['pos9']['Img1Rnd'] : null, 'show_option_all' => false, 'show_option_none' => false) );
|
1531 |
+
$html .= ' ' . __( '<strong>After Image</strong>', 'quick-adsense-reloaded' ) . ' ';
|
1532 |
+
$html .= $quads->html->select( array('options' => quads_get_values(), 'id' => 'quads_settings[pos9][Img1Nup]', 'name' => 'quads_settings[pos9][Img1Nup]', 'selected' => !empty( $quads_options['pos9']['Img1Nup'] ) ? $quads_options['pos9']['Img1Nup'] : null, 'show_option_all' => false, 'show_option_none' => false) );
|
1533 |
+
$html .= ' ' . __( '→', 'quick-adsense-reloaded' ) . ' ';
|
1534 |
+
$html .= $quads->html->checkbox( array('name' => 'quads_settings[pos9][Img1Con]', 'current' => !empty( $quads_options['pos9']['Img1Con'] ) ? $quads_options['pos9']['Img1Con'] : null, 'class' => 'quads-checkbox quads-assign') );
|
1535 |
+
$html .= ' ' . __( 'after <b>Image\'s outer</b><b><span style="font-family:Courier New,Courier,Fixed;"> <div> wp-caption</span></b> if any.', 'quick-adsense-reloaded' ) . ' </br>';
|
1536 |
+
|
1537 |
+
echo apply_filters( 'quads_ad_position_callback', $html );
|
1538 |
+
}
|
1539 |
+
|
1540 |
+
/**
|
1541 |
+
* Quicktags Callback
|
1542 |
+
*
|
1543 |
+
* Renders quicktags fields
|
1544 |
+
*
|
1545 |
+
* @since 0.9.0
|
1546 |
+
* @param array $args Arguments passed by the setting
|
1547 |
+
* @global $quads_options Array of all the QUADS Options
|
1548 |
+
* @return void
|
1549 |
+
*/
|
1550 |
+
function quads_quicktags_callback( $args ) {
|
1551 |
+
global $quads_options, $quads;
|
1552 |
+
|
1553 |
+
// Quicktags info
|
1554 |
+
$html = '<div style="margin-bottom:5px;"><strong>Optional: </strong><a href="#" id="quads_insert_ads_action">' . __( ' Insert Ads into a post, on-the-fly', 'quick-adsense-reloaded' ) . '</a></br>' .
|
1555 |
+
'<ol style="margin-top:5px;display:none;" id="quads_insert_ads_box">
|
1556 |
+
<li>' . __( 'Insert <span class="quads-quote-docs"><!--Ads1--></span>, <span class="quads-quote-docs"><!--Ads2--></span>, etc. into a post to show the <b>Particular Ads</b> at specific location.', 'quick-adsense-reloaded' ) . '</li>
|
1557 |
+
<li>' . __( 'Insert <span class="quads-quote-docs"><!--RndAds--></span> into a post to show the <b>Random Ads</b> at specific location', 'quick-adsense-reloaded' ) . '</li>
|
1558 |
+
</ol></div>';
|
1559 |
+
|
1560 |
+
$html .= $quads->html->checkbox( array('name' => 'quads_settings[quicktags][QckTags]', 'current' => !empty( $quads_options['quicktags']['QckTags'] ) ? $quads_options['quicktags']['QckTags'] : null, 'class' => 'quads-checkbox') );
|
1561 |
+
$html .= __( 'Show Quicktag Buttons on the HTML Post Editor', 'quick-adsense-reloaded' ) . '</br>';
|
1562 |
+
$html .= '<span class="quads-desc">' . __( 'Tags can be inserted into a post via the additional Quicktag Buttons at the HTML Edit Post SubPanel.', 'quick-adsense-reloaded' ) . '</span>';
|
1563 |
+
echo $html;
|
1564 |
+
}
|
1565 |
+
|
1566 |
+
/**
|
1567 |
+
* Add new ad
|
1568 |
+
* @global array $quads_options
|
1569 |
+
*/
|
1570 |
+
function quads_ajax_add_ads(){
|
1571 |
+
global $quads_options;
|
1572 |
+
|
1573 |
+
$postCount = !empty($_POST['count']) ? $_POST['count'] : 1;
|
1574 |
+
//wp_die($postCount);
|
1575 |
+
|
1576 |
+
$count = isset($quads_options['ads']) ? count ($quads_options['ads']) + $postCount : 10 + $postCount;
|
1577 |
+
|
1578 |
+
$args = array();
|
1579 |
+
// subtract 10 widget ads
|
1580 |
+
$args['id'] = $count-10;
|
1581 |
+
$args['name'] = 'Ad ' . $args['id'];
|
1582 |
+
|
1583 |
+
ob_start();
|
1584 |
+
// ... get the content ...
|
1585 |
+
quads_adsense_code_callback( $args );
|
1586 |
+
$content = ob_get_contents();
|
1587 |
+
ob_end_clean();
|
1588 |
+
|
1589 |
+
$html = '<tr><td>';
|
1590 |
+
$html.= $content;
|
1591 |
+
$html.= '</td></tr>';
|
1592 |
+
echo $html;
|
1593 |
+
die();
|
1594 |
+
}
|
1595 |
+
add_action( 'wp_ajax_quads_ajax_add_ads', 'quads_ajax_add_ads' );
|
1596 |
+
|
1597 |
+
/**
|
1598 |
+
* Count normal ads. Do not count widget ads
|
1599 |
+
*
|
1600 |
+
* @global array $quads_options
|
1601 |
+
* @return int
|
1602 |
+
*/
|
1603 |
+
function quads_count_normal_ads() {
|
1604 |
+
global $quads_options;
|
1605 |
+
|
1606 |
+
if(!isset($quads_options['ads'])){
|
1607 |
+
return 0;
|
1608 |
+
}
|
1609 |
+
|
1610 |
+
// Count normal ads - not widget ads
|
1611 |
+
$adsCount = 0;
|
1612 |
+
$id = 1;
|
1613 |
+
foreach ( $quads_options['ads'] as $ads => $value ) {
|
1614 |
+
// Skip if its a widget ad
|
1615 |
+
if( strpos( $ads, 'ad' . $id ) === 0 && false === strpos( $ads, 'ad' . $id . '_widget' ) ) {
|
1616 |
+
$adsCount++;
|
1617 |
+
}
|
1618 |
+
$id++;
|
1619 |
+
}
|
1620 |
+
return $adsCount;
|
1621 |
+
}
|
1622 |
+
|
1623 |
+
function quads_new_ad_callback(){
|
1624 |
+
if (quads_is_extra()) {
|
1625 |
+
echo '<a href="#" id="quads-add-new-ad">' . __('Add New Ad','quick-adsense-reloaded') . '</a>';
|
1626 |
+
}
|
1627 |
+
}
|
1628 |
+
|
1629 |
+
/**
|
1630 |
+
* Render all ad relevant settings (ADSENSE CODE tab)
|
1631 |
+
* No widget ads
|
1632 |
+
* @global $quads_options $quads_options
|
1633 |
+
*/
|
1634 |
+
function quads_ad_code_callback(){
|
1635 |
+
global $quads_options;
|
1636 |
+
|
1637 |
+
$args = array();
|
1638 |
+
|
1639 |
+
$i = 1;
|
1640 |
+
// Render 10 default ads if there are less than 10 ads stored or none at all
|
1641 |
+
if( quads_count_normal_ads() < 10 || !quads_is_extra()) {
|
1642 |
+
//wp_die('t2');
|
1643 |
+
while ( $i <= 10 ) {
|
1644 |
+
|
1645 |
+
$id = $i++;
|
1646 |
+
|
1647 |
+
$args['id'] = $id;
|
1648 |
+
|
1649 |
+
$args['desc'] = '';
|
1650 |
+
|
1651 |
+
$args['name'] = !empty( $quads_options['ads']['ad' . $id]['label'] ) ? $quads_options['ads']['ad' . $id]['label'] : 'Ad ' . $id;
|
1652 |
+
|
1653 |
+
echo '<tr><td>';
|
1654 |
+
echo quads_adsense_code_callback( $args );
|
1655 |
+
echo '</td></tr>';
|
1656 |
+
|
1657 |
+
}
|
1658 |
+
|
1659 |
+
// Stop here early
|
1660 |
+
return true;
|
1661 |
+
}
|
1662 |
+
|
1663 |
+
// Else render 10 + n ads
|
1664 |
+
$i = 1;
|
1665 |
+
foreach ($quads_options['ads'] as $ads => $value ){
|
1666 |
+
|
1667 |
+
$id = $i++;
|
1668 |
+
|
1669 |
+
$args['id'] = $id;
|
1670 |
+
|
1671 |
+
$args['desc'] = '';
|
1672 |
+
|
1673 |
+
$args['name'] = !empty($quads_options['ads']['ad' . $id]['label']) ? $quads_options['ads']['ad' . $id]['label'] : 'Ad ' . $id;
|
1674 |
+
|
1675 |
+
// Skip if its a widget ad
|
1676 |
+
if ( (strpos($ads, 'ad' . $id) === 0) && (false === strpos($ads, 'ad' . $id . '_widget') ) ){
|
1677 |
+
echo '<tr><td>';
|
1678 |
+
echo quads_adsense_code_callback( $args );
|
1679 |
+
echo '</td></tr>';
|
1680 |
+
}
|
1681 |
+
|
1682 |
+
}
|
1683 |
+
}
|
1684 |
+
|
1685 |
+
/**
|
1686 |
+
* AdSense Code Callback
|
1687 |
+
*
|
1688 |
+
* Renders adsense code fields
|
1689 |
+
*
|
1690 |
+
* @since 0.9.0
|
1691 |
+
* @param array $args Arguments passed by the setting
|
1692 |
+
* @global $quads_options Array of all the QUADS Options
|
1693 |
+
* @return void
|
1694 |
+
*/
|
1695 |
+
function quads_adsense_code_callback( $args ) {
|
1696 |
+
global $quads_options;
|
1697 |
+
|
1698 |
+
$new_label = isset( $quads_options['ads']['ad'.$args['id']]['label'] ) ? $quads_options['ads']['ad'.$args['id']]['label'] : '';
|
1699 |
+
|
1700 |
+
$label = !empty( $new_label ) ? $new_label : $args['name'];
|
1701 |
+
|
1702 |
+
$code = isset( $quads_options['ads']['ad'.$args['id']]['code'] ) ? $quads_options['ads']['ad'.$args['id']]['code'] : '';
|
1703 |
+
|
1704 |
+
$margin = isset( $quads_options['ads']['ad'.$args['id']]['margin'] ) ? esc_attr( stripslashes( $quads_options['ads']['ad'.$args['id']]['margin'] ) ) : 0;
|
1705 |
+
|
1706 |
+
$g_data_ad_client = isset( $quads_options['ads']['ad'. $args['id']]['g_data_ad_client'] ) ? $quads_options['ads']['ad'. $args['id']]['g_data_ad_client'] : '';
|
1707 |
+
|
1708 |
+
$g_data_ad_slot = isset( $quads_options['ads']['ad'. $args['id']]['g_data_ad_slot'] ) ? $quads_options['ads']['ad'. $args['id']]['g_data_ad_slot'] : '';
|
1709 |
+
|
1710 |
+
$g_data_ad_width = isset( $quads_options['ads']['ad'. $args['id']]['g_data_ad_width'] ) ? $quads_options['ads']['ad'. $args['id']]['g_data_ad_width'] : '';
|
1711 |
+
|
1712 |
+
$g_data_ad_height = isset( $quads_options['ads']['ad'. $args['id']]['g_data_ad_height'] ) ? $quads_options['ads']['ad'. $args['id']]['g_data_ad_height'] : '';
|
1713 |
+
|
1714 |
+
//$args['desc'] = __( '<strong>Shortcode:</strong> [quads id="'.$args['id'].'"] | <strong>PHP:</strong> echo do_shortcode(\'[quads id="'.$args['id'].'"]\');', 'quick-adsense-reloaded' );
|
1715 |
+
|
1716 |
+
//$label = !empty($new_label) ? $new_label :
|
1717 |
+
// Create a shorter var to make HTML cleaner
|
1718 |
+
$id = 'ad' . $args['id'];
|
1719 |
+
?>
|
1720 |
+
<div class="quads-ad-toggle-header quads-box-close" data-box-id="quads-toggle<?php echo $id; ?>">
|
1721 |
+
<div class="quads-toogle-title"><span contenteditable="true" id="quads-ad-label-<?php echo $id; ?>"><?php echo $label; ?></span><input type="hidden" class="quads-input-label" id="" name="quads_settings[ads][<?php echo $id; ?>][label]" value="<?php echo $new_label; ?>"></div>
|
1722 |
+
<a class="quads-toggle" data-box-id="quads-toggle<?php echo $id; ?>" href="#"><div class="quads-close-open-icon"></div></a>
|
1723 |
+
</div>
|
1724 |
+
<div class="quads-ad-toggle-container" id="quads-toggle<?php echo $id; ?>" style="display:none;">
|
1725 |
+
<div>
|
1726 |
+
<?php
|
1727 |
+
$args_ad_type = array(
|
1728 |
+
'id' => 'ad_type',
|
1729 |
+
'name' => 'Type',
|
1730 |
+
'desc' => '',
|
1731 |
+
'std' => 'plain_text',
|
1732 |
+
'options' => array(
|
1733 |
+
'adsense' => 'AdSense',
|
1734 |
+
'plain_text' => 'Plain Text / HTML / JS'
|
1735 |
+
)
|
1736 |
+
);
|
1737 |
+
echo quads_adtype_callback( $id, $args_ad_type );
|
1738 |
+
?>
|
1739 |
+
</div>
|
1740 |
+
<textarea style="vertical-align:top;margin-right:20px;" class="large-text quads-textarea" cols="50" rows="10" id="quads_settings[ads][<?php echo $id; ?>][code]" name="quads_settings[ads][<?php echo $id; ?>][code]"><?php echo esc_textarea( stripslashes( $code ) ); ?></textarea>
|
1741 |
+
<!--<label for="quads_settings[ads][ <?php //echo $id; ?> ][code]"> <?php //echo $args['desc']; ?></label><br>//-->
|
1742 |
+
<label for="quads_shortcode_<?php echo $args['id'];?>">Post Shortcode:</label><input readonly id="quads_shortcode_<?php echo $args['id'];?>" type="text" onclick="this.focus(); this.select()" value='[quads id=<?php echo $args['id'];?>]' title="Optional: Copy and paste the shortcode into the post editor, click below then press Ctrl + C (PC) or Cmd + C (Mac).">
|
1743 |
+
<label for="quads_php_shortcode_<?php echo $args['id'];?>">PHP:</label><input readonly id="quads_php_shortcode_<?php echo $args['id'];?>" type="text" onclick="this.focus(); this.select()" style="width:290px;" value="<?php echo do_shortcode('[quads id=<?php echo $args['id']; ?>]'); ?>" title="Optional: Copy and paste the PHP code into your theme files, click below then press Ctrl + C (PC) or Cmd + C (Mac).">
|
1744 |
+
<br>
|
1745 |
+
<div class="quads_adsense_code">
|
1746 |
+
<input type="button" style="vertical-align:inherit;" class="button button-primary quads-add-adsense" value="Copy / Paste AdSense Code"> <span>or add Ad Slot ID & Publisher ID manually below:</span>
|
1747 |
+
<br />
|
1748 |
+
<?php //echo __('Generate Ad Slot & Publisher ID automatically from your adsense code', 'quick-adsense-reloaded') ?>
|
1749 |
+
<label class="quads-label-left" for="quads_settings[ads][<?php echo $id; ?>][g_data_ad_slot]">Ad Slot ID </label><input type="text" class="quads-medium-size quads-bggrey" id="quads_settings[ads][<?php echo $id; ?>][g_data_ad_slot]" name="quads_settings[ads][<?php echo $id; ?>][g_data_ad_slot]" value="<?php echo $g_data_ad_slot; ?>">
|
1750 |
+
<label for="quads_settings[ads][<?php echo $id; ?>][g_data_ad_client]">Publisher ID</label><input type="text" id="quads_settings[ads][<?php echo $id; ?>][g_data_ad_client]" class="medium-text quads-bggrey" name="quads_settings[ads][<?php echo $id; ?>][g_data_ad_client]" value="<?php echo $g_data_ad_client; ?>">
|
1751 |
+
<br />
|
1752 |
+
<?php
|
1753 |
+
$args = array(
|
1754 |
+
'id' => 'adsense_type',
|
1755 |
+
'name' => 'Type',
|
1756 |
+
'desc' => 'Type',
|
1757 |
+
'options' => array(
|
1758 |
+
'normal' => 'Fixed Size',
|
1759 |
+
'responsive' => 'Responsive'
|
1760 |
+
)
|
1761 |
+
);
|
1762 |
+
echo quads_adense_select_callback( $id, $args );
|
1763 |
+
?>
|
1764 |
+
<?php if( !quads_is_extra() ) { ?>
|
1765 |
+
<span class="quads-pro-notice" style="display:block;margin-top:20px;"><?php echo sprintf( __( 'Install <a href="%s" target="_blank">WP QUADS PRO</a> to fully support AdSense Responsive ads.', 'quick-adsense-reloaded' ), 'http://wpquads.com/?utm_campaign=overlay&utm_source=free-plugin&utm_medium=admin' ) ?></span>
|
1766 |
+
<?php } ?>
|
1767 |
+
<br />
|
1768 |
+
<label class="quads-label-left quads-type-normal" for="quads_settings[ads][<?php echo $id; ?>][g_data_ad_width]">Width </label><input type="number" step="1" id="quads_settings[ads][<?php echo $id; ?>][g_data_ad_width]" name="quads_settings[ads][<?php echo $id; ?>][g_data_ad_width]" class="small-text quads-type-normal" value="<?php echo $g_data_ad_width; ?>">
|
1769 |
+
<label class="quads-type-normal" for="quads_settings[ads][<?php echo $id; ?>][g_data_ad_height]">Height </label><input type="number" step="1" id="quads_settings[ads][<?php echo $id; ?>][g_data_ad_height]" name="quads_settings[ads][<?php echo $id; ?>][g_data_ad_height]" class="small-text quads-type-normal" value="<?php echo $g_data_ad_height; ?>">
|
1770 |
+
</div>
|
1771 |
+
<div class="quads-style">
|
1772 |
+
<h3>Layout</h3>
|
1773 |
+
<?php
|
1774 |
+
$args_ad_position = array(
|
1775 |
+
'id' => 'align',
|
1776 |
+
'name' => 'align',
|
1777 |
+
'desc' => 'align',
|
1778 |
+
'std' => '3',
|
1779 |
+
'options' => array(
|
1780 |
+
'3' => 'Default',
|
1781 |
+
'0' => 'Left',
|
1782 |
+
'1' => 'Center',
|
1783 |
+
'2' => 'Right'
|
1784 |
+
)
|
1785 |
+
);
|
1786 |
+
echo quads_adposition_callback( $id, $args_ad_position );
|
1787 |
+
// if WP QUADS PRO is installed and version number is higher or equal 1.2.7 show the new margin settings
|
1788 |
+
if( !quads_is_extra() ) {
|
1789 |
+
?>
|
1790 |
+
|
1791 |
+
<br />
|
1792 |
+
<label class="quads-label-left" for="quads_settings[ads][<?php echo $id; ?>][margin]"><?php _e( 'Margin', 'quick-adsense-reloaded' ); ?></label>
|
1793 |
+
<input type="number" step="1" max="" min="" class="small-text" id="quads_settings[ads][<?php echo $id; ?>][margin]" name="quads_settings[ads][<?php echo $id; ?>][margin]" value="<?php echo esc_attr( stripslashes( $margin ) ); ?>"/>px
|
1794 |
+
<?php } echo apply_filters( 'quads_render_margin', '', $id ); ?>
|
1795 |
+
</div>
|
1796 |
+
<?php
|
1797 |
+
if (quads_is_extra()){
|
1798 |
+
echo apply_filters( 'quads_advanced_settings', '', $id );
|
1799 |
+
}
|
1800 |
+
echo quads_pro_overlay();
|
1801 |
+
?>
|
1802 |
+
</div>
|
1803 |
+
<?php
|
1804 |
+
}
|
1805 |
+
|
1806 |
+
/**
|
1807 |
+
* AdSense Code Widget Callback
|
1808 |
+
*
|
1809 |
+
* Renders adsense code fields
|
1810 |
+
*
|
1811 |
+
* @since 0.9.0
|
1812 |
+
* @param array $args Arguments passed by the setting
|
1813 |
+
* @global $quads_options Array of all the QUADS Options
|
1814 |
+
* @return void
|
1815 |
+
*/
|
1816 |
+
function quads_adsense_widget_callback( $args ) {
|
1817 |
+
global $quads_options;
|
1818 |
+
|
1819 |
+
$label = !empty( $args['name'] ) ? $args['name'] : '';
|
1820 |
+
|
1821 |
+
$code = isset( $quads_options['ads'][$args['id']]['code'] ) ? $quads_options['ads'][$args['id']]['code'] : '';
|
1822 |
+
|
1823 |
+
$margin = isset( $quads_options['ads'][$args['id']]['margin'] ) ? esc_attr( stripslashes( $quads_options['ads'][$args['id']]['margin'] ) ) : 0;
|
1824 |
+
|
1825 |
+
$g_data_ad_client = isset( $quads_options['ads'][$args['id']]['g_data_ad_client'] ) ? $quads_options['ads'][$args['id']]['g_data_ad_client'] : '';
|
1826 |
+
|
1827 |
+
$g_data_ad_slot = isset( $quads_options['ads'][$args['id']]['g_data_ad_slot'] ) ? $quads_options['ads'][$args['id']]['g_data_ad_slot'] : '';
|
1828 |
+
|
1829 |
+
$g_data_ad_width = isset( $quads_options['ads'][$args['id']]['g_data_ad_width'] ) ? $quads_options['ads'][$args['id']]['g_data_ad_width'] : '';
|
1830 |
+
|
1831 |
+
$g_data_ad_height = isset( $quads_options['ads'][$args['id']]['g_data_ad_height'] ) ? $quads_options['ads'][$args['id']]['g_data_ad_height'] : '';
|
1832 |
+
|
1833 |
+
// Create a shorter var to make HTML cleaner
|
1834 |
+
$id = $args['id'];
|
1835 |
+
?>
|
1836 |
+
<div class="quads-ad-toggle-header quads-box-close" data-box-id="quads-toggle<?php echo $id; ?>">
|
1837 |
+
<div class="quads-toogle-title"><?php echo $label; ?></div>
|
1838 |
+
<a class="quads-toggle" data-box-id="quads-toggle<?php echo $id; ?>" href="#"><div class="quads-close-open-icon"></div></a>
|
1839 |
+
</div>
|
1840 |
+
<div class="quads-ad-toggle-container" id="quads-toggle<?php echo $id; ?>" style="display:none;">
|
1841 |
+
<div>
|
1842 |
+
<?php
|
1843 |
+
$args_ad_type = array(
|
1844 |
+
'id' => 'ad_type',
|
1845 |
+
'name' => 'Type',
|
1846 |
+
'desc' => '',
|
1847 |
+
'std' => 'plain_text',
|
1848 |
+
'options' => array(
|
1849 |
+
'adsense' => 'AdSense',
|
1850 |
+
'plain_text' => 'Plain Text / HTML / JS'
|
1851 |
+
)
|
1852 |
+
);
|
1853 |
+
echo quads_adtype_callback( $id, $args_ad_type );
|
1854 |
+
?>
|
1855 |
+
</div>
|
1856 |
+
<textarea style="vertical-align:top;margin-right:20px;" class="large-text quads-textarea" cols="50" rows="10" id="quads_settings[ads][<?php echo $id; ?>][code]" name="quads_settings[ads][<?php echo $id; ?>][code]"><?php echo esc_textarea( stripslashes( $code ) ); ?></textarea><label for="quads_settings[ads][ <?php echo $id; ?> ][code]"> <?php echo $args['desc']; ?></label>
|
1857 |
+
<br>
|
1858 |
+
<div class="quads_adsense_code">
|
1859 |
+
<input type="button" style="vertical-align:inherit;" class="button button-primary quads-add-adsense" value="Copy / Paste AdSense Code"> <span>or add Ad Slot ID & Publisher ID manually below:</span>
|
1860 |
+
<br />
|
1861 |
+
<?php //echo __('Generate Ad Slot & Publisher ID automatically from your adsense code', 'quick-adsense-reloaded') ?>
|
1862 |
+
<label class="quads-label-left" for="quads_settings[ads][<?php echo $id; ?>][g_data_ad_slot]">Ad Slot ID </label><input type="text" class="quads-medium-size quads-bggrey" id="quads_settings[ads][<?php echo $id; ?>][g_data_ad_slot]" name="quads_settings[ads][<?php echo $id; ?>][g_data_ad_slot]" value="<?php echo $g_data_ad_slot; ?>">
|
1863 |
+
<label for="quads_settings[ads][<?php echo $id; ?>][g_data_ad_client]">Publisher ID</label><input type="text" id="quads_settings[ads][<?php echo $id; ?>][g_data_ad_client]" class="medium-text quads-bggrey" name="quads_settings[ads][<?php echo $id; ?>][g_data_ad_client]" value="<?php echo $g_data_ad_client; ?>">
|
1864 |
+
<br />
|
1865 |
+
<?php
|
1866 |
+
$args_adsense_type = array(
|
1867 |
+
'id' => 'adsense_type',
|
1868 |
+
'name' => 'Type',
|
1869 |
+
'desc' => 'Type',
|
1870 |
+
'options' => array(
|
1871 |
+
'normal' => 'Fixed Size',
|
1872 |
+
'responsive' => 'Responsive'
|
1873 |
+
)
|
1874 |
+
);
|
1875 |
+
echo quads_adense_select_callback( $id, $args_adsense_type );
|
1876 |
+
?>
|
1877 |
+
<?php if( !quads_is_extra() ) { ?>
|
1878 |
+
<span class="quads-pro-notice" style="display:block;margin-top:20px;"><?php echo sprintf( __( 'Install <a href="%s" target="_blank">WP QUADS PRO</a> to fully support AdSense Responsive ads.', 'quick-adsense-reloaded' ), 'http://wpquads.com/?utm_campaign=overlay&utm_source=free-plugin&utm_medium=admin' ) ?></span>
|
1879 |
+
<?php } ?>
|
1880 |
+
<br />
|
1881 |
+
<label class="quads-label-left quads-type-normal" for="quads_settings[ads][<?php echo $id; ?>][g_data_ad_width]">Width </label><input type="number" step="1" id="quads_settings[ads][<?php echo $id; ?>][g_data_ad_width]" name="quads_settings[ads][<?php echo $id; ?>][g_data_ad_width]" class="small-text quads-type-normal" value="<?php echo $g_data_ad_width; ?>">
|
1882 |
+
<label class="quads-type-normal" for="quads_settings[ads][<?php echo $id; ?>][g_data_ad_height]">Height </label><input type="number" step="1" id="quads_settings[ads][<?php echo $id; ?>][g_data_ad_height]" name="quads_settings[ads][<?php echo $id; ?>][g_data_ad_height]" class="small-text quads-type-normal" value="<?php echo $g_data_ad_height; ?>">
|
1883 |
+
</div>
|
1884 |
+
<div class="quads-style">
|
1885 |
+
<h3>Layout</h3>
|
1886 |
+
<?php
|
1887 |
+
$args_ad_position = array(
|
1888 |
+
'id' => 'align',
|
1889 |
+
'name' => 'align',
|
1890 |
+
'desc' => 'align',
|
1891 |
+
'std' => '3',
|
1892 |
+
'options' => array(
|
1893 |
+
'3' => 'Default',
|
1894 |
+
'0' => 'Left',
|
1895 |
+
'1' => 'Center',
|
1896 |
+
'2' => 'Right'
|
1897 |
+
)
|
1898 |
+
);
|
1899 |
+
echo quads_adposition_callback( $id, $args_ad_position );
|
1900 |
+
// if WP QUADS PRO is installed and version number is higher or equal 1.2.7 show the new margin settings
|
1901 |
+
if( !quads_is_extra() ) {
|
1902 |
+
?>
|
1903 |
+
<br />
|
1904 |
+
<label class="quads-label-left" for="quads_settings[ads][<?php echo $id; ?>][margin]"><?php _e( 'Margin', 'quick-adsense-reloaded' ); ?></label>
|
1905 |
+
<input type="number" step="1" max="" min="" class="small-text" id="quads_settings[ads][<?php echo $id; ?>][margin]" name="quads_settings[ads][<?php echo $id; ?>][margin]" value="<?php echo esc_attr( stripslashes( $margin ) ); ?>"/>px
|
1906 |
+
<?php } echo apply_filters( 'quads_render_margin', '', $id ); ?>
|
1907 |
+
</div>
|
1908 |
+
<?php
|
1909 |
+
if (quads_is_extra()){
|
1910 |
+
echo apply_filters( 'quads_advanced_settings', '', $id );
|
1911 |
+
}
|
1912 |
+
echo quads_pro_overlay();
|
1913 |
+
?>
|
1914 |
+
</div>
|
1915 |
+
<?php
|
1916 |
+
}
|
1917 |
+
|
1918 |
+
/**
|
1919 |
+
* If advanced settings are not available load overlay image
|
1920 |
+
* @return string
|
1921 |
+
*/
|
1922 |
+
function quads_pro_overlay() {
|
1923 |
+
if( quads_is_extra() ) {
|
1924 |
+
return '';
|
1925 |
+
}
|
1926 |
+
|
1927 |
+
$html = '<div class="quads-advanced-ad-box quads-pro-overlay"><a href="http://wpquads.com/?utm_campaign=overlay&utm_source=free-plugin&utm_medium=admin" target="_blank"><img src="' . QUADS_PLUGIN_URL . '/assets/images/get_pro_overlay.png"></a></div>';
|
1928 |
+
|
1929 |
+
return $html;
|
1930 |
+
}
|
1931 |
+
|
1932 |
+
/**
|
1933 |
+
*
|
1934 |
+
* Return array of alignment options
|
1935 |
+
*
|
1936 |
+
* @return array
|
1937 |
+
*/
|
1938 |
+
function quads_get_alignment() {
|
1939 |
+
// Do not change the key => value order for compatibility reasons
|
1940 |
+
return array(
|
1941 |
+
3 => 'none',
|
1942 |
+
0 => 'left',
|
1943 |
+
1 => 'center',
|
1944 |
+
2 => 'right',
|
1945 |
+
);
|
1946 |
+
}
|
1947 |
+
|
1948 |
+
/**
|
1949 |
+
* Check if plugin Clickfraud Monitoring is installed
|
1950 |
+
*
|
1951 |
+
* @return boolean true when it is installed and active
|
1952 |
+
*/
|
1953 |
+
function quads_is_installed_clickfraud() {
|
1954 |
+
$plugin_file = 'cfmonitor/cfmonitor.php';
|
1955 |
+
$plugin_file2 = 'clickfraud-monitoring/cfmonitor.php';
|
1956 |
+
|
1957 |
+
if( is_plugin_active( $plugin_file ) || is_plugin_active( $plugin_file2 ) ) {
|
1958 |
+
return true;
|
1959 |
+
}
|
1960 |
+
|
1961 |
+
return false;
|
1962 |
+
}
|
1963 |
+
|
1964 |
+
/**
|
1965 |
+
*
|
1966 |
+
* @param array $args array(
|
1967 |
+
* 'id' => 'string),
|
1968 |
+
* 'type' => desktop, tablet_landscape, tablet_portrait, phone
|
1969 |
+
* @return string
|
1970 |
+
|
1971 |
+
*/
|
1972 |
+
function quads_render_size_option( $args ) {
|
1973 |
+
global $quads_options;
|
1974 |
+
|
1975 |
+
if( !isset( $args['id'] ) ) {
|
1976 |
+
return '';
|
1977 |
+
}
|
1978 |
+
|
1979 |
+
$checked = isset( $quads_options['ads'][$args['id']][$args['type']] ) ? $quads_options['ads'][$args['id']][$args['type']] : '';
|
1980 |
+
$html = '<div class="quads-select-style-overwrite">';
|
1981 |
+
$html .= '<select class="quads-size-input" id="quads_settings[ads][' . $args['id'] . '][' . $args['type'] . ']" name="quads_settings[ads][' . $args['id'] . '][' . $args['type'] . ']">';
|
1982 |
+
foreach ( quads_get_adsense_sizes() as $key => $value ) :
|
1983 |
+
$selected = selected( $key, $checked, false );
|
1984 |
+
$html .= '<option value="' . $key . '" ' . $selected . '>' . $value . '</option>';
|
1985 |
+
endforeach;
|
1986 |
+
$html .= '</select>';
|
1987 |
+
$html .= '</div>';
|
1988 |
+
|
1989 |
+
return $html;
|
1990 |
+
}
|
1991 |
+
|
1992 |
+
/**
|
1993 |
+
* Get all AdSense Sizes
|
1994 |
+
* @return array
|
1995 |
+
*/
|
1996 |
+
function quads_get_adsense_sizes() {
|
1997 |
+
$sizes = array(
|
1998 |
+
'Auto' => 'Auto',
|
1999 |
+
'120 x 90' => '120 x 90',
|
2000 |
+
'120 x 240' => '120 x 240',
|
2001 |
+
'120 x 600' => '120 x 600',
|
2002 |
+
'125 x 125' => '125 x 125',
|
2003 |
+
'160 x 90' => '160 x 90',
|
2004 |
+
'160 x 600' => '160 x 600',
|
2005 |
+
'180 x 90' => '180 x 90',
|
2006 |
+
'180 x 150' => '180 x 150',
|
2007 |
+
'200 x 90' => '200 x 90',
|
2008 |
+
'200 x 200' => '200 x 200',
|
2009 |
+
'234 x 60' => '234 x 60',
|
2010 |
+
'250 x 250' => '250 x 250',
|
2011 |
+
'320 x 100' => '320 x 100',
|
2012 |
+
'300 x 250' => '300 x 250',
|
2013 |
+
'300 x 600' => '300 x 600',
|
2014 |
+
'300 x 1050' => '300 x 1050',
|
2015 |
+
'320 x 50' => '320 x 50',
|
2016 |
+
'336 x 280' => '336 x 280',
|
2017 |
+
'360 x 300' => '360 x 300',
|
2018 |
+
'435 x 300' => '435 x 300',
|
2019 |
+
'468 x 15' => '468 x 15',
|
2020 |
+
'468 x 60' => '468 x 60',
|
2021 |
+
'640 x 165' => '640 x 165',
|
2022 |
+
'640 x 190' => '640 x 190',
|
2023 |
+
'640 x 300' => '640 x 300',
|
2024 |
+
'728 x 15' => '728 x 15',
|
2025 |
+
'728 x 90' => '728 x 90',
|
2026 |
+
'970 x 90' => '970 x 90',
|
2027 |
+
'970 x 250' => '970 x 250',
|
2028 |
+
'240 x 400' => '240 x 400 - Regional ad sizes',
|
2029 |
+
'250 x 360' => '250 x 360 - Regional ad sizes',
|
2030 |
+
'580 x 400' => '580 x 400 - Regional ad sizes',
|
2031 |
+
'750 x 100' => '750 x 100 - Regional ad sizes',
|
2032 |
+
'750 x 200' => '750 x 200 - Regional ad sizes',
|
2033 |
+
'750 x 300' => '750 x 300 - Regional ad sizes',
|
2034 |
+
'980 x 120' => '980 x 120 - Regional ad sizes',
|
2035 |
+
'930 x 180' => '930 x 180 - Regional ad sizes',
|
2036 |
+
);
|
2037 |
+
|
2038 |
+
return apply_filters( 'quads_adsense_size_formats', $sizes );
|
2039 |
+
}
|
2040 |
+
|
2041 |
+
/**
|
2042 |
+
* Store AdSense parameters
|
2043 |
+
*
|
2044 |
+
* @return boolean
|
2045 |
+
*/
|
2046 |
+
function quads_store_adsense_args() {
|
2047 |
+
global $quads_options;
|
2048 |
+
|
2049 |
+
foreach ( $quads_options as $id => $ads ) {
|
2050 |
+
//$quads_options['ads'][$key]['code'];
|
2051 |
+
//echo 'id:' . $id . ' - ' . $ads['ads'];
|
2052 |
+
if (!is_array($ads)){
|
2053 |
+
continue;
|
2054 |
+
}
|
2055 |
+
foreach ($ads as $key => $value) {
|
2056 |
+
//echo $key . $value['code'] . '<br>';
|
2057 |
+
if( is_array( $value ) && array_key_exists( 'code', $value ) && !empty( $value['code'] ) ) {
|
2058 |
+
|
2059 |
+
//check to see if it is google ad
|
2060 |
+
if( preg_match( '/googlesyndication.com/', $value['code'] ) ) {
|
2061 |
+
|
2062 |
+
// Test if its google asyncron ad
|
2063 |
+
if( preg_match( '/data-ad-client=/', $value['code'] ) ) {
|
2064 |
+
//*** GOOGLE ASYNCRON *************
|
2065 |
+
$quads_options['ads'][$key]['current_ad_type'] = 'google_async';
|
2066 |
+
//get g_data_ad_client
|
2067 |
+
$explode_ad_code = explode( 'data-ad-client', $value['code'] );
|
2068 |
+
preg_match( '#"([a-zA-Z0-9-\s]+)"#', $explode_ad_code[1], $matches_add_client );
|
2069 |
+
$quads_options['ads'][$key]['g_data_ad_client'] = str_replace( array('"', ' '), array(''), $matches_add_client[1] );
|
2070 |
+
|
2071 |
+
//get g_data_ad_slot
|
2072 |
+
$explode_ad_code = explode( 'data-ad-slot', $value['code'] );
|
2073 |
+
preg_match( '#"([a-zA-Z0-9/\s]+)"#', $explode_ad_code[1], $matches_add_slot );
|
2074 |
+
$quads_options['ads'][$key]['g_data_ad_slot'] = str_replace( array('"', ' '), array(''), $matches_add_slot[1] );
|
2075 |
+
} else {
|
2076 |
+
//*** GOOGLE SYNCRON *************
|
2077 |
+
$quads_options['ads'][$key]['current_ad_type'] = 'google_sync';
|
2078 |
+
//get g_data_ad_client
|
2079 |
+
$explode_ad_code = explode( 'google_ad_client', $value['code'] );
|
2080 |
+
preg_match( '#"([a-zA-Z0-9-\s]+)"#', $explode_ad_code[1], $matches_add_client );
|
2081 |
+
$quads_options['ads'][$key]['g_data_ad_client'] = str_replace( array('"', ' '), array(''), $matches_add_client[1] );
|
2082 |
+
|
2083 |
+
//get g_data_ad_slot
|
2084 |
+
$explode_ad_code = explode( 'google_ad_slot', $value['code'] );
|
2085 |
+
preg_match( '#"([a-zA-Z0-9/\s]+)"#', $explode_ad_code[1], $matches_add_slot );
|
2086 |
+
$quads_options['ads'][$key]['g_data_ad_slot'] = str_replace( array('"', ' '), array(''), $matches_add_slot[1] );
|
2087 |
+
}
|
2088 |
+
}
|
2089 |
+
}
|
2090 |
+
}
|
2091 |
+
}
|
2092 |
+
//wp_die( var_dump( $quads_options ) );
|
2093 |
+
update_option( 'quads_settings', $quads_options );
|
2094 |
+
}
|
2095 |
+
|
2096 |
+
/**
|
2097 |
+
* Populate AdSense Code field otherwise ads are not shown on frontpage (Bug).
|
2098 |
+
* @todo
|
2099 |
+
*
|
2100 |
+
* @global $quads_options $quads_options
|
2101 |
+
* @deprecated since 1.3.8
|
2102 |
+
*/
|
2103 |
+
//function quads_fix_ad_not_shown(){
|
2104 |
+
// global $quads_options;
|
2105 |
+
//
|
2106 |
+
// foreach ( $quads_options as $id => $values ) {
|
2107 |
+
// if( is_array( $values ) && array_key_exists( 'code', $values ) && array_key_exists( 'ad_type', $values ) && empty($values['code']) ) {
|
2108 |
+
// $quads_options[$id]['code'] = '...';
|
2109 |
+
// }
|
2110 |
+
// }
|
2111 |
+
//}
|
2112 |
+
|
2113 |
+
/**
|
2114 |
+
* Sanitizes a string key for QUADS Settings
|
2115 |
+
*
|
2116 |
+
* Keys are used as internal identifiers. Alphanumeric characters, dashes, underscores, stops, colons and slashes are allowed
|
2117 |
+
*
|
2118 |
+
* @since 2.0.0
|
2119 |
+
* @param string $key String key
|
2120 |
+
* @return string Sanitized key
|
2121 |
+
*/
|
2122 |
+
function quads_sanitize_key( $key ) {
|
2123 |
+
$raw_key = $key;
|
2124 |
+
$key = preg_replace( '/[^a-zA-Z0-9_\-\.\:\/]/', '', $key );
|
2125 |
+
/**
|
2126 |
+
* Filter a sanitized key string.
|
2127 |
+
*
|
2128 |
+
* @since 2.5.8
|
2129 |
+
* @param string $key Sanitized key.
|
2130 |
+
* @param string $raw_key The key prior to sanitization.
|
2131 |
+
*/
|
2132 |
+
return apply_filters( 'quads_sanitize_key', $key, $raw_key );
|
2133 |
+
}
|
2134 |
+
|
2135 |
+
/**
|
2136 |
+
* Multi Select Callback
|
2137 |
+
*
|
2138 |
+
* @since 1.3.8
|
2139 |
+
* @param array $args Arguments passed by the settings
|
2140 |
+
* @global $quads_options Array of all the QUADS Options
|
2141 |
+
* @return string $output dropdown
|
2142 |
+
*/
|
2143 |
+
function quads_multiselect_callback( $args = array() ) {
|
2144 |
+
global $quads_options;
|
2145 |
+
|
2146 |
+
$placeholder = !empty( $args['placeholder'] ) ? $args['placeholder'] : '';
|
2147 |
+
$selected = isset( $quads_options[$args['id']] ) ? $quads_options[$args['id']] : '';
|
2148 |
+
$checked = '';
|
2149 |
+
|
2150 |
+
$html = '<select id="quads_select_'. $args['id'] .'" name="quads_settings[' . $args['id'] . '][]" data-placeholder="' . $placeholder . '" style="width:550px;" multiple tabindex="4" class="quads-select quads-chosen-select">';
|
2151 |
+
$i = 0;
|
2152 |
+
foreach ( $args['options'] as $key => $value ) :
|
2153 |
+
if( is_array( $selected ) ) {
|
2154 |
+
$checked = selected( true, in_array( $key, $selected ), false );
|
2155 |
+
}
|
2156 |
+
$html .= '<option value="' . $key . '" ' . $checked . '>' . $value . '</option>';
|
2157 |
+
endforeach;
|
2158 |
+
$html .= '</select>';
|
2159 |
+
echo $html;
|
2160 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2161 |
|
includes/admin/welcome.php
CHANGED
@@ -60,15 +60,7 @@ class quads_Welcome {
|
|
60 |
}
|
61 |
|
62 |
$upgrade = get_option( 'quads_version_upgraded_from' );
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
//@since 2.0.3
|
67 |
-
// if( ! $upgrade ) { // First time install
|
68 |
-
// wp_safe_redirect( admin_url( 'admin.php?page=quads-addons' ) ); exit;
|
69 |
-
// } else { // Update
|
70 |
-
// wp_safe_redirect( admin_url( 'admin.php?page=quads-addons' ) ); exit;
|
71 |
-
// }
|
72 |
// Redirect to settings page if wp quads pro is not installed
|
73 |
if( quads_is_extra() ) { // First time install
|
74 |
wp_safe_redirect( admin_url( 'admin.php?page=quads-settings' ) ); exit;
|
60 |
}
|
61 |
|
62 |
$upgrade = get_option( 'quads_version_upgraded_from' );
|
63 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
// Redirect to settings page if wp quads pro is not installed
|
65 |
if( quads_is_extra() ) { // First time install
|
66 |
wp_safe_redirect( admin_url( 'admin.php?page=quads-settings' ) ); exit;
|
includes/conditions.php
CHANGED
@@ -1,194 +1,204 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Conditions
|
5 |
-
*
|
6 |
-
* @package QUADS
|
7 |
-
* @subpackage Functions/conditions
|
8 |
-
* @copyright Copyright (c) 2016, René Hermenau
|
9 |
-
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
10 |
-
* @since 1.2.8
|
11 |
-
*/
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Determine if ads are visible
|
17 |
-
*
|
18 |
-
* @global arr $quads_options
|
19 |
-
* @param string $content
|
20 |
-
* @since 0.9.4
|
21 |
-
* @return boolean true when ads are shown
|
22 |
-
*/
|
23 |
-
function quads_ad_is_allowed( $content = null ) {
|
24 |
-
global $quads_options;
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
if(
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
(
|
49 |
-
(
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
if
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
*
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
*
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
*
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
*
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Conditions
|
5 |
+
*
|
6 |
+
* @package QUADS
|
7 |
+
* @subpackage Functions/conditions
|
8 |
+
* @copyright Copyright (c) 2016, René Hermenau
|
9 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
10 |
+
* @since 1.2.8
|
11 |
+
*/
|
12 |
+
|
13 |
+
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Determine if ads are visible
|
17 |
+
*
|
18 |
+
* @global arr $quads_options
|
19 |
+
* @param string $content
|
20 |
+
* @since 0.9.4
|
21 |
+
* @return boolean true when ads are shown
|
22 |
+
*/
|
23 |
+
function quads_ad_is_allowed( $content = null ) {
|
24 |
+
global $quads_options;
|
25 |
+
|
26 |
+
// Never show ads in ajax calls
|
27 |
+
if ( defined('DOING_AJAX') && DOING_AJAX ||
|
28 |
+
(! empty( $_SERVER[ 'HTTP_X_REQUESTED_WITH' ] ) && strtolower( $_SERVER[ 'HTTP_X_REQUESTED_WITH' ]) == 'xmlhttprequest' )
|
29 |
+
)
|
30 |
+
{
|
31 |
+
/* it's an AJAX call */
|
32 |
+
return false;
|
33 |
+
}
|
34 |
+
|
35 |
+
$hide_ads = apply_filters('quads_hide_ads', false);
|
36 |
+
|
37 |
+
// User Roles check
|
38 |
+
if(!quads_user_roles_permission()){
|
39 |
+
return false;
|
40 |
+
}
|
41 |
+
|
42 |
+
// Frontpage check
|
43 |
+
if (is_front_page() && isset( $quads_options['visibility']['AppHome'] ) ){
|
44 |
+
return true;
|
45 |
+
}
|
46 |
+
|
47 |
+
if(
|
48 |
+
(is_feed()) ||
|
49 |
+
(is_search()) ||
|
50 |
+
(is_404() ) ||
|
51 |
+
(strpos( $content, '<!--NoAds-->' ) !== false) ||
|
52 |
+
(strpos( $content, '<!--OffAds-->' ) !== false) ||
|
53 |
+
(is_front_page() && !isset( $quads_options['visibility']['AppHome'] ) ) ||
|
54 |
+
(is_category() && !(isset( $quads_options['visibility']['AppCate'] ) ) ) ||
|
55 |
+
(is_archive() && !( isset( $quads_options['visibility']['AppArch'] ) ) ) ||
|
56 |
+
(is_tag() && !( isset( $quads_options['visibility']['AppTags'] ) ) ) ||
|
57 |
+
(!quads_post_type_allowed()) ||
|
58 |
+
(is_user_logged_in() && ( isset( $quads_options['visibility']['AppLogg'] ) ) ) ||
|
59 |
+
true === $hide_ads
|
60 |
+
) {
|
61 |
+
return apply_filters('quads_show_ads', false);
|
62 |
+
//return false;
|
63 |
+
}
|
64 |
+
// else
|
65 |
+
return true;
|
66 |
+
}
|
67 |
+
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Check if Ad widgets are visible on homepage
|
71 |
+
*
|
72 |
+
* @since 0.9.7
|
73 |
+
* return true when ad widgets are not visible on frontpage else false
|
74 |
+
*/
|
75 |
+
function quads_hide_ad_widget_on_homepage(){
|
76 |
+
global $quads_options;
|
77 |
+
|
78 |
+
$is_active = isset($quads_options["visibility"]["AppSide"]) ? true : false;
|
79 |
+
|
80 |
+
if( is_front_page() && $is_active ){
|
81 |
+
return true;
|
82 |
+
}
|
83 |
+
|
84 |
+
return false;
|
85 |
+
|
86 |
+
}
|
87 |
+
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Get the total number of active ads
|
91 |
+
*
|
92 |
+
* @global int $visibleShortcodeAds
|
93 |
+
* @global int $visibleContentAdsGlobal
|
94 |
+
* @global int $ad_count_custom
|
95 |
+
* @global int $ad_count_widget
|
96 |
+
* @return int number of active ads
|
97 |
+
*/
|
98 |
+
function quads_get_total_ad_count(){
|
99 |
+
global $visibleShortcodeAds, $visibleContentAdsGlobal, $ad_count_custom, $ad_count_widget;
|
100 |
+
|
101 |
+
$shortcode = isset($visibleShortcodeAds) ? (int)$visibleShortcodeAds : 0;
|
102 |
+
$content = isset($visibleContentAdsGlobal) ? (int)$visibleContentAdsGlobal : 0;
|
103 |
+
$custom = isset($ad_count_custom) ? (int)$ad_count_custom : 0;
|
104 |
+
//$widget = isset($ad_count_widget) ? (int)$ad_count_widget : 0;
|
105 |
+
$widget = quads_get_number_widget_ads();
|
106 |
+
|
107 |
+
//wp_die($widget);
|
108 |
+
//wp_die( $shortcode + $content + $custom + $widget);
|
109 |
+
return $shortcode + $content + $custom + $widget;
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Check if the maximum amount of ads are reached
|
114 |
+
*
|
115 |
+
* @global arr $quads_options settings
|
116 |
+
* @var int amount of ads to activate
|
117 |
+
|
118 |
+
* @return bool true if max is reached
|
119 |
+
*/
|
120 |
+
|
121 |
+
function quads_ad_reach_max_count(){
|
122 |
+
global $quads_options;
|
123 |
+
|
124 |
+
$maxads = isset($quads_options['maxads']) ? $quads_options['maxads'] : 100;
|
125 |
+
$maxads = $maxads - quads_get_number_widget_ads();
|
126 |
+
|
127 |
+
//echo 'Total ads: '. quads_get_total_ad_count() . ' maxads: '. $maxads . '<br>';
|
128 |
+
//wp_die('Total ads: '. quads_get_total_ad_count() . ' maxads: '. $maxads . '<br>');
|
129 |
+
if ( quads_get_total_ad_count() >= $maxads ){
|
130 |
+
return true;
|
131 |
+
}
|
132 |
+
}
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Increment count of active ads generated in the_content
|
136 |
+
*
|
137 |
+
* @global int $ad_count
|
138 |
+
* @param type $ad_count
|
139 |
+
* @return int amount of active ads in the_content
|
140 |
+
*/
|
141 |
+
function quads_set_ad_count_content(){
|
142 |
+
global $visibleContentAdsGlobal;
|
143 |
+
|
144 |
+
$visibleContentAdsGlobal++;
|
145 |
+
return $visibleContentAdsGlobal;
|
146 |
+
}
|
147 |
+
|
148 |
+
/**
|
149 |
+
* Increment count of active ads generated with shortcodes
|
150 |
+
*
|
151 |
+
* @return int amount of active shortcode ads in the_content
|
152 |
+
*/
|
153 |
+
function quads_set_ad_count_shortcode(){
|
154 |
+
global $visibleShortcodeAds;
|
155 |
+
|
156 |
+
$visibleShortcodeAds++;
|
157 |
+
return $visibleShortcodeAds;
|
158 |
+
}
|
159 |
+
|
160 |
+
/**
|
161 |
+
* Increment count of custom active ads
|
162 |
+
*
|
163 |
+
* @return int amount of active custom ads
|
164 |
+
*/
|
165 |
+
function quads_set_ad_count_custom(){
|
166 |
+
global $ad_count_custom;
|
167 |
+
|
168 |
+
$ad_count_custom++;
|
169 |
+
return $ad_count_custom;
|
170 |
+
}
|
171 |
+
|
172 |
+
/**
|
173 |
+
* Increment count of active ads generated on widgets
|
174 |
+
*
|
175 |
+
* @return int amount of active widget ads
|
176 |
+
* @deprecated since 1.4.1
|
177 |
+
*/
|
178 |
+
function quads_set_ad_count_widget(){
|
179 |
+
global $ad_count_widget;
|
180 |
+
|
181 |
+
$ad_count_widget++;
|
182 |
+
return $ad_count_widget;
|
183 |
+
}
|
184 |
+
|
185 |
+
/**
|
186 |
+
* Check if AMP ads are disabled on a post via the post meta box settings
|
187 |
+
*
|
188 |
+
* @global obj $post
|
189 |
+
* @return boolean true if its disabled
|
190 |
+
*/
|
191 |
+
function quads_is_disabled_post_amp() {
|
192 |
+
global $post;
|
193 |
+
|
194 |
+
if(!is_singular()){
|
195 |
+
return true;
|
196 |
+
}
|
197 |
+
|
198 |
+
$ad_settings = get_post_meta( $post->ID, '_quads_config_visibility', true );
|
199 |
+
|
200 |
+
if( !empty( $ad_settings['OffAMP'] ) ) {
|
201 |
+
return true;
|
202 |
+
}
|
203 |
+
return false;
|
204 |
+
}
|
includes/post_types.php
CHANGED
@@ -1,48 +1,50 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Post Types
|
5 |
-
*
|
6 |
-
* @package QUADS
|
7 |
-
* @subpackage Functions/post_types
|
8 |
-
* @copyright Copyright (c) 2016, René Hermenau
|
9 |
-
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
10 |
-
* @since 1.2.8
|
11 |
-
*/
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Get list of available post_types
|
17 |
-
*
|
18 |
-
* @return array list of post_types
|
19 |
-
*/
|
20 |
-
function quads_get_post_types(){
|
21 |
-
$post_types = array('post'=>'post', 'page'=>'page');
|
22 |
-
return apply_filters('quads_post_types',$post_types);
|
23 |
-
}
|
24 |
-
|
25 |
-
/**
|
26 |
-
* Check if ad is allowed on specific post_type
|
27 |
-
*
|
28 |
-
* @global array $quads_options
|
29 |
-
* @global array $post
|
30 |
-
* @return boolean true if post_type is allowed
|
31 |
-
*/
|
32 |
-
function quads_post_type_allowed(){
|
33 |
-
global $quads_options, $post;
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
|
|
|
|
48 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Post Types
|
5 |
+
*
|
6 |
+
* @package QUADS
|
7 |
+
* @subpackage Functions/post_types
|
8 |
+
* @copyright Copyright (c) 2016, René Hermenau
|
9 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
10 |
+
* @since 1.2.8
|
11 |
+
*/
|
12 |
+
|
13 |
+
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Get list of available post_types
|
17 |
+
*
|
18 |
+
* @return array list of post_types
|
19 |
+
*/
|
20 |
+
function quads_get_post_types(){
|
21 |
+
$post_types = array('post'=>'post', 'page'=>'page');
|
22 |
+
return apply_filters('quads_post_types',$post_types);
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Check if ad is allowed on specific post_type
|
27 |
+
*
|
28 |
+
* @global array $quads_options
|
29 |
+
* @global array $post
|
30 |
+
* @return boolean true if post_type is allowed
|
31 |
+
*/
|
32 |
+
function quads_post_type_allowed(){
|
33 |
+
global $quads_options, $post;
|
34 |
+
|
35 |
+
$return = false;
|
36 |
+
|
37 |
+
if (!isset($post)){
|
38 |
+
$return = false;
|
39 |
+
}
|
40 |
+
|
41 |
+
if (!isset($quads_options['post_types']) || empty($quads_options['post_types'])){
|
42 |
+
$return = false;
|
43 |
+
}
|
44 |
+
|
45 |
+
$current_post_type = get_post_type($post->ID);
|
46 |
+
if ( in_array( $current_post_type, $quads_options['post_types'] )){
|
47 |
+
$return = true;
|
48 |
+
}
|
49 |
+
return apply_filters('quads_post_type_allowed',$return);
|
50 |
}
|
includes/scripts.php
CHANGED
@@ -1,258 +1,278 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Scripts
|
4 |
-
*
|
5 |
-
* @package QUADS
|
6 |
-
* @subpackage Functions
|
7 |
-
* @copyright Copyright (c) 2015, René Hermenau
|
8 |
-
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
9 |
-
* @since 0.9.0
|
10 |
-
*/
|
11 |
-
// Exit if accessed directly
|
12 |
-
if( !defined( 'ABSPATH' ) )
|
13 |
-
exit;
|
14 |
-
|
15 |
-
//add_action( 'wp_enqueue_scripts', 'quads_register_styles', 10 );
|
16 |
-
add_action( 'wp_print_styles', 'quads_inline_styles', 9999 );
|
17 |
-
|
18 |
-
add_action( 'admin_enqueue_scripts', 'quads_load_admin_scripts', 100 );
|
19 |
-
add_action( 'admin_enqueue_scripts', 'quads_load_plugins_admin_scripts', 100 );
|
20 |
-
add_action('
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
*
|
25 |
-
*
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
document.getElementById('wpquads-adblock-notice')
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
*
|
47 |
-
*
|
48 |
-
*
|
49 |
-
*
|
50 |
-
* @
|
51 |
-
* @
|
52 |
-
* @
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
$
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
wp_enqueue_script( 'quads-admin-
|
70 |
-
wp_enqueue_script( '
|
71 |
-
wp_enqueue_script( 'jquery-
|
72 |
-
|
73 |
-
|
74 |
-
wp_enqueue_style( '
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
'
|
79 |
-
'
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
*
|
86 |
-
*
|
87 |
-
*
|
88 |
-
*
|
89 |
-
* @
|
90 |
-
* @
|
91 |
-
* @
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
$
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
/**
|
109 |
-
*
|
110 |
-
*
|
111 |
-
*
|
112 |
-
*
|
113 |
-
* @since 1.
|
114 |
-
* @global $
|
115 |
-
* @
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
//
|
120 |
-
//
|
121 |
-
//
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
*
|
130 |
-
*
|
131 |
-
*
|
132 |
-
*
|
133 |
-
* @
|
134 |
-
*
|
135 |
-
* @return
|
136 |
-
*/
|
137 |
-
function
|
138 |
-
global $quads_options;
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
*/
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
}
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Scripts
|
4 |
+
*
|
5 |
+
* @package QUADS
|
6 |
+
* @subpackage Functions
|
7 |
+
* @copyright Copyright (c) 2015, René Hermenau
|
8 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
9 |
+
* @since 0.9.0
|
10 |
+
*/
|
11 |
+
// Exit if accessed directly
|
12 |
+
if( !defined( 'ABSPATH' ) )
|
13 |
+
exit;
|
14 |
+
|
15 |
+
//add_action( 'wp_enqueue_scripts', 'quads_register_styles', 10 );
|
16 |
+
add_action( 'wp_print_styles', 'quads_inline_styles', 9999 );
|
17 |
+
|
18 |
+
add_action( 'admin_enqueue_scripts', 'quads_load_admin_scripts', 100 );
|
19 |
+
add_action( 'admin_enqueue_scripts', 'quads_load_plugins_admin_scripts', 100 );
|
20 |
+
add_action( 'admin_enqueue_scripts', 'quads_load_all_admin_scripts', 100 );
|
21 |
+
add_action('admin_print_footer_scripts', 'quads_check_ad_blocker');
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Create ad blocker admin script
|
25 |
+
*
|
26 |
+
* @return mixed boolean | string
|
27 |
+
*/
|
28 |
+
function quads_check_ad_blocker(){
|
29 |
+
if (!quads_is_admin_page()){
|
30 |
+
return false;
|
31 |
+
}
|
32 |
+
?>
|
33 |
+
<script type="text/javascript">
|
34 |
+
window.onload = function(){
|
35 |
+
if (typeof wpquads_adblocker_check === 'undefined' || false === wpquads_adblocker_check) {
|
36 |
+
if (document.getElementById('wpquads-adblock-notice')){
|
37 |
+
document.getElementById('wpquads-adblock-notice').style.display = 'block';
|
38 |
+
}
|
39 |
+
}
|
40 |
+
}
|
41 |
+
</script>
|
42 |
+
<?php
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Load Admin Scripts
|
47 |
+
*
|
48 |
+
* Enqueues the required admin scripts.
|
49 |
+
*
|
50 |
+
* @since 1.0
|
51 |
+
* @global $post
|
52 |
+
* @param string $hook Page hook
|
53 |
+
* @return void
|
54 |
+
*/
|
55 |
+
function quads_load_admin_scripts( $hook ) {
|
56 |
+
if( !apply_filters( 'quads_load_admin_scripts', quads_is_admin_page(), $hook ) ) {
|
57 |
+
return;
|
58 |
+
}
|
59 |
+
global $wp_version;
|
60 |
+
|
61 |
+
$js_dir = QUADS_PLUGIN_URL . 'assets/js/';
|
62 |
+
$css_dir = QUADS_PLUGIN_URL . 'assets/css/';
|
63 |
+
|
64 |
+
// Use minified libraries if SCRIPT_DEBUG is turned off
|
65 |
+
$suffix = ( quadsIsDebugMode() ) ? '' : '.min';
|
66 |
+
|
67 |
+
|
68 |
+
// These have to be global
|
69 |
+
wp_enqueue_script( 'quads-admin-ads', $js_dir . 'ads.js', array('jquery'), QUADS_VERSION, false );
|
70 |
+
wp_enqueue_script( 'quads-admin-scripts', $js_dir . 'quads-admin' . $suffix . '.js', array('jquery'), QUADS_VERSION, false );
|
71 |
+
wp_enqueue_script( 'jquery-chosen', $js_dir . 'chosen.jquery' . $suffix . '.js', array('jquery'), QUADS_VERSION, false );
|
72 |
+
wp_enqueue_script( 'jquery-form' );
|
73 |
+
|
74 |
+
wp_enqueue_style( 'quads-admin', $css_dir . 'quads-admin' . $suffix . '.css', QUADS_VERSION );
|
75 |
+
wp_enqueue_style( 'jquery-chosen', $css_dir . 'chosen' . $suffix . '.css', QUADS_VERSION );
|
76 |
+
|
77 |
+
wp_localize_script( 'quads-admin-scripts', 'quads', array(
|
78 |
+
'nonce' => wp_create_nonce( 'quads_ajax_nonce' ),
|
79 |
+
'error' => __( "error", 'quick-adsense-reloaded' ),
|
80 |
+
'path' => get_option( 'siteurl' ),
|
81 |
+
) );
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Load Admin Scripts available on plugins page
|
86 |
+
*
|
87 |
+
* Enqueues the required admin scripts.
|
88 |
+
*
|
89 |
+
* @since 1.0
|
90 |
+
* @global $post
|
91 |
+
* @param string $hook Page hook
|
92 |
+
* @return void
|
93 |
+
*/
|
94 |
+
function quads_load_plugins_admin_scripts( $hook ) {
|
95 |
+
if( !apply_filters( 'quads_load_plugins_admin_scripts', quads_is_plugins_page(), $hook ) ) {
|
96 |
+
return;
|
97 |
+
}
|
98 |
+
|
99 |
+
$js_dir = QUADS_PLUGIN_URL . 'assets/js/';
|
100 |
+
$css_dir = QUADS_PLUGIN_URL . 'assets/css/';
|
101 |
+
|
102 |
+
// Use minified libraries if SCRIPT_DEBUG is turned off
|
103 |
+
$suffix = ( quadsIsDebugMode() ) ? '' : '.min';
|
104 |
+
|
105 |
+
wp_enqueue_script( 'quads-plugins-admin-scripts', $js_dir . 'quads-plugins-admin' . $suffix . '.js', array('jquery'), QUADS_VERSION, false );
|
106 |
+
wp_enqueue_style( 'quads-plugins-admin', $css_dir . 'quads-plugins-admin' . $suffix . '.css', QUADS_VERSION );
|
107 |
+
}
|
108 |
+
/**
|
109 |
+
* Load Admin Scripts available on all admin pages
|
110 |
+
*
|
111 |
+
* Enqueues the required admin scripts.
|
112 |
+
*
|
113 |
+
* @since 1.6.1
|
114 |
+
* @global $post
|
115 |
+
* @param string $hook Page hook
|
116 |
+
* @return void
|
117 |
+
*/
|
118 |
+
function quads_load_all_admin_scripts( $hook ) {
|
119 |
+
// if( !apply_filters( 'quads_load_all_admin_scripts', quads_is_plugins_page(), $hook ) ) {
|
120 |
+
// //return;
|
121 |
+
// }
|
122 |
+
|
123 |
+
$css_dir = QUADS_PLUGIN_URL . 'assets/css/';
|
124 |
+
|
125 |
+
wp_enqueue_style( 'quads-admin-all', $css_dir . 'quads-admin-all.css', QUADS_VERSION );
|
126 |
+
}
|
127 |
+
|
128 |
+
/**
|
129 |
+
* Register CSS Styles
|
130 |
+
*
|
131 |
+
* Checks the styles option and hooks the required filter.
|
132 |
+
*
|
133 |
+
* @since 1.0
|
134 |
+
* @global $mashsb_options
|
135 |
+
* @return void
|
136 |
+
*/
|
137 |
+
//function quads_register_styles( $hook ) {
|
138 |
+
// global $quads_options;
|
139 |
+
//
|
140 |
+
// // Register empty quads.css to be able to register quads_inline_styles()
|
141 |
+
// //$url = QUADS_PLUGIN_URL . 'assets/css/quads.css';
|
142 |
+
//
|
143 |
+
// //wp_enqueue_style( 'quads-styles', $url, array(), QUADS_VERSION );
|
144 |
+
// wp_enqueue_style( 'quads-styles', false );
|
145 |
+
//}
|
146 |
+
|
147 |
+
/**
|
148 |
+
* Add dynamic CSS to write media queries for removing unwanted ads without the need to use any cache busting method
|
149 |
+
* (Cache busting could affect performance and lead to lot of support tickets so lets follow the css approach)
|
150 |
+
*
|
151 |
+
* @since 1.0
|
152 |
+
* @global1 array options
|
153 |
+
* @global2 $quads_css dynamic build css
|
154 |
+
*
|
155 |
+
* @return string
|
156 |
+
*/
|
157 |
+
function quads_inline_styles() {
|
158 |
+
global $quads_options;
|
159 |
+
|
160 |
+
$css = '';
|
161 |
+
|
162 |
+
if( isset( $quads_options['ads'] ) ) {
|
163 |
+
foreach ( $quads_options['ads'] as $key => $value ) {
|
164 |
+
$css .= quads_render_media_query( $key, $value );
|
165 |
+
}
|
166 |
+
}
|
167 |
+
// Register empty style so we do not need an external css file
|
168 |
+
wp_register_style( 'quads-styles', false );
|
169 |
+
// Enque empty style
|
170 |
+
wp_enqueue_style( 'quads-styles' );
|
171 |
+
// Add inline css to that style
|
172 |
+
wp_add_inline_style( 'quads-styles', $css );
|
173 |
+
}
|
174 |
+
|
175 |
+
/**
|
176 |
+
* Render Media Queries
|
177 |
+
*
|
178 |
+
* @param string $key
|
179 |
+
* @param string $value
|
180 |
+
* @return string
|
181 |
+
*/
|
182 |
+
function quads_render_media_query($key, $value){
|
183 |
+
$lic = get_option( 'quads_wp_quads_pro_license_active' );
|
184 |
+
if( !$lic || (is_object( $lic ) && $lic->success !== true) ) {
|
185 |
+
return '';
|
186 |
+
}
|
187 |
+
|
188 |
+
$html = '';
|
189 |
+
|
190 |
+
if (isset($value['desktop']) ){
|
191 |
+
//$html .= '/* Hide on desktop */';
|
192 |
+
$html .= '@media only screen and (min-width:1140px){#quads-'.$key.', .quads-' . $key . ' {display:none;}}'. "\n";
|
193 |
+
}
|
194 |
+
if (isset($value['tablet_landscape']) ){
|
195 |
+
//$html .= '/* Hide on tablet landscape */';
|
196 |
+
$html .= '@media only screen and (min-width:1024px) and (max-width:1140px) {#quads-'.$key.', .quads-'.$key.' {display:none;}}' . "\n";
|
197 |
+
}
|
198 |
+
if (isset($value['tablet_portrait']) ){
|
199 |
+
//$html .= '/* Hide on tablet portrait */';
|
200 |
+
$html .= '@media only screen and (min-width:768px) and (max-width:1023px){#quads-'.$key.', .quads-'.$key.' {display:none;}}' . "\n";
|
201 |
+
}
|
202 |
+
if (isset($value['phone']) ){
|
203 |
+
//$html .= '/* Hide on mobile device */';
|
204 |
+
$html .= '@media only screen and (max-width:767px){#quads-'.$key.', .quads-'.$key.' {display:none;}}' . "\n";
|
205 |
+
}
|
206 |
+
|
207 |
+
return $html;
|
208 |
+
}
|
209 |
+
|
210 |
+
/*
|
211 |
+
* Check if debug mode is enabled
|
212 |
+
*
|
213 |
+
* @since 0.9.0
|
214 |
+
* @return bool true if Mashshare debug mode is on
|
215 |
+
*/
|
216 |
+
function quadsIsDebugMode(){
|
217 |
+
global $quads_options;
|
218 |
+
|
219 |
+
$debug_mode = isset($quads_options['debug_mode']) ? true : false;
|
220 |
+
return $debug_mode;
|
221 |
+
}
|
222 |
+
|
223 |
+
/**
|
224 |
+
* Create ad buttons for editor
|
225 |
+
*
|
226 |
+
* @author Tedd Garland, René Hermenau
|
227 |
+
* @since 0.9.0
|
228 |
+
*/
|
229 |
+
|
230 |
+
|
231 |
+
|
232 |
+
$wpvcomp = (bool)(version_compare(get_bloginfo('version'), '3.1', '>='));
|
233 |
+
function quads_ads_head_script() {
|
234 |
+
global $quads_options, $wpvcomp;
|
235 |
+
|
236 |
+
if ( isset($quads_options['quicktags']['QckTags'] ) ) { ?>
|
237 |
+
<script type="text/javascript">
|
238 |
+
wpvcomp = <?php echo(($wpvcomp==1)?"true":"false"); ?>;
|
239 |
+
edaddID = new Array();
|
240 |
+
edaddNm = new Array();
|
241 |
+
if(typeof(edButtons)!='undefined') {
|
242 |
+
edadd = edButtons.length;
|
243 |
+
var dynads={"all":[
|
244 |
+
<?php for ($i=1;$i<=count( quads_get_ads() )-1;$i++) { if( isset($quads_options['ads']['ad'.$i]['code']) && $quads_options['ads']['ad'.$i]['code'] !='' ){echo('"1",');}else{echo('"0",');}; } ?>
|
245 |
+
"0"]};
|
246 |
+
for(i=1;i<=<?php echo count( quads_get_ads() ) -1; ?>;i++) {
|
247 |
+
if(dynads.all[i-1]=="1") {
|
248 |
+
edButtons[edButtons.length]=new edButton("ads"+i.toString(),"Ads"+i.toString(),"\n<!--Ads"+i.toString()+"-->\n","","",-1);
|
249 |
+
edaddID[edaddID.length] = "ads"+i.toString();
|
250 |
+
edaddNm[edaddNm.length] = "Ads"+i.toString();
|
251 |
+
}
|
252 |
+
}
|
253 |
+
<?php if( !isset($quads_options['quicktags']['QckRnds'] ) ){ ?>
|
254 |
+
edButtons[edButtons.length]=new edButton("random_ads","RndAds","\n<!--RndAds-->\n","","",-1);
|
255 |
+
edaddID[edaddID.length] = "random_ads";
|
256 |
+
edaddNm[edaddNm.length] = "RndAds";
|
257 |
+
<?php } ?>
|
258 |
+
edButtons[edButtons.length]=new edButton("no_ads","NoAds","\n<!--NoAds-->\n","","",-1);
|
259 |
+
edaddID[edaddID.length] = "no_ads";
|
260 |
+
edaddNm[edaddNm.length] = "NoAds";
|
261 |
+
};
|
262 |
+
(function(){
|
263 |
+
if(typeof(edButtons)!='undefined' && typeof(jQuery)!='undefined' && wpvcomp){
|
264 |
+
jQuery(document).ready(function(){
|
265 |
+
for(i=0;i<edaddID.length;i++) {
|
266 |
+
jQuery("#ed_toolbar").append('<input type="button" value="' + edaddNm[i] +'" id="' + edaddID[i] +'" class="ed_button" onclick="edInsertTag(edCanvas, ' + (edadd+i) + ');" title="' + edaddNm[i] +'" />');
|
267 |
+
}
|
268 |
+
});
|
269 |
+
}
|
270 |
+
}());
|
271 |
+
</script>
|
272 |
+
<?php }
|
273 |
+
}
|
274 |
+
if ($wpvcomp) {
|
275 |
+
add_action('admin_print_footer_scripts', 'quads_ads_head_script');
|
276 |
+
}else{
|
277 |
+
add_action('admin_head', 'quads_ads_head_javascript_script');
|
278 |
+
}
|
includes/shortcodes.php
CHANGED
@@ -1,133 +1,133 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* shortcode functions
|
5 |
-
*
|
6 |
-
* @package QUADS
|
7 |
-
* @subpackage Functions/shortcodes
|
8 |
-
* @copyright Copyright (c) 2015, René Hermenau
|
9 |
-
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
10 |
-
* @since 0.9.4
|
11 |
-
*/
|
12 |
-
|
13 |
-
|
14 |
-
// add short codes
|
15 |
-
//@deprecated since 0.9.5
|
16 |
-
add_shortcode( 'quads_ad', 'quads_shortcode_display_ad', 1); // Important use a very early priority to be able to count total ads accurate
|
17 |
-
// new shortcode since 0.9.5
|
18 |
-
add_shortcode( 'quads', 'quads_shortcode_display_ad', 1); // Important use a very early priority to be able to count total ads accurate
|
19 |
-
|
20 |
-
|
21 |
-
/**
|
22 |
-
* shortcode to include ads in frontend
|
23 |
-
*
|
24 |
-
* @since 0.9.4
|
25 |
-
* @param array $atts
|
26 |
-
*/
|
27 |
-
function quads_shortcode_display_ad( $atts ) {
|
28 |
-
global $quads_options;
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
$arr = array(
|
44 |
-
'float:left;margin:%1$dpx %1$dpx %1$dpx 0;',
|
45 |
-
'float:none;margin:%1$dpx 0 %1$dpx 0;text-align:center;',
|
46 |
-
'float:right;margin:%1$dpx 0 %1$dpx %1$dpx;',
|
47 |
-
'float:none;margin:%1$dpx;');
|
48 |
-
|
49 |
-
$adsalign = isset($quads_options['ads']['ad' . $id]['align']) ? $quads_options['ads']['ad' . $id]['align'] : 3; // default
|
50 |
-
$adsmargin = isset( $quads_options['ads']['ad' . $id]['margin'] ) ? $quads_options['ads']['ad' . $id]['margin'] : '3'; // default
|
51 |
-
$margin = sprintf( $arr[( int ) $adsalign], $adsmargin );
|
52 |
-
|
53 |
-
|
54 |
-
// Do not create any inline style on AMP site
|
55 |
-
$style = !quads_is_amp_endpoint() ? apply_filters( 'quads_filter_margins', $margin, 'ad' . $id ) : '';
|
56 |
-
|
57 |
-
$code = "\n" . '<!-- WP QUADS v. ' . QUADS_VERSION . ' Shortcode Ad -->' . "\n" .
|
58 |
-
'<div class="quads-location quads-ad' . $id . '" id="quads-ad' . $id . '" style="' . $style . '">' . "\n";
|
59 |
-
$code .= do_shortcode( quads_get_ad( $id ) );
|
60 |
-
$code .= '</div>' . "\n";
|
61 |
-
|
62 |
-
return $code;
|
63 |
-
}
|
64 |
-
|
65 |
-
/**
|
66 |
-
* return ad content
|
67 |
-
*
|
68 |
-
* @since 0.9.4
|
69 |
-
* @param int $id id of the ad
|
70 |
-
* @return string
|
71 |
-
*/
|
72 |
-
function quads_get_ad($id = 0) {
|
73 |
-
global $quads_options;
|
74 |
-
|
75 |
-
if ( quads_ad_reach_max_count() ){
|
76 |
-
return;
|
77 |
-
}
|
78 |
-
|
79 |
-
if ( isset($quads_options['ads']['ad' . $id]['code']) ){
|
80 |
-
// Count how often the shortcode is used - Important
|
81 |
-
quads_set_ad_count_shortcode();
|
82 |
-
//$code = "\n".'<!-- WP QUADS Shortcode Ad v. ' . QUADS_VERSION .' -->'."\n";
|
83 |
-
//return $code . $quads_options['ad' . $id]['code'];
|
84 |
-
return quads_render_ad('ad' . $id, $quads_options['ads']['ad' . $id]['code']);
|
85 |
-
}
|
86 |
-
}
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
/**
|
91 |
-
* Return value of quads meta box settings
|
92 |
-
*
|
93 |
-
* @param type $id id of meta settings
|
94 |
-
* @return mixed string | bool value if setting is active. False if there is no setting
|
95 |
-
*/
|
96 |
-
function quads_check_meta_setting($key){
|
97 |
-
global $post;
|
98 |
-
|
99 |
-
if ( !isset($post->ID ) ){
|
100 |
-
return false;
|
101 |
-
}
|
102 |
-
|
103 |
-
$meta_key = '_quads_config_visibility';
|
104 |
-
|
105 |
-
$value_arr = get_post_meta ( $post->ID, $meta_key, true );
|
106 |
-
$value_key = isset($value_arr[$key]) ? $value_arr[$key] : null;
|
107 |
-
|
108 |
-
if (!empty($value_key))
|
109 |
-
return (string)$value_key;
|
110 |
-
|
111 |
-
return false;
|
112 |
-
}
|
113 |
-
|
114 |
-
/*
|
115 |
-
* Return string through shortcode function and strip out specific shortcode from it to
|
116 |
-
* prevents infinte loops if shortcode contains same shortcode
|
117 |
-
*
|
118 |
-
* @since 1.3.6
|
119 |
-
* @param1 string shortcode e.g. quads
|
120 |
-
* @param1 string content to return via shortcode
|
121 |
-
* @return string / shortcodes parsed
|
122 |
-
*/
|
123 |
-
|
124 |
-
function quadsCleanShortcode( $code, $content ) {
|
125 |
-
global $shortcode_tags;
|
126 |
-
$stack = $shortcode_tags;
|
127 |
-
$shortcode_tags = array($code => 1);
|
128 |
-
$content = strip_shortcodes( $content );
|
129 |
-
$shortcode_tags = $stack;
|
130 |
-
|
131 |
-
return do_shortcode( $content );
|
132 |
-
}
|
133 |
-
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* shortcode functions
|
5 |
+
*
|
6 |
+
* @package QUADS
|
7 |
+
* @subpackage Functions/shortcodes
|
8 |
+
* @copyright Copyright (c) 2015, René Hermenau
|
9 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
10 |
+
* @since 0.9.4
|
11 |
+
*/
|
12 |
+
|
13 |
+
|
14 |
+
// add short codes
|
15 |
+
//@deprecated since 0.9.5
|
16 |
+
add_shortcode( 'quads_ad', 'quads_shortcode_display_ad', 1); // Important use a very early priority to be able to count total ads accurate
|
17 |
+
// new shortcode since 0.9.5
|
18 |
+
add_shortcode( 'quads', 'quads_shortcode_display_ad', 1); // Important use a very early priority to be able to count total ads accurate
|
19 |
+
|
20 |
+
|
21 |
+
/**
|
22 |
+
* shortcode to include ads in frontend
|
23 |
+
*
|
24 |
+
* @since 0.9.4
|
25 |
+
* @param array $atts
|
26 |
+
*/
|
27 |
+
function quads_shortcode_display_ad( $atts ) {
|
28 |
+
global $quads_options;
|
29 |
+
|
30 |
+
// Display Condition is false and ignoreShortcodeCond is empty or not true
|
31 |
+
if( !quads_ad_is_allowed() && !isset($quads_options['ignoreShortcodeCond']) )
|
32 |
+
return;
|
33 |
+
|
34 |
+
|
35 |
+
//return quads_check_meta_setting('NoAds');
|
36 |
+
if( quads_check_meta_setting( 'NoAds' ) === '1' ){
|
37 |
+
return;
|
38 |
+
}
|
39 |
+
|
40 |
+
// The ad id
|
41 |
+
$id = isset( $atts['id'] ) ? ( int ) $atts['id'] : 0;
|
42 |
+
|
43 |
+
$arr = array(
|
44 |
+
'float:left;margin:%1$dpx %1$dpx %1$dpx 0;',
|
45 |
+
'float:none;margin:%1$dpx 0 %1$dpx 0;text-align:center;',
|
46 |
+
'float:right;margin:%1$dpx 0 %1$dpx %1$dpx;',
|
47 |
+
'float:none;margin:%1$dpx;');
|
48 |
+
|
49 |
+
$adsalign = isset($quads_options['ads']['ad' . $id]['align']) ? $quads_options['ads']['ad' . $id]['align'] : 3; // default
|
50 |
+
$adsmargin = isset( $quads_options['ads']['ad' . $id]['margin'] ) ? $quads_options['ads']['ad' . $id]['margin'] : '3'; // default
|
51 |
+
$margin = sprintf( $arr[( int ) $adsalign], $adsmargin );
|
52 |
+
|
53 |
+
|
54 |
+
// Do not create any inline style on AMP site
|
55 |
+
$style = !quads_is_amp_endpoint() ? apply_filters( 'quads_filter_margins', $margin, 'ad' . $id ) : '';
|
56 |
+
|
57 |
+
$code = "\n" . '<!-- WP QUADS v. ' . QUADS_VERSION . ' Shortcode Ad -->' . "\n" .
|
58 |
+
'<div class="quads-location quads-ad' . $id . '" id="quads-ad' . $id . '" style="' . $style . '">' . "\n";
|
59 |
+
$code .= do_shortcode( quads_get_ad( $id ) );
|
60 |
+
$code .= '</div>' . "\n";
|
61 |
+
|
62 |
+
return $code;
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* return ad content
|
67 |
+
*
|
68 |
+
* @since 0.9.4
|
69 |
+
* @param int $id id of the ad
|
70 |
+
* @return string
|
71 |
+
*/
|
72 |
+
function quads_get_ad($id = 0) {
|
73 |
+
global $quads_options;
|
74 |
+
|
75 |
+
if ( quads_ad_reach_max_count() ){
|
76 |
+
return;
|
77 |
+
}
|
78 |
+
|
79 |
+
if ( isset($quads_options['ads']['ad' . $id]['code']) ){
|
80 |
+
// Count how often the shortcode is used - Important
|
81 |
+
quads_set_ad_count_shortcode();
|
82 |
+
//$code = "\n".'<!-- WP QUADS Shortcode Ad v. ' . QUADS_VERSION .' -->'."\n";
|
83 |
+
//return $code . $quads_options['ad' . $id]['code'];
|
84 |
+
return quads_render_ad('ad' . $id, $quads_options['ads']['ad' . $id]['code']);
|
85 |
+
}
|
86 |
+
}
|
87 |
+
|
88 |
+
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Return value of quads meta box settings
|
92 |
+
*
|
93 |
+
* @param type $id id of meta settings
|
94 |
+
* @return mixed string | bool value if setting is active. False if there is no setting
|
95 |
+
*/
|
96 |
+
function quads_check_meta_setting($key){
|
97 |
+
global $post;
|
98 |
+
|
99 |
+
if ( !isset($post->ID ) ){
|
100 |
+
return false;
|
101 |
+
}
|
102 |
+
|
103 |
+
$meta_key = '_quads_config_visibility';
|
104 |
+
|
105 |
+
$value_arr = get_post_meta ( $post->ID, $meta_key, true );
|
106 |
+
$value_key = isset($value_arr[$key]) ? $value_arr[$key] : null;
|
107 |
+
|
108 |
+
if (!empty($value_key))
|
109 |
+
return (string)$value_key;
|
110 |
+
|
111 |
+
return false;
|
112 |
+
}
|
113 |
+
|
114 |
+
/*
|
115 |
+
* Return string through shortcode function and strip out specific shortcode from it to
|
116 |
+
* prevents infinte loops if shortcode contains same shortcode
|
117 |
+
*
|
118 |
+
* @since 1.3.6
|
119 |
+
* @param1 string shortcode e.g. quads
|
120 |
+
* @param1 string content to return via shortcode
|
121 |
+
* @return string / shortcodes parsed
|
122 |
+
*/
|
123 |
+
|
124 |
+
function quadsCleanShortcode( $code, $content ) {
|
125 |
+
global $shortcode_tags;
|
126 |
+
$stack = $shortcode_tags;
|
127 |
+
$shortcode_tags = array($code => 1);
|
128 |
+
$content = strip_shortcodes( $content );
|
129 |
+
$shortcode_tags = $stack;
|
130 |
+
|
131 |
+
return do_shortcode( $content );
|
132 |
+
}
|
133 |
+
|
includes/template-functions.php
CHANGED
@@ -1,811 +1,811 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Template Functions
|
4 |
-
*
|
5 |
-
* @package QUADS
|
6 |
-
* @subpackage Functions/Templates
|
7 |
-
* @copyright Copyright (c) 2015, René Hermenau
|
8 |
-
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
9 |
-
* @since 0.9.0
|
10 |
-
*/
|
11 |
-
|
12 |
-
// Exit if accessed directly
|
13 |
-
if ( ! defined( 'ABSPATH' ) ) exit;
|
14 |
-
|
15 |
-
// we need to hook into the_content on lower than default priority (that's why we use separate hook)
|
16 |
-
add_filter('the_content', 'quads_post_settings_to_quicktags', 5);
|
17 |
-
add_filter('the_content', 'quads_process_content', quads_get_load_priority());
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
/**
|
22 |
-
* Adds quicktags, defined via post meta options, to content.
|
23 |
-
*
|
24 |
-
* @param $content Post content
|
25 |
-
*
|
26 |
-
* @return string
|
27 |
-
*/
|
28 |
-
function quads_post_settings_to_quicktags ( $content ) {
|
29 |
-
|
30 |
-
// Return original content if QUADS is not allowed
|
31 |
-
if ( !quads_ad_is_allowed($content)){
|
32 |
-
return $content;
|
33 |
-
}
|
34 |
-
|
35 |
-
$quicktags_str = quads_get_visibility_quicktags_str();
|
36 |
-
|
37 |
-
return $content . $quicktags_str;
|
38 |
-
}
|
39 |
-
/**
|
40 |
-
* Returns quicktags based on post meta options.
|
41 |
-
* These quicktags define which ads should be hidden on current page.
|
42 |
-
*
|
43 |
-
* @param null $post_id Post id
|
44 |
-
*
|
45 |
-
* @return string
|
46 |
-
*/
|
47 |
-
function quads_get_visibility_quicktags_str( $post_id = null ) {
|
48 |
-
|
49 |
-
if( !$post_id ) {
|
50 |
-
$post_id = get_the_ID();
|
51 |
-
}
|
52 |
-
|
53 |
-
$str = '';
|
54 |
-
if( false === $post_id ) {
|
55 |
-
return $str;
|
56 |
-
}
|
57 |
-
|
58 |
-
$config = get_post_meta( $post_id, '_quads_config_visibility', true );
|
59 |
-
|
60 |
-
if( !empty( $config ) && is_array($config) ) {
|
61 |
-
foreach ( $config as $qtag_id => $qtag_label ) {
|
62 |
-
$str .= '<!--' . $qtag_id . '-->';
|
63 |
-
}
|
64 |
-
}
|
65 |
-
|
66 |
-
return $str;
|
67 |
-
}
|
68 |
-
|
69 |
-
/**
|
70 |
-
* Get load priority
|
71 |
-
*
|
72 |
-
* @global arr $quads_options
|
73 |
-
* @return int
|
74 |
-
*/
|
75 |
-
function quads_get_load_priority(){
|
76 |
-
global $quads_options;
|
77 |
-
|
78 |
-
if (!empty($quads_options['priority'])){
|
79 |
-
return intval($quads_options['priority']);
|
80 |
-
}
|
81 |
-
return 20;
|
82 |
-
}
|
83 |
-
|
84 |
-
/**
|
85 |
-
*
|
86 |
-
* @global arr $quads_options
|
87 |
-
* @global type $adsArray
|
88 |
-
* @param type $content
|
89 |
-
* @return type
|
90 |
-
*/
|
91 |
-
function quads_process_content( $content ) {
|
92 |
-
global $quads_options, $adsArray, $adsArrayCus, $visibleContentAds, $ad_count_widget, $visibleShortcodeAds;
|
93 |
-
|
94 |
-
|
95 |
-
// Do not do anything if ads are not allowed or process is not in the main query
|
96 |
-
if( !quads_ad_is_allowed( $content ) || !is_main_query()) {
|
97 |
-
$content = quads_clean_tags( $content );
|
98 |
-
return $content;
|
99 |
-
}
|
100 |
-
|
101 |
-
// Do nothing if maximum ads are reached in post content
|
102 |
-
if( $visibleContentAds >= quads_get_max_allowed_post_ads( $content ) ) {
|
103 |
-
$content = quads_clean_tags( $content );
|
104 |
-
return $content;
|
105 |
-
}
|
106 |
-
|
107 |
-
// Array of ad codes ids
|
108 |
-
$adsArray = quads_get_active_ads();
|
109 |
-
|
110 |
-
// Return is no ads are defined
|
111 |
-
if ($adsArray === 0){
|
112 |
-
return $content;
|
113 |
-
}
|
114 |
-
|
115 |
-
$content = quads_sanitize_content( $content );
|
116 |
-
|
117 |
-
$content = quads_filter_default_ads( $content );
|
118 |
-
|
119 |
-
/*
|
120 |
-
* Tidy up content
|
121 |
-
*/
|
122 |
-
//$content = '<!--EmptyClear-->' . $content . "\n" . '<div style="font-size:0px;height:0px;line-height:0px;margin:0;padding:0;clear:both"></div>';
|
123 |
-
$content = '<!--EmptyClear-->' . $content . "\n";
|
124 |
-
$content = quads_clean_tags( $content, true );
|
125 |
-
|
126 |
-
$content = quads_parse_default_ads($content);
|
127 |
-
|
128 |
-
$content = quads_parse_quicktags( $content );
|
129 |
-
|
130 |
-
$content = quads_parse_random_quicktag_ads($content);
|
131 |
-
|
132 |
-
$content = quads_parse_random_ads( $content );
|
133 |
-
|
134 |
-
/* ... That's it. DONE :) ... */
|
135 |
-
$content = quads_clean_tags( $content );
|
136 |
-
|
137 |
-
return do_shortcode( $content );
|
138 |
-
}
|
139 |
-
|
140 |
-
|
141 |
-
/**
|
142 |
-
* Return number of active widget ads
|
143 |
-
* @param string the_content
|
144 |
-
* @return int amount of widget ads
|
145 |
-
*/
|
146 |
-
function quads_get_number_widget_ads() {
|
147 |
-
$number_widgets = 0;
|
148 |
-
$maxWidgets = 10;
|
149 |
-
// count active widget ads
|
150 |
-
for ( $i = 1; $i <= $maxWidgets; $i++ ) {
|
151 |
-
$AdsWidName = 'AdsWidget%d (Quick Adsense Reloaded)';
|
152 |
-
$wadsid = sanitize_title( str_replace( array('(', ')'), '', sprintf( $AdsWidName, $i ) ) );
|
153 |
-
$number_widgets += (is_active_widget( '', '', $wadsid )) ? 1 : 0;
|
154 |
-
}
|
155 |
-
|
156 |
-
return $number_widgets;
|
157 |
-
}
|
158 |
-
|
159 |
-
/**
|
160 |
-
* Get list of valid ad ids's where either the plain text code field or the adsense ad slot and the ad client id is populated.
|
161 |
-
* @global arr $quads_options
|
162 |
-
*/
|
163 |
-
function quads_get_active_ads() {
|
164 |
-
global $quads_options;
|
165 |
-
|
166 |
-
// Max amount of different content ads we can have
|
167 |
-
//$numberAds = 20;
|
168 |
-
|
169 |
-
//$adsArray = array();
|
170 |
-
|
171 |
-
// Return early
|
172 |
-
if (empty($quads_options['ads'])){
|
173 |
-
return 0;
|
174 |
-
}
|
175 |
-
|
176 |
-
// Array of ad codes
|
177 |
-
// for ( $i = 1; $i <= $numberAds; $i++ ) {
|
178 |
-
// $tmp = isset( $quads_options['ads']['ad' . $i]['code'] ) ? trim( $quads_options['ads']['ad' . $i]['code'] ) : '';
|
179 |
-
// // id is valid if there is either the plain text field populated or the adsense ad slot and the ad client id
|
180 |
-
// if( !empty( $tmp ) || (!empty( $quads_options['ads']['ad' . $i]['g_data_ad_slot'] ) && !empty( $quads_options['ads']['ad' . $i]['g_data_ad_client'] ) ) ) {
|
181 |
-
// $adsArray[] = $i;
|
182 |
-
// }
|
183 |
-
// }
|
184 |
-
// count valid ads
|
185 |
-
$i = 0;
|
186 |
-
foreach ( $quads_options['ads'] as $ads) {
|
187 |
-
$tmp = isset( $quads_options['ads']['ad' . $i]['code'] ) ? trim( $quads_options['ads']['ad' . $i]['code'] ) : '';
|
188 |
-
// id is valid if there is either the plain text field populated or the adsense ad slot and the ad client id
|
189 |
-
if( !empty( $tmp ) || (!empty( $quads_options['ads']['ad' . $i]['g_data_ad_slot'] ) && !empty( $quads_options['ads']['ad' . $i]['g_data_ad_client'] ) ) ) {
|
190 |
-
$adsArray[] = $i;
|
191 |
-
}
|
192 |
-
$i++;
|
193 |
-
}
|
194 |
-
//wp_die(count($adsArray));
|
195 |
-
return (count($adsArray) > 0) ? $adsArray : 0;
|
196 |
-
}
|
197 |
-
|
198 |
-
/**
|
199 |
-
* Get complete array of valid ads
|
200 |
-
* @global arr $quads_options
|
201 |
-
*/
|
202 |
-
//function quads_get_ad_content() {
|
203 |
-
// global $quads_options;
|
204 |
-
//
|
205 |
-
// // Max amount of different content ads we can have
|
206 |
-
// $numberAds = 10;
|
207 |
-
//
|
208 |
-
// $adsArray = array();
|
209 |
-
//
|
210 |
-
// // Array of ad codes
|
211 |
-
// for ( $i = 1; $i <= $numberAds; $i++ ) {
|
212 |
-
// $tmp = isset( $quads_options['ads']['ad' . $i]['code'] ) ? trim( $quads_options['ads']['ad' . $i]['code'] ) : '';
|
213 |
-
// // id is valid if there is either the plain text field populated or the adsense ad slot and the ad client id
|
214 |
-
// if( !empty( $tmp ) || (!empty( $quads_options['ads']['ad' . $i]['g_data_ad_slot'] ) && !empty( $quads_options['ads']['ad' . $i]['g_data_ad_client'] ) ) ) {
|
215 |
-
// $adsArray[] = $quads_options['ads']['ad' . $i];
|
216 |
-
// }
|
217 |
-
// }
|
218 |
-
//
|
219 |
-
// return count($adsArray) ? $adsArray : 0;
|
220 |
-
//}
|
221 |
-
|
222 |
-
|
223 |
-
/**
|
224 |
-
* Get max allowed numbers of ads
|
225 |
-
*
|
226 |
-
* @param string $content
|
227 |
-
* @return int maximum number of ads
|
228 |
-
*/
|
229 |
-
function quads_get_max_allowed_post_ads( $content ) {
|
230 |
-
global $quads_options;
|
231 |
-
|
232 |
-
// Maximum allowed general number of ads
|
233 |
-
$maxAds = isset( $quads_options['maxads'] ) ? $quads_options['maxads'] : 10;
|
234 |
-
|
235 |
-
$numberWidgets = 10;
|
236 |
-
|
237 |
-
$AdsWidName = 'AdsWidget%d (Quick Adsense Reloaded)';
|
238 |
-
|
239 |
-
// count number of active widgets and subtract them
|
240 |
-
if( strpos( $content, '<!--OffWidget-->' ) === false && !quads_is_amp_endpoint() ) {
|
241 |
-
for ( $i = 1; $i <= $numberWidgets; $i++ ) {
|
242 |
-
$wadsid = sanitize_title( str_replace( array('(', ')'), '', sprintf( $AdsWidName, $i ) ) );
|
243 |
-
$maxAds -= (is_active_widget( '', '', $wadsid )) ? 1 : 0;
|
244 |
-
}
|
245 |
-
}
|
246 |
-
|
247 |
-
return $maxAds;
|
248 |
-
}
|
249 |
-
|
250 |
-
|
251 |
-
/**
|
252 |
-
* Filter default ads
|
253 |
-
*
|
254 |
-
* @global array $quads_options global settings
|
255 |
-
* @global array $adsArrayCus List of ad id'S
|
256 |
-
* @param string $content
|
257 |
-
* @return string content
|
258 |
-
*/
|
259 |
-
function quads_filter_default_ads( $content ) {
|
260 |
-
global $quads_options, $adsArrayCus;
|
261 |
-
|
262 |
-
$off_default_ads = (strpos( $content, '<!--OffDef-->' ) !== false);
|
263 |
-
|
264 |
-
if( $off_default_ads ) { // If default ads are disabled
|
265 |
-
return $content;
|
266 |
-
}
|
267 |
-
|
268 |
-
// Default Ads
|
269 |
-
$adsArrayCus = array();
|
270 |
-
|
271 |
-
// placeholder string for random ad
|
272 |
-
$cusrnd = 'CusRnd';
|
273 |
-
|
274 |
-
// placeholder string for custom ad spots
|
275 |
-
$cusads = 'CusAds';
|
276 |
-
|
277 |
-
// Beginning of Post
|
278 |
-
$beginning_position_status = isset( $quads_options['pos1']['BegnAds'] ) ? true : false;
|
279 |
-
$beginning_position_ad_id = isset( $quads_options['pos1']['BegnRnd'] ) ? $quads_options['pos1']['BegnRnd'] : 0;
|
280 |
-
|
281 |
-
// Middle of Post
|
282 |
-
$middle_position_status = isset( $quads_options['pos2']['MiddAds'] ) ? true : false;
|
283 |
-
$middle_position_ad_id = isset( $quads_options['pos2']['MiddRnd'] ) ? $quads_options['pos2']['MiddRnd'] : 0;
|
284 |
-
|
285 |
-
// End of Post
|
286 |
-
$end_position_status = isset( $quads_options['pos3']['EndiAds'] ) ? true : false;
|
287 |
-
$end_position_ad_id = isset( $quads_options['pos3']['EndiRnd'] ) ? $quads_options['pos3']['EndiRnd'] : 0;
|
288 |
-
|
289 |
-
// After the more tag
|
290 |
-
$more_position_status = isset( $quads_options['pos4']['MoreAds'] ) ? true : false;
|
291 |
-
$more_position_ad_id = isset( $quads_options['pos4']['MoreRnd'] ) ? $quads_options['pos4']['MoreRnd'] : 0;
|
292 |
-
|
293 |
-
// Right before the last paragraph
|
294 |
-
$last_paragraph_position_status = isset( $quads_options['pos5']['LapaAds'] ) ? true : false;
|
295 |
-
$last_paragraph_position_ad_id = isset( $quads_options['pos5']['LapaRnd'] ) ? $quads_options['pos5']['LapaRnd'] : 0;
|
296 |
-
|
297 |
-
// After Paragraph option 1 - 3
|
298 |
-
$number = 3; // number of paragraph ads | default value 3.
|
299 |
-
$default = 5; // Position. Let's start with id 5
|
300 |
-
for ( $i = 1; $i <= $number; $i++ ) {
|
301 |
-
$key = $default + $i; // 6,7,8
|
302 |
-
|
303 |
-
$paragraph['status'][$i] = isset( $quads_options['pos' . $key]['Par' . $i . 'Ads'] ) ? $quads_options['pos' . $key]['Par' . $i . 'Ads'] : 0; // Status - active | inactive
|
304 |
-
$paragraph['id'][$i] = isset( $quads_options['pos' . $key]['Par' . $i . 'Rnd'] ) ? $quads_options['pos' . $key]['Par' . $i . 'Rnd'] : 0; // Ad id
|
305 |
-
$paragraph['position'][$i] = isset( $quads_options['pos' . $key]['Par' . $i . 'Nup'] ) ? $quads_options['pos' . $key]['Par' . $i . 'Nup'] : 0; // Paragraph No
|
306 |
-
$paragraph['end_post'][$i] = isset( $quads_options['pos' . $key]['Par' . $i . 'Con'] ) ? $quads_options['pos' . $key]['Par' . $i . 'Con'] : 0; // End of post - yes | no
|
307 |
-
}
|
308 |
-
// After Image ad
|
309 |
-
$imageActive = isset( $quads_options['pos9']['Img1Ads'] ) ? $quads_options['pos9']['Img1Ads'] : false;
|
310 |
-
$imageAdNo = isset( $quads_options['pos9']['Img1Rnd'] ) ? $quads_options['pos9']['Img1Rnd'] : false;
|
311 |
-
$imageNo = isset( $quads_options['pos9']['Img1Nup'] ) ? $quads_options['pos9']['Img1Nup'] : false;
|
312 |
-
$imageCaption = isset( $quads_options['pos9']['Img1Con'] ) ? $quads_options['pos9']['Img1Con'] : false;
|
313 |
-
|
314 |
-
|
315 |
-
if( $beginning_position_ad_id == 0 ) {
|
316 |
-
$b1 = $cusrnd;
|
317 |
-
} else {
|
318 |
-
$b1 = $cusads . $beginning_position_ad_id;
|
319 |
-
array_push( $adsArrayCus, $beginning_position_ad_id );
|
320 |
-
};
|
321 |
-
|
322 |
-
if( $more_position_ad_id == 0 ) {
|
323 |
-
$r1 = $cusrnd;
|
324 |
-
} else {
|
325 |
-
$r1 = $cusads . $more_position_ad_id;
|
326 |
-
array_push( $adsArrayCus, $more_position_ad_id );
|
327 |
-
};
|
328 |
-
|
329 |
-
if( $middle_position_ad_id == 0 ) {
|
330 |
-
$m1 = $cusrnd;
|
331 |
-
} else {
|
332 |
-
$m1 = $cusads . $middle_position_ad_id;
|
333 |
-
array_push( $adsArrayCus, $middle_position_ad_id );
|
334 |
-
};
|
335 |
-
if( $last_paragraph_position_ad_id == 0 ) {
|
336 |
-
$g1 = $cusrnd;
|
337 |
-
} else {
|
338 |
-
$g1 = $cusads . $last_paragraph_position_ad_id;
|
339 |
-
array_push( $adsArrayCus, $last_paragraph_position_ad_id );
|
340 |
-
};
|
341 |
-
if( $end_position_ad_id == 0 ) {
|
342 |
-
$b2 = $cusrnd;
|
343 |
-
} else {
|
344 |
-
$b2 = $cusads . $end_position_ad_id;
|
345 |
-
array_push( $adsArrayCus, $end_position_ad_id );
|
346 |
-
};
|
347 |
-
for ( $i = 1; $i <= $number; $i++ ) {
|
348 |
-
if( $paragraph['id'][$i] == 0 ) {
|
349 |
-
$paragraph[$i] = $cusrnd;
|
350 |
-
} else {
|
351 |
-
$paragraph[$i] = $cusads . $paragraph['id'][$i];
|
352 |
-
array_push( $adsArrayCus, $paragraph['id'][$i] );
|
353 |
-
};
|
354 |
-
}
|
355 |
-
//wp_die(print_r($adsArrayCus));
|
356 |
-
|
357 |
-
// Create the arguments for filter quads_filter_paragraphs
|
358 |
-
$quads_args = array(
|
359 |
-
'paragraph' => $paragraph,
|
360 |
-
'cusads' => $cusads,
|
361 |
-
'cusrnd' => $cusrnd,
|
362 |
-
'AdsIdCus' => $adsArrayCus,
|
363 |
-
);
|
364 |
-
|
365 |
-
// Execute filter to add more paragraph ad spots
|
366 |
-
$quads_filtered = apply_filters( 'quads_filter_paragraphs', $quads_args );
|
367 |
-
|
368 |
-
// The filtered arguments
|
369 |
-
$paragraph = $quads_filtered['paragraph'];
|
370 |
-
|
371 |
-
// filtered list of ad spots
|
372 |
-
$adsArrayCus = $quads_filtered['AdsIdCus'];
|
373 |
-
|
374 |
-
// Create paragraph ads
|
375 |
-
$number = 6;
|
376 |
-
//$number = 3;
|
377 |
-
for ( $i = $number; $i >= 1; $i-- ) {
|
378 |
-
if( !empty( $paragraph['status'][$i] ) ) {
|
379 |
-
$sch = "</p>";
|
380 |
-
$content = str_replace( "</P>", $sch, $content );
|
381 |
-
// paragraphs in content
|
382 |
-
$paragraphsArray = explode( $sch, $content );
|
383 |
-
if( ( int ) $paragraph['position'][$i] < count( $paragraphsArray ) ) {
|
384 |
-
$content = implode( $sch, array_slice( $paragraphsArray, 0, $paragraph['position'][$i] ) ) . $sch . '<!--' . $paragraph[$i] . '-->' . implode( $sch, array_slice( $paragraphsArray, $paragraph['position'][$i] ) );
|
385 |
-
} elseif( $paragraph['end_post'][$i] ) {
|
386 |
-
$content = implode( $sch, $paragraphsArray ) . '<!--' . $paragraph[$i] . '-->';
|
387 |
-
}
|
388 |
-
}
|
389 |
-
}
|
390 |
-
|
391 |
-
// Check if image ad is random one
|
392 |
-
if( $imageAdNo == 0 ) {
|
393 |
-
$imageAd = $cusrnd;
|
394 |
-
} else {
|
395 |
-
$imageAd = $cusads . $imageAdNo;
|
396 |
-
array_push( $adsArrayCus, $imageAdNo );
|
397 |
-
};
|
398 |
-
|
399 |
-
|
400 |
-
// Beginning of post ad
|
401 |
-
if( $beginning_position_status && strpos( $content, '<!--OffBegin-->' ) === false ) {
|
402 |
-
$content = '<!--' . $b1 . '-->' . $content;
|
403 |
-
}
|
404 |
-
|
405 |
-
// Check if ad is middle one
|
406 |
-
if( $middle_position_status && strpos( $content, '<!--OffMiddle-->' ) === false ) {
|
407 |
-
if( substr_count( strtolower( $content ), '</p>' ) >= 2 ) {
|
408 |
-
$sch = "</p>";
|
409 |
-
$content = str_replace( "</P>", $sch, $content );
|
410 |
-
$paragraphsArray = explode( $sch, $content );
|
411 |
-
$nn = 0;
|
412 |
-
$mm = strlen( $content ) / 2;
|
413 |
-
for ( $i = 0; $i < count( $paragraphsArray ); $i++ ) {
|
414 |
-
$nn += strlen( $paragraphsArray[$i] ) + 4;
|
415 |
-
if( $nn > $mm ) {
|
416 |
-
if( ($mm - ($nn - strlen( $paragraphsArray[$i] ))) > ($nn - $mm) && $i + 1 < count( $paragraphsArray ) ) {
|
417 |
-
$paragraphsArray[$i + 1] = '<!--' . $m1 . '-->' . $paragraphsArray[$i + 1];
|
418 |
-
} else {
|
419 |
-
$paragraphsArray[$i] = '<!--' . $m1 . '-->' . $paragraphsArray[$i];
|
420 |
-
}
|
421 |
-
break;
|
422 |
-
}
|
423 |
-
}
|
424 |
-
$content = implode( $sch, $paragraphsArray );
|
425 |
-
}
|
426 |
-
}
|
427 |
-
|
428 |
-
// End of Post ad
|
429 |
-
if( $end_position_status && strpos( $content, '<!--OffEnd-->' ) === false ) {
|
430 |
-
$content = $content . '<!--' . $b2 . '-->';
|
431 |
-
}
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
// Check if ad is after "More Tag"
|
436 |
-
if( $more_position_status && strpos( $content, '<!--OffAfMore-->' ) === false ) {
|
437 |
-
$mmr = '<!--' . $r1 . '-->';
|
438 |
-
$postid = get_the_ID();
|
439 |
-
$content = str_replace( '<span id="more-' . $postid . '"></span>', $mmr, $content );
|
440 |
-
}
|
441 |
-
|
442 |
-
// Right after last paragraph ad
|
443 |
-
if( $last_paragraph_position_status && strpos( $content, '<!--OffBfLastPara-->' ) === false ) {
|
444 |
-
$sch = "<p>";
|
445 |
-
$content = str_replace( "<P>", $sch, $content );
|
446 |
-
$paragraphsArray = explode( $sch, $content );
|
447 |
-
if( count( $paragraphsArray ) > 2 ) {
|
448 |
-
$content = implode( $sch, array_slice( $paragraphsArray, 0, count( $paragraphsArray ) - 1 ) ) . '<!--' . $g1 . '-->' . $sch . $paragraphsArray[count( $paragraphsArray ) - 1];
|
449 |
-
}
|
450 |
-
}
|
451 |
-
|
452 |
-
// After Image ad
|
453 |
-
if( $imageActive ) {
|
454 |
-
|
455 |
-
// Sanitation
|
456 |
-
$imgtag = "<img";
|
457 |
-
$delimiter = ">";
|
458 |
-
$caption = "[/caption]";
|
459 |
-
$atag = "</a>";
|
460 |
-
$content = str_replace( "<IMG", $imgtag, $content );
|
461 |
-
$content = str_replace( "</A>", $atag, $content );
|
462 |
-
|
463 |
-
// Get all images in content
|
464 |
-
$imagesArray = explode( $imgtag, $content );
|
465 |
-
// Modify Image ad
|
466 |
-
if( ( int ) $imageNo < count( $imagesArray ) ) {
|
467 |
-
//Get all tags
|
468 |
-
$tagsArray = explode( $delimiter, $imagesArray[$imageNo] );
|
469 |
-
if( count( $tagsArray ) > 1 ) {
|
470 |
-
$captionArray = explode( $caption, $imagesArray[$imageNo] );
|
471 |
-
$ccp = ( count( $captionArray ) > 1 ) ? strpos( strtolower( $captionArray[0] ), '[caption ' ) === false : false;
|
472 |
-
$imagesArrayAtag = explode( $atag, $imagesArray[$imageNo] );
|
473 |
-
$cdu = ( count( $imagesArrayAtag ) > 1 ) ? strpos( strtolower( $imagesArrayAtag[0] ), '<a href' ) === false : false;
|
474 |
-
// Show ad after caption
|
475 |
-
if( $imageCaption && $ccp ) {
|
476 |
-
$imagesArray[$imageNo] = implode( $caption, array_slice( $captionArray, 0, 1 ) ) . $caption . "\r\n" . '<!--' . $imageAd . '-->' . "\r\n" . implode( $caption, array_slice( $captionArray, 1 ) );
|
477 |
-
} else if( $cdu ) {
|
478 |
-
$imagesArray[$imageNo] = implode( $atag, array_slice( $imagesArrayAtag, 0, 1 ) ) . $atag . "\r\n" . '<!--' . $imageAd . '-->' . "\r\n" . implode( $atag, array_slice( $imagesArrayAtag, 1 ) );
|
479 |
-
} else {
|
480 |
-
$imagesArray[$imageNo] = implode( $delimiter, array_slice( $tagsArray, 0, 1 ) ) . $delimiter . "\r\n" . '<!--' . $imageAd . '-->' . "\r\n" . implode( $delimiter, array_slice( $tagsArray, 1 ) );
|
481 |
-
}
|
482 |
-
}
|
483 |
-
$content = implode( $imgtag, $imagesArray );
|
484 |
-
}
|
485 |
-
}
|
486 |
-
|
487 |
-
return $content;
|
488 |
-
}
|
489 |
-
/**
|
490 |
-
* Sanitize content and return it cleaned
|
491 |
-
*
|
492 |
-
* @param string $content
|
493 |
-
* @return string
|
494 |
-
*/
|
495 |
-
function quads_sanitize_content($content){
|
496 |
-
|
497 |
-
/* ... Tidy up content ... */
|
498 |
-
// Replace all <p></p> tags with placeholder ##QA-TP1##
|
499 |
-
$content = str_replace( "<p></p>", "##QA-TP1##", $content );
|
500 |
-
|
501 |
-
// Replace all <p> </p> tags with placeholder ##QA-TP2##
|
502 |
-
$content = str_replace( "<p> </p>", "##QA-TP2##", $content );
|
503 |
-
|
504 |
-
return $content;
|
505 |
-
}
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
/**
|
510 |
-
* Parse random ads which are created from quicktag <!--RndAds-->
|
511 |
-
*
|
512 |
-
* @global array $adsArray
|
513 |
-
* @global int $visibleContentAds
|
514 |
-
* @return content
|
515 |
-
*/
|
516 |
-
function quads_parse_random_quicktag_ads($content){
|
517 |
-
global $adsArray, $visibleContentAds, $quads_options;
|
518 |
-
|
519 |
-
$maxAds = isset($quads_options['maxads']) ? $quads_options['maxads'] : 10;
|
520 |
-
/*
|
521 |
-
* Replace RndAds Random Ads
|
522 |
-
*/
|
523 |
-
if( strpos( $content, '<!--RndAds-->' ) !== false && is_singular() ) {
|
524 |
-
$adsArrayTmp = array();
|
525 |
-
shuffle( $adsArray );
|
526 |
-
for ( $i = 1; $i <= $maxAds - $visibleContentAds; $i++ ) {
|
527 |
-
if( $i <= count( $adsArray ) ) {
|
528 |
-
array_push( $adsArrayTmp, $adsArray[$i - 1] );
|
529 |
-
}
|
530 |
-
}
|
531 |
-
$tcx = count( $adsArrayTmp );
|
532 |
-
$tcy = substr_count( $content, '<!--RndAds-->' );
|
533 |
-
for ( $i = $tcx; $i <= $tcy - 1; $i++ ) {
|
534 |
-
array_push( $adsArrayTmp, -1 );
|
535 |
-
}
|
536 |
-
shuffle( $adsArrayTmp );
|
537 |
-
for ( $i = 1; $i <= $tcy; $i++ ) {
|
538 |
-
$tmp = $adsArrayTmp[0];
|
539 |
-
$content = quads_replace_ads( $content, 'RndAds', $adsArrayTmp[0] );
|
540 |
-
$adsArrayTmp = quads_del_element( $adsArrayTmp, 0 );
|
541 |
-
if( $tmp != -1 ) {
|
542 |
-
$visibleContentAds += 1;
|
543 |
-
};
|
544 |
-
//quads_set_ad_count_content();
|
545 |
-
//if( quads_ad_reach_max_count() ) {
|
546 |
-
if( $visibleContentAds >= quads_get_max_allowed_post_ads( $content ) ) {
|
547 |
-
$content = quads_clean_tags( $content );
|
548 |
-
return $content;
|
549 |
-
}
|
550 |
-
}
|
551 |
-
}
|
552 |
-
|
553 |
-
return $content;
|
554 |
-
}
|
555 |
-
|
556 |
-
/**
|
557 |
-
* Parse random default ads which can be enabled from general settings
|
558 |
-
*
|
559 |
-
* @global array $adsArray
|
560 |
-
* @global int $visibleContentAds
|
561 |
-
* @return string
|
562 |
-
*/
|
563 |
-
function quads_parse_random_ads($content) {
|
564 |
-
global $adsRandom, $visibleContentAds;
|
565 |
-
|
566 |
-
$off_default_ads = (strpos( $content, '<!--OffDef-->' ) !== false);
|
567 |
-
if( $off_default_ads ) { // disabled default ads
|
568 |
-
return $content;
|
569 |
-
}
|
570 |
-
|
571 |
-
if( strpos( $content, '<!--CusRnd-->' ) !== false && is_singular() ) {
|
572 |
-
|
573 |
-
$tcx = count( $adsRandom );
|
574 |
-
// How often is a random ad appearing in content
|
575 |
-
$number_rand_ads = substr_count( $content, '<!--CusRnd-->' );
|
576 |
-
|
577 |
-
for ( $i = $tcx; $i <= $number_rand_ads - 1; $i++ ) {
|
578 |
-
array_push( $adsRandom, -1 );
|
579 |
-
}
|
580 |
-
shuffle( $adsRandom );
|
581 |
-
//wp_die(print_r($adsRandom));
|
582 |
-
//wp_die($adsRandom[0]);
|
583 |
-
for ( $i = 1; $i <= $number_rand_ads; $i++ ) {
|
584 |
-
$content = quads_replace_ads( $content, 'CusRnd', $adsRandom[0] );
|
585 |
-
$adsRandom = quads_del_element( $adsRandom, 0 );
|
586 |
-
$visibleContentAds += 1;
|
587 |
-
//quads_set_ad_count_content();
|
588 |
-
//if( quads_ad_reach_max_count() ) {
|
589 |
-
if( $visibleContentAds >= quads_get_max_allowed_post_ads( $content ) ) {
|
590 |
-
$content = quads_clean_tags( $content );
|
591 |
-
return $content;
|
592 |
-
}
|
593 |
-
}
|
594 |
-
}
|
595 |
-
|
596 |
-
return $content;
|
597 |
-
}
|
598 |
-
|
599 |
-
/**
|
600 |
-
* Parse Quicktags
|
601 |
-
*
|
602 |
-
* @global array $adsArray
|
603 |
-
* @param string $content
|
604 |
-
* @return string
|
605 |
-
*/
|
606 |
-
function quads_parse_quicktags($content){
|
607 |
-
global $adsArray, $visibleContentAds;
|
608 |
-
//print_r(count($adsArray));
|
609 |
-
|
610 |
-
$idx = 0;
|
611 |
-
for ( $i = 1; $i <= count( $adsArray ); $i++ ) {
|
612 |
-
if( strpos( $content, '<!--Ads' . $adsArray[$idx] . '-->' ) !== false ) {
|
613 |
-
$content = quads_replace_ads( $content, 'Ads' . $adsArray[$idx], $adsArray[$idx] );
|
614 |
-
//$adsArray = quads_del_element( $adsArray, $idx );
|
615 |
-
$visibleContentAds += 1;
|
616 |
-
$idx +=1;
|
617 |
-
//quads_set_ad_count_content();
|
618 |
-
if( $visibleContentAds >= quads_get_max_allowed_post_ads( $content ) ) {
|
619 |
-
$content = quads_clean_tags( $content );
|
620 |
-
return $content;
|
621 |
-
}
|
622 |
-
} else {
|
623 |
-
$idx += 1;
|
624 |
-
}
|
625 |
-
}
|
626 |
-
|
627 |
-
return $content;
|
628 |
-
}
|
629 |
-
|
630 |
-
/**
|
631 |
-
* Parse default ads Beginning/Middle/End/Paragraph Ads1-10
|
632 |
-
*
|
633 |
-
* @param string $content
|
634 |
-
* @return string
|
635 |
-
*/
|
636 |
-
function quads_parse_default_ads( $content ) {
|
637 |
-
global $adsArrayCus, $adsRandom, $adsArray, $visibleContentAds;
|
638 |
-
|
639 |
-
$off_default_ads = (strpos( $content, '<!--OffDef-->' ) !== false);
|
640 |
-
|
641 |
-
if( $off_default_ads ) { // disabled default ads
|
642 |
-
return $content;
|
643 |
-
}
|
644 |
-
// Create the array which contains the random ads
|
645 |
-
$adsRandom = $adsArray;
|
646 |
-
|
647 |
-
// echo '<pre>';
|
648 |
-
// echo 'adsArrayCus: ';
|
649 |
-
// print_r($adsArrayCus);
|
650 |
-
// echo 'adsArray: ';
|
651 |
-
// print_r( $adsArray );
|
652 |
-
// echo '</pre>';
|
653 |
-
|
654 |
-
for ( $i = 0; $i <= count( $adsArrayCus ); $i++ ) {
|
655 |
-
if( isset( $adsArrayCus[$i] ) && strpos( $content, '<!--CusAds' . $adsArrayCus[$i] . '-->' ) !== false && in_array( $adsArrayCus[$i], $adsArray ) ) {
|
656 |
-
$content = quads_replace_ads( $content, 'CusAds' . $adsArrayCus[$i], $adsArrayCus[$i] );
|
657 |
-
// Create array $adsRandom for quads_parse_random_ads() parsing functions to make sure that the random function
|
658 |
-
// is never using ads that are already used on static ad spots which are generated with quads_parse_default_ads()
|
659 |
-
if ($i == 0){
|
660 |
-
$adsRandom = quads_del_element($adsRandom, array_search($adsArrayCus[$i], $adsRandom));
|
661 |
-
}else{
|
662 |
-
$adsRandom = quads_del_element($adsRandom, array_search($adsArrayCus[$i-1], $adsRandom));
|
663 |
-
}
|
664 |
-
|
665 |
-
$visibleContentAds += 1;
|
666 |
-
//quads_set_ad_count_content();
|
667 |
-
//if( quads_ad_reach_max_count() || $visibleContentAds >= quads_get_max_allowed_post_ads( $content ) ) {
|
668 |
-
//wp_die(quads_get_max_allowed_post_ads( $content ));
|
669 |
-
if( $visibleContentAds >= quads_get_max_allowed_post_ads( $content ) ) {
|
670 |
-
$content = quads_clean_tags( $content );
|
671 |
-
}
|
672 |
-
}
|
673 |
-
}
|
674 |
-
return $content;
|
675 |
-
}
|
676 |
-
|
677 |
-
/**
|
678 |
-
* Replace ad code in content
|
679 |
-
*
|
680 |
-
* @global type $quads_options
|
681 |
-
* @param string $content
|
682 |
-
* @param string $quicktag Quicktag
|
683 |
-
* @param string $id id of the ad
|
684 |
-
* @return type
|
685 |
-
*/
|
686 |
-
function quads_replace_ads($content, $quicktag, $id) {
|
687 |
-
global $quads_options;
|
688 |
-
|
689 |
-
|
690 |
-
if( strpos($content,'<!--'.$quicktag.'-->')===false ) {
|
691 |
-
return $content;
|
692 |
-
}
|
693 |
-
|
694 |
-
|
695 |
-
if ($id != -1) {
|
696 |
-
|
697 |
-
$code = !empty($quads_options['ads']['ad' . $id ]['code']) ? $quads_options['ads']['ad' . $id ]['code'] : '';
|
698 |
-
$style = quads_get_inline_ad_style($id);
|
699 |
-
$adscode =
|
700 |
-
"\n".'<!-- WP QUADS Content Ad Plugin v. ' . QUADS_VERSION .' -->'."\n".
|
701 |
-
'<div class="quads-location quads-ad' .$id. '" id="quads-ad' .$id. '" style="'.$style.'">'."\n".
|
702 |
-
quads_render_ad('ad'.$id, $code)."\n".
|
703 |
-
'</div>'. "\n";
|
704 |
-
|
705 |
-
} else {
|
706 |
-
$adscode ='';
|
707 |
-
}
|
708 |
-
$cont = explode('<!--'.$quicktag.'-->', $content, 2);
|
709 |
-
|
710 |
-
return $cont[0].$adscode.$cont[1];
|
711 |
-
}
|
712 |
-
|
713 |
-
/**
|
714 |
-
* Get ad inline style
|
715 |
-
*
|
716 |
-
* @global arr $quads_options
|
717 |
-
* @param int $id id of the ad
|
718 |
-
* @return string
|
719 |
-
*/
|
720 |
-
function quads_get_inline_ad_style( $id ) {
|
721 |
-
global $quads_options;
|
722 |
-
|
723 |
-
if( empty($id) ) {
|
724 |
-
return '';
|
725 |
-
}
|
726 |
-
|
727 |
-
// Basic style
|
728 |
-
$styleArray = array(
|
729 |
-
'float:left;margin:%1$dpx %1$dpx %1$dpx 0;',
|
730 |
-
'float:none;margin:%1$dpx 0 %1$dpx 0;text-align:center;',
|
731 |
-
'float:right;margin:%1$dpx 0 %1$dpx %1$dpx;',
|
732 |
-
'float:none;margin:%1$dpx;');
|
733 |
-
|
734 |
-
// Alignment
|
735 |
-
$adsalign = ( int )$quads_options['ads']['ad' . $id]['align'];
|
736 |
-
|
737 |
-
// Margin
|
738 |
-
$adsmargin = isset( $quads_options['ads']['ad' . $id]['margin'] ) ? $quads_options['ads']['ad' . $id]['margin'] : '3'; // default option = 3
|
739 |
-
$margin = sprintf( $styleArray[$adsalign], $adsmargin );
|
740 |
-
|
741 |
-
//wp_die($quads_options['ads']['ad' . $id]['margin']);
|
742 |
-
//wp_die('ad'.$id);
|
743 |
-
|
744 |
-
// Do not create any inline style on AMP site
|
745 |
-
$style = !quads_is_amp_endpoint() ? apply_filters( 'quads_filter_margins', $margin, 'ad' . $id ) : '';
|
746 |
-
|
747 |
-
return $style;
|
748 |
-
}
|
749 |
-
|
750 |
-
/**
|
751 |
-
* Revert content to original content any remove any processing helper strings
|
752 |
-
*
|
753 |
-
* @global int $visibleContentAds
|
754 |
-
* @global array $adsArray
|
755 |
-
* @global array $quads_options
|
756 |
-
* @global int $ad_count
|
757 |
-
* @param string $content
|
758 |
-
* @param boolean $trimonly
|
759 |
-
*
|
760 |
-
* @return string content
|
761 |
-
*/
|
762 |
-
function quads_clean_tags($content, $trimonly = false) {
|
763 |
-
global $visibleContentAds;
|
764 |
-
global $adsArray;
|
765 |
-
global $quads_options;
|
766 |
-
global $ad_count;
|
767 |
-
|
768 |
-
$tagnames = array('EmptyClear','RndAds','NoAds','OffDef','OffAds','OffWidget','OffBegin','OffMiddle','OffEnd','OffBfMore','OffAfLastPara','CusRnd');
|
769 |
-
|
770 |
-
for($i=1;$i<=10;$i++) {
|
771 |
-
array_push($tagnames, 'CusAds'.$i);
|
772 |
-
array_push($tagnames, 'Ads'.$i);
|
773 |
-
};
|
774 |
-
|
775 |
-
|
776 |
-
foreach ($tagnames as $tags) {
|
777 |
-
if(strpos($content,'<!--'.$tags.'-->')!==false || $tags=='EmptyClear') {
|
778 |
-
if($trimonly) {
|
779 |
-
$content = str_replace('<p><!--'.$tags.'--></p>', '<!--'.$tags.'-->', $content);
|
780 |
-
}else{
|
781 |
-
$content = str_replace(array('<p><!--'.$tags.'--></p>','<!--'.$tags.'-->'), '', $content);
|
782 |
-
$content = str_replace("##QA-TP1##", "<p></p>", $content);
|
783 |
-
$content = str_replace("##QA-TP2##", "<p> </p>", $content);
|
784 |
-
}
|
785 |
-
}
|
786 |
-
}
|
787 |
-
if(!$trimonly && (is_single() || is_page()) ) {
|
788 |
-
$visibleContentAds = 0;
|
789 |
-
$adsArray = array();
|
790 |
-
}
|
791 |
-
return $content;
|
792 |
-
}
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
/**
|
797 |
-
* Remove element from array
|
798 |
-
*
|
799 |
-
* @param array $paragraphsArrayay
|
800 |
-
* @param int $idx key to remove from array
|
801 |
-
* @return array
|
802 |
-
*/
|
803 |
-
function quads_del_element($array, $idx) {
|
804 |
-
$copy = array();
|
805 |
-
for( $i=0; $i<count($array) ;$i++) {
|
806 |
-
if ( $idx != $i ) {
|
807 |
-
array_push($copy, $array[$i]);
|
808 |
-
}
|
809 |
-
}
|
810 |
-
return $copy;
|
811 |
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Template Functions
|
4 |
+
*
|
5 |
+
* @package QUADS
|
6 |
+
* @subpackage Functions/Templates
|
7 |
+
* @copyright Copyright (c) 2015, René Hermenau
|
8 |
+
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
|
9 |
+
* @since 0.9.0
|
10 |
+
*/
|
11 |
+
|
12 |
+
// Exit if accessed directly
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
14 |
+
|
15 |
+
// we need to hook into the_content on lower than default priority (that's why we use separate hook)
|
16 |
+
add_filter('the_content', 'quads_post_settings_to_quicktags', 5);
|
17 |
+
add_filter('the_content', 'quads_process_content', quads_get_load_priority());
|
18 |
+
|
19 |
+
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Adds quicktags, defined via post meta options, to content.
|
23 |
+
*
|
24 |
+
* @param $content Post content
|
25 |
+
*
|
26 |
+
* @return string
|
27 |
+
*/
|
28 |
+
function quads_post_settings_to_quicktags ( $content ) {
|
29 |
+
|
30 |
+
// Return original content if QUADS is not allowed
|
31 |
+
if ( !quads_ad_is_allowed($content)){
|
32 |
+
return $content;
|
33 |
+
}
|
34 |
+
|
35 |
+
$quicktags_str = quads_get_visibility_quicktags_str();
|
36 |
+
|
37 |
+
return $content . $quicktags_str;
|
38 |
+
}
|
39 |
+
/**
|
40 |
+
* Returns quicktags based on post meta options.
|
41 |
+
* These quicktags define which ads should be hidden on current page.
|
42 |
+
*
|
43 |
+
* @param null $post_id Post id
|
44 |
+
*
|
45 |
+
* @return string
|
46 |
+
*/
|
47 |
+
function quads_get_visibility_quicktags_str( $post_id = null ) {
|
48 |
+
|
49 |
+
if( !$post_id ) {
|
50 |
+
$post_id = get_the_ID();
|
51 |
+
}
|
52 |
+
|
53 |
+
$str = '';
|
54 |
+
if( false === $post_id ) {
|
55 |
+
return $str;
|
56 |
+
}
|
57 |
+
|
58 |
+
$config = get_post_meta( $post_id, '_quads_config_visibility', true );
|
59 |
+
|
60 |
+
if( !empty( $config ) && is_array($config) ) {
|
61 |
+
foreach ( $config as $qtag_id => $qtag_label ) {
|
62 |
+
$str .= '<!--' . $qtag_id . '-->';
|
63 |
+
}
|
64 |
+
}
|
65 |
+
|
66 |
+
return $str;
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Get load priority
|
71 |
+
*
|
72 |
+
* @global arr $quads_options
|
73 |
+
* @return int
|
74 |
+
*/
|
75 |
+
function quads_get_load_priority(){
|
76 |
+
global $quads_options;
|
77 |
+
|
78 |
+
if (!empty($quads_options['priority'])){
|
79 |
+
return intval($quads_options['priority']);
|
80 |
+
}
|
81 |
+
return 20;
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
*
|
86 |
+
* @global arr $quads_options
|
87 |
+
* @global type $adsArray
|
88 |
+
* @param type $content
|
89 |
+
* @return type
|
90 |
+
*/
|
91 |
+
function quads_process_content( $content ) {
|
92 |
+
global $quads_options, $adsArray, $adsArrayCus, $visibleContentAds, $ad_count_widget, $visibleShortcodeAds;
|
93 |
+
|
94 |
+
|
95 |
+
// Do not do anything if ads are not allowed or process is not in the main query
|
96 |
+
if( !quads_ad_is_allowed( $content ) || !is_main_query()) {
|
97 |
+
$content = quads_clean_tags( $content );
|
98 |
+
return $content;
|
99 |
+
}
|
100 |
+
|
101 |
+
// Do nothing if maximum ads are reached in post content
|
102 |
+
if( $visibleContentAds >= quads_get_max_allowed_post_ads( $content ) ) {
|
103 |
+
$content = quads_clean_tags( $content );
|
104 |
+
return $content;
|
105 |
+
}
|
106 |
+
|
107 |
+
// Array of ad codes ids
|
108 |
+
$adsArray = quads_get_active_ads();
|
109 |
+
|
110 |
+
// Return is no ads are defined
|
111 |
+
if ($adsArray === 0){
|
112 |
+
return $content;
|
113 |
+
}
|
114 |
+
|
115 |
+
$content = quads_sanitize_content( $content );
|
116 |
+
|
117 |
+
$content = quads_filter_default_ads( $content );
|
118 |
+
|
119 |
+
/*
|
120 |
+
* Tidy up content
|
121 |
+
*/
|
122 |
+
//$content = '<!--EmptyClear-->' . $content . "\n" . '<div style="font-size:0px;height:0px;line-height:0px;margin:0;padding:0;clear:both"></div>';
|
123 |
+
$content = '<!--EmptyClear-->' . $content . "\n";
|
124 |
+
$content = quads_clean_tags( $content, true );
|
125 |
+
|
126 |
+
$content = quads_parse_default_ads($content);
|
127 |
+
|
128 |
+
$content = quads_parse_quicktags( $content );
|
129 |
+
|
130 |
+
$content = quads_parse_random_quicktag_ads($content);
|
131 |
+
|
132 |
+
$content = quads_parse_random_ads( $content );
|
133 |
+
|
134 |
+
/* ... That's it. DONE :) ... */
|
135 |
+
$content = quads_clean_tags( $content );
|
136 |
+
|
137 |
+
return do_shortcode( $content );
|
138 |
+
}
|
139 |
+
|
140 |
+
|
141 |
+
/**
|
142 |
+
* Return number of active widget ads
|
143 |
+
* @param string the_content
|
144 |
+
* @return int amount of widget ads
|
145 |
+
*/
|
146 |
+
function quads_get_number_widget_ads() {
|
147 |
+
$number_widgets = 0;
|
148 |
+
$maxWidgets = 10;
|
149 |
+
// count active widget ads
|
150 |
+
for ( $i = 1; $i <= $maxWidgets; $i++ ) {
|
151 |
+
$AdsWidName = 'AdsWidget%d (Quick Adsense Reloaded)';
|
152 |
+
$wadsid = sanitize_title( str_replace( array('(', ')'), '', sprintf( $AdsWidName, $i ) ) );
|
153 |
+
$number_widgets += (is_active_widget( '', '', $wadsid )) ? 1 : 0;
|
154 |
+
}
|
155 |
+
|
156 |
+
return $number_widgets;
|
157 |
+
}
|
158 |
+
|
159 |
+
/**
|
160 |
+
* Get list of valid ad ids's where either the plain text code field or the adsense ad slot and the ad client id is populated.
|
161 |
+
* @global arr $quads_options
|
162 |
+
*/
|
163 |
+
function quads_get_active_ads() {
|
164 |
+
global $quads_options;
|
165 |
+
|
166 |
+
// Max amount of different content ads we can have
|
167 |
+
//$numberAds = 20;
|
168 |
+
|
169 |
+
//$adsArray = array();
|
170 |
+
|
171 |
+
// Return early
|
172 |
+
if (empty($quads_options['ads'])){
|
173 |
+
return 0;
|
174 |
+
}
|
175 |
+
|
176 |
+
// Array of ad codes
|
177 |
+
// for ( $i = 1; $i <= $numberAds; $i++ ) {
|
178 |
+
// $tmp = isset( $quads_options['ads']['ad' . $i]['code'] ) ? trim( $quads_options['ads']['ad' . $i]['code'] ) : '';
|
179 |
+
// // id is valid if there is either the plain text field populated or the adsense ad slot and the ad client id
|
180 |
+
// if( !empty( $tmp ) || (!empty( $quads_options['ads']['ad' . $i]['g_data_ad_slot'] ) && !empty( $quads_options['ads']['ad' . $i]['g_data_ad_client'] ) ) ) {
|
181 |
+
// $adsArray[] = $i;
|
182 |
+
// }
|
183 |
+
// }
|
184 |
+
// count valid ads
|
185 |
+
$i = 0;
|
186 |
+
foreach ( $quads_options['ads'] as $ads) {
|
187 |
+
$tmp = isset( $quads_options['ads']['ad' . $i]['code'] ) ? trim( $quads_options['ads']['ad' . $i]['code'] ) : '';
|
188 |
+
// id is valid if there is either the plain text field populated or the adsense ad slot and the ad client id
|
189 |
+
if( !empty( $tmp ) || (!empty( $quads_options['ads']['ad' . $i]['g_data_ad_slot'] ) && !empty( $quads_options['ads']['ad' . $i]['g_data_ad_client'] ) ) ) {
|
190 |
+
$adsArray[] = $i;
|
191 |
+
}
|
192 |
+
$i++;
|
193 |
+
}
|
194 |
+
//wp_die(count($adsArray));
|
195 |
+
return (count($adsArray) > 0) ? $adsArray : 0;
|
196 |
+
}
|
197 |
+
|
198 |
+
/**
|
199 |
+
* Get complete array of valid ads
|
200 |
+
* @global arr $quads_options
|
201 |
+
*/
|
202 |
+
//function quads_get_ad_content() {
|
203 |
+
// global $quads_options;
|
204 |
+
//
|
205 |
+
// // Max amount of different content ads we can have
|
206 |
+
// $numberAds = 10;
|
207 |
+
//
|
208 |
+
// $adsArray = array();
|
209 |
+
//
|
210 |
+
// // Array of ad codes
|
211 |
+
// for ( $i = 1; $i <= $numberAds; $i++ ) {
|
212 |
+
// $tmp = isset( $quads_options['ads']['ad' . $i]['code'] ) ? trim( $quads_options['ads']['ad' . $i]['code'] ) : '';
|
213 |
+
// // id is valid if there is either the plain text field populated or the adsense ad slot and the ad client id
|
214 |
+
// if( !empty( $tmp ) || (!empty( $quads_options['ads']['ad' . $i]['g_data_ad_slot'] ) && !empty( $quads_options['ads']['ad' . $i]['g_data_ad_client'] ) ) ) {
|
215 |
+
// $adsArray[] = $quads_options['ads']['ad' . $i];
|
216 |
+
// }
|
217 |
+
// }
|
218 |
+
//
|
219 |
+
// return count($adsArray) ? $adsArray : 0;
|
220 |
+
//}
|
221 |
+
|
222 |
+
|
223 |
+
/**
|
224 |
+
* Get max allowed numbers of ads
|
225 |
+
*
|
226 |
+
* @param string $content
|
227 |
+
* @return int maximum number of ads
|
228 |
+
*/
|
229 |
+
function quads_get_max_allowed_post_ads( $content ) {
|
230 |
+
global $quads_options;
|
231 |
+
|
232 |
+
// Maximum allowed general number of ads
|
233 |
+
$maxAds = isset( $quads_options['maxads'] ) ? $quads_options['maxads'] : 10;
|
234 |
+
|
235 |
+
$numberWidgets = 10;
|
236 |
+
|
237 |
+
$AdsWidName = 'AdsWidget%d (Quick Adsense Reloaded)';
|
238 |
+
|
239 |
+
// count number of active widgets and subtract them
|
240 |
+
if( strpos( $content, '<!--OffWidget-->' ) === false && !quads_is_amp_endpoint() ) {
|
241 |
+
for ( $i = 1; $i <= $numberWidgets; $i++ ) {
|
242 |
+
$wadsid = sanitize_title( str_replace( array('(', ')'), '', sprintf( $AdsWidName, $i ) ) );
|
243 |
+
$maxAds -= (is_active_widget( '', '', $wadsid )) ? 1 : 0;
|
244 |
+
}
|
245 |
+
}
|
246 |
+
|
247 |
+
return $maxAds;
|
248 |
+
}
|
249 |
+
|
250 |
+
|
251 |
+
/**
|
252 |
+
* Filter default ads
|
253 |
+
*
|
254 |
+
* @global array $quads_options global settings
|
255 |
+
* @global array $adsArrayCus List of ad id'S
|
256 |
+
* @param string $content
|
257 |
+
* @return string content
|
258 |
+
*/
|
259 |
+
function quads_filter_default_ads( $content ) {
|
260 |
+
global $quads_options, $adsArrayCus;
|
261 |
+
|
262 |
+
$off_default_ads = (strpos( $content, '<!--OffDef-->' ) !== false);
|
263 |
+
|
264 |
+
if( $off_default_ads ) { // If default ads are disabled
|
265 |
+
return $content;
|
266 |
+
}
|
267 |
+
|
268 |
+
// Default Ads
|
269 |
+
$adsArrayCus = array();
|
270 |
+
|
271 |
+
// placeholder string for random ad
|
272 |
+
$cusrnd = 'CusRnd';
|
273 |
+
|
274 |
+
// placeholder string for custom ad spots
|
275 |
+
$cusads = 'CusAds';
|
276 |
+
|
277 |
+
// Beginning of Post
|
278 |
+
$beginning_position_status = isset( $quads_options['pos1']['BegnAds'] ) ? true : false;
|
279 |
+
$beginning_position_ad_id = isset( $quads_options['pos1']['BegnRnd'] ) ? $quads_options['pos1']['BegnRnd'] : 0;
|
280 |
+
|
281 |
+
// Middle of Post
|
282 |
+
$middle_position_status = isset( $quads_options['pos2']['MiddAds'] ) ? true : false;
|
283 |
+
$middle_position_ad_id = isset( $quads_options['pos2']['MiddRnd'] ) ? $quads_options['pos2']['MiddRnd'] : 0;
|
284 |
+
|
285 |
+
// End of Post
|
286 |
+
$end_position_status = isset( $quads_options['pos3']['EndiAds'] ) ? true : false;
|
287 |
+
$end_position_ad_id = isset( $quads_options['pos3']['EndiRnd'] ) ? $quads_options['pos3']['EndiRnd'] : 0;
|
288 |
+
|
289 |
+
// After the more tag
|
290 |
+
$more_position_status = isset( $quads_options['pos4']['MoreAds'] ) ? true : false;
|
291 |
+
$more_position_ad_id = isset( $quads_options['pos4']['MoreRnd'] ) ? $quads_options['pos4']['MoreRnd'] : 0;
|
292 |
+
|
293 |
+
// Right before the last paragraph
|
294 |
+
$last_paragraph_position_status = isset( $quads_options['pos5']['LapaAds'] ) ? true : false;
|
295 |
+
$last_paragraph_position_ad_id = isset( $quads_options['pos5']['LapaRnd'] ) ? $quads_options['pos5']['LapaRnd'] : 0;
|
296 |
+
|
297 |
+
// After Paragraph option 1 - 3
|
298 |
+
$number = 3; // number of paragraph ads | default value 3.
|
299 |
+
$default = 5; // Position. Let's start with id 5
|
300 |
+
for ( $i = 1; $i <= $number; $i++ ) {
|
301 |
+
$key = $default + $i; // 6,7,8
|
302 |
+
|
303 |
+
$paragraph['status'][$i] = isset( $quads_options['pos' . $key]['Par' . $i . 'Ads'] ) ? $quads_options['pos' . $key]['Par' . $i . 'Ads'] : 0; // Status - active | inactive
|
304 |
+
$paragraph['id'][$i] = isset( $quads_options['pos' . $key]['Par' . $i . 'Rnd'] ) ? $quads_options['pos' . $key]['Par' . $i . 'Rnd'] : 0; // Ad id
|
305 |
+
$paragraph['position'][$i] = isset( $quads_options['pos' . $key]['Par' . $i . 'Nup'] ) ? $quads_options['pos' . $key]['Par' . $i . 'Nup'] : 0; // Paragraph No
|
306 |
+
$paragraph['end_post'][$i] = isset( $quads_options['pos' . $key]['Par' . $i . 'Con'] ) ? $quads_options['pos' . $key]['Par' . $i . 'Con'] : 0; // End of post - yes | no
|
307 |
+
}
|
308 |
+
// After Image ad
|
309 |
+
$imageActive = isset( $quads_options['pos9']['Img1Ads'] ) ? $quads_options['pos9']['Img1Ads'] : false;
|
310 |
+
$imageAdNo = isset( $quads_options['pos9']['Img1Rnd'] ) ? $quads_options['pos9']['Img1Rnd'] : false;
|
311 |
+
$imageNo = isset( $quads_options['pos9']['Img1Nup'] ) ? $quads_options['pos9']['Img1Nup'] : false;
|
312 |
+
$imageCaption = isset( $quads_options['pos9']['Img1Con'] ) ? $quads_options['pos9']['Img1Con'] : false;
|
313 |
+
|
314 |
+
|
315 |
+
if( $beginning_position_ad_id == 0 ) {
|
316 |
+
$b1 = $cusrnd;
|
317 |
+
} else {
|
318 |
+
$b1 = $cusads . $beginning_position_ad_id;
|
319 |
+
array_push( $adsArrayCus, $beginning_position_ad_id );
|
320 |
+
};
|
321 |
+
|
322 |
+
if( $more_position_ad_id == 0 ) {
|
323 |
+
$r1 = $cusrnd;
|
324 |
+
} else {
|
325 |
+
$r1 = $cusads . $more_position_ad_id;
|
326 |
+
array_push( $adsArrayCus, $more_position_ad_id );
|
327 |
+
};
|
328 |
+
|
329 |
+
if( $middle_position_ad_id == 0 ) {
|
330 |
+
$m1 = $cusrnd;
|
331 |
+
} else {
|
332 |
+
$m1 = $cusads . $middle_position_ad_id;
|
333 |
+
array_push( $adsArrayCus, $middle_position_ad_id );
|
334 |
+
};
|
335 |
+
if( $last_paragraph_position_ad_id == 0 ) {
|
336 |
+
$g1 = $cusrnd;
|
337 |
+
} else {
|
338 |
+
$g1 = $cusads . $last_paragraph_position_ad_id;
|
339 |
+
array_push( $adsArrayCus, $last_paragraph_position_ad_id );
|
340 |
+
};
|
341 |
+
if( $end_position_ad_id == 0 ) {
|
342 |
+
$b2 = $cusrnd;
|
343 |
+
} else {
|
344 |
+
$b2 = $cusads . $end_position_ad_id;
|
345 |
+
array_push( $adsArrayCus, $end_position_ad_id );
|
346 |
+
};
|
347 |
+
for ( $i = 1; $i <= $number; $i++ ) {
|
348 |
+
if( $paragraph['id'][$i] == 0 ) {
|
349 |
+
$paragraph[$i] = $cusrnd;
|
350 |
+
} else {
|
351 |
+
$paragraph[$i] = $cusads . $paragraph['id'][$i];
|
352 |
+
array_push( $adsArrayCus, $paragraph['id'][$i] );
|
353 |
+
};
|
354 |
+
}
|
355 |
+
//wp_die(print_r($adsArrayCus));
|
356 |
+
|
357 |
+
// Create the arguments for filter quads_filter_paragraphs
|
358 |
+
$quads_args = array(
|
359 |
+
'paragraph' => $paragraph,
|
360 |
+
'cusads' => $cusads,
|
361 |
+
'cusrnd' => $cusrnd,
|
362 |
+
'AdsIdCus' => $adsArrayCus,
|
363 |
+
);
|
364 |
+
|
365 |
+
// Execute filter to add more paragraph ad spots
|
366 |
+
$quads_filtered = apply_filters( 'quads_filter_paragraphs', $quads_args );
|
367 |
+
|
368 |
+
// The filtered arguments
|
369 |
+
$paragraph = $quads_filtered['paragraph'];
|
370 |
+
|
371 |
+
// filtered list of ad spots
|
372 |
+
$adsArrayCus = $quads_filtered['AdsIdCus'];
|
373 |
+
|
374 |
+
// Create paragraph ads
|
375 |
+
$number = 6;
|
376 |
+
//$number = 3;
|
377 |
+
for ( $i = $number; $i >= 1; $i-- ) {
|
378 |
+
if( !empty( $paragraph['status'][$i] ) ) {
|
379 |
+
$sch = "</p>";
|
380 |
+
$content = str_replace( "</P>", $sch, $content );
|
381 |
+
// paragraphs in content
|
382 |
+
$paragraphsArray = explode( $sch, $content );
|
383 |
+
if( ( int ) $paragraph['position'][$i] < count( $paragraphsArray ) ) {
|
384 |
+
$content = implode( $sch, array_slice( $paragraphsArray, 0, $paragraph['position'][$i] ) ) . $sch . '<!--' . $paragraph[$i] . '-->' . implode( $sch, array_slice( $paragraphsArray, $paragraph['position'][$i] ) );
|
385 |
+
} elseif( $paragraph['end_post'][$i] ) {
|
386 |
+
$content = implode( $sch, $paragraphsArray ) . '<!--' . $paragraph[$i] . '-->';
|
387 |
+
}
|
388 |
+
}
|
389 |
+
}
|
390 |
+
|
391 |
+
// Check if image ad is random one
|
392 |
+
if( $imageAdNo == 0 ) {
|
393 |
+
$imageAd = $cusrnd;
|
394 |
+
} else {
|
395 |
+
$imageAd = $cusads . $imageAdNo;
|
396 |
+
array_push( $adsArrayCus, $imageAdNo );
|
397 |
+
};
|
398 |
+
|
399 |
+
|
400 |
+
// Beginning of post ad
|
401 |
+
if( $beginning_position_status && strpos( $content, '<!--OffBegin-->' ) === false ) {
|
402 |
+
$content = '<!--' . $b1 . '-->' . $content;
|
403 |
+
}
|
404 |
+
|
405 |
+
// Check if ad is middle one
|
406 |
+
if( $middle_position_status && strpos( $content, '<!--OffMiddle-->' ) === false ) {
|
407 |
+
if( substr_count( strtolower( $content ), '</p>' ) >= 2 ) {
|
408 |
+
$sch = "</p>";
|
409 |
+
$content = str_replace( "</P>", $sch, $content );
|
410 |
+
$paragraphsArray = explode( $sch, $content );
|
411 |
+
$nn = 0;
|
412 |
+
$mm = strlen( $content ) / 2;
|
413 |
+
for ( $i = 0; $i < count( $paragraphsArray ); $i++ ) {
|
414 |
+
$nn += strlen( $paragraphsArray[$i] ) + 4;
|
415 |
+
if( $nn > $mm ) {
|
416 |
+
if( ($mm - ($nn - strlen( $paragraphsArray[$i] ))) > ($nn - $mm) && $i + 1 < count( $paragraphsArray ) ) {
|
417 |
+
$paragraphsArray[$i + 1] = '<!--' . $m1 . '-->' . $paragraphsArray[$i + 1];
|
418 |
+
} else {
|
419 |
+
$paragraphsArray[$i] = '<!--' . $m1 . '-->' . $paragraphsArray[$i];
|
420 |
+
}
|
421 |
+
break;
|
422 |
+
}
|
423 |
+
}
|
424 |
+
$content = implode( $sch, $paragraphsArray );
|
425 |
+
}
|
426 |
+
}
|
427 |
+
|
428 |
+
// End of Post ad
|
429 |
+
if( $end_position_status && strpos( $content, '<!--OffEnd-->' ) === false ) {
|
430 |
+
$content = $content . '<!--' . $b2 . '-->';
|
431 |
+
}
|
432 |
+
|
433 |
+
|
434 |
+
|
435 |
+
// Check if ad is after "More Tag"
|
436 |
+
if( $more_position_status && strpos( $content, '<!--OffAfMore-->' ) === false ) {
|
437 |
+
$mmr = '<!--' . $r1 . '-->';
|
438 |
+
$postid = get_the_ID();
|
439 |
+
$content = str_replace( '<span id="more-' . $postid . '"></span>', $mmr, $content );
|
440 |
+
}
|
441 |
+
|
442 |
+
// Right after last paragraph ad
|
443 |
+
if( $last_paragraph_position_status && strpos( $content, '<!--OffBfLastPara-->' ) === false ) {
|
444 |
+
$sch = "<p>";
|
445 |
+
$content = str_replace( "<P>", $sch, $content );
|
446 |
+
$paragraphsArray = explode( $sch, $content );
|
447 |
+
if( count( $paragraphsArray ) > 2 ) {
|
448 |
+
$content = implode( $sch, array_slice( $paragraphsArray, 0, count( $paragraphsArray ) - 1 ) ) . '<!--' . $g1 . '-->' . $sch . $paragraphsArray[count( $paragraphsArray ) - 1];
|
449 |
+
}
|
450 |
+
}
|
451 |
+
|
452 |
+
// After Image ad
|
453 |
+
if( $imageActive ) {
|
454 |
+
|
455 |
+
// Sanitation
|
456 |
+
$imgtag = "<img";
|
457 |
+
$delimiter = ">";
|
458 |
+
$caption = "[/caption]";
|
459 |
+
$atag = "</a>";
|
460 |
+
$content = str_replace( "<IMG", $imgtag, $content );
|
461 |
+
$content = str_replace( "</A>", $atag, $content );
|
462 |
+
|
463 |
+
// Get all images in content
|
464 |
+
$imagesArray = explode( $imgtag, $content );
|
465 |
+
// Modify Image ad
|
466 |
+
if( ( int ) $imageNo < count( $imagesArray ) ) {
|
467 |
+
//Get all tags
|
468 |
+
$tagsArray = explode( $delimiter, $imagesArray[$imageNo] );
|
469 |
+
if( count( $tagsArray ) > 1 ) {
|
470 |
+
$captionArray = explode( $caption, $imagesArray[$imageNo] );
|
471 |
+
$ccp = ( count( $captionArray ) > 1 ) ? strpos( strtolower( $captionArray[0] ), '[caption ' ) === false : false;
|
472 |
+
$imagesArrayAtag = explode( $atag, $imagesArray[$imageNo] );
|
473 |
+
$cdu = ( count( $imagesArrayAtag ) > 1 ) ? strpos( strtolower( $imagesArrayAtag[0] ), '<a href' ) === false : false;
|
474 |
+
// Show ad after caption
|
475 |
+
if( $imageCaption && $ccp ) {
|
476 |
+
$imagesArray[$imageNo] = implode( $caption, array_slice( $captionArray, 0, 1 ) ) . $caption . "\r\n" . '<!--' . $imageAd . '-->' . "\r\n" . implode( $caption, array_slice( $captionArray, 1 ) );
|
477 |
+
} else if( $cdu ) {
|
478 |
+
$imagesArray[$imageNo] = implode( $atag, array_slice( $imagesArrayAtag, 0, 1 ) ) . $atag . "\r\n" . '<!--' . $imageAd . '-->' . "\r\n" . implode( $atag, array_slice( $imagesArrayAtag, 1 ) );
|
479 |
+
} else {
|
480 |
+
$imagesArray[$imageNo] = implode( $delimiter, array_slice( $tagsArray, 0, 1 ) ) . $delimiter . "\r\n" . '<!--' . $imageAd . '-->' . "\r\n" . implode( $delimiter, array_slice( $tagsArray, 1 ) );
|
481 |
+
}
|
482 |
+
}
|
483 |
+
$content = implode( $imgtag, $imagesArray );
|
484 |
+
}
|
485 |
+
}
|
486 |
+
|
487 |
+
return $content;
|
488 |
+
}
|
489 |
+
/**
|
490 |
+
* Sanitize content and return it cleaned
|
491 |
+
*
|
492 |
+
* @param string $content
|
493 |
+
* @return string
|
494 |
+
*/
|
495 |
+
function quads_sanitize_content($content){
|
496 |
+
|
497 |
+
/* ... Tidy up content ... */
|
498 |
+
// Replace all <p></p> tags with placeholder ##QA-TP1##
|
499 |
+
$content = str_replace( "<p></p>", "##QA-TP1##", $content );
|
500 |
+
|
501 |
+
// Replace all <p> </p> tags with placeholder ##QA-TP2##
|
502 |
+
$content = str_replace( "<p> </p>", "##QA-TP2##", $content );
|
503 |
+
|
504 |
+
return $content;
|
505 |
+
}
|
506 |
+
|
507 |
+
|
508 |
+
|
509 |
+
/**
|
510 |
+
* Parse random ads which are created from quicktag <!--RndAds-->
|
511 |
+
*
|
512 |
+
* @global array $adsArray
|
513 |
+
* @global int $visibleContentAds
|
514 |
+
* @return content
|
515 |
+
*/
|
516 |
+
function quads_parse_random_quicktag_ads($content){
|
517 |
+
global $adsArray, $visibleContentAds, $quads_options;
|
518 |
+
|
519 |
+
$maxAds = isset($quads_options['maxads']) ? $quads_options['maxads'] : 10;
|
520 |
+
/*
|
521 |
+
* Replace RndAds Random Ads
|
522 |
+
*/
|
523 |
+
if( strpos( $content, '<!--RndAds-->' ) !== false && is_singular() ) {
|
524 |
+
$adsArrayTmp = array();
|
525 |
+
shuffle( $adsArray );
|
526 |
+
for ( $i = 1; $i <= $maxAds - $visibleContentAds; $i++ ) {
|
527 |
+
if( $i <= count( $adsArray ) ) {
|
528 |
+
array_push( $adsArrayTmp, $adsArray[$i - 1] );
|
529 |
+
}
|
530 |
+
}
|
531 |
+
$tcx = count( $adsArrayTmp );
|
532 |
+
$tcy = substr_count( $content, '<!--RndAds-->' );
|
533 |
+
for ( $i = $tcx; $i <= $tcy - 1; $i++ ) {
|
534 |
+
array_push( $adsArrayTmp, -1 );
|
535 |
+
}
|
536 |
+
shuffle( $adsArrayTmp );
|
537 |
+
for ( $i = 1; $i <= $tcy; $i++ ) {
|
538 |
+
$tmp = $adsArrayTmp[0];
|
539 |
+
$content = quads_replace_ads( $content, 'RndAds', $adsArrayTmp[0] );
|
540 |
+
$adsArrayTmp = quads_del_element( $adsArrayTmp, 0 );
|
541 |
+
if( $tmp != -1 ) {
|
542 |
+
$visibleContentAds += 1;
|
543 |
+
};
|
544 |
+
//quads_set_ad_count_content();
|
545 |
+
//if( quads_ad_reach_max_count() ) {
|
546 |
+
if( $visibleContentAds >= quads_get_max_allowed_post_ads( $content ) ) {
|
547 |
+
$content = quads_clean_tags( $content );
|
548 |
+
return $content;
|
549 |
+
}
|
550 |
+
}
|
551 |
+
}
|
552 |
+
|
553 |
+
return $content;
|
554 |
+
}
|
555 |
+
|
556 |
+
/**
|
557 |
+
* Parse random default ads which can be enabled from general settings
|
558 |
+
*
|
559 |
+
* @global array $adsArray
|
560 |
+
* @global int $visibleContentAds
|
561 |
+
* @return string
|
562 |
+
*/
|
563 |
+
function quads_parse_random_ads($content) {
|
564 |
+
global $adsRandom, $visibleContentAds;
|
565 |
+
|
566 |
+
$off_default_ads = (strpos( $content, '<!--OffDef-->' ) !== false);
|
567 |
+
if( $off_default_ads ) { // disabled default ads
|
568 |
+
return $content;
|
569 |
+
}
|
570 |
+
|
571 |
+
if( strpos( $content, '<!--CusRnd-->' ) !== false && is_singular() ) {
|
572 |
+
|
573 |
+
$tcx = count( $adsRandom );
|
574 |
+
// How often is a random ad appearing in content
|
575 |
+
$number_rand_ads = substr_count( $content, '<!--CusRnd-->' );
|
576 |
+
|
577 |
+
for ( $i = $tcx; $i <= $number_rand_ads - 1; $i++ ) {
|
578 |
+
array_push( $adsRandom, -1 );
|
579 |
+
}
|
580 |
+
shuffle( $adsRandom );
|
581 |
+
//wp_die(print_r($adsRandom));
|
582 |
+
//wp_die($adsRandom[0]);
|
583 |
+
for ( $i = 1; $i <= $number_rand_ads; $i++ ) {
|
584 |
+
$content = quads_replace_ads( $content, 'CusRnd', $adsRandom[0] );
|
585 |
+
$adsRandom = quads_del_element( $adsRandom, 0 );
|
586 |
+
$visibleContentAds += 1;
|
587 |
+
//quads_set_ad_count_content();
|
588 |
+
//if( quads_ad_reach_max_count() ) {
|
589 |
+
if( $visibleContentAds >= quads_get_max_allowed_post_ads( $content ) ) {
|
590 |
+
$content = quads_clean_tags( $content );
|
591 |
+
return $content;
|
592 |
+
}
|
593 |
+
}
|
594 |
+
}
|
595 |
+
|
596 |
+
return $content;
|
597 |
+
}
|
598 |
+
|
599 |
+
/**
|
600 |
+
* Parse Quicktags
|
601 |
+
*
|
602 |
+
* @global array $adsArray
|
603 |
+
* @param string $content
|
604 |
+
* @return string
|
605 |
+
*/
|
606 |
+
function quads_parse_quicktags($content){
|
607 |
+
global $adsArray, $visibleContentAds;
|
608 |
+
//print_r(count($adsArray));
|
609 |
+
|
610 |
+
$idx = 0;
|
611 |
+
for ( $i = 1; $i <= count( $adsArray ); $i++ ) {
|
612 |
+
if( strpos( $content, '<!--Ads' . $adsArray[$idx] . '-->' ) !== false ) {
|
613 |
+
$content = quads_replace_ads( $content, 'Ads' . $adsArray[$idx], $adsArray[$idx] );
|
614 |
+
//$adsArray = quads_del_element( $adsArray, $idx );
|
615 |
+
$visibleContentAds += 1;
|
616 |
+
$idx +=1;
|
617 |
+
//quads_set_ad_count_content();
|
618 |
+
if( $visibleContentAds >= quads_get_max_allowed_post_ads( $content ) ) {
|
619 |
+
$content = quads_clean_tags( $content );
|
620 |
+
return $content;
|
621 |
+
}
|
622 |
+
} else {
|
623 |
+
$idx += 1;
|
624 |
+
}
|
625 |
+
}
|
626 |
+
|
627 |
+
return $content;
|
628 |
+
}
|
629 |
+
|
630 |
+
/**
|
631 |
+
* Parse default ads Beginning/Middle/End/Paragraph Ads1-10
|
632 |
+
*
|
633 |
+
* @param string $content
|
634 |
+
* @return string
|
635 |
+
*/
|
636 |
+
function quads_parse_default_ads( $content ) {
|
637 |
+
global $adsArrayCus, $adsRandom, $adsArray, $visibleContentAds;
|
638 |
+
|
639 |
+
$off_default_ads = (strpos( $content, '<!--OffDef-->' ) !== false);
|
640 |
+
|
641 |
+
if( $off_default_ads ) { // disabled default ads
|
642 |
+
return $content;
|
643 |
+
}
|
644 |
+
// Create the array which contains the random ads
|
645 |
+
$adsRandom = $adsArray;
|
646 |
+
|
647 |
+
// echo '<pre>';
|
648 |
+
// echo 'adsArrayCus: ';
|
649 |
+
// print_r($adsArrayCus);
|
650 |
+
// echo 'adsArray: ';
|
651 |
+
// print_r( $adsArray );
|
652 |
+
// echo '</pre>';
|
653 |
+
|
654 |
+
for ( $i = 0; $i <= count( $adsArrayCus ); $i++ ) {
|
655 |
+
if( isset( $adsArrayCus[$i] ) && strpos( $content, '<!--CusAds' . $adsArrayCus[$i] . '-->' ) !== false && in_array( $adsArrayCus[$i], $adsArray ) ) {
|
656 |
+
$content = quads_replace_ads( $content, 'CusAds' . $adsArrayCus[$i], $adsArrayCus[$i] );
|
657 |
+
// Create array $adsRandom for quads_parse_random_ads() parsing functions to make sure that the random function
|
658 |
+
// is never using ads that are already used on static ad spots which are generated with quads_parse_default_ads()
|
659 |
+
if ($i == 0){
|
660 |
+
$adsRandom = quads_del_element($adsRandom, array_search($adsArrayCus[$i], $adsRandom));
|
661 |
+
}else{
|
662 |
+
$adsRandom = quads_del_element($adsRandom, array_search($adsArrayCus[$i-1], $adsRandom));
|
663 |
+
}
|
664 |
+
|
665 |
+
$visibleContentAds += 1;
|
666 |
+
//quads_set_ad_count_content();
|
667 |
+
//if( quads_ad_reach_max_count() || $visibleContentAds >= quads_get_max_allowed_post_ads( $content ) ) {
|
668 |
+
//wp_die(quads_get_max_allowed_post_ads( $content ));
|
669 |
+
if( $visibleContentAds >= quads_get_max_allowed_post_ads( $content ) ) {
|
670 |
+
$content = quads_clean_tags( $content );
|
671 |
+
}
|
672 |
+
}
|
673 |
+
}
|
674 |
+
return $content;
|
675 |
+
}
|
676 |
+
|
677 |
+
/**
|
678 |
+
* Replace ad code in content
|
679 |
+
*
|
680 |
+
* @global type $quads_options
|
681 |
+
* @param string $content
|
682 |
+
* @param string $quicktag Quicktag
|
683 |
+
* @param string $id id of the ad
|
684 |
+
* @return type
|
685 |
+
*/
|
686 |
+
function quads_replace_ads($content, $quicktag, $id) {
|
687 |
+
global $quads_options;
|
688 |
+
|
689 |
+
|
690 |
+
if( strpos($content,'<!--'.$quicktag.'-->')===false ) {
|
691 |
+
return $content;
|
692 |
+
}
|
693 |
+
|
694 |
+
|
695 |
+
if ($id != -1) {
|
696 |
+
|
697 |
+
$code = !empty($quads_options['ads']['ad' . $id ]['code']) ? $quads_options['ads']['ad' . $id ]['code'] : '';
|
698 |
+
$style = quads_get_inline_ad_style($id);
|
699 |
+
$adscode =
|
700 |
+
"\n".'<!-- WP QUADS Content Ad Plugin v. ' . QUADS_VERSION .' -->'."\n".
|
701 |
+
'<div class="quads-location quads-ad' .$id. '" id="quads-ad' .$id. '" style="'.$style.'">'."\n".
|
702 |
+
quads_render_ad('ad'.$id, $code)."\n".
|
703 |
+
'</div>'. "\n";
|
704 |
+
|
705 |
+
} else {
|
706 |
+
$adscode ='';
|
707 |
+
}
|
708 |
+
$cont = explode('<!--'.$quicktag.'-->', $content, 2);
|
709 |
+
|
710 |
+
return $cont[0].$adscode.$cont[1];
|
711 |
+
}
|
712 |
+
|
713 |
+
/**
|
714 |
+
* Get ad inline style
|
715 |
+
*
|
716 |
+
* @global arr $quads_options
|
717 |
+
* @param int $id id of the ad
|
718 |
+
* @return string
|
719 |
+
*/
|
720 |
+
function quads_get_inline_ad_style( $id ) {
|
721 |
+
global $quads_options;
|
722 |
+
|
723 |
+
if( empty($id) ) {
|
724 |
+
return '';
|
725 |
+
}
|
726 |
+
|
727 |
+
// Basic style
|
728 |
+
$styleArray = array(
|
729 |
+
'float:left;margin:%1$dpx %1$dpx %1$dpx 0;',
|
730 |
+
'float:none;margin:%1$dpx 0 %1$dpx 0;text-align:center;',
|
731 |
+
'float:right;margin:%1$dpx 0 %1$dpx %1$dpx;',
|
732 |
+
'float:none;margin:%1$dpx;');
|
733 |
+
|
734 |
+
// Alignment
|
735 |
+
$adsalign = ( int )$quads_options['ads']['ad' . $id]['align'];
|
736 |
+
|
737 |
+
// Margin
|
738 |
+
$adsmargin = isset( $quads_options['ads']['ad' . $id]['margin'] ) ? $quads_options['ads']['ad' . $id]['margin'] : '3'; // default option = 3
|
739 |
+
$margin = sprintf( $styleArray[$adsalign], $adsmargin );
|
740 |
+
|
741 |
+
//wp_die($quads_options['ads']['ad' . $id]['margin']);
|
742 |
+
//wp_die('ad'.$id);
|
743 |
+
|
744 |
+
// Do not create any inline style on AMP site
|
745 |
+
$style = !quads_is_amp_endpoint() ? apply_filters( 'quads_filter_margins', $margin, 'ad' . $id ) : '';
|
746 |
+
|
747 |
+
return $style;
|
748 |
+
}
|
749 |
+
|
750 |
+
/**
|
751 |
+
* Revert content to original content any remove any processing helper strings
|
752 |
+
*
|
753 |
+
* @global int $visibleContentAds
|
754 |
+
* @global array $adsArray
|
755 |
+
* @global array $quads_options
|
756 |
+
* @global int $ad_count
|
757 |
+
* @param string $content
|
758 |
+
* @param boolean $trimonly
|
759 |
+
*
|
760 |
+
* @return string content
|
761 |
+
*/
|
762 |
+
function quads_clean_tags($content, $trimonly = false) {
|
763 |
+
global $visibleContentAds;
|
764 |
+
global $adsArray;
|
765 |
+
global $quads_options;
|
766 |
+
global $ad_count;
|
767 |
+
|
768 |
+
$tagnames = array('EmptyClear','RndAds','NoAds','OffDef','OffAds','OffWidget','OffBegin','OffMiddle','OffEnd','OffBfMore','OffAfLastPara','CusRnd');
|
769 |
+
|
770 |
+
for($i=1;$i<=10;$i++) {
|
771 |
+
array_push($tagnames, 'CusAds'.$i);
|
772 |
+
array_push($tagnames, 'Ads'.$i);
|
773 |
+
};
|
774 |
+
|
775 |
+
|
776 |
+
foreach ($tagnames as $tags) {
|
777 |
+
if(strpos($content,'<!--'.$tags.'-->')!==false || $tags=='EmptyClear') {
|
778 |
+
if($trimonly) {
|
779 |
+
$content = str_replace('<p><!--'.$tags.'--></p>', '<!--'.$tags.'-->', $content);
|
780 |
+
}else{
|
781 |
+
$content = str_replace(array('<p><!--'.$tags.'--></p>','<!--'.$tags.'-->'), '', $content);
|
782 |
+
$content = str_replace("##QA-TP1##", "<p></p>", $content);
|
783 |
+
$content = str_replace("##QA-TP2##", "<p> </p>", $content);
|
784 |
+
}
|
785 |
+
}
|
786 |
+
}
|
787 |
+
if(!$trimonly && (is_single() || is_page()) ) {
|
788 |
+
$visibleContentAds = 0;
|
789 |
+
$adsArray = array();
|
790 |
+
}
|
791 |
+
return $content;
|
792 |
+
}
|
793 |
+
|
794 |
+
|
795 |
+
|
796 |
+
/**
|
797 |
+
* Remove element from array
|
798 |
+
*
|
799 |
+
* @param array $paragraphsArrayay
|
800 |
+
* @param int $idx key to remove from array
|
801 |
+
* @return array
|
802 |
+
*/
|
803 |
+
function quads_del_element($array, $idx) {
|
804 |
+
$copy = array();
|
805 |
+
for( $i=0; $i<count($array) ;$i++) {
|
806 |
+
if ( $idx != $i ) {
|
807 |
+
array_push($copy, $array[$i]);
|
808 |
+
}
|
809 |
+
}
|
810 |
+
return $copy;
|
811 |
}
|
includes/viIntegration.php
ADDED
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace wpquads;
|
4 |
+
|
5 |
+
/*
|
6 |
+
* vi integration for WP QUADS
|
7 |
+
* @author René Hermenau
|
8 |
+
* @email info@mashshare.net
|
9 |
+
*
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Main class for wp quads vi integration
|
14 |
+
* Description of viIntegration
|
15 |
+
*
|
16 |
+
* @author René Hermenau
|
17 |
+
*/
|
18 |
+
class vi {
|
19 |
+
|
20 |
+
/**
|
21 |
+
* vi API
|
22 |
+
* @var type
|
23 |
+
*/
|
24 |
+
public $api;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Debug mode
|
28 |
+
* @var bool
|
29 |
+
*/
|
30 |
+
private $debug = false;
|
31 |
+
|
32 |
+
public function __construct() {
|
33 |
+
$this->debug = true;
|
34 |
+
|
35 |
+
if ($this->debug) {
|
36 |
+
// Test endpoints
|
37 |
+
$this->urlSettings = 'https://dashboard-api-test.vidint.net/v1/api/widget/settings';
|
38 |
+
$this->urlDashboard = 'https://dashboard-test.vi.ai';
|
39 |
+
$this->urlSignup = 'https://dashboard-api-test.vidint.net/v1/api/signup';
|
40 |
+
$this->urlAuthenticate = 'https://dashboard-api-test.vidint.net/v1/api/authenticate';
|
41 |
+
$this->urlRevenue = 'https://dashboard-api-test.vidint.net/v1/api/publishers/report/revenue';
|
42 |
+
$this->urlJs = 'https://dashboard-api-test.vidint.net/v1/api/inventory/jstag';
|
43 |
+
} else {
|
44 |
+
// Production endpoints
|
45 |
+
$this->urlSettings = 'https://dashboard-api-test.vidint.net/v1/api/widget/settings';
|
46 |
+
$this->urlDashboard = 'https://dashboard-test.vi.ai';
|
47 |
+
$this->urlSignup = 'https://dashboard-api-test.vidint.net/v1/api/signup';
|
48 |
+
$this->urlAuthenticate = 'https://dashboard-api-test.vidint.net/v1/api/authenticate';
|
49 |
+
$this->urlRevenue = 'https://dashboard-api-test.vidint.net/v1/api/publishers/report/revenue';
|
50 |
+
$this->urlJs = 'https://dashboard-api-test.vidint.net/v1/api/inventory/jstag';
|
51 |
+
}
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Login to vi account
|
56 |
+
* @param string $email
|
57 |
+
* @param string $password
|
58 |
+
* @return string json
|
59 |
+
*/
|
60 |
+
public function login($email, $password) {
|
61 |
+
$response = wp_remote_get($this->urlAuthenticate);
|
62 |
+
if (is_array($response)) {
|
63 |
+
return $response['body'];
|
64 |
+
}
|
65 |
+
return '';
|
66 |
+
}
|
67 |
+
|
68 |
+
public function getApi() {
|
69 |
+
return $this->api;
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
*
|
74 |
+
* @return string
|
75 |
+
*/
|
76 |
+
public function getDashboard() {
|
77 |
+
$response = wp_remote_get($this->urlDashboard);
|
78 |
+
if (is_array($response)) {
|
79 |
+
return $response['body']; // use the content
|
80 |
+
}
|
81 |
+
return '';
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
*
|
86 |
+
* @return string
|
87 |
+
*/
|
88 |
+
public function getSettings() {
|
89 |
+
$response = wp_remote_get($this->urlSettings);
|
90 |
+
if (is_array($response)) {
|
91 |
+
return $response['body']; // use the content
|
92 |
+
}
|
93 |
+
return '';
|
94 |
+
}
|
95 |
+
|
96 |
+
}
|
quick-adsense-reloaded.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* Description: Insert Google AdSense or any Ads code into your website. A fork of Quick AdSense
|
7 |
* Author: Rene Hermenau, WP-Staging
|
8 |
* Author URI: https://wordpress.org/plugins/quick-adsense-reloaded/
|
9 |
-
* Version: 1.6.
|
10 |
* Text Domain: quick-adsense-reloaded
|
11 |
* Domain Path: languages
|
12 |
* Credits: WP QUADS - Quick AdSense Reloaded is a fork of Quick AdSense
|
@@ -35,7 +35,7 @@ if( !defined( 'ABSPATH' ) )
|
|
35 |
|
36 |
// Plugin version
|
37 |
if( !defined( 'QUADS_VERSION' ) ) {
|
38 |
-
define( 'QUADS_VERSION', '1.6.
|
39 |
}
|
40 |
|
41 |
// Plugin name
|
6 |
* Description: Insert Google AdSense or any Ads code into your website. A fork of Quick AdSense
|
7 |
* Author: Rene Hermenau, WP-Staging
|
8 |
* Author URI: https://wordpress.org/plugins/quick-adsense-reloaded/
|
9 |
+
* Version: 1.6.1
|
10 |
* Text Domain: quick-adsense-reloaded
|
11 |
* Domain Path: languages
|
12 |
* Credits: WP QUADS - Quick AdSense Reloaded is a fork of Quick AdSense
|
35 |
|
36 |
// Plugin version
|
37 |
if( !defined( 'QUADS_VERSION' ) ) {
|
38 |
+
define( 'QUADS_VERSION', '1.6.1' );
|
39 |
}
|
40 |
|
41 |
// Plugin name
|
readme.txt
CHANGED
@@ -1,199 +1,205 @@
|
|
1 |
-
=== AdSense Plugin WP QUADS ===
|
2 |
-
|
3 |
-
Author URL: https://profiles.wordpress.org/renehermi/
|
4 |
-
Plugin URL: https://wpquads.com
|
5 |
-
Contributors: ReneHermi, WP-Staging
|
6 |
-
Donate link: https://wpquads.com
|
7 |
-
License: GPLv2 or later
|
8 |
-
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
-
Tags: adsense, ads, ad, google adsense, advertising, amp, ad injection, ad inserter, ad manager
|
10 |
-
Requires at least: 3.6+
|
11 |
-
Tested up to: 4.8
|
12 |
-
Stable tag: 1.6.
|
13 |
-
|
14 |
-
Quick Adsense Reloaded! Quickest way to insert Google AdSense & other ads into your website. Google AdSense integration with Google AMP support
|
15 |
-
|
16 |
-
== Description ==
|
17 |
-
|
18 |
-
#### WPQUADS - Quick AdSense Reloaded
|
19 |
-
This free Google AdSense inserting plugin is an improvement of the successfull but discontinued plugin Quick AdSense which is used on more than 100.000 websites.
|
20 |
-
WP QUADS is coded well with no overhead and is used on huge websites with millions of monthly page impressions.
|
21 |
-
<br />
|
22 |
-
[See all features](https://wpquads.com/)
|
23 |
-
<br />
|
24 |
-
* AMP support! Add AMP ads automatically to your site (WP QUADS PRO needed)<br />
|
25 |
-
* Use mobile optimized and responsive AdSense ads<br />
|
26 |
-
* Disable AdSense ads on phone, tablet or desktop devices<br />
|
27 |
-
* Define AdSense sizes for different devices<br />
|
28 |
-
|
29 |
-
AMP feature requires [Automattic AMP plugin](http://wpquads.com/?utm_source=wp_org&utm_medium=plugin_page&utm_term=check_out_wp_quads&utm_campaign=wpquads) or any other AMP plugin installed <br />
|
30 |
-
Get WP QUADS PRO: [wpquads.com](http://wpquads.com/?utm_source=wp_org&utm_medium=plugin_page&utm_term=check_out_wp_quads&utm_campaign=wpquads) <br />
|
31 |
-
|
32 |
-
This AdSense plugin is rewritten from scratch with a solid code
|
33 |
-
base and will be maintained and updated to be compatible with all future WordPress versions<br />
|
34 |
-
Found a issue? Open a ticket in the [support forum](https://wordpress.org/support/plugin/quick-adsense-reloaded/ "support forum").
|
35 |
-
|
36 |
-
= Why a Quick AdSense fork? =
|
37 |
-
|
38 |
-
Quick Adsense is a great plugin and used by more than 100.000 websites.
|
39 |
-
Although is not under maintainance and development for more than 3 years by the original author it is still downloaded hundred times a day.
|
40 |
-
So i decided to continue the project to make sure the plugin will also work in future with new WordPress versions.
|
41 |
-
|
42 |
-
Deprecated functions removed, bugs fixed and new filters and hooks created to make this plugin extensible by third party developers!
|
43 |
-
|
44 |
-
<strong>We Guarantee: </strong><br>
|
45 |
-
No revenue sharing from your Google AdSense advertising income. We never show our ads on your website.<br>
|
46 |
-
We are an active and engaged member of the WordPress community and we are following strongly the WordPress Codex in terms of code quality and good behave.
|
47 |
-
|
48 |
-
= Main Features =
|
49 |
-
|
50 |
-
* Import all ads settings from Quick AdSense v. 1.9.2 and convert them into serialized options.
|
51 |
-
* Visibility conditions, show / hide ads based on post type and user roles (needs WP QUADS PRO)
|
52 |
-
* Quicktags of Quick Adsense are 100% compatible to Quick AdSense Reloaded
|
53 |
-
* No external script dependencies. All plugin code reside on your site.
|
54 |
-
* Dynamic AdSense positioning: Assign Google AdSense ads to the beginning, middle and end of post, assign ads after 'more' tag, before last paragraph, after certain paragraphs & assign Ads after certain images.
|
55 |
-
* Insert Google AdSense ads specifically or randomly anywhere within a post.
|
56 |
-
* Support any Ads code, not limited to Google Adsense ads only.
|
57 |
-
* Display up to a maximum of 10 Ads on a page. Google TOS allows publishers to place up to 3 Google Adsense for Content on a page. If you are using other ads, you may display up to 10 Ads.
|
58 |
-
* Support up to a maximum of 10 Ads codes on Sidebar Widgets.
|
59 |
-
* Support up to a maximum of 10 Ads codes for specific placement & randomization within a post.
|
60 |
-
* Insert Google AdSense ads on-the-fly, insert <!--Ads1-->, <!--Ads2--> ... , <!--RndAds--> to a post to accomplish this.
|
61 |
-
* Disable Ads on-the-fly, insert <!--NoAds-->, <!--OffDef-->, <!--OffWidget-->, <!--OffBegin--> ... and more to a post to accomplish this.
|
62 |
-
* The above quicktags can be inserted into a post easily via the additional Quicktag Buttons added to the HTML Edit Post SubPanel.
|
63 |
-
* Use shortcodes within ads (Suppport advertisements from other ad plugins for example Simple Ads Manager or AdRotate)
|
64 |
-
|
65 |
-
= Improvements to original Quick AdSense Ads plugin =
|
66 |
-
|
67 |
-
* Performance improvements
|
68 |
-
* Serialized storing of Ad options instead storing every single option as separate table entry all over
|
69 |
-
* Multi language support
|
70 |
-
* Remove of small coding issues like "unexpected output" message when plugin is activated on several sites
|
71 |
-
* Import / Export function makes plugin migrating to other sites easier. Copy your ads code to other sites.
|
72 |
-
|
73 |
-
= Safety improvements =
|
74 |
-
|
75 |
-
* Exit code if Quick AdSense plugin is not called by WordPress directly
|
76 |
-
* Better sanitizing of user input
|
77 |
-
|
78 |
-
= We Distance Ourself From =
|
79 |
-
These are known AdSense plugins which are removed from the WordPress repository because of non ethic behavior:
|
80 |
-
|
81 |
-
* AdSense Extreme
|
82 |
-
* AdSense Insert
|
83 |
-
|
84 |
-
Make sure to switch to WP QUADS or any other AdSense plugin if you are still using these plugins!
|
85 |
-
|
86 |
-
<h3>WP QUADS PRO:</h3>
|
87 |
-
|
88 |
-
* Support for responsive Google AdSense ads
|
89 |
-
* GUI improvements
|
90 |
-
|
91 |
-
Check out WP QUADS PRO: [wpquads.com](http://wpquads.com/?utm_source=wp_org&utm_medium=plugin_page&utm_term=check_out_wp_quads&utm_campaign=wpquads) <br />
|
92 |
-
|
93 |
-
Do you have suggestions for more features?
|
94 |
-
|
95 |
-
= High Performance =
|
96 |
-
|
97 |
-
Quick AdSense Reloaded is *coded well and developed for high performance*.
|
98 |
-
It loads only the code it needs at the moment of execution, making it small and fast and with a lot of hooks easy extensible by third party developers.
|
99 |
-
|
100 |
-
** GitHub **
|
101 |
-
Follow the development and improve the plugin.
|
102 |
-
You find it on [GitHub](https://github.com/rene-hermenau/quick-adsense-reloaded/)
|
103 |
-
|
104 |
-
|
105 |
-
== Frequently Asked Questions ==
|
106 |
-
|
107 |
-
Post your question in the [support forum](https://wordpress.org/support/plugin/quick-adsense-reloaded)
|
108 |
-
|
109 |
-
== Installation ==
|
110 |
-
|
111 |
-
Recommended Installation:
|
112 |
-
|
113 |
-
1. Go to YourWebsite->Plugins->Add New
|
114 |
-
2. Search for "Quick Adsense reloaded" or "WP QUADS"
|
115 |
-
3. Click "install Now"
|
116 |
-
|
117 |
-
Alternative Installation:
|
118 |
-
|
119 |
-
1. [Download the plugin](https://downloads.wordpress.org/plugin/quick-adsense-reloaded.latest-stable.zip) , unzip and place it in your wp-content/plugins/ folder.
|
120 |
-
2. Activate the plugin through the 'Plugins' menu in WordPress.
|
121 |
-
|
122 |
-
== Screenshots ==
|
123 |
-
|
124 |
-
1. The Quick AdSense Settings page
|
125 |
-
2. General Settings
|
126 |
-
3. AdSense Widgets
|
127 |
-
4. AdSense Options from the post editor
|
128 |
-
|
129 |
-
|
130 |
-
== Changelog ==
|
131 |
-
|
132 |
-
= 1.6.
|
133 |
-
* Fix:
|
134 |
-
*
|
135 |
-
* New:
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
*
|
142 |
-
|
143 |
-
|
144 |
-
*
|
145 |
-
|
146 |
-
|
147 |
-
*
|
148 |
-
|
149 |
-
|
150 |
-
*
|
151 |
-
*
|
152 |
-
* Fix:
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
* Fix:
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
*
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
*
|
166 |
-
*
|
167 |
-
*
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
*
|
173 |
-
* Fix:
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
*
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
*
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
*
|
192 |
-
* Tweak:
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== AdSense Plugin WP QUADS ===
|
2 |
+
|
3 |
+
Author URL: https://profiles.wordpress.org/renehermi/
|
4 |
+
Plugin URL: https://wpquads.com
|
5 |
+
Contributors: ReneHermi, WP-Staging
|
6 |
+
Donate link: https://wpquads.com
|
7 |
+
License: GPLv2 or later
|
8 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
+
Tags: adsense, ads, ad, google adsense, advertising, amp, ad injection, ad inserter, ad manager
|
10 |
+
Requires at least: 3.6+
|
11 |
+
Tested up to: 4.8
|
12 |
+
Stable tag: 1.6.1
|
13 |
+
|
14 |
+
Quick Adsense Reloaded! Quickest way to insert Google AdSense & other ads into your website. Google AdSense integration with Google AMP support
|
15 |
+
|
16 |
+
== Description ==
|
17 |
+
|
18 |
+
#### WPQUADS - Quick AdSense Reloaded
|
19 |
+
This free Google AdSense inserting plugin is an improvement of the successfull but discontinued plugin Quick AdSense which is used on more than 100.000 websites.
|
20 |
+
WP QUADS is coded well with no overhead and is used on huge websites with millions of monthly page impressions.
|
21 |
+
<br />
|
22 |
+
[See all features](https://wpquads.com/)
|
23 |
+
<br />
|
24 |
+
* AMP support! Add AMP ads automatically to your site (WP QUADS PRO needed)<br />
|
25 |
+
* Use mobile optimized and responsive AdSense ads<br />
|
26 |
+
* Disable AdSense ads on phone, tablet or desktop devices<br />
|
27 |
+
* Define AdSense sizes for different devices<br />
|
28 |
+
|
29 |
+
AMP feature requires [Automattic AMP plugin](http://wpquads.com/?utm_source=wp_org&utm_medium=plugin_page&utm_term=check_out_wp_quads&utm_campaign=wpquads) or any other AMP plugin installed <br />
|
30 |
+
Get WP QUADS PRO: [wpquads.com](http://wpquads.com/?utm_source=wp_org&utm_medium=plugin_page&utm_term=check_out_wp_quads&utm_campaign=wpquads) <br />
|
31 |
+
|
32 |
+
This AdSense plugin is rewritten from scratch with a solid code
|
33 |
+
base and will be maintained and updated to be compatible with all future WordPress versions<br />
|
34 |
+
Found a issue? Open a ticket in the [support forum](https://wordpress.org/support/plugin/quick-adsense-reloaded/ "support forum").
|
35 |
+
|
36 |
+
= Why a Quick AdSense fork? =
|
37 |
+
|
38 |
+
Quick Adsense is a great plugin and used by more than 100.000 websites.
|
39 |
+
Although is not under maintainance and development for more than 3 years by the original author it is still downloaded hundred times a day.
|
40 |
+
So i decided to continue the project to make sure the plugin will also work in future with new WordPress versions.
|
41 |
+
|
42 |
+
Deprecated functions removed, bugs fixed and new filters and hooks created to make this plugin extensible by third party developers!
|
43 |
+
|
44 |
+
<strong>We Guarantee: </strong><br>
|
45 |
+
No revenue sharing from your Google AdSense advertising income. We never show our ads on your website.<br>
|
46 |
+
We are an active and engaged member of the WordPress community and we are following strongly the WordPress Codex in terms of code quality and good behave.
|
47 |
+
|
48 |
+
= Main Features =
|
49 |
+
|
50 |
+
* Import all ads settings from Quick AdSense v. 1.9.2 and convert them into serialized options.
|
51 |
+
* Visibility conditions, show / hide ads based on post type and user roles (needs WP QUADS PRO)
|
52 |
+
* Quicktags of Quick Adsense are 100% compatible to Quick AdSense Reloaded
|
53 |
+
* No external script dependencies. All plugin code reside on your site.
|
54 |
+
* Dynamic AdSense positioning: Assign Google AdSense ads to the beginning, middle and end of post, assign ads after 'more' tag, before last paragraph, after certain paragraphs & assign Ads after certain images.
|
55 |
+
* Insert Google AdSense ads specifically or randomly anywhere within a post.
|
56 |
+
* Support any Ads code, not limited to Google Adsense ads only.
|
57 |
+
* Display up to a maximum of 10 Ads on a page. Google TOS allows publishers to place up to 3 Google Adsense for Content on a page. If you are using other ads, you may display up to 10 Ads.
|
58 |
+
* Support up to a maximum of 10 Ads codes on Sidebar Widgets.
|
59 |
+
* Support up to a maximum of 10 Ads codes for specific placement & randomization within a post.
|
60 |
+
* Insert Google AdSense ads on-the-fly, insert <!--Ads1-->, <!--Ads2--> ... , <!--RndAds--> to a post to accomplish this.
|
61 |
+
* Disable Ads on-the-fly, insert <!--NoAds-->, <!--OffDef-->, <!--OffWidget-->, <!--OffBegin--> ... and more to a post to accomplish this.
|
62 |
+
* The above quicktags can be inserted into a post easily via the additional Quicktag Buttons added to the HTML Edit Post SubPanel.
|
63 |
+
* Use shortcodes within ads (Suppport advertisements from other ad plugins for example Simple Ads Manager or AdRotate)
|
64 |
+
|
65 |
+
= Improvements to original Quick AdSense Ads plugin =
|
66 |
+
|
67 |
+
* Performance improvements
|
68 |
+
* Serialized storing of Ad options instead storing every single option as separate table entry all over
|
69 |
+
* Multi language support
|
70 |
+
* Remove of small coding issues like "unexpected output" message when plugin is activated on several sites
|
71 |
+
* Import / Export function makes plugin migrating to other sites easier. Copy your ads code to other sites.
|
72 |
+
|
73 |
+
= Safety improvements =
|
74 |
+
|
75 |
+
* Exit code if Quick AdSense plugin is not called by WordPress directly
|
76 |
+
* Better sanitizing of user input
|
77 |
+
|
78 |
+
= We Distance Ourself From =
|
79 |
+
These are known AdSense plugins which are removed from the WordPress repository because of non ethic behavior:
|
80 |
+
|
81 |
+
* AdSense Extreme
|
82 |
+
* AdSense Insert
|
83 |
+
|
84 |
+
Make sure to switch to WP QUADS or any other AdSense plugin if you are still using these plugins!
|
85 |
+
|
86 |
+
<h3>WP QUADS PRO:</h3>
|
87 |
+
|
88 |
+
* Support for responsive Google AdSense ads
|
89 |
+
* GUI improvements
|
90 |
+
|
91 |
+
Check out WP QUADS PRO: [wpquads.com](http://wpquads.com/?utm_source=wp_org&utm_medium=plugin_page&utm_term=check_out_wp_quads&utm_campaign=wpquads) <br />
|
92 |
+
|
93 |
+
Do you have suggestions for more features?
|
94 |
+
|
95 |
+
= High Performance =
|
96 |
+
|
97 |
+
Quick AdSense Reloaded is *coded well and developed for high performance*.
|
98 |
+
It loads only the code it needs at the moment of execution, making it small and fast and with a lot of hooks easy extensible by third party developers.
|
99 |
+
|
100 |
+
** GitHub **
|
101 |
+
Follow the development and improve the plugin.
|
102 |
+
You find it on [GitHub](https://github.com/rene-hermenau/quick-adsense-reloaded/)
|
103 |
+
|
104 |
+
|
105 |
+
== Frequently Asked Questions ==
|
106 |
+
|
107 |
+
Post your question in the [support forum](https://wordpress.org/support/plugin/quick-adsense-reloaded)
|
108 |
+
|
109 |
+
== Installation ==
|
110 |
+
|
111 |
+
Recommended Installation:
|
112 |
+
|
113 |
+
1. Go to YourWebsite->Plugins->Add New
|
114 |
+
2. Search for "Quick Adsense reloaded" or "WP QUADS"
|
115 |
+
3. Click "install Now"
|
116 |
+
|
117 |
+
Alternative Installation:
|
118 |
+
|
119 |
+
1. [Download the plugin](https://downloads.wordpress.org/plugin/quick-adsense-reloaded.latest-stable.zip) , unzip and place it in your wp-content/plugins/ folder.
|
120 |
+
2. Activate the plugin through the 'Plugins' menu in WordPress.
|
121 |
+
|
122 |
+
== Screenshots ==
|
123 |
+
|
124 |
+
1. The Quick AdSense Settings page
|
125 |
+
2. General Settings
|
126 |
+
3. AdSense Widgets
|
127 |
+
4. AdSense Options from the post editor
|
128 |
+
|
129 |
+
|
130 |
+
== Changelog ==
|
131 |
+
|
132 |
+
= 1.6.1 =
|
133 |
+
* Fix: Never show ads on ajax generated pages
|
134 |
+
* New: Filter to ignore display conditions for short code generated ads
|
135 |
+
* New: Announcement for the integration of the video SSP vi.ai
|
136 |
+
* New: Add filter 'quads_show_ads' to overwrite the default ad visibility conditions
|
137 |
+
|
138 |
+
= 1.6.0 =
|
139 |
+
* Fix: Remove empty div after adsense ads
|
140 |
+
* Fix: Margin and alignment option not working for widget ads
|
141 |
+
* New: Add id on select elements
|
142 |
+
|
143 |
+
= 1.5.8 / 1.5.9=
|
144 |
+
* Fix: Not more than 10 adsense ads at the same time possible
|
145 |
+
|
146 |
+
= 1.5.7 =
|
147 |
+
* Tweak: Remove external empty quads.css file
|
148 |
+
* Tweak: Better wordings for ad blocker notice
|
149 |
+
* Tweak: Make code more robust
|
150 |
+
* Tweak: Simpler notice for renewing license keys
|
151 |
+
* Tweak: Change admin bar warning color from red to a more suitable orange
|
152 |
+
* Fix: Remove jQuery frontpage check
|
153 |
+
* Fix: Rating notice not hiding
|
154 |
+
|
155 |
+
= 1.5.6 =
|
156 |
+
* Fix: License tab not shown after update of WP QUADS to version 1.5.5 and WP QUADS PRO is lower than version 1.3.3
|
157 |
+
* Fix: Quicktags button in editor not shown
|
158 |
+
* Fix: Margin option not working when ad layout floating option is default
|
159 |
+
|
160 |
+
= 1.5.5 =
|
161 |
+
* Fix: No ad position visible after new installation
|
162 |
+
* Fix: Show Add new Ad button only when wp quads pro is installed
|
163 |
+
|
164 |
+
= 1.5.4 =
|
165 |
+
* Fix: Hide widget on homepage option not working
|
166 |
+
* Tweak: Change default value of ad limitation to unlimited ads
|
167 |
+
* Tweak: Clean up code
|
168 |
+
|
169 |
+
= 1.5.3 =
|
170 |
+
* New: Unlimited amount of ads can be used with WP QUADS PRO
|
171 |
+
* Tweak: Move debug setting to tab plugin settings
|
172 |
+
* Fix: Security Update! If you are using WP QUADS Pro you need to update WP QUADS Pro to version 1.3.6.
|
173 |
+
* Fix: If page or post is used as frontpage the home page condition is ignored
|
174 |
+
* Fix: Better sanitization - remove all whitespaces in settings
|
175 |
+
* Fix: Ads are not shown on tablet device if mobile device visibility is disabled
|
176 |
+
|
177 |
+
= 1.5.2 =
|
178 |
+
* Tweak: Make sure that for AdSense ads only the AdSense ad option is used and not the plain text one
|
179 |
+
* Fix: Spelling issue
|
180 |
+
|
181 |
+
= 1.5.1 =
|
182 |
+
* Tweak: Change description in readme.txt
|
183 |
+
* Fix: Show only active and not empty widgets in widget admin section of wordpress
|
184 |
+
|
185 |
+
= 1.5.0 =
|
186 |
+
* Fix: PHP7 compatibility fixes
|
187 |
+
* Fix: Check if element wpquads-adblock-notice exists before accessing it
|
188 |
+
* Fix: Remove deprecated functions
|
189 |
+
|
190 |
+
= 1.4.9 =
|
191 |
+
* Fix: Adblock plugin is breaking wp quads admin settings. Create a admin notice to deactivate ad blocker browser extension
|
192 |
+
* Tweak: Remove 'Get WP QUADS Pro' button if wp quads pro is already installed
|
193 |
+
|
194 |
+
= 1.4.8 =
|
195 |
+
* New: Ability to rename adsense ads to better identify them
|
196 |
+
* New: Allow unlimited number of adsense ads on a single page
|
197 |
+
* New: Tested up to WP 4.7.3
|
198 |
+
* Tweak: Rename adsense widgets
|
199 |
+
|
200 |
+
Complete changelog: https://wpquads.com/changelog
|
201 |
+
|
202 |
+
== Upgrade Notice ==
|
203 |
+
|
204 |
+
= 1.6.1 =
|
205 |
+
1.6.1 A few improvements and fixes - WP QUADS<a href="https://wordpress.org/plugins/quick-adsense-reloaded/changelog/" style="color:white;text-decoration: underline;">Complete changelog! </a>
|