WP Meta SEO - Version 3.4.0

Version Description

  • Add : Simple Analytics tracking only based on UA or JS snippet
  • Add : Add image indexation system for large websites (image bulk editor)
  • Add : Apply material design over all plugin views
  • Add : Image information: Filter only images that require optimization
  • Fix : Conflict with WP Latest Posts plugin
Download this release

Release Info

Developer JoomUnited
Plugin Icon 128x128 WP Meta SEO
Version 3.4.0
Comparing to
See all releases

Code changes from version 3.3.1 to 3.4.0

Files changed (38) hide show
  1. css/dashboard.css +112 -0
  2. css/google-analytics/admin-widgets.css +0 -4
  3. css/google-analytics/wpms-tracking-code.css +3 -3
  4. css/materialize/materialize.css +297 -0
  5. css/materialize/materialize_frontend_tab_theme.css +5 -0
  6. css/metaseo_admin.css +55 -37
  7. css/metaseo_sitemap.css +4 -31
  8. css/notification.css +13 -9
  9. css/style.css +21 -3
  10. inc/class.image-helper.php +10 -6
  11. inc/class.metaseo-admin.php +115 -23
  12. inc/class.metaseo-broken-link-table.php +8 -8
  13. inc/class.metaseo-content-list-table.php +2 -2
  14. inc/class.metaseo-front_end.php +46 -14
  15. inc/class.metaseo-image-list-table.php +280 -12
  16. inc/class.metaseo-link-list-table.php +3 -4
  17. inc/class.metaseo-sitemap.php +40 -15
  18. inc/google_analytics/tracking/classic_disconnect.php +16 -0
  19. inc/google_analytics/tracking/custom.php +12 -0
  20. inc/google_analytics/tracking/universal_disconnect.php +13 -0
  21. inc/pages/dashboard.php +124 -115
  22. inc/pages/google-analytics/menu.php +22 -4
  23. inc/pages/google-analytics/metaseo-form-clientID.php +5 -2
  24. inc/pages/google-analytics/metaseo-google-analytics-trackcode.php +38 -34
  25. inc/pages/google-analytics/metaseo-google-analytics.php +35 -13
  26. inc/pages/settings.php +22 -27
  27. inc/pages/sitemaps/metaseo-google-sitemap.php +1 -1
  28. inc/pages/sitemaps/metaseo-source_menu.php +4 -2
  29. inc/pages/sitemaps/metaseo-source_pages.php +17 -6
  30. inc/pages/sitemaps/metaseo-source_posts.php +41 -13
  31. js/dashboard.js +58 -99
  32. js/google-analytics/google_analytics.js +0 -8
  33. js/metaseo_admin.js +61 -7
  34. js/metaseo_sitemap.js +2 -1
  35. js/wp-metaseo-metabox.js +28 -0
  36. languages/wp-meta-seo-en_US.mo +0 -0
  37. readme.txt +15 -3
  38. wp-meta-seo.php +2 -2
