WP SEO Structured Data Schema - Version 2.6.12

Version Description

  • Php bug fix

=

Download this release

Release Info

Developer kcseopro
Plugin Icon 128x128 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 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.11
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:189
17
  msgid "Pro Version Features"
18
  msgstr ""
19
 
20
- #: ../lib/classes/KcSeoHelper.php:191
21
  msgid "Includes Auto-fill function <---Popular"
22
  msgstr ""
23
 
24
- #: ../lib/classes/KcSeoHelper.php:192
25
  msgid "Supports Custom Post Types beyond default page and posts"
26
  msgstr ""
27
 
28
- #: ../lib/classes/KcSeoHelper.php:193
29
  msgid "Supports WordPress Multisite"
30
  msgstr ""
31
 
32
- #: ../lib/classes/KcSeoHelper.php:194
33
  msgid "Supports more schema types:"
34
  msgstr ""
35
 
36
- #: ../lib/classes/KcSeoHelper.php:196
37
  msgid "Books"
38
  msgstr ""
39
 
40
- #: ../lib/classes/KcSeoHelper.php:197
41
  msgid "Courses"
42
  msgstr ""
43
 
44
- #: ../lib/classes/KcSeoHelper.php:198
45
  msgid "Job Postings"
46
  msgstr ""
47
 
48
- #: ../lib/classes/KcSeoHelper.php:199
49
  msgid "Movies"
50
  msgstr ""
51
 
52
- #: ../lib/classes/KcSeoHelper.php:200, ../lib/functions/KcSeoOptions.php:995
53
  msgid "Music"
54
  msgstr ""
55
 
56
- #: ../lib/classes/KcSeoHelper.php:201, ../lib/functions/KcSeoOptions.php:999
57
  msgid "Recipe"
58
  msgstr ""
59
 
60
- #: ../lib/classes/KcSeoHelper.php:202
61
  msgid "TV Episode"
62
  msgstr ""
63
 
64
- #: ../lib/classes/KcSeoHelper.php:203, ../lib/functions/KcSeoOptions.php:1007
65
  msgid "QAPage"
66
  msgstr ""
67
 
68
- #: ../lib/classes/KcSeoHelper.php:204, ../lib/functions/KcSeoOptions.php:1011
69
  msgid "Item List"
70
  msgstr ""
71
 
