Version Description
- fixed WordPress 5.5 conflict (props to @seserss)
Download this release
Release Info
Developer | netweblogic |
Plugin | Meta Tag Manager |
Version | 2.1.2 |
Comparing to | |
See all releases |
Code changes from version 2.1.1 to 2.1.2
- meta-tag-manager.php +26 -4
- mtm-builder.php +1 -1
- readme.txt +5 -2
meta-tag-manager.php
CHANGED
@@ -4,12 +4,12 @@ Plugin Name: Meta Tag Manager
|
|
4 |
Plugin URI: https://wordpress.org/plugins/meta-tag-manager/
|
5 |
Description: A simple plugin to manage meta tags that appear on aread of your site or individual posts. This can be used for verifiying google, yahoo, and more.
|
6 |
Author: Marcus Sykes
|
7 |
-
Version: 2.1
|
8 |
Author URI: http://msyk.es/?utm_source=meta-tag-manager&utm_medium=plugin-header&utm_campaign=plugins
|
9 |
Text Domain: meta-tag-manager
|
10 |
*/
|
11 |
/*
|
12 |
-
Copyright (C)
|
13 |
|
14 |
This program is free software; you can redistribute it and/or modify
|
15 |
it under the terms of the GNU General Public License as published by
|
@@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
26 |
*/
|
27 |
if( !defined('ABSPATH') ) exit;
|
28 |
|
29 |
-
define('MTM_VERSION', '2.1');
|
30 |
|
31 |
class Meta_Tag_Manager {
|
32 |
/** loads the plugin */
|
@@ -76,7 +76,29 @@ class Meta_Tag_Manager {
|
|
76 |
if( is_single() || is_page() ){
|
77 |
$mtm_custom = get_option('mtm_custom');
|
78 |
if( !empty($mtm_custom['post-types']) && in_array(get_post_type(), $mtm_custom['post-types']) ){
|
79 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
}
|
81 |
}
|
82 |
//output the filtered out tags that pass validation
|
4 |
Plugin URI: https://wordpress.org/plugins/meta-tag-manager/
|
5 |
Description: A simple plugin to manage meta tags that appear on aread of your site or individual posts. This can be used for verifiying google, yahoo, and more.
|
6 |
Author: Marcus Sykes
|
7 |
+
Version: 2.1.2
|
8 |
Author URI: http://msyk.es/?utm_source=meta-tag-manager&utm_medium=plugin-header&utm_campaign=plugins
|
9 |
Text Domain: meta-tag-manager
|
10 |
*/
|
11 |
/*
|
12 |
+
Copyright (C) 2020 Marcus Sykes
|
13 |
|
14 |
This program is free software; you can redistribute it and/or modify
|
15 |
it under the terms of the GNU General Public License as published by
|
26 |
*/
|
27 |
if( !defined('ABSPATH') ) exit;
|
28 |
|
29 |
+
define('MTM_VERSION', '2.1.2');
|
30 |
|
31 |
class Meta_Tag_Manager {
|
32 |
/** loads the plugin */
|
76 |
if( is_single() || is_page() ){
|
77 |
$mtm_custom = get_option('mtm_custom');
|
78 |
if( !empty($mtm_custom['post-types']) && in_array(get_post_type(), $mtm_custom['post-types']) ){
|
79 |
+
$post_meta_tags = self::get_post_data();
|
80 |
+
//remove unique meta tags from being output within MTM (not other plugins), where specific tags take precendence
|
81 |
+
$unique_types = apply_filters('mtm_unique_meta_name_values', array('description', 'keywords'));
|
82 |
+
$meta_tags_unique_name_values = array();
|
83 |
+
foreach( $unique_types as $name_value ){
|
84 |
+
foreach( $meta_tags as $k => $tag ){ /* @var MTM_Tag $tag */
|
85 |
+
if( $tag->type == 'name' && $tag->value == $name_value ){
|
86 |
+
if( !empty($meta_tags_unique_name_values[$name_value]) ){
|
87 |
+
//remove first one, last one takes precendence
|
88 |
+
unset($meta_tags[$meta_tags_unique_name_values[$name_value]]);
|
89 |
+
}
|
90 |
+
$meta_tags_unique_name_values[$name_value] = $k;
|
91 |
+
}
|
92 |
+
}
|
93 |
+
if( !empty($meta_tags_unique_name_values) ){
|
94 |
+
foreach( $post_meta_tags as $k => $tag ){
|
95 |
+
if( $tag->type == 'name' && $tag->value == $name_value && !empty($meta_tags_unique_name_values[$name_value]) ){
|
96 |
+
unset($meta_tags[$meta_tags_unique_name_values[$name_value]]);
|
97 |
+
}
|
98 |
+
}
|
99 |
+
}
|
100 |
+
}
|
101 |
+
$meta_tags = array_merge($meta_tags, $post_meta_tags);
|
102 |
}
|
103 |
}
|
104 |
//output the filtered out tags that pass validation
|
mtm-builder.php
CHANGED
@@ -211,7 +211,7 @@ class MTM_Builder {
|
|
211 |
}else{
|
212 |
//single option, output value no key
|
213 |
if( is_numeric($key) ){
|
214 |
-
$html .= '<option'.$selected_attr.'>'.esc_html($option).'</option>';
|
215 |
}else{
|
216 |
$html .= '<option value="'.esc_attr($option).'"'.$selected_attr.'>'.esc_html($key).'</option>';
|
217 |
}
|
211 |
}else{
|
212 |
//single option, output value no key
|
213 |
if( is_numeric($key) ){
|
214 |
+
$html .= '<option value="'.esc_attr($option).'"'.$selected_attr.'>'.esc_html($option).'</option>';
|
215 |
}else{
|
216 |
$html .= '<option value="'.esc_attr($option).'"'.$selected_attr.'>'.esc_html($key).'</option>';
|
217 |
}
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: netweblogic
|
|
3 |
Tags: google, SEO, yahoo, tags, webmaster tools, meta, meta tags, ogp, open graph, twitter cards
|
4 |
Text Domain: meta-tag-manager
|
5 |
Requires at least: 3.6
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 2.1.
|
8 |
|
9 |
Easily add and manage custom meta tags to various parts of your site or on individual posts, such as Yahoo and Google verification tags.
|
10 |
|
@@ -69,6 +69,9 @@ Please visit our <a href="https://wordpress.org/support/plugin/meta-tag-manager"
|
|
69 |
3. If enabled you can add meta tags to a specific post in it's own meta box
|
70 |
|
71 |
== Changelog ==
|
|
|
|
|
|
|
72 |
= 2.1.1 =
|
73 |
* fixed tags not getting deleted from CPT pages
|
74 |
* fixed attachments not saving meta information
|
3 |
Tags: google, SEO, yahoo, tags, webmaster tools, meta, meta tags, ogp, open graph, twitter cards
|
4 |
Text Domain: meta-tag-manager
|
5 |
Requires at least: 3.6
|
6 |
+
Tested up to: 5.6
|
7 |
+
Stable tag: 2.1.2
|
8 |
|
9 |
Easily add and manage custom meta tags to various parts of your site or on individual posts, such as Yahoo and Google verification tags.
|
10 |
|
69 |
3. If enabled you can add meta tags to a specific post in it's own meta box
|
70 |
|
71 |
== Changelog ==
|
72 |
+
= 2.1.2 =
|
73 |
+
* fixed WordPress 5.5 conflict (props to @seserss)
|
74 |
+
|
75 |
= 2.1.1 =
|
76 |
* fixed tags not getting deleted from CPT pages
|
77 |
* fixed attachments not saving meta information
|