css/dashboard.css CHANGED
@@ -65,4 +65,116 @@
65
}
66
#alexa-ranking .img-inline {
67
margin-bottom: 10px;
68
}
65
}
66
#alexa-ranking .img-inline {
67
margin-bottom: 10px;
68
+ }
69
+
70
+ .dashboard .panel-body {
71
+ padding: 27px;
72
+ }
73
+
74
+ .dashboard .percent_1{
75
+ font-size: 25px !important;
76
+ margin-right: 10px !important;
77
+ }
78
+
79
+ .wpms_dash_widgets{
80
+ width: 48%;
81
+ float: left;
82
+ margin: 0 1%;
83
+ }
84
+
85
+ .wpms_dashboard_widgets_left{
86
+ width: 50%;
87
+ float: left;
88
+ }
89
+
90
+ .wpms_dashboard_widgets_right{
91
+ width: 47%;
92
+ float: left;
93
+ height: 70px;
94
+ }
95
+
96
+ .wpms_dashboard_widgets_left{
97
+ height: 70px;
98
+ position: relative;
99
+ }
100
+ /*progress*/
101
+ .dashboard .progress-rating {
102
+ position: relative;
103
+ height: 8px;
104
+ display: block;
105
+ width: 100%;
106
+ border-radius: 2px;
107
+ margin: 32px 0px;
108
+ overflow: hidden;
109
+ background-color: rgba(255, 255, 255, 0.33);
110
+ float: left;
111
+ }
112
+
113
+ .dashboard .progress-rating .determinate {
114
+ position: absolute;
115
+ background-color: inherit;
116
+ top: 0;
117
+ left: 0;
118
+ bottom: 0;
119
+ background-color: #fff;
120
+ -webkit-transition: width 0.3s linear;
121
+ -moz-transition: width 0.3s linear;
122
+ -o-transition: width 0.3s linear;
123
+ -ms-transition: width 0.3s linear;
124
+ transition: width 0.3s linear;
125
+ }
126
+
127
+ .dashboard .progress {
128
+ position: relative;
129
+ height: 5px;
130
+ display: block;
131
+ width: 100%;
132
+ background-color: #fff;
133
+ border-radius: 2px;
134
+ margin: 0.5rem 0 1rem 0;
135
+ overflow: hidden;
136
+ }
137
+
138
+ .dashboard .dashboard-title {
139
+ color: #fff !important;
140
+ }
141
+
142
+ .dashboard p.dashboard-title {
143
+ font-size: 10px !important;
144
+ }
145
+
146
+ .dashboard .dashboard-card {
147
+ background: #00AFF5;
148
+ }
149
+
150
+ .dashboard h4 {
151
+ font-weight: normal !important;
152
+ }
153
+
154
+ .dashboard .panel {
155
+ height: 70px !important;
156
+ box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
157
+ }
158
+
159
+ .dashboard .wpms_dashboard_widgets_left .percent_1{
160
+ margin: 12px 0px 10px 0px !important;
161
+ }
162
+
163
+ .dashboard .wpms_dashboard_widgets_left .percent_2{
164
+ font-size: 10px;
165
+ }
166
+
167
+ .wpms-widgets-qtip {
168
+ border: 1px solid #707070 !important;
169
+ color: #fff !important;
170
+ background-color: #707070 !important;
171
+ z-index: 10000 !important;
172
+ border-radius: 2px !important;
173
+ line-height: 100% !important;
174
+ font-size: 12px !important;
175
+ line-height: 18px !important;
176
+ }
177
+
178
+ .wpms-widgets-qtip .qtip-tip{
179
+ opacity: 0 !important;
180
}
css/google-analytics/admin-widgets.css CHANGED
@@ -284,10 +284,6 @@
284
display: none !important;
285
}
286
287
- .nav-tab-wrapper{
288
- display: block !important;
289
- }
290
-
291
.metaseo-qtip {
292
font-size: 14px !important;
293
line-height: 18px !important;
284
display: none !important;
285
}
286
287
.metaseo-qtip {
288
font-size: 14px !important;
289
line-height: 18px !important;
css/google-analytics/wpms-tracking-code.css CHANGED
@@ -68,7 +68,7 @@ td.wpmsga-settings-roles {
68
margin: 20px 0 15px 0;
69
}
70
71
- #poststuff.wpmsga h2.nav-tab-wrapper {
72
border-bottom: 1px solid #ccc;
73
padding-bottom: 0;
74
}
@@ -201,6 +201,6 @@ input.wpmsga-settings-switchoo-checkbox {
201
display: none !important;
202
}
203
204
- .nav-tab-wrapper{
205
- display: block !important;
206
}
68
margin: 20px 0 15px 0;
69
}
70
71
+ #poststuff.wpmsga h2.wpms-nav-tab-wrapper {
72
border-bottom: 1px solid #ccc;
73
padding-bottom: 0;
74
}
201
display: none !important;
202
}
203
204
+ .wpms_label_100{
205
+ font-weight: inherit !important;
206
}
css/materialize/materialize.css CHANGED
@@ -104,4 +104,301 @@
104
.collapsible-body {
105
box-sizing: border-box;
106
padding: 2rem;
107
}
104
.collapsible-body {
105
box-sizing: border-box;
106
padding: 2rem;
107
+ }
108
+
109
+ /*button switch*/
110
+ .switch {
111
+ position: relative;
112
+ display: inline-block;
113
+ width: 52px;
114
+ height: 26px;
115
+ }
116
+
117
+ .switch-optimization{
118
+ float: left;
119
+ margin-right: 5px;
120
+ }
121
+
122
+ .switch input {display:none;}
123
+
124
+ .slider {
125
+ position: absolute;
126
+ cursor: pointer;
127
+ top: 0;
128
+ left: 0;
129
+ right: 0;
130
+ bottom: 0;
131
+ background-color: #ccc;
132
+ -webkit-transition: .4s;
133
+ transition: .4s;
134
+ }
135
+
136
+ .slider:before {
137
+ position: absolute;
138
+ content: "";
139
+ height: 18px;
140
+ width: 18px;
141
+ left: 4px;
142
+ bottom: 4px;
143
+ background-color: white;
144
+ -webkit-transition: .4s;
145
+ transition: .4s;
146
+ }
147
+
148
+ input:checked + .slider {
149
+ background-color: #2196F3;
150
+ }
151
+
152
+ input:focus + .slider {
153
+ box-shadow: 0 0 1px #00CC00;
154
+ }
155
+
156
+ input:checked + .slider:before {
157
+ -webkit-transform: translateX(26px);
158
+ -ms-transform: translateX(26px);
159
+ transform: translateX(26px);
160
+ }
161
+
162
+ /* Rounded sliders */
163
+ .slider.round {
164
+ border-radius: 34px;
165
+ }
166
+
167
+ .slider.round:before {
168
+ border-radius: 50%;
169
+ }
170
+
171
+ /* radio */
172
+ .radio {
173
+ display: inline-block;
174
+ padding-right: 20px;
175
+ font-size: 15px;
176
+ line-height: 40px;
177
+ cursor: pointer;
178
+ width: 100%;
179
+ }
180
+
181
+ .radio:hover .inner {
182
+ -webkit-transform: scale(0.5);
183
+ -ms-transform: scale(0.5);
184
+ transform: scale(0.5);
185
+ opacity: .5;
186
+ }
187
+
188
+ .radio input {
189
+ width: 1px;
190
+ height: 1px;
191
+ opacity: 0;
192
+ }
193
+
194
+ .radio input:checked + .outer .inner {
195
+ -webkit-transform: scale(1);
196
+ -ms-transform: scale(1);
197
+ transform: scale(1);
198
+ opacity: 1;
199
+ }
200
+
201
+ .radio input:checked + .outer { border: 3px solid #2196F3; }
202
+
203
+ .radio input:focus + .outer .inner {
204
+ -webkit-transform: scale(1);
205
+ -ms-transform: scale(1);
206
+ transform: scale(1);
207
+ opacity: 1;
208
+ background-color: #2196F3;
209
+ }
210
+
211
+ .radio .outer {
212
+ width: 16px;
213
+ height: 16px;
214
+ display: block;
215
+ float: left;
216
+ margin: 10px 0px 10px 10px;
217
+ border: 3px solid #ccc;
218
+ border-radius: 50%;
219
+ background-color: #fff;
220
+ }
221
+
222
+ .radio .inner {
223
+ -webkit-transition: all 0.25s ease-in-out;
224
+ transition: all 0.25s ease-in-out;
225
+ width: 12px;
226
+ height: 12px;
227
+ -webkit-transform: scale(0);
228
+ -ms-transform: scale(0);
229
+ transform: scale(0);
230
+ display: block;
231
+ margin: 2px;
232
+ border-radius: 50%;
233
+ background-color: #2196F3;
234
+ opacity: 0;
235
+ }
236
+
237
+ /* checkbox */
238
+ @import "https://fonts.googleapis.com/css?family=Raleway";
239
+ .pure-checkbox input[type="checkbox"]{
240
+ border: 0;
241
+ clip: rect(0 0 0 0);
242
+ height: 1px;
243
+ margin: -1px;
244
+ overflow: hidden;
245
+ padding: 0;
246
+ position: absolute;
247
+ width: 1px;
248
+ }
249
+ .pure-checkbox input[type="checkbox"]:focus + label:before,
250
+ .pure-checkbox input[type="checkbox"]:hover + label:before{
251
+ border-color: #2196F3;
252
+ background-color: #f2f2f2;
253
+ }
254
+ .pure-checkbox input[type="checkbox"]:active + label:before{
255
+ transition-duration: 0s;
256
+ }
257
+ .pure-checkbox input[type="checkbox"] + label{
258
+ position: relative;
259
+ padding-left: 2em;
260
+ vertical-align: middle;
261
+ user-select: none;
262
+ cursor: pointer;
263
+ }
264
+ .pure-checkbox input[type="checkbox"] + label:before{
265
+ box-sizing: content-box;
266
+ content: '';
267
+ color: #2196F3;
268
+ position: absolute;
269
+ top: 50%;
270
+ left: 0;
271
+ width: 14px;
272
+ height: 14px;
273
+ margin-top: -9px;
274
+ border: 2px solid #2196F3;
275
+ text-align: center;
276
+ transition: all 0.4s ease;
277
+ }
278
+ .pure-checkbox input[type="checkbox"] + label:after{
279
+ box-sizing: content-box;
280
+ content: '';
281
+ background-color: #2196F3;
282
+ position: absolute;
283
+ top: 50%;
284
+ left: 4px;
285
+ width: 10px;
286
+ height: 10px;
287
+ margin-top: -5px;
288
+ transform: scale(0);
289
+ transform-origin: 50%;
290
+ transition: transform 200ms ease-out;
291
+ }
292
+ .pure-checkbox input[type="checkbox"]:disabled + label:before{
293
+ border-color: #cccccc;
294
+ }
295
+ .pure-checkbox input[type="checkbox"]:disabled:focus + label:before,
296
+ .pure-checkbox input[type="checkbox"]:disabled:hover + label:before{
297
+ background-color: inherit;
298
+ }
299
+ .pure-checkbox input[type="checkbox"]:disabled:checked + label:before{
300
+ background-color: #cccccc;
301
+ }
302
+ .pure-checkbox input[type="checkbox"] + label:after{
303
+ background-color: transparent;
304
+ top: 50%;
305
+ left: 4px;
306
+ width: 8px;
307
+ height: 3px;
308
+ margin-top: -4px;
309
+ border-style: solid;
310
+ border-color: #ffffff;
311
+ border-width: 0 0 3px 3px;
312
+ border-image: none;
313
+ transform: rotate(-45deg) scale(0);
314
+ }
315
+ .pure-checkbox input[type="checkbox"]:checked + label:after{
316
+ content: '';
317
+ transform: rotate(-45deg) scale(1);
318
+ transition: transform 200ms ease-out;
319
+ }
320
+
321
+ .pure-checkbox input[type="checkbox"]:checked + label:before{
322
+ animation: borderscale 200ms ease-in;
323
+ background: #2196F3;
324
+ }
325
+ .pure-checkbox input[type="checkbox"]:checked + label:after{
326
+ transform: rotate(-45deg) scale(1);
327
+ }
328
+
329
+ /* material design */
330
+ .wpmsbtn {
331
+ text-decoration: none;
332
+ color: #fff !important;
333
+ background-color: #2196F3;
334
+ text-align: center;
335
+ letter-spacing: .5px;
336
+ -webkit-transition: 0.2s ease-out;
337
+ -moz-transition: 0.2s ease-out;
338
+ -o-transition: 0.2s ease-out;
339
+ -ms-transition: 0.2s ease-out;
340
+ transition: 0.2s ease-out;
341
+ cursor: pointer;
342
+ border: none;
343
+ border-radius: 2px;
344
+ display: inline-block;
345
+ height: 36px;
346
+ line-height: 36px;
347
+ outline: 0;
348
+ padding: 0 2rem;
349
+ text-transform: uppercase;
350
+ vertical-align: middle;
351
+ -webkit-tap-highlight-color: transparent; }
352
+
353
+ .wpmsbtn:hover{
354
+ box-shadow: 1px 1px 12px #ccc;
355
+ transition : all ease 0.2s;
356
+ }
357
+
358
+ .wpmsbtn_small{
359
+ height: 30px;
360
+ line-height: 28px;
361
+ vertical-align: middle;
362
+ }
363
+
364
+ .wpmsbtn_secondary{
365
+ background-color: #fafafa;
366
+ color: #444 !important;
367
+ border: #ccc 1px solid;
368
+ text-transform: none;
369
+ padding: 0px 7px;
370
+ }
371
+
372
+ .wpms_input_material{
373
+ height: 30px;
374
+ vertical-align: middle;
375
+ }
376
+
377
+ .wpms-nav-tab-wrapper{
378
+ display: block !important;
379
+ margin: 10px 0px 10px 0px;
380
+ }
381
+
382
+ .wpms-nav-tab-wrapper .wpmstab{
383
+ position: relative;
384
+ }
385
+
386
+ .wpms_uppercase{
387
+ text-transform: uppercase;
388
+ }
389
+
390
+ .wpmsga_code_tracking{
391
+ width: 400px;
392
+ height: 200px;
393
+ }
394
+
395
+ .wpms_wrap_hr{
396
+ width: 100%;
397
+ margin: 15px 0px;
398
+ float: left;
399
+ }
400
+
401
+ .wpms_wrap_hr .wpms_hr{
402
+ width: 60%;
403
+ float: left;
404
}
css/materialize/materialize_frontend_tab_theme.css CHANGED
@@ -114,3 +114,8 @@
114
text-decoration: none;
115
box-shadow: none !important;
116
}
114
text-decoration: none;
115
box-shadow: none !important;
116
}
117
+
118
+ .wpms_li_cate .cat_name{
119
+ font-weight:bold;
120
+ font-size: 14px;
121
+ }
css/metaseo_admin.css CHANGED
@@ -456,42 +456,6 @@ strong {
456
.broken_link_table th#col_link_url{width:40%}
457
.broken_link_table th#col_status{width:10%}
458
459
- .tab-header{
460
- width: 99%;
461
- float: left;
462
- }
463
-
464
- .wpms-tabs{
465
- float: left;
466
- }
467
-
468
- .wpms-tab-header{
469
- float: left;
470
- -webkit-box-sizing: content-box;
471
- -moz-box-sizing: content-box;
472
- box-sizing: content-box;
473
- position: relative;
474
- top: 1px;
475
- background: #ebebeb;
476
- color: #777;
477
- cursor: pointer;
478
- font: 13px/19px "Open Sans", sans-serif;
479
- height: 20px;
480
- margin: 5px 0 0 5px;
481
- padding: 3px 8px 4px;
482
- border: 1px solid #e5e5e5;
483
- }
484
-
485
- .wpms-tab-header:first-child{
486
- margin: 5px 0 0 0px;
487
- }
488
-
489
- .wpms-tab-header.active{
490
- background: #f5f5f5;
491
- color: #555;
492
- border-bottom-color: #f5f5f5;
493
- }
494
-
495
.wpms-global{
496
display: block;
497
}
@@ -501,7 +465,7 @@ strong {
501
display: none;
502
}
503
504
- .content-box.content-wpms-global{
505
display: block;
506
}
507
@@ -659,4 +623,58 @@ span.wpms-seoImgRemove{
659
.image-info span {
660
display: block;
661
margin-top: 5px;
662
}
456
.broken_link_table th#col_link_url{width:40%}
457
.broken_link_table th#col_status{width:10%}
458
459
.wpms-global{
460
display: block;
461
}
465
display: none;
466
}
467
468
+ #wpms-global{
469
display: block;
470
}
471
623
.image-info span {
624
display: block;
625
margin-top: 5px;
626
+ }
627
+
628
+ /* tab css */
629
+ .wpmstabs .tab a:focus {
630
+ outline: none !important;
631
+ box-shadow: none !important;
632
+ }
633
+
634
+ .wpmseotab th.headerSortUp {
635
+ background-image: url(../img/asc.gif);
636
+ }
637
+
638
+ .wpmseotab th.headerSortDown {
639
+ background-image: url(../img/desc.gif);
640
+ }
641
+
642
+ .wpmseotab th.header {
643
+ cursor: pointer;
644
+ background-repeat: no-repeat;
645
+ background-position: center right;
646
+ }
647
+
648
+ .wpmseotab .column-first{
649
+ width: 3%;
650
+ }
651
+
652
+ .wpmseotab .column-keyword{
653
+ width: 30%;
654
+ }
655
+
656
+ .wpmseotab .column-date{
657
+ width: 20%;
658
+ }
659
+
660
+ .wpms_row_record{
661
+ width: 100%;
662
+ float: left;
663
+ }
664
+
665
+ .imgspinner{
666
+ display: none;
667
+ }
668
+
669
+ .wpms_process_meta{
670
+ background: #81b5ee;
671
+ height: 2px;
672
+ width: 0%;
673
+ position: absolute;
674
+ top: -2px;
675
+ }
676
+
677
+ .image_scan_meta{
678
+ width: 100% !important;
679
+ margin-left: 0 !important;
680
}
css/metaseo_sitemap.css CHANGED
@@ -7,6 +7,10 @@
7
float: left;
8
}
9
10
.div_wpms_save_sitemaps{
11
width: 100%;
12
margin-top: 10px;
@@ -47,35 +51,4 @@
47
48
a:active {
49
outline: 0px dashed red;
50
- }
51
-
52
- .wpmstabs .tab a:focus {
53
- outline: none !important;
54
- box-shadow: none !important;
55
- }
56
-
57
- .wpmseotab th.headerSortUp {
58
- background-image: url(../img/asc.gif);
59
- }
60
-
61
- .wpmseotab th.headerSortDown {
62
- background-image: url(../img/desc.gif);
63
- }
64
-
65
- .wpmseotab th.header {
66
- cursor: pointer;
67
- background-repeat: no-repeat;
68
- background-position: center right;
69
- }
70
-
71
- .wpmseotab .column-first{
72
- width: 3%;
73
- }
74
-
75
- .wpmseotab .column-keyword{
76
- width: 30%;
77
- }
78
-
79
- .wpmseotab .column-date{
80
- width: 20%;
81
}
7
float: left;
8
}
9
10
+ .spinner_save_sitemaps{
11
+ margin: 8px 10px 0px;
12
+ }
13
+
14
.div_wpms_save_sitemaps{
15
width: 100%;
16
margin-top: 10px;
51
52
a:active {
53
outline: 0px dashed red;
54
}
css/notification.css CHANGED
@@ -1,5 +1,6 @@
1
/* dashboard */
2
- .toplevel_page_metaseo_dashboard .wpms_dashboard_notification{
3
width: 75%;
4
margin: 0px auto;
5
padding: 0px 10px;
@@ -17,19 +18,20 @@
17
margin: 10px 0px 15px 0px;
18
}
19
20
- .toplevel_page_metaseo_dashboard .wpms_dashboard_notification .msg{
21
font-size: 14px !important;
22
margin: 10px 0px 30px 0px;
23
float: left;
24
}
25
26
- .toplevel_page_metaseo_dashboard .wpms_dashboard_widgets_content{
27
width: 100%;
28
float: left;
29
}
30
31
.toplevel_page_metaseo_dashboard .wpms_dashboard_notification .dashboard-title {
32
color: #fff !important;
33
}
34
35
.toplevel_page_metaseo_dashboard .wpms_dashboard_notification .wpmsclose_notification {
@@ -43,12 +45,14 @@
43
}
44
45
.toplevel_page_metaseo_dashboard .wpms_dashboard_notification .panel {
46
- min-height: 95px !important;
47
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
48
}
49
50
/* Sitemap */
51
- .wpms_notification{
52
width: 99%;
53
margin: 0px auto;
54
float: left;
@@ -68,12 +72,12 @@
68
float: left;
69
}
70
71
- .wpms_notification .msg{
72
font-size: 14px !important;
73
width: 100%;
74
}
75
76
- .wpms_notification .wpms_dashboard_widgets_content{
77
width: 100%;
78
float: left;
79
margin: 10px;
@@ -98,7 +102,7 @@
98
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
99
}
100
101
- .more-info{
102
float: left;
103
color: #fff !important;
104
font-size: 16px !important;
@@ -106,6 +110,6 @@
106
text-decoration: none;
107
}
108
109
- .more-info:hover{
110
color: #fff;
111
}
1
/* dashboard */
2
+
3
+ .toplevel_page_metaseo_dashboard .wpms_dashboard_notification {
4
width: 75%;
5
margin: 0px auto;
6
padding: 0px 10px;
18
margin: 10px 0px 15px 0px;
19
}
20
21
+ .toplevel_page_metaseo_dashboard .wpms_dashboard_notification .msg {
22
font-size: 14px !important;
23
margin: 10px 0px 30px 0px;
24
float: left;
25
}
26
27
+ .toplevel_page_metaseo_dashboard .wpms_dashboard_widgets_content {
28
width: 100%;
29
float: left;
30
}
31
32
.toplevel_page_metaseo_dashboard .wpms_dashboard_notification .dashboard-title {
33
color: #fff !important;
34
+ width: 100%;
35
}
36
37
.toplevel_page_metaseo_dashboard .wpms_dashboard_notification .wpmsclose_notification {
45
}
46
47
.toplevel_page_metaseo_dashboard .wpms_dashboard_notification .panel {
48
+ min-height: 195px !important;
49
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
50
}
51
52
+
53
/* Sitemap */
54
+
55
+ .wpms_notification {
56
width: 99%;
57
margin: 0px auto;
58
float: left;
72
float: left;
73
}
74
75
+ .wpms_notification .msg {
76
font-size: 14px !important;
77
width: 100%;
78
}
79
80
+ .wpms_notification .wpms_dashboard_widgets_content {
81
width: 100%;
82
float: left;
83
margin: 10px;
102
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
103
}
104
105
+ .more-info {
106
float: left;
107
color: #fff !important;
108
font-size: 16px !important;
110
text-decoration: none;
111
}
112
113
+ .more-info:hover {
114
color: #fff;
115
}
css/style.css CHANGED
@@ -237,10 +237,15 @@ a.img-resize, a.fix-metas{
237
font-size:11px!important;
238
margin-top:8px!important;
239
position: relative;
240
}
241
- a.fix-metas, a.img-resize{
242
- float:right;
243
- margin-left:8px!important;
244
}
245
246
td.meta-info-row{
@@ -278,4 +283,17 @@ span.hz-loading{
278
279
#wp-seo-meta-form #post-query-submit{
280
float: left;
281
}
237
font-size:11px!important;
238
margin-top:8px!important;
239
position: relative;
240
+ float:right;
241
+ margin-left:8px!important;
242
+ text-transform: none;
243
+ padding: 0px 7px;
244
+ color: #fff;
245
}
246
+
247
+ a.img-resize:hover, a.fix-metas:hover{
248
+ color: #fff;
249
}
250
251
td.meta-info-row{
283
284
#wp-seo-meta-form #post-query-submit{
285
float: left;
286
+ }
287
+
288
+ #wp-seo-meta-form .tablenav .actions {
289
+ padding: 2px 8px 3px 0;
290
+ }
291
+
292
+ #wp-seo-meta-form .tablenav select{
293
+ height: 30px;
294
+ vertical-align: middle;
295
+ }
296
+
297
+ #filter-by-flush{
298
+ margin-left: 5px;
299
}
inc/class.image-helper.php CHANGED
@@ -220,7 +220,7 @@ class ImageHelper {
220
$width = $height * ($ratio_origin);
221
}
222
223
- if ($width_origin > $width || $height_origin > $height) {
224
$img_before = str_replace(array($upload_dir['baseurl']), '', $img['src']);
225
$ibpart = ImageHelper::IGetPart($img_before);
226
@@ -343,7 +343,7 @@ class ImageHelper {
343
* @return: array of message that will be responsed to ajax call
344
*/
345
346
- public static function IScanPosts($imgs, $meta_checking = false, $forceScan = false) {
347
global $wpdb;
348
$imgs_1 = array_slice($imgs, 0, 1);
349
$idPost = array_shift($imgs_1);
@@ -371,6 +371,7 @@ class ImageHelper {
371
$w .= '(';
372
$i = 0;
373
foreach ($list_thum_url as $url){
374
$i++;
375
if($i == count($list_thum_url)){
376
$w .= ' post_content LIKE "%' . $url . '%"';
@@ -382,8 +383,11 @@ class ImageHelper {
382
383
$w .= ')';
384
$where = array();
385
$where[] = "post_type IN ($post_types)";
386
- $where[] = "post_content LIKE '%<img%>%'";
387
$where[] = $w;
388
$query = "SELECT `ID`, `post_title`, `post_content`, `post_type`, `post_date`
389
FROM $wpdb->posts
@@ -405,7 +409,7 @@ class ImageHelper {
405
$msg[$iID]['iNotGood']['msg'] = __($results['iNotGoodTotal'][$iID] . $im . 'with wrong size', 'wp-meta-seo');
406
$msg[$iID]['iNotGood']['warning'] = true;
407
408
- $msg[$iID]['iNotGood']['button'] = '<a href="javascript:void(0);" class=" img-resize button button-primary" data-img-name="' . $_imgs[$iID] . '" data-post-id="' . $iID . '" data-opt-key="resize_image" onclick="showPostsList(this)">' . __('Resize image', 'wp-meta-seo') . '<span class="spinner-light"></span></a>';
409
410
update_post_meta($iID, '_metaseo_resize_image_counter', $results['iNotGoodTotal'][$iID]);
411
update_post_meta($iID, '_metaseo_resize_image', $post_group);
@@ -437,7 +441,7 @@ class ImageHelper {
437
}
438
439
$msg[$iID]['imNotGood']['warning'] = true;
440
- $msg[$iID]['imNotGood']['button'] = '<a href="javascript:void(0);" class=" fix-metas button button-primary" data-img-name="' . $_imgs[$iID] . '" data-post-id="' . $iID . '" data-opt-key="fix_metas" onclick="showPostsList(this)">' . __('Fix info in content', 'wp-meta-seo') . '<span class="spinner-light"></span></a>';
441
442
443
update_post_meta($iID, '_metaseo_fix_metas_counter', count($post_group));
@@ -446,7 +450,7 @@ class ImageHelper {
446
447
if ($results['imNotGoodTotal'][$iID]['alt'] == 0 && $results['imNotGoodTotal'][$iID]['title'] == 0) {
448
if ($results['iNotGoodTotal'][$iID] != -1) {
449
- $msg[$iID]['imNotGood']['button'] = '<a href="javascript:void(0);" class=" fix-metas button" data-img-name="' . $_imgs[$iID] . '" data-post-id="' . $iID . '" data-opt-key="fix_metas" onclick="showPostsList(this)">' . __('Edit information', 'wp-meta-seo') . '<span class="spinner-light"></span></a>';
450
} else {
451
$msg[$iID]['imNotGood']['button'] = '';
452
}
220
$width = $height * ($ratio_origin);
221
}
222
223
+ if ((int)$width_origin > (int)$width || (int)$height_origin > (int)$height) {
224
$img_before = str_replace(array($upload_dir['baseurl']), '', $img['src']);
225
$ibpart = ImageHelper::IGetPart($img_before);
226
343
* @return: array of message that will be responsed to ajax call
344
*/
345
346
+ public static function IScanPosts($imgs, $meta_checking = false, $forceScan = false, $delete = false, $postID = 0) {
347
global $wpdb;
348
$imgs_1 = array_slice($imgs, 0, 1);
349
$idPost = array_shift($imgs_1);
371
$w .= '(';
372
$i = 0;
373
foreach ($list_thum_url as $url){
374
+ $url = str_replace(array('https','http'),array('',''),$url);
375
$i++;
376
if($i == count($list_thum_url)){
377
$w .= ' post_content LIKE "%' . $url . '%"';
383
384
$w .= ')';
385
$where = array();
386
+ if($delete){
387
+ $where[] = "ID != $postID";
388
+ }
389
$where[] = "post_type IN ($post_types)";
390
+ $where[] = "post_content LIKE '%<img%'";
391
$where[] = $w;
392
$query = "SELECT `ID`, `post_title`, `post_content`, `post_type`, `post_date`
393
FROM $wpdb->posts
409
$msg[$iID]['iNotGood']['msg'] = __($results['iNotGoodTotal'][$iID] . $im . 'with wrong size', 'wp-meta-seo');
410
$msg[$iID]['iNotGood']['warning'] = true;
411
412
+ $msg[$iID]['iNotGood']['button'] = '<a href="javascript:void(0);" class=" img-resize wpmsbtn wpmsbtn_small" data-img-name="' . $_imgs[$iID] . '" data-post-id="' . $iID . '" data-opt-key="resize_image" onclick="showPostsList(this)">' . __('Resize image', 'wp-meta-seo') . '<span class="spinner-light"></span></a>';
413
414
update_post_meta($iID, '_metaseo_resize_image_counter', $results['iNotGoodTotal'][$iID]);
415
update_post_meta($iID, '_metaseo_resize_image', $post_group);
441
}
442
443
$msg[$iID]['imNotGood']['warning'] = true;
444
+ $msg[$iID]['imNotGood']['button'] = '<a href="javascript:void(0);" class=" fix-metas wpmsbtn wpmsbtn_small" data-img-name="' . $_imgs[$iID] . '" data-post-id="' . $iID . '" data-opt-key="fix_metas" onclick="showPostsList(this)">' . __('Fix info in content', 'wp-meta-seo') . '<span class="spinner-light"></span></a>';
445
446
447
update_post_meta($iID, '_metaseo_fix_metas_counter', count($post_group));
450
451
if ($results['imNotGoodTotal'][$iID]['alt'] == 0 && $results['imNotGoodTotal'][$iID]['title'] == 0) {
452
if ($results['iNotGoodTotal'][$iID] != -1) {
453
+ $msg[$iID]['imNotGood']['button'] = '<a href="javascript:void(0);" class=" fix-metas wpmsbtn wpmsbtn_small wpmsbtn_secondary" data-img-name="' . $_imgs[$iID] . '" data-post-id="' . $iID . '" data-opt-key="fix_metas" onclick="showPostsList(this)">' . __('Edit information', 'wp-meta-seo') . '<span class="spinner-light"></span></a>';
454
} else {
455
$msg[$iID]['imNotGood']['button'] = '';
456
}
inc/class.metaseo-admin.php CHANGED
@@ -14,6 +14,7 @@ class MetaSeo_Admin {
14
public $error_timeout;
15
private $wpmsga;
16
public $ga_tracking;
17
public $google_alanytics;
18
19
function __construct() {
@@ -70,7 +71,8 @@ class MetaSeo_Admin {
70
'wpmsga_cookiename' => '',
71
'wpmsga_cookieexpires' => '',
72
'wpmsga_track_exclude' => array(),
73
- 'wpmsga_cookiename' => ''
74
);
75
76
if (!get_option('_wpms_dash_last_update', false)) {
@@ -112,6 +114,15 @@ class MetaSeo_Admin {
112
add_action ('edit_category_form_fields', array($this,'wpms_category_fields'));
113
add_action( 'edited_category', array($this,'wpms_save_category_custom_meta'), 10, 2 );
114
add_action( 'create_category', array($this,'wpms_save_category_custom_meta'), 10, 2 );
115
}
116
117
public function wpms_category_add_new_meta_field() {
@@ -157,15 +168,15 @@ class MetaSeo_Admin {
157
<tr class="form-field">
158
<th scope="row" valign="top"><label class="wpms_custom_cat_field" alt="<?php _e('This is the title of your content that may be displayed in search engine results (meta title). By default it’s the content title (page title, post title…). 69 characters max allowed.','wp-meta-seo') ?>"><?php _e('Search engine title','wp-meta-seo'); ?></label></th>
159
<td>
160
- <textarea name="wpms_category_metatitle" class="wpms_category_metatitle"><?php echo $cat_metatitle ? $cat_metatitle : ''; ?></textarea><br />
161
<div class="cat-title-len"><?php echo $cat_metatitle ? WPMS_CAT_METATITLE_LENGTH-strlen($cat_metatitle) : WPMS_CAT_METATITLE_LENGTH; ?></div>
162
</td>
163
</tr>
164
<tr class="form-field">
165
<th scope="row" valign="top"><label for="extra1" class="wpms_custom_cat_field" alt="<?php _e('This is the title of your content that may be displayed in search engine results (meta title). By default it’s the content title (page title, post title…). 69 characters max allowed.','wp-meta-seo') ?>"><?php _e('Search engine description','wp-meta-seo'); ?></label></th>
166
<td>
167
- <textarea name="wpms_category_metadesc" class="wpms_category_metadesc"><?php echo $cat_metadesc ? WPMS_CAT_METADESC_LENGTH-strlen($cat_metatitle) : WPMS_CAT_METADESC_LENGTH; ?></textarea><br />
168
- <div class="cat-desc-len">156</div>
169
</td>
170
</tr>
171
<?php
@@ -858,8 +869,13 @@ class MetaSeo_Admin {
858
public function showmetatitletab() {
859
echo '<input name="_metaseo_settings[metaseo_metatitle_tab]" type="hidden" value="0"/>';
860
?>
861
- <label><input name="_metaseo_settings[metaseo_metatitle_tab]" type="checkbox" id="metaseo_metatitle_tab" value="1" <?php checked(1, $this->settings['metaseo_metatitle_tab']); ?> />
862
- <?php _e('When meta title is filled use it as page title instead of the content title', 'wp-meta-seo'); ?></label>
863
<?php
864
}
865
@@ -889,8 +905,13 @@ class MetaSeo_Admin {
889
public function showkeywords() {
890
echo '<input name="_metaseo_settings[metaseo_showkeywords]" type="hidden" value="0"/>';
891
?>
892
- <label><input name="_metaseo_settings[metaseo_showkeywords]" type="checkbox" id="metaseo_showkeywords" value="1" <?php checked(1, $this->settings['metaseo_showkeywords']); ?> />
893
- <?php _e('Active meta keywords', 'wp-meta-seo'); ?></label>
894
<?php
895
}
896
@@ -900,8 +921,13 @@ class MetaSeo_Admin {
900
public function showtmetablock() {
901
echo '<input name="_metaseo_settings[metaseo_showtmetablock]" type="hidden" value="0"/>';
902
?>
903
- <label><input name="_metaseo_settings[metaseo_showtmetablock]" type="checkbox" id="metaseo_showtmetablock" value="1" <?php checked(1, $this->settings['metaseo_showtmetablock']); ?> />
904
- <?php _e('Activate meta block edition below content', 'wp-meta-seo'); ?></label>
905
<?php
906
}
907
@@ -911,8 +937,13 @@ class MetaSeo_Admin {
911
public function showsocial() {
912
echo '<input name="_metaseo_settings[metaseo_showsocial]" type="hidden" value="0"/>';
913
?>
914
- <label><input name="_metaseo_settings[metaseo_showsocial]" type="checkbox" id="metaseo_showsocial" value="1" <?php checked(1, $this->settings['metaseo_showsocial']); ?> />
915
- <?php _e('Activate social edition', 'wp-meta-seo'); ?></label>
916
<?php
917
}
918
@@ -922,8 +953,13 @@ class MetaSeo_Admin {
922
public function showseovalidate() {
923
echo '<input name="_metaseo_settings[metaseo_seovalidate]" type="hidden" value="0"/>';
924
?>
925
- <label><input name="_metaseo_settings[metaseo_seovalidate]" type="checkbox" id="metaseo_seovalidate" value="1" <?php checked(1, $this->settings['metaseo_seovalidate']); ?> />
926
- <?php _e('Allow user to force on page SEO criteria validation by clicking on the icon', 'wp-meta-seo'); ?></label>
927
<?php
928
}
929
@@ -933,8 +969,13 @@ class MetaSeo_Admin {
933
public function showlinkfield() {
934
echo '<input name="_metaseo_settings[metaseo_linkfield]" type="hidden" value="0"/>';
935
?>
936
- <label><input name="_metaseo_settings[metaseo_linkfield]" type="checkbox" id="metaseo_linkfield" value="1" <?php checked(1, $this->settings['metaseo_linkfield']); ?> />
937
- <?php _e("Adds back the missing 'title' field in the Insert/Edit URL box", "wp-meta-seo"); ?></label>
938
<?php
939
}
940
@@ -944,8 +985,13 @@ class MetaSeo_Admin {
944
public function showfollow() {
945
echo '<input name="_metaseo_settings[metaseo_follow]" type="hidden" value="0"/>';
946
?>
947
- <label><input name="_metaseo_settings[metaseo_follow]" type="checkbox" id="metaseo_follow" value="1" <?php checked(1, $this->settings['metaseo_follow']); ?> />
948
- <?php _e("Provides a way for webmasters to tell search engines don't follow links on the page.", "wp-meta-seo"); ?></label>
949
<?php
950
}
951
@@ -955,8 +1001,13 @@ class MetaSeo_Admin {
955
public function showindex() {
956
echo '<input name="_metaseo_settings[metaseo_index]" type="hidden" value="0"/>';
957
?>
958
- <label><input name="_metaseo_settings[metaseo_index]" type="checkbox" id="metaseo_index" value="1" <?php checked(1, $this->settings['metaseo_index']); ?> />
959
- <?php _e("Provides show or do not show this page in search results in search results.", "wp-meta-seo"); ?></label>
960
<?php
961
}
962
@@ -966,8 +1017,13 @@ class MetaSeo_Admin {
966
public function showoverridemeta() {
967
echo '<input name="_metaseo_settings[metaseo_overridemeta]" type="hidden" value="0"/>';
968
?>
969
- <label><input name="_metaseo_settings[metaseo_overridemeta]" type="checkbox" id="metaseo_overridemeta" value="1" <?php checked(1, $this->settings['metaseo_overridemeta']); ?> />
970
- <?php _e("Override meta image in post content when update meta", "wp-meta-seo"); ?></label>
971
<?php
972
}
973
@@ -1084,6 +1140,24 @@ class MetaSeo_Admin {
1084
'wp-meta-seo_page_metaseo_link_meta'
1085
);
1086
1087
wp_enqueue_script(
1088
'wpmetaseoAdmin', plugins_url('js/metaseo_admin.js', dirname(__FILE__)), array('jquery'), WPMSEO_VERSION, true
1089
);
@@ -1494,7 +1568,7 @@ class MetaSeo_Admin {
1494
$this->service = new Google_Service_Analytics($this->client);
1495
$wpmsga_controller = new WPMS_GAPI_Controller();
1496
1497
- if (isset($_POST['wpms_ga_code'])) {
1498
if (!stripos('x' . $_POST['wpms_ga_code'], 'UA-', 1) == 1) {
1499
1500
WPMSGA_Tools::delete_cache('gapi_errors');
@@ -1546,6 +1620,22 @@ class MetaSeo_Admin {
1546
wp_redirect( admin_url('admin.php?page=metaseo_google_analytics&view=wpmsga_trackcode') );
1547
exit;
1548
}
1549
1550
$this->google_alanytics = get_option('wpms_google_alanytics');
1551
if (!empty($this->google_alanytics['googleCredentials'])) {
@@ -1573,6 +1663,7 @@ class MetaSeo_Admin {
1573
}
1574
}
1575
}
1576
$w = '99%';
1577
$text = __('Bring your WordPress website SEO to the next level with the PRO Addon: Email Report, Google Search Console Connect, Automatic Redirect, Advanced Sitemaps and more!','wp-meta-seo');
1578
$class_btn_close = 'close_gga';
@@ -1918,5 +2009,6 @@ class MetaSeo_Admin {
1918
add_action('wp_ajax_wpms_dash_metadesc', array('MetaSeo_Dashboard', 'wpms_dash_metadesc'));
1919
add_action('wp_ajax_wpms_dash_imgsmeta', array('MetaSeo_Dashboard', 'wpms_dash_imgsmeta'));
1920
add_action('wp_ajax_wpms_setcookie_notification', array($this, 'wpms_setcookie_notification'));
1921
}
1922
}
14
public $error_timeout;
15
private $wpmsga;
16
public $ga_tracking;
17
+ public $ga_tracking_disconnect;
18
public $google_alanytics;
19
20
function __construct() {
71
'wpmsga_cookiename' => '',
72
'wpmsga_cookieexpires' => '',
73
'wpmsga_track_exclude' => array(),
74
+ 'wpmsga_cookiename' => '',
75
+ 'wpmsga_code_tracking' => ''
76
);
77
78
if (!get_option('_wpms_dash_last_update', false)) {
114
add_action ('edit_category_form_fields', array($this,'wpms_category_fields'));
115
add_action( 'edited_category', array($this,'wpms_save_category_custom_meta'), 10, 2 );
116
add_action( 'create_category', array($this,'wpms_save_category_custom_meta'), 10, 2 );
117
+ add_action('post_updated', array('MetaSeo_Image_List_Table', 'wpms_update_post'), 10, 3);
118
+ add_action('delete_post', array('MetaSeo_Image_List_Table', 'wpmf_delete_attachment'));
119
+
120
+ if(is_plugin_active(WPMSEO_ADDON_FILENAME)) {
121
+ add_action( 'product_cat_add_form_fields', array( $this, 'wpms_category_add_new_meta_field' ) );
122
+ add_action( 'product_cat_edit_form_fields', array( $this, 'wpms_category_fields' ), 10 );
123
+ add_action( 'created_term', array( $this, 'wpms_save_category_custom_meta' ), 10, 3 );
124
+ add_action( 'edit_term', array( $this, 'wpms_save_category_custom_meta' ), 10, 3 );
125
+ }
126
}
127
128
public function wpms_category_add_new_meta_field() {
168
<tr class="form-field">
169
<th scope="row" valign="top"><label class="wpms_custom_cat_field" alt="<?php _e('This is the title of your content that may be displayed in search engine results (meta title). By default it’s the content title (page title, post title…). 69 characters max allowed.','wp-meta-seo') ?>"><?php _e('Search engine title','wp-meta-seo'); ?></label></th>
170
<td>
171
+ <textarea name="wpms_category_metatitle" class="wpms_category_metatitle"><?php echo (!empty($cat_metatitle)) ? $cat_metatitle : ''; ?></textarea><br />
172
<div class="cat-title-len"><?php echo $cat_metatitle ? WPMS_CAT_METATITLE_LENGTH-strlen($cat_metatitle) : WPMS_CAT_METATITLE_LENGTH; ?></div>
173
</td>
174
</tr>
175
<tr class="form-field">
176
<th scope="row" valign="top"><label for="extra1" class="wpms_custom_cat_field" alt="<?php _e('This is the title of your content that may be displayed in search engine results (meta title). By default it’s the content title (page title, post title…). 69 characters max allowed.','wp-meta-seo') ?>"><?php _e('Search engine description','wp-meta-seo'); ?></label></th>
177
<td>
178
+ <textarea name="wpms_category_metadesc" class="wpms_category_metadesc"><?php echo (!empty($cat_metadesc)) ? $cat_metadesc : ''; ?></textarea><br />
179
+ <div class="cat-desc-len"><?php echo $cat_metadesc ? WPMS_CAT_METADESC_LENGTH-strlen($cat_metadesc) : WPMS_CAT_METADESC_LENGTH; ?></div>
180
</td>
181
</tr>
182
<?php
869
public function showmetatitletab() {
870
echo '<input name="_metaseo_settings[metaseo_metatitle_tab]" type="hidden" value="0"/>';
871
?>
872
+ <label><?php _e('When meta title is filled use it as page title instead of the content title', 'wp-meta-seo'); ?></label>
873
+ <div class="switch-optimization">
874
+ <label class="switch switch-optimization">
875
+ <input type="checkbox" id="metaseo_metatitle_tab" name="_metaseo_settings[metaseo_metatitle_tab]" value="1" <?php if (isset($this->settings['metaseo_metatitle_tab']) && $this->settings['metaseo_metatitle_tab'] == 1) echo 'checked' ?>>
876
+ <div class="slider round"></div>
877
+ </label>
878
+ </div>
879
<?php
880
}
881
905
public function showkeywords() {
906
echo '<input name="_metaseo_settings[metaseo_showkeywords]" type="hidden" value="0"/>';
907
?>
908
+ <label><?php _e('Active meta keywords', 'wp-meta-seo'); ?></label>
909
+ <div class="switch-optimization">
910
+ <label class="switch switch-optimization">
911
+ <input type="checkbox" id="metaseo_showkeywords" name="_metaseo_settings[metaseo_showkeywords]" value="1" <?php if (isset($this->settings['metaseo_showkeywords']) && $this->settings['metaseo_showkeywords'] == 1) echo 'checked' ?>>
912
+ <div class="slider round"></div>
913
+ </label>
914
+ </div>
915
<?php
916
}
917
921
public function showtmetablock() {
922
echo '<input name="_metaseo_settings[metaseo_showtmetablock]" type="hidden" value="0"/>';
923
?>
924
+ <label><?php _e('Activate meta block edition below content', 'wp-meta-seo'); ?></label>
925
+ <div class="switch-optimization">
926
+ <label class="switch switch-optimization">
927
+ <input type="checkbox" id="metaseo_showtmetablock" name="_metaseo_settings[metaseo_showtmetablock]" value="1" <?php if (isset($this->settings['metaseo_showtmetablock']) && $this->settings['metaseo_showtmetablock'] == 1) echo 'checked' ?>>
928
+ <div class="slider round"></div>
929
+ </label>
930
+ </div>
931
<?php
932
}
933
937
public function showsocial() {
938
echo '<input name="_metaseo_settings[metaseo_showsocial]" type="hidden" value="0"/>';
939
?>
940
+ <label><?php _e('Activate social edition', 'wp-meta-seo'); ?></label>
941
+ <div class="switch-optimization">
942
+ <label class="switch switch-optimization">
943
+ <input type="checkbox" id="metaseo_showsocial" name="_metaseo_settings[metaseo_showsocial]" value="1" <?php if (isset($this->settings['metaseo_showsocial']) && $this->settings['metaseo_showsocial'] == 1) echo 'checked' ?>>
944
+ <div class="slider round"></div>
945
+ </label>
946
+ </div>
947
<?php
948
}
949
953
public function showseovalidate() {
954
echo '<input name="_metaseo_settings[metaseo_seovalidate]" type="hidden" value="0"/>';
955
?>
956
+ <label><?php _e('Allow user to force on page SEO criteria validation by clicking on the icon', 'wp-meta-seo'); ?></label>
957
+ <div class="switch-optimization">
958
+ <label class="switch switch-optimization">
959
+ <input type="checkbox" id="metaseo_seovalidate" name="_metaseo_settings[metaseo_seovalidate]" value="1" <?php if (isset($this->settings['metaseo_seovalidate']) && $this->settings['metaseo_seovalidate'] == 1) echo 'checked' ?>>
960
+ <div class="slider round"></div>
961
+ </label>
962
+ </div>
963
<?php
964
}
965
969
public function showlinkfield() {
970
echo '<input name="_metaseo_settings[metaseo_linkfield]" type="hidden" value="0"/>';
971
?>
972
+ <label><?php _e("Adds back the missing 'title' field in the Insert/Edit URL box", "wp-meta-seo"); ?></label>
973
+ <div class="switch-optimization">
974
+ <label class="switch switch-optimization">
975
+ <input type="checkbox" id="metaseo_linkfield" name="_metaseo_settings[metaseo_linkfield]" value="1" <?php if (isset($this->settings['metaseo_linkfield']) && $this->settings['metaseo_linkfield'] == 1) echo 'checked' ?>>
976
+ <div class="slider round"></div>
977
+ </label>
978
+ </div>
979
<?php
980
}
981
985
public function showfollow() {
986
echo '<input name="_metaseo_settings[metaseo_follow]" type="hidden" value="0"/>';
987
?>
988
+ <label><?php _e("Provides a way for webmasters to tell search engines don't follow links on the page.", "wp-meta-seo"); ?></label>
989
+ <div class="switch-optimization">
990
+ <label class="switch switch-optimization">
991
+ <input type="checkbox" id="metaseo_follow" name="_metaseo_settings[metaseo_follow]" value="1" <?php if (isset($this->settings['metaseo_follow']) && $this->settings['metaseo_follow'] == 1) echo 'checked' ?>>
992
+ <div class="slider round"></div>
993
+ </label>
994
+ </div>
995
<?php
996
}
997
1001
public function showindex() {
1002
echo '<input name="_metaseo_settings[metaseo_index]" type="hidden" value="0"/>';
1003
?>
1004
+ <label><?php _e("Provides show or do not show this page in search results in search results.", "wp-meta-seo"); ?></label>
1005
+ <div class="switch-optimization">
1006
+ <label class="switch switch-optimization">
1007
+ <input type="checkbox" id="metaseo_index" name="_metaseo_settings[metaseo_index]" value="1" <?php if (isset($this->settings['metaseo_index']) && $this->settings['metaseo_index'] == 1) echo 'checked' ?>>
1008
+ <div class="slider round"></div>
1009
+ </label>
1010
+ </div>
1011
<?php
1012
}
1013
1017
public function showoverridemeta() {
1018
echo '<input name="_metaseo_settings[metaseo_overridemeta]" type="hidden" value="0"/>';
1019
?>
1020
+ <label><?php _e("Override meta image in post content when update meta", "wp-meta-seo"); ?></label>
1021
+ <div class="switch-optimization">
1022
+ <label class="switch switch-optimization">
1023
+ <input type="checkbox" id="metaseo_overridemeta" name="_metaseo_settings[metaseo_overridemeta]" value="1" <?php if (isset($this->settings['metaseo_overridemeta']) && $this->settings['metaseo_overridemeta'] == 1) echo 'checked' ?>>
1024
+ <div class="slider round"></div>
1025
+ </label>
1026
+ </div>
1027
<?php
1028
}
1029
1140
'wp-meta-seo_page_metaseo_link_meta'
1141
);
1142
1143
+ $lists_pages = array(
1144
+ 'toplevel_page_metaseo_dashboard',
1145
+ 'wp-meta-seo_page_metaseo_content_meta',
1146
+ 'wp-meta-seo_page_metaseo_google_sitemap',
1147
+ 'wp-meta-seo_page_metaseo_image_meta',
1148
+ 'wp-meta-seo_page_metaseo_link_meta',
1149
+ 'wp-meta-seo_page_metaseo_broken_link',
1150
+ 'wp-meta-seo_page_metaseo_console',
1151
+ 'wp-meta-seo_page_metaseo_google_analytics',
1152
+ 'wp-meta-seo_page_metaseo_sendemail',
1153
+ 'wp-meta-seo_page_metaseo_settings'
1154
+ );
1155
+ if(in_array($current_screen->base,$lists_pages)){
1156
+ wp_enqueue_style('metaseo-google-icon', '//fonts.googleapis.com/icon?family=Material+Icons');
1157
+ wp_enqueue_style('wpms_materialize_style', plugins_url('css/materialize/materialize.css', dirname(__FILE__)), array(), WPMSEO_VERSION);
1158
+ wp_enqueue_script('wpms_materialize_js', plugins_url('js/materialize/materialize.min.js', dirname(__FILE__)), array('jquery'), WPMSEO_VERSION, true);
1159
+ }
1160
+
1161
wp_enqueue_script(
1162
'wpmetaseoAdmin', plugins_url('js/metaseo_admin.js', dirname(__FILE__)), array('jquery'), WPMSEO_VERSION, true
1163
);
1568
$this->service = new Google_Service_Analytics($this->client);
1569
$wpmsga_controller = new WPMS_GAPI_Controller();
1570
1571
+ if (!empty($_POST['wpms_ga_code'])) {
1572
if (!stripos('x' . $_POST['wpms_ga_code'], 'UA-', 1) == 1) {
1573
1574
WPMSGA_Tools::delete_cache('gapi_errors');
1620
wp_redirect( admin_url('admin.php?page=metaseo_google_analytics&view=wpmsga_trackcode') );
1621
exit;
1622
}
1623
+ $this->ga_tracking_disconnect = array(
1624
+ 'wpms_ga_uax_reference' => '',
1625
+ 'wpmsga_dash_tracking_type' => 'classic',
1626
+ 'wpmsga_code_tracking' => ''
1627
+ );
1628
+ $ga_tracking_disconnect = get_option('_metaseo_ggtracking_disconnect_settings');
1629
+ if (is_array($ga_tracking_disconnect)) {
1630
+ $this->ga_tracking_disconnect = array_merge($this->ga_tracking_disconnect, $ga_tracking_disconnect);
1631
+ }
1632
+ if(isset($_POST['_metaseo_ga_disconnect'])){
1633
+ update_option('_metaseo_ggtracking_disconnect_settings',$_POST['_metaseo_ga_disconnect']);
1634
+ $ga_tracking_disconnect = get_option('_metaseo_ggtracking_disconnect_settings');
1635
+ if (is_array($ga_tracking_disconnect)) {
1636
+ $this->ga_tracking_disconnect = array_merge($this->ga_tracking_disconnect, $ga_tracking_disconnect);
1637
+ }
1638
+ }
1639
1640
$this->google_alanytics = get_option('wpms_google_alanytics');
1641
if (!empty($this->google_alanytics['googleCredentials'])) {
1663
}
1664
}
1665
}
1666
+
1667
$w = '99%';
1668
$text = __('Bring your WordPress website SEO to the next level with the PRO Addon: Email Report, Google Search Console Connect, Automatic Redirect, Advanced Sitemaps and more!','wp-meta-seo');
1669
$class_btn_close = 'close_gga';
2009
add_action('wp_ajax_wpms_dash_metadesc', array('MetaSeo_Dashboard', 'wpms_dash_metadesc'));
2010
add_action('wp_ajax_wpms_dash_imgsmeta', array('MetaSeo_Dashboard', 'wpms_dash_imgsmeta'));
2011
add_action('wp_ajax_wpms_setcookie_notification', array($this, 'wpms_setcookie_notification'));
2012
+ add_action('wp_ajax_wpms_image_scan_meta', array('MetaSeo_Image_List_Table', 'wpms_image_scan_meta'));
2013
}
2014
}
inc/class.metaseo-broken-link-table.php CHANGED
@@ -383,11 +383,10 @@ class MetaSeo_Broken_Link_Table extends WP_List_Table {
383
}
384
?>
385
</select>
386
-
387
<?php
388
- submit_button(__('Filter', 'wp-meta-seo'), 'button', 'filter_type_action', false, array('id' => 'broken-submit'));
389
echo '<div style="float:left;padding-left: 5px;"><div class="wpms_process" data-w="0"></div>';
390
- echo '<div data-comment_paged="1" data-paged="1" class="button wpms_scan_link">' . __('Index internal broken links', 'wp-meta-seo') . '</div></div>';
391
echo '<span class="spinner"></span>';
392
}
393
@@ -406,7 +405,7 @@ class MetaSeo_Broken_Link_Table extends WP_List_Table {
406
</select>
407
408
<?php
409
- echo '<div class="button wpms_flush_link">' . __('Flush', 'wp-meta-seo') . '</div>';
410
}
411
412
/**
@@ -534,8 +533,8 @@ class MetaSeo_Broken_Link_Table extends WP_List_Table {
534
</label>
535
536
<div class="submit wpms-inline-editor-buttons">
537
- <input type="button" class="button-secondary cancel alignleft wpms-cancel-button" value="<?php echo esc_attr(__('Cancel', 'wp-meta-seo')); ?>" />
538
- <input type="button" data-type="<?php echo $rec->type ?>" data-link_id="<?php echo $rec->id ?>" data-source_id="<?php echo $rec->source_id ?>" class="button-primary save alignright wpms-update-link-button" value="<?php echo esc_attr(__('Add custom redirect', 'wp-meta-seo')); ?>" />
539
</div>
540
</div>
541
<?php
@@ -595,7 +594,7 @@ class MetaSeo_Broken_Link_Table extends WP_List_Table {
595
if (!empty($source)) {
596
$row_action = array(
597
'edit' => '<a target="_blank" href="' . get_edit_comment_link($rec->source_id) . '" title="'.__('Edit this item','wp-meta-seo').'">'.__('Edit','wp-meta-seo','wp-meta-seo').'</a>',
598
- 'view' => '<a target="_blank" href="' . get_comment_link($rec->source_id) . '" title="View &#8220;test&#8221;" rel="permalink">'.__('View','wp-meta-seo').'</a>'
599
);
600
601
if ($rec->type == 'comment') {
@@ -610,7 +609,7 @@ class MetaSeo_Broken_Link_Table extends WP_List_Table {
610
if (!empty($source)) {
611
$row_action = array(
612
'edit' => '<a target="_blank" href="' . get_edit_post_link($rec->source_id) . '" title="'.__('Edit this item','wp-meta-seo').'">'.__('Edit','wp-meta-seo').'</a>',
613
- 'view' => '<a target="_blank" href="' . get_post_permalink($rec->source_id) . '" title="View &#8220;test&#8221;" rel="permalink">View</a>'
614
);
615
616
$source_inner = '<span style="float: left;margin-right: 5px;"><i class="material-icons metaseo_help_status" alt="Post , Page , Custom post">layers</i></span>';
@@ -1576,6 +1575,7 @@ class MetaSeo_Broken_Link_Table extends WP_List_Table {
1576
wp_send_json(false);
1577
$wpdb->delete($wpdb->prefix . 'wpms_links', array('id' => $_POST['link_id']));
1578
switch ($link_detail->type) {
1579
case '404_automaticaly':
1580
wp_send_json(true);
1581
break;
383
}
384
?>
385
</select>
386
+ <input type="submit" name="filter_type_action" id="broken-submit" class="wpmsbtn wpmsbtn_small wpmsbtn_secondary" value="<?php _e('Filter', 'wp-meta-seo') ?>">
387
<?php
388
echo '<div style="float:left;padding-left: 5px;"><div class="wpms_process" data-w="0"></div>';
389
+ echo '<div data-comment_paged="1" data-paged="1" class="wpmsbtn wpmsbtn_small wpms_scan_link">' . __('Index internal broken links', 'wp-meta-seo') . '</div></div>';
390
echo '<span class="spinner"></span>';
391
}
392
405
</select>
406
407
<?php
408
+ echo '<div class="wpmsbtn wpmsbtn_small wpmsbtn_secondary wpms_flush_link">' . __('Flush', 'wp-meta-seo') . '</div>';
409
}
410
411
/**
533
</label>
534
535
<div class="submit wpms-inline-editor-buttons">
536
+ <input type="button" class="wpmsbtn wpmsbtn_small wpmsbtn_secondary cancel alignleft wpms-cancel-button" value="<?php echo esc_attr(__('Cancel', 'wp-meta-seo')); ?>" />
537
+ <input type="button" data-type="<?php echo $rec->type ?>" data-link_id="<?php echo $rec->id ?>" data-source_id="<?php echo $rec->source_id ?>" class="wpmsbtn wpmsbtn_small save alignright wpms-update-link-button" value="<?php echo esc_attr(__('Add custom redirect', 'wp-meta-seo')); ?>" />
538
</div>
539
</div>
540
<?php
594
if (!empty($source)) {
595
$row_action = array(
596
'edit' => '<a target="_blank" href="' . get_edit_comment_link($rec->source_id) . '" title="'.__('Edit this item','wp-meta-seo').'">'.__('Edit','wp-meta-seo','wp-meta-seo').'</a>',
597
+ 'view' => '<a target="_blank" href="' . get_comment_link($rec->source_id) . '" title="View &#8220;'.$source->comment_author.'&#8221;" rel="permalink">'.__('View','wp-meta-seo').'</a>'
598
);
599
600
if ($rec->type == 'comment') {
609
if (!empty($source)) {
610
$row_action = array(
611
'edit' => '<a target="_blank" href="' . get_edit_post_link($rec->source_id) . '" title="'.__('Edit this item','wp-meta-seo').'">'.__('Edit','wp-meta-seo').'</a>',
612
+ 'view' => '<a target="_blank" href="' . get_post_permalink($rec->source_id) . '" title="View &#8220;'.$source->post_title.'&#8221;" rel="permalink">View</a>'
613
);
614
615
$source_inner = '<span style="float: left;margin-right: 5px;"><i class="material-icons metaseo_help_status" alt="Post , Page , Custom post">layers</i></span>';
1575
wp_send_json(false);
1576
$wpdb->delete($wpdb->prefix . 'wpms_links', array('id' => $_POST['link_id']));
1577
switch ($link_detail->type) {
1578
+ case 'add_rule':
1579
case '404_automaticaly':
1580
wp_send_json(true);
1581
break;
inc/class.metaseo-content-list-table.php CHANGED
@@ -110,7 +110,7 @@ class MetaSeo_Content_List_Table extends WP_List_Table {
110
}
111
112
$sl_bulk = '<select name="mbulk_copy" class="mbulk_copy"><option value="0">' . __('Bulk copy', 'wp-meta-seo') . '</option><option value="all">' . __('All Posts', 'wp-meta-seo') . '</option><option value="bulk-copy-metatitle">' . __('Selected posts', 'wp-meta-seo') . '</option></select>';
113
- $btn_bulk = '<input type="button" name="do_copy" id="post_do_copy" class="button button-primary btn_do_copy post_do_copy" value="' . __('Content title as meta title', 'wp-meta-seo') . '"><span class="spinner"></span>';
114
115
$selected_duplicate = !empty($_REQUEST['wpms_duplicate_meta']) ? $_REQUEST['wpms_duplicate_meta'] : 'none';
116
$options_dups = array('none' => __('All meta information', 'wp-meta-seo') , 'duplicate_title' => __('Duplicated meta titles', 'wp-meta-seo') , 'duplicate_desc' => __('Duplicated meta descriptions', 'wp-meta-seo'));
@@ -126,7 +126,7 @@ class MetaSeo_Content_List_Table extends WP_List_Table {
126
127
echo sprintf('<select name="post_type_filter" class="metaseo-filter">%1$s</select>', $options);
128
echo $sl_duplicate;
129
- submit_button(__('Filter', 'wp-meta-seo'), 'button', 'do_filter', false, array('id' => 'post-query-submit'));
130
echo $sl_bulk . $btn_bulk;
131
echo "</div>";
132
}
110
}
111
112
$sl_bulk = '<select name="mbulk_copy" class="mbulk_copy"><option value="0">' . __('Bulk copy', 'wp-meta-seo') . '</option><option value="all">' . __('All Posts', 'wp-meta-seo') . '</option><option value="bulk-copy-metatitle">' . __('Selected posts', 'wp-meta-seo') . '</option></select>';
113
+ $btn_bulk = '<input type="button" name="do_copy" id="post_do_copy" class="wpmsbtn wpmsbtn_small btn_do_copy post_do_copy" value="' . __('Content title as meta title', 'wp-meta-seo') . '"><span class="spinner"></span>';
114
115
$selected_duplicate = !empty($_REQUEST['wpms_duplicate_meta']) ? $_REQUEST['wpms_duplicate_meta'] : 'none';
116
$options_dups = array('none' => __('All meta information', 'wp-meta-seo') , 'duplicate_title' => __('Duplicated meta titles', 'wp-meta-seo') , 'duplicate_desc' => __('Duplicated meta descriptions', 'wp-meta-seo'));
126
127
echo sprintf('<select name="post_type_filter" class="metaseo-filter">%1$s</select>', $options);
128
echo $sl_duplicate;
129
+ echo '<input type="submit" name="do_filter" id="post-query-submit" class="wpmsbtn wpmsbtn_small wpmsbtn_secondary" value="'.__('Filter', 'wp-meta-seo').'">';
130
echo $sl_bulk . $btn_bulk;
131
echo "</div>";
132
}
inc/class.metaseo-front_end.php CHANGED
@@ -39,11 +39,25 @@ class MetaSeo_Front {
39
if (is_array($ga_tracking)) {
40
$this->ga_tracking = array_merge($this->ga_tracking, $ga_tracking);
41
}
42
43
add_action( 'wp_head', array( $this, 'tracking_code' ), 99 );
44
}
45
46
public function tracking_code() {
47
48
if (WPMSGA_Tools::check_roles($this->ga_tracking['wpmsga_track_exclude'], true)) {
49
return;
@@ -54,22 +68,40 @@ class MetaSeo_Front {
54
$traking_type = $this->ga_tracking['wpmsga_dash_tracking_type'];
55
if ($traking_mode > 0) {
56
if (empty($google_alanytics['tableid_jail'])) {
57
- return;
58
- }
59
- if ($traking_type == "classic") {
60
- echo "\n<!-- BEGIN WPMSGA v" . WPMSEO_VERSION . " Classic Tracking - https://wordpress.org/plugins/wp-meta-seo/ -->\n";
61
- if ($this->ga_tracking['wpmsga_event_tracking']) {
62
- require_once 'google_analytics/tracking/events-classic.php';
63
}
64
- require_once 'google_analytics/tracking/code-classic.php';
65
- echo "\n<!-- END WPMSGA Classic Tracking -->\n\n";
66
- } else {
67
- echo "\n<!-- BEGIN WPMSGA v" . WPMSEO_VERSION . " Universal Tracking - https://wordpress.org/plugins/wp-meta-seo/ -->\n";
68
- if ($this->ga_tracking['wpmsga_event_tracking'] || $this->ga_tracking['wpmsga_aff_tracking'] || $this->ga_tracking['wpmsga_hash_tracking']) {
69
- require_once 'google_analytics/tracking/events-universal.php';
70
}
71
- require_once 'google_analytics/tracking/code-universal.php';
72
- echo "\n<!-- END WPMSGA Universal Tracking -->\n\n";
73
}
74
}
75
}
39
if (is_array($ga_tracking)) {
40
$this->ga_tracking = array_merge($this->ga_tracking, $ga_tracking);
41
}
42
+
43
+ $this->ga_tracking_disconnect = array(
44
+ 'wpms_ga_uax_reference' => '',
45
+ 'wpmsga_dash_tracking_type' => 'classic',
46
+ 'wpmsga_code_tracking' => ''
47
+ );
48
+ $ga_tracking_disconnect = get_option('_metaseo_ggtracking_disconnect_settings');
49
+ if (is_array($ga_tracking_disconnect)) {
50
+ $this->ga_tracking_disconnect = array_merge($this->ga_tracking_disconnect, $ga_tracking_disconnect);
51
+ }
52
53
add_action( 'wp_head', array( $this, 'tracking_code' ), 99 );
54
}
55
56
public function tracking_code() {
57
+ if(!empty($this->ga_tracking['wpmsga_code_tracking'])){
58
+ require_once 'google_analytics/tracking/custom.php';
59
+ return;
60
+ }
61
62
if (WPMSGA_Tools::check_roles($this->ga_tracking['wpmsga_track_exclude'], true)) {
63
return;
68
$traking_type = $this->ga_tracking['wpmsga_dash_tracking_type'];
69
if ($traking_mode > 0) {
70
if (empty($google_alanytics['tableid_jail'])) {
71
+ if(!empty($this->ga_tracking_disconnect['wpmsga_code_tracking'])){
72
+ echo '<script type="text/javascript">';
73
+ echo strip_tags($this->ga_tracking_disconnect['wpmsga_code_tracking'],'</script>');
74
+ echo '</script>';
75
+ }else{
76
+ if(empty($this->ga_tracking_disconnect['wpms_ga_uax_reference'])){
77
+ return;
78
+ }
79
+ if ($traking_type == "classic") {
80
+ echo "\n<!-- BEGIN WPMSGA v" . WPMSEO_VERSION . " Classic Tracking - https://wordpress.org/plugins/wp-meta-seo/ -->\n";
81
+ require_once 'google_analytics/tracking/classic_disconnect.php';
82
+ echo "\n<!-- END WPMSGA Classic Tracking -->\n\n";
83
+ } else {
84
+ echo "\n<!-- BEGIN WPMSGA v" . WPMSEO_VERSION . " Universal Tracking - https://wordpress.org/plugins/wp-meta-seo/ -->\n";
85
+ require_once 'google_analytics/tracking/universal_disconnect.php';
86
+ echo "\n<!-- END WPMSGA Universal Tracking -->\n\n";
87
+ }
88
}
89
+ }else{
90
+ if ($traking_type == "classic") {
91
+ echo "\n<!-- BEGIN WPMSGA v" . WPMSEO_VERSION . " Classic Tracking - https://wordpress.org/plugins/wp-meta-seo/ -->\n";
92
+ if ($this->ga_tracking['wpmsga_event_tracking']) {
93
+ require_once 'google_analytics/tracking/events-classic.php';
94
+ }
95
+ require_once 'google_analytics/tracking/code-classic.php';
96
+ echo "\n<!-- END WPMSGA Classic Tracking -->\n\n";
97
+ } else {
98
+ echo "\n<!-- BEGIN WPMSGA v" . WPMSEO_VERSION . " Universal Tracking - https://wordpress.org/plugins/wp-meta-seo/ -->\n";
99
+ if ($this->ga_tracking['wpmsga_event_tracking'] || $this->ga_tracking['wpmsga_aff_tracking'] || $this->ga_tracking['wpmsga_hash_tracking']) {
100
+ require_once 'google_analytics/tracking/events-universal.php';
101
+ }
102
+ require_once 'google_analytics/tracking/code-universal.php';
103
+ echo "\n<!-- END WPMSGA Universal Tracking -->\n\n";
104
}
105
}
106
}
107
}
inc/class.metaseo-image-list-table.php CHANGED
@@ -33,23 +33,35 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
33
<?php if ($which == 'top'): ?>
34
<input type="hidden" name="page" value="metaseo_image_meta" />
35
<div class="alignleft actions bulkactions">
36
- <?php $this->months_fillter('sldate', 'filter_date_action'); ?>
37
</div>
38
<?php elseif ($which == 'bottom'): ?>
39
<input type="hidden" name="page" value="metaseo_image_meta" />
40
<div class="alignleft actions bulkactions">
41
- <?php $this->months_fillter('sldate1', 'filter_date_action'); ?>
42
</div>
43
<?php endif ?>
44
45
- <div class="alignleft">
46
<select name="image_mbulk_copy" class="mbulk_copy">
47
<option value="0"><?php _e('Bulk copy', 'wp-meta-seo') ?></option>
48
<option value="all"><?php _e('All Images', 'wp-meta-seo') ?></option>
49
<option value="bulk-copy-title-alt"><?php _e('Selected images', 'wp-meta-seo') ?></option>
50
</select>
51
- <input type="button" name="image_do_copy_alt" class="button button-primary btn_do_copy image_do_copy_alt" value="<?php _e('Image name as alt text', 'wp-meta-seo') ?>">
52
- <input type="button" name="image_do_copy_title" class="button button-primary btn_do_copy image_do_copy_title" value="<?php _e('Image name as image title', 'wp-meta-seo') ?>">
53
<span class="spinner"></span>
54
</div>
55
@@ -321,17 +333,25 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
321
$orderStr = str_replace("'", "", $orderStr);
322
}
323
324
$query = "SELECT COUNT(ID)
325
FROM $wpdb->posts as posts
326
- LEFT JOIN (SELECT * FROM {$wpdb->prefix}postmeta WHERE meta_key = '_wp_attachment_image_alt') mt ON mt.post_id = posts.ID
327
WHERE " . implode(" and ", $where) . $orderStr;
328
329
$total_items = $wpdb->get_var($query);
330
-
331
$query = "SELECT ID, post_title as title, post_name as name, post_content as des, post_excerpt as legend, guid, post_type , post_mime_type, post_status, mt.meta_value AS alt
332
FROM $wpdb->posts as posts
333
- LEFT JOIN (SELECT * FROM {$wpdb->prefix}postmeta WHERE meta_key = '_wp_attachment_image_alt') mt ON mt.post_id = posts.ID
334
WHERE " . implode(" and ", $where) . $orderStr;
335
if (!empty($_REQUEST['metaseo_imgs_per_page'])) {
336
$_per_page = intval($_REQUEST['metaseo_imgs_per_page']);
337
} else {
@@ -403,7 +423,7 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
403
}
404
405
/* Add fillter month */
406
- function months_fillter($name, $namebutton) {
407
global $wpdb, $wp_locale;
408
$month_count = count($this->months);
409
if (!$month_count || ( 1 == $month_count && 0 == $this->months[0]->month ))
@@ -428,9 +448,21 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
428
</select>
429
430
<?php
431
- submit_button(__('Filter', 'wp-meta-seo'), 'button', $namebutton, false, array('id' => 'image-submit'));
432
}
433
-
434
/**
435
* Generate the table rows
436
*/
@@ -849,11 +881,16 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
849
$redirect = true;
850
}
851
852
- if (isset($_POST['filter_date_action'])) {
853
$current_url = add_query_arg(array("sldate" => $_POST["sldate"]), $current_url);
854
$redirect = true;
855
}
856
857
if (!empty($_POST['paged'])) {
858
$current_url = add_query_arg(array("paged" => intval($_POST['paged'])), $current_url);
859
$redirect = true;
@@ -1027,6 +1064,19 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
1027
$msg = ImageHelper::IScanPosts($_imgs, true);
1028
$ret['msg'] = $msg;
1029
$ret['success'] = true;
1030
} else {
1031
$ret['success'] = false;
1032
$ret['msg'] = 'No images are available, please check again!';
@@ -1424,4 +1474,222 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
1424
wp_die();
1425
}
1426
}
1427
}
33
<?php if ($which == 'top'): ?>
34
<input type="hidden" name="page" value="metaseo_image_meta" />
35
<div class="alignleft actions bulkactions">
36
+ <?php
37
+ $this->months_fillter('sldate');
38
+ $this->meta_fillter('slmeta', 'filter_meta_action');
39
+ ?>
40
</div>
41
<?php elseif ($which == 'bottom'): ?>
42
<input type="hidden" name="page" value="metaseo_image_meta" />
43
<div class="alignleft actions bulkactions">
44
+ <?php
45
+ $this->months_fillter('sldate1');
46
+ $this->meta_fillter('slmeta1', 'filter_meta_action');
47
+ ?>
48
</div>
49
<?php endif ?>
50
51
+ <div class="alignleft actions">
52
<select name="image_mbulk_copy" class="mbulk_copy">
53
<option value="0"><?php _e('Bulk copy', 'wp-meta-seo') ?></option>
54
<option value="all"><?php _e('All Images', 'wp-meta-seo') ?></option>
55
<option value="bulk-copy-title-alt"><?php _e('Selected images', 'wp-meta-seo') ?></option>
56
</select>
57
+ <input type="button" name="image_do_copy_alt" class="wpmsbtn wpmsbtn_small btn_do_copy image_do_copy_alt" value="<?php _e('Image name as alt text', 'wp-meta-seo') ?>">
58
+ <input type="button" name="image_do_copy_title" class="wpmsbtn wpmsbtn_small btn_do_copy image_do_copy_title" value="<?php _e('Image name as image title', 'wp-meta-seo') ?>">
59
+ <?php if($which == 'top'): ?>
60
+ <div style="float:left;position: relative;">
61
+ <div class="wpms_process_meta" data-w="0" style="position: absolute;top: -2px;"></div>
62
+ <input type="button" name="image_scan_meta" class="wpmsbtn wpmsbtn_small image_scan_meta" data-paged="1" value="<?php _e('Index images', 'wp-meta-seo') ?>">
63
+ </div>
64
+ <?php endif; ?>
65
<span class="spinner"></span>
66
</div>
67
333
$orderStr = str_replace("'", "", $orderStr);
334
}
335
336
+ if(isset($_GET['slmeta']) && $_GET['slmeta'] == 'missing_information'){
337
+ $join = "INNER JOIN (SELECT * FROM {$wpdb->prefix}postmeta WHERE meta_key = 'wpms_missing_information') mt ON mt.post_id = posts.ID ";
338
+ }elseif(isset($_GET['slmeta']) && $_GET['slmeta'] == 'resizeimages'){
339
+ $join = "INNER JOIN (SELECT * FROM {$wpdb->prefix}postmeta WHERE meta_key = 'wpms_resizeimages' AND meta_value = 1) mt ON mt.post_id = posts.ID ";
340
+ }else{
341
+ $join = "LEFT JOIN (SELECT * FROM {$wpdb->prefix}postmeta WHERE meta_key = '_wp_attachment_image_alt' AND meta_value = 1) mt ON mt.post_id = posts.ID ";
342
+ }
343
+
344
$query = "SELECT COUNT(ID)
345
FROM $wpdb->posts as posts
346
+ ". $join ."
347
WHERE " . implode(" and ", $where) . $orderStr;
348
349
$total_items = $wpdb->get_var($query);
350
$query = "SELECT ID, post_title as title, post_name as name, post_content as des, post_excerpt as legend, guid, post_type , post_mime_type, post_status, mt.meta_value AS alt
351
FROM $wpdb->posts as posts
352
+ ". $join ."
353
WHERE " . implode(" and ", $where) . $orderStr;
354
+
355
if (!empty($_REQUEST['metaseo_imgs_per_page'])) {
356
$_per_page = intval($_REQUEST['metaseo_imgs_per_page']);
357
} else {
423
}
424
425
/* Add fillter month */
426
+ function months_fillter($name) {
427
global $wpdb, $wp_locale;
428
$month_count = count($this->months);
429
if (!$month_count || ( 1 == $month_count && 0 == $this->months[0]->month ))
448
</select>
449
450
<?php
451
}
452
+
453
+ function meta_fillter($name, $namebutton) {
454
+ $m = isset($_REQUEST['slmeta']) ? $_REQUEST['slmeta'] : 0;
455
+ ?>
456
+ <select name="<?php echo $name ?>" id="filter-by-meta" class="meta_filter">
457
+ <option <?php selected($m,'all') ?> value="all"><?php _e('All images','wp-meta-seo') ?></option>
458
+ <option <?php selected($m,'missing_information') ?> value="missing_information"><?php _e('Image with missing information','wp-meta-seo') ?></option>
459
+ <option <?php selected($m,'resizeimages') ?> value="resizeimages"><?php _e('HTML resized images','wp-meta-seo') ?></option>
460
+ </select>
461
+ <input type="submit" name="filter_meta_action" id="image-submit" class="wpmsbtn wpmsbtn_small wpmsbtn_secondary" value="<?php _e('Filter', 'wp-meta-seo') ?>">
462
+ <span class="spinner imgspinner"></span>
463
+ <?php
464
+ }
465
+
466
/**
467
* Generate the table rows
468
*/
881
$redirect = true;
882
}
883
884
+ if (isset($_POST['sldate'])) {
885
$current_url = add_query_arg(array("sldate" => $_POST["sldate"]), $current_url);
886
$redirect = true;
887
}
888
889
+ if (isset($_POST['slmeta'])) {
890
+ $current_url = add_query_arg(array("slmeta" => $_POST["slmeta"]), $current_url);
891
+ $redirect = true;
892
+ }
893
+
894
if (!empty($_POST['paged'])) {
895
$current_url = add_query_arg(array("paged" => intval($_POST['paged'])), $current_url);
896
$redirect = true;
1064
$msg = ImageHelper::IScanPosts($_imgs, true);
1065
$ret['msg'] = $msg;
1066
$ret['success'] = true;
1067
+
1068
+ if(isset($_POST['imgs']['type']) && $_POST['imgs']['type'] == 'update_meta'){
1069
+ if($ret['msg'][$_POST['imgs']['img_post_id']]['imNotGood']['warning']){
1070
+ update_post_meta($_POST['imgs']['img_post_id'],'wpms_missing_information',1);
1071
+ }else{
1072
+ delete_post_meta($_POST['imgs']['img_post_id'],'wpms_missing_information');
1073
+ }
1074
+ if($ret['msg'][$_POST['imgs']['img_post_id']]['iNotGood']['warning']){
1075
+ update_post_meta($_POST['imgs']['img_post_id'],'wpms_resizeimages',1);
1076
+ }else{
1077
+ delete_post_meta($_POST['imgs']['img_post_id'],'wpms_resizeimages');
1078
+ }
1079
+ }
1080
} else {
1081
$ret['success'] = false;
1082
$ret['msg'] = 'No images are available, please check again!';
1474
wp_die();
1475
}
1476
}
1477
+
1478
+ public static function wpms_image_scan_meta(){
1479
+ if (!current_user_can('manage_options')) {
1480
+ wp_send_json(false);
1481
+ }
1482
+ global $wpdb;
1483
+ $limit = 1;
1484
+ $ofset = ((int) $_POST['paged'] - 1) * $limit;
1485
+
1486
+ $where = array();
1487
+ $where[] = " post_type='attachment' ";
1488
+ $where[] = " ((post_mime_type='image/jpeg') OR (post_mime_type='image/jpg') OR (post_mime_type='image/png') OR (post_mime_type='image/gif')) ";
1489
+ $query = "SELECT COUNT(ID) FROM $wpdb->posts as posts WHERE " . implode(" and ", $where);
1490
+ $count_images = $wpdb->get_var($query);
1491
+ $present = (100 / $count_images) * $limit;
1492
+
1493
+ $k = 0;
1494
+ $sql = $wpdb->prepare("SELECT ID FROM " . $wpdb->posts . " WHERE " . implode(" AND ", $where) . " LIMIT %d OFFSET %d",array($limit,$ofset));
1495
+ $attachments = $wpdb->get_results($sql);
1496
+ if (empty($attachments)){
1497
+ wp_send_json(array('status' => 'ok'));
1498
+ }
1499
+
1500
+ foreach ($attachments as $image) {
1501
+ $path = get_attached_file($image->ID);
1502
+ $infos = pathinfo($path);
1503
+ $img_name = $infos['basename'];
1504
+ $imgs = array('name' => $img_name , 'img_post_id' => $image->ID);
1505
+ $results = MetaSeo_Image_List_Table::wpms_scan_posts_meta($imgs,false,0);
1506
+ if($results['msg'][$image->ID]['imNotGood']['warning']){
1507
+ update_post_meta($image->ID,'wpms_missing_information',1);
1508
+ }else{
1509
+ delete_post_meta($image->ID,'wpms_missing_information');
1510
+ }
1511
+ if($results['msg'][$image->ID]['iNotGood']['warning']){
1512
+ update_post_meta($image->ID,'wpms_resizeimages',1);
1513
+ }else{
1514
+ delete_post_meta($image->ID,'wpms_resizeimages');
1515
+ }
1516
+ $k++;
1517
+ }
1518
+
1519
+ if ($k >= $limit) {
1520
+ wp_send_json(array('status' => 'error_time', 'paged' => $_POST['paged'] ,'precent' => $present));
1521
+ }else{
1522
+ wp_send_json(array('status' => 'ok'));
1523
+ }
1524
+ }
1525
+
1526
+ public static function wpms_scan_posts_meta($imgs,$delete = false,$pid = 0) {
1527
+ if (!empty($imgs)) {
1528
+ if (!is_array($imgs)) {
1529
+ $ret['success'] = false;
1530
+ $ret['msg'] = 'No images are available, please check again!';
1531
+ return $ret;
1532
+ }
1533
+
1534
+ $_imgs = array();
1535
+ $_imgs[trim($imgs['name'])] = $imgs['img_post_id'];
1536
+ unset($imgs);
1537
+
1538
+ if (!count($_imgs)) {
1539
+ $ret['success'] = false;
1540
+ $ret['msg'] = 'No images are available, please check again!';
1541
+ return $ret;
1542
+ }
1543
+
1544
+ $msg = ImageHelper::IScanPosts($_imgs, true, false, $delete, $pid);
1545
+ $ret['msg'] = $msg;
1546
+ $ret['success'] = true;
1547
+ } else {
1548
+ $ret['success'] = false;
1549
+ $ret['msg'] = 'No images are available, please check again!';
1550
+ }
1551
+
1552
+ return $ret;
1553
+ }
1554
+
1555
+ /*
1556
+ * update meta missing info and meta resize after delete post
1557
+ */
1558
+ public static function wpmf_delete_attachment($pid) {
1559
+ $post = get_post($pid);
1560
+ if(!empty($post)){
1561
+ $post_type = get_post_type($pid);
1562
+ $post_types = get_post_types(array('public' => true, 'exclude_from_search' => false));
1563
+ if(isset($post_types['attachment'])){
1564
+ unset($post_types['attachment']);
1565
+ }
1566
+
1567
+ if (in_array($post_type, $post_types)) {
1568
+ $dom = new DOMDocument();
1569
+ libxml_use_internal_errors( true );
1570
+ @$dom->loadHtml($post->post_content);
1571
+ $tags = $dom->getElementsByTagName('img');
1572
+ if(!empty($tags)){
1573
+ foreach($tags as $tag){
1574
+ $url = $tag->getAttribute('src');
1575
+ $postid = MetaSeo_Image_List_Table::get_attachment_id($url);
1576
+ $path = get_attached_file($postid);
1577
+ $infos = pathinfo($path);
1578
+ $img_name = $infos['basename'];
1579
+ $imgs = array('name' => $img_name , 'img_post_id' => $postid);
1580
+ $results = MetaSeo_Image_List_Table::wpms_scan_posts_meta($imgs,true,$pid);
1581
+
1582
+ // update or delete meta
1583
+ if($results['msg'][$postid]['imNotGood']['warning']){
1584
+ update_post_meta($postid,'wpms_missing_information',1);
1585
+ }else{
1586
+ delete_post_meta($postid,'wpms_missing_information');
1587
+ }
1588
+ if($results['msg'][$postid]['iNotGood']['warning']){
1589
+ update_post_meta($postid,'wpms_resizeimages',1);
1590
+ }else{
1591
+ delete_post_meta($postid,'wpms_resizeimages');
1592
+ }
1593
+
1594
+ }
1595
+ }
1596
+ }
1597
+ }
1598
+ }
1599
+
1600
+ /*
1601
+ * update meta missing info and meta resize after update post
1602
+ */
1603
+ public static function wpms_update_post($post_ID, $post_after, $post_before) {
1604
+ $old_imgs = MetaSeo_Image_List_Table::wpms_get_img_in_content($post_before); // return list img in post before
1605
+ $dom = new DOMDocument();
1606
+ libxml_use_internal_errors( true );
1607
+ @$dom->loadHtml($post_after->post_content);
1608
+ $tags = $dom->getElementsByTagName('img');
1609
+ $new_imgs = array(); // return list img in post after
1610
+ if(!empty($tags)){
1611
+ foreach($tags as $tag){
1612
+ $url = $tag->getAttribute('src');
1613
+ $postid = MetaSeo_Image_List_Table::get_attachment_id($url);
1614
+ $new_imgs[] = $postid;
1615
+ $post = get_post($postid);
1616
+ if(!empty($post)){
1617
+ $path = get_attached_file($postid);
1618
+ $infos = pathinfo($path);
1619
+ $img_name = $infos['basename'];
1620
+ $imgs = array('name' => $img_name , 'img_post_id' => $postid);
1621
+ $results = MetaSeo_Image_List_Table::wpms_scan_posts_meta($imgs,false,0);
1622
+
1623
+ // update or delete meta
1624
+ if($results['msg'][$postid]['imNotGood']['warning']){
1625
+ update_post_meta($postid,'wpms_missing_information',1);
1626
+ }else{
1627
+ delete_post_meta($postid,'wpms_missing_information');
1628
+ }
1629
+ if($results['msg'][$postid]['iNotGood']['warning']){
1630
+ update_post_meta($postid,'wpms_resizeimages',1);
1631
+ }else{
1632
+ delete_post_meta($postid,'wpms_resizeimages');
1633
+ }
1634
+ }
1635
+ }
1636
+ }
1637
+
1638
+ // remove post meta
1639
+ $imgs_diff = array_diff($old_imgs,$new_imgs);
1640
+ if(!empty($imgs_diff)){
1641
+ foreach ($imgs_diff as $id){
1642
+ delete_post_meta($id,'wpms_missing_information');
1643
+ delete_post_meta($id,'wpms_resizeimages');
1644
+ }
1645
+ }
1646
+ }
1647
+
1648
+ public static function wpms_get_img_in_content($post_before) {
1649
+ $dom = new DOMDocument();
1650
+ libxml_use_internal_errors( true );
1651
+ @$dom->loadHtml($post_before->post_content);
1652
+ $tags = $dom->getElementsByTagName('img');
1653
+ $ids = array();
1654
+ if(empty($tags)) return $ids;
1655
+ foreach($tags as $tag){
1656
+ $url = $tag->getAttribute('src');
1657
+ $postid = MetaSeo_Image_List_Table::get_attachment_id($url);
1658
+ $ids[] = $postid;
1659
+ }
1660
+ return $ids;
1661
+ }
1662
+
1663
+ public static function get_attachment_id( $url ) {
1664
+ $attachment_id = 0;
1665
+ $dir = wp_upload_dir();
1666
+ if ( false !== strpos( $url, $dir['baseurl'] . '/' ) ) { // Is URL in uploads directory?
1667
+ $file = basename( $url );
1668
+ $query_args = array(
1669
+ 'post_type' => 'attachment',
1670
+ 'post_status' => 'inherit',
1671
+ 'fields' => 'ids',
1672
+ 'meta_query' => array(
1673
+ array(
1674
+ 'value' => $file,
1675
+ 'compare' => 'LIKE',
1676
+ 'key' => '_wp_attachment_metadata',
1677
+ ),
1678
+ )
1679
+ );
1680
+ $query = new WP_Query( $query_args );
1681
+ if ( $query->have_posts() ) {
1682
+ foreach ( $query->posts as $post_id ) {
1683
+ $meta = wp_get_attachment_metadata( $post_id );
1684
+ $original_file = basename( $meta['file'] );
1685
+ $cropped_image_files = wp_list_pluck( $meta['sizes'], 'file' );
1686
+ if ( $original_file === $file || in_array( $file, $cropped_image_files ) ) {
1687
+ $attachment_id = $post_id;
1688
+ break;
1689
+ }
1690
+ }
1691
+ }
1692
+ }
1693
+ return $attachment_id;
1694
+ }
1695
}
inc/class.metaseo-link-list-table.php CHANGED
@@ -410,8 +410,8 @@ class MetaSeo_Link_List_Table extends WP_List_Table {
410
<option value="follow_all"><?php _e('Follow all', 'wp-meta-seo') ?></option>
411
<option value="nofollow_all"><?php _e('Nofollow all', 'wp-meta-seo') ?></option>
412
</select>
413
- <input type="button" class="button btn_apply_follow" value="<?php _e('Apply', 'wp-meta-seo') ?>">
414
- <div data-comment_paged="1" data-paged="1" class="button wpms_scan_link page_link_meta"><?php _e('Re-index content links', 'wp-meta-seo') ?></div>
415
<span class="spinner spinner_apply_follow"></span>
416
<?php
417
}
@@ -457,9 +457,8 @@ class MetaSeo_Link_List_Table extends WP_List_Table {
457
}
458
?>
459
</select>
460
-
461
<?php
462
- submit_button(__('Filter', 'wp-meta-seo'), 'button', $namebutton, false, array('id' => 'image-submit'));
463
}
464
465
/**
410
<option value="follow_all"><?php _e('Follow all', 'wp-meta-seo') ?></option>
411
<option value="nofollow_all"><?php _e('Nofollow all', 'wp-meta-seo') ?></option>
412
</select>
413
+ <input type="button" class="wpmsbtn wpmsbtn_small wpmsbtn_secondary btn_apply_follow" value="<?php _e('Apply', 'wp-meta-seo') ?>">
414
+ <div data-comment_paged="1" data-paged="1" class="wpmsbtn wpmsbtn_small wpms_scan_link page_link_meta"><?php _e('Re-index content links', 'wp-meta-seo') ?></div>
415
<span class="spinner spinner_apply_follow"></span>
416
<?php
417
}
457
}
458
?>
459
</select>
460
+ <input type="submit" name="filter_date_action" id="image-submit" class="wpmsbtn wpmsbtn_small wpmsbtn_secondary" value="<?php _e('Filter', 'wp-meta-seo') ?>">
461
<?php
462
}
463
464
/**
inc/class.metaseo-sitemap.php CHANGED
@@ -95,9 +95,6 @@ class MetaSeo_Sitemap {
95
if (!empty($current_screen) && $current_screen->base != 'wp-meta-seo_page_metaseo_google_sitemap')
96
return;
97
98
- wp_enqueue_style('metaseo-google-icon', '//fonts.googleapis.com/icon?family=Material+Icons');
99
- wp_enqueue_script('wpms_materialize_js', plugins_url('js/materialize/materialize.min.js', dirname(__FILE__)), array('jquery'), WPMSEO_VERSION, true);
100
- wp_enqueue_style('wpms_materialize_style', plugins_url('css/materialize/materialize.css', dirname(__FILE__)), array(), WPMSEO_VERSION);
101
wp_enqueue_script('metaseositemap', plugins_url('js/metaseo_sitemap.js', dirname(__FILE__)), array('jquery'), WPMSEO_VERSION, true);
102
wp_localize_script('metaseositemap', 'wpmseositemap', $this->meta_seo_localize_script());
103
wp_enqueue_script('jpage-js', plugins_url('js/jPages.js', dirname(__FILE__)), array('jquery'), WPMSEO_VERSION, true);
@@ -162,11 +159,17 @@ class MetaSeo_Sitemap {
162
public function wpms_sitemap_add() {
163
?>
164
<?php if (is_multisite()) { ?>
165
- <label><input id="wpms_sitemap_add" type='checkbox' disabled="disabled" name='_metaseo_settings_sitemap[wpms_sitemap_add]' value="1" <?php checked(1, $this->settings_sitemap['wpms_sitemap_add']); ?> /> <?php _e("add sitemap file path in robots.txt", 'wp-meta-seo'); ?></label>
166
<p style="color:red"><?php _e("Since you are using multisite, the plugin does not allow to add a sitemap to robots.txt", 'wp-meta-seo'); ?></p>
167
<?php } else { ?>
168
<!-- for robots.txt we need to use site_url instead home_url ! -->
169
- <label><input id="wpms_sitemap_add" type='checkbox' name='_metaseo_settings_sitemap[wpms_sitemap_add]' value="1" <?php checked(1, $this->settings_sitemap['wpms_sitemap_add']); ?> /> <?php _e("add sitemap link in the", 'wp-meta-seo'); ?> <a href="<?php echo site_url('/'); ?>robots.txt" target="_new">robots.txt</a></label>
170
<?php
171
}
172
}
@@ -174,7 +177,10 @@ class MetaSeo_Sitemap {
174
/* Display field sitemap root */
175
public function wpms_sitemap_root() {
176
?>
177
- <label><input id="wpms_sitemap_root" type='checkbox' name='_metaseo_settings_sitemap[wpms_sitemap_root]' value="1" <?php checked(1, $this->settings_sitemap['wpms_sitemap_root']); ?> /> <?php _e("Add a sitemap.xml copy @ the site root", 'wp-meta-seo'); ?></label>
178
<?php
179
}
180
@@ -188,7 +194,10 @@ class MetaSeo_Sitemap {
188
/* Display field sitemap author */
189
public function wpms_sitemap_author() {
190
?>
191
- <label><input id="wpms_sitemap_author" type='checkbox' name='_metaseo_settings_sitemap[wpms_sitemap_author]' value="1" <?php checked(1, $this->settings_sitemap['wpms_sitemap_author']); ?> /> <?php _e("Display author post archive", 'wp-meta-seo'); ?></label>
192
<?php
193
}
194
@@ -200,7 +209,10 @@ class MetaSeo_Sitemap {
200
);
201
foreach ($wpms_taxonomies as $key => $value) {
202
?>
203
- <label><input class="wpms_sitemap_taxonomies" id="wpms_sitemap_taxonomies_<?php echo $key; ?>" type="checkbox" name="_metaseo_settings_sitemap[wpms_sitemap_taxonomies][]" value="<?php echo $key; ?>" <?php if (in_array($key, $this->settings_sitemap['wpms_sitemap_taxonomies'])) echo 'checked' ?>/><span style="padding-left: 5px;"><?php echo $value; ?></span></label><br />
204
<?php
205
}
206
}
@@ -856,7 +868,7 @@ class MetaSeo_Sitemap {
856
$custom_post_types = get_post_types(array('public' => true, 'exclude_from_search' => false, '_builtin' => false));
857
if (!empty($custom_post_types)) {
858
foreach ($custom_post_types as $post_type => $label) {
859
- if ($i == (int)$this->settings_sitemap['wpms_display_column_' . $post_type]) {
860
//=====================================================================================
861
if(isset($this->settings_sitemap['wpms_public_name_'.$post_type]) && $this->settings_sitemap['wpms_public_name_'.$post_type] != ''){
862
$postTitle = $this->settings_sitemap['wpms_public_name_'.$post_type];
@@ -1390,7 +1402,12 @@ ORDER BY p.post_date DESC",array($post_type,$taxo,$cat->slug));
1390
$submenus = $query->get_posts();
1391
$settings_sitemap = get_option('_metaseo_settings_sitemap');
1392
1393
- $this->html .= '<h3><input type="checkbox" class="sitemap_check_all_posts_categories" data-category="nav_menu' . $term->slug . '">' . $term->name . '</h3>';
1394
$this->html .= '<div class="wpms_xmp_custom_column" style="font-weight: bold;">';
1395
$this->html .= '<label>'.__('Display in column', 'wp-meta-seo').'</label>';
1396
$this->html .= '<select class="wpms_display_column wpms_display_column_menus" data-menu_id="' . $term->term_id . '">';
@@ -1428,24 +1445,32 @@ ORDER BY p.post_date DESC",array($post_type,$taxo,$cat->slug));
1428
}
1429
}
1430
$level = 1;
1431
- $this->html .= '<div class="wpms_row">';
1432
$check_type = get_post_meta($menu->ID, '_menu_item_object', true);
1433
$permalink = $this->wpms_get_permalink_sitemap($check_type, $id_menu);
1434
$this->html .= '<div style="float:left;line-height:30px">';
1435
if (empty($this->settings_sitemap['wpms_check_firstsave'])) {
1436
$this->html .= '<input class="wpms_sitemap_input_link checked" type="hidden" data-type="menu" value="'.$permalink.'">';
1437
- $checkbox = '<input class="cb_sitemaps_menu wpms_xmap_menu nav_menu' . $term->slug . '" checked name="_metaseo_settings_sitemap[wpms_sitemap_menus][' . $menu->ID . '][menu_id]" type="checkbox" value="' . $menu->ID . '">';
1438
} else {
1439
if (isset($this->settings_sitemap['wpms_sitemap_menus'][$menu->ID]['menu_id']) && $this->settings_sitemap['wpms_sitemap_menus'][$menu->ID]['menu_id'] == $menu->ID) {
1440
$this->html .= '<input class="wpms_sitemap_input_link checked" type="hidden" data-type="menu" value="'.$permalink.'">';
1441
- $checkbox = '<input class="cb_sitemaps_menu wpms_xmap_menu nav_menu' . $term->slug . '" checked name="_metaseo_settings_sitemap[wpms_sitemap_menus][' . $menu->ID . '][menu_id]" type="checkbox" value="' . $menu->ID . '">';
1442
} else {
1443
$this->html .= '<input class="wpms_sitemap_input_link" type="hidden" data-type="menu" value="'.$permalink.'">';
1444
- $checkbox = '<input class="cb_sitemaps_menu wpms_xmap_menu nav_menu' . $term->slug . '" name="_metaseo_settings_sitemap[wpms_sitemap_menus][' . $menu->ID . '][menu_id]" type="checkbox" value="' . $menu->ID . '">';
1445
}
1446
}
1447
1448
- $this->html .= $checkbox . $title;
1449
$this->html .= '</div>';
1450
$this->html .= '<div style="margin-left:200px">' . $select_priority . $select_frequency . '</div>';
1451
$this->html .= '</div>';
95
if (!empty($current_screen) && $current_screen->base != 'wp-meta-seo_page_metaseo_google_sitemap')
96
return;
97
98
wp_enqueue_script('metaseositemap', plugins_url('js/metaseo_sitemap.js', dirname(__FILE__)), array('jquery'), WPMSEO_VERSION, true);
99
wp_localize_script('metaseositemap', 'wpmseositemap', $this->meta_seo_localize_script());
100
wp_enqueue_script('jpage-js', plugins_url('js/jPages.js', dirname(__FILE__)), array('jquery'), WPMSEO_VERSION, true);
159
public function wpms_sitemap_add() {
160
?>
161
<?php if (is_multisite()) { ?>
162
+ <div class="pure-checkbox">
163
+ <input id="wpms_sitemap_add" disabled="disabled" type="checkbox" name="_metaseo_settings_sitemap[wpms_sitemap_add]" value="1" <?php checked(1, $this->settings_sitemap['wpms_sitemap_add']); ?>>
164
+ <label for="wpms_sitemap_add"><?php _e("add sitemap file path in robots.txt", 'wp-meta-seo'); ?></label>
165
+ </div>
166
<p style="color:red"><?php _e("Since you are using multisite, the plugin does not allow to add a sitemap to robots.txt", 'wp-meta-seo'); ?></p>
167
<?php } else { ?>
168
<!-- for robots.txt we need to use site_url instead home_url ! -->
169
+ <div class="pure-checkbox">
170
+ <input id="wpms_sitemap_add" type="checkbox" name="_metaseo_settings_sitemap[wpms_sitemap_add]" value="1" <?php checked(1, $this->settings_sitemap['wpms_sitemap_add']); ?>>
171
+ <label for="wpms_sitemap_add"><?php _e("add sitemap link in the", 'wp-meta-seo'); ?> <a href="<?php echo site_url('/'); ?>robots.txt" target="_new">robots.txt</a></label>
172
+ </div>
173
<?php
174
}
175
}
177
/* Display field sitemap root */
178
public function wpms_sitemap_root() {
179
?>
180
+ <div class="pure-checkbox">
181
+ <input id="wpms_sitemap_root" type="checkbox" name="_metaseo_settings_sitemap[wpms_sitemap_root]" value="1" <?php checked(1, $this->settings_sitemap['wpms_sitemap_root']); ?>>
182
+ <label for="wpms_sitemap_root"><?php _e("Add a sitemap.xml copy @ the site root", 'wp-meta-seo'); ?></label>
183
+ </div>
184
<?php
185
}
186
194
/* Display field sitemap author */
195
public function wpms_sitemap_author() {
196
?>
197
+ <div class="pure-checkbox">
198
+ <input id="wpms_sitemap_author" type="checkbox" name="_metaseo_settings_sitemap[wpms_sitemap_author]" value="1" <?php checked(1, $this->settings_sitemap['wpms_sitemap_author']); ?>>
199
+ <label for="wpms_sitemap_author"><?php _e("Display author post archive", 'wp-meta-seo'); ?></label>
200
+ </div>
201
<?php
202
}
203
209
);
210
foreach ($wpms_taxonomies as $key => $value) {
211
?>
212
+ <div class="pure-checkbox">
213
+ <input class="wpms_sitemap_taxonomies" id="wpms_sitemap_taxonomies_<?php echo $key; ?>" type="checkbox" name="_metaseo_settings_sitemap[wpms_sitemap_taxonomies][]" value="<?php echo $key ?>" <?php if (in_array($key, $this->settings_sitemap['wpms_sitemap_taxonomies'])) echo 'checked' ?>>
214
+ <label for="wpms_sitemap_taxonomies_<?php echo $key; ?>"><?php echo $value ?></label>
215
+ </div>
216
<?php
217
}
218
}
868
$custom_post_types = get_post_types(array('public' => true, 'exclude_from_search' => false, '_builtin' => false));
869
if (!empty($custom_post_types)) {
870
foreach ($custom_post_types as $post_type => $label) {
871
+ if (!empty($this->settings_sitemap['wpms_display_column_' . $post_type]) && $i == (int)$this->settings_sitemap['wpms_display_column_' . $post_type]) {
872
//=====================================================================================
873
if(isset($this->settings_sitemap['wpms_public_name_'.$post_type]) && $this->settings_sitemap['wpms_public_name_'.$post_type] != ''){
874
$postTitle = $this->settings_sitemap['wpms_public_name_'.$post_type];
1402
$submenus = $query->get_posts();
1403
$settings_sitemap = get_option('_metaseo_settings_sitemap');
1404
1405
+ $this->html .= '<h3>';
1406
+ $this->html .= '<div class="pure-checkbox">';
1407
+ $this->html .= '<input class="sitemap_check_all_posts_categories" id="sitemap_check_all_posts_categories_' . $term->slug . '" type="checkbox">';
1408
+ $this->html .= '<label for="sitemap_check_all_posts_categories_' . $term->slug . '">'. $term->name .'</label>';
1409
+ $this->html .= '</div>';
1410
+ $this->html .= '</h3>';
1411
$this->html .= '<div class="wpms_xmp_custom_column" style="font-weight: bold;">';
1412
$this->html .= '<label>'.__('Display in column', 'wp-meta-seo').'</label>';
1413
$this->html .= '<select class="wpms_display_column wpms_display_column_menus" data-menu_id="' . $term->term_id . '">';
1445
}
1446
}
1447
$level = 1;
1448
+ $this->html .= '<div class="wpms_row wpms_row_record">';
1449
$check_type = get_post_meta($menu->ID, '_menu_item_object', true);
1450
$permalink = $this->wpms_get_permalink_sitemap($check_type, $id_menu);
1451
$this->html .= '<div style="float:left;line-height:30px">';
1452
if (empty($this->settings_sitemap['wpms_check_firstsave'])) {
1453
$this->html .= '<input class="wpms_sitemap_input_link checked" type="hidden" data-type="menu" value="'.$permalink.'">';
1454
+ $this->html .= '<div class="pure-checkbox">';
1455
+ $this->html .= '<input class="cb_sitemaps_menu wpms_xmap_menu nav_menu' . $term->slug . '" id="wpms_sitemap_menus_' . $menu->ID . '" type="checkbox" name="_metaseo_settings_sitemap[wpms_sitemap_menus][' . $menu->ID . '][menu_id]" value="' . $menu->ID . '" checked>';
1456
+ $this->html .= '<label for="wpms_sitemap_menus_' . $menu->ID . '">'. $title .'</label>';
1457
+ $this->html .= '</div>';
1458
} else {
1459
if (isset($this->settings_sitemap['wpms_sitemap_menus'][$menu->ID]['menu_id']) && $this->settings_sitemap['wpms_sitemap_menus'][$menu->ID]['menu_id'] == $menu->ID) {
1460
$this->html .= '<input class="wpms_sitemap_input_link checked" type="hidden" data-type="menu" value="'.$permalink.'">';
1461
+ $this->html .= '<div class="pure-checkbox">';
1462
+ $this->html .= '<input class="cb_sitemaps_menu wpms_xmap_menu nav_menu' . $term->slug . '" id="wpms_sitemap_menus_' . $menu->ID . '" type="checkbox" name="_metaseo_settings_sitemap[wpms_sitemap_menus][' . $menu->ID . '][menu_id]" value="' . $menu->ID . '" checked>';
1463
+ $this->html .= '<label for="wpms_sitemap_menus_' . $menu->ID . '">'. $title .'</label>';
1464
+ $this->html .= '</div>';
1465
} else {
1466
$this->html .= '<input class="wpms_sitemap_input_link" type="hidden" data-type="menu" value="'.$permalink.'">';
1467
+ $this->html .= '<div class="pure-checkbox">';
1468
+ $this->html .= '<input class="cb_sitemaps_menu wpms_xmap_menu nav_menu' . $term->slug . '" id="wpms_sitemap_menus_' . $menu->ID . '" type="checkbox" name="_metaseo_settings_sitemap[wpms_sitemap_menus][' . $menu->ID . '][menu_id]" value="' . $menu->ID . '">';
1469
+ $this->html .= '<label for="wpms_sitemap_menus_' . $menu->ID . '">'. $title .'</label>';
1470
+ $this->html .= '</div>';
1471
}
1472
}
1473
1474
$this->html .= '</div>';
1475
$this->html .= '<div style="margin-left:200px">' . $select_priority . $select_frequency . '</div>';
1476
$this->html .= '</div>';
inc/google_analytics/tracking/classic_disconnect.php ADDED
@@ -0,0 +1,16 @@
1
+ <?php
2
+ // Exit if accessed directly
3
+ if ( ! defined( 'ABSPATH' ) )
4
+ exit();
5
+ ?>
6
+ <script type="text/javascript">
7
+ var _gaq = _gaq || [];
8
+ _gaq.push(['_setAccount', '<?php echo esc_html($this->ga_tracking_disconnect['wpms_ga_uax_reference']); ?>']);
9
+ _gaq.push(['_trackPageview']);
10
+
11
+ (function() {
12
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
13
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
14
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
15
+ })();
16
+ </script>
inc/google_analytics/tracking/custom.php ADDED
@@ -0,0 +1,12 @@
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) )
3
+ exit();
4
+ ?>
5
+ <script type="text/javascript">
6
+ <?php
7
+ if(!empty($this->ga_tracking['wpmsga_code_tracking'])){
8
+ echo $this->ga_tracking['wpmsga_code_tracking'];
9
+ }
10
+
11
+ ?>
12
+ </script>
inc/google_analytics/tracking/universal_disconnect.php ADDED
@@ -0,0 +1,13 @@
1
+ <?php
2
+ // Exit if accessed directly
3
+ if ( ! defined( 'ABSPATH' ) )
4
+ exit();
5
+ ?>
6
+ <script>
7
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
8
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
9
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
10
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
11
+ ga('create', '<?php echo esc_html($this->ga_tracking_disconnect['wpms_ga_uax_reference']); ?>', 'auto');
12
+ ga('send', 'pageview');
13
+ </script>
inc/pages/dashboard.php CHANGED
@@ -5,78 +5,82 @@ if (!class_exists('MetaSeo_Dashboard')) {
5
6
wp_enqueue_style('m-style-qtip');
7
wp_enqueue_script('jquery-qtip');
8
$site_name = preg_replace('/(^(http|https):\/\/[w]*\.*)/', '', get_site_url());
9
$pieces = explode("/", $site_name);
10
$url = 'http://www.alexa.com/siteinfo/' . $pieces[0];
11
$dashboard = new MetaSeo_Dashboard();
12
$options_dashboard = get_option('options_dashboard');
13
- $link_errors = $dashboard->get_404_link();
14
$plugin_imgRecycle_file = 'imagerecycle-pdf-image-compression/wp-image-recycle.php';
15
?>
16
<h1 style="text-align: center;"><?php _e('WP Meta SEO dashboard', 'wp-meta-seo') ?></h1>
17
<div class="dashboard">
18
<div class="col-md-9">
19
<div class="row panel-statistics">
20
- <div class="col-sm-6 metaseo_tool wpms_dash_permalink" alt="<?php _e('It’s better using a permalink structure that is adding in your URL the category name and content title. This parameter can be changed in Settings > Permalinks WordPress menu. Tag recommended is %category%/%postname%', 'wp-meta-seo') ?>">
21
- <div class="panel panel-updates">
22
- <div class="panel-body">
23
- <div class="row">
24
- <div class="col-xs-7 col-lg-8">
25
- <h4 class="panel-title text-success"><?php _e('Permalinks settings', 'wp-meta-seo') ?></h4>
26
- <h3>50%</h3>
27
- <div class="progress">
28
- <div style="width: 50%" aria-valuemax="100" aria-valuemin="0" aria-valuenow="50" role="progressbar" class="progress-bar progress-bar-success">
29
- <span class="sr-only">50% Complete (success)</span>
30
</div>
31