WP SEO Structured Data Schema - Version 2.5.1

Version Description

  • A option for Turn off global schema
  • Full Translation support
Download this release

Release Info

Developer kcseopro
Plugin Icon 128x128 WP SEO Structured Data Schema
Version 2.5.1
Comparing to
See all releases

Code changes from version 2.5 to 2.5.1

languages/wp-seo-structured-data-schema.pot ADDED
@@ -0,0 +1,1144 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #, fuzzy
2
+ msgid ""
3
+ msgstr ""
4
+ "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
5
+ "Project-Id-Version: WP SEO Structured Data Schema\n"
6
+ "POT-Creation-Date: 2018-09-26 12:25+0600\n"
7
+ "PO-Revision-Date: 2018-09-26 12:25+0600\n"
8
+ "Last-Translator: \n"
9
+ "Language-Team: \n"
10
+ "MIME-Version: 1.0\n"
11
+ "Content-Type: text/plain; charset=UTF-8\n"
12
+ "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Generator: Poedit 1.8.7\n"
14
+ "X-Poedit-Basepath: ..\n"
15
+ "X-Poedit-WPHeader: wp-seo-structured-data-schema.php\n"
16
+ "X-Poedit-SourceCharset: UTF-8\n"
17
+ "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
18
+ "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
19
+ "_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
20
+ "X-Poedit-SearchPath-0: .\n"
21
+ "X-Poedit-SearchPathExcluded-0: *.js\n"
22
+
23
+ #: lib/classes/KcSeoInit.php:32
24
+ msgid "Documentation"
25
+ msgstr ""
26
+
27
+ #: lib/classes/KcSeoInit.php:33
28
+ msgid "Get Pro"
29
+ msgstr ""
30
+
31
+ #: lib/classes/KcSeoInit.php:155 lib/classes/KcSeoInit.php:178
32
+ msgid "Settings successfully updated"
33
+ msgstr ""
34
+
35
+ #: lib/classes/KcSeoInit.php:157 lib/classes/KcSeoInit.php:180
36
+ msgid "Security Error !!"
37
+ msgstr ""
38
+
39
+ #. Plugin Name of the plugin/theme
40
+ #: lib/classes/KcSeoInit.php:205 lib/views/schema-options.php:7
41
+ msgid "WP SEO Structured Data Schema"
42
+ msgstr ""
43
+
44
+ #: lib/classes/KcSeoInit.php:205
45
+ msgid "WP SEO Schema"
46
+ msgstr ""
47
+
48
+ #: lib/classes/KcSeoInit.php:207
49
+ msgid "WP SEO Schema settings"
50
+ msgstr ""
51
+
52
+ #: lib/classes/KcSeoInit.php:207
53
+ msgid "Settings"
54
+ msgstr ""
55
+
56
+ #: lib/classes/KcSeoMetaData.php:46
57
+ msgid ""
58
+ "WP SEO Structured Data Schema by <a href=\"https://wpsemplugins.com/"
59
+ "\">WPSEMPlugins.com</a>"
60
+ msgstr ""
61
+
62
+ #: lib/classes/KcSeoMetaData.php:63 lib/views/schema-options.php:26
63
+ msgid ""
64
+ "For more detailed information on how to configure this plugin, please visit:"
65
+ msgstr ""
66
+
67
+ #: lib/classes/KcSeoMetaData.php:64
68
+ msgid ""
69
+ "Once you save these structured data schema settings, validate this page url "
70
+ "here:"
71
+ msgstr ""
72
+
73
+ #: lib/classes/KcSeoMetaData.php:66 lib/views/schema-options.php:546
74
+ #: lib/views/settings.php:49
75
+ msgid "Pro Version Features"
76
+ msgstr ""
77
+
78
+ #: lib/classes/KcSeoMetaData.php:68 lib/views/schema-options.php:548
79
+ #: lib/views/settings.php:51
80
+ msgid "Includes Auto-fill function <---Popular"
81
+ msgstr ""
82
+
83
+ #: lib/classes/KcSeoMetaData.php:69 lib/views/schema-options.php:549
84
+ #: lib/views/settings.php:52
85
+ msgid "Supports Custom Post Types beyond default page and posts"
86
+ msgstr ""
87
+
88
+ #: lib/classes/KcSeoMetaData.php:70 lib/views/schema-options.php:550
89
+ #: lib/views/settings.php:53
90
+ msgid "Supports WordPress Multisite"
91
+ msgstr ""
92
+
93
+ #: lib/classes/KcSeoMetaData.php:71
94
+ msgid ""
95
+ "Supports more schema types: ( Books, Courses, Job Postings, Movies, Music, "
96
+ "Recipe, TV Episode) "
97
+ msgstr ""
98
+
99
+ #: lib/classes/KcSeoMetaData.php:73 lib/views/schema-options.php:565
100
+ #: lib/views/settings.php:68
101
+ msgid "Get the Pro Version"
102
+ msgstr ""
103
+
104
+ #: lib/models/KcSeoSchemaModel.php:687
105
+ msgid "Article"
106
+ msgstr ""
107
+
108
+ #: lib/models/KcSeoSchemaModel.php:693 lib/models/KcSeoSchemaModel.php:766
109
+ #: lib/models/KcSeoSchemaModel.php:834
110
+ msgid "Headline"
111
+ msgstr ""
112
+
113
+ #: lib/models/KcSeoSchemaModel.php:695 lib/models/KcSeoSchemaModel.php:836
114
+ msgid "Article title"
115
+ msgstr ""
116
+
117
+ #: lib/models/KcSeoSchemaModel.php:699 lib/models/KcSeoSchemaModel.php:772
118
+ #: lib/models/KcSeoSchemaModel.php:840
119
+ msgid "Page URL"
120
+ msgstr ""
121
+
122
+ #: lib/models/KcSeoSchemaModel.php:701 lib/models/KcSeoSchemaModel.php:774
123
+ #: lib/models/KcSeoSchemaModel.php:842
124
+ msgid "The canonical URL of the article page"
125
+ msgstr ""
126
+
127
+ #: lib/models/KcSeoSchemaModel.php:705
128
+ msgid "Author Name"
129
+ msgstr ""
130
+
131
+ #: lib/models/KcSeoSchemaModel.php:707 lib/models/KcSeoSchemaModel.php:780
132
+ #: lib/models/KcSeoSchemaModel.php:848
133
+ msgid "Author display name"
134
+ msgstr ""
135
+
136
+ #: lib/models/KcSeoSchemaModel.php:711
137
+ msgid "Article Feature Image"
138
+ msgstr ""
139
+
140
+ #: lib/models/KcSeoSchemaModel.php:714
141
+ msgid ""
142
+ "Images should be at least 696 pixels wide.<br>Images should be in .jpg, ."
143
+ "png, or. gif format."
144
+ msgstr ""
145
+
146
+ #: lib/models/KcSeoSchemaModel.php:717 lib/models/KcSeoSchemaModel.php:790
147
+ #: lib/models/KcSeoSchemaModel.php:858
148
+ msgid "Published date"
149
+ msgstr ""
150
+
151
+ #: lib/models/KcSeoSchemaModel.php:721 lib/models/KcSeoSchemaModel.php:728
152
+ #: lib/models/KcSeoSchemaModel.php:793 lib/models/KcSeoSchemaModel.php:800
153
+ #: lib/models/KcSeoSchemaModel.php:861 lib/models/KcSeoSchemaModel.php:869
154
+ #: lib/models/KcSeoSchemaModel.php:1108 lib/models/KcSeoSchemaModel.php:1223
155
+ msgid "Like this: 2015-12-25"
156
+ msgstr ""
157
+
158
+ #: lib/models/KcSeoSchemaModel.php:724 lib/models/KcSeoSchemaModel.php:797
159
+ #: lib/models/KcSeoSchemaModel.php:865
160
+ msgid "Modified date"
161
+ msgstr ""
162
+
163
+ #: lib/models/KcSeoSchemaModel.php:731 lib/models/KcSeoSchemaModel.php:804
164
+ #: lib/models/KcSeoSchemaModel.php:872
165
+ msgid "Publisher"
166
+ msgstr ""
167
+
168
+ #: lib/models/KcSeoSchemaModel.php:733 lib/models/KcSeoSchemaModel.php:806
169
+ #: lib/models/KcSeoSchemaModel.php:874
170
+ msgid "Publisher name or Organization name"
171
+ msgstr ""
172
+
173
+ #: lib/models/KcSeoSchemaModel.php:737 lib/models/KcSeoSchemaModel.php:810
174
+ #: lib/models/KcSeoSchemaModel.php:878
175
+ msgid "Publisher Logo"
176
+ msgstr ""
177
+
178
+ #: lib/models/KcSeoSchemaModel.php:739 lib/models/KcSeoSchemaModel.php:812
179
+ #: lib/models/KcSeoSchemaModel.php:880
180
+ msgid ""
181
+ "Logos should have a wide aspect ratio, not a square icon.<br>Logos should be "
182
+ "no wider than 600px, and no taller than 60px.<br>Always retain the original "
183
+ "aspect ratio of the logo when resizing. Ideally, logos are exactly 60px tall "
184
+ "with width <= 600px. If maintaining a height of 60px would cause the width "
185
+ "to exceed 600px, downscale the logo to exactly 600px wide and reduce the "
186
+ "height accordingly below 60px to maintain the original aspect ratio.<br>"
187
+ msgstr ""
188
+
189
+ #: lib/models/KcSeoSchemaModel.php:743 lib/models/KcSeoSchemaModel.php:816
190
+ #: lib/models/KcSeoSchemaModel.php:884 lib/models/KcSeoSchemaModel.php:984
191
+ #: lib/models/KcSeoSchemaModel.php:1064 lib/models/KcSeoSchemaModel.php:1293
192
+ #: lib/models/KcSeoSchemaModel.php:1404 lib/views/schema-options.php:170
193
+ #: lib/views/schema-options.php:255
194
+ msgid "Description"
195
+ msgstr ""
196
+
197
+ #: lib/models/KcSeoSchemaModel.php:745 lib/models/KcSeoSchemaModel.php:818
198
+ #: lib/models/KcSeoSchemaModel.php:886
199
+ msgid "Short description"
200
+ msgstr ""
201
+
202
+ #: lib/models/KcSeoSchemaModel.php:748 lib/models/KcSeoSchemaModel.php:821
203
+ #: lib/models/KcSeoSchemaModel.php:889
204
+ msgid "Article body"
205
+ msgstr ""
206
+
207
+ #: lib/models/KcSeoSchemaModel.php:750 lib/models/KcSeoSchemaModel.php:823
208
+ msgid "Article content"
209
+ msgstr ""
210
+
211
+ #: lib/models/KcSeoSchemaModel.php:753
212
+ msgid "Alternative headline"
213
+ msgstr ""
214
+
215
+ #: lib/models/KcSeoSchemaModel.php:755
216
+ msgid "A secondary headline for the article."
217
+ msgstr ""
218
+
219
+ #: lib/models/KcSeoSchemaModel.php:760
220
+ msgid "Blog Posting"
221
+ msgstr ""
222
+
223
+ #: lib/models/KcSeoSchemaModel.php:768
224
+ msgid "Blog posting title"
225
+ msgstr ""
226
+
227
+ #: lib/models/KcSeoSchemaModel.php:778
228
+ msgid "Author name"
229
+ msgstr ""
230
+
231
+ #: lib/models/KcSeoSchemaModel.php:784
232
+ msgid "Feature Image"
233
+ msgstr ""
234
+
235
+ #: lib/models/KcSeoSchemaModel.php:786 lib/models/KcSeoSchemaModel.php:854
236
+ msgid ""
237
+ "The representative image of the article. Only a marked-up image that "
238
+ "directly belongs to the article should be specified.<br> Images should be at "
239
+ "least 696 pixels wide. <br>Images should be in .jpg, .png, or. gif format."
240
+ msgstr ""
241
+
242
+ #: lib/models/KcSeoSchemaModel.php:828
243
+ msgid "News Article"
244
+ msgstr ""
245
+
246
+ #: lib/models/KcSeoSchemaModel.php:846 lib/models/KcSeoSchemaModel.php:1213
247
+ msgid "Author"
248
+ msgstr ""
249
+
250
+ #: lib/models/KcSeoSchemaModel.php:852 lib/models/KcSeoSchemaModel.php:979
251
+ #: lib/models/KcSeoSchemaModel.php:1372 lib/views/schema-options.php:247
252
+ msgid "Image"
253
+ msgstr ""
254
+
255
+ #: lib/models/KcSeoSchemaModel.php:891
256
+ msgid "Article body content"
257
+ msgstr ""
258
+
259
+ #: lib/models/KcSeoSchemaModel.php:896
260
+ msgid "Event"
261
+ msgstr ""
262
+
263
+ #: lib/models/KcSeoSchemaModel.php:902 lib/models/KcSeoSchemaModel.php:973
264
+ #: lib/models/KcSeoSchemaModel.php:1058 lib/models/KcSeoSchemaModel.php:1119
265
+ #: lib/models/KcSeoSchemaModel.php:1399 lib/views/schema-options.php:224
266
+ msgid "Name"
267
+ msgstr ""
268
+
269
+ #: lib/models/KcSeoSchemaModel.php:905
270
+ msgid "The name of the event."
271
+ msgstr ""
272
+
273
+ #: lib/models/KcSeoSchemaModel.php:908
274
+ msgid "Location name"
275
+ msgstr ""
276
+
277
+ #: lib/models/KcSeoSchemaModel.php:911
278
+ msgid "Event Location name"
279
+ msgstr ""
280
+
281
+ #: lib/models/KcSeoSchemaModel.php:914
282
+ msgid "Location address"
283
+ msgstr ""
284
+
285
+ #: lib/models/KcSeoSchemaModel.php:917
286
+ msgid ""
287
+ "The location of for example where the event is happening, an organization is "
288
+ "located, or where an action takes place."
289
+ msgstr ""
290
+
291
+ #: lib/models/KcSeoSchemaModel.php:920
292
+ msgid "Start date"
293
+ msgstr ""
294
+
295
+ #: lib/models/KcSeoSchemaModel.php:924
296
+ msgid "Event start date"
297
+ msgstr ""
298
+
299
+ #: lib/models/KcSeoSchemaModel.php:927
300
+ msgid "End date (Recommended)"
301
+ msgstr ""
302
+
303
+ #: lib/models/KcSeoSchemaModel.php:930
304
+ msgid "Event end date"
305
+ msgstr ""
306
+
307
+ #: lib/models/KcSeoSchemaModel.php:933
308
+ msgid "Description (Recommended)"
309
+ msgstr ""
310
+
311
+ #: lib/models/KcSeoSchemaModel.php:935
312
+ msgid "Event description"
313
+ msgstr ""
314
+
315
+ #: lib/models/KcSeoSchemaModel.php:938
316
+ msgid "Performer Name (Recommended)"
317
+ msgstr ""
318
+
319
+ #: lib/models/KcSeoSchemaModel.php:940
320
+ msgid "The performer's name."
321
+ msgstr ""
322
+
323
+ #: lib/models/KcSeoSchemaModel.php:943
324
+ msgid "Image URL (Recommended)"
325
+ msgstr ""
326
+
327
+ #: lib/models/KcSeoSchemaModel.php:945
328
+ msgid "URL of an image or logo for the event or tour"
329
+ msgstr ""
330
+
331
+ #: lib/models/KcSeoSchemaModel.php:948
332
+ msgid "Price (Recommended)"
333
+ msgstr ""
334
+
335
+ #: lib/models/KcSeoSchemaModel.php:951
336
+ msgid ""
337
+ "This is highly recommended. The lowest available price, including service "
338
+ "charges and fees, of this type of ticket. <span class='required'>Not "
339
+ "required but (Recommended)</span>"
340
+ msgstr ""
341
+
342
+ #: lib/models/KcSeoSchemaModel.php:954 lib/models/KcSeoSchemaModel.php:1012
343
+ msgid "Price currency"
344
+ msgstr ""
345
+
346
+ #: lib/models/KcSeoSchemaModel.php:956
347
+ msgid "The 3-letter currency code. (USD)"
348
+ msgstr ""
349
+
350
+ #: lib/models/KcSeoSchemaModel.php:962
351
+ msgid ""
352
+ "A link to the event's details page. <span class='required'>Not required but "
353
+ "(Recommended)</span>"
354
+ msgstr ""
355
+
356
+ #: lib/models/KcSeoSchemaModel.php:967
357
+ msgid "Product"
358
+ msgstr ""
359
+
360
+ #: lib/models/KcSeoSchemaModel.php:976
361
+ msgid "The name of the product."
362
+ msgstr ""
363
+
364
+ #: lib/models/KcSeoSchemaModel.php:981
365
+ msgid ""
366
+ "The URL of a product photo. Pictures clearly showing the product, e.g. "
367
+ "against a white background, are preferred."
368
+ msgstr ""
369
+
370
+ #: lib/models/KcSeoSchemaModel.php:986
371
+ msgid "Product description."
372
+ msgstr ""
373
+
374
+ #: lib/models/KcSeoSchemaModel.php:989
375
+ msgid "Brand"
376
+ msgstr ""
377
+
378
+ #: lib/models/KcSeoSchemaModel.php:991
379
+ msgid "The brand of the product."
380
+ msgstr ""
381
+
382
+ #: lib/models/KcSeoSchemaModel.php:994
383
+ msgid "Ratting value"
384
+ msgstr ""
385
+
386
+ #: lib/models/KcSeoSchemaModel.php:997
387
+ msgid "Rating value. (1 , 2.5, 3, 5 etc)"
388
+ msgstr ""
389
+
390
+ #: lib/models/KcSeoSchemaModel.php:1000
391
+ msgid "Total review count"
392
+ msgstr ""
393
+
394
+ #: lib/models/KcSeoSchemaModel.php:1003
395
+ msgid ""
396
+ "Rating ratting value. <span class='required'>This is required if (Ratting "
397
+ "value) is given</span>"
398
+ msgstr ""
399
+
400
+ #: lib/models/KcSeoSchemaModel.php:1006
401
+ msgid "Price"
402
+ msgstr ""
403
+
404
+ #: lib/models/KcSeoSchemaModel.php:1009
405
+ msgid ""
406
+ "The lowest available price, including service charges and fees, of this type "
407
+ "of ticket."
408
+ msgstr ""
409
+
410
+ #: lib/models/KcSeoSchemaModel.php:1014
411
+ msgid "The 3-letter currency code."
412
+ msgstr ""
413
+
414
+ #: lib/models/KcSeoSchemaModel.php:1030
415
+ msgid "Select a availability type"
416
+ msgstr ""
417
+
418
+ #: lib/models/KcSeoSchemaModel.php:1042
419
+ msgid "Select a condition"
420
+ msgstr ""
421
+
422
+ #: lib/models/KcSeoSchemaModel.php:1045
423
+ msgid "Product URL"
424
+ msgstr ""
425
+
426
+ #: lib/models/KcSeoSchemaModel.php:1047
427
+ msgid ""
428
+ "A URL to the product web page (that includes the Offer). (Don't use offerURL "
429
+ "for markup that appears on the product page itself.)"
430
+ msgstr ""
431
+
432
+ #: lib/models/KcSeoSchemaModel.php:1052
433
+ msgid "Video"
434
+ msgstr ""
435
+
436
+ #: lib/models/KcSeoSchemaModel.php:1061
437
+ msgid "The title of the video"
438
+ msgstr ""
439
+
440
+ #: lib/models/KcSeoSchemaModel.php:1067
441
+ msgid "The description of the video"
442
+ msgstr ""
443
+
444
+ #: lib/models/KcSeoSchemaModel.php:1074
445
+ msgid ""
446
+ "A URL pointing to the video thumbnail image file. Images must be at least "
447
+ "160x90 pixels and at most 1920x1080 pixels."
448
+ msgstr ""
449
+
450
+ #: lib/models/KcSeoSchemaModel.php:1077
451
+ msgid "Updated date"
452
+ msgstr ""
453
+
454
+ #: lib/models/KcSeoSchemaModel.php:1080
455
+ msgid "2015-02-05T08:00:00+08:00"
456
+ msgstr ""
457
+
458
+ #: lib/models/KcSeoSchemaModel.php:1083
459
+ msgid "Duration"
460
+ msgstr ""
461
+
462
+ #: lib/models/KcSeoSchemaModel.php:1085
463
+ msgid "The duration of the video in ISO 8601 format.(PT1M33S)"
464
+ msgstr ""
465
+
466
+ #: lib/models/KcSeoSchemaModel.php:1091
467
+ msgid ""
468
+ "A URL pointing to the actual video media file. This file should be in .mpg, ."
469
+ "mpeg, .mp4, .m4v, .mov, .wmv, .asf, .avi, .ra, .ram, .rm, .flv, or other "
470
+ "video file format."
471
+ msgstr ""
472
+
473
+ #: lib/models/KcSeoSchemaModel.php:1097
474
+ msgid ""
475
+ "A URL pointing to a player for the specific video. Usually this is the "
476
+ "information in the src element of an < embed> tag.Example: Dailymotion: "
477
+ "http://www.dailymotion.com/swf/x1o2g."
478
+ msgstr ""
479
+
480
+ #: lib/models/KcSeoSchemaModel.php:1100
481
+ msgid "Interaction count"
482
+ msgstr ""
483
+
484
+ #: lib/models/KcSeoSchemaModel.php:1102
485
+ msgid "The number of times the video has been viewed."
486
+ msgstr ""
487
+
488
+ #: lib/models/KcSeoSchemaModel.php:1105
489
+ msgid "Expires"
490
+ msgstr ""
491
+
492
+ #: lib/models/KcSeoSchemaModel.php:1113
493
+ msgid "Service"
494
+ msgstr ""
495
+
496
+ #: lib/models/KcSeoSchemaModel.php:1122
497
+ msgid "The name of the Service."
498
+ msgstr ""
499
+
500
+ #: lib/models/KcSeoSchemaModel.php:1125
501
+ msgid "Service type"
502
+ msgstr ""
503
+
504
+ #: lib/models/KcSeoSchemaModel.php:1128
505
+ msgid ""
506
+ "The type of service being offered, e.g. veterans' benefits, emergency "
507
+ "relief, etc."
508
+ msgstr ""
509
+
510
+ #: lib/models/KcSeoSchemaModel.php:1134
511
+ msgid ""
512
+ "An additional type for the service, typically used for adding more specific "
513
+ "types from external vocabularies in microdata syntax."
514
+ msgstr ""
515
+
516
+ #: lib/models/KcSeoSchemaModel.php:1137
517
+ msgid "Award"
518
+ msgstr ""
519
+
520
+ #: lib/models/KcSeoSchemaModel.php:1139
521
+ msgid "An award won by or for this service."
522
+ msgstr ""
523
+
524
+ #: lib/models/KcSeoSchemaModel.php:1142
525
+ msgid "Category"
526
+ msgstr ""
527
+
528
+ #: lib/models/KcSeoSchemaModel.php:1144
529
+ msgid "A category for the service."
530
+ msgstr ""
531
+
532
+ #: lib/models/KcSeoSchemaModel.php:1147
533
+ msgid "Provider mobility"
534
+ msgstr ""
535
+
536
+ #: lib/models/KcSeoSchemaModel.php:1149
537
+ msgid ""
538
+ "Indicates the mobility of a provided service (e.g. 'static', 'dynamic')."
539
+ msgstr ""
540
+
541
+ #: lib/models/KcSeoSchemaModel.php:1155
542
+ msgid "A short description of the service."
543
+ msgstr ""
544
+
545
+ #: lib/models/KcSeoSchemaModel.php:1161
546
+ msgid "An image of the service. This should be a URL."
547
+ msgstr ""
548
+
549
+ #: lib/models/KcSeoSchemaModel.php:1167
550
+ msgid ""
551
+ "Indicates a page (or other CreativeWork) for which this thing is the main "
552
+ "entity being described."
553
+ msgstr ""
554
+
555
+ #: lib/models/KcSeoSchemaModel.php:1173
556
+ msgid ""
557
+ "URL of a reference Web page that unambiguously indicates the service's "
558
+ "identity. E.g. the URL of the service's Wikipedia page, Freebase page, or "
559
+ "official website."
560
+ msgstr ""
561
+
562
+ #: lib/models/KcSeoSchemaModel.php:1179
563
+ msgid "URL of the service."
564
+ msgstr ""
565
+
566
+ #: lib/models/KcSeoSchemaModel.php:1182
567
+ msgid "Alternate name"
568
+ msgstr ""
569
+
570
+ #: lib/models/KcSeoSchemaModel.php:1184
571
+ msgid "An alias for the service."
572
+ msgstr ""
573
+
574
+ #: lib/models/KcSeoSchemaModel.php:1189
575
+ msgid "Review"
576
+ msgstr ""
577
+
578
+ #: lib/models/KcSeoSchemaModel.php:1195
579
+ msgid "Name of the reviewed item"
580
+ msgstr ""
581
+
582
+ #: lib/models/KcSeoSchemaModel.php:1198
583
+ msgid "The item that is being reviewed."
584
+ msgstr ""
585
+
586
+ #: lib/models/KcSeoSchemaModel.php:1201
587
+ msgid "Review body"
588
+ msgstr ""
589
+
590
+ #: lib/models/KcSeoSchemaModel.php:1204
591
+ msgid "The actual body of the review."
592
+ msgstr ""
593
+
594
+ #: lib/models/KcSeoSchemaModel.php:1207
595
+ msgid "Review name"
596
+ msgstr ""
597
+
598
+ #: lib/models/KcSeoSchemaModel.php:1210
599
+ msgid "A particular name for the review."
600
+ msgstr ""
601
+
602
+ #: lib/models/KcSeoSchemaModel.php:1217
603
+ msgid "The author of the review. The reviewer’s name needs to be a valid name."
604
+ msgstr ""
605
+
606
+ #: lib/models/KcSeoSchemaModel.php:1220
607
+ msgid "Date of Published"
608
+ msgstr ""
609
+
610
+ #: lib/models/KcSeoSchemaModel.php:1226
611
+ msgid "Rating value"
612
+ msgstr ""
613
+
614
+ #: lib/models/KcSeoSchemaModel.php:1229 lib/models/KcSeoSchemaModel.php:1316
615
+ #: lib/models/KcSeoSchemaModel.php:1323
616
+ msgid "A numerical quality rating for the item."
617
+ msgstr ""
618
+
619
+ #: lib/models/KcSeoSchemaModel.php:1232
620
+ msgid "Best rating"
621
+ msgstr ""
622
+
623
+ #: lib/models/KcSeoSchemaModel.php:1235
624
+ msgid "The highest value allowed in this rating system."
625
+ msgstr ""
626
+
627
+ #: lib/models/KcSeoSchemaModel.php:1238
628
+ msgid "Worst rating"
629
+ msgstr ""
630
+
631
+ #: lib/models/KcSeoSchemaModel.php:1241
632
+ msgid ""
633
+ "The lowest value allowed in this rating system. * Required if the rating "
634
+ "system is not on a 5-point scale. If worstRating is omitted, 1 is assumed."
635
+ msgstr ""
636
+
637
+ #: lib/models/KcSeoSchemaModel.php:1244
638
+ msgid "Name of the organization"
639
+ msgstr ""
640
+
641
+ #: lib/models/KcSeoSchemaModel.php:1246
642
+ msgid "The publisher of the review."
643
+ msgstr ""
644
+
645
+ #: lib/models/KcSeoSchemaModel.php:1251
646
+ msgid "Aggregate Ratings"
647
+ msgstr ""
648
+
649
+ #: lib/models/KcSeoSchemaModel.php:1257
650
+ msgid "Schema type"
651
+ msgstr ""
652
+
653
+ #: lib/models/KcSeoSchemaModel.php:1262
654
+ msgid "Use the most appropriate schema type for what is being reviewed."
655
+ msgstr ""
656
+
657
+ #: lib/models/KcSeoSchemaModel.php:1265
658
+ msgid "Name of the item"
659
+ msgstr ""
660
+
661
+ #: lib/models/KcSeoSchemaModel.php:1268
662
+ msgid "The item that is being rated."
663
+ msgstr ""
664
+
665
+ #: lib/models/KcSeoSchemaModel.php:1280 lib/models/KcSeoSchemaModel.php:1415
666
+ #: lib/views/schema-options.php:118
667
+ msgid "The price range of the business, for example $$$."
668
+ msgstr ""
669
+
670
+ #: lib/models/KcSeoSchemaModel.php:1295
671
+ msgid "Description for thr review"
672
+ msgstr ""
673
+
674
+ #: lib/models/KcSeoSchemaModel.php:1298
675
+ msgid "Rating Count"
676
+ msgstr ""
677
+
678
+ #: lib/models/KcSeoSchemaModel.php:1302
679
+ msgid ""
680
+ "The total number of ratings for the item on your site. <span "
681
+ "class='required'>* At least one of ratingCount or reviewCount is required.</"
682
+ "span>"
683
+ msgstr ""
684
+
685
+ #: lib/models/KcSeoSchemaModel.php:1305
686
+ msgid "Review Count"
687
+ msgstr ""
688
+
689
+ #: lib/models/KcSeoSchemaModel.php:1309
690
+ msgid ""
691
+ "Specifies the number of people who provided a review with or without an "
692
+ "accompanying rating. At least one of ratingCount or reviewCount is required."
693
+ msgstr ""
694
+
695
+ #: lib/models/KcSeoSchemaModel.php:1312 lib/models/KcSeoSchemaModel.php:1319
696
+ msgid "Rating Value"
697
+ msgstr ""
698
+
699
+ #: lib/models/KcSeoSchemaModel.php:1326
700
+ msgid "Best Rating"
701
+ msgstr ""
702
+
703
+ #: lib/models/KcSeoSchemaModel.php:1330
704
+ msgid ""
705
+ "The highest value allowed in this rating system. <span class='required'>* "
706
+ "Required if the rating system is not a 5-point scale.</span> If bestRating "
707
+ "is omitted, 5 is assumed."
708
+ msgstr ""
709
+
710
+ #: lib/models/KcSeoSchemaModel.php:1333
711
+ msgid "Worst Rating"
712
+ msgstr ""
713
+
714
+ #: lib/models/KcSeoSchemaModel.php:1337
715
+ msgid ""
716
+ "The lowest value allowed in this rating system. <span class='required'>* "
717
+ "Required if the rating system is not a 5-point scale.</span> If worstRating "
718
+ "is omitted, 1 is assumed."
719
+ msgstr ""
720
+
721
+ #: lib/models/KcSeoSchemaModel.php:1342
722
+ msgid "Restaurant"
723
+ msgstr ""
724
+
725
+ #: lib/models/KcSeoSchemaModel.php:1348
726
+ msgid "Name of the Restaurant"
727
+ msgstr ""
728
+
729
+ #: lib/models/KcSeoSchemaModel.php:1353
730
+ msgid "Description of the Restaurant"
731
+ msgstr ""
732
+
733
+ #: lib/models/KcSeoSchemaModel.php:1357 lib/models/KcSeoSchemaModel.php:1362
734
+ msgid "Opening Hours"
735
+ msgstr ""
736
+
737
+ #: lib/models/KcSeoSchemaModel.php:1359
738
+ msgid "Mo,Tu,We,Th,Fr,Sa,Su 11:30-23:00"
739
+ msgstr ""
740
+
741
+ #: lib/models/KcSeoSchemaModel.php:1364
742
+ msgid "+155501003333"
743
+ msgstr ""
744
+
745
+ #: lib/models/KcSeoSchemaModel.php:1367
746
+ msgid "Menu"
747
+ msgstr ""
748
+
749
+ #: lib/models/KcSeoSchemaModel.php:1369
750
+ msgid "http://example.com/menu"
751
+ msgstr ""
752
+
753
+ #: lib/models/KcSeoSchemaModel.php:1377 lib/views/schema-options.php:270
754
+ msgid "Address"
755
+ msgstr ""
756
+
757
+ #: lib/models/KcSeoSchemaModel.php:1381 lib/views/schema-options.php:113
758
+ msgid "Price Range"
759
+ msgstr ""
760
+
761
+ #: lib/models/KcSeoSchemaModel.php:1383
762
+ msgid "The price range of the business, for example $$$"
763
+ msgstr ""
764
+
765
+ #: lib/models/KcSeoSchemaModel.php:1386
766
+ msgid "Serves Cuisine"
767
+ msgstr ""
768
+
769
+ #: lib/models/KcSeoSchemaModel.php:1388 lib/views/schema-options.php:159
770
+ msgid "The cuisine of the restaurant."
771
+ msgstr ""
772
+
773
+ #: lib/models/KcSeoSchemaModel.php:1393
774
+ msgid "Local Business"
775
+ msgstr ""
776
+
777
+ #: lib/models/KcSeoSchemaModel.php:1408
778
+ msgid "Business Logo"
779
+ msgstr ""
780
+
781
+ #: lib/models/KcSeoSchemaModel.php:1413
782
+ msgid "Price Range (Recommended)"
783
+ msgstr ""
784
+
785
+ #: lib/models/KcSeoSchemaModel.php:1418
786
+ msgid "Address locality"
787
+ msgstr ""
788
+
789
+ #: lib/models/KcSeoSchemaModel.php:1420
790
+ msgid "City (i.e Kansas city)"
791
+ msgstr ""
792
+
793
+ #: lib/models/KcSeoSchemaModel.php:1423
794
+ msgid "Address region"
795
+ msgstr ""
796
+
797
+ #: lib/models/KcSeoSchemaModel.php:1425
798
+ msgid "State (i.e. MO)"
799
+ msgstr ""
800
+
801
+ #: lib/models/KcSeoSchemaModel.php:1428
802
+ msgid "Postal code"
803
+ msgstr ""
804
+
805
+ #: lib/models/KcSeoSchemaModel.php:1432
806
+ msgid "Street address"
807
+ msgstr ""
808
+
809
+ #: lib/models/KcSeoSchemaModel.php:1436
810
+ msgid "Telephone (Recommended)"
811
+ msgstr ""
812
+
813
+ #: lib/models/KcSeoSchemaModel.php:1997
814
+ msgid "Facebook"
815
+ msgstr ""
816
+
817
+ #: lib/models/KcSeoSchemaModel.php:1998
818
+ msgid "Twitter"
819
+ msgstr ""
820
+
821
+ #: lib/models/KcSeoSchemaModel.php:1999
822
+ msgid "Google+"
823
+ msgstr ""
824
+
825
+ #: lib/models/KcSeoSchemaModel.php:2000
826
+ msgid "Instagram"
827
+ msgstr ""
828
+
829
+ #: lib/models/KcSeoSchemaModel.php:2001
830
+ msgid "Youtube"
831
+ msgstr ""
832
+
833
+ #: lib/models/KcSeoSchemaModel.php:2002
834
+ msgid "LinkedIn"
835
+ msgstr ""
836
+
837
+ #: lib/models/KcSeoSchemaModel.php:2003
838
+ msgid "Myspace"
839
+ msgstr ""
840
+
841
+ #: lib/models/KcSeoSchemaModel.php:2004
842
+ msgid "Pinterest"
843
+ msgstr ""
844
+
845
+ #: lib/models/KcSeoSchemaModel.php:2005
846
+ msgid "SoundCloud"
847
+ msgstr ""
848
+
849
+ #: lib/models/KcSeoSchemaModel.php:2006
850
+ msgid "Tumblr"
851
+ msgstr ""
852
+
853
+ #: lib/models/KcSeoSchemaModel.php:2007
854
+ msgid "Wikidata"
855
+ msgstr ""
856
+
857
+ #: lib/views/schema-options.php:13
858
+ msgid ""
859
+ "General settings for WP SEO Structured Data Schema by <a href=\"https://"
860
+ "wpsemplugins.com/\">WPSEMPlugins.com</a>"
861
+ msgstr ""
862
+
863
+ #: lib/views/schema-options.php:35
864
+ msgid "Site Type"
865
+ msgstr ""
866
+
867
+ #: lib/views/schema-options.php:38
868
+ msgid "Select one type"
869
+ msgstr ""
870
+
871
+ #: lib/views/schema-options.php:78
872
+ msgid "Organization or Business name"
873
+ msgstr ""
874
+
875
+ #: lib/views/schema-options.php:85
876
+ msgid "Site Image"
877
+ msgstr ""
878
+
879
+ #: lib/views/schema-options.php:122
880
+ msgid "Site Telephone"
881
+ msgstr ""
882
+
883
+ #: lib/views/schema-options.php:127
884
+ msgid "The telephone number."
885
+ msgstr ""
886
+
887
+ #: lib/views/schema-options.php:131
888
+ msgid "Additional Type"
889
+ msgstr ""
890
+
891
+ #: lib/views/schema-options.php:138
892
+ msgid "Add \"Additional Type\""
893
+ msgstr ""
894
+
895
+ #: lib/views/schema-options.php:142
896
+ msgid ""
897
+ "Product Ontology is an extension to schema using WikiPedia definitions that "
898
+ "enables you to further define a type by adding an \"AdditionalType” "
899
+ "attribute.Example for a Tailor (which is not available\n"
900
+ " as a schema “Type”): Pick "
901
+ "LocalBusiness as a generic Type, then add additional type as follows:"
902
+ msgstr ""
903
+
904
+ #: lib/views/schema-options.php:156
905
+ msgid "Restaurant Information"
906
+ msgstr ""
907
+
908
+ #: lib/views/schema-options.php:167
909
+ msgid "Others local business info"
910
+ msgstr ""
911
+
912
+ #: lib/views/schema-options.php:177
913
+ msgid "Operation Hours"
914
+ msgstr ""
915
+
916
+ #: lib/views/schema-options.php:204
917
+ msgid "GeoCoordinates"
918
+ msgstr ""
919
+
920
+ #: lib/views/schema-options.php:207
921
+ msgid "Latitude"
922
+ msgstr ""
923
+
924
+ #: lib/views/schema-options.php:214
925
+ msgid "Longitude"
926
+ msgstr ""
927
+
928
+ #: lib/views/schema-options.php:221
929
+ msgid "Person"
930
+ msgstr ""
931
+
932
+ #: lib/views/schema-options.php:231
933
+ msgid "Work For"
934
+ msgstr ""
935
+
936
+ #: lib/views/schema-options.php:239
937
+ msgid "Job Title"
938
+ msgstr ""
939
+
940
+ #: lib/views/schema-options.php:251
941
+ msgid "Add your personal photo here"
942
+ msgstr ""
943
+
944
+ #: lib/views/schema-options.php:262
945
+ msgid "Birth date"
946
+ msgstr ""
947
+
948
+ #: lib/views/schema-options.php:273
949
+ msgid "Address Country"
950
+ msgstr ""
951
+
952
+ #: lib/views/schema-options.php:288
953
+ msgid "Address Locality"
954
+ msgstr ""
955
+
956
+ #: lib/views/schema-options.php:295
957
+ msgid "Address Region"
958
+ msgstr ""
959
+
960
+ #: lib/views/schema-options.php:302
961
+ msgid "Postal Code"
962
+ msgstr ""
963
+
964
+ #: lib/views/schema-options.php:308
965
+ msgid "Street Address"
966
+ msgstr ""
967
+
968
+ #: lib/views/schema-options.php:318
969
+ msgid "Organization Logo"
970
+ msgstr ""
971
+
972
+ #: lib/views/schema-options.php:320 lib/views/schema-options.php:380
973
+ msgid "Social Profile"
974
+ msgstr ""
975
+
976
+ #: lib/views/schema-options.php:321
977
+ msgid "Corporate Contacts"
978
+ msgstr ""
979
+
980
+ #: lib/views/schema-options.php:326
981
+ msgid "Select Organization Logo"
982
+ msgstr ""
983
+
984
+ #: lib/views/schema-options.php:370
985
+ msgid "Company Name"
986
+ msgstr ""
987
+
988
+ #: lib/views/schema-options.php:377
989
+ msgid "Social Profiles"
990
+ msgstr ""
991
+
992
+ #: lib/views/schema-options.php:405
993
+ msgid "Add Social Profile"
994
+ msgstr ""
995
+
996
+ #: lib/views/schema-options.php:413
997
+ msgid "Contacts"
998
+ msgstr ""
999
+
1000
+ #: lib/views/schema-options.php:432
1001
+ msgid "Contact Phone"
1002
+ msgstr ""
1003
+
1004
+ #: lib/views/schema-options.php:436
1005
+ msgid "Please follow the format below"
1006
+ msgstr ""
1007
+
1008
+ #: lib/views/schema-options.php:446
1009
+ msgid "Contact Email"
1010
+ msgstr ""
1011
+
1012
+ #: lib/views/schema-options.php:453
1013
+ msgid "Contact Option"
1014
+ msgstr ""
1015
+
1016
+ #: lib/views/schema-options.php:457
1017
+ msgid "Select an option"
1018
+ msgstr ""
1019
+
1020
+ #: lib/views/schema-options.php:460
1021
+ msgid "TollFree"
1022
+ msgstr ""
1023
+
1024
+ #: lib/views/schema-options.php:464
1025
+ msgid "HearingImpairedSupported"
1026
+ msgstr ""
1027
+
1028
+ #: lib/views/schema-options.php:470
1029
+ msgid "Area Served"
1030
+ msgstr ""
1031
+
1032
+ #: lib/views/schema-options.php:488
1033
+ msgid "Available language"
1034
+ msgstr ""
1035
+
1036
+ #: lib/views/schema-options.php:506
1037
+ msgid "Site Name in Search Results"
1038
+ msgstr ""
1039
+
1040
+ #: lib/views/schema-options.php:509
1041
+ msgid "Enable Site link Search Box"
1042
+ msgstr ""
1043
+
1044
+ #: lib/views/schema-options.php:517
1045
+ msgid "Site Name:"
1046
+ msgstr ""
1047
+
1048
+ #: lib/views/schema-options.php:524
1049
+ msgid "Site Alternative Name:"
1050
+ msgstr ""
1051
+
1052
+ #: lib/views/schema-options.php:531
1053
+ msgid "Site Url:"
1054
+ msgstr ""
1055
+
1056
+ #: lib/views/schema-options.php:539 lib/views/settings.php:42
1057
+ msgid "Save Changes"
1058
+ msgstr ""
1059
+
1060
+ #: lib/views/schema-options.php:551 lib/views/settings.php:54
1061
+ msgid "Supports more schema types:"
1062
+ msgstr ""
1063
+
1064
+ #: lib/views/schema-options.php:553 lib/views/settings.php:56
1065
+ msgid "Books"
1066
+ msgstr ""
1067
+
1068
+ #: lib/views/schema-options.php:554 lib/views/settings.php:57
1069
+ msgid "Courses"
1070
+ msgstr ""
1071
+
1072
+ #: lib/views/schema-options.php:555 lib/views/settings.php:58
1073
+ msgid "Job Postings"
1074
+ msgstr ""
1075
+
1076
+ #: lib/views/schema-options.php:556 lib/views/settings.php:59
1077
+ msgid "Movies"
1078
+ msgstr ""
1079
+
1080
+ #: lib/views/schema-options.php:557 lib/views/settings.php:60
1081
+ msgid "Music"
1082
+ msgstr ""
1083
+
1084
+ #: lib/views/schema-options.php:558 lib/views/settings.php:61
1085
+ msgid "Recipe"
1086
+ msgstr ""
1087
+
1088
+ #: lib/views/schema-options.php:559 lib/views/settings.php:62
1089
+ msgid "TV Episode"
1090
+ msgstr ""
1091
+
1092
+ #: lib/views/settings.php:6
1093
+ msgid "Schema Settings"
1094
+ msgstr ""
1095
+
1096
+ #: lib/views/settings.php:13
1097
+ msgid "Business / Org Schema"
1098
+ msgstr ""
1099
+
1100
+ #: lib/views/settings.php:17
1101
+ msgid ""
1102
+ "Home page\n"
1103
+ " only"
1104
+ msgstr ""
1105
+
1106
+ #: lib/views/settings.php:21
1107
+ msgid ""
1108
+ "Sitewide (Apply General Settings schema\n"
1109
+ " sitewide)"
1110
+ msgstr ""
1111
+
1112
+ #: lib/views/settings.php:26
1113
+ msgid "Turn off (Turn off global schema)"
1114
+ msgstr ""
1115
+
1116
+ #: lib/views/settings.php:30
1117
+ msgid "Delete all data"
1118
+ msgstr ""
1119
+
1120
+ #: lib/views/settings.php:35
1121
+ msgid "Enable"
1122
+ msgstr ""
1123
+
1124
+ #: lib/views/settings.php:36
1125
+ msgid ""
1126
+ "This will delete all schema created and applied by this plugin when plugin "
1127
+ "is\n"
1128
+ " deleted."
1129
+ msgstr ""
1130
+
1131
+ #. Plugin URI of the plugin/theme
1132
+ #. Author URI of the plugin/theme
1133
+ msgid "https://wpsemplugins.com/"
1134
+ msgstr ""
1135
+
1136
+ #. Description of the plugin/theme
1137
+ msgid ""
1138
+ "Comprehensive JSON-LD based Structured Data solution for WordPress for "
1139
+ "adding schema for organizations, businesses, blog posts, ratings & more."
1140
+ msgstr ""
1141
+
1142
+ #. Author of the plugin/theme
1143
+ msgid "WPSEMPlugins"
1144
+ msgstr ""
lib/classes/KcSeoInit.php CHANGED
@@ -1,219 +1,233 @@
1
  <?php
2
 
3
- if ( ! class_exists( 'KcSeoInit' ) ):
4
-
5
- class KcSeoInit {
6
- function __construct() {
7
- add_action( 'init', array( $this, 'kcSeoScript' ) );
8
- add_action( 'admin_menu', array( $this, 'kcSeo_Wp_Schema_menu' ) );
9
- add_action( 'plugins_loaded', array( $this, 'kcSeo_pluginInit' ) );
10
- add_action( 'wp_ajax_kcSeoWpSchemaSettings', array( $this, 'kcSeoWpSchemaSettings' ) );
11
- add_action( 'wp_ajax_kcSeoMainSettings_action', array( $this, 'kcSeoMainSettings_action' ) );
12
- add_action( 'wp_ajax_newSocial', array( $this, 'newSocial' ) );
13
- add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
14
-
15
- // for MU Site
16
- add_action( 'activated_plugin', array( $this, 'update_queue' ), 10, 2 );
17
- add_action( 'deactivated_plugin', array( $this, 'update_queue' ), 10, 2 );
18
-
19
- register_activation_hook( KCSEO_WP_SCHEMA_PLUGIN_ACTIVE_FILE_NAME, array( $this, 'activePlugin' ) );
 
 
20
  // register_deactivation_hook(KCSEO_WP_SCHEMA_PLUGIN_ACTIVE_FILE_NAME, array($this, 'uninstall'));
21
- // Uninstall hook
22
-
23
- add_filter( 'plugin_action_links_' . KCSEO_WP_SCHEMA_PLUGIN_ACTIVE_FILE_NAME,
24
- array( $this, 'schema_marketing' ) );
25
-
26
- }
27
-
28
- function schema_marketing($links){
29
- $links[] = '<a target="_blank" href="' . esc_url( 'https://wpsemplugins.com/documentation/' ) . '">Documentation</a>';
30
- $links[] = '<a target="_blank" href="' . esc_url( 'https://wpsemplugins.com/downloads/wordpress-schema-plugin/' ) . '">Get Pro</a>';
31
- return $links;
32
- }
33
-
34
-
35
-
36
- function update_queue( $plugin, $network_wide = null ) {
37
- if ( ! $network_wide ) {
38
- return;
39
- }
40
- list( $action ) = explode( '_', current_filter(), 2 );
41
-
42
- $action = str_replace( 'activated', 'activate', $action );
43
- $queue = get_site_option( "network_{$action}_queue", array() );
44
-
45
- $queue[ $plugin ] = ( has_filter( $action . '_' . $plugin ) || has_filter( $action . '_plugin' ) );
46
- update_site_option( "network_{$action}_queue", $queue );
47
- }
48
-
49
- function admin_enqueue_scripts() {
50
- global $pagenow;
51
- // validate page
52
- $page = isset( $_REQUEST['page'] ) ? $_REQUEST['page'] : null;
53
- if ( $pagenow == 'admin.php' && ($page == 'wp-seo-schema' || $page == 'wp-seo-schema-settings') ) {
54
- // scripts
55
- wp_enqueue_media();
56
- wp_enqueue_script( array(
57
- 'jquery',
58
- 'kcseo-datepicker',
59
- 'kcseo-select2-js',
60
- 'kcseo-tooltip-js',
61
- 'kcseo-admin-js',
62
- ) );
63
-
64
- // styles
65
- wp_enqueue_style( array(
66
- 'kcseo-datepicker',
67
- 'kcseo-select2-css',
68
- 'kcseo-tooltip-css',
69
- 'kcseo-admin-css',
70
- ) );
71
- }
72
- }
73
-
74
- function kcSeoScript() {
75
- global $KcSeoWPSchema;
76
- // register team scripts and styles
77
- $scripts = array();
78
- $styles = array();
79
- if ( is_admin() ) {
80
-
81
-
82
- $scripts[] = array(
83
- 'handle' => 'kcseo-select2-js',
84
- 'src' => $KcSeoWPSchema->assetsUrl . 'js/select2.min.js',
85
- 'deps' => array( 'jquery' ),
86
- 'footer' => true
87
- );
88
- $scripts[] = array(
89
- 'handle' => 'kcseo-tooltip-js',
90
- 'src' => $KcSeoWPSchema->assetsUrl . 'js/jquery.qtip.js',
91
- 'deps' => array( 'jquery' ),
92
- 'footer' => true
93
- );
94
-
95
- $scripts[] = array(
96
- 'handle' => 'kcseo-datepicker',
97
- 'src' => $KcSeoWPSchema->assetsUrl . 'vendor/bootstrap-datepicker/bootstrap-datepicker.min.js',
98
- 'deps' => array( 'jquery' ),
99
- 'footer' => false
100
- );
101
- $scripts[] = array(
102
- 'handle' => 'kcseo-admin-js',
103
- 'src' => $KcSeoWPSchema->assetsUrl . 'js/admin.js',
104
- 'deps' => array( 'jquery' ),
105
- 'footer' => true
106
- );
107
- $styles['kcseo-datepicker'] = $KcSeoWPSchema->assetsUrl . 'vendor/bootstrap-datepicker/bootstrap-datepicker3.standalone.min.css';
108
- $styles['kcseo-select2-css'] = $KcSeoWPSchema->assetsUrl . 'css/select2.min.css';
109
- $styles['kcseo-tooltip-css'] = $KcSeoWPSchema->assetsUrl . 'css/jquery.qtip.css';
110
- $styles['kcseo-admin-css'] = $KcSeoWPSchema->assetsUrl . 'css/admin.css';
111
- }
112
- foreach ( $scripts as $script ) {
113
- wp_register_script( $script['handle'], $script['src'], $script['deps'], time(),
114
- $script['footer'] ); //$KcSeoWPSchema->options['version']
115
- }
116
- foreach ( $styles as $k => $v ) {
117
- wp_register_style( $k, $v, false, $KcSeoWPSchema->options['version'] );
118
- }
119
- }
120
-
121
- function newSocial() {
122
- $schemaModel = new KcSeoSchemaModel;
123
- $id = ( $_REQUEST['id'] ? $_REQUEST['id'] + 1 : 0 );
124
- $html = null;
125
- $html = "<div class='sfield'>";
126
- $html .= "<select name='social[$id][id]'>";
127
- foreach ( $schemaModel->socialList() as $skey => $social ) {
128
- $html .= "<option value='$skey'>$social</option>";
129
- }
130
- $html .= "</select>";
131
- $html .= "<input type='text' name='social[$id][link]'>";
132
- $html .= '<span class="dashicons dashicons-trash social-remove"></span>';
133
- $html .= "</div>";
134
-
135
-
136
- wp_send_json( array( 'data' => $html ) );
137
- die();
138
- }
139
-
140
- function kcSeoWpSchemaSettings() {
141
- global $KcSeoWPSchema;
142
- $error = true;
143
- $msg = null;
144
- if ( $KcSeoWPSchema->verifyNonce() ) {
145
- unset( $_REQUEST['action'] );
146
- update_option( $KcSeoWPSchema->options['settings'], $_REQUEST );
147
- $error = false;
148
- $msg = __( 'Settings successfully updated', KCSEO_WP_SCHEMA_SLUG );
149
- } else {
150
- $msg = __( 'Security Error !!', KCSEO_WP_SCHEMA_SLUG );
151
- }
152
- $response = array(
153
- 'error' => $error,
154
- 'msg' => $msg
155
- );
156
- wp_send_json( $response );
157
- die();
158
- }
159
-
160
- function kcSeoMainSettings_action() {
161
- global $KcSeoWPSchema;
162
- $error = true;
163
- $msg = null;
164
- if ( $KcSeoWPSchema->verifyNonce() ) {
165
- unset( $_REQUEST['action'] );
166
- unset( $_REQUEST['_kcseo_nonce'] );
167
- unset( $_REQUEST['_wp_http_referer'] );
168
- update_option( $KcSeoWPSchema->options['main_settings'], $_REQUEST );
169
- $error = false;
170
- $msg = __( 'Settings successfully updated', KCSEO_WP_SCHEMA_SLUG );
171
- } else {
172
- $msg = __( 'Security Error !!', KCSEO_WP_SCHEMA_SLUG );
173
- }
174
- $response = array(
175
- 'error' => $error,
176
- 'msg' => $msg
177
- );
178
- wp_send_json( $response );
179
- die();
180
- }
181
-
182
- function wp_schema_page() {
183
- global $KcSeoWPSchema;
184
- $KcSeoWPSchema->render( 'schema-options' );
185
- }
186
-
187
- function wp_schema_setting_page() {
188
- global $KcSeoWPSchema;
189
- $KcSeoWPSchema->render( 'settings' );
190
- }
191
-
192
- function kcSeo_Wp_Schema_menu() {
193
- global $KcSeoWPSchema;
194
- add_menu_page( 'WP SEO Structured Data Schema', 'WP SEO Schema', 'manage_options', 'wp-seo-schema',
195
- array( $this, 'wp_schema_page' ), $KcSeoWPSchema->assetsUrl . 'images/wp-seo-schema.png' );
196
- add_submenu_page( 'wp-seo-schema', 'WP SEO Schema settings', 'Settings', 'manage_options',
197
- 'wp-seo-schema-settings',
198
- array( $this, 'wp_schema_setting_page' ) );
199
-
200
- }
201
-
202
-
203
- function kcSeo_pluginInit() {
204
- load_plugin_textdomain( KCSEO_WP_SCHEMA_SLUG, false, KCSEO_WP_SCHEMA_LANGUAGE_PATH );
205
- $this->updateVariableAndFixIssue();
206
- }
207
-
208
- function activePlugin() {
209
- $this->updateVariableAndFixIssue();
210
- }
211
-
212
- function updateVariableAndFixIssue() {
213
- global $KcSeoWPSchema;
214
- $KcSeoWPSchema->fix1_2DataMigration();
215
- update_option( $KcSeoWPSchema->options['installed_version'], $KcSeoWPSchema->options['version'] );
216
- }
217
-
218
- }
 
 
 
 
 
 
 
 
 
 
 
 
219
  endif;
1
  <?php
2
 
3
+ if (!class_exists('KcSeoInit')):
4
+
5
+ class KcSeoInit {
6
+
7
+ function __construct()
8
+ {
9
+ add_action('init', array($this, 'kcSeoScript'));
10
+ add_action('admin_menu', array($this, 'kcSeo_Wp_Schema_menu'));
11
+ add_action('plugins_loaded', array($this, 'kcSeo_pluginInit'));
12
+ add_action('wp_ajax_kcSeoWpSchemaSettings', array($this, 'kcSeoWpSchemaSettings'));
13
+ add_action('wp_ajax_kcSeoMainSettings_action', array($this, 'kcSeoMainSettings_action'));
14
+ add_action('wp_ajax_newSocial', array($this, 'newSocial'));
15
+ add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_scripts'));
16
+
17
+ // for MU Site
18
+ add_action('activated_plugin', array($this, 'update_queue'), 10, 2);
19
+ add_action('deactivated_plugin', array($this, 'update_queue'), 10, 2);
20
+
21
+ register_activation_hook(KCSEO_WP_SCHEMA_PLUGIN_ACTIVE_FILE_NAME, array($this, 'activePlugin'));
22
  // register_deactivation_hook(KCSEO_WP_SCHEMA_PLUGIN_ACTIVE_FILE_NAME, array($this, 'uninstall'));
23
+ // Uninstall hook
24
+
25
+ add_filter('plugin_action_links_' . KCSEO_WP_SCHEMA_PLUGIN_ACTIVE_FILE_NAME,
26
+ array($this, 'schema_marketing'));
27
+
28
+ }
29
+
30
+ function schema_marketing($links)
31
+ {
32
+ $links[] = '<a target="_blank" href="' . esc_url('https://wpsemplugins.com/documentation/') . '">' . __("Documentation", "wp-seo-structured-data-schema") . '</a>';
33
+ $links[] = '<a target="_blank" href="' . esc_url('https://wpsemplugins.com/downloads/wordpress-schema-plugin/') . '">' . __("Get Pro", "wp-seo-structured-data-schema") . '</a>';
34
+ return $links;
35
+ }
36
+
37
+
38
+ function update_queue($plugin, $network_wide = null)
39
+ {
40
+ if (!$network_wide) {
41
+ return;
42
+ }
43
+ list($action) = explode('_', current_filter(), 2);
44
+
45
+ $action = str_replace('activated', 'activate', $action);
46
+ $queue = get_site_option("network_{$action}_queue", array());
47
+
48
+ $queue[$plugin] = (has_filter($action . '_' . $plugin) || has_filter($action . '_plugin'));
49
+ update_site_option("network_{$action}_queue", $queue);
50
+ }
51
+
52
+ function admin_enqueue_scripts()
53
+ {
54
+ global $pagenow;
55
+ // validate page
56
+ $page = isset($_REQUEST['page']) ? $_REQUEST['page'] : null;
57
+ if ($pagenow == 'admin.php' && ($page == 'wp-seo-schema' || $page == 'wp-seo-schema-settings')) {
58
+ // scripts
59
+ wp_enqueue_media();
60
+ wp_enqueue_script(array(
61
+ 'jquery',
62
+ 'kcseo-datepicker',
63
+ 'kcseo-select2-js',
64
+ 'kcseo-tooltip-js',
65
+ 'kcseo-admin-js',
66
+ ));
67
+
68
+ // styles
69
+ wp_enqueue_style(array(
70
+ 'kcseo-datepicker',
71
+ 'kcseo-select2-css',
72
+ 'kcseo-tooltip-css',
73
+ 'kcseo-admin-css',
74
+ ));
75
+ }
76
+ }
77
+
78
+ function kcSeoScript()
79
+ {
80
+ global $KcSeoWPSchema;
81
+ // register team scripts and styles
82
+ $scripts = array();
83
+ $styles = array();
84
+ if (is_admin()) {
85
+
86
+
87
+ $scripts[] = array(
88
+ 'handle' => 'kcseo-select2-js',
89
+ 'src' => $KcSeoWPSchema->assetsUrl . 'js/select2.min.js',
90
+ 'deps' => array('jquery'),
91
+ 'footer' => true
92
+ );
93
+ $scripts[] = array(
94
+ 'handle' => 'kcseo-tooltip-js',
95
+ 'src' => $KcSeoWPSchema->assetsUrl . 'js/jquery.qtip.js',
96
+ 'deps' => array('jquery'),
97
+ 'footer' => true
98
+ );
99
+
100
+ $scripts[] = array(
101
+ 'handle' => 'kcseo-datepicker',
102
+ 'src' => $KcSeoWPSchema->assetsUrl . 'vendor/bootstrap-datepicker/bootstrap-datepicker.min.js',
103
+ 'deps' => array('jquery'),
104
+ 'footer' => false
105
+ );
106
+ $scripts[] = array(
107
+ 'handle' => 'kcseo-admin-js',
108
+ 'src' => $KcSeoWPSchema->assetsUrl . 'js/admin.js',
109
+ 'deps' => array('jquery'),
110
+ 'footer' => true
111
+ );
112
+ $styles['kcseo-datepicker'] = $KcSeoWPSchema->assetsUrl . 'vendor/bootstrap-datepicker/bootstrap-datepicker3.standalone.min.css';
113
+ $styles['kcseo-select2-css'] = $KcSeoWPSchema->assetsUrl . 'css/select2.min.css';
114
+ $styles['kcseo-tooltip-css'] = $KcSeoWPSchema->assetsUrl . 'css/jquery.qtip.css';
115
+ $styles['kcseo-admin-css'] = $KcSeoWPSchema->assetsUrl . 'css/admin.css';
116
+ }
117
+ foreach ($scripts as $script) {
118
+ wp_register_script($script['handle'], $script['src'], $script['deps'], time(),
119
+ $script['footer']); //$KcSeoWPSchema->options['version']
120
+ }
121
+ foreach ($styles as $k => $v) {
122
+ wp_register_style($k, $v, false, $KcSeoWPSchema->options['version']);
123
+ }
124
+ }
125
+
126
+ function newSocial()
127
+ {
128
+ $schemaModel = new KcSeoSchemaModel;
129
+ $id = ($_REQUEST['id'] ? $_REQUEST['id'] + 1 : 0);
130
+ $html = null;
131
+ $html = "<div class='sfield'>";
132
+ $html .= "<select name='social[$id][id]'>";
133
+ foreach ($schemaModel->socialList() as $skey => $social) {
134
+ $html .= "<option value='$skey'>$social</option>";
135
+ }
136
+ $html .= "</select>";
137
+ $html .= "<input type='text' name='social[$id][link]'>";
138
+ $html .= '<span class="dashicons dashicons-trash social-remove"></span>';
139
+ $html .= "</div>";
140
+
141
+
142
+ wp_send_json(array('data' => $html));
143
+ die();
144
+ }
145
+
146
+ function kcSeoWpSchemaSettings()
147
+ {
148
+ global $KcSeoWPSchema;
149
+ $error = true;
150
+ $msg = null;
151
+ if ($KcSeoWPSchema->verifyNonce()) {
152
+ unset($_REQUEST['action']);
153
+ update_option($KcSeoWPSchema->options['settings'], $_REQUEST);
154
+ $error = false;
155
+ $msg = __('Settings successfully updated', KCSEO_WP_SCHEMA_SLUG);
156
+ } else {
157
+ $msg = __('Security Error !!', KCSEO_WP_SCHEMA_SLUG);
158
+ }
159
+ $response = array(
160
+ 'error' => $error,
161
+ 'msg' => $msg
162
+ );
163
+ wp_send_json($response);
164
+ die();
165
+ }
166
+
167
+ function kcSeoMainSettings_action()
168
+ {
169
+ global $KcSeoWPSchema;
170
+ $error = true;
171
+ $msg = null;
172
+ if ($KcSeoWPSchema->verifyNonce()) {
173
+ unset($_REQUEST['action']);
174
+ unset($_REQUEST['_kcseo_nonce']);
175
+ unset($_REQUEST['_wp_http_referer']);
176
+ update_option($KcSeoWPSchema->options['main_settings'], $_REQUEST);
177
+ $error = false;
178
+ $msg = __('Settings successfully updated', KCSEO_WP_SCHEMA_SLUG);
179
+ } else {
180
+ $msg = __('Security Error !!', KCSEO_WP_SCHEMA_SLUG);
181
+ }
182
+ $response = array(
183
+ 'error' => $error,
184
+ 'msg' => $msg
185
+ );
186
+ wp_send_json($response);
187
+ die();
188
+ }
189
+
190
+ function wp_schema_page()
191
+ {
192
+ global $KcSeoWPSchema;
193
+ $KcSeoWPSchema->render('schema-options');
194
+ }
195
+
196
+ function wp_schema_setting_page()
197
+ {
198
+ global $KcSeoWPSchema;
199
+ $KcSeoWPSchema->render('settings');
200
+ }
201
+
202
+ function kcSeo_Wp_Schema_menu()
203
+ {
204
+ global $KcSeoWPSchema;
205
+ add_menu_page(__('WP SEO Structured Data Schema', "wp-seo-structured-data-schema"), __('WP SEO Schema', "wp-seo-structured-data-schema"), 'manage_options', 'wp-seo-schema',
206
+ array($this, 'wp_schema_page'), $KcSeoWPSchema->assetsUrl . 'images/wp-seo-schema.png');
207
+ add_submenu_page('wp-seo-schema', __('WP SEO Schema settings', "wp-seo-structured-data-schema"), __('Settings', "wp-seo-structured-data-schema"), 'manage_options',
208
+ 'wp-seo-schema-settings',
209
+ array($this, 'wp_schema_setting_page'));
210
+
211
+ }
212
+
213
+
214
+ function kcSeo_pluginInit()
215
+ {
216
+ load_plugin_textdomain(KCSEO_WP_SCHEMA_SLUG, false, KCSEO_WP_SCHEMA_LANGUAGE_PATH);
217
+ $this->updateVariableAndFixIssue();
218
+ }
219
+
220
+ function activePlugin()
221
+ {
222
+ $this->updateVariableAndFixIssue();
223
+ }
224
+
225
+ function updateVariableAndFixIssue()
226
+ {
227
+ global $KcSeoWPSchema;
228
+ $KcSeoWPSchema->fix1_2DataMigration();
229
+ update_option($KcSeoWPSchema->options['installed_version'], $KcSeoWPSchema->options['version']);
230
+ }
231
+
232
+ }
233
  endif;
lib/classes/KcSeoMetaData.php CHANGED
@@ -1,48 +1,50 @@
1
  <?php
2
 
3
- if(!class_exists('KcSeoMetaData')):
 
 
4
 
5
- class KcSeoMetaData
6
- {
7
  function __construct()
8
  {
9
- add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_scripts'));
10
- add_action( 'save_post', array($this, 'save_KcSeo_schema_data'),10, 3);
11
  }
12
 
13
- function admin_enqueue_scripts(){
 
14
  global $pagenow, $typenow, $KcSeoWPSchema;
15
  // validate page
16
  $pt = $KcSeoWPSchema->kcSeoPostTypes();
17
- if( !in_array( $pagenow, array('post.php', 'post-new.php') ) ) return;
18
- if(!in_array($typenow, $pt)) return;
19
 
20
  // scripts
21
  wp_enqueue_script(array(
22
  'jquery',
23
- 'kcseo-datepicker',
24
  'kcseo-select2-js',
25
  'kcseo-admin-js',
26
  ));
27
 
28
  // styles
29
  wp_enqueue_style(array(
30
- 'kcseo-datepicker',
31
  'kcseo-select2-css',
32
  'kcseo-admin-css',
33
  ));
34
 
35
- add_action('admin_head', array($this,'admin_head'));
36
  }
37
 
38
- function admin_head(){
 
39
  global $KcSeoWPSchema;
40
  $pt = $KcSeoWPSchema->kcSeoPostTypes();
41
- foreach($pt as $postType){
42
  add_meta_box(
43
  'kcseo-wordpres-seo-structured-data-schema-meta-box',
44
  __('WP SEO Structured Data Schema by <a href="https://wpsemplugins.com/">WPSEMPlugins.com</a>', KCSEO_WP_SCHEMA_SLUG),
45
- array($this,'meta_box_wp_schema'),
46
  $postType,
47
  'normal',
48
  'high'
@@ -51,84 +53,86 @@ if(!class_exists('KcSeoMetaData')):
51
 
52
  }
53
 
54
- function meta_box_wp_schema($post){
 
55
  global $KcSeoWPSchema;
56
- wp_nonce_field( $KcSeoWPSchema->nonceText(), '_kcseo_nonce' );
57
  $schemas = new KcSeoSchemaModel();
58
  $html = null;
59
- $html .="<div class='schema-tips'>";
60
- $html .= "<p><span>Tip:</span> For more detailed information on how to configure this plugin, please visit: <a href='https://wpsemplugins.com/wordpress-seo-structured-data-schema-plugin/'>https://wpsemplugins.com/wordpress-seo-structured-data-schema-plugin/</a></p>";
61
- $html .= "<p><span>Tip:</span> Once you save these structured data schema settings, validate this page url here: <a href='https://developers.google.com/structured-data/testing-tool/'>https://developers.google.com/structured-data/testing-tool/</a></p>";
62
- $html .= "<div class='kc-get-pro'>
63
- <strong>Pro Version Features</strong>
64
  <ol>
65
- <li>Includes Auto-fill function <---Popular</li>
66
- <li>Supports Custom Post Types beyond default page and posts</li>
67
- <li>Supports WordPress Multisite</li>
68
- <li>Supports more schema types: ( Books, Courses, Job Postings, Movies, Music, Recipe, TV Episode) </li>
69
  </ol>
70
- <a class='button button-primary' href='https://wpsemplugins.com/downloads/wordpress-schema-plugin/' target='_blank'>Get the Pro Version</a>
71
  </div>";
72
- $html .="</div>";
73
  $html .= "<div class='schema-holder'>";
74
- $html .= '<div id="meta-tab-holder" class="rt-tab-container">';
75
- $htmlMenu = null;
76
- $htmlCont = null;
77
- $htmlMenu .= "<ul class='rt-tab-nav'>";
78
- $schemaFields = $schemas->schemaTypes();
79
- foreach($schemaFields as $schemaID => $schema){
80
- $tabId = $KcSeoWPSchema->KcSeoPrefix.$schemaID;
81
- $htmlMenu .= '<li><a href="#'.$tabId.'">'.$schema['title'].'</a></li>';
82
- $htmlCont .="<div id='{$tabId}' class='rt-tab-content'>";
83
- $metaData = get_post_meta($post->ID, $tabId, true );
84
- $metaData = (is_array($metaData) ? $metaData : array());
85
- foreach($schema['fields'] as $fieldId => $data){
86
- $data['fieldId'] = $fieldId;
87
- $data['id'] = $tabId."_".$fieldId;
88
- $data['name']=$tabId."[{$fieldId}]";
89
- $data['value'] = (!empty($metaData[$fieldId]) ? $metaData[$fieldId] : null);
90
- $htmlCont .= $schemas->get_field($data);
91
- }
92
- $htmlCont .="</div>";
93
- }
94
- $htmlMenu .="</ul>";
95
- $html .= $htmlMenu .$htmlCont;
96
- $html .= "</div>";
97
  $html .= "</div>";
98
  echo $html;
99
  }
100
 
101
- function save_KcSeo_schema_data($post_id,$post, $update){
 
102
  if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) return $post_id;
103
  global $KcSeoWPSchema;
104
- $nonce = !empty($_REQUEST['_kcseo_nonce']) ? $_REQUEST['_kcseo_nonce'] : null;
105
- if (!wp_verify_nonce($nonce , $KcSeoWPSchema->nonceText())) return $post_id;
106
 
107
  // Check permissions
108
  if (!empty($_GET['post_type'])) {
109
  if (!current_user_can('edit_' . $_GET['post_type'], $post_id)) return $post_id;
110
  }
111
  $pt = $KcSeoWPSchema->kcSeoPostTypes();
112
- if (!in_array($post->post_type,$pt) ) return $post_id;
113
 
114
  $meta = array();
115
  $schemaModel = new KcSeoSchemaModel;
116
- $schemaFields = $schemaModel->schemaTypes();
117
- foreach($schemaFields as $schemaID => $schema){
118
- $schemaMetaId = $KcSeoWPSchema->KcSeoPrefix.$schemaID;
119
  $data = array();
120
- foreach($schema['fields'] as $fieldId => $fieldData){
121
  $value = (!empty($_REQUEST[$schemaMetaId][$fieldId]) ? $_REQUEST[$schemaMetaId][$fieldId] : null);
122
- $value = $KcSeoWPSchema->sanitize($fieldData, $value);
123
- $data[$fieldId] = $value;
124
  }
125
  $meta[$schemaMetaId] = $data;
126
  }
127
- if(count($meta) > 0){
128
- foreach($meta as $mKey => $mValue){
129
- update_post_meta($post_id, $mKey, $mValue);
130
- }
131
- }
132
  }
133
 
134
  }
1
  <?php
2
 
3
+ if (!class_exists('KcSeoMetaData')):
4
+
5
+ class KcSeoMetaData {
6
 
 
 
7
  function __construct()
8
  {
9
+ add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_scripts'));
10
+ add_action('save_post', array($this, 'save_KcSeo_schema_data'), 10, 3);
11
  }
12
 
13
+ function admin_enqueue_scripts()
14
+ {
15
  global $pagenow, $typenow, $KcSeoWPSchema;
16
  // validate page
17
  $pt = $KcSeoWPSchema->kcSeoPostTypes();
18
+ if (!in_array($pagenow, array('post.php', 'post-new.php'))) return;
19
+ if (!in_array($typenow, $pt)) return;
20
 
21
  // scripts
22
  wp_enqueue_script(array(
23
  'jquery',
24
+ 'kcseo-datepicker',
25
  'kcseo-select2-js',
26
  'kcseo-admin-js',
27
  ));
28
 
29
  // styles
30
  wp_enqueue_style(array(
31
+ 'kcseo-datepicker',
32
  'kcseo-select2-css',
33
  'kcseo-admin-css',
34
  ));
35
 
36
+ add_action('admin_head', array($this, 'admin_head'));
37
  }
38
 
39
+ function admin_head()
40
+ {
41
  global $KcSeoWPSchema;
42
  $pt = $KcSeoWPSchema->kcSeoPostTypes();
43
+ foreach ($pt as $postType) {
44
  add_meta_box(
45
  'kcseo-wordpres-seo-structured-data-schema-meta-box',
46
  __('WP SEO Structured Data Schema by <a href="https://wpsemplugins.com/">WPSEMPlugins.com</a>', KCSEO_WP_SCHEMA_SLUG),
47
+ array($this, 'meta_box_wp_schema'),
48
  $postType,
49
  'normal',
50
  'high'
53
 
54
  }
55
 
56
+ function meta_box_wp_schema($post)
57
+ {
58
  global $KcSeoWPSchema;
59
+ wp_nonce_field($KcSeoWPSchema->nonceText(), '_kcseo_nonce');
60
  $schemas = new KcSeoSchemaModel();
61
  $html = null;
62
+ $html .= "<div class='schema-tips'>";
63
+ $html .= "<p><span>Tip:</span> " . __("For more detailed information on how to configure this plugin, please visit:", "wp-seo-structured-data-schema") . " <a href='https://wpsemplugins.com/wordpress-seo-structured-data-schema-plugin/'>https://wpsemplugins.com/wordpress-seo-structured-data-schema-plugin/</a></p>";
64
+ $html .= "<p><span>Tip:</span> " . __("Once you save these structured data schema settings, validate this page url here:", "wp-seo-structured-data-schema") . " <a href='https://developers.google.com/structured-data/testing-tool/'>https://developers.google.com/structured-data/testing-tool/</a></p>";
65
+ $html .= "<div class='kc-get-pro'>
66
+ <strong>" . __("Pro Version Features", "wp-seo-structured-data-schema") . "</strong>
67
  <ol>
68
+ <li>" . __("Includes Auto-fill function <---Popular", "wp-seo-structured-data-schema") . "</li>
69
+ <li>" . __("Supports Custom Post Types beyond default page and posts", "wp-seo-structured-data-schema") . "</li>
70
+ <li>" . __("Supports WordPress Multisite", "wp-seo-structured-data-schema") . "</li>
71
+ <li>" . __("Supports more schema types: ( Books, Courses, Job Postings, Movies, Music, Recipe, TV Episode) ", "wp-seo-structured-data-schema") . "</li>
72
  </ol>
73
+ <a class='button button-primary' href='https://wpsemplugins.com/downloads/wordpress-schema-plugin/' target='_blank'>" . __("Get the Pro Version", "wp-seo-structured-data-schema") . "</a>
74
  </div>";
75
+ $html .= "</div>";
76
  $html .= "<div class='schema-holder'>";
77
+ $html .= '<div id="meta-tab-holder" class="rt-tab-container">';
78
+ $htmlMenu = null;
79
+ $htmlCont = null;
80
+ $htmlMenu .= "<ul class='rt-tab-nav'>";
81
+ $schemaFields = $schemas->schemaTypes();
82
+ foreach ($schemaFields as $schemaID => $schema) {
83
+ $tabId = $KcSeoWPSchema->KcSeoPrefix . $schemaID;
84
+ $htmlMenu .= '<li><a href="#' . $tabId . '">' . $schema['title'] . '</a></li>';
85
+ $htmlCont .= "<div id='{$tabId}' class='rt-tab-content'>";
86
+ $metaData = get_post_meta($post->ID, $tabId, true);
87
+ $metaData = (is_array($metaData) ? $metaData : array());
88
+ foreach ($schema['fields'] as $fieldId => $data) {
89
+ $data['fieldId'] = $fieldId;
90
+ $data['id'] = $tabId . "_" . $fieldId;
91
+ $data['name'] = $tabId . "[{$fieldId}]";
92
+ $data['value'] = (!empty($metaData[$fieldId]) ? $metaData[$fieldId] : null);
93
+ $htmlCont .= $schemas->get_field($data);
94
+ }
95
+ $htmlCont .= "</div>";
96
+ }
97
+ $htmlMenu .= "</ul>";
98
+ $html .= $htmlMenu . $htmlCont;
99
+ $html .= "</div>";
100
  $html .= "</div>";
101
  echo $html;
102
  }
103
 
104
+ function save_KcSeo_schema_data($post_id, $post, $update)
105
+ {
106
  if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) return $post_id;
107
  global $KcSeoWPSchema;
108
+ $nonce = !empty($_REQUEST['_kcseo_nonce']) ? $_REQUEST['_kcseo_nonce'] : null;
109
+ if (!wp_verify_nonce($nonce, $KcSeoWPSchema->nonceText())) return $post_id;
110
 
111
  // Check permissions
112
  if (!empty($_GET['post_type'])) {
113
  if (!current_user_can('edit_' . $_GET['post_type'], $post_id)) return $post_id;
114
  }
115
  $pt = $KcSeoWPSchema->kcSeoPostTypes();
116
+ if (!in_array($post->post_type, $pt)) return $post_id;
117
 
118
  $meta = array();
119
  $schemaModel = new KcSeoSchemaModel;
120
+ $schemaFields = $schemaModel->schemaTypes();
121
+ foreach ($schemaFields as $schemaID => $schema) {
122
+ $schemaMetaId = $KcSeoWPSchema->KcSeoPrefix . $schemaID;
123
  $data = array();
124
+ foreach ($schema['fields'] as $fieldId => $fieldData) {
125
  $value = (!empty($_REQUEST[$schemaMetaId][$fieldId]) ? $_REQUEST[$schemaMetaId][$fieldId] : null);
126
+ $value = $KcSeoWPSchema->sanitize($fieldData, $value);
127
+ $data[$fieldId] = $value;
128
  }
129
  $meta[$schemaMetaId] = $data;
130
  }
131
+ if (count($meta) > 0) {
132
+ foreach ($meta as $mKey => $mValue) {
133
+ update_post_meta($post_id, $mKey, $mValue);
134
+ }
135
+ }
136
  }
137
 
138
  }
lib/classes/KcSeoOutput.php CHANGED
@@ -187,15 +187,17 @@ if ( ! class_exists( 'KcSeoOutput' ) ):
187
 
188
  $main_settings = get_option( $KcSeoWPSchema->options['main_settings'] );
189
  $site_schema = !empty($main_settings['site_schema']) ? $main_settings['site_schema'] : 'home_page';
190
- if ( $webMeta["@type"] ) {
191
- if($site_schema == 'home_page'){
192
- if(is_home() || is_front_page()){
193
- $html .= $schemaModel->get_jsonEncode( $webMeta );
194
- }
195
- }elseif($site_schema == 'all'){
196
- $html .= $schemaModel->get_jsonEncode( $webMeta );
197
- }
198
- }
 
 
199
 
200
  if ( is_single() || is_page() ) {
201
  foreach ( $schemaModel->schemaTypes() as $schemaID => $schema ) {
187
 
188
  $main_settings = get_option( $KcSeoWPSchema->options['main_settings'] );
189
  $site_schema = !empty($main_settings['site_schema']) ? $main_settings['site_schema'] : 'home_page';
190
+ if ($site_schema !== 'off') {
191
+ if ($webMeta["@type"]) {
192
+ if ($site_schema == 'home_page') {
193
+ if (is_home() || is_front_page()) {
194
+ $html .= $schemaModel->get_jsonEncode($webMeta);
195
+ }
196
+ } elseif ($site_schema == 'all') {
197
+ $html .= $schemaModel->get_jsonEncode($webMeta);
198
+ }
199
+ }
200
+ }
201
 
202
  if ( is_single() || is_page() ) {
203
  foreach ( $schemaModel->schemaTypes() as $schemaID => $schema ) {
lib/models/KcSeoSchemaModel.php CHANGED
@@ -1,343 +1,346 @@
1
  <?php
2
 
3
- if ( ! class_exists( 'KcSeoSchemaModel' ) ):
4
- class KcSeoSchemaModel {
5
- function __construct() {
6
 
7
- }
 
8
 
9
- function schemaOutput( $schemaID, $metaData ) {
10
- $html = null;
11
 
12
- if ( $schemaID ) {
13
- global $KcSeoWPSchema;
14
- switch ( $schemaID ) {
15
- case "article":
16
- $article = array();
17
- $article["@context"] = "http://schema.org";
18
- $article["@type"] = "Article";
19
- if ( ! empty( $metaData['headline'] ) ) {
20
- $article["headline"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['headline'] );
21
- }
22
- if ( ! empty( $metaData['mainEntityOfPage'] ) ) {
23
- $article["mainEntityOfPage"] = array(
24
- "@type" => "WebPage",
25
- "@id" => $KcSeoWPSchema->sanitizeOutPut( $metaData["mainEntityOfPage"] )
26
- );
27
- }
28
- if ( ! empty( $metaData['author'] ) ) {
29
- $article["author"] = array(
30
- "@type" => "Person",
31
- "name" => $KcSeoWPSchema->sanitizeOutPut( $metaData['author'] )
32
- );
33
- }
34
- if ( ! empty( $metaData['publisher'] ) ) {
35
- if ( ! empty( $metaData['publisherImage'] ) ) {
36
- $img = $KcSeoWPSchema->imageInfo( absint( $metaData['publisherImage'] ) );
37
- $plA = array(
38
- "@type" => "ImageObject",
39
- "url" => $KcSeoWPSchema->sanitizeOutPut( $img['url'], 'url' ),
40
- "height" => $img['height'],
41
- "width" => $img['width']
42
- );
43
- } else {
44
- $plA = array();
45
- }
46
- $article["publisher"] = array(
47
- "@type" => "Organization",
48
- "name" => $KcSeoWPSchema->sanitizeOutPut( $metaData['publisher'] ),
49
- "logo" => $plA
50
- );
51
- }
52
- if ( ! empty( $metaData['alternativeHeadline'] ) ) {
53
- $article["alternativeHeadline"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['alternativeHeadline'] );
54
- }
55
- if ( ! empty( $metaData['image'] ) ) {
56
- $img = $KcSeoWPSchema->imageInfo( absint( $metaData['image'] ) );
57
- $article["image"] = array(
58
- "@type" => "ImageObject",
59
- "url" => $KcSeoWPSchema->sanitizeOutPut( $img['url'], 'url' ),
60
- "height" => $img['height'],
61
- "width" => $img['width']
62
- );
63
- }
64
- if ( ! empty( $metaData['datePublished'] ) ) {
65
- $article["datePublished"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['datePublished'] );
66
- }
67
- if ( ! empty( $metaData['dateModified'] ) ) {
68
- $article["dateModified"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['dateModified'] );
69
- }
70
- if ( ! empty( $metaData['description'] ) ) {
71
- $article["description"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['description'],
72
- 'textarea' );
73
- }
74
- if ( ! empty( $metaData['articleBody'] ) ) {
75
- $article["articleBody"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['articleBody'],
76
- 'textarea' );
77
- }
78
- $html .= $this->get_jsonEncode( $article );
79
- break;
80
 
81
- case "news_article":
82
- $newsArticle = array();
83
- $newsArticle["@context"] = "http://schema.org";
84
- $newsArticle["@type"] = "NewsArticle";
85
- if ( ! empty( $metaData['headline'] ) ) {
86
- $newsArticle["headline"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['headline'] );
87
- }
88
- if ( ! empty( $metaData['mainEntityOfPage'] ) ) {
89
- $newsArticle["mainEntityOfPage"] = array(
90
- "@type" => "WebPage",
91
- "@id" => $KcSeoWPSchema->sanitizeOutPut( $metaData["mainEntityOfPage"] )
92
- );
93
- }
94
- if ( ! empty( $metaData['author'] ) ) {
95
- $newsArticle["author"] = array(
96
- "@type" => "Person",
97
- "name" => $KcSeoWPSchema->sanitizeOutPut( $metaData['author'] )
98
- );
99
- }
100
- if ( ! empty( $metaData['image'] ) ) {
101
- $img = $KcSeoWPSchema->imageInfo( absint( $metaData['image'] ) );
102
- $newsArticle["image"] = array(
103
- "@type" => "ImageObject",
104
- "url" => $KcSeoWPSchema->sanitizeOutPut( $img['url'], 'url' ),
105
- "height" => $img['height'],
106
- "width" => $img['width']
107
- );
108
- }
109
- if ( ! empty( $metaData['datePublished'] ) ) {
110
- $newsArticle["datePublished"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['datePublished'] );
111
- }
112
- if ( ! empty( $metaData['dateModified'] ) ) {
113
- $newsArticle["dateModified"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['dateModified'] );
114
- }
115
- if ( ! empty( $metaData['publisher'] ) ) {
116
- if ( ! empty( $metaData['publisherImage'] ) ) {
117
- $img = $KcSeoWPSchema->imageInfo( absint( $metaData['publisherImage'] ) );
118
- $plA = array(
119
- "@type" => "ImageObject",
120
- "url" => $KcSeoWPSchema->sanitizeOutPut( $img['url'], 'url' ),
121
- "height" => $img['height'],
122
- "width" => $img['width']
123
- );
124
- } else {
125
- $plA = array();
126
- }
127
- $newsArticle["publisher"] = array(
128
- "@type" => "Organization",
129
- "name" => $KcSeoWPSchema->sanitizeOutPut( $metaData['publisher'] ),
130
- "logo" => $plA
131
- );
132
- }
133
- if ( ! empty( $metaData['description'] ) ) {
134
- $newsArticle["description"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['description'],
135
- 'textarea' );
136
- }
137
- if ( ! empty( $metaData['articleBody'] ) ) {
138
- $newsArticle["articleBody"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['articleBody'],
139
- 'textarea' );
140
- }
141
- $html .= $this->get_jsonEncode( $newsArticle );
142
- break;
 
 
 
 
 
 
143
 
144
- case "blog_posting":
145
- $blogPosting = array();
146
- $blogPosting["@context"] = "http://schema.org";
147
- $blogPosting["@type"] = "BlogPosting";
148
- if ( ! empty( $metaData['headline'] ) ) {
149
- $blogPosting["headline"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['headline'] );
150
- }
151
- if ( ! empty( $metaData['mainEntityOfPage'] ) ) {
152
- $blogPosting["mainEntityOfPage"] = array(
153
- "@type" => "WebPage",
154
- "@id" => $KcSeoWPSchema->sanitizeOutPut( $metaData["mainEntityOfPage"] )
155
- );
156
- }
157
- if ( ! empty( $metaData['author'] ) ) {
158
- $blogPosting["author"] = array(
159
- "@type" => "Person",
160
- "name" => $KcSeoWPSchema->sanitizeOutPut( $metaData['author'] )
161
- );
162
- }
163
- if ( ! empty( $metaData['image'] ) ) {
164
- $img = $KcSeoWPSchema->imageInfo( absint( $metaData['image'] ) );
165
- $blogPosting["image"] = array(
166
- "@type" => "ImageObject",
167
- "url" => $KcSeoWPSchema->sanitizeOutPut( $img['url'], 'url' ),
168
- "height" => $img['height'],
169
- "width" => $img['width']
170
- );
171
- }
172
- if ( ! empty( $metaData['datePublished'] ) ) {
173
- $blogPosting["datePublished"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['datePublished'] );
174
- }
175
- if ( ! empty( $metaData['dateModified'] ) ) {
176
- $blogPosting["dateModified"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['dateModified'] );
177
- }
178
- if ( ! empty( $metaData['publisher'] ) ) {
179
- if ( ! empty( $metaData['publisherImage'] ) ) {
180
- $img = $KcSeoWPSchema->imageInfo( absint( $metaData['publisherImage'] ) );
181
- $plA = array(
182
- "@type" => "ImageObject",
183
- "url" => $KcSeoWPSchema->sanitizeOutPut( $img['url'], 'url' ),
184
- "height" => $img['height'],
185
- "width" => $img['width']
186
- );
187
- } else {
188
- $plA = array();
189
- }
190
- $blogPosting["publisher"] = array(
191
- "@type" => "Organization",
192
- "name" => $KcSeoWPSchema->sanitizeOutPut( $metaData['publisher'] ),
193
- "logo" => $plA
194
- );
195
- }
196
- if ( ! empty( $metaData['description'] ) ) {
197
- $blogPosting["description"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['description'],
198
- 'textarea' );
199
- }
200
- if ( ! empty( $metaData['articleBody'] ) ) {
201
- $blogPosting["articleBody"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['articleBody'],
202
- 'textarea' );
203
- }
204
- $html .= $this->get_jsonEncode( $blogPosting );
205
- break;
206
 
207
- case 'event':
208
- $event = array();
209
- $event["@context"] = "http://schema.org";
210
- $event["@type"] = "Event";
211
- if ( ! empty( $metaData['name'] ) ) {
212
- $event["name"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['name'] );
213
- }
214
- if ( ! empty( $metaData['startDate'] ) ) {
215
- $event["startDate"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['startDate'] );
216
- }
217
- if ( ! empty( $metaData['endDate'] ) ) {
218
- $event["endDate"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['endDate'] );
219
- }
220
- if ( ! empty( $metaData['description'] ) ) {
221
- $event["description"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['description'],
222
- 'textarea' );
223
- }
224
- if ( ! empty( $metaData['performerName'] ) ) {
225
- $event["performer"] = array(
226
- "@type" => "Person",
227
- "name" => $KcSeoWPSchema->sanitizeOutPut( $metaData['performerName'] )
228
- );
229
- }
230
- if ( ! empty( $metaData['image'] ) ) {
231
- $event["image"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['image'], 'url' );
232
- }
233
- if ( ! empty( $metaData['locationName'] ) ) {
234
- $event["location"] = array(
235
- "@type" => "Place",
236
- "name" => $KcSeoWPSchema->sanitizeOutPut( $metaData['locationName'] ),
237
- "address" => $KcSeoWPSchema->sanitizeOutPut( $metaData['locationAddress'] )
238
- );
239
- }
240
- if ( ! empty( $metaData['price'] ) ) {
241
- $event["offers"] = array(
242
- "@type" => "Offer",
243
- "price" => $KcSeoWPSchema->sanitizeOutPut( $metaData['price'] ),
244
- "priceCurrency" => ! empty( $metaData['priceCurrency'] ) ? $KcSeoWPSchema->sanitizeOutPut( $metaData['priceCurrency'] ) : null,
245
- "url" => ! empty( $metaData['url'] ) ? $KcSeoWPSchema->sanitizeOutPut( $metaData['url'],
246
- 'url' ) : null
247
- );
248
- }
249
- if ( ! empty( $metaData['url'] ) ) {
250
- $event["url"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['url'], 'url' );
251
- }
252
- $html .= $this->get_jsonEncode( $event );
253
- break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
254
 
255
- case 'product':
256
- $product = array();
257
- $product["@context"] = "http://schema.org";
258
- $product["@type"] = "Product";
259
- if ( ! empty( $metaData['name'] ) ) {
260
- $product["name"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['name'] );
261
- }
262
- if ( ! empty( $metaData['image'] ) ) {
263
- $img = $KcSeoWPSchema->imageInfo( absint( $metaData['image'] ) );
264
- $product["image"] = $KcSeoWPSchema->sanitizeOutPut( $img['url'], 'url' );
265
- }
266
- if ( ! empty( $metaData['description'] ) ) {
267
- $product["description"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['description'] );
268
- }
269
- if ( ! empty( $metaData['brand'] ) ) {
270
- $product["brand"] = array(
271
- "@type" => "Thing",
272
- "name" => $KcSeoWPSchema->sanitizeOutPut( $metaData['brand'] )
273
- );
274
- }
275
- if ( ! empty( $metaData['ratingValue'] ) ) {
276
- $product["aggregateRating"] = array(
277
- "@type" => "AggregateRating",
278
- "ratingValue" => ! empty( $metaData['ratingValue'] ) ? $KcSeoWPSchema->sanitizeOutPut( $metaData['ratingValue'] ) : null,
279
- "reviewCount" => ! empty( $metaData['reviewCount'] ) ? $KcSeoWPSchema->sanitizeOutPut( $metaData['reviewCount'] ) : null
280
- );
281
- }
282
- if ( ! empty( $metaData['price'] ) ) {
283
- $product["offers"] = array(
284
- "@type" => "Offer",
285
- "price" => $KcSeoWPSchema->sanitizeOutPut( $metaData['price'] ),
286
- "priceCurrency" => ! empty( $metaData['priceCurrency'] ) ? $KcSeoWPSchema->sanitizeOutPut( $metaData['priceCurrency'] ) : null,
287
- "itemCondition" => ! empty( $metaData['itemCondition'] ) ? $KcSeoWPSchema->sanitizeOutPut( $metaData['itemCondition'] ) : null,
288
- "availability" => ! empty( $metaData['availability'] ) ? $KcSeoWPSchema->sanitizeOutPut( $metaData['availability'] ) : null,
289
- "url" => ! empty( $metaData['url'] ) ? $KcSeoWPSchema->sanitizeOutPut( $metaData['url'] ) : null
290
- );
291
- }
292
- $html .= $this->get_jsonEncode( $product );
293
- break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
294
 
295
- case 'video':
296
- $video = array();
297
- $video["@context"] = "http://schema.org";
298
- $video["@type"] = "VideoObject";
299
- if ( ! empty( $metaData['name'] ) ) {
300
- $video["name"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['name'] );
301
- }
302
- if ( ! empty( $metaData['description'] ) ) {
303
- $video["description"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['description'],
304
- 'textarea' );
305
- }
306
- if ( ! empty( $metaData['description'] ) ) {
307
- $video["description"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['description'] );
308
- }
309
- if ( ! empty( $metaData['thumbnailUrl'] ) ) {
310
- $video["thumbnailUrl"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['thumbnailUrl'], 'url' );
311
- }
312
- if ( ! empty( $metaData['uploadDate'] ) ) {
313
- $video["uploadDate"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['uploadDate'] );
314
- }
315
- if ( ! empty( $metaData['duration'] ) ) {
316
- $video["duration"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['duration'] );
317
- }
318
- if ( ! empty( $metaData['contentUrl'] ) ) {
319
- $video["contentUrl"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['contentUrl'], 'url' );
320
- }
321
- if ( ! empty( $metaData['interactionCount'] ) ) {
322
- $video["interactionCount"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['interactionCount'] );
323
- }
324
- if ( ! empty( $metaData['expires'] ) ) {
325
- $video["expires"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['expires'] );
326
- }
327
- $html .= $this->get_jsonEncode( $video );
328
- break;
329
 
330
- case 'service':
331
- $service = array();
332
- $service["@context"] = "http://schema.org";
333
- $service["@type"] = "Service";
334
- if ( ! empty( $metaData['name'] ) ) {
335
- $service["name"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['name'] );
336
- }
337
- if ( ! empty( $metaData['serviceType'] ) ) {
338
- $service["serviceType"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['serviceType'] );
339
- }
340
- /*
341
  if ( ! empty( $metaData['locationName'] ) ) {
342
  $service["location"] = array(
343
  "@type" => "Place",
@@ -345,1680 +348,1690 @@ if ( ! class_exists( 'KcSeoSchemaModel' ) ):
345
  "address" => $KcSeoWPSchema->sanitizeOutPut( $metaData['locationAddress'] )
346
  );
347
  }*/
348
- if ( ! empty( $metaData['award'] ) ) {
349
- $service["award"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['award'] );
350
- }
351
- if ( ! empty( $metaData['category'] ) ) {
352
- $service["category"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['category'] );
353
- }
354
- if ( ! empty( $metaData['providerMobility'] ) ) {
355
- $service["providerMobility"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['providerMobility'] );
356
- }
357
- if ( ! empty( $metaData['additionalType'] ) ) {
358
- $service["additionalType"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['additionalType'] );
359
- }
360
- if ( ! empty( $metaData['alternateName'] ) ) {
361
- $service["alternateName"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['alternateName'] );
362
- }
363
- if ( ! empty( $metaData['image'] ) ) {
364
- $service["image"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['image'] );
365
- }
366
- if ( ! empty( $metaData['mainEntityOfPage'] ) ) {
367
- $service["mainEntityOfPage"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['mainEntityOfPage'] );
368
- }
369
- if ( ! empty( $metaData['sameAs'] ) ) {
370
- $service["sameAs"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['sameAs'] );
371
- }
372
- if ( ! empty( $metaData['url'] ) ) {
373
- $service["url"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['url'], 'url' );
374
- }
375
- $html .= $this->get_jsonEncode( $service );
376
- break;
377
 
378
- case 'review':
379
- $review = array();
380
- $review["@context"] = "http://schema.org";
381
- $review["@type"] = "Review";
382
- if ( ! empty( $metaData['itemName'] ) ) {
383
- $review["itemReviewed"] = array(
384
- "@type" => "Thing",
385
- "name" => $KcSeoWPSchema->sanitizeOutPut( $metaData['itemName'] )
386
- );
387
- }
388
- if ( ! empty( $metaData['ratingValue'] ) ) {
389
- $review["reviewRating"] = array(
390
- "@type" => "Rating",
391
- "ratingValue" => $KcSeoWPSchema->sanitizeOutPut( $metaData['ratingValue'] ),
392
- "bestRating" => $KcSeoWPSchema->sanitizeOutPut( $metaData['bestRating'] ),
393
- "worstRating" => $KcSeoWPSchema->sanitizeOutPut( $metaData['worstRating'] )
394
- );
395
- }
396
- if ( ! empty( $metaData['name'] ) ) {
397
- $review["name"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['name'] );
398
- }
399
- if ( ! empty( $metaData['author'] ) ) {
400
- $review["author"] = array(
401
- "@type" => "Person",
402
- "name" => $KcSeoWPSchema->sanitizeOutPut( $metaData['author'] )
403
- );
404
- }
405
- if ( ! empty( $metaData['reviewBody'] ) ) {
406
- $review["reviewBody"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['reviewBody'] );
407
- }
408
- if ( ! empty( $metaData['datePublished'] ) ) {
409
- $review["datePublished"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['datePublished'] );
410
- }
411
- if ( ! empty( $metaData['publisher'] ) ) {
412
- $review["publisher"] = array(
413
- "@type" => "Organization",
414
- "name" => $KcSeoWPSchema->sanitizeOutPut( $metaData['publisher'] )
415
- );
416
- }
417
- $html .= $this->get_jsonEncode( $review );
418
- break;
419
- case 'aggregate_rating':
420
- $aRating = array();
421
- $aRating["@context"] = "http://schema.org";
422
- $aRating["@type"] = ! empty( $metaData['schema_type'] ) ? $metaData['schema_type'] : "LocalBusiness";
423
- if ( ! empty( $metaData['name'] ) ) {
424
- $aRating["name"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['name'] );
425
- }
426
- if ( ! empty( $metaData['description'] ) ) {
427
- $aRating["description"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['description'],
428
- 'textarea' );
429
- }
430
- if ( $aRating["@type"] != "Organization" ) {
431
- if ( ! empty( $metaData['image'] ) ) {
432
- $img = $KcSeoWPSchema->imageInfo( absint( $metaData['image'] ) );
433
- $aRating["image"] = array(
434
- "@type" => "ImageObject",
435
- "url" => $KcSeoWPSchema->sanitizeOutPut( $img['url'], 'url' ),
436
- "height" => $img['height'],
437
- "width" => $img['width']
438
- );
439
- }
440
- if ( ! empty( $metaData['priceRange'] ) ) {
441
- $aRating["priceRange"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['priceRange'] );
442
- }
443
- if ( ! empty( $metaData['telephone'] ) ) {
444
- $aRating["telephone"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['telephone'] );
445
- }
446
 
447
- if ( ! empty( $metaData['address'] ) ) {
448
- $aRating["address"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['address'] );
449
- }
450
- }
451
 
452
- if ( ! empty( $metaData['ratingValue'] ) ) {
453
- $rValue = array();
454
- $rValue["@type"] = "AggregateRating";
455
- $rValue["ratingValue"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['ratingValue'] );
456
- if ( ! empty( $metaData['bestRating'] ) ) {
457
- $rValue["bestRating"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['bestRating'] );
458
- }
459
- if ( ! empty( $metaData['worstRating'] ) ) {
460
- $rValue["worstRating"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['worstRating'] );
461
- }
462
- if ( ! empty( $metaData['ratingCount'] ) ) {
463
- $rValue["ratingCount"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['ratingCount'] );
464
- }
465
 
466
- $aRating["aggregateRating"] = $rValue;
467
- }
468
- $html .= $this->get_jsonEncode( $aRating );
469
- break;
470
 
471
- case 'restaurant':
472
- $restaurant = array();
473
- $restaurant["@context"] = "http://schema.org";
474
- $restaurant["@type"] = "Restaurant";
475
- if ( ! empty( $metaData['name'] ) ) {
476
- $restaurant["name"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['name'] );
477
- }
478
- if ( ! empty( $metaData['description'] ) ) {
479
- $restaurant["description"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['description'],
480
- 'textarea' );
481
- }
482
- if ( ! empty( $metaData['openingHours'] ) ) {
483
- $restaurant["openingHours"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['openingHours'],
484
- 'textarea' );
485
- }
486
- if ( ! empty( $metaData['telephone'] ) ) {
487
- $restaurant["telephone"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['telephone'] );
488
- }
489
- if ( ! empty( $metaData['menu'] ) ) {
490
- $restaurant["menu"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['menu'], 'url' );
491
- }
492
- if ( ! empty( $metaData['image'] ) ) {
493
- $img = $KcSeoWPSchema->imageInfo( absint( $metaData['image'] ) );
494
- $restaurant["image"] = $KcSeoWPSchema->sanitizeOutPut( $img['url'], 'url' );
495
- }
496
- if ( ! empty( $metaData['address'] ) ) {
497
- $restaurant["address"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['address'], 'textarea' );
498
- }
499
- if ( ! empty( $metaData['priceRange'] ) ) {
500
- $restaurant["priceRange"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['priceRange'] );
501
- }
502
- if ( ! empty( $metaData['servesCuisine'] ) ) {
503
- $restaurant["servesCuisine"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['servesCuisine'] );
504
- }
505
- $html .= $this->get_jsonEncode( $restaurant );
506
- break;
507
 
508
- case 'localBusiness':
509
- $localBusiness = array();
510
- $localBusiness["@context"] = "http://schema.org";
511
- $localBusiness["@type"] = "LocalBusiness";
512
- if ( ! empty( $metaData['name'] ) ) {
513
- $localBusiness["name"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['name'] );
514
- }
515
- if ( ! empty( $metaData['description'] ) ) {
516
- $localBusiness["description"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['description'],
517
- 'textarea' );
518
- }
519
- if ( ! empty( $metaData['image'] ) ) {
520
- $img = $KcSeoWPSchema->imageInfo( absint( $metaData['image'] ) );
521
- $localBusiness["image"] = $KcSeoWPSchema->sanitizeOutPut( $img['url'], 'url' );
522
- }
523
- if ( ! empty( $metaData['priceRange'] ) ) {
524
- $localBusiness["priceRange"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['priceRange'] );
525
- }
526
- if ( ! empty( $metaData['addressLocality'] ) || ! empty( $metaData['addressRegion'] )
527
- || ! empty( $metaData['postalCode'] ) || ! empty( $metaData['streetAddress'] ) ) {
528
- $localBusiness["address"] = array(
529
- "@type" => "PostalAddress",
530
- "addressLocality" => $KcSeoWPSchema->sanitizeOutPut( $metaData['addressLocality'] ),
531
- "addressRegion" => $KcSeoWPSchema->sanitizeOutPut( $metaData['addressRegion'] ),
532
- "postalCode" => $KcSeoWPSchema->sanitizeOutPut( $metaData['postalCode'] ),
533
- "streetAddress" => $KcSeoWPSchema->sanitizeOutPut( $metaData['streetAddress'] )
534
- );
535
- }
536
 
537
- if ( ! empty( $metaData['telephone'] ) ) {
538
- $localBusiness["telephone"] = $KcSeoWPSchema->sanitizeOutPut( $metaData['telephone'] );
539
- }
540
- $html .= $this->get_jsonEncode( $localBusiness );
541
- break;
542
 
543
- default:
544
- break;
545
- }
546
 
547
- }
548
 
549
- return $html;
550
- }
551
 
552
- function get_field( $data ) {
553
- $html = null;
554
- global $KcSeoWPSchema;
555
- $id = $data['id'];
556
- $name = $data['name'];
557
- $value = $data['value'];
558
- $attr = ! empty( $data['attr'] ) ? $data['attr'] : null;
 
559
 
560
- $class = isset( $data['class'] ) ? ( $data['class'] ? $data['class'] : null ) : null;
561
- $require = ( isset( $data['required'] ) ? ( $data['required'] ? "<span class='required'>*</span>" : null ) : null );
562
- $title = ( isset( $data['title'] ) ? ( $data['title'] ? $data['title'] : null ) : null );
563
- $desc = ( isset( $data['desc'] ) ? ( $data['desc'] ? $data['desc'] : null ) : null );
564
- $holderClass = ( ! empty( $data['holderClass'] ) ? $data['holderClass'] : null );
565
- $html .= "<div class='field-container {$holderClass}' id='" . $id . '-container' . "'>";
566
- $html .= "<label class='field-label' for='{$id}'>{$title}{$require}</label>";
567
- $html .= "<div class='field-content' id='" . $id . '-content' . "'>";
568
- switch ( $data['type'] ) {
569
- case 'checkbox':
570
- $checked = ( $value ? "checked" : null );
571
- $html .= "<div class='kSeo-checkbox-wrapper'>";
572
- $html .= "<label for='{$id}'><input type='checkbox' id='{$id}' class='{$class}' name='{$name}' {$checked} value='1' /> Enable</label>";
573
- $html .= "</div>";
574
- break;
575
 
576
- case 'text':
577
- $html .= "<input type='text' id='{$id}' class='{$class}' name='{$name}' value='" . esc_html( $value ) . "' />";
578
- break;
579
 
580
- case 'number':
581
- $html .= "<input type='number' {$attr} id='{$id}' class='{$class}' name='{$name}' value='" . esc_attr( $value ) . "' />";
582
- break;
583
- case 'textarea':
584
- $html .= "<textarea id='{$id}' class='{$class}' name='{$name}' >" . wp_kses( $value,
585
- array() ) . "</textarea>";
586
- break;
587
 
588
- case 'image':
589
- $html .= '<div class="kSeo-image">';
590
- $ImageId = ! empty( $value ) ? absint( $value ) : 0;
591
- $image = $ingInfo = null;
592
- if ( $ImageId ) {
593
- $image = wp_get_attachment_image( $ImageId, "thumbnail" );
594
- $imgData = $KcSeoWPSchema->imageInfo( $ImageId );
595
- $ingInfo .= "<span><strong>URL: </strong>{$imgData['url']}</span>";
596
- $ingInfo .= "<span><strong>Width: </strong>{$imgData['width']}px</span>";
597
- $ingInfo .= "<span><strong>Height: </strong>{$imgData['height']}px</span>";
598
- }
599
- $html .= "<div class='kSeo-image-wrapper'>";
600
- $html .= '<span class="kSeoImgAdd"><span class="dashicons dashicons-plus-alt"></span></span>';
601
- $html .= '<span class="kSeoImgRemove ' . ( $image ? null : "kSeo-hidden" ) . '"><span class="dashicons dashicons-trash"></span></span>';
602
- $html .= '<div class="kSeo-image-preview">' . $image . '</div>';
603
- $html .= "<input type='hidden' name='{$name}' value='" . absint( $ImageId ) . "' />";
604
- $html .= "</div>";
605
- $html .= "<div class='image-info'>{$ingInfo}</div>";
606
- $html .= '</div>';
607
- break;
608
- case 'select':
609
- $html .= "<select name='{$name}' class='select2 {$class}' id='{$id}'>";
610
- if ( ! empty( $data['empty'] ) ) {
611
- $html .= "<option value=''>{$data['empty']}</option>";
612
- }
613
- if ( ! empty( $data['options'] ) && is_array( $data['options'] ) ) {
614
- if ( $this->isAssoc( $data['options'] ) ) {
615
- foreach ( $data['options'] as $optKey => $optValue ) {
616
- $slt = ( $optKey == $value ? "selected" : null );
617
- $html .= "<option value='" . esc_attr( $optKey ) . "' {$slt}>" . esc_html( $optValue ) . "</option>";
618
- }
619
- } else {
620
- foreach ( $data['options'] as $optValue ) {
621
- $slt = ( $optValue == $value ? "selected" : null );
622
- $html .= "<option value='" . esc_attr( $optValue ) . "' {$slt}>" . esc_html( $optValue ) . "</option>";
623
- }
624
- }
625
- }
626
- $html .= "</select>";
627
- break;
628
- case 'schema_type':
629
- $html .= "<select name='{$name}' class='select2 {$class}' id='{$id}'>";
630
- if ( ! empty( $data['empty'] ) ) {
631
- $html .= "<option value=''>{$data['empty']}</option>";
632
- }
633
 
634
- foreach ( $data['options'] as $key => $site ) {
635
- if ( is_array( $site ) ) {
636
- $slt = ( $key == $value ? "selected" : null );
637
- $html .= "<option value='$key' $slt>&nbsp;&nbsp;&nbsp;$key</option>";
638
- foreach ( $site as $inKey => $inSite ) {
639
- if ( is_array( $inSite ) ) {
640
- $slt = ( $inKey == $value ? "selected" : null );
641
- $html .= "<option value='$inKey' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$inKey</option>";
642
- foreach ( $inSite as $inInKey => $inInSite ) {
643
- if ( is_array( $inInSite ) ) {
644
- $slt = ( $inInKey == $value ? "selected" : null );
645
- $html .= "<option value='$inInKey' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$inInKey</option>";
646
- foreach ( $inInSite as $iSite ) {
647
- $slt = ( $iSite == $value ? "selected" : null );
648
- $html .= "<option value='$iSite' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$iSite</option>";
649
- }
650
- } else {
651
- $slt = ( $inInSite == $value ? "selected" : null );
652
- $html .= "<option value='$inInSite' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$inInSite</option>";
653
- }
654
- }
655
- } else {
656
- $slt = ( $inSite == $value ? "selected" : null );
657
- $html .= "<option value='$inSite' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$inSite</option>";
658
- }
659
- }
660
- } else {
661
- $slt = ( $site == $value ? "selected" : null );
662
- $html .= "<option value='$site' $slt>$site</option>";
663
- }
664
- }
665
- $html .= "</select>";
666
- break;
667
- default:
668
- $html .= "<input id='{$id}' type='{$data['type']}' value='" . esc_attr( $value ) . "' name='$name' />";
669
- break;
670
 
671
- }
672
- $html .= "<p class='description'>{$desc}</p>";
673
- $html .= "</div>";
674
- $html .= "</div>";
675
 
676
- return $html;
677
- }
678
 
679
- public function schemaTypes() {
680
- return array(
681
- 'article' => array(
682
- 'title' => "Article",
683
- 'fields' => array(
684
- 'active' => array(
685
- 'type' => 'checkbox'
686
- ),
687
- 'headline' => array(
688
- 'title' => 'Headline',
689
- 'type' => 'text',
690
- 'desc' => 'Article title',
691
- 'required' => true
692
- ),
693
- 'mainEntityOfPage' => array(
694
- 'title' => 'Page URL',
695
- 'type' => 'url',
696
- 'desc' => 'The canonical URL of the article page',
697
- 'required' => true
698
- ),
699
- 'author' => array(
700
- 'title' => 'Author Name',
701
- 'type' => 'text',
702
- 'desc' => 'Author display name',
703
- 'required' => true
704
- ),
705
- 'image' => array(
706
- 'title' => 'Article Feature Image',
707
- 'type' => 'image',
708
- 'required' => true,
709
- 'desc' => 'Images should be at least 696 pixels wide.<br>Images should be in .jpg, .png, or. gif format.'
710
- ),
711
- 'datePublished' => array(
712
- 'title' => 'Published date',
713
- 'type' => 'text',
714
- 'class' => 'kcseo-date',
715
- 'required' => true,
716
- 'desc' => 'Like this: 2015-12-25'
717
- ),
718
- 'dateModified' => array(
719
- 'title' => 'Modified date',
720
- 'type' => 'text',
721
- 'class' => 'kcseo-date',
722
- 'required' => true,
723
- 'desc' => 'Like this: 2015-12-25'
724
- ),
725
- 'publisher' => array(
726
- 'title' => 'Publisher',
727
- 'type' => 'text',
728
- 'desc' => 'Publisher name or Organization name',
729
- 'required' => true
730
- ),
731
- 'publisherImage' => array(
732
- 'title' => 'Publisher Logo',
733
- 'type' => 'image',
734
- 'desc' => 'Logos should have a wide aspect ratio, not a square icon.<br>Logos should be no wider than 600px, and no taller than 60px.<br>Always retain the original aspect ratio of the logo when resizing. Ideally, logos are exactly 60px tall with width <= 600px. If maintaining a height of 60px would cause the width to exceed 600px, downscale the logo to exactly 600px wide and reduce the height accordingly below 60px to maintain the original aspect ratio.<br>',
735
- 'required' => true
736
- ),
737
- 'description' => array(
738
- 'title' => 'Description',
739
- 'type' => 'textarea',
740
- 'desc' => 'Short description'
741
- ),
742
- 'articleBody' => array(
743
- 'title' => 'Article body',
744
- 'type' => 'textarea',
745
- 'desc' => 'Article content'
746
- ),
747
- 'alternativeHeadline' => array(
748
- 'title' => 'Alternative headline',
749
- 'type' => 'text',
750
- 'desc' => 'A secondary headline for the article.'
751
- ),
752
- )
753
- ),
754
- 'blog_posting' => array(
755
- 'title' => 'Blog Posting',
756
- 'fields' => array(
757
- 'active' => array(
758
- 'type' => 'checkbox'
759
- ),
760
- 'headline' => array(
761
- 'title' => 'Headline',
762
- 'type' => 'text',
763
- 'desc' => 'Blog posting title',
764
- 'required' => true
765
- ),
766
- 'mainEntityOfPage' => array(
767
- 'title' => 'Page URL',
768
- 'type' => 'url',
769
- 'desc' => 'The canonical URL of the article page',
770
- 'required' => true
771
- ),
772
- 'author' => array(
773
- 'title' => 'Author name',
774
- 'type' => 'text',
775
- 'desc' => 'Author display name',
776
- 'required' => true
777
- ),
778
- 'image' => array(
779
- 'title' => 'Feature Image',
780
- 'type' => 'image',
781
- 'desc' => "The representative image of the article. Only a marked-up image that directly belongs to the article should be specified.<br> Images should be at least 696 pixels wide. <br>Images should be in .jpg, .png, or. gif format.",
782
- 'required' => true
783
- ),
784
- 'datePublished' => array(
785
- 'title' => 'Published date',
786
- 'type' => 'text',
787
- 'class' => 'kcseo-date',
788
- 'desc' => 'Like this: 2015-12-25',
789
- 'required' => true
790
- ),
791
- 'dateModified' => array(
792
- 'title' => 'Modified date',
793
- 'type' => 'text',
794
- 'class' => 'kcseo-date',
795
- 'desc' => 'Like this: 2015-12-25',
796
- 'required' => true
797
- ),
798
- 'publisher' => array(
799
- 'title' => 'Publisher',
800
- 'type' => 'text',
801
- 'desc' => 'Publisher name or Organization name',
802
- 'required' => true
803
- ),
804
- 'publisherImage' => array(
805
- 'title' => 'Publisher Logo',
806
- 'type' => 'image',
807
- 'desc' => "Logos should have a wide aspect ratio, not a square icon.<br>Logos should be no wider than 600px, and no taller than 60px.<br>Always retain the original aspect ratio of the logo when resizing. Ideally, logos are exactly 60px tall with width <= 600px. If maintaining a height of 60px would cause the width to exceed 600px, downscale the logo to exactly 600px wide and reduce the height accordingly below 60px to maintain the original aspect ratio.<br>",
808
- 'required' => true
809
- ),
810
- 'description' => array(
811
- 'title' => 'Description',
812
- 'type' => 'textarea',
813
- 'desc' => 'Short description'
814
- ),
815
- 'articleBody' => array(
816
- 'title' => 'Article body',
817
- 'type' => 'textarea',
818
- 'desc' => 'Article content'
819
- )
820
- )
821
- ),
822
- 'news_article' => array(
823
- 'title' => 'News Article',
824
- 'fields' => array(
825
- 'active' => array(
826
- 'type' => 'checkbox'
827
- ),
828
- 'headline' => array(
829
- 'title' => 'Headline',
830
- 'type' => 'text',
831
- 'desc' => 'Article title',
832
- 'required' => true
833
- ),
834
- 'mainEntityOfPage' => array(
835
- 'title' => 'Page URL',
836
- 'type' => 'url',
837
- 'desc' => 'The canonical URL of the article page',
838
- 'required' => true
839
- ),
840
- 'author' => array(
841
- 'title' => 'Author',
842
- 'type' => 'text',
843
- 'desc' => 'Author display name',
844
- 'required' => true
845
- ),
846
- 'image' => array(
847
- 'title' => 'Image',
848
- 'type' => 'image',
849
- 'desc' => "The representative image of the article. Only a marked-up image that directly belongs to the article should be specified.<br> Images should be at least 696 pixels wide. <br>Images should be in .jpg, .png, or. gif format.",
850
- 'required' => true
851
- ),
852
- 'datePublished' => array(
853
- 'title' => 'Published date',
854
- 'type' => 'text',
855
- 'class' => 'kcseo-date',
856
- 'desc' => 'Like this: 2015-12-25',
857
- 'required' => true
858
- ),
859
- 'dateModified' => array(
860
- 'title' => 'Modified date',
861
- 'type' => 'text',
862
- 'class' => 'kcseo-date',
863
- 'required' => true,
864
- 'desc' => 'Like this: 2015-12-25'
865
- ),
866
- 'publisher' => array(
867
- 'title' => 'Publisher',
868
- 'type' => 'text',
869
- 'desc' => 'Publisher name or Organization name',
870
- 'required' => true
871
- ),
872
- 'publisherImage' => array(
873
- 'title' => 'Publisher Logo',
874
- 'type' => 'image',
875
- 'desc' => 'Logos should have a wide aspect ratio, not a square icon.<br>Logos should be no wider than 600px, and no taller than 60px.<br>Always retain the original aspect ratio of the logo when resizing. Ideally, logos are exactly 60px tall with width <= 600px. If maintaining a height of 60px would cause the width to exceed 600px, downscale the logo to exactly 600px wide and reduce the height accordingly below 60px to maintain the original aspect ratio.<br>',
876
- 'required' => true
877
- ),
878
- 'description' => array(
879
- 'title' => 'Description',
880
- 'type' => 'textarea',
881
- 'desc' => 'Short description'
882
- ),
883
- 'articleBody' => array(
884
- 'title' => 'Article body',
885
- 'type' => 'textarea',
886
- 'desc' => 'Article body content'
887
- )
888
- )
889
- ),
890
- 'event' => array(
891
- 'title' => 'Event',
892
- 'fields' => array(
893
- 'active' => array(
894
- 'type' => 'checkbox'
895
- ),
896
- 'name' => array(
897
- 'title' => 'Name',
898
- 'type' => 'text',
899
- 'required' => true,
900
- 'desc' => "The name of the event."
901
- ),
902
- 'locationName' => array(
903
- 'title' => 'Location name',
904
- 'type' => 'text',
905
- 'required' => true,
906
- 'desc' => "Event Location name"
907
- ),
908
- 'locationAddress' => array(
909
- 'title' => 'Location address',
910
- 'type' => 'text',
911
- 'required' => true,
912
- 'desc' => "The location of for example where the event is happening, an organization is located, or where an action takes place."
913
- ),
914
- 'startDate' => array(
915
- 'title' => 'Start date',
916
- 'type' => 'text',
917
- 'class' => 'kcseo-date',
918
- 'required' => true,
919
- 'desc' => "Event start date"
920
- ),
921
- 'endDate' => array(
922
- 'title' => 'End date (Recommended)',
923
- 'type' => 'text',
924
- 'class' => 'kcseo-date',
925
- 'desc' => "Event end date"
926
- ),
927
- 'description' => array(
928
- 'title' => 'Description (Recommended)',
929
- 'type' => 'textarea',
930
- 'desc' => "Event description"
931
- ),
932
- 'performerName' => array(
933
- 'title' => 'Performer Name (Recommended)',
934
- 'type' => 'text',
935
- 'desc' => "The performer's name."
936
- ),
937
- 'image' => array(
938
- 'title' => 'Image URL (Recommended)',
939
- 'type' => 'url',
940
- 'desc' => "URL of an image or logo for the event or tour"
941
- ),
942
- 'price' => array(
943
- 'title' => 'Price (Recommended)',
944
- 'type' => 'number',
945
- 'attr' => 'step="any"',
946
- 'desc' => "This is highly recommended. The lowest available price, including service charges and fees, of this type of ticket. <span class='required'>Not required but (Recommended)</span>"
947
- ),
948
- 'priceCurrency' => array(
949
- 'title' => 'Price currency',
950
- 'type' => 'text',
951
- 'desc' => "The 3-letter currency code. (USD)"
952
- ),
953
- 'url' => array(
954
- 'title' => 'URL (Recommended)',
955
- 'type' => 'url',
956
- 'placeholder' => 'URL',
957
- 'desc' => "A link to the event's details page. <span class='required'>Not required but (Recommended)</span>"
958
- ),
959
- )
960
- ),
961
- 'product' => array(
962
- 'title' => 'Product',
963
- 'fields' => array(
964
- 'active' => array(
965
- 'type' => 'checkbox'
966
- ),
967
- 'name' => array(
968
- 'title' => 'Name',
969
- 'type' => 'text',
970
- 'required' => true,
971
- 'desc' => "The name of the product."
972
- ),
973
- 'image' => array(
974
- 'title' => 'Image',
975
- 'type' => 'image',
976
- 'desc' => "The URL of a product photo. Pictures clearly showing the product, e.g. against a white background, are preferred."
977
- ),
978
- 'description' => array(
979
- 'title' => 'Description',
980
- 'type' => 'textarea',
981
- 'desc' => "Product description."
982
- ),
983
- 'brand' => array(
984
- 'title' => 'Brand',
985
- 'type' => 'text',
986
- 'desc' => "The brand of the product."
987
- ),
988
- 'ratingValue' => array(
989
- 'title' => 'Ratting value',
990
- 'type' => 'number',
991
- 'attr' => 'step="any"',
992
- 'desc' => "Rating value. (1 , 2.5, 3, 5 etc)"
993
- ),
994
- 'reviewCount' => array(
995
- 'title' => 'Total review count',
996
- 'type' => 'number',
997
- 'attr' => 'step="any"',
998
- 'desc' => "Rating ratting value. <span class='required'>This is required if (Ratting value) is given</span>"
999
- ),
1000
- 'price' => array(
1001
- 'title' => 'Price',
1002
- 'type' => 'number',
1003
- 'attr' => 'step="any"',
1004
- 'desc' => "The lowest available price, including service charges and fees, of this type of ticket."
1005
- ),
1006
- 'priceCurrency' => array(
1007
- 'title' => 'Price currency',
1008
- 'type' => 'text',
1009
- 'desc' => "The 3-letter currency code."
1010
- ),
1011
- 'availability' => array(
1012
- 'title' => 'Availability',
1013
- 'type' => 'select',
1014
- 'empty' => "Select one",
1015
- 'options' => array(
1016
- 'http://schema.org/InStock' => 'InStock',
1017
- 'http://schema.org/InStoreOnly' => 'InStoreOnly',
1018
- 'http://schema.org/OutOfStock' => 'OutOfStock',
1019
- 'http://schema.org/SoldOut' => 'SoldOut',
1020
- 'http://schema.org/OnlineOnly' => 'OnlineOnly',
1021
- 'http://schema.org/LimitedAvailability' => 'LimitedAvailability',
1022
- 'http://schema.org/Discontinued' => 'Discontinued',
1023
- 'http://schema.org/PreOrder' => 'PreOrder',
1024
- ),
1025
- 'desc' => "Select a availability type",
1026
- ),
1027
- 'itemCondition' => array(
1028
- 'title' => 'Product condition',
1029
- 'type' => 'select',
1030
- 'empty' => "Select one",
1031
- 'options' => array(
1032
- 'http://schema.org/NewCondition' => 'NewCondition',
1033
- 'http://schema.org/UsedCondition' => 'UsedCondition',
1034
- 'http://schema.org/DamagedCondition' => 'DamagedCondition',
1035
- 'http://schema.org/RefurbishedCondition' => 'RefurbishedCondition',
1036
- ),
1037
- 'desc' => "Select a condition"
1038
- ),
1039
- 'url' => array(
1040
- 'title' => 'Product URL',
1041
- 'type' => 'url',
1042
- 'desc' => "A URL to the product web page (that includes the Offer). (Don't use offerURL for markup that appears on the product page itself.)"
1043
- ),
1044
- )
1045
- ),
1046
- 'video' => array(
1047
- 'title' => 'Video',
1048
- 'fields' => array(
1049
- 'active' => array(
1050
- 'type' => 'checkbox'
1051
- ),
1052
- 'name' => array(
1053
- 'title' => 'Name',
1054
- 'type' => 'text',
1055
- 'required' => true,
1056
- 'desc' => "The title of the video"
1057
- ),
1058
- 'description' => array(
1059
- 'title' => 'Description',
1060
- 'type' => 'textarea',
1061
- 'required' => true,
1062
- 'desc' => "The description of the video"
1063
- ),
1064
- 'thumbnailUrl' => array(
1065
- 'title' => 'Thumbnail URL',
1066
- 'type' => 'url',
1067
- 'placeholder' => "URL",
1068
- 'required' => true,
1069
- 'desc' => "A URL pointing to the video thumbnail image file. Images must be at least 160x90 pixels and at most 1920x1080 pixels."
1070
- ),
1071
- 'uploadDate' => array(
1072
- 'title' => 'Updated date',
1073
- 'type' => 'text',
1074
- 'class' => 'kcseo-date',
1075
- 'desc' => '2015-02-05T08:00:00+08:00'
1076
- ),
1077
- 'duration' => array(
1078
- 'title' => 'Duration',
1079
- 'type' => 'text',
1080
- 'desc' => "The duration of the video in ISO 8601 format.(PT1M33S)"
1081
- ),
1082
- 'contentUrl' => array(
1083
- 'title' => 'Content URL',
1084
- 'type' => 'url',
1085
- 'placeholder' => 'URL',
1086
- 'desc' => "A URL pointing to the actual video media file. This file should be in .mpg, .mpeg, .mp4, .m4v, .mov, .wmv, .asf, .avi, .ra, .ram, .rm, .flv, or other video file format."
1087
- ),
1088
- 'embedUrl' => array(
1089
- 'title' => 'Embed URL',
1090
- 'placeholder' => 'URL',
1091
- 'type' => 'url',
1092
- 'desc' => "A URL pointing to a player for the specific video. Usually this is the information in the src element of an < embed> tag.Example: Dailymotion: http://www.dailymotion.com/swf/x1o2g."
1093
- ),
1094
- 'interactionCount' => array(
1095
- 'title' => 'Interaction count',
1096
- 'type' => 'text',
1097
- 'desc' => "The number of times the video has been viewed."
1098
- ),
1099
- 'expires' => array(
1100
- 'title' => 'Expires',
1101
- 'type' => 'text',
1102
- 'class' => 'kcseo-date',
1103
- 'desc' => "Like this: 2015-12-25"
1104
- ),
1105
- )
1106
- ),
1107
- 'service' => array(
1108
- 'title' => 'Service',
1109
- 'fields' => array(
1110
- 'active' => array(
1111
- 'type' => 'checkbox'
1112
- ),
1113
- 'name' => array(
1114
- 'title' => 'Name',
1115
- 'type' => 'text',
1116
- 'required' => true,
1117
- 'desc' => "The name of the Service."
1118
- ),
1119
- 'serviceType' => array(
1120
- 'title' => 'Service type',
1121
- 'type' => 'text',
1122
- 'required' => true,
1123
- 'desc' => "The type of service being offered, e.g. veterans' benefits, emergency relief, etc."
1124
- ),
1125
- 'additionalType' => array(
1126
- 'title' => 'Additional type(URL)',
1127
- 'type' => 'url',
1128
- 'placeholder' => 'URL',
1129
- 'desc' => "An additional type for the service, typically used for adding more specific types from external vocabularies in microdata syntax."
1130
- ),
1131
- 'award' => array(
1132
- 'title' => 'Award',
1133
- 'type' => 'text',
1134
- 'desc' => "An award won by or for this service."
1135
- ),
1136
- 'category' => array(
1137
- 'title' => 'Category',
1138
- 'type' => 'text',
1139
- 'desc' => "A category for the service."
1140
- ),
1141
- 'providerMobility' => array(
1142
- 'title' => 'Provider mobility',
1143
- 'type' => 'text',
1144
- 'desc' => "Indicates the mobility of a provided service (e.g. 'static', 'dynamic')."
1145
- ),
1146
- 'description' => array(
1147
- 'title' => 'Description',
1148
- 'type' => 'textarea',
1149
- 'require' => true,
1150
- 'desc' => "A short description of the service."
1151
- ),
1152
- 'image' => array(
1153
- 'title' => 'Image URL',
1154
- 'type' => 'url',
1155
- 'require' => false,
1156
- 'desc' => "An image of the service. This should be a URL."
1157
- ),
1158
- 'mainEntityOfPage' => array(
1159
- 'title' => 'Main entity of page URL',
1160
- 'type' => 'url',
1161
- 'require' => false,
1162
- 'desc' => "Indicates a page (or other CreativeWork) for which this thing is the main entity being described."
1163
- ),
1164
- 'sameAs' => array(
1165
- 'title' => 'Same as URL',
1166
- 'type' => 'url',
1167
- 'placeholder' => 'URL',
1168
- 'desc' => "URL of a reference Web page that unambiguously indicates the service's identity. E.g. the URL of the service's Wikipedia page, Freebase page, or official website."
1169
- ),
1170
- 'url' => array(
1171
- 'title' => 'Url of the service',
1172
- 'type' => 'url',
1173
- 'placeholder' => 'URL',
1174
- 'desc' => "URL of the service."
1175
- ),
1176
- 'alternateName' => array(
1177
- 'title' => 'Alternate name',
1178
- 'type' => 'text',
1179
- 'desc' => 'An alias for the service.'
1180
- ),
1181
- )
1182
- ),
1183
- 'review' => array(
1184
- 'title' => 'Review',
1185
- 'fields' => array(
1186
- 'active' => array(
1187
- 'type' => 'checkbox'
1188
- ),
1189
- 'itemName' => array(
1190
- 'title' => 'Name of the reviewed item',
1191
- 'type' => 'text',
1192
- 'required' => true,
1193
- 'desc' => "The item that is being reviewed."
1194
- ),
1195
- 'reviewBody' => array(
1196
- 'title' => 'Review body',
1197
- 'type' => 'text',
1198
- 'required' => true,
1199
- 'desc' => "The actual body of the review."
1200
- ),
1201
- 'name' => array(
1202
- 'title' => 'Review name',
1203
- 'type' => 'text',
1204
- 'required' => true,
1205
- 'desc' => "A particular name for the review."
1206
- ),
1207
- 'author' => array(
1208
- 'title' => 'Author',
1209
- 'type' => 'text',
1210
- 'required' => true,
1211
- 'author' => 'Author name',
1212
- 'desc' => "The author of the review. The reviewer’s name needs to be a valid name."
1213
- ),
1214
- 'datePublished' => array(
1215
- 'title' => 'Date of Published',
1216
- 'type' => 'text',
1217
- 'class' => 'kcseo-date',
1218
- 'desc' => "Like this: 2015-12-25"
1219
- ),
1220
- 'ratingValue' => array(
1221
- 'title' => 'Rating value',
1222
- 'type' => 'number',
1223
- 'attr' => 'step="any"',
1224
- 'desc' => "A numerical quality rating for the item."
1225
- ),
1226
- 'bestRating' => array(
1227
- 'title' => 'Best rating',
1228
- 'type' => 'number',
1229
- 'attr' => 'step="any"',
1230
- 'desc' => "The highest value allowed in this rating system."
1231
- ),
1232
- 'worstRating' => array(
1233
- 'title' => 'Worst rating',
1234
- 'type' => 'number',
1235
- 'attr' => 'step="any"',
1236
- 'desc' => "The lowest value allowed in this rating system. * Required if the rating system is not on a 5-point scale. If worstRating is omitted, 1 is assumed."
1237
- ),
1238
- 'publisher' => array(
1239
- 'title' => 'Name of the organization',
1240
- 'type' => 'text',
1241
- 'desc' => 'The publisher of the review.'
1242
- )
1243
- )
1244
- ),
1245
- 'aggregate_rating' => array(
1246
- 'title' => 'Aggregate Ratings',
1247
- 'fields' => array(
1248
- 'active' => array(
1249
- 'type' => 'checkbox'
1250
- ),
1251
- 'schema_type' => array(
1252
- 'title' => 'Schema type',
1253
- 'type' => 'schema_type',
1254
- 'required' => true,
1255
- 'options' => $this->site_type(),
1256
- 'empty' => "Select one",
1257
- 'desc' => "Use the most appropriate schema type for what is being reviewed."
1258
- ),
1259
- 'name' => array(
1260
- 'title' => 'Name of the item',
1261
- 'type' => 'text',
1262
- 'required' => true,
1263
- 'desc' => "The item that is being rated."
1264
- ),
1265
- 'image' => array(
1266
- 'title' => 'Image',
1267
- 'type' => 'image',
1268
- 'required' => true,
1269
- 'holderClass' => 'kSeo-hidden aggregate-except-organization-holder'
1270
- ),
1271
- 'priceRange' => array(
1272
- 'title' => 'Price Range (Recommended)',
1273
- 'type' => 'text',
1274
- 'holderClass' => 'kSeo-hidden aggregate-except-organization-holder',
1275
- 'desc' => "The price range of the business, for example $$$."
1276
- ),
1277
- 'telephone' => array(
1278
- 'title' => 'Telephone (Recommended)',
1279
- 'type' => 'text',
1280
- 'holderClass' => 'kSeo-hidden aggregate-except-organization-holder'
1281
- ),
1282
- 'address' => array(
1283
- 'title' => 'Address (Recommended)',
1284
- 'type' => 'text',
1285
- 'holderClass' => 'kSeo-hidden aggregate-except-organization-holder',
1286
- ),
1287
- 'description' => array(
1288
- 'title' => 'Description',
1289
- 'type' => 'textarea',
1290
- 'desc' => "Description for thr review"
1291
- ),
1292
- 'ratingCount' => array(
1293
- 'title' => 'Rating Count',
1294
- 'type' => 'number',
1295
- 'attr' => 'step="any"',
1296
- 'required' => true,
1297
- 'desc' => "The total number of ratings for the item on your site. <span class='required'>* At least one of ratingCount or reviewCount is required.</span>"
1298
- ),
1299
- 'reviewCount' => array(
1300
- 'title' => 'Review Count',
1301
- 'type' => 'number',
1302
- 'attr' => 'step="any"',
1303
- 'required' => true,
1304
- 'desc' => "Specifies the number of people who provided a review with or without an accompanying rating. At least one of ratingCount or reviewCount is required."
1305
- ),
1306
- 'ratingValue' => array(
1307
- 'title' => 'Rating Value',
1308
- 'type' => 'number',
1309
- 'attr' => 'step="any"',
1310
- 'required' => true,
1311
- 'desc' => "A numerical quality rating for the item."
1312
- ),
1313
- 'ratingValue' => array(
1314
- 'title' => 'Rating Value',
1315
- 'attr' => 'step="any"',
1316
- 'type' => 'number',
1317
- 'required' => true,
1318
- 'desc' => "A numerical quality rating for the item."
1319
- ),
1320
- 'bestRating' => array(
1321
- 'title' => 'Best Rating',
1322
- 'type' => 'number',
1323
- 'attr' => 'step="any"',
1324
- 'required' => true,
1325
- 'desc' => "The highest value allowed in this rating system. <span class='required'>* Required if the rating system is not a 5-point scale.</span> If bestRating is omitted, 5 is assumed."
1326
- ),
1327
- 'worstRating' => array(
1328
- 'title' => 'Worst Rating',
1329
- 'type' => 'number',
1330
- 'attr' => 'step="any"',
1331
- 'required' => true,
1332
- 'desc' => "The lowest value allowed in this rating system. <span class='required'>* Required if the rating system is not a 5-point scale.</span> If worstRating is omitted, 1 is assumed."
1333
- )
1334
- )
1335
- ),
1336
- 'restaurant' => array(
1337
- 'title' => 'Restaurant',
1338
- 'fields' => array(
1339
- 'active' => array(
1340
- 'type' => 'checkbox'
1341
- ),
1342
- 'name' => array(
1343
- 'title' => 'Name of the Restaurant',
1344
- 'type' => 'text',
1345
- 'required' => true
1346
- ),
1347
- 'description' => array(
1348
- 'title' => 'Description of the Restaurant',
1349
- 'type' => 'textarea',
1350
- ),
1351
- 'openingHours' => array(
1352
- 'title' => 'Opening Hours',
1353
- 'type' => 'textarea',
1354
- 'desc' => 'Mo,Tu,We,Th,Fr,Sa,Su 11:30-23:00'
1355
- ),
1356
- 'telephone' => array(
1357
- 'title' => 'Opening Hours',
1358
- 'type' => 'text',
1359
- 'desc' => '+155501003333'
1360
- ),
1361
- 'menu' => array(
1362
- 'title' => 'Menu',
1363
- 'type' => 'text',
1364
- 'desc' => 'http://example.com/menu'
1365
- ),
1366
- 'image' => array(
1367
- 'title' => 'Image',
1368
- 'type' => 'image',
1369
- 'required' => true
1370
- ),
1371
- 'address' => array(
1372
- 'title' => 'Address',
1373
- 'type' => 'textarea'
1374
- ),
1375
- 'priceRange' => array(
1376
- 'title' => 'Price Range',
1377
- 'type' => 'text',
1378
- 'desc' => 'The price range of the business, for example $$$'
1379
- ),
1380
- 'servesCuisine' => array(
1381
- 'title' => 'Serves Cuisine',
1382
- 'type' => 'text',
1383
- 'desc' => 'The cuisine of the restaurant.'
1384
- )
1385
- )
1386
- ),
1387
- 'localBusiness' => array(
1388
- 'title' => 'Local Business',
1389
- 'fields' => array(
1390
- 'active' => array(
1391
- 'type' => 'checkbox'
1392
- ),
1393
- 'name' => array(
1394
- 'title' => 'Name',
1395
- 'type' => 'text',
1396
- 'required' => true
1397
- ),
1398
- 'description' => array(
1399
- 'title' => 'Description',
1400
- 'type' => 'textarea',
1401
- ),
1402
- 'image' => array(
1403
- 'title' => 'Business Logo',
1404
- 'type' => 'image',
1405
- 'required' => true
1406
- ),
1407
- 'priceRange' => array(
1408
- 'title' => 'Price Range (Recommended)',
1409
- 'type' => 'text',
1410
- 'desc' => "The price range of the business, for example $$$."
1411
- ),
1412
- 'addressLocality' => array(
1413
- 'title' => 'Address locality',
1414
- 'type' => 'text',
1415
- 'desc' => 'City (i.e Kansas city)'
1416
- ),
1417
- 'addressRegion' => array(
1418
- 'title' => 'Address region',
1419
- 'type' => 'text',
1420
- 'desc' => 'State (i.e. MO)'
1421
- ),
1422
- 'postalCode' => array(
1423
- 'title' => 'Postal code',
1424
- 'type' => 'text',
1425
- ),
1426
- 'streetAddress' => array(
1427
- 'title' => 'Street address',
1428
- 'type' => 'text',
1429
- ),
1430
- 'telephone' => array(
1431
- 'title' => 'Telephone (Recommended)',
1432
- 'type' => 'text',
1433
- )
1434
- )
1435
- )
1436
- );
1437
- }
 
1438
 
1439
- function get_jsonEncode( $data = array() ) {
1440
- $html = null;
1441
- /** @var TYPE_NAME $data */
1442
- if ( ! empty( $data ) && is_array( $data ) ) {
1443
- $html .= '<script type="application/ld+json">' . json_encode( $data,
1444
- JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES ) . '</script>';
1445
- }
 
1446
 
1447
- return $html;
1448
- }
1449
 
1450
- function site_type() {
1451
- return array(
1452
- 'Organization',
1453
- 'LocalBusiness' => array(
1454
- 'AnimalShelter',
1455
- 'AutomotiveBusiness' => array(
1456
- 'AutoBodyShop',
1457
- 'AutoDealer',
1458
- 'AutoPartsStore',
1459
- 'AutoRental',
1460
- 'AutoRepair',
1461
- 'AutoWash',
1462
- 'GasStation',
1463
- 'MotorcycleDealer',
1464
- 'MotorcycleRepair'
1465
- ),
1466
- 'ChildCare',
1467
- 'DryCleaningOrLaundry',
1468
- 'EmergencyService',
1469
- 'EmploymentAgency',
1470
- 'EntertainmentBusiness' => array(
1471
- 'AdultEntertainment',
1472
- 'AmusementPark',
1473
- 'ArtGallery',
1474
- 'Casino',
1475
- 'ComedyClub',
1476
- 'MovieTheater',
1477
- 'NightClub',
 
1478
 
1479
- ),
1480
- 'FinancialService' => array(
1481
- 'AccountingService',
1482
- 'AutomatedTeller',
1483
- 'BankOrCreditUnion',
1484
- 'InsuranceAgency',
1485
- ),
1486
- 'FoodEstablishment' => array(
1487
- 'Bakery',
1488
- 'BarOrPub',
1489
- 'Brewery',
1490
- 'CafeOrCoffeeShop',
1491
- 'FastFoodRestaurant',
1492
- 'IceCreamShop',
1493
- 'Restaurant',
1494
- 'Winery',
1495
- ),
1496
- 'GovernmentOffice',
1497
- 'HealthAndBeautyBusiness' => array(
1498
- 'BeautySalon',
1499
- 'DaySpa',
1500
- 'HairSalon',
1501
- 'HealthClub',
1502
- 'NailSalon',
1503
- 'TattooParlor',
1504
- ),
1505
- 'HomeAndConstructionBusiness' => array(
1506
- 'Electrician',
1507
- 'GeneralContractor',
1508
- 'HVACBusiness',
1509
- 'HousePainter',
1510
- 'Locksmith',
1511
- 'MovingCompany',
1512
- 'Plumber',
1513
- 'RoofingContractor',
1514
- ),
1515
- 'InternetCafe',
1516
- 'LegalService' => array(
1517
- 'Attorney',
1518
- 'Notary',
1519
- ),
1520
- 'Library',
1521
- 'MedicalBusiness' => array(
1522
- 'CommunityHealth',
1523
- 'Dentist',
1524
- 'Dermatology',
1525
- 'DietNutrition',
1526
- 'Emergency',
1527
- 'Geriatric',
1528
- 'Gynecologic',
1529
- 'MedicalClinic',
1530
- 'Midwifery',
1531
- 'Nursing',
1532
- 'Obstetric',
1533
- 'Oncologic',
1534
- 'Optician',
1535
- 'Optometric',
1536
- 'Otolaryngologic',
1537
- 'Pediatric',
1538
- 'Pharmacy',
1539
- 'Physician',
1540
- 'Physiotherapy',
1541
- 'PlasticSurgery',
1542
- 'Podiatric',
1543
- 'PrimaryCare',
1544
- 'Psychiatric',
1545
- 'PublicHealth',
1546
- ),
1547
- 'LodgingBusiness' => array(
1548
- 'BedAndBreakfast',
1549
- 'Campground',
1550
- 'Hostel',
1551
- 'Hotel',
1552
- 'Motel',
1553
- 'Resort',
1554
- ),
1555
- 'ProfessionalService',
1556
- 'RadioStation',
1557
- 'RealEstateAgent',
1558
- 'RecyclingCenter',
1559
- 'SelfStorage',
1560
- 'ShoppingCenter',
1561
- 'SportsActivityLocation' => array(
1562
- 'BowlingAlley',
1563
- 'ExerciseGym',
1564
- 'GolfCourse',
1565
- 'HealthClub',
1566
- 'PublicSwimmingPool',
1567
- 'SkiResort',
1568
- 'SportsClub',
1569
- 'StadiumOrArena',
1570
- 'TennisComplex',
1571
- ),
1572
- 'Store' => array(
1573
- 'AutoPartsStore',
1574
- 'BikeStore',
1575
- 'BookStore',
1576
- 'ClothingStore',
1577
- 'ComputerStore',
1578
- 'ConvenienceStore',
1579
- 'DepartmentStore',
1580
- 'ElectronicsStore',
1581
- 'Florist',
1582
- 'FurnitureStore',
1583
- 'GardenStore',
1584
- 'GroceryStore',
1585
- 'HardwareStore',
1586
- 'HobbyShop',
1587
- 'HomeGoodsStore',
1588
- 'JewelryStore',
1589
- 'LiquorStore',
1590
- 'MensClothingStore',
1591
- 'MobilePhoneStore',
1592
- 'MovieRentalStore',
1593
- 'MusicStore',
1594
- 'OfficeEquipmentStore',
1595
- 'OutletStore',
1596
- 'PawnShop',
1597
- 'PetStore',
1598
- 'ShoeStore',
1599
- 'SportingGoodsStore',
1600
- 'TireShop',
1601
- 'ToyStore',
1602
- 'WholesaleStore'
1603
- ),
1604
- 'TelevisionStation',
1605
- 'TouristInformationCenter',
1606
- 'TravelAgency'
1607
- )
1608
- );
1609
- }
1610
 
1611
- function countryList() {
1612
- return array(
1613
- "AF" => "Afghanistan",
1614
- "AX" => "Aland Islands",
1615
- "AL" => "Albania",
1616
- "DZ" => "Algeria",
1617
- "AS" => "American Samoa",
1618
- "AD" => "Andorra",
1619
- "AO" => "Angola",
1620
- "AI" => "Anguilla",
1621
- "AQ" => "Antarctica",
1622
- "AG" => "Antigua and Barbuda",
1623
- "AR" => "Argentina",
1624
- "AM" => "Armenia",
1625
- "AW" => "Aruba",
1626
- "AU" => "Australia",
1627
- "AT" => "Austria",
1628
- "AZ" => "Azerbaijan",
1629
- "BS" => "Bahamas",
1630
- "BH" => "Bahrain",
1631
- "BD" => "Bangladesh",
1632
- "BB" => "Barbados",
1633
- "BY" => "Belarus",
1634
- "BE" => "Belgium",
1635
- "BZ" => "Belize",
1636
- "BJ" => "Benin",
1637
- "BM" => "Bermuda",
1638
- "BT" => "Bhutan",
1639
- "BO" => "Bolivia, Plurinational State of",
1640
- "BQ" => "Bonaire, Sint Eustatius and Saba",
1641
- "BA" => "Bosnia and Herzegovina",
1642
- "BW" => "Botswana",
1643
- "BV" => "Bouvet Island",
1644
- "BR" => "Brazil",
1645
- "IO" => "British Indian Ocean Territory",
1646
- "BN" => "Brunei Darussalam",
1647
- "BG" => "Bulgaria",
1648
- "BF" => "Burkina Faso",
1649
- "BI" => "Burundi",
1650
- "KH" => "Cambodia",
1651
- "CM" => "Cameroon",
1652
- "CA" => "Canada",
1653
- "CV" => "Cape Verde",
1654
- "KY" => "Cayman Islands",
1655
- "CF" => "Central African Republic",
1656
- "TD" => "Chad",
1657
- "CL" => "Chile",
1658
- "CN" => "China",
1659
- "CX" => "Christmas Island",
1660
- "CC" => "Cocos (Keeling) Islands",
1661
- "CO" => "Colombia",
1662
- "KM" => "Comoros",
1663
- "CG" => "Congo",
1664
- "CD" => "Congo, the Democratic Republic of the",
1665
- "CK" => "Cook Islands",
1666
- "CR" => "Costa Rica",
1667
- "CI" => "Côte d Ivoire",
1668
- "HR" => "Croatia",
1669
- "CU" => "Cuba",
1670
- "CW" => "Curaçao",
1671
- "CY" => "Cyprus",
1672
- "CZ" => "Czech Republic",
1673
- "DK" => "Denmark",
1674
- "DJ" => "Djibouti",
1675
- "DM" => "Dominica",
1676
- "DO" => "Dominican Republic",
1677
- "EC" => "Ecuador",
1678
- "EG" => "Egypt",
1679
- "SV" => "El Salvador",
1680
- "GQ" => "Equatorial Guinea",
1681
- "ER" => "Eritrea",
1682
- "EE" => "Estonia",
1683
- "ET" => "Ethiopia",
1684
- "FK" => "Falkland Islands (Malvinas)",
1685
- "FO" => "Faroe Islands",
1686
- "FJ" => "Fiji",
1687
- "FI" => "Finland",
1688
- "FR" => "France",
1689
- "GF" => "French Guiana",
1690
- "PF" => "French Polynesia",
1691
- "TF" => "French Southern Territories",
1692
- "GA" => "Gabon",
1693
- "GM" => "Gambia",
1694
- "GE" => "Georgia",
1695
- "DE" => "Germany",
1696
- "GH" => "Ghana",
1697
- "GI" => "Gibraltar",
1698
- "GR" => "Greece",
1699
- "GL" => "Greenland",
1700
- "GD" => "Grenada",
1701
- "GP" => "Guadeloupe",
1702
- "GU" => "Guam",
1703
- "GT" => "Guatemala",
1704
- "GG" => "Guernsey",
1705
- "GN" => "Guinea",
1706
- "GW" => "Guinea-Bissau",
1707
- "GY" => "Guyana",
1708
- "HT" => "Haiti",
1709
- "HM" => "Heard Island and McDonald Islands",
1710
- "VA" => "Holy See (Vatican City State)",
1711
- "HN" => "Honduras",
1712
- "HK" => "Hong Kong",
1713
- "HU" => "Hungary",
1714
- "IS" => "Iceland",
1715
- "IN" => "India",
1716
- "ID" => "Indonesia",
1717
- "IR" => "Iran, Islamic Republic of",
1718
- "IQ" => "Iraq",
1719
- "IE" => "Ireland",
1720
- "IM" => "Isle of Man",
1721
- "IL" => "Israel",
1722
- "IT" => "Italy",
1723
- "JM" => "Jamaica",
1724
- "JP" => "Japan",
1725
- "JE" => "Jersey",
1726
- "JO" => "Jordan",
1727
- "KZ" => "Kazakhstan",
1728
- "KE" => "Kenya",
1729
- "KI" => "Kiribati",
1730
- "KP" => "Korea, Democratic People's Republic of",
1731
- "KR" => "Korea, Republic of,",
1732
- "KW" => "Kuwait",
1733
- "KG" => "Kyrgyzstan",
1734
- "LA" => "Lao Peoples Democratic Republic",
1735
- "LV" => "Latvia",
1736
- "LB" => "Lebanon",
1737
- "LS" => "Lesotho",
1738
- "LR" => "Liberia",
1739
- "LY" => "Libya",
1740
- "LI" => "Liechtenstein",
1741
- "LT" => "Lithuania",
1742
- "LU" => "Luxembourg",
1743
- "MO" => "Macao",
1744
- "MK" => "Macedonia, the former Yugoslav Republic of",
1745
- "MG" => "Madagascar",
1746
- "MW" => "Malawi",
1747
- "MY" => "Malaysia",
1748
- "MV" => "Maldives",
1749
- "ML" => "Mali",
1750
- "MT" => "Malta",
1751
- "MH" => "Marshall Islands",
1752
- "MQ" => "Martinique",
1753
- "MR" => "Mauritania",
1754
- "MU" => "Mauritius",
1755
- "YT" => "Mayotte",
1756
- "MX" => "Mexico",
1757
- "FM" => "Micronesia, Federated States of",
1758
- "MD" => "Moldova, Republic of",
1759
- "MC" => "Monaco",
1760
- "MN" => "Mongolia",
1761
- "ME" => "Montenegro",
1762
- "MS" => "Montserrat",
1763
- "MA" => "Morocco",
1764
- "MZ" => "Mozambique",
1765
- "MM" => "Myanmar",
1766
- "NA" => "Namibia",
1767
- "NR" => "Nauru",
1768
- "NP" => "Nepal",
1769
- "NL" => "Netherlands",
1770
- "NC" => "New Caledonia",
1771
- "NZ" => "New Zealand",
1772
- "NI" => "Nicaragua",
1773
- "NE" => "Niger",
1774
- "NG" => "Nigeria",
1775
- "NU" => "Niue",
1776
- "NF" => "Norfolk Island",
1777
- "MP" => "Northern Mariana Islands",
1778
- "NO" => "Norway",
1779
- "OM" => "Oman",
1780
- "PK" => "Pakistan",
1781
- "PW" => "Palau",
1782
- "PS" => "Palestine, State of",
1783
- "PA" => "Panama",
1784
- "PG" => "Papua New Guinea",
1785
- "PY" => "Paraguay",
1786
- "PE" => "Peru",
1787
- "PH" => "Philippines",
1788
- "PN" => "Pitcairn",
1789
- "PL" => "Poland",
1790
- "PT" => "Portugal",
1791
- "PR" => "Puerto Rico",
1792
- "QA" => "Qatar",
1793
- "RE" => "Reunion",
1794
- "RO" => "Romania",
1795
- "RU" => "Russian Federation",
1796
- "RW" => "Rwanda",
1797
- "BL" => "Saint Barthélemy",
1798
- "SH" => "Saint Helena, Ascension and Tristan da Cunha",
1799
- "KN" => "Saint Kitts and Nevis",
1800
- "LC" => "Saint Lucia",
1801
- "MF" => "Saint Martin (French part)",
1802
- "PM" => "Saint Pierre and Miquelon",
1803
- "VC" => "Saint Vincent and the Grenadines",
1804
- "WS" => "Samoa",
1805
- "SM" => "San Marino",
1806
- "ST" => "Sao Tome and Principe",
1807
- "SA" => "Saudi Arabia",
1808
- "SN" => "Senegal",
1809
- "RS" => "Serbia",
1810
- "SC" => "Seychelles",
1811
- "SL" => "Sierra Leone",
1812
- "SG" => "Singapore",
1813
- "SX" => "Sint Maarten (Dutch part)",
1814
- "SK" => "Slovakia",
1815
- "SI" => "Slovenia",
1816
- "SB" => "Solomon Islands",
1817
- "SO" => "Somalia",
1818
- "ZA" => "South Africa",
1819
- "GS" => "South Georgia and the South Sandwich Islands",
1820
- "SS" => "South Sudan",
1821
- "ES" => "Spain",
1822
- "LK" => "Sri Lanka",
1823
- "SD" => "Sudan",
1824
- "SR" => "Suriname",
1825
- "SJ" => "Svalbard and Jan Mayen",
1826
- "SZ" => "Swaziland",
1827
- "SE" => "Sweden",
1828
- "CH" => "Switzerland",
1829
- "SY" => "Syrian Arab Republic",
1830
- "TW" => "Taiwan, Province of China",
1831
- "TJ" => "Tajikistan",
1832
- "TZ" => "Tanzania, United Republic of",
1833
- "TH" => "Thailand",
1834
- "TL" => "Timor-Leste",
1835
- "TG" => "Togo",
1836
- "TK" => "Tokelau",
1837
- "TO" => "Tonga",
1838
- "TT" => "Trinidad and Tobago",
1839
- "TN" => "Tunisia",
1840
- "TR" => "Turkey",
1841
- "TM" => "Turkmenistan",
1842
- "TC" => "Turks and Caicos Islands",
1843
- "TV" => "Tuvalu",
1844
- "UG" => "Uganda",
1845
- "UA" => "Ukraine",
1846
- "AE" => "United Arab Emirates",
1847
- "GB" => "United Kingdom",
1848
- "US" => "United States",
1849
- "UM" => "United States Minor Outlying Islands",
1850
- "UY" => "Uruguay",
1851
- "UZ" => "Uzbekistan",
1852
- "VU" => "Vanuatu",
1853
- "VE" => "Venezuela, Bolivarian Republic of",
1854
- "VN" => "Viet Nam",
1855
- "VG" => "Virgin Islands, British",
1856
- "VI" => "Virgin Islands, U.S.",
1857
- "WF" => "Wallis and Futuna",
1858
- "EH" => "Western Sahara",
1859
- "YE" => "Yemen",
1860
- "ZM" => "Zambia",
1861
- "ZW" => "Zimbabwe",
1862
- );
1863
- }
 
1864
 
1865
- function contactType() {
1866
- return array(
1867
- "Customer Service",
1868
- "Technical Support",
1869
- "Billing Support",
1870
- "Bill Payment",
1871
- "Sales",
1872
- "Reservations",
1873
- "Credit Card Support",
1874
- "Emergency",
1875
- "Baggage Tracking",
1876
- "Roadside Assistance",
1877
- "Package Tracking"
1878
- );
1879
- }
 
1880
 
1881
- function languageList() {
1882
- return array(
1883
- "Akan",
1884
- "Amharic",
1885
- "Arabic",
1886
- "Assamese",
1887
- "Awadhi",
1888
- "Azerbaijani",
1889
- "Balochi",
1890
- "Belarusian",
1891
- "Bengali",
1892
- "Bhojpuri",
1893
- "Burmese",
1894
- "Cantonese",
1895
- "Cebuano",
1896
- "Chewa",
1897
- "Chhattisgarhi",
1898
- "Chittagonian",
1899
- "Czech",
1900
- "Deccan",
1901
- "Dhundhari",
1902
- "Dutch",
1903
- "English",
1904
- "French",
1905
- "Fula",
1906
- "Gan",
1907
- "German",
1908
- "Greek",
1909
- "Gujarati",
1910
- "Haitian Creole",
1911
- "Hakka",
1912
- "Haryanvi",
1913
- "Hausa",
1914
- "Hiligaynon",
1915
- "Hindi / Urdu",
1916
- "Hmong",
1917
- "Hungarian",
1918
- "Igbo",
1919
- "Ilokano",
1920
- "Italian",
1921
- "Japanese",
1922
- "Javanese",
1923
- "Jin",
1924
- "Kannada",
1925
- "Kazakh",
1926
- "Khmer",
1927
- "Kinyarwanda",
1928
- "Kirundi",
1929
- "Konkani",
1930
- "Korean",
1931
- "Kurdish",
1932
- "Madurese",
1933
- "Magahi",
1934
- "Maithili",
1935
- "Malagasy",
1936
- "Malay/Indonesian",
1937
- "Malayalam",
1938
- "Mandarin",
1939
- "Marathi",
1940
- "Marwari",
1941
- "Min Bei",
1942
- "Min Dong",
1943
- "Min Nan",
1944
- "Mossi",
1945
- "Nepali",
1946
- "Oriya",
1947
- "Oromo",
1948
- "Pashto",
1949
- "Persian",
1950
- "Polish",
1951
- "Portuguese",
1952
- "Punjabi",
1953
- "Quechua",
1954
- "Romanian",
1955
- "Russian",
1956
- "Saraiki",
1957
- "Serbo-Croatian",
1958
- "Shona",
1959
- "Sindhi",
1960
- "Sinhalese",
1961
- "Somali",
1962
- "Spanish",
1963
- "Sundanese",
1964
- "Swahili",
1965
- "Swedish",
1966
- "Sylheti",
1967
- "Tagalog",
1968
- "Tamil",
1969
- "Telugu",
1970
- "Thai",
1971
- "Turkish",
1972
- "Ukrainian",
1973
- "Uyghur",
1974
- "Uzbek",
1975
- "Vietnamese",
1976
- "Wu",
1977
- "Xhosa",
1978
- "Xiang",
1979
- "Yoruba",
1980
- "Zulu",
1981
- );
1982
- }
 
1983
 
1984
- function socialList() {
1985
- return array(
1986
- 'facebook' => __( 'Facebook' ),
1987
- 'twitter' => __( 'Twitter' ),
1988
- 'google-plus' => __( 'Google+' ),
1989
- 'instagram' => __( 'Instagram' ),
1990
- 'youtube' => __( 'Youtube' ),
1991
- 'linkedin' => __( 'LinkedIn' ),
1992
- 'myspace' => __( 'Myspace' ),
1993
- 'pinterest' => __( 'Pinterest' ),
1994
- 'soundcloud' => __( 'SoundCloud' ),
1995
- 'tumblr' => __( 'Tumblr' ),
1996
- 'wikidata' => __( 'Wikidata' ),
1997
- );
1998
- }
 
1999
 
2000
- function imgInfo( $url = null ) {
2001
- $img = array();
2002
- if ( $url ) {
2003
- $imgA = @getimagesize( $url );
2004
- if ( is_array( $imgA ) && ! empty( $imgA ) ) {
2005
- $img['width'] = $imgA[0];
2006
- $img['height'] = $imgA[1];
2007
- } else {
2008
- $img['width'] = 0;
2009
- $img['height'] = 0;
2010
- }
2011
- }
 
2012
 
2013
- return $img;
2014
- }
2015
 
2016
- function isAssoc( $array ) {
2017
- $keys = array_keys( $array );
 
2018
 
2019
- return $keys !== array_keys( $keys );
2020
- }
2021
 
2022
 
2023
- }
2024
  endif;
1
  <?php
2
 
3
+ if (!class_exists('KcSeoSchemaModel')):
4
+ class KcSeoSchemaModel {
 
5
 
6
+ function __construct()
7
+ {
8
 
9
+ }
 
10
 
11
+ function schemaOutput($schemaID, $metaData)
12
+ {
13
+ $html = null;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
+ if ($schemaID) {
16
+ global $KcSeoWPSchema;
17
+ switch ($schemaID) {
18
+ case "article":
19
+ $article = array();
20
+ $article["@context"] = "http://schema.org";
21
+ $article["@type"] = "Article";
22
+ if (!empty($metaData['headline'])) {
23
+ $article["headline"] = $KcSeoWPSchema->sanitizeOutPut($metaData['headline']);
24
+ }
25
+ if (!empty($metaData['mainEntityOfPage'])) {
26
+ $article["mainEntityOfPage"] = array(
27
+ "@type" => "WebPage",
28
+ "@id" => $KcSeoWPSchema->sanitizeOutPut($metaData["mainEntityOfPage"])
29
+ );
30
+ }
31
+ if (!empty($metaData['author'])) {
32
+ $article["author"] = array(
33
+ "@type" => "Person",
34
+ "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['author'])
35
+ );
36
+ }
37
+ if (!empty($metaData['publisher'])) {
38
+ if (!empty($metaData['publisherImage'])) {
39
+ $img = $KcSeoWPSchema->imageInfo(absint($metaData['publisherImage']));
40
+ $plA = array(
41
+ "@type" => "ImageObject",
42
+ "url" => $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url'),
43
+ "height" => $img['height'],
44
+ "width" => $img['width']
45
+ );
46
+ } else {
47
+ $plA = array();
48
+ }
49
+ $article["publisher"] = array(
50
+ "@type" => "Organization",
51
+ "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['publisher']),
52
+ "logo" => $plA
53
+ );
54
+ }
55
+ if (!empty($metaData['alternativeHeadline'])) {
56
+ $article["alternativeHeadline"] = $KcSeoWPSchema->sanitizeOutPut($metaData['alternativeHeadline']);
57
+ }
58
+ if (!empty($metaData['image'])) {
59
+ $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
60
+ $article["image"] = array(
61
+ "@type" => "ImageObject",
62
+ "url" => $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url'),
63
+ "height" => $img['height'],
64
+ "width" => $img['width']
65
+ );
66
+ }
67
+ if (!empty($metaData['datePublished'])) {
68
+ $article["datePublished"] = $KcSeoWPSchema->sanitizeOutPut($metaData['datePublished']);
69
+ }
70
+ if (!empty($metaData['dateModified'])) {
71
+ $article["dateModified"] = $KcSeoWPSchema->sanitizeOutPut($metaData['dateModified']);
72
+ }
73
+ if (!empty($metaData['description'])) {
74
+ $article["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
75
+ 'textarea');
76
+ }
77
+ if (!empty($metaData['articleBody'])) {
78
+ $article["articleBody"] = $KcSeoWPSchema->sanitizeOutPut($metaData['articleBody'],
79
+ 'textarea');
80
+ }
81
+ $html .= $this->get_jsonEncode($article);
82
+ break;
83
 
84
+ case "news_article":
85
+ $newsArticle = array();
86
+ $newsArticle["@context"] = "http://schema.org";
87
+ $newsArticle["@type"] = "NewsArticle";
88
+ if (!empty($metaData['headline'])) {
89
+ $newsArticle["headline"] = $KcSeoWPSchema->sanitizeOutPut($metaData['headline']);
90
+ }
91
+ if (!empty($metaData['mainEntityOfPage'])) {
92
+ $newsArticle["mainEntityOfPage"] = array(
93
+ "@type" => "WebPage",
94
+ "@id" => $KcSeoWPSchema->sanitizeOutPut($metaData["mainEntityOfPage"])
95
+ );
96
+ }
97
+ if (!empty($metaData['author'])) {
98
+ $newsArticle["author"] = array(
99
+ "@type" => "Person",
100
+ "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['author'])
101
+ );
102
+ }
103
+ if (!empty($metaData['image'])) {
104
+ $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
105
+ $newsArticle["image"] = array(
106
+ "@type" => "ImageObject",
107
+ "url" => $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url'),
108
+ "height" => $img['height'],
109
+ "width" => $img['width']
110
+ );
111
+ }
112
+ if (!empty($metaData['datePublished'])) {
113
+ $newsArticle["datePublished"] = $KcSeoWPSchema->sanitizeOutPut($metaData['datePublished']);
114
+ }
115
+ if (!empty($metaData['dateModified'])) {
116
+ $newsArticle["dateModified"] = $KcSeoWPSchema->sanitizeOutPut($metaData['dateModified']);
117
+ }
118
+ if (!empty($metaData['publisher'])) {
119
+ if (!empty($metaData['publisherImage'])) {
120
+ $img = $KcSeoWPSchema->imageInfo(absint($metaData['publisherImage']));
121
+ $plA = array(
122
+ "@type" => "ImageObject",
123
+ "url" => $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url'),
124
+ "height" => $img['height'],
125
+ "width" => $img['width']
126
+ );
127
+ } else {
128
+ $plA = array();
129
+ }
130
+ $newsArticle["publisher"] = array(
131
+ "@type" => "Organization",
132
+ "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['publisher']),
133
+ "logo" => $plA
134
+ );
135
+ }
136
+ if (!empty($metaData['description'])) {
137
+ $newsArticle["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
138
+ 'textarea');
139
+ }
140
+ if (!empty($metaData['articleBody'])) {
141
+ $newsArticle["articleBody"] = $KcSeoWPSchema->sanitizeOutPut($metaData['articleBody'],
142
+ 'textarea');
143
+ }
144
+ $html .= $this->get_jsonEncode($newsArticle);
145
+ break;
146
 
147
+ case "blog_posting":
148
+ $blogPosting = array();
149
+ $blogPosting["@context"] = "http://schema.org";
150
+ $blogPosting["@type"] = "BlogPosting";
151
+ if (!empty($metaData['headline'])) {
152
+ $blogPosting["headline"] = $KcSeoWPSchema->sanitizeOutPut($metaData['headline']);
153
+ }
154
+ if (!empty($metaData['mainEntityOfPage'])) {
155
+ $blogPosting["mainEntityOfPage"] = array(
156
+ "@type" => "WebPage",
157
+ "@id" => $KcSeoWPSchema->sanitizeOutPut($metaData["mainEntityOfPage"])
158
+ );
159
+ }
160
+ if (!empty($metaData['author'])) {
161
+ $blogPosting["author"] = array(
162
+ "@type" => "Person",
163
+ "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['author'])
164
+ );
165
+ }
166
+ if (!empty($metaData['image'])) {
167
+ $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
168
+ $blogPosting["image"] = array(
169
+ "@type" => "ImageObject",
170
+ "url" => $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url'),
171
+ "height" => $img['height'],
172
+ "width" => $img['width']
173
+ );
174
+ }
175
+ if (!empty($metaData['datePublished'])) {
176
+ $blogPosting["datePublished"] = $KcSeoWPSchema->sanitizeOutPut($metaData['datePublished']);
177
+ }
178
+ if (!empty($metaData['dateModified'])) {
179
+ $blogPosting["dateModified"] = $KcSeoWPSchema->sanitizeOutPut($metaData['dateModified']);
180
+ }
181
+ if (!empty($metaData['publisher'])) {
182
+ if (!empty($metaData['publisherImage'])) {
183
+ $img = $KcSeoWPSchema->imageInfo(absint($metaData['publisherImage']));
184
+ $plA = array(
185
+ "@type" => "ImageObject",
186
+ "url" => $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url'),
187
+ "height" => $img['height'],
188
+ "width" => $img['width']
189
+ );
190
+ } else {
191
+ $plA = array();
192
+ }
193
+ $blogPosting["publisher"] = array(
194
+ "@type" => "Organization",
195
+ "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['publisher']),
196
+ "logo" => $plA
197
+ );
198
+ }
199
+ if (!empty($metaData['description'])) {
200
+ $blogPosting["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
201
+ 'textarea');
202
+ }
203
+ if (!empty($metaData['articleBody'])) {
204
+ $blogPosting["articleBody"] = $KcSeoWPSchema->sanitizeOutPut($metaData['articleBody'],
205
+ 'textarea');
206
+ }
207
+ $html .= $this->get_jsonEncode($blogPosting);
208
+ break;
209
 
210
+ case 'event':
211
+ $event = array();
212
+ $event["@context"] = "http://schema.org";
213
+ $event["@type"] = "Event";
214
+ if (!empty($metaData['name'])) {
215
+ $event["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
216
+ }
217
+ if (!empty($metaData['startDate'])) {
218
+ $event["startDate"] = $KcSeoWPSchema->sanitizeOutPut($metaData['startDate']);
219
+ }
220
+ if (!empty($metaData['endDate'])) {
221
+ $event["endDate"] = $KcSeoWPSchema->sanitizeOutPut($metaData['endDate']);
222
+ }
223
+ if (!empty($metaData['description'])) {
224
+ $event["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
225
+ 'textarea');
226
+ }
227
+ if (!empty($metaData['performerName'])) {
228
+ $event["performer"] = array(
229
+ "@type" => "Person",
230
+ "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['performerName'])
231
+ );
232
+ }
233
+ if (!empty($metaData['image'])) {
234
+ $event["image"] = $KcSeoWPSchema->sanitizeOutPut($metaData['image'], 'url');
235
+ }
236
+ if (!empty($metaData['locationName'])) {
237
+ $event["location"] = array(
238
+ "@type" => "Place",
239
+ "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['locationName']),
240
+ "address" => $KcSeoWPSchema->sanitizeOutPut($metaData['locationAddress'])
241
+ );
242
+ }
243
+ if (!empty($metaData['price'])) {
244
+ $event["offers"] = array(
245
+ "@type" => "Offer",
246
+ "price" => $KcSeoWPSchema->sanitizeOutPut($metaData['price']),
247
+ "priceCurrency" => !empty($metaData['priceCurrency']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['priceCurrency']) : null,
248
+ "url" => !empty($metaData['url']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['url'],
249
+ 'url') : null
250
+ );
251
+ }
252
+ if (!empty($metaData['url'])) {
253
+ $event["url"] = $KcSeoWPSchema->sanitizeOutPut($metaData['url'], 'url');
254
+ }
255
+ $html .= $this->get_jsonEncode($event);
256
+ break;
257
+
258
+ case 'product':
259
+ $product = array();
260
+ $product["@context"] = "http://schema.org";
261
+ $product["@type"] = "Product";
262
+ if (!empty($metaData['name'])) {
263
+ $product["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
264
+ }
265
+ if (!empty($metaData['image'])) {
266
+ $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
267
+ $product["image"] = $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url');
268
+ }
269
+ if (!empty($metaData['description'])) {
270
+ $product["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description']);
271
+ }
272
+ if (!empty($metaData['brand'])) {
273
+ $product["brand"] = array(
274
+ "@type" => "Thing",
275
+ "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['brand'])
276
+ );
277
+ }
278
+ if (!empty($metaData['ratingValue'])) {
279
+ $product["aggregateRating"] = array(
280
+ "@type" => "AggregateRating",
281
+ "ratingValue" => !empty($metaData['ratingValue']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['ratingValue']) : null,
282
+ "reviewCount" => !empty($metaData['reviewCount']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['reviewCount']) : null
283
+ );
284
+ }
285
+ if (!empty($metaData['price'])) {
286
+ $product["offers"] = array(
287
+ "@type" => "Offer",
288
+ "price" => $KcSeoWPSchema->sanitizeOutPut($metaData['price']),
289
+ "priceCurrency" => !empty($metaData['priceCurrency']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['priceCurrency']) : null,
290
+ "itemCondition" => !empty($metaData['itemCondition']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['itemCondition']) : null,
291
+ "availability" => !empty($metaData['availability']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['availability']) : null,
292
+ "url" => !empty($metaData['url']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['url']) : null
293
+ );
294
+ }
295
+ $html .= $this->get_jsonEncode($product);
296
+ break;
297
 
298
+ case 'video':
299
+ $video = array();
300
+ $video["@context"] = "http://schema.org";
301
+ $video["@type"] = "VideoObject";
302
+ if (!empty($metaData['name'])) {
303
+ $video["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
304
+ }
305
+ if (!empty($metaData['description'])) {
306
+ $video["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
307
+ 'textarea');
308
+ }
309
+ if (!empty($metaData['description'])) {
310
+ $video["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description']);
311
+ }
312
+ if (!empty($metaData['thumbnailUrl'])) {
313
+ $video["thumbnailUrl"] = $KcSeoWPSchema->sanitizeOutPut($metaData['thumbnailUrl'], 'url');
314
+ }
315
+ if (!empty($metaData['uploadDate'])) {
316
+ $video["uploadDate"] = $KcSeoWPSchema->sanitizeOutPut($metaData['uploadDate']);
317
+ }
318
+ if (!empty($metaData['duration'])) {
319
+ $video["duration"] = $KcSeoWPSchema->sanitizeOutPut($metaData['duration']);
320
+ }
321
+ if (!empty($metaData['contentUrl'])) {
322
+ $video["contentUrl"] = $KcSeoWPSchema->sanitizeOutPut($metaData['contentUrl'], 'url');
323
+ }
324
+ if (!empty($metaData['interactionCount'])) {
325
+ $video["interactionCount"] = $KcSeoWPSchema->sanitizeOutPut($metaData['interactionCount']);
326
+ }
327
+ if (!empty($metaData['expires'])) {
328
+ $video["expires"] = $KcSeoWPSchema->sanitizeOutPut($metaData['expires']);
329
+ }
330
+ $html .= $this->get_jsonEncode($video);
331
+ break;
332
 
333
+ case 'service':
334
+ $service = array();
335
+ $service["@context"] = "http://schema.org";
336
+ $service["@type"] = "Service";
337
+ if (!empty($metaData['name'])) {
338
+ $service["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
339
+ }
340
+ if (!empty($metaData['serviceType'])) {
341
+ $service["serviceType"] = $KcSeoWPSchema->sanitizeOutPut($metaData['serviceType']);
342
+ }
343
+ /*
344
  if ( ! empty( $metaData['locationName'] ) ) {
345
  $service["location"] = array(
346
  "@type" => "Place",
348
  "address" => $KcSeoWPSchema->sanitizeOutPut( $metaData['locationAddress'] )
349
  );
350
  }*/
351
+ if (!empty($metaData['award'])) {
352
+ $service["award"] = $KcSeoWPSchema->sanitizeOutPut($metaData['award']);
353
+ }
354
+ if (!empty($metaData['category'])) {
355
+ $service["category"] = $KcSeoWPSchema->sanitizeOutPut($metaData['category']);
356
+ }
357
+ if (!empty($metaData['providerMobility'])) {
358
+ $service["providerMobility"] = $KcSeoWPSchema->sanitizeOutPut($metaData['providerMobility']);
359
+ }
360
+ if (!empty($metaData['additionalType'])) {
361
+ $service["additionalType"] = $KcSeoWPSchema->sanitizeOutPut($metaData['additionalType']);
362
+ }
363
+ if (!empty($metaData['alternateName'])) {
364
+ $service["alternateName"] = $KcSeoWPSchema->sanitizeOutPut($metaData['alternateName']);
365
+ }
366
+ if (!empty($metaData['image'])) {
367
+ $service["image"] = $KcSeoWPSchema->sanitizeOutPut($metaData['image']);
368
+ }
369
+ if (!empty($metaData['mainEntityOfPage'])) {
370
+ $service["mainEntityOfPage"] = $KcSeoWPSchema->sanitizeOutPut($metaData['mainEntityOfPage']);
371
+ }
372
+ if (!empty($metaData['sameAs'])) {
373
+ $service["sameAs"] = $KcSeoWPSchema->sanitizeOutPut($metaData['sameAs']);
374
+ }
375
+ if (!empty($metaData['url'])) {
376
+ $service["url"] = $KcSeoWPSchema->sanitizeOutPut($metaData['url'], 'url');
377
+ }
378
+ $html .= $this->get_jsonEncode($service);
379
+ break;
380
 
381
+ case 'review':
382
+ $review = array();
383
+ $review["@context"] = "http://schema.org";
384
+ $review["@type"] = "Review";
385
+ if (!empty($metaData['itemName'])) {
386
+ $review["itemReviewed"] = array(
387
+ "@type" => "Thing",
388
+ "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['itemName'])
389
+ );
390
+ }
391
+ if (!empty($metaData['ratingValue'])) {
392
+ $review["reviewRating"] = array(
393
+ "@type" => "Rating",
394
+ "ratingValue" => $KcSeoWPSchema->sanitizeOutPut($metaData['ratingValue']),
395
+ "bestRating" => $KcSeoWPSchema->sanitizeOutPut($metaData['bestRating']),
396
+ "worstRating" => $KcSeoWPSchema->sanitizeOutPut($metaData['worstRating'])
397
+ );
398
+ }
399
+ if (!empty($metaData['name'])) {
400
+ $review["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
401
+ }
402
+ if (!empty($metaData['author'])) {
403
+ $review["author"] = array(
404
+ "@type" => "Person",
405
+ "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['author'])
406
+ );
407
+ }
408
+ if (!empty($metaData['reviewBody'])) {
409
+ $review["reviewBody"] = $KcSeoWPSchema->sanitizeOutPut($metaData['reviewBody']);
410
+ }
411
+ if (!empty($metaData['datePublished'])) {
412
+ $review["datePublished"] = $KcSeoWPSchema->sanitizeOutPut($metaData['datePublished']);
413
+ }
414
+ if (!empty($metaData['publisher'])) {
415
+ $review["publisher"] = array(
416
+ "@type" => "Organization",
417
+ "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['publisher'])
418
+ );
419
+ }
420
+ $html .= $this->get_jsonEncode($review);
421
+ break;
422
+ case 'aggregate_rating':
423
+ $aRating = array();
424
+ $aRating["@context"] = "http://schema.org";
425
+ $aRating["@type"] = !empty($metaData['schema_type']) ? $metaData['schema_type'] : "LocalBusiness";
426
+ if (!empty($metaData['name'])) {
427
+ $aRating["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
428
+ }
429
+ if (!empty($metaData['description'])) {
430
+ $aRating["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
431
+ 'textarea');
432
+ }
433
+ if ($aRating["@type"] != "Organization") {
434
+ if (!empty($metaData['image'])) {
435
+ $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
436
+ $aRating["image"] = array(
437
+ "@type" => "ImageObject",
438
+ "url" => $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url'),
439
+ "height" => $img['height'],
440
+ "width" => $img['width']
441
+ );
442
+ }
443
+ if (!empty($metaData['priceRange'])) {
444
+ $aRating["priceRange"] = $KcSeoWPSchema->sanitizeOutPut($metaData['priceRange']);
445
+ }
446
+ if (!empty($metaData['telephone'])) {
447
+ $aRating["telephone"] = $KcSeoWPSchema->sanitizeOutPut($metaData['telephone']);
448
+ }
449
 
450
+ if (!empty($metaData['address'])) {
451
+ $aRating["address"] = $KcSeoWPSchema->sanitizeOutPut($metaData['address']);
452
+ }
453
+ }
454
 
455
+ if (!empty($metaData['ratingValue'])) {
456
+ $rValue = array();
457
+ $rValue["@type"] = "AggregateRating";
458
+ $rValue["ratingValue"] = $KcSeoWPSchema->sanitizeOutPut($metaData['ratingValue']);
459
+ if (!empty($metaData['bestRating'])) {
460
+ $rValue["bestRating"] = $KcSeoWPSchema->sanitizeOutPut($metaData['bestRating']);
461
+ }
462
+ if (!empty($metaData['worstRating'])) {
463
+ $rValue["worstRating"] = $KcSeoWPSchema->sanitizeOutPut($metaData['worstRating']);
464
+ }
465
+ if (!empty($metaData['ratingCount'])) {
466
+ $rValue["ratingCount"] = $KcSeoWPSchema->sanitizeOutPut($metaData['ratingCount']);
467
+ }
468
 
469
+ $aRating["aggregateRating"] = $rValue;
470
+ }
471
+ $html .= $this->get_jsonEncode($aRating);
472
+ break;
473
 
474
+ case 'restaurant':
475
+ $restaurant = array();
476
+ $restaurant["@context"] = "http://schema.org";
477
+ $restaurant["@type"] = "Restaurant";
478
+ if (!empty($metaData['name'])) {
479
+ $restaurant["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
480
+ }
481
+ if (!empty($metaData['description'])) {
482
+ $restaurant["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
483
+ 'textarea');
484
+ }
485
+ if (!empty($metaData['openingHours'])) {
486
+ $restaurant["openingHours"] = $KcSeoWPSchema->sanitizeOutPut($metaData['openingHours'],
487
+ 'textarea');
488
+ }
489
+ if (!empty($metaData['telephone'])) {
490
+ $restaurant["telephone"] = $KcSeoWPSchema->sanitizeOutPut($metaData['telephone']);
491
+ }
492
+ if (!empty($metaData['menu'])) {
493
+ $restaurant["menu"] = $KcSeoWPSchema->sanitizeOutPut($metaData['menu'], 'url');
494
+ }
495
+ if (!empty($metaData['image'])) {
496
+ $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
497
+ $restaurant["image"] = $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url');
498
+ }
499
+ if (!empty($metaData['address'])) {
500
+ $restaurant["address"] = $KcSeoWPSchema->sanitizeOutPut($metaData['address'], 'textarea');
501
+ }
502
+ if (!empty($metaData['priceRange'])) {
503
+ $restaurant["priceRange"] = $KcSeoWPSchema->sanitizeOutPut($metaData['priceRange']);
504
+ }
505
+ if (!empty($metaData['servesCuisine'])) {
506
+ $restaurant["servesCuisine"] = $KcSeoWPSchema->sanitizeOutPut($metaData['servesCuisine']);
507
+ }
508
+ $html .= $this->get_jsonEncode($restaurant);
509
+ break;
510
 
511
+ case 'localBusiness':
512
+ $localBusiness = array();
513
+ $localBusiness["@context"] = "http://schema.org";
514
+ $localBusiness["@type"] = "LocalBusiness";
515
+ if (!empty($metaData['name'])) {
516
+ $localBusiness["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
517
+ }
518
+ if (!empty($metaData['description'])) {
519
+ $localBusiness["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
520
+ 'textarea');
521
+ }
522
+ if (!empty($metaData['image'])) {
523
+ $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
524
+ $localBusiness["image"] = $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url');
525
+ }
526
+ if (!empty($metaData['priceRange'])) {
527
+ $localBusiness["priceRange"] = $KcSeoWPSchema->sanitizeOutPut($metaData['priceRange']);
528
+ }
529
+ if (!empty($metaData['addressLocality']) || !empty($metaData['addressRegion'])
530
+ || !empty($metaData['postalCode']) || !empty($metaData['streetAddress'])) {
531
+ $localBusiness["address"] = array(
532
+ "@type" => "PostalAddress",
533
+ "addressLocality" => $KcSeoWPSchema->sanitizeOutPut($metaData['addressLocality']),
534
+ "addressRegion" => $KcSeoWPSchema->sanitizeOutPut($metaData['addressRegion']),
535
+ "postalCode" => $KcSeoWPSchema->sanitizeOutPut($metaData['postalCode']),
536
+ "streetAddress" => $KcSeoWPSchema->sanitizeOutPut($metaData['streetAddress'])
537
+ );
538
+ }
539
 
540
+ if (!empty($metaData['telephone'])) {
541
+ $localBusiness["telephone"] = $KcSeoWPSchema->sanitizeOutPut($metaData['telephone']);
542
+ }
543
+ $html .= $this->get_jsonEncode($localBusiness);
544
+ break;
545
 
546
+ default:
547
+ break;
548
+ }
549
 
550
+ }
551
 
552
+ return $html;
553
+ }
554
 
555
+ function get_field($data)
556
+ {
557
+ $html = null;
558
+ global $KcSeoWPSchema;
559
+ $id = $data['id'];
560
+ $name = $data['name'];
561
+ $value = $data['value'];
562
+ $attr = !empty($data['attr']) ? $data['attr'] : null;
563
 
564
+ $class = isset($data['class']) ? ($data['class'] ? $data['class'] : null) : null;
565
+ $require = (isset($data['required']) ? ($data['required'] ? "<span class='required'>*</span>" : null) : null);
566
+ $title = (isset($data['title']) ? ($data['title'] ? $data['title'] : null) : null);
567
+ $desc = (isset($data['desc']) ? ($data['desc'] ? $data['desc'] : null) : null);
568
+ $holderClass = (!empty($data['holderClass']) ? $data['holderClass'] : null);
569
+ $html .= "<div class='field-container {$holderClass}' id='" . $id . '-container' . "'>";
570
+ $html .= "<label class='field-label' for='{$id}'>{$title}{$require}</label>";
571
+ $html .= "<div class='field-content' id='" . $id . '-content' . "'>";
572
+ switch ($data['type']) {
573
+ case 'checkbox':
574
+ $checked = ($value ? "checked" : null);
575
+ $html .= "<div class='kSeo-checkbox-wrapper'>";
576
+ $html .= "<label for='{$id}'><input type='checkbox' id='{$id}' class='{$class}' name='{$name}' {$checked} value='1' /> Enable</label>";
577
+ $html .= "</div>";
578
+ break;
579
 
580
+ case 'text':
581
+ $html .= "<input type='text' id='{$id}' class='{$class}' name='{$name}' value='" . esc_html($value) . "' />";
582
+ break;
583
 
584
+ case 'number':
585
+ $html .= "<input type='number' {$attr} id='{$id}' class='{$class}' name='{$name}' value='" . esc_attr($value) . "' />";
586
+ break;
587
+ case 'textarea':
588
+ $html .= "<textarea id='{$id}' class='{$class}' name='{$name}' >" . wp_kses($value,
589
+ array()) . "</textarea>";
590
+ break;
591
 
592
+ case 'image':
593
+ $html .= '<div class="kSeo-image">';
594
+ $ImageId = !empty($value) ? absint($value) : 0;
595
+ $image = $ingInfo = null;
596
+ if ($ImageId) {
597
+ $image = wp_get_attachment_image($ImageId, "thumbnail");
598
+ $imgData = $KcSeoWPSchema->imageInfo($ImageId);
599
+ $ingInfo .= "<span><strong>URL: </strong>{$imgData['url']}</span>";
600
+ $ingInfo .= "<span><strong>Width: </strong>{$imgData['width']}px</span>";
601
+ $ingInfo .= "<span><strong>Height: </strong>{$imgData['height']}px</span>";
602
+ }
603
+ $html .= "<div class='kSeo-image-wrapper'>";
604
+ $html .= '<span class="kSeoImgAdd"><span class="dashicons dashicons-plus-alt"></span></span>';
605
+ $html .= '<span class="kSeoImgRemove ' . ($image ? null : "kSeo-hidden") . '"><span class="dashicons dashicons-trash"></span></span>';
606
+ $html .= '<div class="kSeo-image-preview">' . $image . '</div>';
607
+ $html .= "<input type='hidden' name='{$name}' value='" . absint($ImageId) . "' />";
608
+ $html .= "</div>";
609
+ $html .= "<div class='image-info'>{$ingInfo}</div>";
610
+ $html .= '</div>';
611
+ break;
612
+ case 'select':
613
+ $html .= "<select name='{$name}' class='select2 {$class}' id='{$id}'>";
614
+ if (!empty($data['empty'])) {
615
+ $html .= "<option value=''>{$data['empty']}</option>";
616
+ }
617
+ if (!empty($data['options']) && is_array($data['options'])) {
618
+ if ($this->isAssoc($data['options'])) {
619
+ foreach ($data['options'] as $optKey => $optValue) {
620
+ $slt = ($optKey == $value ? "selected" : null);
621
+ $html .= "<option value='" . esc_attr($optKey) . "' {$slt}>" . esc_html($optValue) . "</option>";
622
+ }
623
+ } else {
624
+ foreach ($data['options'] as $optValue) {
625
+ $slt = ($optValue == $value ? "selected" : null);
626
+ $html .= "<option value='" . esc_attr($optValue) . "' {$slt}>" . esc_html($optValue) . "</option>";
627
+ }
628
+ }
629
+ }
630
+ $html .= "</select>";
631
+ break;
632
+ case 'schema_type':
633
+ $html .= "<select name='{$name}' class='select2 {$class}' id='{$id}'>";
634
+ if (!empty($data['empty'])) {
635
+ $html .= "<option value=''>{$data['empty']}</option>";
636
+ }
637
 
638
+ foreach ($data['options'] as $key => $site) {
639
+ if (is_array($site)) {
640
+ $slt = ($key == $value ? "selected" : null);
641
+ $html .= "<option value='$key' $slt>&nbsp;&nbsp;&nbsp;$key</option>";
642
+ foreach ($site as $inKey => $inSite) {
643
+ if (is_array($inSite)) {
644
+ $slt = ($inKey == $value ? "selected" : null);
645
+ $html .= "<option value='$inKey' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$inKey</option>";
646
+ foreach ($inSite as $inInKey => $inInSite) {
647
+ if (is_array($inInSite)) {
648
+ $slt = ($inInKey == $value ? "selected" : null);
649
+ $html .= "<option value='$inInKey' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$inInKey</option>";
650
+ foreach ($inInSite as $iSite) {
651
+ $slt = ($iSite == $value ? "selected" : null);
652
+ $html .= "<option value='$iSite' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$iSite</option>";
653
+ }
654
+ } else {
655
+ $slt = ($inInSite == $value ? "selected" : null);
656
+ $html .= "<option value='$inInSite' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$inInSite</option>";
657
+ }
658
+ }
659
+ } else {
660
+ $slt = ($inSite == $value ? "selected" : null);
661
+ $html .= "<option value='$inSite' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$inSite</option>";
662
+ }
663
+ }
664
+ } else {
665
+ $slt = ($site == $value ? "selected" : null);
666
+ $html .= "<option value='$site' $slt>$site</option>";
667
+ }
668
+ }
669
+ $html .= "</select>";
670
+ break;
671
+ default:
672
+ $html .= "<input id='{$id}' type='{$data['type']}' value='" . esc_attr($value) . "' name='$name' />";
673
+ break;
674
 
675
+ }
676
+ $html .= "<p class='description'>{$desc}</p>";
677
+ $html .= "</div>";
678
+ $html .= "</div>";
679
 
680
+ return $html;
681
+ }
682
 
683
+ public function schemaTypes()
684
+ {
685
+ return array(
686
+ 'article' => array(
687
+ 'title' => __("Article", "wp-seo-structured-data-schema"),
688
+ 'fields' => array(
689
+ 'active' => array(
690
+ 'type' => 'checkbox'
691
+ ),
692
+ 'headline' => array(
693
+ 'title' => __('Headline', "wp-seo-structured-data-schema"),
694
+ 'type' => 'text',
695
+ 'desc' => __('Article title', "wp-seo-structured-data-schema"),
696
+ 'required' => true
697
+ ),
698
+ 'mainEntityOfPage' => array(
699
+ 'title' => __('Page URL', "wp-seo-structured-data-schema"),
700
+ 'type' => 'url',
701
+ 'desc' => __('The canonical URL of the article page', "wp-seo-structured-data-schema"),
702
+ 'required' => true
703
+ ),
704
+ 'author' => array(
705
+ 'title' => __('Author Name', "wp-seo-structured-data-schema"),
706
+ 'type' => 'text',
707
+ 'desc' => __('Author display name', "wp-seo-structured-data-schema"),
708
+ 'required' => true
709
+ ),
710
+ 'image' => array(
711
+ 'title' => __('Article Feature Image', "wp-seo-structured-data-schema"),
712
+ 'type' => 'image',
713
+ 'required' => true,
714
+ 'desc' => __('Images should be at least 696 pixels wide.<br>Images should be in .jpg, .png, or. gif format.', "wp-seo-structured-data-schema")
715
+ ),
716
+ 'datePublished' => array(
717
+ 'title' => __('Published date', "wp-seo-structured-data-schema"),
718
+ 'type' => 'text',
719
+ 'class' => 'kcseo-date',
720
+ 'required' => true,
721
+ 'desc' => __('Like this: 2015-12-25', "wp-seo-structured-data-schema")
722
+ ),
723
+ 'dateModified' => array(
724
+ 'title' => __('Modified date', "wp-seo-structured-data-schema"),
725
+ 'type' => 'text',
726
+ 'class' => 'kcseo-date',
727
+ 'required' => true,
728
+ 'desc' => __('Like this: 2015-12-25', "wp-seo-structured-data-schema")
729
+ ),
730
+ 'publisher' => array(
731
+ 'title' => __('Publisher', "wp-seo-structured-data-schema"),
732
+ 'type' => 'text',
733
+ 'desc' => __('Publisher name or Organization name', "wp-seo-structured-data-schema"),
734
+ 'required' => true
735
+ ),
736
+ 'publisherImage' => array(
737
+ 'title' => __('Publisher Logo', "wp-seo-structured-data-schema"),
738
+ 'type' => 'image',
739
+ 'desc' => __('Logos should have a wide aspect ratio, not a square icon.<br>Logos should be no wider than 600px, and no taller than 60px.<br>Always retain the original aspect ratio of the logo when resizing. Ideally, logos are exactly 60px tall with width <= 600px. If maintaining a height of 60px would cause the width to exceed 600px, downscale the logo to exactly 600px wide and reduce the height accordingly below 60px to maintain the original aspect ratio.<br>', "wp-seo-structured-data-schema"),
740
+ 'required' => true
741
+ ),
742
+ 'description' => array(
743
+ 'title' => __('Description', "wp-seo-structured-data-schema"),
744
+ 'type' => 'textarea',
745
+ 'desc' => __('Short description', "wp-seo-structured-data-schema")
746
+ ),
747
+ 'articleBody' => array(
748
+ 'title' => __('Article body', "wp-seo-structured-data-schema"),
749
+ 'type' => 'textarea',
750
+ 'desc' => __('Article content', "wp-seo-structured-data-schema")
751
+ ),
752
+ 'alternativeHeadline' => array(
753
+ 'title' => __('Alternative headline', "wp-seo-structured-data-schema"),
754
+ 'type' => 'text',
755
+ 'desc' => __('A secondary headline for the article.', "wp-seo-structured-data-schema")
756
+ ),
757
+ )
758
+ ),
759
+ 'blog_posting' => array(
760
+ 'title' => __('Blog Posting', "wp-seo-structured-data-schema"),
761
+ 'fields' => array(
762
+ 'active' => array(
763
+ 'type' => 'checkbox'
764
+ ),
765
+ 'headline' => array(
766
+ 'title' => __('Headline', "wp-seo-structured-data-schema"),
767
+ 'type' => 'text',
768
+ 'desc' => __('Blog posting title', "wp-seo-structured-data-schema"),
769
+ 'required' => true
770
+ ),
771
+ 'mainEntityOfPage' => array(
772
+ 'title' => __('Page URL', "wp-seo-structured-data-schema"),
773
+ 'type' => 'url',
774
+ 'desc' => __('The canonical URL of the article page', "wp-seo-structured-data-schema"),
775
+ 'required' => true
776
+ ),
777
+ 'author' => array(
778
+ 'title' => __('Author name', "wp-seo-structured-data-schema"),
779
+ 'type' => 'text',
780
+ 'desc' => __('Author display name', "wp-seo-structured-data-schema"),
781
+ 'required' => true
782
+ ),
783
+ 'image' => array(
784
+ 'title' => __('Feature Image', "wp-seo-structured-data-schema"),
785
+ 'type' => 'image',
786
+ 'desc' => __("The representative image of the article. Only a marked-up image that directly belongs to the article should be specified.<br> Images should be at least 696 pixels wide. <br>Images should be in .jpg, .png, or. gif format.", "wp-seo-structured-data-schema"),
787
+ 'required' => true
788
+ ),
789
+ 'datePublished' => array(
790
+ 'title' => __('Published date', "wp-seo-structured-data-schema"),
791
+ 'type' => 'text',
792
+ 'class' => 'kcseo-date',
793
+ 'desc' => __('Like this: 2015-12-25', "wp-seo-structured-data-schema"),
794
+ 'required' => true
795
+ ),
796
+ 'dateModified' => array(
797
+ 'title' => __('Modified date', "wp-seo-structured-data-schema"),
798
+ 'type' => 'text',
799
+ 'class' => 'kcseo-date',
800
+ 'desc' => __('Like this: 2015-12-25', "wp-seo-structured-data-schema"),
801
+ 'required' => true
802
+ ),
803
+ 'publisher' => array(
804
+ 'title' => __('Publisher', "wp-seo-structured-data-schema"),
805
+ 'type' => 'text',
806
+ 'desc' => __('Publisher name or Organization name', "wp-seo-structured-data-schema"),
807
+ 'required' => true
808
+ ),
809
+ 'publisherImage' => array(
810
+ 'title' => __('Publisher Logo', "wp-seo-structured-data-schema"),
811
+ 'type' => 'image',
812
+ 'desc' => __("Logos should have a wide aspect ratio, not a square icon.<br>Logos should be no wider than 600px, and no taller than 60px.<br>Always retain the original aspect ratio of the logo when resizing. Ideally, logos are exactly 60px tall with width <= 600px. If maintaining a height of 60px would cause the width to exceed 600px, downscale the logo to exactly 600px wide and reduce the height accordingly below 60px to maintain the original aspect ratio.<br>", "wp-seo-structured-data-schema"),
813
+ 'required' => true
814
+ ),
815
+ 'description' => array(
816
+ 'title' => __('Description', "wp-seo-structured-data-schema"),
817
+ 'type' => 'textarea',
818
+ 'desc' => __('Short description', "wp-seo-structured-data-schema")
819
+ ),
820
+ 'articleBody' => array(
821
+ 'title' => __('Article body', "wp-seo-structured-data-schema"),
822
+ 'type' => 'textarea',
823
+ 'desc' => __('Article content', "wp-seo-structured-data-schema")
824
+ )
825
+ )
826
+ ),
827
+ 'news_article' => array(
828
+ 'title' => __('News Article', "wp-seo-structured-data-schema"),
829
+ 'fields' => array(
830
+ 'active' => array(
831
+ 'type' => 'checkbox'
832
+ ),
833
+ 'headline' => array(
834
+ 'title' => __('Headline', "wp-seo-structured-data-schema"),
835
+ 'type' => 'text',
836
+ 'desc' => __('Article title', "wp-seo-structured-data-schema"),
837
+ 'required' => true
838
+ ),
839
+ 'mainEntityOfPage' => array(
840
+ 'title' => __('Page URL', "wp-seo-structured-data-schema"),
841
+ 'type' => 'url',
842
+ 'desc' => __('The canonical URL of the article page', "wp-seo-structured-data-schema"),
843
+ 'required' => true
844
+ ),
845
+ 'author' => array(
846
+ 'title' => __('Author', "wp-seo-structured-data-schema"),
847
+ 'type' => 'text',
848
+ 'desc' => __('Author display name', "wp-seo-structured-data-schema"),
849
+ 'required' => true
850
+ ),
851
+ 'image' => array(
852
+ 'title' => __('Image', "wp-seo-structured-data-schema"),
853
+ 'type' => 'image',
854
+ 'desc' => __("The representative image of the article. Only a marked-up image that directly belongs to the article should be specified.<br> Images should be at least 696 pixels wide. <br>Images should be in .jpg, .png, or. gif format.", "wp-seo-structured-data-schema"),
855
+ 'required' => true
856
+ ),
857
+ 'datePublished' => array(
858
+ 'title' => __('Published date', "wp-seo-structured-data-schema"),
859
+ 'type' => 'text',
860
+ 'class' => 'kcseo-date',
861
+ 'desc' => __('Like this: 2015-12-25', "wp-seo-structured-data-schema"),
862
+ 'required' => true
863
+ ),
864
+ 'dateModified' => array(
865
+ 'title' => __('Modified date', "wp-seo-structured-data-schema"),
866
+ 'type' => 'text',
867
+ 'class' => 'kcseo-date',
868
+ 'required' => true,
869
+ 'desc' => __('Like this: 2015-12-25', "wp-seo-structured-data-schema")
870
+ ),
871
+ 'publisher' => array(
872
+ 'title' => __('Publisher', "wp-seo-structured-data-schema"),
873
+ 'type' => 'text',
874
+ 'desc' => __('Publisher name or Organization name', "wp-seo-structured-data-schema"),
875
+ 'required' => true
876
+ ),
877
+ 'publisherImage' => array(
878
+ 'title' => __('Publisher Logo', "wp-seo-structured-data-schema"),
879
+ 'type' => 'image',
880
+ 'desc' => __('Logos should have a wide aspect ratio, not a square icon.<br>Logos should be no wider than 600px, and no taller than 60px.<br>Always retain the original aspect ratio of the logo when resizing. Ideally, logos are exactly 60px tall with width <= 600px. If maintaining a height of 60px would cause the width to exceed 600px, downscale the logo to exactly 600px wide and reduce the height accordingly below 60px to maintain the original aspect ratio.<br>', "wp-seo-structured-data-schema"),
881
+ 'required' => true
882
+ ),
883
+ 'description' => array(
884
+ 'title' => __('Description', "wp-seo-structured-data-schema"),
885
+ 'type' => 'textarea',
886
+ 'desc' => __('Short description', "wp-seo-structured-data-schema")
887
+ ),
888
+ 'articleBody' => array(
889
+ 'title' => __('Article body', "wp-seo-structured-data-schema"),
890
+ 'type' => 'textarea',
891
+ 'desc' => __('Article body content', "wp-seo-structured-data-schema")
892
+ )
893
+ )
894
+ ),
895
+ 'event' => array(
896
+ 'title' => __('Event', "wp-seo-structured-data-schema"),
897
+ 'fields' => array(
898
+ 'active' => array(
899
+ 'type' => 'checkbox'
900
+ ),
901
+ 'name' => array(
902
+ 'title' => __('Name', "wp-seo-structured-data-schema"),
903
+ 'type' => 'text',
904
+ 'required' => true,
905
+ 'desc' => __("The name of the event.", "wp-seo-structured-data-schema")
906
+ ),
907
+ 'locationName' => array(
908
+ 'title' => __('Location name', "wp-seo-structured-data-schema"),
909
+ 'type' => 'text',
910
+ 'required' => true,
911
+ 'desc' => __("Event Location name", "wp-seo-structured-data-schema")
912
+ ),
913
+ 'locationAddress' => array(
914
+ 'title' => __('Location address', "wp-seo-structured-data-schema"),
915
+ 'type' => 'text',
916
+ 'required' => true,
917
+ 'desc' => __("The location of for example where the event is happening, an organization is located, or where an action takes place.", "wp-seo-structured-data-schema")
918
+ ),
919
+ 'startDate' => array(
920
+ 'title' => __('Start date', "wp-seo-structured-data-schema"),
921
+ 'type' => 'text',
922
+ 'class' => 'kcseo-date',
923
+ 'required' => true,
924
+ 'desc' => __("Event start date", "wp-seo-structured-data-schema")
925
+ ),
926
+ 'endDate' => array(
927
+ 'title' => __('End date (Recommended)', "wp-seo-structured-data-schema"),
928
+ 'type' => 'text',
929
+ 'class' => 'kcseo-date',
930
+ 'desc' => __("Event end date", "wp-seo-structured-data-schema")
931
+ ),
932
+ 'description' => array(
933
+ 'title' => __('Description (Recommended)', "wp-seo-structured-data-schema"),
934
+ 'type' => 'textarea',
935
+ 'desc' => __("Event description", "wp-seo-structured-data-schema")
936
+ ),
937
+ 'performerName' => array(
938
+ 'title' => __('Performer Name (Recommended)', "wp-seo-structured-data-schema"),
939
+ 'type' => 'text',
940
+ 'desc' => __("The performer's name.", "wp-seo-structured-data-schema")
941
+ ),
942
+ 'image' => array(
943
+ 'title' => __('Image URL (Recommended)', "wp-seo-structured-data-schema"),
944
+ 'type' => 'url',
945
+ 'desc' => __("URL of an image or logo for the event or tour", "wp-seo-structured-data-schema")
946
+ ),
947
+ 'price' => array(
948
+ 'title' => __('Price (Recommended)', "wp-seo-structured-data-schema"),
949
+ 'type' => 'number',
950
+ 'attr' => 'step="any"',
951
+ 'desc' => __("This is highly recommended. The lowest available price, including service charges and fees, of this type of ticket. <span class='required'>Not required but (Recommended)</span>", "wp-seo-structured-data-schema")
952
+ ),
953
+ 'priceCurrency' => array(
954
+ 'title' => __('Price currency', "wp-seo-structured-data-schema"),
955
+ 'type' => 'text',
956
+ 'desc' => __("The 3-letter currency code. (USD)", "wp-seo-structured-data-schema")
957
+ ),
958
+ 'url' => array(
959
+ 'title' => 'URL (Recommended)',
960
+ 'type' => 'url',
961
+ 'placeholder' => 'URL',
962
+ 'desc' => __("A link to the event's details page. <span class='required'>Not required but (Recommended)</span>", "wp-seo-structured-data-schema")
963
+ ),
964
+ )
965
+ ),
966
+ 'product' => array(
967
+ 'title' => __('Product', "wp-seo-structured-data-schema"),
968
+ 'fields' => array(
969
+ 'active' => array(
970
+ 'type' => 'checkbox'
971
+ ),
972
+ 'name' => array(
973
+ 'title' => __('Name', "wp-seo-structured-data-schema"),
974
+ 'type' => 'text',
975
+ 'required' => true,
976
+ 'desc' => __("The name of the product.", "wp-seo-structured-data-schema")
977
+ ),
978
+ 'image' => array(
979
+ 'title' => __('Image', "wp-seo-structured-data-schema"),
980
+ 'type' => 'image',
981
+ 'desc' => __("The URL of a product photo. Pictures clearly showing the product, e.g. against a white background, are preferred.", "wp-seo-structured-data-schema")
982
+ ),
983
+ 'description' => array(
984
+ 'title' => __('Description', "wp-seo-structured-data-schema"),
985
+ 'type' => 'textarea',
986
+ 'desc' => __("Product description.", "wp-seo-structured-data-schema")
987
+ ),
988
+ 'brand' => array(
989
+ 'title' => __('Brand', "wp-seo-structured-data-schema"),
990
+ 'type' => 'text',
991
+ 'desc' => __("The brand of the product.", "wp-seo-structured-data-schema")
992
+ ),
993
+ 'ratingValue' => array(
994
+ 'title' => __('Ratting value', "wp-seo-structured-data-schema"),
995
+ 'type' => 'number',
996
+ 'attr' => 'step="any"',
997
+ 'desc' => __("Rating value. (1 , 2.5, 3, 5 etc)", "wp-seo-structured-data-schema")
998
+ ),
999
+ 'reviewCount' => array(
1000
+ 'title' => __('Total review count', "wp-seo-structured-data-schema"),
1001
+ 'type' => 'number',
1002
+ 'attr' => 'step="any"',
1003
+ 'desc' => __("Rating ratting value. <span class='required'>This is required if (Ratting value) is given</span>", "wp-seo-structured-data-schema")
1004
+ ),
1005
+ 'price' => array(
1006
+ 'title' => __('Price', "wp-seo-structured-data-schema"),
1007
+ 'type' => 'number',
1008
+ 'attr' => 'step="any"',
1009
+ 'desc' => __("The lowest available price, including service charges and fees, of this type of ticket.", "wp-seo-structured-data-schema")
1010
+ ),
1011
+ 'priceCurrency' => array(
1012
+ 'title' => __('Price currency', "wp-seo-structured-data-schema"),
1013
+ 'type' => 'text',
1014
+ 'desc' => __("The 3-letter currency code.", "wp-seo-structured-data-schema")
1015
+ ),
1016
+ 'availability' => array(
1017
+ 'title' => 'Availability',
1018
+ 'type' => 'select',
1019
+ 'empty' => "Select one",
1020
+ 'options' => array(
1021
+ 'http://schema.org/InStock' => 'InStock',
1022
+ 'http://schema.org/InStoreOnly' => 'InStoreOnly',
1023
+ 'http://schema.org/OutOfStock' => 'OutOfStock',
1024
+ 'http://schema.org/SoldOut' => 'SoldOut',
1025
+ 'http://schema.org/OnlineOnly' => 'OnlineOnly',
1026
+ 'http://schema.org/LimitedAvailability' => 'LimitedAvailability',
1027
+ 'http://schema.org/Discontinued' => 'Discontinued',
1028
+ 'http://schema.org/PreOrder' => 'PreOrder',
1029
+ ),
1030
+ 'desc' => __("Select a availability type", "wp-seo-structured-data-schema")
1031
+ ),
1032
+ 'itemCondition' => array(
1033
+ 'title' => 'Product condition',
1034
+ 'type' => 'select',
1035
+ 'empty' => "Select one",
1036
+ 'options' => array(
1037
+ 'http://schema.org/NewCondition' => 'NewCondition',
1038
+ 'http://schema.org/UsedCondition' => 'UsedCondition',
1039
+ 'http://schema.org/DamagedCondition' => 'DamagedCondition',
1040
+ 'http://schema.org/RefurbishedCondition' => 'RefurbishedCondition',
1041
+ ),
1042
+ 'desc' => __("Select a condition", "wp-seo-structured-data-schema")
1043
+ ),
1044
+ 'url' => array(
1045
+ 'title' => __('Product URL', "wp-seo-structured-data-schema"),
1046
+ 'type' => 'url',
1047
+ 'desc' => __("A URL to the product web page (that includes the Offer). (Don't use offerURL for markup that appears on the product page itself.)", "wp-seo-structured-data-schema")
1048
+ ),
1049
+ )
1050
+ ),
1051
+ 'video' => array(
1052
+ 'title' => __('Video', "wp-seo-structured-data-schema"),
1053
+ 'fields' => array(
1054
+ 'active' => array(
1055
+ 'type' => 'checkbox'
1056
+ ),
1057
+ 'name' => array(
1058
+ 'title' => __('Name', "wp-seo-structured-data-schema"),
1059
+ 'type' => 'text',
1060
+ 'required' => true,
1061
+ 'desc' => __("The title of the video", "wp-seo-structured-data-schema")
1062
+ ),
1063
+ 'description' => array(
1064
+ 'title' => __('Description', "wp-seo-structured-data-schema"),
1065
+ 'type' => 'textarea',
1066
+ 'required' => true,
1067
+ 'desc' => __("The description of the video", "wp-seo-structured-data-schema")
1068
+ ),
1069
+ 'thumbnailUrl' => array(
1070
+ 'title' => 'Thumbnail URL',
1071
+ 'type' => 'url',
1072
+ 'placeholder' => "URL",
1073
+ 'required' => true,
1074
+ 'desc' => __("A URL pointing to the video thumbnail image file. Images must be at least 160x90 pixels and at most 1920x1080 pixels.", "wp-seo-structured-data-schema")
1075
+ ),
1076
+ 'uploadDate' => array(
1077
+ 'title' => __('Updated date', "wp-seo-structured-data-schema"),
1078
+ 'type' => 'text',
1079
+ 'class' => 'kcseo-date',
1080
+ 'desc' => __('2015-02-05T08:00:00+08:00', "wp-seo-structured-data-schema")
1081
+ ),
1082
+ 'duration' => array(
1083
+ 'title' => __('Duration', "wp-seo-structured-data-schema"),
1084
+ 'type' => 'text',
1085
+ 'desc' => __("The duration of the video in ISO 8601 format.(PT1M33S)", "wp-seo-structured-data-schema")
1086
+ ),
1087
+ 'contentUrl' => array(
1088
+ 'title' => 'Content URL',
1089
+ 'type' => 'url',
1090
+ 'placeholder' => 'URL',
1091
+ 'desc' => __("A URL pointing to the actual video media file. This file should be in .mpg, .mpeg, .mp4, .m4v, .mov, .wmv, .asf, .avi, .ra, .ram, .rm, .flv, or other video file format.", "wp-seo-structured-data-schema")
1092
+ ),
1093
+ 'embedUrl' => array(
1094
+ 'title' => 'Embed URL',
1095
+ 'placeholder' => 'URL',
1096
+ 'type' => 'url',
1097
+ 'desc' => __("A URL pointing to a player for the specific video. Usually this is the information in the src element of an < embed> tag.Example: Dailymotion: http://www.dailymotion.com/swf/x1o2g.", "wp-seo-structured-data-schema")
1098
+ ),
1099
+ 'interactionCount' => array(
1100
+ 'title' => __('Interaction count', "wp-seo-structured-data-schema"),
1101
+ 'type' => 'text',
1102
+ 'desc' => __("The number of times the video has been viewed.", "wp-seo-structured-data-schema")
1103
+ ),
1104
+ 'expires' => array(
1105
+ 'title' => __('Expires', "wp-seo-structured-data-schema"),
1106
+ 'type' => 'text',
1107
+ 'class' => 'kcseo-date',
1108
+ 'desc' => __("Like this: 2015-12-25", "wp-seo-structured-data-schema")
1109
+ ),
1110
+ )
1111
+ ),
1112
+ 'service' => array(
1113
+ 'title' => __('Service', "wp-seo-structured-data-schema"),
1114
+ 'fields' => array(
1115
+ 'active' => array(
1116
+ 'type' => 'checkbox'
1117
+ ),
1118
+ 'name' => array(
1119
+ 'title' => __('Name', "wp-seo-structured-data-schema"),
1120
+ 'type' => 'text',
1121
+ 'required' => true,
1122
+ 'desc' => __("The name of the Service.", "wp-seo-structured-data-schema")
1123
+ ),
1124
+ 'serviceType' => array(
1125
+ 'title' => __('Service type', "wp-seo-structured-data-schema"),
1126
+ 'type' => 'text',
1127
+ 'required' => true,
1128
+ 'desc' => __("The type of service being offered, e.g. veterans' benefits, emergency relief, etc.", "wp-seo-structured-data-schema")
1129
+ ),
1130
+ 'additionalType' => array(
1131
+ 'title' => 'Additional type(URL)',
1132
+ 'type' => 'url',
1133
+ 'placeholder' => 'URL',
1134
+ 'desc' => __("An additional type for the service, typically used for adding more specific types from external vocabularies in microdata syntax.", "wp-seo-structured-data-schema")
1135
+ ),
1136
+ 'award' => array(
1137
+ 'title' => __('Award', "wp-seo-structured-data-schema"),
1138
+ 'type' => 'text',
1139
+ 'desc' => __("An award won by or for this service.", "wp-seo-structured-data-schema")
1140
+ ),
1141
+ 'category' => array(
1142
+ 'title' => __('Category', "wp-seo-structured-data-schema"),
1143
+ 'type' => 'text',
1144
+ 'desc' => __("A category for the service.", "wp-seo-structured-data-schema")
1145
+ ),
1146
+ 'providerMobility' => array(
1147
+ 'title' => __('Provider mobility', "wp-seo-structured-data-schema"),
1148
+ 'type' => 'text',
1149
+ 'desc' => __("Indicates the mobility of a provided service (e.g. 'static', 'dynamic').", "wp-seo-structured-data-schema")
1150
+ ),
1151
+ 'description' => array(
1152
+ 'title' => 'Description',
1153
+ 'type' => 'textarea',
1154
+ 'require' => true,
1155
+ 'desc' => __("A short description of the service.", "wp-seo-structured-data-schema")
1156
+ ),
1157
+ 'image' => array(
1158
+ 'title' => 'Image URL',
1159
+ 'type' => 'url',
1160
+ 'require' => false,
1161
+ 'desc' => __("An image of the service. This should be a URL.", "wp-seo-structured-data-schema")
1162
+ ),
1163
+ 'mainEntityOfPage' => array(
1164
+ 'title' => 'Main entity of page URL',
1165
+ 'type' => 'url',
1166
+ 'require' => false,
1167
+ 'desc' => __("Indicates a page (or other CreativeWork) for which this thing is the main entity being described.", "wp-seo-structured-data-schema")
1168
+ ),
1169
+ 'sameAs' => array(
1170
+ 'title' => 'Same as URL',
1171
+ 'type' => 'url',
1172
+ 'placeholder' => 'URL',
1173
+ 'desc' => __("URL of a reference Web page that unambiguously indicates the service's identity. E.g. the URL of the service's Wikipedia page, Freebase page, or official website.", "wp-seo-structured-data-schema")
1174
+ ),
1175
+ 'url' => array(
1176
+ 'title' => 'Url of the service',
1177
+ 'type' => 'url',
1178
+ 'placeholder' => 'URL',
1179
+ 'desc' => __("URL of the service.", "wp-seo-structured-data-schema")
1180
+ ),
1181
+ 'alternateName' => array(
1182
+ 'title' => __('Alternate name', "wp-seo-structured-data-schema"),
1183
+ 'type' => 'text',
1184
+ 'desc' => __('An alias for the service.', "wp-seo-structured-data-schema")
1185
+ ),
1186
+ )
1187
+ ),
1188
+ 'review' => array(
1189
+ 'title' => __('Review', "wp-seo-structured-data-schema"),
1190
+ 'fields' => array(
1191
+ 'active' => array(
1192
+ 'type' => 'checkbox'
1193
+ ),
1194
+ 'itemName' => array(
1195
+ 'title' => __('Name of the reviewed item', "wp-seo-structured-data-schema"),
1196
+ 'type' => 'text',
1197
+ 'required' => true,
1198
+ 'desc' => __("The item that is being reviewed.", "wp-seo-structured-data-schema")
1199
+ ),
1200
+ 'reviewBody' => array(
1201
+ 'title' => __('Review body', "wp-seo-structured-data-schema"),
1202
+ 'type' => 'textarea',
1203
+ 'required' => true,
1204
+ 'desc' => __("The actual body of the review.", "wp-seo-structured-data-schema")
1205
+ ),
1206
+ 'name' => array(
1207
+ 'title' => __('Review name', "wp-seo-structured-data-schema"),
1208
+ 'type' => 'text',
1209
+ 'required' => true,
1210
+ 'desc' => __("A particular name for the review.", "wp-seo-structured-data-schema")
1211
+ ),
1212
+ 'author' => array(
1213
+ 'title' => __('Author', "wp-seo-structured-data-schema"),
1214
+ 'type' => 'text',
1215
+ 'required' => true,
1216
+ 'author' => 'Author name',
1217
+ 'desc' => __("The author of the review. The reviewer’s name needs to be a valid name.", "wp-seo-structured-data-schema")
1218
+ ),
1219
+ 'datePublished' => array(
1220
+ 'title' => __('Date of Published', "wp-seo-structured-data-schema"),
1221
+ 'type' => 'text',
1222
+ 'class' => 'kcseo-date',
1223
+ 'desc' => __("Like this: 2015-12-25", "wp-seo-structured-data-schema")
1224
+ ),
1225
+ 'ratingValue' => array(
1226
+ 'title' => __('Rating value', "wp-seo-structured-data-schema"),
1227
+ 'type' => 'number',
1228
+ 'attr' => 'step="any"',
1229
+ 'desc' => __("A numerical quality rating for the item.", "wp-seo-structured-data-schema")
1230
+ ),
1231
+ 'bestRating' => array(
1232
+ 'title' => __('Best rating', "wp-seo-structured-data-schema"),
1233
+ 'type' => 'number',
1234
+ 'attr' => 'step="any"',
1235
+ 'desc' => __("The highest value allowed in this rating system.", "wp-seo-structured-data-schema")
1236
+ ),
1237
+ 'worstRating' => array(
1238
+ 'title' => __('Worst rating', "wp-seo-structured-data-schema"),
1239
+ 'type' => 'number',
1240
+ 'attr' => 'step="any"',
1241
+ 'desc' => __("The lowest value allowed in this rating system. * Required if the rating system is not on a 5-point scale. If worstRating is omitted, 1 is assumed.", "wp-seo-structured-data-schema")
1242
+ ),
1243
+ 'publisher' => array(
1244
+ 'title' => __('Name of the organization', "wp-seo-structured-data-schema"),
1245
+ 'type' => 'text',
1246
+ 'desc' => __('The publisher of the review.', "wp-seo-structured-data-schema")
1247
+ )
1248
+ )
1249
+ ),
1250
+ 'aggregate_rating' => array(
1251
+ 'title' => __('Aggregate Ratings', "wp-seo-structured-data-schema"),
1252
+ 'fields' => array(
1253
+ 'active' => array(
1254
+ 'type' => 'checkbox'
1255
+ ),
1256
+ 'schema_type' => array(
1257
+ 'title' => __('Schema type', "wp-seo-structured-data-schema"),
1258
+ 'type' => 'schema_type',
1259
+ 'required' => true,
1260
+ 'options' => $this->site_type(),
1261
+ 'empty' => "Select one",
1262
+ 'desc' => __("Use the most appropriate schema type for what is being reviewed.", "wp-seo-structured-data-schema")
1263
+ ),
1264
+ 'name' => array(
1265
+ 'title' => __('Name of the item', "wp-seo-structured-data-schema"),
1266
+ 'type' => 'text',
1267
+ 'required' => true,
1268
+ 'desc' => __("The item that is being rated.", "wp-seo-structured-data-schema")
1269
+ ),
1270
+ 'image' => array(
1271
+ 'title' => 'Image',
1272
+ 'type' => 'image',
1273
+ 'required' => true,
1274
+ 'holderClass' => 'kSeo-hidden aggregate-except-organization-holder'
1275
+ ),
1276
+ 'priceRange' => array(
1277
+ 'title' => 'Price Range (Recommended)',
1278
+ 'type' => 'text',
1279
+ 'holderClass' => 'kSeo-hidden aggregate-except-organization-holder',
1280
+ 'desc' => __("The price range of the business, for example $$$.", "wp-seo-structured-data-schema")
1281
+ ),
1282
+ 'telephone' => array(
1283
+ 'title' => 'Telephone (Recommended)',
1284
+ 'type' => 'text',
1285
+ 'holderClass' => 'kSeo-hidden aggregate-except-organization-holder'
1286
+ ),
1287
+ 'address' => array(
1288
+ 'title' => 'Address (Recommended)',
1289
+ 'type' => 'text',
1290
+ 'holderClass' => 'kSeo-hidden aggregate-except-organization-holder',
1291
+ ),
1292
+ 'description' => array(
1293
+ 'title' => __('Description', "wp-seo-structured-data-schema"),
1294
+ 'type' => 'textarea',
1295
+ 'desc' => __("Description for thr review", "wp-seo-structured-data-schema")
1296
+ ),
1297
+ 'ratingCount' => array(
1298
+ 'title' => __('Rating Count', "wp-seo-structured-data-schema"),
1299
+ 'type' => 'number',
1300
+ 'attr' => 'step="any"',
1301
+ 'required' => true,
1302
+ 'desc' => __("The total number of ratings for the item on your site. <span class='required'>* At least one of ratingCount or reviewCount is required.</span>", "wp-seo-structured-data-schema")
1303
+ ),
1304
+ 'reviewCount' => array(
1305
+ 'title' => __('Review Count', "wp-seo-structured-data-schema"),
1306
+ 'type' => 'number',
1307
+ 'attr' => 'step="any"',
1308
+ 'required' => true,
1309
+ 'desc' => __("Specifies the number of people who provided a review with or without an accompanying rating. At least one of ratingCount or reviewCount is required.", "wp-seo-structured-data-schema")
1310
+ ),
1311
+ 'ratingValue' => array(
1312
+ 'title' => __('Rating Value', "wp-seo-structured-data-schema"),
1313
+ 'type' => 'number',
1314
+ 'attr' => 'step="any"',
1315
+ 'required' => true,
1316
+ 'desc' => __("A numerical quality rating for the item.", "wp-seo-structured-data-schema")
1317
+ ),
1318
+ 'ratingValue' => array(
1319
+ 'title' => __('Rating Value', "wp-seo-structured-data-schema"),
1320
+ 'attr' => 'step="any"',
1321
+ 'type' => 'number',
1322
+ 'required' => true,
1323
+ 'desc' => __("A numerical quality rating for the item.", "wp-seo-structured-data-schema")
1324
+ ),
1325
+ 'bestRating' => array(
1326
+ 'title' => __('Best Rating', "wp-seo-structured-data-schema"),
1327
+ 'type' => 'number',
1328
+ 'attr' => 'step="any"',
1329
+ 'required' => true,
1330
+ 'desc' => __("The highest value allowed in this rating system. <span class='required'>* Required if the rating system is not a 5-point scale.</span> If bestRating is omitted, 5 is assumed.", "wp-seo-structured-data-schema")
1331
+ ),
1332
+ 'worstRating' => array(
1333
+ 'title' => __('Worst Rating', "wp-seo-structured-data-schema"),
1334
+ 'type' => 'number',
1335
+ 'attr' => 'step="any"',
1336
+ 'required' => true,
1337
+ 'desc' => __("The lowest value allowed in this rating system. <span class='required'>* Required if the rating system is not a 5-point scale.</span> If worstRating is omitted, 1 is assumed.", "wp-seo-structured-data-schema")
1338
+ )
1339
+ )
1340
+ ),
1341
+ 'restaurant' => array(
1342
+ 'title' => __('Restaurant', "wp-seo-structured-data-schema"),
1343
+ 'fields' => array(
1344
+ 'active' => array(
1345
+ 'type' => 'checkbox'
1346
+ ),
1347
+ 'name' => array(
1348
+ 'title' => __('Name of the Restaurant', "wp-seo-structured-data-schema"),
1349
+ 'type' => 'text',
1350
+ 'required' => true
1351
+ ),
1352
+ 'description' => array(
1353
+ 'title' => __('Description of the Restaurant', "wp-seo-structured-data-schema"),
1354
+ 'type' => 'textarea',
1355
+ ),
1356
+ 'openingHours' => array(
1357
+ 'title' => __('Opening Hours', "wp-seo-structured-data-schema"),
1358
+ 'type' => 'textarea',
1359
+ 'desc' => __('Mo,Tu,We,Th,Fr,Sa,Su 11:30-23:00', "wp-seo-structured-data-schema")
1360
+ ),
1361
+ 'telephone' => array(
1362
+ 'title' => __('Opening Hours', "wp-seo-structured-data-schema"),
1363
+ 'type' => 'text',
1364
+ 'desc' => __('+155501003333', "wp-seo-structured-data-schema")
1365
+ ),
1366
+ 'menu' => array(
1367
+ 'title' => __('Menu', "wp-seo-structured-data-schema"),
1368
+ 'type' => 'text',
1369
+ 'desc' => __('http://example.com/menu', "wp-seo-structured-data-schema")
1370
+ ),
1371
+ 'image' => array(
1372
+ 'title' => __('Image', "wp-seo-structured-data-schema"),
1373
+ 'type' => 'image',
1374
+ 'required' => true
1375
+ ),
1376
+ 'address' => array(
1377
+ 'title' => __('Address', "wp-seo-structured-data-schema"),
1378
+ 'type' => 'textarea'
1379
+ ),
1380
+ 'priceRange' => array(
1381
+ 'title' => __('Price Range', "wp-seo-structured-data-schema"),
1382
+ 'type' => 'text',
1383
+ 'desc' => __('The price range of the business, for example $$$', "wp-seo-structured-data-schema")
1384
+ ),
1385
+ 'servesCuisine' => array(
1386
+ 'title' => __('Serves Cuisine', "wp-seo-structured-data-schema"),
1387
+ 'type' => 'text',
1388
+ 'desc' => __('The cuisine of the restaurant.', "wp-seo-structured-data-schema")
1389
+ )
1390
+ )
1391
+ ),
1392
+ 'localBusiness' => array(
1393
+ 'title' => __('Local Business', "wp-seo-structured-data-schema"),
1394
+ 'fields' => array(
1395
+ 'active' => array(
1396
+ 'type' => 'checkbox'
1397
+ ),
1398
+ 'name' => array(
1399
+ 'title' => __('Name', "wp-seo-structured-data-schema"),
1400
+ 'type' => 'text',
1401
+ 'required' => true
1402
+ ),
1403
+ 'description' => array(
1404
+ 'title' => __('Description', "wp-seo-structured-data-schema"),
1405
+ 'type' => 'textarea',
1406
+ ),
1407
+ 'image' => array(
1408
+ 'title' => __('Business Logo', "wp-seo-structured-data-schema"),
1409
+ 'type' => 'image',
1410
+ 'required' => true
1411
+ ),
1412
+ 'priceRange' => array(
1413
+ 'title' => __('Price Range (Recommended)', "wp-seo-structured-data-schema"),
1414
+ 'type' => 'text',
1415
+ 'desc' => __("The price range of the business, for example $$$.", "wp-seo-structured-data-schema")
1416
+ ),
1417
+ 'addressLocality' => array(
1418
+ 'title' => __('Address locality', "wp-seo-structured-data-schema"),
1419
+ 'type' => 'text',
1420
+ 'desc' => __('City (i.e Kansas city)', "wp-seo-structured-data-schema")
1421
+ ),
1422
+ 'addressRegion' => array(
1423
+ 'title' => __('Address region', "wp-seo-structured-data-schema"),
1424
+ 'type' => 'text',
1425
+ 'desc' => __('State (i.e. MO)', "wp-seo-structured-data-schema")
1426
+ ),
1427
+ 'postalCode' => array(
1428
+ 'title' => __('Postal code', "wp-seo-structured-data-schema"),
1429
+ 'type' => 'text',
1430
+ ),
1431
+ 'streetAddress' => array(
1432
+ 'title' => __('Street address', "wp-seo-structured-data-schema"),
1433
+ 'type' => 'text',
1434
+ ),
1435
+ 'telephone' => array(
1436
+ 'title' => __('Telephone (Recommended)', "wp-seo-structured-data-schema"),
1437
+ 'type' => 'text',
1438
+ )
1439
+ )
1440
+ )
1441
+ );
1442
+ }
1443
 
1444
+ function get_jsonEncode($data = array())
1445
+ {
1446
+ $html = null;
1447
+ /** @var TYPE_NAME $data */
1448
+ if (!empty($data) && is_array($data)) {
1449
+ $html .= '<script type="application/ld+json">' . json_encode($data,
1450
+ JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . '</script>';
1451
+ }
1452
 
1453
+ return $html;
1454
+ }
1455
 
1456
+ function site_type()
1457
+ {
1458
+ return array(
1459
+ 'Organization',
1460
+ 'LocalBusiness' => array(
1461
+ 'AnimalShelter',
1462
+ 'AutomotiveBusiness' => array(
1463
+ 'AutoBodyShop',
1464
+ 'AutoDealer',
1465
+ 'AutoPartsStore',
1466
+ 'AutoRental',
1467
+ 'AutoRepair',
1468
+ 'AutoWash',
1469
+ 'GasStation',
1470
+ 'MotorcycleDealer',
1471
+ 'MotorcycleRepair'
1472
+ ),
1473
+ 'ChildCare',
1474
+ 'DryCleaningOrLaundry',
1475
+ 'EmergencyService',
1476
+ 'EmploymentAgency',
1477
+ 'EntertainmentBusiness' => array(
1478
+ 'AdultEntertainment',
1479
+ 'AmusementPark',
1480
+ 'ArtGallery',
1481
+ 'Casino',
1482
+ 'ComedyClub',
1483
+ 'MovieTheater',
1484
+ 'NightClub',
1485
 
1486
+ ),
1487
+ 'FinancialService' => array(
1488
+ 'AccountingService',
1489
+ 'AutomatedTeller',
1490
+ 'BankOrCreditUnion',
1491
+ 'InsuranceAgency',
1492
+ ),
1493
+ 'FoodEstablishment' => array(
1494
+ 'Bakery',
1495
+ 'BarOrPub',
1496
+ 'Brewery',
1497
+ 'CafeOrCoffeeShop',
1498
+ 'FastFoodRestaurant',
1499
+ 'IceCreamShop',
1500
+ 'Restaurant',
1501
+ 'Winery',
1502
+ ),
1503
+ 'GovernmentOffice',
1504
+ 'HealthAndBeautyBusiness' => array(
1505
+ 'BeautySalon',
1506
+ 'DaySpa',
1507
+ 'HairSalon',
1508
+ 'HealthClub',
1509
+ 'NailSalon',
1510
+ 'TattooParlor',
1511
+ ),
1512
+ 'HomeAndConstructionBusiness' => array(
1513
+ 'Electrician',
1514
+ 'GeneralContractor',
1515
+ 'HVACBusiness',
1516
+ 'HousePainter',
1517
+ 'Locksmith',
1518
+ 'MovingCompany',
1519
+ 'Plumber',
1520
+ 'RoofingContractor',
1521
+ ),
1522
+ 'InternetCafe',
1523
+ 'LegalService' => array(
1524
+ 'Attorney',
1525
+ 'Notary',
1526
+ ),
1527
+ 'Library',
1528
+ 'MedicalBusiness' => array(
1529
+ 'CommunityHealth',
1530
+ 'Dentist',
1531
+ 'Dermatology',
1532
+ 'DietNutrition',
1533
+ 'Emergency',
1534
+ 'Geriatric',
1535
+ 'Gynecologic',
1536
+ 'MedicalClinic',
1537
+ 'Midwifery',
1538
+ 'Nursing',
1539
+ 'Obstetric',
1540
+ 'Oncologic',
1541
+ 'Optician',
1542
+ 'Optometric',
1543
+ 'Otolaryngologic',
1544
+ 'Pediatric',
1545
+ 'Pharmacy',
1546
+ 'Physician',
1547
+ 'Physiotherapy',
1548
+ 'PlasticSurgery',
1549
+ 'Podiatric',
1550
+ 'PrimaryCare',
1551
+ 'Psychiatric',
1552
+ 'PublicHealth',
1553
+ ),
1554
+ 'LodgingBusiness' => array(
1555
+ 'BedAndBreakfast',
1556
+ 'Campground',
1557
+ 'Hostel',
1558
+ 'Hotel',
1559
+ 'Motel',
1560
+ 'Resort',
1561
+ ),
1562
+ 'ProfessionalService',
1563
+ 'RadioStation',
1564
+ 'RealEstateAgent',
1565
+ 'RecyclingCenter',
1566
+ 'SelfStorage',
1567
+ 'ShoppingCenter',
1568
+ 'SportsActivityLocation' => array(
1569
+ 'BowlingAlley',
1570
+ 'ExerciseGym',
1571
+ 'GolfCourse',
1572
+ 'HealthClub',
1573
+ 'PublicSwimmingPool',
1574
+ 'SkiResort',
1575
+ 'SportsClub',
1576
+ 'StadiumOrArena',
1577
+ 'TennisComplex',
1578
+ ),
1579
+ 'Store' => array(
1580
+ 'AutoPartsStore',
1581
+ 'BikeStore',
1582
+ 'BookStore',
1583
+ 'ClothingStore',
1584
+ 'ComputerStore',
1585
+ 'ConvenienceStore',
1586
+ 'DepartmentStore',
1587
+ 'ElectronicsStore',
1588
+ 'Florist',
1589
+ 'FurnitureStore',
1590
+ 'GardenStore',
1591
+ 'GroceryStore',
1592
+ 'HardwareStore',
1593
+ 'HobbyShop',
1594
+ 'HomeGoodsStore',
1595
+ 'JewelryStore',
1596
+ 'LiquorStore',
1597
+ 'MensClothingStore',
1598
+ 'MobilePhoneStore',
1599
+ 'MovieRentalStore',
1600
+ 'MusicStore',
1601
+ 'OfficeEquipmentStore',
1602
+ 'OutletStore',
1603
+ 'PawnShop',
1604
+ 'PetStore',
1605
+ 'ShoeStore',
1606
+ 'SportingGoodsStore',
1607
+ 'TireShop',
1608
+ 'ToyStore',
1609
+ 'WholesaleStore'
1610
+ ),
1611
+ 'TelevisionStation',
1612
+ 'TouristInformationCenter',
1613
+ 'TravelAgency'
1614
+ )
1615
+ );
1616
+ }
1617
 
1618
+ function countryList()
1619
+ {
1620
+ return array(
1621
+ "AF" => "Afghanistan",
1622
+ "AX" => "Aland Islands",
1623
+ "AL" => "Albania",
1624
+ "DZ" => "Algeria",
1625
+ "AS" => "American Samoa",
1626
+ "AD" => "Andorra",
1627
+ "AO" => "Angola",
1628
+ "AI" => "Anguilla",
1629
+ "AQ" => "Antarctica",
1630
+ "AG" => "Antigua and Barbuda",
1631
+ "AR" => "Argentina",
1632
+ "AM" => "Armenia",
1633
+ "AW" => "Aruba",
1634
+ "AU" => "Australia",
1635
+ "AT" => "Austria",
1636
+ "AZ" => "Azerbaijan",
1637
+ "BS" => "Bahamas",
1638
+ "BH" => "Bahrain",
1639
+ "BD" => "Bangladesh",
1640
+ "BB" => "Barbados",
1641
+ "BY" => "Belarus",
1642
+ "BE" => "Belgium",
1643
+ "BZ" => "Belize",
1644
+ "BJ" => "Benin",
1645
+ "BM" => "Bermuda",
1646
+ "BT" => "Bhutan",
1647
+ "BO" => "Bolivia, Plurinational State of",
1648
+ "BQ" => "Bonaire, Sint Eustatius and Saba",
1649
+ "BA" => "Bosnia and Herzegovina",
1650
+ "BW" => "Botswana",
1651
+ "BV" => "Bouvet Island",
1652
+ "BR" => "Brazil",
1653
+ "IO" => "British Indian Ocean Territory",
1654
+ "BN" => "Brunei Darussalam",
1655
+ "BG" => "Bulgaria",
1656
+ "BF" => "Burkina Faso",
1657
+ "BI" => "Burundi",
1658
+ "KH" => "Cambodia",
1659
+ "CM" => "Cameroon",
1660
+ "CA" => "Canada",
1661
+ "CV" => "Cape Verde",
1662
+ "KY" => "Cayman Islands",
1663
+ "CF" => "Central African Republic",
1664
+ "TD" => "Chad",
1665
+ "CL" => "Chile",
1666
+ "CN" => "China",
1667
+ "CX" => "Christmas Island",
1668
+ "CC" => "Cocos (Keeling) Islands",
1669
+ "CO" => "Colombia",
1670
+ "KM" => "Comoros",
1671
+ "CG" => "Congo",
1672
+ "CD" => "Congo, the Democratic Republic of the",
1673
+ "CK" => "Cook Islands",
1674
+ "CR" => "Costa Rica",
1675
+ "CI" => "Côte d Ivoire",
1676
+ "HR" => "Croatia",
1677
+ "CU" => "Cuba",
1678
+ "CW" => "Curaçao",
1679
+ "CY" => "Cyprus",
1680
+ "CZ" => "Czech Republic",
1681
+ "DK" => "Denmark",
1682
+ "DJ" => "Djibouti",
1683
+ "DM" => "Dominica",
1684
+ "DO" => "Dominican Republic",
1685
+ "EC" => "Ecuador",
1686
+ "EG" => "Egypt",
1687
+ "SV" => "El Salvador",
1688
+ "GQ" => "Equatorial Guinea",
1689
+ "ER" => "Eritrea",
1690
+ "EE" => "Estonia",
1691
+ "ET" => "Ethiopia",
1692
+ "FK" => "Falkland Islands (Malvinas)",
1693
+ "FO" => "Faroe Islands",
1694
+ "FJ" => "Fiji",
1695
+ "FI" => "Finland",
1696
+ "FR" => "France",
1697
+ "GF" => "French Guiana",
1698
+ "PF" => "French Polynesia",
1699
+ "TF" => "French Southern Territories",
1700
+ "GA" => "Gabon",
1701
+ "GM" => "Gambia",
1702
+ "GE" => "Georgia",
1703
+ "DE" => "Germany",
1704
+ "GH" => "Ghana",
1705
+ "GI" => "Gibraltar",
1706
+ "GR" => "Greece",
1707
+ "GL" => "Greenland",
1708
+ "GD" => "Grenada",
1709
+ "GP" => "Guadeloupe",
1710
+ "GU" => "Guam",
1711
+ "GT" => "Guatemala",
1712
+ "GG" => "Guernsey",
1713
+ "GN" => "Guinea",
1714
+ "GW" => "Guinea-Bissau",
1715
+ "GY" => "Guyana",
1716
+ "HT" => "Haiti",
1717
+ "HM" => "Heard Island and McDonald Islands",
1718
+ "VA" => "Holy See (Vatican City State)",
1719
+ "HN" => "Honduras",
1720
+ "HK" => "Hong Kong",
1721
+ "HU" => "Hungary",
1722
+ "IS" => "Iceland",
1723
+ "IN" => "India",
1724
+ "ID" => "Indonesia",
1725
+ "IR" => "Iran, Islamic Republic of",
1726
+ "IQ" => "Iraq",
1727
+ "IE" => "Ireland",
1728
+ "IM" => "Isle of Man",
1729
+ "IL" => "Israel",
1730
+ "IT" => "Italy",
1731
+ "JM" => "Jamaica",
1732
+ "JP" => "Japan",
1733
+ "JE" => "Jersey",
1734
+ "JO" => "Jordan",
1735
+ "KZ" => "Kazakhstan",
1736
+ "KE" => "Kenya",
1737
+ "KI" => "Kiribati",
1738
+ "KP" => "Korea, Democratic People's Republic of",
1739
+ "KR" => "Korea, Republic of,",
1740
+ "KW" => "Kuwait",
1741
+ "KG" => "Kyrgyzstan",
1742
+ "LA" => "Lao Peoples Democratic Republic",
1743
+ "LV" => "Latvia",
1744
+ "LB" => "Lebanon",
1745
+ "LS" => "Lesotho",
1746
+ "LR" => "Liberia",
1747
+ "LY" => "Libya",
1748
+ "LI" => "Liechtenstein",
1749
+ "LT" => "Lithuania",
1750
+ "LU" => "Luxembourg",
1751
+ "MO" => "Macao",
1752
+ "MK" => "Macedonia, the former Yugoslav Republic of",
1753
+ "MG" => "Madagascar",
1754
+ "MW" => "Malawi",
1755
+ "MY" => "Malaysia",
1756
+ "MV" => "Maldives",
1757
+ "ML" => "Mali",
1758
+ "MT" => "Malta",
1759
+ "MH" => "Marshall Islands",
1760
+ "MQ" => "Martinique",
1761
+ "MR" => "Mauritania",
1762
+ "MU" => "Mauritius",
1763
+ "YT" => "Mayotte",
1764
+ "MX" => "Mexico",
1765
+ "FM" => "Micronesia, Federated States of",
1766
+ "MD" => "Moldova, Republic of",
1767
+ "MC" => "Monaco",
1768
+ "MN" => "Mongolia",
1769
+ "ME" => "Montenegro",
1770
+ "MS" => "Montserrat",
1771
+ "MA" => "Morocco",
1772
+ "MZ" => "Mozambique",
1773
+ "MM" => "Myanmar",
1774
+ "NA" => "Namibia",
1775
+ "NR" => "Nauru",
1776
+ "NP" => "Nepal",
1777
+ "NL" => "Netherlands",
1778
+ "NC" => "New Caledonia",
1779
+ "NZ" => "New Zealand",
1780
+ "NI" => "Nicaragua",
1781
+ "NE" => "Niger",
1782
+ "NG" => "Nigeria",
1783
+ "NU" => "Niue",
1784
+ "NF" => "Norfolk Island",
1785
+ "MP" => "Northern Mariana Islands",
1786
+ "NO" => "Norway",
1787
+ "OM" => "Oman",
1788
+ "PK" => "Pakistan",
1789
+ "PW" => "Palau",
1790
+ "PS" => "Palestine, State of",
1791
+ "PA" => "Panama",
1792
+ "PG" => "Papua New Guinea",
1793
+ "PY" => "Paraguay",
1794
+ "PE" => "Peru",
1795
+ "PH" => "Philippines",
1796
+ "PN" => "Pitcairn",
1797
+ "PL" => "Poland",
1798
+ "PT" => "Portugal",
1799
+ "PR" => "Puerto Rico",
1800
+ "QA" => "Qatar",
1801
+ "RE" => "Reunion",
1802
+ "RO" => "Romania",
1803
+ "RU" => "Russian Federation",
1804
+ "RW" => "Rwanda",
1805
+ "BL" => "Saint Barthélemy",
1806
+ "SH" => "Saint Helena, Ascension and Tristan da Cunha",
1807
+ "KN" => "Saint Kitts and Nevis",
1808
+ "LC" => "Saint Lucia",
1809
+ "MF" => "Saint Martin (French part)",
1810
+ "PM" => "Saint Pierre and Miquelon",
1811
+ "VC" => "Saint Vincent and the Grenadines",
1812
+ "WS" => "Samoa",
1813
+ "SM" => "San Marino",
1814
+ "ST" => "Sao Tome and Principe",
1815
+ "SA" => "Saudi Arabia",
1816
+ "SN" => "Senegal",
1817
+ "RS" => "Serbia",
1818
+ "SC" => "Seychelles",
1819
+ "SL" => "Sierra Leone",
1820
+ "SG" => "Singapore",
1821
+ "SX" => "Sint Maarten (Dutch part)",
1822
+ "SK" => "Slovakia",
1823
+ "SI" => "Slovenia",
1824
+ "SB" => "Solomon Islands",
1825
+ "SO" => "Somalia",
1826
+ "ZA" => "South Africa",
1827
+ "GS" => "South Georgia and the South Sandwich Islands",
1828
+ "SS" => "South Sudan",
1829
+ "ES" => "Spain",
1830
+ "LK" => "Sri Lanka",
1831
+ "SD" => "Sudan",
1832
+ "SR" => "Suriname",
1833
+ "SJ" => "Svalbard and Jan Mayen",
1834
+ "SZ" => "Swaziland",
1835
+ "SE" => "Sweden",
1836
+ "CH" => "Switzerland",
1837
+ "SY" => "Syrian Arab Republic",
1838
+ "TW" => "Taiwan, Province of China",
1839
+ "TJ" => "Tajikistan",
1840
+ "TZ" => "Tanzania, United Republic of",
1841
+ "TH" => "Thailand",
1842
+ "TL" => "Timor-Leste",
1843
+ "TG" => "Togo",
1844
+ "TK" => "Tokelau",
1845
+ "TO" => "Tonga",
1846
+ "TT" => "Trinidad and Tobago",
1847
+ "TN" => "Tunisia",
1848
+ "TR" => "Turkey",
1849
+ "TM" => "Turkmenistan",
1850
+ "TC" => "Turks and Caicos Islands",
1851
+ "TV" => "Tuvalu",
1852
+ "UG" => "Uganda",
1853
+ "UA" => "Ukraine",
1854
+ "AE" => "United Arab Emirates",
1855
+ "GB" => "United Kingdom",
1856
+ "US" => "United States",
1857
+ "UM" => "United States Minor Outlying Islands",
1858
+ "UY" => "Uruguay",
1859
+ "UZ" => "Uzbekistan",
1860
+ "VU" => "Vanuatu",
1861
+ "VE" => "Venezuela, Bolivarian Republic of",
1862
+ "VN" => "Viet Nam",
1863
+ "VG" => "Virgin Islands, British",
1864
+ "VI" => "Virgin Islands, U.S.",
1865
+ "WF" => "Wallis and Futuna",
1866
+ "EH" => "Western Sahara",
1867
+ "YE" => "Yemen",
1868
+ "ZM" => "Zambia",
1869
+ "ZW" => "Zimbabwe",
1870
+ );
1871
+ }
1872
 
1873
+ function contactType()
1874
+ {
1875
+ return array(
1876
+ "Customer Service",
1877
+ "Technical Support",
1878
+ "Billing Support",
1879
+ "Bill Payment",
1880
+ "Sales",
1881
+ "Reservations",
1882
+ "Credit Card Support",
1883
+ "Emergency",
1884
+ "Baggage Tracking",
1885
+ "Roadside Assistance",
1886
+ "Package Tracking"
1887
+ );
1888
+ }
1889
 
1890
+ function languageList()
1891
+ {
1892
+ return array(
1893
+ "Akan",
1894
+ "Amharic",
1895
+ "Arabic",
1896
+ "Assamese",
1897
+ "Awadhi",
1898
+ "Azerbaijani",
1899
+ "Balochi",
1900
+ "Belarusian",
1901
+ "Bengali",
1902
+ "Bhojpuri",
1903
+ "Burmese",
1904
+ "Cantonese",
1905
+ "Cebuano",
1906
+ "Chewa",
1907
+ "Chhattisgarhi",
1908
+ "Chittagonian",
1909
+ "Czech",
1910
+ "Deccan",
1911
+ "Dhundhari",
1912
+ "Dutch",
1913
+ "English",
1914
+ "French",
1915
+ "Fula",
1916
+ "Gan",
1917
+ "German",
1918
+ "Greek",
1919
+ "Gujarati",
1920
+ "Haitian Creole",
1921
+ "Hakka",
1922
+ "Haryanvi",
1923
+ "Hausa",
1924
+ "Hiligaynon",
1925
+ "Hindi / Urdu",
1926
+ "Hmong",
1927
+ "Hungarian",
1928
+ "Igbo",
1929
+ "Ilokano",
1930
+ "Italian",
1931
+ "Japanese",
1932
+ "Javanese",
1933
+ "Jin",
1934
+ "Kannada",
1935
+ "Kazakh",
1936
+ "Khmer",
1937
+ "Kinyarwanda",
1938
+ "Kirundi",
1939
+ "Konkani",
1940
+ "Korean",
1941
+ "Kurdish",
1942
+ "Madurese",
1943
+ "Magahi",
1944
+ "Maithili",
1945
+ "Malagasy",
1946
+ "Malay/Indonesian",
1947
+ "Malayalam",
1948
+ "Mandarin",
1949
+ "Marathi",
1950
+ "Marwari",
1951
+ "Min Bei",
1952
+ "Min Dong",
1953
+ "Min Nan",
1954
+ "Mossi",
1955
+ "Nepali",
1956
+ "Oriya",
1957
+ "Oromo",
1958
+ "Pashto",
1959
+ "Persian",
1960
+ "Polish",
1961
+ "Portuguese",
1962
+ "Punjabi",
1963
+ "Quechua",
1964
+ "Romanian",
1965
+ "Russian",
1966
+ "Saraiki",
1967
+ "Serbo-Croatian",
1968
+ "Shona",
1969
+ "Sindhi",
1970
+ "Sinhalese",
1971
+ "Somali",
1972
+ "Spanish",
1973
+ "Sundanese",
1974
+ "Swahili",
1975
+ "Swedish",
1976
+ "Sylheti",
1977
+ "Tagalog",
1978
+ "Tamil",
1979
+ "Telugu",
1980
+ "Thai",
1981
+ "Turkish",
1982
+ "Ukrainian",
1983
+ "Uyghur",
1984
+ "Uzbek",
1985
+ "Vietnamese",
1986
+ "Wu",
1987
+ "Xhosa",
1988
+ "Xiang",
1989
+ "Yoruba",
1990
+ "Zulu",
1991
+ );
1992
+ }
1993
 
1994
+ function socialList()
1995
+ {
1996
+ return array(
1997
+ 'facebook' => __('Facebook'),
1998
+ 'twitter' => __('Twitter'),
1999
+ 'google-plus' => __('Google+'),
2000
+ 'instagram' => __('Instagram'),
2001
+ 'youtube' => __('Youtube'),
2002
+ 'linkedin' => __('LinkedIn'),
2003
+ 'myspace' => __('Myspace'),
2004
+ 'pinterest' => __('Pinterest'),
2005
+ 'soundcloud' => __('SoundCloud'),
2006
+ 'tumblr' => __('Tumblr'),
2007
+ 'wikidata' => __('Wikidata'),
2008
+ );
2009
+ }
2010
 
2011
+ function imgInfo($url = null)
2012
+ {
2013
+ $img = array();
2014
+ if ($url) {
2015
+ $imgA = @getimagesize($url);
2016
+ if (is_array($imgA) && !empty($imgA)) {
2017
+ $img['width'] = $imgA[0];
2018
+ $img['height'] = $imgA[1];
2019
+ } else {
2020
+ $img['width'] = 0;
2021
+ $img['height'] = 0;
2022
+ }
2023
+ }
2024
 
2025
+ return $img;
2026
+ }
2027
 
2028
+ function isAssoc($array)
2029
+ {
2030
+ $keys = array_keys($array);
2031
 
2032
+ return $keys !== array_keys($keys);
2033
+ }
2034
 
2035
 
2036
+ }
2037
  endif;
lib/views/schema-options.php CHANGED
@@ -1,17 +1,16 @@
1
  <?php
2
  global $KcSeoWPSchema;
3
- $settings = get_option( $KcSeoWPSchema->options['settings'] );
4
  $schemaModel = new KcSeoSchemaModel;
5
  ?>
6
  <div class="wrap">
7
- <h2><?php _e( 'WP SEO Structured Data Schema', KCSEO_WP_SCHEMA_SLUG ); ?></h2>
8
 
9
  <div id="kcseo-settings">
10
  <div id="kcseo-options">
11
  <form id="kcseo-option-settings">
12
 
13
- <h3><?php _e( 'General settings for WP SEO Structured Data Schema by <a href="https://wpsemplugins.com/">WPSEMPlugins.com</a>',
14
- KCSEO_WP_SCHEMA_SLUG ); ?></h3>
15
  <div class="setting-holder">
16
  <table width="40%" cellpadding="10" class="form-table">
17
  <tr class="default">
@@ -19,12 +18,12 @@ $schemaModel = new KcSeoSchemaModel;
19
  <td align="left" scope="row">
20
  <div class="with-tooltip">
21
  <input type="text" class="regular-text" name="web_url"
22
- value="<?php echo( ! empty( $settings['web_url'] ) ? esc_attr( $settings['web_url'] ) : get_home_url() ); ?>"/>
23
  <div class="schema-tooltip-holder">
24
  <span class="schema-tooltip"></span>
25
  <div class="hidden">
26
- <p><b>Tip:</b> For more detailed information on how to configure this plugin, please
27
- visit:
28
  <a href="https://wpsemplugins.com/wordpress-seo-structured-data-schema-plugin/">https://wpsemplugins.com/wordpress-seo-structured-data-schema-plugin/</a>
29
  </p>
30
  </div>
@@ -33,74 +32,76 @@ $schemaModel = new KcSeoSchemaModel;
33
  </td>
34
  </tr>
35
  <tr class="default">
36
- <th>Type</th>site_type
37
  <td align="left" scope="row">
38
  <select id="site_type" name="site_type" class="select2">
39
- <option value="">Select one type</option>
40
  <?php
41
- $siteType = ! empty( $settings['site_type'] ) ? $settings['site_type'] : null;
42
 
43
- foreach ( $schemaModel->site_type() as $key => $site ) {
44
- if(is_array($site)){
45
- $slt = ( $key == $siteType ? "selected" : null );
46
- echo "<option value='$key' $slt>&nbsp;&nbsp;&nbsp;$key</option>";
47
- foreach ($site as $inKey => $inSite){
48
- if(is_array($inSite)){
49
- $slt = ( $inKey == $siteType ? "selected" : null );
50
  echo "<option value='$inKey' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$inKey</option>";
51
- foreach ($inSite as $inInKey => $inInSite){
52
- if(is_array($inInSite)) {
53
- $slt = ( $inInKey == $siteType ? "selected" : null );
54
  echo "<option value='$inInKey' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$inInKey</option>";
55
- foreach ($inInSite as $iSite){
56
- $slt = ( $iSite == $siteType ? "selected" : null );
57
  echo "<option value='$iSite' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$iSite</option>";
58
  }
59
- }else{
60
- $slt = ( $inInSite == $siteType ? "selected" : null );
61
  echo "<option value='$inInSite' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$inInSite</option>";
62
  }
63
  }
64
- }else{
65
- $slt = ( $inSite == $siteType ? "selected" : null );
66
  echo "<option value='$inSite' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$inSite</option>";
67
  }
68
  }
69
- }else {
70
- $slt = ( $site == $siteType ? "selected" : null );
71
- echo "<option value='$site' $slt>$site</option>";
72
- }
73
  }
74
  ?>
75
  </select>
76
  </td>
77
  </tr>
78
  <tr class="default">
79
- <th>Organization or Business name</th>
80
  <td align="left" scope="row">
81
  <input type="text" class="regular-text" name="type_name"
82
- value="<?php echo( ! empty( $settings['type_name'] ) ? $settings['type_name'] : null ); ?>"/>
83
  </td>
84
  </tr>
85
  <tr class="default all-type-data">
86
- <th>Site Image <span class="required">*</span></th>
 
87
  <td align="left" scope="row">
88
  <div class="kSeo-image">
89
  <div class="kSeo-image-wrapper">
90
  <?php
91
- $siteImageId = ! empty( $settings['site_image'] ) ? absint( $settings['site_image'] ) : 0;
92
- $siteImage = $ingInfo = null;
93
- if ( $siteImageId ) {
94
- $siteImage = wp_get_attachment_image( $siteImageId, "thumbnail" );
95
- $imgData = $KcSeoWPSchema->imageInfo( $siteImageId );
96
  $ingInfo .= "<span><strong>URL: </strong>{$imgData['url']}</span>";
97
  $ingInfo .= "<span><strong>Width: </strong>{$imgData['width']}px</span>";
98
  $ingInfo .= "<span><strong>Height: </strong>{$imgData['height']}px</span>";
99
  }
100
  ?>
101
- <span class="kSeoImgAdd"><span class="dashicons dashicons-plus-alt"></span></span>
102
- <span class="kSeoImgRemove <?php echo( $siteImageId ? null : "kSeo-hidden" ); ?>"><span
103
- class="dashicons dashicons-trash"></span></span>
 
104
  <div class="kSeo-image-preview"><?php echo $siteImage; ?></div>
105
  <input type="hidden" name="site_image" value="<?php echo $siteImageId; ?>"/>
106
  </div>
@@ -109,42 +110,42 @@ $schemaModel = new KcSeoSchemaModel;
109
  </td>
110
  </tr>
111
  <tr class="default all-type-data">
112
- <th>Price Range <span class="required">*</span></th>
 
113
  <td align="left" scope="row">
114
  <input type="text" class="regular-text" name="site_price_range"
115
- value="<?php echo( ! empty( $settings['site_price_range'] ) ? $settings['site_price_range'] : null ); ?>"/>
116
- <div class="description">The price range of the business, for example $$$.</div>
117
  </td>
118
  </tr>
119
  <tr class="default all-type-data">
120
- <th>Site Telephone <span class="required">*</span></th>
 
121
  <td align="left" scope="row">
122
  <input type="text" class="regular-text" name="site_telephone"
123
- value="<?php echo( ! empty( $settings['site_telephone'] ) ? $settings['site_telephone'] : null ); ?>"/>
124
- <div class="description">The telephone number.</div>
125
  </td>
126
  </tr>
127
  <tr class="default">
128
- <th>Additional Type</th>
129
  <td align="left" scope="row">
130
  <div class="with-tooltip">
131
  <textarea name="additionalType"
132
  placeholder="http://example1.com&#10;http://example2.com&#10;http://example3.com"
133
  rows="6" cols="50"
134
- class="additional-type"><?php echo( ! empty( $settings['additionalType'] ) ? esc_attr( @$settings['additionalType'] ) : null ); ?></textarea>
135
- <p class="description">Add "Additional Type" URL(s) by separate ideas</p>
136
  <div class="schema-tooltip-holder">
137
  <span class="schema-tooltip"></span>
138
  <div class="hidden">
139
- <p><b>Tip:</b> Product Ontology is an extension to schema using WikiPedia
140
- definitions that enables you to further define a type by adding an
141
- “AdditionalType” attribute.Example for a Tailor (which is not available as a
142
- schema “Type”): Pick LocalBusiness as a generic Type, then add additional type
143
- as follows:
144
  <a href="https://en.wikipedia.org/wiki/Tailor">https://en.wikipedia.org/wiki/<span>Tailor</span></a>
145
  Change to this format and enter in Additional Type field:
146
  <a href="http://www.productontology.org/id/Tailor">http://www.productontology.org/id/<span>Tailor</span></a>
147
- For more info visit:<a href="https://wpsemplugins.com/product-ontology-schema/">https://wpsemplugins.com/product-ontology-schema/</a>
 
148
  </p>
149
  </div>
150
  </div>
@@ -152,42 +153,46 @@ $schemaModel = new KcSeoSchemaModel;
152
  </td>
153
  </tr>
154
  <tr class="default restaurant">
155
- <th style="font-size: 18px; padding: 30px 0 5px;">Restaurant Information</th>
156
  </tr>
157
  <tr class="default restaurant">
158
- <th>The cuisine of the restaurant. <span class="required">*</span></th>
 
159
  <td align="left" scope="row">
160
  <textarea cols="50" rows="6"
161
- name="restaurant[servesCuisine]"><?php echo( ! empty( $settings['restaurant']['servesCuisine'] ) ? esc_attr( $settings['restaurant']['servesCuisine'] ) : null ); ?></textarea>
162
  </td>
163
  </tr>
164
  <tr class="default business-info">
165
- <th style="font-size: 18px; padding: 30px 0 5px;">Others local business info</th>
166
  </tr>
167
  <tr class="default business-info">
168
- <th>Description</th>
169
  <td align="left" scope="row">
170
  <textarea cols="50" rows="6"
171
- name="business_info[description]"><?php echo( ! empty( $settings['business_info']['description'] ) ? esc_attr( $settings['business_info']['description'] ) : null ); ?></textarea>
172
  </td>
173
  </tr>
174
  <tr class="default business-info">
175
- <th>Operation Hours</th>
176
  <td align="left" scope="row">
177
  <div class="with-tooltip">
178
  <textarea name="business_info[openingHours]"
179
  placeholder="Mo-Sa 11:00-14:30&#10;Mo-Th 17:00-21:30&#10;Fr-Sa 17:00-22:00"
180
  rows="4" cols="50"
181
- class="additional-type"><?php echo( ! empty( $settings['business_info']['openingHours'] ) ? esc_attr( $settings['business_info']['openingHours'] ) : null ); ?></textarea>
182
- <p class="description">- Days are specified using the following two-letter combinations: Mo,
 
183
  Tu, We, Th, Fr, Sa, Su.</br>
184
- - Times are specified using 24:00 time. For example, 3pm is specified as 15:00. <br>
 
185
  - Add Opening Hours by separate line</p>
186
  <div class="schema-tooltip-holder">
187
  <span class="schema-tooltip"></span>
188
  <div class="hidden">
189
  <p>
190
- <b>Tip:</b> Once you save these structured data schema settings, validate your
 
191
  home page url here:
192
  <a href="https://developers.google.com/structured-data/testing-tool/">https://developers.google.com/structured-data/testing-tool/</a>
193
  </p>
@@ -196,83 +201,83 @@ $schemaModel = new KcSeoSchemaModel;
196
  </td>
197
  </tr>
198
  <tr class="default business-info">
199
- <th style="font-size: 16px;">GeoCoordinates</th>
200
  </tr>
201
  <tr class="default business-info">
202
- <th style="text-align: right">Latitude</th>
203
  <td align="left" scope="row">
204
  <input type="text" class="regular-text" name="business_info[latitude]"
205
- value="<?php echo( ! empty( $settings['business_info']['latitude'] ) ? esc_attr( $settings['business_info']['latitude'] ) : null ); ?>"/>
206
  </td>
207
  </tr>
208
  <tr class="default business-info">
209
- <th style="text-align: right">Longitude</th>
210
  <td align="left" scope="row">
211
  <input type="text" class="regular-text" name="business_info[longitude]"
212
- value="<?php echo( ! empty( $settings['business_info']['longitude'] ) ? esc_attr( $settings['business_info']['longitude'] ) : null ); ?>"/>
213
  </td>
214
  </tr>
215
  <tr class="default person">
216
- <th style="font-size: 18px; padding: 30px 0 5px;">Person</th>
217
  </tr>
218
  <tr class="default person">
219
- <th>Name</th>
220
  <td align="left" scope="row">
221
  <input type="text" class="regular-text" name="person[name]"
222
- value="<?php echo( ! empty( $settings['person']['name'] ) ? esc_attr( $settings['person']['name'] ) : null ); ?>"/>
223
  </td>
224
  </tr>
225
  <tr class="default person">
226
- <th>Work For</th>
227
  <td align="left" scope="row">
228
  <input type="text" class="regular-text" name="person[worksFor]"
229
- value="<?php echo( ! empty( $settings['person']['worksFor'] ) ? esc_attr( $settings['person']['worksFor'] ) : null ); ?>"/>
230
 
231
  </td>
232
  </tr>
233
  <tr class="default person">
234
- <th>Job Title</th>
235
  <td align="left" scope="row">
236
  <input type="text" class="regular-text" name="person[jobTitle]"
237
- value="<?php echo( @$settings['person']['jobTitle'] ? @$settings['person']['jobTitle'] : null ); ?>"/>
238
 
239
  </td>
240
  </tr>
241
  <tr class="default person">
242
- <th>Image</th>
243
  <td align="left" scope="row">
244
  <input type="text" class="regular-text" name="person[image]"
245
- value="<?php echo( ! empty( $settings['person']['image'] ) ? esc_attr( $settings['person']['image'] ) : null ); ?>"/>
246
- <p class="description">Add your personal photo here</p>
247
  </td>
248
  </tr>
249
  <tr class="default person">
250
- <th>Description</th>
251
  <td align="left" scope="row">
252
  <input type="text" class="regular-text" name="person[description]"
253
- value="<?php echo( ! empty( $settings['person']['description'] ) ? esc_attr( $settings['person']['description'] ) : null ); ?>"/>
254
  </td>
255
  </tr>
256
  <tr class="default person">
257
- <th>Birth date</th>
258
  <td align="left" scope="row">
259
  <input type="text" class="regular-text kcseo-date" name="person[birthDate]"
260
- value="<?php echo( ! empty( $settings['person']['birthDate'] ) ? esc_attr( $settings['person']['birthDate'] ) : null ); ?>"/>
261
 
262
  </td>
263
  </tr>
264
  <tr class="default">
265
- <th style="font-size: 18px; padding: 30px 0 5px;">Address</th>
266
  </tr>
267
  <tr class="default">
268
- <th>Address Country</th>
269
  <td align="left" scope="row">
270
  <select class="select2" name="address[country]">
271
  <option value="">Select a country</option>
272
  <?php
273
- $aCountry = ! empty( $settings['address']['country'] ) ? $settings['address']['country'] : null;
274
- foreach ( $schemaModel->countryList() as $country ) {
275
- $slt = ( $country == $aCountry ? "selected" : null );
276
  echo "<option value='$country' $slt>$country</option>";
277
  }
278
  ?>
@@ -280,52 +285,54 @@ $schemaModel = new KcSeoSchemaModel;
280
  </td>
281
  </tr>
282
  <tr class="default">
283
- <th>Address Locality</th>
284
  <td align="left" scope="row">
285
  <input type="text" class="regular-text" name="address[locality]"
286
- value="<?php echo( ! empty( $settings['address']['locality'] ) ? esc_attr( $settings['address']['locality'] ) : null ); ?>"/>
287
  <p class="description">City (i.e Kansas city)</p>
288
  </tr>
289
  <tr class="default">
290
- <th>Address Region</th>
291
  <td align="left" scope="row">
292
  <input type="text" class="regular-text" name="address[region]"
293
- value="<?php echo( ! empty( $settings['address']['region'] ) ? esc_attr( $settings['address']['region'] ) : null ); ?>"/>
294
  <p class="description">State (i.e. MO)</p>
295
  </tr>
296
  <tr class="default">
297
- <th>Postal Code</th>
298
  <td align="left" scope="row">
299
  <input type="text" class="regular-text" name="address[postalcode]"
300
- value="<?php echo( ! empty( $settings['address']['postalcode'] ) ? esc_attr( $settings['address']['postalcode'] ) : null ); ?>"/>
301
  </tr>
302
  <tr class="default">
303
- <th>Street Address</th>
304
  <td align="left" scope="row">
305
  <input type="text" class="regular-text" name="address[street]"
306
- value="<?php echo( ! empty( $settings['address']['street'] ) ? esc_attr( $settings['address']['street'] ) : null ); ?>"/>
307
  </tr>
308
  </table>
309
  </div>
310
  <div id="tabs-kcseo-container" class="rt-tab-container">
311
  <ul class="rt-tab-nav">
312
- <li class="current"><a href="#tab-logo-url">Organization Logo</a></li>
313
- <li><a href="#tab-social-profile">Social Profile</a></li>
314
- <li><a href="#tab-corporate-contract">Corporate Contacts</a></li>
 
 
315
  </ul>
316
  <div id="tab-logo-url" class="rt-tab-content">
317
  <table width="100%" cellpadding="10" class="form-table">
318
  <tr class="field_logo">
319
- <th>Select Organization Logo</th>
320
  <td scope="row" style="position: relative">
321
  <div class="kSeo-image">
322
  <div class="kSeo-image-wrapper">
323
  <?php
324
- $organizationLogoId = ! empty( $settings['organization_logo'] ) ? absint( $settings['organization_logo'] ) : null;
325
- $organizeImage = $imgInfo = null;
326
- if ( $organizationLogoId ) {
327
- $organizeImage = wp_get_attachment_image( $organizationLogoId, "thumbnail" );
328
- $imgData = $KcSeoWPSchema->imageInfo( $organizationLogoId );
329
  $imgInfo .= "<span><strong>URL: </strong>{$imgData['url']}</span>";
330
  $imgInfo .= "<span><strong>Width: </strong>{$imgData['width']}px</span>";
331
  $imgInfo .= "<span><strong>Height: </strong>{$imgData['height']}px</span>";
@@ -333,17 +340,22 @@ $schemaModel = new KcSeoSchemaModel;
333
  ?>
334
  <span class="kSeoImgAdd"><span class="dashicons dashicons-plus-alt"></span></span>
335
  <span
336
- class="kSeoImgRemove <?php echo( $organizationLogoId ? null : "kSeo-hidden" ); ?>"><span
337
- class="dashicons dashicons-trash"></span></span>
338
  <div class="kSeo-image-preview"><?php echo $organizeImage; ?></div>
339
- <input type="hidden" name="organization_logo" value="<?php echo $organizationLogoId; ?>"/>
 
340
  </div>
341
  <div class='image-info'><?php echo $imgInfo; ?></div>
342
  </div>
343
  <div class="schema-tooltip-holder" style="left: 200px">
344
  <span class="schema-tooltip"></span>
345
  <div class="hidden">
346
- <p><b>Tip:</b> For some Rich Snippets that use the image property, no dimensions are specified, For other Rich Snippets that use the image property, Google specifies at least 160x90 pixels and at most 1920x1080 pixels. For Google Search, the documentation for their Rich Snippets is at
 
 
 
 
347
  <a href="https://developers.google.com/structured-data/rich-snippets/.">https://developers.google.com/structured-data/rich-snippets/.</a>
348
  </p>
349
  </div>
@@ -355,42 +367,42 @@ $schemaModel = new KcSeoSchemaModel;
355
  <div id="tab-social-profile" class="rt-tab-content">
356
  <table width="100%" cellpadding="10" class="form-table">
357
  <tr class="field_social">
358
- <th>Company Name</th>
359
  <td align="left" scope="row">
360
  <input type="text" class="regular-text" name="social_company_name"
361
- value="<?php echo( ! empty( $settings['social_company_name'] ) ? esc_attr( $settings['social_company_name'] ) : null ); ?>"/>
362
  </td>
363
  </tr>
364
  <tr class="field_social_title">
365
- <th style="font-size: 18px; padding: 10px 0;">Social Profiles</th>
366
  </tr>
367
  <tr class="social_field_link">
368
- <th>Social Profile</th>
369
  <th>
370
  <div id="social-field-holder">
371
  <?php
372
- $socialP = ( ! empty( $settings['social'] ) ? $settings['social'] : array() );
373
- if ( is_array( $socialP ) && ! empty( $socialP ) ) {
374
  $html = null;
375
- $i = 0;
376
- foreach ( $socialP as $socialD ) {
377
  $html .= "<div class='sfield'>";
378
  $html .= "<select name='social[$i][id]'>";
379
- foreach ( $schemaModel->socialList() as $sId => $social ) {
380
- $slt = ( $sId == $socialD['id'] ? "selected" : null );
381
  $html .= "<option value='$sId' $slt>$social</option>";
382
  }
383
  $html .= "</select>";
384
  $html .= "<input type='text' name='social[$i][link]' value='{$socialD['link']}'>";
385
  $html .= '<span class="dashicons dashicons-trash social-remove"></span>';
386
  $html .= "</div>";
387
- $i ++;
388
  }
389
  echo $html;
390
  }
391
  ?>
392
  </div>
393
- <a class="button button-primary add-new" id="social-add">Add Social Profile</a>
394
  </th>
395
  </tr>
396
  </table>
@@ -398,16 +410,16 @@ $schemaModel = new KcSeoSchemaModel;
398
  <div id="tab-corporate-contract" class="rt-tab-content">
399
  <table width="100%" cellpadding="10" class="form-table">
400
  <tr class="field_contact">
401
- <th style="font-size: 18px; padding: 10px 0;">Contacts</th>
402
  </tr>
403
  <tr class="field_contact">
404
  <th>Contact Type</th>
405
  <td scope="row">
406
  <select name="contact[contactType]" class="select2" style="width: 200px">
407
  <?php
408
- $contactType = ! empty( $settings['contact']['contactType'] ) ? $settings['contact']['contactType'] : null;
409
- foreach ( $schemaModel->contactType() as $cType ) {
410
- $slt = ( $cType == $contactType ? "selected" : null );
411
  echo "<option value='$cType' $slt>$cType</option>";
412
  }
413
 
@@ -417,50 +429,54 @@ $schemaModel = new KcSeoSchemaModel;
417
 
418
  </tr>
419
  <tr class="field_contact">
420
- <th>Contact Phone</th>
421
  <td align="left" scope="row">
422
  <input type="text" class="regular-text" name="contact[telephone]"
423
- value="<?php echo( ! empty( $settings['contact']['telephone'] ) ? esc_attr( $settings['contact']['telephone'] ) : null ); ?>"/>
424
- <p class="description kco-telephone">Please follow the format below<span
425
- style="font-size: 11px;">+1-505-998-3793</span><span style="font-size: 11px;">(425) 123-4567</span><span
426
- style="font-size: 11px;">( 33 1) 42 68 53 01</span><span style="font-size: 11px;">+44-2078225951</span><span
427
- style="font-size: 11px;">1 (855) 469-6378</span>
 
 
428
  </p>
429
  </td>
430
  </tr>
431
  <tr class="field_contact">
432
- <th>Contact Email</th>
433
  <td align="left" scope="row">
434
  <input type="text" class="regular-text" name="contact[email]"
435
- value="<?php echo( ! empty( $settings['contact']['email'] ) ? sanitize_email( $settings['contact']['email'] ) : null ); ?>"/>
436
  </td>
437
  </tr>
438
  <tr class="field_contact">
439
- <th>Contact Option</th>
440
  <td align="left" scope="row">
441
- <select name="contact[contactOption]" class="select2 withEmptyOption" style="width: 200px">
442
- <option value="">Select an option</option>
 
443
  <option value="TollFree" <?php
444
- $cPtOpt = ! empty( $settings['contact']['contactOption'] ) ? $settings['contact']['contactOption'] : null;
445
- echo( $cPtOpt == "TollFree" ? "selected" : null ); ?>>TollFree
446
  </option>
447
  <option
448
- value="HearingImpairedSupported" <?php echo( $settings['contact']['contactOption'] == "HearingImpairedSupported" ? "selected" : null ); ?>>
449
- HearingImpairedSupported
450
  </option>
451
  </select>
452
  </td>
453
  </tr>
454
  <tr class="field_contact">
455
- <th>Area Served</th>
456
  <td align="left" scope="row">
457
  <div class="area_served_wrapper">
458
- <select id="area_served" class="select2" name="area_served[]" multiple="multiple"
 
459
  style="width: 50%">
460
  <?php
461
- $areaServed = ! empty( $settings['area_served'] ) ? $settings['area_served'] : array();
462
- foreach ( $schemaModel->countryList() as $country ) {
463
- $slt = ( in_array( $country, $areaServed ) ? "selected" : null );
464
  echo "<option value='$country' $slt>$country</option>";
465
  }
466
  ?>
@@ -469,13 +485,14 @@ $schemaModel = new KcSeoSchemaModel;
469
  </td>
470
  </tr>
471
  <tr class="field_contact">
472
- <th>Available language</th>
473
  <td scope="row" class="lang">
474
- <select class="select2" name="availableLanguage[]" style="width: 50%" multiple="multiple">
 
475
  <?php
476
- $lanAvailable = ! empty( $settings['availableLanguage'] ) ? $settings['availableLanguage'] : array();
477
- foreach ( $schemaModel->languageList() as $language ) {
478
- $slt = ( in_array( $language, $lanAvailable ) ? "selected" : null );
479
  echo "<option value='$language' $slt>$language</option>";
480
  }
481
  ?>
@@ -486,64 +503,67 @@ $schemaModel = new KcSeoSchemaModel;
486
  </div>
487
  </div>
488
 
489
- <h2>Site Name in Search Results</h2>
490
  <table width="100%" cellpadding="10" class="form-table">
491
  <tr class="default">
492
- <th>Enable Site link Search Box</th>
493
  <td align="left" scope="row">
494
  <input type="checkbox"
495
- name="homeonly" <?php echo( ! empty( $settings['homeonly'] ) ? "checked" : null ); ?>
496
  value="1"/>
497
  </td>
498
  </tr>
499
  <tr class="default">
500
- <th>Site Name:</th>
501
  <td align="left" scope="row">
502
  <input type="text" class="regular-text" name="sitename"
503
- value="<?php echo( ! empty( $settings['sitename'] ) ? esc_attr( $settings['sitename'] ) : null ); ?>"/>
504
  </td>
505
  </tr>
506
  <tr class="default">
507
- <th>Site Alternative Name:</th>
508
  <td align="left" scope="row">
509
  <input type="text" class="regular-text" name="siteaname"
510
- value="<?php echo( ! empty( $settings['siteaname'] ) ? esc_attr( $settings['siteaname'] ) : null ); ?>"/>
511
  </td>
512
  </tr>
513
  <tr class="default">
514
- <th>Site Url:</th>
515
  <td align="left" scope="row">
516
  <input type="text" class="regular-text" name="siteurl"
517
- value="<?php echo( ! empty( $settings['siteurl'] ) ? esc_attr( $settings['siteurl'] ) : get_home_url() ); ?>"/>
518
  </td>
519
  </tr>
520
  </table>
521
  <p class="submit"><input type="submit" name="submit" id="tlpSaveButton" class="button button-primary"
522
- value="<?php _e( 'Save Changes', KCSEO_WP_SCHEMA_SLUG ); ?>"></p>
523
 
524
- <?php wp_nonce_field( $KcSeoWPSchema->nonceText(), '_kcseo_nonce' ); ?>
525
  </form>
526
  <div id="response"></div>
527
  </div>
528
  <div class='kc-get-pro'>
529
- <h3>Pro Version Features</h3>
530
  <ol>
531
- <li>Includes Auto-fill function <---Popular</li>
532
- <li>Supports Custom Post Types beyond default page and posts</li>
533
- <li>Supports WordPress Multisite</li>
534
- <li>Supports more schema types:
535
  <ol>
536
- <li>Books</li>
537
- <li>Courses</li>
538
- <li>Job Postings</li>
539
- <li>Movies</li>
540
- <li>Music</li>
541
- <li>Recipe</li>
542
- <li>TV Episode</li>
543
  </ol>
544
  </li>
545
  </ol>
546
- <div class="kc-pro-action"><a class='button button-primary' href='https://wpsemplugins.com/downloads/wordpress-schema-plugin/' target='_blank'>Get the Pro Version</a></div>
 
 
 
547
  </div>
548
  </div>
549
  </div>
1
  <?php
2
  global $KcSeoWPSchema;
3
+ $settings = get_option($KcSeoWPSchema->options['settings']);
4
  $schemaModel = new KcSeoSchemaModel;
5
  ?>
6
  <div class="wrap">
7
+ <h2><?php _e('WP SEO Structured Data Schema', "wp-seo-structured-data-schema"); ?></h2>
8
 
9
  <div id="kcseo-settings">
10
  <div id="kcseo-options">
11
  <form id="kcseo-option-settings">
12
 
13
+ <h3><?php _e('General settings for WP SEO Structured Data Schema by <a href="https://wpsemplugins.com/">WPSEMPlugins.com</a>', "wp-seo-structured-data-schema"); ?></h3>
 
14
  <div class="setting-holder">
15
  <table width="40%" cellpadding="10" class="form-table">
16
  <tr class="default">
18
  <td align="left" scope="row">
19
  <div class="with-tooltip">
20
  <input type="text" class="regular-text" name="web_url"
21
+ value="<?php echo(!empty($settings['web_url']) ? esc_attr($settings['web_url']) : get_home_url()); ?>"/>
22
  <div class="schema-tooltip-holder">
23
  <span class="schema-tooltip"></span>
24
  <div class="hidden">
25
+ <p>
26
+ <b>Tip:</b> <?php _e("For more detailed information on how to configure this plugin, please visit:", "wp-seo-structured-data-schema") ?>
27
  <a href="https://wpsemplugins.com/wordpress-seo-structured-data-schema-plugin/">https://wpsemplugins.com/wordpress-seo-structured-data-schema-plugin/</a>
28
  </p>
29
  </div>
32
  </td>
33
  </tr>
34
  <tr class="default">
35
+ <th><?php _e("Site Type", "wp-seo-structured-data-schema") ?></th>
36
  <td align="left" scope="row">
37
  <select id="site_type" name="site_type" class="select2">
38
+ <option value=""><?php _e("Select one type", "wp-seo-structured-data-schema") ?></option>
39
  <?php
40
+ $siteType = !empty($settings['site_type']) ? $settings['site_type'] : null;
41
 
42
+ foreach ($schemaModel->site_type() as $key => $site) {
43
+ if (is_array($site)) {
44
+ $slt = ($key == $siteType ? "selected" : null);
45
+ echo "<option value='$key' $slt>&nbsp;&nbsp;&nbsp;$key</option>";
46
+ foreach ($site as $inKey => $inSite) {
47
+ if (is_array($inSite)) {
48
+ $slt = ($inKey == $siteType ? "selected" : null);
49
  echo "<option value='$inKey' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$inKey</option>";
50
+ foreach ($inSite as $inInKey => $inInSite) {
51
+ if (is_array($inInSite)) {
52
+ $slt = ($inInKey == $siteType ? "selected" : null);
53
  echo "<option value='$inInKey' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$inInKey</option>";
54
+ foreach ($inInSite as $iSite) {
55
+ $slt = ($iSite == $siteType ? "selected" : null);
56
  echo "<option value='$iSite' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$iSite</option>";
57
  }
58
+ } else {
59
+ $slt = ($inInSite == $siteType ? "selected" : null);
60
  echo "<option value='$inInSite' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$inInSite</option>";
61
  }
62
  }
63
+ } else {
64
+ $slt = ($inSite == $siteType ? "selected" : null);
65
  echo "<option value='$inSite' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$inSite</option>";
66
  }
67
  }
68
+ } else {
69
+ $slt = ($site == $siteType ? "selected" : null);
70
+ echo "<option value='$site' $slt>$site</option>";
71
+ }
72
  }
73
  ?>
74
  </select>
75
  </td>
76
  </tr>
77
  <tr class="default">
78
+ <th><?php _e("Organization or Business name", "wp-seo-structured-data-schema") ?></th>
79
  <td align="left" scope="row">
80
  <input type="text" class="regular-text" name="type_name"
81
+ value="<?php echo(!empty($settings['type_name']) ? $settings['type_name'] : null); ?>"/>
82
  </td>
83
  </tr>
84
  <tr class="default all-type-data">
85
+ <th><?php _e("Site Image", "wp-seo-structured-data-schema") ?> <span
86
+ class="required">*</span></th>
87
  <td align="left" scope="row">
88
  <div class="kSeo-image">
89
  <div class="kSeo-image-wrapper">
90
  <?php
91
+ $siteImageId = !empty($settings['site_image']) ? absint($settings['site_image']) : 0;
92
+ $siteImage = $ingInfo = null;
93
+ if ($siteImageId) {
94
+ $siteImage = wp_get_attachment_image($siteImageId, "thumbnail");
95
+ $imgData = $KcSeoWPSchema->imageInfo($siteImageId);
96
  $ingInfo .= "<span><strong>URL: </strong>{$imgData['url']}</span>";
97
  $ingInfo .= "<span><strong>Width: </strong>{$imgData['width']}px</span>";
98
  $ingInfo .= "<span><strong>Height: </strong>{$imgData['height']}px</span>";
99
  }
100
  ?>
101
+ <span class="kSeoImgAdd"><span
102
+ class="dashicons dashicons-plus-alt"></span></span>
103
+ <span class="kSeoImgRemove <?php echo($siteImageId ? null : "kSeo-hidden"); ?>"><span
104
+ class="dashicons dashicons-trash"></span></span>
105
  <div class="kSeo-image-preview"><?php echo $siteImage; ?></div>
106
  <input type="hidden" name="site_image" value="<?php echo $siteImageId; ?>"/>
107
  </div>
110
  </td>
111
  </tr>
112
  <tr class="default all-type-data">
113
+ <th><?php _e("Price Range", "wp-seo-structured-data-schema") ?> <span
114
+ class="required">*</span></th>
115
  <td align="left" scope="row">
116
  <input type="text" class="regular-text" name="site_price_range"
117
+ value="<?php echo(!empty($settings['site_price_range']) ? $settings['site_price_range'] : null); ?>"/>
118
+ <div class="description"><?php _e("The price range of the business, for example $$$.", "wp-seo-structured-data-schema") ?></div>
119
  </td>
120
  </tr>
121
  <tr class="default all-type-data">
122
+ <th><?php _e("Site Telephone", "wp-seo-structured-data-schema") ?> <span
123
+ class="required">*</span></th>
124
  <td align="left" scope="row">
125
  <input type="text" class="regular-text" name="site_telephone"
126
+ value="<?php echo(!empty($settings['site_telephone']) ? $settings['site_telephone'] : null); ?>"/>
127
+ <div class="description"><?php _e("The telephone number.", "wp-seo-structured-data-schema") ?></div>
128
  </td>
129
  </tr>
130
  <tr class="default">
131
+ <th><?php _e("Additional Type", "wp-seo-structured-data-schema") ?></th>
132
  <td align="left" scope="row">
133
  <div class="with-tooltip">
134
  <textarea name="additionalType"
135
  placeholder="http://example1.com&#10;http://example2.com&#10;http://example3.com"
136
  rows="6" cols="50"
137
+ class="additional-type"><?php echo(!empty($settings['additionalType']) ? esc_attr(@$settings['additionalType']) : null); ?></textarea>
138
+ <p class="description"><?php _e('Add "Additional Type"', "wp-seo-structured-data-schema") ?></p>
139
  <div class="schema-tooltip-holder">
140
  <span class="schema-tooltip"></span>
141
  <div class="hidden">
142
+ <p><b>Tip:</b> <?php _e("Product Ontology is an extension to schema using WikiPedia definitions that enables you to further define a type by adding an \"AdditionalType” attribute.Example for a Tailor (which is not available
143
+ as a schema “Type”): Pick LocalBusiness as a generic Type, then add additional type as follows:", "wp-seo-structured-data-schema") ?>
 
 
 
144
  <a href="https://en.wikipedia.org/wiki/Tailor">https://en.wikipedia.org/wiki/<span>Tailor</span></a>
145
  Change to this format and enter in Additional Type field:
146
  <a href="http://www.productontology.org/id/Tailor">http://www.productontology.org/id/<span>Tailor</span></a>
147
+ For more info visit:<a
148
+ href="https://wpsemplugins.com/product-ontology-schema/">https://wpsemplugins.com/product-ontology-schema/</a>
149
  </p>
150
  </div>
151
  </div>
153
  </td>
154
  </tr>
155
  <tr class="default restaurant">
156
+ <th style="font-size: 18px; padding: 30px 0 5px;"><?php _e("Restaurant Information", "wp-seo-structured-data-schema") ?></th>
157
  </tr>
158
  <tr class="default restaurant">
159
+ <th><?php _e("The cuisine of the restaurant.", "wp-seo-structured-data-schema") ?> <span
160
+ class="required">*</span></th>
161
  <td align="left" scope="row">
162
  <textarea cols="50" rows="6"
163
+ name="restaurant[servesCuisine]"><?php echo(!empty($settings['restaurant']['servesCuisine']) ? esc_attr($settings['restaurant']['servesCuisine']) : null); ?></textarea>
164
  </td>
165
  </tr>
166
  <tr class="default business-info">
167
+ <th style="font-size: 18px; padding: 30px 0 5px;"><?php _e("Others local business info", "wp-seo-structured-data-schema") ?></th>
168
  </tr>
169
  <tr class="default business-info">
170
+ <th><?php _e("Description", "wp-seo-structured-data-schema") ?></th>
171
  <td align="left" scope="row">
172
  <textarea cols="50" rows="6"
173
+ name="business_info[description]"><?php echo(!empty($settings['business_info']['description']) ? esc_attr($settings['business_info']['description']) : null); ?></textarea>
174
  </td>
175
  </tr>
176
  <tr class="default business-info">
177
+ <th><?php _e("Operation Hours", "wp-seo-structured-data-schema") ?></th>
178
  <td align="left" scope="row">
179
  <div class="with-tooltip">
180
  <textarea name="business_info[openingHours]"
181
  placeholder="Mo-Sa 11:00-14:30&#10;Mo-Th 17:00-21:30&#10;Fr-Sa 17:00-22:00"
182
  rows="4" cols="50"
183
+ class="additional-type"><?php echo(!empty($settings['business_info']['openingHours']) ? esc_attr($settings['business_info']['openingHours']) : null); ?></textarea>
184
+ <p class="description">- Days are specified using the following two-letter
185
+ combinations: Mo,
186
  Tu, We, Th, Fr, Sa, Su.</br>
187
+ - Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
188
+ <br>
189
  - Add Opening Hours by separate line</p>
190
  <div class="schema-tooltip-holder">
191
  <span class="schema-tooltip"></span>
192
  <div class="hidden">
193
  <p>
194
+ <b>Tip:</b> Once you save these structured data schema settings,
195
+ validate your
196
  home page url here:
197
  <a href="https://developers.google.com/structured-data/testing-tool/">https://developers.google.com/structured-data/testing-tool/</a>
198
  </p>
201
  </td>
202
  </tr>
203
  <tr class="default business-info">
204
+ <th style="font-size: 16px;"><?php _e("GeoCoordinates", "wp-seo-structured-data-schema") ?></th>
205
  </tr>
206
  <tr class="default business-info">
207
+ <th style="text-align: right"><?php _e("Latitude", "wp-seo-structured-data-schema") ?></th>
208
  <td align="left" scope="row">
209
  <input type="text" class="regular-text" name="business_info[latitude]"
210
+ value="<?php echo(!empty($settings['business_info']['latitude']) ? esc_attr($settings['business_info']['latitude']) : null); ?>"/>
211
  </td>
212
  </tr>
213
  <tr class="default business-info">
214
+ <th style="text-align: right"><?php _e("Longitude", "wp-seo-structured-data-schema") ?></th>
215
  <td align="left" scope="row">
216
  <input type="text" class="regular-text" name="business_info[longitude]"
217
+ value="<?php echo(!empty($settings['business_info']['longitude']) ? esc_attr($settings['business_info']['longitude']) : null); ?>"/>
218
  </td>
219
  </tr>
220
  <tr class="default person">
221
+ <th style="font-size: 18px; padding: 30px 0 5px;"><?php _e("Person", "wp-seo-structured-data-schema") ?></th>
222
  </tr>
223
  <tr class="default person">
224
+ <th><?php _e("Name", "wp-seo-structured-data-schema") ?></th>
225
  <td align="left" scope="row">
226
  <input type="text" class="regular-text" name="person[name]"
227
+ value="<?php echo(!empty($settings['person']['name']) ? esc_attr($settings['person']['name']) : null); ?>"/>
228
  </td>
229
  </tr>
230
  <tr class="default person">
231
+ <th><?php _e("Work For", "wp-seo-structured-data-schema") ?></th>
232
  <td align="left" scope="row">
233
  <input type="text" class="regular-text" name="person[worksFor]"
234
+ value="<?php echo(!empty($settings['person']['worksFor']) ? esc_attr($settings['person']['worksFor']) : null); ?>"/>
235
 
236
  </td>
237
  </tr>
238
  <tr class="default person">
239
+ <th><?php _e("Job Title", "wp-seo-structured-data-schema") ?></th>
240
  <td align="left" scope="row">
241
  <input type="text" class="regular-text" name="person[jobTitle]"
242
+ value="<?php echo(@$settings['person']['jobTitle'] ? @$settings['person']['jobTitle'] : null); ?>"/>
243
 
244
  </td>
245
  </tr>
246
  <tr class="default person">
247
+ <th><?php _e("Image", "wp-seo-structured-data-schema") ?></th>
248
  <td align="left" scope="row">
249
  <input type="text" class="regular-text" name="person[image]"
250
+ value="<?php echo(!empty($settings['person']['image']) ? esc_attr($settings['person']['image']) : null); ?>"/>
251
+ <p class="description"><?php _e("Add your personal photo here", "wp-seo-structured-data-schema") ?></p>
252
  </td>
253
  </tr>
254
  <tr class="default person">
255
+ <th><?php _e("Description", "wp-seo-structured-data-schema") ?></th>
256
  <td align="left" scope="row">
257
  <input type="text" class="regular-text" name="person[description]"
258
+ value="<?php echo(!empty($settings['person']['description']) ? esc_attr($settings['person']['description']) : null); ?>"/>
259
  </td>
260
  </tr>
261
  <tr class="default person">
262
+ <th><?php _e("Birth date", "wp-seo-structured-data-schema") ?></th>
263
  <td align="left" scope="row">
264
  <input type="text" class="regular-text kcseo-date" name="person[birthDate]"
265
+ value="<?php echo(!empty($settings['person']['birthDate']) ? esc_attr($settings['person']['birthDate']) : null); ?>"/>
266
 
267
  </td>
268
  </tr>
269
  <tr class="default">
270
+ <th style="font-size: 18px; padding: 30px 0 5px;"><?php _e("Address", "wp-seo-structured-data-schema") ?></th>
271
  </tr>
272
  <tr class="default">
273
+ <th><?php _e("Address Country", "wp-seo-structured-data-schema") ?></th>
274
  <td align="left" scope="row">
275
  <select class="select2" name="address[country]">
276
  <option value="">Select a country</option>
277
  <?php
278
+ $aCountry = !empty($settings['address']['country']) ? $settings['address']['country'] : null;
279
+ foreach ($schemaModel->countryList() as $country) {
280
+ $slt = ($country == $aCountry ? "selected" : null);
281
  echo "<option value='$country' $slt>$country</option>";
282
  }
283
  ?>
285
  </td>
286
  </tr>
287
  <tr class="default">
288
+ <th><?php _e("Address Locality", "wp-seo-structured-data-schema") ?></th>
289
  <td align="left" scope="row">
290
  <input type="text" class="regular-text" name="address[locality]"
291
+ value="<?php echo(!empty($settings['address']['locality']) ? esc_attr($settings['address']['locality']) : null); ?>"/>
292
  <p class="description">City (i.e Kansas city)</p>
293
  </tr>
294
  <tr class="default">
295
+ <th><?php _e("Address Region", "wp-seo-structured-data-schema") ?></th>
296
  <td align="left" scope="row">
297
  <input type="text" class="regular-text" name="address[region]"
298
+ value="<?php echo(!empty($settings['address']['region']) ? esc_attr($settings['address']['region']) : null); ?>"/>
299
  <p class="description">State (i.e. MO)</p>
300
  </tr>
301
  <tr class="default">
302
+ <th><?php _e("Postal Code", "wp-seo-structured-data-schema") ?></th>
303
  <td align="left" scope="row">
304
  <input type="text" class="regular-text" name="address[postalcode]"
305
+ value="<?php echo(!empty($settings['address']['postalcode']) ? esc_attr($settings['address']['postalcode']) : null); ?>"/>
306
  </tr>
307
  <tr class="default">
308
+ <th><?php _e("Street Address", "wp-seo-structured-data-schema") ?></th>
309
  <td align="left" scope="row">
310
  <input type="text" class="regular-text" name="address[street]"
311
+ value="<?php echo(!empty($settings['address']['street']) ? esc_attr($settings['address']['street']) : null); ?>"/>
312
  </tr>
313
  </table>
314
  </div>
315
  <div id="tabs-kcseo-container" class="rt-tab-container">
316
  <ul class="rt-tab-nav">
317
+ <li class="current"><a
318
+ href="#tab-logo-url"><?php _e("Organization Logo", "wp-seo-structured-data-schema") ?></a>
319
+ </li>
320
+ <li><a href="#tab-social-profile"><?php _e("Social Profile", "wp-seo-structured-data-schema") ?></a></li>
321
+ <li><a href="#tab-corporate-contract"><?php _e("Corporate Contacts", "wp-seo-structured-data-schema") ?></a></li>
322
  </ul>
323
  <div id="tab-logo-url" class="rt-tab-content">
324
  <table width="100%" cellpadding="10" class="form-table">
325
  <tr class="field_logo">
326
+ <th><?php _e("Select Organization Logo", "wp-seo-structured-data-schema") ?></th>
327
  <td scope="row" style="position: relative">
328
  <div class="kSeo-image">
329
  <div class="kSeo-image-wrapper">
330
  <?php
331
+ $organizationLogoId = !empty($settings['organization_logo']) ? absint($settings['organization_logo']) : null;
332
+ $organizeImage = $imgInfo = null;
333
+ if ($organizationLogoId) {
334
+ $organizeImage = wp_get_attachment_image($organizationLogoId, "thumbnail");
335
+ $imgData = $KcSeoWPSchema->imageInfo($organizationLogoId);
336
  $imgInfo .= "<span><strong>URL: </strong>{$imgData['url']}</span>";
337
  $imgInfo .= "<span><strong>Width: </strong>{$imgData['width']}px</span>";
338
  $imgInfo .= "<span><strong>Height: </strong>{$imgData['height']}px</span>";
340
  ?>
341
  <span class="kSeoImgAdd"><span class="dashicons dashicons-plus-alt"></span></span>
342
  <span
343
+ class="kSeoImgRemove <?php echo($organizationLogoId ? null : "kSeo-hidden"); ?>"><span
344
+ class="dashicons dashicons-trash"></span></span>
345
  <div class="kSeo-image-preview"><?php echo $organizeImage; ?></div>
346
+ <input type="hidden" name="organization_logo"
347
+ value="<?php echo $organizationLogoId; ?>"/>
348
  </div>
349
  <div class='image-info'><?php echo $imgInfo; ?></div>
350
  </div>
351
  <div class="schema-tooltip-holder" style="left: 200px">
352
  <span class="schema-tooltip"></span>
353
  <div class="hidden">
354
+ <p><b>Tip:</b> For some Rich Snippets that use the image property, no
355
+ dimensions are specified, For other Rich Snippets that use the image
356
+ property, Google specifies at least 160x90 pixels and at most 1920x1080
357
+ pixels. For Google Search, the documentation for their Rich Snippets is
358
+ at
359
  <a href="https://developers.google.com/structured-data/rich-snippets/.">https://developers.google.com/structured-data/rich-snippets/.</a>
360
  </p>
361
  </div>
367
  <div id="tab-social-profile" class="rt-tab-content">
368
  <table width="100%" cellpadding="10" class="form-table">
369
  <tr class="field_social">
370
+ <th><?php _e("Company Name", "wp-seo-structured-data-schema") ?></th>
371
  <td align="left" scope="row">
372
  <input type="text" class="regular-text" name="social_company_name"
373
+ value="<?php echo(!empty($settings['social_company_name']) ? esc_attr($settings['social_company_name']) : null); ?>"/>
374
  </td>
375
  </tr>
376
  <tr class="field_social_title">
377
+ <th style="font-size: 18px; padding: 10px 0;"><?php _e("Social Profiles", "wp-seo-structured-data-schema") ?></th>
378
  </tr>
379
  <tr class="social_field_link">
380
+ <th><?php _e("Social Profile", "wp-seo-structured-data-schema") ?></th>
381
  <th>
382
  <div id="social-field-holder">
383
  <?php
384
+ $socialP = (!empty($settings['social']) ? $settings['social'] : array());
385
+ if (is_array($socialP) && !empty($socialP)) {
386
  $html = null;
387
+ $i = 0;
388
+ foreach ($socialP as $socialD) {
389
  $html .= "<div class='sfield'>";
390
  $html .= "<select name='social[$i][id]'>";
391
+ foreach ($schemaModel->socialList() as $sId => $social) {
392
+ $slt = ($sId == $socialD['id'] ? "selected" : null);
393
  $html .= "<option value='$sId' $slt>$social</option>";
394
  }
395
  $html .= "</select>";
396
  $html .= "<input type='text' name='social[$i][link]' value='{$socialD['link']}'>";
397
  $html .= '<span class="dashicons dashicons-trash social-remove"></span>';
398
  $html .= "</div>";
399
+ $i++;
400
  }
401
  echo $html;
402
  }
403
  ?>
404
  </div>
405
+ <a class="button button-primary add-new" id="social-add"><?php _e("Add Social Profile", "wp-seo-structured-data-schema") ?></a>
406
  </th>
407
  </tr>
408
  </table>
410
  <div id="tab-corporate-contract" class="rt-tab-content">
411
  <table width="100%" cellpadding="10" class="form-table">
412
  <tr class="field_contact">
413
+ <th style="font-size: 18px; padding: 10px 0;"><?php _e("Contacts", "wp-seo-structured-data-schema") ?></th>
414
  </tr>
415
  <tr class="field_contact">
416
  <th>Contact Type</th>
417
  <td scope="row">
418
  <select name="contact[contactType]" class="select2" style="width: 200px">
419
  <?php
420
+ $contactType = !empty($settings['contact']['contactType']) ? $settings['contact']['contactType'] : null;
421
+ foreach ($schemaModel->contactType() as $cType) {
422
+ $slt = ($cType == $contactType ? "selected" : null);
423
  echo "<option value='$cType' $slt>$cType</option>";
424
  }
425
 
429
 
430
  </tr>
431
  <tr class="field_contact">
432
+ <th><?php _e("Contact Phone", "wp-seo-structured-data-schema") ?></th>
433
  <td align="left" scope="row">
434
  <input type="text" class="regular-text" name="contact[telephone]"
435
+ value="<?php echo(!empty($settings['contact']['telephone']) ? esc_attr($settings['contact']['telephone']) : null); ?>"/>
436
+ <p class="description kco-telephone"><?php _e("Please follow the format below", "wp-seo-structured-data-schema") ?><span
437
+ style="font-size: 11px;">+1-505-998-3793</span><span
438
+ style="font-size: 11px;">+(Country Code) 425 123-4567</span><span
439
+ style="font-size: 11px;">+(Country Code) 42 68 53 01</span><span
440
+ style="font-size: 11px;">+44-2078225951</span><span
441
+ style="font-size: 11px;">1 (855) 469-6378</span>
442
  </p>
443
  </td>
444
  </tr>
445
  <tr class="field_contact">
446
+ <th><?php _e("Contact Email", "wp-seo-structured-data-schema") ?></th>
447
  <td align="left" scope="row">
448
  <input type="text" class="regular-text" name="contact[email]"
449
+ value="<?php echo(!empty($settings['contact']['email']) ? sanitize_email($settings['contact']['email']) : null); ?>"/>
450
  </td>
451
  </tr>
452
  <tr class="field_contact">
453
+ <th><?php _e("Contact Option", "wp-seo-structured-data-schema") ?></th>
454
  <td align="left" scope="row">
455
+ <select name="contact[contactOption]" class="select2 withEmptyOption"
456
+ style="width: 200px">
457
+ <option value=""><?php _e("Select an option", "wp-seo-structured-data-schema") ?></option>
458
  <option value="TollFree" <?php
459
+ $cPtOpt = !empty($settings['contact']['contactOption']) ? $settings['contact']['contactOption'] : null;
460
+ echo($cPtOpt == "TollFree" ? "selected" : null); ?>><?php _e("TollFree", "wp-seo-structured-data-schema") ?>
461
  </option>
462
  <option
463
+ value="HearingImpairedSupported" <?php echo($settings['contact']['contactOption'] == "HearingImpairedSupported" ? "selected" : null); ?>>
464
+ <?php _e("HearingImpairedSupported", "wp-seo-structured-data-schema") ?>
465
  </option>
466
  </select>
467
  </td>
468
  </tr>
469
  <tr class="field_contact">
470
+ <th><?php _e("Area Served", "wp-seo-structured-data-schema") ?></th>
471
  <td align="left" scope="row">
472
  <div class="area_served_wrapper">
473
+ <select id="area_served" class="select2" name="area_served[]"
474
+ multiple="multiple"
475
  style="width: 50%">
476
  <?php
477
+ $areaServed = !empty($settings['area_served']) ? $settings['area_served'] : array();
478
+ foreach ($schemaModel->countryList() as $country) {
479
+ $slt = (in_array($country, $areaServed) ? "selected" : null);
480
  echo "<option value='$country' $slt>$country</option>";
481
  }
482
  ?>
485
  </td>
486
  </tr>
487
  <tr class="field_contact">
488
+ <th><?php _e("Available language", "wp-seo-structured-data-schema") ?></th>
489
  <td scope="row" class="lang">
490
+ <select class="select2" name="availableLanguage[]" style="width: 50%"
491
+ multiple="multiple">
492
  <?php
493
+ $lanAvailable = !empty($settings['availableLanguage']) ? $settings['availableLanguage'] : array();
494
+ foreach ($schemaModel->languageList() as $language) {
495
+ $slt = (in_array($language, $lanAvailable) ? "selected" : null);
496
  echo "<option value='$language' $slt>$language</option>";
497
  }
498
  ?>
503
  </div>
504
  </div>
505
 
506
+ <h2><?php _e("Site Name in Search Results", "wp-seo-structured-data-schema") ?></h2>
507
  <table width="100%" cellpadding="10" class="form-table">
508
  <tr class="default">
509
+ <th><?php _e("Enable Site link Search Box", "wp-seo-structured-data-schema") ?></th>
510
  <td align="left" scope="row">
511
  <input type="checkbox"
512
+ name="homeonly" <?php echo(!empty($settings['homeonly']) ? "checked" : null); ?>
513
  value="1"/>
514
  </td>
515
  </tr>
516
  <tr class="default">
517
+ <th><?php _e("Site Name:", "wp-seo-structured-data-schema") ?></th>
518
  <td align="left" scope="row">
519
  <input type="text" class="regular-text" name="sitename"
520
+ value="<?php echo(!empty($settings['sitename']) ? esc_attr($settings['sitename']) : null); ?>"/>
521
  </td>
522
  </tr>
523
  <tr class="default">
524
+ <th><?php _e("Site Alternative Name:", "wp-seo-structured-data-schema") ?></th>
525
  <td align="left" scope="row">
526
  <input type="text" class="regular-text" name="siteaname"
527
+ value="<?php echo(!empty($settings['siteaname']) ? esc_attr($settings['siteaname']) : null); ?>"/>
528
  </td>
529
  </tr>
530
  <tr class="default">
531
+ <th><?php _e("Site Url:", "wp-seo-structured-data-schema") ?></th>
532
  <td align="left" scope="row">
533
  <input type="text" class="regular-text" name="siteurl"
534
+ value="<?php echo(!empty($settings['siteurl']) ? esc_attr($settings['siteurl']) : get_home_url()); ?>"/>
535
  </td>
536
  </tr>
537
  </table>
538
  <p class="submit"><input type="submit" name="submit" id="tlpSaveButton" class="button button-primary"
539
+ value="<?php _e('Save Changes', "wp-seo-structured-data-schema"); ?>"></p>
540
 
541
+ <?php wp_nonce_field($KcSeoWPSchema->nonceText(), '_kcseo_nonce'); ?>
542
  </form>
543
  <div id="response"></div>
544
  </div>
545
  <div class='kc-get-pro'>
546
+ <h3><?php _e("Pro Version Features", "wp-seo-structured-data-schema") ?></h3>
547
  <ol>
548
+ <li><?php _e("Includes Auto-fill function <---Popular", "wp-seo-structured-data-schema") ?></li>
549
+ <li><?php _e("Supports Custom Post Types beyond default page and posts", "wp-seo-structured-data-schema") ?></li>
550
+ <li><?php _e("Supports WordPress Multisite", "wp-seo-structured-data-schema") ?></li>
551
+ <li><?php _e("Supports more schema types:", "wp-seo-structured-data-schema") ?>
552
  <ol>
553
+ <li><?php _e("Books", "wp-seo-structured-data-schema") ?></li>
554
+ <li><?php _e("Courses", "wp-seo-structured-data-schema") ?></li>
555
+ <li><?php _e("Job Postings", "wp-seo-structured-data-schema") ?></li>
556
+ <li><?php _e("Movies", "wp-seo-structured-data-schema") ?></li>
557
+ <li><?php _e("Music", "wp-seo-structured-data-schema") ?></li>
558
+ <li><?php _e("Recipe", "wp-seo-structured-data-schema") ?></li>
559
+ <li><?php _e("TV Episode", "wp-seo-structured-data-schema") ?></li>
560
  </ol>
561
  </li>
562
  </ol>
563
+ <div class="kc-pro-action"><a class='button button-primary'
564
+ href='https://wpsemplugins.com/downloads/wordpress-schema-plugin/'
565
+ target='_blank'><?php _e("Get the Pro Version", "wp-seo-structured-data-schema") ?></a>
566
+ </div>
567
  </div>
568
  </div>
569
  </div>
lib/views/settings.php CHANGED
@@ -1,63 +1,72 @@
1
  <?php
2
  global $KcSeoWPSchema;
3
- $settings = get_option( $KcSeoWPSchema->options['main_settings'] );
4
  ?>
5
  <div class="wrap">
6
- <h2><?php _e( 'Schema Settings', KCSEO_WP_SCHEMA_SLUG ); ?></h2>
7
 
8
  <div id="kcseo-settings">
9
  <div id="kcseo-options">
10
  <form id="kcseo-main-settings">
11
  <table width="40%" cellpadding="10" class="form-table">
12
  <tr class="default">
13
- <th>Business / Org Schema</th>
14
  <td align="left" scope="row">
15
- <?php $dd = ! empty( $settings['site_schema'] ) ? $settings['site_schema'] : 'home_page'; ?>
16
- <input type="radio" <?php echo( $dd == 'home_page' ? 'checked' : null ); ?> name="site_schema"
17
- value="home_page" id="site_schema_home"><label for="site_schema_home">Home page
18
- only</label><br>
19
- <input type="radio" <?php echo( $dd == 'all' ? 'checked' : null ); ?> name="site_schema" value="all"
20
- id="site_schema_all"><label for="site_schema_all">Sitewide (Apply General Settings schema
21
- sitewide)</label>
 
 
 
 
 
22
  </td>
23
  </tr>
24
  <tr class="default">
25
- <th>Delete all data</th>
26
  <td align="left" scope="row">
27
- <?php $dd = ! empty( $settings['delete-data'] ) ? "checked" : null; ?>
28
- <input type="checkbox" <?php echo $dd; ?> name="delete-data" value="1" id="delete-data"><label
29
- for="delete-data">Enable</label>
30
- <p class="description">This will delete all schema created and applied by this plugin when plugin is
31
- deleted.</p>
 
32
  </td>
33
  </tr>
34
  </table>
35
  <p class="submit"><input type="submit" name="submit" id="tlpSaveButton" class="button button-primary"
36
- value="<?php _e( 'Save Changes', KCSEO_WP_SCHEMA_SLUG ); ?>"></p>
37
 
38
- <?php wp_nonce_field( $KcSeoWPSchema->nonceText(), '_kcseo_nonce' ); ?>
39
  </form>
40
  <div id="response"></div>
41
  </div>
42
  <div class='kc-get-pro'>
43
- <h3>Pro Version Features</h3>
44
  <ol>
45
- <li>Includes Auto-fill function <---Popular</li>
46
- <li>Supports Custom Post Types beyond default page and posts</li>
47
- <li>Supports WordPress Multisite</li>
48
- <li>Supports more schema types:
49
  <ol>
50
- <li>Books</li>
51
- <li>Courses</li>
52
- <li>Job Postings</li>
53
- <li>Movies</li>
54
- <li>Music</li>
55
- <li>Recipe</li>
56
- <li>TV Episode</li>
57
  </ol>
58
  </li>
59
  </ol>
60
- <div class="kc-pro-action"><a class='button button-primary' href='https://wpsemplugins.com/downloads/wordpress-schema-plugin/' target='_blank'>Get the Pro Version</a></div>
 
 
 
61
  </div>
62
  </div>
63
 
1
  <?php
2
  global $KcSeoWPSchema;
3
+ $settings = get_option($KcSeoWPSchema->options['main_settings']);
4
  ?>
5
  <div class="wrap">
6
+ <h2><?php _e('Schema Settings', "wp-seo-structured-data-schema"); ?></h2>
7
 
8
  <div id="kcseo-settings">
9
  <div id="kcseo-options">
10
  <form id="kcseo-main-settings">
11
  <table width="40%" cellpadding="10" class="form-table">
12
  <tr class="default">
13
+ <th><?php _e("Business / Org Schema", "wp-seo-structured-data-schema") ?></th>
14
  <td align="left" scope="row">
15
+ <?php $dd = !empty($settings['site_schema']) ? $settings['site_schema'] : 'home_page'; ?>
16
+ <input type="radio" <?php echo($dd == 'home_page' ? 'checked' : null); ?> name="site_schema"
17
+ value="home_page" id="site_schema_home"><label for="site_schema_home"><?php _e("Home page
18
+ only", "wp-seo-structured-data-schema") ?></label><br>
19
+ <input type="radio" <?php echo($dd == 'all' ? 'checked' : null); ?> name="site_schema"
20
+ value="all"
21
+ id="site_schema_all"><label for="site_schema_all"><?php _e("Sitewide (Apply General Settings schema
22
+ sitewide)", "wp-seo-structured-data-schema") ?></label><br>
23
+ <input type="radio" <?php echo($dd == 'off' ? 'checked' : null); ?> name="site_schema"
24
+ value="off"
25
+ id="site_schema_off"><label
26
+ for="site_schema_off"><?php _e("Turn off (Turn off global schema)", "wp-seo-structured-data-schema") ?></label>
27
  </td>
28
  </tr>
29
  <tr class="default">
30
+ <th><?php _e("Delete all data", "wp-seo-structured-data-schema") ?></th>
31
  <td align="left" scope="row">
32
+ <?php $dd = !empty($settings['delete-data']) ? "checked" : null; ?>
33
+ <input type="checkbox" <?php echo $dd; ?> name="delete-data" value="1"
34
+ id="delete-data"><label
35
+ for="delete-data"><?php _e("Enable", "wp-seo-structured-data-schema") ?></label>
36
+ <p class="description"><?php _e("This will delete all schema created and applied by this plugin when plugin is
37
+ deleted.", "wp-seo-structured-data-schema") ?></p>
38
  </td>
39
  </tr>
40
  </table>
41
  <p class="submit"><input type="submit" name="submit" id="tlpSaveButton" class="button button-primary"
42
+ value="<?php _e('Save Changes', "wp-seo-structured-data-schema"); ?>"></p>
43
 
44
+ <?php wp_nonce_field($KcSeoWPSchema->nonceText(), '_kcseo_nonce'); ?>
45
  </form>
46
  <div id="response"></div>
47
  </div>
48
  <div class='kc-get-pro'>
49
+ <h3><?php _e("Pro Version Features", "wp-seo-structured-data-schema") ?></h3>
50
  <ol>
51
+ <li><?php _e("Includes Auto-fill function <---Popular", "wp-seo-structured-data-schema") ?></li>
52
+ <li><?php _e("Supports Custom Post Types beyond default page and posts", "wp-seo-structured-data-schema") ?></li>
53
+ <li><?php _e("Supports WordPress Multisite", "wp-seo-structured-data-schema") ?></li>
54
+ <li><?php _e("Supports more schema types:", "wp-seo-structured-data-schema") ?>
55
  <ol>
56
+ <li><?php _e("Books", "wp-seo-structured-data-schema") ?></li>
57
+ <li><?php _e("Courses", "wp-seo-structured-data-schema") ?></li>
58
+ <li><?php _e("Job Postings", "wp-seo-structured-data-schema") ?></li>
59
+ <li><?php _e("Movies", "wp-seo-structured-data-schema") ?></li>
60
+ <li><?php _e("Music", "wp-seo-structured-data-schema") ?></li>
61
+ <li><?php _e("Recipe", "wp-seo-structured-data-schema") ?></li>
62
+ <li><?php _e("TV Episode", "wp-seo-structured-data-schema") ?></li>
63
  </ol>
64
  </li>
65
  </ol>
66
+ <div class="kc-pro-action"><a class='button button-primary'
67
+ href='https://wpsemplugins.com/downloads/wordpress-schema-plugin/'
68
+ target='_blank'><?php _e("Get the Pro Version", "wp-seo-structured-data-schema") ?></a>
69
+ </div>
70
  </div>
71
  </div>
72
 
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, amp
5
  Requires at least: 3.5
6
  Tested up to: 4.9
7
- Stable tag: 2.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -120,6 +120,10 @@ You'll find the [FAQ on Kcseopro.com](https://wpsemplugins.com/).
120
 
121
  == Changelog ==
122
 
 
 
 
 
123
  = 2.5 =
124
  * Lat/Log issue fix
125
  * Rating issue
@@ -127,38 +131,3 @@ You'll find the [FAQ on Kcseopro.com](https://wpsemplugins.com/).
127
 
128
  = 2.4 =
129
  * Delete data when delete your plugin (Fixed)
130
-
131
- = 2.3 =
132
- * Fix the conflict with Event Manager plugin
133
- * Add New schema generator at footer
134
-
135
- = 2.1 =
136
- * Can delete all save data
137
- * Restaurant Schema (New)
138
- * Image url fixed for product schema
139
-
140
- = 2.0 =
141
- * Major update at coding and structure
142
- * Recover data from 1.2
143
- * Add image browser to set image
144
- * Update some Google schema structure
145
-
146
- = 1.3 =
147
- * Data recover
148
- * Image issue
149
- * Image from gallery
150
- * Fix data save issue
151
- * Schema update for different Criteria
152
-
153
- = 1.2 =
154
- * Meta field issue
155
- * Layout change
156
- * Fix some coding bug
157
-
158
-
159
- = 1.1 =
160
- * Layout change
161
- * Fix some coding bug
162
-
163
- = 1.0 =
164
- * Initial load of the plugin.
4
  Tags: seo, schema, structured data, rich snippets, microdata, json-ld, search engine optimization, local seo, google, sitelinks, schema.org, microformat, serp, amp
5
  Requires at least: 3.5
6
  Tested up to: 4.9
7
+ Stable tag: 2.5.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
120
 
121
  == Changelog ==
122
 
123
+ == 2.5.1 =
124
+ * A option for Turn off global schema
125
+ * Full Translation support
126
+
127
  = 2.5 =
128
  * Lat/Log issue fix
129
  * Rating issue
131
 
132
  = 2.4 =
133
  * Delete data when delete your plugin (Fixed)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
wp-seo-structured-data-schema.php CHANGED
@@ -1,57 +1,60 @@
1
  <?php
2
  /**
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.5
7
  * Author: WPSEMPlugins
8
  * Author URI: https://wpsemplugins.com/
9
  * License: A "Slug" license name e.g. GPL2
 
 
10
  */
11
- if ( ! defined( 'ABSPATH' ) ) {
12
  exit;
13
  }
14
  if (!defined('JSON_UNESCAPED_SLASHES'))
15
- define('JSON_UNESCAPED_SLASHES', 64);
16
  if (!defined('JSON_PRETTY_PRINT'))
17
- define('JSON_PRETTY_PRINT', 128);
18
  if (!defined('JSON_UNESCAPED_UNICODE'))
19
- define('JSON_UNESCAPED_UNICODE', 256);
20
 
21
 
22
- $plugin_data = get_file_data( __FILE__, array( 'Version' => 'Version' ), false );
23
- define( 'KCSEO_WP_SCHEMA_VERSION', $plugin_data['Version'] );
24
  define('KCSEO_WP_SCHEMA_SLUG', 'wp-seo-structured-data-schema');
25
  define('KCSEO_WP_SCHEMA_PATH', dirname(__FILE__));
26
- define('KCSEO_WP_SCHEMA_PLUGIN_ACTIVE_FILE_NAME', plugin_basename( __FILE__ ));
27
  define('KCSEO_WP_SCHEMA_URL', plugins_url('', __FILE__));
28
- define('KCSEO_WP_SCHEMA_LANGUAGE_PATH', dirname( plugin_basename( __FILE__ ) ) . '/languages');
29
 
30
- require ('lib/init.php');
31
- register_uninstall_hook( __FILE__, 'KCSEO_uninstall');
32
 
33
- function KCSEO_uninstall(){
34
- global $KcSeoWPSchema;
35
- $settings = get_option( $KcSeoWPSchema->options['main_settings'] );
36
- if(! empty( $settings['delete-data'])){
37
- $schemas = new KcSeoSchemaModel;
38
- $schemaFields = $schemas->schemaTypes();
 
39
 
40
- $args = array(
41
- 'post_type' => array( 'page', 'post' ),
42
- 'posts_per_page' => '-1'
43
- );
44
- $pages = new WP_Query ( $args );
45
- if ( $pages->have_posts() ) {
46
 
47
- while ( $pages->have_posts() ) {
48
- $pages->the_post();
49
- foreach ( $schemaFields as $schemaID => $schema ) {
50
- delete_post_meta( get_the_ID(), '_schema_' . $schemaID );
51
- }
52
- }
53
- wp_reset_postdata();
54
- }
55
- }
56
 
57
  }
1
  <?php
2
  /**
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.5.1
7
  * Author: WPSEMPlugins
8
  * Author URI: https://wpsemplugins.com/
9
  * License: A "Slug" license name e.g. GPL2
10
+ * Text Domain: wp-seo-structured-data-schema
11
+ * Domain Path: /languages
12
  */
13
+ if (!defined('ABSPATH')) {
14
  exit;
15
  }
16
  if (!defined('JSON_UNESCAPED_SLASHES'))
17
+ define('JSON_UNESCAPED_SLASHES', 64);
18
  if (!defined('JSON_PRETTY_PRINT'))
19
+ define('JSON_PRETTY_PRINT', 128);
20
  if (!defined('JSON_UNESCAPED_UNICODE'))
21
+ define('JSON_UNESCAPED_UNICODE', 256);
22
 
23
 
24
+ $plugin_data = get_file_data(__FILE__, array('Version' => 'Version'), false);
25
+ define('KCSEO_WP_SCHEMA_VERSION', $plugin_data['Version']);
26
  define('KCSEO_WP_SCHEMA_SLUG', 'wp-seo-structured-data-schema');
27
  define('KCSEO_WP_SCHEMA_PATH', dirname(__FILE__));
28
+ define('KCSEO_WP_SCHEMA_PLUGIN_ACTIVE_FILE_NAME', plugin_basename(__FILE__));
29
  define('KCSEO_WP_SCHEMA_URL', plugins_url('', __FILE__));
30
+ define('KCSEO_WP_SCHEMA_LANGUAGE_PATH', dirname(plugin_basename(__FILE__)) . '/languages');
31
 
32
+ require('lib/init.php');
33
+ register_uninstall_hook(__FILE__, 'KCSEO_uninstall');
34
 
35
+ function KCSEO_uninstall()
36
+ {
37
+ global $KcSeoWPSchema;
38
+ $settings = get_option($KcSeoWPSchema->options['main_settings']);
39
+ if (!empty($settings['delete-data'])) {
40
+ $schemas = new KcSeoSchemaModel;
41
+ $schemaFields = $schemas->schemaTypes();
42
 
43
+ $args = array(
44
+ 'post_type' => array('page', 'post'),
45
+ 'posts_per_page' => '-1'
46
+ );
47
+ $pages = new WP_Query ($args);
48
+ if ($pages->have_posts()) {
49
 
50
+ while ($pages->have_posts()) {
51
+ $pages->the_post();
52
+ foreach ($schemaFields as $schemaID => $schema) {
53
+ delete_post_meta(get_the_ID(), '_schema_' . $schemaID);
54
+ }
55
+ }
56
+ wp_reset_postdata();
57
+ }
58
+ }
59
 
60
  }