Version Description
- Add link SEO title field in link editor tool
- Add a SEO bulk edition view on your links titles (of all your content)
- Automatic meta SEO addition for category view: add category title as meta title and category description as meta description
- Add SEO dashboard check for link titles
- Fix WooCommerce meta description and title in category view (automatic)
- Fix WP Meta SEO language to be conform to plugin directory translation tool
Download this release
Release Info
Developer | JoomUnited |
Plugin | WP Meta SEO |
Version | 1.7.0 |
Comparing to | |
See all releases |
Code changes from version 1.6.0 to 1.7.0
- css/metaseo-quirk.css +1 -1
- css/metaseo_admin.css +41 -0
- inc/class-metaseo-mutils.php +5 -5
- inc/class.image-helper.php +11 -10
- inc/class.metaseo-admin.php +120 -61
- inc/class.metaseo-content-list-table.php +21 -11
- inc/class.metaseo-dashboard.php +35 -6
- inc/class.metaseo-image-list-table.php +36 -36
- inc/class.metaseo-link-list-table.php +551 -0
- inc/class.metaseo-metabox.php +56 -56
- inc/pages/content-meta.php +5 -2
- inc/pages/dashboard.php +45 -23
- inc/pages/image-meta.php +1 -1
- inc/pages/link-meta.php +44 -0
- inc/pages/settings.php +1 -1
- js/metaseo_admin.js +39 -0
- js/wpms-link-title-field.js +145 -0
- languages/{wpms-en_US.mo → wp-meta-seo-en_US.mo} +0 -0
- languages/{wpms-en_US.po → wp-meta-seo-en_US.po} +36 -0
- languages/wp-meta-seo-fr_FR.mo +0 -0
- languages/{wpms-fr_FR.po → wp-meta-seo-fr_FR.po} +126 -74
- languages/{wpms.pot → wp-meta-seo.pot} +36 -0
- languages/wpms-fr_FR.mo +0 -0
- readme.txt +41 -7
- wp-meta-seo.php +23 -9
css/metaseo-quirk.css
CHANGED
@@ -724,7 +724,7 @@ pre code {
|
|
724 |
|
725 |
.col-sm-6 {
|
726 |
width: 50%;
|
727 |
-
max-height:
|
728 |
}
|
729 |
|
730 |
.col-sm-5 {
|
724 |
|
725 |
.col-sm-6 {
|
726 |
width: 50%;
|
727 |
+
max-height: 170px;
|
728 |
}
|
729 |
|
730 |
.col-sm-5 {
|
css/metaseo_admin.css
CHANGED
@@ -345,4 +345,45 @@ strong {
|
|
345 |
background: url("../img/loop.png") no-repeat scroll 0 50% transparent;
|
346 |
display: block;
|
347 |
padding-left: 45px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
348 |
}
|
345 |
background: url("../img/loop.png") no-repeat scroll 0 50% transparent;
|
346 |
display: block;
|
347 |
padding-left: 45px;
|
348 |
+
}
|
349 |
+
|
350 |
+
.metaseo_link_title{
|
351 |
+
width: 200px;
|
352 |
+
height:28px;
|
353 |
+
float: left;
|
354 |
+
}
|
355 |
+
|
356 |
+
.wpms_update_link{
|
357 |
+
display: none;
|
358 |
+
float: left;
|
359 |
+
background: #00a0d2;
|
360 |
+
border-color: #0073aa;
|
361 |
+
box-shadow: inset 0 1px 0 rgba( 120, 200, 230, 0.5 ), 0 1px 0 rgba( 0, 0, 0, 0.15 );
|
362 |
+
color: #fff;
|
363 |
+
text-decoration: none;
|
364 |
+
vertical-align: top;
|
365 |
+
font-size: 13px;
|
366 |
+
line-height: 26px;
|
367 |
+
height: 28px;
|
368 |
+
margin: 0;
|
369 |
+
padding: 0 10px 1px;
|
370 |
+
cursor: pointer;
|
371 |
+
border-width: 1px;
|
372 |
+
border-style: solid;
|
373 |
+
-webkit-appearance: none;
|
374 |
+
border-radius: 3px;
|
375 |
+
white-space: nowrap;
|
376 |
+
box-sizing: border-box;
|
377 |
+
}
|
378 |
+
|
379 |
+
.wpms_mesage_link{
|
380 |
+
display:none;
|
381 |
+
line-height:28px;
|
382 |
+
color: #7ad03a;
|
383 |
+
}
|
384 |
+
|
385 |
+
.wpms_error_mesage_link{
|
386 |
+
display:none;
|
387 |
+
line-height:28px;
|
388 |
+
color: #F00;
|
389 |
}
|
inc/class-metaseo-mutils.php
CHANGED
@@ -23,27 +23,27 @@ class WPMSEO_Utils {
|
|
23 |
}
|
24 |
switch ($val) {
|
25 |
case 0:
|
26 |
-
$score = __('N/A', '
|
27 |
$css = 'na';
|
28 |
break;
|
29 |
case 4:
|
30 |
case 5:
|
31 |
-
$score = __('Poor', '
|
32 |
$css = 'poor';
|
33 |
break;
|
34 |
case 6:
|
35 |
case 7:
|
36 |
-
$score = __('OK', '
|
37 |
$css = 'ok';
|
38 |
break;
|
39 |
case 8:
|
40 |
case 9:
|
41 |
case 10:
|
42 |
-
$score = __('Good', '
|
43 |
$css = 'good';
|
44 |
break;
|
45 |
default:
|
46 |
-
$score = __('Bad', '
|
47 |
$css = 'bad';
|
48 |
break;
|
49 |
}
|
23 |
}
|
24 |
switch ($val) {
|
25 |
case 0:
|
26 |
+
$score = __('N/A', 'wp-meta-seo');
|
27 |
$css = 'na';
|
28 |
break;
|
29 |
case 4:
|
30 |
case 5:
|
31 |
+
$score = __('Poor', 'wp-meta-seo');
|
32 |
$css = 'poor';
|
33 |
break;
|
34 |
case 6:
|
35 |
case 7:
|
36 |
+
$score = __('OK', 'wp-meta-seo');
|
37 |
$css = 'ok';
|
38 |
break;
|
39 |
case 8:
|
40 |
case 9:
|
41 |
case 10:
|
42 |
+
$score = __('Good', 'wp-meta-seo');
|
43 |
$css = 'good';
|
44 |
break;
|
45 |
default:
|
46 |
+
$score = __('Bad', 'wp-meta-seo');
|
47 |
$css = 'bad';
|
48 |
break;
|
49 |
}
|
inc/class.image-helper.php
CHANGED
@@ -123,6 +123,7 @@ class ImageHelper{
|
|
123 |
public static function IScan($imgs = array(), $content){
|
124 |
$ifound = array();
|
125 |
$doc = new DOMDocument();
|
|
|
126 |
@$doc->loadHtml($content);
|
127 |
$tags = $doc->getElementsByTagName('img');
|
128 |
|
@@ -344,15 +345,15 @@ class ImageHelper{
|
|
344 |
$im = ' image ';
|
345 |
}
|
346 |
|
347 |
-
$msg[$iID]['iNotGood']['msg'] = __($results['iNotGoodTotal'][$iID] .$im. 'with wrong size', '
|
348 |
$msg[$iID]['iNotGood']['warning'] = true;
|
349 |
|
350 |
-
$msg[$iID]['iNotGood']['button'] = '<a href="javascript:void(0);" class=" img-resize button button-primary" data-img-name="'.$_imgs[$iID].'" data-post-id="'. $iID.'" data-opt-key="resize_image" onclick="showPostsList(this)">'.__('Resize image', '
|
351 |
|
352 |
update_post_meta($iID, '_metaseo_resize_image_counter', $results['iNotGoodTotal'][$iID]);
|
353 |
update_post_meta($iID, '_metaseo_resize_image', $post_group);
|
354 |
}else{
|
355 |
-
$msg[$iID]['iNotGood']['msg'] = __('Image sizes are good!', '
|
356 |
$msg[$iID]['iNotGood']['warning'] = false;
|
357 |
|
358 |
delete_post_meta($iID, '_metaseo_resize_image_counter');
|
@@ -369,16 +370,16 @@ class ImageHelper{
|
|
369 |
if($mkey == 'alt'){ $text = ' text'; }
|
370 |
|
371 |
if($results['imNotGoodTotal'][$iID][$mkey] > 1){
|
372 |
-
$msg[$iID]['imNotGood']['msg'][$mkey] = __($results['imNotGoodTotal'][$iID][$mkey] . ' ' . $mkey . $text . 's are missing', '
|
373 |
}
|
374 |
elseif($results['imNotGoodTotal'][$iID][$mkey] == 1){
|
375 |
-
$msg[$iID]['imNotGood']['msg'][$mkey] = __($results['imNotGoodTotal'][$iID][$mkey] . ' ' . $mkey . $text . ' is missing', '
|
376 |
}
|
377 |
|
378 |
}
|
379 |
|
380 |
$msg[$iID]['imNotGood']['warning'] = true;
|
381 |
-
$msg[$iID]['imNotGood']['button'] = '<a href="javascript:void(0);" class=" fix-metas button button-primary" data-img-name="'.$_imgs[$iID].'" data-post-id="'. $iID.'" data-opt-key="fix_metas" onclick="showPostsList(this)">'.__('Fix meta', '
|
382 |
|
383 |
|
384 |
update_post_meta($iID, '_metaseo_fix_metas_counter', count($post_group));
|
@@ -388,7 +389,7 @@ class ImageHelper{
|
|
388 |
if( $results['imNotGoodTotal'][$iID]['alt'] == 0
|
389 |
&& $results['imNotGoodTotal'][$iID]['title'] == 0 ){
|
390 |
if($results['iNotGoodTotal'][$iID] != -1){
|
391 |
-
$msg[$iID]['imNotGood']['button'] = '<a href="javascript:void(0);" class=" fix-metas button" data-img-name="'.$_imgs[$iID].'" data-post-id="'. $iID.'" data-opt-key="fix_metas" onclick="showPostsList(this)">'.__('Edit meta', '
|
392 |
}
|
393 |
else{
|
394 |
$msg[$iID]['imNotGood']['button'] = '';
|
@@ -414,7 +415,7 @@ class ImageHelper{
|
|
414 |
$query = "SELECT `post_content` FROM $wpdb->posts WHERE `ID`=" . $post_id;
|
415 |
|
416 |
if(!($post_content = @$wpdb->get_row($query)->post_content)){
|
417 |
-
$ret['msg'] = __('This post is not existed or deleted, please choose one another!','
|
418 |
|
419 |
return $ret;
|
420 |
}
|
@@ -456,10 +457,10 @@ class ImageHelper{
|
|
456 |
|
457 |
if($id){
|
458 |
$ret['success'] = true;
|
459 |
-
$ret['msg'] = __('Well! This image is so good now.', '
|
460 |
}
|
461 |
else{
|
462 |
-
$ret['msg'] = __('Opps! An error occured when updating the post, please try again', '
|
463 |
}
|
464 |
|
465 |
return $ret;
|
123 |
public static function IScan($imgs = array(), $content){
|
124 |
$ifound = array();
|
125 |
$doc = new DOMDocument();
|
126 |
+
libxml_use_internal_errors( true );
|
127 |
@$doc->loadHtml($content);
|
128 |
$tags = $doc->getElementsByTagName('img');
|
129 |
|
345 |
$im = ' image ';
|
346 |
}
|
347 |
|
348 |
+
$msg[$iID]['iNotGood']['msg'] = __($results['iNotGoodTotal'][$iID] .$im. 'with wrong size', 'wp-meta-seo');
|
349 |
$msg[$iID]['iNotGood']['warning'] = true;
|
350 |
|
351 |
+
$msg[$iID]['iNotGood']['button'] = '<a href="javascript:void(0);" class=" img-resize button button-primary" data-img-name="'.$_imgs[$iID].'" data-post-id="'. $iID.'" data-opt-key="resize_image" onclick="showPostsList(this)">'.__('Resize image', 'wp-meta-seo').'<span class="spinner-light"></span></a>';
|
352 |
|
353 |
update_post_meta($iID, '_metaseo_resize_image_counter', $results['iNotGoodTotal'][$iID]);
|
354 |
update_post_meta($iID, '_metaseo_resize_image', $post_group);
|
355 |
}else{
|
356 |
+
$msg[$iID]['iNotGood']['msg'] = __('Image sizes are good!', 'wp-meta-seo');
|
357 |
$msg[$iID]['iNotGood']['warning'] = false;
|
358 |
|
359 |
delete_post_meta($iID, '_metaseo_resize_image_counter');
|
370 |
if($mkey == 'alt'){ $text = ' text'; }
|
371 |
|
372 |
if($results['imNotGoodTotal'][$iID][$mkey] > 1){
|
373 |
+
$msg[$iID]['imNotGood']['msg'][$mkey] = __($results['imNotGoodTotal'][$iID][$mkey] . ' ' . $mkey . $text . 's are missing', 'wp-meta-seo');
|
374 |
}
|
375 |
elseif($results['imNotGoodTotal'][$iID][$mkey] == 1){
|
376 |
+
$msg[$iID]['imNotGood']['msg'][$mkey] = __($results['imNotGoodTotal'][$iID][$mkey] . ' ' . $mkey . $text . ' is missing', 'wp-meta-seo');
|
377 |
}
|
378 |
|
379 |
}
|
380 |
|
381 |
$msg[$iID]['imNotGood']['warning'] = true;
|
382 |
+
$msg[$iID]['imNotGood']['button'] = '<a href="javascript:void(0);" class=" fix-metas button button-primary" data-img-name="'.$_imgs[$iID].'" data-post-id="'. $iID.'" data-opt-key="fix_metas" onclick="showPostsList(this)">'.__('Fix meta', 'wp-meta-seo').'<span class="spinner-light"></span></a>';
|
383 |
|
384 |
|
385 |
update_post_meta($iID, '_metaseo_fix_metas_counter', count($post_group));
|
389 |
if( $results['imNotGoodTotal'][$iID]['alt'] == 0
|
390 |
&& $results['imNotGoodTotal'][$iID]['title'] == 0 ){
|
391 |
if($results['iNotGoodTotal'][$iID] != -1){
|
392 |
+
$msg[$iID]['imNotGood']['button'] = '<a href="javascript:void(0);" class=" fix-metas button" data-img-name="'.$_imgs[$iID].'" data-post-id="'. $iID.'" data-opt-key="fix_metas" onclick="showPostsList(this)">'.__('Edit meta', 'wp-meta-seo').'<span class="spinner-light"></span></a>';
|
393 |
}
|
394 |
else{
|
395 |
$msg[$iID]['imNotGood']['button'] = '';
|
415 |
$query = "SELECT `post_content` FROM $wpdb->posts WHERE `ID`=" . $post_id;
|
416 |
|
417 |
if(!($post_content = @$wpdb->get_row($query)->post_content)){
|
418 |
+
$ret['msg'] = __('This post is not existed or deleted, please choose one another!','wp-meta-seo');
|
419 |
|
420 |
return $ret;
|
421 |
}
|
457 |
|
458 |
if($id){
|
459 |
$ret['success'] = true;
|
460 |
+
$ret['msg'] = __('Well! This image is so good now.', 'wp-meta-seo');
|
461 |
}
|
462 |
else{
|
463 |
+
$ret['msg'] = __('Opps! An error occured when updating the post, please try again', 'wp-meta-seo');
|
464 |
}
|
465 |
|
466 |
return $ret;
|
inc/class.metaseo-admin.php
CHANGED
@@ -18,7 +18,8 @@ class MetaSeo_Admin {
|
|
18 |
"metaseo_showkeywords"=>0,
|
19 |
"metaseo_showtmetablock"=>1,
|
20 |
"metaseo_showsocial" => 1,
|
21 |
-
"metaseo_seovalidate" => 0
|
|
|
22 |
);
|
23 |
$settings = get_option( '_metaseo_settings' );
|
24 |
|
@@ -55,6 +56,16 @@ class MetaSeo_Admin {
|
|
55 |
if ( '0' == get_option( 'blog_public' )) {
|
56 |
add_action( 'admin_notices', array( $this, 'wpms_public_warning' ) );
|
57 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
}
|
59 |
|
60 |
function wpms_set_ignore(){
|
@@ -92,15 +103,15 @@ class MetaSeo_Admin {
|
|
92 |
<a href="javascript:wpmsSetIgnore(\'wpms_public_warning\',\'robotsmessage\',\'%3$s\');" class="button">%4$s</a>
|
93 |
</p>
|
94 |
</div>',
|
95 |
-
__( 'Your website is not indexed by search engine because of your WordPress settings.', '
|
96 |
-
sprintf( __( '%sFix it now%s', '
|
97 |
esc_js( wp_create_nonce( 'wpseo-ignore' ) ),
|
98 |
-
__( 'OK I know that.', '
|
99 |
);
|
100 |
}
|
101 |
|
102 |
function wpms_load_langguage(){
|
103 |
-
load_plugin_textdomain( '
|
104 |
}
|
105 |
|
106 |
function metaseo_create_field($data_title,$alt,$dashicon,$label,$value_hidden){
|
@@ -111,13 +122,13 @@ class MetaSeo_Admin {
|
|
111 |
|
112 |
function metaseo_reload_analysis() {
|
113 |
$tooltip_page = array();
|
114 |
-
$tooltip_page['title_in_heading'] = __('Check if a word of this content title is also in a title heading (h1, h2...)','
|
115 |
-
$tooltip_page['title_in_content'] = __('Check if a word of this content title is also in the text','
|
116 |
-
$tooltip_page['page_url'] = __('Does the page title match with the permalink (URL structure)','
|
117 |
-
$tooltip_page['meta_title'] = __('Is the meta title of this page filled?','
|
118 |
-
$tooltip_page['meta_desc'] = __('Is the meta description of this page filled?','
|
119 |
-
$tooltip_page['image_resize'] = __('Check for image HTML resizing in content (usually image resized using handles)','
|
120 |
-
$tooltip_page['image_alt'] = __('Check for image Alt text and title','
|
121 |
if(empty($_POST['datas'])){
|
122 |
wp_send_json(false);
|
123 |
}
|
@@ -146,14 +157,14 @@ class MetaSeo_Admin {
|
|
146 |
}
|
147 |
|
148 |
if($test){
|
149 |
-
$output .= $this->metaseo_create_field('heading_title',$tooltip_page['title_in_heading'],'dashicons-yes',__('Page title word in content heading','
|
150 |
$check ++;
|
151 |
}else{
|
152 |
-
$output .= $this->metaseo_create_field('heading_title',$tooltip_page['title_in_heading'],'icons-mwarning',__('Page title word in content heading','
|
153 |
}
|
154 |
|
155 |
}else{
|
156 |
-
$output .= $this->metaseo_create_field('heading_title',$tooltip_page['title_in_heading'],'dashicons-yes',__('Page title word in content heading','
|
157 |
$check ++;
|
158 |
}
|
159 |
|
@@ -174,41 +185,41 @@ class MetaSeo_Admin {
|
|
174 |
}
|
175 |
|
176 |
if($test1){
|
177 |
-
$output .= $this->metaseo_create_field('content_title',$tooltip_page['title_in_content'],'dashicons-yes',__('Page title word in content','
|
178 |
$check ++;
|
179 |
}else{
|
180 |
-
$output .= $this->metaseo_create_field('content_title',$tooltip_page['title_in_content'],'icons-mwarning',__('Page title word in content','
|
181 |
}
|
182 |
|
183 |
// page url matches page title
|
184 |
$mtitle = $_POST['datas']['title'];
|
185 |
if($_POST['datas']['mpageurl'] == sanitize_title($mtitle)){
|
186 |
-
$output .= $this->metaseo_create_field('pageurl',$tooltip_page['page_url'],'dashicons-yes',__('Page url matches with page title','
|
187 |
$check ++;
|
188 |
}else{
|
189 |
-
$output .= $this->metaseo_create_field('pageurl',$tooltip_page['page_url'],'icons-mwarning',__('Page url matches with page title','
|
190 |
}
|
191 |
|
192 |
// meta title filled
|
193 |
if(($_POST['datas']['meta_title'] != '' && strlen($_POST['datas']['meta_title']) <= self::$title_length)){
|
194 |
-
$output .= $this->metaseo_create_field('metatitle',$tooltip_page['meta_title'],'dashicons-yes',__('Meta title filled','
|
195 |
$check++;
|
196 |
}else{
|
197 |
-
$output .= $this->metaseo_create_field('metatitle',$tooltip_page['meta_title'],'icons-mwarning',__('Meta title filled','
|
198 |
}
|
199 |
|
200 |
// desc filled
|
201 |
if(($_POST['datas']['meta_desc'] != '' && strlen($_POST['datas']['meta_desc']) <= self::$desc_length)){
|
202 |
-
$output .= $this->metaseo_create_field('metadesc',$tooltip_page['meta_desc'],'dashicons-yes',__('Meta description filled','
|
203 |
$check++;
|
204 |
}else{
|
205 |
-
$output .= $this->metaseo_create_field('metadesc',$tooltip_page['meta_desc'],'icons-mwarning',__('Meta description filled','
|
206 |
}
|
207 |
|
208 |
// image resize
|
209 |
if($_POST['datas']['content'] == '') {
|
210 |
-
$output .= $this->metaseo_create_field('imgresize',$tooltip_page['image_resize'],'dashicons-yes',__('Wrong image resize','
|
211 |
-
$output .= $this->metaseo_create_field('imgalt',$tooltip_page['image_alt'],'dashicons-yes',__('Image have meta title or alt','
|
212 |
$check += 2;
|
213 |
}else{
|
214 |
$dom = new DOMDocument;
|
@@ -238,21 +249,21 @@ class MetaSeo_Admin {
|
|
238 |
}
|
239 |
|
240 |
if($img_wrong == false){
|
241 |
-
$output .= $this->metaseo_create_field('imgresize',$tooltip_page['image_resize'],'dashicons-yes',__('Wrong image resize','
|
242 |
$check++;
|
243 |
}else{
|
244 |
-
$output .= $this->metaseo_create_field('imgresize',$tooltip_page['image_resize'],'icons-mwarning',__('Wrong image resize','
|
245 |
}
|
246 |
|
247 |
if($img_wrong_alt == false){
|
248 |
-
$output .= $this->metaseo_create_field('imgalt',$tooltip_page['image_alt'],'dashicons-yes',__('Image have meta title or alt','
|
249 |
$check++;
|
250 |
}else{
|
251 |
-
$output .= $this->metaseo_create_field('imgalt',$tooltip_page['image_alt'],'icons-mwarning',__('Image have meta title or alt','
|
252 |
}
|
253 |
}else{
|
254 |
-
$output .= $this->metaseo_create_field('imgresize',$tooltip_page['image_resize'],'icons-mwarning',__('Wrong image resize','
|
255 |
-
$output .= $this->metaseo_create_field('imgalt',$tooltip_page['image_alt'],'icons-mwarning',__('Image have meta title or alt','
|
256 |
}
|
257 |
}
|
258 |
|
@@ -274,18 +285,44 @@ class MetaSeo_Admin {
|
|
274 |
wp_send_json(true);
|
275 |
}
|
276 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
277 |
function metaseo_field_settings(){
|
278 |
register_setting('Wp Meta SEO','_metaseo_settings');
|
279 |
add_settings_section('metaseo_dashboard','',array( $this, 'showSettings' ),'metaseo_settings');
|
280 |
-
add_settings_field('metaseo_title_home', __('Homepage meta title', '
|
281 |
-
add_settings_field('metaseo_desc_home', __('Homepage meta description', '
|
282 |
-
add_settings_field('metaseo_showfacebook', __('Facebook profile URL', '
|
283 |
-
add_settings_field('metaseo_showtwitter', __('Twitter Username', '
|
284 |
-
add_settings_field('metaseo_twitter_card', __('The default card type to use', '
|
285 |
-
add_settings_field('metaseo_showkeywords', __('Meta keywords', '
|
286 |
-
add_settings_field('metaseo_showtmetablock', __('Meta block edition', '
|
287 |
-
add_settings_field('metaseo_showsocial', __('Social networks meta', '
|
288 |
-
add_settings_field('metaseo_seovalidate', __('Force SEO validation', '
|
|
|
289 |
}
|
290 |
|
291 |
public function showSettings(){
|
@@ -306,7 +343,7 @@ class MetaSeo_Admin {
|
|
306 |
echo '<input name="_metaseo_settings[metaseo_showkeywords]" type="hidden" value="0"/>';
|
307 |
?>
|
308 |
<label><input name="_metaseo_settings[metaseo_showkeywords]" type="checkbox" id="metaseo_showkeywords" value="1" <?php checked( 1, $this->settings['metaseo_showkeywords']); ?> />
|
309 |
-
<?php _e( 'Active meta keywords','
|
310 |
<?php
|
311 |
}
|
312 |
|
@@ -314,7 +351,7 @@ class MetaSeo_Admin {
|
|
314 |
echo '<input name="_metaseo_settings[metaseo_showtmetablock]" type="hidden" value="0"/>';
|
315 |
?>
|
316 |
<label><input name="_metaseo_settings[metaseo_showtmetablock]" type="checkbox" id="metaseo_showtmetablock" value="1" <?php checked( 1, $this->settings['metaseo_showtmetablock']); ?> />
|
317 |
-
<?php _e( 'Activate meta block edition below content','
|
318 |
<?php
|
319 |
}
|
320 |
|
@@ -322,7 +359,7 @@ class MetaSeo_Admin {
|
|
322 |
echo '<input name="_metaseo_settings[metaseo_showsocial]" type="hidden" value="0"/>';
|
323 |
?>
|
324 |
<label><input name="_metaseo_settings[metaseo_showsocial]" type="checkbox" id="metaseo_showsocial" value="1" <?php checked( 1, $this->settings['metaseo_showsocial']); ?> />
|
325 |
-
<?php _e( 'Activate social edition','
|
326 |
<?php
|
327 |
}
|
328 |
|
@@ -330,7 +367,15 @@ class MetaSeo_Admin {
|
|
330 |
echo '<input name="_metaseo_settings[metaseo_seovalidate]" type="hidden" value="0"/>';
|
331 |
?>
|
332 |
<label><input name="_metaseo_settings[metaseo_seovalidate]" type="checkbox" id="metaseo_seovalidate" value="1" <?php checked( 1, $this->settings['metaseo_seovalidate']); ?> />
|
333 |
-
<?php _e( 'Allow user to force on page SEO criteria validation by clicking on the icon','
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
334 |
<?php
|
335 |
}
|
336 |
|
@@ -348,8 +393,8 @@ class MetaSeo_Admin {
|
|
348 |
$twitter_card = isset( $this->settings['metaseo_twitter_card'] ) ? $this->settings['metaseo_twitter_card'] : 'summary';
|
349 |
?>
|
350 |
<select class="select" name="_metaseo_settings[metaseo_twitter_card]" id="metaseo_twitter_card">
|
351 |
-
<option <?php if($twitter_card == 'summary') echo 'selected' ?> value="summary"><?php _e( 'Summary', '
|
352 |
-
<option <?php if($twitter_card == 'summary_large_image') echo 'selected' ?> value="summary_large_image"><?php _e( 'Summary with large image', '
|
353 |
</select>
|
354 |
<?php
|
355 |
}
|
@@ -390,35 +435,35 @@ class MetaSeo_Admin {
|
|
390 |
// wp_die();
|
391 |
// }
|
392 |
|
393 |
-
$response->msg = __('Modification was saved', '
|
394 |
if($metakey == 'metatitle') {
|
395 |
if(!update_post_meta($postID, '_metaseo_metatitle', $value)) {
|
396 |
$response->updated = false;
|
397 |
-
$response->msg = __('Meta title was not saved', '
|
398 |
}
|
399 |
else{
|
400 |
$response->updated = true;
|
401 |
-
$response->msg = __('Meta title was saved', '
|
402 |
}
|
403 |
}
|
404 |
|
405 |
if($metakey =='metadesc') {
|
406 |
if(!update_post_meta($postID, '_metaseo_metadesc', $value)) {
|
407 |
$response->updated = false;
|
408 |
-
$response->msg = __('Meta description was not saved', '
|
409 |
}else{
|
410 |
$response->updated = true;
|
411 |
-
$response->msg = __('Meta description was saved', '
|
412 |
}
|
413 |
}
|
414 |
|
415 |
if ($metakey == 'metakeywords') {
|
416 |
if (!update_post_meta($postID, '_metaseo_metakeywords', $value)) {
|
417 |
$response->updated = false;
|
418 |
-
$response->msg = __('Meta keywords was not saved', '
|
419 |
} else {
|
420 |
$response->updated = true;
|
421 |
-
$response->msg = __('Meta keywords was saved', '
|
422 |
}
|
423 |
}
|
424 |
|
@@ -463,7 +508,7 @@ class MetaSeo_Admin {
|
|
463 |
|
464 |
public function meta_seo_localize_script() {
|
465 |
return array(
|
466 |
-
'metaseo_message_false_copy' => __( 'We didn\'t find any element to apply a batch copy, congrats!', '
|
467 |
);
|
468 |
}
|
469 |
|
@@ -481,7 +526,7 @@ class MetaSeo_Admin {
|
|
481 |
function register_menu_page() {
|
482 |
|
483 |
// Add main page
|
484 |
-
$admin_page = add_menu_page(__('WP Meta SEO:', '
|
485 |
$this,'load_page',) , 'dashicons-chart-area' );
|
486 |
|
487 |
/**
|
@@ -496,7 +541,7 @@ class MetaSeo_Admin {
|
|
496 |
array(
|
497 |
'metaseo_dashboard',
|
498 |
'',
|
499 |
-
__('Content meta', '
|
500 |
$manage_options_cap,
|
501 |
'metaseo_content_meta',
|
502 |
array($this, 'load_page'),
|
@@ -505,7 +550,7 @@ class MetaSeo_Admin {
|
|
505 |
array(
|
506 |
'metaseo_dashboard',
|
507 |
'',
|
508 |
-
__('Image meta', '
|
509 |
$manage_options_cap,
|
510 |
'metaseo_image_meta',
|
511 |
array($this, 'load_page'),
|
@@ -514,7 +559,16 @@ class MetaSeo_Admin {
|
|
514 |
array(
|
515 |
'metaseo_dashboard',
|
516 |
'',
|
517 |
-
__('
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
518 |
$manage_options_cap,
|
519 |
'metaseo_settings',
|
520 |
array($this, 'load_page'),
|
@@ -532,7 +586,7 @@ class MetaSeo_Admin {
|
|
532 |
foreach ($submenu_pages as $submenu_page) {
|
533 |
|
534 |
// Add submenu page
|
535 |
-
$admin_page = add_submenu_page($submenu_page[0], $submenu_page[2] . ' - ' . __('WP Meta SEO:', '
|
536 |
|
537 |
// Check if we need to hook
|
538 |
if (isset($submenu_page[6]) && null != $submenu_page[6] && is_array($submenu_page[6]) && count($submenu_page[6]) > 0) {
|
@@ -545,7 +599,7 @@ class MetaSeo_Admin {
|
|
545 |
|
546 |
global $submenu;
|
547 |
if (isset($submenu['metaseo_dashboard']) && current_user_can($manage_options_cap)) {
|
548 |
-
$submenu['metaseo_dashboard'][0][0] = __('Dashboard', '
|
549 |
}
|
550 |
}
|
551 |
|
@@ -567,7 +621,11 @@ class MetaSeo_Admin {
|
|
567 |
case 'metaseo_image_meta':
|
568 |
require_once( WPMETASEO_PLUGIN_DIR . 'inc/pages/image-meta.php' );
|
569 |
break;
|
570 |
-
|
|
|
|
|
|
|
|
|
571 |
case 'metaseo_image_optimize':
|
572 |
require_once( WPMETASEO_PLUGIN_DIR . 'inc/pages/image-optimize.php' );
|
573 |
break;
|
@@ -795,6 +853,7 @@ class MetaSeo_Admin {
|
|
795 |
|
796 |
add_action('wp_ajax_metaseo_reload_analysis',array($this,'metaseo_reload_analysis'));
|
797 |
add_action('wp_ajax_metaseo_validate_analysis',array($this,'metaseo_validate_analysis'));
|
|
|
798 |
}
|
799 |
|
800 |
}
|
18 |
"metaseo_showkeywords"=>0,
|
19 |
"metaseo_showtmetablock"=>1,
|
20 |
"metaseo_showsocial" => 1,
|
21 |
+
"metaseo_seovalidate" => 0,
|
22 |
+
"metaseo_linkfield" => 1
|
23 |
);
|
24 |
$settings = get_option( '_metaseo_settings' );
|
25 |
|
56 |
if ( '0' == get_option( 'blog_public' )) {
|
57 |
add_action( 'admin_notices', array( $this, 'wpms_public_warning' ) );
|
58 |
}
|
59 |
+
add_action( 'wp_enqueue_editor', array( $this,'wpms_link_title_field'), 20 );
|
60 |
+
}
|
61 |
+
|
62 |
+
function wpms_link_title_field() {
|
63 |
+
if(isset($this->settings['metaseo_linkfield']) && $this->settings['metaseo_linkfield'] == 1){
|
64 |
+
wp_enqueue_script( 'wpmslinkTitle', plugins_url('js/wpms-link-title-field.js', dirname(__FILE__)), array( 'wplink' ), WPMSEO_VERSION, true );
|
65 |
+
wp_localize_script( 'wpmslinkTitle', 'wpmsLinkTitleL10n', array(
|
66 |
+
'titleLabel' => __( 'Title','wp-meta-seo' ),
|
67 |
+
) );
|
68 |
+
}
|
69 |
}
|
70 |
|
71 |
function wpms_set_ignore(){
|
103 |
<a href="javascript:wpmsSetIgnore(\'wpms_public_warning\',\'robotsmessage\',\'%3$s\');" class="button">%4$s</a>
|
104 |
</p>
|
105 |
</div>',
|
106 |
+
__( 'Your website is not indexed by search engine because of your WordPress settings.', 'wp-meta-seo' ),
|
107 |
+
sprintf( __( '%sFix it now%s', 'wp-meta-seo' ), sprintf( '<a href="%s">', esc_url( admin_url( 'options-reading.php' ) ) ), '</a>' ),
|
108 |
esc_js( wp_create_nonce( 'wpseo-ignore' ) ),
|
109 |
+
__( 'OK I know that.', 'wp-meta-seo' )
|
110 |
);
|
111 |
}
|
112 |
|
113 |
function wpms_load_langguage(){
|
114 |
+
load_plugin_textdomain( 'wp-meta-seo', false, dirname( plugin_basename( WPMSEO_FILE ) ) . '/languages/' );
|
115 |
}
|
116 |
|
117 |
function metaseo_create_field($data_title,$alt,$dashicon,$label,$value_hidden){
|
122 |
|
123 |
function metaseo_reload_analysis() {
|
124 |
$tooltip_page = array();
|
125 |
+
$tooltip_page['title_in_heading'] = __('Check if a word of this content title is also in a title heading (h1, h2...)','wp-meta-seo');
|
126 |
+
$tooltip_page['title_in_content'] = __('Check if a word of this content title is also in the text','wp-meta-seo');
|
127 |
+
$tooltip_page['page_url'] = __('Does the page title match with the permalink (URL structure)','wp-meta-seo');
|
128 |
+
$tooltip_page['meta_title'] = __('Is the meta title of this page filled?','wp-meta-seo');
|
129 |
+
$tooltip_page['meta_desc'] = __('Is the meta description of this page filled?','wp-meta-seo');
|
130 |
+
$tooltip_page['image_resize'] = __('Check for image HTML resizing in content (usually image resized using handles)','wp-meta-seo');
|
131 |
+
$tooltip_page['image_alt'] = __('Check for image Alt text and title','wp-meta-seo');
|
132 |
if(empty($_POST['datas'])){
|
133 |
wp_send_json(false);
|
134 |
}
|
157 |
}
|
158 |
|
159 |
if($test){
|
160 |
+
$output .= $this->metaseo_create_field('heading_title',$tooltip_page['title_in_heading'],'dashicons-yes',__('Page title word in content heading','wp-meta-seo'),1);
|
161 |
$check ++;
|
162 |
}else{
|
163 |
+
$output .= $this->metaseo_create_field('heading_title',$tooltip_page['title_in_heading'],'icons-mwarning',__('Page title word in content heading','wp-meta-seo'),0);
|
164 |
}
|
165 |
|
166 |
}else{
|
167 |
+
$output .= $this->metaseo_create_field('heading_title',$tooltip_page['title_in_heading'],'dashicons-yes',__('Page title word in content heading','wp-meta-seo'),1);
|
168 |
$check ++;
|
169 |
}
|
170 |
|
185 |
}
|
186 |
|
187 |
if($test1){
|
188 |
+
$output .= $this->metaseo_create_field('content_title',$tooltip_page['title_in_content'],'dashicons-yes',__('Page title word in content','wp-meta-seo'),1);
|
189 |
$check ++;
|
190 |
}else{
|
191 |
+
$output .= $this->metaseo_create_field('content_title',$tooltip_page['title_in_content'],'icons-mwarning',__('Page title word in content','wp-meta-seo'),0);
|
192 |
}
|
193 |
|
194 |
// page url matches page title
|
195 |
$mtitle = $_POST['datas']['title'];
|
196 |
if($_POST['datas']['mpageurl'] == sanitize_title($mtitle)){
|
197 |
+
$output .= $this->metaseo_create_field('pageurl',$tooltip_page['page_url'],'dashicons-yes',__('Page url matches with page title','wp-meta-seo'),1);
|
198 |
$check ++;
|
199 |
}else{
|
200 |
+
$output .= $this->metaseo_create_field('pageurl',$tooltip_page['page_url'],'icons-mwarning',__('Page url matches with page title','wp-meta-seo'),0);
|
201 |
}
|
202 |
|
203 |
// meta title filled
|
204 |
if(($_POST['datas']['meta_title'] != '' && strlen($_POST['datas']['meta_title']) <= self::$title_length)){
|
205 |
+
$output .= $this->metaseo_create_field('metatitle',$tooltip_page['meta_title'],'dashicons-yes',__('Meta title filled','wp-meta-seo'),1);
|
206 |
$check++;
|
207 |
}else{
|
208 |
+
$output .= $this->metaseo_create_field('metatitle',$tooltip_page['meta_title'],'icons-mwarning',__('Meta title filled','wp-meta-seo'),0);
|
209 |
}
|
210 |
|
211 |
// desc filled
|
212 |
if(($_POST['datas']['meta_desc'] != '' && strlen($_POST['datas']['meta_desc']) <= self::$desc_length)){
|
213 |
+
$output .= $this->metaseo_create_field('metadesc',$tooltip_page['meta_desc'],'dashicons-yes',__('Meta description filled','wp-meta-seo'),1);
|
214 |
$check++;
|
215 |
}else{
|
216 |
+
$output .= $this->metaseo_create_field('metadesc',$tooltip_page['meta_desc'],'icons-mwarning',__('Meta description filled','wp-meta-seo'),0);
|
217 |
}
|
218 |
|
219 |
// image resize
|
220 |
if($_POST['datas']['content'] == '') {
|
221 |
+
$output .= $this->metaseo_create_field('imgresize',$tooltip_page['image_resize'],'dashicons-yes',__('Wrong image resize','wp-meta-seo'),1);
|
222 |
+
$output .= $this->metaseo_create_field('imgalt',$tooltip_page['image_alt'],'dashicons-yes',__('Image have meta title or alt','wp-meta-seo'),1);
|
223 |
$check += 2;
|
224 |
}else{
|
225 |
$dom = new DOMDocument;
|
249 |
}
|
250 |
|
251 |
if($img_wrong == false){
|
252 |
+
$output .= $this->metaseo_create_field('imgresize',$tooltip_page['image_resize'],'dashicons-yes',__('Wrong image resize','wp-meta-seo'),1);
|
253 |
$check++;
|
254 |
}else{
|
255 |
+
$output .= $this->metaseo_create_field('imgresize',$tooltip_page['image_resize'],'icons-mwarning',__('Wrong image resize','wp-meta-seo'),0);
|
256 |
}
|
257 |
|
258 |
if($img_wrong_alt == false){
|
259 |
+
$output .= $this->metaseo_create_field('imgalt',$tooltip_page['image_alt'],'dashicons-yes',__('Image have meta title or alt','wp-meta-seo'),1);
|
260 |
$check++;
|
261 |
}else{
|
262 |
+
$output .= $this->metaseo_create_field('imgalt',$tooltip_page['image_alt'],'icons-mwarning',__('Image have meta title or alt','wp-meta-seo'),0);
|
263 |
}
|
264 |
}else{
|
265 |
+
$output .= $this->metaseo_create_field('imgresize',$tooltip_page['image_resize'],'icons-mwarning',__('Wrong image resize','wp-meta-seo'),0);
|
266 |
+
$output .= $this->metaseo_create_field('imgalt',$tooltip_page['image_alt'],'icons-mwarning',__('Image have meta title or alt','wp-meta-seo'),0);
|
267 |
}
|
268 |
}
|
269 |
|
285 |
wp_send_json(true);
|
286 |
}
|
287 |
|
288 |
+
function metaseo_update_link(){
|
289 |
+
if(isset($_POST['postid'])){
|
290 |
+
if(isset($_POST['link_old']) && isset($_POST['link_new'])){
|
291 |
+
$link_old = stripcslashes($_POST['link_old']);
|
292 |
+
$link_new = $_POST['link_new'];
|
293 |
+
$post = get_post($_POST['postid']);
|
294 |
+
if(!empty($post) && !empty($post->post_content)){
|
295 |
+
if(strpos(html_entity_decode($post->post_content), $link_old) !== false){
|
296 |
+
$content = str_replace($link_old, $link_new, html_entity_decode($post->post_content));
|
297 |
+
$my_post = array(
|
298 |
+
'ID' => $_POST['postid'],
|
299 |
+
'post_content' => $content
|
300 |
+
);
|
301 |
+
wp_update_post( $my_post );
|
302 |
+
wp_send_json(array('link_new' => stripcslashes($link_new)));
|
303 |
+
}else{
|
304 |
+
wp_send_json(false);
|
305 |
+
}
|
306 |
+
}
|
307 |
+
wp_send_json(false);
|
308 |
+
}
|
309 |
+
}
|
310 |
+
wp_send_json(false);
|
311 |
+
}
|
312 |
+
|
313 |
function metaseo_field_settings(){
|
314 |
register_setting('Wp Meta SEO','_metaseo_settings');
|
315 |
add_settings_section('metaseo_dashboard','',array( $this, 'showSettings' ),'metaseo_settings');
|
316 |
+
add_settings_field('metaseo_title_home', __('Homepage meta title', 'wp-meta-seo'), array( $this, 'metaseo_title_home' ), 'metaseo_settings', 'metaseo_dashboard');
|
317 |
+
add_settings_field('metaseo_desc_home', __('Homepage meta description', 'wp-meta-seo'), array( $this, 'metaseo_desc_home' ), 'metaseo_settings', 'metaseo_dashboard');
|
318 |
+
add_settings_field('metaseo_showfacebook', __('Facebook profile URL', 'wp-meta-seo'), array( $this, 'showfacebook' ), 'metaseo_settings', 'metaseo_dashboard');
|
319 |
+
add_settings_field('metaseo_showtwitter', __('Twitter Username', 'wp-meta-seo'), array( $this, 'showtwitter' ), 'metaseo_settings', 'metaseo_dashboard');
|
320 |
+
add_settings_field('metaseo_twitter_card', __('The default card type to use', 'wp-meta-seo'), array( $this, 'showtwittercard' ), 'metaseo_settings', 'metaseo_dashboard');
|
321 |
+
add_settings_field('metaseo_showkeywords', __('Meta keywords', 'wp-meta-seo'), array( $this, 'showkeywords' ), 'metaseo_settings', 'metaseo_dashboard');
|
322 |
+
add_settings_field('metaseo_showtmetablock', __('Meta block edition', 'wp-meta-seo'), array( $this, 'showtmetablock' ), 'metaseo_settings', 'metaseo_dashboard');
|
323 |
+
add_settings_field('metaseo_showsocial', __('Social networks meta', 'wp-meta-seo'), array( $this, 'showsocial' ), 'metaseo_settings', 'metaseo_dashboard');
|
324 |
+
add_settings_field('metaseo_seovalidate', __('Force SEO validation', 'wp-meta-seo'), array( $this, 'showseovalidate' ), 'metaseo_settings', 'metaseo_dashboard');
|
325 |
+
add_settings_field('metaseo_linkfield', __('Link text field', 'wp-meta-seo'), array( $this, 'showlinkfield' ), 'metaseo_settings', 'metaseo_dashboard');
|
326 |
}
|
327 |
|
328 |
public function showSettings(){
|
343 |
echo '<input name="_metaseo_settings[metaseo_showkeywords]" type="hidden" value="0"/>';
|
344 |
?>
|
345 |
<label><input name="_metaseo_settings[metaseo_showkeywords]" type="checkbox" id="metaseo_showkeywords" value="1" <?php checked( 1, $this->settings['metaseo_showkeywords']); ?> />
|
346 |
+
<?php _e( 'Active meta keywords','wp-meta-seo'); ?></label>
|
347 |
<?php
|
348 |
}
|
349 |
|
351 |
echo '<input name="_metaseo_settings[metaseo_showtmetablock]" type="hidden" value="0"/>';
|
352 |
?>
|
353 |
<label><input name="_metaseo_settings[metaseo_showtmetablock]" type="checkbox" id="metaseo_showtmetablock" value="1" <?php checked( 1, $this->settings['metaseo_showtmetablock']); ?> />
|
354 |
+
<?php _e( 'Activate meta block edition below content','wp-meta-seo' ); ?></label>
|
355 |
<?php
|
356 |
}
|
357 |
|
359 |
echo '<input name="_metaseo_settings[metaseo_showsocial]" type="hidden" value="0"/>';
|
360 |
?>
|
361 |
<label><input name="_metaseo_settings[metaseo_showsocial]" type="checkbox" id="metaseo_showsocial" value="1" <?php checked( 1, $this->settings['metaseo_showsocial']); ?> />
|
362 |
+
<?php _e( 'Activate social edition','wp-meta-seo' ); ?></label>
|
363 |
<?php
|
364 |
}
|
365 |
|
367 |
echo '<input name="_metaseo_settings[metaseo_seovalidate]" type="hidden" value="0"/>';
|
368 |
?>
|
369 |
<label><input name="_metaseo_settings[metaseo_seovalidate]" type="checkbox" id="metaseo_seovalidate" value="1" <?php checked( 1, $this->settings['metaseo_seovalidate']); ?> />
|
370 |
+
<?php _e( 'Allow user to force on page SEO criteria validation by clicking on the icon','wp-meta-seo' ); ?></label>
|
371 |
+
<?php
|
372 |
+
}
|
373 |
+
|
374 |
+
public function showlinkfield(){
|
375 |
+
echo '<input name="_metaseo_settings[metaseo_linkfield]" type="hidden" value="0"/>';
|
376 |
+
?>
|
377 |
+
<label><input name="_metaseo_settings[metaseo_linkfield]" type="checkbox" id="metaseo_linkfield" value="1" <?php checked( 1, $this->settings['metaseo_linkfield']); ?> />
|
378 |
+
<?php _e( "Adds back the missing 'title' field in the Insert/Edit URL box","wp-meta-seo" ); ?></label>
|
379 |
<?php
|
380 |
}
|
381 |
|
393 |
$twitter_card = isset( $this->settings['metaseo_twitter_card'] ) ? $this->settings['metaseo_twitter_card'] : 'summary';
|
394 |
?>
|
395 |
<select class="select" name="_metaseo_settings[metaseo_twitter_card]" id="metaseo_twitter_card">
|
396 |
+
<option <?php if($twitter_card == 'summary') echo 'selected' ?> value="summary"><?php _e( 'Summary', 'wp-meta-seo' ); ?></option>
|
397 |
+
<option <?php if($twitter_card == 'summary_large_image') echo 'selected' ?> value="summary_large_image"><?php _e( 'Summary with large image', 'wp-meta-seo' ); ?></option>
|
398 |
</select>
|
399 |
<?php
|
400 |
}
|
435 |
// wp_die();
|
436 |
// }
|
437 |
|
438 |
+
$response->msg = __('Modification was saved', 'wp-meta-seo') ;
|
439 |
if($metakey == 'metatitle') {
|
440 |
if(!update_post_meta($postID, '_metaseo_metatitle', $value)) {
|
441 |
$response->updated = false;
|
442 |
+
$response->msg = __('Meta title was not saved', 'wp-meta-seo') ;
|
443 |
}
|
444 |
else{
|
445 |
$response->updated = true;
|
446 |
+
$response->msg = __('Meta title was saved', 'wp-meta-seo') ;
|
447 |
}
|
448 |
}
|
449 |
|
450 |
if($metakey =='metadesc') {
|
451 |
if(!update_post_meta($postID, '_metaseo_metadesc', $value)) {
|
452 |
$response->updated = false;
|
453 |
+
$response->msg = __('Meta description was not saved', 'wp-meta-seo') ;
|
454 |
}else{
|
455 |
$response->updated = true;
|
456 |
+
$response->msg = __('Meta description was saved', 'wp-meta-seo') ;
|
457 |
}
|
458 |
}
|
459 |
|
460 |
if ($metakey == 'metakeywords') {
|
461 |
if (!update_post_meta($postID, '_metaseo_metakeywords', $value)) {
|
462 |
$response->updated = false;
|
463 |
+
$response->msg = __('Meta keywords was not saved', 'wp-meta-seo');
|
464 |
} else {
|
465 |
$response->updated = true;
|
466 |
+
$response->msg = __('Meta keywords was saved', 'wp-meta-seo');
|
467 |
}
|
468 |
}
|
469 |
|
508 |
|
509 |
public function meta_seo_localize_script() {
|
510 |
return array(
|
511 |
+
'metaseo_message_false_copy' => __( 'We didn\'t find any element to apply a batch copy, congrats!', 'wp-meta-seo' ),
|
512 |
);
|
513 |
}
|
514 |
|
526 |
function register_menu_page() {
|
527 |
|
528 |
// Add main page
|
529 |
+
$admin_page = add_menu_page(__('WP Meta SEO:', 'wp-meta-seo') . ' ' . __('Dashboard', 'wp-meta-seo'), __('WP Meta SEO', 'wp-meta-seo'), 'manage_options', 'metaseo_dashboard', array(
|
530 |
$this,'load_page',) , 'dashicons-chart-area' );
|
531 |
|
532 |
/**
|
541 |
array(
|
542 |
'metaseo_dashboard',
|
543 |
'',
|
544 |
+
__('Content meta', 'wp-meta-seo'),
|
545 |
$manage_options_cap,
|
546 |
'metaseo_content_meta',
|
547 |
array($this, 'load_page'),
|
550 |
array(
|
551 |
'metaseo_dashboard',
|
552 |
'',
|
553 |
+
__('Image meta', 'wp-meta-seo'),
|
554 |
$manage_options_cap,
|
555 |
'metaseo_image_meta',
|
556 |
array($this, 'load_page'),
|
559 |
array(
|
560 |
'metaseo_dashboard',
|
561 |
'',
|
562 |
+
__('Link meta', 'wp-meta-seo'),
|
563 |
+
$manage_options_cap,
|
564 |
+
'metaseo_link_meta',
|
565 |
+
array($this, 'load_page'),
|
566 |
+
null,
|
567 |
+
),
|
568 |
+
array(
|
569 |
+
'metaseo_dashboard',
|
570 |
+
'',
|
571 |
+
__('Settings', 'wp-meta-seo'),
|
572 |
$manage_options_cap,
|
573 |
'metaseo_settings',
|
574 |
array($this, 'load_page'),
|
586 |
foreach ($submenu_pages as $submenu_page) {
|
587 |
|
588 |
// Add submenu page
|
589 |
+
$admin_page = add_submenu_page($submenu_page[0], $submenu_page[2] . ' - ' . __('WP Meta SEO:', 'wp-meta-seo'), $submenu_page[2], $submenu_page[3], $submenu_page[4], $submenu_page[5]);
|
590 |
|
591 |
// Check if we need to hook
|
592 |
if (isset($submenu_page[6]) && null != $submenu_page[6] && is_array($submenu_page[6]) && count($submenu_page[6]) > 0) {
|
599 |
|
600 |
global $submenu;
|
601 |
if (isset($submenu['metaseo_dashboard']) && current_user_can($manage_options_cap)) {
|
602 |
+
$submenu['metaseo_dashboard'][0][0] = __('Dashboard', 'wp-meta-seo');
|
603 |
}
|
604 |
}
|
605 |
|
621 |
case 'metaseo_image_meta':
|
622 |
require_once( WPMETASEO_PLUGIN_DIR . 'inc/pages/image-meta.php' );
|
623 |
break;
|
624 |
+
|
625 |
+
case 'metaseo_link_meta':
|
626 |
+
require_once( WPMETASEO_PLUGIN_DIR . 'inc/pages/link-meta.php' );
|
627 |
+
break;
|
628 |
+
|
629 |
case 'metaseo_image_optimize':
|
630 |
require_once( WPMETASEO_PLUGIN_DIR . 'inc/pages/image-optimize.php' );
|
631 |
break;
|
853 |
|
854 |
add_action('wp_ajax_metaseo_reload_analysis',array($this,'metaseo_reload_analysis'));
|
855 |
add_action('wp_ajax_metaseo_validate_analysis',array($this,'metaseo_validate_analysis'));
|
856 |
+
add_action('wp_ajax_metaseo_update_link',array($this,'metaseo_update_link'));
|
857 |
}
|
858 |
|
859 |
}
|
inc/class.metaseo-content-list-table.php
CHANGED
@@ -18,7 +18,7 @@ class MetaSeo_Content_List_Table extends WP_List_Table {
|
|
18 |
));
|
19 |
|
20 |
}
|
21 |
-
|
22 |
function display_tablenav($which) {
|
23 |
?>
|
24 |
<div class="tablenav <?php echo esc_attr($which); ?>">
|
@@ -113,8 +113,8 @@ class MetaSeo_Content_List_Table extends WP_List_Table {
|
|
113 |
$options .= sprintf('<option value="%2$s" %3$s>%1$s</option>', $obj->labels->name, $post_type->post_type, selected($selected, $post_type->post_type, false));
|
114 |
}
|
115 |
|
116 |
-
$sl_bulk = '<select name="mbulk_copy" class="mbulk_copy"><option value="0">'.__('Bulk copy','
|
117 |
-
$btn_bulk = '<input type="button" name="do_copy" id="post_do_copy" class="button button-primary btn_do_copy post_do_copy" value="'.__('Content title as meta title','
|
118 |
|
119 |
echo sprintf('<select name="post_type_filter" class="metaseo-filter">%1$s</select>', $options);
|
120 |
submit_button(__('Filter'), 'button', 'do_filter', false, array('id' => 'post-query-submit'));
|
@@ -125,7 +125,7 @@ class MetaSeo_Content_List_Table extends WP_List_Table {
|
|
125 |
}
|
126 |
|
127 |
function get_columns() {
|
128 |
-
$preview = __(" This is a rendering of what this post might look like in Google's search results.", '
|
129 |
$info = sprintf('<a class="info-content"><img src=' . WPMETASEO_PLUGIN_URL . 'img/info.png href="#">'
|
130 |
. '<p class="tooltip-metacontent">'
|
131 |
.$preview
|
@@ -133,17 +133,17 @@ class MetaSeo_Content_List_Table extends WP_List_Table {
|
|
133 |
|
134 |
$columns = array(
|
135 |
'cb' => '<input id="cb-select-all-1" type="checkbox" style="margin:0">',
|
136 |
-
'col_id' => __('', '
|
137 |
-
'col_title' => __('Title', '
|
138 |
-
'col_snippet' => sprintf(__('Snippet Preview %s', '
|
139 |
-
'col_meta_title' => __('Meta Title', '
|
140 |
);
|
141 |
|
142 |
$settings = get_option( '_metaseo_settings' );
|
143 |
if(isset($settings['metaseo_showkeywords']) && $settings['metaseo_showkeywords'] == 1){
|
144 |
-
$columns['col_meta_keywords'] = __('Meta Keywords', '
|
145 |
}
|
146 |
-
$columns['col_meta_desc'] = __('Meta Description', '
|
147 |
|
148 |
return $columns;
|
149 |
}
|
@@ -191,6 +191,11 @@ class MetaSeo_Content_List_Table extends WP_List_Table {
|
|
191 |
}
|
192 |
}
|
193 |
|
|
|
|
|
|
|
|
|
|
|
194 |
//Order By block
|
195 |
$orderby = !empty($_GET["orderby"]) ? ($_GET["orderby"]) : 'post_title';
|
196 |
$order = !empty($_GET["order"]) ? ($_GET["order"]) : 'asc';
|
@@ -313,7 +318,7 @@ class MetaSeo_Content_List_Table extends WP_List_Table {
|
|
313 |
|
314 |
case 'col_title':
|
315 |
$post_title = stripslashes($rec->post_title);
|
316 |
-
if($post_title == '') $post_title = __('(no title)' , '
|
317 |
echo sprintf('<td %2$s><div class="action-wrapper"><strong id="post-title-'.$rec->ID.'">%1$s</strong>', $post_title, $attributes);
|
318 |
|
319 |
$post_type_object = get_post_type_object($rec->post_type);
|
@@ -409,6 +414,11 @@ class MetaSeo_Content_List_Table extends WP_List_Table {
|
|
409 |
$current_url = add_query_arg(array( "metaseo_posts_per_page" => intval($_POST['metaseo_posts_per_page'])), $current_url);
|
410 |
$redirect = true;
|
411 |
}
|
|
|
|
|
|
|
|
|
|
|
412 |
|
413 |
if($redirect === true){
|
414 |
wp_redirect($current_url);
|
18 |
));
|
19 |
|
20 |
}
|
21 |
+
|
22 |
function display_tablenav($which) {
|
23 |
?>
|
24 |
<div class="tablenav <?php echo esc_attr($which); ?>">
|
113 |
$options .= sprintf('<option value="%2$s" %3$s>%1$s</option>', $obj->labels->name, $post_type->post_type, selected($selected, $post_type->post_type, false));
|
114 |
}
|
115 |
|
116 |
+
$sl_bulk = '<select name="mbulk_copy" class="mbulk_copy"><option value="0">'.__('Bulk copy','wp-meta-seo').'</option><option value="all">'.__('All Posts','wp-meta-seo').'</option><option value="bulk-copy-metatitle">'.__('Selected posts','wp-meta-seo').'</option></select>';
|
117 |
+
$btn_bulk = '<input type="button" name="do_copy" id="post_do_copy" class="button button-primary btn_do_copy post_do_copy" value="'.__('Content title as meta title','wp-meta-seo').'"><span class="spinner"></span>';
|
118 |
|
119 |
echo sprintf('<select name="post_type_filter" class="metaseo-filter">%1$s</select>', $options);
|
120 |
submit_button(__('Filter'), 'button', 'do_filter', false, array('id' => 'post-query-submit'));
|
125 |
}
|
126 |
|
127 |
function get_columns() {
|
128 |
+
$preview = __(" This is a rendering of what this post might look like in Google's search results.", 'wp-meta-seo');
|
129 |
$info = sprintf('<a class="info-content"><img src=' . WPMETASEO_PLUGIN_URL . 'img/info.png href="#">'
|
130 |
. '<p class="tooltip-metacontent">'
|
131 |
.$preview
|
133 |
|
134 |
$columns = array(
|
135 |
'cb' => '<input id="cb-select-all-1" type="checkbox" style="margin:0">',
|
136 |
+
'col_id' => __('', 'wp-meta-seo'),
|
137 |
+
'col_title' => __('Title', 'wp-meta-seo'),
|
138 |
+
'col_snippet' => sprintf(__('Snippet Preview %s', 'wp-meta-seo'),$info),
|
139 |
+
'col_meta_title' => __('Meta Title', 'wp-meta-seo'),
|
140 |
);
|
141 |
|
142 |
$settings = get_option( '_metaseo_settings' );
|
143 |
if(isset($settings['metaseo_showkeywords']) && $settings['metaseo_showkeywords'] == 1){
|
144 |
+
$columns['col_meta_keywords'] = __('Meta Keywords', 'wp-meta-seo');
|
145 |
}
|
146 |
+
$columns['col_meta_desc'] = __('Meta Description', 'wp-meta-seo');
|
147 |
|
148 |
return $columns;
|
149 |
}
|
191 |
}
|
192 |
}
|
193 |
|
194 |
+
$keyword = !empty($_GET["s"]) ? $_GET["s"] : '';
|
195 |
+
if (isset($keyword) && $keyword != '') {
|
196 |
+
$where[] .= '(post_title LIKE "%' . $keyword .'%" OR mt.meta_value LIKE "%' . $keyword .'%" OR md.meta_value LIKE "%' . $keyword .'%")';
|
197 |
+
}
|
198 |
+
|
199 |
//Order By block
|
200 |
$orderby = !empty($_GET["orderby"]) ? ($_GET["orderby"]) : 'post_title';
|
201 |
$order = !empty($_GET["order"]) ? ($_GET["order"]) : 'asc';
|
318 |
|
319 |
case 'col_title':
|
320 |
$post_title = stripslashes($rec->post_title);
|
321 |
+
if($post_title == '') $post_title = __('(no title)' , 'wp-meta-seo');
|
322 |
echo sprintf('<td %2$s><div class="action-wrapper"><strong id="post-title-'.$rec->ID.'">%1$s</strong>', $post_title, $attributes);
|
323 |
|
324 |
$post_type_object = get_post_type_object($rec->post_type);
|
414 |
$current_url = add_query_arg(array( "metaseo_posts_per_page" => intval($_POST['metaseo_posts_per_page'])), $current_url);
|
415 |
$redirect = true;
|
416 |
}
|
417 |
+
|
418 |
+
if(isset($_POST['s'])){
|
419 |
+
$current_url = add_query_arg(array( "s" => urlencode($_POST['s'])), $current_url);
|
420 |
+
$redirect = true;
|
421 |
+
}
|
422 |
|
423 |
if($redirect === true){
|
424 |
wp_redirect($current_url);
|
inc/class.metaseo-dashboard.php
CHANGED
@@ -18,6 +18,8 @@ class MetaSeo_Dashboard {
|
|
18 |
public static $mpostname_inurl = 0;
|
19 |
public static $mcategory_inurl = 0;
|
20 |
public static $mpermalink = 50;
|
|
|
|
|
21 |
|
22 |
|
23 |
public static function moptimizationChecking() {
|
@@ -48,6 +50,7 @@ class MetaSeo_Dashboard {
|
|
48 |
$posts = $wpdb->get_results($query);
|
49 |
if (count($posts) > 0) {
|
50 |
$doc = new DOMDocument();
|
|
|
51 |
$upload_dir = wp_upload_dir();
|
52 |
|
53 |
foreach ($posts as $post) {
|
@@ -111,7 +114,7 @@ class MetaSeo_Dashboard {
|
|
111 |
if ($rank !== '') {
|
112 |
echo $rank;
|
113 |
} else {
|
114 |
-
echo __('We can\'t get rank of this site from Alexa.com!', '
|
115 |
}
|
116 |
}
|
117 |
|
@@ -129,6 +132,7 @@ class MetaSeo_Dashboard {
|
|
129 |
}
|
130 |
|
131 |
$doc = new DOMDocument();
|
|
|
132 |
@$doc->loadHTML($content);
|
133 |
$doc->preserveWhiteSpace = false;
|
134 |
|
@@ -146,7 +150,7 @@ class MetaSeo_Dashboard {
|
|
146 |
}
|
147 |
|
148 |
$html = trim($tmp_dom->saveHTML());
|
149 |
-
$html = str_replace('We don\'t have', __('Alexa doesn\'t have','
|
150 |
$html = str_replace('Get Certified', '', $html);
|
151 |
$html = str_replace('"/topsites/countries', '"http://www.alexa.com/topsites/countries', $html);
|
152 |
return $html;
|
@@ -187,14 +191,15 @@ class MetaSeo_Dashboard {
|
|
187 |
}
|
188 |
|
189 |
function evolutive_dashboard(){
|
190 |
-
$
|
|
|
|
|
191 |
$args = array(
|
192 |
'posts_per_page' => -1,
|
193 |
-
'post_type' =>
|
194 |
'suppress_filters' => true
|
195 |
);
|
196 |
$mposts = get_posts( $args );
|
197 |
-
|
198 |
if(empty($mposts)){
|
199 |
return $results;
|
200 |
}else{
|
@@ -211,10 +216,35 @@ class MetaSeo_Dashboard {
|
|
211 |
if(($meta_desc != '' && strlen($meta_desc) <= self::$meta_desc_length ) || (!empty($meta_analysis) && !empty($meta_analysis['metadesc'])) ){
|
212 |
self::$metadesc_filled++;
|
213 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
}
|
215 |
|
216 |
$results['metatitle_filled'] = array(ceil(self::$metatitle_filled/(count($mposts))*100) , array(self::$metatitle_filled , count($mposts)));
|
217 |
$results['metadesc_filled'] = array(ceil(self::$metadesc_filled/(count($mposts))*100) , array(self::$metadesc_filled , count($mposts)));
|
|
|
218 |
}
|
219 |
|
220 |
$permalink_structure = get_option('permalink_structure');
|
@@ -249,5 +279,4 @@ class MetaSeo_Dashboard {
|
|
249 |
$results['new_content'] = array($count_new , array(count($newcontent->get_posts()) , count($mposts)));
|
250 |
return $results;
|
251 |
}
|
252 |
-
|
253 |
}
|
18 |
public static $mpostname_inurl = 0;
|
19 |
public static $mcategory_inurl = 0;
|
20 |
public static $mpermalink = 50;
|
21 |
+
public static $mlink_complete = 0;
|
22 |
+
public static $mcount_link = 0;
|
23 |
|
24 |
|
25 |
public static function moptimizationChecking() {
|
50 |
$posts = $wpdb->get_results($query);
|
51 |
if (count($posts) > 0) {
|
52 |
$doc = new DOMDocument();
|
53 |
+
libxml_use_internal_errors( true );
|
54 |
$upload_dir = wp_upload_dir();
|
55 |
|
56 |
foreach ($posts as $post) {
|
114 |
if ($rank !== '') {
|
115 |
echo $rank;
|
116 |
} else {
|
117 |
+
echo __('We can\'t get rank of this site from Alexa.com!', 'wp-meta-seo');
|
118 |
}
|
119 |
}
|
120 |
|
132 |
}
|
133 |
|
134 |
$doc = new DOMDocument();
|
135 |
+
libxml_use_internal_errors( true );
|
136 |
@$doc->loadHTML($content);
|
137 |
$doc->preserveWhiteSpace = false;
|
138 |
|
150 |
}
|
151 |
|
152 |
$html = trim($tmp_dom->saveHTML());
|
153 |
+
$html = str_replace('We don\'t have', __('Alexa doesn\'t have','wp-meta-seo'), $html);
|
154 |
$html = str_replace('Get Certified', '', $html);
|
155 |
$html = str_replace('"/topsites/countries', '"http://www.alexa.com/topsites/countries', $html);
|
156 |
return $html;
|
191 |
}
|
192 |
|
193 |
function evolutive_dashboard(){
|
194 |
+
$post_types = get_post_types( array('public' => true, 'exclude_from_search' => false) ) ;
|
195 |
+
if(!empty($post_types['attachment'])) unset($post_types['attachment']);
|
196 |
+
$results = array('permalink_setting' => 50 , 'metatitle_filled' => array(0,array(0,0)) , 'metadesc_filled' => array(0,array(0,0)) , 'new_content' => array(0,array(0,0)) , 'link_meta' => array(0,array(0,0)));
|
197 |
$args = array(
|
198 |
'posts_per_page' => -1,
|
199 |
+
'post_type' => $post_types,
|
200 |
'suppress_filters' => true
|
201 |
);
|
202 |
$mposts = get_posts( $args );
|
|
|
203 |
if(empty($mposts)){
|
204 |
return $results;
|
205 |
}else{
|
216 |
if(($meta_desc != '' && strlen($meta_desc) <= self::$meta_desc_length ) || (!empty($meta_analysis) && !empty($meta_analysis['metadesc'])) ){
|
217 |
self::$metadesc_filled++;
|
218 |
}
|
219 |
+
|
220 |
+
// get link meta
|
221 |
+
|
222 |
+
$dom = new DOMDocument;
|
223 |
+
libxml_use_internal_errors( true );
|
224 |
+
if(isset($post->post_content) && $post->post_content != ''){
|
225 |
+
if ($dom->loadHTML($post->post_content)) {
|
226 |
+
$tags = $dom->getElementsByTagName('a');
|
227 |
+
foreach ($tags as $tag){
|
228 |
+
self::$mcount_link++;
|
229 |
+
$link_title = $tag->getAttribute('title');
|
230 |
+
if(isset($link_title) && $link_title != ''){
|
231 |
+
self::$mlink_complete++;
|
232 |
+
}
|
233 |
+
}
|
234 |
+
|
235 |
+
}
|
236 |
+
}
|
237 |
+
}
|
238 |
+
|
239 |
+
if(self::$mcount_link == 0){
|
240 |
+
$link_percent = 100;
|
241 |
+
}else{
|
242 |
+
$link_percent = ceil(self::$mlink_complete / self::$mcount_link*100);
|
243 |
}
|
244 |
|
245 |
$results['metatitle_filled'] = array(ceil(self::$metatitle_filled/(count($mposts))*100) , array(self::$metatitle_filled , count($mposts)));
|
246 |
$results['metadesc_filled'] = array(ceil(self::$metadesc_filled/(count($mposts))*100) , array(self::$metadesc_filled , count($mposts)));
|
247 |
+
$results['link_meta'] = array($link_percent , array(self::$mlink_complete , self::$mcount_link));
|
248 |
}
|
249 |
|
250 |
$permalink_structure = get_option('permalink_structure');
|
279 |
$results['new_content'] = array($count_new , array(count($newcontent->get_posts()) , count($mposts)));
|
280 |
return $results;
|
281 |
}
|
|
|
282 |
}
|
inc/class.metaseo-image-list-table.php
CHANGED
@@ -41,12 +41,12 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
|
|
41 |
|
42 |
<div class="alignleft">
|
43 |
<select name="image_mbulk_copy" class="mbulk_copy">
|
44 |
-
<option value="0"><?php _e('Bulk copy','
|
45 |
-
<option value="all"><?php _e('All Images','
|
46 |
-
<option value="bulk-copy-title-alt"><?php _e('Selected images','
|
47 |
</select>
|
48 |
-
<input type="button" name="image_do_copy_alt" class="button button-primary btn_do_copy image_do_copy_alt" value="<?php _e('Image name as alt text','
|
49 |
-
<input type="button" name="image_do_copy_title" class="button button-primary btn_do_copy image_do_copy_title" value="<?php _e('Image name as image title','
|
50 |
<span class="spinner"></span>
|
51 |
</div>
|
52 |
|
@@ -145,14 +145,14 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
|
|
145 |
function get_columns() {
|
146 |
return $columns = array(
|
147 |
'cb' => '<input id="cb-select-all-1" type="checkbox">',
|
148 |
-
'col_id' => __('ID', '
|
149 |
-
'col_image' => __('Image', '
|
150 |
-
'col_image_name' => __('Name', '
|
151 |
-
'col_image_info' => __('Optimization Info', '
|
152 |
-
'col_image_alternative' => __('Alternative text', '
|
153 |
-
'col_image_title' => __('Title', '
|
154 |
-
'col_image_legend' => __('Legend', '
|
155 |
-
'col_image_desc' => __('Description', '
|
156 |
);
|
157 |
}
|
158 |
|
@@ -375,9 +375,9 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
|
|
375 |
|
376 |
$m = isset($_REQUEST['sldate']) ? $_REQUEST['sldate'] : 0;
|
377 |
?>
|
378 |
-
<label for="filter-by-date" class="screen-reader-text"><?php _e('Filter by date'); ?></label>
|
379 |
<select name="<?php echo $name ?>" id="filter-by-date" class="metaseo-filter">
|
380 |
-
<option<?php selected($m, 0); ?> value="0"><?php _e('All dates'); ?></option>
|
381 |
<?php
|
382 |
foreach ($months as $arc_row) {
|
383 |
|
@@ -599,9 +599,9 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
|
|
599 |
|
600 |
private static function display_fix_metas_list($img_post_id, $posts, $meta_counter, $p, $im){
|
601 |
if($meta_counter){
|
602 |
-
$header = sprintf(__('We found %s image which needed to add or change meta information', '
|
603 |
}else{
|
604 |
-
$header = __('We found 0 image which needed to add or change meta information', '
|
605 |
}
|
606 |
|
607 |
//Get default meta information of the image
|
@@ -616,7 +616,7 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
|
|
616 |
<tbody>
|
617 |
<?php $alternate = '';?>
|
618 |
<?php if(count($posts) < 1): ?>
|
619 |
-
<tr><td colspan="10" style="height:95%"><?php echo __('This image has still not been inserted in any post!', '
|
620 |
<?php else: ?>
|
621 |
<tr class="metaseo-border-bottom">
|
622 |
<td colspan="1">ID</td>
|
@@ -648,7 +648,7 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
|
|
648 |
$value = str_replace($chr, htmlentities2($chr), $value);
|
649 |
}
|
650 |
?>
|
651 |
-
<input type="text" value="<?php echo ($value != '' ? $value : ''); ?>" id="metaseo-img-<?php echo $type. '-' .$post['ID'] ?>" class="metaseo-fix-meta metaseo-img-<?php echo $type ?>" data-meta-key="_metaseo_fix_metas" data-post-id="<?php echo $post['ID'] ?>" data-img-post-id="<?php echo $img_post_id ?>" data-meta-type="<?php echo $type ?>" data-meta-order="<?php echo $k ?>" data-file-name="<?php echo $file_name; ?>" placeholder="<?php echo ($value == '' ? __(ucfirst($type) . ' is empty', '
|
652 |
<span class="meta-update"></span>
|
653 |
<?php if(trim($$type) != '' && trim($$type) != $value): ?>
|
654 |
<a class="button meta-default" href="#" data-default-value="<?php echo esc_attr($$type) ?>" title="Add to input box" onclick="add_meta_default(this)"> <?php echo '<img src= "' . WPMETASEO_PLUGIN_URL . 'img/img-arrow.png" />' ?> Copy </a>
|
@@ -673,7 +673,7 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
|
|
673 |
|
674 |
private static function display_resize_image_list($img_post_id,$posts, $img_counter, $p, $im){
|
675 |
|
676 |
-
$header = sprintf(__('We found %s which needed to optimize', '
|
677 |
?>
|
678 |
<h3 class="content-header"><?php echo $header ?></h3>
|
679 |
<div class="content-box">
|
@@ -714,7 +714,7 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
|
|
714 |
<?php endforeach ?>
|
715 |
</td>
|
716 |
<td colspan="2" class="metaseo-action">
|
717 |
-
<a href="javascript:void(0);" class="metaseo-optimize button" data-img-post-id="<?php echo $img_post_id ?>" data-post-id="<?php echo $post['ID'] ?>" onclick="optimize_imgs(this)"><?php echo __('Replace?', '
|
718 |
<span class="optimizing spinner"></span>
|
719 |
</td>
|
720 |
<td colspan="4">
|
@@ -768,7 +768,7 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
|
|
768 |
else{
|
769 |
$ret = array(
|
770 |
'success' => false,
|
771 |
-
'msg' => __('The post is not existed, please choose one another!', '
|
772 |
);
|
773 |
}
|
774 |
|
@@ -1016,18 +1016,18 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
|
|
1016 |
|
1017 |
if(wp_update_post($data)){
|
1018 |
$response->updated = true;
|
1019 |
-
$response->msg = __($label . ' was saved', '
|
1020 |
}
|
1021 |
}
|
1022 |
else{
|
1023 |
update_post_meta($post_id, $aliases[$meta_type], $meta_value);
|
1024 |
$response->updated = true;
|
1025 |
-
$response->msg = __($label . ' was saved', '
|
1026 |
}
|
1027 |
|
1028 |
}
|
1029 |
else{
|
1030 |
-
$response->msg = __('There is a problem when update image meta!', '
|
1031 |
}
|
1032 |
|
1033 |
echo json_encode($response);
|
@@ -1044,7 +1044,7 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
|
|
1044 |
$linkold = $img_meta['file'];
|
1045 |
$response = new stdClass();
|
1046 |
$response->updated = FALSE;
|
1047 |
-
$response->msg = __('There is a problem when update image name', '
|
1048 |
|
1049 |
$upload_dirs = wp_upload_dir();
|
1050 |
$upload_dir = $upload_dirs['basedir'];
|
@@ -1146,24 +1146,24 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
|
|
1146 |
update_post_meta($postID, '_wp_attachment_metadata', $attached_metadata);
|
1147 |
|
1148 |
$response->updated = true;
|
1149 |
-
$response->msg = __('Image name was changed', '
|
1150 |
} else {
|
1151 |
$response->iname = $old_name;
|
1152 |
-
$response->msg = __('There is a problem when update image name', '
|
1153 |
}
|
1154 |
}
|
1155 |
} else {
|
1156 |
|
1157 |
-
$response->msg = __('Name is existing', '
|
1158 |
$response->iname = $old_name;
|
1159 |
}
|
1160 |
} else {
|
1161 |
$response->iname = $old_name;
|
1162 |
-
$response->msg = __('File is not existed', '
|
1163 |
}
|
1164 |
} else {
|
1165 |
$response->iname = $old_name;
|
1166 |
-
$response->msg = __('Should not be empty', '
|
1167 |
}
|
1168 |
echo json_encode($response);
|
1169 |
wp_die();
|
@@ -1175,7 +1175,7 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
|
|
1175 |
$response->updated = false;
|
1176 |
foreach($_post as $k => $v){
|
1177 |
if(!$v && !in_array($k, array('meta_value', 'meta_order'))){
|
1178 |
-
$response->msg = __('There is a problem when update image meta!', '
|
1179 |
|
1180 |
echo json_encode($response);
|
1181 |
wp_die();
|
@@ -1198,7 +1198,7 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
|
|
1198 |
//Then we must update this meta info in the appropriate post content
|
1199 |
if(!$post = get_post($post_id))
|
1200 |
{
|
1201 |
-
$response->msg = __('The post has been deleted before, please check again!', '
|
1202 |
}
|
1203 |
else{
|
1204 |
if($post->post_content !== ''){
|
@@ -1233,15 +1233,15 @@ class MetaSeo_Image_List_Table extends WP_List_Table {
|
|
1233 |
|
1234 |
//Update content of this post.
|
1235 |
if(!wp_update_post(array('ID' => $post->ID, 'post_content' => $post_content))){
|
1236 |
-
$response->msg = __('The post haven\'t been updated, please check again!', '
|
1237 |
}
|
1238 |
else{
|
1239 |
$response->updated = true;
|
1240 |
-
$response->msg = __(ucfirst($meta_type) . ' was saved','
|
1241 |
}
|
1242 |
}
|
1243 |
else{
|
1244 |
-
$response->msg = __('This image has been removed from the post, please check again!', '
|
1245 |
}
|
1246 |
}
|
1247 |
else{
|
41 |
|
42 |
<div class="alignleft">
|
43 |
<select name="image_mbulk_copy" class="mbulk_copy">
|
44 |
+
<option value="0"><?php _e('Bulk copy','wp-meta-seo') ?></option>
|
45 |
+
<option value="all"><?php _e('All Images','wp-meta-seo') ?></option>
|
46 |
+
<option value="bulk-copy-title-alt"><?php _e('Selected images','wp-meta-seo') ?></option>
|
47 |
</select>
|
48 |
+
<input type="button" name="image_do_copy_alt" class="button button-primary btn_do_copy image_do_copy_alt" value="<?php _e('Image name as alt text','wp-meta-seo') ?>">
|
49 |
+
<input type="button" name="image_do_copy_title" class="button button-primary btn_do_copy image_do_copy_title" value="<?php _e('Image name as image title','wp-meta-seo') ?>">
|
50 |
<span class="spinner"></span>
|
51 |
</div>
|
52 |
|
145 |
function get_columns() {
|
146 |
return $columns = array(
|
147 |
'cb' => '<input id="cb-select-all-1" type="checkbox">',
|
148 |
+
'col_id' => __('ID', 'wp-meta-seo'),
|
149 |
+
'col_image' => __('Image', 'wp-meta-seo'),
|
150 |
+
'col_image_name' => __('Name', 'wp-meta-seo'),
|
151 |
+
'col_image_info' => __('Optimization Info', 'wp-meta-seo'),
|
152 |
+
'col_image_alternative' => __('Alternative text', 'wp-meta-seo'),
|
153 |
+
'col_image_title' => __('Title', 'wp-meta-seo'),
|
154 |
+
'col_image_legend' => __('Legend', 'wp-meta-seo'),
|
155 |
+
'col_image_desc' => __('Description', 'wp-meta-seo'),
|
156 |
);
|
157 |
}
|
158 |
|
375 |
|
376 |
$m = isset($_REQUEST['sldate']) ? $_REQUEST['sldate'] : 0;
|
377 |
?>
|
378 |
+
<label for="filter-by-date" class="screen-reader-text"><?php _e('Filter by date','wp-meta-seo'); ?></label>
|
379 |
<select name="<?php echo $name ?>" id="filter-by-date" class="metaseo-filter">
|
380 |
+
<option<?php selected($m, 0); ?> value="0"><?php _e('All dates','wp-meta-seo'); ?></option>
|
381 |
<?php
|
382 |
foreach ($months as $arc_row) {
|
383 |
|
599 |
|
600 |
private static function display_fix_metas_list($img_post_id, $posts, $meta_counter, $p, $im){
|
601 |
if($meta_counter){
|
602 |
+
$header = sprintf(__('We found %s image which needed to add or change meta information', 'wp-meta-seo'),$meta_counter . $im . $p);
|
603 |
}else{
|
604 |
+
$header = __('We found 0 image which needed to add or change meta information', 'wp-meta-seo');//__('We found 0 image which needed to add or change meta information', 'wp-meta-seo');
|
605 |
}
|
606 |
|
607 |
//Get default meta information of the image
|
616 |
<tbody>
|
617 |
<?php $alternate = '';?>
|
618 |
<?php if(count($posts) < 1): ?>
|
619 |
+
<tr><td colspan="10" style="height:95%"><?php echo __('This image has still not been inserted in any post!', 'wp-meta-seo') ?></td></tr>
|
620 |
<?php else: ?>
|
621 |
<tr class="metaseo-border-bottom">
|
622 |
<td colspan="1">ID</td>
|
648 |
$value = str_replace($chr, htmlentities2($chr), $value);
|
649 |
}
|
650 |
?>
|
651 |
+
<input type="text" value="<?php echo ($value != '' ? $value : ''); ?>" id="metaseo-img-<?php echo $type. '-' .$post['ID'] ?>" class="metaseo-fix-meta metaseo-img-<?php echo $type ?>" data-meta-key="_metaseo_fix_metas" data-post-id="<?php echo $post['ID'] ?>" data-img-post-id="<?php echo $img_post_id ?>" data-meta-type="<?php echo $type ?>" data-meta-order="<?php echo $k ?>" data-file-name="<?php echo $file_name; ?>" placeholder="<?php echo ($value == '' ? __(ucfirst($type) . ' is empty', 'wp-meta-seo') : '') ?>" onfocus="metaseo_fix_meta(this);" onblur="updateInputBlur(this)" onkeydown="return checkeyCode(event,this)" />
|
652 |
<span class="meta-update"></span>
|
653 |
<?php if(trim($$type) != '' && trim($$type) != $value): ?>
|
654 |
<a class="button meta-default" href="#" data-default-value="<?php echo esc_attr($$type) ?>" title="Add to input box" onclick="add_meta_default(this)"> <?php echo '<img src= "' . WPMETASEO_PLUGIN_URL . 'img/img-arrow.png" />' ?> Copy </a>
|
673 |
|
674 |
private static function display_resize_image_list($img_post_id,$posts, $img_counter, $p, $im){
|
675 |
|
676 |
+
$header = sprintf(__('We found %s which needed to optimize', 'wp-meta-seo'), $img_counter . $im . $p);
|
677 |
?>
|
678 |
<h3 class="content-header"><?php echo $header ?></h3>
|
679 |
<div class="content-box">
|
714 |
<?php endforeach ?>
|
715 |
</td>
|
716 |
<td colspan="2" class="metaseo-action">
|
717 |
+
<a href="javascript:void(0);" class="metaseo-optimize button" data-img-post-id="<?php echo $img_post_id ?>" data-post-id="<?php echo $post['ID'] ?>" onclick="optimize_imgs(this)"><?php echo __('Replace?', 'wp-meta-seo') ?></a>
|
718 |
<span class="optimizing spinner"></span>
|
719 |
</td>
|
720 |
<td colspan="4">
|
768 |
else{
|
769 |
$ret = array(
|
770 |
'success' => false,
|
771 |
+
'msg' => __('The post is not existed, please choose one another!', 'wp-meta-seo')
|
772 |
);
|
773 |
}
|
774 |
|
1016 |
|
1017 |
if(wp_update_post($data)){
|
1018 |
$response->updated = true;
|
1019 |
+
$response->msg = __($label . ' was saved', 'wp-meta-seo');
|
1020 |
}
|
1021 |
}
|
1022 |
else{
|
1023 |
update_post_meta($post_id, $aliases[$meta_type], $meta_value);
|
1024 |
$response->updated = true;
|
1025 |
+
$response->msg = __($label . ' was saved', 'wp-meta-seo');
|
1026 |
}
|
1027 |
|
1028 |
}
|
1029 |
else{
|
1030 |
+
$response->msg = __('There is a problem when update image meta!', 'wp-meta-seo');
|
1031 |
}
|
1032 |
|
1033 |
echo json_encode($response);
|
1044 |
$linkold = $img_meta['file'];
|
1045 |
$response = new stdClass();
|
1046 |
$response->updated = FALSE;
|
1047 |
+
$response->msg = __('There is a problem when update image name', 'wp-meta-seo');
|
1048 |
|
1049 |
$upload_dirs = wp_upload_dir();
|
1050 |
$upload_dir = $upload_dirs['basedir'];
|
1146 |
update_post_meta($postID, '_wp_attachment_metadata', $attached_metadata);
|
1147 |
|
1148 |
$response->updated = true;
|
1149 |
+
$response->msg = __('Image name was changed', 'wp-meta-seo');
|
1150 |
} else {
|
1151 |
$response->iname = $old_name;
|
1152 |
+
$response->msg = __('There is a problem when update image name', 'wp-meta-seo');
|
1153 |
}
|
1154 |
}
|
1155 |
} else {
|
1156 |
|
1157 |
+
$response->msg = __('Name is existing', 'wp-meta-seo');
|
1158 |
$response->iname = $old_name;
|
1159 |
}
|
1160 |
} else {
|
1161 |
$response->iname = $old_name;
|
1162 |
+
$response->msg = __('File is not existed', 'wp-meta-seo');
|
1163 |
}
|
1164 |
} else {
|
1165 |
$response->iname = $old_name;
|
1166 |
+
$response->msg = __('Should not be empty', 'wp-meta-seo');
|
1167 |
}
|
1168 |
echo json_encode($response);
|
1169 |
wp_die();
|
1175 |
$response->updated = false;
|
1176 |
foreach($_post as $k => $v){
|
1177 |
if(!$v && !in_array($k, array('meta_value', 'meta_order'))){
|
1178 |
+
$response->msg = __('There is a problem when update image meta!', 'wp-meta-seo') ;
|
1179 |
|
1180 |
echo json_encode($response);
|
1181 |
wp_die();
|
1198 |
//Then we must update this meta info in the appropriate post content
|
1199 |
if(!$post = get_post($post_id))
|
1200 |
{
|
1201 |
+
$response->msg = __('The post has been deleted before, please check again!', 'wp-meta-seo');
|
1202 |
}
|
1203 |
else{
|
1204 |
if($post->post_content !== ''){
|
1233 |
|
1234 |
//Update content of this post.
|
1235 |
if(!wp_update_post(array('ID' => $post->ID, 'post_content' => $post_content))){
|
1236 |
+
$response->msg = __('The post haven\'t been updated, please check again!', 'wp-meta-seo');
|
1237 |
}
|
1238 |
else{
|
1239 |
$response->updated = true;
|
1240 |
+
$response->msg = __(ucfirst($meta_type) . ' was saved','wp-meta-seo') ;
|
1241 |
}
|
1242 |
}
|
1243 |
else{
|
1244 |
+
$response->msg = __('This image has been removed from the post, please check again!', 'wp-meta-seo');
|
1245 |
}
|
1246 |
}
|
1247 |
else{
|
inc/class.metaseo-link-list-table.php
ADDED
@@ -0,0 +1,551 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Comments to come later
|
4 |
+
*
|
5 |
+
*
|
6 |
+
*/
|
7 |
+
|
8 |
+
if (!class_exists('WP_List_Table')) {
|
9 |
+
require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
|
10 |
+
}
|
11 |
+
|
12 |
+
class MetaSeo_Link_List_Table extends WP_List_Table {
|
13 |
+
|
14 |
+
function __construct() {
|
15 |
+
parent::__construct(array(
|
16 |
+
'singular' => 'metaseo_image',
|
17 |
+
'plural' => 'metaseo_images',
|
18 |
+
'ajax' => true
|
19 |
+
));
|
20 |
+
}
|
21 |
+
|
22 |
+
function display_tablenav($which) {
|
23 |
+
$post_types = get_post_types( array('public' => true, 'exclude_from_search' => false) ) ;
|
24 |
+
if(!empty($post_types['attachment'])) unset($post_types['attachment']);
|
25 |
+
$p_type = "('".implode("','", $post_types)."')";
|
26 |
+
?>
|
27 |
+
<div class="tablenav <?php echo esc_attr($which); ?>">
|
28 |
+
|
29 |
+
<?php if ($which == 'top'): ?>
|
30 |
+
<input type="hidden" name="page" value="metaseo_image_meta" />
|
31 |
+
<div class="alignleft actions bulkactions">
|
32 |
+
<?php $this->months_fillter($p_type, 'sldate', 'filter_date_action'); ?>
|
33 |
+
</div>
|
34 |
+
<?php elseif ($which == 'bottom'): ?>
|
35 |
+
<input type="hidden" name="page" value="metaseo_image_meta" />
|
36 |
+
<div class="alignleft actions bulkactions">
|
37 |
+
<?php $this->months_fillter($p_type, 'sldate1', 'filter_date_action'); ?>
|
38 |
+
</div>
|
39 |
+
<?php endif ?>
|
40 |
+
|
41 |
+
<input type="hidden" name="page" value="metaseo_image_meta" />
|
42 |
+
<?php if (!empty($_REQUEST['post_status'])): ?>
|
43 |
+
<input type="hidden" name="post_status" value="<?php echo esc_attr($_REQUEST['post_status']); ?>" />
|
44 |
+
<?php endif ?>
|
45 |
+
|
46 |
+
<?php //$this->extra_tablenav($which); ?>
|
47 |
+
|
48 |
+
<div style="float:right;margin-left:8px;">
|
49 |
+
<input type="number" required min="1" value="<?php echo $this->_pagination_args['per_page'] ?>" maxlength="3" name="metaseo_link_per_page" class="metaseo_imgs_per_page screen-per-page" max="999" min="1" step="1">
|
50 |
+
<input type="submit" name="btn_perpage" class="button_perpage button" id="button_perpage" value="Apply" >
|
51 |
+
</div>
|
52 |
+
|
53 |
+
<?php $this->pagination($which); ?>
|
54 |
+
<br class="clear" />
|
55 |
+
</div>
|
56 |
+
|
57 |
+
<?php
|
58 |
+
}
|
59 |
+
|
60 |
+
function get_views() {
|
61 |
+
global $wpdb;
|
62 |
+
|
63 |
+
|
64 |
+
$status_links = array();
|
65 |
+
|
66 |
+
$post_types = get_post_types(array('public' => true, 'exclude_from_search' => false));
|
67 |
+
$post_types = "'" . implode("', '", $post_types) . "'";
|
68 |
+
|
69 |
+
$states = get_post_stati(array('show_in_admin_all_list' => true));
|
70 |
+
$states['trash'] = 'trash';
|
71 |
+
$all_states = "'" . implode("', '", $states) . "'";
|
72 |
+
|
73 |
+
$total_posts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_status IN ($all_states) AND post_type IN ($post_types)");
|
74 |
+
|
75 |
+
$class = empty($_REQUEST['post_status']) ? ' class="current"' : '';
|
76 |
+
$status_links['all'] = "<a href='admin.php?page=metaseo_image_meta'$class>" . sprintf(_nx('All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_posts, 'posts'), number_format_i18n($total_posts)) . '</a>';
|
77 |
+
|
78 |
+
foreach (get_post_stati(array('show_in_admin_all_list' => true), 'objects') as $status) {
|
79 |
+
|
80 |
+
$status_name = $status->name;
|
81 |
+
|
82 |
+
$total = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_status IN ('$status_name') AND post_type IN ($post_types)");
|
83 |
+
|
84 |
+
if ($total == 0) {
|
85 |
+
continue;
|
86 |
+
}
|
87 |
+
|
88 |
+
if (isset($_REQUEST['post_status']) && $status_name == $_REQUEST['post_status']) {
|
89 |
+
$class = ' class="current"';
|
90 |
+
} else {
|
91 |
+
$class = '';
|
92 |
+
}
|
93 |
+
|
94 |
+
$status_links[$status_name] = "<a href='admin.php?page=metaseo_image_meta&post_status=$status_name'$class>" . sprintf(translate_nooped_plural($status->label_count, $total), number_format_i18n($total)) . '</a>';
|
95 |
+
}
|
96 |
+
$trashed_posts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_status IN ('trash') AND post_type IN ($post_types)");
|
97 |
+
$class = ( isset($_REQUEST['post_status']) && 'trash' == $_REQUEST['post_status'] ) ? 'class="current"' : '';
|
98 |
+
$status_links['trash'] = "<a href='admin.php?page=metaseo_image_meta&post_status=trash'$class>" . sprintf(_nx('Trash <span class="count">(%s)</span>', 'Trash <span class="count">(%s)</span>', $trashed_posts, 'posts'), number_format_i18n($trashed_posts)) . '</a>';
|
99 |
+
|
100 |
+
return $status_links;
|
101 |
+
}
|
102 |
+
|
103 |
+
function extra_tablenav($which) {
|
104 |
+
|
105 |
+
#if ('top' == $which) {
|
106 |
+
echo '<div class="alignleft actions">';
|
107 |
+
global $wpdb;
|
108 |
+
|
109 |
+
$post_types = get_post_types(array('public' => true, 'exclude_from_search' => false));
|
110 |
+
$post_types = "'" . implode("', '", $post_types) . "'";
|
111 |
+
|
112 |
+
$states = get_post_stati(array('show_in_admin_all_list' => true));
|
113 |
+
$states['trash'] = 'trash';
|
114 |
+
$all_states = "'" . implode("', '", $states) . "'";
|
115 |
+
|
116 |
+
$query = "SELECT DISTINCT post_type FROM $wpdb->posts WHERE post_status IN ($all_states) AND post_type IN ($post_types) ORDER BY 'post_type' ASC";
|
117 |
+
$post_types = $wpdb->get_results($query);
|
118 |
+
|
119 |
+
$selected = !empty($_REQUEST['post_type_filter']) ? $_REQUEST['post_type_filter'] : -1;
|
120 |
+
|
121 |
+
$options = '<option value="-1">Show All Post Types</option>';
|
122 |
+
|
123 |
+
foreach ($post_types as $post_type) {
|
124 |
+
$obj = get_post_type_object($post_type->post_type);
|
125 |
+
$options .= sprintf('<option value="%2$s" %3$s>%1$s</option>', $obj->labels->name, $post_type->post_type, selected($selected, $post_type->post_type, false));
|
126 |
+
}
|
127 |
+
|
128 |
+
echo "</div>";
|
129 |
+
#echo "</form>";
|
130 |
+
#}
|
131 |
+
}
|
132 |
+
|
133 |
+
function get_columns() {
|
134 |
+
return $columns = array(
|
135 |
+
'cb' => '<input id="cb-select-all-1" type="checkbox">',
|
136 |
+
'col_id' => __('ID', 'wp-meta-seo'),
|
137 |
+
'post_id' => __('Source', 'wp-meta-seo'),
|
138 |
+
'col_link_url' => __('URL', 'wp-meta-seo'),
|
139 |
+
'col_link_title' => __('Link title', 'wp-meta-seo'),
|
140 |
+
'col_link_label' => __('Link text', 'wp-meta-seo'),
|
141 |
+
);
|
142 |
+
}
|
143 |
+
|
144 |
+
function get_sortable_columns() {
|
145 |
+
return $sortable = array(
|
146 |
+
'post_id' => array('post_title', true)
|
147 |
+
);
|
148 |
+
}
|
149 |
+
|
150 |
+
/**
|
151 |
+
* Print column headers, accounting for hidden and sortable columns.
|
152 |
+
*
|
153 |
+
* @since 3.1.0
|
154 |
+
* @access public
|
155 |
+
*
|
156 |
+
* @param bool $with_id Whether to set the id attribute or not
|
157 |
+
*/
|
158 |
+
public function print_column_headers($with_id = true) {
|
159 |
+
list( $columns, $hidden, $sortable ) = $this->get_column_info();
|
160 |
+
|
161 |
+
$current_url = set_url_scheme('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
|
162 |
+
$current_url = remove_query_arg('paged', $current_url);
|
163 |
+
|
164 |
+
if (isset($_GET['orderby']))
|
165 |
+
$current_orderby = $_GET['orderby'];
|
166 |
+
else
|
167 |
+
$current_orderby = '';
|
168 |
+
|
169 |
+
if (isset($_GET['order']) && 'desc' == $_GET['order'])
|
170 |
+
$current_order = 'desc';
|
171 |
+
else
|
172 |
+
$current_order = 'asc';
|
173 |
+
|
174 |
+
if (!empty($columns['cb'])) {
|
175 |
+
static $cb_counter = 1;
|
176 |
+
$columns['cb'] = '<label class="screen-reader-text" for="cb-select-all-' . $cb_counter . '">' . __('Select All') . '</label>'
|
177 |
+
. '<input id="cb-select-all-' . $cb_counter . '" type="checkbox" style="margin:0;" />';
|
178 |
+
$cb_counter++;
|
179 |
+
}
|
180 |
+
|
181 |
+
foreach ($columns as $column_key => $column_display_name) {
|
182 |
+
$class = array('manage-column', "column-$column_key");
|
183 |
+
|
184 |
+
$style = '';
|
185 |
+
if (in_array($column_key, $hidden))
|
186 |
+
$style = 'display:none;';
|
187 |
+
|
188 |
+
$style = ' style="' . $style . '"';
|
189 |
+
|
190 |
+
if ('cb' == $column_key)
|
191 |
+
$class[] = 'check-column';
|
192 |
+
elseif (in_array($column_key, array('posts', 'comments', 'links')))
|
193 |
+
$class[] = 'num';
|
194 |
+
|
195 |
+
if (isset($sortable[$column_key])) {
|
196 |
+
list( $orderby, $desc_first ) = $sortable[$column_key];
|
197 |
+
|
198 |
+
if ($current_orderby == $orderby) {
|
199 |
+
$order = 'asc' == $current_order ? 'desc' : 'asc';
|
200 |
+
$class[] = 'sorted';
|
201 |
+
$class[] = $current_order;
|
202 |
+
} else {
|
203 |
+
$order = $desc_first ? 'desc' : 'asc';
|
204 |
+
$class[] = 'sortable';
|
205 |
+
$class[] = $desc_first ? 'asc' : 'desc';
|
206 |
+
}
|
207 |
+
|
208 |
+
$column_display_name = '<a href="' . esc_url(add_query_arg(compact('orderby', 'order'), $current_url)) . '"><span>' . $column_display_name . '</span><span class="sorting-indicator"></span></a>';
|
209 |
+
}
|
210 |
+
|
211 |
+
$id = $with_id ? "id='$column_key'" : '';
|
212 |
+
|
213 |
+
if (!empty($class))
|
214 |
+
$class = "class='" . join(' ', $class) . "'";
|
215 |
+
|
216 |
+
if ($column_key === 'col_id') {
|
217 |
+
echo "<th scope='col' $id $class $style colspan=\"1\">$column_display_name</th>";
|
218 |
+
} elseif ($column_key === 'col_image_name') {
|
219 |
+
echo "<th scope='col' $id $class $style colspan=\"4\">$column_display_name</th>";
|
220 |
+
} elseif ($column_key === 'col_image_info') {
|
221 |
+
echo "<th scope='col' $id $class $style colspan=\"5\">$column_display_name</th>";
|
222 |
+
} elseif ($column_key === 'cb') {
|
223 |
+
echo "<th scope='col' $id $class style='padding:8px 10px;'>$column_display_name</th>";
|
224 |
+
} else {
|
225 |
+
echo "<th scope='col' $id $class $style colspan=\"3\">$column_display_name</th>";
|
226 |
+
}
|
227 |
+
}
|
228 |
+
}
|
229 |
+
|
230 |
+
function prepare_items() {
|
231 |
+
global $wpdb, $_wp_column_headers;
|
232 |
+
//$GLOBALS['wp_filter']["manage_{$GLOBALS['screen']->id}_screen_columns"];
|
233 |
+
|
234 |
+
$screen = get_current_screen();
|
235 |
+
|
236 |
+
$where = array();
|
237 |
+
$post_type = isset($_REQUEST['post_type_filter']) ? $_REQUEST['post_type_filter'] : "";
|
238 |
+
if ($post_type == "-1") {
|
239 |
+
$post_type = "";
|
240 |
+
}
|
241 |
+
|
242 |
+
$post_types = get_post_types(array('public' => true, 'exclude_from_search' => false));
|
243 |
+
unset($post_types['attachment']);
|
244 |
+
if (!empty($post_type) && !in_array($post_type, $post_types))
|
245 |
+
$post_type = '\'post\'';
|
246 |
+
else if (empty($post_type)) {
|
247 |
+
$post_type = "'" . implode("', '", $post_types) . "'";
|
248 |
+
} else {
|
249 |
+
$post_type = "'" . $post_type . "'";
|
250 |
+
}
|
251 |
+
|
252 |
+
$where[] = "post_type IN ($post_type)";
|
253 |
+
$states = get_post_stati(array('show_in_admin_all_list' => true));
|
254 |
+
$states['trash'] = 'trash';
|
255 |
+
$all_states = "'" . implode("', '", $states) . "'";
|
256 |
+
|
257 |
+
if (empty($_REQUEST['post_status'])) {
|
258 |
+
$where[] = "post_status IN ($all_states)";
|
259 |
+
} else {
|
260 |
+
$requested_state = $_REQUEST['post_status'];
|
261 |
+
if (in_array($requested_state, $states)) {
|
262 |
+
$where[] = "post_status IN ('$requested_state')";
|
263 |
+
} else {
|
264 |
+
$where[] = "post_status IN ($all_states)";
|
265 |
+
}
|
266 |
+
}
|
267 |
+
|
268 |
+
if(!empty($_REQUEST['sldate'])){
|
269 |
+
$where[] = $wpdb->prepare(" post_date Like %s","%" .$_REQUEST['sldate']. "%");
|
270 |
+
}
|
271 |
+
|
272 |
+
//Order By block
|
273 |
+
$orderby = !empty($_GET["orderby"]) ? ($_GET["orderby"]) : 'post_title';
|
274 |
+
$order = !empty($_GET["order"]) ? ($_GET["order"]) : 'asc';
|
275 |
+
|
276 |
+
$sortable = $this->get_sortable_columns();
|
277 |
+
if (in_array($orderby, $sortable)) {
|
278 |
+
$orderStr = $orderby;
|
279 |
+
} else {
|
280 |
+
$orderStr = 'post_title';
|
281 |
+
}
|
282 |
+
|
283 |
+
if ($order == "asc") {
|
284 |
+
$orderStr .= " ASC";
|
285 |
+
} else {
|
286 |
+
$orderStr .= " DESC";
|
287 |
+
}
|
288 |
+
|
289 |
+
if (!empty($orderby) & !empty($order)) {
|
290 |
+
$orderStr = ' ORDER BY ' . $orderStr;
|
291 |
+
}
|
292 |
+
|
293 |
+
$query = "SELECT ID, post_title, post_content ,post_name, post_type, post_status"
|
294 |
+
. " FROM $wpdb->posts "
|
295 |
+
. " WHERE " . implode(' AND ', $where) . $orderStr;
|
296 |
+
|
297 |
+
$columns = $this->get_columns();
|
298 |
+
$hidden = array();
|
299 |
+
$sortable = $this->get_sortable_columns();
|
300 |
+
$this->_column_headers = array($columns, $hidden, $sortable);
|
301 |
+
|
302 |
+
$results = $wpdb->get_results($query);
|
303 |
+
$keyword = !empty($_GET["txtkeyword"]) ? $_GET["txtkeyword"] : '';
|
304 |
+
$list_link = array();
|
305 |
+
foreach ($results as $post){
|
306 |
+
$dom = new DOMDocument;
|
307 |
+
libxml_use_internal_errors( true );
|
308 |
+
if(isset($post->post_content) && $post->post_content != ''){
|
309 |
+
if ($dom->loadHTML($post->post_content)) {
|
310 |
+
// Extracting the specified elements from the web page
|
311 |
+
preg_match_all("|<[^>]+>(.*)</[^>]+>|U",$post->post_content,$matches, PREG_PATTERN_ORDER);
|
312 |
+
foreach (array_unique($matches[0]) as $match){
|
313 |
+
if(strpos($match, '<a') !== false && strpos($match, 'a>') !== false){
|
314 |
+
$dom = new DOMDocument;
|
315 |
+
libxml_use_internal_errors( true );
|
316 |
+
if ($dom->loadHTML($match)) {
|
317 |
+
$tags = $dom->getElementsByTagName('a');
|
318 |
+
$html_tag = $match;
|
319 |
+
$link_title = $tags->item(0)->getAttribute('title');
|
320 |
+
$link_url = $tags->item(0)->getAttribute('href');
|
321 |
+
$link_label = $tags->item(0)->nodeValue;
|
322 |
+
if(isset($link_label) && $link_label == ''){
|
323 |
+
$link_label = __('(None)','wp-meta-seo');
|
324 |
+
}
|
325 |
+
|
326 |
+
if (isset($keyword) && $keyword != '') {
|
327 |
+
if(strpos($link_label, $keyword) !== false || strpos($link_title, $keyword) !== false){
|
328 |
+
$list_link[] = array('html_tag' => $html_tag , 'link_title' => $link_title , 'link_label' => $link_label , 'link_url' => $link_url , 'post_title' => $post->post_title , 'post_id' => $post->ID);
|
329 |
+
}
|
330 |
+
}else{
|
331 |
+
$list_link[] = array('html_tag' => $html_tag , 'link_title' => $link_title , 'link_label' => $link_label , 'link_url' => $link_url ,'post_title' => $post->post_title , 'post_id' => $post->ID);
|
332 |
+
}
|
333 |
+
}
|
334 |
+
}
|
335 |
+
}
|
336 |
+
}
|
337 |
+
}
|
338 |
+
}
|
339 |
+
|
340 |
+
$total_items = count($list_link);
|
341 |
+
if (!empty($_REQUEST['metaseo_link_per_page'])) {
|
342 |
+
$_per_page = intval($_REQUEST['metaseo_link_per_page']);
|
343 |
+
} else {
|
344 |
+
$_per_page = 0;
|
345 |
+
}
|
346 |
+
|
347 |
+
$per_page = get_user_option('metaseo_link_per_page');
|
348 |
+
if ($per_page !== false) {
|
349 |
+
if ($_per_page && $_per_page !== $per_page) {
|
350 |
+
$per_page = $_per_page;
|
351 |
+
update_user_option(get_current_user_id(), 'metaseo_link_per_page', $per_page);
|
352 |
+
}
|
353 |
+
} else {
|
354 |
+
if ($_per_page > 0) {
|
355 |
+
$per_page = $_per_page;
|
356 |
+
} else {
|
357 |
+
$per_page = 10;
|
358 |
+
}
|
359 |
+
add_user_meta(get_current_user_id(), 'metaseo_link_per_page', $per_page);
|
360 |
+
}
|
361 |
+
|
362 |
+
$paged = !empty($_GET["paged"]) ? $_GET["paged"] : '';
|
363 |
+
if (empty($paged) || !is_numeric($paged) || $paged <= 0) {
|
364 |
+
$paged = 1;
|
365 |
+
}
|
366 |
+
|
367 |
+
$total_pages = ceil($total_items / $per_page);
|
368 |
+
$this->set_pagination_args(array(
|
369 |
+
'total_items' => $total_items,
|
370 |
+
'total_pages' => $total_pages,
|
371 |
+
'per_page' => $per_page
|
372 |
+
));
|
373 |
+
|
374 |
+
foreach ($list_link as $key => $item){
|
375 |
+
if($key >= $paged*$per_page || $key < ($paged-1)*$per_page){
|
376 |
+
unset($list_link[$key]);
|
377 |
+
}
|
378 |
+
}
|
379 |
+
|
380 |
+
$this->items = $list_link;
|
381 |
+
}
|
382 |
+
|
383 |
+
function search_box1() {
|
384 |
+
if (empty($_REQUEST['txtkeyword']) && !$this->has_items())
|
385 |
+
return;
|
386 |
+
$txtkeyword = (!empty($_REQUEST['txtkeyword'])) ? urldecode(stripslashes($_REQUEST['txtkeyword'])) : "";
|
387 |
+
if (!empty($_REQUEST['orderby']))
|
388 |
+
echo '<input type="hidden" name="orderby" value="' . esc_attr($_REQUEST['orderby']) . '" />';
|
389 |
+
if (!empty($_REQUEST['order']))
|
390 |
+
echo '<input type="hidden" name="order" value="' . esc_attr($_REQUEST['order']) . '" />';
|
391 |
+
if (!empty($_REQUEST['post_mime_type']))
|
392 |
+
echo '<input type="hidden" name="post_mime_type" value="' . esc_attr($_REQUEST['post_mime_type']) . '" />';
|
393 |
+
if (!empty($_REQUEST['detached']))
|
394 |
+
echo '<input type="hidden" name="detached" value="' . esc_attr($_REQUEST['detached']) . '" />';
|
395 |
+
?>
|
396 |
+
<p class="search-box">
|
397 |
+
|
398 |
+
<input type="search" id="image-search-input" name="txtkeyword" value="<?php echo esc_attr(stripslashes($txtkeyword)); ?>" />
|
399 |
+
<?php submit_button('Search', 'button', 'search', false, array('id' => 'search-submit')); ?>
|
400 |
+
</p>
|
401 |
+
<?php
|
402 |
+
}
|
403 |
+
|
404 |
+
function months_fillter($post_type, $name, $namebutton) {
|
405 |
+
global $wpdb, $wp_locale;
|
406 |
+
|
407 |
+
$months = $wpdb->get_results("
|
408 |
+
SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month
|
409 |
+
FROM $wpdb->posts
|
410 |
+
WHERE post_type IN $post_type
|
411 |
+
ORDER BY post_date DESC
|
412 |
+
");
|
413 |
+
|
414 |
+
$months = apply_filters('months_dropdown_results', $months, $post_type);
|
415 |
+
$month_count = count($months);
|
416 |
+
|
417 |
+
if (!$month_count || ( 1 == $month_count && 0 == $months[0]->month ))
|
418 |
+
return;
|
419 |
+
|
420 |
+
$m = isset($_REQUEST['sldate']) ? $_REQUEST['sldate'] : 0;
|
421 |
+
?>
|
422 |
+
<label for="filter-by-date" class="screen-reader-text"><?php _e('Filter by date','wp-meta-seo'); ?></label>
|
423 |
+
<select name="<?php echo $name ?>" id="filter-by-date" class="metaseo-filter">
|
424 |
+
<option<?php selected($m, 0); ?> value="0"><?php _e('All dates','wp-meta-seo'); ?></option>
|
425 |
+
<?php
|
426 |
+
foreach ($months as $arc_row) {
|
427 |
+
|
428 |
+
if (0 == $arc_row->year)
|
429 |
+
continue;
|
430 |
+
$month = zeroise($arc_row->month, 2);
|
431 |
+
$year = $arc_row->year;
|
432 |
+
printf("<option %s value='%s' >%s</option>\n", selected($m, "$year-$month", false), esc_attr("$arc_row->year-$month"), sprintf(__('%1$s %2$d'), $wp_locale->get_month($month), $year)
|
433 |
+
);
|
434 |
+
}
|
435 |
+
?>
|
436 |
+
</select>
|
437 |
+
|
438 |
+
<?php
|
439 |
+
submit_button(__('Filter'), 'button', $namebutton, false, array('id' => 'image-submit'));
|
440 |
+
}
|
441 |
+
|
442 |
+
function display_rows() {
|
443 |
+
$url = URL;
|
444 |
+
$url = preg_replace('/(^(http|https):\/\/[w]*\.*)/', '', $url);
|
445 |
+
$records = $this->items;
|
446 |
+
$i = 0;
|
447 |
+
$alternate = "";
|
448 |
+
|
449 |
+
list( $columns, $hidden ) = $this->get_column_info();
|
450 |
+
if (!empty($records)) {
|
451 |
+
foreach ($records as $rec) {
|
452 |
+
$i++;
|
453 |
+
echo '<tr id="record_' . $i . '" data-link="'.$i.'" data-post_id="'.$rec['post_id'].'">';
|
454 |
+
foreach ($columns as $column_name => $column_display_name) {
|
455 |
+
|
456 |
+
$class = sprintf('class="%1$s column-%1$s"', $column_name);
|
457 |
+
$style = "";
|
458 |
+
|
459 |
+
if (in_array($column_name, $hidden)) {
|
460 |
+
$style = ' style="display:none;"';
|
461 |
+
}
|
462 |
+
|
463 |
+
$attributes = $class . $style;
|
464 |
+
|
465 |
+
switch ($column_name) {
|
466 |
+
case 'cb':
|
467 |
+
echo '<td scope="row" class="check-column" style="padding:8px 10px;">';
|
468 |
+
echo '<input id="cb-select-1" class="metaseo_post" type="checkbox" name="post[]" value="">';
|
469 |
+
echo '</td>';
|
470 |
+
break;
|
471 |
+
|
472 |
+
case 'col_id':
|
473 |
+
echo '<td class="col_id">';
|
474 |
+
echo $i;
|
475 |
+
echo '</td>';
|
476 |
+
break;
|
477 |
+
|
478 |
+
case 'post_id':
|
479 |
+
$row_action = array (
|
480 |
+
'edit' => '<a href="'.get_edit_post_link( $rec['post_id'] ).'" title="Edit this item">Edit</a>',
|
481 |
+
'view' => '<a href="'.get_post_permalink( $rec['post_id'] ).'" title="View “test”" rel="permalink">View</a>'
|
482 |
+
);
|
483 |
+
echo '<td class="col_id" colspan="3">';
|
484 |
+
echo '<a href="'.get_edit_post_link( $rec['post_id'] ).'">'.$rec['post_title'].'</a>';
|
485 |
+
echo $this->row_actions($row_action ,false);
|
486 |
+
echo '</td>';
|
487 |
+
break;
|
488 |
+
|
489 |
+
case 'col_link_url':
|
490 |
+
echo '<td class="wpms_link_html" colspan="3">';
|
491 |
+
echo '<a target="_blank" href="'.$rec['link_url'].'">'.$rec['link_url'].'</a>';
|
492 |
+
echo '<div style="display:none" class="wpms_new_link">'.$rec['html_tag'].'</div>';
|
493 |
+
echo '</td>';
|
494 |
+
break;
|
495 |
+
|
496 |
+
case 'col_link_title':
|
497 |
+
$link_title = $rec['link_title'];
|
498 |
+
echo '<td colspan="3">';
|
499 |
+
echo '<input type="text" data-post_id="'.$rec['post_id'].'" name="metaseo_link_title" id="metaseo_link_title" class="metaseo_link_title" value="'.$link_title.'">';
|
500 |
+
echo '<input type="hidden" class="wpms_old_link" value="'.esc_attr($rec['html_tag']).'">';
|
501 |
+
echo '<div data-post_id="'.$rec['post_id'].'" class="wpms_update_link">'.__('Update','wp-meta-seo').'</div>';
|
502 |
+
echo '<strong class="wpms_mesage_link">'.__('Saved.','wp-meta-seo').'</strong>';
|
503 |
+
echo '<strong class="wpms_error_mesage_link">'.__('Error.','wp-meta-seo').'</strong>';
|
504 |
+
echo '</td>';
|
505 |
+
break;
|
506 |
+
|
507 |
+
case 'col_link_label':
|
508 |
+
$link_label = $rec['link_label'];
|
509 |
+
echo '<td colspan="3">'.$link_label.'</td>';
|
510 |
+
break;
|
511 |
+
}
|
512 |
+
}
|
513 |
+
|
514 |
+
echo '</tr>';
|
515 |
+
}
|
516 |
+
}
|
517 |
+
}
|
518 |
+
|
519 |
+
public function process_action() {
|
520 |
+
global $wpdb;
|
521 |
+
$current_url = set_url_scheme('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
|
522 |
+
$redirect = false;
|
523 |
+
|
524 |
+
if (isset($_POST['search']) and $_POST['search'] === 'Search') {
|
525 |
+
$current_url = add_query_arg(array("search" => "Search", "txtkeyword" => urlencode(stripslashes($_POST["txtkeyword"]))), $current_url);
|
526 |
+
$redirect = true;
|
527 |
+
}
|
528 |
+
|
529 |
+
if (isset($_POST['filter_date_action']) and $_POST['filter_date_action'] === 'Filter') {
|
530 |
+
$current_url = add_query_arg(array("sldate" => $_POST["sldate"]), $current_url);
|
531 |
+
$redirect = true;
|
532 |
+
}
|
533 |
+
|
534 |
+
if (!empty($_POST['paged'])) {
|
535 |
+
$current_url = add_query_arg(array("paged" => intval($_POST['paged'])), $current_url);
|
536 |
+
$redirect = true;
|
537 |
+
}
|
538 |
+
|
539 |
+
if (!empty($_POST['metaseo_link_per_page'])) {
|
540 |
+
$current_url = add_query_arg(array("metaseo_link_per_page" => intval($_POST['metaseo_link_per_page'])), $current_url);
|
541 |
+
$redirect = true;
|
542 |
+
}
|
543 |
+
|
544 |
+
if ($redirect === true) {
|
545 |
+
wp_redirect($current_url);
|
546 |
+
ob_end_flush();
|
547 |
+
exit();
|
548 |
+
}
|
549 |
+
}
|
550 |
+
|
551 |
+
}
|
inc/class.metaseo-metabox.php
CHANGED
@@ -54,44 +54,44 @@ class WPMSEO_Metabox extends WPMSEO_Meta {
|
|
54 |
}
|
55 |
|
56 |
public static function translate_meta_boxes() {
|
57 |
-
self::$meta_fields['general']['snippetpreview']['title'] = __('Results preview', '
|
58 |
-
self::$meta_fields['general']['snippetpreview']['help'] = sprintf(__('This is a preview of what your content will looks like in search engine results: title, description and URL', '
|
59 |
|
60 |
-
self::$meta_fields['general']['title']['title'] = __('Search engine title', '
|
61 |
self::$meta_fields['general']['title']['description'] = sprintf(__('<span id="metaseo_wpmseo_title-length">%s</span>'),self::$meta_length_reason);
|
62 |
-
self::$meta_fields['general']['title']['help'] = __('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.', '
|
63 |
|
64 |
$settings = get_option( '_metaseo_settings' );
|
65 |
if(isset($settings['metaseo_showkeywords']) && $settings['metaseo_showkeywords'] == 1){
|
66 |
-
self::$meta_fields['general']['keywords']['title'] = __('Search engine keywords', '
|
67 |
self::$meta_fields['general']['keywords']['description'] = '<span id="metaseo_wpmseo_keywords-length"></span>';
|
68 |
-
self::$meta_fields['general']['keywords']['help'] = __('This is the keywords of your content that may be displayed in search engine results (meta keywords).', '
|
69 |
}else{
|
70 |
unset(self::$meta_fields['general']['keywords']);
|
71 |
}
|
72 |
|
73 |
|
74 |
-
self::$meta_fields['general']['desc']['title'] = __('Search engine description', '
|
75 |
self::$meta_fields['general']['desc']['description'] = sprintf(__('<span id="metaseo_wpmseo_desc-length">%s</span>'),self::$meta_length_reason);
|
76 |
-
self::$meta_fields['general']['desc']['help'] = __('The description of your content that may be displayed in search engine results aka meta description. By default search engine take an excerpt from your content (depending on the search query). 156 characters max allowed.', '
|
77 |
|
78 |
-
self::$meta_fields['social']['opengraph-title']['title'] = __('Facebook Title','
|
79 |
-
self::$meta_fields['social']['opengraph-title']['description'] = __('Custom title to display when sharing this content on facebook, content title override','
|
80 |
|
81 |
-
self::$meta_fields['social']['opengraph-desc']['title'] = __('Facebook Description','
|
82 |
-
self::$meta_fields['social']['opengraph-desc']['description'] = __('Custom description to display when sharing this content on facebook, content description override','
|
83 |
|
84 |
-
self::$meta_fields['social']['opengraph-image']['title'] = __('Facebook Image','
|
85 |
-
self::$meta_fields['social']['opengraph-image']['description'] = __('Custom image to display when sharing this content on facebook, content description override, recommended size is 1200px x 630px','
|
86 |
|
87 |
-
self::$meta_fields['social']['twitter-title']['title'] = __('Twitter Title','
|
88 |
-
self::$meta_fields['social']['twitter-title']['description'] = __('Custom title to display when sharing this content on twitter, content title override','
|
89 |
|
90 |
-
self::$meta_fields['social']['twitter-desc']['title'] = __('Twitter Description','
|
91 |
-
self::$meta_fields['social']['twitter-desc']['description'] = __('Custom description to display when sharing this content on twitter, content description override','
|
92 |
|
93 |
-
self::$meta_fields['social']['twitter-image']['title'] = __('Twitter Image','
|
94 |
-
self::$meta_fields['social']['twitter-image']['description'] = __('Custom image to display when sharing this content on facebook, content description override, recommended min size 440px X 220px','
|
95 |
|
96 |
do_action('wpmseo_tab_translate');
|
97 |
}
|
@@ -148,7 +148,7 @@ class WPMSEO_Metabox extends WPMSEO_Meta {
|
|
148 |
}
|
149 |
|
150 |
return array(
|
151 |
-
'choose_image' => __( 'Use Image', '
|
152 |
'use_validate' => $this->settings['metaseo_seovalidate']
|
153 |
);
|
154 |
}
|
@@ -167,7 +167,7 @@ class WPMSEO_Metabox extends WPMSEO_Meta {
|
|
167 |
$date = $this->get_post_date($post);
|
168 |
|
169 |
self::$meta_length = ( self::$meta_length - ( strlen($date) + 5 ) );
|
170 |
-
self::$meta_length_reason = __(' (because of date display)', '
|
171 |
}
|
172 |
|
173 |
self::$meta_length_reason = apply_filters('wpmseo_desc_length_reason', self::$meta_length_reason, $post);
|
@@ -208,7 +208,7 @@ class WPMSEO_Metabox extends WPMSEO_Meta {
|
|
208 |
$cached_replacement_vars['sitename'] = get_option('blogname');
|
209 |
$array_keyword = array(
|
210 |
'field_prefix' => self::$form_prefix,
|
211 |
-
'choose_image' => __('Use Image', '
|
212 |
'wpmseo_meta_desc_length' => self::$meta_length,
|
213 |
'wpmseo_meta_title_length' => self::$meta_title_length,
|
214 |
'wpmseo_meta_keywords_length' => self::$meta_keywords_length,
|
@@ -217,7 +217,7 @@ class WPMSEO_Metabox extends WPMSEO_Meta {
|
|
217 |
'wpmseo_permalink_template' => $sample_permalink,
|
218 |
'wpmseo_keyword_suggest_nonce' => wp_create_nonce('wpmseo-get-suggest'),
|
219 |
'wpmseo_replace_vars_nonce' => wp_create_nonce('wpmseo-replace-vars'),
|
220 |
-
'no_parent_text' => __('(no parent)', '
|
221 |
'show_keywords' => 0
|
222 |
);
|
223 |
$settings = get_option( '_metaseo_settings' );
|
@@ -253,7 +253,7 @@ class WPMSEO_Metabox extends WPMSEO_Meta {
|
|
253 |
if (is_array($post_types) && $post_types !== array()) {
|
254 |
foreach ($post_types as $post_type) {
|
255 |
if ($this->is_metabox_hidden($post_type) === false) {
|
256 |
-
add_meta_box('wpmseo_meta', __('WP Meta SEO - Page optimization','
|
257 |
$this,
|
258 |
'meta_box',
|
259 |
), $post_type, 'normal', apply_filters('wpmseo_metabox_prio', 'high'));
|
@@ -282,12 +282,12 @@ class WPMSEO_Metabox extends WPMSEO_Meta {
|
|
282 |
<div class="wpmseo-metabox-tabs-div">
|
283 |
<ul class="wpmseo-metabox-tabs" id="wpmseo-metabox-tabs">
|
284 |
<li class="general">
|
285 |
-
<a class="wpmseo_tablink" data-link="wpmseo_general"><?php _e('SEO Page optimization', '
|
286 |
</li>
|
287 |
|
288 |
<?php if((isset($default_settings['metaseo_showsocial']) && $default_settings['metaseo_showsocial'] == 1)): ?>
|
289 |
<li class="social">
|
290 |
-
<a class="wpmseo_tablink" data-link="wpmseo_social"><?php _e( 'Social for search engine', '
|
291 |
</li>
|
292 |
<?php endif; ?>
|
293 |
<?php do_action('wpmseo_tab_header'); ?>
|
@@ -300,7 +300,7 @@ class WPMSEO_Metabox extends WPMSEO_Meta {
|
|
300 |
}
|
301 |
unset($key, $meta_field);
|
302 |
}
|
303 |
-
$this->do_tab('general', __('General', '
|
304 |
|
305 |
$content = '';
|
306 |
foreach ( $this->get_meta_field_defs( 'social' ) as $meta_key => $meta_field ) {
|
@@ -341,14 +341,14 @@ class WPMSEO_Metabox extends WPMSEO_Meta {
|
|
341 |
}
|
342 |
|
343 |
if($test || (!empty($meta_analysis) && !empty($meta_analysis['heading_title']))){
|
344 |
-
$output = $this->metaseo_create_field('heading_title',$tooltip_page['title_in_heading'],'dashicons-yes',__('Page title word in content heading','
|
345 |
$this->perc_score++;
|
346 |
}else{
|
347 |
-
$output = $this->metaseo_create_field('heading_title',$tooltip_page['title_in_heading'],'icons-mwarning',__('Page title word in content heading','
|
348 |
}
|
349 |
|
350 |
}else{
|
351 |
-
$output = $this->metaseo_create_field('heading_title',$tooltip_page['title_in_heading'],'dashicons-yes',__('Page title word in content heading','
|
352 |
$this->perc_score++;
|
353 |
}
|
354 |
return $output;
|
@@ -370,10 +370,10 @@ class WPMSEO_Metabox extends WPMSEO_Meta {
|
|
370 |
}
|
371 |
|
372 |
if($test1 || (!empty($meta_analysis) && !empty($meta_analysis['content_title']))){
|
373 |
-
$output = $this->metaseo_create_field('content_title',$tooltip_page['title_in_content'],'dashicons-yes',__('Page title word in content','
|
374 |
$this->perc_score++;
|
375 |
}else{
|
376 |
-
$output = $this->metaseo_create_field('content_title',$tooltip_page['title_in_content'],'icons-mwarning',__('Page title word in content','
|
377 |
}
|
378 |
|
379 |
return $output;
|
@@ -384,10 +384,10 @@ class WPMSEO_Metabox extends WPMSEO_Meta {
|
|
384 |
$info = pathinfo($pageurl);
|
385 |
|
386 |
if($info['filename'] == sanitize_title($post->post_title) || (!empty($meta_analysis) && !empty($meta_analysis['pageurl']))){
|
387 |
-
$output = $this->metaseo_create_field('pageurl',$tooltip_page['page_url'],'dashicons-yes',__('Page url matches with page title','
|
388 |
$this->perc_score++;
|
389 |
}else{
|
390 |
-
$output = $this->metaseo_create_field('pageurl',$tooltip_page['page_url'],'icons-mwarning',__('Page url matches with page title','
|
391 |
}
|
392 |
|
393 |
return $output;
|
@@ -395,27 +395,27 @@ class WPMSEO_Metabox extends WPMSEO_Meta {
|
|
395 |
|
396 |
function metaseo_check_metatitle($meta_title,$tooltip_page,$meta_analysis){
|
397 |
if(($meta_title != '' && strlen($meta_title) <= self::$meta_title_length) || (!empty($meta_analysis) && !empty($meta_analysis['metatitle'])) ){
|
398 |
-
$output = $this->metaseo_create_field('metatitle',$tooltip_page['meta_title'],'dashicons-yes',__('Meta title filled','
|
399 |
$this->perc_score++;
|
400 |
}else{
|
401 |
-
$output = $this->metaseo_create_field('metatitle',$tooltip_page['meta_title'],'icons-mwarning',__('Meta title filled','
|
402 |
}
|
403 |
return $output;
|
404 |
}
|
405 |
|
406 |
function metaseo_check_metadesc($meta_desc,$tooltip_page,$meta_analysis){
|
407 |
if(($meta_desc != '' && strlen($meta_desc) <= self::$meta_length) || (!empty($meta_analysis) && !empty($meta_analysis['metadesc'])) ){
|
408 |
-
$output = $this->metaseo_create_field('metadesc',$tooltip_page['meta_desc'],'dashicons-yes',__('Meta description filled','
|
409 |
$this->perc_score++;
|
410 |
}else{
|
411 |
-
$output = $this->metaseo_create_field('metadesc',$tooltip_page['meta_desc'],'icons-mwarning',__('Meta description filled','
|
412 |
}
|
413 |
return $output;
|
414 |
}
|
415 |
|
416 |
function metaseo_check_imageresize($content,$tooltip_page,$meta_analysis){
|
417 |
if($content == '') {
|
418 |
-
$output = $this->metaseo_create_field('imgresize',$tooltip_page['image_resize'],'dashicons-yes',__('Wrong image resize','
|
419 |
$this->perc_score++;
|
420 |
return $output;
|
421 |
}
|
@@ -439,21 +439,21 @@ class WPMSEO_Metabox extends WPMSEO_Meta {
|
|
439 |
}
|
440 |
|
441 |
if($img_wrong == false || (!empty($meta_analysis) && !empty($meta_analysis['imgresize']))){
|
442 |
-
$output = $this->metaseo_create_field('imgresize',$tooltip_page['image_resize'],'dashicons-yes',__('Wrong image resize','
|
443 |
$this->perc_score++;
|
444 |
}else{
|
445 |
-
$output = $this->metaseo_create_field('imgresize',$tooltip_page['image_resize'],'icons-mwarning',__('Wrong image resize','
|
446 |
}
|
447 |
|
448 |
}else{
|
449 |
-
$output = $this->metaseo_create_field('imgresize',$tooltip_page['image_resize'],'icons-mwarning',__('Wrong image resize','
|
450 |
}
|
451 |
return $output;
|
452 |
}
|
453 |
|
454 |
function metaseo_check_imagealt($content,$tooltip_page,$meta_analysis){
|
455 |
if($content == '') {
|
456 |
-
$output = $this->metaseo_create_field('imgalt',$tooltip_page['image_alt'],'dashicons-yes',__('Image have meta title or alt','
|
457 |
$this->perc_score++;
|
458 |
return $output;
|
459 |
}
|
@@ -472,27 +472,27 @@ class WPMSEO_Metabox extends WPMSEO_Meta {
|
|
472 |
}
|
473 |
|
474 |
if($img_wrong == false || (!empty($meta_analysis) && !empty($meta_analysis['imgalt']))){
|
475 |
-
$output = $this->metaseo_create_field('imgalt',$tooltip_page['image_alt'],'dashicons-yes',__('Image have meta title or alt','
|
476 |
$this->perc_score++;
|
477 |
}else{
|
478 |
-
$output = $this->metaseo_create_field('imgalt',$tooltip_page['image_alt'],'icons-mwarning',__('Image have meta title or alt','
|
479 |
}
|
480 |
|
481 |
}else{
|
482 |
-
$output = $this->metaseo_create_field('imgalt',$tooltip_page['image_alt'],'icons-mwarning',__('Image have meta title or alt','
|
483 |
}
|
484 |
return $output;
|
485 |
}
|
486 |
|
487 |
function metaseo_page_analysis($post) {
|
488 |
$tooltip_page = array();
|
489 |
-
$tooltip_page['title_in_heading'] = __('Check if a word of this content title is also in a title heading (h1, h2...)','
|
490 |
-
$tooltip_page['title_in_content'] = __('Check if a word of this content title is also in the text','
|
491 |
-
$tooltip_page['page_url'] = __('Does the page title match with the permalink (URL structure)','
|
492 |
-
$tooltip_page['meta_title'] = __('Is the meta title of this page filled?','
|
493 |
-
$tooltip_page['meta_desc'] = __('Is the meta description of this page filled?','
|
494 |
-
$tooltip_page['image_resize'] = __('Check for image HTML resizing in content (usually image resized using handles)','
|
495 |
-
$tooltip_page['image_alt'] = __('Check for image Alt text and title','
|
496 |
|
497 |
$meta_title = get_post_meta($post->ID, '_metaseo_metatitle', true);
|
498 |
$meta_desc = get_post_meta($post->ID, '_metaseo_metadesc', true);
|
@@ -539,7 +539,7 @@ class WPMSEO_Metabox extends WPMSEO_Meta {
|
|
539 |
?>
|
540 |
<div class="wpmseotab <?php echo esc_attr($id) ?>">
|
541 |
<?php if($id == 'general'): ?>
|
542 |
-
<p class="reload_analysis"><span class="spinner" style="float: left;"></span><input type="button" name="reload_analysis" id="reload_analysis" class="button button-primary" value="<?php _e('Reload analysis','
|
543 |
<?php endif; ?>
|
544 |
<table class="form-table">
|
545 |
<?php echo $content ?>
|
@@ -655,7 +655,7 @@ class WPMSEO_Metabox extends WPMSEO_Meta {
|
|
655 |
|
656 |
case 'upload':
|
657 |
$content .= '<input id="' . $esc_form_key . '" type="text" size="36" class="' . $class . '" name="' . $esc_form_key . '" value="' . esc_attr($meta_value) . '" />';
|
658 |
-
$content .= '<input id="' . $esc_form_key . '_button" class="wpmseo_image_upload_button button" type="button" value="'.__('Upload Image','
|
659 |
break;
|
660 |
}
|
661 |
|
54 |
}
|
55 |
|
56 |
public static function translate_meta_boxes() {
|
57 |
+
self::$meta_fields['general']['snippetpreview']['title'] = __('Results preview', 'wp-meta-seo');
|
58 |
+
self::$meta_fields['general']['snippetpreview']['help'] = sprintf(__('This is a preview of what your content will looks like in search engine results: title, description and URL', 'wp-meta-seo'), '<a target="_blank" href="https://www.joomunited.com/wordpress-products/wpms">', '</a>');
|
59 |
|
60 |
+
self::$meta_fields['general']['title']['title'] = __('Search engine title', 'wp-meta-seo');
|
61 |
self::$meta_fields['general']['title']['description'] = sprintf(__('<span id="metaseo_wpmseo_title-length">%s</span>'),self::$meta_length_reason);
|
62 |
+
self::$meta_fields['general']['title']['help'] = __('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');
|
63 |
|
64 |
$settings = get_option( '_metaseo_settings' );
|
65 |
if(isset($settings['metaseo_showkeywords']) && $settings['metaseo_showkeywords'] == 1){
|
66 |
+
self::$meta_fields['general']['keywords']['title'] = __('Search engine keywords', 'wp-meta-seo');
|
67 |
self::$meta_fields['general']['keywords']['description'] = '<span id="metaseo_wpmseo_keywords-length"></span>';
|
68 |
+
self::$meta_fields['general']['keywords']['help'] = __('This is the keywords of your content that may be displayed in search engine results (meta keywords).', 'wp-meta-seo');
|
69 |
}else{
|
70 |
unset(self::$meta_fields['general']['keywords']);
|
71 |
}
|
72 |
|
73 |
|
74 |
+
self::$meta_fields['general']['desc']['title'] = __('Search engine description', 'wp-meta-seo');
|
75 |
self::$meta_fields['general']['desc']['description'] = sprintf(__('<span id="metaseo_wpmseo_desc-length">%s</span>'),self::$meta_length_reason);
|
76 |
+
self::$meta_fields['general']['desc']['help'] = __('The description of your content that may be displayed in search engine results aka meta description. By default search engine take an excerpt from your content (depending on the search query). 156 characters max allowed.', 'wp-meta-seo');
|
77 |
|
78 |
+
self::$meta_fields['social']['opengraph-title']['title'] = __('Facebook Title','wp-meta-seo');
|
79 |
+
self::$meta_fields['social']['opengraph-title']['description'] = __('Custom title to display when sharing this content on facebook, content title override','wp-meta-seo');
|
80 |
|
81 |
+
self::$meta_fields['social']['opengraph-desc']['title'] = __('Facebook Description','wp-meta-seo');
|
82 |
+
self::$meta_fields['social']['opengraph-desc']['description'] = __('Custom description to display when sharing this content on facebook, content description override','wp-meta-seo');
|
83 |
|
84 |
+
self::$meta_fields['social']['opengraph-image']['title'] = __('Facebook Image','wp-meta-seo');
|
85 |
+
self::$meta_fields['social']['opengraph-image']['description'] = __('Custom image to display when sharing this content on facebook, content description override, recommended size is 1200px x 630px','wp-meta-seo');
|
86 |
|
87 |
+
self::$meta_fields['social']['twitter-title']['title'] = __('Twitter Title','wp-meta-seo');
|
88 |
+
self::$meta_fields['social']['twitter-title']['description'] = __('Custom title to display when sharing this content on twitter, content title override','wp-meta-seo');
|
89 |
|
90 |
+
self::$meta_fields['social']['twitter-desc']['title'] = __('Twitter Description','wp-meta-seo');
|
91 |
+
self::$meta_fields['social']['twitter-desc']['description'] = __('Custom description to display when sharing this content on twitter, content description override','wp-meta-seo');
|
92 |
|
93 |
+
self::$meta_fields['social']['twitter-image']['title'] = __('Twitter Image','wp-meta-seo');
|
94 |
+
self::$meta_fields['social']['twitter-image']['description'] = __('Custom image to display when sharing this content on facebook, content description override, recommended min size 440px X 220px','wp-meta-seo');
|
95 |
|
96 |
do_action('wpmseo_tab_translate');
|
97 |
}
|
148 |
}
|
149 |
|
150 |
return array(
|
151 |
+
'choose_image' => __( 'Use Image', 'wp-meta-seo' ),
|
152 |
'use_validate' => $this->settings['metaseo_seovalidate']
|
153 |
);
|
154 |
}
|
167 |
$date = $this->get_post_date($post);
|
168 |
|
169 |
self::$meta_length = ( self::$meta_length - ( strlen($date) + 5 ) );
|
170 |
+
self::$meta_length_reason = __(' (because of date display)', 'wp-meta-seo');
|
171 |
}
|
172 |
|
173 |
self::$meta_length_reason = apply_filters('wpmseo_desc_length_reason', self::$meta_length_reason, $post);
|
208 |
$cached_replacement_vars['sitename'] = get_option('blogname');
|
209 |
$array_keyword = array(
|
210 |
'field_prefix' => self::$form_prefix,
|
211 |
+
'choose_image' => __('Use Image', 'wp-meta-seo'),
|
212 |
'wpmseo_meta_desc_length' => self::$meta_length,
|
213 |
'wpmseo_meta_title_length' => self::$meta_title_length,
|
214 |
'wpmseo_meta_keywords_length' => self::$meta_keywords_length,
|
217 |
'wpmseo_permalink_template' => $sample_permalink,
|
218 |
'wpmseo_keyword_suggest_nonce' => wp_create_nonce('wpmseo-get-suggest'),
|
219 |
'wpmseo_replace_vars_nonce' => wp_create_nonce('wpmseo-replace-vars'),
|
220 |
+
'no_parent_text' => __('(no parent)', 'wp-meta-seo'),
|
221 |
'show_keywords' => 0
|
222 |
);
|
223 |
$settings = get_option( '_metaseo_settings' );
|
253 |
if (is_array($post_types) && $post_types !== array()) {
|
254 |
foreach ($post_types as $post_type) {
|
255 |
if ($this->is_metabox_hidden($post_type) === false) {
|
256 |
+
add_meta_box('wpmseo_meta', __('WP Meta SEO - Page optimization','wp-meta-seo'), array(
|
257 |
$this,
|
258 |
'meta_box',
|
259 |
), $post_type, 'normal', apply_filters('wpmseo_metabox_prio', 'high'));
|
282 |
<div class="wpmseo-metabox-tabs-div">
|
283 |
<ul class="wpmseo-metabox-tabs" id="wpmseo-metabox-tabs">
|
284 |
<li class="general">
|
285 |
+
<a class="wpmseo_tablink" data-link="wpmseo_general"><?php _e('SEO Page optimization', 'wp-meta-seo'); ?></a>
|
286 |
</li>
|
287 |
|
288 |
<?php if((isset($default_settings['metaseo_showsocial']) && $default_settings['metaseo_showsocial'] == 1)): ?>
|
289 |
<li class="social">
|
290 |
+
<a class="wpmseo_tablink" data-link="wpmseo_social"><?php _e( 'Social for search engine', 'wp-meta-seo' ) ?></a>
|
291 |
</li>
|
292 |
<?php endif; ?>
|
293 |
<?php do_action('wpmseo_tab_header'); ?>
|
300 |
}
|
301 |
unset($key, $meta_field);
|
302 |
}
|
303 |
+
$this->do_tab('general', __('General', 'wp-meta-seo'), $content);
|
304 |
|
305 |
$content = '';
|
306 |
foreach ( $this->get_meta_field_defs( 'social' ) as $meta_key => $meta_field ) {
|
341 |
}
|
342 |
|
343 |
if($test || (!empty($meta_analysis) && !empty($meta_analysis['heading_title']))){
|
344 |
+
$output = $this->metaseo_create_field('heading_title',$tooltip_page['title_in_heading'],'dashicons-yes',__('Page title word in content heading','wp-meta-seo'),1);
|
345 |
$this->perc_score++;
|
346 |
}else{
|
347 |
+
$output = $this->metaseo_create_field('heading_title',$tooltip_page['title_in_heading'],'icons-mwarning',__('Page title word in content heading','wp-meta-seo'),0);
|
348 |
}
|
349 |
|
350 |
}else{
|
351 |
+
$output = $this->metaseo_create_field('heading_title',$tooltip_page['title_in_heading'],'dashicons-yes',__('Page title word in content heading','wp-meta-seo'),1);
|
352 |
$this->perc_score++;
|
353 |
}
|
354 |
return $output;
|
370 |
}
|
371 |
|
372 |
if($test1 || (!empty($meta_analysis) && !empty($meta_analysis['content_title']))){
|
373 |
+
$output = $this->metaseo_create_field('content_title',$tooltip_page['title_in_content'],'dashicons-yes',__('Page title word in content','wp-meta-seo'),1);
|
374 |
$this->perc_score++;
|
375 |
}else{
|
376 |
+
$output = $this->metaseo_create_field('content_title',$tooltip_page['title_in_content'],'icons-mwarning',__('Page title word in content','wp-meta-seo'),0);
|
377 |
}
|
378 |
|
379 |
return $output;
|
384 |
$info = pathinfo($pageurl);
|
385 |
|
386 |
if($info['filename'] == sanitize_title($post->post_title) || (!empty($meta_analysis) && !empty($meta_analysis['pageurl']))){
|
387 |
+
$output = $this->metaseo_create_field('pageurl',$tooltip_page['page_url'],'dashicons-yes',__('Page url matches with page title','wp-meta-seo'),1);
|
388 |
$this->perc_score++;
|
389 |
}else{
|
390 |
+
$output = $this->metaseo_create_field('pageurl',$tooltip_page['page_url'],'icons-mwarning',__('Page url matches with page title','wp-meta-seo'),0);
|
391 |
}
|
392 |
|
393 |
return $output;
|
395 |
|
396 |
function metaseo_check_metatitle($meta_title,$tooltip_page,$meta_analysis){
|
397 |
if(($meta_title != '' && strlen($meta_title) <= self::$meta_title_length) || (!empty($meta_analysis) && !empty($meta_analysis['metatitle'])) ){
|
398 |
+
$output = $this->metaseo_create_field('metatitle',$tooltip_page['meta_title'],'dashicons-yes',__('Meta title filled','wp-meta-seo'),1);
|
399 |
$this->perc_score++;
|
400 |
}else{
|
401 |
+
$output = $this->metaseo_create_field('metatitle',$tooltip_page['meta_title'],'icons-mwarning',__('Meta title filled','wp-meta-seo'),0);
|
402 |
}
|
403 |
return $output;
|
404 |
}
|
405 |
|
406 |
function metaseo_check_metadesc($meta_desc,$tooltip_page,$meta_analysis){
|
407 |
if(($meta_desc != '' && strlen($meta_desc) <= self::$meta_length) || (!empty($meta_analysis) && !empty($meta_analysis['metadesc'])) ){
|
408 |
+
$output = $this->metaseo_create_field('metadesc',$tooltip_page['meta_desc'],'dashicons-yes',__('Meta description filled','wp-meta-seo'),1);
|
409 |
$this->perc_score++;
|
410 |
}else{
|
411 |
+
$output = $this->metaseo_create_field('metadesc',$tooltip_page['meta_desc'],'icons-mwarning',__('Meta description filled','wp-meta-seo'),0);
|
412 |
}
|
413 |
return $output;
|
414 |
}
|
415 |
|
416 |
function metaseo_check_imageresize($content,$tooltip_page,$meta_analysis){
|
417 |
if($content == '') {
|
418 |
+
$output = $this->metaseo_create_field('imgresize',$tooltip_page['image_resize'],'dashicons-yes',__('Wrong image resize','wp-meta-seo'),1);
|
419 |
$this->perc_score++;
|
420 |
return $output;
|
421 |
}
|
439 |
}
|
440 |
|
441 |
if($img_wrong == false || (!empty($meta_analysis) && !empty($meta_analysis['imgresize']))){
|
442 |
+
$output = $this->metaseo_create_field('imgresize',$tooltip_page['image_resize'],'dashicons-yes',__('Wrong image resize','wp-meta-seo'),1);
|
443 |
$this->perc_score++;
|
444 |
}else{
|
445 |
+
$output = $this->metaseo_create_field('imgresize',$tooltip_page['image_resize'],'icons-mwarning',__('Wrong image resize','wp-meta-seo'),0);
|
446 |
}
|
447 |
|
448 |
}else{
|
449 |
+
$output = $this->metaseo_create_field('imgresize',$tooltip_page['image_resize'],'icons-mwarning',__('Wrong image resize','wp-meta-seo'),0);
|
450 |
}
|
451 |
return $output;
|
452 |
}
|
453 |
|
454 |
function metaseo_check_imagealt($content,$tooltip_page,$meta_analysis){
|
455 |
if($content == '') {
|
456 |
+
$output = $this->metaseo_create_field('imgalt',$tooltip_page['image_alt'],'dashicons-yes',__('Image have meta title or alt','wp-meta-seo'),1);
|
457 |
$this->perc_score++;
|
458 |
return $output;
|
459 |
}
|
472 |
}
|
473 |
|
474 |
if($img_wrong == false || (!empty($meta_analysis) && !empty($meta_analysis['imgalt']))){
|
475 |
+
$output = $this->metaseo_create_field('imgalt',$tooltip_page['image_alt'],'dashicons-yes',__('Image have meta title or alt','wp-meta-seo'),1);
|
476 |
$this->perc_score++;
|
477 |
}else{
|
478 |
+
$output = $this->metaseo_create_field('imgalt',$tooltip_page['image_alt'],'icons-mwarning',__('Image have meta title or alt','wp-meta-seo'),0);
|
479 |
}
|
480 |
|
481 |
}else{
|
482 |
+
$output = $this->metaseo_create_field('imgalt',$tooltip_page['image_alt'],'icons-mwarning',__('Image have meta title or alt','wp-meta-seo'),0);
|
483 |
}
|
484 |
return $output;
|
485 |
}
|
486 |
|
487 |
function metaseo_page_analysis($post) {
|
488 |
$tooltip_page = array();
|
489 |
+
$tooltip_page['title_in_heading'] = __('Check if a word of this content title is also in a title heading (h1, h2...)','wp-meta-seo');
|
490 |
+
$tooltip_page['title_in_content'] = __('Check if a word of this content title is also in the text','wp-meta-seo');
|
491 |
+
$tooltip_page['page_url'] = __('Does the page title match with the permalink (URL structure)','wp-meta-seo');
|
492 |
+
$tooltip_page['meta_title'] = __('Is the meta title of this page filled?','wp-meta-seo');
|
493 |
+
$tooltip_page['meta_desc'] = __('Is the meta description of this page filled?','wp-meta-seo');
|
494 |
+
$tooltip_page['image_resize'] = __('Check for image HTML resizing in content (usually image resized using handles)','wp-meta-seo');
|
495 |
+
$tooltip_page['image_alt'] = __('Check for image Alt text and title','wp-meta-seo');
|
496 |
|
497 |
$meta_title = get_post_meta($post->ID, '_metaseo_metatitle', true);
|
498 |
$meta_desc = get_post_meta($post->ID, '_metaseo_metadesc', true);
|
539 |
?>
|
540 |
<div class="wpmseotab <?php echo esc_attr($id) ?>">
|
541 |
<?php if($id == 'general'): ?>
|
542 |
+
<p class="reload_analysis"><span class="spinner" style="float: left;"></span><input type="button" name="reload_analysis" id="reload_analysis" class="button button-primary" value="<?php _e('Reload analysis','wp-meta-seo'); ?>"></p>
|
543 |
<?php endif; ?>
|
544 |
<table class="form-table">
|
545 |
<?php echo $content ?>
|
655 |
|
656 |
case 'upload':
|
657 |
$content .= '<input id="' . $esc_form_key . '" type="text" size="36" class="' . $class . '" name="' . $esc_form_key . '" value="' . esc_attr($meta_value) . '" />';
|
658 |
+
$content .= '<input id="' . $esc_form_key . '_button" class="wpmseo_image_upload_button button" type="button" value="'.__('Upload Image','wp-meta-seo').'" />';
|
659 |
break;
|
660 |
}
|
661 |
|
inc/pages/content-meta.php
CHANGED
@@ -21,10 +21,13 @@ if (!empty($_REQUEST['_wp_http_referer'])) {
|
|
21 |
<div class="wrap seo_extended_table_page">
|
22 |
<div id="icon-edit-pages" class="icon32 icon32-posts-page"></div>
|
23 |
|
24 |
-
<?php echo '<h2>' . __('Content Meta', '
|
25 |
|
26 |
<form id="wp-seo-meta-form" action="" method="post">
|
27 |
-
<?php
|
|
|
|
|
|
|
28 |
</form>
|
29 |
|
30 |
</div>
|
21 |
<div class="wrap seo_extended_table_page">
|
22 |
<div id="icon-edit-pages" class="icon32 icon32-posts-page"></div>
|
23 |
|
24 |
+
<?php echo '<h2>' . __('Content Meta', 'wp-meta-seo') . '</h2>'; ?>
|
25 |
|
26 |
<form id="wp-seo-meta-form" action="" method="post">
|
27 |
+
<?php
|
28 |
+
$metaseo_list_table->search_box(__('Search Posts','wp-meta-seo'), 'wpms_content');
|
29 |
+
$metaseo_list_table->display();
|
30 |
+
?>
|
31 |
</form>
|
32 |
|
33 |
</div>
|
inc/pages/dashboard.php
CHANGED
@@ -22,23 +22,23 @@ if(!empty($results_image['imgs_metas_statis'][1])){
|
|
22 |
}
|
23 |
|
24 |
?>
|
25 |
-
<h1 style="text-align: center;"><?php _e('WP Meta SEO dashboard', '
|
26 |
<div class="dashboard">
|
27 |
<div class="col-md-9">
|
28 |
<div class="row panel-statistics">
|
29 |
-
<div class="col-sm-6 metaseo_tool" 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%','
|
30 |
<div class="panel panel-updates">
|
31 |
<div class="panel-body">
|
32 |
<div class="row">
|
33 |
<div class="col-xs-7 col-lg-8">
|
34 |
-
<h4 class="panel-title text-success"><?php _e('Permalinks settings','
|
35 |
<h3><?php echo $results['permalink_setting'].'%' ?></h3>
|
36 |
<div class="progress">
|
37 |
<div style="width: <?php echo $results['permalink_setting'].'%' ?>" aria-valuemax="100" aria-valuemin="0" aria-valuenow="<?php echo $results['permalink_setting'] ?>" role="progressbar" class="progress-bar progress-bar-success">
|
38 |
<span class="sr-only"><?php echo $results['permalink_setting'].'%' ?> Complete (success)</span>
|
39 |
</div>
|
40 |
</div>
|
41 |
-
<p><?php _e('Optimized at','
|
42 |
</div>
|
43 |
<div class="col-xs-5 col-lg-4 text-right">
|
44 |
<input type="text" value="<?php echo $results['permalink_setting'] ?>" class="dial-success">
|
@@ -48,19 +48,19 @@ if(!empty($results_image['imgs_metas_statis'][1])){
|
|
48 |
</div>
|
49 |
</div>
|
50 |
|
51 |
-
<div class="col-sm-6 metaseo_tool-000" 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','
|
52 |
<div class="panel panel-danger-full panel-updates">
|
53 |
<div class="panel-body">
|
54 |
<div class="row">
|
55 |
<div class="col-xs-7 col-lg-8">
|
56 |
-
<h4 class="panel-title text-warning"><?php _e('Meta Title','
|
57 |
<h3><?php echo $results['metatitle_filled'][0].'%' ?></h3>
|
58 |
<div class="progress">
|
59 |
<div style="width: <?php echo $results['metatitle_filled'][0].'%' ?>" aria-valuemax="100" aria-valuemin="0" aria-valuenow="<?php echo $results['metatitle_filled'][0] ?>" role="progressbar" class="progress-bar progress-bar-warning">
|
60 |
<span class="sr-only"><?php echo $results['metatitle_filled'][0].'%' ?> Complete (success)</span>
|
61 |
</div>
|
62 |
</div>
|
63 |
-
<p><?php _e('Meta title filled','
|
64 |
</div>
|
65 |
<div class="col-xs-5 col-lg-4 text-right">
|
66 |
<input type="text" value="<?php echo $results['metatitle_filled'][0] ?>" class="dial-warning">
|
@@ -70,19 +70,19 @@ if(!empty($results_image['imgs_metas_statis'][1])){
|
|
70 |
</div>
|
71 |
</div>
|
72 |
|
73 |
-
<div class="col-sm-6 metaseo_tool-000" 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.','
|
74 |
<div class="panel panel-success-full panel-updates">
|
75 |
<div class="panel-body">
|
76 |
<div class="row">
|
77 |
<div class="col-xs-7 col-lg-8">
|
78 |
-
<h4 class="panel-title text-success"><?php _e('Meta Description','
|
79 |
<h3><?php echo $results['metadesc_filled'][0].'%' ?></h3>
|
80 |
<div class="progress">
|
81 |
<div style="width: <?php echo $results['metadesc_filled'][0].'%' ?>" aria-valuemax="100" aria-valuemin="0" aria-valuenow="<?php echo $results['metadesc_filled'][0] ?>" role="progressbar" class="progress-bar progress-bar-info">
|
82 |
<span class="sr-only"><?php echo $results['metadesc_filled'][0].'%' ?> Complete (success)</span>
|
83 |
</div>
|
84 |
</div>
|
85 |
-
<p><?php _e('Meta description filled','
|
86 |
</div>
|
87 |
<div class="col-xs-5 col-lg-4 text-right">
|
88 |
<input type="text" value="<?php echo $results['metadesc_filled'][0] ?>" class="dial-info">
|
@@ -92,19 +92,19 @@ if(!empty($results_image['imgs_metas_statis'][1])){
|
|
92 |
</div>
|
93 |
</div>
|
94 |
|
95 |
-
<div class="col-sm-6 metaseo_tool" 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.','
|
96 |
<div class="panel panel-updates">
|
97 |
<div class="panel-body">
|
98 |
<div class="row">
|
99 |
<div class="col-xs-7 col-lg-8">
|
100 |
-
<h4 class="panel-title text-danger"><?php _e('HTML image resizing','
|
101 |
<h3><?php echo $percent_iresizing.'%' ?></h3>
|
102 |
<div class="progress">
|
103 |
<div style="width: <?php echo $percent_iresizing.'%' ?>" aria-valuemax="100" aria-valuemin="0" aria-valuenow="<?php echo $percent_iresizing ?>" role="progressbar" class="progress-bar progress-bar-danger">
|
104 |
<span class="sr-only"><?php echo $percent_iresizing.'%' ?> Complete (success)</span>
|
105 |
</div>
|
106 |
</div>
|
107 |
-
<p><?php _e('Wrong resized images','
|
108 |
</div>
|
109 |
<div class="col-xs-5 col-lg-4 text-right">
|
110 |
<input type="text" value="<?php echo $percent_iresizing ?>" class="dial-danger">
|
@@ -114,19 +114,19 @@ if(!empty($results_image['imgs_metas_statis'][1])){
|
|
114 |
</div>
|
115 |
</div>
|
116 |
|
117 |
-
<div class="col-sm-6 metaseo_tool" 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.','
|
118 |
<div class="panel panel-updates">
|
119 |
<div class="panel-body">
|
120 |
<div class="row">
|
121 |
<div class="col-xs-7 col-lg-8">
|
122 |
-
<h4 class="panel-title text-success"><?php _e('Image title/alt','
|
123 |
<h3><?php echo $percent_imeta.'%' ?></h3>
|
124 |
<div class="progress">
|
125 |
<div style="width: <?php echo $percent_imeta.'%' ?>" aria-valuemax="100" aria-valuemin="0" aria-valuenow="<?php echo $percent_imeta ?>" role="progressbar" class="progress-bar progress-bar-success">
|
126 |
<span class="sr-only"><?php echo $percent_imeta.'%' ?> Complete (success)</span>
|
127 |
</div>
|
128 |
</div>
|
129 |
-
<p><?php _e('Image data filled (in content)','
|
130 |
</div>
|
131 |
<div class="col-xs-5 col-lg-4 text-right">
|
132 |
<input type="text" value="<?php echo $percent_imeta ?>" class="dial-success">
|
@@ -136,19 +136,19 @@ if(!empty($results_image['imgs_metas_statis'][1])){
|
|
136 |
</div>
|
137 |
</div>
|
138 |
|
139 |
-
<div class="col-sm-6 metaseo_tool-000" 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 :)','
|
140 |
<div class="panel panel-danger-full panel-updates">
|
141 |
<div class="panel-body">
|
142 |
<div class="row">
|
143 |
<div class="col-xs-7 col-lg-8">
|
144 |
-
<h4 class="panel-title text-warning"><?php _e('New or updated content','
|
145 |
<h3><?php echo $results['new_content'][0].'%' ?></h3>
|
146 |
<div class="progress">
|
147 |
<div style="width: <?php echo $results['new_content'][0].'%' ?>" aria-valuemax="100" aria-valuemin="0" aria-valuenow="<?php echo $results['new_content'][0] ?>" role="progressbar" class="progress-bar progress-bar-warning">
|
148 |
<span class="sr-only"><?php echo $results['new_content'][0].'%' ?> Complete (success)</span>
|
149 |
</div>
|
150 |
</div>
|
151 |
-
<p><?php _e('Latest month new or updated content','
|
152 |
</div>
|
153 |
<div class="col-xs-5 col-lg-4 text-right">
|
154 |
<input type="text" value="<?php echo $results['new_content'][0] ?>" class="dial-warning">
|
@@ -158,6 +158,28 @@ if(!empty($results_image['imgs_metas_statis'][1])){
|
|
158 |
</div>
|
159 |
</div>
|
160 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
</div>
|
162 |
</div>
|
163 |
|
@@ -172,13 +194,13 @@ if(!empty($results_image['imgs_metas_statis'][1])){
|
|
172 |
|
173 |
<div class="right">
|
174 |
<div class="dashboard-right">
|
175 |
-
<div style="display: none"><?php _e("We can't get rank of this site from Alexa.com!","
|
176 |
<div style="clear:left"></div>
|
177 |
<div id="wpmetaseo-update-version">
|
178 |
-
<h4><?php echo __('Latest WP Meta SEO News', '
|
179 |
<ul>
|
180 |
-
<li><a target="_blank" href="https://www.joomunited.com/wordpress-products/wp-meta-seo"><?php _e('More information about WP Meta SEO','
|
181 |
-
<li><a target="_blank" href="https://www.joomunited.com/"><?php _e('Other plugins from JoomUnited','
|
182 |
</ul>
|
183 |
</div>
|
184 |
</div>
|
22 |
}
|
23 |
|
24 |
?>
|
25 |
+
<h1 style="text-align: center;"><?php _e('WP Meta SEO dashboard', 'wp-meta-seo') ?></h1>
|
26 |
<div class="dashboard">
|
27 |
<div class="col-md-9">
|
28 |
<div class="row panel-statistics">
|
29 |
+
<div class="col-sm-6 metaseo_tool" 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') ?>">
|
30 |
<div class="panel panel-updates">
|
31 |
<div class="panel-body">
|
32 |
<div class="row">
|
33 |
<div class="col-xs-7 col-lg-8">
|
34 |
+
<h4 class="panel-title text-success"><?php _e('Permalinks settings','wp-meta-seo') ?></h4>
|
35 |
<h3><?php echo $results['permalink_setting'].'%' ?></h3>
|
36 |
<div class="progress">
|
37 |
<div style="width: <?php echo $results['permalink_setting'].'%' ?>" aria-valuemax="100" aria-valuemin="0" aria-valuenow="<?php echo $results['permalink_setting'] ?>" role="progressbar" class="progress-bar progress-bar-success">
|
38 |
<span class="sr-only"><?php echo $results['permalink_setting'].'%' ?> Complete (success)</span>
|
39 |
</div>
|
40 |
</div>
|
41 |
+
<p><?php _e('Optimized at','wp-meta-seo') ?>: <?php echo $results['permalink_setting'].'%' ?></p>
|
42 |
</div>
|
43 |
<div class="col-xs-5 col-lg-4 text-right">
|
44 |
<input type="text" value="<?php echo $results['permalink_setting'] ?>" class="dial-success">
|
48 |
</div>
|
49 |
</div>
|
50 |
|
51 |
+
<div class="col-sm-6 metaseo_tool-000" 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') ?>">
|
52 |
<div class="panel panel-danger-full panel-updates">
|
53 |
<div class="panel-body">
|
54 |
<div class="row">
|
55 |
<div class="col-xs-7 col-lg-8">
|
56 |
+
<h4 class="panel-title text-warning"><?php _e('Meta Title','wp-meta-seo') ?></h4>
|
57 |
<h3><?php echo $results['metatitle_filled'][0].'%' ?></h3>
|
58 |
<div class="progress">
|
59 |
<div style="width: <?php echo $results['metatitle_filled'][0].'%' ?>" aria-valuemax="100" aria-valuemin="0" aria-valuenow="<?php echo $results['metatitle_filled'][0] ?>" role="progressbar" class="progress-bar progress-bar-warning">
|
60 |
<span class="sr-only"><?php echo $results['metatitle_filled'][0].'%' ?> Complete (success)</span>
|
61 |
</div>
|
62 |
</div>
|
63 |
+
<p><?php _e('Meta title filled','wp-meta-seo') ?>: <?php echo $results['metatitle_filled'][1][0].'/'.$results['metatitle_filled'][1][1] ?></p>
|
64 |
</div>
|
65 |
<div class="col-xs-5 col-lg-4 text-right">
|
66 |
<input type="text" value="<?php echo $results['metatitle_filled'][0] ?>" class="dial-warning">
|
70 |
</div>
|
71 |
</div>
|
72 |
|
73 |
+
<div class="col-sm-6 metaseo_tool-000" 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') ?>">
|
74 |
<div class="panel panel-success-full panel-updates">
|
75 |
<div class="panel-body">
|
76 |
<div class="row">
|
77 |
<div class="col-xs-7 col-lg-8">
|
78 |
+
<h4 class="panel-title text-success"><?php _e('Meta Description','wp-meta-seo') ?></h4>
|
79 |
<h3><?php echo $results['metadesc_filled'][0].'%' ?></h3>
|
80 |
<div class="progress">
|
81 |
<div style="width: <?php echo $results['metadesc_filled'][0].'%' ?>" aria-valuemax="100" aria-valuemin="0" aria-valuenow="<?php echo $results['metadesc_filled'][0] ?>" role="progressbar" class="progress-bar progress-bar-info">
|
82 |
<span class="sr-only"><?php echo $results['metadesc_filled'][0].'%' ?> Complete (success)</span>
|
83 |
</div>
|
84 |
</div>
|
85 |
+
<p><?php _e('Meta description filled','wp-meta-seo') ?>: <?php echo $results['metadesc_filled'][1][0].'/'.$results['metadesc_filled'][1][1] ?></p>
|
86 |
</div>
|
87 |
<div class="col-xs-5 col-lg-4 text-right">
|
88 |
<input type="text" value="<?php echo $results['metadesc_filled'][0] ?>" class="dial-info">
|
92 |
</div>
|
93 |
</div>
|
94 |
|
95 |
+
<div class="col-sm-6 metaseo_tool" 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') ?>">
|
96 |
<div class="panel panel-updates">
|
97 |
<div class="panel-body">
|
98 |
<div class="row">
|
99 |
<div class="col-xs-7 col-lg-8">
|
100 |
+
<h4 class="panel-title text-danger"><?php _e('HTML image resizing','wp-meta-seo') ?></h4>
|
101 |
<h3><?php echo $percent_iresizing.'%' ?></h3>
|
102 |
<div class="progress">
|
103 |
<div style="width: <?php echo $percent_iresizing.'%' ?>" aria-valuemax="100" aria-valuemin="0" aria-valuenow="<?php echo $percent_iresizing ?>" role="progressbar" class="progress-bar progress-bar-danger">
|
104 |
<span class="sr-only"><?php echo $percent_iresizing.'%' ?> Complete (success)</span>
|
105 |
</div>
|
106 |
</div>
|
107 |
+
<p><?php _e('Wrong resized images','wp-meta-seo') ?>: <?php echo $results_image['imgs_statis'][0].'/'.$results_image['imgs_statis'][1] ?></p>
|
108 |
</div>
|
109 |
<div class="col-xs-5 col-lg-4 text-right">
|
110 |
<input type="text" value="<?php echo $percent_iresizing ?>" class="dial-danger">
|
114 |
</div>
|
115 |
</div>
|
116 |
|
117 |
+
<div class="col-sm-6 metaseo_tool" 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') ?>">
|
118 |
<div class="panel panel-updates">
|
119 |
<div class="panel-body">
|
120 |
<div class="row">
|
121 |
<div class="col-xs-7 col-lg-8">
|
122 |
+
<h4 class="panel-title text-success"><?php _e('Image title/alt','wp-meta-seo') ?></h4>
|
123 |
<h3><?php echo $percent_imeta.'%' ?></h3>
|
124 |
<div class="progress">
|
125 |
<div style="width: <?php echo $percent_imeta.'%' ?>" aria-valuemax="100" aria-valuemin="0" aria-valuenow="<?php echo $percent_imeta ?>" role="progressbar" class="progress-bar progress-bar-success">
|
126 |
<span class="sr-only"><?php echo $percent_imeta.'%' ?> Complete (success)</span>
|
127 |
</div>
|
128 |
</div>
|
129 |
+
<p><?php _e('Image data filled (in content)','wp-meta-seo') ?>: <?php echo $results_image['imgs_metas_statis'][0].'/'.$results_image['imgs_metas_statis'][1] ?></p>
|
130 |
</div>
|
131 |
<div class="col-xs-5 col-lg-4 text-right">
|
132 |
<input type="text" value="<?php echo $percent_imeta ?>" class="dial-success">
|
136 |
</div>
|
137 |
</div>
|
138 |
|
139 |
+
<div class="col-sm-6 metaseo_tool-000" 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') ?>">
|
140 |
<div class="panel panel-danger-full panel-updates">
|
141 |
<div class="panel-body">
|
142 |
<div class="row">
|
143 |
<div class="col-xs-7 col-lg-8">
|
144 |
+
<h4 class="panel-title text-warning"><?php _e('New or updated content','wp-meta-seo') ?></h4>
|
145 |
<h3><?php echo $results['new_content'][0].'%' ?></h3>
|
146 |
<div class="progress">
|
147 |
<div style="width: <?php echo $results['new_content'][0].'%' ?>" aria-valuemax="100" aria-valuemin="0" aria-valuenow="<?php echo $results['new_content'][0] ?>" role="progressbar" class="progress-bar progress-bar-warning">
|
148 |
<span class="sr-only"><?php echo $results['new_content'][0].'%' ?> Complete (success)</span>
|
149 |
</div>
|
150 |
</div>
|
151 |
+
<p><?php _e('Latest month new or updated content','wp-meta-seo') ?>: <?php echo $results['new_content'][1][0] ?></p>
|
152 |
</div>
|
153 |
<div class="col-xs-5 col-lg-4 text-right">
|
154 |
<input type="text" value="<?php echo $results['new_content'][0] ?>" class="dial-warning">
|
158 |
</div>
|
159 |
</div>
|
160 |
|
161 |
+
<div class="col-sm-6 metaseo_tool-000" 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') ?>">
|
162 |
+
<div class="panel panel-danger-full panel-updates">
|
163 |
+
<div class="panel-body">
|
164 |
+
<div class="row">
|
165 |
+
<div class="col-xs-7 col-lg-8">
|
166 |
+
<h4 class="panel-title text-warning"><?php _e('Link titles','wp-meta-seo') ?></h4>
|
167 |
+
<h3><?php echo $results['link_meta'][0].'%' ?></h3>
|
168 |
+
<div class="progress">
|
169 |
+
<div style="width: <?php echo $results['link_meta'][0].'%' ?>" aria-valuemax="100" aria-valuemin="0" aria-valuenow="<?php echo $results['link_meta'][0] ?>" role="progressbar" class="progress-bar progress-bar-warning">
|
170 |
+
<span class="sr-only"><?php echo $results['link_meta'][0].'%' ?> Complete (success)</span>
|
171 |
+
</div>
|
172 |
+
</div>
|
173 |
+
<p><?php _e('Links title completed','wp-meta-seo') ?>: <?php echo $results['link_meta'][1][0].'/'.$results['link_meta'][1][1]; ?></p>
|
174 |
+
</div>
|
175 |
+
<div class="col-xs-5 col-lg-4 text-right">
|
176 |
+
<input type="text" value="<?php echo $results['link_meta'][0] ?>" class="dial-warning">
|
177 |
+
</div>
|
178 |
+
</div>
|
179 |
+
</div>
|
180 |
+
</div>
|
181 |
+
</div>
|
182 |
+
|
183 |
</div>
|
184 |
</div>
|
185 |
|
194 |
|
195 |
<div class="right">
|
196 |
<div class="dashboard-right">
|
197 |
+
<div style="display: none"><?php _e("We can't get rank of this site from Alexa.com!","wp-meta-seo") ?></div>
|
198 |
<div style="clear:left"></div>
|
199 |
<div id="wpmetaseo-update-version">
|
200 |
+
<h4><?php echo __('Latest WP Meta SEO News', 'wp-meta-seo') ?></h4>
|
201 |
<ul>
|
202 |
+
<li><a target="_blank" href="https://www.joomunited.com/wordpress-products/wp-meta-seo"><?php _e('More information about WP Meta SEO','wp-meta-seo'); ?></a></li>
|
203 |
+
<li><a target="_blank" href="https://www.joomunited.com/"><?php _e('Other plugins from JoomUnited','wp-meta-seo'); ?></a></li>
|
204 |
</ul>
|
205 |
</div>
|
206 |
</div>
|
inc/pages/image-meta.php
CHANGED
@@ -20,7 +20,7 @@ if (!empty($_REQUEST['_wp_http_referer'])) {
|
|
20 |
<div class="wrap seo_extended_table_page">
|
21 |
<div id="icon-edit-pages" class="icon32 icon32-posts-page"></div>
|
22 |
|
23 |
-
<?php echo '<h2>' . __('Image Meta', '
|
24 |
|
25 |
<form id="wp-seo-meta-form" action="" method="post">
|
26 |
|
20 |
<div class="wrap seo_extended_table_page">
|
21 |
<div id="icon-edit-pages" class="icon32 icon32-posts-page"></div>
|
22 |
|
23 |
+
<?php echo '<h2>' . __('Image Meta', 'wp-meta-seo') . '</h2>'; ?>
|
24 |
|
25 |
<form id="wp-seo-meta-form" action="" method="post">
|
26 |
|
inc/pages/link-meta.php
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Meta image
|
4 |
+
*/
|
5 |
+
|
6 |
+
if (!class_exists('MetaSeo_Link_List_Table')) {
|
7 |
+
require_once( WPMETASEO_PLUGIN_DIR . '/inc/class.metaseo-link-list-table.php' );
|
8 |
+
}
|
9 |
+
|
10 |
+
$metaseo_list_table = new MetaSeo_Link_List_Table();
|
11 |
+
$metaseo_list_table->process_action();
|
12 |
+
$metaseo_list_table->prepare_items();
|
13 |
+
|
14 |
+
if (!empty($_REQUEST['_wp_http_referer'])) {
|
15 |
+
wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI'])));
|
16 |
+
exit;
|
17 |
+
}
|
18 |
+
?>
|
19 |
+
|
20 |
+
<div class="wrap seo_extended_table_page">
|
21 |
+
<div id="icon-edit-pages" class="icon32 icon32-posts-page"></div>
|
22 |
+
|
23 |
+
<?php echo '<h2>' . __('Link Meta', 'wp-meta-seo') . '</h2>'; ?>
|
24 |
+
|
25 |
+
<form id="wp-seo-meta-form" action="" method="post">
|
26 |
+
|
27 |
+
<?php $metaseo_list_table->search_box1(); ?>
|
28 |
+
|
29 |
+
<?php $metaseo_list_table->display(); ?>
|
30 |
+
</form>
|
31 |
+
|
32 |
+
</div>
|
33 |
+
<script type="text/javascript">
|
34 |
+
jQuery(document).ready(function($){
|
35 |
+
$('.metaseo_link_title').bind('input propertychange', function() {
|
36 |
+
metaseo_updateLinktitle(this);
|
37 |
+
});
|
38 |
+
|
39 |
+
$('.wpms_update_link').on('click', function() {
|
40 |
+
saveMetaLinkChanges(this);
|
41 |
+
});
|
42 |
+
});
|
43 |
+
|
44 |
+
</script>
|
inc/pages/settings.php
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
<h2 id="wpio_settings"><?php _e('Wp Meta SEO Settings','
|
2 |
<form method="post" action="options.php">
|
3 |
<?php
|
4 |
settings_fields( 'Wp Meta SEO' );
|
1 |
+
<h2 id="wpio_settings"><?php _e('Wp Meta SEO Settings','wp-meta-seo') ?></h2>
|
2 |
<form method="post" action="options.php">
|
3 |
<?php
|
4 |
settings_fields( 'Wp Meta SEO' );
|
js/metaseo_admin.js
CHANGED
@@ -88,6 +88,45 @@ function metaseo_updatekeywords(metakeywords_id, needToSave, updateSnippet) {
|
|
88 |
oldKeywordsValues[postid] = keywords;
|
89 |
}
|
90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
function metaseo_updateDesc(metadesc_id, needToSave) {
|
92 |
var desc = jQuery.trim(metaseo_clean(jQuery('#' + metadesc_id).val()));
|
93 |
var postid = metadesc_id.replace('metaseo-metadesc-', '');
|
88 |
oldKeywordsValues[postid] = keywords;
|
89 |
}
|
90 |
|
91 |
+
var wpms_link_array = [];
|
92 |
+
|
93 |
+
|
94 |
+
function metaseo_updateLinktitle(input){
|
95 |
+
var stt = jQuery(input).closest('tr').data('link');
|
96 |
+
var link_title = jQuery.trim(metaseo_clean(jQuery(input).closest('tr').find('.metaseo_link_title').val()));
|
97 |
+
var postid = jQuery(input).data('post_id');
|
98 |
+
var link_old = jQuery(input).closest('tr').find('.wpms_old_link').val();
|
99 |
+
jQuery(input).closest('tr').find('.wpms_new_link a').attr('title',link_title);
|
100 |
+
jQuery(input).closest('tr').find('.wpms_update_link').show();
|
101 |
+
var link_new = jQuery(input).closest('tr').find('.wpms_new_link').html();
|
102 |
+
wpms_link_array[stt] = {postid : postid , link_old : link_old ,link_new : link_new , link_title : link_title };
|
103 |
+
}
|
104 |
+
|
105 |
+
function saveMetaLinkChanges(button_update){
|
106 |
+
var stt = jQuery(button_update).closest('tr').data('link');
|
107 |
+
jQuery.ajax({
|
108 |
+
url : ajaxurl,
|
109 |
+
method : 'POST',
|
110 |
+
dataType: 'json',
|
111 |
+
data: {
|
112 |
+
'action' : 'metaseo_update_link',
|
113 |
+
'postid' : wpms_link_array[stt].postid,
|
114 |
+
'link_old' : wpms_link_array[stt].link_old,
|
115 |
+
'link_new' : wpms_link_array[stt].link_new,
|
116 |
+
},
|
117 |
+
success: function (response) {
|
118 |
+
jQuery(button_update).closest('tr').find('.wpms_update_link').hide();
|
119 |
+
if(response != false){
|
120 |
+
jQuery(button_update).closest('tr').find('.wpms_old_link').val(response.link_new).change();
|
121 |
+
jQuery(button_update).closest('tr').find('.wpms_mesage_link').show().fadeIn(3000).delay(200).fadeOut(3000);
|
122 |
+
}else{
|
123 |
+
jQuery(button_update).closest('tr').find('.wpms_error_mesage_link').show().fadeIn(3000).delay(200).fadeOut(3000);
|
124 |
+
}
|
125 |
+
|
126 |
+
}
|
127 |
+
});
|
128 |
+
}
|
129 |
+
|
130 |
function metaseo_updateDesc(metadesc_id, needToSave) {
|
131 |
var desc = jQuery.trim(metaseo_clean(jQuery('#' + metadesc_id).val()));
|
132 |
var postid = metadesc_id.replace('metaseo-metadesc-', '');
|
js/wpms-link-title-field.js
ADDED
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* global ajaxurl, tinymce, wpLinkL10n, setUserSetting, wpActiveEditor */
|
2 |
+
var wpmsLinkTitle;
|
3 |
+
|
4 |
+
( function( $ ) {
|
5 |
+
var inputs = {};
|
6 |
+
|
7 |
+
wpmsLinkTitle = {
|
8 |
+
origsetDefaultValues: null,
|
9 |
+
origmceRefresh: null,
|
10 |
+
origgetAttrs: null,
|
11 |
+
origupdateFields: null,
|
12 |
+
orightmlUpdate: null,
|
13 |
+
|
14 |
+
init: function() {
|
15 |
+
// Put the title field back where it belongs
|
16 |
+
$( '.wp-link-text-field' ).before( '<div class="link-title-field"><label><span>' + wpmsLinkTitleL10n.titleLabel + '</span><input id="wp-link-title" type="text" name="linktitle" /></label></div>' );
|
17 |
+
|
18 |
+
// Move search results lower to avoid overlapping
|
19 |
+
$( '<style type="text/css"> .has-text-field #wp-link #search-panel .query-results { top: 235px; } </style>' ).appendTo( 'head' );
|
20 |
+
|
21 |
+
inputs.wrap = $('#wp-link-wrap');
|
22 |
+
inputs.submit = $( '#wp-link-submit' );
|
23 |
+
|
24 |
+
// Input
|
25 |
+
inputs.url = $( '#wp-link-url' );
|
26 |
+
inputs.title = $( '#wp-link-title' );
|
27 |
+
inputs.text = $( '#wp-link-text' );
|
28 |
+
inputs.openInNewTab = $( '#wp-link-target' );
|
29 |
+
|
30 |
+
// override several functions in wpLink, save the originals
|
31 |
+
if ( 'undefined' !== typeof wpLink ) {
|
32 |
+
wpmsLinkTitle.origsetDefaultValues = wpLink.setDefaultValues;
|
33 |
+
wpmsLinkTitle.origmceRefresh = wpLink.mceRefresh;
|
34 |
+
wpmsLinkTitle.origgetAttrs = wpLink.getAttrs;
|
35 |
+
wpmsLinkTitle.origupdateFields = wpLink.updateFields;
|
36 |
+
wpmsLinkTitle.orightmlUpdate = wpLink.htmlUpdate;
|
37 |
+
|
38 |
+
wpLink.setDefaultValues = wpmsLinkTitle.setDefaultValues;
|
39 |
+
wpLink.mceRefresh = wpmsLinkTitle.mceRefresh;
|
40 |
+
wpLink.getAttrs = wpmsLinkTitle.getAttrs;
|
41 |
+
wpLink.updateFields = wpmsLinkTitle.updateFields;
|
42 |
+
wpLink.htmlUpdate = wpmsLinkTitle.htmlUpdate;
|
43 |
+
}
|
44 |
+
|
45 |
+
$( '#wp-link' ).find( '.query-results' ).on( 'river-select', wpmsLinkTitle.updateFields );
|
46 |
+
},
|
47 |
+
|
48 |
+
mceRefresh: function() {
|
49 |
+
var editor = tinymce.get( wpActiveEditor ),
|
50 |
+
selectedNode = editor.selection.getNode(),
|
51 |
+
linkNode = editor.dom.getParent( selectedNode, 'a[href]' );
|
52 |
+
|
53 |
+
if ( linkNode ) {
|
54 |
+
inputs.title.val( editor.dom.getAttrib( linkNode, 'title' ) );
|
55 |
+
}
|
56 |
+
return wpmsLinkTitle.origmceRefresh.apply(this, arguments);
|
57 |
+
},
|
58 |
+
|
59 |
+
getAttrs: function() {
|
60 |
+
attrs = wpmsLinkTitle.origgetAttrs.apply(this, arguments);
|
61 |
+
attrs.title = $.trim( inputs.title.val() );
|
62 |
+
return attrs;
|
63 |
+
},
|
64 |
+
|
65 |
+
htmlUpdate: function() {
|
66 |
+
var attrs, text, html, begin, end, cursor, selection,
|
67 |
+
textarea = wpLink.textarea;
|
68 |
+
|
69 |
+
if ( ! textarea ) {
|
70 |
+
return;
|
71 |
+
}
|
72 |
+
|
73 |
+
attrs = wpmsLinkTitle.getAttrs();
|
74 |
+
text = inputs.text.val();
|
75 |
+
|
76 |
+
// If there's no href, return.
|
77 |
+
if ( ! attrs.href ) {
|
78 |
+
return;
|
79 |
+
}
|
80 |
+
|
81 |
+
// Build HTML
|
82 |
+
html = '<a href="' + attrs.href + '"';
|
83 |
+
|
84 |
+
if ( attrs.title ) {
|
85 |
+
title = attrs.title.replace( /</g, '<' ).replace( />/g, '>' ).replace( /"/g, '"' );
|
86 |
+
html += ' title="' + title + '"';
|
87 |
+
}
|
88 |
+
|
89 |
+
if ( attrs.target ) {
|
90 |
+
html += ' target="' + attrs.target + '"';
|
91 |
+
}
|
92 |
+
|
93 |
+
html += '>';
|
94 |
+
|
95 |
+
// Insert HTML
|
96 |
+
if ( document.selection && wpLink.range ) {
|
97 |
+
// IE
|
98 |
+
// Note: If no text is selected, IE will not place the cursor
|
99 |
+
// inside the closing tag.
|
100 |
+
textarea.focus();
|
101 |
+
wpLink.range.text = html + ( text || wpLink.range.text ) + '</a>';
|
102 |
+
wpLink.range.moveToBookmark( wpLink.range.getBookmark() );
|
103 |
+
wpLink.range.select();
|
104 |
+
|
105 |
+
wpLink.range = null;
|
106 |
+
} else if ( typeof textarea.selectionStart !== 'undefined' ) {
|
107 |
+
// W3C
|
108 |
+
begin = textarea.selectionStart;
|
109 |
+
end = textarea.selectionEnd;
|
110 |
+
selection = text || textarea.value.substring( begin, end );
|
111 |
+
html = html + selection + '</a>';
|
112 |
+
cursor = begin + html.length;
|
113 |
+
|
114 |
+
// If no text is selected, place the cursor inside the closing tag.
|
115 |
+
if ( begin === end && ! selection ) {
|
116 |
+
cursor -= 4;
|
117 |
+
}
|
118 |
+
|
119 |
+
textarea.value = (
|
120 |
+
textarea.value.substring( 0, begin ) +
|
121 |
+
html +
|
122 |
+
textarea.value.substring( end, textarea.value.length )
|
123 |
+
);
|
124 |
+
|
125 |
+
// Update cursor position
|
126 |
+
textarea.selectionStart = textarea.selectionEnd = cursor;
|
127 |
+
}
|
128 |
+
|
129 |
+
wpLink.close();
|
130 |
+
textarea.focus();
|
131 |
+
},
|
132 |
+
|
133 |
+
updateFields: function( e, li ) {
|
134 |
+
inputs.title.val( li.hasClass( 'no-title' ) ? '' : li.children( '.item-title' ).text() );
|
135 |
+
//return wpmsLinkTitle.origupdateFields.apply(this, arguments);
|
136 |
+
},
|
137 |
+
|
138 |
+
setDefaultValues: function() {
|
139 |
+
inputs.title.val( '' );
|
140 |
+
return wpmsLinkTitle.origsetDefaultValues.apply(this, arguments);
|
141 |
+
}
|
142 |
+
};
|
143 |
+
|
144 |
+
$( document ).ready( wpmsLinkTitle.init );
|
145 |
+
})( jQuery );
|
languages/{wpms-en_US.mo → wp-meta-seo-en_US.mo}
RENAMED
File without changes
|
languages/{wpms-en_US.po → wp-meta-seo-en_US.po}
RENAMED
@@ -613,3 +613,39 @@ msgstr "Meta keywords"
|
|
613 |
|
614 |
msgid "Active meta keywords"
|
615 |
msgstr "Active meta keywords"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
613 |
|
614 |
msgid "Active meta keywords"
|
615 |
msgstr "Active meta keywords"
|
616 |
+
|
617 |
+
msgid "Link text field"
|
618 |
+
msgstr "Link text field"
|
619 |
+
|
620 |
+
msgid "Adds back the missing 'title' field in the Insert/Edit URL box"
|
621 |
+
msgstr "Adds back the missing 'title' field in the Insert/Edit URL box"
|
622 |
+
|
623 |
+
msgid "Link titles"
|
624 |
+
msgstr "Link titles"
|
625 |
+
|
626 |
+
msgid "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"
|
627 |
+
msgstr "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"
|
628 |
+
|
629 |
+
msgid "Links title completed"
|
630 |
+
msgstr "Links title completed"
|
631 |
+
|
632 |
+
msgid "Saved."
|
633 |
+
msgstr "Saved."
|
634 |
+
|
635 |
+
msgid "Error."
|
636 |
+
msgstr "Error."
|
637 |
+
|
638 |
+
msgid "Source"
|
639 |
+
msgstr "Source"
|
640 |
+
|
641 |
+
msgid "URL"
|
642 |
+
msgstr "URL"
|
643 |
+
|
644 |
+
msgid "Link title"
|
645 |
+
msgstr "Link title"
|
646 |
+
|
647 |
+
msgid "Link text"
|
648 |
+
msgstr "Link text"
|
649 |
+
|
650 |
+
msgid "Link Meta"
|
651 |
+
msgstr "Link Meta"
|
languages/wp-meta-seo-fr_FR.mo
ADDED
Binary file
|
languages/{wpms-fr_FR.po → wp-meta-seo-fr_FR.po}
RENAMED
@@ -9,7 +9,7 @@ msgstr ""
|
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Generator: Poedit 1.
|
13 |
|
14 |
msgid "Twitter username (without @)"
|
15 |
msgstr "ID Twitter (sans le @)"
|
@@ -18,54 +18,54 @@ msgid ""
|
|
18 |
"2 plugins that are doing almost the same thing detected: disable AIO SEO or "
|
19 |
"Yoast SEO to avoid conflict."
|
20 |
msgstr ""
|
21 |
-
"2 plugins sont présent et font tous les 2 du SEO: merci de désactiver AIO
|
22 |
-
"Yoast SEO pour éviter les conflits"
|
23 |
|
24 |
msgid ""
|
25 |
-
"We have found that you’re using All In One SEO plugin, WP Meta SEO can
|
26 |
-
"the meta from this plugin, %s"
|
27 |
msgstr ""
|
28 |
-
"Vous utilisez le plugin All in one SEO, nous pouvons importer les meta de
|
29 |
-
"plugin pour vous, %s"
|
30 |
|
31 |
msgid ""
|
32 |
"We have found that you’re using Yoast SEO plugin, WP Meta SEO can import the "
|
33 |
"meta from this plugin, %s"
|
34 |
msgstr ""
|
35 |
-
"Vous utilisez le plugin Yoast SEO, nous pouvons importer les meta de ce
|
36 |
-
"pour vous, %s"
|
37 |
|
38 |
msgid "Results preview"
|
39 |
msgstr "Prévisualisation"
|
40 |
|
41 |
msgid ""
|
42 |
-
"This is a preview of what your content will looks like in search engine
|
43 |
-
"title, description and URL"
|
44 |
msgstr "Prévisualisation des résultats de recherche, titre, description et URL"
|
45 |
|
46 |
msgid "Search engine title"
|
47 |
msgstr "Titre"
|
48 |
|
49 |
msgid ""
|
50 |
-
"This is the title of your content that may be displayed in search engine
|
51 |
-
"(meta title). By default it’s the content title (page title, post
|
52 |
-
"characters max allowed."
|
53 |
msgstr ""
|
54 |
"Ceci est le titre de votre contenu qui pourra être reprit par les moteurs de "
|
55 |
-
"recherche (meta title). Par défaut il s'agit du titre du contenu. 69
|
56 |
-
"max"
|
57 |
|
58 |
msgid "Search engine description"
|
59 |
msgstr "Description"
|
60 |
|
61 |
msgid ""
|
62 |
-
"The description of your content that may be displayed in search engine
|
63 |
-
"aka meta description. By default search engine take an excerpt from
|
64 |
-
"(depending on the search query). 156 characters max allowed."
|
65 |
msgstr ""
|
66 |
-
"Ceci est la description de votre contenu qui pourra être reprit par les
|
67 |
-
"de recherche (meta description). Par défaut il s'agit d'un extrait
|
68 |
-
"contenu.156 caractères max"
|
69 |
|
70 |
msgid "Facebook Title"
|
71 |
msgstr "Titre facebook"
|
@@ -90,8 +90,8 @@ msgid ""
|
|
90 |
"Custom image to display when sharing this content on facebook, content "
|
91 |
"description override, recommended size is 1200px x 630px"
|
92 |
msgstr ""
|
93 |
-
"Image customisé lors du partage de ce contenu sur Facebook, taille
|
94 |
-
"1200px x 630px"
|
95 |
|
96 |
msgid "Twitter Title"
|
97 |
msgstr "Titre Twitter"
|
@@ -116,8 +116,8 @@ msgid ""
|
|
116 |
"Custom image to display when sharing this content on facebook, content "
|
117 |
"description override, recommended min size 440px X 220px"
|
118 |
msgstr ""
|
119 |
-
"Image customisé lors du partage de ce contenu sur Twitter, taille
|
120 |
-
"440px x 220px"
|
121 |
|
122 |
msgid "Use Image"
|
123 |
msgstr "Utiliser image"
|
@@ -201,7 +201,8 @@ msgid "Filter"
|
|
201 |
msgstr "Filtrer"
|
202 |
|
203 |
msgid ""
|
204 |
-
"We didn't find any image which needed to be updated regarding meta
|
|
|
205 |
msgstr ""
|
206 |
"Nous n'avons trouvé aucune image qui ont besoin d'être optimisé pour le SEO"
|
207 |
|
@@ -252,7 +253,8 @@ msgstr "Le contenu est vide, merci de revérifier"
|
|
252 |
|
253 |
msgid "We can't get traffic rank from Alexa for this website"
|
254 |
msgstr ""
|
255 |
-
"Nous n'avons pas assez d'info (de trafic) Alexa pour avoir le \"Traffic Rank
|
|
|
256 |
|
257 |
msgid "Meta Title"
|
258 |
msgstr "Meta titre"
|
@@ -279,8 +281,8 @@ msgid ""
|
|
279 |
"This is a preview of what this content might looks like in Google's search "
|
280 |
"results."
|
281 |
msgstr ""
|
282 |
-
"Prévisualisation de ce à quoi votre contenu peut ressembler dans les
|
283 |
-
"de recherche"
|
284 |
|
285 |
msgid "Snippet Preview %s"
|
286 |
msgstr "Prévisualisation %s"
|
@@ -329,7 +331,8 @@ msgstr "Bien joué ! Image remise à la bonne taille !"
|
|
329 |
|
330 |
msgid "Oops! An error occured when updating the post, please try again"
|
331 |
msgstr ""
|
332 |
-
"Oups! Une erreur est survenue durant la mise à jour du post, merci de
|
|
|
333 |
|
334 |
msgid "Resize image"
|
335 |
msgstr "Redimensionner image"
|
@@ -421,11 +424,12 @@ msgstr "Autres plugin de JoomUnited"
|
|
421 |
msgid ""
|
422 |
"Check if a word of this content title is also in a title heading (h1, h2...)"
|
423 |
msgstr ""
|
424 |
-
"Vérifie si un mot du titre de page est aussi présent dans un titre du
|
425 |
-
"(h1, h2...)"
|
426 |
|
427 |
msgid "Check if a word of this content title is also in the text"
|
428 |
-
msgstr "
|
|
|
429 |
|
430 |
msgid "Does the page title match with the permalink (URL structure)"
|
431 |
msgstr "Vérifie si le titre de page correspond à l'URL (permalien)"
|
@@ -437,69 +441,71 @@ msgid "Is the meta description of this page filled?"
|
|
437 |
msgstr "Est-ce que les meta description sont complétés?"
|
438 |
|
439 |
msgid ""
|
440 |
-
"Check for image HTML resizing in content (usually image resized using
|
|
|
441 |
msgstr ""
|
442 |
-
"Vérifie si des images sont redimensionnées en HTML (habituellement en
|
443 |
-
"les poignées)"
|
444 |
|
445 |
msgid "Check for image Alt text and title"
|
446 |
msgstr "Vérifie si les textes alt and titre d'images sont remplis"
|
447 |
|
448 |
msgid ""
|
449 |
-
"It's better using a permalink structure that is adding in your URL the
|
450 |
-
"name and content title. This parameter can be changed in Settings >
|
451 |
-
"WordPress menu. Tag recommended is %category%/%postname%"
|
452 |
msgstr ""
|
453 |
-
"Il est préférable d'utiliser des URL dont le nom de la catégorie et le titre
|
454 |
-
"page sont en clair. Ce paramètre peut être modifié depuis le menu
|
455 |
-
"Permaliens. Le tag recommandé est %category%/%postname%"
|
456 |
|
457 |
msgid ""
|
458 |
-
"Meta titles are displayed in search engine results as a page title. It's a
|
459 |
-
"thing for SEO to have some custom and attractive ones. Be sure to fill
|
460 |
-
"the met information on your most popular pages"
|
461 |
msgstr ""
|
462 |
"Les titres Meta sont affichés dans les résultats de recherche comme titre de "
|
463 |
-
"page. C'est une bonne chose de mettre des titres accrocheurs pour avoir un
|
464 |
-
"grand nombre de clics."
|
465 |
|
466 |
msgid ""
|
467 |
-
"Meta descriptions are displayed in search engine results as a page
|
468 |
-
"It's a good thing for SEO to have some custom and attractive
|
469 |
-
"fill at least the meta information on your most popular
|
|
|
470 |
msgstr ""
|
471 |
"Les Meta descroption sont affichés dans les résultats de recherche comme "
|
472 |
"description de page. C'est une bonne chose de mettre des descriptions "
|
473 |
"accrocheuses pour avoir un plus grand nombre de clics."
|
474 |
|
475 |
msgid ""
|
476 |
-
"Display image at its natural size, do not use HTML resize. It happens
|
477 |
-
"when you use handles to resize an image. You have a bulk edition
|
478 |
-
"that."
|
479 |
msgstr ""
|
480 |
-
"Utilisez des images à leur taille naturelle, pas en les redimensionnant en
|
481 |
-
"(avec les poignées). Avec WP Meta SEO, vous disposez d'un outil pour
|
482 |
-
"cela"
|
483 |
|
484 |
msgid ""
|
485 |
-
"We recommend to use both alt text and image title. The main advantage is
|
486 |
-
"helps search engines discover your images and display them in image
|
487 |
-
"results. Plus, these tags improve the accessibility of your site and
|
488 |
-
"information about your images. Use our bulk image tool to quickly
|
489 |
-
"that."
|
490 |
msgstr ""
|
491 |
"Nous vous recommandons de compléter les le textes alternatif et les titres "
|
492 |
-
"d'images. L'avantage c'est que cela permet aux moteur de recherche d'indexer
|
493 |
-
"images et apporte plus de contenu à vos pages. utilisez l'outil
|
494 |
-
"lot pour aller plus vite! "
|
495 |
|
496 |
msgid ""
|
497 |
"It is highly recommended to update or add new content on your website quite "
|
498 |
"frequently. At least 3 updated or new content per month would be great :)"
|
499 |
msgstr ""
|
500 |
-
"Il est fortement recommandé de mettre à jour ou d'ajouter du contenu sur
|
501 |
-
"site pour être mieux référencé. Au moins 3 mises à jour ou ajout de
|
502 |
-
"mois serait parfait :)"
|
503 |
|
504 |
msgid "Social networks meta"
|
505 |
msgstr "Meta réseaux sociaux"
|
@@ -548,11 +554,11 @@ msgstr ""
|
|
548 |
"essayez de désactiver AIO SEO ou Yoast SEO"
|
549 |
|
550 |
msgid ""
|
551 |
-
"We have found that you’re using All In One Pack Plugin, WP Meta SEO can
|
552 |
-
"the meta from this plugin, %s"
|
553 |
msgstr ""
|
554 |
-
"Vous utilisez actuellement All In One SEO Plugin, WP Meta SEO put importer
|
555 |
-
"données de ce plugin pour vous, %s"
|
556 |
|
557 |
msgid "Name is existing"
|
558 |
msgstr "Ce nom existe déjà"
|
@@ -596,17 +602,63 @@ msgstr "WP Meta SEO - Page optimisation"
|
|
596 |
msgid "Meta title was saved"
|
597 |
msgstr "Metz"
|
598 |
|
|
|
|
|
|
|
599 |
msgid "Meta keywords was saved"
|
600 |
msgstr "Mot clés enregistrés"
|
601 |
|
602 |
msgid "Force SEO validation"
|
603 |
msgstr "Forcer validation SEO"
|
604 |
|
605 |
-
msgid "
|
606 |
-
|
|
|
|
|
607 |
|
608 |
msgid "Meta keywords"
|
609 |
msgstr "Mot clés"
|
610 |
|
611 |
msgid "Active meta keywords"
|
612 |
msgstr "Activer les mot clés meta"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 1.8.5\n"
|
13 |
|
14 |
msgid "Twitter username (without @)"
|
15 |
msgstr "ID Twitter (sans le @)"
|
18 |
"2 plugins that are doing almost the same thing detected: disable AIO SEO or "
|
19 |
"Yoast SEO to avoid conflict."
|
20 |
msgstr ""
|
21 |
+
"2 plugins sont présent et font tous les 2 du SEO: merci de désactiver AIO "
|
22 |
+
"SEO ou Yoast SEO pour éviter les conflits"
|
23 |
|
24 |
msgid ""
|
25 |
+
"We have found that you’re using All In One SEO plugin, WP Meta SEO can "
|
26 |
+
"import the meta from this plugin, %s"
|
27 |
msgstr ""
|
28 |
+
"Vous utilisez le plugin All in one SEO, nous pouvons importer les meta de "
|
29 |
+
"ce plugin pour vous, %s"
|
30 |
|
31 |
msgid ""
|
32 |
"We have found that you’re using Yoast SEO plugin, WP Meta SEO can import the "
|
33 |
"meta from this plugin, %s"
|
34 |
msgstr ""
|
35 |
+
"Vous utilisez le plugin Yoast SEO, nous pouvons importer les meta de ce "
|
36 |
+
"plugin pour vous, %s"
|
37 |
|
38 |
msgid "Results preview"
|
39 |
msgstr "Prévisualisation"
|
40 |
|
41 |
msgid ""
|
42 |
+
"This is a preview of what your content will looks like in search engine "
|
43 |
+
"results: title, description and URL"
|
44 |
msgstr "Prévisualisation des résultats de recherche, titre, description et URL"
|
45 |
|
46 |
msgid "Search engine title"
|
47 |
msgstr "Titre"
|
48 |
|
49 |
msgid ""
|
50 |
+
"This is the title of your content that may be displayed in search engine "
|
51 |
+
"results (meta title). By default it’s the content title (page title, post "
|
52 |
+
"title…). 69 characters max allowed."
|
53 |
msgstr ""
|
54 |
"Ceci est le titre de votre contenu qui pourra être reprit par les moteurs de "
|
55 |
+
"recherche (meta title). Par défaut il s'agit du titre du contenu. 69 "
|
56 |
+
"caractères max"
|
57 |
|
58 |
msgid "Search engine description"
|
59 |
msgstr "Description"
|
60 |
|
61 |
msgid ""
|
62 |
+
"The description of your content that may be displayed in search engine "
|
63 |
+
"results aka meta description. By default search engine take an excerpt from "
|
64 |
+
"your content (depending on the search query). 156 characters max allowed."
|
65 |
msgstr ""
|
66 |
+
"Ceci est la description de votre contenu qui pourra être reprit par les "
|
67 |
+
"moteurs de recherche (meta description). Par défaut il s'agit d'un extrait "
|
68 |
+
"de votre contenu.156 caractères max"
|
69 |
|
70 |
msgid "Facebook Title"
|
71 |
msgstr "Titre facebook"
|
90 |
"Custom image to display when sharing this content on facebook, content "
|
91 |
"description override, recommended size is 1200px x 630px"
|
92 |
msgstr ""
|
93 |
+
"Image customisé lors du partage de ce contenu sur Facebook, taille "
|
94 |
+
"recommandée 1200px x 630px"
|
95 |
|
96 |
msgid "Twitter Title"
|
97 |
msgstr "Titre Twitter"
|
116 |
"Custom image to display when sharing this content on facebook, content "
|
117 |
"description override, recommended min size 440px X 220px"
|
118 |
msgstr ""
|
119 |
+
"Image customisé lors du partage de ce contenu sur Twitter, taille "
|
120 |
+
"recommandée 440px x 220px"
|
121 |
|
122 |
msgid "Use Image"
|
123 |
msgstr "Utiliser image"
|
201 |
msgstr "Filtrer"
|
202 |
|
203 |
msgid ""
|
204 |
+
"We didn't find any image which needed to be updated regarding meta "
|
205 |
+
"information"
|
206 |
msgstr ""
|
207 |
"Nous n'avons trouvé aucune image qui ont besoin d'être optimisé pour le SEO"
|
208 |
|
253 |
|
254 |
msgid "We can't get traffic rank from Alexa for this website"
|
255 |
msgstr ""
|
256 |
+
"Nous n'avons pas assez d'info (de trafic) Alexa pour avoir le \"Traffic Rank"
|
257 |
+
"\""
|
258 |
|
259 |
msgid "Meta Title"
|
260 |
msgstr "Meta titre"
|
281 |
"This is a preview of what this content might looks like in Google's search "
|
282 |
"results."
|
283 |
msgstr ""
|
284 |
+
"Prévisualisation de ce à quoi votre contenu peut ressembler dans les "
|
285 |
+
"résultats de recherche"
|
286 |
|
287 |
msgid "Snippet Preview %s"
|
288 |
msgstr "Prévisualisation %s"
|
331 |
|
332 |
msgid "Oops! An error occured when updating the post, please try again"
|
333 |
msgstr ""
|
334 |
+
"Oups! Une erreur est survenue durant la mise à jour du post, merci de "
|
335 |
+
"réessayer"
|
336 |
|
337 |
msgid "Resize image"
|
338 |
msgstr "Redimensionner image"
|
424 |
msgid ""
|
425 |
"Check if a word of this content title is also in a title heading (h1, h2...)"
|
426 |
msgstr ""
|
427 |
+
"Vérifie si un mot du titre de page est aussi présent dans un titre du "
|
428 |
+
"contenu (h1, h2...)"
|
429 |
|
430 |
msgid "Check if a word of this content title is also in the text"
|
431 |
+
msgstr ""
|
432 |
+
"Vérifie si un mot du titre de page est aussi présent dans le contenu texte"
|
433 |
|
434 |
msgid "Does the page title match with the permalink (URL structure)"
|
435 |
msgstr "Vérifie si le titre de page correspond à l'URL (permalien)"
|
441 |
msgstr "Est-ce que les meta description sont complétés?"
|
442 |
|
443 |
msgid ""
|
444 |
+
"Check for image HTML resizing in content (usually image resized using "
|
445 |
+
"handles)"
|
446 |
msgstr ""
|
447 |
+
"Vérifie si des images sont redimensionnées en HTML (habituellement en "
|
448 |
+
"utilisant les poignées)"
|
449 |
|
450 |
msgid "Check for image Alt text and title"
|
451 |
msgstr "Vérifie si les textes alt and titre d'images sont remplis"
|
452 |
|
453 |
msgid ""
|
454 |
+
"It's better using a permalink structure that is adding in your URL the "
|
455 |
+
"category name and content title. This parameter can be changed in Settings > "
|
456 |
+
"Permalinks WordPress menu. Tag recommended is %category%/%postname%"
|
457 |
msgstr ""
|
458 |
+
"Il est préférable d'utiliser des URL dont le nom de la catégorie et le titre "
|
459 |
+
"de page sont en clair. Ce paramètre peut être modifié depuis le menu "
|
460 |
+
"Paramètres > Permaliens. Le tag recommandé est %category%/%postname%"
|
461 |
|
462 |
msgid ""
|
463 |
+
"Meta titles are displayed in search engine results as a page title. It's a "
|
464 |
+
"good thing for SEO to have some custom and attractive ones. Be sure to fill "
|
465 |
+
"at least the met information on your most popular pages"
|
466 |
msgstr ""
|
467 |
"Les titres Meta sont affichés dans les résultats de recherche comme titre de "
|
468 |
+
"page. C'est une bonne chose de mettre des titres accrocheurs pour avoir un "
|
469 |
+
"plus grand nombre de clics."
|
470 |
|
471 |
msgid ""
|
472 |
+
"Meta descriptions are displayed in search engine results as a page "
|
473 |
+
"description. It's a good thing for SEO to have some custom and attractive "
|
474 |
+
"ones. Be sure to fill at least the meta information on your most popular "
|
475 |
+
"pages."
|
476 |
msgstr ""
|
477 |
"Les Meta descroption sont affichés dans les résultats de recherche comme "
|
478 |
"description de page. C'est une bonne chose de mettre des descriptions "
|
479 |
"accrocheuses pour avoir un plus grand nombre de clics."
|
480 |
|
481 |
msgid ""
|
482 |
+
"Display image at its natural size, do not use HTML resize. It happens "
|
483 |
+
"usually when you use handles to resize an image. You have a bulk edition "
|
484 |
+
"tool to fix that."
|
485 |
msgstr ""
|
486 |
+
"Utilisez des images à leur taille naturelle, pas en les redimensionnant en "
|
487 |
+
"HTML (avec les poignées). Avec WP Meta SEO, vous disposez d'un outil pour "
|
488 |
+
"corriger cela"
|
489 |
|
490 |
msgid ""
|
491 |
+
"We recommend to use both alt text and image title. The main advantage is "
|
492 |
+
"that it helps search engines discover your images and display them in image "
|
493 |
+
"search results. Plus, these tags improve the accessibility of your site and "
|
494 |
+
"give more information about your images. Use our bulk image tool to quickly "
|
495 |
+
"check and fix that."
|
496 |
msgstr ""
|
497 |
"Nous vous recommandons de compléter les le textes alternatif et les titres "
|
498 |
+
"d'images. L'avantage c'est que cela permet aux moteur de recherche d'indexer "
|
499 |
+
"vos images et apporte plus de contenu à vos pages. utilisez l'outil "
|
500 |
+
"d'édition par lot pour aller plus vite! "
|
501 |
|
502 |
msgid ""
|
503 |
"It is highly recommended to update or add new content on your website quite "
|
504 |
"frequently. At least 3 updated or new content per month would be great :)"
|
505 |
msgstr ""
|
506 |
+
"Il est fortement recommandé de mettre à jour ou d'ajouter du contenu sur "
|
507 |
+
"votre site pour être mieux référencé. Au moins 3 mises à jour ou ajout de "
|
508 |
+
"contenu par mois serait parfait :)"
|
509 |
|
510 |
msgid "Social networks meta"
|
511 |
msgstr "Meta réseaux sociaux"
|
554 |
"essayez de désactiver AIO SEO ou Yoast SEO"
|
555 |
|
556 |
msgid ""
|
557 |
+
"We have found that you’re using All In One Pack Plugin, WP Meta SEO can "
|
558 |
+
"import the meta from this plugin, %s"
|
559 |
msgstr ""
|
560 |
+
"Vous utilisez actuellement All In One SEO Plugin, WP Meta SEO put importer "
|
561 |
+
"les données de ce plugin pour vous, %s"
|
562 |
|
563 |
msgid "Name is existing"
|
564 |
msgstr "Ce nom existe déjà"
|
602 |
msgid "Meta title was saved"
|
603 |
msgstr "Metz"
|
604 |
|
605 |
+
msgid "Content Meta"
|
606 |
+
msgstr "Meta content"
|
607 |
+
|
608 |
msgid "Meta keywords was saved"
|
609 |
msgstr "Mot clés enregistrés"
|
610 |
|
611 |
msgid "Force SEO validation"
|
612 |
msgstr "Forcer validation SEO"
|
613 |
|
614 |
+
msgid ""
|
615 |
+
"Allow user to force on page SEO criteria validation by clicking on the icon"
|
616 |
+
msgstr ""
|
617 |
+
"Autoriser la validation forcée des critères SEO dans l'analyse des pages"
|
618 |
|
619 |
msgid "Meta keywords"
|
620 |
msgstr "Mot clés"
|
621 |
|
622 |
msgid "Active meta keywords"
|
623 |
msgstr "Activer les mot clés meta"
|
624 |
+
|
625 |
+
msgid "Link text field"
|
626 |
+
msgstr "Champ titre lien"
|
627 |
+
|
628 |
+
msgid "Adds back the missing 'title' field in the Insert/Edit URL box"
|
629 |
+
msgstr "Ajouter un champ titre dans l'outil d'édition de lien"
|
630 |
+
|
631 |
+
msgid "Link titles"
|
632 |
+
msgstr "Titres lien"
|
633 |
+
|
634 |
+
msgid ""
|
635 |
+
"The link title attribute does not have any SEO value for links. BUT links "
|
636 |
+
"titles can influence click behavior for users, which may indirectly affect "
|
637 |
+
"your SEO performance"
|
638 |
+
msgstr ""
|
639 |
+
"Les titres des liens n'ont pas d'impact direct sur le SEO MAIS cela peut "
|
640 |
+
"influencer le comportement des utilisateurs en les incitant a cliquer dessus"
|
641 |
+
|
642 |
+
msgid "Links title completed"
|
643 |
+
msgstr "Titre de lien ajouté"
|
644 |
+
|
645 |
+
msgid "Saved."
|
646 |
+
msgstr "Enregistré"
|
647 |
+
|
648 |
+
msgid "Error."
|
649 |
+
msgstr "Erreur"
|
650 |
+
|
651 |
+
msgid "Source"
|
652 |
+
msgstr "Source"
|
653 |
+
|
654 |
+
msgid "URL"
|
655 |
+
msgstr "URL"
|
656 |
+
|
657 |
+
msgid "Link title"
|
658 |
+
msgstr "Titre liens"
|
659 |
+
|
660 |
+
msgid "Link text"
|
661 |
+
msgstr "Text lien"
|
662 |
+
|
663 |
+
msgid "Link Meta"
|
664 |
+
msgstr "Meta lien"
|
languages/{wpms.pot → wp-meta-seo.pot}
RENAMED
@@ -509,4 +509,40 @@ msgid "Meta keywords"
|
|
509 |
msgstr ""
|
510 |
|
511 |
msgid "Active meta keywords"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
512 |
msgstr ""
|
509 |
msgstr ""
|
510 |
|
511 |
msgid "Active meta keywords"
|
512 |
+
msgstr ""
|
513 |
+
|
514 |
+
msgid "Link text field"
|
515 |
+
msgstr ""
|
516 |
+
|
517 |
+
msgid "Adds back the missing 'title' field in the Insert/Edit URL box"
|
518 |
+
msgstr ""
|
519 |
+
|
520 |
+
msgid "Link titles"
|
521 |
+
msgstr ""
|
522 |
+
|
523 |
+
msgid "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"
|
524 |
+
msgstr ""
|
525 |
+
|
526 |
+
msgid "Links title completed"
|
527 |
+
msgstr ""
|
528 |
+
|
529 |
+
msgid "Saved."
|
530 |
+
msgstr ""
|
531 |
+
|
532 |
+
msgid "Error."
|
533 |
+
msgstr ""
|
534 |
+
|
535 |
+
msgid "Source"
|
536 |
+
msgstr ""
|
537 |
+
|
538 |
+
msgid "URL"
|
539 |
+
msgstr ""
|
540 |
+
|
541 |
+
msgid "Link title"
|
542 |
+
msgstr ""
|
543 |
+
|
544 |
+
msgid "Link text"
|
545 |
+
msgstr ""
|
546 |
+
|
547 |
+
msgid "Link Meta"
|
548 |
msgstr ""
|
languages/wpms-fr_FR.mo
DELETED
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
|
4 |
Requires at least: 4.0
|
5 |
-
Tested up to: 4.
|
6 |
-
Stable tag: 1.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -12,12 +12,13 @@ WP Meta SEO gives you the control over all your meta content and images. Bulk SE
|
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
-
= WP meta SEO got
|
16 |
|
17 |
* Bulk edit all website meta on a single view
|
18 |
-
* Edit meta in content with SEO analysis
|
19 |
* Fix HTML image resizing
|
20 |
* Bulk edit image file name and meta
|
|
|
21 |
* Facebook and Twitter social sharing custom elements per content
|
22 |
|
23 |
|
@@ -83,6 +84,8 @@ WP Meta SEO also include this feature in the bulk edition view, you are notified
|
|
83 |
* SEO bulk copy: Copy image name to image alt and/or image title
|
84 |
* SEO bulk copy: Copy content title to content meta title
|
85 |
* Check for SEO error: is robot.txt blocking search engine
|
|
|
|
|
86 |
|
87 |
= Main plugins from JoomUnited: =
|
88 |
* WP Media Folder: https://www.joomunited.com/wordpress-products/wp-media-folder
|
@@ -100,7 +103,7 @@ Feel free to ask SEO questions on our forum or here in the support section
|
|
100 |
== Installation ==
|
101 |
|
102 |
= To install the automatically: =
|
103 |
-
* Through WordPress admin, use the menu: Plugin > Add new
|
104 |
* Search for WP Meta SEO
|
105 |
* Click on install then click activate link
|
106 |
|
@@ -149,10 +152,10 @@ WP Meta SEO is using HTML5 features so to be sure run the latest version of Chro
|
|
149 |
Yes! you can contact us on our forum. SEO as its own language and expression, we would be happy to add yours.
|
150 |
|
151 |
= Why including meta keywords edition as it's not a SEO rank criteria? =
|
152 |
-
Because it may
|
153 |
|
154 |
= Some criteria of the SEO on page analysis does not fit my content =
|
155 |
-
Yes it
|
156 |
This manual SEO validation on click on the reload analysis button.
|
157 |
|
158 |
== Screenshots ==
|
@@ -168,6 +171,14 @@ This manual SEO validation on click on the reload analysis button.
|
|
168 |
|
169 |
== Changelog ==
|
170 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
= 1.6.0 =
|
172 |
* Add meta keywords edition in bulk editor
|
173 |
* Add option to for SEO criteria validation
|
@@ -233,3 +244,26 @@ This manual SEO validation on click on the reload analysis button.
|
|
233 |
|
234 |
Update through the automatic WordPress updater, all WP Meta SEO content will remain in place.
|
235 |
You WON'T lose any SEO content: meta, alt, titles...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
4 |
Requires at least: 4.0
|
5 |
+
Tested up to: 4.4.0
|
6 |
+
Stable tag: 1.7.0
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
= WP meta SEO got 6 major functionalities: =
|
16 |
|
17 |
* Bulk edit all website meta on a single view
|
18 |
+
* Edit meta in content with live SEO analysis
|
19 |
* Fix HTML image resizing
|
20 |
* Bulk edit image file name and meta
|
21 |
+
* Bulk edit SEO link title
|
22 |
* Facebook and Twitter social sharing custom elements per content
|
23 |
|
24 |
|
84 |
* SEO bulk copy: Copy image name to image alt and/or image title
|
85 |
* SEO bulk copy: Copy content title to content meta title
|
86 |
* Check for SEO error: is robot.txt blocking search engine
|
87 |
+
* Bulk edit SEO link title in your content
|
88 |
+
* Add SEO link title box in editor link manager
|
89 |
|
90 |
= Main plugins from JoomUnited: =
|
91 |
* WP Media Folder: https://www.joomunited.com/wordpress-products/wp-media-folder
|
103 |
== Installation ==
|
104 |
|
105 |
= To install the automatically: =
|
106 |
+
* Through WordPress admin, use the menu: Plugin > Add new
|
107 |
* Search for WP Meta SEO
|
108 |
* Click on install then click activate link
|
109 |
|
152 |
Yes! you can contact us on our forum. SEO as its own language and expression, we would be happy to add yours.
|
153 |
|
154 |
= Why including meta keywords edition as it's not a SEO rank criteria? =
|
155 |
+
Because it may helps in some case for SEO, mainly for multilingual website, it help search engines to validate the page language. Some automatic SEO tool may use it too.
|
156 |
|
157 |
= Some criteria of the SEO on page analysis does not fit my content =
|
158 |
+
Yes, it may be the case when, for example, you are calling 3rd party plugins in content or using specific page layouts. You have a global option to force validation of SEO criteria.
|
159 |
This manual SEO validation on click on the reload analysis button.
|
160 |
|
161 |
== Screenshots ==
|
171 |
|
172 |
== Changelog ==
|
173 |
|
174 |
+
= 1.7.0 =
|
175 |
+
* Add link SEO title field in link editor tool
|
176 |
+
* Add a SEO bulk edition view on your links titles (of all your content)
|
177 |
+
* Automatic meta SEO addition for category view: add category title as meta title and category description as meta description
|
178 |
+
* Add SEO dashboard check for link titles
|
179 |
+
* Fix WooCommerce meta description and title in category view (automatic)
|
180 |
+
* Fix WP Meta SEO language to be conform to plugin directory translation tool
|
181 |
+
|
182 |
= 1.6.0 =
|
183 |
* Add meta keywords edition in bulk editor
|
184 |
* Add option to for SEO criteria validation
|
244 |
|
245 |
Update through the automatic WordPress updater, all WP Meta SEO content will remain in place.
|
246 |
You WON'T lose any SEO content: meta, alt, titles...
|
247 |
+
|
248 |
+
|
249 |
+
== Requirements ==
|
250 |
+
|
251 |
+
= !!NEW in latest & fresh 1.7 version!! =
|
252 |
+
Manage link titles from the link manager in the WordPress default editor and from a bulk edition view.
|
253 |
+
Note that the title attribute does not have direct SEO value for links. Links titles can influence click behavior for users, which may indirectly affect SEO, but it has no direct impact on rankings.
|
254 |
+
Category view like a blog of a category of posts meta title and description is now automatic taking the category title and description as meta content.
|
255 |
+
|
256 |
+
= SEO vision =
|
257 |
+
|
258 |
+
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.
|
259 |
+
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.
|
260 |
+
|
261 |
+
WP Meta SEO provides some automatic tools to analyze your content and give to search engine a better content to analyze.
|
262 |
+
|
263 |
+
WP Meta SEO on each new version, will focus on both "On page SEO" and "Global website SEO" factors:
|
264 |
+
On page SEO: Features that help you optimize a single page, e.g. the article you are working on (with a live analysis). Common functionality includes giving SEO scores to each article, content/meta comparison, page analysis tools and making recommendations how to improve the SEO of a post.
|
265 |
+
Site-wide SEO: it's more about your whole site and structure between multiple articles. Common functionality includes title formatting, meta tag optimization as well as internal linking and redirects management.
|
266 |
+
|
267 |
+
And... don't forget to check each month your SEO dashboard :)
|
268 |
+
|
269 |
+
PHP 5.3+, WP 4.3+
|
wp-meta-seo.php
CHANGED
@@ -4,7 +4,9 @@
|
|
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: 1.
|
|
|
|
|
8 |
* Author: JoomUnited
|
9 |
* Author URI: http://www.joomunited.com
|
10 |
* License: GPL2
|
@@ -45,7 +47,7 @@ if (!defined('URL'))
|
|
45 |
define('URL', get_site_url());
|
46 |
|
47 |
if (!defined('WPMSEO_VERSION'))
|
48 |
-
define('WPMSEO_VERSION', '1.
|
49 |
|
50 |
if (!defined('WPMSEO_FILE'))
|
51 |
define('WPMSEO_FILE', __FILE__);
|
@@ -70,8 +72,8 @@ if (is_admin()) {
|
|
70 |
add_filter( 'user_contactmethods','metaseo_contactuser', 10, 1 );
|
71 |
|
72 |
function metaseo_contactuser( $contactusers ) {
|
73 |
-
$contactusers['mtwitter'] = __( 'Twitter username (without @)', '
|
74 |
-
$contactusers['mfacebook'] = __( 'Facebook profile URL', '
|
75 |
return $contactusers;
|
76 |
}
|
77 |
|
@@ -173,6 +175,12 @@ if (is_admin()) {
|
|
173 |
}
|
174 |
}
|
175 |
|
|
|
|
|
|
|
|
|
|
|
|
|
176 |
$patterns = array(
|
177 |
'twitter_image' => array(
|
178 |
'#<meta name="twitter:image" [^<>]+ ?>#i',
|
@@ -276,7 +284,7 @@ if (is_admin()) {
|
|
276 |
if($meta_facebook_image == ''){
|
277 |
unset($patterns['facebook_image']);
|
278 |
}
|
279 |
-
|
280 |
$default_settings = array(
|
281 |
"metaseo_title_home"=>"",
|
282 |
"metaseo_desc_home"=>"",
|
@@ -362,18 +370,18 @@ function wpmetaseo_aio_yoast_message() {
|
|
362 |
|
363 |
|
364 |
if($activated === 2 && !get_option('plugin_to_sync_with', false)){
|
365 |
-
add_action('admin_notices', create_function('$notImportant', 'echo "<div class=\"error metaseo-import-wrn\"><p>". __("Be careful you installed 2 extensions doing almost the same thing, please deactivate AIOSEO or Yoast in order to work more clearly!", "
|
366 |
}
|
367 |
}
|
368 |
|
369 |
add_action( 'admin_init', 'wpmetaseo_aio_yoast_message' );
|
370 |
|
371 |
function wpmetaseo_import_aio_meta_notice(){
|
372 |
-
echo '<div class="error metaseo-import-wrn"><p>'. sprintf( __('We have found that you’re using All In One Pack Plugin, WP Meta SEO can import the meta from this plugin, %s', '
|
373 |
}
|
374 |
|
375 |
function wpmetaseo_import_yoast_meta_notice(){
|
376 |
-
echo '<div class="error metaseo-import-wrn"><p>'. sprintf( __('We have found that you’re using Yoast SEO Plugin, WP Meta SEO can import the meta from this plugin, %s', '
|
377 |
}
|
378 |
|
379 |
/**
|
@@ -408,4 +416,10 @@ function metaseo_utf8($obj, $action = 'encode'){
|
|
408 |
|
409 |
return $obj;
|
410 |
}
|
411 |
-
|
|
|
|
|
|
|
|
|
|
|
|
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: 1.7.0
|
8 |
+
* Text Domain: wp-meta-seo
|
9 |
+
* Domain Path: /languages
|
10 |
* Author: JoomUnited
|
11 |
* Author URI: http://www.joomunited.com
|
12 |
* License: GPL2
|
47 |
define('URL', get_site_url());
|
48 |
|
49 |
if (!defined('WPMSEO_VERSION'))
|
50 |
+
define('WPMSEO_VERSION', '1.7.0');
|
51 |
|
52 |
if (!defined('WPMSEO_FILE'))
|
53 |
define('WPMSEO_FILE', __FILE__);
|
72 |
add_filter( 'user_contactmethods','metaseo_contactuser', 10, 1 );
|
73 |
|
74 |
function metaseo_contactuser( $contactusers ) {
|
75 |
+
$contactusers['mtwitter'] = __( 'Twitter username (without @)', 'wp-meta-seo' );
|
76 |
+
$contactusers['mfacebook'] = __( 'Facebook profile URL', 'wp-meta-seo' );
|
77 |
return $contactusers;
|
78 |
}
|
79 |
|
175 |
}
|
176 |
}
|
177 |
|
178 |
+
if ( is_category() || is_tag() || is_tax() ) {
|
179 |
+
$term = $wp_query->get_queried_object();
|
180 |
+
$meta_title = $meta_title_esc = $meta_facebook_title = $meta_twitter_title = $term->name;
|
181 |
+
$meta_description_esc = $meta_facebook_desc = $meta_twitter_desc = $term->description;
|
182 |
+
}
|
183 |
+
|
184 |
$patterns = array(
|
185 |
'twitter_image' => array(
|
186 |
'#<meta name="twitter:image" [^<>]+ ?>#i',
|
284 |
if($meta_facebook_image == ''){
|
285 |
unset($patterns['facebook_image']);
|
286 |
}
|
287 |
+
|
288 |
$default_settings = array(
|
289 |
"metaseo_title_home"=>"",
|
290 |
"metaseo_desc_home"=>"",
|
370 |
|
371 |
|
372 |
if($activated === 2 && !get_option('plugin_to_sync_with', false)){
|
373 |
+
add_action('admin_notices', create_function('$notImportant', 'echo "<div class=\"error metaseo-import-wrn\"><p>". __("Be careful you installed 2 extensions doing almost the same thing, please deactivate AIOSEO or Yoast in order to work more clearly!", "wp-meta-seo") ."</p></div>";'), 1);
|
374 |
}
|
375 |
}
|
376 |
|
377 |
add_action( 'admin_init', 'wpmetaseo_aio_yoast_message' );
|
378 |
|
379 |
function wpmetaseo_import_aio_meta_notice(){
|
380 |
+
echo '<div class="error metaseo-import-wrn"><p>'. sprintf( __('We have found that you’re using All In One Pack Plugin, WP Meta SEO can import the meta from this plugin, %s', 'wp-meta-seo'), '<a href="#" class="button mseo-import-action" style="position:relative" onclick="importMetaData(this, event)" id="_aio_"><span class="spinner-light"></span>Import now</a> or <a href="#" class="dissmiss-import">dismiss this</a>' ) .'</p></div>';
|
381 |
}
|
382 |
|
383 |
function wpmetaseo_import_yoast_meta_notice(){
|
384 |
+
echo '<div class="error metaseo-import-wrn"><p>'. sprintf( __('We have found that you’re using Yoast SEO Plugin, WP Meta SEO can import the meta from this plugin, %s', 'wp-meta-seo'), '<a href="#" class="button mseo-import-action" style="position:relative" onclick="importMetaData(this, event)" id="_yoast_">Import now<span class="spinner-light"></span></a> or <a href="#" class="dissmiss-import">dismiss this</a>' ) .'</p></div>';
|
385 |
}
|
386 |
|
387 |
/**
|
416 |
|
417 |
return $obj;
|
418 |
}
|
419 |
+
|
420 |
+
function text_link( $field, $meta ) {
|
421 |
+
echo '<input class="cmb_text_link" type="text" size="45" id="', $field['id'], '" name="', $field['id'], '" value="', $meta, '" />';
|
422 |
+
echo '<input class="cmb_link_button button" type="button" value="Voeg link toe" />','<p class="cmb_metabox_description">', $field['desc'], '</p>';
|
423 |
+
}
|
424 |
+
add_action( 'cmb_render_text_link', 'text_link', 10, 2 );
|
425 |
+
/**********************************************************************************/
|