Version Description
- Php bug fix
=
Download this release
Release Info
Developer | kcseopro |
Plugin | WP SEO Structured Data Schema |
Version | 2.6.12 |
Comparing to | |
See all releases |
Code changes from version 2.6.11 to 2.6.12
- README.txt +4 -1
- languages/wp-seo-structured-data-schema.pot +15 -15
- lib/classes/KcSeoHelper.php +237 -219
- wp-seo-structured-data-schema.php +1 -1
README.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link:
|
|
4 |
Tags: seo, schema, structured data, rich snippets, microdata, json-ld, search engine optimization, local seo, google, sitelinks, schema.org, microformat, serp
|
5 |
Requires at least: 4.5
|
6 |
Tested up to: 5.3
|
7 |
-
Stable tag: 2.6.
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -114,6 +114,9 @@ You'll find the [FAQ on WPSEMPlugins.com](https://wpsemplugins.com/wordpress-seo
|
|
114 |
|
115 |
== Changelog ==
|
116 |
|
|
|
|
|
|
|
117 |
== 2.6.11 =
|
118 |
* Coding update
|
119 |
|
4 |
Tags: seo, schema, structured data, rich snippets, microdata, json-ld, search engine optimization, local seo, google, sitelinks, schema.org, microformat, serp
|
5 |
Requires at least: 4.5
|
6 |
Tested up to: 5.3
|
7 |
+
Stable tag: 2.6.12
|
8 |
License: GPLv3
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
114 |
|
115 |
== Changelog ==
|
116 |
|
117 |
+
== 2.6.12 =
|
118 |
+
* Php bug fix
|
119 |
+
|
120 |
== 2.6.11 =
|
121 |
* Coding update
|
122 |
|
languages/wp-seo-structured-data-schema.pot
CHANGED
@@ -13,63 +13,63 @@ msgstr ""
|
|
13 |
"X-Poedit-SourceCharset: UTF-8\n"
|
14 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
|
16 |
-
#: ../lib/classes/KcSeoHelper.php:
|
17 |
msgid "Pro Version Features"
|
18 |
msgstr ""
|
19 |
|
20 |
-
#: ../lib/classes/KcSeoHelper.php:
|
21 |
msgid "Includes Auto-fill function <---Popular"
|
22 |
msgstr ""
|
23 |
|
24 |
-
#: ../lib/classes/KcSeoHelper.php:
|
25 |
msgid "Supports Custom Post Types beyond default page and posts"
|
26 |
msgstr ""
|
27 |
|
28 |
-
#: ../lib/classes/KcSeoHelper.php:
|
29 |
msgid "Supports WordPress Multisite"
|
30 |
msgstr ""
|
31 |
|
32 |
-
#: ../lib/classes/KcSeoHelper.php:
|
33 |
msgid "Supports more schema types:"
|
34 |
msgstr ""
|
35 |
|
36 |
-
#: ../lib/classes/KcSeoHelper.php:
|
37 |
msgid "Books"
|
38 |
msgstr ""
|
39 |
|
40 |
-
#: ../lib/classes/KcSeoHelper.php:
|
41 |
msgid "Courses"
|
42 |
msgstr ""
|
43 |
|
44 |
-
#: ../lib/classes/KcSeoHelper.php:
|
45 |
msgid "Job Postings"
|
46 |
msgstr ""
|
47 |
|
48 |
-
#: ../lib/classes/KcSeoHelper.php:
|
49 |
msgid "Movies"
|
50 |
msgstr ""
|
51 |
|
52 |
-
#: ../lib/classes/KcSeoHelper.php:
|
53 |
msgid "Music"
|
54 |
msgstr ""
|
55 |
|
56 |
-
#: ../lib/classes/KcSeoHelper.php:
|
57 |
msgid "Recipe"
|
58 |
msgstr ""
|
59 |
|
60 |
-
#: ../lib/classes/KcSeoHelper.php:
|
61 |
msgid "TV Episode"
|
62 |
msgstr ""
|
63 |
|
64 |
-
#: ../lib/classes/KcSeoHelper.php:
|
65 |
msgid "QAPage"
|
66 |
msgstr ""
|
67 |
|
68 |
-
#: ../lib/classes/KcSeoHelper.php:
|
69 |
msgid "Item List"
|
70 |
msgstr ""
|
71 |
|
72 |
-
#: ../lib/classes/KcSeoHelper.php:
|
73 |
msgid "Get the Pro Version"
|
74 |
msgstr ""
|
75 |
|
13 |
"X-Poedit-SourceCharset: UTF-8\n"
|
14 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
|
16 |
+
#: ../lib/classes/KcSeoHelper.php:207
|
17 |
msgid "Pro Version Features"
|
18 |
msgstr ""
|
19 |
|
20 |
+
#: ../lib/classes/KcSeoHelper.php:209
|
21 |
msgid "Includes Auto-fill function <---Popular"
|
22 |
msgstr ""
|
23 |
|
24 |
+
#: ../lib/classes/KcSeoHelper.php:210
|
25 |
msgid "Supports Custom Post Types beyond default page and posts"
|
26 |
msgstr ""
|
27 |
|
28 |
+
#: ../lib/classes/KcSeoHelper.php:211
|
29 |
msgid "Supports WordPress Multisite"
|
30 |
msgstr ""
|
31 |
|
32 |
+
#: ../lib/classes/KcSeoHelper.php:212
|
33 |
msgid "Supports more schema types:"
|
34 |
msgstr ""
|
35 |
|
36 |
+
#: ../lib/classes/KcSeoHelper.php:214
|
37 |
msgid "Books"
|
38 |
msgstr ""
|
39 |
|
40 |
+
#: ../lib/classes/KcSeoHelper.php:215
|
41 |
msgid "Courses"
|
42 |
msgstr ""
|
43 |
|
44 |
+
#: ../lib/classes/KcSeoHelper.php:216
|
45 |
msgid "Job Postings"
|
46 |
msgstr ""
|
47 |
|
48 |
+
#: ../lib/classes/KcSeoHelper.php:217
|
49 |
msgid "Movies"
|
50 |
msgstr ""
|
51 |
|
52 |
+
#: ../lib/classes/KcSeoHelper.php:218, ../lib/functions/KcSeoOptions.php:995
|
53 |
msgid "Music"
|
54 |
msgstr ""
|
55 |
|
56 |
+
#: ../lib/classes/KcSeoHelper.php:219, ../lib/functions/KcSeoOptions.php:999
|
57 |
msgid "Recipe"
|
58 |
msgstr ""
|
59 |
|
60 |
+
#: ../lib/classes/KcSeoHelper.php:220
|
61 |
msgid "TV Episode"
|
62 |
msgstr ""
|
63 |
|
64 |
+
#: ../lib/classes/KcSeoHelper.php:221, ../lib/functions/KcSeoOptions.php:1007
|
65 |
msgid "QAPage"
|
66 |
msgstr ""
|
67 |
|
68 |
+
#: ../lib/classes/KcSeoHelper.php:222, ../lib/functions/KcSeoOptions.php:1011
|
69 |
msgid "Item List"
|
70 |
msgstr ""
|
71 |
|
72 |
+
#: ../lib/classes/KcSeoHelper.php:228
|
73 |
msgid "Get the Pro Version"
|
74 |
msgstr ""
|
75 |
|
lib/classes/KcSeoHelper.php
CHANGED
@@ -1,245 +1,263 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
if (
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
SELECT posts.ID FROM {$wpdb->prefix}posts as posts
|
133 |
WHERE posts.post_type = 'post'
|
134 |
AND EXISTS (
|
135 |
SELECT * FROM `{$wpdb->prefix}postmeta` as postmeta
|
136 |
WHERE postmeta.`meta_key` LIKE '_schema_%'
|
137 |
AND postmeta.`post_id`=posts.ID
|
138 |
-
)"
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
SELECT posts.ID FROM {$wpdb->prefix}posts as posts
|
146 |
WHERE posts.post_type = 'page'
|
147 |
AND EXISTS (
|
148 |
SELECT * FROM `{$wpdb->prefix}postmeta` as postmeta
|
149 |
WHERE postmeta.`meta_key` LIKE '_schema_%'
|
150 |
AND postmeta.`post_id`=posts.ID
|
151 |
-
)"
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
<div class='kc-get-pro'>
|
189 |
-
<h3><?php _e(
|
190 |
<ol>
|
191 |
-
<li><?php _e(
|
192 |
-
<li><?php _e(
|
193 |
-
<li><?php _e(
|
194 |
-
<li><?php _e(
|
195 |
<ol>
|
196 |
-
<li><?php _e(
|
197 |
-
<li><?php _e(
|
198 |
-
<li><?php _e(
|
199 |
-
<li><?php _e(
|
200 |
-
<li><?php _e(
|
201 |
-
<li><?php _e(
|
202 |
-
<li><?php _e(
|
203 |
-
<li><?php _e(
|
204 |
-
<li><?php _e(
|
205 |
</ol>
|
206 |
</li>
|
207 |
</ol>
|
208 |
<div class="kc-pro-action"><a class='button button-primary'
|
209 |
href='https://wpsemplugins.com/downloads/wordpress-schema-plugin/'
|
210 |
-
target='_blank'><?php _e(
|
211 |
</div>
|
212 |
</div>
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
|
245 |
endif;
|
1 |
<?php
|
2 |
|
3 |
+
if (!class_exists('KcSeoSettings')):
|
4 |
+
|
5 |
+
class KcSeoHelper
|
6 |
+
{
|
7 |
+
function verifyNonce() {
|
8 |
+
$nonce = !empty($_REQUEST['_kcseo_nonce']) ? $_REQUEST['_kcseo_nonce'] : null;
|
9 |
+
if (!wp_verify_nonce($nonce, $this->nonceText())) {
|
10 |
+
return false;
|
11 |
+
}
|
12 |
+
|
13 |
+
return true;
|
14 |
+
}
|
15 |
+
|
16 |
+
function nonceText() {
|
17 |
+
return "kcseo_nonce_secret_text";
|
18 |
+
}
|
19 |
+
|
20 |
+
|
21 |
+
function isValidBase64($string = null) {
|
22 |
+
$decoded = @base64_decode($string, true);
|
23 |
+
// Check if there is no invalid character in string
|
24 |
+
if (!@preg_match('/^[a-zA-Z0-9\/\r\n+]*={0,2}$/', $string)) {
|
25 |
+
return false;
|
26 |
+
}
|
27 |
+
|
28 |
+
// Decode the string in strict mode and send the response
|
29 |
+
if (!@base64_decode($string, true)) {
|
30 |
+
return false;
|
31 |
+
}
|
32 |
+
|
33 |
+
// Encode and compare it to original one
|
34 |
+
if (@base64_encode($decoded) != $string) {
|
35 |
+
return false;
|
36 |
+
}
|
37 |
+
|
38 |
+
return true;
|
39 |
+
}
|
40 |
+
|
41 |
+
function get_post_type_list() {
|
42 |
+
$post_types = get_post_types(
|
43 |
+
array(
|
44 |
+
'public' => true
|
45 |
+
)
|
46 |
+
);
|
47 |
+
$exclude = array('attachment', 'revision', 'nav_menu_item');
|
48 |
+
foreach ($exclude as $ex) {
|
49 |
+
unset($post_types[$ex]);
|
50 |
+
}
|
51 |
+
|
52 |
+
return $post_types;
|
53 |
+
}
|
54 |
+
|
55 |
+
function kcSeoPostTypes() {
|
56 |
+
$post_types = get_post_types(
|
57 |
+
array(
|
58 |
+
'_builtin' => true
|
59 |
+
)
|
60 |
+
);
|
61 |
+
$exclude = array('attachment', 'revision', 'nav_menu_item');
|
62 |
+
foreach ($exclude as $ex) {
|
63 |
+
unset($post_types[$ex]);
|
64 |
+
}
|
65 |
+
|
66 |
+
return $post_types;
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Sanitize field value
|
71 |
+
*
|
72 |
+
* @param array $field
|
73 |
+
* @param null $value
|
74 |
+
*
|
75 |
+
* @return array|null
|
76 |
+
* @internal param $value
|
77 |
+
*/
|
78 |
+
function sanitize($field = array(), $value = null) {
|
79 |
+
$newValue = null;
|
80 |
+
if (is_array($field) && $value) {
|
81 |
+
$type = (!empty($field['type']) ? $field['type'] : 'text');
|
82 |
+
if ($type == 'text' || $type == 'number' || $type == 'select' || $type == 'checkbox' || $type == 'radio') {
|
83 |
+
$newValue = sanitize_text_field($value);
|
84 |
+
} else if ($type == 'url') {
|
85 |
+
$newValue = esc_url($value);
|
86 |
+
} else if ($type == 'textarea') {
|
87 |
+
$newValue = wp_kses($value, array());
|
88 |
+
} else {
|
89 |
+
$newValue = sanitize_text_field($value);
|
90 |
+
}
|
91 |
+
}
|
92 |
+
|
93 |
+
return $newValue;
|
94 |
+
}
|
95 |
+
|
96 |
+
|
97 |
+
function sanitizeOutPut($value, $type = 'text') {
|
98 |
+
$newValue = null;
|
99 |
+
if ($value) {
|
100 |
+
if ($type == 'text') {
|
101 |
+
$newValue = esc_html(stripslashes($value));
|
102 |
+
} elseif ($type == 'url') {
|
103 |
+
$newValue = esc_url(stripslashes($value));
|
104 |
+
} elseif ($type == 'textarea') {
|
105 |
+
$newValue = esc_textarea(stripslashes($value));
|
106 |
+
} else {
|
107 |
+
$newValue = esc_html(stripslashes($value));
|
108 |
+
}
|
109 |
+
}
|
110 |
+
|
111 |
+
return $newValue;
|
112 |
+
}
|
113 |
+
|
114 |
+
static function get_same_as($value) {
|
115 |
+
$sameAs = null;
|
116 |
+
if ($value) {
|
117 |
+
$sameAsRaw = preg_split('/\r\n|\r|\n/', $value);
|
118 |
+
$sameAsRaw = !empty($sameAsRaw) ? array_filter($sameAsRaw) : array();
|
119 |
+
if (!empty($sameAsRaw) && is_array($sameAsRaw)) {
|
120 |
+
if (1 < count($sameAsRaw)) {
|
121 |
+
$sameAs = $sameAsRaw;
|
122 |
+
} else {
|
123 |
+
$sameAs = $sameAsRaw[0];
|
124 |
+
}
|
125 |
+
}
|
126 |
+
}
|
127 |
+
|
128 |
+
return $sameAs;
|
129 |
+
}
|
130 |
+
|
131 |
+
|
132 |
+
function imageInfo($attachment_id) {
|
133 |
+
$data = array();
|
134 |
+
$imgData = wp_get_attachment_metadata($attachment_id);
|
135 |
+
$data['url'] = wp_get_attachment_url($attachment_id, "full");
|
136 |
+
$data['width'] = !empty($imgData['width']) ? absint($imgData['width']) : 0;
|
137 |
+
$data['height'] = !empty($imgData['height']) ? absint($imgData['height']) : 0;
|
138 |
+
|
139 |
+
return $data;
|
140 |
+
}
|
141 |
+
|
142 |
+
function fix1_2DataMigration() {
|
143 |
+
global $KcSeoWPSchema;
|
144 |
+
$fix_1_2 = get_option($KcSeoWPSchema->options['1_2_fix']);
|
145 |
+
$installed_version = get_option($KcSeoWPSchema->options['installed_version']);
|
146 |
+
if (empty($fix_1_2) && empty($installed_version)) {
|
147 |
+
global $wpdb;
|
148 |
+
$ids = array();
|
149 |
+
$posts = $wpdb->get_results("
|
150 |
SELECT posts.ID FROM {$wpdb->prefix}posts as posts
|
151 |
WHERE posts.post_type = 'post'
|
152 |
AND EXISTS (
|
153 |
SELECT * FROM `{$wpdb->prefix}postmeta` as postmeta
|
154 |
WHERE postmeta.`meta_key` LIKE '_schema_%'
|
155 |
AND postmeta.`post_id`=posts.ID
|
156 |
+
)");
|
157 |
+
if ($posts) {
|
158 |
+
foreach ($posts as $id) {
|
159 |
+
$ids[] = $id->ID;
|
160 |
+
}
|
161 |
+
}
|
162 |
+
$pages = $wpdb->get_results("
|
163 |
SELECT posts.ID FROM {$wpdb->prefix}posts as posts
|
164 |
WHERE posts.post_type = 'page'
|
165 |
AND EXISTS (
|
166 |
SELECT * FROM `{$wpdb->prefix}postmeta` as postmeta
|
167 |
WHERE postmeta.`meta_key` LIKE '_schema_%'
|
168 |
AND postmeta.`post_id`=posts.ID
|
169 |
+
)");
|
170 |
+
if ($pages) {
|
171 |
+
foreach ($pages as $id) {
|
172 |
+
$ids[] = $id->ID;
|
173 |
+
}
|
174 |
+
}
|
175 |
+
|
176 |
+
|
177 |
+
if (!empty($ids)) {
|
178 |
+
$schemaFields = KcSeoOptions::getSchemaTypes();
|
179 |
+
foreach ($ids as $id) {
|
180 |
+
foreach ($schemaFields as $schemaID => $schema) {
|
181 |
+
$schemaMetaId = $KcSeoWPSchema->KcSeoPrefix . $schemaID;
|
182 |
+
$getRawMeta = get_post_meta($id, $schemaMetaId, true);
|
183 |
+
$metaData = array();
|
184 |
+
if (!empty($getRawMeta)) {
|
185 |
+
if ($KcSeoWPSchema->isValidBase64($getRawMeta)) {
|
186 |
+
$metaData = @unserialize(base64_decode($getRawMeta));
|
187 |
+
} else {
|
188 |
+
$metaData = @unserialize($getRawMeta);
|
189 |
+
}
|
190 |
+
}
|
191 |
+
$metaData = (!empty($metaData) ? $metaData : array());
|
192 |
+
if (!empty($metaData) && is_array($metaData)) {
|
193 |
+
$metaData['active'] = true;
|
194 |
+
update_post_meta($id, $schemaMetaId, $metaData);
|
195 |
+
}
|
196 |
+
}
|
197 |
+
}
|
198 |
+
}
|
199 |
+
|
200 |
+
update_option($KcSeoWPSchema->options['1_2_fix'], true);
|
201 |
+
}
|
202 |
+
}
|
203 |
+
|
204 |
+
function advertisingBlock() {
|
205 |
+
?>
|
206 |
<div class='kc-get-pro'>
|
207 |
+
<h3><?php _e("Pro Version Features", "wp-seo-structured-data-schema") ?></h3>
|
208 |
<ol>
|
209 |
+
<li><?php _e("Includes Auto-fill function <---Popular", "wp-seo-structured-data-schema") ?></li>
|
210 |
+
<li><?php _e("Supports Custom Post Types beyond default page and posts", "wp-seo-structured-data-schema") ?></li>
|
211 |
+
<li><?php _e("Supports WordPress Multisite", "wp-seo-structured-data-schema") ?></li>
|
212 |
+
<li><?php _e("Supports more schema types:", "wp-seo-structured-data-schema") ?>
|
213 |
<ol>
|
214 |
+
<li><?php _e("Books", "wp-seo-structured-data-schema") ?></li>
|
215 |
+
<li><?php _e("Courses", "wp-seo-structured-data-schema") ?></li>
|
216 |
+
<li><?php _e("Job Postings", "wp-seo-structured-data-schema") ?></li>
|
217 |
+
<li><?php _e("Movies", "wp-seo-structured-data-schema") ?></li>
|
218 |
+
<li><?php _e("Music", "wp-seo-structured-data-schema") ?></li>
|
219 |
+
<li><?php _e("Recipe", "wp-seo-structured-data-schema") ?></li>
|
220 |
+
<li><?php _e("TV Episode", "wp-seo-structured-data-schema") ?></li>
|
221 |
+
<li><?php _e("QAPage", "wp-seo-structured-data-schema") ?></li>
|
222 |
+
<li><?php _e("Item List", "wp-seo-structured-data-schema") ?></li>
|
223 |
</ol>
|
224 |
</li>
|
225 |
</ol>
|
226 |
<div class="kc-pro-action"><a class='button button-primary'
|
227 |
href='https://wpsemplugins.com/downloads/wordpress-schema-plugin/'
|
228 |
+
target='_blank'><?php _e("Get the Pro Version", "wp-seo-structured-data-schema") ?></a>
|
229 |
</div>
|
230 |
</div>
|
231 |
+
<?php
|
232 |
+
}
|
233 |
+
|
234 |
+
function fix2_5_7_to_2_5_8() {
|
235 |
+
global $KcSeoWPSchema;
|
236 |
+
$installed_version = get_option($KcSeoWPSchema->options['installed_version']);
|
237 |
+
if (version_compare($installed_version, '2.5.7', '<=')) {
|
238 |
+
$settings = get_option($KcSeoWPSchema->options['settings']);
|
239 |
+
if (isset($settings['contact']['contactType'])) {
|
240 |
+
$settings['contact']['contactType'] = strtolower($settings['contact']['contactType']);
|
241 |
+
update_option($KcSeoWPSchema->options['settings'], $settings);
|
242 |
+
}
|
243 |
+
if (isset($settings['area_served']) && !empty($settings['area_served'])) {
|
244 |
+
|
245 |
+
$cList = KcSeoOptions::getCountryList();
|
246 |
+
$areas = array();
|
247 |
+
foreach ($settings['area_served'] as $area) {
|
248 |
+
$key = array_search($area, $cList);
|
249 |
+
if ($key) {
|
250 |
+
$areas[] = $key;
|
251 |
+
}
|
252 |
+
}
|
253 |
+
if (!empty($areas)) {
|
254 |
+
$settings['area_served'] = $areas;
|
255 |
+
update_option($KcSeoWPSchema->options['settings'], $settings);
|
256 |
+
}
|
257 |
+
}
|
258 |
+
|
259 |
+
}
|
260 |
+
}
|
261 |
+
}
|
262 |
|
263 |
endif;
|
wp-seo-structured-data-schema.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: WP SEO Structured Data Schema
|
4 |
* Plugin URI: https://wpsemplugins.com/
|
5 |
* Description: Comprehensive JSON-LD based Structured Data solution for WordPress for adding schema for organizations, businesses, blog posts, ratings & more.
|
6 |
-
* Version: 2.6.
|
7 |
* Author: WPSEMPlugins
|
8 |
* Author URI: https://wpsemplugins.com/
|
9 |
* Text Domain: wp-seo-structured-data-schema
|
3 |
* Plugin Name: WP SEO Structured Data Schema
|
4 |
* Plugin URI: https://wpsemplugins.com/
|
5 |
* Description: Comprehensive JSON-LD based Structured Data solution for WordPress for adding schema for organizations, businesses, blog posts, ratings & more.
|
6 |
+
* Version: 2.6.12
|
7 |
* Author: WPSEMPlugins
|
8 |
* Author URI: https://wpsemplugins.com/
|
9 |
* Text Domain: wp-seo-structured-data-schema
|