Version Description
- Add : If an image information are filled, add it by default if empty if image is re-used
- Add : Compatibility with WPML, Polylang for meta edition and Media SEO content
- Add : Possibility to edit meta information on categories
- Add : Pro version notifications of features in some views
- Add : Dashboard widget with 6 SEO criteria
- Fix : Change the 404 error page title to remove the plugin name by default
Download this release
Release Info
Developer | JoomUnited |
Plugin | WP Meta SEO |
Version | 3.3.0 |
Comparing to | |
See all releases |
Code changes from version 3.2.6 to 3.3.0
- css/category_field.css +25 -0
- css/dashboard_widgets.css +102 -0
- css/metaseo_admin.css +2 -2
- css/notification.css +111 -0
- inc/class.metaseo-admin.php +140 -8
- inc/class.metaseo-content-list-table.php +1 -1
- inc/class.metaseo-dashboard.php +23 -0
- inc/class.metaseo-image-list-table.php +96 -19
- inc/class.wp-metaseo.php +18 -13
- inc/pages/dashboard.php +27 -0
- inc/pages/dashboard_widgets.php +185 -0
- inc/pages/link-meta.php +6 -0
- inc/pages/metaseo-broken-link.php +6 -0
- inc/pages/notification.php +27 -0
- inc/pages/sitemaps/metaseo-google-sitemap.php +8 -1
- js/category_field.js +81 -0
- js/dashboard_widgets.js +160 -0
- js/metaseo_admin.js +20 -8
- js/notification.js +20 -0
- languages/wp-meta-seo-en_US.mo +0 -0
- readme.txt +21 -12
- wp-meta-seo.php +25 -5
css/category_field.css
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.cat-title-len , .cat-desc-len {
|
2 |
+
background: none repeat scroll 0% 0% #7ad03a;
|
3 |
+
color: #FFF;
|
4 |
+
border-radius: 2px;
|
5 |
+
min-width: 15px;
|
6 |
+
text-align: center;
|
7 |
+
float: left;
|
8 |
+
padding: 0px 10px;
|
9 |
+
position: relative;
|
10 |
+
bottom: 12px;
|
11 |
+
left: 15px;
|
12 |
+
}
|
13 |
+
|
14 |
+
.length-wrong {
|
15 |
+
background: none repeat scroll 0% 0% #FFCC00;
|
16 |
+
}
|
17 |
+
|
18 |
+
.wpms_custom_cat_field{
|
19 |
+
float: left;
|
20 |
+
}
|
21 |
+
|
22 |
+
.metaseo-qtip {
|
23 |
+
font-size: 14px !important;
|
24 |
+
line-height: 18px !important;
|
25 |
+
}
|
css/dashboard_widgets.css
ADDED
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.wpms_dashboard_widgets h1 {
|
2 |
+
padding: 10px 0px 10px 20px
|
3 |
+
}
|
4 |
+
|
5 |
+
.wpms_dash_widgets{
|
6 |
+
margin: 7px 0px;
|
7 |
+
}
|
8 |
+
|
9 |
+
.wpms_dash_widgets .percent_1{
|
10 |
+
font-size: 21px !important;
|
11 |
+
}
|
12 |
+
|
13 |
+
.wpms_dashboard_widgets_left{
|
14 |
+
width: 45%;
|
15 |
+
float: left;
|
16 |
+
}
|
17 |
+
|
18 |
+
.wpms_dashboard_widgets_right{
|
19 |
+
width: 47%;
|
20 |
+
float: left;
|
21 |
+
}
|
22 |
+
|
23 |
+
.wpms_dashboard_widgets_left{
|
24 |
+
padding: 10px;
|
25 |
+
}
|
26 |
+
/*progress*/
|
27 |
+
.wpms_dashboard_widgets .progress-rating {
|
28 |
+
position: relative;
|
29 |
+
height: 6px;
|
30 |
+
display: block;
|
31 |
+
width: 100%;
|
32 |
+
border-radius: 2px;
|
33 |
+
margin: 46px 0px;
|
34 |
+
overflow: hidden;
|
35 |
+
background-color: rgba(255, 255, 255, 0.33);
|
36 |
+
float: left;
|
37 |
+
}
|
38 |
+
|
39 |
+
.wpms_dashboard_widgets .progress-rating .determinate {
|
40 |
+
position: absolute;
|
41 |
+
background-color: inherit;
|
42 |
+
top: 0;
|
43 |
+
left: 0;
|
44 |
+
bottom: 0;
|
45 |
+
background-color: #fff;
|
46 |
+
-webkit-transition: width 0.3s linear;
|
47 |
+
-moz-transition: width 0.3s linear;
|
48 |
+
-o-transition: width 0.3s linear;
|
49 |
+
-ms-transition: width 0.3s linear;
|
50 |
+
transition: width 0.3s linear;
|
51 |
+
}
|
52 |
+
|
53 |
+
.wpms_dashboard_widgets .progress {
|
54 |
+
position: relative;
|
55 |
+
height: 5px;
|
56 |
+
display: block;
|
57 |
+
width: 100%;
|
58 |
+
background-color: #fff;
|
59 |
+
border-radius: 2px;
|
60 |
+
margin: 0.5rem 0 1rem 0;
|
61 |
+
overflow: hidden;
|
62 |
+
}
|
63 |
+
|
64 |
+
.wpms_dashboard_widgets .dashboard-title {
|
65 |
+
color: #fff !important;
|
66 |
+
}
|
67 |
+
|
68 |
+
.wpms_dashboard_widgets p.dashboard-title {
|
69 |
+
font-size: 10px !important;
|
70 |
+
}
|
71 |
+
|
72 |
+
.wpms_dashboard_widgets .dashboard-card {
|
73 |
+
background: #00AFF5;
|
74 |
+
}
|
75 |
+
|
76 |
+
.wpms_dashboard_widgets h4 {
|
77 |
+
font-weight: normal !important;
|
78 |
+
}
|
79 |
+
|
80 |
+
.wpms_dashboard_widgets .panel {
|
81 |
+
min-height: 95px !important;
|
82 |
+
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
|
83 |
+
}
|
84 |
+
|
85 |
+
#dashboard-widgets h3, #dashboard-widgets h4, #dashboard_quick_press .drafts h2 {
|
86 |
+
margin: 0 12px 3px;
|
87 |
+
}
|
88 |
+
|
89 |
+
.wpms-widgets-qtip {
|
90 |
+
border: 1px solid #707070;
|
91 |
+
color: #fff;
|
92 |
+
background-color: #707070;
|
93 |
+
z-index: 10000;
|
94 |
+
border-radius: 2px;
|
95 |
+
line-height: 100%;
|
96 |
+
font-size: 12px !important;
|
97 |
+
line-height: 18px !important;
|
98 |
+
}
|
99 |
+
|
100 |
+
.wpms-widgets-qtip .qtip-tip{
|
101 |
+
opacity: 0 !important;
|
102 |
+
}
|
css/metaseo_admin.css
CHANGED
@@ -496,12 +496,12 @@ strong {
|
|
496 |
display: block;
|
497 |
}
|
498 |
|
499 |
-
.content-box{
|
500 |
padding: 10px;
|
501 |
display: none;
|
502 |
}
|
503 |
|
504 |
-
.content-wpms-global{
|
505 |
display: block;
|
506 |
}
|
507 |
|
496 |
display: block;
|
497 |
}
|
498 |
|
499 |
+
.wrap_wpms_settings .content-box{
|
500 |
padding: 10px;
|
501 |
display: none;
|
502 |
}
|
503 |
|
504 |
+
.content-box.content-wpms-global{
|
505 |
display: block;
|
506 |
}
|
507 |
|
css/notification.css
ADDED
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* dashboard */
|
2 |
+
.toplevel_page_metaseo_dashboard .wpms_dashboard_notification{
|
3 |
+
width: 75%;
|
4 |
+
margin: 0px auto;
|
5 |
+
padding: 0px 10px;
|
6 |
+
}
|
7 |
+
|
8 |
+
.toplevel_page_metaseo_dashboard .wpms_dashboard_notification h1 {
|
9 |
+
padding: 10px 0px 10px 20px
|
10 |
+
}
|
11 |
+
|
12 |
+
.toplevel_page_metaseo_dashboard .wpms_dashboard_notification .dashboard_noti_title {
|
13 |
+
font-weight: 100;
|
14 |
+
width: 100%;
|
15 |
+
font-size: 22px;
|
16 |
+
color: #fff;
|
17 |
+
margin: 10px 0px 15px 0px;
|
18 |
+
}
|
19 |
+
|
20 |
+
.toplevel_page_metaseo_dashboard .wpms_dashboard_notification .msg{
|
21 |
+
font-size: 14px !important;
|
22 |
+
margin: 10px 0px 30px 0px;
|
23 |
+
float: left;
|
24 |
+
}
|
25 |
+
|
26 |
+
.toplevel_page_metaseo_dashboard .wpms_dashboard_widgets_content{
|
27 |
+
width: 100%;
|
28 |
+
float: left;
|
29 |
+
}
|
30 |
+
|
31 |
+
.toplevel_page_metaseo_dashboard .wpms_dashboard_notification .dashboard-title {
|
32 |
+
color: #fff !important;
|
33 |
+
}
|
34 |
+
|
35 |
+
.toplevel_page_metaseo_dashboard .wpms_dashboard_notification .wpmsclose_notification {
|
36 |
+
font-size: 16px !important;
|
37 |
+
font-weight: 100;
|
38 |
+
cursor: pointer;
|
39 |
+
}
|
40 |
+
|
41 |
+
.toplevel_page_metaseo_dashboard .wpms_dashboard_notification .dashboard-card {
|
42 |
+
background: #00AFF5;
|
43 |
+
}
|
44 |
+
|
45 |
+
.toplevel_page_metaseo_dashboard .wpms_dashboard_notification .panel {
|
46 |
+
min-height: 95px !important;
|
47 |
+
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
|
48 |
+
}
|
49 |
+
|
50 |
+
/* Sitemap */
|
51 |
+
.wpms_notification{
|
52 |
+
width: 99%;
|
53 |
+
margin: 0px auto;
|
54 |
+
float: left;
|
55 |
+
margin-top: 10px;
|
56 |
+
}
|
57 |
+
|
58 |
+
.wpms_notification h1 {
|
59 |
+
padding: 10px 0px 10px 20px
|
60 |
+
}
|
61 |
+
|
62 |
+
.wpms_notification .dashboard_noti_title {
|
63 |
+
font-weight: 100;
|
64 |
+
width: 100%;
|
65 |
+
font-size: 22px;
|
66 |
+
color: #fff;
|
67 |
+
margin: 10px 0px 15px 0px;
|
68 |
+
float: left;
|
69 |
+
}
|
70 |
+
|
71 |
+
.wpms_notification .msg{
|
72 |
+
font-size: 14px !important;
|
73 |
+
width: 100%;
|
74 |
+
}
|
75 |
+
|
76 |
+
.wpms_notification .wpms_dashboard_widgets_content{
|
77 |
+
width: 100%;
|
78 |
+
float: left;
|
79 |
+
margin: 10px;
|
80 |
+
}
|
81 |
+
|
82 |
+
.wpms_notification .dashboard-title {
|
83 |
+
color: #fff !important;
|
84 |
+
}
|
85 |
+
|
86 |
+
.wpms_notification .wpmsclose_notification {
|
87 |
+
font-size: 16px !important;
|
88 |
+
font-weight: 100;
|
89 |
+
cursor: pointer;
|
90 |
+
}
|
91 |
+
|
92 |
+
.wpms_notification .dashboard-card {
|
93 |
+
background: #00AFF5;
|
94 |
+
}
|
95 |
+
|
96 |
+
.wpms_notification .panel {
|
97 |
+
min-height: 140px !important;
|
98 |
+
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
|
99 |
+
}
|
100 |
+
|
101 |
+
.more-info{
|
102 |
+
float: left;
|
103 |
+
color: #fff !important;
|
104 |
+
font-size: 16px !important;
|
105 |
+
margin-right: 20px;
|
106 |
+
text-decoration: none;
|
107 |
+
}
|
108 |
+
|
109 |
+
.more-info:hover{
|
110 |
+
color: #fff;
|
111 |
+
}
|
inc/class.metaseo-admin.php
CHANGED
@@ -31,7 +31,8 @@ class MetaSeo_Admin {
|
|
31 |
"metaseo_linkfield" => 1,
|
32 |
"metaseo_metatitle_tab" => 0,
|
33 |
"metaseo_follow" => 0,
|
34 |
-
"metaseo_index" => 0
|
|
|
35 |
);
|
36 |
$settings = get_option('_metaseo_settings');
|
37 |
|
@@ -106,6 +107,84 @@ class MetaSeo_Admin {
|
|
106 |
|
107 |
add_action( 'wp_head', array( 'MetaSeo_Google_Analytics', 'tracking_code' ), 99 );
|
108 |
add_action('admin_footer', array($this, 'add_editor_footer'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
}
|
110 |
|
111 |
public function add_editor_footer() {
|
@@ -120,9 +199,8 @@ class MetaSeo_Admin {
|
|
120 |
*/
|
121 |
function metaseo_create_db() {
|
122 |
global $wpdb;
|
123 |
-
$option_v = '
|
124 |
$db_installed = get_option($option_v, false);
|
125 |
-
|
126 |
if (!$db_installed) {
|
127 |
// create table wpms_links
|
128 |
$sql = "CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}wpms_links`(
|
@@ -173,9 +251,9 @@ class MetaSeo_Admin {
|
|
173 |
}
|
174 |
|
175 |
// create page 404
|
176 |
-
$sql = $wpdb->prepare("SELECT
|
177 |
-
$post_if = $wpdb->
|
178 |
-
if ($post_if
|
179 |
$content = '<div class="wall" style="background-color: #F2F3F7; border: 30px solid #fff; width: 90%; height: 90%; margin: 0 auto;">
|
180 |
|
181 |
<h1 style="text-align: center; font-family:\'open-sans\', arial; color: #444; font-size: 60px; padding: 50px;">ERROR 404 <br />-<br />NOT FOUND</h1>
|
@@ -186,13 +264,20 @@ class MetaSeo_Admin {
|
|
186 |
<p style="text-align: center;"><a style=" font-family:\'open-sans\', arial; color: #444; font-size: 20px; padding: 20px; line-height: 30px; text-decoration: none;" href="' . get_home_url() . '"><< Go back to home page >></a></p>
|
187 |
</div>';
|
188 |
$_page404 = array(
|
189 |
-
'post_title' => '
|
190 |
'post_content' => $content,
|
191 |
'post_status' => 'publish',
|
192 |
'post_excerpt' => 'metaseo_404_page',
|
193 |
'post_type' => 'page',
|
194 |
);
|
195 |
wp_insert_post($_page404);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
}
|
197 |
|
198 |
$sql = $wpdb->prepare("SELECT COUNT(*) FROM " . $wpdb->prefix . "posts WHERE post_title = %s AND post_excerpt = %s AND post_type = %s", array("WPMS HTML Sitemap", "metaseo_html_sitemap", "page"));
|
@@ -779,6 +864,7 @@ class MetaSeo_Admin {
|
|
779 |
add_settings_field('metaseo_linkfield', __('Link text field', 'wp-meta-seo'), array($this, 'showlinkfield'), 'metaseo_settings', 'metaseo_dashboard', array('label_for' => __('Add the link title field in the text editor and in the bulk link edition view', 'wp-meta-seo')));
|
780 |
add_settings_field('metaseo_follow', __('Post/Page follow', 'wp-meta-seo'), array($this, 'showfollow'), 'metaseo_settings', 'metaseo_dashboard', array('label_for' => __('Add an option to setup Follow/Nofollow instruction for each content', 'wp-meta-seo')));
|
781 |
add_settings_field('metaseo_index', __('Post/Page index', 'wp-meta-seo'), array($this, 'showindex'), 'metaseo_settings', 'metaseo_dashboard', array('label_for' => __('Add an option to say to search engine: hey! Do not index this content', 'wp-meta-seo')));
|
|
|
782 |
}
|
783 |
|
784 |
/*
|
@@ -889,6 +975,17 @@ class MetaSeo_Admin {
|
|
889 |
<?php
|
890 |
}
|
891 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
892 |
/*
|
893 |
* Display showfacebook input
|
894 |
*/
|
@@ -1031,6 +1128,20 @@ class MetaSeo_Admin {
|
|
1031 |
wp_enqueue_style('m-font-awesome', plugins_url('css/font-awesome.css', dirname(__FILE__)), array(), WPMSEO_VERSION);
|
1032 |
}
|
1033 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1034 |
wp_register_style('m-style-qtip', plugins_url('css/jquery.qtip.css', dirname(__FILE__)), array(), WPMSEO_VERSION);
|
1035 |
wp_register_script('jquery-qtip', plugins_url('js/jquery.qtip.min.js', dirname(__FILE__)), array('jquery'), '2.2.1', true);
|
1036 |
wp_register_script('wpms-broken-link', plugins_url('js/wpms-broken-link.js', dirname(__FILE__)), array('jquery'), WPMSEO_VERSION, true);
|
@@ -1128,7 +1239,12 @@ class MetaSeo_Admin {
|
|
1128 |
}
|
1129 |
|
1130 |
// in JavaScript, object properties are accessed as ajax_object.ajax_url, ajax_object.we_value
|
1131 |
-
wp_localize_script('wpmetaseoAdmin', '
|
|
|
|
|
|
|
|
|
|
|
1132 |
}
|
1133 |
|
1134 |
/**
|
@@ -1472,6 +1588,10 @@ class MetaSeo_Admin {
|
|
1472 |
}
|
1473 |
}
|
1474 |
}
|
|
|
|
|
|
|
|
|
1475 |
break;
|
1476 |
case 'metaseo_google_sitemap':
|
1477 |
if (!class_exists('MetaSeo_Content_List_Table')) {
|
@@ -1741,6 +1861,17 @@ class MetaSeo_Admin {
|
|
1741 |
wp_send_json(false);
|
1742 |
}
|
1743 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1744 |
|
1745 |
/*
|
1746 |
* Add ajax
|
@@ -1783,5 +1914,6 @@ class MetaSeo_Admin {
|
|
1783 |
add_action('wp_ajax_wpms_dash_metatitle', array('MetaSeo_Dashboard', 'wpms_dash_metatitle'));
|
1784 |
add_action('wp_ajax_wpms_dash_metadesc', array('MetaSeo_Dashboard', 'wpms_dash_metadesc'));
|
1785 |
add_action('wp_ajax_wpms_dash_imgsmeta', array('MetaSeo_Dashboard', 'wpms_dash_imgsmeta'));
|
|
|
1786 |
}
|
1787 |
}
|
31 |
"metaseo_linkfield" => 1,
|
32 |
"metaseo_metatitle_tab" => 0,
|
33 |
"metaseo_follow" => 0,
|
34 |
+
"metaseo_index" => 0,
|
35 |
+
"metaseo_overridemeta" => 1
|
36 |
);
|
37 |
$settings = get_option('_metaseo_settings');
|
38 |
|
107 |
|
108 |
add_action( 'wp_head', array( 'MetaSeo_Google_Analytics', 'tracking_code' ), 99 );
|
109 |
add_action('admin_footer', array($this, 'add_editor_footer'));
|
110 |
+
add_action('wp_dashboard_setup', array($this,'wpms_add_dashboard_widgets') );
|
111 |
+
add_action( 'category_add_form_fields', array($this,'wpms_category_add_new_meta_field'), 10, 2 );
|
112 |
+
add_action ('edit_category_form_fields', array($this,'wpms_category_fields'));
|
113 |
+
add_action( 'edited_category', array($this,'wpms_save_category_custom_meta'), 10, 2 );
|
114 |
+
add_action( 'create_category', array($this,'wpms_save_category_custom_meta'), 10, 2 );
|
115 |
+
}
|
116 |
+
|
117 |
+
public function wpms_category_add_new_meta_field() {
|
118 |
+
wp_enqueue_style('m-style-qtip', plugins_url('css/jquery.qtip.css', dirname(__FILE__)), array(), WPMSEO_VERSION);
|
119 |
+
wp_enqueue_script('jquery-qtip', plugins_url('js/jquery.qtip.min.js', dirname(__FILE__)), array('jquery'), '2.2.1', true);
|
120 |
+
wp_enqueue_style('wpms-category-field');
|
121 |
+
wp_enqueue_script('wpms-category-field');
|
122 |
+
// this will add the custom meta field to the add new term page
|
123 |
+
?>
|
124 |
+
<div class="form-field">
|
125 |
+
<label class="wpms_custom_cat_field" alt="<?php _e('This is the title of your content that may be displayed in search engine results (meta title). By default it’s the content title (page title, post title…). 69 characters max allowed.','wp-meta-seo') ?>"><?php _e('Search engine title','wp-meta-seo'); ?></label>
|
126 |
+
<textarea name="wpms_category_metatitle" class="wpms_category_metatitle"></textarea><br />
|
127 |
+
<div class="cat-title-len"><?php echo WPMS_CAT_METATITLE_LENGTH; ?></div>
|
128 |
+
</div>
|
129 |
+
<div class="form-field" style="margin-top: 20px;margin-bottom: 20px;">
|
130 |
+
<label for="extra1" class="wpms_custom_cat_field" alt="<?php _e('This is the title of your content that may be displayed in search engine results (meta title). By default it’s the content title (page title, post title…). 69 characters max allowed.','wp-meta-seo') ?>"><?php _e('Search engine description','wp-meta-seo'); ?></label>
|
131 |
+
<textarea name="wpms_category_metadesc" class="wpms_category_metadesc"></textarea><br />
|
132 |
+
<div class="cat-desc-len"><?php echo WPMS_CAT_METADESC_LENGTH; ?></div>
|
133 |
+
</div>
|
134 |
+
<?php
|
135 |
+
}
|
136 |
+
|
137 |
+
public function wpms_save_category_custom_meta( $term_id ) {
|
138 |
+
if ( isset( $_POST['wpms_category_metatitle'] ) ) {
|
139 |
+
update_term_meta( $term_id, 'wpms_category_metatitle' , $_POST['wpms_category_metatitle']);
|
140 |
+
}
|
141 |
+
|
142 |
+
if ( isset( $_POST['wpms_category_metadesc'] ) ) {
|
143 |
+
update_term_meta( $term_id, 'wpms_category_metadesc' , $_POST['wpms_category_metadesc']);
|
144 |
+
}
|
145 |
+
}
|
146 |
+
|
147 |
+
//add extra fields to category edit form callback function
|
148 |
+
public function wpms_category_fields( $tag ) {
|
149 |
+
wp_enqueue_style('m-style-qtip', plugins_url('css/jquery.qtip.css', dirname(__FILE__)), array(), WPMSEO_VERSION);
|
150 |
+
wp_enqueue_script('jquery-qtip', plugins_url('js/jquery.qtip.min.js', dirname(__FILE__)), array('jquery'), '2.2.1', true);
|
151 |
+
wp_enqueue_style('wpms-category-field');
|
152 |
+
wp_enqueue_script('wpms-category-field');
|
153 |
+
$t_id = $tag->term_id;
|
154 |
+
$cat_metatitle = get_term_meta($t_id,'wpms_category_metatitle',true);
|
155 |
+
$cat_metadesc = get_term_meta($t_id,'wpms_category_metadesc',true);
|
156 |
+
?>
|
157 |
+
<tr class="form-field">
|
158 |
+
<th scope="row" valign="top"><label class="wpms_custom_cat_field" alt="<?php _e('This is the title of your content that may be displayed in search engine results (meta title). By default it’s the content title (page title, post title…). 69 characters max allowed.','wp-meta-seo') ?>"><?php _e('Search engine title','wp-meta-seo'); ?></label></th>
|
159 |
+
<td>
|
160 |
+
<textarea name="wpms_category_metatitle" class="wpms_category_metatitle"><?php echo $cat_metatitle ? $cat_metatitle : ''; ?></textarea><br />
|
161 |
+
<div class="cat-title-len"><?php echo $cat_metatitle ? WPMS_CAT_METATITLE_LENGTH-strlen($cat_metatitle) : WPMS_CAT_METATITLE_LENGTH; ?></div>
|
162 |
+
</td>
|
163 |
+
</tr>
|
164 |
+
<tr class="form-field">
|
165 |
+
<th scope="row" valign="top"><label for="extra1" class="wpms_custom_cat_field" alt="<?php _e('This is the title of your content that may be displayed in search engine results (meta title). By default it’s the content title (page title, post title…). 69 characters max allowed.','wp-meta-seo') ?>"><?php _e('Search engine description','wp-meta-seo'); ?></label></th>
|
166 |
+
<td>
|
167 |
+
<textarea name="wpms_category_metadesc" class="wpms_category_metadesc"><?php echo $cat_metadesc ? WPMS_CAT_METADESC_LENGTH-strlen($cat_metatitle) : WPMS_CAT_METADESC_LENGTH; ?></textarea><br />
|
168 |
+
<div class="cat-desc-len">156</div>
|
169 |
+
</td>
|
170 |
+
</tr>
|
171 |
+
<?php
|
172 |
+
}
|
173 |
+
|
174 |
+
// Function that outputs the contents of the dashboard widget
|
175 |
+
public function wpms_dashboard_widget( $post, $callback_args ) {
|
176 |
+
wp_enqueue_style('m-style-qtip', plugins_url('css/jquery.qtip.css', dirname(__FILE__)), array(), WPMSEO_VERSION);
|
177 |
+
wp_enqueue_script('jquery-qtip', plugins_url('js/jquery.qtip.min.js', dirname(__FILE__)), array('jquery'), '2.2.1', true);
|
178 |
+
wp_enqueue_style('wpms-dashboard-widgets');
|
179 |
+
wp_enqueue_script('wpms-dashboard-widgets', plugins_url('js/dashboard_widgets.js', dirname(__FILE__)), array('jquery'), WPMSEO_VERSION);
|
180 |
+
$error_404 = MetaSeo_Dashboard::get_404_link();
|
181 |
+
require_once ( WPMETASEO_PLUGIN_DIR . 'inc/pages/dashboard_widgets.php' );
|
182 |
+
}
|
183 |
+
|
184 |
+
// Function used in the action hook
|
185 |
+
public function wpms_add_dashboard_widgets() {
|
186 |
+
|
187 |
+
wp_add_dashboard_widget('wpms_dashboard_widget', __('WP Meta SEO: Quick SEO preview','wp-meta-seo'), array($this,'wpms_dashboard_widget'));
|
188 |
}
|
189 |
|
190 |
public function add_editor_footer() {
|
199 |
*/
|
200 |
function metaseo_create_db() {
|
201 |
global $wpdb;
|
202 |
+
$option_v = 'metaseo_db_version3.3.0';
|
203 |
$db_installed = get_option($option_v, false);
|
|
|
204 |
if (!$db_installed) {
|
205 |
// create table wpms_links
|
206 |
$sql = "CREATE TABLE IF NOT EXISTS `{$wpdb->prefix}wpms_links`(
|
251 |
}
|
252 |
|
253 |
// create page 404
|
254 |
+
$sql = $wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "posts WHERE post_title = %s AND post_excerpt = %s AND post_type = %s", array("WP Meta SEO 404 Page", "metaseo_404_page", "page"));
|
255 |
+
$post_if = $wpdb->get_results($sql);
|
256 |
+
if (empty($post_if)) {
|
257 |
$content = '<div class="wall" style="background-color: #F2F3F7; border: 30px solid #fff; width: 90%; height: 90%; margin: 0 auto;">
|
258 |
|
259 |
<h1 style="text-align: center; font-family:\'open-sans\', arial; color: #444; font-size: 60px; padding: 50px;">ERROR 404 <br />-<br />NOT FOUND</h1>
|
264 |
<p style="text-align: center;"><a style=" font-family:\'open-sans\', arial; color: #444; font-size: 20px; padding: 20px; line-height: 30px; text-decoration: none;" href="' . get_home_url() . '"><< Go back to home page >></a></p>
|
265 |
</div>';
|
266 |
$_page404 = array(
|
267 |
+
'post_title' => '404 error page',
|
268 |
'post_content' => $content,
|
269 |
'post_status' => 'publish',
|
270 |
'post_excerpt' => 'metaseo_404_page',
|
271 |
'post_type' => 'page',
|
272 |
);
|
273 |
wp_insert_post($_page404);
|
274 |
+
}else{
|
275 |
+
$my_post = array(
|
276 |
+
'ID' => $post_if[0]->ID,
|
277 |
+
'post_title' => '404 error page'
|
278 |
+
);
|
279 |
+
|
280 |
+
wp_update_post( $my_post );
|
281 |
}
|
282 |
|
283 |
$sql = $wpdb->prepare("SELECT COUNT(*) FROM " . $wpdb->prefix . "posts WHERE post_title = %s AND post_excerpt = %s AND post_type = %s", array("WPMS HTML Sitemap", "metaseo_html_sitemap", "page"));
|
864 |
add_settings_field('metaseo_linkfield', __('Link text field', 'wp-meta-seo'), array($this, 'showlinkfield'), 'metaseo_settings', 'metaseo_dashboard', array('label_for' => __('Add the link title field in the text editor and in the bulk link edition view', 'wp-meta-seo')));
|
865 |
add_settings_field('metaseo_follow', __('Post/Page follow', 'wp-meta-seo'), array($this, 'showfollow'), 'metaseo_settings', 'metaseo_dashboard', array('label_for' => __('Add an option to setup Follow/Nofollow instruction for each content', 'wp-meta-seo')));
|
866 |
add_settings_field('metaseo_index', __('Post/Page index', 'wp-meta-seo'), array($this, 'showindex'), 'metaseo_settings', 'metaseo_dashboard', array('label_for' => __('Add an option to say to search engine: hey! Do not index this content', 'wp-meta-seo')));
|
867 |
+
add_settings_field('metaseo_overridemeta', __('Auto override Meta', 'wp-meta-seo'), array($this, 'showoverridemeta'), 'metaseo_settings', 'metaseo_dashboard', array('label_for' => __('Auto override image meta in post content when update meta', 'wp-meta-seo')));
|
868 |
}
|
869 |
|
870 |
/*
|
975 |
<?php
|
976 |
}
|
977 |
|
978 |
+
/*
|
979 |
+
* Display override meta
|
980 |
+
*/
|
981 |
+
public function showoverridemeta() {
|
982 |
+
echo '<input name="_metaseo_settings[metaseo_overridemeta]" type="hidden" value="0"/>';
|
983 |
+
?>
|
984 |
+
<label><input name="_metaseo_settings[metaseo_overridemeta]" type="checkbox" id="metaseo_overridemeta" value="1" <?php checked(1, $this->settings['metaseo_overridemeta']); ?> />
|
985 |
+
<?php _e("Override meta image in post content when update meta", "wp-meta-seo"); ?></label>
|
986 |
+
<?php
|
987 |
+
}
|
988 |
+
|
989 |
/*
|
990 |
* Display showfacebook input
|
991 |
*/
|
1128 |
wp_enqueue_style('m-font-awesome', plugins_url('css/font-awesome.css', dirname(__FILE__)), array(), WPMSEO_VERSION);
|
1129 |
}
|
1130 |
|
1131 |
+
$lists_pages = array(
|
1132 |
+
'toplevel_page_metaseo_dashboard',
|
1133 |
+
'wp-meta-seo_page_metaseo_google_sitemap',
|
1134 |
+
'wp-meta-seo_page_metaseo_link_meta',
|
1135 |
+
'wp-meta-seo_page_metaseo_broken_link',
|
1136 |
+
'wp-meta-seo_page_metaseo_google_analytics');
|
1137 |
+
if(in_array($current_screen->base,$lists_pages)){
|
1138 |
+
wp_enqueue_style('wpms_notification_style', plugins_url('css/notification.css', dirname(__FILE__)), array(), WPMSEO_VERSION);
|
1139 |
+
wp_enqueue_script('wpms_notification_script', plugins_url('js/notification.js', dirname(__FILE__)), array(), WPMSEO_VERSION);
|
1140 |
+
}
|
1141 |
+
|
1142 |
+
wp_register_style('wpms-dashboard-widgets', plugins_url('css/dashboard_widgets.css', dirname(__FILE__)), null, WPMSEO_VERSION);
|
1143 |
+
wp_register_style('wpms-category-field', plugins_url('css/category_field.css', dirname(__FILE__)), null, WPMSEO_VERSION);
|
1144 |
+
wp_register_script('wpms-category-field', plugins_url('js/category_field.js', dirname(__FILE__)), array('jquery'), WPMSEO_VERSION, true);
|
1145 |
wp_register_style('m-style-qtip', plugins_url('css/jquery.qtip.css', dirname(__FILE__)), array(), WPMSEO_VERSION);
|
1146 |
wp_register_script('jquery-qtip', plugins_url('js/jquery.qtip.min.js', dirname(__FILE__)), array('jquery'), '2.2.1', true);
|
1147 |
wp_register_script('wpms-broken-link', plugins_url('js/wpms-broken-link.js', dirname(__FILE__)), array('jquery'), WPMSEO_VERSION, true);
|
1239 |
}
|
1240 |
|
1241 |
// in JavaScript, object properties are accessed as ajax_object.ajax_url, ajax_object.we_value
|
1242 |
+
wp_localize_script('wpmetaseoAdmin', 'wpms_localize', array(
|
1243 |
+
'ajax_url' => admin_url('admin-ajax.php'),
|
1244 |
+
'settings' => $this->settings,
|
1245 |
+
'wpms_cat_metatitle_length' => WPMS_CAT_METATITLE_LENGTH,
|
1246 |
+
'wpms_cat_metadesc_length' => WPMS_CAT_METADESC_LENGTH
|
1247 |
+
));
|
1248 |
}
|
1249 |
|
1250 |
/**
|
1588 |
}
|
1589 |
}
|
1590 |
}
|
1591 |
+
$w = '99%';
|
1592 |
+
$text = __('Bring your WordPress website SEO to the next level with the PRO Addon: Email Report, Google Search Console Connect, Automatic Redirect, Advanced Sitemaps and more!','wp-meta-seo');
|
1593 |
+
$class_btn_close = 'close_gga';
|
1594 |
+
require_once( WPMETASEO_PLUGIN_DIR . 'inc/pages/notification.php' );
|
1595 |
break;
|
1596 |
case 'metaseo_google_sitemap':
|
1597 |
if (!class_exists('MetaSeo_Content_List_Table')) {
|
1861 |
wp_send_json(false);
|
1862 |
}
|
1863 |
}
|
1864 |
+
|
1865 |
+
/**
|
1866 |
+
* set cookie notification
|
1867 |
+
*/
|
1868 |
+
public function wpms_setcookie_notification(){
|
1869 |
+
if(isset($_POST['page'])){
|
1870 |
+
setcookie($_POST['page'], time(), time() + (86400 * 30), "/");
|
1871 |
+
wp_send_json(true);
|
1872 |
+
}
|
1873 |
+
wp_send_json(false);
|
1874 |
+
}
|
1875 |
|
1876 |
/*
|
1877 |
* Add ajax
|
1914 |
add_action('wp_ajax_wpms_dash_metatitle', array('MetaSeo_Dashboard', 'wpms_dash_metatitle'));
|
1915 |
add_action('wp_ajax_wpms_dash_metadesc', array('MetaSeo_Dashboard', 'wpms_dash_metadesc'));
|
1916 |
add_action('wp_ajax_wpms_dash_imgsmeta', array('MetaSeo_Dashboard', 'wpms_dash_imgsmeta'));
|
1917 |
+
add_action('wp_ajax_wpms_setcookie_notification', array($this, 'wpms_setcookie_notification'));
|
1918 |
}
|
1919 |
}
|
inc/class.metaseo-content-list-table.php
CHANGED
@@ -263,7 +263,7 @@ class MetaSeo_Content_List_Table extends WP_List_Table {
|
|
263 |
|
264 |
$total_items = $wpdb->get_var($query);
|
265 |
|
266 |
-
$query = "SELECT ID, post_title, post_name, post_type, post_status , mt.meta_value AS metatitle, md.meta_value AS metadesc ,mk.meta_value AS metakeywords "
|
267 |
. " FROM $wpdb->posts "
|
268 |
. " LEFT JOIN (SELECT * FROM $wpdb->postmeta WHERE meta_key = '_metaseo_metatitle') mt ON mt.post_id = $wpdb->posts.ID "
|
269 |
. " LEFT JOIN (SELECT * FROM $wpdb->postmeta WHERE meta_key = '_metaseo_metadesc') md ON md.post_id = $wpdb->posts.ID "
|
263 |
|
264 |
$total_items = $wpdb->get_var($query);
|
265 |
|
266 |
+
$query = "SELECT DISTINCT ID, post_title, post_name, post_type, post_status , mt.meta_value AS metatitle, md.meta_value AS metadesc ,mk.meta_value AS metakeywords "
|
267 |
. " FROM $wpdb->posts "
|
268 |
. " LEFT JOIN (SELECT * FROM $wpdb->postmeta WHERE meta_key = '_metaseo_metatitle') mt ON mt.post_id = $wpdb->posts.ID "
|
269 |
. " LEFT JOIN (SELECT * FROM $wpdb->postmeta WHERE meta_key = '_metaseo_metadesc') md ON md.post_id = $wpdb->posts.ID "
|
inc/class.metaseo-dashboard.php
CHANGED
@@ -284,6 +284,9 @@ class MetaSeo_Dashboard {
|
|
284 |
*/
|
285 |
public static function wpms_dash_metatitle(){
|
286 |
$results = MetaSeo_Dashboard::update_dashboard('metatitle');
|
|
|
|
|
|
|
287 |
ob_start();
|
288 |
require_once WPMETASEO_PLUGIN_DIR . 'inc/pages/dashboard/meta_title.php';
|
289 |
$html = ob_get_contents();
|
@@ -338,6 +341,9 @@ class MetaSeo_Dashboard {
|
|
338 |
*/
|
339 |
public static function wpms_dash_metadesc(){
|
340 |
$results = MetaSeo_Dashboard::update_dashboard('metadesc');
|
|
|
|
|
|
|
341 |
ob_start();
|
342 |
require_once WPMETASEO_PLUGIN_DIR . 'inc/pages/dashboard/meta_desc.php';
|
343 |
$html = ob_get_contents();
|
@@ -370,6 +376,9 @@ class MetaSeo_Dashboard {
|
|
370 |
*/
|
371 |
public static function wpms_dash_linkmeta(){
|
372 |
$results = MetaSeo_Dashboard::wpms_linkmeta();
|
|
|
|
|
|
|
373 |
ob_start();
|
374 |
require_once WPMETASEO_PLUGIN_DIR . 'inc/pages/dashboard/link_meta.php';
|
375 |
$html = ob_get_contents();
|
@@ -398,6 +407,9 @@ class MetaSeo_Dashboard {
|
|
398 |
*/
|
399 |
public static function wpms_dash_permalink(){
|
400 |
$permalink = MetaSeo_Dashboard::wpms_permalink();
|
|
|
|
|
|
|
401 |
ob_start();
|
402 |
require_once WPMETASEO_PLUGIN_DIR . 'inc/pages/dashboard/permalink.php';
|
403 |
$html = ob_get_contents();
|
@@ -437,6 +449,9 @@ class MetaSeo_Dashboard {
|
|
437 |
*/
|
438 |
public static function wpms_dash_newcontent(){
|
439 |
$results = MetaSeo_Dashboard::update_dashboard('newcontent');
|
|
|
|
|
|
|
440 |
ob_start();
|
441 |
require_once WPMETASEO_PLUGIN_DIR . 'inc/pages/dashboard/new_content.php';
|
442 |
$html = ob_get_contents();
|
@@ -589,6 +604,10 @@ class MetaSeo_Dashboard {
|
|
589 |
$option_last_dash_update = get_option('_wpms_dash_last_update');
|
590 |
if(!empty($options_dashboard) && is_array($options_dashboard) && !empty($options_dashboard['image_meta']) && $option_last_update_post < $option_last_dash_update){
|
591 |
$results = $options_dashboard['image_meta'];
|
|
|
|
|
|
|
|
|
592 |
ob_start();
|
593 |
require_once WPMETASEO_PLUGIN_DIR . 'inc/pages/dashboard/imgsresize.php';
|
594 |
$html_imgresize = ob_get_contents();
|
@@ -715,6 +734,10 @@ class MetaSeo_Dashboard {
|
|
715 |
|
716 |
$options_dashboard = get_option('options_dashboard');
|
717 |
$results = $options_dashboard['image_meta'];
|
|
|
|
|
|
|
|
|
718 |
ob_start();
|
719 |
require_once WPMETASEO_PLUGIN_DIR . 'inc/pages/dashboard/imgsresize.php';
|
720 |
$html_imgresize = ob_get_contents();
|
284 |
*/
|
285 |
public static function wpms_dash_metatitle(){
|
286 |
$results = MetaSeo_Dashboard::update_dashboard('metatitle');
|
287 |
+
if(isset($_POST['type']) && $_POST['type'] == 'dashboard_widgets'){
|
288 |
+
wp_send_json($results);
|
289 |
+
}
|
290 |
ob_start();
|
291 |
require_once WPMETASEO_PLUGIN_DIR . 'inc/pages/dashboard/meta_title.php';
|
292 |
$html = ob_get_contents();
|
341 |
*/
|
342 |
public static function wpms_dash_metadesc(){
|
343 |
$results = MetaSeo_Dashboard::update_dashboard('metadesc');
|
344 |
+
if(isset($_POST['type']) && $_POST['type'] == 'dashboard_widgets'){
|
345 |
+
wp_send_json($results);
|
346 |
+
}
|
347 |
ob_start();
|
348 |
require_once WPMETASEO_PLUGIN_DIR . 'inc/pages/dashboard/meta_desc.php';
|
349 |
$html = ob_get_contents();
|
376 |
*/
|
377 |
public static function wpms_dash_linkmeta(){
|
378 |
$results = MetaSeo_Dashboard::wpms_linkmeta();
|
379 |
+
if(isset($_POST['type']) && $_POST['type'] == 'dashboard_widgets'){
|
380 |
+
wp_send_json($results);
|
381 |
+
}
|
382 |
ob_start();
|
383 |
require_once WPMETASEO_PLUGIN_DIR . 'inc/pages/dashboard/link_meta.php';
|
384 |
$html = ob_get_contents();
|
407 |
*/
|
408 |
public static function wpms_dash_permalink(){
|
409 |
$permalink = MetaSeo_Dashboard::wpms_permalink();
|
410 |
+
if(isset($_POST['type']) && $_POST['type'] == 'dashboard_widgets'){
|
411 |
+
wp_send_json($permalink);
|
412 |
+
}
|
413 |
ob_start();
|
414 |
require_once WPMETASEO_PLUGIN_DIR . 'inc/pages/dashboard/permalink.php';
|
415 |
$html = ob_get_contents();
|
449 |
*/
|
450 |
public static function wpms_dash_newcontent(){
|
451 |
$results = MetaSeo_Dashboard::update_dashboard('newcontent');
|
452 |
+
if(isset($_POST['type']) && $_POST['type'] == 'dashboard_widgets'){
|
453 |
+
wp_send_json($results);
|
454 |
+
}
|
455 |
ob_start();
|
456 |
require_once WPMETASEO_PLUGIN_DIR . 'inc/pages/dashboard/new_content.php';
|
457 |
$html = ob_get_contents();
|
604 |
$option_last_dash_update = get_option('_wpms_dash_last_update');
|
605 |
if(!empty($options_dashboard) && is_array($options_dashboard) && !empty($options_dashboard['image_meta']) && $option_last_update_post < $option_last_dash_update){
|
606 |
$results = $options_dashboard['image_meta'];
|
607 |
+
if(isset($_POST['type']) && $_POST['type'] == 'dashboard_widgets'){
|
608 |
+
$results['status'] = true;
|
609 |
+
wp_send_json($results);
|
610 |
+
}
|
611 |
ob_start();
|
612 |
require_once WPMETASEO_PLUGIN_DIR . 'inc/pages/dashboard/imgsresize.php';
|
613 |
$html_imgresize = ob_get_contents();
|
734 |
|
735 |
$options_dashboard = get_option('options_dashboard');
|
736 |
$results = $options_dashboard['image_meta'];
|
737 |
+
if(isset($_POST['type']) && $_POST['type'] == 'dashboard_widgets'){
|
738 |
+
$results['status'] = true;
|
739 |
+
wp_send_json($results);
|
740 |
+
}
|
741 |
ob_start();
|
742 |
require_once WPMETASEO_PLUGIN_DIR . 'inc/pages/dashboard/imgsresize.php';
|
743 |
$html_imgresize = ob_get_contents();
|
inc/class.metaseo-image-list-table.php
CHANGED
@@ -1039,11 +1039,11 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
|
|
1039 |
$response = new stdClass();
|
1040 |
$response->updated = false;
|
1041 |
if (!empty($_POST['addition']['meta_key'])) {
|
1042 |
-
self::updateImgMeta_call_back($_POST['addition']);
|
1043 |
}
|
1044 |
|
1045 |
if (!empty($_POST['meta_type']) and $_POST['meta_type'] == 'change_image_name') {
|
1046 |
-
self::updateImageName_callback($_POST);
|
1047 |
}
|
1048 |
|
1049 |
if (!empty($_POST['meta_type']) && !empty($_POST['post_id'])) {
|
@@ -1080,6 +1080,17 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
|
|
1080 |
$response->updated = true;
|
1081 |
$response->msg = __($label . ' was saved', 'wp-meta-seo');
|
1082 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1083 |
} else {
|
1084 |
$response->msg = __('There is a problem when update image meta!', 'wp-meta-seo');
|
1085 |
}
|
@@ -1087,6 +1098,75 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
|
|
1087 |
echo json_encode($response);
|
1088 |
wp_die();
|
1089 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1090 |
|
1091 |
/*
|
1092 |
* Update image name
|
@@ -1256,10 +1336,11 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
|
|
1256 |
/*
|
1257 |
* Update image meta
|
1258 |
*/
|
1259 |
-
public static function updateImgMeta_call_back($wpmspost) {
|
1260 |
global $wpdb;
|
1261 |
$response = new stdClass();
|
1262 |
$response->updated = false;
|
|
|
1263 |
foreach ($wpmspost as $k => $v) {
|
1264 |
if (!$v && !in_array($k, array('meta_value', 'meta_order'))) {
|
1265 |
$response->msg = __('There is a problem when update image meta!', 'wp-meta-seo');
|
@@ -1275,7 +1356,6 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
|
|
1275 |
$meta_order = intval($wpmspost['meta_order']);
|
1276 |
$img_post_id = intval($wpmspost['img_post_id']);
|
1277 |
$post_id = intval($wpmspost['post_id']);
|
1278 |
-
|
1279 |
$meta = get_post_meta($img_post_id, $meta_key, true);
|
1280 |
//Update new value for meta info of this image in wp_postmeta
|
1281 |
$meta[$post_id]['meta'][$meta_order]['type'][$meta_type] = metaseo_utf8($meta_value);
|
@@ -1287,28 +1367,25 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
|
|
1287 |
$response->msg = __('The post has been deleted before, please check again!', 'wp-meta-seo');
|
1288 |
} else {
|
1289 |
if ($post->post_content !== '') {
|
|
|
1290 |
//Split content part that do not contain img tag
|
1291 |
$post_content_split = preg_split('/(<img[\s]+[^>]*src\s*=\s*)([\"\'])([^>]+?)\2([^<>]*>)/i', $post->post_content);
|
1292 |
//Get all img tag from the content
|
1293 |
preg_match_all('/(<img[\s]+[^>]*src\s*=\s*)([\"\'])([^>]+?)\2([^<>]*>)/i', $post->post_content, $matches);
|
1294 |
$img_tags = $matches[0];
|
1295 |
-
|
1296 |
if (isset($img_tags[$meta_order])) {
|
1297 |
$pattern = '/' . $meta_type . '\s*?\=?\"[^\"]*\"/i';
|
1298 |
$replacement = $meta_type . '="' . $meta_value . '"';
|
1299 |
-
|
1300 |
if (!preg_match($pattern, $img_tags[$meta_order], $match)) {
|
1301 |
$pattern = '/\/>/i';
|
1302 |
$replacement = $meta_type . '="' . $meta_value . '" />';
|
1303 |
}
|
1304 |
-
|
|
|
1305 |
preg_match('/'.$meta_type.'="(.+?)"/', $img_tags[$meta_order], $matches);
|
1306 |
-
|
1307 |
-
|
1308 |
-
$img_tags[$meta_order] = preg_replace('/<img([^>]*)'.$meta_type.'=["\']["\'\\/]?([^"\']*)["\']/', '<img\1'.$meta_type.'="'.$meta_value.'"', $img_tags[$meta_order]);
|
1309 |
-
}else{
|
1310 |
-
$img_tags[$meta_order] = preg_replace('/(<img\b[^><]*)>/i', '$1 '.$meta_type.'="'.$meta_value.'">', $img_tags[$meta_order]);
|
1311 |
-
}
|
1312 |
// create new post content
|
1313 |
$post_content = '';
|
1314 |
foreach ($post_content_split as $key => $split) {
|
@@ -1319,9 +1396,9 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
|
|
1319 |
}
|
1320 |
$post_content .= $split . $img_tag;
|
1321 |
}
|
1322 |
-
|
1323 |
remove_action('post_updated', array('MetaSeo_Broken_Link_Table', 'wpms_update_post'));
|
1324 |
-
|
1325 |
//Update content of this post.
|
1326 |
if (!wp_update_post(array('ID' => $post->ID, 'post_content' => $post_content))) {
|
1327 |
$response->msg = __('The post haven\'t been updated, please check again!', 'wp-meta-seo');
|
@@ -1337,9 +1414,9 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
|
|
1337 |
}
|
1338 |
}
|
1339 |
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
|
|
1343 |
}
|
1344 |
-
|
1345 |
}
|
1039 |
$response = new stdClass();
|
1040 |
$response->updated = false;
|
1041 |
if (!empty($_POST['addition']['meta_key'])) {
|
1042 |
+
self::updateImgMeta_call_back($_POST['addition'],true);
|
1043 |
}
|
1044 |
|
1045 |
if (!empty($_POST['meta_type']) and $_POST['meta_type'] == 'change_image_name') {
|
1046 |
+
self::updateImageName_callback($_POST,true);
|
1047 |
}
|
1048 |
|
1049 |
if (!empty($_POST['meta_type']) && !empty($_POST['post_id'])) {
|
1080 |
$response->updated = true;
|
1081 |
$response->msg = __($label . ' was saved', 'wp-meta-seo');
|
1082 |
}
|
1083 |
+
|
1084 |
+
if($meta_type == 'alt_text' || $meta_type == 'image_title'){
|
1085 |
+
$settings = get_option('_metaseo_settings');
|
1086 |
+
if(!isset($settings['metaseo_overridemeta']) || (!empty($settings['metaseo_overridemeta']) && $settings['metaseo_overridemeta'] == 1)){
|
1087 |
+
// call function auto override in content
|
1088 |
+
self::wpms_auto_update_post_content($post_id,$meta_type,$meta_value);
|
1089 |
+
$response->type = 'auto_override';
|
1090 |
+
$response->pid = $post_id;
|
1091 |
+
$response->imgname = $_POST['img_name'];
|
1092 |
+
}
|
1093 |
+
}
|
1094 |
} else {
|
1095 |
$response->msg = __('There is a problem when update image meta!', 'wp-meta-seo');
|
1096 |
}
|
1098 |
echo json_encode($response);
|
1099 |
wp_die();
|
1100 |
}
|
1101 |
+
|
1102 |
+
/**
|
1103 |
+
* function auto override in content
|
1104 |
+
*/
|
1105 |
+
public function wpms_auto_update_post_content($post_id,$meta_type,$meta_value){
|
1106 |
+
$_POST = stripslashes_deep($_POST);
|
1107 |
+
$img = trim($_POST['img_name']);
|
1108 |
+
if ($post_id && !empty($img)) {
|
1109 |
+
$fn = "display_fix_metas_list";
|
1110 |
+
if (method_exists('MetaSeo_Image_List_Table', $fn)) {
|
1111 |
+
//Get list of posts contain this image and its clones
|
1112 |
+
$posts = ImageHelper::_get_post_list($post_id, 'fix_metas');
|
1113 |
+
|
1114 |
+
if (count($posts) > 0) {
|
1115 |
+
$img_counter = 0;
|
1116 |
+
//Now the time to resize the images
|
1117 |
+
$toEdit = false;
|
1118 |
+
$pIDs = array();
|
1119 |
+
foreach ($posts as $ID => &$post) {
|
1120 |
+
$img_counter += count($post['meta']);
|
1121 |
+
foreach ($post['meta'] as $order => $meta) {
|
1122 |
+
if ($meta['type']['alt'] == '' || $meta['type']['title'] == '') {
|
1123 |
+
$toEdit = true;
|
1124 |
+
}
|
1125 |
+
|
1126 |
+
if ($meta['type']['alt'] != '' && $meta['type']['title'] != '') {
|
1127 |
+
$pIDs[$ID][] = $order;
|
1128 |
+
}
|
1129 |
+
}
|
1130 |
+
}
|
1131 |
+
|
1132 |
+
if ($toEdit === true) {
|
1133 |
+
foreach ($pIDs as $ID => $orders) {
|
1134 |
+
foreach ($orders as $order) {
|
1135 |
+
unset($posts[$ID]['meta'][$order]);
|
1136 |
+
if ($img_counter > 0) {
|
1137 |
+
$img_counter--;
|
1138 |
+
}
|
1139 |
+
}
|
1140 |
+
|
1141 |
+
if (empty($posts[$ID]['meta'])) {
|
1142 |
+
unset($posts[$ID]);
|
1143 |
+
}
|
1144 |
+
}
|
1145 |
+
}
|
1146 |
+
//-----------------------------
|
1147 |
+
}
|
1148 |
+
}
|
1149 |
+
}
|
1150 |
+
if(!empty($posts)){
|
1151 |
+
foreach ($posts as $p){
|
1152 |
+
foreach ($p['meta'] as $k => $meta){
|
1153 |
+
$addition = array();
|
1154 |
+
$addition['meta_key'] = '_metaseo_fix_metas';
|
1155 |
+
if($meta_type == 'image_title'){
|
1156 |
+
$addition['meta_type'] = 'title';
|
1157 |
+
}else{
|
1158 |
+
$addition['meta_type'] = 'alt';
|
1159 |
+
}
|
1160 |
+
|
1161 |
+
$addition['meta_value'] = $meta_value;
|
1162 |
+
$addition['post_id'] = $p['ID'];
|
1163 |
+
$addition['meta_order'] = $k;
|
1164 |
+
$addition['img_post_id'] = $post_id;
|
1165 |
+
self::updateImgMeta_call_back($addition,false);
|
1166 |
+
}
|
1167 |
+
}
|
1168 |
+
}
|
1169 |
+
}
|
1170 |
|
1171 |
/*
|
1172 |
* Update image name
|
1336 |
/*
|
1337 |
* Update image meta
|
1338 |
*/
|
1339 |
+
public static function updateImgMeta_call_back($wpmspost,$return = true) {
|
1340 |
global $wpdb;
|
1341 |
$response = new stdClass();
|
1342 |
$response->updated = false;
|
1343 |
+
|
1344 |
foreach ($wpmspost as $k => $v) {
|
1345 |
if (!$v && !in_array($k, array('meta_value', 'meta_order'))) {
|
1346 |
$response->msg = __('There is a problem when update image meta!', 'wp-meta-seo');
|
1356 |
$meta_order = intval($wpmspost['meta_order']);
|
1357 |
$img_post_id = intval($wpmspost['img_post_id']);
|
1358 |
$post_id = intval($wpmspost['post_id']);
|
|
|
1359 |
$meta = get_post_meta($img_post_id, $meta_key, true);
|
1360 |
//Update new value for meta info of this image in wp_postmeta
|
1361 |
$meta[$post_id]['meta'][$meta_order]['type'][$meta_type] = metaseo_utf8($meta_value);
|
1367 |
$response->msg = __('The post has been deleted before, please check again!', 'wp-meta-seo');
|
1368 |
} else {
|
1369 |
if ($post->post_content !== '') {
|
1370 |
+
|
1371 |
//Split content part that do not contain img tag
|
1372 |
$post_content_split = preg_split('/(<img[\s]+[^>]*src\s*=\s*)([\"\'])([^>]+?)\2([^<>]*>)/i', $post->post_content);
|
1373 |
//Get all img tag from the content
|
1374 |
preg_match_all('/(<img[\s]+[^>]*src\s*=\s*)([\"\'])([^>]+?)\2([^<>]*>)/i', $post->post_content, $matches);
|
1375 |
$img_tags = $matches[0];
|
|
|
1376 |
if (isset($img_tags[$meta_order])) {
|
1377 |
$pattern = '/' . $meta_type . '\s*?\=?\"[^\"]*\"/i';
|
1378 |
$replacement = $meta_type . '="' . $meta_value . '"';
|
1379 |
+
|
1380 |
if (!preg_match($pattern, $img_tags[$meta_order], $match)) {
|
1381 |
$pattern = '/\/>/i';
|
1382 |
$replacement = $meta_type . '="' . $meta_value . '" />';
|
1383 |
}
|
1384 |
+
// remove attr
|
1385 |
+
$img_tags[$meta_order] = preg_replace('#(<img.+?)'.$meta_type.'=(["\']?)\d*\2(.*?/?>)#i', '$1$3', $img_tags[$meta_order]);
|
1386 |
preg_match('/'.$meta_type.'="(.+?)"/', $img_tags[$meta_order], $matches);
|
1387 |
+
// update attr
|
1388 |
+
$img_tags[$meta_order] = preg_replace('/(<img\b[^><]*)>/i', '$1 '.$meta_type.'="'.$meta_value.'">', $img_tags[$meta_order]);
|
|
|
|
|
|
|
|
|
1389 |
// create new post content
|
1390 |
$post_content = '';
|
1391 |
foreach ($post_content_split as $key => $split) {
|
1396 |
}
|
1397 |
$post_content .= $split . $img_tag;
|
1398 |
}
|
1399 |
+
|
1400 |
remove_action('post_updated', array('MetaSeo_Broken_Link_Table', 'wpms_update_post'));
|
1401 |
+
|
1402 |
//Update content of this post.
|
1403 |
if (!wp_update_post(array('ID' => $post->ID, 'post_content' => $post_content))) {
|
1404 |
$response->msg = __('The post haven\'t been updated, please check again!', 'wp-meta-seo');
|
1414 |
}
|
1415 |
}
|
1416 |
|
1417 |
+
if($return == true){
|
1418 |
+
echo json_encode($response);
|
1419 |
+
wp_die();
|
1420 |
+
}
|
1421 |
}
|
|
|
1422 |
}
|
inc/class.wp-metaseo.php
CHANGED
@@ -27,25 +27,30 @@ class WpMetaSeo {
|
|
27 |
* Attached to activate_{ plugin_basename( __FILES__ ) } by register_activation_hook()
|
28 |
* @static
|
29 |
*/
|
30 |
-
public static function plugin_activation() {
|
31 |
-
|
32 |
-
|
33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
}
|
35 |
|
|
|
|
|
|
|
|
|
36 |
if (!class_exists('DOMDocument')) {
|
37 |
deactivate_plugins(basename(__FILE__));
|
38 |
wp_die('<p>To active WP Meta SEO plugin , please install “dom” PHP extension </p>', 'Plugin Activation Error', array('response' => 200, 'back_link' => TRUE));
|
39 |
}
|
40 |
-
|
41 |
-
|
42 |
-
global $wpdb;
|
43 |
-
//Set two param as flags that determine whether show import meta data from other SEO plugin button or not to 0
|
44 |
-
update_option('_aio_import_notice_flag', 0);
|
45 |
-
update_option('_yoast_import_notice_flag', 0);
|
46 |
-
update_option('plugin_to_sync_with', 0);
|
47 |
-
|
48 |
-
self::install_db();
|
49 |
}
|
50 |
|
51 |
/* create metaseo_images table */
|
27 |
* Attached to activate_{ plugin_basename( __FILES__ ) } by register_activation_hook()
|
28 |
* @static
|
29 |
*/
|
30 |
+
public static function plugin_activation($wp = '4.0', $php = '5.3.0') {
|
31 |
+
global $wp_version;
|
32 |
+
if (version_compare(PHP_VERSION, $php, '<')) {
|
33 |
+
$flag = 'PHP';
|
34 |
+
} elseif (version_compare($wp_version, $wp, '<')) {
|
35 |
+
$flag = 'WordPress';
|
36 |
+
} else {
|
37 |
+
global $wpdb;
|
38 |
+
//Set two param as flags that determine whether show import meta data from other SEO plugin button or not to 0
|
39 |
+
update_option('_aio_import_notice_flag', 0);
|
40 |
+
update_option('_yoast_import_notice_flag', 0);
|
41 |
+
update_option('plugin_to_sync_with', 0);
|
42 |
+
self::install_db();
|
43 |
+
return;
|
44 |
}
|
45 |
|
46 |
+
$version = 'PHP' == $flag ? $php : $wp;
|
47 |
+
deactivate_plugins(basename(__FILE__));
|
48 |
+
wp_die('<p>The <strong>WP Meta SEO</strong> plugin requires ' . $flag . ' version ' . $version . ' or greater.</p>', 'Plugin Activation Error', array('response' => 200, 'back_link' => TRUE));
|
49 |
+
|
50 |
if (!class_exists('DOMDocument')) {
|
51 |
deactivate_plugins(basename(__FILE__));
|
52 |
wp_die('<p>To active WP Meta SEO plugin , please install “dom” PHP extension </p>', 'Plugin Activation Error', array('response' => 200, 'back_link' => TRUE));
|
53 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
}
|
55 |
|
56 |
/* create metaseo_images table */
|
inc/pages/dashboard.php
CHANGED
@@ -273,6 +273,33 @@ $plugin_imgRecycle_file = 'imagerecycle-pdf-image-compression/wp-image-recycle.p
|
|
273 |
</div>
|
274 |
</div>
|
275 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
276 |
</div>
|
277 |
|
278 |
<script type="text/javascript">
|
273 |
</div>
|
274 |
</div>
|
275 |
</div>
|
276 |
+
<?php
|
277 |
+
if(!empty($_COOKIE['close_dashboard'])){
|
278 |
+
$check = time() - (int)$_COOKIE['close_dashboard'];
|
279 |
+
$month = 30*24*60*60;
|
280 |
+
}
|
281 |
+
|
282 |
+
if(empty($_COOKIE['close_dashboard']) || (!empty($_COOKIE['close_dashboard']) && $check >= $month )):
|
283 |
+
?>
|
284 |
+
<div class="wpms_dashboard_notification wpms_wrap_notification">
|
285 |
+
<div class="notification_dashboard">
|
286 |
+
<div class="tooltipped">
|
287 |
+
<div class="panel panel-updates dashboard-card">
|
288 |
+
<div class="panel-body">
|
289 |
+
<div class="row">
|
290 |
+
<div class="wpms_dashboard_widgets_content">
|
291 |
+
<p class="dashboard_noti_title"><?php _e('WP META SEO PRO ADDON','wp-meta-seo') ?></p>
|
292 |
+
<p class="dashboard-title msg"><?php _e('Bring your WordPress website SEO to the next level with the PRO Addon: Email Report, Google Search Console Connect, Automatic Redirect, Advanced Sitemaps and more!','wp-meta-seo') ?></p>
|
293 |
+
<a class="more-info" href="https://www.joomunited.com/wordpress-products/wp-meta-seo" target="_blank"><?php _e('MORE INFORMATION','wp-meta-seo') ?></a>
|
294 |
+
<a data-page="close_dashboard" class="dashboard-title wpmsclose_notification close_dashboard"><?php _e('CLOSE FOR ONE MONTH','wp-meta-seo') ?></a>
|
295 |
+
</div>
|
296 |
+
</div>
|
297 |
+
</div>
|
298 |
+
</div>
|
299 |
+
</div>
|
300 |
+
</div>
|
301 |
+
</div>
|
302 |
+
<?php endif; ?>
|
303 |
</div>
|
304 |
|
305 |
<script type="text/javascript">
|
inc/pages/dashboard_widgets.php
ADDED
@@ -0,0 +1,185 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="wpms_dashboard_widgets">
|
2 |
+
<div class="wpms_dash_widgets wpms_dash_permalink" alt="<?php _e('It’s better using a permalink structure that is adding in your URL the category name and content title. This parameter can be changed in Settings > Permalinks WordPress menu. Tag recommended is %category%/%postname%', 'wp-meta-seo') ?>">
|
3 |
+
<div class="row panel-statistics">
|
4 |
+
<div class="tooltipped">
|
5 |
+
<div class="panel panel-updates dashboard-card">
|
6 |
+
<div class="panel-body">
|
7 |
+
<div class="row">
|
8 |
+
<div class="wpms_dashboard_widgets_left">
|
9 |
+
<h4 class="panel-title dashboard-title"><?php _e('PERMALINKS SETTINGS','wp-meta-seo') ?></h4>
|
10 |
+
<h3 class="dashboard-title percent_1">50%</h3>
|
11 |
+
<p class="dashboard-title percent_2"><?php _e('Optimized at:','wp-meta-seo') ?> <span class="percent">50%</span></p>
|
12 |
+
</div>
|
13 |
+
<div class="wpms_dashboard_widgets_right">
|
14 |
+
<div class="progress-rating">
|
15 |
+
<div class="determinate percent_3" style="width: 50%"></div>
|
16 |
+
</div>
|
17 |
+
</div>
|
18 |
+
</div>
|
19 |
+
</div>
|
20 |
+
</div>
|
21 |
+
</div>
|
22 |
+
</div>
|
23 |
+
</div>
|
24 |
+
|
25 |
+
<div class="wpms_dash_widgets wpms_dash_metatitle" alt="<?php _e('Meta titles are displayed in search engine results as a page title. It’s a good thing for SEO to have some custom and attractive ones. Be sure to fill at least the met information on your most popular pages', 'wp-meta-seo') ?>">
|
26 |
+
<div class="row panel-statistics">
|
27 |
+
<div class="tooltipped">
|
28 |
+
<div class="panel panel-updates dashboard-card">
|
29 |
+
<div class="panel-body">
|
30 |
+
<div class="row">
|
31 |
+
<div class="wpms_dashboard_widgets_left">
|
32 |
+
<h4 class="panel-title dashboard-title"><?php _e('META TITLE','wp-meta-seo') ?></h4>
|
33 |
+
<h3 class="dashboard-title percent_1">0%</h3>
|
34 |
+
<p class="dashboard-title percent_2"><?php _e('Meta title filled:','wp-meta-seo') ?> <span class="percent">0%</span></p>
|
35 |
+
</div>
|
36 |
+
<div class="wpms_dashboard_widgets_right">
|
37 |
+
<div class="progress-rating">
|
38 |
+
<div class="determinate percent_3" style="width: 0%"></div>
|
39 |
+
</div>
|
40 |
+
</div>
|
41 |
+
</div>
|
42 |
+
</div>
|
43 |
+
</div>
|
44 |
+
</div>
|
45 |
+
</div>
|
46 |
+
</div>
|
47 |
+
|
48 |
+
<div class="wpms_dash_widgets wpms_dash_metadesc" alt="<?php _e('Meta descriptions are displayed in search engine results as a page description. It’s a good thing for SEO to have some custom and attractive ones. Be sure to fill at least the meta information on your most popular pages.', 'wp-meta-seo') ?>">
|
49 |
+
<div class="row panel-statistics">
|
50 |
+
<div class="tooltipped">
|
51 |
+
<div class="panel panel-updates dashboard-card">
|
52 |
+
<div class="panel-body">
|
53 |
+
<div class="row">
|
54 |
+
<div class="wpms_dashboard_widgets_left">
|
55 |
+
<h4 class="panel-title dashboard-title"><?php _e('Meta Description','wp-meta-seo') ?></h4>
|
56 |
+
<h3 class="dashboard-title percent_1">0%</h3>
|
57 |
+
<p class="dashboard-title percent_2"><?php _e('Meta description filled:','wp-meta-seo') ?> <span class="percent">0%</span></p>
|
58 |
+
</div>
|
59 |
+
<div class="wpms_dashboard_widgets_right">
|
60 |
+
<div class="progress-rating">
|
61 |
+
<div class="determinate percent_3" style="width: 0%"></div>
|
62 |
+
</div>
|
63 |
+
</div>
|
64 |
+
</div>
|
65 |
+
</div>
|
66 |
+
</div>
|
67 |
+
</div>
|
68 |
+
</div>
|
69 |
+
</div>
|
70 |
+
|
71 |
+
<div class="wpms_dash_widgets wpms_dash_imgsresize" alt="<?php _e('Display image at its natural size, do not use HTML resize. It happens usually when you use handles to resize an image. You have a bulk edition tool to fix that.', 'wp-meta-seo') ?>">
|
72 |
+
<div class="row panel-statistics">
|
73 |
+
<div class="tooltipped">
|
74 |
+
<div class="panel panel-updates dashboard-card">
|
75 |
+
<div class="panel-body">
|
76 |
+
<div class="row">
|
77 |
+
<div class="wpms_dashboard_widgets_left">
|
78 |
+
<h4 class="panel-title dashboard-title"><?php _e('HTML image resizing','wp-meta-seo') ?></h4>
|
79 |
+
<h3 class="dashboard-title percent_1">0%</h3>
|
80 |
+
<p class="dashboard-title percent_2"><?php _e('Wrong resized images:','wp-meta-seo') ?> <span class="percent">0%</span></p>
|
81 |
+
</div>
|
82 |
+
<div class="wpms_dashboard_widgets_right">
|
83 |
+
<div class="progress-rating">
|
84 |
+
<div class="determinate percent_3" style="width: 0%"></div>
|
85 |
+
</div>
|
86 |
+
</div>
|
87 |
+
</div>
|
88 |
+
</div>
|
89 |
+
</div>
|
90 |
+
</div>
|
91 |
+
</div>
|
92 |
+
</div>
|
93 |
+
|
94 |
+
<div class="wpms_dash_widgets wpms_dash_imgsmeta" alt="<?php _e('We recommend to use both alt text and image title. The main advantage is that it helps search engines discover your images and display them in image search results. Plus, these tags improve the accessibility of your site and give more information about your images. Use our bulk image tool to quickly check and fix that.', 'wp-meta-seo') ?>">
|
95 |
+
<div class="row panel-statistics">
|
96 |
+
<div class="tooltipped">
|
97 |
+
<div class="panel panel-updates dashboard-card">
|
98 |
+
<div class="panel-body">
|
99 |
+
<div class="row">
|
100 |
+
<div class="wpms_dashboard_widgets_left">
|
101 |
+
<h4 class="panel-title dashboard-title"><?php _e('Image title/alt','wp-meta-seo') ?></h4>
|
102 |
+
<h3 class="dashboard-title percent_1">0%</h3>
|
103 |
+
<p class="dashboard-title percent_2"><?php _e('Image data filled (in content):','wp-meta-seo') ?> <span class="percent">0%</span></p>
|
104 |
+
</div>
|
105 |
+
<div class="wpms_dashboard_widgets_right">
|
106 |
+
<div class="progress-rating">
|
107 |
+
<div class="determinate percent_3" style="width: 0%"></div>
|
108 |
+
</div>
|
109 |
+
</div>
|
110 |
+
</div>
|
111 |
+
</div>
|
112 |
+
</div>
|
113 |
+
</div>
|
114 |
+
</div>
|
115 |
+
</div>
|
116 |
+
|
117 |
+
<div class="wpms_dash_widgets wpms_dash_newcontent" alt="<?php _e('It is highly recommended to update or add new content on your website quite frequently. At least 3 updated or new content per month would be great :)', 'wp-meta-seo') ?>">
|
118 |
+
<div class="row panel-statistics">
|
119 |
+
<div class="tooltipped">
|
120 |
+
<div class="panel panel-updates dashboard-card">
|
121 |
+
<div class="panel-body">
|
122 |
+
<div class="row">
|
123 |
+
<div class="wpms_dashboard_widgets_left">
|
124 |
+
<h4 class="panel-title dashboard-title"><?php _e('New or updated content','wp-meta-seo') ?></h4>
|
125 |
+
<h3 class="dashboard-title percent_1">0%</h3>
|
126 |
+
<p class="dashboard-title percent_2"><?php _e('Latest month new or updated content:','wp-meta-seo') ?> <span class="percent">0%</span></p>
|
127 |
+
</div>
|
128 |
+
<div class="wpms_dashboard_widgets_right">
|
129 |
+
<div class="progress-rating">
|
130 |
+
<div class="determinate percent_3" style="width: 0%"></div>
|
131 |
+
</div>
|
132 |
+
</div>
|
133 |
+
</div>
|
134 |
+
</div>
|
135 |
+
</div>
|
136 |
+
</div>
|
137 |
+
</div>
|
138 |
+
</div>
|
139 |
+
|
140 |
+
<div class="wpms_dash_widgets wpms_dash_linkmeta" alt="<?php _e('The link title attribute does not have any SEO value for links. BUT links titles can influence click behavior for users, which may indirectly affect your SEO performance', 'wp-meta-seo') ?>">
|
141 |
+
<div class="row panel-statistics">
|
142 |
+
<div class="tooltipped">
|
143 |
+
<div class="panel panel-updates dashboard-card">
|
144 |
+
<div class="panel-body">
|
145 |
+
<div class="row">
|
146 |
+
<div class="wpms_dashboard_widgets_left">
|
147 |
+
<h4 class="panel-title dashboard-title"><?php _e('Link titles','wp-meta-seo') ?></h4>
|
148 |
+
<h3 class="dashboard-title percent_1">0%</h3>
|
149 |
+
<p class="dashboard-title percent_2"><?php _e('Links title completed:','wp-meta-seo') ?> <span class="percent">0%</span></p>
|
150 |
+
</div>
|
151 |
+
<div class="wpms_dashboard_widgets_right">
|
152 |
+
<div class="progress-rating">
|
153 |
+
<div class="determinate percent_3" style="width: 0%"></div>
|
154 |
+
</div>
|
155 |
+
</div>
|
156 |
+
</div>
|
157 |
+
</div>
|
158 |
+
</div>
|
159 |
+
</div>
|
160 |
+
</div>
|
161 |
+
</div>
|
162 |
+
|
163 |
+
<div class="wpms_dash_widgets wpms_dash_404_error" alt="<?php _e('A website with a bunch of 404 errors doesn’t provide a good user experience, which is significantly important in content marketing and SEO. We recommend to use our internal broken link checker and redirect tool to fix all the 404 error you can periodically.', 'wp-meta-seo') ?>">
|
164 |
+
<div class="row panel-statistics">
|
165 |
+
<div class="tooltipped">
|
166 |
+
<div class="panel panel-updates dashboard-card">
|
167 |
+
<div class="panel-body">
|
168 |
+
<div class="row">
|
169 |
+
<div class="wpms_dashboard_widgets_left">
|
170 |
+
<h4 class="panel-title dashboard-title">404 ERRORS</h4>
|
171 |
+
<h3 class="dashboard-title"><?php echo $error_404['percent'] ?>%</h3>
|
172 |
+
<p class="dashboard-title">Redirected 404 errors: <?php echo $error_404['count_404_redirected'] . '/' . $error_404['count_404'] ?></p>
|
173 |
+
</div>
|
174 |
+
<div class="wpms_dashboard_widgets_right">
|
175 |
+
<div class="progress-rating">
|
176 |
+
<div class="determinate" style="width: <?php echo $error_404['percent'] ?>%"></div>
|
177 |
+
</div>
|
178 |
+
</div>
|
179 |
+
</div>
|
180 |
+
</div>
|
181 |
+
</div>
|
182 |
+
</div>
|
183 |
+
</div>
|
184 |
+
</div>
|
185 |
+
</div>
|
inc/pages/link-meta.php
CHANGED
@@ -25,6 +25,12 @@ if (!empty($_REQUEST['_wp_http_referer'])) {
|
|
25 |
<?php $metaseo_list_table->display(); ?>
|
26 |
</form>
|
27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
</div>
|
29 |
<script type="text/javascript">
|
30 |
jQuery(document).ready(function ($) {
|
25 |
<?php $metaseo_list_table->display(); ?>
|
26 |
</form>
|
27 |
|
28 |
+
<?php
|
29 |
+
$w = '100%';
|
30 |
+
$text = __('Bring your WordPress website SEO to the next level with the PRO Addon: Email Report, Google Search Console Connect, Automatic Redirect, Advanced Sitemaps and more!','wp-meta-seo');
|
31 |
+
$class_btn_close = 'close_linkmeta';
|
32 |
+
require_once( WPMETASEO_PLUGIN_DIR . 'inc/pages/notification.php' );
|
33 |
+
?>
|
34 |
</div>
|
35 |
<script type="text/javascript">
|
36 |
jQuery(document).ready(function ($) {
|
inc/pages/metaseo-broken-link.php
CHANGED
@@ -30,6 +30,12 @@ if (!empty($_REQUEST['_wp_http_referer'])) {
|
|
30 |
<?php $metaseo_list_table->display(); ?>
|
31 |
</form>
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
</div>
|
34 |
<?php
|
35 |
wp_enqueue_script('wpms-broken-link');
|
30 |
<?php $metaseo_list_table->display(); ?>
|
31 |
</form>
|
32 |
|
33 |
+
<?php
|
34 |
+
$w = '100%';
|
35 |
+
$text = __('Bring your WordPress website SEO to the next level with the PRO Addon: Automatic redirect based on rules, automatic 404 error index, redirect with link manager, Email notification and more!','wp-meta-seo');
|
36 |
+
$class_btn_close = 'close_broken_link';
|
37 |
+
require_once( WPMETASEO_PLUGIN_DIR . 'inc/pages/notification.php' );
|
38 |
+
?>
|
39 |
</div>
|
40 |
<?php
|
41 |
wp_enqueue_script('wpms-broken-link');
|
inc/pages/notification.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if(!empty($_COOKIE[$class_btn_close])){
|
3 |
+
$check = time() - (int)$_COOKIE[$class_btn_close];
|
4 |
+
$month = 30*24*60*60;
|
5 |
+
}
|
6 |
+
|
7 |
+
if(empty($_COOKIE[$class_btn_close]) || (!empty($_COOKIE[$class_btn_close]) && $check >= $month )):
|
8 |
+
?>
|
9 |
+
<div class="wpms_notification wpms_wrap_notification" style="width: <?php echo $w ?>">
|
10 |
+
<div class="notification_dashboard">
|
11 |
+
<div class="tooltipped">
|
12 |
+
<div class="panel panel-updates dashboard-card">
|
13 |
+
<div class="panel-body">
|
14 |
+
<div class="row">
|
15 |
+
<div class="wpms_dashboard_widgets_content">
|
16 |
+
<span class="dashboard_noti_title"><?php _e('WP META SEO PRO ADDON','wp-meta-seo') ?></span>
|
17 |
+
<p class="dashboard-title msg"><?php echo $text ?></p>
|
18 |
+
<a class="more-info" href="https://www.joomunited.com/wordpress-products/wp-meta-seo" target="_blank"><?php _e('MORE INFORMATION','wp-meta-seo') ?></a>
|
19 |
+
<a data-page="<?php echo $class_btn_close ?>" class="dashboard-title wpmsclose_notification <?php echo $class_btn_close ?>"><?php _e('CLOSE FOR ONE MONTH','wp-meta-seo') ?></a>
|
20 |
+
</div>
|
21 |
+
</div>
|
22 |
+
</div>
|
23 |
+
</div>
|
24 |
+
</div>
|
25 |
+
</div>
|
26 |
+
</div>
|
27 |
+
<?php endif; ?>
|
inc/pages/sitemaps/metaseo-google-sitemap.php
CHANGED
@@ -29,4 +29,11 @@
|
|
29 |
}
|
30 |
?>
|
31 |
</form>
|
32 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
}
|
30 |
?>
|
31 |
</form>
|
32 |
+
</div>
|
33 |
+
|
34 |
+
<?php
|
35 |
+
$w = '99%';
|
36 |
+
$text = __('Bring your WordPress website SEO to the next level with the PRO Addon: Sitemap for any custom post type, auto submission to the Google Search Console and more!','wp-meta-seo');
|
37 |
+
$class_btn_close = 'close_sitemap';
|
38 |
+
require_once( WPMETASEO_PLUGIN_DIR . 'inc/pages/notification.php' );
|
39 |
+
?>
|
js/category_field.js
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function wpms_cat_status_length(len, mclass) {
|
2 |
+
if (len < 0) {
|
3 |
+
jQuery(mclass).addClass('length-wrong').removeClass('length-true');
|
4 |
+
} else {
|
5 |
+
jQuery(mclass).addClass('length-true').removeClass('length-wrong');
|
6 |
+
}
|
7 |
+
}
|
8 |
+
|
9 |
+
function wpms_cat_show_length(){
|
10 |
+
var titleElm = jQuery('.wpms_category_metatitle');
|
11 |
+
if(titleElm.length > 0){
|
12 |
+
if (titleElm.val() !== '') {
|
13 |
+
var len = wpms_localize.wpms_cat_metatitle_length - titleElm.val().length;
|
14 |
+
wpms_cat_status_length(len, '.cat-title-len');
|
15 |
+
jQuery('.cat-title-len').html(len);
|
16 |
+
} else {
|
17 |
+
jQuery('.cat-title-len').addClass('length-true').removeClass('length-wrong').html('<span class="good">' + wpms_localize.wpms_cat_metatitle_length + '</span>');
|
18 |
+
}
|
19 |
+
}
|
20 |
+
|
21 |
+
var descElm = jQuery('.wpms_category_metadesc');
|
22 |
+
if(descElm.length > 0) {
|
23 |
+
if (descElm.val() !== '') {
|
24 |
+
var len = wpms_localize.wpms_cat_metadesc_length - descElm.val().length;
|
25 |
+
wpms_cat_status_length(len, '.cat-desc-len');
|
26 |
+
jQuery('.cat-desc-len').html(len);
|
27 |
+
} else {
|
28 |
+
jQuery('.cat-desc-len').addClass('length-true').removeClass('length-wrong').html('<span class="good">' + wpms_localize.wpms_cat_metadesc_length + '</span>');
|
29 |
+
}
|
30 |
+
}
|
31 |
+
}
|
32 |
+
|
33 |
+
jQuery(document).ready(function ($) {
|
34 |
+
jQuery('.wpms_custom_cat_field').qtip({
|
35 |
+
content: {
|
36 |
+
attr: 'alt'
|
37 |
+
},
|
38 |
+
position: {
|
39 |
+
my: 'bottom left',
|
40 |
+
at: 'top center'
|
41 |
+
},
|
42 |
+
style: {
|
43 |
+
tip: {
|
44 |
+
corner: true,
|
45 |
+
},
|
46 |
+
classes: 'metaseo-qtip qtip-rounded'
|
47 |
+
},
|
48 |
+
show: 'hover',
|
49 |
+
hide: {
|
50 |
+
fixed: true,
|
51 |
+
delay: 10
|
52 |
+
}
|
53 |
+
|
54 |
+
});
|
55 |
+
|
56 |
+
jQuery('.wpms_category_metatitle').keyup(function () {
|
57 |
+
var titleElm = jQuery(this);
|
58 |
+
|
59 |
+
if (titleElm.val() !== '') {
|
60 |
+
var len = wpms_localize.wpms_cat_metatitle_length - titleElm.val().length;
|
61 |
+
wpms_cat_status_length(len, '.cat-title-len');
|
62 |
+
jQuery('.cat-title-len').html(len);
|
63 |
+
} else {
|
64 |
+
jQuery('.cat-title-len').addClass('length-true').removeClass('length-wrong').html('<span class="good">' + wpms_localize.wpms_cat_metatitle_length + '</span>');
|
65 |
+
}
|
66 |
+
});
|
67 |
+
|
68 |
+
jQuery('.wpms_category_metadesc').keyup(function () {
|
69 |
+
var descElm = jQuery(this);
|
70 |
+
|
71 |
+
if (descElm.val() !== '') {
|
72 |
+
var len = wpms_localize.wpms_cat_metadesc_length - descElm.val().length;
|
73 |
+
wpms_cat_status_length(len, '.cat-desc-len');
|
74 |
+
jQuery('.cat-desc-len').html(len);
|
75 |
+
} else {
|
76 |
+
jQuery('.cat-desc-len').addClass('length-true').removeClass('length-wrong').html('<span class="good">' + wpms_localize.wpms_cat_metadesc_length + '</span>');
|
77 |
+
}
|
78 |
+
});
|
79 |
+
|
80 |
+
wpms_cat_show_length();
|
81 |
+
});
|
js/dashboard_widgets.js
ADDED
@@ -0,0 +1,160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(document).ready(function ($) {
|
2 |
+
'use strict';
|
3 |
+
var wpms_dash_widgets = 0;
|
4 |
+
// Knob
|
5 |
+
$.ajax({
|
6 |
+
url: ajaxurl,
|
7 |
+
method: 'POST',
|
8 |
+
dataType: 'json',
|
9 |
+
data: {
|
10 |
+
action: 'wpms_dash_permalink',
|
11 |
+
type: 'dashboard_widgets'
|
12 |
+
},
|
13 |
+
success: function (res) {
|
14 |
+
$('.wpms_dash_permalink .percent_1').html(res +'%');
|
15 |
+
$('.wpms_dash_permalink .percent_2 span.percent').html(res +'%');
|
16 |
+
$('.wpms_dash_permalink .percent_3').css('width',res + '%');
|
17 |
+
wpms_dash_widgets++;
|
18 |
+
if(wpms_dash_widgets == 1){
|
19 |
+
wpms_dash_widgets_newcontent();
|
20 |
+
}
|
21 |
+
}
|
22 |
+
});
|
23 |
+
|
24 |
+
function wpms_dash_widgets_newcontent(){
|
25 |
+
$.ajax({
|
26 |
+
url: ajaxurl,
|
27 |
+
method: 'POST',
|
28 |
+
dataType: 'json',
|
29 |
+
data: {
|
30 |
+
action: 'wpms_dash_newcontent',
|
31 |
+
type: 'dashboard_widgets'
|
32 |
+
},
|
33 |
+
success: function (res) {
|
34 |
+
$('.wpms_dash_newcontent .percent_1').html(res[0] +'%');
|
35 |
+
$('.wpms_dash_newcontent .percent_2 span.percent').html(res[1][0]);
|
36 |
+
$('.wpms_dash_newcontent .percent_3').css('width',res[0] + '%');
|
37 |
+
wpms_dash_widgets++;
|
38 |
+
if(wpms_dash_widgets == 2){
|
39 |
+
wpms_dash_widgets_linkmeta();
|
40 |
+
}
|
41 |
+
}
|
42 |
+
});
|
43 |
+
}
|
44 |
+
|
45 |
+
function wpms_dash_widgets_linkmeta(){
|
46 |
+
$.ajax({
|
47 |
+
url: ajaxurl,
|
48 |
+
method: 'POST',
|
49 |
+
dataType: 'json',
|
50 |
+
data: {
|
51 |
+
action: 'wpms_dash_linkmeta',
|
52 |
+
type: 'dashboard_widgets'
|
53 |
+
},
|
54 |
+
success: function (res) {
|
55 |
+
$('.wpms_dash_linkmeta .percent_1').html(res[0] +'%');
|
56 |
+
$('.wpms_dash_linkmeta .percent_2 span.percent').html(res[1][0] + '/' + res[1][1]);
|
57 |
+
$('.wpms_dash_linkmeta .percent_3').css('width',res[0] + '%');
|
58 |
+
wpms_dash_widgets++;
|
59 |
+
if(wpms_dash_widgets == 3){
|
60 |
+
wpms_dash_widgets_metatitle();
|
61 |
+
}
|
62 |
+
}
|
63 |
+
});
|
64 |
+
}
|
65 |
+
|
66 |
+
function wpms_dash_widgets_metatitle(){
|
67 |
+
$.ajax({
|
68 |
+
url: ajaxurl,
|
69 |
+
method: 'POST',
|
70 |
+
dataType: 'json',
|
71 |
+
data: {
|
72 |
+
action: 'wpms_dash_metatitle',
|
73 |
+
type: 'dashboard_widgets'
|
74 |
+
},
|
75 |
+
success: function (res) {
|
76 |
+
$('.wpms_dash_metatitle .percent_1').html(res[0] +'%');
|
77 |
+
$('.wpms_dash_metatitle .percent_2 span.percent').html(res[1][0] + '/' + res[1][1]);
|
78 |
+
$('.wpms_dash_metatitle .percent_3').css('width',res[0] + '%');
|
79 |
+
|
80 |
+
wpms_dash_widgets++;
|
81 |
+
if(wpms_dash_widgets == 4){
|
82 |
+
wpms_dash_widgets_imagemeta(1,0,0,0);
|
83 |
+
}
|
84 |
+
}
|
85 |
+
});
|
86 |
+
}
|
87 |
+
|
88 |
+
function wpms_dash_widgets_imagemeta(page,imgs_statis,imgs_meta,imgs_count){
|
89 |
+
$.ajax({
|
90 |
+
url: ajaxurl,
|
91 |
+
method: 'POST',
|
92 |
+
dataType: 'json',
|
93 |
+
data: {
|
94 |
+
action: 'wpms_dash_imgsmeta',
|
95 |
+
type: 'dashboard_widgets',
|
96 |
+
page : page,
|
97 |
+
imgs_statis : imgs_statis,
|
98 |
+
imgs_metas_statis : imgs_meta,
|
99 |
+
imgs_count : imgs_count
|
100 |
+
},
|
101 |
+
success: function (res) {
|
102 |
+
if(typeof res.status == "undefined"){
|
103 |
+
wpms_dash_widgets_imagemeta(page+1 , res.imgs_statis[0] , res.imgs_metas_statis[0] , res.imgs_count);
|
104 |
+
}else{
|
105 |
+
$('.wpms_dash_imgsresize .percent_1').html(res.imgs_statis[2] +'%');
|
106 |
+
$('.wpms_dash_imgsresize .percent_2 span.percent').html(res.imgs_statis[0] +'/'+ res.imgs_statis[1]);
|
107 |
+
$('.wpms_dash_imgsresize .percent_3').css('width',res.imgs_statis[2] + '%');
|
108 |
+
|
109 |
+
$('.wpms_dash_imgsmeta .percent_1').html(res.imgs_metas_statis[2] +'%');
|
110 |
+
$('.wpms_dash_imgsmeta .percent_2 span.percent').html(res.imgs_metas_statis[0] +'/'+ res.imgs_metas_statis[1]);
|
111 |
+
$('.wpms_dash_imgsmeta .percent_3').css('width',res.imgs_metas_statis[2] + '%');
|
112 |
+
|
113 |
+
wpms_dash_widgets++;
|
114 |
+
if(wpms_dash_widgets == 5){
|
115 |
+
wpms_dash_widgets_metadesc();
|
116 |
+
}
|
117 |
+
}
|
118 |
+
}
|
119 |
+
});
|
120 |
+
}
|
121 |
+
|
122 |
+
function wpms_dash_widgets_metadesc(){
|
123 |
+
$.ajax({
|
124 |
+
url: ajaxurl,
|
125 |
+
method: 'POST',
|
126 |
+
dataType: 'json',
|
127 |
+
data: {
|
128 |
+
action: 'wpms_dash_metadesc',
|
129 |
+
type: 'dashboard_widgets'
|
130 |
+
},
|
131 |
+
success: function (res) {
|
132 |
+
$('.wpms_dash_metadesc .percent_1').html(res[0] +'%');
|
133 |
+
$('.wpms_dash_metadesc .percent_2 span.percent').html(res[1][0] + '/' + res[1][1]);
|
134 |
+
$('.wpms_dash_metadesc .percent_3').css('width',res[0] + '%');
|
135 |
+
}
|
136 |
+
});
|
137 |
+
}
|
138 |
+
|
139 |
+
jQuery('.wpms_dash_widgets').qtip({
|
140 |
+
content: {
|
141 |
+
attr: 'alt'
|
142 |
+
},
|
143 |
+
position: {
|
144 |
+
my: 'bottom center',
|
145 |
+
at: 'top center'
|
146 |
+
},
|
147 |
+
style: {
|
148 |
+
tip: {
|
149 |
+
corner: true,
|
150 |
+
},
|
151 |
+
classes: 'wpms-widgets-qtip'
|
152 |
+
},
|
153 |
+
show: 'hover',
|
154 |
+
hide: {
|
155 |
+
fixed: true,
|
156 |
+
delay: 10
|
157 |
+
}
|
158 |
+
|
159 |
+
});
|
160 |
+
});
|
js/metaseo_admin.js
CHANGED
@@ -314,7 +314,7 @@ function saveMetaContentChanges(metakey, postid, data) {
|
|
314 |
'value': data
|
315 |
};
|
316 |
// We can also pass the url value separately from ajaxurl for front end AJAX implementations
|
317 |
-
jQuery.post(
|
318 |
jQuery('.wpms_loader' + postid).hide();
|
319 |
result = jQuery.parseJSON(response);
|
320 |
|
@@ -369,6 +369,8 @@ function saveChanges(element_id, post_id, meta_type, meta_value) {
|
|
369 |
'post_id': post_id,
|
370 |
'meta_type': meta_type,
|
371 |
'meta_value': meta_value,
|
|
|
|
|
372 |
'addition': {
|
373 |
'meta_key': element.data('meta-key'),
|
374 |
'meta_type': element.data('meta-type'),
|
@@ -381,7 +383,7 @@ function saveChanges(element_id, post_id, meta_type, meta_value) {
|
|
381 |
|
382 |
// We can also pass the url value separately from ajaxurl for front end AJAX implementations
|
383 |
jQuery.ajax({
|
384 |
-
url:
|
385 |
async: false,
|
386 |
type: 'post',
|
387 |
data: postData,
|
@@ -415,7 +417,7 @@ function saveChanges(element_id, post_id, meta_type, meta_value) {
|
|
415 |
}
|
416 |
//Scan post and update post_meta
|
417 |
var img = jQuery('[data-img-post-id="' + postData['addition']['img_post_id'] + '"]');
|
418 |
-
|
419 |
if (img.length > 0) {
|
420 |
_metaSeoScanImages(
|
421 |
|
@@ -427,6 +429,16 @@ function saveChanges(element_id, post_id, meta_type, meta_value) {
|
|
427 |
);
|
428 |
}
|
429 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
430 |
} else {
|
431 |
element.val(response.iname);
|
432 |
savedInfo.removeClass('metaseo-msg-success').addClass('metaseo-msg-warning')
|
@@ -466,7 +478,7 @@ function _metaSeoScanImages(imgs) {
|
|
466 |
}
|
467 |
|
468 |
jQuery.ajax({
|
469 |
-
url:
|
470 |
method: 'post',
|
471 |
data: {'action': 'scanPosts', 'imgs': imgs},
|
472 |
dataType: 'json',
|
@@ -577,7 +589,7 @@ function optimize_imgs(element) {
|
|
577 |
alert('Cant do the optimization because of missing image ID.\\nPlease check again!');
|
578 |
} else {
|
579 |
jQuery.ajax({
|
580 |
-
url:
|
581 |
async: false,
|
582 |
data: {
|
583 |
'action': 'optimize_imgs',
|
@@ -709,7 +721,7 @@ function showPostsList(element) {
|
|
709 |
|
710 |
if (that.data('img-name') != '') {
|
711 |
jQuery.ajax({
|
712 |
-
url:
|
713 |
type: 'post',
|
714 |
dataType: 'html',
|
715 |
data: data,
|
@@ -747,7 +759,7 @@ function importMetaData(that, event) {
|
|
747 |
event.preventDefault();
|
748 |
if (that.id === '_aio_' || that.id === '_yoast_') {
|
749 |
jQuery.ajax({
|
750 |
-
url:
|
751 |
type: 'post',
|
752 |
data: {'action': 'import_meta_data', 'plugin': that.id},
|
753 |
dataType: 'json',
|
@@ -948,7 +960,7 @@ jQuery(document).ready(function ($) {
|
|
948 |
|
949 |
if (plugin === '_aio_' || plugin === '_yoast_') {
|
950 |
$.ajax({
|
951 |
-
url:
|
952 |
type: 'post',
|
953 |
data: {'action': 'dismiss_import_meta', 'plugin': plugin},
|
954 |
dataType: 'json',
|
314 |
'value': data
|
315 |
};
|
316 |
// We can also pass the url value separately from ajaxurl for front end AJAX implementations
|
317 |
+
jQuery.post(wpms_localize.ajax_url, postData, function (response) {
|
318 |
jQuery('.wpms_loader' + postid).hide();
|
319 |
result = jQuery.parseJSON(response);
|
320 |
|
369 |
'post_id': post_id,
|
370 |
'meta_type': meta_type,
|
371 |
'meta_value': meta_value,
|
372 |
+
'img_name': element.closest('tr').find('.fix-metas').data('img-name'),
|
373 |
+
'opt_key': element.closest('tr').find('.fix-metas').data('opt-key'),
|
374 |
'addition': {
|
375 |
'meta_key': element.data('meta-key'),
|
376 |
'meta_type': element.data('meta-type'),
|
383 |
|
384 |
// We can also pass the url value separately from ajaxurl for front end AJAX implementations
|
385 |
jQuery.ajax({
|
386 |
+
url: wpms_localize.ajax_url,
|
387 |
async: false,
|
388 |
type: 'post',
|
389 |
data: postData,
|
417 |
}
|
418 |
//Scan post and update post_meta
|
419 |
var img = jQuery('[data-img-post-id="' + postData['addition']['img_post_id'] + '"]');
|
420 |
+
|
421 |
if (img.length > 0) {
|
422 |
_metaSeoScanImages(
|
423 |
|
429 |
);
|
430 |
}
|
431 |
|
432 |
+
if(typeof response.type != "undefined" && response.type == 'auto_override'){
|
433 |
+
_metaSeoScanImages(
|
434 |
+
{
|
435 |
+
'name': response.imgname,
|
436 |
+
'img_post_id': response.pid
|
437 |
+
}
|
438 |
+
|
439 |
+
);
|
440 |
+
}
|
441 |
+
|
442 |
} else {
|
443 |
element.val(response.iname);
|
444 |
savedInfo.removeClass('metaseo-msg-success').addClass('metaseo-msg-warning')
|
478 |
}
|
479 |
|
480 |
jQuery.ajax({
|
481 |
+
url: wpms_localize.ajax_url,
|
482 |
method: 'post',
|
483 |
data: {'action': 'scanPosts', 'imgs': imgs},
|
484 |
dataType: 'json',
|
589 |
alert('Cant do the optimization because of missing image ID.\\nPlease check again!');
|
590 |
} else {
|
591 |
jQuery.ajax({
|
592 |
+
url: wpms_localize.ajax_url,
|
593 |
async: false,
|
594 |
data: {
|
595 |
'action': 'optimize_imgs',
|
721 |
|
722 |
if (that.data('img-name') != '') {
|
723 |
jQuery.ajax({
|
724 |
+
url: wpms_localize.ajax_url,
|
725 |
type: 'post',
|
726 |
dataType: 'html',
|
727 |
data: data,
|
759 |
event.preventDefault();
|
760 |
if (that.id === '_aio_' || that.id === '_yoast_') {
|
761 |
jQuery.ajax({
|
762 |
+
url: wpms_localize.ajax_url,
|
763 |
type: 'post',
|
764 |
data: {'action': 'import_meta_data', 'plugin': that.id},
|
765 |
dataType: 'json',
|
960 |
|
961 |
if (plugin === '_aio_' || plugin === '_yoast_') {
|
962 |
$.ajax({
|
963 |
+
url: wpms_localize.ajax_url,
|
964 |
type: 'post',
|
965 |
data: {'action': 'dismiss_import_meta', 'plugin': plugin},
|
966 |
dataType: 'json',
|
js/notification.js
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(document).ready(function($){
|
2 |
+
$('.wpmsclose_notification').click(function(){
|
3 |
+
var $this = $(this);
|
4 |
+
var page = $this.data('page');
|
5 |
+
$.ajax({
|
6 |
+
url: ajaxurl,
|
7 |
+
method: 'POST',
|
8 |
+
dataType: 'json',
|
9 |
+
data:{
|
10 |
+
action: 'wpms_setcookie_notification',
|
11 |
+
page: page
|
12 |
+
},
|
13 |
+
success: function(res){
|
14 |
+
if(res){
|
15 |
+
$this.closest('.wpms_wrap_notification').remove();
|
16 |
+
}
|
17 |
+
}
|
18 |
+
});
|
19 |
+
});
|
20 |
+
});
|
languages/wp-meta-seo-en_US.mo
CHANGED
Binary file
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: JoomUnited
|
3 |
Tags: google, webmaster tools, keywords, meta, meta description, meta keywords, meta title, robots meta, search engine optimization, seo, wordpress seo, yahoo, image optimization, image resize, custom post seo, redirect, redirection, 301, broken link
|
4 |
Requires at least: 4.0
|
5 |
-
Tested up to: 4.7.
|
6 |
-
Stable tag: 3.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -36,6 +36,8 @@ WP Meta SEO gives you the control over all your meta content and images. Bulk SE
|
|
36 |
|
37 |
> <a href="https://www.joomunited.com/wordpress-products/wp-meta-seo" rel="friend">More information and feature details here!</a>
|
38 |
|
|
|
|
|
39 |
|
40 |
= Bulk meta edition and image resizing =
|
41 |
|
@@ -101,7 +103,7 @@ The redirect manager will help you to fix all types of 404 errors you can encoun
|
|
101 |
* Setup update frequency and priority for each sitemap link
|
102 |
|
103 |
|
104 |
-
**More details here:** http://www.joomunited.com/wordpress-products/wp-meta-seo
|
105 |
|
106 |
= Video demo: =
|
107 |
[vimeo https://vimeo.com/113695156]
|
@@ -155,19 +157,18 @@ The redirect manager will help you to fix all types of 404 errors you can encoun
|
|
155 |
* Google Ananlytics tracking and statistics display
|
156 |
|
157 |
= Main plugins from JoomUnited: =
|
158 |
-
* WP Media Folder: https://www.joomunited.com/wordpress-products/wp-media-folder
|
159 |
-
* WP File Download: https://www.joomunited.com/wordpress-products/wp-table-manager
|
160 |
-
* WP Table Manager: https://www.joomunited.com/wordpress-products/wp-file-download
|
161 |
-
* WP Speed of Light: https://www.joomunited.com/wordpress-products/wp-speed-of-light
|
162 |
-
* WP Latest Posts: https://www.joomunited.com/wordpress-products/wp-latest-posts
|
163 |
|
164 |
-
**Still not sure! test the plugin live on a demo website:** https://addendio.com/try-plugin/?slug=wp-meta-seo
|
165 |
|
166 |
= Support =
|
167 |
|
168 |
A HTML support document is provided with WP Meta SEO on JoomUnited website
|
169 |
Feel free to ask SEO questions on our forum or here in the support section
|
170 |
-
**Documentation here:** https://www.joomunited.com/documentation/wp-meta-seo-documentation
|
171 |
|
172 |
== Installation ==
|
173 |
|
@@ -254,6 +255,14 @@ It could be! if you have a lot of pages that need to be indexed with no specific
|
|
254 |
|
255 |
== Changelog ==
|
256 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
257 |
= 3.2.6 =
|
258 |
* Add : Add builtin translation tool
|
259 |
* Fix : Wrong function used to get description length
|
@@ -426,7 +435,7 @@ Sitemap feature with XML for the Google Search console and HTML with display opt
|
|
426 |
|
427 |
= SEO vision =
|
428 |
|
429 |
-
Search engines are a major source of traffic for most websites. That
|
430 |
WP Meta SEO has been created to give to professionals and final users some real SEO tools to get better SEO rank. We think that SEO has to be something logic and durable. Overall SEO optimization requires a lot of time for each website, each client.
|
431 |
|
432 |
WP Meta SEO provides some automatic tools to analyze your content and give to search engine a better content to analyze.
|
@@ -437,4 +446,4 @@ Site-wide SEO: it's more about your whole site and structure between multiple ar
|
|
437 |
|
438 |
And... don't forget to check each month your SEO dashboard :)
|
439 |
|
440 |
-
PHP 5.3+, WP 4.3+
|
2 |
Contributors: JoomUnited
|
3 |
Tags: google, webmaster tools, keywords, meta, meta description, meta keywords, meta title, robots meta, search engine optimization, seo, wordpress seo, yahoo, image optimization, image resize, custom post seo, redirect, redirection, 301, broken link
|
4 |
Requires at least: 4.0
|
5 |
+
Tested up to: 4.7.3
|
6 |
+
Stable tag: 3.3.0
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
36 |
|
37 |
> <a href="https://www.joomunited.com/wordpress-products/wp-meta-seo" rel="friend">More information and feature details here!</a>
|
38 |
|
39 |
+
**<a href="https://addendio.com/try-plugin/?slug=wp-meta-seo" rel="friend">Still not sure! test the plugin live on a sandbox demo website</a>**
|
40 |
+
|
41 |
|
42 |
= Bulk meta edition and image resizing =
|
43 |
|
103 |
* Setup update frequency and priority for each sitemap link
|
104 |
|
105 |
|
106 |
+
**More details here:** <a href="http://www.joomunited.com/wordpress-products/wp-meta-seo" rel="friend">http://www.joomunited.com/wordpress-products/wp-meta-seo</a>
|
107 |
|
108 |
= Video demo: =
|
109 |
[vimeo https://vimeo.com/113695156]
|
157 |
* Google Ananlytics tracking and statistics display
|
158 |
|
159 |
= Main plugins from JoomUnited: =
|
160 |
+
* WP Media Folder: <a href="https://www.joomunited.com/wordpress-products/wp-media-folder" rel="friend"> https://www.joomunited.com/wordpress-products/wp-media-folder</a>
|
161 |
+
* WP File Download: <a href="https://www.joomunited.com/wordpress-products/wp-table-manager" rel="friend"> https://www.joomunited.com/wordpress-products/wp-table-manager</a>
|
162 |
+
* WP Table Manager: <a href="https://www.joomunited.com/wordpress-products/wp-file-download" rel="friend">https://www.joomunited.com/wordpress-products/wp-file-download</a>
|
163 |
+
* WP Speed of Light: <a href="https://www.joomunited.com/wordpress-products/wp-speed-of-light" rel="friend">https://www.joomunited.com/wordpress-products/wp-speed-of-light</a>
|
164 |
+
* WP Latest Posts: <a href="https://www.joomunited.com/wordpress-products/wp-latest-posts" rel="friend">https://www.joomunited.com/wordpress-products/wp-latest-posts</a>
|
165 |
|
|
|
166 |
|
167 |
= Support =
|
168 |
|
169 |
A HTML support document is provided with WP Meta SEO on JoomUnited website
|
170 |
Feel free to ask SEO questions on our forum or here in the support section
|
171 |
+
**Documentation here:** <a href="https://www.joomunited.com/documentation/wp-meta-seo-documentation" rel="friend">https://www.joomunited.com/documentation/wp-meta-seo-documentation</a>
|
172 |
|
173 |
== Installation ==
|
174 |
|
255 |
|
256 |
== Changelog ==
|
257 |
|
258 |
+
= 3.3.0 =
|
259 |
+
* Add : If an image information are filled, add it by default if empty if image is re-used
|
260 |
+
* Add : Compatibility with WPML, Polylang for meta edition and Media SEO content
|
261 |
+
* Add : Possibility to edit meta information on categories
|
262 |
+
* Add : Pro version notifications of features in some views
|
263 |
+
* Add : Dashboard widget with 6 SEO criteria
|
264 |
+
* Fix : Change the 404 error page title to remove the plugin name by default
|
265 |
+
|
266 |
= 3.2.6 =
|
267 |
* Add : Add builtin translation tool
|
268 |
* Fix : Wrong function used to get description length
|
435 |
|
436 |
= SEO vision =
|
437 |
|
438 |
+
Search engines are a major source of traffic for most websites. That's why our users often ask us for SEO tips and plugins that can help improve SEO of their WordPress sites.
|
439 |
WP Meta SEO has been created to give to professionals and final users some real SEO tools to get better SEO rank. We think that SEO has to be something logic and durable. Overall SEO optimization requires a lot of time for each website, each client.
|
440 |
|
441 |
WP Meta SEO provides some automatic tools to analyze your content and give to search engine a better content to analyze.
|
446 |
|
447 |
And... don't forget to check each month your SEO dashboard :)
|
448 |
|
449 |
+
PHP 5.3+, WP 4.3+
|
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: 3.
|
8 |
* Text Domain: wp-meta-seo
|
9 |
* Domain Path: /languages
|
10 |
* Author: JoomUnited
|
@@ -62,7 +62,7 @@ if (version_compare(PHP_VERSION, '5.3', '<')) {
|
|
62 |
|
63 |
//Include the jutranslation helpers
|
64 |
include_once('jutranslation' . DIRECTORY_SEPARATOR . 'jutranslation.php');
|
65 |
-
\Joomunited\WPMetaSEO\Jutranslation\Jutranslation::init
|
66 |
|
67 |
|
68 |
if (!defined('WPMETASEO_MINIMUM_WP_VERSION'))
|
@@ -75,7 +75,7 @@ if (!defined('URL'))
|
|
75 |
define('URL', get_site_url());
|
76 |
|
77 |
if (!defined('WPMSEO_VERSION')) {
|
78 |
-
define('WPMSEO_VERSION', '3.
|
79 |
}
|
80 |
|
81 |
if (!defined('WPMS_CLIENTID')) {
|
@@ -86,6 +86,14 @@ if (!defined('WPMS_CLIENTSECRET')) {
|
|
86 |
define('WPMS_CLIENTSECRET', 'tyF4XICemXdORWX2qjyazfqP');
|
87 |
}
|
88 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
if (!defined('WPMSEO_FILE'))
|
90 |
define('WPMSEO_FILE', __FILE__);
|
91 |
|
@@ -276,8 +284,20 @@ if (is_admin()) {
|
|
276 |
|
277 |
if (is_category() || is_tag() || is_tax()) {
|
278 |
$term = $wp_query->get_queried_object();
|
279 |
-
$
|
280 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
281 |
$page_follow = 'follow';
|
282 |
}
|
283 |
|
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: 3.3.0
|
8 |
* Text Domain: wp-meta-seo
|
9 |
* Domain Path: /languages
|
10 |
* Author: JoomUnited
|
62 |
|
63 |
//Include the jutranslation helpers
|
64 |
include_once('jutranslation' . DIRECTORY_SEPARATOR . 'jutranslation.php');
|
65 |
+
call_user_func('\Joomunited\WPMetaSEO\Jutranslation\Jutranslation::init',__FILE__, 'wp-meta-seo', 'WP Meta SEO', 'wp-meta-seo', 'languages' . DIRECTORY_SEPARATOR . 'wp-meta-seo-en_US.mo');
|
66 |
|
67 |
|
68 |
if (!defined('WPMETASEO_MINIMUM_WP_VERSION'))
|
75 |
define('URL', get_site_url());
|
76 |
|
77 |
if (!defined('WPMSEO_VERSION')) {
|
78 |
+
define('WPMSEO_VERSION', '3.3.0');
|
79 |
}
|
80 |
|
81 |
if (!defined('WPMS_CLIENTID')) {
|
86 |
define('WPMS_CLIENTSECRET', 'tyF4XICemXdORWX2qjyazfqP');
|
87 |
}
|
88 |
|
89 |
+
if (!defined('WPMS_CAT_METATITLE_LENGTH')) {
|
90 |
+
define('WPMS_CAT_METATITLE_LENGTH', 69);
|
91 |
+
}
|
92 |
+
|
93 |
+
if (!defined('WPMS_CAT_METADESC_LENGTH')) {
|
94 |
+
define('WPMS_CAT_METADESC_LENGTH', 156);
|
95 |
+
}
|
96 |
+
|
97 |
if (!defined('WPMSEO_FILE'))
|
98 |
define('WPMSEO_FILE', __FILE__);
|
99 |
|
284 |
|
285 |
if (is_category() || is_tag() || is_tax()) {
|
286 |
$term = $wp_query->get_queried_object();
|
287 |
+
$cat_metatitle = get_term_meta($term->term_id,'wpms_category_metatitle',true);
|
288 |
+
$cat_metadesc = get_term_meta($term->term_id,'wpms_category_metadesc',true);
|
289 |
+
if(isset($cat_metatitle) && $cat_metatitle != ''){
|
290 |
+
$meta_title = $meta_title_esc = $meta_facebook_title = $meta_twitter_title = esc_attr($cat_metatitle);
|
291 |
+
}else{
|
292 |
+
$meta_title = $meta_title_esc = $meta_facebook_title = $meta_twitter_title = esc_attr($term->name);
|
293 |
+
}
|
294 |
+
|
295 |
+
if(isset($cat_metadesc) && $cat_metadesc != ''){
|
296 |
+
$meta_description_esc = $meta_facebook_desc = $meta_twitter_desc = esc_attr($cat_metadesc);
|
297 |
+
}else{
|
298 |
+
$meta_description_esc = $meta_facebook_desc = $meta_twitter_desc = esc_attr($term->description);
|
299 |
+
}
|
300 |
+
|
301 |
$page_follow = 'follow';
|
302 |
}
|
303 |
|