Version Description
- Fix : Email report doesn't work
- Fix : Css conflict in meta box
Download this release
Release Info
Developer | JoomUnited |
Plugin | WP Meta SEO |
Version | 4.0.1 |
Comparing to | |
See all releases |
Code changes from version 4.0.0 to 4.0.1
- assets/css/main.css +43 -2
- assets/css/metabox-tabs.css +61 -12
- assets/css/metaseo_admin.css +10 -18
- assets/css/metaseo_sitemap.css +1 -1
- assets/css/style.css +11 -2
- assets/js/metaseo_admin.js +1 -1
- assets/js/wp-metaseo-metabox.js +41 -29
- inc/class.metaseo-admin.php +9 -8
- inc/class.metaseo-dashboard.php +20 -0
- inc/class.metaseo-image-list-table.php +2 -4
- inc/class.metaseo-link-list-table.php +2 -2
- inc/class.metaseo-metabox.php +23 -20
- inc/class.metaseo-opengraph.php +109 -6
- inc/class.metaseo-sitemap.php +6 -1
- inc/install-wizard/content/viewMetaInfos.php +1 -1
- inc/install-wizard/content/viewSocial.php +1 -1
- languages/wp-meta-seo-en_US.mo +0 -0
- readme.txt +5 -1
- wp-meta-seo.php +35 -7
assets/css/main.css
CHANGED
@@ -24,6 +24,28 @@
|
|
24 |
padding: 0 6%;
|
25 |
}
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
.ju-button.orange-button {
|
28 |
background-color: #ff8726;
|
29 |
color: #fff;
|
@@ -32,7 +54,7 @@
|
|
32 |
|
33 |
.description {
|
34 |
margin-top: 10px;
|
35 |
-
|
36 |
width: 100%;
|
37 |
font-size: 15px !important;
|
38 |
font-weight: normal;
|
@@ -192,6 +214,10 @@
|
|
192 |
padding-bottom: 20px;
|
193 |
}
|
194 |
|
|
|
|
|
|
|
|
|
195 |
.m-b-20 {
|
196 |
margin-bottom: 20px;
|
197 |
}
|
@@ -362,7 +388,8 @@
|
|
362 |
.wpms-form-table input[type="text"],
|
363 |
.wpms-form-table input[type="password"],
|
364 |
.wpms-form-table input[type="search"],
|
365 |
-
.wpms-form-table #search-submit
|
|
|
366 |
height: 45px;
|
367 |
border-radius: 4px;
|
368 |
margin: 0;
|
@@ -707,6 +734,20 @@
|
|
707 |
background-color: #ff8726 !important;
|
708 |
}
|
709 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
710 |
@media only screen and (max-width: 1024px) {
|
711 |
.wp-meta-seo_page_metaseo_settings .ju-settings-option {
|
712 |
width: 100%;
|
24 |
padding: 0 6%;
|
25 |
}
|
26 |
|
27 |
+
.ju-button {
|
28 |
+
background-color: transparent;
|
29 |
+
color: #000;
|
30 |
+
padding: 10px 15px;
|
31 |
+
min-width: 180px;
|
32 |
+
border: 1px solid #9fabba;
|
33 |
+
text-transform: uppercase;
|
34 |
+
display: inline-block;
|
35 |
+
text-decoration: none;
|
36 |
+
cursor: pointer;
|
37 |
+
text-align: center;
|
38 |
+
letter-spacing: 2px;
|
39 |
+
transition: all ease 0.5s;
|
40 |
+
-webkit-border-radius: 40px;
|
41 |
+
-moz-border-radius: 40px;
|
42 |
+
border-radius: 40px;
|
43 |
+
}
|
44 |
+
|
45 |
+
.ju-button:focus {
|
46 |
+
outline: none;
|
47 |
+
}
|
48 |
+
|
49 |
.ju-button.orange-button {
|
50 |
background-color: #ff8726;
|
51 |
color: #fff;
|
54 |
|
55 |
.description {
|
56 |
margin-top: 10px;
|
57 |
+
display: inline-block;
|
58 |
width: 100%;
|
59 |
font-size: 15px !important;
|
60 |
font-weight: normal;
|
214 |
padding-bottom: 20px;
|
215 |
}
|
216 |
|
217 |
+
.p-t-20 {
|
218 |
+
padding-top: 20px;
|
219 |
+
}
|
220 |
+
|
221 |
.m-b-20 {
|
222 |
margin-bottom: 20px;
|
223 |
}
|
388 |
.wpms-form-table input[type="text"],
|
389 |
.wpms-form-table input[type="password"],
|
390 |
.wpms-form-table input[type="search"],
|
391 |
+
.wpms-form-table #search-submit,
|
392 |
+
.wpms_content_wrapper input[type="text"] {
|
393 |
height: 45px;
|
394 |
border-radius: 4px;
|
395 |
margin: 0;
|
734 |
background-color: #ff8726 !important;
|
735 |
}
|
736 |
|
737 |
+
.wpms-msg-success {
|
738 |
+
color: #24831d;
|
739 |
+
display: none;
|
740 |
+
line-height: 30px;
|
741 |
+
margin-left: 10px;
|
742 |
+
}
|
743 |
+
|
744 |
+
.wpms-msg-error {
|
745 |
+
color: #f00;
|
746 |
+
display: none;
|
747 |
+
line-height: 30px;
|
748 |
+
margin-left: 10px;
|
749 |
+
}
|
750 |
+
|
751 |
@media only screen and (max-width: 1024px) {
|
752 |
.wp-meta-seo_page_metaseo_settings .ju-settings-option {
|
753 |
width: 100%;
|
assets/css/metabox-tabs.css
CHANGED
@@ -42,7 +42,7 @@
|
|
42 |
.optimization-row-box .length-box-meta {
|
43 |
position: absolute;
|
44 |
right: 0;
|
45 |
-
bottom:
|
46 |
width: 57.9px;
|
47 |
height: 50px;
|
48 |
background: #42d4a3;
|
@@ -59,9 +59,9 @@
|
|
59 |
}
|
60 |
|
61 |
.wpmseo-metabox-tabs-div {
|
62 |
-
float: left;
|
63 |
width: 100%;
|
64 |
background: #f3f6fa;
|
|
|
65 |
}
|
66 |
|
67 |
.wpmseo-metabox-tabs-div * {
|
@@ -81,11 +81,6 @@
|
|
81 |
font-size: 13px !important;
|
82 |
}
|
83 |
|
84 |
-
.postbox {
|
85 |
-
width: 100%;
|
86 |
-
float: left;
|
87 |
-
}
|
88 |
-
|
89 |
.inside .wpmseotab .form-table th {
|
90 |
width: 140px !important;
|
91 |
font-size: 13px;
|
@@ -118,7 +113,7 @@
|
|
118 |
color: #fff !important;
|
119 |
}
|
120 |
|
121 |
-
.optimization-row-box .length-box-meta.
|
122 |
background: #74B6FC;
|
123 |
}
|
124 |
|
@@ -129,7 +124,6 @@
|
|
129 |
|
130 |
#wpmseosnippet {
|
131 |
width: auto;
|
132 |
-
max-width: 520px;
|
133 |
margin: 0 0 10px;
|
134 |
font-family: Arial, Helvetica, sans-serif;
|
135 |
font-style: normal;
|
@@ -152,7 +146,6 @@
|
|
152 |
#wpmseosnippet .title {
|
153 |
display: block;
|
154 |
overflow: hidden;
|
155 |
-
width: 512px;
|
156 |
white-space: nowrap;
|
157 |
text-overflow: ellipsis;
|
158 |
font-size: 24px;
|
@@ -373,7 +366,7 @@ table.wpmseoanalysis td.score {
|
|
373 |
i.metaseo_help {
|
374 |
cursor: pointer;
|
375 |
font-size: 20px;
|
376 |
-
|
377 |
}
|
378 |
|
379 |
.metaseo-qtip {
|
@@ -501,8 +494,9 @@ div.wpmseo-tab-content {
|
|
501 |
}
|
502 |
|
503 |
.wpmseotab .optimization-row-box {
|
504 |
-
padding: 20px;
|
505 |
box-sizing: border-box;
|
|
|
506 |
}
|
507 |
|
508 |
.wpmseotab.general.active .form-table th {
|
@@ -608,4 +602,59 @@ div.wpmseo-tab-content {
|
|
608 |
float: left;
|
609 |
margin-bottom: 20px;
|
610 |
background: #fff;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
611 |
}
|
42 |
.optimization-row-box .length-box-meta {
|
43 |
position: absolute;
|
44 |
right: 0;
|
45 |
+
bottom: 1px;
|
46 |
width: 57.9px;
|
47 |
height: 50px;
|
48 |
background: #42d4a3;
|
59 |
}
|
60 |
|
61 |
.wpmseo-metabox-tabs-div {
|
|
|
62 |
width: 100%;
|
63 |
background: #f3f6fa;
|
64 |
+
display: inline-block;
|
65 |
}
|
66 |
|
67 |
.wpmseo-metabox-tabs-div * {
|
81 |
font-size: 13px !important;
|
82 |
}
|
83 |
|
|
|
|
|
|
|
|
|
|
|
84 |
.inside .wpmseotab .form-table th {
|
85 |
width: 140px !important;
|
86 |
font-size: 13px;
|
113 |
color: #fff !important;
|
114 |
}
|
115 |
|
116 |
+
.optimization-row-box .length-box-meta.word-74B6FC {
|
117 |
background: #74B6FC;
|
118 |
}
|
119 |
|
124 |
|
125 |
#wpmseosnippet {
|
126 |
width: auto;
|
|
|
127 |
margin: 0 0 10px;
|
128 |
font-family: Arial, Helvetica, sans-serif;
|
129 |
font-style: normal;
|
146 |
#wpmseosnippet .title {
|
147 |
display: block;
|
148 |
overflow: hidden;
|
|
|
149 |
white-space: nowrap;
|
150 |
text-overflow: ellipsis;
|
151 |
font-size: 24px;
|
366 |
i.metaseo_help {
|
367 |
cursor: pointer;
|
368 |
font-size: 20px;
|
369 |
+
line-height: 45px;
|
370 |
}
|
371 |
|
372 |
.metaseo-qtip {
|
494 |
}
|
495 |
|
496 |
.wpmseotab .optimization-row-box {
|
497 |
+
padding: 20px 20px 10px 20px;
|
498 |
box-sizing: border-box;
|
499 |
+
margin: 0;
|
500 |
}
|
501 |
|
502 |
.wpmseotab.general.active .form-table th {
|
602 |
float: left;
|
603 |
margin-bottom: 20px;
|
604 |
background: #fff;
|
605 |
+
}
|
606 |
+
|
607 |
+
|
608 |
+
#wpmseo_meta .tabs {
|
609 |
+
display: flex;
|
610 |
+
position: relative;
|
611 |
+
overflow: hidden;
|
612 |
+
margin: 0 auto;
|
613 |
+
white-space: nowrap;
|
614 |
+
width: 100%;
|
615 |
+
background-color: #fff;
|
616 |
+
}
|
617 |
+
|
618 |
+
#wpmseo_meta .tabs .tab {
|
619 |
+
flex-grow: 1;
|
620 |
+
display: block;
|
621 |
+
text-align: center;
|
622 |
+
padding: 0;
|
623 |
+
margin: 0;
|
624 |
+
float: left;
|
625 |
+
text-transform: uppercase;
|
626 |
+
text-overflow: ellipsis;
|
627 |
+
overflow: hidden;
|
628 |
+
letter-spacing: 0.8px;
|
629 |
+
min-width: 80px;
|
630 |
+
background-color: #2196f3;
|
631 |
+
}
|
632 |
+
|
633 |
+
#wpmseo_meta .tabs .tab a {
|
634 |
+
text-decoration: none;
|
635 |
+
color: #fff;
|
636 |
+
background-color: #2196f3;
|
637 |
+
display: block;
|
638 |
+
width: 100%;
|
639 |
+
height: 100%;
|
640 |
+
text-overflow: ellipsis;
|
641 |
+
overflow: hidden;
|
642 |
+
-webkit-transition: color 0.3s ease;
|
643 |
+
-moz-transition: color 0.3s ease;
|
644 |
+
-ms-transition: color 0.3s ease;
|
645 |
+
-o-transition: color 0.3s ease;
|
646 |
+
transition: color 0.3s ease;
|
647 |
+
}
|
648 |
+
|
649 |
+
#wpmseo_meta .tabs .tab.disabled a {
|
650 |
+
cursor: default;
|
651 |
+
opacity: 0.6;
|
652 |
+
}
|
653 |
+
|
654 |
+
#wpmseo_meta .tabs .indicator {
|
655 |
+
position: absolute;
|
656 |
+
bottom: 0;
|
657 |
+
height: 3px;
|
658 |
+
will-change: left, right;
|
659 |
+
background-color: #ff8726;
|
660 |
}
|
assets/css/metaseo_admin.css
CHANGED
@@ -436,7 +436,7 @@ strong {
|
|
436 |
}
|
437 |
|
438 |
.metaseo_link_title {
|
439 |
-
width:
|
440 |
height: 28px;
|
441 |
float: left;
|
442 |
}
|
@@ -444,22 +444,7 @@ strong {
|
|
444 |
.wpms_update_link {
|
445 |
display: none;
|
446 |
float: left;
|
447 |
-
|
448 |
-
box-shadow: inset 0 1px 0 rgba(120, 200, 230, 0.5), 0 1px 0 rgba(0, 0, 0, 0.15);
|
449 |
-
color: #fff;
|
450 |
-
text-decoration: none;
|
451 |
-
vertical-align: top;
|
452 |
-
font-size: 13px;
|
453 |
-
line-height: 26px;
|
454 |
-
height: 28px;
|
455 |
-
margin: 0;
|
456 |
-
padding: 0 10px 1px;
|
457 |
-
cursor: pointer;
|
458 |
-
border: 1px solid #0073aa;
|
459 |
-
-webkit-appearance: none;
|
460 |
-
border-radius: 3px;
|
461 |
-
white-space: nowrap;
|
462 |
-
box-sizing: border-box;
|
463 |
}
|
464 |
|
465 |
.wpms_mesage_link {
|
@@ -638,7 +623,10 @@ strong {
|
|
638 |
line-height: 1.3;
|
639 |
font-weight: 600;
|
640 |
font-size: 13px;
|
641 |
-
|
|
|
|
|
|
|
642 |
}
|
643 |
|
644 |
.metaseo_metabox_follow, .metaseo_metabox_index {
|
@@ -910,6 +898,10 @@ span.wpms-seoImgRemove {
|
|
910 |
margin-left: 10px;
|
911 |
}
|
912 |
|
|
|
|
|
|
|
|
|
913 |
|
914 |
@media screen and (max-width: 782px) {
|
915 |
#col_image_name, .col_image_name.column-col_image_name,
|
436 |
}
|
437 |
|
438 |
.metaseo_link_title {
|
439 |
+
width: 180px;
|
440 |
height: 28px;
|
441 |
float: left;
|
442 |
}
|
444 |
.wpms_update_link {
|
445 |
display: none;
|
446 |
float: left;
|
447 |
+
height: 45px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
448 |
}
|
449 |
|
450 |
.wpms_mesage_link {
|
623 |
line-height: 1.3;
|
624 |
font-weight: 600;
|
625 |
font-size: 13px;
|
626 |
+
}
|
627 |
+
|
628 |
+
.wpmslabel label {
|
629 |
+
line-height: 45px;
|
630 |
}
|
631 |
|
632 |
.metaseo_metabox_follow, .metaseo_metabox_index {
|
898 |
margin-left: 10px;
|
899 |
}
|
900 |
|
901 |
+
#col_link_title {
|
902 |
+
width: 25%;
|
903 |
+
}
|
904 |
+
|
905 |
|
906 |
@media screen and (max-width: 782px) {
|
907 |
#col_image_name, .col_image_name.column-col_image_name,
|
assets/css/metaseo_sitemap.css
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
.wp-meta-seo_page_metaseo_google_sitemap .description {
|
2 |
margin-top: 10px;
|
3 |
-
|
4 |
width: 100%;
|
5 |
font-size: 15px !important;
|
6 |
font-weight: normal;
|
1 |
.wp-meta-seo_page_metaseo_google_sitemap .description {
|
2 |
margin-top: 10px;
|
3 |
+
display: inline-block;
|
4 |
width: 100%;
|
5 |
font-size: 15px !important;
|
6 |
font-weight: normal;
|
assets/css/style.css
CHANGED
@@ -135,6 +135,7 @@ td.metaseo-action {
|
|
135 |
.metaseo-img-wrapper {
|
136 |
clear: left;
|
137 |
padding: 5px 0;
|
|
|
138 |
}
|
139 |
|
140 |
.metaseo-img-wrapper .img-choosen {
|
@@ -188,6 +189,8 @@ div.img-name-wrapper {
|
|
188 |
div.img-name-wrapper p {
|
189 |
margin: 3px;
|
190 |
padding-left: 2px;
|
|
|
|
|
191 |
}
|
192 |
|
193 |
table.metaseo_images td input {
|
@@ -271,7 +274,13 @@ span.saved-info {
|
|
271 |
font-stretch: normal;
|
272 |
line-height: normal;
|
273 |
letter-spacing: 0.6px;
|
274 |
-
color: #
|
|
|
|
|
|
|
|
|
|
|
|
|
275 |
}
|
276 |
|
277 |
.metaseo-msg-warning {
|
@@ -279,7 +288,7 @@ span.saved-info {
|
|
279 |
}
|
280 |
|
281 |
.opt-info > p, .opt-info-warning > p {
|
282 |
-
font-size:
|
283 |
color: #ff8726;
|
284 |
margin-bottom: 1px !important;
|
285 |
}
|
135 |
.metaseo-img-wrapper {
|
136 |
clear: left;
|
137 |
padding: 5px 0;
|
138 |
+
width: 90%;
|
139 |
}
|
140 |
|
141 |
.metaseo-img-wrapper .img-choosen {
|
189 |
div.img-name-wrapper p {
|
190 |
margin: 3px;
|
191 |
padding-left: 2px;
|
192 |
+
color: #0f2c3b;
|
193 |
+
opacity: 0.6;
|
194 |
}
|
195 |
|
196 |
table.metaseo_images td input {
|
274 |
font-stretch: normal;
|
275 |
line-height: normal;
|
276 |
letter-spacing: 0.6px;
|
277 |
+
color: #42d4a3 !important;
|
278 |
+
}
|
279 |
+
|
280 |
+
.metaseo-optimize.replaced {
|
281 |
+
color: #42d4a3 !important;
|
282 |
+
border: 0 !important;
|
283 |
+
float: left;
|
284 |
}
|
285 |
|
286 |
.metaseo-msg-warning {
|
288 |
}
|
289 |
|
290 |
.opt-info > p, .opt-info-warning > p {
|
291 |
+
font-size: 13px !important;
|
292 |
color: #ff8726;
|
293 |
margin-bottom: 1px !important;
|
294 |
}
|
assets/js/metaseo_admin.js
CHANGED
@@ -798,7 +798,7 @@ function optimize_imgs(element) {
|
|
798 |
|
799 |
var checked = jQuery('.checkin-' + post_id);
|
800 |
if (checked.length === 0) {
|
801 |
-
$this.addClass('disabled');
|
802 |
}
|
803 |
|
804 |
$this.parent().find('span.spinner').fadeOut(300);
|
798 |
|
799 |
var checked = jQuery('.checkin-' + post_id);
|
800 |
if (checked.length === 0) {
|
801 |
+
$this.addClass('disabled replaced').removeClass('ju-button waves-effect waves-light').html(wpms_localize.replaced);
|
802 |
}
|
803 |
|
804 |
$this.parent().find('span.spinner').fadeOut(300);
|
assets/js/wp-metaseo-metabox.js
CHANGED
@@ -19,29 +19,36 @@ function msReplaceVariables(str, callback) {
|
|
19 |
}
|
20 |
|
21 |
if (jQuery(wpmsdivtitle).length) {
|
22 |
-
str = str.replace(
|
23 |
}
|
24 |
|
25 |
// These are added in the head for performance reasons.
|
26 |
-
str = str.replace(
|
27 |
-
str = str.replace(
|
28 |
-
str = str.replace(
|
29 |
-
str = str.replace(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
// excerpt
|
32 |
var excerpt = '';
|
33 |
if (jQuery('#excerpt').length) {
|
34 |
excerpt = msClean(jQuery('#excerpt').val().replace(/(<([^>]+)>)/ig, ''));
|
35 |
-
str = str.replace(
|
36 |
}
|
37 |
if ('' === excerpt && jQuery('#content').length) {
|
38 |
excerpt = jQuery('#content').val().replace(/(<([^>]+)>)/ig, '').substring(0, wpmseoMetaboxL10n.wpmseo_meta_desc_length - 1);
|
39 |
}
|
40 |
-
str = str.replace(
|
41 |
|
42 |
// parent page
|
43 |
if (jQuery('#parent_id').length && jQuery('#parent_id option:selected').text() !== wpmseoMetaboxL10n.no_parent_text) {
|
44 |
-
str = str.replace(
|
45 |
}
|
46 |
|
47 |
// remove double separators
|
@@ -49,8 +56,8 @@ function msReplaceVariables(str, callback) {
|
|
49 |
var pattern = new RegExp(esc_sep + ' ' + esc_sep, 'g');
|
50 |
str = str.replace(pattern, wpmseoMetaboxL10n.sep);
|
51 |
|
52 |
-
if (str.indexOf('
|
53 |
-
var regex =
|
54 |
var matches = str.match(regex);
|
55 |
for (var i = 0; i < matches.length; i++) {
|
56 |
if (typeof (replacedVars[ matches[ i ] ]) === 'undefined') {
|
@@ -95,13 +102,8 @@ function msUpdateTitle(force) {
|
|
95 |
var divHtml = jQuery('<div />');
|
96 |
var snippetTitle = jQuery('#wpmseosnippet_title');
|
97 |
|
98 |
-
|
99 |
-
|
100 |
-
metaseo_status_length(len, '#' + wpmseoMetaboxL10n.field_prefix + 'title-length');
|
101 |
-
jQuery('#' + wpmseoMetaboxL10n.field_prefix + 'title-length').html(len);
|
102 |
-
} else {
|
103 |
-
jQuery('#' + wpmseoMetaboxL10n.field_prefix + 'title-length').addClass('length-true').removeClass('length-wrong').html('<span class="good">' + wpmseoMetaboxL10n.wpmseo_meta_title_length + '</span>');
|
104 |
-
}
|
105 |
|
106 |
if (titleElm.val()) {
|
107 |
title = titleElm.val().replace(/(<([^>]+)>)/ig, '');
|
@@ -184,9 +186,6 @@ function msUpdateDesc() {
|
|
184 |
|
185 |
var len = wpmseoMetaboxL10n.wpmseo_meta_desc_length - desc.length;
|
186 |
metaseo_status_length(len, '#' + wpmseoMetaboxL10n.field_prefix + 'desc-length');
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
desc = msSanitizeDesc(desc);
|
191 |
|
192 |
// Clear the autogen description.
|
@@ -247,15 +246,31 @@ function msEscapeFocusKw(str) {
|
|
247 |
return str.replace(/[\-\[\]\/\{}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
|
248 |
}
|
249 |
|
250 |
-
function metaseo_status_length(len, id) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
251 |
if (len < 0) {
|
252 |
-
jQuery(id).addClass('length-wrong').removeClass('length-true length-warn');
|
253 |
len = '<span class="wrong">' + len + '</span>';
|
254 |
-
} else if (
|
255 |
-
jQuery(id).addClass('length-warn').removeClass('length-true length-wrong');
|
256 |
-
len = '<span class="length-warn">' + len + '</span>';
|
257 |
} else {
|
258 |
-
jQuery(id).addClass('length-true').removeClass('length-wrong length-warn');
|
259 |
len = '<span class="good">' + len + '</span>';
|
260 |
}
|
261 |
|
@@ -281,7 +296,6 @@ jQuery(document).ready(function ($) {
|
|
281 |
}
|
282 |
|
283 |
jQuery('.wpmseo-heading').hide();
|
284 |
-
|
285 |
jQuery('#' + wpmseoMetaboxL10n.field_prefix + 'title').keyup(function () {
|
286 |
msUpdateTitle();
|
287 |
});
|
@@ -341,8 +355,6 @@ jQuery(document).ready(function ($) {
|
|
341 |
|
342 |
});
|
343 |
|
344 |
-
|
345 |
-
|
346 |
jQuery('.wpms_load_more_keyword').click(function () {
|
347 |
var $this = $(this);
|
348 |
var page = $this.data('page');
|
19 |
}
|
20 |
|
21 |
if (jQuery(wpmsdivtitle).length) {
|
22 |
+
str = str.replace(/%title%/g, jQuery(wpmsdivtitle).val().replace(/(<([^>]+)>)/ig, ''));
|
23 |
}
|
24 |
|
25 |
// These are added in the head for performance reasons.
|
26 |
+
str = str.replace(/%id%/g, wpmseoMetaboxL10n.id);
|
27 |
+
str = str.replace(/%date%/g, wpmseoMetaboxL10n.date);
|
28 |
+
str = str.replace(/%sitedesc%/g, wpmseoMetaboxL10n.sitedesc);
|
29 |
+
str = str.replace(/%sitename%/g, wpmseoMetaboxL10n.sitename);
|
30 |
+
str = str.replace(/%sep%/g, wpmseoMetaboxL10n.sep);
|
31 |
+
str = str.replace(/%page%/g, wpmseoMetaboxL10n.page);
|
32 |
+
str = str.replace(/%currenttime%/g, wpmseoMetaboxL10n.currenttime);
|
33 |
+
str = str.replace(/%currentdate%/g, wpmseoMetaboxL10n.currentdate);
|
34 |
+
str = str.replace(/%currentday%/g, wpmseoMetaboxL10n.currentday);
|
35 |
+
str = str.replace(/%currentmonth%/g, wpmseoMetaboxL10n.currentmonth);
|
36 |
+
str = str.replace(/%currentyear%/g, wpmseoMetaboxL10n.currentyear);
|
37 |
|
38 |
// excerpt
|
39 |
var excerpt = '';
|
40 |
if (jQuery('#excerpt').length) {
|
41 |
excerpt = msClean(jQuery('#excerpt').val().replace(/(<([^>]+)>)/ig, ''));
|
42 |
+
str = str.replace(/%excerpt_only%/g, excerpt);
|
43 |
}
|
44 |
if ('' === excerpt && jQuery('#content').length) {
|
45 |
excerpt = jQuery('#content').val().replace(/(<([^>]+)>)/ig, '').substring(0, wpmseoMetaboxL10n.wpmseo_meta_desc_length - 1);
|
46 |
}
|
47 |
+
str = str.replace(/%excerpt%/g, excerpt);
|
48 |
|
49 |
// parent page
|
50 |
if (jQuery('#parent_id').length && jQuery('#parent_id option:selected').text() !== wpmseoMetaboxL10n.no_parent_text) {
|
51 |
+
str = str.replace(/%parent_title%/g, jQuery('#parent_id option:selected').text());
|
52 |
}
|
53 |
|
54 |
// remove double separators
|
56 |
var pattern = new RegExp(esc_sep + ' ' + esc_sep, 'g');
|
57 |
str = str.replace(pattern, wpmseoMetaboxL10n.sep);
|
58 |
|
59 |
+
if (str.indexOf('%') !== -1 && str.match(/%[a-z0-9_-]+%/i) !== null) {
|
60 |
+
var regex = /%[a-z0-9_-]+%/gi;
|
61 |
var matches = str.match(regex);
|
62 |
for (var i = 0; i < matches.length; i++) {
|
63 |
if (typeof (replacedVars[ matches[ i ] ]) === 'undefined') {
|
102 |
var divHtml = jQuery('<div />');
|
103 |
var snippetTitle = jQuery('#wpmseosnippet_title');
|
104 |
|
105 |
+
var len = wpmseoMetaboxL10n.wpmseo_meta_title_length - titleElm.val().length;
|
106 |
+
metaseo_status_length(len, '#' + wpmseoMetaboxL10n.field_prefix + 'title-length');
|
|
|
|
|
|
|
|
|
|
|
107 |
|
108 |
if (titleElm.val()) {
|
109 |
title = titleElm.val().replace(/(<([^>]+)>)/ig, '');
|
186 |
|
187 |
var len = wpmseoMetaboxL10n.wpmseo_meta_desc_length - desc.length;
|
188 |
metaseo_status_length(len, '#' + wpmseoMetaboxL10n.field_prefix + 'desc-length');
|
|
|
|
|
|
|
189 |
desc = msSanitizeDesc(desc);
|
190 |
|
191 |
// Clear the autogen description.
|
246 |
return str.replace(/[\-\[\]\/\{}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
|
247 |
}
|
248 |
|
249 |
+
function metaseo_status_length(len, id, number) {
|
250 |
+
var num = 46;
|
251 |
+
var check = 0;
|
252 |
+
var mclass = '';
|
253 |
+
if (id === '#metaseo_wpmseo_title-length') {
|
254 |
+
num = 46;
|
255 |
+
check = wpmseoMetaboxL10n.wpmseo_meta_title_length - len;
|
256 |
+
mclass = 'word-74B6FC';
|
257 |
+
} else if (id === '#metaseo_wpmseo_desc-length') {
|
258 |
+
num = 120;
|
259 |
+
check = wpmseoMetaboxL10n.wpmseo_meta_desc_length - len;
|
260 |
+
mclass = 'word-74B6FC';
|
261 |
+
} else if (id === '#metaseo_wpmseo_keywords-length') {
|
262 |
+
num = 120;
|
263 |
+
check = len;
|
264 |
+
}
|
265 |
+
|
266 |
if (len < 0) {
|
267 |
+
jQuery(id).addClass('length-wrong').removeClass('length-true length-warn ' + mclass);
|
268 |
len = '<span class="wrong">' + len + '</span>';
|
269 |
+
} else if (check >= 0 && check <= num) {
|
270 |
+
jQuery(id).addClass('length-warn ' + mclass).removeClass('length-true length-wrong');
|
271 |
+
len = '<span class="length-warn '+mclass+'">' + len + '</span>';
|
272 |
} else {
|
273 |
+
jQuery(id).addClass('length-true').removeClass('length-wrong length-warn ' + mclass);
|
274 |
len = '<span class="good">' + len + '</span>';
|
275 |
}
|
276 |
|
296 |
}
|
297 |
|
298 |
jQuery('.wpmseo-heading').hide();
|
|
|
299 |
jQuery('#' + wpmseoMetaboxL10n.field_prefix + 'title').keyup(function () {
|
300 |
msUpdateTitle();
|
301 |
});
|
355 |
|
356 |
});
|
357 |
|
|
|
|
|
358 |
jQuery('.wpms_load_more_keyword').click(function () {
|
359 |
var $this = $(this);
|
360 |
var page = $this.data('page');
|
inc/class.metaseo-admin.php
CHANGED
@@ -2413,6 +2413,7 @@ class MetaSeoAdmin
|
|
2413 |
// in JavaScript, object properties are accessed as ajax_object.ajax_url, ajax_object.we_value
|
2414 |
wp_localize_script('wpmetaseoAdmin', 'wpms_localize', array(
|
2415 |
'filter_by' => esc_html__('Select to filter', 'wp-meta-seo'),
|
|
|
2416 |
'index_link' => esc_html__('Loading...', 'wp-meta-seo'),
|
2417 |
'addon_active' => $addon_active,
|
2418 |
'ajax_url' => admin_url('admin-ajax.php'),
|
@@ -2509,20 +2510,20 @@ class MetaSeoAdmin
|
|
2509 |
array(
|
2510 |
'metaseo_dashboard',
|
2511 |
'',
|
2512 |
-
esc_html__('
|
2513 |
$manage_options_cap,
|
2514 |
-
'
|
2515 |
array($this, 'loadPage'),
|
2516 |
-
null
|
2517 |
),
|
2518 |
array(
|
2519 |
'metaseo_dashboard',
|
2520 |
'',
|
2521 |
-
esc_html__('
|
2522 |
$manage_options_cap,
|
2523 |
-
'
|
2524 |
array($this, 'loadPage'),
|
2525 |
-
null
|
2526 |
),
|
2527 |
array(
|
2528 |
'metaseo_dashboard',
|
@@ -3370,8 +3371,8 @@ class MetaSeoAdmin
|
|
3370 |
*
|
3371 |
* @ignore Hook already documented
|
3372 |
*/
|
3373 |
-
$value = apply_filters('wpms_update_content_meta', $value, $post->ID,
|
3374 |
-
update_post_meta($post->ID,
|
3375 |
}
|
3376 |
wp_send_json(true);
|
3377 |
} else {
|
2413 |
// in JavaScript, object properties are accessed as ajax_object.ajax_url, ajax_object.we_value
|
2414 |
wp_localize_script('wpmetaseoAdmin', 'wpms_localize', array(
|
2415 |
'filter_by' => esc_html__('Select to filter', 'wp-meta-seo'),
|
2416 |
+
'replaced' => esc_html__('Replaced', 'wp-meta-seo'),
|
2417 |
'index_link' => esc_html__('Loading...', 'wp-meta-seo'),
|
2418 |
'addon_active' => $addon_active,
|
2419 |
'ajax_url' => admin_url('admin-ajax.php'),
|
2510 |
array(
|
2511 |
'metaseo_dashboard',
|
2512 |
'',
|
2513 |
+
esc_html__('Image editor', 'wp-meta-seo'),
|
2514 |
$manage_options_cap,
|
2515 |
+
'metaseo_image_meta',
|
2516 |
array($this, 'loadPage'),
|
2517 |
+
null
|
2518 |
),
|
2519 |
array(
|
2520 |
'metaseo_dashboard',
|
2521 |
'',
|
2522 |
+
esc_html__('Sitemap', 'wp-meta-seo'),
|
2523 |
$manage_options_cap,
|
2524 |
+
'metaseo_google_sitemap',
|
2525 |
array($this, 'loadPage'),
|
2526 |
+
null,
|
2527 |
),
|
2528 |
array(
|
2529 |
'metaseo_dashboard',
|
3371 |
*
|
3372 |
* @ignore Hook already documented
|
3373 |
*/
|
3374 |
+
$value = apply_filters('wpms_update_content_meta', $value, $post->ID, $key, array('source'=>'copy_meta'));
|
3375 |
+
update_post_meta($post->ID, $key, $value);
|
3376 |
}
|
3377 |
wp_send_json(true);
|
3378 |
} else {
|
inc/class.metaseo-dashboard.php
CHANGED
@@ -502,6 +502,26 @@ class MetaSeoDashboard
|
|
502 |
}
|
503 |
}
|
504 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
505 |
/**
|
506 |
* Get image metas
|
507 |
*
|
502 |
}
|
503 |
}
|
504 |
|
505 |
+
/**
|
506 |
+
* Return count link 404 , count link 404 is redirected , percent
|
507 |
+
*
|
508 |
+
* @return array
|
509 |
+
*/
|
510 |
+
public static function get404Link()
|
511 |
+
{
|
512 |
+
global $wpdb;
|
513 |
+
$count_404 = $wpdb->get_var('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'wpms_links WHERE (broken_internal = 1 OR broken_indexed = 1)');
|
514 |
+
|
515 |
+
$count_404_redirected = $wpdb->get_var('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'wpms_links
|
516 |
+
WHERE link_url_redirect != "" AND (broken_internal = 1 OR broken_indexed = 1)');
|
517 |
+
if ((int) $count_404 !== 0) {
|
518 |
+
$percent = ceil($count_404_redirected / $count_404 * 100);
|
519 |
+
} else {
|
520 |
+
$percent = 100;
|
521 |
+
}
|
522 |
+
return array('count_404' => $count_404, 'count_404_redirected' => $count_404_redirected, 'percent' => $percent);
|
523 |
+
}
|
524 |
+
|
525 |
/**
|
526 |
* Get image metas
|
527 |
*
|
inc/class.metaseo-image-list-table.php
CHANGED
@@ -739,10 +739,8 @@ class MetaSeoImageListTable extends WP_List_Table
|
|
739 |
break;
|
740 |
|
741 |
case 'col_image':
|
742 |
-
$img =
|
743 |
-
|
744 |
-
data-name="' . esc_attr($img_name . $type) . '" data-img-post-id="' . esc_attr($rec->ID) . '" />'
|
745 |
-
);
|
746 |
// phpcs:ignore WordPress.Security.EscapeOutput -- Content escaped in previous line (same function)
|
747 |
echo sprintf('<td %2$s colspan="3">%1$s</td>', $img, $attributes);
|
748 |
break;
|
739 |
break;
|
740 |
|
741 |
case 'col_image':
|
742 |
+
$img = '<img src="' . esc_url($thumb_url) . '" width="70px" height="70px" class="metaseo-image"
|
743 |
+
data-name="' . esc_attr($img_name . $type) . '" data-img-post-id="' . esc_attr($rec->ID) . '" />';
|
|
|
|
|
744 |
// phpcs:ignore WordPress.Security.EscapeOutput -- Content escaped in previous line (same function)
|
745 |
echo sprintf('<td %2$s colspan="3">%1$s</td>', $img, $attributes);
|
746 |
break;
|
inc/class.metaseo-link-list-table.php
CHANGED
@@ -671,8 +671,8 @@ class MetaSeoLinkListTable extends WP_List_Table
|
|
671 |
echo '<td colspan="3">';
|
672 |
echo '<input type="text" data-post_id="' . esc_attr($rec->source_id) . '" name="metaseo_link_title"
|
673 |
id="metaseo_link_title" class="metaseo_link_title" value="' . esc_attr($rec->meta_title) . '">';
|
674 |
-
echo '<
|
675 |
-
class="wpms_update_link">' . esc_html__('Update', 'wp-meta-seo') . '</
|
676 |
echo '<strong class="wpms_mesage_link">' . esc_html__('Saved.', 'wp-meta-seo') . '</strong>';
|
677 |
echo '<strong class="wpms_error_mesage_link">' . esc_html__('Error.', 'wp-meta-seo') . '</strong>';
|
678 |
echo '</td>';
|
671 |
echo '<td colspan="3">';
|
672 |
echo '<input type="text" data-post_id="' . esc_attr($rec->source_id) . '" name="metaseo_link_title"
|
673 |
id="metaseo_link_title" class="metaseo_link_title" value="' . esc_attr($rec->meta_title) . '">';
|
674 |
+
echo '<button type="button" data-post_id="' . esc_attr($rec->source_id) . '"
|
675 |
+
class="wpms_update_link ju-button orange-button wpms-small-btn">' . esc_html__('Update', 'wp-meta-seo') . '</button>';
|
676 |
echo '<strong class="wpms_mesage_link">' . esc_html__('Saved.', 'wp-meta-seo') . '</strong>';
|
677 |
echo '<strong class="wpms_error_mesage_link">' . esc_html__('Error.', 'wp-meta-seo') . '</strong>';
|
678 |
echo '</td>';
|
inc/class.metaseo-metabox.php
CHANGED
@@ -219,14 +219,6 @@ class WPMSEOMetabox extends WPMSEOMeta
|
|
219 |
);
|
220 |
}
|
221 |
|
222 |
-
// Register CSS
|
223 |
-
wp_enqueue_style(
|
224 |
-
'wpms_ju_framework_styles',
|
225 |
-
plugins_url('assets/wordpress-css-framework/css/style.css', dirname(__FILE__)),
|
226 |
-
array(),
|
227 |
-
WPMSEO_VERSION
|
228 |
-
);
|
229 |
-
|
230 |
wp_enqueue_script(
|
231 |
'wpms_ju_velocity_js',
|
232 |
plugins_url('assets/wordpress-css-framework/js/velocity.min.js', dirname(__FILE__)),
|
@@ -365,7 +357,7 @@ class WPMSEOMetabox extends WPMSEOMeta
|
|
365 |
|
366 |
self::$meta_length_reason = apply_filters('wpmseo_desc_length_reason', self::$meta_length_reason, $post);
|
367 |
self::$meta_length = apply_filters('wpmseo_desc_length', self::$meta_length, $post);
|
368 |
-
$title_template = '
|
369 |
|
370 |
$desc_template = '';
|
371 |
$sample_permalink = get_sample_permalink($post->ID);
|
@@ -374,13 +366,21 @@ class WPMSEOMetabox extends WPMSEOMeta
|
|
374 |
$cached_replacement_vars = array();
|
375 |
|
376 |
$vars_to_cache = array(
|
377 |
-
'
|
378 |
-
'
|
379 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
380 |
);
|
381 |
|
382 |
-
foreach ($vars_to_cache as $var) {
|
383 |
-
$cached_replacement_vars[$var] = $
|
384 |
}
|
385 |
|
386 |
$cached_replacement_vars['sitename'] = get_option('blogname');
|
@@ -491,6 +491,9 @@ class WPMSEOMetabox extends WPMSEOMeta
|
|
491 |
if (is_object($post) && isset($post->post_type)) {
|
492 |
foreach ($this->getMetaFieldDefs('general', $post->post_type) as $key => $meta_field) {
|
493 |
$content .= $this->doMetaBox($meta_field, $key);
|
|
|
|
|
|
|
494 |
}
|
495 |
unset($key, $meta_field);
|
496 |
}
|
@@ -719,9 +722,9 @@ class WPMSEOMetabox extends WPMSEOMeta
|
|
719 |
}
|
720 |
}
|
721 |
|
722 |
-
$html = '<div class="'. esc_html($meta_field_def['classrow'] . ' wpms_left optimization-row-box
|
723 |
$html .= '<label class="ju-setting-label wpms_width_100 wpms_left p-l-0">'. $label . $help .'</label>';
|
724 |
-
$html .= '<label class="wpms_width_100 label-input wpms_left p-
|
725 |
if (isset($meta_field_def['description'])) {
|
726 |
if (!strpos($meta_field_def['class'], 'has-length') !== false) {
|
727 |
$html .= '<p class="description">' . $meta_field_def['description'] . '</p>';
|
@@ -818,8 +821,8 @@ class WPMSEOMetabox extends WPMSEOMeta
|
|
818 |
$slf .= '<option value="nofollow">' . esc_html__('Nofollow', 'wp-meta-seo') . '</option>';
|
819 |
}
|
820 |
$slf .= '</select>';
|
821 |
-
echo '<p class="wpms_width_100 wpms_left optimization-row-box
|
822 |
-
|
823 |
data-alt="' . esc_attr__('Nofollow provides a way for webmasters to tell search engines:
|
824 |
don\'t follow this link. So it may influence the link target’s ranking', 'wp-meta-seo') . '"
|
825 |
style="color:#32373C" data-hasqtip="2">chat_bubble</i></span>' . $slf . '</p>'; // phpcs:ignore WordPress.Security.EscapeOutput -- Content escaped in previous line (same function)
|
@@ -837,8 +840,8 @@ class WPMSEOMetabox extends WPMSEOMeta
|
|
837 |
}
|
838 |
|
839 |
$sli .= '</select>';
|
840 |
-
echo '<p class="wpms_width_100 wpms_left optimization-row-box
|
841 |
-
|
842 |
data-alt="' . esc_attr__('Allow search engines robots to index this content,
|
843 |
as default your content is indexed', 'wp-meta-seo') . '"
|
844 |
style="color:#32373C" data-hasqtip="2">chat_bubble</i></span>' . $sli . '</p>'; // phpcs:ignore WordPress.Security.EscapeOutput -- Content escaped in previous line (same function)
|
219 |
);
|
220 |
}
|
221 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
222 |
wp_enqueue_script(
|
223 |
'wpms_ju_velocity_js',
|
224 |
plugins_url('assets/wordpress-css-framework/js/velocity.min.js', dirname(__FILE__)),
|
357 |
|
358 |
self::$meta_length_reason = apply_filters('wpmseo_desc_length_reason', self::$meta_length_reason, $post);
|
359 |
self::$meta_length = apply_filters('wpmseo_desc_length', self::$meta_length, $post);
|
360 |
+
$title_template = '%title% - %sitename%';
|
361 |
|
362 |
$desc_template = '';
|
363 |
$sample_permalink = get_sample_permalink($post->ID);
|
366 |
$cached_replacement_vars = array();
|
367 |
|
368 |
$vars_to_cache = array(
|
369 |
+
'date' => wpmsRetrieveDate($post),
|
370 |
+
'id' => !(empty($post->ID)) ? $post->ID : null,
|
371 |
+
'sitename' => trim(strip_tags(get_bloginfo('name'))),
|
372 |
+
'sitedesc' => trim(strip_tags(get_bloginfo('description'))),
|
373 |
+
'sep' => '-',
|
374 |
+
'page' => '',
|
375 |
+
'currenttime' => date_i18n(get_option('time_format')),
|
376 |
+
'currentdate' => date_i18n(get_option('date_format')),
|
377 |
+
'currentday' => date_i18n('j'),
|
378 |
+
'currentmonth' => date_i18n('F'),
|
379 |
+
'currentyear' => date_i18n('Y'),
|
380 |
);
|
381 |
|
382 |
+
foreach ($vars_to_cache as $var => $value) {
|
383 |
+
$cached_replacement_vars[$var] = $value;
|
384 |
}
|
385 |
|
386 |
$cached_replacement_vars['sitename'] = get_option('blogname');
|
491 |
if (is_object($post) && isset($post->post_type)) {
|
492 |
foreach ($this->getMetaFieldDefs('general', $post->post_type) as $key => $meta_field) {
|
493 |
$content .= $this->doMetaBox($meta_field, $key);
|
494 |
+
if ($key === 'title') {
|
495 |
+
$content .= '<p class="description p-lr-20">'.esc_html__('Snippet variable: ', 'wp-meta-seo').'%title%, %date%, %id%, %sitename%, %sitedesc%, %page%, %currenttime%, %currentdate%, %currentday%, %currentmonth%, %currentyear%</p>';
|
496 |
+
}
|
497 |
}
|
498 |
unset($key, $meta_field);
|
499 |
}
|
722 |
}
|
723 |
}
|
724 |
|
725 |
+
$html = '<div class="'. esc_html($meta_field_def['classrow'] . ' wpms_left optimization-row-box') .'">';
|
726 |
$html .= '<label class="ju-setting-label wpms_width_100 wpms_left p-l-0">'. $label . $help .'</label>';
|
727 |
+
$html .= '<label class="wpms_width_100 label-input wpms_left p-t-20">'. $content .'</label>';
|
728 |
if (isset($meta_field_def['description'])) {
|
729 |
if (!strpos($meta_field_def['class'], 'has-length') !== false) {
|
730 |
$html .= '<p class="description">' . $meta_field_def['description'] . '</p>';
|
821 |
$slf .= '<option value="nofollow">' . esc_html__('Nofollow', 'wp-meta-seo') . '</option>';
|
822 |
}
|
823 |
$slf .= '</select>';
|
824 |
+
echo '<p class="wpms_width_100 wpms_left optimization-row-box p_index_folder"><span class="wpmslabel"><label>' . esc_html__('Follow', 'wp-meta-seo') . '
|
825 |
+
</label><i class="material-icons alignright metaseo_help" id="deschelp"
|
826 |
data-alt="' . esc_attr__('Nofollow provides a way for webmasters to tell search engines:
|
827 |
don\'t follow this link. So it may influence the link target’s ranking', 'wp-meta-seo') . '"
|
828 |
style="color:#32373C" data-hasqtip="2">chat_bubble</i></span>' . $slf . '</p>'; // phpcs:ignore WordPress.Security.EscapeOutput -- Content escaped in previous line (same function)
|
840 |
}
|
841 |
|
842 |
$sli .= '</select>';
|
843 |
+
echo '<p class="wpms_width_100 wpms_left optimization-row-box p_index_folder"><span class="wpmslabel"><label>' . esc_html__('Index', 'wp-meta-seo') . '
|
844 |
+
</label><i class="material-icons alignright metaseo_help" id="deschelp"
|
845 |
data-alt="' . esc_attr__('Allow search engines robots to index this content,
|
846 |
as default your content is indexed', 'wp-meta-seo') . '"
|
847 |
style="color:#32373C" data-hasqtip="2">chat_bubble</i></span>' . $sli . '</p>'; // phpcs:ignore WordPress.Security.EscapeOutput -- Content escaped in previous line (same function)
|
inc/class.metaseo-opengraph.php
CHANGED
@@ -29,23 +29,124 @@ class MetaSeoOpenGraph
|
|
29 |
$meta_title = $shop->post_title;
|
30 |
}
|
31 |
|
32 |
-
return esc_html($meta_title);
|
33 |
}
|
34 |
|
|
|
35 |
$meta_title = get_post_meta($id, '_metaseo_metatitle', true);
|
36 |
if ($meta_title !== maybe_unserialize($meta_title)) {
|
37 |
$meta_title = '';
|
38 |
}
|
39 |
|
40 |
if ($meta_title === '') {
|
41 |
-
$post = get_post($id);
|
42 |
if (empty($post)) {
|
43 |
return '';
|
44 |
}
|
45 |
-
$meta_title =
|
46 |
}
|
47 |
|
48 |
-
return esc_html($meta_title);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
}
|
50 |
|
51 |
/**
|
@@ -58,6 +159,7 @@ class MetaSeoOpenGraph
|
|
58 |
*/
|
59 |
public function getMetaTitle($settings, $meta_title)
|
60 |
{
|
|
|
61 |
$meta_title_esc = esc_attr($meta_title);
|
62 |
// check homepage is a page
|
63 |
if ($meta_title === '' && is_front_page()) {
|
@@ -67,7 +169,7 @@ class MetaSeoOpenGraph
|
|
67 |
}
|
68 |
}
|
69 |
|
70 |
-
return esc_attr($meta_title_esc);
|
71 |
}
|
72 |
|
73 |
/**
|
@@ -99,6 +201,7 @@ class MetaSeoOpenGraph
|
|
99 |
*/
|
100 |
public function getDesc($settings, $id, $content)
|
101 |
{
|
|
|
102 |
$meta_desc_esc = get_post_meta($id, '_metaseo_metadesc', true);
|
103 |
if ($meta_desc_esc !== maybe_unserialize($meta_desc_esc)) {
|
104 |
$meta_desc_esc = '';
|
@@ -120,7 +223,7 @@ class MetaSeoOpenGraph
|
|
120 |
$meta_desc_esc = '';
|
121 |
}
|
122 |
}
|
123 |
-
return esc_attr($meta_desc_esc);
|
124 |
}
|
125 |
|
126 |
/**
|
29 |
$meta_title = $shop->post_title;
|
30 |
}
|
31 |
|
32 |
+
return esc_html($this->replaceSnippet($meta_title, $shop));
|
33 |
}
|
34 |
|
35 |
+
$post = get_post($id);
|
36 |
$meta_title = get_post_meta($id, '_metaseo_metatitle', true);
|
37 |
if ($meta_title !== maybe_unserialize($meta_title)) {
|
38 |
$meta_title = '';
|
39 |
}
|
40 |
|
41 |
if ($meta_title === '') {
|
|
|
42 |
if (empty($post)) {
|
43 |
return '';
|
44 |
}
|
45 |
+
$meta_title = '%title% - %sitename%';
|
46 |
}
|
47 |
|
48 |
+
return esc_html($this->replaceSnippet($meta_title, $post));
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Retrieve the current page number with context (i.e. 'page 2 of 4') for use as replacement string.
|
53 |
+
*
|
54 |
+
* @return string
|
55 |
+
*/
|
56 |
+
public function retrievePage()
|
57 |
+
{
|
58 |
+
$replacement = null;
|
59 |
+
|
60 |
+
$max = $this->determinePagenumbering('max');
|
61 |
+
$nr = $this->determinePagenumbering('nr');
|
62 |
+
$sep = '-';
|
63 |
+
|
64 |
+
if ($max > 1 && $nr > 1) {
|
65 |
+
$replacement = sprintf($sep . ' ' . __('Page %1$d of %2$d', 'wp-meta-seo'), $nr, $max);
|
66 |
+
}
|
67 |
+
|
68 |
+
return $replacement;
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Determine the page numbering of the current post/page/cpt
|
73 |
+
*
|
74 |
+
* @param string $request Whether to return the page number or the max number of pages ('nr'|'max')
|
75 |
+
*
|
76 |
+
* @return integer|null
|
77 |
+
*/
|
78 |
+
public function determinePagenumbering($request = 'nr')
|
79 |
+
{
|
80 |
+
global $wp_query, $post;
|
81 |
+
$max_num_pages = null;
|
82 |
+
$page_number = null;
|
83 |
+
|
84 |
+
$max_num_pages = 1;
|
85 |
+
|
86 |
+
if (!is_singular()) {
|
87 |
+
$page_number = get_query_var('paged');
|
88 |
+
if ($page_number === 0 || $page_number === '') {
|
89 |
+
$page_number = 1;
|
90 |
+
}
|
91 |
+
|
92 |
+
if (isset($wp_query->max_num_pages) && ($wp_query->max_num_pages !== '' && (int) $wp_query->max_num_pages !== 0)) {
|
93 |
+
$max_num_pages = $wp_query->max_num_pages;
|
94 |
+
}
|
95 |
+
} else {
|
96 |
+
$page_number = get_query_var('page');
|
97 |
+
if ($page_number === 0 || $page_number === '') {
|
98 |
+
$page_number = 1;
|
99 |
+
}
|
100 |
+
|
101 |
+
if (isset($post->post_content)) {
|
102 |
+
$max_num_pages = (substr_count($post->post_content, '<!--nextpage-->') + 1);
|
103 |
+
}
|
104 |
+
}
|
105 |
+
|
106 |
+
$return = null;
|
107 |
+
|
108 |
+
switch ($request) {
|
109 |
+
case 'nr':
|
110 |
+
$return = $page_number;
|
111 |
+
break;
|
112 |
+
case 'max':
|
113 |
+
$return = $max_num_pages;
|
114 |
+
break;
|
115 |
+
}
|
116 |
+
|
117 |
+
return $return;
|
118 |
+
}
|
119 |
+
|
120 |
+
/**
|
121 |
+
* Replace Snippet
|
122 |
+
*
|
123 |
+
* @param string $string String
|
124 |
+
* @param object $post Current post
|
125 |
+
*
|
126 |
+
* @return mixed
|
127 |
+
*/
|
128 |
+
public function replaceSnippet($string, $post)
|
129 |
+
{
|
130 |
+
$vars_to_cache = array(
|
131 |
+
'title' => !(empty($post->post_title)) ? $post->post_title : null,
|
132 |
+
'date' => wpmsRetrieveDate($post),
|
133 |
+
'id' => !(empty($post->ID)) ? $post->ID : null,
|
134 |
+
'sitename' => trim(strip_tags(get_bloginfo('name'))),
|
135 |
+
'sitedesc' => trim(strip_tags(get_bloginfo('description'))),
|
136 |
+
'sep' => '-',
|
137 |
+
'page' => $this->retrievePage(),
|
138 |
+
'currenttime' => date_i18n(get_option('time_format')),
|
139 |
+
'currentdate' => date_i18n(get_option('date_format')),
|
140 |
+
'currentday' => date_i18n('j'),
|
141 |
+
'currentmonth' => date_i18n('F'),
|
142 |
+
'currentyear' => date_i18n('Y'),
|
143 |
+
);
|
144 |
+
|
145 |
+
foreach ($vars_to_cache as $var => $value) {
|
146 |
+
$string = str_replace('%' . $var . '%', $value, $string);
|
147 |
+
}
|
148 |
+
|
149 |
+
return $string;
|
150 |
}
|
151 |
|
152 |
/**
|
159 |
*/
|
160 |
public function getMetaTitle($settings, $meta_title)
|
161 |
{
|
162 |
+
global $post;
|
163 |
$meta_title_esc = esc_attr($meta_title);
|
164 |
// check homepage is a page
|
165 |
if ($meta_title === '' && is_front_page()) {
|
169 |
}
|
170 |
}
|
171 |
|
172 |
+
return esc_attr($this->replaceSnippet($meta_title_esc, $post));
|
173 |
}
|
174 |
|
175 |
/**
|
201 |
*/
|
202 |
public function getDesc($settings, $id, $content)
|
203 |
{
|
204 |
+
global $post;
|
205 |
$meta_desc_esc = get_post_meta($id, '_metaseo_metadesc', true);
|
206 |
if ($meta_desc_esc !== maybe_unserialize($meta_desc_esc)) {
|
207 |
$meta_desc_esc = '';
|
223 |
$meta_desc_esc = '';
|
224 |
}
|
225 |
}
|
226 |
+
return esc_attr($this->replaceSnippet($meta_desc_esc, $post));
|
227 |
}
|
228 |
|
229 |
/**
|
inc/class.metaseo-sitemap.php
CHANGED
@@ -1960,6 +1960,9 @@ ORDER BY p.post_date DESC', array($post_type)));
|
|
1960 |
$title = $post_submenu->post_title;
|
1961 |
if (empty($title)) {
|
1962 |
$term = get_term($id_menu, $type_menu);
|
|
|
|
|
|
|
1963 |
$title = $term->name;
|
1964 |
}
|
1965 |
} else {
|
@@ -2347,8 +2350,10 @@ ORDER BY p.post_date DESC', array($post_type)));
|
|
2347 |
|
2348 |
/**
|
2349 |
* Submit sitemaps, don't ping if blog is not public.
|
|
|
|
|
2350 |
*/
|
2351 |
-
do_action('wpms_submit_sitemap');
|
2352 |
if ($type === 'ajax') {
|
2353 |
wp_send_json(array('status' => true, 'message' => 'success'));
|
2354 |
}
|
1960 |
$title = $post_submenu->post_title;
|
1961 |
if (empty($title)) {
|
1962 |
$term = get_term($id_menu, $type_menu);
|
1963 |
+
if (empty($term->name)) {
|
1964 |
+
continue;
|
1965 |
+
}
|
1966 |
$title = $term->name;
|
1967 |
}
|
1968 |
} else {
|
2350 |
|
2351 |
/**
|
2352 |
* Submit sitemaps, don't ping if blog is not public.
|
2353 |
+
*
|
2354 |
+
* @param string Sitemap URL
|
2355 |
*/
|
2356 |
+
do_action('wpms_submit_sitemap', site_url($this->wpms_sitemap_name));
|
2357 |
if ($type === 'ajax') {
|
2358 |
wp_send_json(array('status' => true, 'message' => 'success'));
|
2359 |
}
|
inc/install-wizard/content/viewMetaInfos.php
CHANGED
@@ -66,7 +66,7 @@ $next_link = $wizard->getNextLink($step);
|
|
66 |
|
67 |
<div class="ju-settings-option wpms-no-shadow wpms_width_100 p-d-20">
|
68 |
<label class="wpms_width_100 p-b-20 wpms_left text label_text">
|
69 |
-
<?php esc_html_e('Search engine
|
70 |
</label>
|
71 |
|
72 |
<label>
|
66 |
|
67 |
<div class="ju-settings-option wpms-no-shadow wpms_width_100 p-d-20">
|
68 |
<label class="wpms_width_100 p-b-20 wpms_left text label_text">
|
69 |
+
<?php esc_html_e('Search engine description', 'wp-meta-seo'); ?>
|
70 |
</label>
|
71 |
|
72 |
<label>
|
inc/install-wizard/content/viewSocial.php
CHANGED
@@ -12,7 +12,7 @@ $next_link = $wizard->getNextLink($step);
|
|
12 |
<input type="hidden" name="wpms_save_step" value="1"/>
|
13 |
<div class="wizard-header">
|
14 |
<div class="title font-size-35"><?php esc_html_e('Social', 'wp-meta-seo'); ?></div>
|
15 |
-
<p class="description"><?php esc_html_e('
|
16 |
</div>
|
17 |
<div class="wizard-content">
|
18 |
<div class="ju-settings-option wpms_width_100 p-d-20">
|
12 |
<input type="hidden" name="wpms_save_step" value="1"/>
|
13 |
<div class="wizard-header">
|
14 |
<div class="title font-size-35"><?php esc_html_e('Social', 'wp-meta-seo'); ?></div>
|
15 |
+
<p class="description"><?php esc_html_e('If your website got user social engagement, you can customize the Twitter and facebook preview of your content here.', 'wp-meta-seo') ?></p>
|
16 |
</div>
|
17 |
<div class="wizard-content">
|
18 |
<div class="ju-settings-option wpms_width_100 p-d-20">
|
languages/wp-meta-seo-en_US.mo
CHANGED
Binary file
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: JoomUnited
|
|
3 |
Tags: google, webmaster tools, keywords, meta, meta description, meta keywords, meta title, robots meta, search engine optimization, seo, wordpress seo, yahoo, image optimization, image resize, custom post seo, redirect, redirection, 301, broken link
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 4.9.8
|
6 |
-
Stable tag: 4.0.
|
7 |
Requires PHP: 5.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -277,6 +277,10 @@ Yes WP Meta SEO is compatible with Gutenberg editor since 3.7 version.
|
|
277 |
|
278 |
== Changelog ==
|
279 |
|
|
|
|
|
|
|
|
|
280 |
= 4.0.0 =
|
281 |
* Add : New admin UX and design
|
282 |
* Add : Settings UX with AJAX search engine
|
3 |
Tags: google, webmaster tools, keywords, meta, meta description, meta keywords, meta title, robots meta, search engine optimization, seo, wordpress seo, yahoo, image optimization, image resize, custom post seo, redirect, redirection, 301, broken link
|
4 |
Requires at least: 4.0
|
5 |
Tested up to: 4.9.8
|
6 |
+
Stable tag: 4.0.1
|
7 |
Requires PHP: 5.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
277 |
|
278 |
== Changelog ==
|
279 |
|
280 |
+
= 4.0.1 =
|
281 |
+
* Fix : Email report doesn't work
|
282 |
+
* Fix : Css conflict in meta box
|
283 |
+
|
284 |
= 4.0.0 =
|
285 |
* Add : New admin UX and design
|
286 |
* Add : Settings UX with AJAX search engine
|
wp-meta-seo.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin Name: WP Meta SEO
|
5 |
* Plugin URI: http://www.joomunited.com/wordpress-products/wp-meta-seo
|
6 |
* Description: WP Meta SEO is a plugin for WordPress to fill meta for content, images and main SEO info in a single view.
|
7 |
-
* Version: 4.0.
|
8 |
* Text Domain: wp-meta-seo
|
9 |
* Domain Path: /languages
|
10 |
* Author: JoomUnited
|
@@ -90,7 +90,7 @@ if (!defined('WPMSEO_VERSION')) {
|
|
90 |
/**
|
91 |
* Plugin version
|
92 |
*/
|
93 |
-
define('WPMSEO_VERSION', '4.0.
|
94 |
}
|
95 |
|
96 |
if (!defined('WPMS_CLIENTID')) {
|
@@ -168,8 +168,8 @@ $GLOBALS['metaseo_sitemap'] = new MetaSeoSitemap;
|
|
168 |
function wpmsGetDefaultSettings()
|
169 |
{
|
170 |
return array(
|
171 |
-
'home_meta_active'
|
172 |
-
'webpage_testid'
|
173 |
'metaseo_title_home' => '',
|
174 |
'metaseo_desc_home' => '',
|
175 |
'metaseo_showfacebook' => '',
|
@@ -187,6 +187,34 @@ function wpmsGetDefaultSettings()
|
|
187 |
'metaseo_overridemeta' => 1
|
188 |
);
|
189 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
if (is_admin()) {
|
191 |
require_once(WPMETASEO_PLUGIN_DIR . 'inc/class.metaseo-content-list-table.php');
|
192 |
require_once(WPMETASEO_PLUGIN_DIR . 'inc/class.metaseo-image-list-table.php');
|
@@ -306,7 +334,7 @@ if (is_admin()) {
|
|
306 |
wp_reset_query();
|
307 |
|
308 |
$default_settings = wpmsGetDefaultSettings();
|
309 |
-
$settings
|
310 |
if (is_array($settings)) {
|
311 |
$settings = array_merge($default_settings, $settings);
|
312 |
} else {
|
@@ -472,7 +500,7 @@ if (is_admin()) {
|
|
472 |
{
|
473 |
global $wp_query;
|
474 |
$default_settings = wpmsGetDefaultSettings();
|
475 |
-
$settings
|
476 |
if (is_array($settings)) {
|
477 |
$settings = array_merge($default_settings, $settings);
|
478 |
} else {
|
@@ -826,7 +854,7 @@ function wpmsTemplateRedirect()
|
|
826 |
|
827 |
$referrers = implode('||', $list_referrers);
|
828 |
$referrers = trim($referrers, '||');
|
829 |
-
$value
|
830 |
'hit' => (int) $links_broken->hit + 1,
|
831 |
'referrer' => $referrers
|
832 |
);
|
4 |
* Plugin Name: WP Meta SEO
|
5 |
* Plugin URI: http://www.joomunited.com/wordpress-products/wp-meta-seo
|
6 |
* Description: WP Meta SEO is a plugin for WordPress to fill meta for content, images and main SEO info in a single view.
|
7 |
+
* Version: 4.0.1
|
8 |
* Text Domain: wp-meta-seo
|
9 |
* Domain Path: /languages
|
10 |
* Author: JoomUnited
|
90 |
/**
|
91 |
* Plugin version
|
92 |
*/
|
93 |
+
define('WPMSEO_VERSION', '4.0.1');
|
94 |
}
|
95 |
|
96 |
if (!defined('WPMS_CLIENTID')) {
|
168 |
function wpmsGetDefaultSettings()
|
169 |
{
|
170 |
return array(
|
171 |
+
'home_meta_active' => 1,
|
172 |
+
'webpage_testid' => 0,
|
173 |
'metaseo_title_home' => '',
|
174 |
'metaseo_desc_home' => '',
|
175 |
'metaseo_showfacebook' => '',
|
187 |
'metaseo_overridemeta' => 1
|
188 |
);
|
189 |
}
|
190 |
+
|
191 |
+
/**
|
192 |
+
* Retrieve the date of the post/page/cpt for use as replacement string
|
193 |
+
*
|
194 |
+
* @param object $current_post Current post info
|
195 |
+
*
|
196 |
+
* @return string|null
|
197 |
+
*/
|
198 |
+
function wpmsRetrieveDate($current_post)
|
199 |
+
{
|
200 |
+
$replacement = null;
|
201 |
+
if ($current_post->post_date !== '') {
|
202 |
+
$replacement = mysql2date(get_option('date_format'), $current_post->post_date, true);
|
203 |
+
} else {
|
204 |
+
if (get_query_var('day') && get_query_var('day') !== '') {
|
205 |
+
$replacement = get_the_date();
|
206 |
+
} else {
|
207 |
+
if (single_month_title(' ', false) && single_month_title(' ', false) !== '') {
|
208 |
+
$replacement = single_month_title(' ', false);
|
209 |
+
} elseif (get_query_var('year') !== '') {
|
210 |
+
$replacement = get_query_var('year');
|
211 |
+
}
|
212 |
+
}
|
213 |
+
}
|
214 |
+
|
215 |
+
return $replacement;
|
216 |
+
}
|
217 |
+
|
218 |
if (is_admin()) {
|
219 |
require_once(WPMETASEO_PLUGIN_DIR . 'inc/class.metaseo-content-list-table.php');
|
220 |
require_once(WPMETASEO_PLUGIN_DIR . 'inc/class.metaseo-image-list-table.php');
|
334 |
wp_reset_query();
|
335 |
|
336 |
$default_settings = wpmsGetDefaultSettings();
|
337 |
+
$settings = get_option('_metaseo_settings');
|
338 |
if (is_array($settings)) {
|
339 |
$settings = array_merge($default_settings, $settings);
|
340 |
} else {
|
500 |
{
|
501 |
global $wp_query;
|
502 |
$default_settings = wpmsGetDefaultSettings();
|
503 |
+
$settings = get_option('_metaseo_settings');
|
504 |
if (is_array($settings)) {
|
505 |
$settings = array_merge($default_settings, $settings);
|
506 |
} else {
|
854 |
|
855 |
$referrers = implode('||', $list_referrers);
|
856 |
$referrers = trim($referrers, '||');
|
857 |
+
$value = array(
|
858 |
'hit' => (int) $links_broken->hit + 1,
|
859 |
'referrer' => $referrers
|
860 |
);
|