Version Description
- Add : New content meta editor with direct edition
- Add : New content meta editor on bulk meta editor
- Add : SEO keywords field on post/page edition
- Add : SEO score and keywords in posts list
Download this release
Release Info
Developer | JoomUnited |
Plugin | WP Meta SEO |
Version | 4.3.0 |
Comparing to | |
See all releases |
Code changes from version 4.2.10 to 4.3.0
- assets/css/bootstrap/bootstrap.tagsinput.css +92 -0
- assets/css/broken_link.css +1 -0
- assets/css/main.css +58 -4
- assets/css/metabox-tabs.css +123 -21
- assets/css/metaseo_admin.css +46 -7
- assets/css/style.css +2 -2
- assets/css/wpms-post-bulk-edit.css +66 -0
- assets/js/bootstrap/bootstrap-tagsinput.min.js +7 -0
- assets/js/cliffpyles.js +17 -4
- assets/js/dashboard.js +0 -6
- assets/js/metaseo_admin.js +10 -1
- assets/js/my-qtips.js +2 -2
- assets/js/wp-metaseo-metabox.js +58 -19
- assets/js/wpms-post-bulk-edit.js +123 -0
- assets/js/wpms-seokeyword-metabox.js +332 -0
- assets/js/wpms-seokeyword-metabox.min.js +1 -0
- inc/class.metaseo-admin.php +589 -5
- inc/class.metaseo-content-list-table.php +59 -50
- inc/class.metaseo-dashboard.php +37 -98
- inc/class.metaseo-meta.php +22 -16
- inc/class.metaseo-metabox.php +51 -28
- inc/class.metaseo-snippet-preview.php +21 -6
- inc/pages/content-meta.php +7 -0
- languages/wp-meta-seo-en_US.mo +0 -0
- readme.txt +7 -1
- wp-meta-seo.php +4 -4
assets/css/bootstrap/bootstrap.tagsinput.css
ADDED
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* wpms-bootstrap-tagsinput v0.8.0
|
3 |
+
*
|
4 |
+
*/
|
5 |
+
|
6 |
+
.wpms-bootstrap-tagsinput {
|
7 |
+
width: 100%;
|
8 |
+
max-width: 100%;
|
9 |
+
display: inline-block;
|
10 |
+
padding: 9px 6px;
|
11 |
+
color: #555;
|
12 |
+
vertical-align: middle;
|
13 |
+
border-radius: 4px;
|
14 |
+
cursor: text;
|
15 |
+
font-size: 16px;
|
16 |
+
font-style: normal;
|
17 |
+
font-stretch: normal;
|
18 |
+
line-height: normal;
|
19 |
+
letter-spacing: 0.8px;
|
20 |
+
min-height: 45px;
|
21 |
+
box-shadow: 0 0 0 transparent;
|
22 |
+
border: 1px solid #7e8993;
|
23 |
+
background-color: #fff;
|
24 |
+
}
|
25 |
+
|
26 |
+
.wpms-bootstrap-tagsinput.focus {
|
27 |
+
box-shadow: none;
|
28 |
+
outline: none;
|
29 |
+
border-color: #007cba;
|
30 |
+
}
|
31 |
+
|
32 |
+
.wpms-bootstrap-tagsinput input {
|
33 |
+
border: none;
|
34 |
+
box-shadow: none;
|
35 |
+
outline: none;
|
36 |
+
background-color: transparent;
|
37 |
+
padding: 0 5px;
|
38 |
+
margin: 0 0 0 4px;
|
39 |
+
width: auto;
|
40 |
+
max-width: fit-content;
|
41 |
+
}
|
42 |
+
.wpms-bootstrap-tagsinput.form-control input::-moz-placeholder {
|
43 |
+
color: #777;
|
44 |
+
opacity: 1;
|
45 |
+
}
|
46 |
+
.wpms-bootstrap-tagsinput.form-control input:-ms-input-placeholder {
|
47 |
+
color: #777;
|
48 |
+
}
|
49 |
+
.wpms-bootstrap-tagsinput.form-control input::-webkit-input-placeholder {
|
50 |
+
color: #777;
|
51 |
+
}
|
52 |
+
.wpms-bootstrap-tagsinput input:focus {
|
53 |
+
border: none;
|
54 |
+
box-shadow: none;
|
55 |
+
}
|
56 |
+
.wpms-bootstrap-tagsinput .tag {
|
57 |
+
margin-right: 2px;
|
58 |
+
color: white;
|
59 |
+
}
|
60 |
+
.wpms-bootstrap-tagsinput .tag [data-role="remove"] {
|
61 |
+
margin-left: 5px;
|
62 |
+
cursor: pointer;
|
63 |
+
vertical-align: baseline;
|
64 |
+
}
|
65 |
+
.wpms-bootstrap-tagsinput .tag [data-role="remove"]:after {
|
66 |
+
content: "x";
|
67 |
+
padding: 0 2px;
|
68 |
+
vertical-align: text-bottom;
|
69 |
+
}
|
70 |
+
.wpms-bootstrap-tagsinput .tag [data-role="remove"]:hover {
|
71 |
+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
72 |
+
}
|
73 |
+
.wpms-bootstrap-tagsinput .tag [data-role="remove"]:hover:active {
|
74 |
+
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
75 |
+
}
|
76 |
+
|
77 |
+
.wpms-bootstrap-tagsinput .label-info {
|
78 |
+
background-color: #74B6FC;
|
79 |
+
}
|
80 |
+
|
81 |
+
.wpms-bootstrap-tagsinput .label {
|
82 |
+
display: inline;
|
83 |
+
padding: 5px 10px 7px 10px;
|
84 |
+
font-size: 75%;
|
85 |
+
font-weight: 700;
|
86 |
+
color: #fff;
|
87 |
+
text-align: center;
|
88 |
+
white-space: nowrap;
|
89 |
+
vertical-align: baseline;
|
90 |
+
border-radius: 20px;
|
91 |
+
letter-spacing: 1.5px;
|
92 |
+
}
|
assets/css/broken_link.css
CHANGED
@@ -38,6 +38,7 @@ table.metaseo_images .wpms-input-text-wrap input{
|
|
38 |
font-size: 26px !important;
|
39 |
padding: 4px;
|
40 |
margin: 5.5px;
|
|
|
41 |
}
|
42 |
|
43 |
.wpms_form_add_customlink{
|
38 |
font-size: 26px !important;
|
39 |
padding: 4px;
|
40 |
margin: 5.5px;
|
41 |
+
line-height: 1.8;
|
42 |
}
|
43 |
|
44 |
.wpms_form_add_customlink{
|
assets/css/main.css
CHANGED
@@ -20,6 +20,14 @@
|
|
20 |
background-color: #f3f6fa;
|
21 |
}
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
.content-box {
|
24 |
padding: 0 6%;
|
25 |
}
|
@@ -512,9 +520,9 @@
|
|
512 |
font-weight: 500;
|
513 |
font-style: normal;
|
514 |
font-stretch: normal;
|
515 |
-
line-height:
|
516 |
-
letter-spacing:
|
517 |
-
color: #
|
518 |
border: solid 0.5px #ddd;
|
519 |
opacity: 0.6;
|
520 |
}
|
@@ -613,13 +621,20 @@
|
|
613 |
padding: 20px 10px;
|
614 |
}
|
615 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
616 |
.wpms-form-table .wp-list-table thead > tr .check-column,
|
617 |
.wpms-form-table .wp-list-table tfoot > tr .check-column {
|
618 |
vertical-align: middle;
|
619 |
}
|
620 |
|
621 |
.wpms-form-table .wp-list-table .post-title {
|
622 |
-
font-size:
|
623 |
font-weight: 600;
|
624 |
font-style: normal;
|
625 |
font-stretch: normal;
|
@@ -884,6 +899,22 @@
|
|
884 |
min-height: 30px;
|
885 |
}
|
886 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
887 |
@media only screen and (max-width: 1355px) {
|
888 |
.wp-meta-seo_page_metaseo_settings .ju-settings-option {
|
889 |
width: 100%;
|
@@ -1060,6 +1091,29 @@
|
|
1060 |
.wp-meta-seo_page_metaseo_google_analytics .ju-settings-option .ju-switch-button input{
|
1061 |
width: 98%;
|
1062 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1063 |
}
|
1064 |
|
1065 |
.intro-topic-tooltip {
|
20 |
background-color: #f3f6fa;
|
21 |
}
|
22 |
|
23 |
+
input[type=checkbox]:checked::before {
|
24 |
+
filter: grayscale(1) brightness(2);
|
25 |
+
}
|
26 |
+
|
27 |
+
input[type=checkbox]:focus {
|
28 |
+
box-shadow: none;
|
29 |
+
}
|
30 |
+
|
31 |
.content-box {
|
32 |
padding: 0 6%;
|
33 |
}
|
520 |
font-weight: 500;
|
521 |
font-style: normal;
|
522 |
font-stretch: normal;
|
523 |
+
line-height: 1.45;
|
524 |
+
letter-spacing: normal;
|
525 |
+
color: #4D5156;
|
526 |
border: solid 0.5px #ddd;
|
527 |
opacity: 0.6;
|
528 |
}
|
621 |
padding: 20px 10px;
|
622 |
}
|
623 |
|
624 |
+
.wp-meta-seo_page_metaseo_content_meta .wpms-form-table .wp-list-table tbody > tr td:nth-child(3),
|
625 |
+
.wp-meta-seo_page_metaseo_content_meta .wpms-form-table .wp-list-table tbody > tr th:nth-child(3) ,
|
626 |
+
.wp-meta-seo_page_metaseo_content_meta .wpms-form-table .wp-list-table tbody > tr td:nth-child(4),
|
627 |
+
.wp-meta-seo_page_metaseo_content_meta .wpms-form-table .wp-list-table tbody > tr th:nth-child(4) {
|
628 |
+
padding: 5px 10px;
|
629 |
+
}
|
630 |
+
|
631 |
.wpms-form-table .wp-list-table thead > tr .check-column,
|
632 |
.wpms-form-table .wp-list-table tfoot > tr .check-column {
|
633 |
vertical-align: middle;
|
634 |
}
|
635 |
|
636 |
.wpms-form-table .wp-list-table .post-title {
|
637 |
+
font-size: 13px;
|
638 |
font-weight: 600;
|
639 |
font-style: normal;
|
640 |
font-stretch: normal;
|
899 |
min-height: 30px;
|
900 |
}
|
901 |
|
902 |
+
.wp-meta-seo_page_metaseo_content_meta .wpms-form-table .custom-bulk-content-metatitle {
|
903 |
+
height: 32px;
|
904 |
+
margin-bottom: 4px;
|
905 |
+
}
|
906 |
+
|
907 |
+
.wp-meta-seo_page_metaseo_content_meta .wpms-form-table .custom-bulk-content-metatitle .custom-bulk-metaseo-metatitle {
|
908 |
+
font-size: 20px !important;
|
909 |
+
}
|
910 |
+
|
911 |
+
.wp-meta-seo_page_metaseo_content_meta .wpms-form-table .custom-bulk-content-metatitle .custom-bulk-metaseo-metatitle,
|
912 |
+
.wp-meta-seo_page_metaseo_content_meta .wpms-form-table .custom-bulk-content-metatitle .title-len {
|
913 |
+
height: 32px;
|
914 |
+
line-height: 32px;
|
915 |
+
}
|
916 |
+
|
917 |
+
|
918 |
@media only screen and (max-width: 1355px) {
|
919 |
.wp-meta-seo_page_metaseo_settings .ju-settings-option {
|
920 |
width: 100%;
|
1091 |
.wp-meta-seo_page_metaseo_google_analytics .ju-settings-option .ju-switch-button input{
|
1092 |
width: 98%;
|
1093 |
}
|
1094 |
+
|
1095 |
+
.wp-meta-seo_page_metaseo_content_meta .wp-list-table thead tr th:not(:first-child),
|
1096 |
+
.wp-meta-seo_page_metaseo_content_meta .wp-list-table tfoot tr th:not(:first-child)
|
1097 |
+
{
|
1098 |
+
display: none;
|
1099 |
+
}
|
1100 |
+
|
1101 |
+
.wp-meta-seo_page_metaseo_content_meta .wp-list-table tbody tr td.check-column {
|
1102 |
+
width: 100% !important;
|
1103 |
+
}
|
1104 |
+
.wp-meta-seo_page_metaseo_content_meta .wp-list-table tbody tr td {
|
1105 |
+
width: 100% !important;
|
1106 |
+
display: block;
|
1107 |
+
}
|
1108 |
+
|
1109 |
+
.wp-meta-seo_page_metaseo_content_meta .wpms-form-table .wp-list-table tbody > tr td,
|
1110 |
+
.wp-meta-seo_page_metaseo_content_meta .wpms-form-table .wp-list-table tbody > tr .check-column {
|
1111 |
+
border-bottom: none !important;
|
1112 |
+
}
|
1113 |
+
|
1114 |
+
.wp-meta-seo_page_metaseo_content_meta .wpms-form-table .wp-list-table tbody > tr td:last-child {
|
1115 |
+
border-bottom: #f3f6fa 10px solid !important;
|
1116 |
+
}
|
1117 |
}
|
1118 |
|
1119 |
.intro-topic-tooltip {
|
assets/css/metabox-tabs.css
CHANGED
@@ -22,9 +22,9 @@
|
|
22 |
font-size: 16px;
|
23 |
font-style: normal;
|
24 |
font-stretch: normal;
|
25 |
-
line-height:
|
26 |
letter-spacing: 0.8px;
|
27 |
-
color: #
|
28 |
}
|
29 |
|
30 |
.optimization-row-box .label-input {
|
@@ -32,11 +32,11 @@
|
|
32 |
}
|
33 |
|
34 |
.optimization-row-box .has-length {
|
35 |
-
min-height:
|
36 |
}
|
37 |
|
38 |
.optimization-row-box textarea.has-length {
|
39 |
-
min-height:
|
40 |
}
|
41 |
|
42 |
.optimization-row-box .length-box-meta {
|
@@ -44,7 +44,7 @@
|
|
44 |
right: 0;
|
45 |
bottom: 1px;
|
46 |
width: 57.9px;
|
47 |
-
height:
|
48 |
background: #42d4a3;
|
49 |
text-align: center;
|
50 |
border-radius: 4px;
|
@@ -96,7 +96,7 @@
|
|
96 |
font-weight: normal;
|
97 |
font-style: normal;
|
98 |
font-stretch: normal;
|
99 |
-
line-height:
|
100 |
letter-spacing: 0.8px;
|
101 |
color: #ffffff;
|
102 |
}
|
@@ -124,11 +124,49 @@
|
|
124 |
|
125 |
#wpmseosnippet {
|
126 |
width: auto;
|
127 |
-
margin: 0 0 10px;
|
128 |
font-family: Arial, Helvetica, sans-serif;
|
129 |
font-style: normal;
|
130 |
}
|
131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
#wpmseosnippet td {
|
133 |
margin: 0;
|
134 |
padding: 0;
|
@@ -144,21 +182,70 @@
|
|
144 |
}
|
145 |
|
146 |
#wpmseosnippet .title {
|
147 |
-
display: block;
|
148 |
-
overflow: hidden;
|
149 |
-
white-space: nowrap;
|
150 |
-
text-overflow: ellipsis;
|
151 |
-
font-size: 24px;
|
152 |
font-weight: 500;
|
153 |
font-style: normal;
|
154 |
font-stretch: normal;
|
155 |
-
line-height:
|
156 |
-
letter-spacing: 0.8px;
|
157 |
color: #1a0dab;
|
158 |
}
|
159 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
#wpmseosnippet .desc {
|
161 |
-
font-size:
|
162 |
line-height: 1.4;
|
163 |
word-wrap: break-word;
|
164 |
}
|
@@ -168,7 +255,9 @@
|
|
168 |
}
|
169 |
|
170 |
#wpmseosnippet .date {
|
171 |
-
color: #
|
|
|
|
|
172 |
}
|
173 |
|
174 |
#wpmseosnippet .desc p {
|
@@ -179,13 +268,13 @@
|
|
179 |
}
|
180 |
|
181 |
#wpmseosnippet .url {
|
182 |
-
font-size:
|
183 |
font-weight: 500;
|
184 |
font-style: normal;
|
185 |
font-stretch: normal;
|
186 |
-
line-height:
|
187 |
letter-spacing: 0.5px;
|
188 |
-
color: #
|
189 |
float: left;
|
190 |
}
|
191 |
|
@@ -404,7 +493,7 @@ div.wpmseo-tab-content {
|
|
404 |
}
|
405 |
|
406 |
.metaseo_analysis {
|
407 |
-
width:
|
408 |
padding: 10px;
|
409 |
line-height: 20px;
|
410 |
float: left;
|
@@ -671,7 +760,7 @@ div.wpmseo-tab-content {
|
|
671 |
margin-top: 10px;
|
672 |
display: inline-block;
|
673 |
width: 100%;
|
674 |
-
font-size:
|
675 |
font-weight: normal;
|
676 |
font-style: normal !important;
|
677 |
font-stretch: normal;
|
@@ -680,6 +769,10 @@ div.wpmseo-tab-content {
|
|
680 |
color: #5f879b !important;
|
681 |
}
|
682 |
|
|
|
|
|
|
|
|
|
683 |
|
684 |
.wpms-top-description {
|
685 |
text-align: center;
|
@@ -930,6 +1023,15 @@ input.obtain{
|
|
930 |
}
|
931 |
}
|
932 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
933 |
@media screen and (max-width: 700px) {
|
934 |
.wpmseotab.wpmseo_social .optimization-row-box {
|
935 |
width: 100%;
|
22 |
font-size: 16px;
|
23 |
font-style: normal;
|
24 |
font-stretch: normal;
|
25 |
+
line-height: 1.2;
|
26 |
letter-spacing: 0.8px;
|
27 |
+
color: #4D5156;
|
28 |
}
|
29 |
|
30 |
.optimization-row-box .label-input {
|
32 |
}
|
33 |
|
34 |
.optimization-row-box .has-length {
|
35 |
+
min-height: 45px;
|
36 |
}
|
37 |
|
38 |
.optimization-row-box textarea.has-length {
|
39 |
+
min-height: 45px;
|
40 |
}
|
41 |
|
42 |
.optimization-row-box .length-box-meta {
|
44 |
right: 0;
|
45 |
bottom: 1px;
|
46 |
width: 57.9px;
|
47 |
+
height: 45px;
|
48 |
background: #42d4a3;
|
49 |
text-align: center;
|
50 |
border-radius: 4px;
|
96 |
font-weight: normal;
|
97 |
font-style: normal;
|
98 |
font-stretch: normal;
|
99 |
+
line-height: 45px;
|
100 |
letter-spacing: 0.8px;
|
101 |
color: #ffffff;
|
102 |
}
|
124 |
|
125 |
#wpmseosnippet {
|
126 |
width: auto;
|
|
|
127 |
font-family: Arial, Helvetica, sans-serif;
|
128 |
font-style: normal;
|
129 |
}
|
130 |
|
131 |
+
#wpmseosnippet .metabox-snippet-description textarea{
|
132 |
+
max-width: 100%;
|
133 |
+
min-width: 590px;
|
134 |
+
min-height: 120px;
|
135 |
+
padding: 5px 5px 5px 12px;
|
136 |
+
position: relative;
|
137 |
+
}
|
138 |
+
|
139 |
+
#wpmseosnippet .metabox-snippet-description .length-box-meta{
|
140 |
+
vertical-align: top;
|
141 |
+
}
|
142 |
+
|
143 |
+
.wpms-mouseover-frame {
|
144 |
+
border-color: #007cba;
|
145 |
+
box-shadow: 0 0 0 1px #007cba;
|
146 |
+
outline: 2px solid transparent;
|
147 |
+
}
|
148 |
+
|
149 |
+
#wpmseosnippet .metabox-snippet-title {
|
150 |
+
margin-bottom: 5px;
|
151 |
+
}
|
152 |
+
|
153 |
+
#wpmseosnippet .metabox-snippet-title .length-box-meta,
|
154 |
+
#wpmseosnippet .metabox-snippet-description .length-box-meta {
|
155 |
+
display: inline-block;
|
156 |
+
position: unset;
|
157 |
+
}
|
158 |
+
|
159 |
+
#wpmseosnippet .metabox-snippet-title input,
|
160 |
+
#wpmseosnippet .metabox-snippet-description textarea
|
161 |
+
{
|
162 |
+
border: none;
|
163 |
+
}
|
164 |
+
|
165 |
+
#metaseo_wpmseo_keywords:focus,
|
166 |
+
#metaseo_wpmseo_metaseo_canonical:focus {
|
167 |
+
border: none;
|
168 |
+
}
|
169 |
+
|
170 |
#wpmseosnippet td {
|
171 |
margin: 0;
|
172 |
padding: 0;
|
182 |
}
|
183 |
|
184 |
#wpmseosnippet .title {
|
|
|
|
|
|
|
|
|
|
|
185 |
font-weight: 500;
|
186 |
font-style: normal;
|
187 |
font-stretch: normal;
|
188 |
+
line-height: 1.3;
|
|
|
189 |
color: #1a0dab;
|
190 |
}
|
191 |
|
192 |
+
.metabox-snippet-title .container-snippet {
|
193 |
+
display: inline-block;
|
194 |
+
position: relative;
|
195 |
+
max-width: 100%;
|
196 |
+
min-width: 590px;
|
197 |
+
min-height: 32px;
|
198 |
+
}
|
199 |
+
|
200 |
+
.metabox-snippet-title .container-snippet .input,
|
201 |
+
.metabox-snippet-title .container-snippet .text {
|
202 |
+
margin: 0;
|
203 |
+
padding: 2px 10px;
|
204 |
+
font-size: 20px;
|
205 |
+
border: 1px solid #ccc;
|
206 |
+
border-radius: 4px;
|
207 |
+
height: 32px;
|
208 |
+
}
|
209 |
+
|
210 |
+
.metabox-snippet-title .container-snippet .text {
|
211 |
+
padding-right: 20px;
|
212 |
+
display: inline-block;
|
213 |
+
visibility: hidden;
|
214 |
+
white-space: pre;
|
215 |
+
}
|
216 |
+
|
217 |
+
.metabox-snippet-title .container-snippet .has-length{
|
218 |
+
min-height: 32px;
|
219 |
+
}
|
220 |
+
|
221 |
+
.metabox-snippet-title .length-box-meta,
|
222 |
+
.metabox-snippet-description .length-box-meta {
|
223 |
+
height: 35px;
|
224 |
+
line-height: 35px;
|
225 |
+
}
|
226 |
+
|
227 |
+
.metabox-snippet-title .length-box-meta span,
|
228 |
+
.metabox-snippet-description .length-box-meta span {
|
229 |
+
line-height: 35px;
|
230 |
+
}
|
231 |
+
|
232 |
+
.metabox-snippet-title .container-snippet .input {
|
233 |
+
position: absolute;
|
234 |
+
top: 0;
|
235 |
+
left: 0;
|
236 |
+
right: 0;
|
237 |
+
bottom: 0;
|
238 |
+
width: 100%;
|
239 |
+
}
|
240 |
+
|
241 |
+
.metabox-snippet-title .container-snippet .input:focus {
|
242 |
+
border-color: #007cba;
|
243 |
+
box-shadow: 0 0 0 1px #007cba;
|
244 |
+
outline: 2px solid transparent;
|
245 |
+
}
|
246 |
+
|
247 |
#wpmseosnippet .desc {
|
248 |
+
font-size: 14px;
|
249 |
line-height: 1.4;
|
250 |
word-wrap: break-word;
|
251 |
}
|
255 |
}
|
256 |
|
257 |
#wpmseosnippet .date {
|
258 |
+
color: #70757a;
|
259 |
+
line-height: 1.58;
|
260 |
+
margin-left: 12px;
|
261 |
}
|
262 |
|
263 |
#wpmseosnippet .desc p {
|
268 |
}
|
269 |
|
270 |
#wpmseosnippet .url {
|
271 |
+
font-size: 14px;
|
272 |
font-weight: 500;
|
273 |
font-style: normal;
|
274 |
font-stretch: normal;
|
275 |
+
line-height: 1.3;
|
276 |
letter-spacing: 0.5px;
|
277 |
+
color: #666;
|
278 |
float: left;
|
279 |
}
|
280 |
|
493 |
}
|
494 |
|
495 |
.metaseo_analysis {
|
496 |
+
width: 100%;
|
497 |
padding: 10px;
|
498 |
line-height: 20px;
|
499 |
float: left;
|
760 |
margin-top: 10px;
|
761 |
display: inline-block;
|
762 |
width: 100%;
|
763 |
+
font-size: 13px !important;
|
764 |
font-weight: normal;
|
765 |
font-style: normal !important;
|
766 |
font-stretch: normal;
|
769 |
color: #5f879b !important;
|
770 |
}
|
771 |
|
772 |
+
#wpmseo_meta .description .snippet-more:hover {
|
773 |
+
cursor: pointer;
|
774 |
+
text-decoration: underline;
|
775 |
+
}
|
776 |
|
777 |
.wpms-top-description {
|
778 |
text-align: center;
|
1023 |
}
|
1024 |
}
|
1025 |
|
1026 |
+
@media screen and (max-width: 1180px) {
|
1027 |
+
#wpmseosnippet .metabox-snippet-title .container-snippet .input,
|
1028 |
+
#wpmseosnippet .metabox-snippet-description textarea,
|
1029 |
+
#wpmseosnippet .metabox-snippet-title .container-snippet{
|
1030 |
+
width: 100% !important;
|
1031 |
+
min-width: unset;
|
1032 |
+
}
|
1033 |
+
}
|
1034 |
+
|
1035 |
@media screen and (max-width: 700px) {
|
1036 |
.wpmseotab.wpmseo_social .optimization-row-box {
|
1037 |
width: 100%;
|
assets/css/metaseo_admin.css
CHANGED
@@ -39,11 +39,11 @@ and open the template in the editor.
|
|
39 |
text-align: center;
|
40 |
float: left;
|
41 |
position: relative;
|
42 |
-
bottom:
|
43 |
left: calc(100% - 58px);
|
44 |
width: 58px;
|
45 |
-
height:
|
46 |
-
line-height:
|
47 |
border-radius: 4px;
|
48 |
background-color: #42d4a3;
|
49 |
font-size: 16px;
|
@@ -97,8 +97,8 @@ and open the template in the editor.
|
|
97 |
}
|
98 |
|
99 |
.snippet_metalink {
|
100 |
-
color: #
|
101 |
-
font-size:
|
102 |
line-height: 16px;
|
103 |
}
|
104 |
|
@@ -609,9 +609,10 @@ strong {
|
|
609 |
}
|
610 |
|
611 |
.wpms_content_loader {
|
612 |
-
width:
|
613 |
-
height:
|
614 |
display: none;
|
|
|
615 |
}
|
616 |
|
617 |
.wpmslabel {
|
@@ -868,6 +869,38 @@ span.wpms-seoImgRemove {
|
|
868 |
border-radius: 4px;
|
869 |
}
|
870 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
871 |
.content-b {
|
872 |
position: relative;
|
873 |
width: 100%;
|
@@ -911,6 +944,12 @@ span.wpms-seoImgRemove {
|
|
911 |
}
|
912 |
|
913 |
|
|
|
|
|
|
|
|
|
|
|
|
|
914 |
@media screen and (max-width: 782px) {
|
915 |
#col_image_name, .col_image_name.column-col_image_name,
|
916 |
#col_image_title, .col_image_title.column-col_image_title,
|
39 |
text-align: center;
|
40 |
float: left;
|
41 |
position: relative;
|
42 |
+
bottom: 48px;
|
43 |
left: calc(100% - 58px);
|
44 |
width: 58px;
|
45 |
+
height: 44px;
|
46 |
+
line-height: 44px;
|
47 |
border-radius: 4px;
|
48 |
background-color: #42d4a3;
|
49 |
font-size: 16px;
|
97 |
}
|
98 |
|
99 |
.snippet_metalink {
|
100 |
+
color: #666;
|
101 |
+
font-size: 13px;
|
102 |
line-height: 16px;
|
103 |
}
|
104 |
|
609 |
}
|
610 |
|
611 |
.wpms_content_loader {
|
612 |
+
width: 16px;
|
613 |
+
height: 16px;
|
614 |
display: none;
|
615 |
+
vertical-align: middle;
|
616 |
}
|
617 |
|
618 |
.wpmslabel {
|
869 |
border-radius: 4px;
|
870 |
}
|
871 |
|
872 |
+
.custom-bulk-content-b {
|
873 |
+
position: relative;
|
874 |
+
width: 100%;
|
875 |
+
float: left;
|
876 |
+
height: 45px;
|
877 |
+
}
|
878 |
+
|
879 |
+
.custom-bulk-metaseo-metatitle,
|
880 |
+
.custom-bulk-metaseo-metadesc{
|
881 |
+
border: none !important;
|
882 |
+
box-shadow: none;
|
883 |
+
outline: none;
|
884 |
+
opacity: 1 !important;
|
885 |
+
}
|
886 |
+
|
887 |
+
.custom-bulk-metaseo-metatitle::placeholder,
|
888 |
+
.custom-bulk-metaseo-metadesc::placeholder {
|
889 |
+
opacity: 0.5;
|
890 |
+
}
|
891 |
+
|
892 |
+
.custom-bulk-metaseo-metatitle {
|
893 |
+
color: #1a0dab !important;
|
894 |
+
}
|
895 |
+
|
896 |
+
.custom-bulk-metaseo-metadesc {
|
897 |
+
height: auto;
|
898 |
+
padding-right: 68px !important;
|
899 |
+
padding-left: 10px;
|
900 |
+
font-weight: normal !important;
|
901 |
+
}
|
902 |
+
|
903 |
+
|
904 |
.content-b {
|
905 |
position: relative;
|
906 |
width: 100%;
|
944 |
}
|
945 |
|
946 |
|
947 |
+
.wpms-mouseover-frame {
|
948 |
+
border-color: #007cba !important;
|
949 |
+
box-shadow: 0 0 0 1px #007cba !important;
|
950 |
+
outline: 2px solid transparent;
|
951 |
+
}
|
952 |
+
|
953 |
@media screen and (max-width: 782px) {
|
954 |
#col_image_name, .col_image_name.column-col_image_name,
|
955 |
#col_image_title, .col_image_title.column-col_image_title,
|
assets/css/style.css
CHANGED
@@ -261,14 +261,14 @@ a.info .tooltip {
|
|
261 |
|
262 |
span.saved-info {
|
263 |
margin: 0;
|
264 |
-
min-height:
|
265 |
padding-left: 5px;
|
266 |
clear: left;
|
267 |
display: none;
|
268 |
}
|
269 |
|
270 |
.metaseo-msg-success {
|
271 |
-
font-size:
|
272 |
font-weight: normal;
|
273 |
font-style: normal;
|
274 |
font-stretch: normal;
|
261 |
|
262 |
span.saved-info {
|
263 |
margin: 0;
|
264 |
+
min-height: 20px;
|
265 |
padding-left: 5px;
|
266 |
clear: left;
|
267 |
display: none;
|
268 |
}
|
269 |
|
270 |
.metaseo-msg-success {
|
271 |
+
font-size: 13px;
|
272 |
font-weight: normal;
|
273 |
font-style: normal;
|
274 |
font-stretch: normal;
|
assets/css/wpms-post-bulk-edit.css
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.wp-list-table td .wpms-column-display {
|
2 |
+
display: block;
|
3 |
+
margin-bottom: 5px;
|
4 |
+
}
|
5 |
+
.wp-list-table td .wpms-column-display.score {
|
6 |
+
margin-bottom: 8px;
|
7 |
+
}
|
8 |
+
|
9 |
+
.wp-list-table td .wpms-column-display.score strong {
|
10 |
+
display: inline-block;
|
11 |
+
padding: 5px 10px;
|
12 |
+
border-radius: 20px;
|
13 |
+
color: #ffffff;
|
14 |
+
}
|
15 |
+
|
16 |
+
.wp-list-table td .wpms-column-display.score.wpms-no-score strong {
|
17 |
+
background: #aeaeae;
|
18 |
+
}
|
19 |
+
|
20 |
+
.wp-list-table td .wpms-column-display.score.wpms-bad-score strong {
|
21 |
+
background: #74B6FC;
|
22 |
+
}
|
23 |
+
|
24 |
+
.wp-list-table td .wpms-column-display.score.wpms-great-score strong {
|
25 |
+
background: #42d4a3;
|
26 |
+
}
|
27 |
+
|
28 |
+
.wp-list-table td .wpms-column-display.keyword .title {
|
29 |
+
font-size: 13px;
|
30 |
+
font-weight: bold;
|
31 |
+
}
|
32 |
+
|
33 |
+
.wp-list-table th#metaseo_seokeywords_details_column>span:nth-child(2) {
|
34 |
+
display: none;
|
35 |
+
}
|
36 |
+
|
37 |
+
.wp-list-table th#metaseo_seokeywords_details_column span:first-child a {
|
38 |
+
display: inline-block;
|
39 |
+
padding-right: 0;
|
40 |
+
}
|
41 |
+
|
42 |
+
.wp-list-table th#metaseo_seokeywords_details_column span:first-child a.dashicons {
|
43 |
+
padding-left: 0;
|
44 |
+
}
|
45 |
+
|
46 |
+
.wp-list-table th#metaseo_seokeywords_details_column .wpms-column-cancel-all {
|
47 |
+
display: inline-block;
|
48 |
+
}
|
49 |
+
|
50 |
+
.wp-list-table td .wpms-column-value {
|
51 |
+
display: none;
|
52 |
+
padding: 5px;
|
53 |
+
border: 1px solid #b5bfc9;
|
54 |
+
background-color: #fff;
|
55 |
+
-webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.07);
|
56 |
+
box-shadow: inset 0 1px 2px rgba(0,0,0,0.07);
|
57 |
+
}
|
58 |
+
|
59 |
+
.wp-list-table td .wpms-column-value:focus {
|
60 |
+
outline: none;
|
61 |
+
}
|
62 |
+
|
63 |
+
.wp-list-table td .wpms-column-edit {
|
64 |
+
display: none;
|
65 |
+
margin-top: 5px;
|
66 |
+
}
|
assets/js/bootstrap/bootstrap-tagsinput.min.js
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* bootstrap-tagsinput v0.8.0
|
3 |
+
*
|
4 |
+
*/
|
5 |
+
|
6 |
+
!function(a){"use strict";function b(b,c){this.isInit=!0,this.itemsArray=[],this.$element=a(b),this.$element.hide(),this.isSelect="SELECT"===b.tagName,this.multiple=this.isSelect&&b.hasAttribute("multiple"),this.objectItems=c&&c.itemValue,this.placeholderText=b.hasAttribute("placeholder")?this.$element.attr("placeholder"):"",this.inputSize=Math.max(1,this.placeholderText.length),this.$container=a('<div class="wpms-bootstrap-tagsinput"></div>'),this.$input=a('<input type="text" placeholder="'+this.placeholderText+'"/>').appendTo(this.$container),this.$element.before(this.$container),this.build(c),this.isInit=!1}function c(a,b){if("function"!=typeof a[b]){var c=a[b];a[b]=function(a){return a[c]}}}function d(a,b){if("function"!=typeof a[b]){var c=a[b];a[b]=function(){return c}}}function e(a){return a?i.text(a).html():""}function f(a){var b=0;if(document.selection){a.focus();var c=document.selection.createRange();c.moveStart("character",-a.value.length),b=c.text.length}else(a.selectionStart||"0"==a.selectionStart)&&(b=a.selectionStart);return b}function g(b,c){var d=!1;return a.each(c,function(a,c){if("number"==typeof c&&b.which===c)return d=!0,!1;if(b.which===c.which){var e=!c.hasOwnProperty("altKey")||b.altKey===c.altKey,f=!c.hasOwnProperty("shiftKey")||b.shiftKey===c.shiftKey,g=!c.hasOwnProperty("ctrlKey")||b.ctrlKey===c.ctrlKey;if(e&&f&&g)return d=!0,!1}}),d}var h={tagClass:function(a){return"label label-info"},focusClass:"focus",itemValue:function(a){return a?a.toString():a},itemText:function(a){return this.itemValue(a)},itemTitle:function(a){return null},freeInput:!0,addOnBlur:!0,maxTags:void 0,maxChars:void 0,confirmKeys:[13,44],delimiter:",",delimiterRegex:null,cancelConfirmKeysOnEmpty:!1,onTagExists:function(a,b){b.hide().fadeIn()},trimValue:!1,allowDuplicates:!1,triggerChange:!0};b.prototype={constructor:b,add:function(b,c,d){var f=this;if(!(f.options.maxTags&&f.itemsArray.length>=f.options.maxTags)&&(b===!1||b)){if("string"==typeof b&&f.options.trimValue&&(b=a.trim(b)),"object"==typeof b&&!f.objectItems)throw"Can't add objects when itemValue option is not set";if(!b.toString().match(/^\s*$/)){if(f.isSelect&&!f.multiple&&f.itemsArray.length>0&&f.remove(f.itemsArray[0]),"string"==typeof b&&"INPUT"===this.$element[0].tagName){var g=f.options.delimiterRegex?f.options.delimiterRegex:f.options.delimiter,h=b.split(g);if(h.length>1){for(var i=0;i<h.length;i++)this.add(h[i],!0);return void(c||f.pushVal(f.options.triggerChange))}}var j=f.options.itemValue(b),k=f.options.itemText(b),l=f.options.tagClass(b),m=f.options.itemTitle(b),n=a.grep(f.itemsArray,function(a){return f.options.itemValue(a)===j})[0];if(!n||f.options.allowDuplicates){if(!(f.items().toString().length+b.length+1>f.options.maxInputLength)){var o=a.Event("beforeItemAdd",{item:b,cancel:!1,options:d});if(f.$element.trigger(o),!o.cancel){f.itemsArray.push(b);var p=a('<span class="tag '+e(l)+(null!==m?'" title="'+m:"")+'">'+e(k)+'<span data-role="remove"></span></span>');p.data("item",b),f.findInputWrapper().before(p),p.after(" ");var q=a('option[value="'+encodeURIComponent(j)+'"]',f.$element).length||a('option[value="'+e(j)+'"]',f.$element).length;if(f.isSelect&&!q){var r=a("<option selected>"+e(k)+"</option>");r.data("item",b),r.attr("value",j),f.$element.append(r)}c||f.pushVal(f.options.triggerChange),(f.options.maxTags===f.itemsArray.length||f.items().toString().length===f.options.maxInputLength)&&f.$container.addClass("bootstrap-tagsinput-max"),a(".typeahead, .twitter-typeahead",f.$container).length&&f.$input.typeahead("val",""),this.isInit?f.$element.trigger(a.Event("itemAddedOnInit",{item:b,options:d})):f.$element.trigger(a.Event("itemAdded",{item:b,options:d}))}}}else if(f.options.onTagExists){var s=a(".tag",f.$container).filter(function(){return a(this).data("item")===n});f.options.onTagExists(b,s)}}}},remove:function(b,c,d){var e=this;if(e.objectItems&&(b="object"==typeof b?a.grep(e.itemsArray,function(a){return e.options.itemValue(a)==e.options.itemValue(b)}):a.grep(e.itemsArray,function(a){return e.options.itemValue(a)==b}),b=b[b.length-1]),b){var f=a.Event("beforeItemRemove",{item:b,cancel:!1,options:d});if(e.$element.trigger(f),f.cancel)return;a(".tag",e.$container).filter(function(){return a(this).data("item")===b}).remove(),a("option",e.$element).filter(function(){return a(this).data("item")===b}).remove(),-1!==a.inArray(b,e.itemsArray)&&e.itemsArray.splice(a.inArray(b,e.itemsArray),1)}c||e.pushVal(e.options.triggerChange),e.options.maxTags>e.itemsArray.length&&e.$container.removeClass("bootstrap-tagsinput-max"),e.$element.trigger(a.Event("itemRemoved",{item:b,options:d}))},removeAll:function(){var b=this;for(a(".tag",b.$container).remove(),a("option",b.$element).remove();b.itemsArray.length>0;)b.itemsArray.pop();b.pushVal(b.options.triggerChange)},refresh:function(){var b=this;a(".tag",b.$container).each(function(){var c=a(this),d=c.data("item"),f=b.options.itemValue(d),g=b.options.itemText(d),h=b.options.tagClass(d);if(c.attr("class",null),c.addClass("tag "+e(h)),c.contents().filter(function(){return 3==this.nodeType})[0].nodeValue=e(g),b.isSelect){var i=a("option",b.$element).filter(function(){return a(this).data("item")===d});i.attr("value",f)}})},items:function(){return this.itemsArray},pushVal:function(){var b=this,c=a.map(b.items(),function(a){return b.options.itemValue(a).toString()});b.$element.val(c,!0),b.options.triggerChange&&b.$element.trigger("change")},build:function(b){var e=this;if(e.options=a.extend({},h,b),e.objectItems&&(e.options.freeInput=!1),c(e.options,"itemValue"),c(e.options,"itemText"),d(e.options,"tagClass"),e.options.typeahead){var i=e.options.typeahead||{};d(i,"source"),e.$input.typeahead(a.extend({},i,{source:function(b,c){function d(a){for(var b=[],d=0;d<a.length;d++){var g=e.options.itemText(a[d]);f[g]=a[d],b.push(g)}c(b)}this.map={};var f=this.map,g=i.source(b);a.isFunction(g.success)?g.success(d):a.isFunction(g.then)?g.then(d):a.when(g).then(d)},updater:function(a){return e.add(this.map[a]),this.map[a]},matcher:function(a){return-1!==a.toLowerCase().indexOf(this.query.trim().toLowerCase())},sorter:function(a){return a.sort()},highlighter:function(a){var b=new RegExp("("+this.query+")","gi");return a.replace(b,"<strong>$1</strong>")}}))}if(e.options.typeaheadjs){var j=null,k={},l=e.options.typeaheadjs;a.isArray(l)?(j=l[0],k=l[1]):k=l,e.$input.typeahead(j,k).on("typeahead:selected",a.proxy(function(a,b){k.valueKey?e.add(b[k.valueKey]):e.add(b),e.$input.typeahead("val","")},e))}e.$container.on("click",a.proxy(function(a){e.$element.attr("disabled")||e.$input.removeAttr("disabled"),e.$input.focus()},e)),e.options.addOnBlur&&e.options.freeInput&&e.$input.on("focusout",a.proxy(function(b){0===a(".typeahead, .twitter-typeahead",e.$container).length&&(e.add(e.$input.val()),e.$input.val(""))},e)),e.$container.on({focusin:function(){e.$container.addClass(e.options.focusClass)},focusout:function(){e.$container.removeClass(e.options.focusClass)}}),e.$container.on("keydown","input",a.proxy(function(b){var c=a(b.target),d=e.findInputWrapper();if(e.$element.attr("disabled"))return void e.$input.attr("disabled","disabled");switch(b.which){case 8:if(0===f(c[0])){var g=d.prev();g.length&&e.remove(g.data("item"))}break;case 46:if(0===f(c[0])){var h=d.next();h.length&&e.remove(h.data("item"))}break;case 37:var i=d.prev();0===c.val().length&&i[0]&&(i.before(d),c.focus());break;case 39:var j=d.next();0===c.val().length&&j[0]&&(j.after(d),c.focus())}var k=c.val().length;Math.ceil(k/5);c.attr("size",Math.max(this.inputSize,c.val().length))},e)),e.$container.on("keypress","input",a.proxy(function(b){var c=a(b.target);if(e.$element.attr("disabled"))return void e.$input.attr("disabled","disabled");var d=c.val(),f=e.options.maxChars&&d.length>=e.options.maxChars;e.options.freeInput&&(g(b,e.options.confirmKeys)||f)&&(0!==d.length&&(e.add(f?d.substr(0,e.options.maxChars):d),c.val("")),e.options.cancelConfirmKeysOnEmpty===!1&&b.preventDefault());var h=c.val().length;Math.ceil(h/5);c.attr("size",Math.max(this.inputSize,c.val().length))},e)),e.$container.on("click","[data-role=remove]",a.proxy(function(b){e.$element.attr("disabled")||e.remove(a(b.target).closest(".tag").data("item"))},e)),e.options.itemValue===h.itemValue&&("INPUT"===e.$element[0].tagName?e.add(e.$element.val()):a("option",e.$element).each(function(){e.add(a(this).attr("value"),!0)}))},destroy:function(){var a=this;a.$container.off("keypress","input"),a.$container.off("click","[role=remove]"),a.$container.remove(),a.$element.removeData("tagsinput"),a.$element.show()},focus:function(){this.$input.focus()},input:function(){return this.$input},findInputWrapper:function(){for(var b=this.$input[0],c=this.$container[0];b&&b.parentNode!==c;)b=b.parentNode;return a(b)}},a.fn.tagsinput=function(c,d,e){var f=[];return this.each(function(){var g=a(this).data("tagsinput");if(g)if(c||d){if(void 0!==g[c]){if(3===g[c].length&&void 0!==e)var h=g[c](d,null,e);else var h=g[c](d);void 0!==h&&f.push(h)}}else f.push(g);else g=new b(this,c),a(this).data("tagsinput",g),f.push(g),"SELECT"===this.tagName&&a("option",a(this)).attr("selected","selected"),a(this).val(a(this).val())}),"string"==typeof c?f.length>1?f:f[0]:f},a.fn.tagsinput.Constructor=b;var i=a("<div />");a(function(){a("input[data-role=tagsinput], select[multiple][data-role=tagsinput]").tagsinput()})}(window.jQuery);
|
7 |
+
//# sourceMappingURL=bootstrap-tagsinput.min.js.map
|
assets/js/cliffpyles.js
CHANGED
@@ -8,6 +8,7 @@ jQuery(document).ready(function ($) {
|
|
8 |
var mpageurl = '', title = '', mcontent = '', current_editor = '';
|
9 |
var meta_title = $('#metaseo_wpmseo_title').val();
|
10 |
var meta_desc = $('#metaseo_wpmseo_desc').val();
|
|
|
11 |
|
12 |
if (typeof wp.blocks !== "undefined") {
|
13 |
mpageurl = $('#wp-admin-bar-view').find('a').attr('href');
|
@@ -26,13 +27,16 @@ jQuery(document).ready(function ($) {
|
|
26 |
title = $('#title').val();
|
27 |
if (typeof tinyMCE !== 'undefined' && tinyMCE.get('content') !== null) {
|
28 |
mcontent = tinyMCE.editors.content.getContent();
|
|
|
29 |
} else {
|
30 |
mcontent = $('#content').val();
|
31 |
}
|
32 |
}
|
33 |
|
|
|
|
|
34 |
$('.wpmseotab .spinner').css({'visibility': ' inherit'}).show();
|
35 |
-
$('.metaseo_right').html('');
|
36 |
$.ajax({
|
37 |
dataType: 'json',
|
38 |
method: 'POST',
|
@@ -48,14 +52,16 @@ jQuery(document).ready(function ($) {
|
|
48 |
'meta_title': meta_title,
|
49 |
'mpageurl': mpageurl,
|
50 |
'meta_desc': meta_desc,
|
51 |
-
'content': mcontent
|
|
|
52 |
},
|
53 |
'wpms_nonce': wpms_localize.wpms_nonce
|
54 |
},
|
55 |
success: function (res) {
|
56 |
if (res) {
|
57 |
$('.wpmseotab .spinner').hide();
|
58 |
-
$('.metaseo_right').html(res.output);
|
|
|
59 |
mcheck = parseInt(res.check);
|
60 |
jQuery('.metaseo_tool').qtip({
|
61 |
content: {
|
@@ -107,6 +113,7 @@ jQuery(document).ready(function ($) {
|
|
107 |
|
108 |
function wpms_validate_analysis() {
|
109 |
jQuery(document).on('click', '.metaseo-dashicons.icons-mboxwarning', function () {
|
|
|
110 |
var $this = $(this);
|
111 |
$this.html('done').removeClass('icons-mboxwarning').addClass('icons-mboxdone');
|
112 |
if (mcheck === 0) {
|
@@ -115,7 +122,13 @@ jQuery(document).ready(function ($) {
|
|
115 |
} else {
|
116 |
mcheck++;
|
117 |
}
|
118 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
jQuery.ajax({
|
120 |
dataType: 'json',
|
121 |
method: 'POST',
|
8 |
var mpageurl = '', title = '', mcontent = '', current_editor = '';
|
9 |
var meta_title = $('#metaseo_wpmseo_title').val();
|
10 |
var meta_desc = $('#metaseo_wpmseo_desc').val();
|
11 |
+
var seo_keywords = $("input#metaseo_wpmseo_specific_keywords").val();
|
12 |
|
13 |
if (typeof wp.blocks !== "undefined") {
|
14 |
mpageurl = $('#wp-admin-bar-view').find('a').attr('href');
|
27 |
title = $('#title').val();
|
28 |
if (typeof tinyMCE !== 'undefined' && tinyMCE.get('content') !== null) {
|
29 |
mcontent = tinyMCE.editors.content.getContent();
|
30 |
+
if (mcontent === '') mcontent = $('#content').val();
|
31 |
} else {
|
32 |
mcontent = $('#content').val();
|
33 |
}
|
34 |
}
|
35 |
|
36 |
+
if (meta_title === '') meta_title = title;
|
37 |
+
|
38 |
$('.wpmseotab .spinner').css({'visibility': ' inherit'}).show();
|
39 |
+
$('.metaseo_right .panel-left, .metaseo_right .panel-right').html('');
|
40 |
$.ajax({
|
41 |
dataType: 'json',
|
42 |
method: 'POST',
|
52 |
'meta_title': meta_title,
|
53 |
'mpageurl': mpageurl,
|
54 |
'meta_desc': meta_desc,
|
55 |
+
'content': mcontent,
|
56 |
+
'seo_keywords': seo_keywords
|
57 |
},
|
58 |
'wpms_nonce': wpms_localize.wpms_nonce
|
59 |
},
|
60 |
success: function (res) {
|
61 |
if (res) {
|
62 |
$('.wpmseotab .spinner').hide();
|
63 |
+
$('.metaseo_right .panel-left').html(res.output);
|
64 |
+
$('.metaseo_right .panel-right').html(res.right_output);
|
65 |
mcheck = parseInt(res.check);
|
66 |
jQuery('.metaseo_tool').qtip({
|
67 |
content: {
|
113 |
|
114 |
function wpms_validate_analysis() {
|
115 |
jQuery(document).on('click', '.metaseo-dashicons.icons-mboxwarning', function () {
|
116 |
+
var seo_keywords = $("input#metaseo_wpmseo_specific_keywords").val();
|
117 |
var $this = $(this);
|
118 |
$this.html('done').removeClass('icons-mboxwarning').addClass('icons-mboxdone');
|
119 |
if (mcheck === 0) {
|
122 |
} else {
|
123 |
mcheck++;
|
124 |
}
|
125 |
+
|
126 |
+
var total = 7;
|
127 |
+
if (seo_keywords !== '') {
|
128 |
+
total++;
|
129 |
+
}
|
130 |
+
|
131 |
+
var circliful = Math.ceil((mcheck * 100) / total);
|
132 |
jQuery.ajax({
|
133 |
dataType: 'json',
|
134 |
method: 'POST',
|
assets/js/dashboard.js
CHANGED
@@ -248,12 +248,6 @@ jQuery(document).ready(function ($) {
|
|
248 |
if (res.status) {
|
249 |
$('.page-loader').hide();
|
250 |
$('.site_img').attr('src', res.link + '?v=' + Math.random());
|
251 |
-
} else {
|
252 |
-
if (res.statusCode === 100 || res.statusCode === 101 ) {
|
253 |
-
setTimeout(function () {
|
254 |
-
reloadWeb()
|
255 |
-
}, 10000);
|
256 |
-
}
|
257 |
}
|
258 |
}
|
259 |
});
|
248 |
if (res.status) {
|
249 |
$('.page-loader').hide();
|
250 |
$('.site_img').attr('src', res.link + '?v=' + Math.random());
|
|
|
|
|
|
|
|
|
|
|
|
|
251 |
}
|
252 |
}
|
253 |
});
|
assets/js/metaseo_admin.js
CHANGED
@@ -434,7 +434,10 @@ function saveMetaContentChanges(metakey, postid, data) {
|
|
434 |
if (result.updated) {
|
435 |
autosaveNotification = setTimeout(function () {
|
436 |
jQuery('#savedInfo' + postid).text(result.msg);
|
437 |
-
jQuery('#savedInfo' + postid).
|
|
|
|
|
|
|
438 |
}, 1000);
|
439 |
} else {
|
440 |
alert(result.msg);
|
@@ -1343,4 +1346,10 @@ jQuery(document).ready(function ($) {
|
|
1343 |
|
1344 |
|
1345 |
$(".wpms-blocks-active").attr('disabled','disabled');
|
|
|
|
|
|
|
|
|
|
|
|
|
1346 |
});
|
434 |
if (result.updated) {
|
435 |
autosaveNotification = setTimeout(function () {
|
436 |
jQuery('#savedInfo' + postid).text(result.msg);
|
437 |
+
jQuery('#savedInfo' + postid).css('visibility', 'visible');
|
438 |
+
setTimeout(function () {
|
439 |
+
jQuery('#savedInfo' + postid).css('visibility', 'hidden');
|
440 |
+
}, 1000);
|
441 |
}, 1000);
|
442 |
} else {
|
443 |
alert(result.msg);
|
1346 |
|
1347 |
|
1348 |
$(".wpms-blocks-active").attr('disabled','disabled');
|
1349 |
+
|
1350 |
+
$('.custom-bulk-metaseo-metadesc, .custom-bulk-metaseo-metatitle').on('mouseover', function () {
|
1351 |
+
$(this).addClass('wpms-mouseover-frame');
|
1352 |
+
}).on('mouseout', function () {
|
1353 |
+
$(this).removeClass('wpms-mouseover-frame');
|
1354 |
+
});
|
1355 |
});
|
assets/js/my-qtips.js
CHANGED
@@ -44,8 +44,8 @@ jQuery(document).ready(function ($) {
|
|
44 |
attr: 'data-alt'
|
45 |
},
|
46 |
position: {
|
47 |
-
my: '
|
48 |
-
at: 'center
|
49 |
},
|
50 |
style: {
|
51 |
tip: {
|
44 |
attr: 'data-alt'
|
45 |
},
|
46 |
position: {
|
47 |
+
my: 'bottom left',
|
48 |
+
at: 'center left'
|
49 |
},
|
50 |
style: {
|
51 |
tip: {
|
assets/js/wp-metaseo-metabox.js
CHANGED
@@ -1,4 +1,17 @@
|
|
1 |
jQuery.noConflict();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
function msClean(str) {
|
3 |
if (str === '' || typeof (str) === 'undefined') {
|
4 |
return '';
|
@@ -101,25 +114,23 @@ function msUpdateTitle(force) {
|
|
101 |
}
|
102 |
var titleLengthError = jQuery('#' + wpmseoMetaboxL10n.field_prefix + 'title-length-warning');
|
103 |
var divHtml = jQuery('<div />');
|
104 |
-
var snippetTitle = jQuery('#wpmseosnippet_title');
|
105 |
-
|
106 |
-
var len = wpmseoMetaboxL10n.wpmseo_meta_title_length - titleElm.val().length;
|
107 |
-
metaseo_status_length(len, '#' + wpmseoMetaboxL10n.field_prefix + 'title-length');
|
108 |
|
109 |
if (titleElm.val()) {
|
110 |
title = titleElm.val().replace(/(<([^>]+)>)/ig, '');
|
111 |
-
} else {
|
112 |
title = wpmseoMetaboxL10n.wpmseo_title_template;
|
113 |
title = divHtml.html(title).text();
|
114 |
}
|
|
|
115 |
if (title === '') {
|
116 |
-
|
|
|
|
|
117 |
titleLengthError.hide();
|
118 |
return;
|
119 |
}
|
120 |
|
121 |
title = msClean(title);
|
122 |
-
title = jQuery.trim(title);
|
123 |
title = divHtml.text(title).html();
|
124 |
|
125 |
if (force) {
|
@@ -127,22 +138,22 @@ function msUpdateTitle(force) {
|
|
127 |
}
|
128 |
|
129 |
msReplaceVariables(title, function (title) {
|
130 |
-
title = msSanitizeTitle(title);
|
131 |
-
|
132 |
-
jQuery('#wpmseosnippet_title').html(title);
|
133 |
|
|
|
134 |
// do the placeholder
|
135 |
var placeholder_title = divHtml.html(title).text();
|
136 |
-
|
137 |
|
138 |
-
var
|
139 |
-
if (
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
titleLengthError.hide();
|
144 |
}
|
|
|
145 |
}
|
|
|
|
|
146 |
});
|
147 |
}
|
148 |
|
@@ -192,7 +203,6 @@ function msUpdateDesc() {
|
|
192 |
// Clear the autogen description.
|
193 |
snippet.find('.desc span.autogen').html('');
|
194 |
// Set our new one.
|
195 |
-
snippet.find('.desc span.content').html(desc);
|
196 |
});
|
197 |
} else {
|
198 |
var len = wpmseoMetaboxL10n.wpmseo_meta_desc_length;
|
@@ -297,6 +307,28 @@ jQuery(document).ready(function ($) {
|
|
297 |
}
|
298 |
|
299 |
$('.wpmseo-heading').hide();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
300 |
$('#' + wpmseoMetaboxL10n.field_prefix + 'title').keyup(function () {
|
301 |
msUpdateTitle();
|
302 |
});
|
@@ -305,7 +337,7 @@ jQuery(document).ready(function ($) {
|
|
305 |
msUpdateKeywords();
|
306 |
});
|
307 |
|
308 |
-
$(
|
309 |
msUpdateTitle();
|
310 |
msUpdateDesc();
|
311 |
});
|
@@ -487,6 +519,7 @@ jQuery(document).ready(function ($) {
|
|
487 |
|
488 |
if (isSavingPost && !isAutosavingPost) {
|
489 |
wpms_filter_search_keywords();
|
|
|
490 |
}
|
491 |
});
|
492 |
}
|
@@ -635,6 +668,12 @@ jQuery(document).ready(function ($) {
|
|
635 |
}
|
636 |
|
637 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
638 |
});
|
639 |
|
640 |
(function ($) {
|
1 |
jQuery.noConflict();
|
2 |
+
|
3 |
+
jQuery(function ($) {
|
4 |
+
$('.metabox-snippet-title .container-snippet .input').on('input', function () {$('.metabox-snippet-title .container-snippet .text').text($(this).val());}).trigger('input');;
|
5 |
+
|
6 |
+
var input = document.getElementById('metaseo_wpmseo_desc');
|
7 |
+
input.addEventListener('input', resizeInput);
|
8 |
+
resizeInput.call(input);
|
9 |
+
|
10 |
+
function resizeInput() {
|
11 |
+
this.style.width = this.value.length + "ch";
|
12 |
+
}
|
13 |
+
});
|
14 |
+
|
15 |
function msClean(str) {
|
16 |
if (str === '' || typeof (str) === 'undefined') {
|
17 |
return '';
|
114 |
}
|
115 |
var titleLengthError = jQuery('#' + wpmseoMetaboxL10n.field_prefix + 'title-length-warning');
|
116 |
var divHtml = jQuery('<div />');
|
|
|
|
|
|
|
|
|
117 |
|
118 |
if (titleElm.val()) {
|
119 |
title = titleElm.val().replace(/(<([^>]+)>)/ig, '');
|
120 |
+
} else if (wpmseoMetaboxL10n.metatitle_tab === '1') {
|
121 |
title = wpmseoMetaboxL10n.wpmseo_title_template;
|
122 |
title = divHtml.html(title).text();
|
123 |
}
|
124 |
+
|
125 |
if (title === '') {
|
126 |
+
var len = wpmseoMetaboxL10n.wpmseo_meta_title_length - jQuery('#metaseo_snippet_title').val().length;
|
127 |
+
metaseo_status_length(len, '#' + wpmseoMetaboxL10n.field_prefix + 'title-length');
|
128 |
+
|
129 |
titleLengthError.hide();
|
130 |
return;
|
131 |
}
|
132 |
|
133 |
title = msClean(title);
|
|
|
134 |
title = divHtml.text(title).html();
|
135 |
|
136 |
if (force) {
|
138 |
}
|
139 |
|
140 |
msReplaceVariables(title, function (title) {
|
|
|
|
|
|
|
141 |
|
142 |
+
title = msSanitizeTitle(title);
|
143 |
// do the placeholder
|
144 |
var placeholder_title = divHtml.html(title).text();
|
145 |
+
jQuery('#metaseo_snippet_title').val(placeholder_title);
|
146 |
|
147 |
+
var len = wpmseoMetaboxL10n.wpmseo_meta_title_length - jQuery('#metaseo_snippet_title').val().length;
|
148 |
+
if (jQuery('#metaseo_snippet_title').val() === '') {
|
149 |
+
var mtitle_template = wpmseoMetaboxL10n.wpmseo_title_template;
|
150 |
+
if (jQuery(wpmsdivtitle).length) {
|
151 |
+
mtitle_template = mtitle_template.replace(/%title%/g, jQuery(wpmsdivtitle).val().replace(/(<([^>]+)>)/ig, ''));
|
|
|
152 |
}
|
153 |
+
len = wpmseoMetaboxL10n.wpmseo_meta_title_length - mtitle_template.length;
|
154 |
}
|
155 |
+
|
156 |
+
metaseo_status_length(len, '#' + wpmseoMetaboxL10n.field_prefix + 'title-length');
|
157 |
});
|
158 |
}
|
159 |
|
203 |
// Clear the autogen description.
|
204 |
snippet.find('.desc span.autogen').html('');
|
205 |
// Set our new one.
|
|
|
206 |
});
|
207 |
} else {
|
208 |
var len = wpmseoMetaboxL10n.wpmseo_meta_desc_length;
|
307 |
}
|
308 |
|
309 |
$('.wpmseo-heading').hide();
|
310 |
+
|
311 |
+
$.fn.focusTextToEnd = function(){
|
312 |
+
this.focus();
|
313 |
+
var $thisVal = this.val();
|
314 |
+
this.val('').val($thisVal);
|
315 |
+
return this;
|
316 |
+
}
|
317 |
+
|
318 |
+
$('.snippet-preview').click(function(e){
|
319 |
+
e.preventDefault();
|
320 |
+
});
|
321 |
+
|
322 |
+
$('#metaseo_snippet_title').on('focus', function () {
|
323 |
+
$(this).hide();
|
324 |
+
$('#' + wpmseoMetaboxL10n.field_prefix + 'title').removeAttr('type').focusTextToEnd();
|
325 |
+
});
|
326 |
+
|
327 |
+
$('#' + wpmseoMetaboxL10n.field_prefix + 'title').on('focusout', function () {
|
328 |
+
$(this).attr('type', 'hidden');
|
329 |
+
$('#metaseo_snippet_title').show();
|
330 |
+
})
|
331 |
+
|
332 |
$('#' + wpmseoMetaboxL10n.field_prefix + 'title').keyup(function () {
|
333 |
msUpdateTitle();
|
334 |
});
|
337 |
msUpdateKeywords();
|
338 |
});
|
339 |
|
340 |
+
$('body').on('keyup', wpmsdivtitle, function(event){
|
341 |
msUpdateTitle();
|
342 |
msUpdateDesc();
|
343 |
});
|
519 |
|
520 |
if (isSavingPost && !isAutosavingPost) {
|
521 |
wpms_filter_search_keywords();
|
522 |
+
console.log(23);
|
523 |
}
|
524 |
});
|
525 |
}
|
668 |
}
|
669 |
|
670 |
});
|
671 |
+
|
672 |
+
$('#metaseo_wpmseo_title, #metaseo_wpmseo_desc, #metaseo_snippet_title').on('mouseover', function () {
|
673 |
+
$(this).addClass('wpms-mouseover-frame ');
|
674 |
+
}).on('mouseout', function () {
|
675 |
+
$(this).removeClass('wpms-mouseover-frame ');
|
676 |
+
});
|
677 |
});
|
678 |
|
679 |
(function ($) {
|
assets/js/wpms-post-bulk-edit.js
ADDED
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(document).ready(function ($) {
|
2 |
+
var seokeywords_column = $('#metaseo_seokeywords_details_column');
|
3 |
+
var seokeywords_coulumn_item = $('td.metaseo_seokeywords_details_column');
|
4 |
+
var data = [];
|
5 |
+
seokeywords_column.append('<a href=#" class="dashicons dashicons-edit" title="' + wpms_post_bulk.title + '"></a>');
|
6 |
+
seokeywords_column.wrapInner("<span/>")
|
7 |
+
seokeywords_column.append('<span><a href="#" class="button button-primary button-small wpms-column-save-all">' + wpms_post_bulk.saveAll + '</a> <a href="#" class="button-link button-link-delete wpms-column-cancel-all">' + wpms_post_bulk.cancelButton + "</a></span>")
|
8 |
+
|
9 |
+
seokeywords_column.find('.dashicons-edit').on('click', function () {
|
10 |
+
seokeywords_coulumn_item.find('.wpms-column-display.keyword').hide();
|
11 |
+
seokeywords_coulumn_item.find('.wpms-column-value').show().css('display', 'block');
|
12 |
+
seokeywords_column.find('span:first').hide();
|
13 |
+
seokeywords_column.find('span:last').show();
|
14 |
+
});
|
15 |
+
|
16 |
+
seokeywords_coulumn_item.find('.wpms-column-value').on('input', function (e) {
|
17 |
+
seokeywords_coulumn_item.find('.wpms-column-edit').show();
|
18 |
+
var inputTextValue = $(e.target).text().trim();
|
19 |
+
$(this).siblings('.wpms-column-display.keyword').find('span').text(inputTextValue);
|
20 |
+
}).on('keypress', function (e) {
|
21 |
+
if (13 === e.which) {
|
22 |
+
e.preventDefault();
|
23 |
+
$(this).siblings('.wpms-column-edit').find('.wpms-column-save').trigger("click");
|
24 |
+
}
|
25 |
+
});
|
26 |
+
|
27 |
+
seokeywords_column.find('.wpms-column-cancel-all').on('click', function () {
|
28 |
+
cancel();
|
29 |
+
});
|
30 |
+
|
31 |
+
seokeywords_coulumn_item.find('.wpms-column-cancel').on('click', function () {
|
32 |
+
cancel();
|
33 |
+
});
|
34 |
+
|
35 |
+
seokeywords_column.find('.wpms-column-save-all').on('click', function () {
|
36 |
+
var listData = [];
|
37 |
+
var listTR = seokeywords_coulumn_item.closest("tr");
|
38 |
+
|
39 |
+
for (var i = 0; i < listTR.length; i++) {
|
40 |
+
var id_post = parseInt($(listTR[i]).attr('id').replace("post-", ""));
|
41 |
+
var keyword = $(listTR[i]).find('.metaseo_seokeywords_details_column .wpms-column-value').text().trim();
|
42 |
+
var data = {'idpost': id_post, 'keyword': keyword};
|
43 |
+
listData.push(data);
|
44 |
+
}
|
45 |
+
|
46 |
+
save(listData);
|
47 |
+
});
|
48 |
+
|
49 |
+
seokeywords_coulumn_item.find('.wpms-column-save').on('click', function () {
|
50 |
+
var id_post = parseInt($(this).closest("tr").attr("id").replace("post-", ""));
|
51 |
+
var keyword = $(this).parent(".wpms-column-edit").siblings("span.wpms-column-value").text().trim();
|
52 |
+
var listData = [];
|
53 |
+
var data = {'idpost': id_post, 'keyword': keyword};
|
54 |
+
listData.push(data);
|
55 |
+
|
56 |
+
save(listData);
|
57 |
+
});
|
58 |
+
|
59 |
+
function save(data) {
|
60 |
+
$.ajax({
|
61 |
+
url: ajaxurl,
|
62 |
+
method: 'POST',
|
63 |
+
dataType: 'json',
|
64 |
+
data: {
|
65 |
+
'action': 'wpms',
|
66 |
+
'task': 'update_seokeyword_bulk_edit',
|
67 |
+
'listData': data,
|
68 |
+
'wpms_nonce': wpms_post_bulk.nonce
|
69 |
+
},
|
70 |
+
success: function (res) {
|
71 |
+
if (res.status && res.res_back) {
|
72 |
+
Object.entries(res.res_back).forEach(function (value) {
|
73 |
+
var post_id = value[0];
|
74 |
+
var score = value[1][0];
|
75 |
+
var keyword = value[1][1];
|
76 |
+
var className = getScoreClass(score);
|
77 |
+
|
78 |
+
$('.wp-list-table tr[id="post-'+post_id+'"]').find('.wpms-column-display.score').removeClass('wpms-no-score wpms-bad-score wpms-good-score wpms-great-score').addClass(className);
|
79 |
+
$('.wp-list-table tr[id="post-'+post_id+'"]').find('.wpms-column-display.score strong').text(score +' / 100');
|
80 |
+
$('.wp-list-table tr[id="post-'+post_id+'"]').find('.wpms-column-display.keyword span').text(keyword);
|
81 |
+
|
82 |
+
if (keyword !== '') {
|
83 |
+
$('.wp-list-table tr[id="post-'+post_id+'"]').find('.wpms-column-display.keyword').show();
|
84 |
+
} else {
|
85 |
+
$('.wp-list-table tr[id="post-'+post_id+'"]').find('.wpms-column-display.keyword').hide();
|
86 |
+
}
|
87 |
+
})
|
88 |
+
}
|
89 |
+
cancel();
|
90 |
+
}
|
91 |
+
});
|
92 |
+
}
|
93 |
+
|
94 |
+
function cancel() {
|
95 |
+
var listTR = seokeywords_coulumn_item.closest("tr");
|
96 |
+
for (var i = 0; i < listTR.length; i++) {
|
97 |
+
var keyword = $(listTR[i]).find('.metaseo_seokeywords_details_column .wpms-column-value').text().trim();
|
98 |
+
if (keyword !== '') {
|
99 |
+
$(listTR[i]).find('.metaseo_seokeywords_details_column .wpms-column-display.keyword').show();
|
100 |
+
} else {
|
101 |
+
$(listTR[i]).find('.metaseo_seokeywords_details_column .wpms-column-display.keyword').hide();
|
102 |
+
}
|
103 |
+
}
|
104 |
+
|
105 |
+
seokeywords_coulumn_item.find('.wpms-column-value').hide();
|
106 |
+
seokeywords_coulumn_item.find('.wpms-column-edit').hide();
|
107 |
+
seokeywords_column.find('span:first').show();
|
108 |
+
seokeywords_column.find('span:last').hide();
|
109 |
+
}
|
110 |
+
|
111 |
+
function getScoreClass(score)
|
112 |
+
{
|
113 |
+
if (score === '') {
|
114 |
+
return 'wpms-no-score';
|
115 |
+
}
|
116 |
+
|
117 |
+
if (score > 75) {
|
118 |
+
return 'wpms-great-score';
|
119 |
+
}
|
120 |
+
|
121 |
+
return 'wpms-bad-score';
|
122 |
+
}
|
123 |
+
});
|
assets/js/wpms-seokeyword-metabox.js
ADDED
@@ -0,0 +1,332 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function (wpData, $) {
|
2 |
+
const {select, subscribe} = wpData;
|
3 |
+
|
4 |
+
class wpmsSpecificKeywords {
|
5 |
+
constructor() {
|
6 |
+
this.title = null;
|
7 |
+
this.content = null
|
8 |
+
this.tagsElement = $('#metaseo_wpmseo_specific_keywords');
|
9 |
+
this.metaTitleElement = $('#metaseo_wpmseo_title');
|
10 |
+
this.metaDescElement = $('#metaseo_wpmseo_desc');
|
11 |
+
this.listTags = [];
|
12 |
+
this.resultAnalytics = null;
|
13 |
+
|
14 |
+
// Function
|
15 |
+
this.editPost = this.editPost.bind(this);
|
16 |
+
this.init = this.init.bind(this);
|
17 |
+
this.replaceVariables = this.replaceVariables.bind(this)
|
18 |
+
}
|
19 |
+
|
20 |
+
init = () => {
|
21 |
+
this.bindEvents();
|
22 |
+
this.tagsElement.bind('itemAdded itemRemoved', this.bindEvents);
|
23 |
+
this.metaTitleElement.bind('keyup', this.bindEvents);
|
24 |
+
this.metaDescElement.bind('keyup', this.bindEvents);
|
25 |
+
}
|
26 |
+
|
27 |
+
bindEvents = () => {
|
28 |
+
if (typeof wp.blocks !== "undefined") {
|
29 |
+
this.title = select('core/editor').getEditedPostAttribute('title');
|
30 |
+
this.content = select('core/editor').getEditedPostAttribute('content');
|
31 |
+
} else {
|
32 |
+
this.title = $('#title').val();
|
33 |
+
if (typeof tinyMCE !== 'undefined' && tinyMCE.get('content') !== null) {
|
34 |
+
this.content = tinyMCE.editors.content.getContent();
|
35 |
+
} else {
|
36 |
+
this.content = $('#content').val();
|
37 |
+
}
|
38 |
+
}
|
39 |
+
|
40 |
+
this.listTags = this.tagsElement.tagsinput('items');
|
41 |
+
this.analytics();
|
42 |
+
}
|
43 |
+
|
44 |
+
editPost = (data) => {
|
45 |
+
if (typeof data !== 'undefined') {
|
46 |
+
this.title = data.title;
|
47 |
+
this.content = data.content;
|
48 |
+
}
|
49 |
+
this.listTags = this.tagsElement.tagsinput('items');
|
50 |
+
this.analytics();
|
51 |
+
}
|
52 |
+
|
53 |
+
analytics = () => {
|
54 |
+
this.resultAnalytics = {
|
55 |
+
keyInTitle : this.collectKeywordsInTitle(),
|
56 |
+
keyInContent : this.collectKeywordsInContent(),
|
57 |
+
keyInContentHeading : this.collectKeywordsInHeading(),
|
58 |
+
keyInMetaTitle : this.collectKeywordsInMetaTitle(),
|
59 |
+
keyInMetaDescription : this.collectKeywordsInMetaDesc()
|
60 |
+
}
|
61 |
+
|
62 |
+
if (this.resultAnalytics !== null) {
|
63 |
+
let discovered = false;
|
64 |
+
Object.entries(this.resultAnalytics).forEach(entry => {
|
65 |
+
const [key, value] = entry;
|
66 |
+
if (value) discovered = true;
|
67 |
+
this.changeAnalyticsInfo(key, value);
|
68 |
+
});
|
69 |
+
|
70 |
+
this.editAnalyticsInfo(discovered);
|
71 |
+
}
|
72 |
+
}
|
73 |
+
|
74 |
+
editAnalyticsInfo = (discovered) => {
|
75 |
+
const seo_keywords = $("input#metaseo_wpmseo_specific_keywords").val();
|
76 |
+
if (seo_keywords === '') {
|
77 |
+
$('div.metaseo_analysis[data-title="seokeyword"]').hide();
|
78 |
+
$('.seokeyword-information').hide();
|
79 |
+
$('input.wpms_analysis_hidden[name="wpms[seokeyword]"]').val(0);
|
80 |
+
this.reDrawInactive(7);
|
81 |
+
return false;
|
82 |
+
} else {
|
83 |
+
$('div.metaseo_analysis[data-title="seokeyword"]').show();
|
84 |
+
$('.seokeyword-information').show();
|
85 |
+
}
|
86 |
+
|
87 |
+
if (!discovered) {
|
88 |
+
$('div.metaseo_analysis[data-title="seokeyword"]').find('i').removeClass('icons-mboxdone').addClass('icons-mboxwarning').html('error_outline');
|
89 |
+
$('input.wpms_analysis_hidden[name="wpms[seokeyword]"]').val(0);
|
90 |
+
} else {
|
91 |
+
$('div.metaseo_analysis[data-title="seokeyword"]').find('i').removeClass('icons-mboxwarning').addClass('icons-mboxdone').html('done');
|
92 |
+
$('input.wpms_analysis_hidden[name="wpms[seokeyword]"]').val(1);
|
93 |
+
}
|
94 |
+
|
95 |
+
this.reDrawInactive(8);
|
96 |
+
}
|
97 |
+
|
98 |
+
reDrawInactive = (totalItems) => {
|
99 |
+
const analyticItems = $('.panel-left .wpms_analysis_hidden');
|
100 |
+
let mcheck = 0;
|
101 |
+
|
102 |
+
for (let i = 0;i < analyticItems.length; i++) {
|
103 |
+
if ($(analyticItems[i]).val() == 1) {
|
104 |
+
mcheck++;
|
105 |
+
}
|
106 |
+
}
|
107 |
+
|
108 |
+
const circliful = Math.ceil((mcheck * 100) / totalItems);
|
109 |
+
|
110 |
+
$('#wpmetaseo_seo_keywords_result').val(circliful);
|
111 |
+
$('.metaseo-progress-bar').circleProgress('value', circliful / 100).on('circle-animation-progress', function (event, progress) {
|
112 |
+
$(this).find('strong').html(circliful + '<i>%</i>');
|
113 |
+
});
|
114 |
+
}
|
115 |
+
|
116 |
+
changeAnalyticsInfo = (key, value) => {
|
117 |
+
if (value) {
|
118 |
+
$('div.metaseo_analysis[data-title="'+key.toLowerCase()+'"]').find('i').removeClass('icons-mboxwarning').addClass('icons-mboxdone').html('done');
|
119 |
+
$('input.wpms_analysis_hidden[name="wpms['+key.toLowerCase()+']"]').val(1);
|
120 |
+
} else {
|
121 |
+
$('div.metaseo_analysis[data-title="'+key.toLowerCase()+'"]').find('i').removeClass('icons-mboxdone').addClass('icons-mboxwarning').html('error_outline');
|
122 |
+
$('input.wpms_analysis_hidden[name="wpms['+key.toLowerCase()+']"]').val(0);
|
123 |
+
}
|
124 |
+
}
|
125 |
+
|
126 |
+
collectKeywordsInTitle = () => {
|
127 |
+
let title = {text: this.title,};
|
128 |
+
let isContain = false;
|
129 |
+
this.listTags.forEach(function (item, index) {
|
130 |
+
if (title.text.toLowerCase().includes(item.toLowerCase())) {
|
131 |
+
isContain = true;
|
132 |
+
return isContain;
|
133 |
+
}
|
134 |
+
});
|
135 |
+
|
136 |
+
return isContain;
|
137 |
+
}
|
138 |
+
|
139 |
+
collectKeywordsInContent = () => {
|
140 |
+
let content = {text: this.content};
|
141 |
+
let isContain = false;
|
142 |
+
this.listTags.forEach(function (item, index) {
|
143 |
+
if (content.text.toLowerCase().includes(item.toLowerCase())) {
|
144 |
+
isContain = true;
|
145 |
+
return isContain;
|
146 |
+
}
|
147 |
+
});
|
148 |
+
|
149 |
+
return isContain;
|
150 |
+
}
|
151 |
+
|
152 |
+
collectKeywordsInHeading = () => {
|
153 |
+
let content = {text: this.content};
|
154 |
+
let isContain = false;
|
155 |
+
this.listTags.forEach(function (item, index) {
|
156 |
+
const regex = RegExp("<h[2-6][^>]*>.*" + item.toLowerCase() + ".*</h[2-6]>", "gi");
|
157 |
+
if (content.text.toLowerCase().match(regex) != null) {
|
158 |
+
isContain = true;
|
159 |
+
return isContain;
|
160 |
+
}
|
161 |
+
});
|
162 |
+
|
163 |
+
return isContain;
|
164 |
+
}
|
165 |
+
|
166 |
+
collectKeywordsInMetaTitle = () => {
|
167 |
+
let metaTitle = {text: this.replaceVariables(this.metaTitleElement.val())};
|
168 |
+
let isContain = false;
|
169 |
+
this.listTags.forEach(function (item, index) {
|
170 |
+
if (metaTitle.text.toLowerCase().includes(item.toLowerCase())) {
|
171 |
+
isContain = true;
|
172 |
+
return isContain;
|
173 |
+
}
|
174 |
+
});
|
175 |
+
|
176 |
+
return isContain;
|
177 |
+
}
|
178 |
+
|
179 |
+
collectKeywordsInMetaDesc = () => {
|
180 |
+
let metaDesc = {text: this.replaceVariables(this.metaDescElement.val())};
|
181 |
+
let isContain = false;
|
182 |
+
this.listTags.forEach(function (item, index) {
|
183 |
+
if (metaDesc.text.toLowerCase().includes(item.toLowerCase())) {
|
184 |
+
isContain = true;
|
185 |
+
return isContain;
|
186 |
+
}
|
187 |
+
});
|
188 |
+
|
189 |
+
return isContain;
|
190 |
+
}
|
191 |
+
|
192 |
+
replaceVariables = (str) => {
|
193 |
+
if (typeof str === 'undefined') {
|
194 |
+
return;
|
195 |
+
}
|
196 |
+
|
197 |
+
if (this.title) {
|
198 |
+
str = str.replace(/%title%/g, this.title.replace(/(<([^>]+)>)/ig, ''));
|
199 |
+
}
|
200 |
+
|
201 |
+
// These are added in the head for performance reasons.
|
202 |
+
str = str.replace(/%id%/g, wpmseoMetaboxL10n.id);
|
203 |
+
str = str.replace(/%date%/g, wpmseoMetaboxL10n.date);
|
204 |
+
str = str.replace(/%sitedesc%/g, wpmseoMetaboxL10n.sitedesc);
|
205 |
+
str = str.replace(/%sitename%/g, wpmseoMetaboxL10n.sitename);
|
206 |
+
str = str.replace(/%sep%/g, wpmseoMetaboxL10n.sep);
|
207 |
+
str = str.replace(/%page%/g, wpmseoMetaboxL10n.page);
|
208 |
+
str = str.replace(/%currenttime%/g, wpmseoMetaboxL10n.currenttime);
|
209 |
+
str = str.replace(/%currentdate%/g, wpmseoMetaboxL10n.currentdate);
|
210 |
+
str = str.replace(/%currentday%/g, wpmseoMetaboxL10n.currentday);
|
211 |
+
str = str.replace(/%currentmonth%/g, wpmseoMetaboxL10n.currentmonth);
|
212 |
+
str = str.replace(/%currentyear%/g, wpmseoMetaboxL10n.currentyear);
|
213 |
+
|
214 |
+
// excerpt
|
215 |
+
let excerpt = '';
|
216 |
+
if (jQuery('#excerpt').length) {
|
217 |
+
excerpt = msClean(jQuery('#excerpt').val().replace(/(<([^>]+)>)/ig, ''));
|
218 |
+
str = str.replace(/%excerpt_only%/g, excerpt);
|
219 |
+
}
|
220 |
+
|
221 |
+
if ('' === excerpt && jQuery('#content').length) {
|
222 |
+
excerpt = jQuery('#content').val().replace(/(<([^>]+)>)/ig, '').substring(0, wpmseoMetaboxL10n.wpmseo_meta_desc_length - 1);
|
223 |
+
}
|
224 |
+
str = str.replace(/%excerpt%/g, excerpt);
|
225 |
+
|
226 |
+
// parent page
|
227 |
+
if (jQuery('#parent_id').length && jQuery('#parent_id option:selected').text() !== wpmseoMetaboxL10n.no_parent_text) {
|
228 |
+
str = str.replace(/%parent_title%/g, jQuery('#parent_id option:selected').text());
|
229 |
+
}
|
230 |
+
|
231 |
+
// remove double separators
|
232 |
+
const esc_sep = wpmseoMetaboxL10n.sep.replace(/[\-\[\]\/\{}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
|
233 |
+
const pattern = new RegExp(esc_sep + ' ' + esc_sep, 'g');
|
234 |
+
str = str.replace(pattern, wpmseoMetaboxL10n.sep);
|
235 |
+
|
236 |
+
return str;
|
237 |
+
}
|
238 |
+
}
|
239 |
+
|
240 |
+
// Gutenberg switcher
|
241 |
+
class WpmsGutenbergSwitcher {
|
242 |
+
constructor() {
|
243 |
+
this.data = {
|
244 |
+
title : null,
|
245 |
+
content : null
|
246 |
+
};
|
247 |
+
}
|
248 |
+
|
249 |
+
init = () => {
|
250 |
+
subscribe(() => {
|
251 |
+
|
252 |
+
// Title changes
|
253 |
+
const newTitle = select('core/editor').getEditedPostAttribute('title');
|
254 |
+
if (newTitle !== undefined && this.data.title === null) {
|
255 |
+
this.data.title = newTitle;
|
256 |
+
}
|
257 |
+
if (newTitle !== undefined && newTitle !== this.data.title) {
|
258 |
+
this.data.title = newTitle;
|
259 |
+
this.changeTitle();
|
260 |
+
}
|
261 |
+
|
262 |
+
// Content changed
|
263 |
+
const newContent = select('core/editor').getEditedPostAttribute('content');
|
264 |
+
if (newContent !== undefined && this.data.content === null) {
|
265 |
+
this.data.content = newContent;
|
266 |
+
}
|
267 |
+
|
268 |
+
if (newContent !== undefined && newContent !== this.data.content) {
|
269 |
+
this.data.content = newContent;
|
270 |
+
this.changeContent();
|
271 |
+
}
|
272 |
+
});
|
273 |
+
}
|
274 |
+
|
275 |
+
changeTitle = () => {
|
276 |
+
new wpmsSpecificKeywords().editPost(this.data);
|
277 |
+
}
|
278 |
+
|
279 |
+
changeContent = () => {
|
280 |
+
new wpmsSpecificKeywords().editPost(this.data);
|
281 |
+
}
|
282 |
+
}
|
283 |
+
|
284 |
+
class WpmsClassicEditorSwitcher {
|
285 |
+
constructor() {
|
286 |
+
this.data = {
|
287 |
+
title : null,
|
288 |
+
content : null
|
289 |
+
};
|
290 |
+
}
|
291 |
+
|
292 |
+
init = () => {
|
293 |
+
$('#title').on('keyup', this.changeTitle);
|
294 |
+
if (typeof tinyMCE !== 'undefined' && tinyMCE.get('content') !== null) {
|
295 |
+
tinyMCE.get('content').on('keyup', this.changeContent);
|
296 |
+
} else {
|
297 |
+
$('#content').on('keyup', this.changeContent);
|
298 |
+
}
|
299 |
+
}
|
300 |
+
|
301 |
+
getData = () => {
|
302 |
+
this.data.title = $('#title').val();
|
303 |
+
if (typeof tinyMCE !== 'undefined' && tinyMCE.get('content') !== null) {
|
304 |
+
this.data.content = tinyMCE.editors.content.getContent();
|
305 |
+
} else {
|
306 |
+
this.data.content = $('#content').val();
|
307 |
+
}
|
308 |
+
}
|
309 |
+
|
310 |
+
changeTitle = () => {
|
311 |
+
this.getData();
|
312 |
+
new wpmsSpecificKeywords().editPost(this.data);
|
313 |
+
}
|
314 |
+
|
315 |
+
changeContent = () => {
|
316 |
+
this.getData();
|
317 |
+
new wpmsSpecificKeywords().editPost(this.data);
|
318 |
+
}
|
319 |
+
}
|
320 |
+
|
321 |
+
$(document).ajaxComplete(function (event, request, settings) {
|
322 |
+
if (typeof settings.data !== "undefined" && settings.data.includes('action=wpms&task=reload_analysis')) {
|
323 |
+
if (typeof wp.blocks !== "undefined") {
|
324 |
+
new WpmsGutenbergSwitcher().init();
|
325 |
+
} else {
|
326 |
+
new WpmsClassicEditorSwitcher().init();
|
327 |
+
}
|
328 |
+
|
329 |
+
new wpmsSpecificKeywords().init();
|
330 |
+
}
|
331 |
+
});
|
332 |
+
})(wp.data, jQuery);
|
assets/js/wpms-seokeyword-metabox.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
!function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=0)}([function(t,e){function n(t,e){return r(t)||s(t,e)||o(t,e)||i()}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(t,e){if(t){if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function s(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],i=!0,o=!1,a=void 0;try{for(var s,r=t[Symbol.iterator]();!(i=(s=r.next()).done)&&(n.push(s.value),!e||n.length!==e);i=!0);}catch(t){o=!0,a=t}finally{try{i||null==r.return||r.return()}finally{if(o)throw a}}return n}}function r(t){if(Array.isArray(t))return t}!function(t,e){var i=t.select,o=t.subscribe,a=function(){var t=this;this.init=function(){t.bindEvents(),t.tagsElement.bind("itemAdded itemRemoved",t.bindEvents),t.metaTitleElement.bind("keyup",t.bindEvents),t.metaDescElement.bind("keyup",t.bindEvents)},this.bindEvents=function(){void 0!==wp.blocks?(t.title=i("core/editor").getEditedPostAttribute("title"),t.content=i("core/editor").getEditedPostAttribute("content")):(t.title=e("#title").val(),"undefined"!=typeof tinyMCE&&null!==tinyMCE.get("content")?t.content=tinyMCE.editors.content.getContent():t.content=e("#content").val()),t.listTags=t.tagsElement.tagsinput("items"),t.analytics()},this.editPost=function(e){void 0!==e&&(t.title=e.title,t.content=e.content),t.listTags=t.tagsElement.tagsinput("items"),t.analytics()},this.analytics=function(){if(t.resultAnalytics={keyInTitle:t.collectKeywordsInTitle(),keyInContent:t.collectKeywordsInContent(),keyInContentHeading:t.collectKeywordsInHeading(),keyInMetaTitle:t.collectKeywordsInMetaTitle(),keyInMetaDescription:t.collectKeywordsInMetaDesc()},null!==t.resultAnalytics){var e=!1;Object.entries(t.resultAnalytics).forEach(function(i){var o=n(i,2),a=o[0],s=o[1];s&&(e=!0),t.changeAnalyticsInfo(a,s)}),t.editAnalyticsInfo(e)}},this.editAnalyticsInfo=function(n){if(""===e("input#metaseo_wpmseo_specific_keywords").val())return e('div.metaseo_analysis[data-title="seokeyword"]').hide(),e(".seokeyword-information").hide(),e('input.wpms_analysis_hidden[name="wpms[seokeyword]"]').val(0),t.reDrawInactive(7),!1;e('div.metaseo_analysis[data-title="seokeyword"]').show(),e(".seokeyword-information").show(),n?(e('div.metaseo_analysis[data-title="seokeyword"]').find("i").removeClass("icons-mboxwarning").addClass("icons-mboxdone").html("done"),e('input.wpms_analysis_hidden[name="wpms[seokeyword]"]').val(1)):(e('div.metaseo_analysis[data-title="seokeyword"]').find("i").removeClass("icons-mboxdone").addClass("icons-mboxwarning").html("error_outline"),e('input.wpms_analysis_hidden[name="wpms[seokeyword]"]').val(0)),t.reDrawInactive(8)},this.reDrawInactive=function(t){for(var n=e(".panel-left .wpms_analysis_hidden"),i=0,o=0;o<n.length;o++)1==e(n[o]).val()&&i++;var a=Math.ceil(100*i/t);e("#wpmetaseo_seo_keywords_result").val(a),e(".metaseo-progress-bar").circleProgress("value",a/100).on("circle-animation-progress",function(t,n){e(this).find("strong").html(a+"<i>%</i>")})},this.changeAnalyticsInfo=function(t,n){n?(e('div.metaseo_analysis[data-title="'+t.toLowerCase()+'"]').find("i").removeClass("icons-mboxwarning").addClass("icons-mboxdone").html("done"),e('input.wpms_analysis_hidden[name="wpms['+t.toLowerCase()+']"]').val(1)):(e('div.metaseo_analysis[data-title="'+t.toLowerCase()+'"]').find("i").removeClass("icons-mboxdone").addClass("icons-mboxwarning").html("error_outline"),e('input.wpms_analysis_hidden[name="wpms['+t.toLowerCase()+']"]').val(0))},this.collectKeywordsInTitle=function(){var e={text:t.title},n=!1;return t.listTags.forEach(function(t,i){if(e.text.toLowerCase().includes(t.toLowerCase()))return n=!0}),n},this.collectKeywordsInContent=function(){var e={text:t.content},n=!1;return t.listTags.forEach(function(t,i){if(e.text.toLowerCase().includes(t.toLowerCase()))return n=!0}),n},this.collectKeywordsInHeading=function(){var e={text:t.content},n=!1;return t.listTags.forEach(function(t,i){var o=RegExp("<h[2-6][^>]*>.*"+t.toLowerCase()+".*</h[2-6]>","gi");if(null!=e.text.toLowerCase().match(o))return n=!0}),n},this.collectKeywordsInMetaTitle=function(){var e={text:t.replaceVariables(t.metaTitleElement.val())},n=!1;return t.listTags.forEach(function(t,i){if(e.text.toLowerCase().includes(t.toLowerCase()))return n=!0}),n},this.collectKeywordsInMetaDesc=function(){var e={text:t.replaceVariables(t.metaDescElement.val())},n=!1;return t.listTags.forEach(function(t,i){if(e.text.toLowerCase().includes(t.toLowerCase()))return n=!0}),n},this.replaceVariables=function(e){if(void 0!==e){t.title&&(e=e.replace(/%title%/g,t.title.replace(/(<([^>]+)>)/gi,""))),e=e.replace(/%id%/g,wpmseoMetaboxL10n.id),e=e.replace(/%date%/g,wpmseoMetaboxL10n.date),e=e.replace(/%sitedesc%/g,wpmseoMetaboxL10n.sitedesc),e=e.replace(/%sitename%/g,wpmseoMetaboxL10n.sitename),e=e.replace(/%sep%/g,wpmseoMetaboxL10n.sep),e=e.replace(/%page%/g,wpmseoMetaboxL10n.page),e=e.replace(/%currenttime%/g,wpmseoMetaboxL10n.currenttime),e=e.replace(/%currentdate%/g,wpmseoMetaboxL10n.currentdate),e=e.replace(/%currentday%/g,wpmseoMetaboxL10n.currentday),e=e.replace(/%currentmonth%/g,wpmseoMetaboxL10n.currentmonth),e=e.replace(/%currentyear%/g,wpmseoMetaboxL10n.currentyear);var n="";jQuery("#excerpt").length&&(n=msClean(jQuery("#excerpt").val().replace(/(<([^>]+)>)/gi,"")),e=e.replace(/%excerpt_only%/g,n)),""===n&&jQuery("#content").length&&(n=jQuery("#content").val().replace(/(<([^>]+)>)/gi,"").substring(0,wpmseoMetaboxL10n.wpmseo_meta_desc_length-1)),e=e.replace(/%excerpt%/g,n),jQuery("#parent_id").length&&jQuery("#parent_id option:selected").text()!==wpmseoMetaboxL10n.no_parent_text&&(e=e.replace(/%parent_title%/g,jQuery("#parent_id option:selected").text()));var i=wpmseoMetaboxL10n.sep.replace(/[\-\[\]\/\{}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),o=new RegExp(i+" "+i,"g");return e=e.replace(o,wpmseoMetaboxL10n.sep)}},this.title=null,this.content=null,this.tagsElement=e("#metaseo_wpmseo_specific_keywords"),this.metaTitleElement=e("#metaseo_wpmseo_title"),this.metaDescElement=e("#metaseo_wpmseo_desc"),this.listTags=[],this.resultAnalytics=null,this.editPost=this.editPost.bind(this),this.init=this.init.bind(this),this.replaceVariables=this.replaceVariables.bind(this)},s=function(){var t=this;this.init=function(){o(function(){var e=i("core/editor").getEditedPostAttribute("title");void 0!==e&&null===t.data.title&&(t.data.title=e),void 0!==e&&e!==t.data.title&&(t.data.title=e,t.changeTitle());var n=i("core/editor").getEditedPostAttribute("content");void 0!==n&&null===t.data.content&&(t.data.content=n),void 0!==n&&n!==t.data.content&&(t.data.content=n,t.changeContent())})},this.changeTitle=function(){(new a).editPost(t.data)},this.changeContent=function(){(new a).editPost(t.data)},this.data={title:null,content:null}},r=function(){var t=this;this.init=function(){e("#title").on("keyup",t.changeTitle),"undefined"!=typeof tinyMCE&&null!==tinyMCE.get("content")?tinyMCE.get("content").on("keyup",t.changeContent):e("#content").on("keyup",t.changeContent)},this.getData=function(){t.data.title=e("#title").val(),"undefined"!=typeof tinyMCE&&null!==tinyMCE.get("content")?t.data.content=tinyMCE.editors.content.getContent():t.data.content=e("#content").val()},this.changeTitle=function(){t.getData(),(new a).editPost(t.data)},this.changeContent=function(){t.getData(),(new a).editPost(t.data)},this.data={title:null,content:null}};e(document).ajaxComplete(function(t,e,n){void 0!==n.data&&n.data.includes("action=wpms&task=reload_analysis")&&(void 0!==wp.blocks?(new s).init():(new r).init(),(new a).init())})}(wp.data,jQuery)}]);
|
inc/class.metaseo-admin.php
CHANGED
@@ -116,7 +116,7 @@ class MetaSeoAdmin
|
|
116 |
add_action('delete_post', array('MetaSeoBrokenLinkTable', 'deletePost'));
|
117 |
add_action('edit_comment', array('MetaSeoBrokenLinkTable', 'updateComment'));
|
118 |
add_action('deleted_comment', array('MetaSeoBrokenLinkTable', 'deletedComment'));
|
119 |
-
|
120 |
add_action('admin_footer', array($this, 'editorFooter'));
|
121 |
add_action('wp_dashboard_setup', array($this, 'addDashboardWidgets'));
|
122 |
add_action('category_add_form_fields', array($this, 'categoryField'), 10, 2);
|
@@ -208,6 +208,10 @@ class MetaSeoAdmin
|
|
208 |
{
|
209 |
$this->createDatabase();
|
210 |
$this->updateLinksTable();
|
|
|
|
|
|
|
|
|
211 |
}
|
212 |
|
213 |
/**
|
@@ -1388,7 +1392,7 @@ class MetaSeoAdmin
|
|
1388 |
$mpageurl = $_POST['datas']['mpageurl'];
|
1389 |
}
|
1390 |
|
1391 |
-
if ($mpageurl === sanitize_title($mtitle)) {
|
1392 |
$output .= $this->createFieldAnalysis(
|
1393 |
'pageurl',
|
1394 |
$tooltip_page['page_url'],
|
@@ -1583,9 +1587,63 @@ class MetaSeoAdmin
|
|
1583 |
);
|
1584 |
}
|
1585 |
}
|
1586 |
-
}
|
1587 |
|
1588 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1589 |
/**
|
1590 |
* Reload analytics
|
1591 |
*
|
@@ -1593,7 +1651,7 @@ class MetaSeoAdmin
|
|
1593 |
* @param array All the datas
|
1594 |
*/
|
1595 |
do_action('wpms_reload_analytics', $_POST['datas']['post_id'], $_POST['datas']);
|
1596 |
-
wp_send_json(array('circliful' => $circliful, 'output' => $output, 'check' => $check));
|
1597 |
}
|
1598 |
|
1599 |
/**
|
@@ -2803,6 +2861,529 @@ class MetaSeoAdmin
|
|
2803 |
'404' => esc_html__('Redirected 404 errors: ', 'wp-meta-seo')
|
2804 |
)
|
2805 |
));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2806 |
}
|
2807 |
|
2808 |
/**
|
@@ -3941,6 +4522,9 @@ class MetaSeoAdmin
|
|
3941 |
case 'image_scan_meta':
|
3942 |
MetaSeoImageListTable::imageScanMeta();
|
3943 |
break;
|
|
|
|
|
|
|
3944 |
}
|
3945 |
}
|
3946 |
}
|
116 |
add_action('delete_post', array('MetaSeoBrokenLinkTable', 'deletePost'));
|
117 |
add_action('edit_comment', array('MetaSeoBrokenLinkTable', 'updateComment'));
|
118 |
add_action('deleted_comment', array('MetaSeoBrokenLinkTable', 'deletedComment'));
|
119 |
+
add_action('admin_head', array('MetaSeoContentListTable', 'customStyles'));
|
120 |
add_action('admin_footer', array($this, 'editorFooter'));
|
121 |
add_action('wp_dashboard_setup', array($this, 'addDashboardWidgets'));
|
122 |
add_action('category_add_form_fields', array($this, 'categoryField'), 10, 2);
|
208 |
{
|
209 |
$this->createDatabase();
|
210 |
$this->updateLinksTable();
|
211 |
+
|
212 |
+
// Column Content.
|
213 |
+
$this->registerPostColumns();
|
214 |
+
add_filter('metaseo_seokeywords_details_column', array($this, 'getColumnSeoKeywordsDetails'), 5);
|
215 |
}
|
216 |
|
217 |
/**
|
1392 |
$mpageurl = $_POST['datas']['mpageurl'];
|
1393 |
}
|
1394 |
|
1395 |
+
if (!empty($mpageurl) && !empty($mtitle) && $mpageurl === sanitize_title($mtitle)) {
|
1396 |
$output .= $this->createFieldAnalysis(
|
1397 |
'pageurl',
|
1398 |
$tooltip_page['page_url'],
|
1587 |
);
|
1588 |
}
|
1589 |
}
|
|
|
1590 |
|
1591 |
+
$output .= $this->createFieldAnalysis(
|
1592 |
+
'seokeyword',
|
1593 |
+
esc_html__('At least one of the SEO keywords are found in the page title OR meta title OR SEO meta description OR page content heading OR the page content', 'wp-meta-seo'),
|
1594 |
+
'warning',
|
1595 |
+
esc_html__('SEO keywords are found', 'wp-meta-seo'),
|
1596 |
+
0
|
1597 |
+
);
|
1598 |
+
|
1599 |
+
$right_output = '<div class="metaseo_analysis metaseo_tool"><span style="font-weight: 700">'.esc_html__('Page SEO keywords check', 'wp-meta-seo').'</span></div>';
|
1600 |
+
|
1601 |
+
$right_output .= $this->createFieldAnalysis(
|
1602 |
+
'keyintitle',
|
1603 |
+
esc_html__('The SEO keywords are found in page title', 'wp-meta-seo'),
|
1604 |
+
'warning',
|
1605 |
+
esc_html__('The keywords are found in page title', 'wp-meta-seo'),
|
1606 |
+
0
|
1607 |
+
);
|
1608 |
+
|
1609 |
+
$right_output .= $this->createFieldAnalysis(
|
1610 |
+
'keyincontent',
|
1611 |
+
esc_html__('The SEO keywords are found in page content', 'wp-meta-seo'),
|
1612 |
+
'warning',
|
1613 |
+
esc_html__('The keywords are found in page content', 'wp-meta-seo'),
|
1614 |
+
0
|
1615 |
+
);
|
1616 |
+
|
1617 |
+
|
1618 |
+
$right_output .= $this->createFieldAnalysis(
|
1619 |
+
'keyinmetatitle',
|
1620 |
+
esc_html__('The SEO keywords are found in meta title', 'wp-meta-seo'),
|
1621 |
+
'warning',
|
1622 |
+
esc_html__('The keywords are found in meta title', 'wp-meta-seo'),
|
1623 |
+
0
|
1624 |
+
);
|
1625 |
+
|
1626 |
+
$right_output .= $this->createFieldAnalysis(
|
1627 |
+
'keyinmetadescription',
|
1628 |
+
esc_html__('The SEO keywords are found in meta description', 'wp-meta-seo'),
|
1629 |
+
'warning',
|
1630 |
+
esc_html__('The keywords are found in meta description', 'wp-meta-seo'),
|
1631 |
+
0
|
1632 |
+
);
|
1633 |
+
|
1634 |
+
$right_output .= $this->createFieldAnalysis(
|
1635 |
+
'keyincontentheading',
|
1636 |
+
esc_html__('The SEO keywords are found in page content heading', 'wp-meta-seo'),
|
1637 |
+
'warning',
|
1638 |
+
esc_html__('The keywords are found in page content heading', 'wp-meta-seo'),
|
1639 |
+
0
|
1640 |
+
);
|
1641 |
+
}
|
1642 |
+
$total_check = 7;
|
1643 |
+
if (isset($_POST['datas']['seo_keywords']) && !empty($_POST['datas']['seo_keywords'])) {
|
1644 |
+
$total_check++;
|
1645 |
+
}
|
1646 |
+
$circliful = ceil(100 * ($check) / $total_check);
|
1647 |
/**
|
1648 |
* Reload analytics
|
1649 |
*
|
1651 |
* @param array All the datas
|
1652 |
*/
|
1653 |
do_action('wpms_reload_analytics', $_POST['datas']['post_id'], $_POST['datas']);
|
1654 |
+
wp_send_json(array('circliful' => $circliful, 'output' => $output, 'check' => $check, 'right_output' => $right_output));
|
1655 |
}
|
1656 |
|
1657 |
/**
|
2861 |
'404' => esc_html__('Redirected 404 errors: ', 'wp-meta-seo')
|
2862 |
)
|
2863 |
));
|
2864 |
+
|
2865 |
+
|
2866 |
+
$this->columnsEnqueue();
|
2867 |
+
}
|
2868 |
+
|
2869 |
+
/**
|
2870 |
+
* Enqueue styles and scripts.
|
2871 |
+
*
|
2872 |
+
* @return void
|
2873 |
+
*/
|
2874 |
+
public function columnsEnqueue()
|
2875 |
+
{
|
2876 |
+
$screen = get_current_screen();
|
2877 |
+
|
2878 |
+
$allowed_post_types = self::getAccessiblePostTypes();
|
2879 |
+
|
2880 |
+
if (!in_array($screen->post_type, $allowed_post_types, true)) {
|
2881 |
+
return;
|
2882 |
+
}
|
2883 |
+
|
2884 |
+
wp_enqueue_style(
|
2885 |
+
'wpms-post-bulk-edit',
|
2886 |
+
plugins_url('assets/css/wpms-post-bulk-edit.css', dirname(__FILE__)),
|
2887 |
+
null,
|
2888 |
+
WPMSEO_VERSION
|
2889 |
+
);
|
2890 |
+
|
2891 |
+
wp_enqueue_script(
|
2892 |
+
'wpms-post-bulk-edit-js',
|
2893 |
+
plugins_url('assets/js/wpms-post-bulk-edit.js', dirname(__FILE__)),
|
2894 |
+
array('jquery'),
|
2895 |
+
WPMSEO_VERSION,
|
2896 |
+
true
|
2897 |
+
);
|
2898 |
+
wp_localize_script('wpms-post-bulk-edit-js', 'wpms_post_bulk', array(
|
2899 |
+
'title' => esc_attr__('Bulk Edit This Field', 'wp-meta-seo'),
|
2900 |
+
'saveAll' => esc_attr__('Save all', 'wp-meta-seo'),
|
2901 |
+
'cancelButton' => esc_attr__('Cancel all', 'wp-meta-seo'),
|
2902 |
+
'nonce' => wp_create_nonce('wpms_nonce')
|
2903 |
+
));
|
2904 |
+
}
|
2905 |
+
|
2906 |
+
/**
|
2907 |
+
* Add content for title column.
|
2908 |
+
*
|
2909 |
+
* @param integer $post_id The current post ID.
|
2910 |
+
*
|
2911 |
+
* @return void
|
2912 |
+
*/
|
2913 |
+
public function getColumnSeoKeywordsDetails($post_id)
|
2914 |
+
{
|
2915 |
+
$score = get_post_meta($post_id, 'wp_metaseo_seoscore', true);
|
2916 |
+
$keywords = get_post_meta($post_id, '_metaseo_metaspecific_keywords', true);
|
2917 |
+
$class = !empty($score) ? $this->getScoreClass((int)$score) : 'wpms-no-score';
|
2918 |
+
$score = !empty($score) ? $score . ' / 100' : 'N/A';
|
2919 |
+
|
2920 |
+
?>
|
2921 |
+
<span class="wpms-column-display score <?php echo esc_attr($class); ?> <?php echo empty($score) ? 'disabled' : ''; ?>">
|
2922 |
+
<strong><?php echo esc_html($score); ?></strong>
|
2923 |
+
</span>
|
2924 |
+
<span class="wpms-column-display keyword" <?php echo (empty($keywords))? 'style="display:none"' :'';?> >
|
2925 |
+
<strong title="SEO Keyword" class="title"><?php esc_html_e('Keyword', 'wp-meta-seo'); ?>:</strong>
|
2926 |
+
<span><?php echo $keywords ? esc_html($keywords) : ''; ?></span>
|
2927 |
+
</span>
|
2928 |
+
<span class="wpms-column-value" data-field="seo_keyword" contenteditable="true" tabindex="11">
|
2929 |
+
<span><?php echo esc_html($keywords); ?></span>
|
2930 |
+
</span>
|
2931 |
+
<div class="wpms-column-edit">
|
2932 |
+
<a href="#" class="wpms-column-save"><?php esc_html_e('Save', 'wp-meta-seo'); ?></a>
|
2933 |
+
<a href="#" class="button-link-delete wpms-column-cancel"><?php esc_html_e('Cancel', 'wp-meta-seo'); ?></a>
|
2934 |
+
</div>
|
2935 |
+
<?php
|
2936 |
+
}
|
2937 |
+
|
2938 |
+
/**
|
2939 |
+
* Get SEO score rating string: great/good/bad.
|
2940 |
+
*
|
2941 |
+
* @param integer $score Score.
|
2942 |
+
*
|
2943 |
+
* @return string
|
2944 |
+
*/
|
2945 |
+
private function getScoreClass($score)
|
2946 |
+
{
|
2947 |
+
if ($score > 75) {
|
2948 |
+
return 'wpms-great-score';
|
2949 |
+
}
|
2950 |
+
|
2951 |
+
return 'wpms-bad-score';
|
2952 |
+
}
|
2953 |
+
|
2954 |
+
/**
|
2955 |
+
* Register post column hooks.
|
2956 |
+
*
|
2957 |
+
* @return void
|
2958 |
+
*/
|
2959 |
+
public function registerPostColumns()
|
2960 |
+
{
|
2961 |
+
foreach (self::getAccessiblePostTypes() as $post_type) {
|
2962 |
+
add_filter('edd_download_columns', array($this, 'addColumns'), 11);
|
2963 |
+
add_filter('manage_'.$post_type.'_posts_columns', array($this, 'addColumns'), 11);
|
2964 |
+
|
2965 |
+
|
2966 |
+
add_action('manage_'.$post_type.'_posts_custom_column', array($this, 'columnsContents'), 11, 2);
|
2967 |
+
add_filter('manage_edit-'.$post_type.'_sortable_columns', array($this, 'sortableColumns'), 11);
|
2968 |
+
}
|
2969 |
+
}
|
2970 |
+
|
2971 |
+
/**
|
2972 |
+
* Make the SEO Score column sortable.
|
2973 |
+
*
|
2974 |
+
* @param array $columns Array of column names.
|
2975 |
+
*
|
2976 |
+
* @return array
|
2977 |
+
*/
|
2978 |
+
public function sortableColumns($columns)
|
2979 |
+
{
|
2980 |
+
|
2981 |
+
$columns['metaseo_seokeywords_details_column'] = 'wp_metaseo_seoscore';
|
2982 |
+
|
2983 |
+
return $columns;
|
2984 |
+
}
|
2985 |
+
|
2986 |
+
/**
|
2987 |
+
* Add content for custom column.
|
2988 |
+
*
|
2989 |
+
* @param string $column_name The name of the column to display.
|
2990 |
+
* @param integer $post_id The current post ID.
|
2991 |
+
*
|
2992 |
+
* @return void
|
2993 |
+
*/
|
2994 |
+
public function columnsContents($column_name, $post_id)
|
2995 |
+
{
|
2996 |
+
do_action($column_name, $post_id);
|
2997 |
+
}
|
2998 |
+
|
2999 |
+
/**
|
3000 |
+
* Add new columns for SEO title, description and focus keywords.
|
3001 |
+
*
|
3002 |
+
* @param array $columns Array of column names.
|
3003 |
+
*
|
3004 |
+
* @return array
|
3005 |
+
*/
|
3006 |
+
public function addColumns($columns)
|
3007 |
+
{
|
3008 |
+
$columns['metaseo_seokeywords_details_column'] = esc_html__('SEO score', 'wp-meta-seo');
|
3009 |
+
|
3010 |
+
return $columns;
|
3011 |
+
}
|
3012 |
+
|
3013 |
+
/**
|
3014 |
+
* Get post types that are public and not set to noindex.
|
3015 |
+
*
|
3016 |
+
* @codeCoverageIgnore
|
3017 |
+
*
|
3018 |
+
* @return array All the accessible post types.
|
3019 |
+
*/
|
3020 |
+
public static function getAccessiblePostTypes()
|
3021 |
+
{
|
3022 |
+
static $accessible_post_types;
|
3023 |
+
|
3024 |
+
if (isset($accessible_post_types) && did_action('wp_loaded')) {
|
3025 |
+
return $accessible_post_types;
|
3026 |
+
}
|
3027 |
+
|
3028 |
+
$accessible_post_types = get_post_types(array('public' => true));
|
3029 |
+
$accessible_post_types = array_filter($accessible_post_types, 'is_post_type_viewable');
|
3030 |
+
|
3031 |
+
if (!is_array($accessible_post_types)) {
|
3032 |
+
$accessible_post_types = array();
|
3033 |
+
}
|
3034 |
+
|
3035 |
+
if (isset($accessible_post_types['elementor_library'])) {
|
3036 |
+
unset($accessible_post_types['elementor_library']);
|
3037 |
+
}
|
3038 |
+
|
3039 |
+
return $accessible_post_types;
|
3040 |
+
}
|
3041 |
+
|
3042 |
+
/**
|
3043 |
+
* Update post meta keywords
|
3044 |
+
*
|
3045 |
+
* @return void
|
3046 |
+
*/
|
3047 |
+
public function updateSeokeywordBulkEdit()
|
3048 |
+
{
|
3049 |
+
if (empty($_POST['wpms_nonce'])
|
3050 |
+
|| !wp_verify_nonce($_POST['wpms_nonce'], 'wpms_nonce')) {
|
3051 |
+
die();
|
3052 |
+
}
|
3053 |
+
|
3054 |
+
if (!isset($_POST['listData']) || empty($_POST['listData'])) {
|
3055 |
+
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
3056 |
+
wp_die(__('Unspecified list data', 'wp-meta-seo'));
|
3057 |
+
}
|
3058 |
+
|
3059 |
+
$result = array();
|
3060 |
+
foreach ($_POST['listData'] as $data) {
|
3061 |
+
if (empty($data['idpost'])) {
|
3062 |
+
continue;
|
3063 |
+
}
|
3064 |
+
|
3065 |
+
$circliful = $this->doAnalysisFromBulkEdit((int)$data['idpost'], $data['keyword']);
|
3066 |
+
update_post_meta((int)$data['idpost'], '_metaseo_metaspecific_keywords', $data['keyword']);
|
3067 |
+
update_post_meta((int)$data['idpost'], 'wp_metaseo_seoscore', $circliful);
|
3068 |
+
$result[(int)$data['idpost']] = array($circliful, $data['keyword']);
|
3069 |
+
}
|
3070 |
+
|
3071 |
+
wp_send_json(array('status' => true, 'res_back' => $result));
|
3072 |
+
}
|
3073 |
+
|
3074 |
+
/**
|
3075 |
+
* Ajax load analysis from post edit
|
3076 |
+
*
|
3077 |
+
* @param integer $post_id Id post
|
3078 |
+
* @param string $keywords Keyword search
|
3079 |
+
*
|
3080 |
+
* @return mixed
|
3081 |
+
*/
|
3082 |
+
public function doAnalysisFromBulkEdit($post_id, $keywords)
|
3083 |
+
{
|
3084 |
+
if (empty($_POST['wpms_nonce']) || !wp_verify_nonce($_POST['wpms_nonce'], 'wpms_nonce')) {
|
3085 |
+
die();
|
3086 |
+
}
|
3087 |
+
|
3088 |
+
if (!current_user_can('edit_posts')) {
|
3089 |
+
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
3090 |
+
wp_die(__('There is no edit permission here', 'wp-meta-seo'));
|
3091 |
+
}
|
3092 |
+
|
3093 |
+
$content_post = get_post($post_id);
|
3094 |
+
$content = apply_filters('the_content', $content_post->post_content);
|
3095 |
+
$title = !(empty($content_post->post_title)) ? $content_post->post_title : null;
|
3096 |
+
$meta_title = get_post_meta($post_id, '_metaseo_metatitle', true);
|
3097 |
+
$meta_desc = get_post_meta($post_id, '_metaseo_metadesc', true);
|
3098 |
+
$check = 0;
|
3099 |
+
|
3100 |
+
// title heading
|
3101 |
+
$words_post_title = preg_split(
|
3102 |
+
'/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))/',
|
3103 |
+
strtolower($title),
|
3104 |
+
- 1,
|
3105 |
+
PREG_SPLIT_NO_EMPTY
|
3106 |
+
);
|
3107 |
+
|
3108 |
+
// do shortcode js_composer plugin
|
3109 |
+
if (is_plugin_active('js_composer_theme/js_composer.php')) {
|
3110 |
+
add_shortcode('mk_fancy_title', 'vc_do_shortcode');
|
3111 |
+
}
|
3112 |
+
|
3113 |
+
$content = apply_filters('wpms_the_content', '<div>' . html_entity_decode(stripcslashes($content)) . '</div>', $post_id);
|
3114 |
+
$content = $this->injectAcfField($content, $post_id);
|
3115 |
+
$content = $this->injectWooCommerce($content, $post_id);
|
3116 |
+
|
3117 |
+
if ($content !== '') {
|
3118 |
+
// Extracting the specified elements from the web page
|
3119 |
+
$tags_h1 = wpmsExtractTags($content, 'h1', false, true);
|
3120 |
+
$tags_h2 = wpmsExtractTags($content, 'h2', false, true);
|
3121 |
+
$tags_h3 = wpmsExtractTags($content, 'h3', false, true);
|
3122 |
+
$tags_h4 = wpmsExtractTags($content, 'h4', false, true);
|
3123 |
+
$tags_h5 = wpmsExtractTags($content, 'h5', false, true);
|
3124 |
+
$tags_h6 = wpmsExtractTags($content, 'h6', false, true);
|
3125 |
+
|
3126 |
+
$test = false;
|
3127 |
+
if (empty($tags_h1) && empty($tags_h2) && empty($tags_h3)
|
3128 |
+
&& empty($tags_h4) && empty($tags_h5) && empty($tags_h6)) {
|
3129 |
+
$test = false;
|
3130 |
+
} else {
|
3131 |
+
// check tag h1
|
3132 |
+
if (!empty($tags_h1)) {
|
3133 |
+
foreach ($tags_h1 as $order => $tagh1) {
|
3134 |
+
$words_tagh1 = preg_split(
|
3135 |
+
'/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))/',
|
3136 |
+
utf8_decode(strtolower($tagh1['contents'])),
|
3137 |
+
-1,
|
3138 |
+
PREG_SPLIT_NO_EMPTY
|
3139 |
+
);
|
3140 |
+
|
3141 |
+
if (is_array($words_tagh1) && is_array($words_post_title)) {
|
3142 |
+
foreach ($words_tagh1 as $mh) {
|
3143 |
+
if (in_array($mh, $words_post_title) && $mh !== '') {
|
3144 |
+
$test = true;
|
3145 |
+
}
|
3146 |
+
}
|
3147 |
+
}
|
3148 |
+
}
|
3149 |
+
}
|
3150 |
+
|
3151 |
+
// check tag h2
|
3152 |
+
if (!empty($tags_h2)) {
|
3153 |
+
foreach ($tags_h2 as $order => $tagh2) {
|
3154 |
+
$words_tagh2 = preg_split(
|
3155 |
+
'/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))/',
|
3156 |
+
utf8_decode(strtolower($tagh2['contents'])),
|
3157 |
+
-1,
|
3158 |
+
PREG_SPLIT_NO_EMPTY
|
3159 |
+
);
|
3160 |
+
if (is_array($words_tagh2) && is_array($words_post_title)) {
|
3161 |
+
foreach ($words_tagh2 as $mh) {
|
3162 |
+
if (in_array($mh, $words_post_title) && $mh !== '') {
|
3163 |
+
$test = true;
|
3164 |
+
}
|
3165 |
+
}
|
3166 |
+
}
|
3167 |
+
}
|
3168 |
+
}
|
3169 |
+
|
3170 |
+
// check tag h3
|
3171 |
+
if (!empty($tags_h3)) {
|
3172 |
+
foreach ($tags_h3 as $order => $tagh3) {
|
3173 |
+
$words_tagh3 = preg_split(
|
3174 |
+
'/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))/',
|
3175 |
+
utf8_decode(strtolower($tagh3['contents'])),
|
3176 |
+
-1,
|
3177 |
+
PREG_SPLIT_NO_EMPTY
|
3178 |
+
);
|
3179 |
+
if (is_array($words_tagh3) && is_array($words_post_title)) {
|
3180 |
+
foreach ($words_tagh3 as $mh) {
|
3181 |
+
if (in_array($mh, $words_post_title) && $mh !== '') {
|
3182 |
+
$test = true;
|
3183 |
+
}
|
3184 |
+
}
|
3185 |
+
}
|
3186 |
+
}
|
3187 |
+
}
|
3188 |
+
|
3189 |
+
// check tag h4
|
3190 |
+
if (!empty($tags_h4)) {
|
3191 |
+
foreach ($tags_h4 as $order => $tagh4) {
|
3192 |
+
$words_tagh4 = preg_split(
|
3193 |
+
'/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))/',
|
3194 |
+
utf8_decode(strtolower($tagh4['contents'])),
|
3195 |
+
-1,
|
3196 |
+
PREG_SPLIT_NO_EMPTY
|
3197 |
+
);
|
3198 |
+
if (is_array($words_tagh4) && is_array($words_post_title)) {
|
3199 |
+
foreach ($words_tagh4 as $mh) {
|
3200 |
+
if (in_array($mh, $words_post_title) && $mh !== '') {
|
3201 |
+
$test = true;
|
3202 |
+
}
|
3203 |
+
}
|
3204 |
+
}
|
3205 |
+
}
|
3206 |
+
}
|
3207 |
+
|
3208 |
+
// check tag h5
|
3209 |
+
if (!empty($tags_h5)) {
|
3210 |
+
foreach ($tags_h5 as $order => $tagh5) {
|
3211 |
+
$words_tagh5 = preg_split(
|
3212 |
+
'/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))/',
|
3213 |
+
utf8_decode(strtolower($tagh5['contents'])),
|
3214 |
+
-1,
|
3215 |
+
PREG_SPLIT_NO_EMPTY
|
3216 |
+
);
|
3217 |
+
if (is_array($words_tagh5) && is_array($words_post_title)) {
|
3218 |
+
foreach ($words_tagh5 as $mh) {
|
3219 |
+
if (in_array($mh, $words_post_title) && $mh !== '') {
|
3220 |
+
$test = true;
|
3221 |
+
}
|
3222 |
+
}
|
3223 |
+
}
|
3224 |
+
}
|
3225 |
+
}
|
3226 |
+
|
3227 |
+
// check tag h6
|
3228 |
+
if (!empty($tags_h6)) {
|
3229 |
+
foreach ($tags_h6 as $order => $tagh6) {
|
3230 |
+
$words_tagh6 = preg_split(
|
3231 |
+
'/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))/',
|
3232 |
+
utf8_decode(strtolower($tagh6['contents'])),
|
3233 |
+
-1,
|
3234 |
+
PREG_SPLIT_NO_EMPTY
|
3235 |
+
);
|
3236 |
+
if (is_array($words_tagh6) && is_array($words_post_title)) {
|
3237 |
+
foreach ($words_tagh6 as $mh) {
|
3238 |
+
if (in_array($mh, $words_post_title) && $mh !== '') {
|
3239 |
+
$test = true;
|
3240 |
+
}
|
3241 |
+
}
|
3242 |
+
}
|
3243 |
+
}
|
3244 |
+
}
|
3245 |
+
}
|
3246 |
+
|
3247 |
+
if ($test) {
|
3248 |
+
$check++;
|
3249 |
+
}
|
3250 |
+
}
|
3251 |
+
|
3252 |
+
// title content
|
3253 |
+
$words_title = preg_split(
|
3254 |
+
'/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))/',
|
3255 |
+
strtolower($title),
|
3256 |
+
- 1,
|
3257 |
+
PREG_SPLIT_NO_EMPTY
|
3258 |
+
);
|
3259 |
+
$words_post_content = preg_split(
|
3260 |
+
'/((^\p{P}+)|(\p{P}*\s+\p{P}*)|(\p{P}+$))/',
|
3261 |
+
strtolower(strip_tags($content)),
|
3262 |
+
- 1,
|
3263 |
+
PREG_SPLIT_NO_EMPTY
|
3264 |
+
);
|
3265 |
+
|
3266 |
+
$test1 = false;
|
3267 |
+
if (is_array($words_title) && is_array($words_post_content)) {
|
3268 |
+
foreach ($words_title as $mtitle) {
|
3269 |
+
if (in_array($mtitle, $words_post_content) && $mtitle !== '') {
|
3270 |
+
$test1 = true;
|
3271 |
+
break;
|
3272 |
+
}
|
3273 |
+
}
|
3274 |
+
} else {
|
3275 |
+
$test1 = false;
|
3276 |
+
}
|
3277 |
+
|
3278 |
+
if ($test1) {
|
3279 |
+
$check ++;
|
3280 |
+
}
|
3281 |
+
|
3282 |
+
// page url matches page title
|
3283 |
+
$mtitle = $title;
|
3284 |
+
$pageurl = pathinfo(get_permalink($post_id));
|
3285 |
+
$mpageurl = $pageurl['filename'];
|
3286 |
+
|
3287 |
+
if (!empty($mpageurl) && !empty($mtitle) && $mpageurl === sanitize_title($mtitle)) {
|
3288 |
+
$check ++;
|
3289 |
+
}
|
3290 |
+
|
3291 |
+
// meta title filled
|
3292 |
+
if (($meta_title !== '' && mb_strlen($meta_title, 'UTF-8') <= self::$title_length)) {
|
3293 |
+
$check ++;
|
3294 |
+
}
|
3295 |
+
|
3296 |
+
// desc filled
|
3297 |
+
if ($meta_desc !== '' && mb_strlen($meta_desc, 'UTF-8') <= self::$desc_length) {
|
3298 |
+
$check ++;
|
3299 |
+
}
|
3300 |
+
|
3301 |
+
// image resize
|
3302 |
+
if ($content === '') {
|
3303 |
+
$check += 2;
|
3304 |
+
} else {
|
3305 |
+
// Extracting the specified elements from the web page
|
3306 |
+
$img_tags = wpmsExtractTags($content, 'img', true, true);
|
3307 |
+
$img_wrong = false;
|
3308 |
+
$img_wrong_alt = false;
|
3309 |
+
foreach ($img_tags as $order => $tag) {
|
3310 |
+
if (!isset($tag['attributes']['src'])) {
|
3311 |
+
continue;
|
3312 |
+
}
|
3313 |
+
|
3314 |
+
$src = $tag['attributes']['src'];
|
3315 |
+
$imgpath = str_replace(site_url(), ABSPATH, $src);
|
3316 |
+
if (!file_exists($imgpath)) {
|
3317 |
+
continue;
|
3318 |
+
}
|
3319 |
+
if (!list($width_origin, $height_origin) = getimagesize($imgpath)) {
|
3320 |
+
continue;
|
3321 |
+
}
|
3322 |
+
|
3323 |
+
if (empty($tag['attributes']['width']) && empty($tag['attributes']['height'])) {
|
3324 |
+
$img_wrong = false;
|
3325 |
+
} else {
|
3326 |
+
if (!empty($width_origin) && !empty($height_origin)) {
|
3327 |
+
if ((isset($tag['attributes']['width']) && (int) $width_origin !== (int) $tag['attributes']['width'])
|
3328 |
+
|| (isset($tag['attributes']['height']) && (int) $height_origin !== (int) $tag['attributes']['height'])) {
|
3329 |
+
$img_wrong = true;
|
3330 |
+
}
|
3331 |
+
}
|
3332 |
+
}
|
3333 |
+
|
3334 |
+
if (empty($tag['attributes']['alt'])) {
|
3335 |
+
$img_wrong_alt = true;
|
3336 |
+
}
|
3337 |
+
}
|
3338 |
+
|
3339 |
+
if (!$img_wrong) {
|
3340 |
+
$check ++;
|
3341 |
+
}
|
3342 |
+
|
3343 |
+
|
3344 |
+
if (!$img_wrong_alt) {
|
3345 |
+
$check ++;
|
3346 |
+
}
|
3347 |
+
}
|
3348 |
+
|
3349 |
+
$total_check = 7;
|
3350 |
+
if (!empty($keywords)) {
|
3351 |
+
$total_check++;
|
3352 |
+
|
3353 |
+
$listkeywords = array_map('trim', explode(',', strtolower($keywords)));
|
3354 |
+
|
3355 |
+
foreach ($listkeywords as $key) {
|
3356 |
+
if (strpos(strtolower($title), $key) !== false) {
|
3357 |
+
$check++;
|
3358 |
+
break;
|
3359 |
+
}
|
3360 |
+
|
3361 |
+
if (strpos(strtolower($content), $key) !== false) {
|
3362 |
+
$check++;
|
3363 |
+
break;
|
3364 |
+
}
|
3365 |
+
|
3366 |
+
if (strpos(strtolower($meta_title), $key) !== false) {
|
3367 |
+
$check++;
|
3368 |
+
break;
|
3369 |
+
}
|
3370 |
+
|
3371 |
+
if (strpos(strtolower($meta_desc), $key) !== false) {
|
3372 |
+
$check++;
|
3373 |
+
break;
|
3374 |
+
}
|
3375 |
+
|
3376 |
+
$pattern = '/<h[2-6][^>]*>.*'.$key.'.*<\/h[2-6]>/';
|
3377 |
+
if (preg_match($pattern, $content)) {
|
3378 |
+
$check++;
|
3379 |
+
break;
|
3380 |
+
}
|
3381 |
+
}
|
3382 |
+
}
|
3383 |
+
|
3384 |
+
$circliful = ceil(100 * ($check) / $total_check);
|
3385 |
+
|
3386 |
+
return $circliful;
|
3387 |
}
|
3388 |
|
3389 |
/**
|
4522 |
case 'image_scan_meta':
|
4523 |
MetaSeoImageListTable::imageScanMeta();
|
4524 |
break;
|
4525 |
+
case 'update_seokeyword_bulk_edit':
|
4526 |
+
$this->updateSeokeywordBulkEdit();
|
4527 |
+
break;
|
4528 |
}
|
4529 |
}
|
4530 |
}
|
inc/class.metaseo-content-list-table.php
CHANGED
@@ -30,6 +30,18 @@ class MetaSeoContentListTable extends WP_List_Table
|
|
30 |
));
|
31 |
}
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
/**
|
34 |
* Generate the table navigation above or below the table
|
35 |
*
|
@@ -353,16 +365,14 @@ class MetaSeoContentListTable extends WP_List_Table
|
|
353 |
$columns = array(
|
354 |
'cb' => '<input id="cb-select-all-1" type="checkbox" style="margin:0">',
|
355 |
'col_title' => esc_html__('Title', 'wp-meta-seo'),
|
356 |
-
'col_snippet' => sprintf(esc_html__('Snippet Preview %s', 'wp-meta-seo'), $info)
|
357 |
-
'col_meta_title' => esc_html__('Meta Title', 'wp-meta-seo'),
|
358 |
);
|
359 |
|
360 |
$settings = get_option('_metaseo_settings');
|
361 |
if (isset($settings['metaseo_showkeywords']) && (int) $settings['metaseo_showkeywords'] === 1) {
|
362 |
$columns['col_meta_keywords'] = esc_html__('Meta Keywords', 'wp-meta-seo');
|
363 |
}
|
364 |
-
|
365 |
-
$settings = get_option('_metaseo_settings');
|
366 |
if (!empty($settings['metaseo_follow'])) {
|
367 |
$columns['col_follow'] = esc_html__('Follow', 'wp-meta-seo');
|
368 |
}
|
@@ -387,9 +397,7 @@ class MetaSeoContentListTable extends WP_List_Table
|
|
387 |
protected function get_sortable_columns() // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps -- extends from WP_List_Table class
|
388 |
{
|
389 |
$sortable = array(
|
390 |
-
'col_title' => array('post_title', true)
|
391 |
-
'col_meta_title' => array('metatitle', true),
|
392 |
-
'col_meta_desc' => array('metadesc', true)
|
393 |
);
|
394 |
|
395 |
return $sortable;
|
@@ -599,7 +607,10 @@ class MetaSeoContentListTable extends WP_List_Table
|
|
599 |
$i = 0;
|
600 |
$alternate = '';
|
601 |
$url = preg_replace('/(http|https):\/\/([w]*[.])?/', '', network_site_url('/'));
|
602 |
-
|
|
|
|
|
|
|
603 |
list($columns, $hidden) = $this->get_column_info();
|
604 |
|
605 |
if (!empty($records)) {
|
@@ -607,7 +618,15 @@ class MetaSeoContentListTable extends WP_List_Table
|
|
607 |
$alternate = 'alternate' === $alternate ? '' : 'alternate';
|
608 |
$i ++;
|
609 |
$classes = $alternate;
|
610 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
611 |
|
612 |
echo '<tr id="' . esc_attr('record_' . $rec->ID) . '" class="' . esc_attr($classes) . '" >';
|
613 |
|
@@ -686,39 +705,46 @@ class MetaSeoContentListTable extends WP_List_Table
|
|
686 |
|
687 |
case 'col_snippet':
|
688 |
echo '<td><div class="snippet-wrapper">';
|
689 |
-
echo '<div class="snippet">
|
690 |
-
<a id="' . esc_attr('snippet_title' . $rec->ID) . '" class="snippet_metatitle">
|
691 |
-
' . (!empty($rec->metatitle) ? esc_html($rec->metatitle) : esc_html($rec->post_title)) . '</a>';
|
692 |
-
|
693 |
-
echo '<span class="snippet_metalink" id="' . esc_attr('snippet_metalink_' . $rec->ID) . '">
|
694 |
-
' . esc_html($rec->link) . '</span>';
|
695 |
-
|
696 |
-
echo '<p id="' . esc_attr('snippet_desc' . $rec->ID) . '" class="snippet_metades">
|
697 |
-
' . esc_html($rec->metadesc) . '</p></div>';
|
698 |
-
echo '<img class="' . esc_attr('wpms_loader' . $rec->ID . ' wpms_content_loader') . '"
|
699 |
-
src=' . esc_url(WPMETASEO_PLUGIN_URL) . 'assets/images/update_loading.gif>';
|
700 |
-
echo '<span id="' . esc_attr('savedInfo' . $rec->ID) . '"
|
701 |
-
style="position: relative; display: block;float:right"
|
702 |
-
class="saved-info metaseo-msg-success"><span style="position:absolute; float:right" class="spinner"></span></span>';
|
703 |
-
echo '</div></td>';
|
704 |
-
break;
|
705 |
-
|
706 |
-
case 'col_meta_title':
|
707 |
$input = sprintf(
|
708 |
-
'<input type="text" class="large-text metaseo-metatitle"
|
709 |
-
rows="3" id="%1$s" name="%2$s" autocomplete="off" value="%3$s">',
|
710 |
esc_attr('metaseo-metatitle-' . $rec->ID),
|
711 |
esc_attr('metatitle[' . $rec->ID . ']'),
|
712 |
-
($rec->metatitle) ? esc_textarea($rec->metatitle) :
|
|
|
713 |
);
|
714 |
$input .= sprintf(
|
715 |
-
'<div class="title-len" id="%1$s"></div>',
|
716 |
esc_attr('metaseo-metatitle-len' . $rec->ID)
|
717 |
);
|
|
|
|
|
718 |
// phpcs:ignore WordPress.Security.EscapeOutput -- Content escaped in previous line (same function)
|
719 |
-
echo sprintf('<
|
720 |
-
|
721 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
722 |
case 'col_meta_keywords':
|
723 |
$input = sprintf(
|
724 |
'<textarea class="large-text metaseo-metakeywords"
|
@@ -734,23 +760,6 @@ class MetaSeoContentListTable extends WP_List_Table
|
|
734 |
// phpcs:ignore WordPress.Security.EscapeOutput -- Content escaped in previous line (same function)
|
735 |
echo sprintf('<td %2$s><div class="content-b">%1$s</div></td>', $input, $attributes);
|
736 |
break;
|
737 |
-
|
738 |
-
case 'col_meta_desc':
|
739 |
-
$input = sprintf(
|
740 |
-
'<textarea class="large-text metaseo-metadesc"
|
741 |
-
rows="3" id="%1$s" name="%2$s" autocomplete="off">%3$s</textarea>',
|
742 |
-
esc_attr('metaseo-metadesc-' . $rec->ID),
|
743 |
-
esc_attr(' metades[' . $rec->ID . ']'),
|
744 |
-
($rec->metadesc) ? esc_textarea($rec->metadesc) : ''
|
745 |
-
);
|
746 |
-
$input .= sprintf(
|
747 |
-
'<div class="desc-len" id="%1$s"></div>',
|
748 |
-
esc_attr('metaseo-metadesc-len' . $rec->ID)
|
749 |
-
);
|
750 |
-
// phpcs:ignore WordPress.Security.EscapeOutput -- Content escaped in previous line (same function)
|
751 |
-
echo sprintf('<td %2$s><div class="content-b">%1$s</div></td>', $input, $attributes);
|
752 |
-
break;
|
753 |
-
|
754 |
case 'col_index':
|
755 |
$page_index = get_post_meta($rec->ID, '_metaseo_metaindex', true);
|
756 |
if (isset($page_index) && $page_index === 'noindex') {
|
30 |
));
|
31 |
}
|
32 |
|
33 |
+
/**
|
34 |
+
* Custom style for meta content table
|
35 |
+
*
|
36 |
+
* @return void
|
37 |
+
*/
|
38 |
+
public static function customStyles()
|
39 |
+
{
|
40 |
+
echo '<style type="text/css">';
|
41 |
+
echo '.metaseo_contents .column-col_title {width:30% !important;}';
|
42 |
+
echo '</style>';
|
43 |
+
}
|
44 |
+
|
45 |
/**
|
46 |
* Generate the table navigation above or below the table
|
47 |
*
|
365 |
$columns = array(
|
366 |
'cb' => '<input id="cb-select-all-1" type="checkbox" style="margin:0">',
|
367 |
'col_title' => esc_html__('Title', 'wp-meta-seo'),
|
368 |
+
'col_snippet' => sprintf(esc_html__('Snippet Preview %s', 'wp-meta-seo'), $info)
|
|
|
369 |
);
|
370 |
|
371 |
$settings = get_option('_metaseo_settings');
|
372 |
if (isset($settings['metaseo_showkeywords']) && (int) $settings['metaseo_showkeywords'] === 1) {
|
373 |
$columns['col_meta_keywords'] = esc_html__('Meta Keywords', 'wp-meta-seo');
|
374 |
}
|
375 |
+
|
|
|
376 |
if (!empty($settings['metaseo_follow'])) {
|
377 |
$columns['col_follow'] = esc_html__('Follow', 'wp-meta-seo');
|
378 |
}
|
397 |
protected function get_sortable_columns() // phpcs:ignore PSR1.Methods.CamelCapsMethodName.NotCamelCaps -- extends from WP_List_Table class
|
398 |
{
|
399 |
$sortable = array(
|
400 |
+
'col_title' => array('post_title', true)
|
|
|
|
|
401 |
);
|
402 |
|
403 |
return $sortable;
|
607 |
$i = 0;
|
608 |
$alternate = '';
|
609 |
$url = preg_replace('/(http|https):\/\/([w]*[.])?/', '', network_site_url('/'));
|
610 |
+
$settings = get_option('_metaseo_settings');
|
611 |
+
if (!$settings || !isset($settings['metaseo_metatitle_tab'])) {
|
612 |
+
$settings['metaseo_metatitle_tab'] = 1;
|
613 |
+
}
|
614 |
list($columns, $hidden) = $this->get_column_info();
|
615 |
|
616 |
if (!empty($records)) {
|
618 |
$alternate = 'alternate' === $alternate ? '' : 'alternate';
|
619 |
$i ++;
|
620 |
$classes = $alternate;
|
621 |
+
|
622 |
+
if (get_permalink($rec->ID) !== false) {
|
623 |
+
$rec->link = get_permalink($rec->ID);
|
624 |
+
} else {
|
625 |
+
$rec->link = $url;
|
626 |
+
}
|
627 |
+
|
628 |
+
$title_snippet = (!empty($settings['metaseo_metatitle_tab']) ? $rec->post_title : '');
|
629 |
+
|
630 |
|
631 |
echo '<tr id="' . esc_attr('record_' . $rec->ID) . '" class="' . esc_attr($classes) . '" >';
|
632 |
|
705 |
|
706 |
case 'col_snippet':
|
707 |
echo '<td><div class="snippet-wrapper">';
|
708 |
+
echo '<div class="snippet">';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
709 |
$input = sprintf(
|
710 |
+
'<input type="text" placeholder="Put your meta title here. Click here to edit..." class="large-text metaseo-metatitle custom-bulk-metaseo-metatitle intro-topic-tooltip" rows="1" id="%1$s" name="%2$s" autocomplete="off" value="%3$s" data-alt="%4$s">',
|
|
|
711 |
esc_attr('metaseo-metatitle-' . $rec->ID),
|
712 |
esc_attr('metatitle[' . $rec->ID . ']'),
|
713 |
+
($rec->metatitle) ? esc_textarea($rec->metatitle) : esc_textarea($title_snippet),
|
714 |
+
esc_html__('This is your meta title that should be displayed in Google Search results for this page', 'wp-meta-seo')
|
715 |
);
|
716 |
$input .= sprintf(
|
717 |
+
'<div class="title-len" style="bottom: 32px" id="%1$s"></div>',
|
718 |
esc_attr('metaseo-metatitle-len' . $rec->ID)
|
719 |
);
|
720 |
+
echo '<span class="snippet_metalink" style="padding-left: 10px;" id="' . esc_attr('snippet_metalink_' . $rec->ID) . '">
|
721 |
+
' . esc_html($rec->link) . '</span>';
|
722 |
// phpcs:ignore WordPress.Security.EscapeOutput -- Content escaped in previous line (same function)
|
723 |
+
echo sprintf('<div class="custom-bulk-content-b custom-bulk-content-metatitle">%1$s</div>', $input, $attributes);
|
724 |
+
echo '</div>';
|
725 |
|
726 |
+
$input = sprintf(
|
727 |
+
'<textarea placeholder="Put your meta description here. Click here to edit..." class="large-text metaseo-metadesc custom-bulk-metaseo-metadesc intro-topic-tooltip" id="%1$s" name="%2$s" autocomplete="off" data-alt="%4$s">%3$s</textarea>',
|
728 |
+
esc_attr('metaseo-metadesc-' . $rec->ID),
|
729 |
+
esc_attr(' metades[' . $rec->ID . ']'),
|
730 |
+
($rec->metadesc) ? esc_textarea($rec->metadesc) : '',
|
731 |
+
esc_html__('This is your meta description that should be displayed in Google Search results for this page', 'wp-meta-seo')
|
732 |
+
);
|
733 |
+
$input .= sprintf(
|
734 |
+
'<div class="desc-len" style="bottom: 44px" id="%1$s"></div>',
|
735 |
+
esc_attr('metaseo-metadesc-len' . $rec->ID)
|
736 |
+
);
|
737 |
+
// phpcs:ignore WordPress.Security.EscapeOutput -- Content escaped in previous line (same function)
|
738 |
+
echo sprintf('<div class="custom-bulk-content-b">%1$s</div>', $input, $attributes);
|
739 |
+
|
740 |
+
echo '<img class="' . esc_attr('wpms_loader' . $rec->ID . ' wpms_content_loader') . '"
|
741 |
+
src=' . esc_url(WPMETASEO_PLUGIN_URL) . 'assets/images/update_loading.gif>';
|
742 |
+
echo '<span id="' . esc_attr('savedInfo' . $rec->ID) . '"
|
743 |
+
style="position: relative; display: inline-block; vertical-align: top;"
|
744 |
+
class="saved-info metaseo-msg-success"><span style="position:absolute; float:right" class="spinner"></span></span>';
|
745 |
+
|
746 |
+
echo '</div></td>';
|
747 |
+
break;
|
748 |
case 'col_meta_keywords':
|
749 |
$input = sprintf(
|
750 |
'<textarea class="large-text metaseo-metakeywords"
|
760 |
// phpcs:ignore WordPress.Security.EscapeOutput -- Content escaped in previous line (same function)
|
761 |
echo sprintf('<td %2$s><div class="content-b">%1$s</div></td>', $input, $attributes);
|
762 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
763 |
case 'col_index':
|
764 |
$page_index = get_post_meta($rec->ID, '_metaseo_metaindex', true);
|
765 |
if (isset($page_index) && $page_index === 'noindex') {
|
inc/class.metaseo-dashboard.php
CHANGED
@@ -708,84 +708,6 @@ class MetaSeoDashboard
|
|
708 |
wp_send_json($response);
|
709 |
}
|
710 |
|
711 |
-
/**
|
712 |
-
* Connect with webpage test api
|
713 |
-
*
|
714 |
-
* @param string $page URL of page check
|
715 |
-
* @param string $key Key of webpage test api
|
716 |
-
* @param boolean $run_time Run time
|
717 |
-
* @param boolean $type Type check
|
718 |
-
*
|
719 |
-
* @return string
|
720 |
-
*/
|
721 |
-
public static function getTestId($page, $key, $run_time = false, $type = false)
|
722 |
-
{
|
723 |
-
$idTest = wpmsGetOption('webpage_testid');
|
724 |
-
if (!empty($idTest)) {
|
725 |
-
return $idTest;
|
726 |
-
}
|
727 |
-
|
728 |
-
$testID = '';
|
729 |
-
if (!$type) {
|
730 |
-
$type = 'xml';
|
731 |
-
}
|
732 |
-
if (!$run_time) {
|
733 |
-
$run_time = 1;
|
734 |
-
}
|
735 |
-
$runTest = 'http://www.webpagetest.org/runtest.php?url=' .
|
736 |
-
$page . '&runs=' . $run_time . '&f=' . $type . '&k=' . $key;
|
737 |
-
$response = wp_remote_get($runTest);
|
738 |
-
if (is_array($response)) {
|
739 |
-
$xmlres = simplexml_load_string($response['body']);
|
740 |
-
if ($xmlres) {
|
741 |
-
if ((string) $xmlres->statusText === 'Ok') {
|
742 |
-
$testID = (string) $xmlres->data->testId;
|
743 |
-
}
|
744 |
-
|
745 |
-
if ((string) $xmlres->statusText === 'Invalid API Key') {
|
746 |
-
$testID = 'Invalid API Key';
|
747 |
-
}
|
748 |
-
}
|
749 |
-
}
|
750 |
-
|
751 |
-
return $testID;
|
752 |
-
}
|
753 |
-
|
754 |
-
/**
|
755 |
-
* Get response from URL
|
756 |
-
*
|
757 |
-
* @param string $url URL
|
758 |
-
*
|
759 |
-
* @return SimpleXMLElement|boolean
|
760 |
-
*/
|
761 |
-
public static function sxe($url)
|
762 |
-
{
|
763 |
-
// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged -- Fix warning in some case
|
764 |
-
$xml = @file_get_contents($url);
|
765 |
-
if (empty($xml)) {
|
766 |
-
return false;
|
767 |
-
}
|
768 |
-
foreach ($http_response_header as $header) {
|
769 |
-
if (preg_match('#^Content-Type: text/xml; charset=(.*)#i', $header, $m)) {
|
770 |
-
switch (strtolower($m[1])) {
|
771 |
-
case 'utf-8':
|
772 |
-
// do nothing
|
773 |
-
break;
|
774 |
-
|
775 |
-
case 'iso-8859-1':
|
776 |
-
$xml = utf8_encode($xml);
|
777 |
-
break;
|
778 |
-
|
779 |
-
default:
|
780 |
-
$xml = iconv($m[1], 'utf-8', $xml);
|
781 |
-
}
|
782 |
-
break;
|
783 |
-
}
|
784 |
-
}
|
785 |
-
|
786 |
-
return simplexml_load_string($xml);
|
787 |
-
}
|
788 |
-
|
789 |
/**
|
790 |
* Get screenshot website
|
791 |
*
|
@@ -793,28 +715,20 @@ class MetaSeoDashboard
|
|
793 |
*/
|
794 |
public static function thumbalizr()
|
795 |
{
|
796 |
-
$url = home_url();
|
797 |
-
$
|
798 |
-
if (empty($
|
799 |
-
return 'https://ps.w.org/wp-meta-seo/assets/banner-772x250.png';
|
800 |
-
}
|
801 |
-
wpmsSetOption('webpage_testid', $idTest);
|
802 |
-
$urlTest = 'http://www.webpagetest.org/xmlResult/' . $idTest . '/';
|
803 |
-
$xmlResult = self::sxe($urlTest);
|
804 |
-
if (!$xmlResult) {
|
805 |
return 'https://ps.w.org/wp-meta-seo/assets/banner-772x250.png';
|
806 |
}
|
807 |
|
808 |
-
$
|
809 |
-
if ($
|
810 |
-
|
811 |
}
|
812 |
|
813 |
-
if ($
|
814 |
-
|
815 |
-
|
816 |
-
wpmsSetOption('webpage_testid', 0);
|
817 |
-
return (string) $xmlResult->data->run[0]->firstView->images->screenShot;
|
818 |
}
|
819 |
|
820 |
return 'https://ps.w.org/wp-meta-seo/assets/banner-772x250.png';
|
@@ -833,9 +747,6 @@ class MetaSeoDashboard
|
|
833 |
$link = 'https://ps.w.org/wp-meta-seo/assets/banner-772x250.png';
|
834 |
} else {
|
835 |
$response = self::thumbalizr();
|
836 |
-
if (is_array($response)) {
|
837 |
-
wp_send_json($response);
|
838 |
-
}
|
839 |
// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged -- Fix warning in some case
|
840 |
$content = @file_get_contents($response);
|
841 |
if ($content) {
|
@@ -848,4 +759,32 @@ class MetaSeoDashboard
|
|
848 |
|
849 |
wp_send_json(array('status' => true, 'link' => $link));
|
850 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
851 |
}
|
708 |
wp_send_json($response);
|
709 |
}
|
710 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
711 |
/**
|
712 |
* Get screenshot website
|
713 |
*
|
715 |
*/
|
716 |
public static function thumbalizr()
|
717 |
{
|
718 |
+
$url = 'https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url=' . urlencode(home_url()) . '&key=AIzaSyBK5KSSJPMnWpFu58LMIGoC8iXmqdjuaek&strategy=DESKTOP';
|
719 |
+
$remote = self::getResponseObject($url);
|
720 |
+
if (empty($remote)) {
|
|
|
|
|
|
|
|
|
|
|
|
|
721 |
return 'https://ps.w.org/wp-meta-seo/assets/banner-772x250.png';
|
722 |
}
|
723 |
|
724 |
+
$remote_decode = json_decode($remote, true);
|
725 |
+
if (isset($remote_decode['error'])) {
|
726 |
+
return 'https://ps.w.org/wp-meta-seo/assets/banner-772x250.png';
|
727 |
}
|
728 |
|
729 |
+
if (isset($remote_decode['lighthouseResult']['audits']['final-screenshot']['details']['data']) &&
|
730 |
+
$remote_decode['lighthouseResult']['audits']['final-screenshot']['details']['data'] !== '') {
|
731 |
+
return $remote_decode['lighthouseResult']['audits']['final-screenshot']['details']['data'];
|
|
|
|
|
732 |
}
|
733 |
|
734 |
return 'https://ps.w.org/wp-meta-seo/assets/banner-772x250.png';
|
747 |
$link = 'https://ps.w.org/wp-meta-seo/assets/banner-772x250.png';
|
748 |
} else {
|
749 |
$response = self::thumbalizr();
|
|
|
|
|
|
|
750 |
// phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged -- Fix warning in some case
|
751 |
$content = @file_get_contents($response);
|
752 |
if ($content) {
|
759 |
|
760 |
wp_send_json(array('status' => true, 'link' => $link));
|
761 |
}
|
762 |
+
|
763 |
+
/**
|
764 |
+
* Get response from API
|
765 |
+
*
|
766 |
+
* @param string $url Current URL
|
767 |
+
*
|
768 |
+
* @return integer|null|string
|
769 |
+
*/
|
770 |
+
public static function getResponseObject($url)
|
771 |
+
{
|
772 |
+
$output = '';
|
773 |
+
if (function_exists('curl_init')) {
|
774 |
+
$ch = curl_init($url);
|
775 |
+
curl_setopt($ch, CURLOPT_HEADER, false);
|
776 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
777 |
+
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
778 |
+
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
|
779 |
+
$output = curl_exec($ch);
|
780 |
+
curl_close($ch);
|
781 |
+
} else {
|
782 |
+
$file_headers = get_headers($url);
|
783 |
+
if (strpos(strtolower($file_headers[0]), '200 ok') !== false) {
|
784 |
+
$output = file_get_contents($url);
|
785 |
+
}
|
786 |
+
}
|
787 |
+
|
788 |
+
return $output;
|
789 |
+
}
|
790 |
}
|
inc/class.metaseo-meta.php
CHANGED
@@ -58,25 +58,31 @@ class WPMSEOMeta
|
|
58 |
'help' => '',
|
59 |
'classrow' => 'wpms_width_100'
|
60 |
),
|
61 |
-
'title'
|
62 |
-
'type'
|
63 |
-
'title'
|
64 |
'default_value' => '',
|
65 |
-
'description'
|
66 |
-
'help'
|
67 |
-
'rows'
|
68 |
-
'class'
|
69 |
-
'classrow'
|
70 |
),
|
71 |
-
'desc'
|
72 |
-
'type'
|
73 |
-
'title'
|
74 |
'default_value' => '',
|
75 |
-
'class'
|
76 |
-
'rows'
|
77 |
-
'description'
|
78 |
-
'help'
|
79 |
-
'classrow'
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
),
|
81 |
'keywords' => array(
|
82 |
'type' => 'text',
|
58 |
'help' => '',
|
59 |
'classrow' => 'wpms_width_100'
|
60 |
),
|
61 |
+
'title' => array(
|
62 |
+
'type' => '',
|
63 |
+
'title' => '',
|
64 |
'default_value' => '',
|
65 |
+
'description' => '',
|
66 |
+
'help' => '',
|
67 |
+
'rows' => 2,
|
68 |
+
'class' => 'wpms_width_100 has-length wpms-large-input',
|
69 |
+
'classrow' => 'wpms_width_100'
|
70 |
),
|
71 |
+
'desc' => array(
|
72 |
+
'type' => '',
|
73 |
+
'title' => '',
|
74 |
'default_value' => '',
|
75 |
+
'class' => 'desc wpms_width_100 has-length',
|
76 |
+
'rows' => 3,
|
77 |
+
'description' => '',
|
78 |
+
'help' => '',
|
79 |
+
'classrow' => 'wpms_width_100'
|
80 |
+
),
|
81 |
+
'specific_keywords' => array(
|
82 |
+
'type' => 'specific_keywords',
|
83 |
+
'title' => '',
|
84 |
+
'help' => '',
|
85 |
+
'classrow' => 'wpms_width_100'
|
86 |
),
|
87 |
'keywords' => array(
|
88 |
'type' => 'text',
|
inc/class.metaseo-metabox.php
CHANGED
@@ -50,6 +50,7 @@ class WPMSEOMetabox extends WPMSEOMeta
|
|
50 |
*/
|
51 |
public function savePostData($post_id)
|
52 |
{
|
|
|
53 |
// phpcs:ignore WordPress.Security.NonceVerification.NoNonceVerification -- Nonce used in next lines
|
54 |
if (isset($_POST['metaseo_wpmseo_title'])) {
|
55 |
if (empty($_POST['_wpnonce'])
|
@@ -120,6 +121,11 @@ class WPMSEOMetabox extends WPMSEOMeta
|
|
120 |
}
|
121 |
}
|
122 |
}
|
|
|
|
|
|
|
|
|
|
|
123 |
do_action('wpmseo_saved_postdata');
|
124 |
return true;
|
125 |
}
|
@@ -139,20 +145,13 @@ class WPMSEOMetabox extends WPMSEOMeta
|
|
139 |
'</a>'
|
140 |
);
|
141 |
|
142 |
-
self::$meta_fields['general']['
|
143 |
-
self::$meta_fields['general']['
|
144 |
-
'<span id="metaseo_wpmseo_title-length" class="length-box-meta">%s</span>',
|
145 |
-
self::$meta_length_reason
|
146 |
-
);
|
147 |
-
self::$meta_fields['general']['title']['help'] = esc_attr__('This is the title of your content that may be displayed
|
148 |
-
in search engine results (meta title). By default it’s the content title (page title, post title…).
|
149 |
-
60 characters max allowed.', 'wp-meta-seo');
|
150 |
|
151 |
$settings = get_option('_metaseo_settings');
|
152 |
if (isset($settings['metaseo_showkeywords']) && (int) $settings['metaseo_showkeywords'] === 1) {
|
153 |
self::$meta_fields['general']['keywords']['title'] = esc_html__('Search engine keywords', 'wp-meta-seo');
|
154 |
-
self::$meta_fields['general']['keywords']['description']
|
155 |
-
= '<span id="metaseo_wpmseo_keywords-length" class="length-box-meta"></span>';
|
156 |
self::$meta_fields['general']['keywords']['help'] = esc_attr__('This is the keywords of your content that may be
|
157 |
displayed in search engine results (meta keywords).', 'wp-meta-seo');
|
158 |
} else {
|
@@ -167,17 +166,6 @@ class WPMSEOMetabox extends WPMSEOMeta
|
|
167 |
unset(self::$meta_fields['general']['metaseo_canonical']);
|
168 |
}
|
169 |
|
170 |
-
|
171 |
-
self::$meta_fields['general']['desc']['title'] = esc_html__('Search engine description', 'wp-meta-seo');
|
172 |
-
self::$meta_fields['general']['desc']['description'] = sprintf(
|
173 |
-
'<span id="metaseo_wpmseo_desc-length" class="length-box-meta">%s</span>',
|
174 |
-
self::$meta_length_reason
|
175 |
-
);
|
176 |
-
self::$meta_fields['general']['desc']['help'] = esc_attr__('The description of your content that may be displayed
|
177 |
-
in search engine results aka meta description.
|
178 |
-
By default search engine take an excerpt from your content (depending on the search query).
|
179 |
-
158 characters max allowed.', 'wp-meta-seo');
|
180 |
-
|
181 |
self::$meta_fields['social']['facebook']['opengraph-title']['title'] = esc_html__('Facebook Title', 'wp-meta-seo');
|
182 |
self::$meta_fields['social']['facebook']['opengraph-title']['description'] = esc_html__('Custom title to display when
|
183 |
sharing this content on facebook, content title override', 'wp-meta-seo');
|
@@ -308,7 +296,30 @@ class WPMSEOMetabox extends WPMSEOMeta
|
|
308 |
WPMSEO_VERSION,
|
309 |
true
|
310 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
311 |
wp_localize_script('m-wp-seo-metabox', 'wpmseoMetaboxL10n', $this->localizeScript());
|
|
|
312 |
$localize = $this->localizeSettingsScript();
|
313 |
wp_localize_script('mwpseo-admin-media', 'wpmseoMediaL10n', $localize);
|
314 |
wp_localize_script('metaseo-cliffpyles', 'wpmscliffpyles', $localize);
|
@@ -368,17 +379,19 @@ class WPMSEOMetabox extends WPMSEOMeta
|
|
368 |
if ((!is_object($post) || !isset($post->post_type))) {
|
369 |
return array();
|
370 |
}
|
371 |
-
|
372 |
self::$meta_length_reason = apply_filters('wpmseo_desc_length_reason', self::$meta_length_reason, $post);
|
373 |
self::$meta_length = apply_filters('wpmseo_desc_length', self::$meta_length, $post);
|
374 |
-
$title_template = '%title%
|
375 |
|
376 |
$desc_template = '';
|
377 |
$sample_permalink = get_sample_permalink($post->ID);
|
378 |
$sample_permalink = str_replace('%page', '%post', $sample_permalink[0]);
|
379 |
|
380 |
$cached_replacement_vars = array();
|
381 |
-
|
|
|
|
|
382 |
$vars_to_cache = array(
|
383 |
'date' => wpmsRetrieveDate($post),
|
384 |
'id' => !(empty($post->ID)) ? $post->ID : null,
|
@@ -391,6 +404,7 @@ class WPMSEOMetabox extends WPMSEOMeta
|
|
391 |
'currentday' => date_i18n('j'),
|
392 |
'currentmonth' => date_i18n('F'),
|
393 |
'currentyear' => date_i18n('Y'),
|
|
|
394 |
);
|
395 |
|
396 |
foreach ($vars_to_cache as $var => $value) {
|
@@ -518,7 +532,8 @@ class WPMSEOMetabox extends WPMSEOMeta
|
|
518 |
foreach ($this->getMetaFieldDefs('general', $post->post_type) as $key => $meta_field) {
|
519 |
$content .= $this->doMetaBox($meta_field, $key);
|
520 |
if ($key === 'title') {
|
521 |
-
$
|
|
|
522 |
}
|
523 |
}
|
524 |
unset($key, $meta_field);
|
@@ -620,17 +635,22 @@ class WPMSEOMetabox extends WPMSEOMeta
|
|
620 |
*/
|
621 |
public function pageAnalysis($post)
|
622 |
{
|
|
|
623 |
$output = '';
|
624 |
$circliful = 0;
|
625 |
$output .= '<div class="wpms_width_100">';
|
626 |
-
$output .= '<div class="metaseo_left">
|
627 |
<div class="metaseo-progress-bar" data-post_id="' . esc_attr($post->ID) . '"><strong></strong></div>
|
628 |
<input type="hidden" id="progressController" value="' . esc_attr($circliful) . '" />
|
629 |
<input type="hidden" id="metaseo_alanysis_ok" value="' . esc_attr($this->perc_score) . '" />
|
630 |
</div>';
|
631 |
|
632 |
-
$output .= '<div class="metaseo_right">';
|
|
|
|
|
|
|
633 |
$output .= '</div>';
|
|
|
634 |
$output .= '</div>';
|
635 |
return $output;
|
636 |
}
|
@@ -665,6 +685,9 @@ class WPMSEOMetabox extends WPMSEOMeta
|
|
665 |
case 'snippetpreview':
|
666 |
$content .= $this->snippet();
|
667 |
break;
|
|
|
|
|
|
|
668 |
case 'metaseo_canonical':
|
669 |
$placeholder = ' placeholder="'.esc_html__('Put canonical URL in field', 'wp-meta-seo') . '"';
|
670 |
$ac = '';
|
@@ -762,7 +785,7 @@ class WPMSEOMetabox extends WPMSEOMeta
|
|
762 |
|
763 |
$html = '<div class="'. esc_html($meta_field_def['classrow'] . ' wpms_left optimization-row-box') .'">';
|
764 |
$html .= '<label class="ju-setting-label wpms_width_100 wpms_left p-l-0">'. $label . $help .'</label>';
|
765 |
-
$html .= '<label class="wpms_width_100 label-input wpms_left p-t-20">'. $content .'</label>';
|
766 |
if (isset($meta_field_def['description'])) {
|
767 |
if (!strpos($meta_field_def['class'], 'has-length') !== false) {
|
768 |
$html .= '<p class="description">' . $meta_field_def['description'] . '</p>';
|
50 |
*/
|
51 |
public function savePostData($post_id)
|
52 |
{
|
53 |
+
|
54 |
// phpcs:ignore WordPress.Security.NonceVerification.NoNonceVerification -- Nonce used in next lines
|
55 |
if (isset($_POST['metaseo_wpmseo_title'])) {
|
56 |
if (empty($_POST['_wpnonce'])
|
121 |
}
|
122 |
}
|
123 |
}
|
124 |
+
|
125 |
+
if (isset($_POST['wpmetaseo_seo_keywords_result'])) {
|
126 |
+
update_post_meta($post_id, 'wp_metaseo_seoscore', $_POST['wpmetaseo_seo_keywords_result']);
|
127 |
+
}
|
128 |
+
|
129 |
do_action('wpmseo_saved_postdata');
|
130 |
return true;
|
131 |
}
|
145 |
'</a>'
|
146 |
);
|
147 |
|
148 |
+
self::$meta_fields['general']['specific_keywords']['title'] = esc_html__('Page SEO keywords', 'wp-meta-seo');
|
149 |
+
self::$meta_fields['general']['specific_keywords']['help'] = esc_attr__('Add the keywords related to your page, the SEO checker will verify if at least one of the SEO keywords are found in your content', 'wp-meta-seo');
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
|
151 |
$settings = get_option('_metaseo_settings');
|
152 |
if (isset($settings['metaseo_showkeywords']) && (int) $settings['metaseo_showkeywords'] === 1) {
|
153 |
self::$meta_fields['general']['keywords']['title'] = esc_html__('Search engine keywords', 'wp-meta-seo');
|
154 |
+
self::$meta_fields['general']['keywords']['description'] = '<span id="metaseo_wpmseo_keywords-length" class="length-box-meta"></span>';
|
|
|
155 |
self::$meta_fields['general']['keywords']['help'] = esc_attr__('This is the keywords of your content that may be
|
156 |
displayed in search engine results (meta keywords).', 'wp-meta-seo');
|
157 |
} else {
|
166 |
unset(self::$meta_fields['general']['metaseo_canonical']);
|
167 |
}
|
168 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
self::$meta_fields['social']['facebook']['opengraph-title']['title'] = esc_html__('Facebook Title', 'wp-meta-seo');
|
170 |
self::$meta_fields['social']['facebook']['opengraph-title']['description'] = esc_html__('Custom title to display when
|
171 |
sharing this content on facebook, content title override', 'wp-meta-seo');
|
296 |
WPMSEO_VERSION,
|
297 |
true
|
298 |
);
|
299 |
+
|
300 |
+
wp_enqueue_style(
|
301 |
+
'm-bootstrap-tagsinput',
|
302 |
+
plugins_url('assets/css/bootstrap/bootstrap.tagsinput.css', WPMSEO_FILE),
|
303 |
+
array(),
|
304 |
+
WPMSEO_VERSION
|
305 |
+
);
|
306 |
+
|
307 |
+
wp_enqueue_script(
|
308 |
+
'metaseo-bootstrap-tagsinput',
|
309 |
+
plugins_url('assets/js/bootstrap/bootstrap-tagsinput.min.js', WPMSEO_FILE),
|
310 |
+
array('jquery'),
|
311 |
+
WPMSEO_VERSION,
|
312 |
+
true
|
313 |
+
);
|
314 |
+
|
315 |
+
wp_enqueue_script(
|
316 |
+
'wpms-seokeyword-metabox',
|
317 |
+
plugins_url('assets/js/wpms-seokeyword-metabox.min.js', WPMSEO_FILE),
|
318 |
+
array('wp-data', 'jquery')
|
319 |
+
);
|
320 |
+
|
321 |
wp_localize_script('m-wp-seo-metabox', 'wpmseoMetaboxL10n', $this->localizeScript());
|
322 |
+
wp_localize_script('wpms-seokeyword-metabox', 'wpmseoMetaboxL10n', $this->localizeScript());
|
323 |
$localize = $this->localizeSettingsScript();
|
324 |
wp_localize_script('mwpseo-admin-media', 'wpmseoMediaL10n', $localize);
|
325 |
wp_localize_script('metaseo-cliffpyles', 'wpmscliffpyles', $localize);
|
379 |
if ((!is_object($post) || !isset($post->post_type))) {
|
380 |
return array();
|
381 |
}
|
382 |
+
$settings = get_option('_metaseo_settings');
|
383 |
self::$meta_length_reason = apply_filters('wpmseo_desc_length_reason', self::$meta_length_reason, $post);
|
384 |
self::$meta_length = apply_filters('wpmseo_desc_length', self::$meta_length, $post);
|
385 |
+
$title_template = '%title%';
|
386 |
|
387 |
$desc_template = '';
|
388 |
$sample_permalink = get_sample_permalink($post->ID);
|
389 |
$sample_permalink = str_replace('%page', '%post', $sample_permalink[0]);
|
390 |
|
391 |
$cached_replacement_vars = array();
|
392 |
+
if (!$settings || !isset($settings['metaseo_metatitle_tab'])) {
|
393 |
+
$settings['metaseo_metatitle_tab'] = 1;
|
394 |
+
}
|
395 |
$vars_to_cache = array(
|
396 |
'date' => wpmsRetrieveDate($post),
|
397 |
'id' => !(empty($post->ID)) ? $post->ID : null,
|
404 |
'currentday' => date_i18n('j'),
|
405 |
'currentmonth' => date_i18n('F'),
|
406 |
'currentyear' => date_i18n('Y'),
|
407 |
+
'metatitle_tab'=> (!empty($settings['metaseo_metatitle_tab']) ? '1' : '0')
|
408 |
);
|
409 |
|
410 |
foreach ($vars_to_cache as $var => $value) {
|
532 |
foreach ($this->getMetaFieldDefs('general', $post->post_type) as $key => $meta_field) {
|
533 |
$content .= $this->doMetaBox($meta_field, $key);
|
534 |
if ($key === 'title') {
|
535 |
+
$snippet_more = '%date%, %id%, %sitename%, %sitedesc%, %page%, %currenttime%, %currentdate%, %currentday%, %currentmonth%, %currentyear%';
|
536 |
+
$content .= '<p class="description" style="margin: 0 0 10px 32px;">'.sprintf(esc_html__('Title and description variables: %s', 'wp-meta-seo'), '%title%, <span onclick="jQuery(this).text(\''.$snippet_more.'\').removeClass(\'snippet-more\')" class="snippet-more">more...</span>').'</p>';
|
537 |
}
|
538 |
}
|
539 |
unset($key, $meta_field);
|
635 |
*/
|
636 |
public function pageAnalysis($post)
|
637 |
{
|
638 |
+
$seokeywords_result = get_post_meta($post->ID, 'wp_metaseo_seoscore', true);
|
639 |
$output = '';
|
640 |
$circliful = 0;
|
641 |
$output .= '<div class="wpms_width_100">';
|
642 |
+
$output .= '<div class="metaseo_left" style="margin-top: 25px;">
|
643 |
<div class="metaseo-progress-bar" data-post_id="' . esc_attr($post->ID) . '"><strong></strong></div>
|
644 |
<input type="hidden" id="progressController" value="' . esc_attr($circliful) . '" />
|
645 |
<input type="hidden" id="metaseo_alanysis_ok" value="' . esc_attr($this->perc_score) . '" />
|
646 |
</div>';
|
647 |
|
648 |
+
$output .= '<div class="metaseo_right" style="margin-top: 10px;">';
|
649 |
+
$output .= '<div class="panel-left" style="width: 50%; float: left"></div>';
|
650 |
+
$output .= '<div class="panel-right seokeyword-information" style="width: 50%; float: left"></div>';
|
651 |
+
$output .= '<div style="clear: both"></div>';
|
652 |
$output .= '</div>';
|
653 |
+
$output .= '<input type="hidden" id="wpmetaseo_seo_keywords_result" name="wpmetaseo_seo_keywords_result" value="'.(!empty($seokeywords_result) ? $seokeywords_result : 0).'" />';
|
654 |
$output .= '</div>';
|
655 |
return $output;
|
656 |
}
|
685 |
case 'snippetpreview':
|
686 |
$content .= $this->snippet();
|
687 |
break;
|
688 |
+
case 'specific_keywords':
|
689 |
+
$content .= '<input type="text" id="' . esc_attr($esc_form_key) . '" name="' . esc_attr($esc_form_key) . '" value="' . esc_attr($meta_value) . '" data-role="tagsinput" />';
|
690 |
+
break;
|
691 |
case 'metaseo_canonical':
|
692 |
$placeholder = ' placeholder="'.esc_html__('Put canonical URL in field', 'wp-meta-seo') . '"';
|
693 |
$ac = '';
|
785 |
|
786 |
$html = '<div class="'. esc_html($meta_field_def['classrow'] . ' wpms_left optimization-row-box') .'">';
|
787 |
$html .= '<label class="ju-setting-label wpms_width_100 wpms_left p-l-0">'. $label . $help .'</label>';
|
788 |
+
$html .= '<label class="wpms_width_100 label-input wpms_left p-t-20 snippet-preview">'. $content .'</label>';
|
789 |
if (isset($meta_field_def['description'])) {
|
790 |
if (!strpos($meta_field_def['class'], 'has-length') !== false) {
|
791 |
$html .= '<p class="description">' . $meta_field_def['description'] . '</p>';
|
inc/class.metaseo-snippet-preview.php
CHANGED
@@ -96,10 +96,9 @@ class WPMSEOSnippetPreview
|
|
96 |
*/
|
97 |
protected function setDate()
|
98 |
{
|
99 |
-
if (is_object($this->post)
|
100 |
-
&& $this->options['showdate-' . $this->post->post_type] === true) {
|
101 |
$date = $this->getPostDate();
|
102 |
-
$this->date = '<span class="date">' . esc_html($date) . '
|
103 |
}
|
104 |
}
|
105 |
|
@@ -163,13 +162,29 @@ class WPMSEOSnippetPreview
|
|
163 |
*/
|
164 |
protected function setContent()
|
165 |
{
|
|
|
|
|
|
|
|
|
|
|
166 |
$url = esc_url($this->url);
|
167 |
$url = str_replace('http://', '', $url);
|
168 |
// phpcs:disable WordPress.Security.EscapeOutput -- Content escaped before line 167
|
169 |
$content = '<div id="wpmseosnippet">
|
170 |
-
<a class="
|
171 |
-
<
|
172 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
</div>';
|
174 |
//phpcs:enable
|
175 |
$this->setContentThroughFilter($content);
|
96 |
*/
|
97 |
protected function setDate()
|
98 |
{
|
99 |
+
if (is_object($this->post)) {
|
|
|
100 |
$date = $this->getPostDate();
|
101 |
+
$this->date = '<span class="date">' . esc_html($date) . ' — </span>';
|
102 |
}
|
103 |
}
|
104 |
|
162 |
*/
|
163 |
protected function setContent()
|
164 |
{
|
165 |
+
$settings = get_option('_metaseo_settings');
|
166 |
+
if (!$settings || !isset($settings['metaseo_metatitle_tab'])) {
|
167 |
+
$settings['metaseo_metatitle_tab'] = 1;
|
168 |
+
}
|
169 |
+
$title_snippet = (!empty($settings['metaseo_metatitle_tab']) ? '%title%' : '');
|
170 |
$url = esc_url($this->url);
|
171 |
$url = str_replace('http://', '', $url);
|
172 |
// phpcs:disable WordPress.Security.EscapeOutput -- Content escaped before line 167
|
173 |
$content = '<div id="wpmseosnippet">
|
174 |
+
<a class="url m-t-10" style="width: 100%; padding-left: 12px; margin-bottom:5px">' . $url . '</a>
|
175 |
+
<div class="metabox-snippet-title">
|
176 |
+
<div class="container-snippet">
|
177 |
+
<span class="text">'.esc_html($this->title).'</span>
|
178 |
+
<input type="hidden" class="title input has-length metaseo_tool" id="metaseo_wpmseo_title" name="metaseo_wpmseo_title" value="' . esc_html(!empty($this->title) ? $this->title : $title_snippet) . '" />
|
179 |
+
<input class="title input has-length metaseo_tool" placeholder="'.esc_html__('Put your meta title here. Click here to edit...', 'wp-meta-seo').'" data-alt="'.esc_html__('This is your meta title that should be displayed in Google Search results for this page', 'wp-meta-seo').'" id="metaseo_snippet_title" value="" />
|
180 |
+
</div>
|
181 |
+
<span id="metaseo_wpmseo_title-length" class="length-box-meta"></span>
|
182 |
+
</div>
|
183 |
+
|
184 |
+
<div class="metabox-snippet-description">
|
185 |
+
<textarea class="desc has-length metaseo_wpmseo_snippet_desc metaseo_tool" placeholder="'.esc_html__('Put your meta description here. Click here to edit...', 'wp-meta-seo').'" data-alt="'.esc_html__('This is your meta description that should be displayed in Google Search results for this page', 'wp-meta-seo').'" id="metaseo_wpmseo_desc" name="metaseo_wpmseo_desc" style="resize: none;">' . esc_html($this->description) . '</textarea>
|
186 |
+
<span id="metaseo_wpmseo_desc-length" class="length-box-meta"></span>
|
187 |
+
</div>
|
188 |
</div>';
|
189 |
//phpcs:enable
|
190 |
$this->setContentThroughFilter($content);
|
inc/pages/content-meta.php
CHANGED
@@ -91,6 +91,13 @@ if (!empty($_REQUEST['_wp_http_referer'])) {
|
|
91 |
metaseo_update_pageindex(page_id, index);
|
92 |
});
|
93 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
$('.metaseo-metatitle').each(function () {
|
95 |
metaseo_titlelength(this.id, false);
|
96 |
metaseo_updateTitle(this.id, false);
|
91 |
metaseo_update_pageindex(page_id, index);
|
92 |
});
|
93 |
|
94 |
+
$('.metaseo-metatitle').on('keypress', function (event) {
|
95 |
+
if(event.keyCode == 13) {
|
96 |
+
event.preventDefault();
|
97 |
+
$(event.target).blur();
|
98 |
+
}
|
99 |
+
})
|
100 |
+
|
101 |
$('.metaseo-metatitle').each(function () {
|
102 |
metaseo_titlelength(this.id, false);
|
103 |
metaseo_updateTitle(this.id, false);
|
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.7
|
5 |
Tested up to: 5.6.0
|
6 |
-
Stable tag: 4.
|
7 |
Requires PHP: 5.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -259,6 +259,12 @@ Yes WP Meta SEO is compatible with Gutenberg editor since 3.7 version.
|
|
259 |
|
260 |
== Changelog ==
|
261 |
|
|
|
|
|
|
|
|
|
|
|
|
|
262 |
= 4.2.10 =
|
263 |
* Fix : Adding image alt not always working
|
264 |
|
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.7
|
5 |
Tested up to: 5.6.0
|
6 |
+
Stable tag: 4.3.0
|
7 |
Requires PHP: 5.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
259 |
|
260 |
== Changelog ==
|
261 |
|
262 |
+
= 4.3.0 =
|
263 |
+
* Add : New content meta editor with direct edition
|
264 |
+
* Add : New content meta editor on bulk meta editor
|
265 |
+
* Add : SEO keywords field on post/page edition
|
266 |
+
* Add : SEO score and keywords in posts list
|
267 |
+
|
268 |
= 4.2.10 =
|
269 |
* Fix : Adding image alt not always working
|
270 |
|
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.
|
8 |
* Text Domain: wp-meta-seo
|
9 |
* Domain Path: /languages
|
10 |
* Author: JoomUnited
|
@@ -132,7 +132,7 @@ if (!defined('WPMSEO_VERSION')) {
|
|
132 |
/**
|
133 |
* Plugin version
|
134 |
*/
|
135 |
-
define('WPMSEO_VERSION', '4.
|
136 |
}
|
137 |
|
138 |
if (!defined('WPMS_CLIENTID')) {
|
@@ -212,7 +212,6 @@ function wpmsGetDefaultSettings()
|
|
212 |
{
|
213 |
return array(
|
214 |
'home_meta_active' => 1,
|
215 |
-
'webpage_testid' => 0,
|
216 |
'metaseo_title_home' => '',
|
217 |
'metaseo_desc_home' => '',
|
218 |
'metaseo_showfacebook' => '',
|
@@ -229,7 +228,8 @@ function wpmsGetDefaultSettings()
|
|
229 |
'metaseo_index' => 0,
|
230 |
'metaseo_overridemeta' => 1,
|
231 |
'metaseo_canonical' => 0,
|
232 |
-
'metaseo_removecatprefix' => 0
|
|
|
233 |
);
|
234 |
}
|
235 |
|
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.3.0
|
8 |
* Text Domain: wp-meta-seo
|
9 |
* Domain Path: /languages
|
10 |
* Author: JoomUnited
|
132 |
/**
|
133 |
* Plugin version
|
134 |
*/
|
135 |
+
define('WPMSEO_VERSION', '4.3.0');
|
136 |
}
|
137 |
|
138 |
if (!defined('WPMS_CLIENTID')) {
|
212 |
{
|
213 |
return array(
|
214 |
'home_meta_active' => 1,
|
|
|
215 |
'metaseo_title_home' => '',
|
216 |
'metaseo_desc_home' => '',
|
217 |
'metaseo_showfacebook' => '',
|
228 |
'metaseo_index' => 0,
|
229 |
'metaseo_overridemeta' => 1,
|
230 |
'metaseo_canonical' => 0,
|
231 |
+
'metaseo_removecatprefix' => 0,
|
232 |
+
'metaseo_specific_keywords' => ''
|
233 |
);
|
234 |
}
|
235 |
|