72
- #: ../lib/classes/KcSeoHelper.php:210
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 ( ! class_exists( 'KcSeoSettings' ) ):
4
-
5
- class KcSeoHelper {
6
- function verifyNonce() {
7
- $nonce = ! empty( $_REQUEST['_kcseo_nonce'] ) ? $_REQUEST['_kcseo_nonce'] : null;
8
- if ( ! wp_verify_nonce( $nonce, $this->nonceText() ) ) {
9
- return false;
10
- }
11
-
12
- return true;
13
- }
14
-
15
- function nonceText() {
16
- return "kcseo_nonce_secret_text";
17
- }
18
-
19
-
20
- function isValidBase64( $string = null ) {
21
- $decoded = @base64_decode( $string, true );
22
- // Check if there is no invalid character in string
23
- if ( ! @preg_match( '/^[a-zA-Z0-9\/\r\n+]*={0,2}$/', $string ) ) {
24
- return false;
25
- }
26
-
27
- // Decode the string in strict mode and send the response
28
- if ( ! @base64_decode( $string, true ) ) {
29
- return false;
30
- }
31
-
32
- // Encode and compare it to original one
33
- if ( @base64_encode( $decoded ) != $string ) {
34
- return false;
35
- }
36
-
37
- return true;
38
- }
39
-
40
- function get_post_type_list() {
41
- $post_types = get_post_types(
42
- array(
43
- 'public' => true
44
- )
45
- );
46
- $exclude = array( 'attachment', 'revision', 'nav_menu_item' );
47
- foreach ( $exclude as $ex ) {
48
- unset( $post_types[ $ex ] );
49
- }
50
-
51
- return $post_types;
52
- }
53
-
54
- function kcSeoPostTypes() {
55
- $post_types = get_post_types(
56
- array(
57
- '_builtin' => true
58
- )
59
- );
60
- $exclude = array( 'attachment', 'revision', 'nav_menu_item' );
61
- foreach ( $exclude as $ex ) {
62
- unset( $post_types[ $ex ] );
63
- }
64
-
65
- return $post_types;
66
- }
67
-
68
- /**
69
- * Sanitize field value
70
- *
71
- * @param array $field
72
- * @param null $value
73
- *
74
- * @return array|null
75
- * @internal param $value
76
- */
77
- function sanitize( $field = array(), $value = null ) {
78
- $newValue = null;
79
- if ( is_array( $field ) && $value ) {
80
- $type = ( ! empty( $field['type'] ) ? $field['type'] : 'text' );
81
- if ( $type == 'text' || $type == 'number' || $type == 'select' || $type == 'checkbox' || $type == 'radio' ) {
82
- $newValue = sanitize_text_field( $value );
83
- } else if ( $type == 'url' ) {
84
- $newValue = esc_url( $value );
85
- } else if ( $type == 'textarea' ) {
86
- $newValue = wp_kses( $value, array() );
87
- } else {
88
- $newValue = sanitize_text_field( $value );
89
- }
90
- }
91
-
92
- return $newValue;
93
- }
94
-
95
-
96
- function sanitizeOutPut( $value, $type = 'text' ) {
97
- $newValue = null;
98
- if ( $value ) {
99
- if ( $type == 'text' ) {
100
- $newValue = esc_html( stripslashes( $value ) );
101
- } elseif ( $type == 'url' ) {
102
- $newValue = esc_url( stripslashes( $value ) );
103
- } elseif ( $type == 'textarea' ) {
104
- $newValue = esc_textarea( stripslashes( $value ) );
105
- } else {
106
- $newValue = esc_html( stripslashes( $value ) );
107
- }
108
- }
109
-
110
- return $newValue;
111
- }
112
-
113
-
114
- function imageInfo( $attachment_id ) {
115
- $data = array();
116
- $imgData = wp_get_attachment_metadata( $attachment_id );
117
- $data['url'] = wp_get_attachment_url( $attachment_id, "full" );
118
- $data['width'] = ! empty( $imgData['width'] ) ? absint( $imgData['width'] ) : 0;
119
- $data['height'] = ! empty( $imgData['height'] ) ? absint( $imgData['height'] ) : 0;
120
-
121
- return $data;
122
- }
123
-
124
- function fix1_2DataMigration() {
125
- global $KcSeoWPSchema;
126
- $fix_1_2 = get_option( $KcSeoWPSchema->options['1_2_fix'] );
127
- $installed_version = get_option( $KcSeoWPSchema->options['installed_version'] );
128
- if ( empty( $fix_1_2 ) && empty( $installed_version ) ) {
129
- global $wpdb;
130
- $ids = array();
131
- $posts = $wpdb->get_results( "
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
- if ( $posts ) {
140
- foreach ( $posts as $id ) {
141
- $ids[] = $id->ID;
142
- }
143
- }
144
- $pages = $wpdb->get_results( "
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
- if ( $pages ) {
153
- foreach ( $pages as $id ) {
154
- $ids[] = $id->ID;
155
- }
156
- }
157
-
158
-
159
- if ( ! empty( $ids ) ) {
160
- $schemaFields = KcSeoOptions::getSchemaTypes();
161
- foreach ( $ids as $id ) {
162
- foreach ( $schemaFields as $schemaID => $schema ) {
163
- $schemaMetaId = $KcSeoWPSchema->KcSeoPrefix . $schemaID;
164
- $getRawMeta = get_post_meta( $id, $schemaMetaId, true );
165
- $metaData = array();
166
- if ( ! empty( $getRawMeta ) ) {
167
- if ( $KcSeoWPSchema->isValidBase64( $getRawMeta ) ) {
168
- $metaData = @unserialize( base64_decode( $getRawMeta ) );
169
- } else {
170
- $metaData = @unserialize( $getRawMeta );
171
- }
172
- }
173
- $metaData = ( ! empty( $metaData ) ? $metaData : array() );
174
- if ( ! empty( $metaData ) && is_array( $metaData ) ) {
175
- $metaData['active'] = true;
176
- update_post_meta( $id, $schemaMetaId, $metaData );
177
- }
178
- }
179
- }
180
- }
181
-
182
- update_option( $KcSeoWPSchema->options['1_2_fix'], true );
183
- }
184
- }
185
-
186
- function advertisingBlock() {
187
- ?>
188
  <div class='kc-get-pro'>
189
- <h3><?php _e( "Pro Version Features", "wp-seo-structured-data-schema" ) ?></h3>
190
  <ol>
191
- <li><?php _e( "Includes Auto-fill function <---Popular", "wp-seo-structured-data-schema" ) ?></li>
192
- <li><?php _e( "Supports Custom Post Types beyond default page and posts", "wp-seo-structured-data-schema" ) ?></li>
193
- <li><?php _e( "Supports WordPress Multisite", "wp-seo-structured-data-schema" ) ?></li>
194
- <li><?php _e( "Supports more schema types:", "wp-seo-structured-data-schema" ) ?>
195
  <ol>
196
- <li><?php _e( "Books", "wp-seo-structured-data-schema" ) ?></li>
197
- <li><?php _e( "Courses", "wp-seo-structured-data-schema" ) ?></li>
198
- <li><?php _e( "Job Postings", "wp-seo-structured-data-schema" ) ?></li>
199
- <li><?php _e( "Movies", "wp-seo-structured-data-schema" ) ?></li>
200
- <li><?php _e( "Music", "wp-seo-structured-data-schema" ) ?></li>
201
- <li><?php _e( "Recipe", "wp-seo-structured-data-schema" ) ?></li>
202
- <li><?php _e( "TV Episode", "wp-seo-structured-data-schema" ) ?></li>
203
- <li><?php _e( "QAPage", "wp-seo-structured-data-schema" ) ?></li>
204
- <li><?php _e( "Item List", "wp-seo-structured-data-schema" ) ?></li>
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( "Get the Pro Version", "wp-seo-structured-data-schema" ) ?></a>
211
  </div>
212
  </div>
213
- <?php
214
- }
215
-
216
- function fix2_5_7_to_2_5_8() {
217
- global $KcSeoWPSchema;
218
- $installed_version = get_option( $KcSeoWPSchema->options['installed_version'] );
219
- if ( version_compare( $installed_version, '2.5.7', '<=' ) ) {
220
- $settings = get_option( $KcSeoWPSchema->options['settings'] );
221
- if ( isset( $settings['contact']['contactType'] ) ) {
222
- $settings['contact']['contactType'] = strtolower( $settings['contact']['contactType'] );
223
- update_option( $KcSeoWPSchema->options['settings'], $settings );
224
- }
225
- if ( isset( $settings['area_served'] ) && ! empty( $settings['area_served'] ) ) {
226
-
227
- $cList = KcSeoOptions::getCountryList();
228
- $areas = array();
229
- foreach ( $settings['area_served'] as $area ) {
230
- $key = array_search( $area, $cList );
231
- if ( $key ) {
232
- $areas[] = $key;
233
- }
234
- }
235
- if ( ! empty( $areas ) ) {
236
- $settings['area_served'] = $areas;
237
- update_option( $KcSeoWPSchema->options['settings'], $settings );
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.11
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