Version Description
- Fix : Update alt meta for Elementor image in content
- Fix : Redirect URL
Download this release
Release Info
Developer | JoomUnited |
Plugin | WP Meta SEO |
Version | 3.7.4 |
Comparing to | |
See all releases |
Code changes from version 3.7.3 to 3.7.4
- inc/class.metaseo-broken-link-table.php +16 -4
- inc/class.metaseo-image-list-table.php +7 -7
- js/wpms-broken-link.js +2 -9
- languages/wp-meta-seo-en_US.mo +0 -0
- readme.txt +13 -8
- wp-meta-seo.php +36 -14
inc/class.metaseo-broken-link-table.php
CHANGED
@@ -557,13 +557,25 @@ class MetaSeoBrokenLinkTable extends WP_List_Table
|
|
557 |
echo '<input type="hidden" class="wpms_link_text"
|
558 |
value="' . esc_attr($rec->link_text) . '">';
|
559 |
if ($rec->type === 'add_custom') {
|
560 |
-
|
561 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
562 |
if ($rec->link_url_redirect !== '') {
|
563 |
echo ' to ';
|
564 |
-
|
|
|
565 |
href="' . esc_url($rec->link_url_redirect) . '"
|
566 |
-
>' .
|
|
|
|
|
|
|
|
|
|
|
567 |
}
|
568 |
} else {
|
569 |
echo '<a class="link_html" target="_blank"
|
557 |
echo '<input type="hidden" class="wpms_link_text"
|
558 |
value="' . esc_attr($rec->link_text) . '">';
|
559 |
if ($rec->type === 'add_custom') {
|
560 |
+
if (strpos($rec->link_url, home_url()) !== false) {
|
561 |
+
echo '<a class="link_html" target="_blank"
|
562 |
+
href="' . esc_url($rec->link_url) . '">' . esc_html($value_url) . '</a>';
|
563 |
+
} else {
|
564 |
+
echo '<a class="link_html" target="_blank"
|
565 |
+
href="' . esc_url(home_url($rec->link_url)) . '">' . esc_html($value_url) . '</a>';
|
566 |
+
}
|
567 |
+
|
568 |
if ($rec->link_url_redirect !== '') {
|
569 |
echo ' to ';
|
570 |
+
if (strpos($rec->link_url_redirect, 'http://') !== false || strpos($rec->link_url_redirect, 'https://') !== false) {
|
571 |
+
echo '<a class="link_html_redirect" target="_blank"
|
572 |
href="' . esc_url($rec->link_url_redirect) . '"
|
573 |
+
>' . esc_url($rec->link_url_redirect) . '</a>';
|
574 |
+
} else {
|
575 |
+
echo '<a class="link_html_redirect" target="_blank"
|
576 |
+
href="' . esc_url(home_url($rec->link_url_redirect)) . '"
|
577 |
+
>' . esc_html(str_replace(home_url(), '', $rec->link_url_redirect)) . '</a>';
|
578 |
+
}
|
579 |
}
|
580 |
} else {
|
581 |
echo '<a class="link_html" target="_blank"
|
inc/class.metaseo-image-list-table.php
CHANGED
@@ -1686,14 +1686,12 @@ class MetaSeoImageListTable extends WP_List_Table
|
|
1686 |
);
|
1687 |
$img_tags = $matches[0];
|
1688 |
if (isset($img_tags[$meta_order])) {
|
1689 |
-
$pattern = '/' . $meta_type . '\s*?\=?\"[^\"]*\"/i';
|
1690 |
// remove attr
|
1691 |
-
$img_tags[$meta_order]
|
1692 |
-
|
1693 |
-
|
1694 |
-
|
1695 |
-
);
|
1696 |
-
preg_match('/' . $meta_type . '="(.+?)"/', $img_tags[$meta_order], $matches);
|
1697 |
// update attr
|
1698 |
$img_tags[$meta_order] = preg_replace(
|
1699 |
'/(<img\b[^><]*)>/i',
|
@@ -1717,6 +1715,8 @@ class MetaSeoImageListTable extends WP_List_Table
|
|
1717 |
if (!wp_update_post(array('ID' => $post->ID, 'post_content' => $post_content))) {
|
1718 |
$response->msg = esc_html__('The post haven\'t been updated, please check again!', 'wp-meta-seo');
|
1719 |
} else {
|
|
|
|
|
1720 |
update_option('wpms_last_update_post', time());
|
1721 |
$response->updated = true;
|
1722 |
$response->msg = ucfirst($meta_type) . esc_html__(' was saved', 'wp-meta-seo');
|
1686 |
);
|
1687 |
$img_tags = $matches[0];
|
1688 |
if (isset($img_tags[$meta_order])) {
|
|
|
1689 |
// remove attr
|
1690 |
+
preg_match_all('/(alt)=("[^"]*")/i', $img_tags[$meta_order], $atts);
|
1691 |
+
if (isset($atts[0][0])) {
|
1692 |
+
$img_tags[$meta_order] = str_replace($atts[0][0], '', $img_tags[$meta_order]);
|
1693 |
+
}
|
1694 |
+
$img_tags[$meta_order] = preg_replace('/alt\s*=\s*(\'|").+(\'|")/i', '', $img_tags[$meta_order]);
|
|
|
1695 |
// update attr
|
1696 |
$img_tags[$meta_order] = preg_replace(
|
1697 |
'/(<img\b[^><]*)>/i',
|
1715 |
if (!wp_update_post(array('ID' => $post->ID, 'post_content' => $post_content))) {
|
1716 |
$response->msg = esc_html__('The post haven\'t been updated, please check again!', 'wp-meta-seo');
|
1717 |
} else {
|
1718 |
+
// compatible with elementor plugin (alt tag not display on frontend)
|
1719 |
+
delete_post_meta($post->ID, '_elementor_edit_mode');
|
1720 |
update_option('wpms_last_update_post', time());
|
1721 |
$response->updated = true;
|
1722 |
$response->msg = ucfirst($meta_type) . esc_html__(' was saved', 'wp-meta-seo');
|
js/wpms-broken-link.js
CHANGED
@@ -1,13 +1,5 @@
|
|
1 |
jQuery(document).ready(function ($) {
|
2 |
var broken_linkId = 0;
|
3 |
-
var correctedURL;
|
4 |
-
$('.wpms-link-url-field,.custom_redirect_url_redirect').on('keyup', function () {
|
5 |
-
var url = $.trim($(this).val());
|
6 |
-
if (url && correctedURL !== url && !/^(?:[a-z]+:|#|\?|\.|\/)/.test(url)) {
|
7 |
-
$(this).val('http://' + url);
|
8 |
-
correctedURL = url;
|
9 |
-
}
|
10 |
-
});
|
11 |
|
12 |
/*
|
13 |
* Scan all link in posts , pages and comments
|
@@ -250,7 +242,8 @@ jQuery(document).ready(function ($) {
|
|
250 |
if (res.status) {
|
251 |
$this.closest('td').find('.wpms-inline-editor-content').hide();
|
252 |
//if(res.type != '404_automaticaly'){
|
253 |
-
$this.closest('td').find('.link_html').html(
|
|
|
254 |
$this.closest('tr').find('.col_status').html(res.status_text);
|
255 |
|
256 |
var status = res.status_text;
|
1 |
jQuery(document).ready(function ($) {
|
2 |
var broken_linkId = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
/*
|
5 |
* Scan all link in posts , pages and comments
|
242 |
if (res.status) {
|
243 |
$this.closest('td').find('.wpms-inline-editor-content').hide();
|
244 |
//if(res.type != '404_automaticaly'){
|
245 |
+
$this.closest('td').find('.link_html').html(new_link).attr('href', new_link);
|
246 |
+
$this.closest('td').find('.link_html_redirect').html(link_redirect).attr('href', link_redirect);
|
247 |
$this.closest('tr').find('.col_status').html(res.status_text);
|
248 |
|
249 |
var status = res.status_text;
|
languages/wp-meta-seo-en_US.mo
CHANGED
Binary file
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: JoomUnited
|
3 |
Tags: google, webmaster tools, keywords, meta, meta description, meta keywords, meta title, robots meta, search engine optimization, seo, wordpress seo, yahoo, image optimization, image resize, custom post seo, redirect, redirection, 301, broken link
|
4 |
Requires at least: 4.0
|
5 |
-
Tested up to: 4.9.
|
6 |
-
Stable tag: 3.7.
|
7 |
Requires PHP: 5.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -174,12 +174,13 @@ The redirect manager will help you to fix all types of 404 errors you can encoun
|
|
174 |
* Google Ananlytics tracking and statistics display
|
175 |
|
176 |
= Main plugins from JoomUnited: =
|
177 |
-
|
178 |
-
*
|
179 |
-
*
|
180 |
-
*
|
181 |
-
*
|
182 |
-
*
|
|
|
183 |
|
184 |
|
185 |
= Support =
|
@@ -276,6 +277,10 @@ Yes WP Meta SEO is compatible with Gutenberg editor since 3.7 version.
|
|
276 |
|
277 |
== Changelog ==
|
278 |
|
|
|
|
|
|
|
|
|
279 |
= 3.7.3 =
|
280 |
* Fix : Enhance code readability and performance
|
281 |
|
2 |
Contributors: JoomUnited
|
3 |
Tags: google, webmaster tools, keywords, meta, meta description, meta keywords, meta title, robots meta, search engine optimization, seo, wordpress seo, yahoo, image optimization, image resize, custom post seo, redirect, redirection, 301, broken link
|
4 |
Requires at least: 4.0
|
5 |
+
Tested up to: 4.9.7
|
6 |
+
Stable tag: 3.7.4
|
7 |
Requires PHP: 5.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
174 |
* Google Ananlytics tracking and statistics display
|
175 |
|
176 |
= Main plugins from JoomUnited: =
|
177 |
+
|
178 |
+
* <a href="https://www.joomunited.com/wordpress-products/wp-media-folder" rel="friend">WP Media Folder:</a> Supercharge your media library with folders
|
179 |
+
* <a href="https://www.joomunited.com/wordpress-products/wp-file-download" rel="friend">WP File Download: </a> Best in class file and document manager
|
180 |
+
* <a href="https://www.joomunited.com/wordpress-products/wp-speed-of-light" rel="friend">WP Speed of Light: </a> Speedup your website in an easy way
|
181 |
+
* <a href="https://www.joomunited.com/wordpress-products/wp-latest-posts" rel="friend">WP Latest Posts: </a> Super flexible latest posts and content
|
182 |
+
* <a href="https://www.joomunited.com/wordpress-products/wp-table-manager" rel="friend"> WP Table Manager: </a> Create and manage tables with style
|
183 |
+
* <a href="https://www.joomunited.com/wordpress-products/advanced-gutenberg" rel="friend"> Advanced Gutenberg: </a> Light and efficient WP page builder
|
184 |
|
185 |
|
186 |
= Support =
|
277 |
|
278 |
== Changelog ==
|
279 |
|
280 |
+
= 3.7.4 =
|
281 |
+
* Fix : Update alt meta for Elementor image in content
|
282 |
+
* Fix : Redirect URL
|
283 |
+
|
284 |
= 3.7.3 =
|
285 |
* Fix : Enhance code readability and performance
|
286 |
|
wp-meta-seo.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin Name: WP Meta SEO
|
5 |
* Plugin URI: http://www.joomunited.com/wordpress-products/wp-meta-seo
|
6 |
* Description: WP Meta SEO is a plugin for WordPress to fill meta for content, images and main SEO info in a single view.
|
7 |
-
* Version: 3.7.
|
8 |
* Text Domain: wp-meta-seo
|
9 |
* Domain Path: /languages
|
10 |
* Author: JoomUnited
|
@@ -90,7 +90,7 @@ if (!defined('WPMSEO_VERSION')) {
|
|
90 |
/**
|
91 |
* Plugin version
|
92 |
*/
|
93 |
-
define('WPMSEO_VERSION', '3.7.
|
94 |
}
|
95 |
|
96 |
if (!defined('WPMS_CLIENTID')) {
|
@@ -639,13 +639,24 @@ function wpmsTemplateRedirect()
|
|
639 |
if (is_404()) {
|
640 |
if (isset($_SERVER['REQUEST_URI'])) {
|
641 |
$url = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
642 |
$check = $wpdb->get_results($wpdb->prepare(
|
643 |
-
'SELECT * FROM ' . $wpdb->prefix . 'wpms_links WHERE (link_url=%s OR link_url=%s)',
|
644 |
array(
|
645 |
$url,
|
646 |
-
esc_url
|
|
|
647 |
)
|
648 |
));
|
|
|
649 |
if (count($check) === 0) {
|
650 |
// insert url
|
651 |
$insert = array(
|
@@ -663,12 +674,14 @@ function wpmsTemplateRedirect()
|
|
663 |
} else {
|
664 |
// update url
|
665 |
$links_broken = $wpdb->get_row($wpdb->prepare(
|
666 |
-
'SELECT * FROM ' . $wpdb->prefix . 'wpms_links WHERE (link_url=%s OR link_url=%s) ',
|
667 |
array(
|
668 |
$url,
|
669 |
-
esc_url
|
|
|
670 |
)
|
671 |
));
|
|
|
672 |
if (!empty($links_broken)) {
|
673 |
$value = array('hit' => (int) $links_broken->hit + 1);
|
674 |
$wpdb->update(
|
@@ -766,15 +779,24 @@ function wpmsTemplateRedirect()
|
|
766 |
$target = '';
|
767 |
$status_redirect = 302;
|
768 |
foreach ($all_links as $link) {
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
777 |
}
|
|
|
778 |
}
|
779 |
}
|
780 |
|
4 |
* Plugin Name: WP Meta SEO
|
5 |
* Plugin URI: http://www.joomunited.com/wordpress-products/wp-meta-seo
|
6 |
* Description: WP Meta SEO is a plugin for WordPress to fill meta for content, images and main SEO info in a single view.
|
7 |
+
* Version: 3.7.4
|
8 |
* Text Domain: wp-meta-seo
|
9 |
* Domain Path: /languages
|
10 |
* Author: JoomUnited
|
90 |
/**
|
91 |
* Plugin version
|
92 |
*/
|
93 |
+
define('WPMSEO_VERSION', '3.7.4');
|
94 |
}
|
95 |
|
96 |
if (!defined('WPMS_CLIENTID')) {
|
639 |
if (is_404()) {
|
640 |
if (isset($_SERVER['REQUEST_URI'])) {
|
641 |
$url = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
642 |
+
if (isset($_SERVER['HTTPS']) &&
|
643 |
+
($_SERVER['HTTPS'] === 'on' || (int) $_SERVER['HTTPS'] === 1) ||
|
644 |
+
isset($_SERVER['HTTP_X_FORWARDED_PROTO']) &&
|
645 |
+
$_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
|
646 |
+
$protocol = 'https://';
|
647 |
+
} else {
|
648 |
+
$protocol = 'http://';
|
649 |
+
}
|
650 |
+
$esc_url = str_replace(array('http://', 'https://'), $protocol, esc_url($url));
|
651 |
$check = $wpdb->get_results($wpdb->prepare(
|
652 |
+
'SELECT * FROM ' . $wpdb->prefix . 'wpms_links WHERE (link_url=%s OR link_url=%s OR link_url=%s)',
|
653 |
array(
|
654 |
$url,
|
655 |
+
$esc_url,
|
656 |
+
$_SERVER['REQUEST_URI']
|
657 |
)
|
658 |
));
|
659 |
+
|
660 |
if (count($check) === 0) {
|
661 |
// insert url
|
662 |
$insert = array(
|
674 |
} else {
|
675 |
// update url
|
676 |
$links_broken = $wpdb->get_row($wpdb->prepare(
|
677 |
+
'SELECT * FROM ' . $wpdb->prefix . 'wpms_links WHERE (link_url=%s OR link_url=%s OR link_url=%s) ',
|
678 |
array(
|
679 |
$url,
|
680 |
+
$esc_url,
|
681 |
+
$_SERVER['REQUEST_URI']
|
682 |
)
|
683 |
));
|
684 |
+
|
685 |
if (!empty($links_broken)) {
|
686 |
$value = array('hit' => (int) $links_broken->hit + 1);
|
687 |
$wpdb->update(
|
779 |
$target = '';
|
780 |
$status_redirect = 302;
|
781 |
foreach ($all_links as $link) {
|
782 |
+
$link->link_url = str_replace('/*', '/(.*)', $link->link_url);
|
783 |
+
if ((preg_match('@' . str_replace('@', '\\@', $link->link_url) . '@', $url, $matches) > 0) || (preg_match('@' . str_replace('@', '\\@', $link->link_url) . '@', urldecode($url), $matches) > 0)) { // Check if our match wants this URL
|
784 |
+
$target = $link->link_url_redirect;
|
785 |
+
if ($link->type === 'add_custom') {
|
786 |
+
$status_redirect = $link->meta_title;
|
787 |
+
}
|
788 |
+
break;
|
789 |
+
}
|
790 |
+
|
791 |
+
if (home_url($url) === $link->link_url || home_url($url) === home_url($link->link_url)) {
|
792 |
+
$target = $link->link_url_redirect;
|
793 |
+
|
794 |
+
if ($link->type === 'add_custom') {
|
795 |
+
$status_redirect = $link->meta_title;
|
796 |
+
wp_redirect($target, $status_redirect);
|
797 |
+
exit();
|
798 |
}
|
799 |
+
break;
|
800 |
}
|
801 |
}
|
802 |
|