WP SEO Structured Data Schema - Version 2.7.1

Version Description

(Nov 23, 2021) = * Fixed: Some functional issue

=

Download this release

Release Info

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

Code changes from version 2.7.0 to 2.7.1

Files changed (67) hide show
  1. README.txt +218 -215
  2. assets/css/admin.css +462 -462
  3. assets/css/jquery.qtip.css +617 -617
  4. assets/css/select2.min.css +1 -1
  5. assets/images/icon-128x128.png +0 -0
  6. assets/js/admin.js +257 -257
  7. assets/js/i18n/ar.js +2 -2
  8. assets/js/i18n/az.js +2 -2
  9. assets/js/i18n/bg.js +2 -2
  10. assets/js/i18n/ca.js +2 -2
  11. assets/js/i18n/cs.js +2 -2
  12. assets/js/i18n/da.js +2 -2
  13. assets/js/i18n/de.js +2 -2
  14. assets/js/i18n/en.js +2 -2
  15. assets/js/i18n/es.js +2 -2
  16. assets/js/i18n/et.js +2 -2
  17. assets/js/i18n/eu.js +2 -2
  18. assets/js/i18n/fa.js +2 -2
  19. assets/js/i18n/fi.js +2 -2
  20. assets/js/i18n/fr.js +2 -2
  21. assets/js/i18n/gl.js +2 -2
  22. assets/js/i18n/he.js +2 -2
  23. assets/js/i18n/hi.js +2 -2
  24. assets/js/i18n/hr.js +2 -2
  25. assets/js/i18n/hu.js +2 -2
  26. assets/js/i18n/id.js +2 -2
  27. assets/js/i18n/is.js +2 -2
  28. assets/js/i18n/it.js +2 -2
  29. assets/js/i18n/ja.js +2 -2
  30. assets/js/i18n/ko.js +2 -2
  31. assets/js/i18n/lt.js +2 -2
  32. assets/js/i18n/lv.js +2 -2
  33. assets/js/i18n/mk.js +2 -2
  34. assets/js/i18n/ms.js +2 -2
  35. assets/js/i18n/nb.js +2 -2
  36. assets/js/i18n/nl.js +2 -2
  37. assets/js/i18n/pl.js +2 -2
  38. assets/js/i18n/pt-BR.js +2 -2
  39. assets/js/i18n/pt.js +2 -2
  40. assets/js/i18n/ro.js +2 -2
  41. assets/js/i18n/ru.js +2 -2
  42. assets/js/i18n/sk.js +2 -2
  43. assets/js/i18n/sr-Cyrl.js +2 -2
  44. assets/js/i18n/sr.js +2 -2
  45. assets/js/i18n/sv.js +2 -2
  46. assets/js/i18n/th.js +2 -2
  47. assets/js/i18n/tr.js +2 -2
  48. assets/js/i18n/uk.js +2 -2
  49. assets/js/i18n/vi.js +2 -2
  50. assets/js/i18n/zh-CN.js +2 -2
  51. assets/js/i18n/zh-TW.js +2 -2
  52. assets/js/select2.min.js +1 -1
  53. index.php +2 -2
  54. languages/wp-seo-structured-data-schema.pot +19 -15
  55. lib/classes/KcSeoHelper.php +537 -537
  56. lib/classes/KcSeoHooks.php +64 -68
  57. lib/classes/KcSeoInit.php +217 -214
  58. lib/classes/KcSeoMetaData.php +182 -182
  59. lib/classes/KcSeoOffer.php +98 -0
  60. lib/classes/KcSeoOutput.php +219 -219
  61. lib/functions/KcSeoFunctions.php +20 -20
  62. lib/functions/KcSeoOptions.php +2120 -2120
  63. lib/init.php +147 -147
  64. lib/models/KcSeoSchemaModel.php +1185 -1185
  65. lib/views/schema-options.php +568 -568
  66. lib/views/settings.php +160 -160
  67. wp-seo-structured-data-schema.php +59 -67
README.txt CHANGED
@@ -1,215 +1,218 @@
1
- === WP SEO Structured Data Schema ===
2
- Contributors: kcseopro
3
- Donate link:
4
- Tags: seo, schema, structured data, rich snippets, microdata, json-ld, search engine optimization, local seo, google, sitelinks, schema.org, microformat, serp
5
- Requires at least: 4.5
6
- Tested up to: 5.8
7
- Stable tag: 2.7.0
8
- License: GPLv3
9
- License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
-
11
- Comprehensive JSON-LD based Structured Data solution for WordPress for adding schema for organizations, businesses, blog posts, ratings & more.
12
-
13
- == Description ==
14
-
15
- Structured data and schema are becoming more and more important for search engine optimization.
16
-
17
- The bad news is that this is pretty complicated stuff and even the most seasoned SEO specialists struggle with the proper implementation of structured data and schema on a website.
18
-
19
- The good news is that we have created the WordPress SEO Structured Data Schema plugin which enables web designers and business owners a super-easy way to add schema for:
20
-
21
- * Organizations
22
- * Local Businesses
23
- * News Articles
24
- * Blog Postings
25
- * Events
26
- * Products
27
- * Videos
28
- * Audios
29
- * About
30
- * Contact
31
- * Services
32
- * Reviews
33
- * Aggregate Ratings
34
- * Restaurants
35
- * Special Announcement
36
-
37
-
38
- = Pro Features =
39
- * Includes Auto-fill function <---Popular
40
- * Supports Custom Post Types beyond default page and posts
41
- * Supports WordPress Multisite
42
- * Supports more schema types:
43
- * Books
44
- * Courses
45
- * Job Postings
46
- * Movies
47
- * Music
48
- * Recipe
49
- * TV Episode
50
- * QAPages
51
- * ItemList
52
- * WooCommerce
53
- * Archive Schema (Collection Page)
54
-
55
- [Get Pro Version](https://wpsemplugins.com/downloads/wordpress-schema-plugin/)
56
-
57
- We created this plugin for our own websites and for our clients websites after trying dozens of free and premium schema and rich snippet plugins for WordPress. There are some great ones out there for specific kinds of content. There are also some plugins that try to automate schema markup without the ability to customize on a page-by-page level.
58
-
59
- We could not find an easy-to-use, comprehensive JSON-LD plugin that provided features that most business websites need, that also included a high level of manual tweaking.
60
-
61
- So we made our own and we get great results with it. And we strive to make these (the free and pro versions) the [best WordPress schema plugins](https://bloggerlocal.com/national/reviews/best-wordpress-schema-plugins) you can find, especially for bloggers, local businesses and ecommerce sites.
62
-
63
- = What is Structured Data & Schema? =
64
- Structured data adds context to your website content by way of using standardized search engine “vocabulary” at Schema.org. When implemented correctly, structured data increases the chances that search engines like Google will show additional information about your content directly in the search engine results pages (aka SERPs) via “rich snippets”. In other words, if you are searching for a WordPress rich snippet plugin, this may be the one you are looking for….
65
-
66
- = What is a Rich Snippet? =
67
- Rich snippets are the extra information that you often see right in the search results, such as:
68
-
69
- * Star ratings
70
- * Events and event times
71
- * Embedded site search box
72
- * Videos
73
- * Breadcrumbs
74
-
75
- In other words, rich snippets are the visible result of structured data that appears in the SERPs.
76
-
77
- = Does Structured Data Help With SEO? =
78
- Absolutely! There is no question that structured data that produces rich snippet “bling” that improves SERP click through rates (CTR). Virtually every search engine expert on the planet will tell you that organic click through rates are a major search engine optimization ranking factor. This, structured data has a very high correlation (ie indirect relationship) with search engine rankings.
79
-
80
- Proper structured data and schema markup on a website are also thought to increase a web page’s chances of triggering a “position zero” knowledge box or answer box at the verp top of the SERPs, and may even help improve your rankings in voice search.
81
-
82
- Is there a direct effect on SEO? Maybe. Recent communication from Google indicates that [structured data may become a direct ranking factor in the near future](https://searchengineland.com/google-may-add-structured-markup-data-to-ranking-algorithm-230402).
83
-
84
- = Is This a “One and Done: Plugin Installation? =
85
- No! The big difference with our WordPress schema plugin and some of the other ones out there is that our allows for a high degree of manual customization. There are some sitewide schema settings you can apply, but in general, you set schema up page-by-page, just as you do with many SEO plugins.
86
-
87
- Just like all things on the Internet, it’s garbage in, garbage out. Just installing this plugin will not do anything for your website unless you use it correctly, and properly and accurately configure the data.
88
-
89
- In other words, you should never add schema markup code the backside of your web page, if the data does not exist on the front.
90
-
91
- Please don’t use our plugin to spam Google or any other search engine.
92
-
93
- = Why JSON-LD? =
94
- In summary, there are three structured data formats:
95
-
96
- * **MicroData** (HTML based)
97
- * **RFDa** (HTML based)
98
- * **JSON-LD** (Java Script based)
99
-
100
- We used JSON-LD for many reasons. For one, JSON is less invasive from a coding standpoint. Second, Google can read JSON-LD data that is dynamically injected from Javascript code and embedded widgets. In layman’s terms, JSON is the latest and greatest…it’s where structured data is headed and in our opinion, it should be used to implement structured data on all WordPress websites.
101
- Read more about [JSON-LD](http://json-ld.org/).
102
-
103
- = We Follow Google Standards =
104
- This plugin is modeled and will be updated according to Google guidelines that you will find here:
105
- [https://developers.google.com/structured-data/](https://developers.google.com/structured-data/ )
106
-
107
- You can validate structured data on any web page here:
108
- [https://developers.google.com/structured-data/testing-tool/](https://developers.google.com/structured-data/testing-tool/)
109
- For more information on the plugin author visit:
110
-
111
- * [WP SEM Plugins](https://wpsemplugins.com/)
112
-
113
- == Installation ==
114
-
115
- 1. Unzip the downloaded 'wp-seo-structured-data-schema' zip file
116
- 2. Upload the 'wp-seo-structured-data-schema' folder and its contents into the 'wp-content/plugins/' directory of your WordPress installation
117
- 3. Activate 'wp-seo-structured-data-schema' from Plugins page
118
-
119
-
120
-
121
- == Frequently Asked Questions ==
122
-
123
- You'll find the [FAQ on WPSEMPlugins.com](https://wpsemplugins.com/wordpress-seo-structured-data-schema-plugin/).
124
-
125
- == Screenshots ==
126
-
127
- 01. Single page settings
128
- 02. Admin global settings
129
-
130
-
131
- == Changelog ==
132
-
133
- == 2.7.0 (Oct 28, 2021) =
134
- * Added: About Schema
135
- * Added: Contact Schema
136
- * Added: Audio Schema
137
- * Added: Audio and Video schema in Article, NewsArticle & BlogPosting Schema
138
- * Fixed: Some bug and warning type schema.
139
-
140
- == 2.6.17.2 =
141
- * Fix local business @id property
142
-
143
- == 2.6.17.1 =
144
- * Fix post save issue
145
-
146
- == 2.6.17 =
147
- * Update description issue at export
148
-
149
- == 2.6.16 =
150
- * Add WordPress 5.7 compatibility
151
-
152
- == 2.6.15 =
153
- * PHP Bug Fix
154
-
155
- == 2.6.14 =
156
- * Fix video embed URL issue
157
-
158
- == 2.6.13 =
159
- * New schema ( COVID 19 )
160
-
161
- == 2.6.12 =
162
- * Php bug fix
163
-
164
- == 2.6.11 =
165
- * Coding update
166
-
167
- == 2.6.10 =
168
- * Bug fix
169
-
170
- == 2.6.0 =
171
- * Update review Schema.
172
-
173
- == 2.5.9 =
174
- * Fix PHP error
175
-
176
- == 2.5.8 =
177
- * Fix Javascript issue
178
- * Update Contact Type
179
-
180
- == 2.5.7 =
181
- * Add Time for post
182
- * Event Start & End Time
183
- * Fix URL www issue.
184
- * Product Identifier for e-commerce
185
-
186
- == 2.5.6 =
187
- * Fix event
188
- * AMP support
189
- * Fix Spelling
190
-
191
- == 2.5.5 =
192
- * Add Site schema control
193
- * Fix Site schema search link
194
-
195
- == 2.5.4 =
196
- * Add a Hack
197
-
198
- == 2.5.3 =
199
- * Bug fixed
200
-
201
- == 2.5.2 =
202
- * Add Some pro feature list
203
- * Update compatibility with others plugin.
204
-
205
- == 2.5.1 =
206
- * A option for Turn off global schema
207
- * Full Translation support
208
-
209
- = 2.5 =
210
- * Lat/Log issue fix
211
- * Rating issue
212
- * Image issue
213
-
214
- = 2.4 =
215
- * Delete data when delete your plugin (Fixed)
 
 
 
1
+ === WP SEO Structured Data Schema ===
2
+ Contributors: kcseopro
3
+ Donate link:
4
+ Tags: seo, schema, structured data, rich snippets, microdata, json-ld, search engine optimization, local seo, google, sitelinks, schema.org, microformat, serp
5
+ Requires at least: 4.5
6
+ Tested up to: 5.8
7
+ Stable tag: 2.7.1
8
+ License: GPLv3
9
+ License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
+
11
+ Comprehensive JSON-LD based Structured Data solution for WordPress for adding schema for organizations, businesses, blog posts, ratings & more.
12
+
13
+ == Description ==
14
+
15
+ Structured data and schema are becoming more and more important for search engine optimization.
16
+
17
+ The bad news is that this is pretty complicated stuff and even the most seasoned SEO specialists struggle with the proper implementation of structured data and schema on a website.
18
+
19
+ The good news is that we have created the WordPress SEO Structured Data Schema plugin which enables web designers and business owners a super-easy way to add schema for:
20
+
21
+ * Organizations
22
+ * Local Businesses
23
+ * News Articles
24
+ * Blog Postings
25
+ * Events
26
+ * Products
27
+ * Videos
28
+ * Audios
29
+ * About
30
+ * Contact
31
+ * Services
32
+ * Reviews
33
+ * Aggregate Ratings
34
+ * Restaurants
35
+ * Special Announcement
36
+
37
+
38
+ = Pro Features =
39
+ * Includes Auto-fill function <---Popular
40
+ * Supports Custom Post Types beyond default page and posts
41
+ * Supports WordPress Multisite
42
+ * Supports more schema types:
43
+ * Books
44
+ * Courses
45
+ * Job Postings
46
+ * Movies
47
+ * Music
48
+ * Recipe
49
+ * TV Episode
50
+ * QAPages
51
+ * ItemList
52
+ * WooCommerce
53
+ * Archive Schema (Collection Page)
54
+
55
+ [Get Pro Version](https://wpsemplugins.com/downloads/wordpress-schema-plugin/)
56
+
57
+ We created this plugin for our own websites and for our clients websites after trying dozens of free and premium schema and rich snippet plugins for WordPress. There are some great ones out there for specific kinds of content. There are also some plugins that try to automate schema markup without the ability to customize on a page-by-page level.
58
+
59
+ We could not find an easy-to-use, comprehensive JSON-LD plugin that provided features that most business websites need, that also included a high level of manual tweaking.
60
+
61
+ So we made our own and we get great results with it. And we strive to make these (the free and pro versions) the [best WordPress schema plugins](https://bloggerlocal.com/national/reviews/best-wordpress-schema-plugins) you can find, especially for bloggers, local businesses and ecommerce sites.
62
+
63
+ = What is Structured Data & Schema? =
64
+ Structured data adds context to your website content by way of using standardized search engine “vocabulary” at Schema.org. When implemented correctly, structured data increases the chances that search engines like Google will show additional information about your content directly in the search engine results pages (aka SERPs) via “rich snippets”. In other words, if you are searching for a WordPress rich snippet plugin, this may be the one you are looking for….
65
+
66
+ = What is a Rich Snippet? =
67
+ Rich snippets are the extra information that you often see right in the search results, such as:
68
+
69
+ * Star ratings
70
+ * Events and event times
71
+ * Embedded site search box
72
+ * Videos
73
+ * Breadcrumbs
74
+
75
+ In other words, rich snippets are the visible result of structured data that appears in the SERPs.
76
+
77
+ = Does Structured Data Help With SEO? =
78
+ Absolutely! There is no question that structured data that produces rich snippet “bling” that improves SERP click through rates (CTR). Virtually every search engine expert on the planet will tell you that organic click through rates are a major search engine optimization ranking factor. This, structured data has a very high correlation (ie indirect relationship) with search engine rankings.
79
+
80
+ Proper structured data and schema markup on a website are also thought to increase a web page’s chances of triggering a “position zero” knowledge box or answer box at the verp top of the SERPs, and may even help improve your rankings in voice search.
81
+
82
+ Is there a direct effect on SEO? Maybe. Recent communication from Google indicates that [structured data may become a direct ranking factor in the near future](https://searchengineland.com/google-may-add-structured-markup-data-to-ranking-algorithm-230402).
83
+
84
+ = Is This a “One and Done: Plugin Installation? =
85
+ No! The big difference with our WordPress schema plugin and some of the other ones out there is that our allows for a high degree of manual customization. There are some sitewide schema settings you can apply, but in general, you set schema up page-by-page, just as you do with many SEO plugins.
86
+
87
+ Just like all things on the Internet, it’s garbage in, garbage out. Just installing this plugin will not do anything for your website unless you use it correctly, and properly and accurately configure the data.
88
+
89
+ In other words, you should never add schema markup code the backside of your web page, if the data does not exist on the front.
90
+
91
+ Please don’t use our plugin to spam Google or any other search engine.
92
+
93
+ = Why JSON-LD? =
94
+ In summary, there are three structured data formats:
95
+
96
+ * **MicroData** (HTML based)
97
+ * **RFDa** (HTML based)
98
+ * **JSON-LD** (Java Script based)
99
+
100
+ We used JSON-LD for many reasons. For one, JSON is less invasive from a coding standpoint. Second, Google can read JSON-LD data that is dynamically injected from Javascript code and embedded widgets. In layman’s terms, JSON is the latest and greatest…it’s where structured data is headed and in our opinion, it should be used to implement structured data on all WordPress websites.
101
+ Read more about [JSON-LD](http://json-ld.org/).
102
+
103
+ = We Follow Google Standards =
104
+ This plugin is modeled and will be updated according to Google guidelines that you will find here:
105
+ [https://developers.google.com/structured-data/](https://developers.google.com/structured-data/ )
106
+
107
+ You can validate structured data on any web page here:
108
+ [https://developers.google.com/structured-data/testing-tool/](https://developers.google.com/structured-data/testing-tool/)
109
+ For more information on the plugin author visit:
110
+
111
+ * [WP SEM Plugins](https://wpsemplugins.com/)
112
+
113
+ == Installation ==
114
+
115
+ 1. Unzip the downloaded 'wp-seo-structured-data-schema' zip file
116
+ 2. Upload the 'wp-seo-structured-data-schema' folder and its contents into the 'wp-content/plugins/' directory of your WordPress installation
117
+ 3. Activate 'wp-seo-structured-data-schema' from Plugins page
118
+
119
+
120
+
121
+ == Frequently Asked Questions ==
122
+
123
+ You'll find the [FAQ on WPSEMPlugins.com](https://wpsemplugins.com/wordpress-seo-structured-data-schema-plugin/).
124
+
125
+ == Screenshots ==
126
+
127
+ 01. Single page settings
128
+ 02. Admin global settings
129
+
130
+
131
+ == Changelog ==
132
+
133
+ == 2.7.1 (Nov 23, 2021) =
134
+ * Fixed: Some functional issue
135
+
136
+ == 2.7.0 (Oct 28, 2021) =
137
+ * Added: About Schema
138
+ * Added: Contact Schema
139
+ * Added: Audio Schema
140
+ * Added: Audio and Video schema in Article, NewsArticle & BlogPosting Schema
141
+ * Fixed: Some bug and warning type schema.
142
+
143
+ == 2.6.17.2 =
144
+ * Fix local business @id property
145
+
146
+ == 2.6.17.1 =
147
+ * Fix post save issue
148
+
149
+ == 2.6.17 =
150
+ * Update description issue at export
151
+
152
+ == 2.6.16 =
153
+ * Add WordPress 5.7 compatibility
154
+
155
+ == 2.6.15 =
156
+ * PHP Bug Fix
157
+
158
+ == 2.6.14 =
159
+ * Fix video embed URL issue
160
+
161
+ == 2.6.13 =
162
+ * New schema ( COVID 19 )
163
+
164
+ == 2.6.12 =
165
+ * Php bug fix
166
+
167
+ == 2.6.11 =
168
+ * Coding update
169
+
170
+ == 2.6.10 =
171
+ * Bug fix
172
+
173
+ == 2.6.0 =
174
+ * Update review Schema.
175
+
176
+ == 2.5.9 =
177
+ * Fix PHP error
178
+
179
+ == 2.5.8 =
180
+ * Fix Javascript issue
181
+ * Update Contact Type
182
+
183
+ == 2.5.7 =
184
+ * Add Time for post
185
+ * Event Start & End Time
186
+ * Fix URL www issue.
187
+ * Product Identifier for e-commerce
188
+
189
+ == 2.5.6 =
190
+ * Fix event
191
+ * AMP support
192
+ * Fix Spelling
193
+
194
+ == 2.5.5 =
195
+ * Add Site schema control
196
+ * Fix Site schema search link
197
+
198
+ == 2.5.4 =
199
+ * Add a Hack
200
+
201
+ == 2.5.3 =
202
+ * Bug fixed
203
+
204
+ == 2.5.2 =
205
+ * Add Some pro feature list
206
+ * Update compatibility with others plugin.
207
+
208
+ == 2.5.1 =
209
+ * A option for Turn off global schema
210
+ * Full Translation support
211
+
212
+ = 2.5 =
213
+ * Lat/Log issue fix
214
+ * Rating issue
215
+ * Image issue
216
+
217
+ = 2.4 =
218
+ * Delete data when delete your plugin (Fixed)
assets/css/admin.css CHANGED
@@ -1,463 +1,463 @@
1
- .kcseo-pro-feature {
2
- min-height: 100px;
3
- display: flex;
4
- align-items: center;
5
- justify-content: center;
6
- color: red;
7
- font-weight: bold;
8
- }
9
-
10
- .kcseo-pro-label {
11
- display: inline-block;
12
- margin: 5px;
13
- padding: 0 5px;
14
- text-transform: uppercase;
15
- background: red;
16
- color: #ffffff;
17
- font-size: 10px;
18
- font-weight: bold;
19
- border-radius: 4px;
20
- }
21
-
22
- .kcseo-pro-link {
23
- display: inline-block;
24
- margin: 5px;
25
- color: red;
26
- text-decoration: underline;
27
- font-weight: bold;
28
- font-style: italic;
29
- }
30
-
31
- #kcseo-wordpres-seo-structured-data-schema-meta-box .hndle a {
32
- font-size: inherit;
33
- }
34
-
35
- #kcseo-settings * {
36
- box-sizing: border-box;
37
- }
38
-
39
- #kcseo-settings:after {
40
- clear: both;
41
- content: "";
42
- display: block;
43
- }
44
-
45
- #kcseo-settings #kcseo-options {
46
- float: left;
47
- width: 60%;
48
- max-width: 800px;
49
- }
50
-
51
- #kcseo-settings .kc-get-pro {
52
- float: right;
53
- width: 35%;
54
- max-width: 300px;
55
- }
56
-
57
- .kc-get-pro {
58
- padding: 10px;
59
- background: #5c842e;
60
- max-width: 550px;
61
- color: #fff;
62
- }
63
-
64
- .kc-get-pro a.button {
65
- background: #2d5181;
66
- border-color: #2d5161;
67
- box-shadow: inset 0 2px 0 #2d5161;
68
-
69
- }
70
-
71
- .kc-get-pro a.button:hover {
72
- background: #375e81;
73
- border-color: #375e61;
74
- box-shadow: inset 0 2px 0 #375e61;
75
- }
76
-
77
- .kc-pro-action {
78
- text-align: center;
79
- margin: 10px 0;
80
- }
81
-
82
- .kc-get-pro h3 {
83
- margin-top: 10px;
84
- color: #fff;
85
- border-bottom: 1px solid #ccc;
86
- text-align: center;
87
- padding-bottom: 10px;
88
- }
89
-
90
- .kSeo-hidden {
91
- display: none;
92
- }
93
-
94
- .wseo_loading {
95
- background: url('../images/loading.gif') no-repeat center center;
96
- padding: 11px;
97
- }
98
-
99
- .field-container {
100
- margin-bottom: 15px;
101
- }
102
-
103
- .field-container:after {
104
- display: block;
105
- content: "";
106
- clear: both;
107
- }
108
-
109
- .field-container label {
110
- float: left;
111
- width: 25%;
112
- font-weight: bold;
113
- }
114
-
115
- .field-container .field-content {
116
- width: 75%;
117
- float: right;
118
- }
119
-
120
- .rt-tab-container .field-container input {
121
- width: 100%;
122
- }
123
-
124
- .rt-tab-container .field-container input, .rt-tab-container .field-container textarea, #kcseo-settings input.regular-text {
125
- border-radius: 4px;
126
- padding: 5px;
127
- }
128
-
129
- .rt-tab-container .field-container textarea {
130
- width: 100%;
131
- min-height: 80px;
132
- }
133
-
134
- .rt-tab-container .field-container input[type=number] {
135
- width: 100px;
136
- }
137
-
138
- .rt-tab-container .field-container input.kcseo-date {
139
- width: auto;
140
- min-width: 180px;
141
- }
142
-
143
- /* tab */
144
- .rt-tab-container {
145
- background: #fff;
146
- margin: 25px 0;
147
- max-width: 1200px;
148
- }
149
-
150
- .rt-tab-container:after {
151
- clear: both;
152
- content: "";
153
- display: block;
154
- }
155
-
156
- .rt-tab-container .rt-tab-nav {
157
- float: left;
158
- width: 14%;
159
- }
160
-
161
- ul.rt-tab-nav {
162
- clear: both;
163
- margin-top: 0;
164
- padding: 0;
165
- display: inline-block;
166
- width: 100%;
167
- margin-bottom: -4px;
168
- }
169
-
170
- ul.rt-tab-nav li {
171
- background: none repeat scroll 0 0 rgb(230, 230, 230);
172
- cursor: pointer;
173
- display: block;
174
- margin: 0;
175
- }
176
-
177
- ul.rt-tab-nav li:focus {
178
- outline: none;
179
- }
180
-
181
- ul.rt-tab-nav li.active a, ul.rt-tab-nav li a:hover {
182
- background: #5c842e;
183
- }
184
-
185
- ul.rt-tab-nav li.active a:after, ul.rt-tab-nav li a:hover:after {
186
- width: 0;
187
- height: 0;
188
- position: absolute;
189
- bottom: 0;
190
- top: 0;
191
- right: -7px;
192
- text-align: center;
193
- margin: auto;
194
- content: "";
195
- border-top: 10px solid transparent;
196
- border-bottom: 10px solid transparent;
197
- border-left: 8px solid #5c842e;
198
- }
199
-
200
- ul.rt-tab-nav li a {
201
- text-decoration: none;
202
- display: block;
203
- padding: 8px 10px;
204
- border-right: 1px solid;
205
- background: #2d5181;
206
- color: #fff;
207
- position: relative;
208
- box-sizing: border-box;
209
- }
210
-
211
- ul.rt-tab-nav li a:focus {
212
- -webkit-box-shadow: none;
213
- box-shadow: none;
214
- }
215
-
216
- .rt-tab-container .rt-tab-content {
217
- float: right;
218
- width: 86%;
219
- box-sizing: border-box;
220
- border: 1px solid #e7e7e7;
221
- padding: 20px;
222
- }
223
-
224
- .rt-tab-container .rt-tab-content:not(.active) {
225
- display: none;
226
- }
227
-
228
- div#rt-schema-tab-holder:after {
229
- clear: both;
230
- content: ".";
231
- height: 0;
232
- visibility: hidden;
233
- display: block;
234
- }
235
-
236
- div#meta-tab-holder:after {
237
- clear: both;
238
- content: ".";
239
- height: 0;
240
- visibility: hidden;
241
- display: block;
242
- }
243
-
244
- /* from */
245
- .form-table th {
246
- padding: 5px 10px 5px 0;
247
- }
248
-
249
- .form-table tr.person {
250
- display: none;
251
- }
252
-
253
- .sfield span.select2 {
254
- margin-right: 10px;
255
- }
256
-
257
- .sfield {
258
- margin-bottom: 10px;
259
- }
260
-
261
- .sfield input {
262
- min-width: 350px;
263
- }
264
-
265
- span.dashicons.dashicons-trash.social-remove {
266
- color: red;
267
- margin: 0 5px;
268
- cursor: pointer;
269
- }
270
-
271
- div#response {
272
- padding: 10px;
273
- font-size: 15px;
274
- }
275
-
276
- select#area_served {
277
- min-width: 300px;
278
- }
279
-
280
- .form-table td {
281
- padding: 5px 10px;
282
- vert-align: top !important;
283
- }
284
-
285
- p.description.kco-telephone > span {
286
- display: block;
287
- color: red;
288
- }
289
-
290
- .field-container .field-label span {
291
- margin-left: 5px;
292
- }
293
-
294
- p.description .required,
295
- .field-container .field-label span.required {
296
- color: red;
297
- }
298
-
299
- .field-container .field-label span.recommended {
300
- color: #721c24;
301
- }
302
-
303
- /* tooltip */
304
-
305
- [data-kcseo-tooltip] {
306
- position: relative;
307
- }
308
-
309
- [data-kcseo-tooltip]:hover::after {
310
- position: absolute;
311
- left: 50%;
312
- bottom: 100%;
313
- content: attr(data-kcseo-tooltip);
314
- background: rgba(0, 0, 0, .8);
315
- color: #fff;
316
- padding: .5em 1em;
317
- border-radius: 7px;
318
- transform: translateX(-50%);
319
- transition: all ease-in-out 250ms;
320
- }
321
-
322
- /* heading container */
323
- .field-container.kcseo-heading-container {
324
- margin-bottom: 25px;
325
- }
326
-
327
- .kcseo-section-title-wrap {
328
- border-bottom: 1px dashed #888;
329
- padding-bottom: 5px;
330
- }
331
-
332
- .kcseo-section-title-wrap h5 {
333
- font-size: 16px;
334
- padding: 0;
335
- margin: 0 0 5px;
336
- }
337
-
338
- /* End heading container */
339
- /* ============== 2nd Level START ============== */
340
- .kcseo-group-item {
341
- padding: 20px;
342
- border: 1px dashed #777;
343
- }
344
-
345
- .kc-multiple-schema-tool {
346
- padding: 5px;
347
- text-align: right;
348
- margin-bottom: 15px;
349
- }
350
-
351
- .kcseo-group-item .kc-top-toolbar {
352
- text-align: right;
353
- }
354
-
355
- span.kc-remove-schema,
356
- span.kcseo-remove-group {
357
- cursor: pointer;
358
- color: red;
359
- font-weight: bold;
360
- }
361
-
362
- .kc-btn-danger {
363
- background: red;
364
- border-color: red;
365
- color: #ffffff;
366
- }
367
-
368
- .multiple-schema-item {
369
- border: 2px solid #9ce646;
370
- padding: 10px 20px;
371
- margin-bottom: 25px;
372
- }
373
-
374
- /* ============== 2nd END ================ */
375
- .schema-holder .ui-tabs .ui-tabs-nav .ui-tabs-anchor {
376
- padding: .5em 0.6em;
377
- font-size: 14px;
378
- }
379
-
380
- .side-tip span, .schema-tips span {
381
- font-weight: bold;
382
- }
383
-
384
- .side-tip a, .schema-tips p a {
385
- display: block;
386
- }
387
-
388
- .schema-tips {
389
- margin-bottom: 20px;
390
- }
391
-
392
- .with-tooltip {
393
- position: relative;
394
- max-width: 460px;
395
- }
396
-
397
- .schema-tooltip-holder {
398
- position: absolute;
399
- top: 0;
400
- right: 0;
401
- }
402
-
403
- .schema-tooltip-holder .hidden {
404
- display: none;
405
- }
406
-
407
- .schema-tooltip {
408
- width: 16px;
409
- height: 16px;
410
- display: inline-block;
411
- background: url("../images/help.png") no-repeat center;
412
- }
413
-
414
- .select2-results__option[aria-selected=true] {
415
- background: #f3f3f3;
416
- }
417
-
418
- /* hidden */
419
- .rt-tab-container .field-container .kSeo-checkbox-wrapper input {
420
- width: auto;
421
- }
422
-
423
- .all-type-data {
424
- display: none;
425
- }
426
-
427
- .kSeo-image-wrapper {
428
- display: inline-block;
429
- position: relative;
430
- }
431
-
432
- span.kSeoImgAdd, span.kSeoImgRemove {
433
- position: absolute;
434
- top: -8px;
435
- cursor: pointer;
436
- }
437
-
438
- span.kSeoImgAdd {
439
- left: -8px;
440
- color: green;
441
- }
442
-
443
- span.kSeoImgRemove {
444
- right: -8px;
445
- color: red;
446
- }
447
-
448
- .kSeo-image-preview {
449
- min-width: 140px;
450
- min-height: 80px;
451
- background: rgba(176, 176, 176, 0.72);
452
- padding: 5px;
453
- text-align: center;
454
- }
455
-
456
- .kSeo-image-preview img {
457
- display: block;
458
- }
459
-
460
- .image-info span {
461
- display: block;
462
- margin-top: 5px;
463
  }
1
+ .kcseo-pro-feature {
2
+ min-height: 100px;
3
+ display: flex;
4
+ align-items: center;
5
+ justify-content: center;
6
+ color: red;
7
+ font-weight: bold;
8
+ }
9
+
10
+ .kcseo-pro-label {
11
+ display: inline-block;
12
+ margin: 5px;
13
+ padding: 0 5px;
14
+ text-transform: uppercase;
15
+ background: red;
16
+ color: #ffffff;
17
+ font-size: 10px;
18
+ font-weight: bold;
19
+ border-radius: 4px;
20
+ }
21
+
22
+ .kcseo-pro-link {
23
+ display: inline-block;
24
+ margin: 5px;
25
+ color: red;
26
+ text-decoration: underline;
27
+ font-weight: bold;
28
+ font-style: italic;
29
+ }
30
+
31
+ #kcseo-wordpres-seo-structured-data-schema-meta-box .hndle a {
32
+ font-size: inherit;
33
+ }
34
+
35
+ #kcseo-settings * {
36
+ box-sizing: border-box;
37
+ }
38
+
39
+ #kcseo-settings:after {
40
+ clear: both;
41
+ content: "";
42
+ display: block;
43
+ }
44
+
45
+ #kcseo-settings #kcseo-options {
46
+ float: left;
47
+ width: 60%;
48
+ max-width: 800px;
49
+ }
50
+
51
+ #kcseo-settings .kc-get-pro {
52
+ float: right;
53
+ width: 35%;
54
+ max-width: 300px;
55
+ }
56
+
57
+ .kc-get-pro {
58
+ padding: 10px;
59
+ background: #5c842e;
60
+ max-width: 550px;
61
+ color: #fff;
62
+ }
63
+
64
+ .kc-get-pro a.button {
65
+ background: #2d5181;
66
+ border-color: #2d5161;
67
+ box-shadow: inset 0 2px 0 #2d5161;
68
+
69
+ }
70
+
71
+ .kc-get-pro a.button:hover {
72
+ background: #375e81;
73
+ border-color: #375e61;
74
+ box-shadow: inset 0 2px 0 #375e61;
75
+ }
76
+
77
+ .kc-pro-action {
78
+ text-align: center;
79
+ margin: 10px 0;
80
+ }
81
+
82
+ .kc-get-pro h3 {
83
+ margin-top: 10px;
84
+ color: #fff;
85
+ border-bottom: 1px solid #ccc;
86
+ text-align: center;
87
+ padding-bottom: 10px;
88
+ }
89
+
90
+ .kSeo-hidden {
91
+ display: none;
92
+ }
93
+
94
+ .wseo_loading {
95
+ background: url('../images/loading.gif') no-repeat center center;
96
+ padding: 11px;
97
+ }
98
+
99
+ .field-container {
100
+ margin-bottom: 15px;
101
+ }
102
+
103
+ .field-container:after {
104
+ display: block;
105
+ content: "";
106
+ clear: both;
107
+ }
108
+
109
+ .field-container label {
110
+ float: left;
111
+ width: 25%;
112
+ font-weight: bold;
113
+ }
114
+
115
+ .field-container .field-content {
116
+ width: 75%;
117
+ float: right;
118
+ }
119
+
120
+ .rt-tab-container .field-container input {
121
+ width: 100%;
122
+ }
123
+
124
+ .rt-tab-container .field-container input, .rt-tab-container .field-container textarea, #kcseo-settings input.regular-text {
125
+ border-radius: 4px;
126
+ padding: 5px;
127
+ }
128
+
129
+ .rt-tab-container .field-container textarea {
130
+ width: 100%;
131
+ min-height: 80px;
132
+ }
133
+
134
+ .rt-tab-container .field-container input[type=number] {
135
+ width: 100px;
136
+ }
137
+
138
+ .rt-tab-container .field-container input.kcseo-date {
139
+ width: auto;
140
+ min-width: 180px;
141
+ }
142
+
143
+ /* tab */
144
+ .rt-tab-container {
145
+ background: #fff;
146
+ margin: 25px 0;
147
+ max-width: 1200px;
148
+ }
149
+
150
+ .rt-tab-container:after {
151
+ clear: both;
152
+ content: "";
153
+ display: block;
154
+ }
155
+
156
+ .rt-tab-container .rt-tab-nav {
157
+ float: left;
158
+ width: 14%;
159
+ }
160
+
161
+ ul.rt-tab-nav {
162
+ clear: both;
163
+ margin-top: 0;
164
+ padding: 0;
165
+ display: inline-block;
166
+ width: 100%;
167
+ margin-bottom: -4px;
168
+ }
169
+
170
+ ul.rt-tab-nav li {
171
+ background: none repeat scroll 0 0 rgb(230, 230, 230);
172
+ cursor: pointer;
173
+ display: block;
174
+ margin: 0;
175
+ }
176
+
177
+ ul.rt-tab-nav li:focus {
178
+ outline: none;
179
+ }
180
+
181
+ ul.rt-tab-nav li.active a, ul.rt-tab-nav li a:hover {
182
+ background: #5c842e;
183
+ }
184
+
185
+ ul.rt-tab-nav li.active a:after, ul.rt-tab-nav li a:hover:after {
186
+ width: 0;
187
+ height: 0;
188
+ position: absolute;
189
+ bottom: 0;
190
+ top: 0;
191
+ right: -7px;
192
+ text-align: center;
193
+ margin: auto;
194
+ content: "";
195
+ border-top: 10px solid transparent;
196
+ border-bottom: 10px solid transparent;
197
+ border-left: 8px solid #5c842e;
198
+ }
199
+
200
+ ul.rt-tab-nav li a {
201
+ text-decoration: none;
202
+ display: block;
203
+ padding: 8px 10px;
204
+ border-right: 1px solid;
205
+ background: #2d5181;
206
+ color: #fff;
207
+ position: relative;
208
+ box-sizing: border-box;
209
+ }
210
+
211
+ ul.rt-tab-nav li a:focus {
212
+ -webkit-box-shadow: none;
213
+ box-shadow: none;
214
+ }
215
+
216
+ .rt-tab-container .rt-tab-content {
217
+ float: right;
218
+ width: 86%;
219
+ box-sizing: border-box;
220
+ border: 1px solid #e7e7e7;
221
+ padding: 20px;
222
+ }
223
+
224
+ .rt-tab-container .rt-tab-content:not(.active) {
225
+ display: none;
226
+ }
227
+
228
+ div#rt-schema-tab-holder:after {
229
+ clear: both;
230
+ content: ".";
231
+ height: 0;
232
+ visibility: hidden;
233
+ display: block;
234
+ }
235
+
236
+ div#meta-tab-holder:after {
237
+ clear: both;
238
+ content: ".";
239
+ height: 0;
240
+ visibility: hidden;
241
+ display: block;
242
+ }
243
+
244
+ /* from */
245
+ .form-table th {
246
+ padding: 5px 10px 5px 0;
247
+ }
248
+
249
+ .form-table tr.person {
250
+ display: none;
251
+ }
252
+
253
+ .sfield span.select2 {
254
+ margin-right: 10px;
255
+ }
256
+
257
+ .sfield {
258
+ margin-bottom: 10px;
259
+ }
260
+
261
+ .sfield input {
262
+ min-width: 350px;
263
+ }
264
+
265
+ span.dashicons.dashicons-trash.social-remove {
266
+ color: red;
267
+ margin: 0 5px;
268
+ cursor: pointer;
269
+ }
270
+
271
+ div#response {
272
+ padding: 10px;
273
+ font-size: 15px;
274
+ }
275
+
276
+ select#area_served {
277
+ min-width: 300px;
278
+ }
279
+
280
+ .form-table td {
281
+ padding: 5px 10px;
282
+ vert-align: top !important;
283
+ }
284
+
285
+ p.description.kco-telephone > span {
286
+ display: block;
287
+ color: red;
288
+ }
289
+
290
+ .field-container .field-label span {
291
+ margin-left: 5px;
292
+ }
293
+
294
+ p.description .required,
295
+ .field-container .field-label span.required {
296
+ color: red;
297
+ }
298
+
299
+ .field-container .field-label span.recommended {
300
+ color: #721c24;
301
+ }
302
+
303
+ /* tooltip */
304
+
305
+ [data-kcseo-tooltip] {
306
+ position: relative;
307
+ }
308
+
309
+ [data-kcseo-tooltip]:hover::after {
310
+ position: absolute;
311
+ left: 50%;
312
+ bottom: 100%;
313
+ content: attr(data-kcseo-tooltip);
314
+ background: rgba(0, 0, 0, .8);
315
+ color: #fff;
316
+ padding: .5em 1em;
317
+ border-radius: 7px;
318
+ transform: translateX(-50%);
319
+ transition: all ease-in-out 250ms;
320
+ }
321
+
322
+ /* heading container */
323
+ .field-container.kcseo-heading-container {
324
+ margin-bottom: 25px;
325
+ }
326
+
327
+ .kcseo-section-title-wrap {
328
+ border-bottom: 1px dashed #888;
329
+ padding-bottom: 5px;
330
+ }
331
+
332
+ .kcseo-section-title-wrap h5 {
333
+ font-size: 16px;
334
+ padding: 0;
335
+ margin: 0 0 5px;
336
+ }
337
+
338
+ /* End heading container */
339
+ /* ============== 2nd Level START ============== */
340
+ .kcseo-group-item {
341
+ padding: 20px;
342
+ border: 1px dashed #777;
343
+ }
344
+
345
+ .kc-multiple-schema-tool {
346
+ padding: 5px;
347
+ text-align: right;
348
+ margin-bottom: 15px;
349
+ }
350
+
351
+ .kcseo-group-item .kc-top-toolbar {
352
+ text-align: right;
353
+ }
354
+
355
+ span.kc-remove-schema,
356
+ span.kcseo-remove-group {
357
+ cursor: pointer;
358
+ color: red;
359
+ font-weight: bold;
360
+ }
361
+
362
+ .kc-btn-danger {
363
+ background: red;
364
+ border-color: red;
365
+ color: #ffffff;
366
+ }
367
+
368
+ .multiple-schema-item {
369
+ border: 2px solid #9ce646;
370
+ padding: 10px 20px;
371
+ margin-bottom: 25px;
372
+ }
373
+
374
+ /* ============== 2nd END ================ */
375
+ .schema-holder .ui-tabs .ui-tabs-nav .ui-tabs-anchor {
376
+ padding: .5em 0.6em;
377
+ font-size: 14px;
378
+ }
379
+
380
+ .side-tip span, .schema-tips span {
381
+ font-weight: bold;
382
+ }
383
+
384
+ .side-tip a, .schema-tips p a {
385
+ display: block;
386
+ }
387
+
388
+ .schema-tips {
389
+ margin-bottom: 20px;
390
+ }
391
+
392
+ .with-tooltip {
393
+ position: relative;
394
+ max-width: 460px;
395
+ }
396
+
397
+ .schema-tooltip-holder {
398
+ position: absolute;
399
+ top: 0;
400
+ right: 0;
401
+ }
402
+
403
+ .schema-tooltip-holder .hidden {
404
+ display: none;
405
+ }
406
+
407
+ .schema-tooltip {
408
+ width: 16px;
409
+ height: 16px;
410
+ display: inline-block;
411
+ background: url("../images/help.png") no-repeat center;
412
+ }
413
+
414
+ .select2-results__option[aria-selected=true] {
415
+ background: #f3f3f3;
416
+ }
417
+
418
+ /* hidden */
419
+ .rt-tab-container .field-container .kSeo-checkbox-wrapper input {
420
+ width: auto;
421
+ }
422
+
423
+ .all-type-data {
424
+ display: none;
425
+ }
426
+
427
+ .kSeo-image-wrapper {
428
+ display: inline-block;
429
+ position: relative;
430
+ }
431
+
432
+ span.kSeoImgAdd, span.kSeoImgRemove {
433
+ position: absolute;
434
+ top: -8px;
435
+ cursor: pointer;
436
+ }
437
+
438
+ span.kSeoImgAdd {
439
+ left: -8px;
440
+ color: green;
441
+ }
442
+
443
+ span.kSeoImgRemove {
444
+ right: -8px;
445
+ color: red;
446
+ }
447
+
448
+ .kSeo-image-preview {
449
+ min-width: 140px;
450
+ min-height: 80px;
451
+ background: rgba(176, 176, 176, 0.72);
452
+ padding: 5px;
453
+ text-align: center;
454
+ }
455
+
456
+ .kSeo-image-preview img {
457
+ display: block;
458
+ }
459
+
460
+ .image-info span {
461
+ display: block;
462
+ margin-top: 5px;
463
  }
assets/css/jquery.qtip.css CHANGED
@@ -1,617 +1,617 @@
1
- /*
2
- * qTip2 - Pretty powerful tooltips - v2.2.1
3
- * http://qtip2.com
4
- *
5
- * Copyright (c) 2014
6
- * Released under the MIT licenses
7
- * http://jquery.org/license
8
- *
9
- * Date: Sat Sep 6 2014 06:25 EDT-0400
10
- * Plugins: tips viewport imagemap svg modal ie6
11
- * Styles: core basic css3
12
- */
13
- .qtip{
14
- position: absolute;
15
- left: -28000px;
16
- top: -28000px;
17
- display: none;
18
-
19
- max-width: 280px;
20
- min-width: 50px;
21
-
22
- font-size: 10.5px;
23
- line-height: 12px;
24
-
25
- direction: ltr;
26
-
27
- box-shadow: none;
28
- padding: 0;
29
- }
30
-
31
- .qtip-content{
32
- position: relative;
33
- padding: 5px 9px;
34
- overflow: hidden;
35
-
36
- text-align: left;
37
- word-wrap: break-word;
38
- }
39
-
40
- .qtip-titlebar{
41
- position: relative;
42
- padding: 5px 35px 5px 10px;
43
- overflow: hidden;
44
-
45
- border-width: 0 0 1px;
46
- font-weight: bold;
47
- }
48
-
49
- .qtip-titlebar + .qtip-content{ border-top-width: 0 !important; }
50
-
51
- /* Default close button class */
52
- .qtip-close{
53
- position: absolute;
54
- right: -9px; top: -9px;
55
- z-index: 11; /* Overlap .qtip-tip */
56
-
57
- cursor: pointer;
58
- outline: medium none;
59
-
60
- border: 1px solid transparent;
61
- }
62
-
63
- .qtip-titlebar .qtip-close{
64
- right: 4px; top: 50%;
65
- margin-top: -9px;
66
- }
67
-
68
- * html .qtip-titlebar .qtip-close{ top: 16px; } /* IE fix */
69
-
70
- .qtip-titlebar .ui-icon,
71
- .qtip-icon .ui-icon{
72
- display: block;
73
- text-indent: -1000em;
74
- direction: ltr;
75
- }
76
-
77
- .qtip-icon, .qtip-icon .ui-icon{
78
- -moz-border-radius: 3px;
79
- -webkit-border-radius: 3px;
80
- border-radius: 3px;
81
- text-decoration: none;
82
- }
83
-
84
- .qtip-icon .ui-icon{
85
- width: 18px;
86
- height: 14px;
87
-
88
- line-height: 14px;
89
- text-align: center;
90
- text-indent: 0;
91
- font: normal bold 10px/13px Tahoma,sans-serif;
92
-
93
- color: inherit;
94
- background: transparent none no-repeat -100em -100em;
95
- }
96
-
97
- /* Applied to 'focused' tooltips e.g. most recently displayed/interacted with */
98
- .qtip-focus{}
99
-
100
- /* Applied on hover of tooltips i.e. added/removed on mouseenter/mouseleave respectively */
101
- .qtip-hover{}
102
-
103
- /* Default tooltip style */
104
- .qtip-default{
105
- border: 1px solid #F1D031;
106
-
107
- background-color: #FFFFA3;
108
- color: #555;
109
- }
110
-
111
- .qtip-default .qtip-titlebar{
112
- background-color: #FFEF93;
113
- }
114
-
115
- .qtip-default .qtip-icon{
116
- border-color: #CCC;
117
- background: #F1F1F1;
118
- color: #777;
119
- }
120
-
121
- .qtip-default .qtip-titlebar .qtip-close{
122
- border-color: #AAA;
123
- color: #111;
124
- }
125
-
126
-
127
- /*! Light tooltip style */
128
- .qtip-light{
129
- background-color: white;
130
- border-color: #E2E2E2;
131
- color: #454545;
132
- }
133
-
134
- .qtip-light .qtip-titlebar{
135
- background-color: #f1f1f1;
136
- }
137
-
138
-
139
- /*! Dark tooltip style */
140
- .qtip-dark{
141
- background-color: #505050;
142
- border-color: #303030;
143
- color: #f3f3f3;
144
- }
145
-
146
- .qtip-dark .qtip-titlebar{
147
- background-color: #404040;
148
- }
149
-
150
- .qtip-dark .qtip-icon{
151
- border-color: #444;
152
- }
153
-
154
- .qtip-dark .qtip-titlebar .ui-state-hover{
155
- border-color: #303030;
156
- }
157
-
158
-
159
- /*! Cream tooltip style */
160
- .qtip-cream{
161
- background-color: #FBF7AA;
162
- border-color: #F9E98E;
163
- color: #A27D35;
164
- }
165
-
166
- .qtip-cream .qtip-titlebar{
167
- background-color: #F0DE7D;
168
- }
169
-
170
- .qtip-cream .qtip-close .qtip-icon{
171
- background-position: -82px 0;
172
- }
173
-
174
-
175
- /*! Red tooltip style */
176
- .qtip-red{
177
- background-color: #F78B83;
178
- border-color: #D95252;
179
- color: #912323;
180
- }
181
-
182
- .qtip-red .qtip-titlebar{
183
- background-color: #F06D65;
184
- }
185
-
186
- .qtip-red .qtip-close .qtip-icon{
187
- background-position: -102px 0;
188
- }
189
-
190
- .qtip-red .qtip-icon{
191
- border-color: #D95252;
192
- }
193
-
194
- .qtip-red .qtip-titlebar .ui-state-hover{
195
- border-color: #D95252;
196
- }
197
-
198
-
199
- /*! Green tooltip style */
200
- .qtip-green{
201
- background-color: #CAED9E;
202
- border-color: #90D93F;
203
- color: #3F6219;
204
- }
205
-
206
- .qtip-green .qtip-titlebar{
207
- background-color: #B0DE78;
208
- }
209
-
210
- .qtip-green .qtip-close .qtip-icon{
211
- background-position: -42px 0;
212
- }
213
-
214
-
215
- /*! Blue tooltip style */
216
- .qtip-blue{
217
- background-color: #E5F6FE;
218
- border-color: #ADD9ED;
219
- color: #5E99BD;
220
- }
221
-
222
- .qtip-blue .qtip-titlebar{
223
- background-color: #D0E9F5;
224
- }
225
-
226
- .qtip-blue .qtip-close .qtip-icon{
227
- background-position: -2px 0;
228
- }
229
-
230
-
231
- .qtip-shadow{
232
- -webkit-box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.15);
233
- -moz-box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.15);
234
- box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.15);
235
- }
236
-
237
- /* Add rounded corners to your tooltips in: FF3+, Chrome 2+, Opera 10.6+, IE9+, Safari 2+ */
238
- .qtip-rounded,
239
- .qtip-tipsy,
240
- .qtip-bootstrap{
241
- -moz-border-radius: 5px;
242
- -webkit-border-radius: 5px;
243
- border-radius: 5px;
244
- }
245
-
246
- .qtip-rounded .qtip-titlebar{
247
- -moz-border-radius: 4px 4px 0 0;
248
- -webkit-border-radius: 4px 4px 0 0;
249
- border-radius: 4px 4px 0 0;
250
- }
251
-
252
- /* Youtube tooltip style */
253
- .qtip-youtube{
254
- -moz-border-radius: 2px;
255
- -webkit-border-radius: 2px;
256
- border-radius: 2px;
257
-
258
- -webkit-box-shadow: 0 0 3px #333;
259
- -moz-box-shadow: 0 0 3px #333;
260
- box-shadow: 0 0 3px #333;
261
-
262
- color: white;
263
- border: 0 solid transparent;
264
-
265
- background: #4A4A4A;
266
- background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0,#4A4A4A),color-stop(100%,black));
267
- background-image: -webkit-linear-gradient(top,#4A4A4A 0,black 100%);
268
- background-image: -moz-linear-gradient(top,#4A4A4A 0,black 100%);
269
- background-image: -ms-linear-gradient(top,#4A4A4A 0,black 100%);
270
- background-image: -o-linear-gradient(top,#4A4A4A 0,black 100%);
271
- }
272
-
273
- .qtip-youtube .qtip-titlebar{
274
- background-color: #4A4A4A;
275
- background-color: rgba(0,0,0,0);
276
- }
277
-
278
- .qtip-youtube .qtip-content{
279
- padding: .75em;
280
- font: 12px arial,sans-serif;
281
-
282
- filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#4a4a4a,EndColorStr=#000000);
283
- -ms-filter: "progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#4a4a4a,EndColorStr=#000000);";
284
- }
285
-
286
- .qtip-youtube .qtip-icon{
287
- border-color: #222;
288
- }
289
-
290
- .qtip-youtube .qtip-titlebar .ui-state-hover{
291
- border-color: #303030;
292
- }
293
-
294
-
295
- /* jQuery TOOLS Tooltip style */
296
- .qtip-jtools{
297
- background: #232323;
298
- background: rgba(0, 0, 0, 0.7);
299
- background-image: -webkit-gradient(linear, left top, left bottom, from(#717171), to(#232323));
300
- background-image: -moz-linear-gradient(top, #717171, #232323);
301
- background-image: -webkit-linear-gradient(top, #717171, #232323);
302
- background-image: -ms-linear-gradient(top, #717171, #232323);
303
- background-image: -o-linear-gradient(top, #717171, #232323);
304
-
305
- border: 2px solid #ddd;
306
- border: 2px solid rgba(241,241,241,1);
307
-
308
- -moz-border-radius: 2px;
309
- -webkit-border-radius: 2px;
310
- border-radius: 2px;
311
-
312
- -webkit-box-shadow: 0 0 12px #333;
313
- -moz-box-shadow: 0 0 12px #333;
314
- box-shadow: 0 0 12px #333;
315
- }
316
-
317
- /* IE Specific */
318
- .qtip-jtools .qtip-titlebar{
319
- background-color: transparent;
320
- filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#717171,endColorstr=#4A4A4A);
321
- -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#717171,endColorstr=#4A4A4A)";
322
- }
323
- .qtip-jtools .qtip-content{
324
- filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4A4A4A,endColorstr=#232323);
325
- -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#4A4A4A,endColorstr=#232323)";
326
- }
327
-
328
- .qtip-jtools .qtip-titlebar,
329
- .qtip-jtools .qtip-content{
330
- background: transparent;
331
- color: white;
332
- border: 0 dashed transparent;
333
- }
334
-
335
- .qtip-jtools .qtip-icon{
336
- border-color: #555;
337
- }
338
-
339
- .qtip-jtools .qtip-titlebar .ui-state-hover{
340
- border-color: #333;
341
- }
342
-
343
-
344
- /* Cluetip style */
345
- .qtip-cluetip{
346
- -webkit-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
347
- -moz-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
348
- box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
349
-
350
- background-color: #D9D9C2;
351
- color: #111;
352
- border: 0 dashed transparent;
353
- }
354
-
355
- .qtip-cluetip .qtip-titlebar{
356
- background-color: #87876A;
357
- color: white;
358
- border: 0 dashed transparent;
359
- }
360
-
361
- .qtip-cluetip .qtip-icon{
362
- border-color: #808064;
363
- }
364
-
365
- .qtip-cluetip .qtip-titlebar .ui-state-hover{
366
- border-color: #696952;
367
- color: #696952;
368
- }
369
-
370
-
371
- /* Tipsy style */
372
- .qtip-tipsy{
373
- background: black;
374
- background: rgba(0, 0, 0, .87);
375
-
376
- color: white;
377
- border: 0 solid transparent;
378
-
379
- font-size: 11px;
380
- font-family: 'Lucida Grande', sans-serif;
381
- font-weight: bold;
382
- line-height: 16px;
383
- text-shadow: 0 1px black;
384
- }
385
-
386
- .qtip-tipsy .qtip-titlebar{
387
- padding: 6px 35px 0 10px;
388
- background-color: transparent;
389
- }
390
-
391
- .qtip-tipsy .qtip-content{
392
- padding: 6px 10px;
393
- }
394
-
395
- .qtip-tipsy .qtip-icon{
396
- border-color: #222;
397
- text-shadow: none;
398
- }
399
-
400
- .qtip-tipsy .qtip-titlebar .ui-state-hover{
401
- border-color: #303030;
402
- }
403
-
404
-
405
- /* Tipped style */
406
- .qtip-tipped{
407
- border: 3px solid #959FA9;
408
-
409
- -moz-border-radius: 3px;
410
- -webkit-border-radius: 3px;
411
- border-radius: 3px;
412
-
413
- background-color: #F9F9F9;
414
- color: #454545;
415
-
416
- font-weight: normal;
417
- font-family: serif;
418
- }
419
-
420
- .qtip-tipped .qtip-titlebar{
421
- border-bottom-width: 0;
422
-
423
- color: white;
424
- background: #3A79B8;
425
- background-image: -webkit-gradient(linear, left top, left bottom, from(#3A79B8), to(#2E629D));
426
- background-image: -webkit-linear-gradient(top, #3A79B8, #2E629D);
427
- background-image: -moz-linear-gradient(top, #3A79B8, #2E629D);
428
- background-image: -ms-linear-gradient(top, #3A79B8, #2E629D);
429
- background-image: -o-linear-gradient(top, #3A79B8, #2E629D);
430
- filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#3A79B8,endColorstr=#2E629D);
431
- -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#3A79B8,endColorstr=#2E629D)";
432
- }
433
-
434
- .qtip-tipped .qtip-icon{
435
- border: 2px solid #285589;
436
- background: #285589;
437
- }
438
-
439
- .qtip-tipped .qtip-icon .ui-icon{
440
- background-color: #FBFBFB;
441
- color: #555;
442
- }
443
-
444
-
445
- /**
446
- * Twitter Bootstrap style.
447
- *
448
- * Tested with IE 8, IE 9, Chrome 18, Firefox 9, Opera 11.
449
- * Does not work with IE 7.
450
- */
451
- .qtip-bootstrap{
452
- /** Taken from Bootstrap body */
453
- font-size: 14px;
454
- line-height: 20px;
455
- color: #333333;
456
-
457
- /** Taken from Bootstrap .popover */
458
- padding: 1px;
459
- background-color: #ffffff;
460
- border: 1px solid #ccc;
461
- border: 1px solid rgba(0, 0, 0, 0.2);
462
- -webkit-border-radius: 6px;
463
- -moz-border-radius: 6px;
464
- border-radius: 6px;
465
- -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
466
- -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
467
- box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
468
- -webkit-background-clip: padding-box;
469
- -moz-background-clip: padding;
470
- background-clip: padding-box;
471
- }
472
-
473
- .qtip-bootstrap .qtip-titlebar{
474
- /** Taken from Bootstrap .popover-title */
475
- padding: 8px 14px;
476
- margin: 0;
477
- font-size: 14px;
478
- font-weight: normal;
479
- line-height: 18px;
480
- background-color: #f7f7f7;
481
- border-bottom: 1px solid #ebebeb;
482
- -webkit-border-radius: 5px 5px 0 0;
483
- -moz-border-radius: 5px 5px 0 0;
484
- border-radius: 5px 5px 0 0;
485
- }
486
-
487
- .qtip-bootstrap .qtip-titlebar .qtip-close{
488
- /**
489
- * Overrides qTip2:
490
- * .qtip-titlebar .qtip-close{
491
- * [...]
492
- * right: 4px;
493
- * top: 50%;
494
- * [...]
495
- * border-style: solid;
496
- * }
497
- */
498
- right: 11px;
499
- top: 45%;
500
- border-style: none;
501
- }
502
-
503
- .qtip-bootstrap .qtip-content{
504
- /** Taken from Bootstrap .popover-content */
505
- padding: 9px 14px;
506
- }
507
-
508
- .qtip-bootstrap .qtip-icon{
509
- /**
510
- * Overrides qTip2:
511
- * .qtip-default .qtip-icon {
512
- * border-color: #CCC;
513
- * background: #F1F1F1;
514
- * color: #777;
515
- * }
516
- */
517
- background: transparent;
518
- }
519
-
520
- .qtip-bootstrap .qtip-icon .ui-icon{
521
- /**
522
- * Overrides qTip2:
523
- * .qtip-icon .ui-icon{
524
- * width: 18px;
525
- * height: 14px;
526
- * }
527
- */
528
- width: auto;
529
- height: auto;
530
-
531
- /* Taken from Bootstrap .close */
532
- float: right;
533
- font-size: 20px;
534
- font-weight: bold;
535
- line-height: 18px;
536
- color: #000000;
537
- text-shadow: 0 1px 0 #ffffff;
538
- opacity: 0.2;
539
- filter: alpha(opacity=20);
540
- }
541
-
542
- .qtip-bootstrap .qtip-icon .ui-icon:hover{
543
- /* Taken from Bootstrap .close:hover */
544
- color: #000000;
545
- text-decoration: none;
546
- cursor: pointer;
547
- opacity: 0.4;
548
- filter: alpha(opacity=40);
549
- }
550
-
551
-
552
- /* IE9 fix - removes all filters */
553
- .qtip:not(.ie9haxors) div.qtip-content,
554
- .qtip:not(.ie9haxors) div.qtip-titlebar{
555
- filter: none;
556
- -ms-filter: none;
557
- }
558
-
559
-
560
- .qtip .qtip-tip{
561
- margin: 0 auto;
562
- overflow: hidden;
563
- z-index: 10;
564
-
565
- }
566
-
567
- /* Opera bug #357 - Incorrect tip position
568
- https://github.com/Craga89/qTip2/issues/367 */
569
- x:-o-prefocus, .qtip .qtip-tip{
570
- visibility: hidden;
571
- }
572
-
573
- .qtip .qtip-tip,
574
- .qtip .qtip-tip .qtip-vml,
575
- .qtip .qtip-tip canvas{
576
- position: absolute;
577
-
578
- color: #123456;
579
- background: transparent;
580
- border: 0 dashed transparent;
581
- }
582
-
583
- .qtip .qtip-tip canvas{ top: 0; left: 0; }
584
-
585
- .qtip .qtip-tip .qtip-vml{
586
- behavior: url(#default#VML);
587
- display: inline-block;
588
- visibility: visible;
589
- }
590
-
591
-
592
- #qtip-overlay{
593
- position: fixed;
594
- left: 0; top: 0;
595
- width: 100%; height: 100%;
596
- }
597
-
598
- /* Applied to modals with show.modal.blur set to true */
599
- #qtip-overlay.blurs{ cursor: pointer; }
600
-
601
- /* Change opacity of overlay here */
602
- #qtip-overlay div{
603
- position: absolute;
604
- left: 0; top: 0;
605
- width: 100%; height: 100%;
606
-
607
- background-color: black;
608
-
609
- opacity: 0.7;
610
- filter:alpha(opacity=70);
611
- -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";
612
- }
613
-
614
-
615
- .qtipmodal-ie6fix{
616
- position: absolute !important;
617
- }
1
+ /*
2
+ * qTip2 - Pretty powerful tooltips - v2.2.1
3
+ * http://qtip2.com
4
+ *
5
+ * Copyright (c) 2014
6
+ * Released under the MIT licenses
7
+ * http://jquery.org/license
8
+ *
9
+ * Date: Sat Sep 6 2014 06:25 EDT-0400
10
+ * Plugins: tips viewport imagemap svg modal ie6
11
+ * Styles: core basic css3
12
+ */
13
+ .qtip{
14
+ position: absolute;
15
+ left: -28000px;
16
+ top: -28000px;
17
+ display: none;
18
+
19
+ max-width: 280px;
20
+ min-width: 50px;
21
+
22
+ font-size: 10.5px;
23
+ line-height: 12px;
24
+
25
+ direction: ltr;
26
+
27
+ box-shadow: none;
28
+ padding: 0;
29
+ }
30
+
31
+ .qtip-content{
32
+ position: relative;
33
+ padding: 5px 9px;
34
+ overflow: hidden;
35
+
36
+ text-align: left;
37
+ word-wrap: break-word;
38
+ }
39
+
40
+ .qtip-titlebar{
41
+ position: relative;
42
+ padding: 5px 35px 5px 10px;
43
+ overflow: hidden;
44
+
45
+ border-width: 0 0 1px;
46
+ font-weight: bold;
47
+ }
48
+
49
+ .qtip-titlebar + .qtip-content{ border-top-width: 0 !important; }
50
+
51
+ /* Default close button class */
52
+ .qtip-close{
53
+ position: absolute;
54
+ right: -9px; top: -9px;
55
+ z-index: 11; /* Overlap .qtip-tip */
56
+
57
+ cursor: pointer;
58
+ outline: medium none;
59
+
60
+ border: 1px solid transparent;
61
+ }
62
+
63
+ .qtip-titlebar .qtip-close{
64
+ right: 4px; top: 50%;
65
+ margin-top: -9px;
66
+ }
67
+
68
+ * html .qtip-titlebar .qtip-close{ top: 16px; } /* IE fix */
69
+
70
+ .qtip-titlebar .ui-icon,
71
+ .qtip-icon .ui-icon{
72
+ display: block;
73
+ text-indent: -1000em;
74
+ direction: ltr;
75
+ }
76
+
77
+ .qtip-icon, .qtip-icon .ui-icon{
78
+ -moz-border-radius: 3px;
79
+ -webkit-border-radius: 3px;
80
+ border-radius: 3px;
81
+ text-decoration: none;
82
+ }
83
+
84
+ .qtip-icon .ui-icon{
85
+ width: 18px;
86
+ height: 14px;
87
+
88
+ line-height: 14px;
89
+ text-align: center;
90
+ text-indent: 0;
91
+ font: normal bold 10px/13px Tahoma,sans-serif;
92
+
93
+ color: inherit;
94
+ background: transparent none no-repeat -100em -100em;
95
+ }
96
+
97
+ /* Applied to 'focused' tooltips e.g. most recently displayed/interacted with */
98
+ .qtip-focus{}
99
+
100
+ /* Applied on hover of tooltips i.e. added/removed on mouseenter/mouseleave respectively */
101
+ .qtip-hover{}
102
+
103
+ /* Default tooltip style */
104
+ .qtip-default{
105
+ border: 1px solid #F1D031;
106
+
107
+ background-color: #FFFFA3;
108
+ color: #555;
109
+ }
110
+
111
+ .qtip-default .qtip-titlebar{
112
+ background-color: #FFEF93;
113
+ }
114
+
115
+ .qtip-default .qtip-icon{
116
+ border-color: #CCC;
117
+ background: #F1F1F1;
118
+ color: #777;
119
+ }
120
+
121
+ .qtip-default .qtip-titlebar .qtip-close{
122
+ border-color: #AAA;
123
+ color: #111;
124
+ }
125
+
126
+
127
+ /*! Light tooltip style */
128
+ .qtip-light{
129
+ background-color: white;
130
+ border-color: #E2E2E2;
131
+ color: #454545;
132
+ }
133
+
134
+ .qtip-light .qtip-titlebar{
135
+ background-color: #f1f1f1;
136
+ }
137
+
138
+
139
+ /*! Dark tooltip style */
140
+ .qtip-dark{
141
+ background-color: #505050;
142
+ border-color: #303030;
143
+ color: #f3f3f3;
144
+ }
145
+
146
+ .qtip-dark .qtip-titlebar{
147
+ background-color: #404040;
148
+ }
149
+
150
+ .qtip-dark .qtip-icon{
151
+ border-color: #444;
152
+ }
153
+
154
+ .qtip-dark .qtip-titlebar .ui-state-hover{
155
+ border-color: #303030;
156
+ }
157
+
158
+
159
+ /*! Cream tooltip style */
160
+ .qtip-cream{
161
+ background-color: #FBF7AA;
162
+ border-color: #F9E98E;
163
+ color: #A27D35;
164
+ }
165
+
166
+ .qtip-cream .qtip-titlebar{
167
+ background-color: #F0DE7D;
168
+ }
169
+
170
+ .qtip-cream .qtip-close .qtip-icon{
171
+ background-position: -82px 0;
172
+ }
173
+
174
+
175
+ /*! Red tooltip style */
176
+ .qtip-red{
177
+ background-color: #F78B83;
178
+ border-color: #D95252;
179
+ color: #912323;
180
+ }
181
+
182
+ .qtip-red .qtip-titlebar{
183
+ background-color: #F06D65;
184
+ }
185
+
186
+ .qtip-red .qtip-close .qtip-icon{
187
+ background-position: -102px 0;
188
+ }
189
+
190
+ .qtip-red .qtip-icon{
191
+ border-color: #D95252;
192
+ }
193
+
194
+ .qtip-red .qtip-titlebar .ui-state-hover{
195
+ border-color: #D95252;
196
+ }
197
+
198
+
199
+ /*! Green tooltip style */
200
+ .qtip-green{
201
+ background-color: #CAED9E;
202
+ border-color: #90D93F;
203
+ color: #3F6219;
204
+ }
205
+
206
+ .qtip-green .qtip-titlebar{
207
+ background-color: #B0DE78;
208
+ }
209
+
210
+ .qtip-green .qtip-close .qtip-icon{
211
+ background-position: -42px 0;
212
+ }
213
+
214
+
215
+ /*! Blue tooltip style */
216
+ .qtip-blue{
217
+ background-color: #E5F6FE;
218
+ border-color: #ADD9ED;
219
+ color: #5E99BD;
220
+ }
221
+
222
+ .qtip-blue .qtip-titlebar{
223
+ background-color: #D0E9F5;
224
+ }
225
+
226
+ .qtip-blue .qtip-close .qtip-icon{
227
+ background-position: -2px 0;
228
+ }
229
+
230
+
231
+ .qtip-shadow{
232
+ -webkit-box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.15);
233
+ -moz-box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.15);
234
+ box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.15);
235
+ }
236
+
237
+ /* Add rounded corners to your tooltips in: FF3+, Chrome 2+, Opera 10.6+, IE9+, Safari 2+ */
238
+ .qtip-rounded,
239
+ .qtip-tipsy,
240
+ .qtip-bootstrap{
241
+ -moz-border-radius: 5px;
242
+ -webkit-border-radius: 5px;
243
+ border-radius: 5px;
244
+ }
245
+
246
+ .qtip-rounded .qtip-titlebar{
247
+ -moz-border-radius: 4px 4px 0 0;
248
+ -webkit-border-radius: 4px 4px 0 0;
249
+ border-radius: 4px 4px 0 0;
250
+ }
251
+
252
+ /* Youtube tooltip style */
253
+ .qtip-youtube{
254
+ -moz-border-radius: 2px;
255
+ -webkit-border-radius: 2px;
256
+ border-radius: 2px;
257
+
258
+ -webkit-box-shadow: 0 0 3px #333;
259
+ -moz-box-shadow: 0 0 3px #333;
260
+ box-shadow: 0 0 3px #333;
261
+
262
+ color: white;
263
+ border: 0 solid transparent;
264
+
265
+ background: #4A4A4A;
266
+ background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0,#4A4A4A),color-stop(100%,black));
267
+ background-image: -webkit-linear-gradient(top,#4A4A4A 0,black 100%);
268
+ background-image: -moz-linear-gradient(top,#4A4A4A 0,black 100%);
269
+ background-image: -ms-linear-gradient(top,#4A4A4A 0,black 100%);
270
+ background-image: -o-linear-gradient(top,#4A4A4A 0,black 100%);
271
+ }
272
+
273
+ .qtip-youtube .qtip-titlebar{
274
+ background-color: #4A4A4A;
275
+ background-color: rgba(0,0,0,0);
276
+ }
277
+
278
+ .qtip-youtube .qtip-content{
279
+ padding: .75em;
280
+ font: 12px arial,sans-serif;
281
+
282
+ filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#4a4a4a,EndColorStr=#000000);
283
+ -ms-filter: "progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#4a4a4a,EndColorStr=#000000);";
284
+ }
285
+
286
+ .qtip-youtube .qtip-icon{
287
+ border-color: #222;
288
+ }
289
+
290
+ .qtip-youtube .qtip-titlebar .ui-state-hover{
291
+ border-color: #303030;
292
+ }
293
+
294
+
295
+ /* jQuery TOOLS Tooltip style */
296
+ .qtip-jtools{
297
+ background: #232323;
298
+ background: rgba(0, 0, 0, 0.7);
299
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#717171), to(#232323));
300
+ background-image: -moz-linear-gradient(top, #717171, #232323);
301
+ background-image: -webkit-linear-gradient(top, #717171, #232323);
302
+ background-image: -ms-linear-gradient(top, #717171, #232323);
303
+ background-image: -o-linear-gradient(top, #717171, #232323);
304
+
305
+ border: 2px solid #ddd;
306
+ border: 2px solid rgba(241,241,241,1);
307
+
308
+ -moz-border-radius: 2px;
309
+ -webkit-border-radius: 2px;
310
+ border-radius: 2px;
311
+
312
+ -webkit-box-shadow: 0 0 12px #333;
313
+ -moz-box-shadow: 0 0 12px #333;
314
+ box-shadow: 0 0 12px #333;
315
+ }
316
+
317
+ /* IE Specific */
318
+ .qtip-jtools .qtip-titlebar{
319
+ background-color: transparent;
320
+ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#717171,endColorstr=#4A4A4A);
321
+ -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#717171,endColorstr=#4A4A4A)";
322
+ }
323
+ .qtip-jtools .qtip-content{
324
+ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4A4A4A,endColorstr=#232323);
325
+ -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#4A4A4A,endColorstr=#232323)";
326
+ }
327
+
328
+ .qtip-jtools .qtip-titlebar,
329
+ .qtip-jtools .qtip-content{
330
+ background: transparent;
331
+ color: white;
332
+ border: 0 dashed transparent;
333
+ }
334
+
335
+ .qtip-jtools .qtip-icon{
336
+ border-color: #555;
337
+ }
338
+
339
+ .qtip-jtools .qtip-titlebar .ui-state-hover{
340
+ border-color: #333;
341
+ }
342
+
343
+
344
+ /* Cluetip style */
345
+ .qtip-cluetip{
346
+ -webkit-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
347
+ -moz-box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
348
+ box-shadow: 4px 4px 5px rgba(0, 0, 0, 0.4);
349
+
350
+ background-color: #D9D9C2;
351
+ color: #111;
352
+ border: 0 dashed transparent;
353
+ }
354
+
355
+ .qtip-cluetip .qtip-titlebar{
356
+ background-color: #87876A;
357
+ color: white;
358
+ border: 0 dashed transparent;
359
+ }
360
+
361
+ .qtip-cluetip .qtip-icon{
362
+ border-color: #808064;
363
+ }
364
+
365
+ .qtip-cluetip .qtip-titlebar .ui-state-hover{
366
+ border-color: #696952;
367
+ color: #696952;
368
+ }
369
+
370
+
371
+ /* Tipsy style */
372
+ .qtip-tipsy{
373
+ background: black;
374
+ background: rgba(0, 0, 0, .87);
375
+
376
+ color: white;
377
+ border: 0 solid transparent;
378
+
379
+ font-size: 11px;
380
+ font-family: 'Lucida Grande', sans-serif;
381
+ font-weight: bold;
382
+ line-height: 16px;
383
+ text-shadow: 0 1px black;
384
+ }
385
+
386
+ .qtip-tipsy .qtip-titlebar{
387
+ padding: 6px 35px 0 10px;
388
+ background-color: transparent;
389
+ }
390
+
391
+ .qtip-tipsy .qtip-content{
392
+ padding: 6px 10px;
393
+ }
394
+
395
+ .qtip-tipsy .qtip-icon{
396
+ border-color: #222;
397
+ text-shadow: none;
398
+ }
399
+
400
+ .qtip-tipsy .qtip-titlebar .ui-state-hover{
401
+ border-color: #303030;
402
+ }
403
+
404
+
405
+ /* Tipped style */
406
+ .qtip-tipped{
407
+ border: 3px solid #959FA9;
408
+
409
+ -moz-border-radius: 3px;
410
+ -webkit-border-radius: 3px;
411
+ border-radius: 3px;
412
+
413
+ background-color: #F9F9F9;
414
+ color: #454545;
415
+
416
+ font-weight: normal;
417
+ font-family: serif;
418
+ }
419
+
420
+ .qtip-tipped .qtip-titlebar{
421
+ border-bottom-width: 0;
422
+
423
+ color: white;
424
+ background: #3A79B8;
425
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#3A79B8), to(#2E629D));
426
+ background-image: -webkit-linear-gradient(top, #3A79B8, #2E629D);
427
+ background-image: -moz-linear-gradient(top, #3A79B8, #2E629D);
428
+ background-image: -ms-linear-gradient(top, #3A79B8, #2E629D);
429
+ background-image: -o-linear-gradient(top, #3A79B8, #2E629D);
430
+ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#3A79B8,endColorstr=#2E629D);
431
+ -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#3A79B8,endColorstr=#2E629D)";
432
+ }
433
+
434
+ .qtip-tipped .qtip-icon{
435
+ border: 2px solid #285589;
436
+ background: #285589;
437
+ }
438
+
439
+ .qtip-tipped .qtip-icon .ui-icon{
440
+ background-color: #FBFBFB;
441
+ color: #555;
442
+ }
443
+
444
+
445
+ /**
446
+ * Twitter Bootstrap style.
447
+ *
448
+ * Tested with IE 8, IE 9, Chrome 18, Firefox 9, Opera 11.
449
+ * Does not work with IE 7.
450
+ */
451
+ .qtip-bootstrap{
452
+ /** Taken from Bootstrap body */
453
+ font-size: 14px;
454
+ line-height: 20px;
455
+ color: #333333;
456
+
457
+ /** Taken from Bootstrap .popover */
458
+ padding: 1px;
459
+ background-color: #ffffff;
460
+ border: 1px solid #ccc;
461
+ border: 1px solid rgba(0, 0, 0, 0.2);
462
+ -webkit-border-radius: 6px;
463
+ -moz-border-radius: 6px;
464
+ border-radius: 6px;
465
+ -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
466
+ -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
467
+ box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
468
+ -webkit-background-clip: padding-box;
469
+ -moz-background-clip: padding;
470
+ background-clip: padding-box;
471
+ }
472
+
473
+ .qtip-bootstrap .qtip-titlebar{
474
+ /** Taken from Bootstrap .popover-title */
475
+ padding: 8px 14px;
476
+ margin: 0;
477
+ font-size: 14px;
478
+ font-weight: normal;
479
+ line-height: 18px;
480
+ background-color: #f7f7f7;
481
+ border-bottom: 1px solid #ebebeb;
482
+ -webkit-border-radius: 5px 5px 0 0;
483
+ -moz-border-radius: 5px 5px 0 0;
484
+ border-radius: 5px 5px 0 0;
485
+ }
486
+
487
+ .qtip-bootstrap .qtip-titlebar .qtip-close{
488
+ /**
489
+ * Overrides qTip2:
490
+ * .qtip-titlebar .qtip-close{
491
+ * [...]
492
+ * right: 4px;
493
+ * top: 50%;
494
+ * [...]
495
+ * border-style: solid;
496
+ * }
497
+ */
498
+ right: 11px;
499
+ top: 45%;
500
+ border-style: none;
501
+ }
502
+
503
+ .qtip-bootstrap .qtip-content{
504
+ /** Taken from Bootstrap .popover-content */
505
+ padding: 9px 14px;
506
+ }
507
+
508
+ .qtip-bootstrap .qtip-icon{
509
+ /**
510
+ * Overrides qTip2:
511
+ * .qtip-default .qtip-icon {
512
+ * border-color: #CCC;
513
+ * background: #F1F1F1;
514
+ * color: #777;
515
+ * }
516
+ */
517
+ background: transparent;
518
+ }
519
+
520
+ .qtip-bootstrap .qtip-icon .ui-icon{
521
+ /**
522
+ * Overrides qTip2:
523
+ * .qtip-icon .ui-icon{
524
+ * width: 18px;
525
+ * height: 14px;
526
+ * }
527
+ */
528
+ width: auto;
529
+ height: auto;
530
+
531
+ /* Taken from Bootstrap .close */
532
+ float: right;
533
+ font-size: 20px;
534
+ font-weight: bold;
535
+ line-height: 18px;
536
+ color: #000000;
537
+ text-shadow: 0 1px 0 #ffffff;
538
+ opacity: 0.2;
539
+ filter: alpha(opacity=20);
540
+ }
541
+
542
+ .qtip-bootstrap .qtip-icon .ui-icon:hover{
543
+ /* Taken from Bootstrap .close:hover */
544
+ color: #000000;
545
+ text-decoration: none;
546
+ cursor: pointer;
547
+ opacity: 0.4;
548
+ filter: alpha(opacity=40);
549
+ }
550
+
551
+
552
+ /* IE9 fix - removes all filters */
553
+ .qtip:not(.ie9haxors) div.qtip-content,
554
+ .qtip:not(.ie9haxors) div.qtip-titlebar{
555
+ filter: none;
556
+ -ms-filter: none;
557
+ }
558
+
559
+
560
+ .qtip .qtip-tip{
561
+ margin: 0 auto;
562
+ overflow: hidden;
563
+ z-index: 10;
564
+
565
+ }
566
+
567
+ /* Opera bug #357 - Incorrect tip position
568
+ https://github.com/Craga89/qTip2/issues/367 */
569
+ x:-o-prefocus, .qtip .qtip-tip{
570
+ visibility: hidden;
571
+ }
572
+
573
+ .qtip .qtip-tip,
574
+ .qtip .qtip-tip .qtip-vml,
575
+ .qtip .qtip-tip canvas{
576
+ position: absolute;
577
+
578
+ color: #123456;
579
+ background: transparent;
580
+ border: 0 dashed transparent;
581
+ }
582
+
583
+ .qtip .qtip-tip canvas{ top: 0; left: 0; }
584
+
585
+ .qtip .qtip-tip .qtip-vml{
586
+ behavior: url(#default#VML);
587
+ display: inline-block;
588
+ visibility: visible;
589
+ }
590
+
591
+
592
+ #qtip-overlay{
593
+ position: fixed;
594
+ left: 0; top: 0;
595
+ width: 100%; height: 100%;
596
+ }
597
+
598
+ /* Applied to modals with show.modal.blur set to true */
599
+ #qtip-overlay.blurs{ cursor: pointer; }
600
+
601
+ /* Change opacity of overlay here */
602
+ #qtip-overlay div{
603
+ position: absolute;
604
+ left: 0; top: 0;
605
+ width: 100%; height: 100%;
606
+
607
+ background-color: black;
608
+
609
+ opacity: 0.7;
610
+ filter:alpha(opacity=70);
611
+ -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";
612
+ }
613
+
614
+
615
+ .qtipmodal-ie6fix{
616
+ position: absolute !important;
617
+ }
assets/css/select2.min.css CHANGED
@@ -1 +1 @@
1
- .select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid #000 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}
1
+ .select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;height:1px !important;margin:-1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid #000 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}
assets/images/icon-128x128.png ADDED
Binary file
assets/js/admin.js CHANGED
@@ -1,257 +1,257 @@
1
- (function ($) {
2
- 'use strict';
3
-
4
- $(document).on('click', '.kcseo-group-duplicate', function () {
5
- var self = $(this),
6
- wrapper = self.parents('.kcseo-group-wrapper'),
7
- target = self.parents(".kcseo-group-item"),
8
- group_id = wrapper.attr('data-group-id'),
9
- group_index = target.attr('data-index'),
10
- count = wrapper.find(".kcseo-group-item").length,
11
- post_fix = "_" + count,
12
- html = $("<div class='kcseo-group-item' data-index='" + count + "' />");
13
- html.append('<div class="kc-top-toolbar"><span class="kcseo-remove-group"><span class="dashicons dashicons-trash"></span>Remove</span></div>');
14
- html.hide();
15
- target.find("> .field-container ").each(function () {
16
- var item = $(this).clone(),
17
- field = item.find(".field-content").find("input, select, textarea") || '',
18
- name = field.attr("name") || '',
19
- field_container = item.find(".field-content"),
20
- label = item.find("label.field-label"),
21
- label_for = label.attr("for") + post_fix;
22
- item.attr("id", item.attr("id") + post_fix);
23
- label.attr("for", label_for);
24
- field_container.attr("id", field_container.attr("id") + post_fix);
25
- if (name) {
26
- field.attr("id", label_for);
27
- field.attr("name", name.replace(group_id + "[" + group_index + "]", group_id + "[" + count + "]"));
28
- }
29
- html.append(item);
30
- });
31
- if (wrapper.data('duplicate') === 1) {
32
- html.append('<div class="kc-bottom-toolbar"><span class="button button-primary kcseo-group-duplicate">Duplicate Item</span></div>');
33
- }
34
- wrapper.append(html);
35
- html.slideDown(500);
36
- });
37
-
38
- $(document).on('click', 'span.kcseo-remove-group', function () {
39
- var self = $(this),
40
- wrapper = self.parents('.kcseo-group-wrapper'),
41
- target = self.parents(".kcseo-group-item"),
42
- group_id = wrapper.attr('data-group-id');
43
- target.slideUp(500, function () {
44
- $(this).remove();
45
- wrapper.find("> .kcseo-group-item ").each(function (count, v) {
46
- var group_index = $(this).attr('data-index'),
47
- post_fix = "_" + count;
48
- $(this).attr('data-index', count);
49
- $(this).find("> .field-container ").each(function () {
50
- var item = $(this),
51
- field = item.find(".field-content").find("input, select, textarea") || '',
52
- name = field.attr("name") || '',
53
- field_container = item.find(".field-content"),
54
- label = item.find("label.field-label"),
55
- label_for = label.attr("for") + post_fix;
56
- item.attr("id", item.attr("id") + post_fix);
57
- label.attr("for", label_for);
58
- field_container.attr("id", field_container.attr("id") + post_fix);
59
- if (name) {
60
- field.attr("id", label_for);
61
- field.attr("name", name.replace(group_id + "[" + group_index + "]", group_id + "[" + count + "]"));
62
- }
63
- });
64
- });
65
- });
66
- });
67
-
68
- wpSeoShowHideType();
69
- $("#site_type, #_schema_aggregate_rating_schema_type").change(function () {
70
- wpSeoShowHideType();
71
- });
72
-
73
- if ($("#kcseo-wordpres-seo-structured-data-schema-meta-box").length) {
74
-
75
- $("select.select2").select2({
76
- dropdownAutoWidth: true,
77
- width: '100%'
78
- });
79
- } else {
80
- $("select.select2").select2({
81
- dropdownAutoWidth: true
82
- });
83
- }
84
-
85
-
86
- $(document).on('click', ".social-remove", function () {
87
- if (confirm("Are you sure?")) {
88
- $(this).parent('.sfield').slideUp('slow', function () {
89
- $(this).remove();
90
- });
91
- }
92
- });
93
-
94
- $("#social-add").on('click', function () {
95
- var bindElement = $("#social-add");
96
- var count = $("#social-field-holder .sfield").length;
97
- var arg = 'id=' + count;
98
- AjaxCall(bindElement, 'newSocial', arg, function (data) {
99
- if (data.data) {
100
- $("#social-field-holder").append(data.data);
101
- }
102
- });
103
- });
104
-
105
- $('.schema-tooltip').each(function () { // Notice the .each() loop, discussed below
106
- $(this).qtip({
107
- content: {
108
- text: $(this).next('div') // Use the "div" element next to this for the content
109
- },
110
- hide: {
111
- fixed: true,
112
- delay: 300
113
- }
114
- });
115
- });
116
-
117
- $(".rt-tab-nav li").on('click', 'a', function (e) {
118
- e.preventDefault();
119
- var $this = $(this),
120
- li = $this.parent(),
121
- container = $this.parents('.rt-tab-container'),
122
- nav = container.children('.rt-tab-nav'),
123
- content = container.children(".rt-tab-content"),
124
- id = li.data('id');
125
- content.removeClass('active');
126
- nav.find('li').removeClass('active');
127
- li.addClass('active');
128
- container.find('#' + id).addClass('active');
129
- container.find('#_kcseo_ative_tab').val(id);
130
- });
131
-
132
- $(".kSeoImgAdd").on("click", function (e) {
133
- var file_frame,
134
- $this = $(this).parents('.kSeo-image-wrapper');
135
- if (undefined !== file_frame) {
136
- file_frame.open();
137
- return;
138
- }
139
- file_frame = wp.media.frames.file_frame = wp.media({
140
- title: 'Select or Upload Media For your profile gallery',
141
- button: {
142
- text: 'Use this media'
143
- },
144
- multiple: false
145
- });
146
- file_frame.on('select', function () {
147
- var attachment = file_frame.state().get('selection').first().toJSON(),
148
- imgId = attachment.id,
149
- imgUrl = (typeof attachment.sizes.thumbnail === "undefined") ? attachment.url : attachment.sizes.thumbnail.url,
150
- imgInfo = "<span><strong>URL: </strong>" + attachment.sizes.full.url + "</span>",
151
- imgInfo = imgInfo + "<span><strong>Width: </strong>" + attachment.sizes.full.width + "px</span>",
152
- imgInfo = imgInfo + "<span><strong>Height: </strong>" + attachment.sizes.full.height + "px</span>";
153
- $this.find('input').val(imgId);
154
- $this.find('.kSeoImgRemove').removeClass('kSeo-hidden');
155
- $this.find('img').remove();
156
- $this.find('.kSeo-image-preview').append("<img src='" + imgUrl + "' />");
157
- $this.parents('.kSeo-image').find('.image-info').html(imgInfo);
158
- });
159
- // Now display the actual file_frame
160
- file_frame.open();
161
- });
162
-
163
- $(".kSeoImgRemove").on("click", function (e) {
164
- e.preventDefault();
165
- if (confirm("Are you sure?")) {
166
- var $this = $(this).parents('.kSeo-image-wrapper');
167
- $this.find('input').val('');
168
- $this.find('.kSeoImgRemove').addClass('kSeo-hidden');
169
- $this.find('img').remove();
170
- $this.parents('.kSeo-image').find('.image-info').html('');
171
- }
172
- });
173
-
174
- function wpSeoShowHideType() {
175
- if ($('#_schema_aggregate_rating_schema_type').length) {
176
- var id = $("#_schema_aggregate_rating_schema_type option:selected").val();
177
- }
178
- if ($('#site_type').length) {
179
- var id = $("#site_type option:selected").val();
180
- }
181
-
182
- if (id == "Person") {
183
- $(".form-table tr.person, .aggregate-person-holder").show();
184
- } else {
185
- $(".form-table tr.person, .aggregate-person-holder").hide();
186
- }
187
- if (id == "Organization") {
188
- $(".form-table tr.business-info,.form-table tr.all-type-data, .aggregate-except-organization-holder").hide();
189
- } else {
190
- $(".form-table tr.business-info,.form-table tr.all-type-data, .aggregate-except-organization-holder").show();
191
- }
192
-
193
- if ($.inArray(id, ['FoodEstablishment', 'Bakery', 'BarOrPub', 'Brewery', 'CafeOrCoffeeShop', 'FastFoodRestaurant', 'IceCreamShop', 'Restaurant', 'Winery']) >= 0) {
194
- $(".form-table tr.restaurant").show();
195
- } else {
196
- $(".form-table tr.restaurant").hide();
197
- }
198
- }
199
-
200
- $("#kcseo-option-settings").on('submit', function (e) {
201
- e.preventDefault();
202
- $('#response').hide();
203
- var arg = $(this).serialize(),
204
- bindElement = $('#tlpSaveButton');
205
- AjaxCall(bindElement, 'kcSeoWpSchemaSettings', arg, function (data) {
206
- $('#response').addClass('updated');
207
- if (!data.error) {
208
- $('#response').removeClass('error');
209
- } else {
210
- $('#response').addClass('error');
211
- }
212
- $('#response').show('slow').text(data.msg);
213
- });
214
- });
215
- $("#kcseo-main-settings").on('submit', function (e) {
216
- e.preventDefault();
217
- $('#response').hide();
218
- var arg = $(this).serialize(),
219
- bindElement = $('#tlpSaveButton');
220
- AjaxCall(bindElement, 'kcSeoMainSettings_action', arg, function (data) {
221
- $('#response').addClass('updated');
222
- if (!data.error) {
223
- $('#response').removeClass('error');
224
- $('#response').show('slow').text(data.msg);
225
- } else {
226
- $('#response').addClass('error');
227
- $('#response').show('slow').text(data.msg);
228
- }
229
- });
230
- return false;
231
- });
232
-
233
-
234
- function AjaxCall(element, action, arg, handle) {
235
- var data;
236
- if (action) data = "action=" + action;
237
- if (arg) data = arg + "&action=" + action;
238
- if (arg && !action) data = arg;
239
- data = data;
240
-
241
- $.ajax({
242
- type: "post",
243
- url: ajaxurl,
244
- data: data,
245
- beforeSend: function () {
246
- $("<span class='wseo_loading'></span>").insertAfter(element);
247
- },
248
- success: function (data) {
249
- $(".wseo_loading").remove();
250
- handle(data);
251
- }
252
- });
253
- }
254
-
255
- })(jQuery);
256
-
257
-
1
+ (function ($) {
2
+ 'use strict';
3
+
4
+ $(document).on('click', '.kcseo-group-duplicate', function () {
5
+ var self = $(this),
6
+ wrapper = self.parents('.kcseo-group-wrapper'),
7
+ target = self.parents(".kcseo-group-item"),
8
+ group_id = wrapper.attr('data-group-id'),
9
+ group_index = target.attr('data-index'),
10
+ count = wrapper.find(".kcseo-group-item").length,
11
+ post_fix = "_" + count,
12
+ html = $("<div class='kcseo-group-item' data-index='" + count + "' />");
13
+ html.append('<div class="kc-top-toolbar"><span class="kcseo-remove-group"><span class="dashicons dashicons-trash"></span>Remove</span></div>');
14
+ html.hide();
15
+ target.find("> .field-container ").each(function () {
16
+ var item = $(this).clone(),
17
+ field = item.find(".field-content").find("input, select, textarea") || '',
18
+ name = field.attr("name") || '',
19
+ field_container = item.find(".field-content"),
20
+ label = item.find("label.field-label"),
21
+ label_for = label.attr("for") + post_fix;
22
+ item.attr("id", item.attr("id") + post_fix);
23
+ label.attr("for", label_for);
24
+ field_container.attr("id", field_container.attr("id") + post_fix);
25
+ if (name) {
26
+ field.attr("id", label_for);
27
+ field.attr("name", name.replace(group_id + "[" + group_index + "]", group_id + "[" + count + "]"));
28
+ }
29
+ html.append(item);
30
+ });
31
+ if (wrapper.data('duplicate') === 1) {
32
+ html.append('<div class="kc-bottom-toolbar"><span class="button button-primary kcseo-group-duplicate">Duplicate Item</span></div>');
33
+ }
34
+ wrapper.append(html);
35
+ html.slideDown(500);
36
+ });
37
+
38
+ $(document).on('click', 'span.kcseo-remove-group', function () {
39
+ var self = $(this),
40
+ wrapper = self.parents('.kcseo-group-wrapper'),
41
+ target = self.parents(".kcseo-group-item"),
42
+ group_id = wrapper.attr('data-group-id');
43
+ target.slideUp(500, function () {
44
+ $(this).remove();
45
+ wrapper.find("> .kcseo-group-item ").each(function (count, v) {
46
+ var group_index = $(this).attr('data-index'),
47
+ post_fix = "_" + count;
48
+ $(this).attr('data-index', count);
49
+ $(this).find("> .field-container ").each(function () {
50
+ var item = $(this),
51
+ field = item.find(".field-content").find("input, select, textarea") || '',
52
+ name = field.attr("name") || '',
53
+ field_container = item.find(".field-content"),
54
+ label = item.find("label.field-label"),
55
+ label_for = label.attr("for") + post_fix;
56
+ item.attr("id", item.attr("id") + post_fix);
57
+ label.attr("for", label_for);
58
+ field_container.attr("id", field_container.attr("id") + post_fix);
59
+ if (name) {
60
+ field.attr("id", label_for);
61
+ field.attr("name", name.replace(group_id + "[" + group_index + "]", group_id + "[" + count + "]"));
62
+ }
63
+ });
64
+ });
65
+ });
66
+ });
67
+
68
+ wpSeoShowHideType();
69
+ $("#site_type, #_schema_aggregate_rating_schema_type").change(function () {
70
+ wpSeoShowHideType();
71
+ });
72
+
73
+ if ($("#kcseo-wordpres-seo-structured-data-schema-meta-box").length) {
74
+
75
+ $("select.select2").select2({
76
+ dropdownAutoWidth: true,
77
+ width: '100%'
78
+ });
79
+ } else {
80
+ $("select.select2").select2({
81
+ dropdownAutoWidth: true
82
+ });
83
+ }
84
+
85
+
86
+ $(document).on('click', ".social-remove", function () {
87
+ if (confirm("Are you sure?")) {
88
+ $(this).parent('.sfield').slideUp('slow', function () {
89
+ $(this).remove();
90
+ });
91
+ }
92
+ });
93
+
94
+ $("#social-add").on('click', function () {
95
+ var bindElement = $("#social-add");
96
+ var count = $("#social-field-holder .sfield").length;
97
+ var arg = 'id=' + count;
98
+ AjaxCall(bindElement, 'newSocial', arg, function (data) {
99
+ if (data.data) {
100
+ $("#social-field-holder").append(data.data);
101
+ }
102
+ });
103
+ });
104
+
105
+ $('.schema-tooltip').each(function () { // Notice the .each() loop, discussed below
106
+ $(this).qtip({
107
+ content: {
108
+ text: $(this).next('div') // Use the "div" element next to this for the content
109
+ },
110
+ hide: {
111
+ fixed: true,
112
+ delay: 300
113
+ }
114
+ });
115
+ });
116
+
117
+ $(".rt-tab-nav li").on('click', 'a', function (e) {
118
+ e.preventDefault();
119
+ var $this = $(this),
120
+ li = $this.parent(),
121
+ container = $this.parents('.rt-tab-container'),
122
+ nav = container.children('.rt-tab-nav'),
123
+ content = container.children(".rt-tab-content"),
124
+ id = li.data('id');
125
+ content.removeClass('active');
126
+ nav.find('li').removeClass('active');
127
+ li.addClass('active');
128
+ container.find('#' + id).addClass('active');
129
+ container.find('#_kcseo_ative_tab').val(id);
130
+ });
131
+
132
+ $(".kSeoImgAdd").on("click", function (e) {
133
+ var file_frame,
134
+ $this = $(this).parents('.kSeo-image-wrapper');
135
+ if (undefined !== file_frame) {
136
+ file_frame.open();
137
+ return;
138
+ }
139
+ file_frame = wp.media.frames.file_frame = wp.media({
140
+ title: 'Select or Upload Media For your profile gallery',
141
+ button: {
142
+ text: 'Use this media'
143
+ },
144
+ multiple: false
145
+ });
146
+ file_frame.on('select', function () {
147
+ var attachment = file_frame.state().get('selection').first().toJSON(),
148
+ imgId = attachment.id,
149
+ imgUrl = (typeof attachment.sizes.thumbnail === "undefined") ? attachment.url : attachment.sizes.thumbnail.url,
150
+ imgInfo = "<span><strong>URL: </strong>" + attachment.sizes.full.url + "</span>",
151
+ imgInfo = imgInfo + "<span><strong>Width: </strong>" + attachment.sizes.full.width + "px</span>",
152
+ imgInfo = imgInfo + "<span><strong>Height: </strong>" + attachment.sizes.full.height + "px</span>";
153
+ $this.find('input').val(imgId);
154
+ $this.find('.kSeoImgRemove').removeClass('kSeo-hidden');
155
+ $this.find('img').remove();
156
+ $this.find('.kSeo-image-preview').append("<img src='" + imgUrl + "' />");
157
+ $this.parents('.kSeo-image').find('.image-info').html(imgInfo);
158
+ });
159
+ // Now display the actual file_frame
160
+ file_frame.open();
161
+ });
162
+
163
+ $(".kSeoImgRemove").on("click", function (e) {
164
+ e.preventDefault();
165
+ if (confirm("Are you sure?")) {
166
+ var $this = $(this).parents('.kSeo-image-wrapper');
167
+ $this.find('input').val('');
168
+ $this.find('.kSeoImgRemove').addClass('kSeo-hidden');
169
+ $this.find('img').remove();
170
+ $this.parents('.kSeo-image').find('.image-info').html('');
171
+ }
172
+ });
173
+
174
+ function wpSeoShowHideType() {
175
+ if ($('#_schema_aggregate_rating_schema_type').length) {
176
+ var id = $("#_schema_aggregate_rating_schema_type option:selected").val();
177
+ }
178
+ if ($('#site_type').length) {
179
+ var id = $("#site_type option:selected").val();
180
+ }
181
+
182
+ if (id == "Person") {
183
+ $(".form-table tr.person, .aggregate-person-holder").show();
184
+ } else {
185
+ $(".form-table tr.person, .aggregate-person-holder").hide();
186
+ }
187
+ if (id == "Organization") {
188
+ $(".form-table tr.business-info,.form-table tr.all-type-data, .aggregate-except-organization-holder").hide();
189
+ } else {
190
+ $(".form-table tr.business-info,.form-table tr.all-type-data, .aggregate-except-organization-holder").show();
191
+ }
192
+
193
+ if ($.inArray(id, ['FoodEstablishment', 'Bakery', 'BarOrPub', 'Brewery', 'CafeOrCoffeeShop', 'FastFoodRestaurant', 'IceCreamShop', 'Restaurant', 'Winery']) >= 0) {
194
+ $(".form-table tr.restaurant").show();
195
+ } else {
196
+ $(".form-table tr.restaurant").hide();
197
+ }
198
+ }
199
+
200
+ $("#kcseo-option-settings").on('submit', function (e) {
201
+ e.preventDefault();
202
+ $('#response').hide();
203
+ var arg = $(this).serialize(),
204
+ bindElement = $('#tlpSaveButton');
205
+ AjaxCall(bindElement, 'kcSeoWpSchemaSettings', arg, function (data) {
206
+ $('#response').addClass('updated');
207
+ if (!data.error) {
208
+ $('#response').removeClass('error');
209
+ } else {
210
+ $('#response').addClass('error');
211
+ }
212
+ $('#response').show('slow').text(data.msg);
213
+ });
214
+ });
215
+ $("#kcseo-main-settings").on('submit', function (e) {
216
+ e.preventDefault();
217
+ $('#response').hide();
218
+ var arg = $(this).serialize(),
219
+ bindElement = $('#tlpSaveButton');
220
+ AjaxCall(bindElement, 'kcSeoMainSettings_action', arg, function (data) {
221
+ $('#response').addClass('updated');
222
+ if (!data.error) {
223
+ $('#response').removeClass('error');
224
+ $('#response').show('slow').text(data.msg);
225
+ } else {
226
+ $('#response').addClass('error');
227
+ $('#response').show('slow').text(data.msg);
228
+ }
229
+ });
230
+ return false;
231
+ });
232
+
233
+
234
+ function AjaxCall(element, action, arg, handle) {
235
+ var data;
236
+ if (action) data = "action=" + action;
237
+ if (arg) data = arg + "&action=" + action;
238
+ if (arg && !action) data = arg;
239
+ data = data;
240
+
241
+ $.ajax({
242
+ type: "post",
243
+ url: ajaxurl,
244
+ data: data,
245
+ beforeSend: function () {
246
+ $("<span class='wseo_loading'></span>").insertAfter(element);
247
+ },
248
+ success: function (data) {
249
+ $(".wseo_loading").remove();
250
+ handle(data);
251
+ }
252
+ });
253
+ }
254
+
255
+ })(jQuery);
256
+
257
+
assets/js/i18n/ar.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ar",[],function(){return{errorLoading:function(){return"لا يمكن تحميل النتائج"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="الرجاء حذف "+t+" عناصر";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="الرجاء إضافة "+t+" عناصر";return n},loadingMore:function(){return"جاري تحميل نتائج إضافية..."},maximumSelected:function(e){var t="تستطيع إختيار "+e.maximum+" بنود فقط";return t},noResults:function(){return"لم يتم العثور على أي نتائج"},searching:function(){return"جاري البحث…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ar",[],function(){return{errorLoading:function(){return"لا يمكن تحميل النتائج"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="الرجاء حذف "+t+" عناصر";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="الرجاء إضافة "+t+" عناصر";return n},loadingMore:function(){return"جاري تحميل نتائج إضافية..."},maximumSelected:function(e){var t="تستطيع إختيار "+e.maximum+" بنود فقط";return t},noResults:function(){return"لم يتم العثور على أي نتائج"},searching:function(){return"جاري البحث…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/az.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/az",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return t+" simvol silin"},inputTooShort:function(e){var t=e.minimum-e.input.length;return t+" simvol daxil edin"},loadingMore:function(){return"Daha çox nəticə yüklənir…"},maximumSelected:function(e){return"Sadəcə "+e.maximum+" element seçə bilərsiniz"},noResults:function(){return"Nəticə tapılmadı"},searching:function(){return"Axtarılır…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/az",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return t+" simvol silin"},inputTooShort:function(e){var t=e.minimum-e.input.length;return t+" simvol daxil edin"},loadingMore:function(){return"Daha çox nəticə yüklənir…"},maximumSelected:function(e){return"Sadəcə "+e.maximum+" element seçə bilərsiniz"},noResults:function(){return"Nəticə tapılmadı"},searching:function(){return"Axtarılır…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/bg.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/bg",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Моля въведете с "+t+" по-малко символ";return t>1&&(n+="a"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Моля въведете още "+t+" символ";return t>1&&(n+="a"),n},loadingMore:function(){return"Зареждат се още…"},maximumSelected:function(e){var t="Можете да направите до "+e.maximum+" ";return e.maximum>1?t+="избора":t+="избор",t},noResults:function(){return"Няма намерени съвпадения"},searching:function(){return"Търсене…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/bg",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Моля въведете с "+t+" по-малко символ";return t>1&&(n+="a"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Моля въведете още "+t+" символ";return t>1&&(n+="a"),n},loadingMore:function(){return"Зареждат се още…"},maximumSelected:function(e){var t="Можете да направите до "+e.maximum+" ";return e.maximum>1?t+="избора":t+="избор",t},noResults:function(){return"Няма намерени съвпадения"},searching:function(){return"Търсене…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/ca.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ca",[],function(){return{errorLoading:function(){return"La càrrega ha fallat"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Si us plau, elimina "+t+" car";return t==1?n+="àcter":n+="àcters",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Si us plau, introdueix "+t+" car";return t==1?n+="àcter":n+="àcters",n},loadingMore:function(){return"Carregant més resultats…"},maximumSelected:function(e){var t="Només es pot seleccionar "+e.maximum+" element";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No s'han trobat resultats"},searching:function(){return"Cercant…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ca",[],function(){return{errorLoading:function(){return"La càrrega ha fallat"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Si us plau, elimina "+t+" car";return t==1?n+="àcter":n+="àcters",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Si us plau, introdueix "+t+" car";return t==1?n+="àcter":n+="àcters",n},loadingMore:function(){return"Carregant més resultats…"},maximumSelected:function(e){var t="Només es pot seleccionar "+e.maximum+" element";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No s'han trobat resultats"},searching:function(){return"Cercant…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/cs.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/cs",[],function(){function e(e,t){switch(e){case 2:return t?"dva":"dvě";case 3:return"tři";case 4:return"čtyři"}return""}return{errorLoading:function(){return"Výsledky nemohly být načteny."},inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím zadejte o jeden znak méně":n<=4?"Prosím zadejte o "+e(n,!0)+" znaky méně":"Prosím zadejte o "+n+" znaků méně"},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím zadejte ještě jeden znak":n<=4?"Prosím zadejte ještě další "+e(n,!0)+" znaky":"Prosím zadejte ještě dalších "+n+" znaků"},loadingMore:function(){return"Načítají se další výsledky…"},maximumSelected:function(t){var n=t.maximum;return n==1?"Můžete zvolit jen jednu položku":n<=4?"Můžete zvolit maximálně "+e(n,!1)+" položky":"Můžete zvolit maximálně "+n+" položek"},noResults:function(){return"Nenalezeny žádné položky"},searching:function(){return"Vyhledávání…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/cs",[],function(){function e(e,t){switch(e){case 2:return t?"dva":"dvě";case 3:return"tři";case 4:return"čtyři"}return""}return{errorLoading:function(){return"Výsledky nemohly být načteny."},inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím zadejte o jeden znak méně":n<=4?"Prosím zadejte o "+e(n,!0)+" znaky méně":"Prosím zadejte o "+n+" znaků méně"},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím zadejte ještě jeden znak":n<=4?"Prosím zadejte ještě další "+e(n,!0)+" znaky":"Prosím zadejte ještě dalších "+n+" znaků"},loadingMore:function(){return"Načítají se další výsledky…"},maximumSelected:function(t){var n=t.maximum;return n==1?"Můžete zvolit jen jednu položku":n<=4?"Můžete zvolit maximálně "+e(n,!1)+" položky":"Můžete zvolit maximálně "+n+" položek"},noResults:function(){return"Nenalezeny žádné položky"},searching:function(){return"Vyhledávání…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/da.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/da",[],function(){return{errorLoading:function(){return"Resultaterne kunne ikke indlæses."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Angiv venligst "+t+" tegn mindre";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Angiv venligst "+t+" tegn mere";return n},loadingMore:function(){return"Indlæser flere resultater…"},maximumSelected:function(e){var t="Du kan kun vælge "+e.maximum+" emne";return e.maximum!=1&&(t+="r"),t},noResults:function(){return"Ingen resultater fundet"},searching:function(){return"Søger…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/da",[],function(){return{errorLoading:function(){return"Resultaterne kunne ikke indlæses."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Angiv venligst "+t+" tegn mindre";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Angiv venligst "+t+" tegn mere";return n},loadingMore:function(){return"Indlæser flere resultater…"},maximumSelected:function(e){var t="Du kan kun vælge "+e.maximum+" emne";return e.maximum!=1&&(t+="r"),t},noResults:function(){return"Ingen resultater fundet"},searching:function(){return"Søger…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/de.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/de",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Bitte "+t+" Zeichen weniger eingeben"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Bitte "+t+" Zeichen mehr eingeben"},loadingMore:function(){return"Lade mehr Ergebnisse…"},maximumSelected:function(e){var t="Sie können nur "+e.maximum+" Eintr";return e.maximum===1?t+="ag":t+="äge",t+=" auswählen",t},noResults:function(){return"Keine Übereinstimmungen gefunden"},searching:function(){return"Suche…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/de",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Bitte "+t+" Zeichen weniger eingeben"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Bitte "+t+" Zeichen mehr eingeben"},loadingMore:function(){return"Lade mehr Ergebnisse…"},maximumSelected:function(e){var t="Sie können nur "+e.maximum+" Eintr";return e.maximum===1?t+="ag":t+="äge",t+=" auswählen",t},noResults:function(){return"Keine Übereinstimmungen gefunden"},searching:function(){return"Suche…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/en.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Please enter "+t+" or more characters";return n},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Please enter "+t+" or more characters";return n},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/es.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/es",[],function(){return{errorLoading:function(){return"La carga falló"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor, elimine "+t+" car";return t==1?n+="ácter":n+="acteres",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Por favor, introduzca "+t+" car";return t==1?n+="ácter":n+="acteres",n},loadingMore:function(){return"Cargando más resultados…"},maximumSelected:function(e){var t="Sólo puede seleccionar "+e.maximum+" elemento";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No se encontraron resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/es",[],function(){return{errorLoading:function(){return"La carga falló"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor, elimine "+t+" car";return t==1?n+="ácter":n+="acteres",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Por favor, introduzca "+t+" car";return t==1?n+="ácter":n+="acteres",n},loadingMore:function(){return"Cargando más resultados…"},maximumSelected:function(e){var t="Sólo puede seleccionar "+e.maximum+" elemento";return e.maximum!=1&&(t+="s"),t},noResults:function(){return"No se encontraron resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/et.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/et",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" vähem",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" rohkem",n},loadingMore:function(){return"Laen tulemusi…"},maximumSelected:function(e){var t="Saad vaid "+e.maximum+" tulemus";return e.maximum==1?t+="e":t+="t",t+=" valida",t},noResults:function(){return"Tulemused puuduvad"},searching:function(){return"Otsin…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/et",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" vähem",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Sisesta "+t+" täht";return t!=1&&(n+="e"),n+=" rohkem",n},loadingMore:function(){return"Laen tulemusi…"},maximumSelected:function(e){var t="Saad vaid "+e.maximum+" tulemus";return e.maximum==1?t+="e":t+="t",t+=" valida",t},noResults:function(){return"Tulemused puuduvad"},searching:function(){return"Otsin…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/eu.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/eu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gutxiago",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gehiago",n},loadingMore:function(){return"Emaitza gehiago kargatzen…"},maximumSelected:function(e){return e.maximum===1?"Elementu bakarra hauta dezakezu":e.maximum+" elementu hauta ditzakezu soilik"},noResults:function(){return"Ez da bat datorrenik aurkitu"},searching:function(){return"Bilatzen…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/eu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gutxiago",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Idatzi ";return t==1?n+="karaktere bat":n+=t+" karaktere",n+=" gehiago",n},loadingMore:function(){return"Emaitza gehiago kargatzen…"},maximumSelected:function(e){return e.maximum===1?"Elementu bakarra hauta dezakezu":e.maximum+" elementu hauta ditzakezu soilik"},noResults:function(){return"Ez da bat datorrenik aurkitu"},searching:function(){return"Bilatzen…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/fa.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fa",[],function(){return{errorLoading:function(){return"امکان بارگذاری نتایج وجود ندارد."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="لطفاً "+t+" کاراکتر را حذف نمایید";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="لطفاً تعداد "+t+" کاراکتر یا بیشتر وارد نمایید";return n},loadingMore:function(){return"در حال بارگذاری نتایج بیشتر..."},maximumSelected:function(e){var t="شما تنها می‌توانید "+e.maximum+" آیتم را انتخاب نمایید";return t},noResults:function(){return"هیچ نتیجه‌ای یافت نشد"},searching:function(){return"در حال جستجو..."}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fa",[],function(){return{errorLoading:function(){return"امکان بارگذاری نتایج وجود ندارد."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="لطفاً "+t+" کاراکتر را حذف نمایید";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="لطفاً تعداد "+t+" کاراکتر یا بیشتر وارد نمایید";return n},loadingMore:function(){return"در حال بارگذاری نتایج بیشتر..."},maximumSelected:function(e){var t="شما تنها می‌توانید "+e.maximum+" آیتم را انتخاب نمایید";return t},noResults:function(){return"هیچ نتیجه‌ای یافت نشد"},searching:function(){return"در حال جستجو..."}}}),{define:e.define,require:e.require}})();
assets/js/i18n/fi.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fi",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Ole hyvä ja anna "+t+" merkkiä vähemmän"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Ole hyvä ja anna "+t+" merkkiä lisää"},loadingMore:function(){return"Ladataan lisää tuloksia…"},maximumSelected:function(e){return"Voit valita ainoastaan "+e.maximum+" kpl"},noResults:function(){return"Ei tuloksia"},searching:function(){}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fi",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Ole hyvä ja anna "+t+" merkkiä vähemmän"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Ole hyvä ja anna "+t+" merkkiä lisää"},loadingMore:function(){return"Ladataan lisää tuloksia…"},maximumSelected:function(e){return"Voit valita ainoastaan "+e.maximum+" kpl"},noResults:function(){return"Ei tuloksia"},searching:function(){}}}),{define:e.define,require:e.require}})();
assets/js/i18n/fr.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fr",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Supprimez "+t+" caractère";return t!==1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Saisissez "+t+" caractère";return t!==1&&(n+="s"),n},loadingMore:function(){return"Chargement de résultats supplémentaires…"},maximumSelected:function(e){var t="Vous pouvez seulement sélectionner "+e.maximum+" élément";return e.maximum!==1&&(t+="s"),t},noResults:function(){return"Aucun résultat trouvé"},searching:function(){return"Recherche en cours…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fr",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Supprimez "+t+" caractère";return t!==1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Saisissez "+t+" caractère";return t!==1&&(n+="s"),n},loadingMore:function(){return"Chargement de résultats supplémentaires…"},maximumSelected:function(e){var t="Vous pouvez seulement sélectionner "+e.maximum+" élément";return e.maximum!==1&&(t+="s"),t},noResults:function(){return"Aucun résultat trouvé"},searching:function(){return"Recherche en cours…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/gl.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/gl",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Elimine ";return t===1?n+="un carácter":n+=t+" caracteres",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Engada ";return t===1?n+="un carácter":n+=t+" caracteres",n},loadingMore:function(){return"Cargando máis resultados…"},maximumSelected:function(e){var t="Só pode ";return e.maximum===1?t+="un elemento":t+=e.maximum+" elementos",t},noResults:function(){return"Non se atoparon resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/gl",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Elimine ";return t===1?n+="un carácter":n+=t+" caracteres",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Engada ";return t===1?n+="un carácter":n+=t+" caracteres",n},loadingMore:function(){return"Cargando máis resultados…"},maximumSelected:function(e){var t="Só pode ";return e.maximum===1?t+="un elemento":t+=e.maximum+" elementos",t},noResults:function(){return"Non se atoparon resultados"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/he.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/he",[],function(){return{errorLoading:function(){return"שגיאה בטעינת התוצאות"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="נא למחוק ";return t===1?n+="תו אחד":n+=t+" תווים",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="נא להכניס ";return t===1?n+="תו אחד":n+=t+" תווים",n+=" או יותר",n},loadingMore:function(){return"טוען תוצאות נוספות…"},maximumSelected:function(e){var t="באפשרותך לבחור עד ";return e.maximum===1?t+="פריט אחד":t+=e.maximum+" פריטים",t},noResults:function(){return"לא נמצאו תוצאות"},searching:function(){return"מחפש…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/he",[],function(){return{errorLoading:function(){return"שגיאה בטעינת התוצאות"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="נא למחוק ";return t===1?n+="תו אחד":n+=t+" תווים",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="נא להכניס ";return t===1?n+="תו אחד":n+=t+" תווים",n+=" או יותר",n},loadingMore:function(){return"טוען תוצאות נוספות…"},maximumSelected:function(e){var t="באפשרותך לבחור עד ";return e.maximum===1?t+="פריט אחד":t+=e.maximum+" פריטים",t},noResults:function(){return"לא נמצאו תוצאות"},searching:function(){return"מחפש…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/hi.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hi",[],function(){return{errorLoading:function(){return"परिणामों को लोड नहीं किया जा सका।"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" अक्षर को हटा दें";return t>1&&(n=t+" अक्षरों को हटा दें "),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="कृपया "+t+" या अधिक अक्षर दर्ज करें";return n},loadingMore:function(){return"अधिक परिणाम लोड हो रहे है..."},maximumSelected:function(e){var t="आप केवल "+e.maximum+" आइटम का चयन कर सकते हैं";return t},noResults:function(){return"कोई परिणाम नहीं मिला"},searching:function(){return"खोज रहा है..."}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hi",[],function(){return{errorLoading:function(){return"परिणामों को लोड नहीं किया जा सका।"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" अक्षर को हटा दें";return t>1&&(n=t+" अक्षरों को हटा दें "),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="कृपया "+t+" या अधिक अक्षर दर्ज करें";return n},loadingMore:function(){return"अधिक परिणाम लोड हो रहे है..."},maximumSelected:function(e){var t="आप केवल "+e.maximum+" आइटम का चयन कर सकते हैं";return t},noResults:function(){return"कोई परिणाम नहीं मिला"},searching:function(){return"खोज रहा है..."}}}),{define:e.define,require:e.require}})();
assets/js/i18n/hr.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hr",[],function(){function e(e){var t=" "+e+" znak";return e%10<5&&e%10>0&&(e%100<5||e%100>19)?e%10>1&&(t+="a"):t+="ova",t}return{errorLoading:function(){return"Preuzimanje nije uspjelo."},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Unesite "+e(n)},inputTooShort:function(t){var n=t.minimum-t.input.length;return"Unesite još "+e(n)},loadingMore:function(){return"Učitavanje rezultata…"},maximumSelected:function(e){return"Maksimalan broj odabranih stavki je "+e.maximum},noResults:function(){return"Nema rezultata"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hr",[],function(){function e(e){var t=" "+e+" znak";return e%10<5&&e%10>0&&(e%100<5||e%100>19)?e%10>1&&(t+="a"):t+="ova",t}return{errorLoading:function(){return"Preuzimanje nije uspjelo."},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Unesite "+e(n)},inputTooShort:function(t){var n=t.minimum-t.input.length;return"Unesite još "+e(n)},loadingMore:function(){return"Učitavanje rezultata…"},maximumSelected:function(e){return"Maksimalan broj odabranih stavki je "+e.maximum},noResults:function(){return"Nema rezultata"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/hu.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Túl hosszú. "+t+" karakterrel több, mint kellene."},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Túl rövid. Még "+t+" karakter hiányzik."},loadingMore:function(){return"Töltés…"},maximumSelected:function(e){return"Csak "+e.maximum+" elemet lehet kiválasztani."},noResults:function(){return"Nincs találat."},searching:function(){return"Keresés…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/hu",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Túl hosszú. "+t+" karakterrel több, mint kellene."},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Túl rövid. Még "+t+" karakter hiányzik."},loadingMore:function(){return"Töltés…"},maximumSelected:function(e){return"Csak "+e.maximum+" elemet lehet kiválasztani."},noResults:function(){return"Nincs találat."},searching:function(){return"Keresés…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/id.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/id",[],function(){return{errorLoading:function(){return"Data tidak boleh diambil."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Hapuskan "+t+" huruf"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Masukkan "+t+" huruf lagi"},loadingMore:function(){return"Mengambil data…"},maximumSelected:function(e){return"Anda hanya dapat memilih "+e.maximum+" pilihan"},noResults:function(){return"Tidak ada data yang sesuai"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/id",[],function(){return{errorLoading:function(){return"Data tidak boleh diambil."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Hapuskan "+t+" huruf"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Masukkan "+t+" huruf lagi"},loadingMore:function(){return"Mengambil data…"},maximumSelected:function(e){return"Anda hanya dapat memilih "+e.maximum+" pilihan"},noResults:function(){return"Tidak ada data yang sesuai"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/is.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/is",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vinsamlegast styttið texta um "+t+" staf";return t<=1?n:n+"i"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vinsamlegast skrifið "+t+" staf";return t>1&&(n+="i"),n+=" í viðbót",n},loadingMore:function(){return"Sæki fleiri niðurstöður…"},maximumSelected:function(e){return"Þú getur aðeins valið "+e.maximum+" atriði"},noResults:function(){return"Ekkert fannst"},searching:function(){return"Leita…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/is",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vinsamlegast styttið texta um "+t+" staf";return t<=1?n:n+"i"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vinsamlegast skrifið "+t+" staf";return t>1&&(n+="i"),n+=" í viðbót",n},loadingMore:function(){return"Sæki fleiri niðurstöður…"},maximumSelected:function(e){return"Þú getur aðeins valið "+e.maximum+" atriði"},noResults:function(){return"Ekkert fannst"},searching:function(){return"Leita…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/it.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/it",[],function(){return{errorLoading:function(){return"I risultati non possono essere caricati."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Per favore cancella "+t+" caratter";return t!==1?n+="i":n+="e",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Per favore inserisci "+t+" o più caratteri";return n},loadingMore:function(){return"Caricando più risultati…"},maximumSelected:function(e){var t="Puoi selezionare solo "+e.maximum+" element";return e.maximum!==1?t+="i":t+="o",t},noResults:function(){return"Nessun risultato trovato"},searching:function(){return"Sto cercando…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/it",[],function(){return{errorLoading:function(){return"I risultati non possono essere caricati."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Per favore cancella "+t+" caratter";return t!==1?n+="i":n+="e",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Per favore inserisci "+t+" o più caratteri";return n},loadingMore:function(){return"Caricando più risultati…"},maximumSelected:function(e){var t="Puoi selezionare solo "+e.maximum+" element";return e.maximum!==1?t+="i":t+="o",t},noResults:function(){return"Nessun risultato trovato"},searching:function(){return"Sto cercando…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/ja.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ja",[],function(){return{errorLoading:function(){return"結果が読み込まれませんでした"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" 文字を削除してください";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="少なくとも "+t+" 文字を入力してください";return n},loadingMore:function(){return"読み込み中…"},maximumSelected:function(e){var t=e.maximum+" 件しか選択できません";return t},noResults:function(){return"対象が見つかりません"},searching:function(){return"検索しています…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ja",[],function(){return{errorLoading:function(){return"結果が読み込まれませんでした"},inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" 文字を削除してください";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="少なくとも "+t+" 文字を入力してください";return n},loadingMore:function(){return"読み込み中…"},maximumSelected:function(e){var t=e.maximum+" 件しか選択できません";return t},noResults:function(){return"対象が見つかりません"},searching:function(){return"検索しています…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/ko.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ko",[],function(){return{errorLoading:function(){return"결과를 불러올 수 없습니다."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="너무 깁니다. "+t+" 글자 지워주세요.";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="너무 짧습니다. "+t+" 글자 더 입력해주세요.";return n},loadingMore:function(){return"불러오는 중…"},maximumSelected:function(e){var t="최대 "+e.maximum+"개까지만 선택 가능합니다.";return t},noResults:function(){return"결과가 없습니다."},searching:function(){return"검색 중…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ko",[],function(){return{errorLoading:function(){return"결과를 불러올 수 없습니다."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="너무 깁니다. "+t+" 글자 지워주세요.";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="너무 짧습니다. "+t+" 글자 더 입력해주세요.";return n},loadingMore:function(){return"불러오는 중…"},maximumSelected:function(e){var t="최대 "+e.maximum+"개까지만 선택 가능합니다.";return t},noResults:function(){return"결과가 없습니다."},searching:function(){return"검색 중…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/lt.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lt",[],function(){function e(e,t,n,r){return e%100>9&&e%100<21||e%10===0?e%10>1?n:r:t}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Pašalinkite "+n+" simbol";return r+=e(n,"ių","ius","į"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Įrašykite dar "+n+" simbol";return r+=e(n,"ių","ius","į"),r},loadingMore:function(){return"Kraunama daugiau rezultatų…"},maximumSelected:function(t){var n="Jūs galite pasirinkti tik "+t.maximum+" element";return n+=e(t.maximum,"ų","us","ą"),n},noResults:function(){return"Atitikmenų nerasta"},searching:function(){return"Ieškoma…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lt",[],function(){function e(e,t,n,r){return e%100>9&&e%100<21||e%10===0?e%10>1?n:r:t}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Pašalinkite "+n+" simbol";return r+=e(n,"ių","ius","į"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Įrašykite dar "+n+" simbol";return r+=e(n,"ių","ius","į"),r},loadingMore:function(){return"Kraunama daugiau rezultatų…"},maximumSelected:function(t){var n="Jūs galite pasirinkti tik "+t.maximum+" element";return n+=e(t.maximum,"ų","us","ą"),n},noResults:function(){return"Atitikmenų nerasta"},searching:function(){return"Ieškoma…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/lv.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lv",[],function(){function e(e,t,n,r){return e===11?t:e%10===1?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Lūdzu ievadiet par "+n;return r+=" simbol"+e(n,"iem","u","iem"),r+" mazāk"},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Lūdzu ievadiet vēl "+n;return r+=" simbol"+e(n,"us","u","us"),r},loadingMore:function(){return"Datu ielāde…"},maximumSelected:function(t){var n="Jūs varat izvēlēties ne vairāk kā "+t.maximum;return n+=" element"+e(t.maximum,"us","u","us"),n},noResults:function(){return"Sakritību nav"},searching:function(){return"Meklēšana…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/lv",[],function(){function e(e,t,n,r){return e===11?t:e%10===1?n:r}return{inputTooLong:function(t){var n=t.input.length-t.maximum,r="Lūdzu ievadiet par "+n;return r+=" simbol"+e(n,"iem","u","iem"),r+" mazāk"},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Lūdzu ievadiet vēl "+n;return r+=" simbol"+e(n,"us","u","us"),r},loadingMore:function(){return"Datu ielāde…"},maximumSelected:function(t){var n="Jūs varat izvēlēties ne vairāk kā "+t.maximum;return n+=" element"+e(t.maximum,"us","u","us"),n},noResults:function(){return"Sakritību nav"},searching:function(){return"Meklēšana…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/mk.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/mk",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Ве молиме внесете "+e.maximum+" помалку карактер";return e.maximum!==1&&(n+="и"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Ве молиме внесете уште "+e.maximum+" карактер";return e.maximum!==1&&(n+="и"),n},loadingMore:function(){return"Вчитување резултати…"},maximumSelected:function(e){var t="Можете да изберете само "+e.maximum+" ставк";return e.maximum===1?t+="а":t+="и",t},noResults:function(){return"Нема пронајдено совпаѓања"},searching:function(){return"Пребарување…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/mk",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Ве молиме внесете "+e.maximum+" помалку карактер";return e.maximum!==1&&(n+="и"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Ве молиме внесете уште "+e.maximum+" карактер";return e.maximum!==1&&(n+="и"),n},loadingMore:function(){return"Вчитување резултати…"},maximumSelected:function(e){var t="Можете да изберете само "+e.maximum+" ставк";return e.maximum===1?t+="а":t+="и",t},noResults:function(){return"Нема пронајдено совпаѓања"},searching:function(){return"Пребарување…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/ms.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ms",[],function(){return{errorLoading:function(){return"Keputusan tidak berjaya dimuatkan."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Sila hapuskan "+t+" aksara"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Sila masukkan "+t+" atau lebih aksara"},loadingMore:function(){return"Sedang memuatkan keputusan…"},maximumSelected:function(e){return"Anda hanya boleh memilih "+e.maximum+" pilihan"},noResults:function(){return"Tiada padanan yang ditemui"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ms",[],function(){return{errorLoading:function(){return"Keputusan tidak berjaya dimuatkan."},inputTooLong:function(e){var t=e.input.length-e.maximum;return"Sila hapuskan "+t+" aksara"},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Sila masukkan "+t+" atau lebih aksara"},loadingMore:function(){return"Sedang memuatkan keputusan…"},maximumSelected:function(e){return"Anda hanya boleh memilih "+e.maximum+" pilihan"},noResults:function(){return"Tiada padanan yang ditemui"},searching:function(){return"Mencari…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/nb.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nb",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Vennligst fjern "+t+" tegn"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vennligst skriv inn ";return t>1?n+=" flere tegn":n+=" tegn til",n},loadingMore:function(){return"Laster flere resultater…"},maximumSelected:function(e){return"Du kan velge maks "+e.maximum+" elementer"},noResults:function(){return"Ingen treff"},searching:function(){return"Søker…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nb",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum;return"Vennligst fjern "+t+" tegn"},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vennligst skriv inn ";return t>1?n+=" flere tegn":n+=" tegn til",n},loadingMore:function(){return"Laster flere resultater…"},maximumSelected:function(e){return"Du kan velge maks "+e.maximum+" elementer"},noResults:function(){return"Ingen treff"},searching:function(){return"Søker…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/nl.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nl",[],function(){return{errorLoading:function(){return"De resultaten konden niet worden geladen."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Gelieve "+t+" karakters te verwijderen";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Gelieve "+t+" of meer karakters in te voeren";return n},loadingMore:function(){return"Meer resultaten laden…"},maximumSelected:function(e){var t=e.maximum==1?"kan":"kunnen",n="Er "+t+" maar "+e.maximum+" item";return e.maximum!=1&&(n+="s"),n+=" worden geselecteerd",n},noResults:function(){return"Geen resultaten gevonden…"},searching:function(){return"Zoeken…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/nl",[],function(){return{errorLoading:function(){return"De resultaten konden niet worden geladen."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Gelieve "+t+" karakters te verwijderen";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Gelieve "+t+" of meer karakters in te voeren";return n},loadingMore:function(){return"Meer resultaten laden…"},maximumSelected:function(e){var t=e.maximum==1?"kan":"kunnen",n="Er "+t+" maar "+e.maximum+" item";return e.maximum!=1&&(n+="s"),n+=" worden geselecteerd",n},noResults:function(){return"Geen resultaten gevonden…"},searching:function(){return"Zoeken…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/pl.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pl",[],function(){var e=["znak","znaki","znaków"],t=["element","elementy","elementów"],n=function(t,n){if(t===1)return n[0];if(t>1&&t<=4)return n[1];if(t>=5)return n[2]};return{errorLoading:function(){return"Nie można załadować wyników."},inputTooLong:function(t){var r=t.input.length-t.maximum;return"Usuń "+r+" "+n(r,e)},inputTooShort:function(t){var r=t.minimum-t.input.length;return"Podaj przynajmniej "+r+" "+n(r,e)},loadingMore:function(){return"Trwa ładowanie…"},maximumSelected:function(e){return"Możesz zaznaczyć tylko "+e.maximum+" "+n(e.maximum,t)},noResults:function(){return"Brak wyników"},searching:function(){return"Trwa wyszukiwanie…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pl",[],function(){var e=["znak","znaki","znaków"],t=["element","elementy","elementów"],n=function(t,n){if(t===1)return n[0];if(t>1&&t<=4)return n[1];if(t>=5)return n[2]};return{errorLoading:function(){return"Nie można załadować wyników."},inputTooLong:function(t){var r=t.input.length-t.maximum;return"Usuń "+r+" "+n(r,e)},inputTooShort:function(t){var r=t.minimum-t.input.length;return"Podaj przynajmniej "+r+" "+n(r,e)},loadingMore:function(){return"Trwa ładowanie…"},maximumSelected:function(e){return"Możesz zaznaczyć tylko "+e.maximum+" "+n(e.maximum,t)},noResults:function(){return"Brak wyników"},searching:function(){return"Trwa wyszukiwanie…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/pt-BR.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt-BR",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Apague "+t+" caracter";return t!=1&&(n+="es"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Digite "+t+" ou mais caracteres";return n},loadingMore:function(){return"Carregando mais resultados…"},maximumSelected:function(e){var t="Você só pode selecionar "+e.maximum+" ite";return e.maximum==1?t+="m":t+="ns",t},noResults:function(){return"Nenhum resultado encontrado"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt-BR",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Apague "+t+" caracter";return t!=1&&(n+="es"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Digite "+t+" ou mais caracteres";return n},loadingMore:function(){return"Carregando mais resultados…"},maximumSelected:function(e){var t="Você só pode selecionar "+e.maximum+" ite";return e.maximum==1?t+="m":t+="ns",t},noResults:function(){return"Nenhum resultado encontrado"},searching:function(){return"Buscando…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/pt.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor apague "+t+" ";return n+=t!=1?"caracteres":"carácter",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Introduza "+t+" ou mais caracteres";return n},loadingMore:function(){return"A carregar mais resultados…"},maximumSelected:function(e){var t="Apenas pode seleccionar "+e.maximum+" ";return t+=e.maximum!=1?"itens":"item",t},noResults:function(){return"Sem resultados"},searching:function(){return"A procurar…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/pt",[],function(){return{errorLoading:function(){return"Os resultados não puderam ser carregados."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Por favor apague "+t+" ";return n+=t!=1?"caracteres":"carácter",n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Introduza "+t+" ou mais caracteres";return n},loadingMore:function(){return"A carregar mais resultados…"},maximumSelected:function(e){var t="Apenas pode seleccionar "+e.maximum+" ";return t+=e.maximum!=1?"itens":"item",t},noResults:function(){return"Sem resultados"},searching:function(){return"A procurar…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/ro.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ro",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vă rugăm să introduceți mai puțin de "+t;return n+=" caracter",n!==1&&(n+="e"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vă rugăm să introduceți incă "+t;return n+=" caracter",n!==1&&(n+="e"),n},loadingMore:function(){return"Se încarcă…"},maximumSelected:function(e){var t="Aveți voie să selectați cel mult "+e.maximum;return t+=" element",t!==1&&(t+="e"),t},noResults:function(){return"Nu a fost găsit nimic"},searching:function(){return"Căutare…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ro",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vă rugăm să introduceți mai puțin de "+t;return n+=" caracter",n!==1&&(n+="e"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vă rugăm să introduceți incă "+t;return n+=" caracter",n!==1&&(n+="e"),n},loadingMore:function(){return"Se încarcă…"},maximumSelected:function(e){var t="Aveți voie să selectați cel mult "+e.maximum;return t+=" element",t!==1&&(t+="e"),t},noResults:function(){return"Nu a fost găsit nimic"},searching:function(){return"Căutare…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/ru.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ru",[],function(){function e(e,t,n,r){return e%10<5&&e%10>0&&e%100<5||e%100>20?e%10>1?n:t:r}return{errorLoading:function(){return"Невозможно загрузить результаты"},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Пожалуйста, введите на "+n+" символ";return r+=e(n,"","a","ов"),r+=" меньше",r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Пожалуйста, введите еще хотя бы "+n+" символ";return r+=e(n,"","a","ов"),r},loadingMore:function(){return"Загрузка данных…"},maximumSelected:function(t){var n="Вы можете выбрать не более "+t.maximum+" элемент";return n+=e(t.maximum,"","a","ов"),n},noResults:function(){return"Совпадений не найдено"},searching:function(){return"Поиск…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/ru",[],function(){function e(e,t,n,r){return e%10<5&&e%10>0&&e%100<5||e%100>20?e%10>1?n:t:r}return{errorLoading:function(){return"Невозможно загрузить результаты"},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Пожалуйста, введите на "+n+" символ";return r+=e(n,"","a","ов"),r+=" меньше",r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Пожалуйста, введите еще хотя бы "+n+" символ";return r+=e(n,"","a","ов"),r},loadingMore:function(){return"Загрузка данных…"},maximumSelected:function(t){var n="Вы можете выбрать не более "+t.maximum+" элемент";return n+=e(t.maximum,"","a","ов"),n},noResults:function(){return"Совпадений не найдено"},searching:function(){return"Поиск…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/sk.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sk",[],function(){var e={2:function(e){return e?"dva":"dve"},3:function(){return"tri"},4:function(){return"štyri"}};return{inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím, zadajte o jeden znak menej":n>=2&&n<=4?"Prosím, zadajte o "+e[n](!0)+" znaky menej":"Prosím, zadajte o "+n+" znakov menej"},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím, zadajte ešte jeden znak":n<=4?"Prosím, zadajte ešte ďalšie "+e[n](!0)+" znaky":"Prosím, zadajte ešte ďalších "+n+" znakov"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(t){return t.maximum==1?"Môžete zvoliť len jednu položku":t.maximum>=2&&t.maximum<=4?"Môžete zvoliť najviac "+e[t.maximum](!1)+" položky":"Môžete zvoliť najviac "+t.maximum+" položiek"},noResults:function(){return"Nenašli sa žiadne položky"},searching:function(){return"Vyhľadávanie…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sk",[],function(){var e={2:function(e){return e?"dva":"dve"},3:function(){return"tri"},4:function(){return"štyri"}};return{inputTooLong:function(t){var n=t.input.length-t.maximum;return n==1?"Prosím, zadajte o jeden znak menej":n>=2&&n<=4?"Prosím, zadajte o "+e[n](!0)+" znaky menej":"Prosím, zadajte o "+n+" znakov menej"},inputTooShort:function(t){var n=t.minimum-t.input.length;return n==1?"Prosím, zadajte ešte jeden znak":n<=4?"Prosím, zadajte ešte ďalšie "+e[n](!0)+" znaky":"Prosím, zadajte ešte ďalších "+n+" znakov"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(t){return t.maximum==1?"Môžete zvoliť len jednu položku":t.maximum>=2&&t.maximum<=4?"Môžete zvoliť najviac "+e[t.maximum](!1)+" položky":"Môžete zvoliť najviac "+t.maximum+" položiek"},noResults:function(){return"Nenašli sa žiadne položky"},searching:function(){return"Vyhľadávanie…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/sr-Cyrl.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr-Cyrl",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Преузимање није успело."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Обришите "+n+" симбол";return r+=e(n,"","а","а"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Укуцајте бар још "+n+" симбол";return r+=e(n,"","а","а"),r},loadingMore:function(){return"Преузимање још резултата…"},maximumSelected:function(t){var n="Можете изабрати само "+t.maximum+" ставк";return n+=e(t.maximum,"у","е","и"),n},noResults:function(){return"Ништа није пронађено"},searching:function(){return"Претрага…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr-Cyrl",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Преузимање није успело."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Обришите "+n+" симбол";return r+=e(n,"","а","а"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Укуцајте бар још "+n+" симбол";return r+=e(n,"","а","а"),r},loadingMore:function(){return"Преузимање још резултата…"},maximumSelected:function(t){var n="Можете изабрати само "+t.maximum+" ставк";return n+=e(t.maximum,"у","е","и"),n},noResults:function(){return"Ништа није пронађено"},searching:function(){return"Претрага…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/sr.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Preuzimanje nije uspelo."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Obrišite "+n+" simbol";return r+=e(n,"","a","a"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Ukucajte bar još "+n+" simbol";return r+=e(n,"","a","a"),r},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(t){var n="Možete izabrati samo "+t.maximum+" stavk";return n+=e(t.maximum,"u","e","i"),n},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sr",[],function(){function e(e,t,n,r){return e%10==1&&e%100!=11?t:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?n:r}return{errorLoading:function(){return"Preuzimanje nije uspelo."},inputTooLong:function(t){var n=t.input.length-t.maximum,r="Obrišite "+n+" simbol";return r+=e(n,"","a","a"),r},inputTooShort:function(t){var n=t.minimum-t.input.length,r="Ukucajte bar još "+n+" simbol";return r+=e(n,"","a","a"),r},loadingMore:function(){return"Preuzimanje još rezultata…"},maximumSelected:function(t){var n="Možete izabrati samo "+t.maximum+" stavk";return n+=e(t.maximum,"u","e","i"),n},noResults:function(){return"Ništa nije pronađeno"},searching:function(){return"Pretraga…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/sv.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sv",[],function(){return{errorLoading:function(){return"Resultat kunde inte laddas."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vänligen sudda ut "+t+" tecken";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vänligen skriv in "+t+" eller fler tecken";return n},loadingMore:function(){return"Laddar fler resultat…"},maximumSelected:function(e){var t="Du kan max välja "+e.maximum+" element";return t},noResults:function(){return"Inga träffar"},searching:function(){return"Söker…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/sv",[],function(){return{errorLoading:function(){return"Resultat kunde inte laddas."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vänligen sudda ut "+t+" tecken";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vänligen skriv in "+t+" eller fler tecken";return n},loadingMore:function(){return"Laddar fler resultat…"},maximumSelected:function(e){var t="Du kan max välja "+e.maximum+" element";return t},noResults:function(){return"Inga träffar"},searching:function(){return"Söker…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/th.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/th",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="โปรดลบออก "+t+" ตัวอักษร";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="โปรดพิมพ์เพิ่มอีก "+t+" ตัวอักษร";return n},loadingMore:function(){return"กำลังค้นข้อมูลเพิ่ม…"},maximumSelected:function(e){var t="คุณสามารถเลือกได้ไม่เกิน "+e.maximum+" รายการ";return t},noResults:function(){return"ม่พบข้อมูล"},searching:function(){return"กำลังค้นข้อมูล…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/th",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="โปรดลบออก "+t+" ตัวอักษร";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="โปรดพิมพ์เพิ่มอีก "+t+" ตัวอักษร";return n},loadingMore:function(){return"กำลังค้นข้อมูลเพิ่ม…"},maximumSelected:function(e){var t="คุณสามารถเลือกได้ไม่เกิน "+e.maximum+" รายการ";return t},noResults:function(){return"ม่พบข้อมูล"},searching:function(){return"กำลังค้นข้อมูล…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/tr.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/tr",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" karakter daha girmelisiniz";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="En az "+t+" karakter daha girmelisiniz";return n},loadingMore:function(){return"Daha fazla…"},maximumSelected:function(e){var t="Sadece "+e.maximum+" seçim yapabilirsiniz";return t},noResults:function(){return"Sonuç bulunamadı"},searching:function(){return"Aranıyor…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/tr",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n=t+" karakter daha girmelisiniz";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="En az "+t+" karakter daha girmelisiniz";return n},loadingMore:function(){return"Daha fazla…"},maximumSelected:function(e){var t="Sadece "+e.maximum+" seçim yapabilirsiniz";return t},noResults:function(){return"Sonuç bulunamadı"},searching:function(){return"Aranıyor…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/uk.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/uk",[],function(){function e(e,t,n,r){return e%100>10&&e%100<15?r:e%10===1?t:e%10>1&&e%10<5?n:r}return{errorLoading:function(){return"Неможливо завантажити результати"},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Будь ласка, видаліть "+n+" "+e(t.maximum,"літеру","літери","літер")},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Будь ласка, введіть "+t+" або більше літер"},loadingMore:function(){return"Завантаження інших результатів…"},maximumSelected:function(t){return"Ви можете вибрати лише "+t.maximum+" "+e(t.maximum,"пункт","пункти","пунктів")},noResults:function(){return"Нічого не знайдено"},searching:function(){return"Пошук…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/uk",[],function(){function e(e,t,n,r){return e%100>10&&e%100<15?r:e%10===1?t:e%10>1&&e%10<5?n:r}return{errorLoading:function(){return"Неможливо завантажити результати"},inputTooLong:function(t){var n=t.input.length-t.maximum;return"Будь ласка, видаліть "+n+" "+e(t.maximum,"літеру","літери","літер")},inputTooShort:function(e){var t=e.minimum-e.input.length;return"Будь ласка, введіть "+t+" або більше літер"},loadingMore:function(){return"Завантаження інших результатів…"},maximumSelected:function(t){return"Ви можете вибрати лише "+t.maximum+" "+e(t.maximum,"пункт","пункти","пунктів")},noResults:function(){return"Нічого не знайдено"},searching:function(){return"Пошук…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/vi.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/vi",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vui lòng nhập ít hơn "+t+" ký tự";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vui lòng nhập nhiều hơn "+t+' ký tự"';return n},loadingMore:function(){return"Đang lấy thêm kết quả…"},maximumSelected:function(e){var t="Chỉ có thể chọn được "+e.maximum+" lựa chọn";return t},noResults:function(){return"Không tìm thấy kết quả"},searching:function(){return"Đang tìm…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/vi",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Vui lòng nhập ít hơn "+t+" ký tự";return t!=1&&(n+="s"),n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="Vui lòng nhập nhiều hơn "+t+' ký tự"';return n},loadingMore:function(){return"Đang lấy thêm kết quả…"},maximumSelected:function(e){var t="Chỉ có thể chọn được "+e.maximum+" lựa chọn";return t},noResults:function(){return"Không tìm thấy kết quả"},searching:function(){return"Đang tìm…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/zh-CN.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-CN",[],function(){return{errorLoading:function(){return"无法载入结果。"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="请删除"+t+"个字符";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="请再输入至少"+t+"个字符";return n},loadingMore:function(){return"载入更多结果…"},maximumSelected:function(e){var t="最多只能选择"+e.maximum+"个项目";return t},noResults:function(){return"未找到结果"},searching:function(){return"搜索中…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-CN",[],function(){return{errorLoading:function(){return"无法载入结果。"},inputTooLong:function(e){var t=e.input.length-e.maximum,n="请删除"+t+"个字符";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="请再输入至少"+t+"个字符";return n},loadingMore:function(){return"载入更多结果…"},maximumSelected:function(e){var t="最多只能选择"+e.maximum+"个项目";return t},noResults:function(){return"未找到结果"},searching:function(){return"搜索中…"}}}),{define:e.define,require:e.require}})();
assets/js/i18n/zh-TW.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
-
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-TW",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="請刪掉"+t+"個字元";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="請再輸入"+t+"個字元";return n},loadingMore:function(){return"載入中…"},maximumSelected:function(e){var t="你只能選擇最多"+e.maximum+"項";return t},noResults:function(){return"沒有找到相符的項目"},searching:function(){return"搜尋中…"}}}),{define:e.define,require:e.require}})();
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */
2
+
3
  (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/zh-TW",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="請刪掉"+t+"個字元";return n},inputTooShort:function(e){var t=e.minimum-e.input.length,n="請再輸入"+t+"個字元";return n},loadingMore:function(){return"載入中…"},maximumSelected:function(e){var t="你只能選擇最多"+e.maximum+"項";return t},noResults:function(){return"沒有找到相符的項目"},searching:function(){return"搜尋中…"}}}),{define:e.define,require:e.require}})();
assets/js/select2.min.js CHANGED
@@ -1,2 +1,2 @@
1
- /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(n=n.slice(0,n.length-1),a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.concat(a),k=0;k<a.length;k+=1)if(m=a[k],"."===m)a.splice(k,1),k-=1;else if(".."===m){if(1===k&&(".."===a[2]||".."===a[0]))break;k>0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){return n.apply(b,v.call(arguments,0).concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(a){if(e(r,a)){var c=r[a];delete r[a],t[a]=!0,m.apply(b,c)}if(!e(q,a)&&!e(t,a))throw new Error("No "+a);return q[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(a,c,d,f){var h,k,l,m,n,s,u=[],v=typeof d;if(f=f||a,"undefined"===v||"function"===v){for(c=!c.length&&d.length?["require","exports","module"]:c,n=0;n<c.length;n+=1)if(m=o(c[n],f),k=m.f,"require"===k)u[n]=p.require(a);else if("exports"===k)u[n]=p.exports(a),s=!0;else if("module"===k)h=u[n]=p.module(a);else if(e(q,k)||e(r,k)||e(t,k))u[n]=j(k);else{if(!m.p)throw new Error(a+" missing "+k);m.p.load(m.n,g(f,!0),i(k),{}),u[n]=q[k]}l=d?d.apply(q[a],u):void 0,a&&(h&&h.exports!==b&&h.exports!==q[a]?q[a]=h.exports:l===b&&s||(q[a]=l))}else a&&(q[a]=d)},a=c=n=function(a,c,d,e,f){if("string"==typeof a)return p[a]?p[a](c):j(o(a,c).f);if(!a.splice){if(s=a,s.deps&&n(s.deps,s.callback),!c)return;c.splice?(a=c,c=d,d=null):a=b}return c=c||function(){},"function"==typeof d&&(d=e,e=f),e?m(b,a,c,d):setTimeout(function(){m(b,a,c,d)},4),n},n.config=function(a){return n(a)},a._defined=q,d=function(a,b,c){b.splice||(c=b,b=[]),e(q,a)||e(r,a)||(r[a]=[a,b,c])},d.amd={jQuery:!0}}(),b.requirejs=a,b.require=c,b.define=d}}(),b.define("almond",function(){}),b.define("jquery",[],function(){var b=a||$;return null==b&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),b}),b.define("select2/utils",["jquery"],function(a){function b(a){var b=a.prototype,c=[];for(var d in b){var e=b[d];"function"==typeof e&&"constructor"!==d&&c.push(d)}return c}var c={};c.Extend=function(a,b){function c(){this.constructor=a}var d={}.hasOwnProperty;for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},c.Decorate=function(a,c){function d(){var b=Array.prototype.unshift,d=c.prototype.constructor.length,e=a.prototype.constructor;d>0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;h<g.length;h++){var i=g[h];d.prototype[i]=a.prototype[i]}for(var j=(function(a){var b=function(){};a in d.prototype&&(b=d.prototype[a]);var e=c.prototype[a];return function(){var a=Array.prototype.unshift;return a.call(arguments,b),e.apply(this,arguments)}}),k=0;k<f.length;k++){var l=f[k];d.prototype[l]=j(l)}return d};var d=function(){this.listeners={}};return d.prototype.on=function(a,b){this.listeners=this.listeners||{},a in this.listeners?this.listeners[a].push(b):this.listeners[a]=[b]},d.prototype.trigger=function(a){var b=Array.prototype.slice;this.listeners=this.listeners||{},a in this.listeners&&this.invoke(this.listeners[a],b.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},d.prototype.invoke=function(a,b){for(var c=0,d=a.length;d>c;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;a>c;c++){var d=Math.floor(36*Math.random());b+=d.toString(36)}return b},c.bind=function(a,b){return function(){a.apply(b,arguments)}},c._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e<c.length;e++){var f=c[e];f=f.substring(0,1).toLowerCase()+f.substring(1),f in d||(d[f]={}),e==c.length-1&&(d[f]=a[b]),d=d[f]}delete a[b]}}return a},c.hasScroll=function(b,c){var d=a(c),e=c.style.overflowX,f=c.style.overflowY;return e!==f||"hidden"!==f&&"visible"!==f?"scroll"===e||"scroll"===f?!0:d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth:!1},c.escapeMarkup=function(a){var b={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c<a.results.length;c++){var d=a.results[c],e=this.option(d);b.push(e)}this.$results.append(b)},c.prototype.position=function(a,b){var c=b.find(".select2-results");c.append(a)},c.prototype.sort=function(a){var b=this.options.get("sorter");return b(a)},c.prototype.setClasses=function(){var b=this;this.data.current(function(c){var d=a.map(c,function(a){return a.id.toString()}),e=b.$results.find(".select2-results__option[aria-selected]");e.each(function(){var b=a(this),c=a.data(this,"data"),e=""+c.id;null!=c.element&&c.element.selected||null==c.element&&a.inArray(e,d)>-1?b.attr("aria-selected","true"):b.attr("aria-selected","false")});var f=e.filter("[aria-selected=true]");f.length>0?f.first().trigger("mouseenter"):e.first().trigger("mouseenter")})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(b){var c=document.createElement("li");c.className="select2-results__option";var d={role:"treeitem","aria-selected":"false"};b.disabled&&(delete d["aria-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["aria-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d.role="group",d["aria-label"]=b.text,delete d["aria-selected"]);for(var e in d){var f=d[e];c.setAttribute(e,f)}if(b.children){var g=a(c),h=document.createElement("strong");h.className="select2-results__group";a(h);this.template(b,h);for(var i=[],j=0;j<b.children.length;j++){var k=b.children[j],l=this.option(k);i.push(l)}var m=a("<ul></ul>",{"class":"select2-results__options select2-results__options--nested"});m.append(i),g.append(h),g.append(m)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b,c){var d=this,e=b.id+"-results";this.$results.attr("id",e),b.on("results:all",function(a){d.clear(),d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("results:append",function(a){d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("query",function(a){d.hideMessages(),d.showLoading(a)}),b.on("select",function(){b.isOpen()&&d.setClasses()}),b.on("unselect",function(){b.isOpen()&&d.setClasses()}),b.on("open",function(){d.$results.attr("aria-expanded","true"),d.$results.attr("aria-hidden","false"),d.setClasses(),d.ensureHighlightVisible()}),b.on("close",function(){d.$results.attr("aria-expanded","false"),d.$results.attr("aria-hidden","true"),d.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=d.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=d.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("aria-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a);if(0!==c){var e=c-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top,h=f.offset().top,i=d.$results.scrollTop()+(h-g);0===e?d.$results.scrollTop(0):0>h-g&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a),e=c+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top+d.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=d.$results.scrollTop()+h-g;0===e?d.$results.scrollTop(0):h>g&&d.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),b.on("results:message",function(a){d.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=d.$results.scrollTop(),c=d.$results.get(0).scrollHeight-d.$results.scrollTop()+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=d.$results.height();e?(d.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(d.$results.scrollTop(d.$results.get(0).scrollHeight-d.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(b){var c=a(this),e=c.data("data");return"true"===c.attr("aria-selected")?void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{})):void d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){var a=this.$results.find(".select2-results__option--highlighted");return a},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),2>=c?this.$results.scrollTop(0):(g>this.$results.outerHeight()||0>g)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){var a={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return a}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a,b){var d=this,e=(a.id+"-container",a.id+"-results");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.focus(),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2"),e=a(".select2.select2-container--open");e.each(function(){var b=a(this);if(this!=d[0]){var c=b.data("element");c.select2("close")}})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){var c=b.find(".selection");c.append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("selection:update",function(a){c.update(a.data)})},e.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},e.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},e.prototype.selectionContainer=function(){return a("<span></span>")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.prop("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('<ul class="select2-selection__rendered"></ul>'),a},d.prototype.bind=function(b,c){var e=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){e.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!e.options.get("disabled")){var c=a(this),d=c.parent(),f=d.data("data");e.trigger("unselect",{originalEvent:b,data:f})}})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},d.prototype.selectionContainer=function(){var b=a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>');return b},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d<a.length;d++){var e=a[d],f=this.selectionContainer(),g=this.display(e,f);f.append(g),f.prop("title",e.title||e.text),f.data("data",e),b.push(f)}var h=this.$selection.find(".select2-selection__rendered");c.appendMany(h,b)}},d}),b.define("select2/selection/placeholder",["../utils"],function(a){function b(a,b,c){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c)}return b.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},b.prototype.createPlaceholder=function(a,b){var c=this.selectionContainer();return c.html(this.display(b)),c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),c},b.prototype.update=function(a,b){var c=1==b.length&&b[0].id!=this.placeholder.id,d=b.length>1;if(d||c)return a.call(this,b);this.clear();var e=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(e)},b}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e<d.length;e++){var f={data:d[e]};if(this.trigger("unselect",f),f.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},c.prototype._handleKeyboardClear=function(a,c,d){d.isOpen()||(c.which==b.DELETE||c.which==b.BACKSPACE)&&this._handleClear(c)},c.prototype.update=function(b,c){if(b.call(this,c),!(this.$selection.find(".select2-selection__placeholder").length>0||0===c.length)){var d=a('<span class="select2-selection__clear">&times;</span>');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,b,d){var e=this;a.call(this,b,d),b.on("open",function(){e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),e.$search.trigger("focus")}),b.on("enable",function(){e.$search.prop("disabled",!1),e._transferTabIndex()}),b.on("disable",function(){e.$search.prop("disabled",!0)}),b.on("focus",function(a){e.$search.trigger("focus")}),b.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.id)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented();var b=a.which;if(b===c.BACKSPACE&&""===e.$search.val()){var d=e.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var f=d.data("data");e.searchRemoveChoice(f),a.preventDefault()}}});var f=document.documentMode,g=f&&11>=f;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){return g?void e.$selection.off("input.search input.searchcheck"):void e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(g&&"input"===a.type)return void e.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&e.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.focus()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{var b=this.$search.val().length+1;a=.75*b+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){var a={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return a}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),d+=null!=c.id?"-"+c.id.toString():"-"+a.generateChars(4)},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f<a.length;f++){var g=a[f].id;-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")});else{var d=a.id;this.$element.val(d),this.$element.trigger("change")}},d.prototype.unselect=function(a){var b=this;if(this.$element.prop("multiple"))return a.selected=!1,c(a.element).is("option")?(a.element.selected=!1,void this.$element.trigger("change")):void this.current(function(d){
2
  for(var e=[],f=0;f<d.length;f++){var g=d[f].id;g!==a.id&&-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")})},d.prototype.bind=function(a,b){var c=this;this.container=a,a.on("select",function(a){c.select(a.data)}),a.on("unselect",function(a){c.unselect(a.data)})},d.prototype.destroy=function(){this.$element.find("*").each(function(){c.removeData(this,"data")})},d.prototype.query=function(a,b){var d=[],e=this,f=this.$element.children();f.each(function(){var b=c(this);if(b.is("option")||b.is("optgroup")){var f=e.item(b),g=e.matches(a,f);null!==g&&d.push(g)}}),b({results:d})},d.prototype.addOptions=function(a){b.appendMany(this.$element,a)},d.prototype.option=function(a){var b;a.children?(b=document.createElement("optgroup"),b.label=a.text):(b=document.createElement("option"),void 0!==b.textContent?b.textContent=a.text:b.innerText=a.text),a.id&&(b.value=a.id),a.disabled&&(b.disabled=!0),a.selected&&(b.selected=!0),a.title&&(b.title=a.title);var d=c(b),e=this._normalizeItem(a);return e.element=b,c.data(b,"data",e),d},d.prototype.item=function(a){var b={};if(b=c.data(a[0],"data"),null!=b)return b;if(a.is("option"))b={id:a.val(),text:a.text(),disabled:a.prop("disabled"),selected:a.prop("selected"),title:a.prop("title")};else if(a.is("optgroup")){b={text:a.prop("label"),children:[],title:a.prop("title")};for(var d=a.children("option"),e=[],f=0;f<d.length;f++){var g=c(d[f]),h=this.item(g);e.push(h)}b.children=e}return b=this._normalizeItem(b),b.element=a[0],c.data(a[0],"data",b),b},d.prototype._normalizeItem=function(a){c.isPlainObject(a)||(a={id:a,text:a}),a=c.extend({},{text:""},a);var b={selected:!1,disabled:!1};return null!=a.id&&(a.id=a.id.toString()),null!=a.text&&(a.text=a.text.toString()),null==a._resultId&&a.id&&null!=this.container&&(a._resultId=this.generateResultId(this.container,a)),c.extend({},b,a)},d.prototype.matches=function(a,b){var c=this.options.get("matcher");return c(a,b)},d}),b.define("select2/data/array",["./select","../utils","jquery"],function(a,b,c){function d(a,b){var c=b.get("data")||[];d.__super__.constructor.call(this,a,b),this.addOptions(this.convertToOptions(c))}return b.Extend(d,a),d.prototype.select=function(a){var b=this.$element.find("option").filter(function(b,c){return c.value==a.id.toString()});0===b.length&&(b=this.option(a),this.addOptions(b)),d.__super__.select.call(this,a)},d.prototype.convertToOptions=function(a){function d(a){return function(){return c(this).val()==a.id}}for(var e=this,f=this.$element.find("option"),g=f.map(function(){return e.item(c(this)).id}).get(),h=[],i=0;i<a.length;i++){var j=this._normalizeItem(a[i]);if(c.inArray(j.id,g)>=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},l,j),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&""!==a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");if(void 0!==f&&(this.createTag=f),b.call(this,c,d),a.isArray(e))for(var g=0;g<e.length;g++){var h=e[g],i=this._normalizeItem(h),j=this.option(i);this.$element.append(j)}}return b.prototype.query=function(a,b,c){function d(a,f){for(var g=a.results,h=0;h<g.length;h++){var i=g[h],j=null!=i.children&&!d({results:i.children},!0),k=i.text===b.term;if(k||j)return f?!1:(a.data=g,void c(a))}if(f)return!0;var l=e.createTag(b);if(null!=l){var m=e.option(l);m.attr("data-select2-tag",!0),e.addOptions([m]),e.insertTag(g,l)}a.results=g,c(a)}var e=this;return this._removeOldTags(),null==b.term||null!=b.page?void a.call(this,b,c):void a.call(this,b,d)},b.prototype.createTag=function(b,c){var d=a.trim(c.term);return""===d?null:{id:d,text:d}},b.prototype.insertTag=function(a,b,c){b.unshift(c)},b.prototype._removeOldTags=function(b){var c=(this._lastTag,this.$element.find("option[data-select2-tag]"));c.each(function(){this.selected||a(this).remove()})},b}),b.define("select2/data/tokenizer",["jquery"],function(a){function b(a,b,c){var d=c.get("tokenizer");void 0!==d&&(this.tokenizer=d),a.call(this,b,c)}return b.prototype.bind=function(a,b,c){a.call(this,b,c),this.$search=b.dropdown.$search||b.selection.$search||c.find(".select2-search__field")},b.prototype.query=function(a,b,c){function d(a){e.trigger("select",{data:a})}var e=this;b.term=b.term||"";var f=this.tokenizer(b,this.options,d);f.term!==b.term&&(this.$search.length&&(this.$search.val(f.term),this.$search.focus()),b.term=f.term),a.call(this,b,c)},b.prototype.tokenizer=function(b,c,d,e){for(var f=d.get("tokenSeparators")||[],g=c.term,h=0,i=this.createTag||function(a){return{id:a.term,text:a.term}};h<g.length;){var j=g[h];if(-1!==a.inArray(j,f)){var k=g.substr(0,h),l=a.extend({},c,{term:k}),m=i(l);null!=m?(e(m),g=g.substr(h+1)||"",h=0):h++}else h++}return{term:g}},b}),b.define("select2/data/minimumInputLength",[],function(){function a(a,b,c){this.minimumInputLength=c.get("minimumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",b.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumInputLength",[],function(){function a(a,b,c){this.maximumInputLength=c.get("maximumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",this.maximumInputLength>0&&b.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;return d.maximumSelectionLength>0&&f>=d.maximumSelectionLength?void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}}):void a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<span class="select2-dropdown"><span class="select2-results"></span></span>');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val("")}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){var b=e.showSearch(a);b?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){var c=e.$results.offset().top+e.$results.outerHeight(!1),d=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1);c+50>=d&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(a,b,c){this.$dropdownParent=c.get("dropdownParent")||document.body,a.call(this,b,c)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a("<span></span>"),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(b){var c=a(this).data("select2-scroll-position");a(this).scrollTop(c.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id,h=this.$container.parents().filter(b.hasScroll);h.off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=(this.$container.position(),this.$container.offset());f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.top<f.top-h.height,k=i.bottom>f.bottom+h.height,l={left:f.left,top:g.bottom};c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d<b.length;d++){var e=b[d];e.children?c+=a(e.children):c++}return c}function b(a,b,c,d){this.minimumResultsForSearch=c.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),a.call(this,b,c,d)}return b.prototype.showSearch=function(b,c){return a(c.data.results)<this.minimumResultsForSearch?!1:b.call(this,c)},b}),b.define("select2/dropdown/selectOnClose",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("close",function(){d._handleSelectOnClose()})},a.prototype._handleSelectOnClose=function(){var a=this.getHighlightedResults();a.length<1||this.trigger("select",{data:a.data("data")})},a}),b.define("select2/dropdown/closeOnSelect",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(a){d._selectTriggered(a)}),b.on("unselect",function(a){d._selectTriggered(a)})},a.prototype._selectTriggered=function(a,b){var c=b.originalEvent;c&&c.ctrlKey||this.trigger("close",{})},a}),b.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(a){var b=a.input.length-a.maximum,c="Please delete "+b+" character";return 1!=b&&(c+="s"),c},inputTooShort:function(a){var b=a.minimum-a.input.length,c="Please enter "+b+" or more characters";return c},loadingMore:function(){return"Loading more results…"},maximumSelected:function(a){var b="You can only select "+a.maximum+" item";return 1!=a.maximum&&(b+="s"),b},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),b.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C){function D(){this.reset()}D.prototype.apply=function(l){if(l=a.extend({},this.defaults,l),null==l.dataAdapter){if(null!=l.ajax?l.dataAdapter=o:null!=l.data?l.dataAdapter=n:l.dataAdapter=m,l.minimumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),(null!=l.tokenSeparators||null!=l.tokenizer)&&(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L<K.length;L++){var M=K[L],N={};try{N=k.loadPath(M)}catch(O){try{M=this.defaults.amdLanguageBase+M,N=k.loadPath(M)}catch(P){l.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+M+'" could not be automatically loaded. A fallback will be used instead.');continue}}J.extend(N)}l.translations=J}else{var Q=k.loadPath(this.defaults.amdLanguageBase+"en"),R=new k(l.language);R.extend(Q),l.translations=R}return l},D.prototype.reset=function(){function b(a){function b(a){return l[a]||a}return a.replace(/[^\u0000-\u007E]/g,b)}function c(d,e){if(""===a.trim(d.term))return e;if(e.children&&e.children.length>0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){var h=e.children[g],i=c(d,h);null==i&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var j=b(e.text).toUpperCase(),k=b(d.term).toUpperCase();return j.indexOf(k)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)};var E=new D;return E}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return 0>=e?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;i>h;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this._sync=c.bind(this._syncAttributes,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._sync);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._sync)}),this._observer.observe(this.$element[0],{attributes:!0,subtree:!1})):this.$element[0].addEventListener&&this.$element[0].addEventListener("DOMAttrModified",b._sync,!1)},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),(null==a||0===a.length)&&(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._sync),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&this.$element[0].removeEventListener("DOMAttrModified",this._sync,!1),this._sync=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},e.prototype.render=function(){var b=a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("jquery.select2",["jquery","require","./select2/core","./select2/defaults"],function(a,b,c,d){if(b("jquery.mousewheel"),null==a.fn.select2){var e=["open","close","destroy"];a.fn.select2=function(b){if(b=b||{},"object"==typeof b)return this.each(function(){var d=a.extend({},b,!0);new c(a(this),d)}),this;if("string"==typeof b){var d;return this.each(function(){var c=a(this).data("select2");null==c&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2.");var e=Array.prototype.slice.call(arguments,1);d=c[b].apply(c,e)}),a.inArray(b,e)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),b.define("jquery.mousewheel",["jquery"],function(a){return a}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c});
1
+ /*! Select2 4.0.1-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b=function(){if(a&&a.fn&&a.fn.select2&&a.fn.select2.amd)var b=a.fn.select2.amd;var b;return function(){if(!b||!b.requirejs){b?c=b:b={};var a,c,d;!function(b){function e(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(n=n.slice(0,n.length-1),a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.concat(a),k=0;k<a.length;k+=1)if(m=a[k],"."===m)a.splice(k,1),k-=1;else if(".."===m){if(1===k&&(".."===a[2]||".."===a[0]))break;k>0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(a,c){return function(){return n.apply(b,v.call(arguments,0).concat([a,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(a){if(e(r,a)){var c=r[a];delete r[a],t[a]=!0,m.apply(b,c)}if(!e(q,a)&&!e(t,a))throw new Error("No "+a);return q[a]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(a,c,d,f){var h,k,l,m,n,s,u=[],v=typeof d;if(f=f||a,"undefined"===v||"function"===v){for(c=!c.length&&d.length?["require","exports","module"]:c,n=0;n<c.length;n+=1)if(m=o(c[n],f),k=m.f,"require"===k)u[n]=p.require(a);else if("exports"===k)u[n]=p.exports(a),s=!0;else if("module"===k)h=u[n]=p.module(a);else if(e(q,k)||e(r,k)||e(t,k))u[n]=j(k);else{if(!m.p)throw new Error(a+" missing "+k);m.p.load(m.n,g(f,!0),i(k),{}),u[n]=q[k]}l=d?d.apply(q[a],u):void 0,a&&(h&&h.exports!==b&&h.exports!==q[a]?q[a]=h.exports:l===b&&s||(q[a]=l))}else a&&(q[a]=d)},a=c=n=function(a,c,d,e,f){if("string"==typeof a)return p[a]?p[a](c):j(o(a,c).f);if(!a.splice){if(s=a,s.deps&&n(s.deps,s.callback),!c)return;c.splice?(a=c,c=d,d=null):a=b}return c=c||function(){},"function"==typeof d&&(d=e,e=f),e?m(b,a,c,d):setTimeout(function(){m(b,a,c,d)},4),n},n.config=function(a){return n(a)},a._defined=q,d=function(a,b,c){b.splice||(c=b,b=[]),e(q,a)||e(r,a)||(r[a]=[a,b,c])},d.amd={jQuery:!0}}(),b.requirejs=a,b.require=c,b.define=d}}(),b.define("almond",function(){}),b.define("jquery",[],function(){var b=a||$;return null==b&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),b}),b.define("select2/utils",["jquery"],function(a){function b(a){var b=a.prototype,c=[];for(var d in b){var e=b[d];"function"==typeof e&&"constructor"!==d&&c.push(d)}return c}var c={};c.Extend=function(a,b){function c(){this.constructor=a}var d={}.hasOwnProperty;for(var e in b)d.call(b,e)&&(a[e]=b[e]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},c.Decorate=function(a,c){function d(){var b=Array.prototype.unshift,d=c.prototype.constructor.length,e=a.prototype.constructor;d>0&&(b.call(arguments,a.prototype.constructor),e=c.prototype.constructor),e.apply(this,arguments)}function e(){this.constructor=d}var f=b(c),g=b(a);c.displayName=a.displayName,d.prototype=new e;for(var h=0;h<g.length;h++){var i=g[h];d.prototype[i]=a.prototype[i]}for(var j=(function(a){var b=function(){};a in d.prototype&&(b=d.prototype[a]);var e=c.prototype[a];return function(){var a=Array.prototype.unshift;return a.call(arguments,b),e.apply(this,arguments)}}),k=0;k<f.length;k++){var l=f[k];d.prototype[l]=j(l)}return d};var d=function(){this.listeners={}};return d.prototype.on=function(a,b){this.listeners=this.listeners||{},a in this.listeners?this.listeners[a].push(b):this.listeners[a]=[b]},d.prototype.trigger=function(a){var b=Array.prototype.slice;this.listeners=this.listeners||{},a in this.listeners&&this.invoke(this.listeners[a],b.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},d.prototype.invoke=function(a,b){for(var c=0,d=a.length;d>c;c++)a[c].apply(this,b)},c.Observable=d,c.generateChars=function(a){for(var b="",c=0;a>c;c++){var d=Math.floor(36*Math.random());b+=d.toString(36)}return b},c.bind=function(a,b){return function(){a.apply(b,arguments)}},c._convertData=function(a){for(var b in a){var c=b.split("-"),d=a;if(1!==c.length){for(var e=0;e<c.length;e++){var f=c[e];f=f.substring(0,1).toLowerCase()+f.substring(1),f in d||(d[f]={}),e==c.length-1&&(d[f]=a[b]),d=d[f]}delete a[b]}}return a},c.hasScroll=function(b,c){var d=a(c),e=c.style.overflowX,f=c.style.overflowY;return e!==f||"hidden"!==f&&"visible"!==f?"scroll"===e||"scroll"===f?!0:d.innerHeight()<c.scrollHeight||d.innerWidth()<c.scrollWidth:!1},c.escapeMarkup=function(a){var b={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof a?a:String(a).replace(/[&<>"'\/\\]/g,function(a){return b[a]})},c.appendMany=function(b,c){if("1.7"===a.fn.jquery.substr(0,3)){var d=a();a.map(c,function(a){d=d.add(a)}),c=d}b.append(c)},c}),b.define("select2/results",["jquery","./utils"],function(a,b){function c(a,b,d){this.$element=a,this.data=d,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&b.attr("aria-multiselectable","true"),this.$results=b,b},c.prototype.clear=function(){this.$results.empty()},c.prototype.displayMessage=function(b){var c=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var d=a('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),e=this.options.get("translations").get(b.message);d.append(c(e(b.args))),d[0].className+=" select2-results__message",this.$results.append(d)},c.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},c.prototype.append=function(a){this.hideLoading();var b=[];if(null==a.results||0===a.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));a.results=this.sort(a.results);for(var c=0;c<a.results.length;c++){var d=a.results[c],e=this.option(d);b.push(e)}this.$results.append(b)},c.prototype.position=function(a,b){var c=b.find(".select2-results");c.append(a)},c.prototype.sort=function(a){var b=this.options.get("sorter");return b(a)},c.prototype.setClasses=function(){var b=this;this.data.current(function(c){var d=a.map(c,function(a){return a.id.toString()}),e=b.$results.find(".select2-results__option[aria-selected]");e.each(function(){var b=a(this),c=a.data(this,"data"),e=""+c.id;null!=c.element&&c.element.selected||null==c.element&&a.inArray(e,d)>-1?b.attr("aria-selected","true"):b.attr("aria-selected","false")});var f=e.filter("[aria-selected=true]");f.length>0?f.first().trigger("mouseenter"):e.first().trigger("mouseenter")})},c.prototype.showLoading=function(a){this.hideLoading();var b=this.options.get("translations").get("searching"),c={disabled:!0,loading:!0,text:b(a)},d=this.option(c);d.className+=" loading-results",this.$results.prepend(d)},c.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},c.prototype.option=function(b){var c=document.createElement("li");c.className="select2-results__option";var d={role:"treeitem","aria-selected":"false"};b.disabled&&(delete d["aria-selected"],d["aria-disabled"]="true"),null==b.id&&delete d["aria-selected"],null!=b._resultId&&(c.id=b._resultId),b.title&&(c.title=b.title),b.children&&(d.role="group",d["aria-label"]=b.text,delete d["aria-selected"]);for(var e in d){var f=d[e];c.setAttribute(e,f)}if(b.children){var g=a(c),h=document.createElement("strong");h.className="select2-results__group";a(h);this.template(b,h);for(var i=[],j=0;j<b.children.length;j++){var k=b.children[j],l=this.option(k);i.push(l)}var m=a("<ul></ul>",{"class":"select2-results__options select2-results__options--nested"});m.append(i),g.append(h),g.append(m)}else this.template(b,c);return a.data(c,"data",b),c},c.prototype.bind=function(b,c){var d=this,e=b.id+"-results";this.$results.attr("id",e),b.on("results:all",function(a){d.clear(),d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("results:append",function(a){d.append(a.data),b.isOpen()&&d.setClasses()}),b.on("query",function(a){d.hideMessages(),d.showLoading(a)}),b.on("select",function(){b.isOpen()&&d.setClasses()}),b.on("unselect",function(){b.isOpen()&&d.setClasses()}),b.on("open",function(){d.$results.attr("aria-expanded","true"),d.$results.attr("aria-hidden","false"),d.setClasses(),d.ensureHighlightVisible()}),b.on("close",function(){d.$results.attr("aria-expanded","false"),d.$results.attr("aria-hidden","true"),d.$results.removeAttr("aria-activedescendant")}),b.on("results:toggle",function(){var a=d.getHighlightedResults();0!==a.length&&a.trigger("mouseup")}),b.on("results:select",function(){var a=d.getHighlightedResults();if(0!==a.length){var b=a.data("data");"true"==a.attr("aria-selected")?d.trigger("close",{}):d.trigger("select",{data:b})}}),b.on("results:previous",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a);if(0!==c){var e=c-1;0===a.length&&(e=0);var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top,h=f.offset().top,i=d.$results.scrollTop()+(h-g);0===e?d.$results.scrollTop(0):0>h-g&&d.$results.scrollTop(i)}}),b.on("results:next",function(){var a=d.getHighlightedResults(),b=d.$results.find("[aria-selected]"),c=b.index(a),e=c+1;if(!(e>=b.length)){var f=b.eq(e);f.trigger("mouseenter");var g=d.$results.offset().top+d.$results.outerHeight(!1),h=f.offset().top+f.outerHeight(!1),i=d.$results.scrollTop()+h-g;0===e?d.$results.scrollTop(0):h>g&&d.$results.scrollTop(i)}}),b.on("results:focus",function(a){a.element.addClass("select2-results__option--highlighted")}),b.on("results:message",function(a){d.displayMessage(a)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(a){var b=d.$results.scrollTop(),c=d.$results.get(0).scrollHeight-d.$results.scrollTop()+a.deltaY,e=a.deltaY>0&&b-a.deltaY<=0,f=a.deltaY<0&&c<=d.$results.height();e?(d.$results.scrollTop(0),a.preventDefault(),a.stopPropagation()):f&&(d.$results.scrollTop(d.$results.get(0).scrollHeight-d.$results.height()),a.preventDefault(),a.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(b){var c=a(this),e=c.data("data");return"true"===c.attr("aria-selected")?void(d.options.get("multiple")?d.trigger("unselect",{originalEvent:b,data:e}):d.trigger("close",{})):void d.trigger("select",{originalEvent:b,data:e})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(b){var c=a(this).data("data");d.getHighlightedResults().removeClass("select2-results__option--highlighted"),d.trigger("results:focus",{data:c,element:a(this)})})},c.prototype.getHighlightedResults=function(){var a=this.$results.find(".select2-results__option--highlighted");return a},c.prototype.destroy=function(){this.$results.remove()},c.prototype.ensureHighlightVisible=function(){var a=this.getHighlightedResults();if(0!==a.length){var b=this.$results.find("[aria-selected]"),c=b.index(a),d=this.$results.offset().top,e=a.offset().top,f=this.$results.scrollTop()+(e-d),g=e-d;f-=2*a.outerHeight(!1),2>=c?this.$results.scrollTop(0):(g>this.$results.outerHeight()||0>g)&&this.$results.scrollTop(f)}},c.prototype.template=function(b,c){var d=this.options.get("templateResult"),e=this.options.get("escapeMarkup"),f=d(b,c);null==f?c.style.display="none":"string"==typeof f?c.innerHTML=e(f):a(c).append(f)},c}),b.define("select2/keys",[],function(){var a={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return a}),b.define("select2/selection/base",["jquery","../utils","../keys"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,b.Observable),d.prototype.render=function(){var b=a('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),b.attr("title",this.$element.attr("title")),b.attr("tabindex",this._tabindex),this.$selection=b,b},d.prototype.bind=function(a,b){var d=this,e=(a.id+"-container",a.id+"-results");this.container=a,this.$selection.on("focus",function(a){d.trigger("focus",a)}),this.$selection.on("blur",function(a){d._handleBlur(a)}),this.$selection.on("keydown",function(a){d.trigger("keypress",a),a.which===c.SPACE&&a.preventDefault()}),a.on("results:focus",function(a){d.$selection.attr("aria-activedescendant",a.data._resultId)}),a.on("selection:update",function(a){d.update(a.data)}),a.on("open",function(){d.$selection.attr("aria-expanded","true"),d.$selection.attr("aria-owns",e),d._attachCloseHandler(a)}),a.on("close",function(){d.$selection.attr("aria-expanded","false"),d.$selection.removeAttr("aria-activedescendant"),d.$selection.removeAttr("aria-owns"),d.$selection.focus(),d._detachCloseHandler(a)}),a.on("enable",function(){d.$selection.attr("tabindex",d._tabindex)}),a.on("disable",function(){d.$selection.attr("tabindex","-1")})},d.prototype._handleBlur=function(b){var c=this;window.setTimeout(function(){document.activeElement==c.$selection[0]||a.contains(c.$selection[0],document.activeElement)||c.trigger("blur",b)},1)},d.prototype._attachCloseHandler=function(b){a(document.body).on("mousedown.select2."+b.id,function(b){var c=a(b.target),d=c.closest(".select2"),e=a(".select2.select2-container--open");e.each(function(){var b=a(this);if(this!=d[0]){var c=b.data("element");c.select2("close")}})})},d.prototype._detachCloseHandler=function(b){a(document.body).off("mousedown.select2."+b.id)},d.prototype.position=function(a,b){var c=b.find(".selection");c.append(a)},d.prototype.destroy=function(){this._detachCloseHandler(this.container)},d.prototype.update=function(a){throw new Error("The `update` method must be defined in child classes.")},d}),b.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(a,b,c,d){function e(){e.__super__.constructor.apply(this,arguments)}return c.Extend(e,b),e.prototype.render=function(){var a=e.__super__.render.call(this);return a.addClass("select2-selection--single"),a.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),a},e.prototype.bind=function(a,b){var c=this;e.__super__.bind.apply(this,arguments);var d=a.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",d),this.$selection.attr("aria-labelledby",d),this.$selection.on("mousedown",function(a){1===a.which&&c.trigger("toggle",{originalEvent:a})}),this.$selection.on("focus",function(a){}),this.$selection.on("blur",function(a){}),a.on("selection:update",function(a){c.update(a.data)})},e.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},e.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},e.prototype.selectionContainer=function(){return a("<span></span>")},e.prototype.update=function(a){if(0===a.length)return void this.clear();var b=a[0],c=this.$selection.find(".select2-selection__rendered"),d=this.display(b,c);c.empty().append(d),c.prop("title",b.title||b.text)},e}),b.define("select2/selection/multiple",["jquery","./base","../utils"],function(a,b,c){function d(a,b){d.__super__.constructor.apply(this,arguments)}return c.Extend(d,b),d.prototype.render=function(){var a=d.__super__.render.call(this);return a.addClass("select2-selection--multiple"),a.html('<ul class="select2-selection__rendered"></ul>'),a},d.prototype.bind=function(b,c){var e=this;d.__super__.bind.apply(this,arguments),this.$selection.on("click",function(a){e.trigger("toggle",{originalEvent:a})}),this.$selection.on("click",".select2-selection__choice__remove",function(b){if(!e.options.get("disabled")){var c=a(this),d=c.parent(),f=d.data("data");e.trigger("unselect",{originalEvent:b,data:f})}})},d.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},d.prototype.display=function(a,b){var c=this.options.get("templateSelection"),d=this.options.get("escapeMarkup");return d(c(a,b))},d.prototype.selectionContainer=function(){var b=a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>');return b},d.prototype.update=function(a){if(this.clear(),0!==a.length){for(var b=[],d=0;d<a.length;d++){var e=a[d],f=this.selectionContainer(),g=this.display(e,f);f.append(g),f.prop("title",e.title||e.text),f.data("data",e),b.push(f)}var h=this.$selection.find(".select2-selection__rendered");c.appendMany(h,b)}},d}),b.define("select2/selection/placeholder",["../utils"],function(a){function b(a,b,c){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c)}return b.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},b.prototype.createPlaceholder=function(a,b){var c=this.selectionContainer();return c.html(this.display(b)),c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),c},b.prototype.update=function(a,b){var c=1==b.length&&b[0].id!=this.placeholder.id,d=b.length>1;if(d||c)return a.call(this,b);this.clear();var e=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(e)},b}),b.define("select2/selection/allowClear",["jquery","../keys"],function(a,b){function c(){}return c.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(a){d._handleClear(a)}),b.on("keypress",function(a){d._handleKeyboardClear(a,b)})},c.prototype._handleClear=function(a,b){if(!this.options.get("disabled")){var c=this.$selection.find(".select2-selection__clear");if(0!==c.length){b.stopPropagation();for(var d=c.data("data"),e=0;e<d.length;e++){var f={data:d[e]};if(this.trigger("unselect",f),f.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},c.prototype._handleKeyboardClear=function(a,c,d){d.isOpen()||(c.which==b.DELETE||c.which==b.BACKSPACE)&&this._handleClear(c)},c.prototype.update=function(b,c){if(b.call(this,c),!(this.$selection.find(".select2-selection__placeholder").length>0||0===c.length)){var d=a('<span class="select2-selection__clear">&times;</span>');d.data("data",c),this.$selection.find(".select2-selection__rendered").prepend(d)}},c}),b.define("select2/selection/search",["jquery","../utils","../keys"],function(a,b,c){function d(a,b,c){a.call(this,b,c)}return d.prototype.render=function(b){var c=a('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=c,this.$search=c.find("input");var d=b.call(this);return this._transferTabIndex(),d},d.prototype.bind=function(a,b,d){var e=this;a.call(this,b,d),b.on("open",function(){e.$search.trigger("focus")}),b.on("close",function(){e.$search.val(""),e.$search.removeAttr("aria-activedescendant"),e.$search.trigger("focus")}),b.on("enable",function(){e.$search.prop("disabled",!1),e._transferTabIndex()}),b.on("disable",function(){e.$search.prop("disabled",!0)}),b.on("focus",function(a){e.$search.trigger("focus")}),b.on("results:focus",function(a){e.$search.attr("aria-activedescendant",a.id)}),this.$selection.on("focusin",".select2-search--inline",function(a){e.trigger("focus",a)}),this.$selection.on("focusout",".select2-search--inline",function(a){e._handleBlur(a)}),this.$selection.on("keydown",".select2-search--inline",function(a){a.stopPropagation(),e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented();var b=a.which;if(b===c.BACKSPACE&&""===e.$search.val()){var d=e.$searchContainer.prev(".select2-selection__choice");if(d.length>0){var f=d.data("data");e.searchRemoveChoice(f),a.preventDefault()}}});var f=document.documentMode,g=f&&11>=f;this.$selection.on("input.searchcheck",".select2-search--inline",function(a){return g?void e.$selection.off("input.search input.searchcheck"):void e.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(a){if(g&&"input"===a.type)return void e.$selection.off("input.search input.searchcheck");var b=a.which;b!=c.SHIFT&&b!=c.CTRL&&b!=c.ALT&&b!=c.TAB&&e.handleSearch(a)})},d.prototype._transferTabIndex=function(a){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},d.prototype.createPlaceholder=function(a,b){this.$search.attr("placeholder",b.text)},d.prototype.update=function(a,b){var c=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),a.call(this,b),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),c&&this.$search.focus()},d.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var a=this.$search.val();this.trigger("query",{term:a})}this._keyUpPrevented=!1},d.prototype.searchRemoveChoice=function(a,b){this.trigger("unselect",{data:b}),this.$search.val(b.text),this.handleSearch()},d.prototype.resizeSearch=function(){this.$search.css("width","25px");var a="";if(""!==this.$search.attr("placeholder"))a=this.$selection.find(".select2-selection__rendered").innerWidth();else{var b=this.$search.val().length+1;a=.75*b+"em"}this.$search.css("width",a)},d}),b.define("select2/selection/eventRelay",["jquery"],function(a){function b(){}return b.prototype.bind=function(b,c,d){var e=this,f=["open","opening","close","closing","select","selecting","unselect","unselecting"],g=["opening","closing","selecting","unselecting"];b.call(this,c,d),c.on("*",function(b,c){if(-1!==a.inArray(b,f)){c=c||{};var d=a.Event("select2:"+b,{params:c});e.$element.trigger(d),-1!==a.inArray(b,g)&&(c.prevented=d.isDefaultPrevented())}})},b}),b.define("select2/translation",["jquery","require"],function(a,b){function c(a){this.dict=a||{}}return c.prototype.all=function(){return this.dict},c.prototype.get=function(a){return this.dict[a]},c.prototype.extend=function(b){this.dict=a.extend({},b.all(),this.dict)},c._cache={},c.loadPath=function(a){if(!(a in c._cache)){var d=b(a);c._cache[a]=d}return new c(c._cache[a])},c}),b.define("select2/diacritics",[],function(){var a={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return a}),b.define("select2/data/base",["../utils"],function(a){function b(a,c){b.__super__.constructor.call(this)}return a.Extend(b,a.Observable),b.prototype.current=function(a){throw new Error("The `current` method must be defined in child classes.")},b.prototype.query=function(a,b){throw new Error("The `query` method must be defined in child classes.")},b.prototype.bind=function(a,b){},b.prototype.destroy=function(){},b.prototype.generateResultId=function(b,c){var d=b.id+"-result-";return d+=a.generateChars(4),d+=null!=c.id?"-"+c.id.toString():"-"+a.generateChars(4)},b}),b.define("select2/data/select",["./base","../utils","jquery"],function(a,b,c){function d(a,b){this.$element=a,this.options=b,d.__super__.constructor.call(this)}return b.Extend(d,a),d.prototype.current=function(a){var b=[],d=this;this.$element.find(":selected").each(function(){var a=c(this),e=d.item(a);b.push(e)}),a(b)},d.prototype.select=function(a){var b=this;if(a.selected=!0,c(a.element).is("option"))return a.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(d){var e=[];a=[a],a.push.apply(a,d);for(var f=0;f<a.length;f++){var g=a[f].id;-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")});else{var d=a.id;this.$element.val(d),this.$element.trigger("change")}},d.prototype.unselect=function(a){var b=this;if(this.$element.prop("multiple"))return a.selected=!1,c(a.element).is("option")?(a.element.selected=!1,void this.$element.trigger("change")):void this.current(function(d){
2
  for(var e=[],f=0;f<d.length;f++){var g=d[f].id;g!==a.id&&-1===c.inArray(g,e)&&e.push(g)}b.$element.val(e),b.$element.trigger("change")})},d.prototype.bind=function(a,b){var c=this;this.container=a,a.on("select",function(a){c.select(a.data)}),a.on("unselect",function(a){c.unselect(a.data)})},d.prototype.destroy=function(){this.$element.find("*").each(function(){c.removeData(this,"data")})},d.prototype.query=function(a,b){var d=[],e=this,f=this.$element.children();f.each(function(){var b=c(this);if(b.is("option")||b.is("optgroup")){var f=e.item(b),g=e.matches(a,f);null!==g&&d.push(g)}}),b({results:d})},d.prototype.addOptions=function(a){b.appendMany(this.$element,a)},d.prototype.option=function(a){var b;a.children?(b=document.createElement("optgroup"),b.label=a.text):(b=document.createElement("option"),void 0!==b.textContent?b.textContent=a.text:b.innerText=a.text),a.id&&(b.value=a.id),a.disabled&&(b.disabled=!0),a.selected&&(b.selected=!0),a.title&&(b.title=a.title);var d=c(b),e=this._normalizeItem(a);return e.element=b,c.data(b,"data",e),d},d.prototype.item=function(a){var b={};if(b=c.data(a[0],"data"),null!=b)return b;if(a.is("option"))b={id:a.val(),text:a.text(),disabled:a.prop("disabled"),selected:a.prop("selected"),title:a.prop("title")};else if(a.is("optgroup")){b={text:a.prop("label"),children:[],title:a.prop("title")};for(var d=a.children("option"),e=[],f=0;f<d.length;f++){var g=c(d[f]),h=this.item(g);e.push(h)}b.children=e}return b=this._normalizeItem(b),b.element=a[0],c.data(a[0],"data",b),b},d.prototype._normalizeItem=function(a){c.isPlainObject(a)||(a={id:a,text:a}),a=c.extend({},{text:""},a);var b={selected:!1,disabled:!1};return null!=a.id&&(a.id=a.id.toString()),null!=a.text&&(a.text=a.text.toString()),null==a._resultId&&a.id&&null!=this.container&&(a._resultId=this.generateResultId(this.container,a)),c.extend({},b,a)},d.prototype.matches=function(a,b){var c=this.options.get("matcher");return c(a,b)},d}),b.define("select2/data/array",["./select","../utils","jquery"],function(a,b,c){function d(a,b){var c=b.get("data")||[];d.__super__.constructor.call(this,a,b),this.addOptions(this.convertToOptions(c))}return b.Extend(d,a),d.prototype.select=function(a){var b=this.$element.find("option").filter(function(b,c){return c.value==a.id.toString()});0===b.length&&(b=this.option(a),this.addOptions(b)),d.__super__.select.call(this,a)},d.prototype.convertToOptions=function(a){function d(a){return function(){return c(this).val()==a.id}}for(var e=this,f=this.$element.find("option"),g=f.map(function(){return e.item(c(this)).id}).get(),h=[],i=0;i<a.length;i++){var j=this._normalizeItem(a[i]);if(c.inArray(j.id,g)>=0){var k=f.filter(d(j)),l=this.item(k),m=c.extend(!0,{},l,j),n=this.option(m);k.replaceWith(n)}else{var o=this.option(j);if(j.children){var p=this.convertToOptions(j.children);b.appendMany(o,p)}h.push(o)}}return h},d}),b.define("select2/data/ajax",["./array","../utils","jquery"],function(a,b,c){function d(a,b){this.ajaxOptions=this._applyDefaults(b.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),d.__super__.constructor.call(this,a,b)}return b.Extend(d,a),d.prototype._applyDefaults=function(a){var b={data:function(a){return c.extend({},a,{q:a.term})},transport:function(a,b,d){var e=c.ajax(a);return e.then(b),e.fail(d),e}};return c.extend({},b,a,!0)},d.prototype.processResults=function(a){return a},d.prototype.query=function(a,b){function d(){var d=f.transport(f,function(d){var f=e.processResults(d,a);e.options.get("debug")&&window.console&&console.error&&(f&&f.results&&c.isArray(f.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),b(f)},function(){});e._request=d}var e=this;null!=this._request&&(c.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var f=c.extend({type:"GET"},this.ajaxOptions);"function"==typeof f.url&&(f.url=f.url.call(this.$element,a)),"function"==typeof f.data&&(f.data=f.data.call(this.$element,a)),this.ajaxOptions.delay&&""!==a.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(d,this.ajaxOptions.delay)):d()},d}),b.define("select2/data/tags",["jquery"],function(a){function b(b,c,d){var e=d.get("tags"),f=d.get("createTag");if(void 0!==f&&(this.createTag=f),b.call(this,c,d),a.isArray(e))for(var g=0;g<e.length;g++){var h=e[g],i=this._normalizeItem(h),j=this.option(i);this.$element.append(j)}}return b.prototype.query=function(a,b,c){function d(a,f){for(var g=a.results,h=0;h<g.length;h++){var i=g[h],j=null!=i.children&&!d({results:i.children},!0),k=i.text===b.term;if(k||j)return f?!1:(a.data=g,void c(a))}if(f)return!0;var l=e.createTag(b);if(null!=l){var m=e.option(l);m.attr("data-select2-tag",!0),e.addOptions([m]),e.insertTag(g,l)}a.results=g,c(a)}var e=this;return this._removeOldTags(),null==b.term||null!=b.page?void a.call(this,b,c):void a.call(this,b,d)},b.prototype.createTag=function(b,c){var d=a.trim(c.term);return""===d?null:{id:d,text:d}},b.prototype.insertTag=function(a,b,c){b.unshift(c)},b.prototype._removeOldTags=function(b){var c=(this._lastTag,this.$element.find("option[data-select2-tag]"));c.each(function(){this.selected||a(this).remove()})},b}),b.define("select2/data/tokenizer",["jquery"],function(a){function b(a,b,c){var d=c.get("tokenizer");void 0!==d&&(this.tokenizer=d),a.call(this,b,c)}return b.prototype.bind=function(a,b,c){a.call(this,b,c),this.$search=b.dropdown.$search||b.selection.$search||c.find(".select2-search__field")},b.prototype.query=function(a,b,c){function d(a){e.trigger("select",{data:a})}var e=this;b.term=b.term||"";var f=this.tokenizer(b,this.options,d);f.term!==b.term&&(this.$search.length&&(this.$search.val(f.term),this.$search.focus()),b.term=f.term),a.call(this,b,c)},b.prototype.tokenizer=function(b,c,d,e){for(var f=d.get("tokenSeparators")||[],g=c.term,h=0,i=this.createTag||function(a){return{id:a.term,text:a.term}};h<g.length;){var j=g[h];if(-1!==a.inArray(j,f)){var k=g.substr(0,h),l=a.extend({},c,{term:k}),m=i(l);null!=m?(e(m),g=g.substr(h+1)||"",h=0):h++}else h++}return{term:g}},b}),b.define("select2/data/minimumInputLength",[],function(){function a(a,b,c){this.minimumInputLength=c.get("minimumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",b.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumInputLength",[],function(){function a(a,b,c){this.maximumInputLength=c.get("maximumInputLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){return b.term=b.term||"",this.maximumInputLength>0&&b.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:b.term,params:b}}):void a.call(this,b,c)},a}),b.define("select2/data/maximumSelectionLength",[],function(){function a(a,b,c){this.maximumSelectionLength=c.get("maximumSelectionLength"),a.call(this,b,c)}return a.prototype.query=function(a,b,c){var d=this;this.current(function(e){var f=null!=e?e.length:0;return d.maximumSelectionLength>0&&f>=d.maximumSelectionLength?void d.trigger("results:message",{message:"maximumSelected",args:{maximum:d.maximumSelectionLength}}):void a.call(d,b,c)})},a}),b.define("select2/dropdown",["jquery","./utils"],function(a,b){function c(a,b){this.$element=a,this.options=b,c.__super__.constructor.call(this)}return b.Extend(c,b.Observable),c.prototype.render=function(){var b=a('<span class="select2-dropdown"><span class="select2-results"></span></span>');return b.attr("dir",this.options.get("dir")),this.$dropdown=b,b},c.prototype.bind=function(){},c.prototype.position=function(a,b){},c.prototype.destroy=function(){this.$dropdown.remove()},c}),b.define("select2/dropdown/search",["jquery","../utils"],function(a,b){function c(){}return c.prototype.render=function(b){var c=b.call(this),d=a('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=d,this.$search=d.find("input"),c.prepend(d),c},c.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),this.$search.on("keydown",function(a){e.trigger("keypress",a),e._keyUpPrevented=a.isDefaultPrevented()}),this.$search.on("input",function(b){a(this).off("keyup")}),this.$search.on("keyup input",function(a){e.handleSearch(a)}),c.on("open",function(){e.$search.attr("tabindex",0),e.$search.focus(),window.setTimeout(function(){e.$search.focus()},0)}),c.on("close",function(){e.$search.attr("tabindex",-1),e.$search.val("")}),c.on("results:all",function(a){if(null==a.query.term||""===a.query.term){var b=e.showSearch(a);b?e.$searchContainer.removeClass("select2-search--hide"):e.$searchContainer.addClass("select2-search--hide")}})},c.prototype.handleSearch=function(a){if(!this._keyUpPrevented){var b=this.$search.val();this.trigger("query",{term:b})}this._keyUpPrevented=!1},c.prototype.showSearch=function(a,b){return!0},c}),b.define("select2/dropdown/hidePlaceholder",[],function(){function a(a,b,c,d){this.placeholder=this.normalizePlaceholder(c.get("placeholder")),a.call(this,b,c,d)}return a.prototype.append=function(a,b){b.results=this.removePlaceholder(b.results),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeof b&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(var c=b.slice(0),d=b.length-1;d>=0;d--){var e=b[d];this.placeholder.id===e.id&&c.splice(d,1)}return c},a}),b.define("select2/dropdown/infiniteScroll",["jquery"],function(a){function b(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return b.prototype.append=function(a,b){this.$loadingMore.remove(),this.loading=!1,a.call(this,b),this.showLoadingMore(b)&&this.$results.append(this.$loadingMore)},b.prototype.bind=function(b,c,d){var e=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){var b=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){var c=e.$results.offset().top+e.$results.outerHeight(!1),d=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1);c+50>=d&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;var b=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.showLoadingMore=function(a,b){return b.pagination&&b.pagination.more},b.prototype.createLoadingMore=function(){var b=a('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),c=this.options.get("translations").get("loadingMore");return b.html(c(this.lastParams)),b},b}),b.define("select2/dropdown/attachBody",["jquery","../utils"],function(a,b){function c(a,b,c){this.$dropdownParent=c.get("dropdownParent")||document.body,a.call(this,b,c)}return c.prototype.bind=function(a,b,c){var d=this,e=!1;a.call(this,b,c),b.on("open",function(){d._showDropdown(),d._attachPositioningHandler(b),e||(e=!0,b.on("results:all",function(){d._positionDropdown(),d._resizeDropdown()}),b.on("results:append",function(){d._positionDropdown(),d._resizeDropdown()}))}),b.on("close",function(){d._hideDropdown(),d._detachPositioningHandler(b)}),this.$dropdownContainer.on("mousedown",function(a){a.stopPropagation()})},c.prototype.destroy=function(a){a.call(this),this.$dropdownContainer.remove()},c.prototype.position=function(a,b,c){b.attr("class",c.attr("class")),b.removeClass("select2"),b.addClass("select2-container--open"),b.css({position:"absolute",top:-999999}),this.$container=c},c.prototype.render=function(b){var c=a("<span></span>"),d=b.call(this);return c.append(d),this.$dropdownContainer=c,c},c.prototype._hideDropdown=function(a){this.$dropdownContainer.detach()},c.prototype._attachPositioningHandler=function(c,d){var e=this,f="scroll.select2."+d.id,g="resize.select2."+d.id,h="orientationchange.select2."+d.id,i=this.$container.parents().filter(b.hasScroll);i.each(function(){a(this).data("select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),i.on(f,function(b){var c=a(this).data("select2-scroll-position");a(this).scrollTop(c.y)}),a(window).on(f+" "+g+" "+h,function(a){e._positionDropdown(),e._resizeDropdown()})},c.prototype._detachPositioningHandler=function(c,d){var e="scroll.select2."+d.id,f="resize.select2."+d.id,g="orientationchange.select2."+d.id,h=this.$container.parents().filter(b.hasScroll);h.off(e),a(window).off(e+" "+f+" "+g)},c.prototype._positionDropdown=function(){var b=a(window),c=this.$dropdown.hasClass("select2-dropdown--above"),d=this.$dropdown.hasClass("select2-dropdown--below"),e=null,f=(this.$container.position(),this.$container.offset());f.bottom=f.top+this.$container.outerHeight(!1);var g={height:this.$container.outerHeight(!1)};g.top=f.top,g.bottom=f.top+g.height;var h={height:this.$dropdown.outerHeight(!1)},i={top:b.scrollTop(),bottom:b.scrollTop()+b.height()},j=i.top<f.top-h.height,k=i.bottom>f.bottom+h.height,l={left:f.left,top:g.bottom};c||d||(e="below"),k||!j||c?!j&&k&&c&&(e="below"):e="above",("above"==e||c&&"below"!==e)&&(l.top=g.top-h.height),null!=e&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+e),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+e)),this.$dropdownContainer.css(l)},c.prototype._resizeDropdown=function(){var a={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(a.minWidth=a.width,a.width="auto"),this.$dropdown.css(a)},c.prototype._showDropdown=function(a){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},c}),b.define("select2/dropdown/minimumResultsForSearch",[],function(){function a(b){for(var c=0,d=0;d<b.length;d++){var e=b[d];e.children?c+=a(e.children):c++}return c}function b(a,b,c,d){this.minimumResultsForSearch=c.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),a.call(this,b,c,d)}return b.prototype.showSearch=function(b,c){return a(c.data.results)<this.minimumResultsForSearch?!1:b.call(this,c)},b}),b.define("select2/dropdown/selectOnClose",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("close",function(){d._handleSelectOnClose()})},a.prototype._handleSelectOnClose=function(){var a=this.getHighlightedResults();a.length<1||this.trigger("select",{data:a.data("data")})},a}),b.define("select2/dropdown/closeOnSelect",[],function(){function a(){}return a.prototype.bind=function(a,b,c){var d=this;a.call(this,b,c),b.on("select",function(a){d._selectTriggered(a)}),b.on("unselect",function(a){d._selectTriggered(a)})},a.prototype._selectTriggered=function(a,b){var c=b.originalEvent;c&&c.ctrlKey||this.trigger("close",{})},a}),b.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(a){var b=a.input.length-a.maximum,c="Please delete "+b+" character";return 1!=b&&(c+="s"),c},inputTooShort:function(a){var b=a.minimum-a.input.length,c="Please enter "+b+" or more characters";return c},loadingMore:function(){return"Loading more results…"},maximumSelected:function(a){var b="You can only select "+a.maximum+" item";return 1!=a.maximum&&(b+="s"),b},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),b.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C){function D(){this.reset()}D.prototype.apply=function(l){if(l=a.extend({},this.defaults,l),null==l.dataAdapter){if(null!=l.ajax?l.dataAdapter=o:null!=l.data?l.dataAdapter=n:l.dataAdapter=m,l.minimumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,r)),l.maximumInputLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,s)),l.maximumSelectionLength>0&&(l.dataAdapter=j.Decorate(l.dataAdapter,t)),l.tags&&(l.dataAdapter=j.Decorate(l.dataAdapter,p)),(null!=l.tokenSeparators||null!=l.tokenizer)&&(l.dataAdapter=j.Decorate(l.dataAdapter,q)),null!=l.query){var C=b(l.amdBase+"compat/query");l.dataAdapter=j.Decorate(l.dataAdapter,C)}if(null!=l.initSelection){var D=b(l.amdBase+"compat/initSelection");l.dataAdapter=j.Decorate(l.dataAdapter,D)}}if(null==l.resultsAdapter&&(l.resultsAdapter=c,null!=l.ajax&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,x)),null!=l.placeholder&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,w)),l.selectOnClose&&(l.resultsAdapter=j.Decorate(l.resultsAdapter,A))),null==l.dropdownAdapter){if(l.multiple)l.dropdownAdapter=u;else{var E=j.Decorate(u,v);l.dropdownAdapter=E}if(0!==l.minimumResultsForSearch&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,z)),l.closeOnSelect&&(l.dropdownAdapter=j.Decorate(l.dropdownAdapter,B)),null!=l.dropdownCssClass||null!=l.dropdownCss||null!=l.adaptDropdownCssClass){var F=b(l.amdBase+"compat/dropdownCss");l.dropdownAdapter=j.Decorate(l.dropdownAdapter,F)}l.dropdownAdapter=j.Decorate(l.dropdownAdapter,y)}if(null==l.selectionAdapter){if(l.multiple?l.selectionAdapter=e:l.selectionAdapter=d,null!=l.placeholder&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,f)),l.allowClear&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,g)),l.multiple&&(l.selectionAdapter=j.Decorate(l.selectionAdapter,h)),null!=l.containerCssClass||null!=l.containerCss||null!=l.adaptContainerCssClass){var G=b(l.amdBase+"compat/containerCss");l.selectionAdapter=j.Decorate(l.selectionAdapter,G)}l.selectionAdapter=j.Decorate(l.selectionAdapter,i)}if("string"==typeof l.language)if(l.language.indexOf("-")>0){var H=l.language.split("-"),I=H[0];l.language=[l.language,I]}else l.language=[l.language];if(a.isArray(l.language)){var J=new k;l.language.push("en");for(var K=l.language,L=0;L<K.length;L++){var M=K[L],N={};try{N=k.loadPath(M)}catch(O){try{M=this.defaults.amdLanguageBase+M,N=k.loadPath(M)}catch(P){l.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+M+'" could not be automatically loaded. A fallback will be used instead.');continue}}J.extend(N)}l.translations=J}else{var Q=k.loadPath(this.defaults.amdLanguageBase+"en"),R=new k(l.language);R.extend(Q),l.translations=R}return l},D.prototype.reset=function(){function b(a){function b(a){return l[a]||a}return a.replace(/[^\u0000-\u007E]/g,b)}function c(d,e){if(""===a.trim(d.term))return e;if(e.children&&e.children.length>0){for(var f=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){var h=e.children[g],i=c(d,h);null==i&&f.children.splice(g,1)}return f.children.length>0?f:c(d,f)}var j=b(e.text).toUpperCase(),k=b(d.term).toUpperCase();return j.indexOf(k)>-1?e:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:j.escapeMarkup,language:C,matcher:c,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(a){return a},templateResult:function(a){return a.text},templateSelection:function(a){return a.text},theme:"default",width:"resolve"}},D.prototype.set=function(b,c){var d=a.camelCase(b),e={};e[d]=c;var f=j._convertData(e);a.extend(this.defaults,f)};var E=new D;return E}),b.define("select2/options",["require","jquery","./defaults","./utils"],function(a,b,c,d){function e(b,e){if(this.options=b,null!=e&&this.fromElement(e),this.options=c.apply(this.options),e&&e.is("input")){var f=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=d.Decorate(this.options.dataAdapter,f)}}return e.prototype.fromElement=function(a){var c=["select2"];null==this.options.multiple&&(this.options.multiple=a.prop("multiple")),null==this.options.disabled&&(this.options.disabled=a.prop("disabled")),null==this.options.language&&(a.prop("lang")?this.options.language=a.prop("lang").toLowerCase():a.closest("[lang]").prop("lang")&&(this.options.language=a.closest("[lang]").prop("lang"))),null==this.options.dir&&(a.prop("dir")?this.options.dir=a.prop("dir"):a.closest("[dir]").prop("dir")?this.options.dir=a.closest("[dir]").prop("dir"):this.options.dir="ltr"),a.prop("disabled",this.options.disabled),a.prop("multiple",this.options.multiple),a.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),a.data("data",a.data("select2Tags")),a.data("tags",!0)),a.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),a.attr("ajax--url",a.data("ajaxUrl")),a.data("ajax--url",a.data("ajaxUrl")));var e={};e=b.fn.jquery&&"1."==b.fn.jquery.substr(0,2)&&a[0].dataset?b.extend(!0,{},a[0].dataset,a.data()):a.data();var f=b.extend(!0,{},e);f=d._convertData(f);for(var g in f)b.inArray(g,c)>-1||(b.isPlainObject(this.options[g])?b.extend(this.options[g],f[g]):this.options[g]=f[g]);return this},e.prototype.get=function(a){return this.options[a]},e.prototype.set=function(a,b){this.options[a]=b},e}),b.define("select2/core",["jquery","./options","./utils","./keys"],function(a,b,c,d){var e=function(a,c){null!=a.data("select2")&&a.data("select2").destroy(),this.$element=a,this.id=this._generateId(a),c=c||{},this.options=new b(c,a),e.__super__.constructor.call(this);var d=a.attr("tabindex")||0;a.data("old-tabindex",d),a.attr("tabindex","-1");var f=this.options.get("dataAdapter");this.dataAdapter=new f(a,this.options);var g=this.render();this._placeContainer(g);var h=this.options.get("selectionAdapter");this.selection=new h(a,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,g);var i=this.options.get("dropdownAdapter");this.dropdown=new i(a,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,g);var j=this.options.get("resultsAdapter");this.results=new j(a,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var k=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(a){k.trigger("selection:update",{data:a})}),a.addClass("select2-hidden-accessible"),a.attr("aria-hidden","true"),this._syncAttributes(),a.data("select2",this)};return c.Extend(e,c.Observable),e.prototype._generateId=function(a){var b="";return b=null!=a.attr("id")?a.attr("id"):null!=a.attr("name")?a.attr("name")+"-"+c.generateChars(2):c.generateChars(4),b="select2-"+b},e.prototype._placeContainer=function(a){a.insertAfter(this.$element);var b=this._resolveWidth(this.$element,this.options.get("width"));null!=b&&a.css("width",b)},e.prototype._resolveWidth=function(a,b){var c=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==b){var d=this._resolveWidth(a,"style");return null!=d?d:this._resolveWidth(a,"element")}if("element"==b){var e=a.outerWidth(!1);return 0>=e?"auto":e+"px"}if("style"==b){var f=a.attr("style");if("string"!=typeof f)return null;for(var g=f.split(";"),h=0,i=g.length;i>h;h+=1){var j=g[h].replace(/\s/g,""),k=j.match(c);if(null!==k&&k.length>=1)return k[1]}return null}return b},e.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},e.prototype._registerDomEvents=function(){var b=this;this.$element.on("change.select2",function(){b.dataAdapter.current(function(a){b.trigger("selection:update",{data:a})})}),this._sync=c.bind(this._syncAttributes,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._sync);var d=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=d?(this._observer=new d(function(c){a.each(c,b._sync)}),this._observer.observe(this.$element[0],{attributes:!0,subtree:!1})):this.$element[0].addEventListener&&this.$element[0].addEventListener("DOMAttrModified",b._sync,!1)},e.prototype._registerDataEvents=function(){var a=this;this.dataAdapter.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerSelectionEvents=function(){var b=this,c=["toggle","focus"];this.selection.on("toggle",function(){b.toggleDropdown()}),this.selection.on("focus",function(a){b.focus(a)}),this.selection.on("*",function(d,e){-1===a.inArray(d,c)&&b.trigger(d,e)})},e.prototype._registerDropdownEvents=function(){var a=this;this.dropdown.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerResultsEvents=function(){var a=this;this.results.on("*",function(b,c){a.trigger(b,c)})},e.prototype._registerEvents=function(){var a=this;this.on("open",function(){a.$container.addClass("select2-container--open")}),this.on("close",function(){a.$container.removeClass("select2-container--open")}),this.on("enable",function(){a.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){a.$container.addClass("select2-container--disabled")}),this.on("blur",function(){a.$container.removeClass("select2-container--focus")}),this.on("query",function(b){a.isOpen()||a.trigger("open",{}),this.dataAdapter.query(b,function(c){a.trigger("results:all",{data:c,query:b})})}),this.on("query:append",function(b){this.dataAdapter.query(b,function(c){a.trigger("results:append",{data:c,query:b})})}),this.on("keypress",function(b){var c=b.which;a.isOpen()?c===d.ESC||c===d.TAB||c===d.UP&&b.altKey?(a.close(),b.preventDefault()):c===d.ENTER?(a.trigger("results:select",{}),b.preventDefault()):c===d.SPACE&&b.ctrlKey?(a.trigger("results:toggle",{}),b.preventDefault()):c===d.UP?(a.trigger("results:previous",{}),b.preventDefault()):c===d.DOWN&&(a.trigger("results:next",{}),b.preventDefault()):(c===d.ENTER||c===d.SPACE||c===d.DOWN&&b.altKey)&&(a.open(),b.preventDefault())})},e.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},e.prototype.trigger=function(a,b){var c=e.__super__.trigger,d={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===b&&(b={}),a in d){var f=d[a],g={prevented:!1,name:a,args:b};if(c.call(this,f,g),g.prevented)return void(b.prevented=!0)}c.call(this,a,b)},e.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},e.prototype.open=function(){this.isOpen()||this.trigger("query",{})},e.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},e.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},e.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},e.prototype.focus=function(a){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},e.prototype.enable=function(a){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),(null==a||0===a.length)&&(a=[!0]);var b=!a[0];this.$element.prop("disabled",b)},e.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var a=[];return this.dataAdapter.current(function(b){a=b}),a},e.prototype.val=function(b){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==b||0===b.length)return this.$element.val();var c=b[0];a.isArray(c)&&(c=a.map(c,function(a){return a.toString()})),this.$element.val(c).trigger("change")},e.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._sync),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&this.$element[0].removeEventListener("DOMAttrModified",this._sync,!1),this._sync=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},e.prototype.render=function(){var b=a('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return b.attr("dir",this.options.get("dir")),this.$container=b,this.$container.addClass("select2-container--"+this.options.get("theme")),b.data("element",this.$element),b},e}),b.define("jquery.select2",["jquery","require","./select2/core","./select2/defaults"],function(a,b,c,d){if(b("jquery.mousewheel"),null==a.fn.select2){var e=["open","close","destroy"];a.fn.select2=function(b){if(b=b||{},"object"==typeof b)return this.each(function(){var d=a.extend({},b,!0);new c(a(this),d)}),this;if("string"==typeof b){var d;return this.each(function(){var c=a(this).data("select2");null==c&&window.console&&console.error&&console.error("The select2('"+b+"') method was called on an element that is not using Select2.");var e=Array.prototype.slice.call(arguments,1);d=c[b].apply(c,e)}),a.inArray(b,e)>-1?this:d}throw new Error("Invalid arguments for Select2: "+b)}}return null==a.fn.select2.defaults&&(a.fn.select2.defaults=d),c}),b.define("jquery.mousewheel",["jquery"],function(a){return a}),{define:b.define,require:b.require}}(),c=b.require("jquery.select2");return a.fn.select2.amd=b,c});
index.php CHANGED
@@ -1,3 +1,3 @@
1
- <?php
2
-
3
  echo "Keep Silent";
1
+ <?php
2
+
3
  echo "Keep Silent";
languages/wp-seo-structured-data-schema.pot CHANGED
@@ -85,19 +85,19 @@ msgstr ""
85
  msgid "Get Pro"
86
  msgstr ""
87
 
88
- #: ../lib/classes/KcSeoInit.php:188, ../lib/views/schema-options.php:7
89
  msgid "WP SEO Structured Data Schema"
90
  msgstr ""
91
 
92
- #: ../lib/classes/KcSeoInit.php:188
93
  msgid "WP SEO Schema"
94
  msgstr ""
95
 
96
- #: ../lib/classes/KcSeoInit.php:190
97
  msgid "WP SEO Schema settings"
98
  msgstr ""
99
 
100
- #: ../lib/classes/KcSeoInit.php:190
101
  msgid "Settings"
102
  msgstr ""
103
 
@@ -121,6 +121,10 @@ msgstr ""
121
  msgid "This is a Pro version feature."
122
  msgstr ""
123
 
 
 
 
 
124
  #: ../lib/functions/KcSeoOptions.php:10
125
  msgid "Article"
126
  msgstr ""
@@ -487,12 +491,12 @@ msgstr ""
487
 
488
  #: ../lib/functions/KcSeoOptions.php:663
489
  msgid ""
490
- "<strong>MPN</strong><br>
491
- " &#8594; MPN(Manufacturer Part Number) Used globally, Alphanumeric digits (various lengths)<br>
492
- " <strong>GTIN</strong><br>
493
- " &#8594; UPC(Universal Product Code) Used in primarily North America. 12 numeric digits. eg. 892685001003.<br>
494
- " &#8594; EAN(European Article Number) Used primarily outside of North America. Typically 13 numeric digits (can occasionally be either eight or 14 numeric digits). eg. 4011200296908<br>
495
- " &#8594; ISBN(International Standard Book Number) Used globally, ISBN-13 (recommended), 13 numeric digits 978-0747595823<br>
496
  " &#8594; JAN(Japanese Article Number) Used only in Japan, 8 or 13 numeric digits."
497
  msgstr ""
498
 
@@ -1050,7 +1054,7 @@ msgstr ""
1050
 
1051
  #: ../lib/views/schema-options.php:142
1052
  msgid ""
1053
- "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
1054
  " as a schema “Type”): Pick LocalBusiness as a generic Type, then add additional type as follows:"
1055
  msgstr ""
1056
 
@@ -1228,13 +1232,13 @@ msgstr ""
1228
 
1229
  #: ../lib/views/settings.php:18
1230
  msgid ""
1231
- "Home page
1232
  " only"
1233
  msgstr ""
1234
 
1235
  #: ../lib/views/settings.php:22
1236
  msgid ""
1237
- "Sitewide (Apply General Settings schema
1238
  " sitewide)"
1239
  msgstr ""
1240
 
@@ -1256,7 +1260,7 @@ msgstr ""
1256
 
1257
  #: ../lib/views/settings.php:67
1258
  msgid ""
1259
- "Please deselect the navigation menu if you want to deactivate site navigation
1260
  " schema."
1261
  msgstr ""
1262
 
@@ -1318,6 +1322,6 @@ msgstr ""
1318
 
1319
  #: ../lib/views/settings.php:146
1320
  msgid ""
1321
- "This will delete all schema created and applied by this plugin when plugin is
1322
  " deleted."
1323
  msgstr ""
85
  msgid "Get Pro"
86
  msgstr ""
87
 
88
+ #: ../lib/classes/KcSeoInit.php:184, ../lib/views/schema-options.php:7
89
  msgid "WP SEO Structured Data Schema"
90
  msgstr ""
91
 
92
+ #: ../lib/classes/KcSeoInit.php:185
93
  msgid "WP SEO Schema"
94
  msgstr ""
95
 
96
+ #: ../lib/classes/KcSeoInit.php:193
97
  msgid "WP SEO Schema settings"
98
  msgstr ""
99
 
100
+ #: ../lib/classes/KcSeoInit.php:194
101
  msgid "Settings"
102
  msgstr ""
103
 
121
  msgid "This is a Pro version feature."
122
  msgstr ""
123
 
124
+ #: ../lib/classes/KcSeoOffer.php:49
125
+ msgid "Don't miss out on our biggest sale of the year! Get your."
126
+ msgstr ""
127
+
128
  #: ../lib/functions/KcSeoOptions.php:10
129
  msgid "Article"
130
  msgstr ""
491
 
492
  #: ../lib/functions/KcSeoOptions.php:663
493
  msgid ""
494
+ "<strong>MPN</strong><br>\n"
495
+ " &#8594; MPN(Manufacturer Part Number) Used globally, Alphanumeric digits (various lengths)<br>\n"
496
+ " <strong>GTIN</strong><br>\n"
497
+ " &#8594; UPC(Universal Product Code) Used in primarily North America. 12 numeric digits. eg. 892685001003.<br>\n"
498
+ " &#8594; EAN(European Article Number) Used primarily outside of North America. Typically 13 numeric digits (can occasionally be either eight or 14 numeric digits). eg. 4011200296908<br>\n"
499
+ " &#8594; ISBN(International Standard Book Number) Used globally, ISBN-13 (recommended), 13 numeric digits 978-0747595823<br>\n"
500
  " &#8594; JAN(Japanese Article Number) Used only in Japan, 8 or 13 numeric digits."
501
  msgstr ""
502
 
1054
 
1055
  #: ../lib/views/schema-options.php:142
1056
  msgid ""
1057
+ "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\n"
1058
  " as a schema “Type”): Pick LocalBusiness as a generic Type, then add additional type as follows:"
1059
  msgstr ""
1060
 
1232
 
1233
  #: ../lib/views/settings.php:18
1234
  msgid ""
1235
+ "Home page\n"
1236
  " only"
1237
  msgstr ""
1238
 
1239
  #: ../lib/views/settings.php:22
1240
  msgid ""
1241
+ "Sitewide (Apply General Settings schema\n"
1242
  " sitewide)"
1243
  msgstr ""
1244
 
1260
 
1261
  #: ../lib/views/settings.php:67
1262
  msgid ""
1263
+ "Please deselect the navigation menu if you want to deactivate site navigation\n"
1264
  " schema."
1265
  msgstr ""
1266
 
1322
 
1323
  #: ../lib/views/settings.php:146
1324
  msgid ""
1325
+ "This will delete all schema created and applied by this plugin when plugin is\n"
1326
  " deleted."
1327
  msgstr ""
lib/classes/KcSeoHelper.php CHANGED
@@ -1,537 +1,537 @@
1
- <?php
2
-
3
- if (!class_exists('KcSeoSettings')):
4
-
5
- class KcSeoHelper
6
- {
7
- function verifyNonce() {
8
- $nonce = !empty($_REQUEST['_kcseo_nonce']) ? sanitize_text_field($_REQUEST['_kcseo_nonce']) : null;
9
- if (!wp_verify_nonce($nonce, $this->nonceText())) {
10
- return false;
11
- }
12
-
13
- return true;
14
- }
15
-
16
- function nonceText() {
17
- return "kcseo_nonce_secret_text";
18
- }
19
-
20
- function isValidBase64($string = null) {
21
- $decoded = @base64_decode($string, true);
22
- // Check if there is no invalid character in string
23
- if (!@preg_match('/^[a-zA-Z0-9\/\r\n+]*={0,2}$/', $string)) {
24
- return false;
25
- }
26
-
27
- // Decode the string in strict mode and send the response
28
- if (!@base64_decode($string, true)) {
29
- return false;
30
- }
31
-
32
- // Encode and compare it to original one
33
- if (@base64_encode($decoded) != $string) {
34
- return false;
35
- }
36
-
37
- return true;
38
- }
39
-
40
- function get_post_type_list() {
41
- $post_types = get_post_types(
42
- array(
43
- 'public' => true
44
- )
45
- );
46
- $exclude = array('attachment', 'revision', 'nav_menu_item');
47
- foreach ($exclude as $ex) {
48
- unset($post_types[$ex]);
49
- }
50
-
51
- return $post_types;
52
- }
53
-
54
- function kcSeoPostTypes() {
55
- $post_types = get_post_types(
56
- array(
57
- '_builtin' => true
58
- )
59
- );
60
- $exclude = array('attachment', 'revision', 'nav_menu_item');
61
- foreach ($exclude as $ex) {
62
- unset($post_types[$ex]);
63
- }
64
-
65
- return $post_types;
66
- }
67
-
68
- /**
69
- * Sanitize field value
70
- *
71
- * @param string $fieldId
72
- * @param array $field
73
- * @param null $value
74
- *
75
- * @return array|null
76
- * @internal param $value
77
- */
78
- function sanitize($fieldId, $field = array(), $value = null) {
79
- $newValue = null;
80
- $type = (!empty($field['type']) ? sanitize_text_field($field['type']) : 'text');
81
- if (is_array($field) && $value) {
82
- if (in_array($fieldId, ['description', 'articleBody', 'review_body'])) {
83
- $newValue = KcSeoHelper::filter_content($value);
84
- } else {
85
- if ($type == 'url') {
86
- $newValue = esc_url($value);
87
- } else if ($type == 'textarea') {
88
- $newValue = wp_kses($value, []);
89
- } else if ($field['type'] == 'group' && !empty($field['fields'])) {
90
- $newGValue = [];
91
- $groupValue = is_array($value) ? $value : [];
92
- foreach ($groupValue as $gId => $gValue) {
93
- $newVItem = [];
94
- foreach ($field['fields'] as $gFid => $fieldItem) {
95
- if (isset($gValue[$gFid])) {
96
- $newVItem[$gFid] = $this->sanitize($gFid, $fieldItem, $gValue[$gFid]);
97
- }
98
- }
99
- array_push($newGValue, $newVItem);
100
- }
101
- $newValue = $newGValue;
102
- } else {
103
- $newValue = sanitize_text_field($value);
104
- }
105
- }
106
-
107
- }
108
-
109
- return $newValue;
110
- }
111
-
112
-
113
- function sanitizeOutPut($value, $type = 'text') {
114
- $newValue = null;
115
- if ($value) {
116
- if ($type == 'text') {
117
- $newValue = esc_html(stripslashes($value));
118
- } elseif ($type == 'url') {
119
- $newValue = esc_url(stripslashes($value));
120
- } elseif ($type == 'textarea') {
121
- $newValue = esc_textarea(stripslashes($value));
122
- } else {
123
- $newValue = esc_html(stripslashes($value));
124
- }
125
- }
126
-
127
- return $newValue;
128
- }
129
-
130
- static function get_same_as($value) {
131
- $sameAs = null;
132
- if ($value) {
133
- $sameAsRaw = preg_split('/\r\n|\r|\n/', $value);
134
- $sameAsRaw = !empty($sameAsRaw) ? array_filter($sameAsRaw) : array();
135
- if (!empty($sameAsRaw) && is_array($sameAsRaw)) {
136
- if (1 < count($sameAsRaw)) {
137
- $sameAs = $sameAsRaw;
138
- } else {
139
- $sameAs = $sameAsRaw[0];
140
- }
141
- }
142
- }
143
-
144
- return $sameAs;
145
- }
146
-
147
-
148
- function imageInfo($attachment_id) {
149
- $data = array();
150
- $imgData = wp_get_attachment_metadata($attachment_id);
151
- $data['url'] = wp_get_attachment_url($attachment_id);
152
- $data['width'] = !empty($imgData['width']) ? absint($imgData['width']) : 0;
153
- $data['height'] = !empty($imgData['height']) ? absint($imgData['height']) : 0;
154
-
155
- return $data;
156
- }
157
-
158
- static function filter_content($content, $limit = 0) {
159
- $content = preg_replace('#\[[^\]]+\]#', '', wp_filter_nohtml_kses($content));
160
- $content = stripslashes($content);
161
- $content = convert_invalid_entities($content);
162
- $content = self::characterToHTMLEntity($content);
163
- if ($limit && strlen($content) > $limit) {
164
- $content = mb_substr($content, 0, $limit, "utf-8");
165
- $content = preg_replace('/\W\w+\s*(\W*)$/', '$1', $content);
166
- }
167
-
168
- $content = str_replace('&nbps;', ' ', $content);
169
- $content = str_replace(PHP_EOL, ' ', $content);
170
- $content = str_replace("\r", '', $content);
171
-
172
- return $content;
173
- }
174
-
175
- static function characterToHTMLEntity($str) {
176
- $replace = array(
177
- "'",
178
- '&',
179
- '<',
180
- '>',
181
- '€',
182
- '‘',
183
- '’',
184
- '“',
185
- '”',
186
- '–',
187
- '—',
188
- '¡',
189
- '¢',
190
- '£',
191
- '¤',
192
- '¥',
193
- '¦',
194
- '§',
195
- '¨',
196
- '©',
197
- 'ª',
198
- '«',
199
- '¬',
200
- '®',
201
- '¯',
202
- '°',
203
- '±',
204
- '²',
205
- '³',
206
- '´',
207
- 'µ',
208
- '¶',
209
- '·',
210
- '¸',
211
- '¹',
212
- 'º',
213
- '»',
214
- '¼',
215
- '½',
216
- '¾',
217
- '¿',
218
- 'À',
219
- 'Á',
220
- 'Â',
221
- 'Ã',
222
- 'Ä',
223
- 'Å',
224
- 'Æ',
225
- 'Ç',
226
- 'È',
227
- 'É',
228
- 'Ê',
229
- 'Ë',
230
- 'Ì',
231
- 'Í',
232
- 'Î',
233
- 'Ï',
234
- 'Ð',
235
- 'Ñ',
236
- 'Ò',
237
- 'Ó',
238
- 'Ô',
239
- 'Õ',
240
- 'Ö',
241
- '×',
242
- 'Ø',
243
- 'Ù',
244
- 'Ú',
245
- 'Û',
246
- 'Ü',
247
- 'Ý',
248
- 'Þ',
249
- 'ß',
250
- 'à',
251
- 'á',
252
- 'â',
253
- 'ã',
254
- 'ä',
255
- 'å',
256
- 'æ',
257
- 'ç',
258
- 'è',
259
- 'é',
260
- 'ê',
261
- 'ë',
262
- 'ì',
263
- 'í',
264
- 'î',
265
- 'ï',
266
- 'ð',
267
- 'ñ',
268
- 'ò',
269
- 'ó',
270
- 'ô',
271
- 'õ',
272
- 'ö',
273
- '÷',
274
- 'ø',
275
- 'ù',
276
- 'ú',
277
- 'û',
278
- 'ü',
279
- 'ý',
280
- 'þ',
281
- 'ÿ',
282
- 'Œ',
283
- 'œ',
284
- '‚',
285
- '„',
286
- '…',
287
- '™',
288
- '•',
289
- '˜'
290
- );
291
-
292
- $search = array(
293
- '&#8217;',
294
- '&amp;',
295
- '&lt;',
296
- '&gt;',
297
- '&euro;',
298
- '&lsquo;',
299
- '&rsquo;',
300
- '&ldquo;',
301
- '&rdquo;',
302
- '&ndash;',
303
- '&mdash;',
304
- '&iexcl;',
305
- '&cent;',
306
- '&pound;',
307
- '&curren;',
308
- '&yen;',
309
- '&brvbar;',
310
- '&sect;',
311
- '&uml;',
312
- '&copy;',
313
- '&ordf;',
314
- '&laquo;',
315
- '&not;',
316
- '&reg;',
317
- '&macr;',
318
- '&deg;',
319
- '&plusmn;',
320
- '&sup2;',
321
- '&sup3;',
322
- '&acute;',
323
- '&micro;',
324
- '&para;',
325
- '&middot;',
326
- '&cedil;',
327
- '&sup1;',
328
- '&ordm;',
329
- '&raquo;',
330
- '&frac14;',
331
- '&frac12;',
332
- '&frac34;',
333
- '&iquest;',
334
- '&Agrave;',
335
- '&Aacute;',
336
- '&Acirc;',
337
- '&Atilde;',
338
- '&Auml;',
339
- '&Aring;',
340
- '&AElig;',
341
- '&Ccedil;',
342
- '&Egrave;',
343
- '&Eacute;',
344
- '&Ecirc;',
345
- '&Euml;',
346
- '&Igrave;',
347
- '&Iacute;',
348
- '&Icirc;',
349
- '&Iuml;',
350
- '&ETH;',
351
- '&Ntilde;',
352
- '&Ograve;',
353
- '&Oacute;',
354
- '&Ocirc;',
355
- '&Otilde;',
356
- '&Ouml;',
357
- '&times;',
358
- '&Oslash;',
359
- '&Ugrave;',
360
- '&Uacute;',
361
- '&Ucirc;',
362
- '&Uuml;',
363
- '&Yacute;',
364
- '&THORN;',
365
- '&szlig;',
366
- '&agrave;',
367
- '&aacute;',
368
- '&acirc;',
369
- '&atilde;',
370
- '&auml;',
371
- '&aring;',
372
- '&aelig;',
373
- '&ccedil;',
374
- '&egrave;',
375
- '&eacute;',
376
- '&ecirc;',
377
- '&euml;',
378
- '&igrave;',
379
- '&iacute;',
380
- '&icirc;',
381
- '&iuml;',
382
- '&eth;',
383
- '&ntilde;',
384
- '&ograve;',
385
- '&oacute;',
386
- '&ocirc;',
387
- '&otilde;',
388
- '&ouml;',
389
- '&divide;',
390
- '&oslash;',
391
- '&ugrave;',
392
- '&uacute;',
393
- '&ucirc;',
394
- '&uuml;',
395
- '&yacute;',
396
- '&thorn;',
397
- '&yuml;',
398
- '&OElig;',
399
- '&oelig;',
400
- '&sbquo;',
401
- '&bdquo;',
402
- '&hellip;',
403
- '&trade;',
404
- '&bull;',
405
- '&asymp;'
406
- );
407
-
408
- //REPLACE VALUES
409
- $str = str_replace($search, $replace, $str);
410
-
411
- //RETURN FORMATED STRING
412
- return $str;
413
- }
414
-
415
- function fix1_2DataMigration() {
416
- global $KcSeoWPSchema;
417
- $fix_1_2 = get_option($KcSeoWPSchema->options['1_2_fix']);
418
- $installed_version = get_option($KcSeoWPSchema->options['installed_version']);
419
- if (empty($fix_1_2) && empty($installed_version)) {
420
- global $wpdb;
421
- $ids = array();
422
- $posts = $wpdb->get_results("
423
- SELECT posts.ID FROM {$wpdb->prefix}posts as posts
424
- WHERE posts.post_type = 'post'
425
- AND EXISTS (
426
- SELECT * FROM `{$wpdb->prefix}postmeta` as postmeta
427
- WHERE postmeta.`meta_key` LIKE '_schema_%'
428
- AND postmeta.`post_id`=posts.ID
429
- )");
430
- if ($posts) {
431
- foreach ($posts as $id) {
432
- $ids[] = $id->ID;
433
- }
434
- }
435
- $pages = $wpdb->get_results("
436
- SELECT posts.ID FROM {$wpdb->prefix}posts as posts
437
- WHERE posts.post_type = 'page'
438
- AND EXISTS (
439
- SELECT * FROM `{$wpdb->prefix}postmeta` as postmeta
440
- WHERE postmeta.`meta_key` LIKE '_schema_%'
441
- AND postmeta.`post_id`=posts.ID
442
- )");
443
- if ($pages) {
444
- foreach ($pages as $id) {
445
- $ids[] = $id->ID;
446
- }
447
- }
448
-
449
-
450
- if (!empty($ids)) {
451
- $schemaFields = KcSeoOptions::getSchemaTypes();
452
- foreach ($ids as $id) {
453
- foreach ($schemaFields as $schemaID => $schema) {
454
- $schemaMetaId = $KcSeoWPSchema->KcSeoPrefix . $schemaID;
455
- $getRawMeta = get_post_meta($id, $schemaMetaId, true);
456
- $metaData = array();
457
- if (!empty($getRawMeta)) {
458
- if ($KcSeoWPSchema->isValidBase64($getRawMeta)) {
459
- $metaData = @unserialize(base64_decode($getRawMeta));
460
- } else {
461
- $metaData = @unserialize($getRawMeta);
462
- }
463
- }
464
- $metaData = (!empty($metaData) ? $metaData : array());
465
- if (!empty($metaData) && is_array($metaData)) {
466
- $metaData['active'] = true;
467
- update_post_meta($id, $schemaMetaId, $metaData);
468
- }
469
- }
470
- }
471
- }
472
-
473
- update_option($KcSeoWPSchema->options['1_2_fix'], true);
474
- }
475
- }
476
-
477
- function advertisingBlock() {
478
- ?>
479
- <div class='kc-get-pro'>
480
- <h3><?php _e("Pro Version Features", "wp-seo-structured-data-schema") ?></h3>
481
- <ol>
482
- <li><?php _e("Includes Auto-fill function <---Popular", "wp-seo-structured-data-schema") ?></li>
483
- <li><?php _e("Supports Custom Post Types beyond default page and posts", "wp-seo-structured-data-schema") ?></li>
484
- <li><?php _e("Supports WordPress Multisite", "wp-seo-structured-data-schema") ?></li>
485
- <li><?php _e("Supports more schema types:", "wp-seo-structured-data-schema") ?>
486
- <ol>
487
- <li><?php _e("Books", "wp-seo-structured-data-schema") ?></li>
488
- <li><?php _e("Courses", "wp-seo-structured-data-schema") ?></li>
489
- <li><?php _e("Person", "wp-seo-structured-data-schema") ?></li>
490
- <li><?php _e("Job Postings", "wp-seo-structured-data-schema") ?></li>
491
- <li><?php _e("Movies", "wp-seo-structured-data-schema") ?></li>
492
- <li><?php _e("Music", "wp-seo-structured-data-schema") ?></li>
493
- <li><?php _e("Recipe", "wp-seo-structured-data-schema") ?></li>
494
- <li><?php _e("TV Episode", "wp-seo-structured-data-schema") ?></li>
495
- <li><?php _e("QAPage", "wp-seo-structured-data-schema") ?></li>
496
- <li><?php _e("Item List", "wp-seo-structured-data-schema") ?></li>
497
- </ol>
498
- </li>
499
- </ol>
500
- <div class="kc-pro-action"><a class='button button-primary'
501
- href='https://wpsemplugins.com/downloads/wordpress-schema-plugin/'
502
- target='_blank'><?php _e("Get the Pro Version", "wp-seo-structured-data-schema") ?></a>
503
- </div>
504
- </div>
505
- <?php
506
- }
507
-
508
- function fix2_5_7_to_2_5_8() {
509
- global $KcSeoWPSchema;
510
- $installed_version = get_option($KcSeoWPSchema->options['installed_version']);
511
- if (version_compare($installed_version, '2.5.7', '<=')) {
512
- $settings = get_option($KcSeoWPSchema->options['settings']);
513
- if (isset($settings['contact']['contactType'])) {
514
- $settings['contact']['contactType'] = strtolower($settings['contact']['contactType']);
515
- update_option($KcSeoWPSchema->options['settings'], $settings);
516
- }
517
- if (isset($settings['area_served']) && !empty($settings['area_served'])) {
518
-
519
- $cList = KcSeoOptions::getCountryList();
520
- $areas = array();
521
- foreach ($settings['area_served'] as $area) {
522
- $key = array_search($area, $cList);
523
- if ($key) {
524
- $areas[] = $key;
525
- }
526
- }
527
- if (!empty($areas)) {
528
- $settings['area_served'] = $areas;
529
- update_option($KcSeoWPSchema->options['settings'], $settings);
530
- }
531
- }
532
-
533
- }
534
- }
535
- }
536
-
537
- endif;
1
+ <?php
2
+
3
+ if (!class_exists('KcSeoSettings')):
4
+
5
+ class KcSeoHelper
6
+ {
7
+ function verifyNonce() {
8
+ $nonce = !empty($_REQUEST['_kcseo_nonce']) ? sanitize_text_field($_REQUEST['_kcseo_nonce']) : null;
9
+ if (!wp_verify_nonce($nonce, $this->nonceText())) {
10
+ return false;
11
+ }
12
+
13
+ return true;
14
+ }
15
+
16
+ function nonceText() {
17
+ return "kcseo_nonce_secret_text";
18
+ }
19
+
20
+ function isValidBase64($string = null) {
21
+ $decoded = @base64_decode($string, true);
22
+ // Check if there is no invalid character in string
23
+ if (!@preg_match('/^[a-zA-Z0-9\/\r\n+]*={0,2}$/', $string)) {
24
+ return false;
25
+ }
26
+
27
+ // Decode the string in strict mode and send the response
28
+ if (!@base64_decode($string, true)) {
29
+ return false;
30
+ }
31
+
32
+ // Encode and compare it to original one
33
+ if (@base64_encode($decoded) != $string) {
34
+ return false;
35
+ }
36
+
37
+ return true;
38
+ }
39
+
40
+ function get_post_type_list() {
41
+ $post_types = get_post_types(
42
+ array(
43
+ 'public' => true
44
+ )
45
+ );
46
+ $exclude = array('attachment', 'revision', 'nav_menu_item');
47
+ foreach ($exclude as $ex) {
48
+ unset($post_types[$ex]);
49
+ }
50
+
51
+ return $post_types;
52
+ }
53
+
54
+ function kcSeoPostTypes() {
55
+ $post_types = get_post_types(
56
+ array(
57
+ '_builtin' => true
58
+ )
59
+ );
60
+ $exclude = array('attachment', 'revision', 'nav_menu_item');
61
+ foreach ($exclude as $ex) {
62
+ unset($post_types[$ex]);
63
+ }
64
+
65
+ return $post_types;
66
+ }
67
+
68
+ /**
69
+ * Sanitize field value
70
+ *
71
+ * @param string $fieldId
72
+ * @param array $field
73
+ * @param null $value
74
+ *
75
+ * @return array|null
76
+ * @internal param $value
77
+ */
78
+ function sanitize($fieldId, $field = array(), $value = null) {
79
+ $newValue = null;
80
+ $type = (!empty($field['type']) ? sanitize_text_field($field['type']) : 'text');
81
+ if (is_array($field) && $value) {
82
+ if (in_array($fieldId, ['description', 'articleBody', 'review_body'])) {
83
+ $newValue = KcSeoHelper::filter_content($value);
84
+ } else {
85
+ if ($type == 'url') {
86
+ $newValue = esc_url($value);
87
+ } else if ($type == 'textarea') {
88
+ $newValue = wp_kses($value, []);
89
+ } else if ($field['type'] == 'group' && !empty($field['fields'])) {
90
+ $newGValue = [];
91
+ $groupValue = is_array($value) ? $value : [];
92
+ foreach ($groupValue as $gId => $gValue) {
93
+ $newVItem = [];
94
+ foreach ($field['fields'] as $gFid => $fieldItem) {
95
+ if (isset($gValue[$gFid])) {
96
+ $newVItem[$gFid] = $this->sanitize($gFid, $fieldItem, $gValue[$gFid]);
97
+ }
98
+ }
99
+ array_push($newGValue, $newVItem);
100
+ }
101
+ $newValue = $newGValue;
102
+ } else {
103
+ $newValue = sanitize_text_field($value);
104
+ }
105
+ }
106
+
107
+ }
108
+
109
+ return $newValue;
110
+ }
111
+
112
+
113
+ function sanitizeOutPut($value, $type = 'text') {
114
+ $newValue = null;
115
+ if ($value) {
116
+ if ($type == 'text') {
117
+ $newValue = esc_html(stripslashes($value));
118
+ } elseif ($type == 'url') {
119
+ $newValue = esc_url(stripslashes($value));
120
+ } elseif ($type == 'textarea') {
121
+ $newValue = esc_textarea(stripslashes($value));
122
+ } else {
123
+ $newValue = esc_html(stripslashes($value));
124
+ }
125
+ }
126
+
127
+ return $newValue;
128
+ }
129
+
130
+ static function get_same_as($value) {
131
+ $sameAs = null;
132
+ if ($value) {
133
+ $sameAsRaw = preg_split('/\r\n|\r|\n/', $value);
134
+ $sameAsRaw = !empty($sameAsRaw) ? array_filter($sameAsRaw) : array();
135
+ if (!empty($sameAsRaw) && is_array($sameAsRaw)) {
136
+ if (1 < count($sameAsRaw)) {
137
+ $sameAs = $sameAsRaw;
138
+ } else {
139
+ $sameAs = $sameAsRaw[0];
140
+ }
141
+ }
142
+ }
143
+
144
+ return $sameAs;
145
+ }
146
+
147
+
148
+ function imageInfo($attachment_id) {
149
+ $data = array();
150
+ $imgData = wp_get_attachment_metadata($attachment_id);
151
+ $data['url'] = wp_get_attachment_url($attachment_id);
152
+ $data['width'] = !empty($imgData['width']) ? absint($imgData['width']) : 0;
153
+ $data['height'] = !empty($imgData['height']) ? absint($imgData['height']) : 0;
154
+
155
+ return $data;
156
+ }
157
+
158
+ static function filter_content($content, $limit = 0) {
159
+ $content = preg_replace('#\[[^\]]+\]#', '', wp_filter_nohtml_kses($content));
160
+ $content = stripslashes($content);
161
+ $content = convert_invalid_entities($content);
162
+ $content = self::characterToHTMLEntity($content);
163
+ if ($limit && strlen($content) > $limit) {
164
+ $content = mb_substr($content, 0, $limit, "utf-8");
165
+ $content = preg_replace('/\W\w+\s*(\W*)$/', '$1', $content);
166
+ }
167
+
168
+ $content = str_replace('&nbps;', ' ', $content);
169
+ $content = str_replace(PHP_EOL, ' ', $content);
170
+ $content = str_replace("\r", '', $content);
171
+
172
+ return $content;
173
+ }
174
+
175
+ static function characterToHTMLEntity($str) {
176
+ $replace = array(
177
+ "'",
178
+ '&',
179
+ '<',
180
+ '>',
181
+ '€',
182
+ '‘',
183
+ '’',
184
+ '“',
185
+ '”',
186
+ '–',
187
+ '—',
188
+ '¡',
189
+ '¢',
190
+ '£',
191
+ '¤',
192
+ '¥',
193
+ '¦',
194
+ '§',
195
+ '¨',
196
+ '©',
197
+ 'ª',
198
+ '«',
199
+ '¬',
200
+ '®',
201
+ '¯',
202
+ '°',
203
+ '±',
204
+ '²',
205
+ '³',
206
+ '´',
207
+ 'µ',
208
+ '¶',
209
+ '·',
210
+ '¸',
211
+ '¹',
212
+ 'º',
213
+ '»',
214
+ '¼',
215
+ '½',
216
+ '¾',
217
+ '¿',
218
+ 'À',
219
+ 'Á',
220
+ 'Â',
221
+ 'Ã',
222
+ 'Ä',
223
+ 'Å',
224
+ 'Æ',
225
+ 'Ç',
226
+ 'È',
227
+ 'É',
228
+ 'Ê',
229
+ 'Ë',
230
+ 'Ì',
231
+ 'Í',
232
+ 'Î',
233
+ 'Ï',
234
+ 'Ð',
235
+ 'Ñ',
236
+ 'Ò',
237
+ 'Ó',
238
+ 'Ô',
239
+ 'Õ',
240
+ 'Ö',
241
+ '×',
242
+ 'Ø',
243
+ 'Ù',
244
+ 'Ú',
245
+ 'Û',
246
+ 'Ü',
247
+ 'Ý',
248
+ 'Þ',
249
+ 'ß',
250
+ 'à',
251
+ 'á',
252
+ 'â',
253
+ 'ã',
254
+ 'ä',
255
+ 'å',
256
+ 'æ',
257
+ 'ç',
258
+ 'è',
259
+ 'é',
260
+ 'ê',
261
+ 'ë',
262
+ 'ì',
263
+ 'í',
264
+ 'î',
265
+ 'ï',
266
+ 'ð',
267
+ 'ñ',
268
+ 'ò',
269
+ 'ó',
270
+ 'ô',
271
+ 'õ',
272
+ 'ö',
273
+ '÷',
274
+ 'ø',
275
+ 'ù',
276
+ 'ú',
277
+ 'û',
278
+ 'ü',
279
+ 'ý',
280
+ 'þ',
281
+ 'ÿ',
282
+ 'Œ',
283
+ 'œ',
284
+ '‚',
285
+ '„',
286
+ '…',
287
+ '™',
288
+ '•',
289
+ '˜'
290
+ );
291
+
292
+ $search = array(
293
+ '&#8217;',
294
+ '&amp;',
295
+ '&lt;',
296
+ '&gt;',
297
+ '&euro;',
298
+ '&lsquo;',
299
+ '&rsquo;',
300
+ '&ldquo;',
301
+ '&rdquo;',
302
+ '&ndash;',
303
+ '&mdash;',
304
+ '&iexcl;',
305
+ '&cent;',
306
+ '&pound;',
307
+ '&curren;',
308
+ '&yen;',
309
+ '&brvbar;',
310
+ '&sect;',
311
+ '&uml;',
312
+ '&copy;',
313
+ '&ordf;',
314
+ '&laquo;',
315
+ '&not;',
316
+ '&reg;',
317
+ '&macr;',
318
+ '&deg;',
319
+ '&plusmn;',
320
+ '&sup2;',
321
+ '&sup3;',
322
+ '&acute;',
323
+ '&micro;',
324
+ '&para;',
325
+ '&middot;',
326
+ '&cedil;',
327
+ '&sup1;',
328
+ '&ordm;',
329
+ '&raquo;',
330
+ '&frac14;',
331
+ '&frac12;',
332
+ '&frac34;',
333
+ '&iquest;',
334
+ '&Agrave;',
335
+ '&Aacute;',
336
+ '&Acirc;',
337
+ '&Atilde;',
338
+ '&Auml;',
339
+ '&Aring;',
340
+ '&AElig;',
341
+ '&Ccedil;',
342
+ '&Egrave;',
343
+ '&Eacute;',
344
+ '&Ecirc;',
345
+ '&Euml;',
346
+ '&Igrave;',
347
+ '&Iacute;',
348
+ '&Icirc;',
349
+ '&Iuml;',
350
+ '&ETH;',
351
+ '&Ntilde;',
352
+ '&Ograve;',
353
+ '&Oacute;',
354
+ '&Ocirc;',
355
+ '&Otilde;',
356
+ '&Ouml;',
357
+ '&times;',
358
+ '&Oslash;',
359
+ '&Ugrave;',
360
+ '&Uacute;',
361
+ '&Ucirc;',
362
+ '&Uuml;',
363
+ '&Yacute;',
364
+ '&THORN;',
365
+ '&szlig;',
366
+ '&agrave;',
367
+ '&aacute;',
368
+ '&acirc;',
369
+ '&atilde;',
370
+ '&auml;',
371
+ '&aring;',
372
+ '&aelig;',
373
+ '&ccedil;',
374
+ '&egrave;',
375
+ '&eacute;',
376
+ '&ecirc;',
377
+ '&euml;',
378
+ '&igrave;',
379
+ '&iacute;',
380
+ '&icirc;',
381
+ '&iuml;',
382
+ '&eth;',
383
+ '&ntilde;',
384
+ '&ograve;',
385
+ '&oacute;',
386
+ '&ocirc;',
387
+ '&otilde;',
388
+ '&ouml;',
389
+ '&divide;',
390
+ '&oslash;',
391
+ '&ugrave;',
392
+ '&uacute;',
393
+ '&ucirc;',
394
+ '&uuml;',
395
+ '&yacute;',
396
+ '&thorn;',
397
+ '&yuml;',
398
+ '&OElig;',
399
+ '&oelig;',
400
+ '&sbquo;',
401
+ '&bdquo;',
402
+ '&hellip;',
403
+ '&trade;',
404
+ '&bull;',
405
+ '&asymp;'
406
+ );
407
+
408
+ //REPLACE VALUES
409
+ $str = str_replace($search, $replace, $str);
410
+
411
+ //RETURN FORMATED STRING
412
+ return $str;
413
+ }
414
+
415
+ function fix1_2DataMigration() {
416
+ global $KcSeoWPSchema;
417
+ $fix_1_2 = get_option($KcSeoWPSchema->options['1_2_fix']);
418
+ $installed_version = get_option($KcSeoWPSchema->options['installed_version']);
419
+ if (empty($fix_1_2) && empty($installed_version)) {
420
+ global $wpdb;
421
+ $ids = array();
422
+ $posts = $wpdb->get_results("
423
+ SELECT posts.ID FROM {$wpdb->prefix}posts as posts
424
+ WHERE posts.post_type = 'post'
425
+ AND EXISTS (
426
+ SELECT * FROM `{$wpdb->prefix}postmeta` as postmeta
427
+ WHERE postmeta.`meta_key` LIKE '_schema_%'
428
+ AND postmeta.`post_id`=posts.ID
429
+ )");
430
+ if ($posts) {
431
+ foreach ($posts as $id) {
432
+ $ids[] = $id->ID;
433
+ }
434
+ }
435
+ $pages = $wpdb->get_results("
436
+ SELECT posts.ID FROM {$wpdb->prefix}posts as posts
437
+ WHERE posts.post_type = 'page'
438
+ AND EXISTS (
439
+ SELECT * FROM `{$wpdb->prefix}postmeta` as postmeta
440
+ WHERE postmeta.`meta_key` LIKE '_schema_%'
441
+ AND postmeta.`post_id`=posts.ID
442
+ )");
443
+ if ($pages) {
444
+ foreach ($pages as $id) {
445
+ $ids[] = $id->ID;
446
+ }
447
+ }
448
+
449
+
450
+ if (!empty($ids)) {
451
+ $schemaFields = KcSeoOptions::getSchemaTypes();
452
+ foreach ($ids as $id) {
453
+ foreach ($schemaFields as $schemaID => $schema) {
454
+ $schemaMetaId = $KcSeoWPSchema->KcSeoPrefix . $schemaID;
455
+ $getRawMeta = get_post_meta($id, $schemaMetaId, true);
456
+ $metaData = array();
457
+ if (!empty($getRawMeta)) {
458
+ if ($KcSeoWPSchema->isValidBase64($getRawMeta)) {
459
+ $metaData = @unserialize(base64_decode($getRawMeta));
460
+ } else {
461
+ $metaData = @unserialize($getRawMeta);
462
+ }
463
+ }
464
+ $metaData = (!empty($metaData) ? $metaData : array());
465
+ if (!empty($metaData) && is_array($metaData)) {
466
+ $metaData['active'] = true;
467
+ update_post_meta($id, $schemaMetaId, $metaData);
468
+ }
469
+ }
470
+ }
471
+ }
472
+
473
+ update_option($KcSeoWPSchema->options['1_2_fix'], true);
474
+ }
475
+ }
476
+
477
+ function advertisingBlock() {
478
+ ?>
479
+ <div class='kc-get-pro'>
480
+ <h3><?php _e("Pro Version Features", "wp-seo-structured-data-schema") ?></h3>
481
+ <ol>
482
+ <li><?php _e("Includes Auto-fill function <---Popular", "wp-seo-structured-data-schema") ?></li>
483
+ <li><?php _e("Supports Custom Post Types beyond default page and posts", "wp-seo-structured-data-schema") ?></li>
484
+ <li><?php _e("Supports WordPress Multisite", "wp-seo-structured-data-schema") ?></li>
485
+ <li><?php _e("Supports more schema types:", "wp-seo-structured-data-schema") ?>
486
+ <ol>
487
+ <li><?php _e("Books", "wp-seo-structured-data-schema") ?></li>
488
+ <li><?php _e("Courses", "wp-seo-structured-data-schema") ?></li>
489
+ <li><?php _e("Person", "wp-seo-structured-data-schema") ?></li>
490
+ <li><?php _e("Job Postings", "wp-seo-structured-data-schema") ?></li>
491
+ <li><?php _e("Movies", "wp-seo-structured-data-schema") ?></li>
492
+ <li><?php _e("Music", "wp-seo-structured-data-schema") ?></li>
493
+ <li><?php _e("Recipe", "wp-seo-structured-data-schema") ?></li>
494
+ <li><?php _e("TV Episode", "wp-seo-structured-data-schema") ?></li>
495
+ <li><?php _e("QAPage", "wp-seo-structured-data-schema") ?></li>
496
+ <li><?php _e("Item List", "wp-seo-structured-data-schema") ?></li>
497
+ </ol>
498
+ </li>
499
+ </ol>
500
+ <div class="kc-pro-action"><a class='button button-primary'
501
+ href='https://wpsemplugins.com/downloads/wordpress-schema-plugin/'
502
+ target='_blank'><?php _e("Get the Pro Version", "wp-seo-structured-data-schema") ?></a>
503
+ </div>
504
+ </div>
505
+ <?php
506
+ }
507
+
508
+ function fix2_5_7_to_2_5_8() {
509
+ global $KcSeoWPSchema;
510
+ $installed_version = get_option($KcSeoWPSchema->options['installed_version']);
511
+ if (version_compare($installed_version, '2.5.7', '<=')) {
512
+ $settings = get_option($KcSeoWPSchema->options['settings']);
513
+ if (isset($settings['contact']['contactType'])) {
514
+ $settings['contact']['contactType'] = strtolower($settings['contact']['contactType']);
515
+ update_option($KcSeoWPSchema->options['settings'], $settings);
516
+ }
517
+ if (isset($settings['area_served']) && !empty($settings['area_served'])) {
518
+
519
+ $cList = KcSeoOptions::getCountryList();
520
+ $areas = array();
521
+ foreach ($settings['area_served'] as $area) {
522
+ $key = array_search($area, $cList);
523
+ if ($key) {
524
+ $areas[] = $key;
525
+ }
526
+ }
527
+ if (!empty($areas)) {
528
+ $settings['area_served'] = $areas;
529
+ update_option($KcSeoWPSchema->options['settings'], $settings);
530
+ }
531
+ }
532
+
533
+ }
534
+ }
535
+ }
536
+
537
+ endif;
lib/classes/KcSeoHooks.php CHANGED
@@ -1,68 +1,64 @@
1
- <?php
2
-
3
-
4
- class KcSeoHooks {
5
-
6
- public function __construct() {
7
- add_action( 'plugins_loaded', array( __CLASS__, 'plugins_loaded' ) );
8
-
9
- }
10
-
11
- public static function plugins_loaded() {
12
- $settings = get_option( 'kcseo_wp_schema_settings' );
13
- if ( KcSeoFunctions::isYoastActive() ) {
14
- if ( isset( $settings['yoast_wpseo_json_ld_search'] ) && $settings['yoast_wpseo_json_ld_search'] ) {
15
- add_filter( 'disable_wpseo_json_ld_search', '__return_true' );
16
- }
17
- if ( isset( $settings['yoast_wpseo_json_ld'] ) && $settings['yoast_wpseo_json_ld'] ) {
18
- add_filter( 'wpseo_json_ld_output', array( __CLASS__, 'disable_yoast_schema_data' ), 10 );
19
- add_filter( 'wpseo_schema_graph_pieces', '__return_empty_array' );
20
- }
21
- }
22
-
23
- if ( KcSeoFunctions::isWcActive() ) {
24
- if ( isset( $settings['wc_schema_disable'] ) && $settings['wc_schema_disable'] ) {
25
- add_filter( 'woocommerce_structured_data_type_for_page', array(
26
- __CLASS__,
27
- 'remove_product_structured_data'
28
- ), 10, 2 );
29
- add_action( 'init', array( __CLASS__, 'remove_output_structured_data' ) );
30
- }
31
- }
32
- if ( KcSeoFunctions::isEddActive() ) {
33
- if ( isset( $settings['edd_schema_microdata'] ) && $settings['edd_schema_microdata'] ) {
34
- add_filter( 'edd_add_schema_microdata', '__return_false' );
35
- }
36
- }
37
- }
38
-
39
- public static function disable_yoast_schema_data( $data ) {
40
- $data = array();
41
-
42
- return $data;
43
- }
44
-
45
- /**
46
- * Remove all product structured data.
47
- */
48
- static function remove_product_structured_data( $types ) {
49
- if ( ( $index = array_search( 'product', $types ) ) !== false ) {
50
- unset( $types[ $index ] );
51
- }
52
-
53
- return $types;
54
- }
55
-
56
- /* Remove the default WooCommerce 3 JSON/LD structured data */
57
- static function remove_output_structured_data() {
58
- remove_action( 'wp_footer', array(
59
- WC()->structured_data,
60
- 'output_structured_data'
61
- ), 10 ); // This removes structured data from all frontend pages
62
- remove_action( 'woocommerce_email_order_details', array(
63
- WC()->structured_data,
64
- 'output_email_structured_data'
65
- ), 30 ); // This removes structured data from all Emails sent by WooCommerce
66
- }
67
-
68
- }
1
+ <?php
2
+
3
+ class KcSeoHooks {
4
+ public function __construct() {
5
+ add_action('plugins_loaded', [__CLASS__, 'plugins_loaded']);
6
+ }
7
+
8
+ public static function plugins_loaded() {
9
+ $settings = get_option('kcseo_wp_schema_settings');
10
+ if (KcSeoFunctions::isYoastActive()) {
11
+ if (isset($settings['yoast_wpseo_json_ld_search']) && $settings['yoast_wpseo_json_ld_search']) {
12
+ add_filter('disable_wpseo_json_ld_search', '__return_true');
13
+ }
14
+ if (isset($settings['yoast_wpseo_json_ld']) && $settings['yoast_wpseo_json_ld']) {
15
+ add_filter('wpseo_json_ld_output', [__CLASS__, 'disable_yoast_schema_data'], 10);
16
+ add_filter('wpseo_schema_graph_pieces', '__return_empty_array');
17
+ }
18
+ }
19
+
20
+ if (KcSeoFunctions::isWcActive()) {
21
+ if (isset($settings['wc_schema_disable']) && $settings['wc_schema_disable']) {
22
+ add_filter('woocommerce_structured_data_type_for_page', [
23
+ __CLASS__,
24
+ 'remove_product_structured_data',
25
+ ], 10, 2);
26
+ add_action('init', [__CLASS__, 'remove_output_structured_data']);
27
+ }
28
+ }
29
+ if (KcSeoFunctions::isEddActive()) {
30
+ if (isset($settings['edd_schema_microdata']) && $settings['edd_schema_microdata']) {
31
+ add_filter('edd_add_schema_microdata', '__return_false');
32
+ }
33
+ }
34
+ }
35
+
36
+ public static function disable_yoast_schema_data($data) {
37
+ $data = [];
38
+
39
+ return $data;
40
+ }
41
+
42
+ /**
43
+ * Remove all product structured data.
44
+ */
45
+ public static function remove_product_structured_data($types) {
46
+ if (($index = array_search('product', $types)) !== false) {
47
+ unset($types[$index]);
48
+ }
49
+
50
+ return $types;
51
+ }
52
+
53
+ /* Remove the default WooCommerce 3 JSON/LD structured data */
54
+ public static function remove_output_structured_data() {
55
+ remove_action('wp_footer', [
56
+ WC()->structured_data,
57
+ 'output_structured_data',
58
+ ], 10); // This removes structured data from all frontend pages
59
+ remove_action('woocommerce_email_order_details', [
60
+ WC()->structured_data,
61
+ 'output_email_structured_data',
62
+ ], 30); // This removes structured data from all Emails sent by WooCommerce
63
+ }
64
+ }
 
 
 
 
lib/classes/KcSeoInit.php CHANGED
@@ -1,214 +1,217 @@
1
- <?php
2
-
3
- if ( ! class_exists( 'KcSeoInit' ) ):
4
-
5
- class KcSeoInit {
6
- protected $version;
7
-
8
- function __construct() {
9
-
10
- $this->version = ( defined( 'WP_DEBUG' ) && WP_DEBUG ) ? time() : KCSEO_VERSION;
11
- add_action( 'init', array( $this, 'kcSeoScript' ) );
12
- add_action( 'admin_menu', array( $this, 'kcSeo_Wp_Schema_menu' ) );
13
- add_action( 'plugins_loaded', array( $this, 'kcSeo_pluginInit' ) );
14
- add_action( 'wp_ajax_kcSeoWpSchemaSettings', array( $this, 'kcSeoWpSchemaSettings' ) );
15
- add_action( 'wp_ajax_kcSeoMainSettings_action', array( $this, 'kcSeoMainSettings_action' ) );
16
- add_action( 'wp_ajax_newSocial', array( $this, 'newSocial' ) );
17
- add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
18
-
19
- // for MU Site
20
- add_action( 'activated_plugin', array( $this, 'update_queue' ), 10, 2 );
21
- add_action( 'deactivated_plugin', array( $this, 'update_queue' ), 10, 2 );
22
-
23
- register_activation_hook( KCSEO_WP_SCHEMA_PLUGIN_ACTIVE_FILE_NAME, array( $this, 'activePlugin' ) );
24
- // register_deactivation_hook(KCSEO_WP_SCHEMA_PLUGIN_ACTIVE_FILE_NAME, array($this, 'uninstall'));
25
- // Uninstall hook
26
-
27
- add_filter( 'plugin_action_links_' . KCSEO_WP_SCHEMA_PLUGIN_ACTIVE_FILE_NAME,
28
- array( $this, 'schema_marketing' ) );
29
-
30
- }
31
-
32
- function schema_marketing( $links ) {
33
- $links[] = '<a target="_blank" href="' . esc_url( 'https://wpsemplugins.com/documentation/' ) . '">' . __( "Documentation", "wp-seo-structured-data-schema" ) . '</a>';
34
- $links[] = '<a target="_blank" href="' . esc_url( 'https://wpsemplugins.com/downloads/wordpress-schema-plugin/' ) . '">' . __( "Get Pro", "wp-seo-structured-data-schema" ) . '</a>';
35
-
36
- return $links;
37
- }
38
-
39
-
40
- function update_queue( $plugin, $network_wide = null ) {
41
- if ( ! $network_wide ) {
42
- return;
43
- }
44
- list( $action ) = explode( '_', current_filter(), 2 );
45
-
46
- $action = str_replace( 'activated', 'activate', $action );
47
- $queue = get_site_option( "network_{$action}_queue", array() );
48
-
49
- $queue[ $plugin ] = ( has_filter( $action . '_' . $plugin ) || has_filter( $action . '_plugin' ) );
50
- update_site_option( "network_{$action}_queue", $queue );
51
- }
52
-
53
- function admin_enqueue_scripts() {
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-select2-js',
63
- 'kcseo-tooltip-js',
64
- 'kcseo-admin-js',
65
- ) );
66
-
67
- // styles
68
- wp_enqueue_style( array(
69
- 'kcseo-select2-css',
70
- 'kcseo-tooltip-css',
71
- 'kcseo-admin-css',
72
- ) );
73
-
74
- }
75
- }
76
-
77
- function kcSeoScript() {
78
- global $KcSeoWPSchema;
79
- // register team scripts and styles
80
- $scripts = array();
81
- $styles = array();
82
- if ( is_admin() ) {
83
-
84
-
85
- $scripts[] = array(
86
- 'handle' => 'kcseo-select2-js',
87
- 'src' => $KcSeoWPSchema->assetsUrl . 'js/select2.min.js',
88
- 'deps' => array( 'jquery' ),
89
- 'footer' => true
90
- );
91
- $scripts[] = array(
92
- 'handle' => 'kcseo-tooltip-js',
93
- 'src' => $KcSeoWPSchema->assetsUrl . 'js/jquery.qtip.js',
94
- 'deps' => array( 'jquery' ),
95
- 'footer' => true
96
- );
97
- $scripts[] = array(
98
- 'handle' => 'kcseo-admin-js',
99
- 'src' => $KcSeoWPSchema->assetsUrl . 'js/admin.js',
100
- 'deps' => array( 'jquery' ),
101
- 'footer' => true
102
- );
103
- $styles['kcseo-select2-css'] = $KcSeoWPSchema->assetsUrl . 'css/select2.min.css';
104
- $styles['kcseo-tooltip-css'] = $KcSeoWPSchema->assetsUrl . 'css/jquery.qtip.css';
105
- $styles['kcseo-admin-css'] = $KcSeoWPSchema->assetsUrl . 'css/admin.css';
106
- }
107
- foreach ( $scripts as $script ) {
108
- wp_register_script( $script['handle'], $script['src'], $script['deps'], $this->version, $script['footer'] );
109
- }
110
- foreach ( $styles as $k => $v ) {
111
- wp_register_style( $k, $v, false, $this->version );
112
- }
113
- }
114
-
115
- function newSocial() {
116
- $schemaModel = new KcSeoSchemaModel;
117
- $id = ( $_REQUEST['id'] ? $_REQUEST['id'] + 1 : 0 );
118
- $html = null;
119
- $html = "<div class='sfield'>";
120
- $html .= "<select name='social[$id][id]'>";
121
- foreach ( KcSeoOptions::getSocialList() as $skey => $social ) {
122
- $html .= "<option value='$skey'>$social</option>";
123
- }
124
- $html .= "</select>";
125
- $html .= "<input type='text' name='social[$id][link]'>";
126
- $html .= '<span class="dashicons dashicons-trash social-remove"></span>';
127
- $html .= "</div>";
128
-
129
-
130
- wp_send_json( array( 'data' => $html ) );
131
- die();
132
- }
133
-
134
- function kcSeoWpSchemaSettings() {
135
- global $KcSeoWPSchema;
136
- $error = true;
137
- $msg = null;
138
- if ( $KcSeoWPSchema->verifyNonce() ) {
139
- unset( $_REQUEST['action'] );
140
- update_option( $KcSeoWPSchema->options['settings'], $_REQUEST );
141
- $error = false;
142
- $msg = __( 'Settings successfully updated', KCSEO_WP_SCHEMA_SLUG );
143
- } else {
144
- $msg = __( 'Security Error !!', KCSEO_WP_SCHEMA_SLUG );
145
- }
146
- $response = array(
147
- 'error' => $error,
148
- 'msg' => $msg
149
- );
150
- wp_send_json( $response );
151
- die();
152
- }
153
-
154
- function kcSeoMainSettings_action() {
155
- global $KcSeoWPSchema;
156
- $error = true;
157
- $msg = null;
158
- if ( $KcSeoWPSchema->verifyNonce() ) {
159
- unset( $_REQUEST['action'] );
160
- unset( $_REQUEST['_kcseo_nonce'] );
161
- unset( $_REQUEST['_wp_http_referer'] );
162
- update_option( $KcSeoWPSchema->options['main_settings'], $_REQUEST );
163
- $error = false;
164
- $msg = __( 'Settings successfully updated', KCSEO_WP_SCHEMA_SLUG );
165
- } else {
166
- $msg = __( 'Security Error !!', KCSEO_WP_SCHEMA_SLUG );
167
- }
168
- $response = array(
169
- 'error' => $error,
170
- 'msg' => $msg
171
- );
172
- wp_send_json( $response );
173
- die();
174
- }
175
-
176
- function wp_schema_page() {
177
- global $KcSeoWPSchema;
178
- $KcSeoWPSchema->render( 'schema-options' );
179
- }
180
-
181
- function wp_schema_setting_page() {
182
- global $KcSeoWPSchema;
183
- $KcSeoWPSchema->render( 'settings' );
184
- }
185
-
186
- function kcSeo_Wp_Schema_menu() {
187
- global $KcSeoWPSchema;
188
- 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',
189
- array( $this, 'wp_schema_page' ), $KcSeoWPSchema->assetsUrl . 'images/wp-seo-schema.png' );
190
- add_submenu_page( 'wp-seo-schema', __( 'WP SEO Schema settings', "wp-seo-structured-data-schema" ), __( 'Settings', "wp-seo-structured-data-schema" ), 'manage_options',
191
- 'wp-seo-schema-settings',
192
- array( $this, 'wp_schema_setting_page' ) );
193
-
194
- }
195
-
196
-
197
- function kcSeo_pluginInit() {
198
- load_plugin_textdomain( KCSEO_WP_SCHEMA_SLUG, false, KCSEO_WP_SCHEMA_LANGUAGE_PATH );
199
- $this->updateVariableAndFixIssue();
200
- }
201
-
202
- function activePlugin() {
203
- $this->updateVariableAndFixIssue();
204
- }
205
-
206
- function updateVariableAndFixIssue() {
207
- global $KcSeoWPSchema;
208
- $KcSeoWPSchema->fix1_2DataMigration();
209
- $KcSeoWPSchema->fix2_5_7_to_2_5_8();
210
- update_option( $KcSeoWPSchema->options['installed_version'], $KcSeoWPSchema->options['version'] );
211
- }
212
-
213
- }
214
- endif;
 
 
 
1
+ <?php
2
+
3
+ if (! class_exists('KcSeoInit')):
4
+
5
+ class KcSeoInit {
6
+ protected $version;
7
+
8
+ public function __construct() {
9
+ $this->version = (defined('WP_DEBUG') && WP_DEBUG) ? time() : KCSEO_WP_SCHEMA_VERSION;
10
+ add_action('init', [$this, 'kcSeoScript']);
11
+ add_action('admin_menu', [$this, 'kcSeo_Wp_Schema_menu']);
12
+ add_action('plugins_loaded', [$this, 'kcSeo_pluginInit']);
13
+ add_action('wp_ajax_kcSeoWpSchemaSettings', [$this, 'kcSeoWpSchemaSettings']);
14
+ add_action('wp_ajax_kcSeoMainSettings_action', [$this, 'kcSeoMainSettings_action']);
15
+ add_action('wp_ajax_newSocial', [$this, 'newSocial']);
16
+ add_action('admin_enqueue_scripts', [$this, 'admin_enqueue_scripts']);
17
+
18
+ // for MU Site
19
+ add_action('activated_plugin', [$this, 'update_queue'], 10, 2);
20
+ add_action('deactivated_plugin', [$this, 'update_queue'], 10, 2);
21
+
22
+ register_activation_hook(KCSEO_WP_SCHEMA_PLUGIN_ACTIVE_FILE_NAME, [$this, 'activePlugin']);
23
+ // register_deactivation_hook(KCSEO_WP_SCHEMA_PLUGIN_ACTIVE_FILE_NAME, array($this, 'uninstall'));
24
+ // Uninstall hook
25
+
26
+ add_filter(
27
+ 'plugin_action_links_' . KCSEO_WP_SCHEMA_PLUGIN_ACTIVE_FILE_NAME,
28
+ [$this, 'schema_marketing']
29
+ );
30
+ }
31
+
32
+ public function schema_marketing($links) {
33
+ $links[] = '<a target="_blank" href="' . esc_url('https://wpsemplugins.com/documentation/') . '">' . __('Documentation', 'wp-seo-structured-data-schema') . '</a>';
34
+ $links[] = '<a target="_blank" href="' . esc_url('https://wpsemplugins.com/downloads/wordpress-schema-plugin/') . '">' . __('Get Pro', 'wp-seo-structured-data-schema') . '</a>';
35
+
36
+ return $links;
37
+ }
38
+
39
+ public function update_queue($plugin, $network_wide = null) {
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", []);
47
+
48
+ $queue[$plugin] = (has_filter($action . '_' . $plugin) || has_filter($action . '_plugin'));
49
+ update_site_option("network_{$action}_queue", $queue);
50
+ }
51
+
52
+ public function admin_enqueue_scripts() {
53
+ global $pagenow;
54
+ // validate page
55
+ $page = isset($_REQUEST['page']) ? $_REQUEST['page'] : null;
56
+ if ($pagenow == 'admin.php' && ($page == 'wp-seo-schema' || $page == 'wp-seo-schema-settings')) {
57
+ // scripts
58
+ wp_enqueue_media();
59
+ wp_enqueue_script([
60
+ 'jquery',
61
+ 'kcseo-select2-js',
62
+ 'kcseo-tooltip-js',
63
+ 'kcseo-admin-js',
64
+ ]);
65
+
66
+ // styles
67
+ wp_enqueue_style([
68
+ 'kcseo-select2-css',
69
+ 'kcseo-tooltip-css',
70
+ 'kcseo-admin-css',
71
+ ]);
72
+ }
73
+ }
74
+
75
+ public function kcSeoScript() {
76
+ global $KcSeoWPSchema;
77
+ // register team scripts and styles
78
+ $scripts = [];
79
+ $styles = [];
80
+ if (is_admin()) {
81
+ $scripts[] = [
82
+ 'handle' => 'kcseo-select2-js',
83
+ 'src' => $KcSeoWPSchema->assetsUrl . 'js/select2.min.js',
84
+ 'deps' => ['jquery'],
85
+ 'footer' => true,
86
+ ];
87
+ $scripts[] = [
88
+ 'handle' => 'kcseo-tooltip-js',
89
+ 'src' => $KcSeoWPSchema->assetsUrl . 'js/jquery.qtip.js',
90
+ 'deps' => ['jquery'],
91
+ 'footer' => true,
92
+ ];
93
+ $scripts[] = [
94
+ 'handle' => 'kcseo-admin-js',
95
+ 'src' => $KcSeoWPSchema->assetsUrl . 'js/admin.js',
96
+ 'deps' => ['jquery'],
97
+ 'footer' => true,
98
+ ];
99
+ $styles['kcseo-select2-css'] = $KcSeoWPSchema->assetsUrl . 'css/select2.min.css';
100
+ $styles['kcseo-tooltip-css'] = $KcSeoWPSchema->assetsUrl . 'css/jquery.qtip.css';
101
+ $styles['kcseo-admin-css'] = $KcSeoWPSchema->assetsUrl . 'css/admin.css';
102
+ }
103
+ foreach ($scripts as $script) {
104
+ wp_register_script($script['handle'], $script['src'], $script['deps'], $this->version, $script['footer']);
105
+ }
106
+ foreach ($styles as $k => $v) {
107
+ wp_register_style($k, $v, false, $this->version);
108
+ }
109
+ }
110
+
111
+ public function newSocial() {
112
+ $schemaModel = new KcSeoSchemaModel;
113
+ $id = ($_REQUEST['id'] ? $_REQUEST['id'] + 1 : 0);
114
+ $html = null;
115
+ $html = "<div class='sfield'>";
116
+ $html .= "<select name='social[$id][id]'>";
117
+ foreach (KcSeoOptions::getSocialList() as $skey => $social) {
118
+ $html .= "<option value='$skey'>$social</option>";
119
+ }
120
+ $html .= '</select>';
121
+ $html .= "<input type='text' name='social[$id][link]'>";
122
+ $html .= '<span class="dashicons dashicons-trash social-remove"></span>';
123
+ $html .= '</div>';
124
+
125
+ wp_send_json(['data' => $html]);
126
+ die();
127
+ }
128
+
129
+ public function kcSeoWpSchemaSettings() {
130
+ global $KcSeoWPSchema;
131
+ $error = true;
132
+ $msg = null;
133
+ if ($KcSeoWPSchema->verifyNonce()) {
134
+ unset($_REQUEST['action']);
135
+ update_option($KcSeoWPSchema->options['settings'], $_REQUEST);
136
+ $error = false;
137
+ $msg = __('Settings successfully updated', KCSEO_WP_SCHEMA_SLUG);
138
+ } else {
139
+ $msg = __('Security Error !!', KCSEO_WP_SCHEMA_SLUG);
140
+ }
141
+ $response = [
142
+ 'error' => $error,
143
+ 'msg' => $msg,
144
+ ];
145
+ wp_send_json($response);
146
+ die();
147
+ }
148
+
149
+ public function kcSeoMainSettings_action() {
150
+ global $KcSeoWPSchema;
151
+ $error = true;
152
+ $msg = null;
153
+ if ($KcSeoWPSchema->verifyNonce()) {
154
+ unset($_REQUEST['action']);
155
+ unset($_REQUEST['_kcseo_nonce']);
156
+ unset($_REQUEST['_wp_http_referer']);
157
+ update_option($KcSeoWPSchema->options['main_settings'], $_REQUEST);
158
+ $error = false;
159
+ $msg = __('Settings successfully updated', KCSEO_WP_SCHEMA_SLUG);
160
+ } else {
161
+ $msg = __('Security Error !!', KCSEO_WP_SCHEMA_SLUG);
162
+ }
163
+ $response = [
164
+ 'error' => $error,
165
+ 'msg' => $msg,
166
+ ];
167
+ wp_send_json($response);
168
+ die();
169
+ }
170
+
171
+ public function wp_schema_page() {
172
+ global $KcSeoWPSchema;
173
+ $KcSeoWPSchema->render('schema-options');
174
+ }
175
+
176
+ public function wp_schema_setting_page() {
177
+ global $KcSeoWPSchema;
178
+ $KcSeoWPSchema->render('settings');
179
+ }
180
+
181
+ public function kcSeo_Wp_Schema_menu() {
182
+ global $KcSeoWPSchema;
183
+ add_menu_page(
184
+ __('WP SEO Structured Data Schema', 'wp-seo-structured-data-schema'),
185
+ __('WP SEO Schema', 'wp-seo-structured-data-schema'),
186
+ 'manage_options',
187
+ 'wp-seo-schema',
188
+ [$this, 'wp_schema_page'],
189
+ $KcSeoWPSchema->assetsUrl . 'images/wp-seo-schema.png'
190
+ );
191
+ add_submenu_page(
192
+ 'wp-seo-schema',
193
+ __('WP SEO Schema settings', 'wp-seo-structured-data-schema'),
194
+ __('Settings', 'wp-seo-structured-data-schema'),
195
+ 'manage_options',
196
+ 'wp-seo-schema-settings',
197
+ [$this, 'wp_schema_setting_page']
198
+ );
199
+ }
200
+
201
+ public function kcSeo_pluginInit() {
202
+ load_plugin_textdomain(KCSEO_WP_SCHEMA_SLUG, false, KCSEO_WP_SCHEMA_LANGUAGE_PATH);
203
+ $this->updateVariableAndFixIssue();
204
+ }
205
+
206
+ public function activePlugin() {
207
+ $this->updateVariableAndFixIssue();
208
+ }
209
+
210
+ public function updateVariableAndFixIssue() {
211
+ global $KcSeoWPSchema;
212
+ $KcSeoWPSchema->fix1_2DataMigration();
213
+ $KcSeoWPSchema->fix2_5_7_to_2_5_8();
214
+ update_option($KcSeoWPSchema->options['installed_version'], $KcSeoWPSchema->options['version']);
215
+ }
216
+ }
217
+ endif;
lib/classes/KcSeoMetaData.php CHANGED
@@ -1,183 +1,183 @@
1
- <?php
2
-
3
- if (!class_exists('KcSeoMetaData')):
4
-
5
- class KcSeoMetaData
6
- {
7
-
8
- function __construct() {
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'))) {
18
- return;
19
- }
20
- if (!in_array($typenow, $pt)) {
21
- return;
22
- }
23
-
24
- // scripts
25
- wp_enqueue_script(array(
26
- 'jquery',
27
- 'kcseo-select2-js',
28
- 'kcseo-admin-js',
29
- ));
30
-
31
- // styles
32
- wp_enqueue_style(array(
33
- 'kcseo-select2-css',
34
- 'kcseo-admin-css',
35
- ));
36
-
37
- add_action('admin_head', array($this, 'admin_head'));
38
- }
39
-
40
- function admin_head() {
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'
51
- );
52
- }
53
-
54
- }
55
-
56
- function meta_box_wp_schema($post) {
57
- global $KcSeoWPSchema;
58
- wp_nonce_field($KcSeoWPSchema->nonceText(), '_kcseo_nonce');
59
- $_kcseo_ative_tab = get_post_meta($post->ID, '_kcseo_ative_tab', true);
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/search/docs/advanced/structured-data'>https://developers.google.com/search/docs/advanced/structured-data</a></p>";
65
- $html .= "</div>";
66
- $html .= "<div class='schema-holder'>";
67
- $html .= '<div id="meta-tab-holder" class="rt-tab-container">';
68
- $htmlMenu = null;
69
- $htmlCont = null;
70
- $htmlMenu .= "<ul class='rt-tab-nav'>";
71
- $schemaFields = KcSeoOptions::getSchemaTypes();
72
- $tab_index = 0;
73
- foreach ($schemaFields as $schemaID => $schema) {
74
- $tabId = $KcSeoWPSchema->KcSeoPrefix . $schemaID;
75
- $activeClass = ((!$_kcseo_ative_tab && $tab_index === 0) || $tabId === $_kcseo_ative_tab) ? ' active' : null;
76
- $tab_index++;
77
- $htmlMenu .= '<li data-id="' . $tabId . '" class="' . $activeClass . '"><a href="#' . $tabId . '">' . $schema['title'] . '</a></li>';
78
- $htmlCont .= "<div id='{$tabId}' class='rt-tab-content{$activeClass}'>";
79
- $htmlCont .= "<div class='kc-top-toolbar'><span class='disabled button button-primary'>" . __("Auto Fill", "wp-seo-structured-data-schema") . "</span><span class='kcseo-pro-label'>" . __("PRO", "wp-seo-structured-data-schema") . "</span></div>";
80
- $metaData = get_post_meta($post->ID, $tabId, true);
81
- $metaData = (is_array($metaData) ? $metaData : array());
82
- if (!empty($schema['fields'])) {
83
- foreach ($schema['fields'] as $fieldId => $data) {
84
- $data['fieldId'] = $fieldId;
85
- $data['id'] = $tabId . "_" . $fieldId;
86
- $data['name'] = $tabId . "[{$fieldId}]";
87
- $data['value'] = (!empty($metaData[$fieldId]) ? $metaData[$fieldId] : null);
88
- if ($data['type'] === 'group' && !empty($data['fields'])) {
89
- $groupMetaData = isset($metaData[$fieldId]) && !empty($metaData[$fieldId]) ? $metaData[$fieldId] : array(array());
90
- $html_g = null;
91
- $i = 0;
92
- foreach ($groupMetaData as $imDataId => $mData) {
93
- $html_gItem = null;
94
- foreach ($data['fields'] as $gFid => $field) {
95
- $field['fieldId'] = $fieldId . '-' . $gFid;
96
- $field['id'] = $tabId . "_" . $fieldId . '_' . $gFid;
97
- $field['name'] = $tabId . "[$fieldId]" . "[$imDataId][$gFid]";
98
- $field['value'] = (!empty($mData[$gFid]) ? $mData[$gFid] : null);
99
- $html_gItem .= $schemas->get_field($field);
100
- }
101
- $html_g .= sprintf('<div class="kcseo-group-item" data-index="%d" id="%s">%s%s%s</div>',
102
- $imDataId,
103
- $tabId . "_" . $fieldId . "_group_item_" . $imDataId,
104
- isset($data['duplicate']) && $imDataId > 0 ? '<div class="kc-top-toolbar"><span class="kcseo-remove-group"><span class="dashicons dashicons-trash"></span>Remove</span></div>' : null,
105
- $html_gItem,
106
- isset($data['duplicate']) ? '<div class="kc-bottom-toolbar"><span class="button button-primary kcseo-group-duplicate">Duplicate item</span></div>' : null
107
- );
108
- }
109
- $htmlCont .= sprintf('<div class="field-container kcseo-group-wrapper" data-duplicate="%d" data-group-id="%s" id="%s">%s</div>',
110
- isset($data['duplicate']) ? true : false,
111
- $tabId . "[$fieldId]",
112
- $tabId . "_" . $fieldId . "_group_wrapper",
113
- $html_g
114
- );
115
-
116
- } else {
117
- $htmlCont .= $schemas->get_field($data);
118
- }
119
- }
120
- }
121
- if (!empty($schema['pro']) && $schema['pro']) {
122
- $htmlCont .= "<div class='kcseo-pro-feature'>" . __("This is a Pro version feature.", "wp-seo-structured-data-schema") . "<a href='https://wpsemplugins.com/downloads/wordpress-schema-plugin/' target='_blank'>(more info)</a></div>";
123
- }
124
- $htmlCont .= "</div>";
125
- }
126
- $htmlMenu .= "</ul>";
127
- $html .= $htmlMenu . $htmlCont;
128
- $html .= '<input type="hidden" id="_kcseo_ative_tab" name="_kcseo_ative_tab" value="' . $_kcseo_ative_tab . '" />';
129
- $html .= "</div>";
130
- $html .= "</div>";
131
- echo $html;
132
- }
133
-
134
- function save_KcSeo_schema_data($post_id, $post, $update) {
135
- if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
136
- return $post_id;
137
- }
138
- global $KcSeoWPSchema;
139
- $nonce = !empty($_REQUEST['_kcseo_nonce']) ? sanitize_text_field($_REQUEST['_kcseo_nonce']) : null;
140
- if (!wp_verify_nonce($nonce, $KcSeoWPSchema->nonceText())) {
141
- return $post_id;
142
- }
143
-
144
- // Check permissions
145
- if (!empty($_GET['post_type'])) {
146
- if (!current_user_can('edit_' . $_GET['post_type'], $post_id)) {
147
- return $post_id;
148
- }
149
- }
150
- $pt = $KcSeoWPSchema->kcSeoPostTypes();
151
- if (!in_array($post->post_type, $pt)) {
152
- return $post_id;
153
- }
154
-
155
- $meta = array();
156
- $schemaModel = new KcSeoSchemaModel;
157
- $schemaFields = KcSeoOptions::getSchemaTypes();
158
- foreach ($schemaFields as $schemaID => $schema) {
159
- $schemaMetaId = $KcSeoWPSchema->KcSeoPrefix . $schemaID;
160
- $data = array();
161
- if (!empty($schema['fields'])) {
162
- foreach ($schema['fields'] as $fieldId => $fieldData) {
163
- $value = (!empty($_REQUEST[$schemaMetaId][$fieldId]) ? $_REQUEST[$schemaMetaId][$fieldId] : null);
164
- $value = $KcSeoWPSchema->sanitize($fieldId, $fieldData, $value);
165
- $data[$fieldId] = $value;
166
- }
167
- }
168
- $meta[$schemaMetaId] = $data;
169
- }
170
- /* _kcseo_ative_tab */
171
- if (isset($_POST['_kcseo_ative_tab'])) {
172
- $meta['_kcseo_ative_tab'] = sanitize_text_field($_POST['_kcseo_ative_tab']);
173
- }
174
- if (count($meta) > 0) {
175
- foreach ($meta as $mKey => $mValue) {
176
- update_post_meta($post_id, $mKey, $mValue);
177
- }
178
- }
179
- }
180
-
181
- }
182
-
183
  endif;
1
+ <?php
2
+
3
+ if (!class_exists('KcSeoMetaData')):
4
+
5
+ class KcSeoMetaData
6
+ {
7
+
8
+ function __construct() {
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'))) {
18
+ return;
19
+ }
20
+ if (!in_array($typenow, $pt)) {
21
+ return;
22
+ }
23
+
24
+ // scripts
25
+ wp_enqueue_script(array(
26
+ 'jquery',
27
+ 'kcseo-select2-js',
28
+ 'kcseo-admin-js',
29
+ ));
30
+
31
+ // styles
32
+ wp_enqueue_style(array(
33
+ 'kcseo-select2-css',
34
+ 'kcseo-admin-css',
35
+ ));
36
+
37
+ add_action('admin_head', array($this, 'admin_head'));
38
+ }
39
+
40
+ function admin_head() {
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'
51
+ );
52
+ }
53
+
54
+ }
55
+
56
+ function meta_box_wp_schema($post) {
57
+ global $KcSeoWPSchema;
58
+ wp_nonce_field($KcSeoWPSchema->nonceText(), '_kcseo_nonce');
59
+ $_kcseo_ative_tab = get_post_meta($post->ID, '_kcseo_ative_tab', true);
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/search/docs/advanced/structured-data'>https://developers.google.com/search/docs/advanced/structured-data</a></p>";
65
+ $html .= "</div>";
66
+ $html .= "<div class='schema-holder'>";
67
+ $html .= '<div id="meta-tab-holder" class="rt-tab-container">';
68
+ $htmlMenu = null;
69
+ $htmlCont = null;
70
+ $htmlMenu .= "<ul class='rt-tab-nav'>";
71
+ $schemaFields = KcSeoOptions::getSchemaTypes();
72
+ $tab_index = 0;
73
+ foreach ($schemaFields as $schemaID => $schema) {
74
+ $tabId = $KcSeoWPSchema->KcSeoPrefix . $schemaID;
75
+ $activeClass = ((!$_kcseo_ative_tab && $tab_index === 0) || $tabId === $_kcseo_ative_tab) ? ' active' : null;
76
+ $tab_index++;
77
+ $htmlMenu .= '<li data-id="' . $tabId . '" class="' . $activeClass . '"><a href="#' . $tabId . '">' . $schema['title'] . '</a></li>';
78
+ $htmlCont .= "<div id='{$tabId}' class='rt-tab-content{$activeClass}'>";
79
+ $htmlCont .= "<div class='kc-top-toolbar'><span class='disabled button button-primary'>" . __("Auto Fill", "wp-seo-structured-data-schema") . "</span><span class='kcseo-pro-label'>" . __("PRO", "wp-seo-structured-data-schema") . "</span></div>";
80
+ $metaData = get_post_meta($post->ID, $tabId, true);
81
+ $metaData = (is_array($metaData) ? $metaData : array());
82
+ if (!empty($schema['fields'])) {
83
+ foreach ($schema['fields'] as $fieldId => $data) {
84
+ $data['fieldId'] = $fieldId;
85
+ $data['id'] = $tabId . "_" . $fieldId;
86
+ $data['name'] = $tabId . "[{$fieldId}]";
87
+ $data['value'] = (!empty($metaData[$fieldId]) ? $metaData[$fieldId] : null);
88
+ if ($data['type'] === 'group' && !empty($data['fields'])) {
89
+ $groupMetaData = isset($metaData[$fieldId]) && !empty($metaData[$fieldId]) ? $metaData[$fieldId] : array(array());
90
+ $html_g = null;
91
+ $i = 0;
92
+ foreach ($groupMetaData as $imDataId => $mData) {
93
+ $html_gItem = null;
94
+ foreach ($data['fields'] as $gFid => $field) {
95
+ $field['fieldId'] = $fieldId . '-' . $gFid;
96
+ $field['id'] = $tabId . "_" . $fieldId . '_' . $gFid;
97
+ $field['name'] = $tabId . "[$fieldId]" . "[$imDataId][$gFid]";
98
+ $field['value'] = (!empty($mData[$gFid]) ? $mData[$gFid] : null);
99
+ $html_gItem .= $schemas->get_field($field);
100
+ }
101
+ $html_g .= sprintf('<div class="kcseo-group-item" data-index="%d" id="%s">%s%s%s</div>',
102
+ $imDataId,
103
+ $tabId . "_" . $fieldId . "_group_item_" . $imDataId,
104
+ isset($data['duplicate']) && $imDataId > 0 ? '<div class="kc-top-toolbar"><span class="kcseo-remove-group"><span class="dashicons dashicons-trash"></span>Remove</span></div>' : null,
105
+ $html_gItem,
106
+ isset($data['duplicate']) ? '<div class="kc-bottom-toolbar"><span class="button button-primary kcseo-group-duplicate">Duplicate item</span></div>' : null
107
+ );
108
+ }
109
+ $htmlCont .= sprintf('<div class="field-container kcseo-group-wrapper" data-duplicate="%d" data-group-id="%s" id="%s">%s</div>',
110
+ isset($data['duplicate']) ? true : false,
111
+ $tabId . "[$fieldId]",
112
+ $tabId . "_" . $fieldId . "_group_wrapper",
113
+ $html_g
114
+ );
115
+
116
+ } else {
117
+ $htmlCont .= $schemas->get_field($data);
118
+ }
119
+ }
120
+ }
121
+ if (!empty($schema['pro']) && $schema['pro']) {
122
+ $htmlCont .= "<div class='kcseo-pro-feature'>" . __("This is a Pro version feature.", "wp-seo-structured-data-schema") . "<a href='https://wpsemplugins.com/downloads/wordpress-schema-plugin/' target='_blank'>(more info)</a></div>";
123
+ }
124
+ $htmlCont .= "</div>";
125
+ }
126
+ $htmlMenu .= "</ul>";
127
+ $html .= $htmlMenu . $htmlCont;
128
+ $html .= '<input type="hidden" id="_kcseo_ative_tab" name="_kcseo_ative_tab" value="' . $_kcseo_ative_tab . '" />';
129
+ $html .= "</div>";
130
+ $html .= "</div>";
131
+ echo $html;
132
+ }
133
+
134
+ function save_KcSeo_schema_data($post_id, $post, $update) {
135
+ if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
136
+ return $post_id;
137
+ }
138
+ global $KcSeoWPSchema;
139
+ $nonce = !empty($_REQUEST['_kcseo_nonce']) ? sanitize_text_field($_REQUEST['_kcseo_nonce']) : null;
140
+ if (!wp_verify_nonce($nonce, $KcSeoWPSchema->nonceText())) {
141
+ return $post_id;
142
+ }
143
+
144
+ // Check permissions
145
+ if (!empty($_GET['post_type'])) {
146
+ if (!current_user_can('edit_' . $_GET['post_type'], $post_id)) {
147
+ return $post_id;
148
+ }
149
+ }
150
+ $pt = $KcSeoWPSchema->kcSeoPostTypes();
151
+ if (!in_array($post->post_type, $pt)) {
152
+ return $post_id;
153
+ }
154
+
155
+ $meta = array();
156
+ $schemaModel = new KcSeoSchemaModel;
157
+ $schemaFields = KcSeoOptions::getSchemaTypes();
158
+ foreach ($schemaFields as $schemaID => $schema) {
159
+ $schemaMetaId = $KcSeoWPSchema->KcSeoPrefix . $schemaID;
160
+ $data = array();
161
+ if (!empty($schema['fields'])) {
162
+ foreach ($schema['fields'] as $fieldId => $fieldData) {
163
+ $value = (!empty($_REQUEST[$schemaMetaId][$fieldId]) ? $_REQUEST[$schemaMetaId][$fieldId] : null);
164
+ $value = $KcSeoWPSchema->sanitize($fieldId, $fieldData, $value);
165
+ $data[$fieldId] = $value;
166
+ }
167
+ }
168
+ $meta[$schemaMetaId] = $data;
169
+ }
170
+ /* _kcseo_ative_tab */
171
+ if (isset($_POST['_kcseo_ative_tab'])) {
172
+ $meta['_kcseo_ative_tab'] = sanitize_text_field($_POST['_kcseo_ative_tab']);
173
+ }
174
+ if (count($meta) > 0) {
175
+ foreach ($meta as $mKey => $mValue) {
176
+ update_post_meta($post_id, $mKey, $mValue);
177
+ }
178
+ }
179
+ }
180
+
181
+ }
182
+
183
  endif;
lib/classes/KcSeoOffer.php ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (! class_exists('KcSeoOutput')):
3
+ class KcSeoOffer {
4
+ public function __construct() {
5
+ add_action(
6
+ 'admin_init',
7
+ function () {
8
+ $current = time();
9
+ if (mktime(0, 0, 0, 11, 22, 2021) <= $current && $current <= mktime(0, 0, 0, 12, 3, 2021)) {
10
+ if (get_option('kcseo_bf_2021') != '1') {
11
+ if (! isset($GLOBALS['kcseo_bf_2021_notice'])) {
12
+ $GLOBALS['kcseo_bf_2021_notice'] = 'kcseo_bf_2021';
13
+ self::notice();
14
+ }
15
+ }
16
+ }
17
+ }
18
+ );
19
+ }
20
+
21
+ /**
22
+ * Undocumented function.
23
+ *
24
+ * @return void
25
+ */
26
+ public static function notice() {
27
+ add_action(
28
+ 'admin_enqueue_scripts',
29
+ function () {
30
+ wp_enqueue_script('jquery');
31
+ }
32
+ );
33
+
34
+ add_action(
35
+ 'admin_notices',
36
+ function () {
37
+ global $KcSeoWPSchema;
38
+
39
+ $plugin_name = 'WP SEO Structured Data Schema Pro';
40
+ $download_link = 'https://wpsemplugins.com/downloads/wordpress-schema-plugin/'; ?>
41
+ <div class="notice notice-info is-dismissible" data-kcseodismissable="kcseo_bf_2021"
42
+ style="display:grid;grid-template-columns: 100px auto;padding-top: 25px; padding-bottom: 22px;">
43
+ <img alt="<?php echo esc_attr($plugin_name); ?>"
44
+ src="<?php echo $KcSeoWPSchema->assetsUrl . 'images/icon-128x128.png'; ?>" width="74px"
45
+ height="74px" style="grid-row: 1 / 4; align-self: center;justify-self: center"/>
46
+ <h3 style="margin:0;"><?php echo sprintf('%s Black Friday Deal!!', $plugin_name); ?></h3>
47
+
48
+ <p style="margin:0 0 2px;">
49
+ <?php echo esc_html__("Don't miss out on our biggest sale of the year! Get your.", 'wp-seo-structured-data-schema'); ?>
50
+ <b><?php echo esc_html($plugin_name); ?> plan</b> with <b>FLAT 50% OFF</b>! Limited time offer expires on December 2.
51
+ </p>
52
+
53
+ <p style="margin:0;">
54
+ <a class="button button-primary" href="<?php echo esc_url($download_link); ?>" target="_blank">Buy Now</a>
55
+ <a class="button button-dismiss" href="#">Dismiss</a>
56
+ </p>
57
+ </div>
58
+ <?php
59
+ }
60
+ );
61
+
62
+ add_action(
63
+ 'admin_footer',
64
+ function () {
65
+ ?>
66
+ <script type="text/javascript">
67
+ (function ($) {
68
+ $(function () {
69
+ setTimeout(function () {
70
+ $('div[data-kcseodismissable] .notice-dismiss, div[data-kcseodismissable] .button-dismiss')
71
+ .on('click', function (e) {
72
+ e.preventDefault();
73
+ $.post(ajaxurl, {
74
+ 'action': 'kcseo_dismiss_admin_notice',
75
+ 'nonce': <?php echo json_encode(wp_create_nonce('kcseo-dismissible-notice')); ?>
76
+ });
77
+ $(e.target).closest('.is-dismissible').remove();
78
+ });
79
+ }, 1000);
80
+ });
81
+ })(jQuery);
82
+ </script>
83
+ <?php
84
+ }
85
+ );
86
+
87
+ add_action(
88
+ 'wp_ajax_kcseo_dismiss_admin_notice',
89
+ function () {
90
+ check_ajax_referer('kcseo-dismissible-notice', 'nonce');
91
+
92
+ update_option('kcseo_bf_2021', '1');
93
+ wp_die();
94
+ }
95
+ );
96
+ }
97
+ }
98
+ endif;
lib/classes/KcSeoOutput.php CHANGED
@@ -1,220 +1,220 @@
1
- <?php
2
-
3
- if (!class_exists('KcSeoOutput')):
4
-
5
- class KcSeoOutput
6
- {
7
- function __construct() {
8
- add_action('wp_footer', array($this, 'footer'), 99);
9
- add_action('amp_post_template_footer', array($this, 'footer'), 999); // AMP support
10
- add_action('kcseo_footer', array($this, 'debug_mark'), 2);
11
- add_action('kcseo_footer', array($this, 'load_schema'), 3);
12
- }
13
-
14
- private function head_product_name() {
15
- return 'WP SEO Structured Data Plugin';
16
- }
17
-
18
- public function debug_mark($echo = true) {
19
- $marker = sprintf(
20
- '<!-- This site is optimized with Phil Singleton\'s ' . $this->head_product_name() . ' v%1$s - https://kcseopro.com/wordpress-seo-structured-data-schema-plugin/ -->',
21
- KCSEO_WP_SCHEMA_VERSION
22
- );
23
-
24
- if ($echo === false) {
25
- return $marker;
26
- } else {
27
- echo "\n${marker}\n";
28
- }
29
- }
30
-
31
- function footer() {
32
-
33
- global $wp_query;
34
-
35
- $old_wp_query = null;
36
-
37
- if (!$wp_query->is_main_query()) {
38
- $old_wp_query = $wp_query;
39
- wp_reset_query();
40
- }
41
- wp_reset_postdata(); // TODO This is for wrong theme loop
42
- do_action('kcseo_footer');
43
-
44
- echo "\n<!-- / ", $this->head_product_name(), ". -->\n\n";
45
-
46
- if (!empty($old_wp_query)) {
47
- $GLOBALS['wp_query'] = $old_wp_query;
48
- unset($old_wp_query);
49
- }
50
-
51
- return;
52
- }
53
-
54
- function load_schema() {
55
- global $KcSeoWPSchema;
56
- $schemaModel = new KcSeoSchemaModel;
57
- $html = null;
58
- $settings = get_option($KcSeoWPSchema->options['settings']);
59
- if (empty($settings['disable_site_schema'])) {
60
- if (is_home() || is_front_page()) {
61
- $metaData = array();
62
-
63
- $metaData["@context"] = "https://schema.org/";
64
- $metaData["@type"] = "WebSite";
65
- $author_url = (!empty($settings['siteurl']) ? $settings['siteurl'] : get_home_url());
66
-
67
- if (!empty($settings['homeonly']) && $settings['homeonly']) {
68
- $metaData["url"] = $author_url;
69
- $metaData["potentialAction"] = array(
70
- "@type" => "SearchAction",
71
- "target" => trailingslashit(get_home_url()) . "?s={query}",
72
- "query-input" => "required name=query"
73
- );
74
- $html .= $schemaModel->get_jsonEncode($metaData);
75
- } else {
76
- $metaData["url"] = $KcSeoWPSchema->sanitizeOutPut($author_url, 'url');
77
- $metaData["name"] = !empty($settings['sitename']) ? $KcSeoWPSchema->sanitizeOutPut($settings['sitename']) : null;
78
- $metaData["alternateName"] = !empty($settings['siteaname']) ? $KcSeoWPSchema->sanitizeOutPut($settings['siteaname']) : null;
79
- $html .= $schemaModel->get_jsonEncode($metaData);
80
- }
81
- }
82
- }
83
- $siteType = !empty($settings['site_type']) ? $KcSeoWPSchema->sanitizeOutPut($settings['site_type']) : null;
84
- $webMeta = [
85
- "@context" => "https://schema.org",
86
- '@type' => $siteType,
87
- '@id' => get_home_url()
88
- ];
89
- if ($siteType != "Organization") {
90
- if (!empty($settings['site_image']) && $imgID = absint($settings['site_image'])) {
91
- $image_url = wp_get_attachment_url($imgID);
92
- $webMeta["image"] = $KcSeoWPSchema->sanitizeOutPut($image_url, 'url');
93
- } else {
94
- $webMeta["image"] = null;
95
- }
96
- $webMeta["priceRange"] = !empty($settings['site_price_range']) ? $KcSeoWPSchema->sanitizeOutPut($settings['site_price_range']) : null;
97
- $webMeta["telephone"] = !empty($settings['site_telephone']) ? $KcSeoWPSchema->sanitizeOutPut($settings['site_telephone']) : null;
98
- }
99
-
100
- if (!empty($settings['additionalType'])) {
101
- $aType = explode("\r\n", $settings['additionalType']);
102
- if (!empty($aType) && is_array($aType)) {
103
- if (count($aType) == 1) {
104
- $webMeta["additionalType"] = $aType[0];
105
- } else if (count($aType) > 1) {
106
- $webMeta["additionalType"] = $aType;
107
- }
108
- }
109
- }
110
-
111
- if ($siteType == 'Person') {
112
- $webMeta["name"] = !empty($settings['person']['name']) ? $KcSeoWPSchema->sanitizeOutPut($settings['person']['name']) : null;
113
- $webMeta["worksFor"] = !empty($settings['person']['worksFor']) ? $KcSeoWPSchema->sanitizeOutPut($settings['person']['worksFor']) : null;
114
- $webMeta["jobTitle"] = !empty($settings['person']['jobTitle']) ? $KcSeoWPSchema->sanitizeOutPut($settings['person']['jobTitle']) : null;
115
- $webMeta["image"] = !empty($settings['person']['image']) ? $KcSeoWPSchema->sanitizeOutPut($settings['person']['image'], 'url') : null;
116
- $webMeta["description"] = !empty($settings['person']['description']) ? $KcSeoWPSchema->sanitizeOutPut($settings['person']['description'], 'textarea') : null;
117
- $webMeta["birthDate"] = !empty($settings['person']['birthDate']) ? $KcSeoWPSchema->sanitizeOutPut($settings['person']['birthDate']) : null;
118
- } else {
119
- $webMeta["name"] = !empty($settings['type_name']) ? $KcSeoWPSchema->sanitizeOutPut($settings['type_name']) : null;
120
- if (!empty($settings['organization_logo']) && $imgID = absint($settings['organization_logo'])) {
121
- $image_url = wp_get_attachment_url($imgID);
122
- $webMeta["logo"] = $KcSeoWPSchema->sanitizeOutPut($image_url, 'url');
123
- } else {
124
- $webMeta["logo"] = null;
125
- }
126
- }
127
- if ($siteType != "Organization" && $siteType != "Person") {
128
- $webMeta["description"] = !empty($settings['business_info']['description']) ? $KcSeoWPSchema->sanitizeOutPut($settings['business_info']['description'], 'textarea') : null;
129
- if (!empty($settings['business_info']['openingHours'])) {
130
- $aOhour = explode("\r\n", $settings['business_info']['openingHours']);
131
- if (!empty($aOhour) && is_array($aOhour)) {
132
- if (count($aOhour) == 1) {
133
- $webMeta["openingHours"] = $aOhour[0];
134
- } else if (count($aOhour) > 1) {
135
- $webMeta["openingHours"] = $aOhour;
136
- }
137
- }
138
- }
139
- $webMeta["geo"] = array(
140
- "@type" => "GeoCoordinates",
141
- "latitude" => !empty($settings['business_info']['latitude']) ? $KcSeoWPSchema->sanitizeOutPut($settings['business_info']['latitude']) : null,
142
- "longitude" => !empty($settings['business_info']['longitude']) ? $KcSeoWPSchema->sanitizeOutPut($settings['business_info']['longitude']) : null,
143
- );
144
- }
145
-
146
- if (in_array($siteType, array(
147
- 'FoodEstablishment',
148
- 'Bakery',
149
- 'BarOrPub',
150
- 'Brewery',
151
- 'CafeOrCoffeeShop',
152
- 'FastFoodRestaurant',
153
- 'IceCreamShop',
154
- 'Restaurant',
155
- 'Winery'
156
- ))) {
157
- $webMeta["servesCuisine"] = !empty($settings['restaurant']['servesCuisine']) ? $KcSeoWPSchema->sanitizeOutPut($settings['restaurant']['servesCuisine'], 'textarea') : null;
158
- }
159
-
160
- $webMeta["url"] = !empty($settings['web_url']) ? $KcSeoWPSchema->sanitizeOutPut($settings['web_url'], 'url') : $KcSeoWPSchema->sanitizeOutPut(get_home_url(), 'url');
161
- if (!empty($settings['social']) && is_array($settings['social'])) {
162
- $link = array();
163
- foreach ($settings['social'] as $socialD) {
164
- if ($socialD['link']) {
165
- $link[] = $socialD['link'];
166
- }
167
- }
168
- if (!empty($link)) {
169
- $webMeta["sameAs"] = $link;
170
- }
171
- }
172
-
173
- $webMeta["contactPoint"] = array(
174
- "@type" => "ContactPoint",
175
- "telephone" => !empty($settings['contact']['telephone']) ? $KcSeoWPSchema->sanitizeOutPut($settings['contact']['telephone']) : (!empty($settings['site_telephone']) ? $KcSeoWPSchema->sanitizeOutPut($settings['site_telephone']) : null),
176
- "contactType" => !empty($settings['contact']['contactType']) ? $KcSeoWPSchema->sanitizeOutPut($settings['contact']['contactType']) : '',
177
- "email" => !empty($settings['contact']['email']) ? $KcSeoWPSchema->sanitizeOutPut($settings['contact']['email']) : '',
178
- "contactOption" => !empty($settings['contact']['contactOption']) ? $KcSeoWPSchema->sanitizeOutPut($settings['contact']['contactOption']) : '',
179
- "areaServed" => !empty($settings['area_served']) ? $settings['area_served'] : '',
180
- "availableLanguage" => !empty($settings['availableLanguage']) ? $settings['availableLanguage'] : null
181
- );
182
- $webMeta["address"] = array(
183
- "@type" => "PostalAddress",
184
- "addressCountry" => !empty($settings['address']['country']) ? $KcSeoWPSchema->sanitizeOutPut($settings['address']['country']) : null,
185
- "addressLocality" => !empty($settings['address']['locality']) ? $KcSeoWPSchema->sanitizeOutPut($settings['address']['locality']) : null,
186
- "addressRegion" => !empty($settings['address']['region']) ? $KcSeoWPSchema->sanitizeOutPut($settings['address']['region']) : null,
187
- "postalCode" => !empty($settings['address']['postalcode']) ? $KcSeoWPSchema->sanitizeOutPut($settings['address']['postalcode']) : null,
188
- "streetAddress" => !empty($settings['address']['street']) ? $KcSeoWPSchema->sanitizeOutPut($settings['address']['street']) : null
189
- );
190
-
191
- $main_settings = get_option($KcSeoWPSchema->options['main_settings']);
192
- $site_schema = !empty($main_settings['site_schema']) ? $main_settings['site_schema'] : 'home_page';
193
-
194
- if ($site_schema !== 'off') {
195
- if ($webMeta["@type"]) {
196
- if ($site_schema == 'home_page') {
197
- if (is_home() || is_front_page()) {
198
- $html .= $schemaModel->get_jsonEncode($webMeta);
199
- }
200
- } elseif ($site_schema == 'all') {
201
- $html .= $schemaModel->get_jsonEncode($webMeta);
202
- }
203
- }
204
- }
205
-
206
- if (is_single() || is_page()) {
207
- $post = get_queried_object();
208
- foreach (KcSeoOptions::getSchemaTypes() as $schemaID => $schema) {
209
- $schemaMetaId = $KcSeoWPSchema->KcSeoPrefix . $schemaID;
210
- $metaData = get_post_meta($post->ID, $schemaMetaId, true);
211
- $metaData = (is_array($metaData) ? $metaData : array());
212
- if (!empty($metaData) && !empty($metaData['active'])) {
213
- $html .= $schemaModel->schemaOutput($schemaID, $metaData);
214
- }
215
- }
216
- }
217
- echo $html;
218
- }
219
- }
220
  endif;
1
+ <?php
2
+
3
+ if (!class_exists('KcSeoOutput')):
4
+
5
+ class KcSeoOutput
6
+ {
7
+ function __construct() {
8
+ add_action('wp_footer', array($this, 'footer'), 99);
9
+ add_action('amp_post_template_footer', array($this, 'footer'), 999); // AMP support
10
+ add_action('kcseo_footer', array($this, 'debug_mark'), 2);
11
+ add_action('kcseo_footer', array($this, 'load_schema'), 3);
12
+ }
13
+
14
+ private function head_product_name() {
15
+ return 'WP SEO Structured Data Plugin';
16
+ }
17
+
18
+ public function debug_mark($echo = true) {
19
+ $marker = sprintf(
20
+ '<!-- This site is optimized with Phil Singleton\'s ' . $this->head_product_name() . ' v%1$s - https://kcseopro.com/wordpress-seo-structured-data-schema-plugin/ -->',
21
+ KCSEO_WP_SCHEMA_VERSION
22
+ );
23
+
24
+ if ($echo === false) {
25
+ return $marker;
26
+ } else {
27
+ echo "\n${marker}\n";
28
+ }
29
+ }
30
+
31
+ function footer() {
32
+
33
+ global $wp_query;
34
+
35
+ $old_wp_query = null;
36
+
37
+ if (!$wp_query->is_main_query()) {
38
+ $old_wp_query = $wp_query;
39
+ wp_reset_query();
40
+ }
41
+ wp_reset_postdata(); // TODO This is for wrong theme loop
42
+ do_action('kcseo_footer');
43
+
44
+ echo "\n<!-- / ", $this->head_product_name(), ". -->\n\n";
45
+
46
+ if (!empty($old_wp_query)) {
47
+ $GLOBALS['wp_query'] = $old_wp_query;
48
+ unset($old_wp_query);
49
+ }
50
+
51
+ return;
52
+ }
53
+
54
+ function load_schema() {
55
+ global $KcSeoWPSchema;
56
+ $schemaModel = new KcSeoSchemaModel;
57
+ $html = null;
58
+ $settings = get_option($KcSeoWPSchema->options['settings']);
59
+ if (empty($settings['disable_site_schema'])) {
60
+ if (is_home() || is_front_page()) {
61
+ $metaData = array();
62
+
63
+ $metaData["@context"] = "https://schema.org/";
64
+ $metaData["@type"] = "WebSite";
65
+ $author_url = (!empty($settings['siteurl']) ? $settings['siteurl'] : get_home_url());
66
+
67
+ if (!empty($settings['homeonly']) && $settings['homeonly']) {
68
+ $metaData["url"] = $author_url;
69
+ $metaData["potentialAction"] = array(
70
+ "@type" => "SearchAction",
71
+ "target" => trailingslashit(get_home_url()) . "?s={query}",
72
+ "query-input" => "required name=query"
73
+ );
74
+ $html .= $schemaModel->get_jsonEncode($metaData);
75
+ } else {
76
+ $metaData["url"] = $KcSeoWPSchema->sanitizeOutPut($author_url, 'url');
77
+ $metaData["name"] = !empty($settings['sitename']) ? $KcSeoWPSchema->sanitizeOutPut($settings['sitename']) : null;
78
+ $metaData["alternateName"] = !empty($settings['siteaname']) ? $KcSeoWPSchema->sanitizeOutPut($settings['siteaname']) : null;
79
+ $html .= $schemaModel->get_jsonEncode($metaData);
80
+ }
81
+ }
82
+ }
83
+ $siteType = !empty($settings['site_type']) ? $KcSeoWPSchema->sanitizeOutPut($settings['site_type']) : null;
84
+ $webMeta = [
85
+ "@context" => "https://schema.org",
86
+ '@type' => $siteType,
87
+ '@id' => get_home_url()
88
+ ];
89
+ if ($siteType != "Organization") {
90
+ if (!empty($settings['site_image']) && $imgID = absint($settings['site_image'])) {
91
+ $image_url = wp_get_attachment_url($imgID);
92
+ $webMeta["image"] = $KcSeoWPSchema->sanitizeOutPut($image_url, 'url');
93
+ } else {
94
+ $webMeta["image"] = null;
95
+ }
96
+ $webMeta["priceRange"] = !empty($settings['site_price_range']) ? $KcSeoWPSchema->sanitizeOutPut($settings['site_price_range']) : null;
97
+ $webMeta["telephone"] = !empty($settings['site_telephone']) ? $KcSeoWPSchema->sanitizeOutPut($settings['site_telephone']) : null;
98
+ }
99
+
100
+ if (!empty($settings['additionalType'])) {
101
+ $aType = explode("\r\n", $settings['additionalType']);
102
+ if (!empty($aType) && is_array($aType)) {
103
+ if (count($aType) == 1) {
104
+ $webMeta["additionalType"] = $aType[0];
105
+ } else if (count($aType) > 1) {
106
+ $webMeta["additionalType"] = $aType;
107
+ }
108
+ }
109
+ }
110
+
111
+ if ($siteType == 'Person') {
112
+ $webMeta["name"] = !empty($settings['person']['name']) ? $KcSeoWPSchema->sanitizeOutPut($settings['person']['name']) : null;
113
+ $webMeta["worksFor"] = !empty($settings['person']['worksFor']) ? $KcSeoWPSchema->sanitizeOutPut($settings['person']['worksFor']) : null;
114
+ $webMeta["jobTitle"] = !empty($settings['person']['jobTitle']) ? $KcSeoWPSchema->sanitizeOutPut($settings['person']['jobTitle']) : null;
115
+ $webMeta["image"] = !empty($settings['person']['image']) ? $KcSeoWPSchema->sanitizeOutPut($settings['person']['image'], 'url') : null;
116
+ $webMeta["description"] = !empty($settings['person']['description']) ? $KcSeoWPSchema->sanitizeOutPut($settings['person']['description'], 'textarea') : null;
117
+ $webMeta["birthDate"] = !empty($settings['person']['birthDate']) ? $KcSeoWPSchema->sanitizeOutPut($settings['person']['birthDate']) : null;
118
+ } else {
119
+ $webMeta["name"] = !empty($settings['type_name']) ? $KcSeoWPSchema->sanitizeOutPut($settings['type_name']) : null;
120
+ if (!empty($settings['organization_logo']) && $imgID = absint($settings['organization_logo'])) {
121
+ $image_url = wp_get_attachment_url($imgID);
122
+ $webMeta["logo"] = $KcSeoWPSchema->sanitizeOutPut($image_url, 'url');
123
+ } else {
124
+ $webMeta["logo"] = null;
125
+ }
126
+ }
127
+ if ($siteType != "Organization" && $siteType != "Person") {
128
+ $webMeta["description"] = !empty($settings['business_info']['description']) ? $KcSeoWPSchema->sanitizeOutPut($settings['business_info']['description'], 'textarea') : null;
129
+ if (!empty($settings['business_info']['openingHours'])) {
130
+ $aOhour = explode("\r\n", $settings['business_info']['openingHours']);
131
+ if (!empty($aOhour) && is_array($aOhour)) {
132
+ if (count($aOhour) == 1) {
133
+ $webMeta["openingHours"] = $aOhour[0];
134
+ } else if (count($aOhour) > 1) {
135
+ $webMeta["openingHours"] = $aOhour;
136
+ }
137
+ }
138
+ }
139
+ $webMeta["geo"] = array(
140
+ "@type" => "GeoCoordinates",
141
+ "latitude" => !empty($settings['business_info']['latitude']) ? $KcSeoWPSchema->sanitizeOutPut($settings['business_info']['latitude']) : null,
142
+ "longitude" => !empty($settings['business_info']['longitude']) ? $KcSeoWPSchema->sanitizeOutPut($settings['business_info']['longitude']) : null,
143
+ );
144
+ }
145
+
146
+ if (in_array($siteType, array(
147
+ 'FoodEstablishment',
148
+ 'Bakery',
149
+ 'BarOrPub',
150
+ 'Brewery',
151
+ 'CafeOrCoffeeShop',
152
+ 'FastFoodRestaurant',
153
+ 'IceCreamShop',
154
+ 'Restaurant',
155
+ 'Winery'
156
+ ))) {
157
+ $webMeta["servesCuisine"] = !empty($settings['restaurant']['servesCuisine']) ? $KcSeoWPSchema->sanitizeOutPut($settings['restaurant']['servesCuisine'], 'textarea') : null;
158
+ }
159
+
160
+ $webMeta["url"] = !empty($settings['web_url']) ? $KcSeoWPSchema->sanitizeOutPut($settings['web_url'], 'url') : $KcSeoWPSchema->sanitizeOutPut(get_home_url(), 'url');
161
+ if (!empty($settings['social']) && is_array($settings['social'])) {
162
+ $link = array();
163
+ foreach ($settings['social'] as $socialD) {
164
+ if ($socialD['link']) {
165
+ $link[] = $socialD['link'];
166
+ }
167
+ }
168
+ if (!empty($link)) {
169
+ $webMeta["sameAs"] = $link;
170
+ }
171
+ }
172
+
173
+ $webMeta["contactPoint"] = array(
174
+ "@type" => "ContactPoint",
175
+ "telephone" => !empty($settings['contact']['telephone']) ? $KcSeoWPSchema->sanitizeOutPut($settings['contact']['telephone']) : (!empty($settings['site_telephone']) ? $KcSeoWPSchema->sanitizeOutPut($settings['site_telephone']) : null),
176
+ "contactType" => !empty($settings['contact']['contactType']) ? $KcSeoWPSchema->sanitizeOutPut($settings['contact']['contactType']) : '',
177
+ "email" => !empty($settings['contact']['email']) ? $KcSeoWPSchema->sanitizeOutPut($settings['contact']['email']) : '',
178
+ "contactOption" => !empty($settings['contact']['contactOption']) ? $KcSeoWPSchema->sanitizeOutPut($settings['contact']['contactOption']) : '',
179
+ "areaServed" => !empty($settings['area_served']) ? $settings['area_served'] : '',
180
+ "availableLanguage" => !empty($settings['availableLanguage']) ? $settings['availableLanguage'] : null
181
+ );
182
+ $webMeta["address"] = array(
183
+ "@type" => "PostalAddress",
184
+ "addressCountry" => !empty($settings['address']['country']) ? $KcSeoWPSchema->sanitizeOutPut($settings['address']['country']) : null,
185
+ "addressLocality" => !empty($settings['address']['locality']) ? $KcSeoWPSchema->sanitizeOutPut($settings['address']['locality']) : null,
186
+ "addressRegion" => !empty($settings['address']['region']) ? $KcSeoWPSchema->sanitizeOutPut($settings['address']['region']) : null,
187
+ "postalCode" => !empty($settings['address']['postalcode']) ? $KcSeoWPSchema->sanitizeOutPut($settings['address']['postalcode']) : null,
188
+ "streetAddress" => !empty($settings['address']['street']) ? $KcSeoWPSchema->sanitizeOutPut($settings['address']['street']) : null
189
+ );
190
+
191
+ $main_settings = get_option($KcSeoWPSchema->options['main_settings']);
192
+ $site_schema = !empty($main_settings['site_schema']) ? $main_settings['site_schema'] : 'home_page';
193
+
194
+ if ($site_schema !== 'off') {
195
+ if ($webMeta["@type"]) {
196
+ if ($site_schema == 'home_page') {
197
+ if (is_home() || is_front_page()) {
198
+ $html .= $schemaModel->get_jsonEncode($webMeta);
199
+ }
200
+ } elseif ($site_schema == 'all') {
201
+ $html .= $schemaModel->get_jsonEncode($webMeta);
202
+ }
203
+ }
204
+ }
205
+
206
+ if (is_single() || is_page()) {
207
+ $post = get_queried_object();
208
+ foreach (KcSeoOptions::getSchemaTypes() as $schemaID => $schema) {
209
+ $schemaMetaId = $KcSeoWPSchema->KcSeoPrefix . $schemaID;
210
+ $metaData = get_post_meta($post->ID, $schemaMetaId, true);
211
+ $metaData = (is_array($metaData) ? $metaData : array());
212
+ if (!empty($metaData) && !empty($metaData['active'])) {
213
+ $html .= $schemaModel->schemaOutput($schemaID, $metaData);
214
+ }
215
+ }
216
+ }
217
+ echo $html;
218
+ }
219
+ }
220
  endif;
lib/functions/KcSeoFunctions.php CHANGED
@@ -1,21 +1,21 @@
1
- <?php
2
-
3
-
4
- class KcSeoFunctions {
5
- static function isYoastActive() {
6
- if ( in_array( 'wordpress-seo/wp-seo.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
7
- return true;
8
- }
9
-
10
- return false;
11
- }
12
-
13
- static function isWcActive() {
14
- return class_exists( 'woocommerce' );
15
- }
16
-
17
- public static function isEddActive() {
18
- return class_exists( 'Easy_Digital_Downloads' );
19
- }
20
-
21
  }
1
+ <?php
2
+
3
+
4
+ class KcSeoFunctions {
5
+ static function isYoastActive() {
6
+ if ( in_array( 'wordpress-seo/wp-seo.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
7
+ return true;
8
+ }
9
+
10
+ return false;
11
+ }
12
+
13
+ static function isWcActive() {
14
+ return class_exists( 'woocommerce' );
15
+ }
16
+
17
+ public static function isEddActive() {
18
+ return class_exists( 'Easy_Digital_Downloads' );
19
+ }
20
+
21
  }
lib/functions/KcSeoOptions.php CHANGED
@@ -1,2121 +1,2121 @@
1
- <?php
2
-
3
- class KcSeoOptions
4
- {
5
-
6
- static function getSchemaTypes() {
7
- $schemas = array(
8
- 'article' => array(
9
- 'pro' => false,
10
- 'title' => __("Article", "wp-seo-structured-data-schema"),
11
- 'fields' => array(
12
- 'active' => array(
13
- 'type' => 'checkbox'
14
- ),
15
- 'headline' => array(
16
- 'title' => __('Headline', "wp-seo-structured-data-schema"),
17
- 'type' => 'text',
18
- 'desc' => __('Article title', "wp-seo-structured-data-schema"),
19
- 'required' => true
20
- ),
21
- 'mainEntityOfPage' => array(
22
- 'title' => __('Page URL', "wp-seo-structured-data-schema"),
23
- 'type' => 'url',
24
- 'desc' => __('The canonical URL of the article page', "wp-seo-structured-data-schema"),
25
- 'required' => true
26
- ),
27
- 'author' => array(
28
- 'title' => __('Author Name', "wp-seo-structured-data-schema"),
29
- 'type' => 'text',
30
- 'desc' => __('Author display name', "wp-seo-structured-data-schema"),
31
- 'required' => true
32
- ),
33
- 'author_url' => array(
34
- 'title' => __('Author URL', "wp-seo-structured-data-schema"),
35
- 'type' => 'url',
36
- 'required' => true
37
- ),
38
- 'image' => array(
39
- 'title' => __('Article Feature Image', "wp-seo-structured-data-schema"),
40
- 'type' => 'image',
41
- 'required' => true,
42
- 'desc' => __('Images should be at least 696 pixels wide.<br>Images should be in .jpg, .png, or. gif format.', "wp-seo-structured-data-schema")
43
- ),
44
- 'datePublished' => array(
45
- 'title' => __('Published date', "wp-seo-structured-data-schema"),
46
- 'type' => 'text',
47
- 'class' => 'kcseo-date',
48
- 'required' => true,
49
- 'desc' => __('Like this: 2021-12-25 14:20:00', "wp-seo-structured-data-schema")
50
- ),
51
- 'dateModified' => array(
52
- 'title' => __('Modified date', "wp-seo-structured-data-schema"),
53
- 'type' => 'text',
54
- 'class' => 'kcseo-date',
55
- 'required' => true,
56
- 'desc' => __('Like this: 2021-12-25 14:20:00', "wp-seo-structured-data-schema")
57
- ),
58
- 'publisher' => array(
59
- 'title' => __('Publisher', "wp-seo-structured-data-schema"),
60
- 'type' => 'text',
61
- 'desc' => __('Publisher name or Organization name', "wp-seo-structured-data-schema"),
62
- 'required' => true
63
- ),
64
- 'publisherImage' => array(
65
- 'title' => __('Publisher Logo', "wp-seo-structured-data-schema"),
66
- 'type' => 'image',
67
- '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"),
68
- 'required' => true
69
- ),
70
- 'description' => array(
71
- 'title' => __('Description', "wp-seo-structured-data-schema"),
72
- 'type' => 'textarea',
73
- 'desc' => __('Short description. New line is not supported.', "wp-seo-structured-data-schema")
74
- ),
75
- 'articleBody' => array(
76
- 'title' => __('Article body', "wp-seo-structured-data-schema"),
77
- 'type' => 'textarea',
78
- 'desc' => __('Article content', "wp-seo-structured-data-schema")
79
- ),
80
- 'alternativeHeadline' => array(
81
- 'title' => __('Alternative headline', "wp-seo-structured-data-schema"),
82
- 'type' => 'text',
83
- 'desc' => __('A secondary headline for the article.', "wp-seo-structured-data-schema")
84
- ),
85
- 'video' => [
86
- 'title' => __('Video', "wp-seo-structured-data-schema"),
87
- 'type' => 'group',
88
- 'fields' => [
89
- 'video_heading' => [
90
- 'type' => 'heading',
91
- 'title' => __('Video', "wp-seo-structured-data-schema")
92
- ],
93
- 'name' => array(
94
- 'type' => 'text',
95
- 'title' => esc_html__('Name', "wp-seo-structured-data-schema"),
96
- ),
97
- 'description' => array(
98
- 'type' => 'textarea',
99
- 'title' => esc_html__('Description', "wp-seo-structured-data-schema")
100
- ),
101
- 'thumbnailUrl' => array(
102
- 'type' => 'image',
103
- 'title' => esc_html__('Image', "wp-seo-structured-data-schema")
104
- ),
105
- 'contentUrl' => array(
106
- 'type' => 'url',
107
- 'title' => esc_html__('Content URL', "wp-seo-structured-data-schema")
108
- ),
109
- 'embedUrl' => array(
110
- 'type' => 'url',
111
- 'title' => esc_html__('Embed URL', "wp-seo-structured-data-schema"),
112
- 'desc' => esc_html__("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')
113
- ),
114
- 'uploadDate' => array(
115
- 'type' => 'text',
116
- 'title' => esc_html__('Upload date', "wp-seo-structured-data-schema"),
117
- 'class' => 'rtrs-date',
118
- 'required' => true,
119
- 'desc' => esc_html__('Like this: 2021-08-25 14:20:00', "wp-seo-structured-data-schema")
120
- ),
121
- 'duration' => array(
122
- 'type' => 'text',
123
- 'title' => esc_html__('Duration', "wp-seo-structured-data-schema"),
124
- 'desc' => esc_html__('Runtime of the movie in ISO 8601 format (for example, "PT2H22M" (142 minutes)).', "wp-seo-structured-data-schema")
125
- ),
126
- ]
127
- ],
128
- 'audio' => [
129
- 'title' => __('Audio', "wp-seo-structured-data-schema"),
130
- 'type' => 'group',
131
- 'fields' => [
132
- 'audio_heading' => [
133
- 'type' => 'heading',
134
- 'title' => __('Audio', "wp-seo-structured-data-schema")
135
- ],
136
- 'name' => array(
137
- 'type' => 'text',
138
- 'title' => esc_html__('Name', 'wp-seo-structured-data-schema'),
139
- 'desc' => esc_html__("The title of the audio", 'wp-seo-structured-data-schema')
140
- ),
141
- 'description' => array(
142
- 'type' => 'textarea',
143
- 'title' => esc_html__('Description', 'wp-seo-structured-data-schema'),
144
- 'desc' => esc_html__("The short description of the audio", 'wp-seo-structured-data-schema')
145
- ),
146
- 'duration' => array(
147
- 'type' => 'text',
148
- 'title' => esc_html__('Duration', 'wp-seo-structured-data-schema'),
149
- 'desc' => esc_html__("The duration of the audio in ISO 8601 format.(PT1M33S)", 'wp-seo-structured-data-schema')
150
- ),
151
- 'contentUrl' => array(
152
- 'type' => 'url',
153
- 'title' => esc_html__('Content URL', 'wp-seo-structured-data-schema'),
154
- 'placeholder' => esc_html__('URL', 'wp-seo-structured-data-schema'),
155
- 'desc' => esc_html__("A URL pointing to the actual audio media file. This file should be in .mp3, .wav, .mpc or other audio file format.", 'wp-seo-structured-data-schema')
156
- ),
157
- 'encodingFormat' => array(
158
- 'type' => 'text',
159
- 'title' => esc_html__('Encoding Format', 'wp-seo-structured-data-schema'),
160
- 'desc' => esc_html__("The encoding format of audio like: 'audio/mpeg'", 'wp-seo-structured-data-schema')
161
- ),
162
- ]
163
- ],
164
- )
165
- ),
166
- 'blog_posting' => array(
167
- 'pro' => false,
168
- 'title' => __('Blog Posting', "wp-seo-structured-data-schema"),
169
- 'fields' => array(
170
- 'active' => array(
171
- 'type' => 'checkbox'
172
- ),
173
- 'headline' => array(
174
- 'title' => __('Headline', "wp-seo-structured-data-schema"),
175
- 'type' => 'text',
176
- 'desc' => __('Blog posting title', "wp-seo-structured-data-schema"),
177
- 'required' => true
178
- ),
179
- 'mainEntityOfPage' => array(
180
- 'title' => __('Page URL', "wp-seo-structured-data-schema"),
181
- 'type' => 'url',
182
- 'desc' => __('The canonical URL of the article page', "wp-seo-structured-data-schema"),
183
- 'required' => true
184
- ),
185
- 'author' => array(
186
- 'title' => __('Author name', "wp-seo-structured-data-schema"),
187
- 'type' => 'text',
188
- 'desc' => __('Author display name', "wp-seo-structured-data-schema"),
189
- 'required' => true
190
- ),
191
- 'author_url' => array(
192
- 'title' => __('Author URL', "wp-seo-structured-data-schema"),
193
- 'type' => 'url',
194
- 'required' => true
195
- ),
196
- 'image' => array(
197
- 'title' => __('Feature Image', "wp-seo-structured-data-schema"),
198
- 'type' => 'image',
199
- '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"),
200
- 'required' => true
201
- ),
202
- 'datePublished' => array(
203
- 'title' => __('Published date', "wp-seo-structured-data-schema"),
204
- 'type' => 'text',
205
- 'class' => 'kcseo-date',
206
- 'desc' => __('Like this: 2021-12-25 14:20:00', "wp-seo-structured-data-schema"),
207
- 'required' => true
208
- ),
209
- 'dateModified' => array(
210
- 'title' => __('Modified date', "wp-seo-structured-data-schema"),
211
- 'type' => 'text',
212
- 'class' => 'kcseo-date',
213
- 'desc' => __('Like this: 2021-12-25 14:20:00', "wp-seo-structured-data-schema"),
214
- 'required' => true
215
- ),
216
- 'publisher' => array(
217
- 'title' => __('Publisher', "wp-seo-structured-data-schema"),
218
- 'type' => 'text',
219
- 'desc' => __('Publisher name or Organization name', "wp-seo-structured-data-schema"),
220
- 'required' => true
221
- ),
222
- 'publisherImage' => array(
223
- 'title' => __('Publisher Logo', "wp-seo-structured-data-schema"),
224
- 'type' => 'image',
225
- '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"),
226
- 'required' => true
227
- ),
228
- 'description' => array(
229
- 'title' => __('Description', "wp-seo-structured-data-schema"),
230
- 'type' => 'textarea',
231
- 'desc' => __('Short description. New line is not supported.', "wp-seo-structured-data-schema")
232
- ),
233
- 'articleBody' => array(
234
- 'title' => __('Article body', "wp-seo-structured-data-schema"),
235
- 'type' => 'textarea',
236
- 'desc' => __('Article content', "wp-seo-structured-data-schema")
237
- ),
238
- 'video' => [
239
- 'title' => __('Video', "wp-seo-structured-data-schema"),
240
- 'type' => 'group',
241
- 'fields' => [
242
- 'video_heading' => [
243
- 'type' => 'heading',
244
- 'title' => __('Video', "wp-seo-structured-data-schema")
245
- ],
246
- 'name' => array(
247
- 'type' => 'text',
248
- 'title' => esc_html__('Name', "wp-seo-structured-data-schema"),
249
- ),
250
- 'description' => array(
251
- 'type' => 'textarea',
252
- 'title' => esc_html__('Description', "wp-seo-structured-data-schema")
253
- ),
254
- 'thumbnailUrl' => array(
255
- 'type' => 'image',
256
- 'title' => esc_html__('Image', "wp-seo-structured-data-schema")
257
- ),
258
- 'contentUrl' => array(
259
- 'type' => 'url',
260
- 'title' => esc_html__('Content URL', "wp-seo-structured-data-schema")
261
- ),
262
- 'embedUrl' => array(
263
- 'type' => 'url',
264
- 'title' => esc_html__('Embed URL', "wp-seo-structured-data-schema"),
265
- 'desc' => esc_html__("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')
266
- ),
267
- 'uploadDate' => array(
268
- 'type' => 'text',
269
- 'title' => esc_html__('Upload date', "wp-seo-structured-data-schema"),
270
- 'class' => 'rtrs-date',
271
- 'required' => true,
272
- 'desc' => esc_html__('Like this: 2021-08-25 14:20:00', "wp-seo-structured-data-schema")
273
- ),
274
- 'duration' => array(
275
- 'type' => 'text',
276
- 'title' => esc_html__('Duration', "wp-seo-structured-data-schema"),
277
- 'desc' => esc_html__('Runtime of the movie in ISO 8601 format (for example, "PT2H22M" (142 minutes)).', "wp-seo-structured-data-schema")
278
- ),
279
- ]
280
- ],
281
- 'audio' => [
282
- 'title' => __('Audio', "wp-seo-structured-data-schema"),
283
- 'type' => 'group',
284
- 'fields' => [
285
- 'audio_heading' => [
286
- 'type' => 'heading',
287
- 'title' => __('Audio', "wp-seo-structured-data-schema")
288
- ],
289
- 'name' => array(
290
- 'type' => 'text',
291
- 'title' => esc_html__('Name', 'wp-seo-structured-data-schema'),
292
- 'desc' => esc_html__("The title of the audio", 'wp-seo-structured-data-schema')
293
- ),
294
- 'description' => array(
295
- 'type' => 'textarea',
296
- 'title' => esc_html__('Description', 'wp-seo-structured-data-schema'),
297
- 'desc' => esc_html__("The short description of the audio", 'wp-seo-structured-data-schema')
298
- ),
299
- 'duration' => array(
300
- 'type' => 'text',
301
- 'title' => esc_html__('Duration', 'wp-seo-structured-data-schema'),
302
- 'desc' => esc_html__("The duration of the audio in ISO 8601 format.(PT1M33S)", 'wp-seo-structured-data-schema')
303
- ),
304
- 'contentUrl' => array(
305
- 'type' => 'url',
306
- 'title' => esc_html__('Content URL', 'wp-seo-structured-data-schema'),
307
- 'placeholder' => esc_html__('URL', 'wp-seo-structured-data-schema'),
308
- 'desc' => esc_html__("A URL pointing to the actual audio media file. This file should be in .mp3, .wav, .mpc or other audio file format.", 'wp-seo-structured-data-schema')
309
- ),
310
- 'encodingFormat' => array(
311
- 'type' => 'text',
312
- 'title' => esc_html__('Encoding Format', 'wp-seo-structured-data-schema'),
313
- 'desc' => esc_html__("The encoding format of audio like: 'audio/mpeg'", 'wp-seo-structured-data-schema')
314
- ),
315
- ]
316
- ],
317
- )
318
- ),
319
- 'news_article' => array(
320
- 'pro' => false,
321
- 'title' => __('News Article', "wp-seo-structured-data-schema"),
322
- 'fields' => array(
323
- 'active' => array(
324
- 'type' => 'checkbox'
325
- ),
326
- 'headline' => array(
327
- 'title' => __('Headline', "wp-seo-structured-data-schema"),
328
- 'type' => 'text',
329
- 'desc' => __('Article title', "wp-seo-structured-data-schema"),
330
- 'required' => true
331
- ),
332
- 'mainEntityOfPage' => array(
333
- 'title' => __('Page URL', "wp-seo-structured-data-schema"),
334
- 'type' => 'url',
335
- 'desc' => __('The canonical URL of the article page', "wp-seo-structured-data-schema"),
336
- 'required' => true
337
- ),
338
- 'author' => array(
339
- 'title' => __('Author', "wp-seo-structured-data-schema"),
340
- 'type' => 'text',
341
- 'desc' => __('Author display name', "wp-seo-structured-data-schema"),
342
- 'required' => true
343
- ),
344
- 'author_url' => array(
345
- 'title' => __('Author URL', "wp-seo-structured-data-schema"),
346
- 'type' => 'url',
347
- 'required' => true
348
- ),
349
- 'image' => array(
350
- 'title' => __('Image', "wp-seo-structured-data-schema"),
351
- 'type' => 'image',
352
- '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"),
353
- 'required' => true
354
- ),
355
- 'datePublished' => array(
356
- 'title' => __('Published date', "wp-seo-structured-data-schema"),
357
- 'type' => 'text',
358
- 'class' => 'kcseo-date',
359
- 'desc' => __('Like this: 2021-12-25 14:20:00', "wp-seo-structured-data-schema"),
360
- 'required' => true
361
- ),
362
- 'dateModified' => array(
363
- 'title' => __('Modified date', "wp-seo-structured-data-schema"),
364
- 'type' => 'text',
365
- 'class' => 'kcseo-date',
366
- 'required' => true,
367
- 'desc' => __('Like this: 2021-12-25 14:20:00', "wp-seo-structured-data-schema")
368
- ),
369
- 'publisher' => array(
370
- 'title' => __('Publisher', "wp-seo-structured-data-schema"),
371
- 'type' => 'text',
372
- 'desc' => __('Publisher name or Organization name', "wp-seo-structured-data-schema"),
373
- 'required' => true
374
- ),
375
- 'publisherImage' => array(
376
- 'title' => __('Publisher Logo', "wp-seo-structured-data-schema"),
377
- 'type' => 'image',
378
- '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"),
379
- 'required' => true
380
- ),
381
- 'description' => array(
382
- 'title' => __('Description', "wp-seo-structured-data-schema"),
383
- 'type' => 'textarea',
384
- 'desc' => __('Short description. New line is not supported.', "wp-seo-structured-data-schema")
385
- ),
386
- 'articleBody' => array(
387
- 'title' => __('Article body', "wp-seo-structured-data-schema"),
388
- 'type' => 'textarea',
389
- 'desc' => __('Article body content. New line is not supported.', "wp-seo-structured-data-schema")
390
- ),
391
- 'video' => [
392
- 'title' => __('Video', "wp-seo-structured-data-schema"),
393
- 'type' => 'group',
394
- 'fields' => [
395
- 'video_heading' => [
396
- 'type' => 'heading',
397
- 'title' => __('Video', "wp-seo-structured-data-schema")
398
- ],
399
- 'name' => array(
400
- 'type' => 'text',
401
- 'title' => esc_html__('Name', "wp-seo-structured-data-schema"),
402
- ),
403
- 'description' => array(
404
- 'type' => 'textarea',
405
- 'title' => esc_html__('Description', "wp-seo-structured-data-schema")
406
- ),
407
- 'thumbnailUrl' => array(
408
- 'type' => 'image',
409
- 'title' => esc_html__('Image', "wp-seo-structured-data-schema")
410
- ),
411
- 'contentUrl' => array(
412
- 'type' => 'url',
413
- 'title' => esc_html__('Content URL', "wp-seo-structured-data-schema")
414
- ),
415
- 'embedUrl' => array(
416
- 'type' => 'url',
417
- 'title' => esc_html__('Embed URL', "wp-seo-structured-data-schema"),
418
- 'desc' => esc_html__("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')
419
- ),
420
- 'uploadDate' => array(
421
- 'type' => 'text',
422
- 'title' => esc_html__('Upload date', "wp-seo-structured-data-schema"),
423
- 'class' => 'rtrs-date',
424
- 'required' => true,
425
- 'desc' => esc_html__('Like this: 2021-08-25 14:20:00', "wp-seo-structured-data-schema")
426
- ),
427
- 'duration' => array(
428
- 'type' => 'text',
429
- 'title' => esc_html__('Duration', "wp-seo-structured-data-schema"),
430
- 'desc' => esc_html__('Runtime of the movie in ISO 8601 format (for example, "PT2H22M" (142 minutes)).', "wp-seo-structured-data-schema")
431
- ),
432
- ]
433
- ],
434
- 'audio' => [
435
- 'title' => __('Audio', "wp-seo-structured-data-schema"),
436
- 'type' => 'group',
437
- 'fields' => [
438
- 'audio_heading' => [
439
- 'type' => 'heading',
440
- 'title' => __('Audio', "wp-seo-structured-data-schema")
441
- ],
442
- 'name' => array(
443
- 'type' => 'text',
444
- 'title' => esc_html__('Name', 'wp-seo-structured-data-schema'),
445
- 'desc' => esc_html__("The title of the audio", 'wp-seo-structured-data-schema')
446
- ),
447
- 'description' => array(
448
- 'type' => 'textarea',
449
- 'title' => esc_html__('Description', 'wp-seo-structured-data-schema'),
450
- 'desc' => esc_html__("The short description of the audio", 'wp-seo-structured-data-schema')
451
- ),
452
- 'duration' => array(
453
- 'type' => 'text',
454
- 'title' => esc_html__('Duration', 'wp-seo-structured-data-schema'),
455
- 'desc' => esc_html__("The duration of the audio in ISO 8601 format.(PT1M33S)", 'wp-seo-structured-data-schema')
456
- ),
457
- 'contentUrl' => array(
458
- 'type' => 'url',
459
- 'title' => esc_html__('Content URL', 'wp-seo-structured-data-schema'),
460
- 'placeholder' => esc_html__('URL', 'wp-seo-structured-data-schema'),
461
- 'desc' => esc_html__("A URL pointing to the actual audio media file. This file should be in .mp3, .wav, .mpc or other audio file format.", 'wp-seo-structured-data-schema')
462
- ),
463
- 'encodingFormat' => array(
464
- 'type' => 'text',
465
- 'title' => esc_html__('Encoding Format', 'wp-seo-structured-data-schema'),
466
- 'desc' => esc_html__("The encoding format of audio like: 'audio/mpeg'", 'wp-seo-structured-data-schema')
467
- ),
468
- ]
469
- ],
470
- )
471
- ),
472
- 'event' => array(
473
- 'pro' => false,
474
- 'title' => __('Event', "wp-seo-structured-data-schema"),
475
- 'fields' => array(
476
- 'active' => array(
477
- 'type' => 'checkbox'
478
- ),
479
- 'name' => array(
480
- 'title' => __('Name', "wp-seo-structured-data-schema"),
481
- 'type' => 'text',
482
- 'required' => true,
483
- 'desc' => __("The name of the event.", "wp-seo-structured-data-schema")
484
- ),
485
- 'locationName' => array(
486
- 'title' => __('Location name', "wp-seo-structured-data-schema"),
487
- 'type' => 'text',
488
- 'required' => true,
489
- 'desc' => __("Event Location name", "wp-seo-structured-data-schema")
490
- ),
491
- 'locationAddress' => array(
492
- 'title' => __('Location address', "wp-seo-structured-data-schema"),
493
- 'type' => 'text',
494
- 'required' => true,
495
- '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")
496
- ),
497
- 'startDate' => array(
498
- 'title' => __('Start date', "wp-seo-structured-data-schema"),
499
- 'type' => 'text',
500
- 'class' => 'kcseo-date',
501
- 'required' => true,
502
- 'desc' => __("Event start date Like : 2017-10-16 4:00 AM", "wp-seo-structured-data-schema")
503
- ),
504
- 'endDate' => array(
505
- 'title' => __('End date', "wp-seo-structured-data-schema"),
506
- 'type' => 'text',
507
- 'recommended' => true,
508
- 'class' => 'kcseo-date',
509
- 'desc' => __("Event end date Like : 2017-10-16 4:00 AM", "wp-seo-structured-data-schema")
510
- ),
511
- 'description' => array(
512
- 'title' => __('Description', "wp-seo-structured-data-schema"),
513
- 'type' => 'textarea',
514
- 'recommended' => true,
515
- 'desc' => __("Event description. New line is not supported.", "wp-seo-structured-data-schema")
516
- ),
517
- 'performerName' => array(
518
- 'title' => __('Performer Name', "wp-seo-structured-data-schema"),
519
- 'type' => 'text',
520
- 'recommended' => true,
521
- 'desc' => __("The performer's name.", "wp-seo-structured-data-schema")
522
- ),
523
- 'image' => array(
524
- 'title' => __('Image URL', "wp-seo-structured-data-schema"),
525
- 'type' => 'url',
526
- 'recommended' => true,
527
- 'desc' => __("URL of an image or logo for the event or tour", "wp-seo-structured-data-schema")
528
- ),
529
- 'price' => array(
530
- 'title' => __('Price', "wp-seo-structured-data-schema"),
531
- 'type' => 'number',
532
- 'recommended' => true,
533
- 'attr' => 'step="any"',
534
- '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")
535
- ),
536
- 'priceCurrency' => array(
537
- 'title' => __('Price currency', "wp-seo-structured-data-schema"),
538
- 'type' => 'text',
539
- 'desc' => __("The 3-letter currency code. (USD)", "wp-seo-structured-data-schema")
540
- ),
541
- 'availability' => array(
542
- 'title' => 'Availability',
543
- 'type' => 'select',
544
- 'recommended' => true,
545
- 'empty' => "Select one",
546
- 'options' => array(
547
- 'http://schema.org/InStock' => 'InStock',
548
- 'http://schema.org/SoldOut' => 'SoldOut',
549
- 'http://schema.org/PreOrder' => 'PreOrder',
550
- ),
551
- ),
552
- 'validFrom' => array(
553
- 'title' => __('Valid From', "wp-seo-structured-data-schema"),
554
- 'type' => 'text',
555
- 'recommended' => true,
556
- 'class' => 'kcseo-date',
557
- 'desc' => __(sprintf("The date and time when tickets go on sale (only required on date-restricted offers), in <a href='%s' target='_blank'>ISO-8601 format</a>", 'https://en.wikipedia.org/wiki/ISO_8601'), "wp-seo-structured-data-schema")
558
- ),
559
- 'url' => array(
560
- 'title' => 'URL',
561
- 'recommended' => true,
562
- 'type' => 'url',
563
- 'placeholder' => 'URL',
564
- 'desc' => __("A link to the event's details page. <span class='required'>Not required but (Recommended)</span>", "wp-seo-structured-data-schema")
565
- ),
566
- 'review_section' => array(
567
- 'title' => __('Review', "wp-seo-structured-data-schema"),
568
- 'type' => 'heading',
569
- 'desc' => __("To add review schema for this type, complete fields below and enable, others live blank.", "wp-seo-structured-data-schema")
570
- ),
571
- 'review_active' => array(
572
- 'type' => 'checkbox'
573
- ),
574
- 'review_author' => array(
575
- 'title' => __("Author", "wp-seo-structured-data-schema"),
576
- 'type' => 'text',
577
- 'required' => true
578
- ),
579
- 'review_author_sameAs' => array(
580
- 'title' => __("Author Same As profile link", "wp-seo-structured-data-schema"),
581
- 'type' => 'textarea',
582
- 'attr' => 'placeholder="https://facebook.com/example&#10;https://twitter.com/example"',
583
- 'required' => true,
584
- 'desc' => __('A reference page that unambiguously indicates the item\'s identity; for example, the URL of the item\'s Wikipedia page, Freebase page, or official website.<br> Enter new line for every entry', "wp-seo-structured-data-schema")
585
- ),
586
- 'review_body' => array(
587
- 'title' => __('Review body', "wp-seo-structured-data-schema"),
588
- 'type' => 'textarea',
589
- 'required' => true,
590
- 'desc' => __("The actual body of the review.", "wp-seo-structured-data-schema")
591
- ),
592
- 'review_datePublished' => array(
593
- 'title' => __('Date of Published', "wp-seo-structured-data-schema"),
594
- 'type' => 'text',
595
- 'class' => 'kcseo-date',
596
- 'desc' => __("Like this: 2021-12-25 14:20:00", "wp-seo-structured-data-schema")
597
- ),
598
- 'review_ratingValue' => array(
599
- 'title' => __('Rating value', "wp-seo-structured-data-schema"),
600
- 'type' => 'number',
601
- 'attr' => 'step="any"',
602
- 'desc' => __("A numerical quality rating for the item.", "wp-seo-structured-data-schema")
603
- ),
604
- 'review_bestRating' => array(
605
- 'title' => __('Best rating', "wp-seo-structured-data-schema"),
606
- 'type' => 'number',
607
- 'attr' => 'step="any"',
608
- 'desc' => __("The highest value allowed in this rating system.", "wp-seo-structured-data-schema")
609
- ),
610
- 'review_worstRating' => array(
611
- 'title' => __('Worst rating', "wp-seo-structured-data-schema"),
612
- 'type' => 'number',
613
- 'attr' => 'step="any"',
614
- '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")
615
- )
616
- )
617
- ),
618
- 'product' => array(
619
- 'pro' => false,
620
- 'title' => __('Product', "wp-seo-structured-data-schema"),
621
- 'fields' => array(
622
- 'active' => array(
623
- 'type' => 'checkbox'
624
- ),
625
- 'name' => array(
626
- 'title' => __('Name', "wp-seo-structured-data-schema"),
627
- 'type' => 'text',
628
- 'required' => true,
629
- 'desc' => __("The name of the product.", "wp-seo-structured-data-schema")
630
- ),
631
- 'image' => array(
632
- 'title' => __('Image', "wp-seo-structured-data-schema"),
633
- 'type' => 'image',
634
- '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")
635
- ),
636
- 'description' => array(
637
- 'title' => __('Description', "wp-seo-structured-data-schema"),
638
- 'type' => 'textarea',
639
- 'desc' => __("Product description. New line is not supported.", "wp-seo-structured-data-schema")
640
- ),
641
- 'sku' => array(
642
- 'title' => __('SKU', "wp-seo-structured-data-schema"),
643
- 'type' => 'text',
644
- 'recommended' => true
645
- ),
646
- 'brand' => array(
647
- 'title' => __('Brand', "wp-seo-structured-data-schema"),
648
- 'type' => 'text',
649
- 'recommended' => true,
650
- 'desc' => __("The brand of the product.", "wp-seo-structured-data-schema")
651
- ),
652
- 'identifier_type' => array(
653
- 'title' => __('Identifier Type', "wp-seo-structured-data-schema"),
654
- 'type' => 'select',
655
- 'recommended' => true,
656
- 'options' => array(
657
- 'mpn' => 'MPN',
658
- 'isbn' => 'ISBN',
659
- 'gtin8' => 'GTIN-8 (UPC, JAN)',
660
- 'gtin12' => 'GTIN-12 (UPC)',
661
- 'gtin13' => 'GTIN-13 (EAN,JAN)'
662
- ),
663
- 'desc' => __("<strong>MPN</strong><br>
664
- &#8594; MPN(Manufacturer Part Number) Used globally, Alphanumeric digits (various lengths)<br>
665
- <strong>GTIN</strong><br>
666
- &#8594; UPC(Universal Product Code) Used in primarily North America. 12 numeric digits. eg. 892685001003.<br>
667
- &#8594; EAN(European Article Number) Used primarily outside of North America. Typically 13 numeric digits (can occasionally be either eight or 14 numeric digits). eg. 4011200296908<br>
668
- &#8594; ISBN(International Standard Book Number) Used globally, ISBN-13 (recommended), 13 numeric digits 978-0747595823<br>
669
- &#8594; JAN(Japanese Article Number) Used only in Japan, 8 or 13 numeric digits.", "wp-seo-structured-data-schema")
670
- ),
671
- 'identifier' => array(
672
- 'title' => __('Identifier', "wp-seo-structured-data-schema"),
673
- 'type' => 'text',
674
- 'recommended' => true,
675
- 'desc' => __("Enter product unique identifier", "wp-seo-structured-data-schema")
676
- ),
677
- 'rating_section' => array(
678
- 'title' => __('Product Review & Rating', "wp-seo-structured-data-schema"),
679
- 'type' => 'heading',
680
- ),
681
- 'reviewRatingValue' => array(
682
- 'title' => __('Review rating value', "wp-seo-structured-data-schema"),
683
- 'type' => 'number',
684
- 'recommended' => true,
685
- 'attr' => 'step="any"',
686
- 'desc' => __("Rating value. (1 , 2.5, 3, 5 etc)", "wp-seo-structured-data-schema")
687
- ),
688
- 'reviewBestRating' => array(
689
- 'title' => __('Review Best rating', "wp-seo-structured-data-schema"),
690
- 'type' => 'number',
691
- 'recommended' => true,
692
- 'attr' => 'step="any"',
693
- ),
694
- 'reviewWorstRating' => array(
695
- 'title' => __('Review Worst rating', "wp-seo-structured-data-schema"),
696
- 'type' => 'number',
697
- 'recommended' => true,
698
- 'attr' => 'step="any"',
699
- ),
700
- 'reviewAuthor' => array(
701
- 'title' => __('Review author', "wp-seo-structured-data-schema"),
702
- 'type' => 'text'
703
- ),
704
- 'ratingValue' => array(
705
- 'title' => __('Rating value', "wp-seo-structured-data-schema"),
706
- 'type' => 'number',
707
- 'attr' => 'step="any"',
708
- 'desc' => __("Rating value. (1 , 2.5, 3, 5 etc)", "wp-seo-structured-data-schema")
709
- ),
710
- 'reviewCount' => array(
711
- 'title' => __('Total review count', "wp-seo-structured-data-schema"),
712
- 'type' => 'number',
713
- 'attr' => 'step="any"',
714
- 'desc' => __("Review rating value. <span class='required'>This is required if (Rating value) is given</span>", "wp-seo-structured-data-schema")
715
- ),
716
- 'pricing_section' => array(
717
- 'title' => __('Product Pricing', "wp-seo-structured-data-schema"),
718
- 'type' => 'heading',
719
- ),
720
- 'price' => array(
721
- 'title' => __('Price', "wp-seo-structured-data-schema"),
722
- 'type' => 'number',
723
- 'attr' => 'step="any"',
724
- 'desc' => __("The lowest available price, including service charges and fees, of this type of ticket.", "wp-seo-structured-data-schema")
725
- ),
726
- 'priceValidUntil' => array(
727
- 'title' => __('PriceValidUntil', "wp-seo-structured-data-schema"),
728
- 'type' => 'text',
729
- 'recommended' => true,
730
- 'class' => 'kcseo-date',
731
- 'desc' => __("The date (in ISO 8601 date and time format) after which the price will no longer be available.", "wp-seo-structured-data-schema")
732
- ),
733
- 'priceCurrency' => array(
734
- 'title' => __('Price currency', "wp-seo-structured-data-schema"),
735
- 'type' => 'text',
736
- 'desc' => __("The 3-letter currency code.", "wp-seo-structured-data-schema")
737
- ),
738
- 'availability' => array(
739
- 'title' => 'Availability',
740
- 'type' => 'select',
741
- 'empty' => "Select one",
742
- 'options' => array(
743
- 'http://schema.org/InStock' => 'InStock',
744
- 'http://schema.org/InStoreOnly' => 'InStoreOnly',
745
- 'http://schema.org/OutOfStock' => 'OutOfStock',
746
- 'http://schema.org/SoldOut' => 'SoldOut',
747
- 'http://schema.org/OnlineOnly' => 'OnlineOnly',
748
- 'http://schema.org/LimitedAvailability' => 'LimitedAvailability',
749
- 'http://schema.org/Discontinued' => 'Discontinued',
750
- 'http://schema.org/PreOrder' => 'PreOrder',
751
- ),
752
- 'desc' => __("Select a availability type", "wp-seo-structured-data-schema")
753
- ),
754
- 'itemCondition' => array(
755
- 'title' => 'Product condition',
756
- 'type' => 'select',
757
- 'empty' => "Select one",
758
- 'options' => array(
759
- 'http://schema.org/NewCondition' => 'NewCondition',
760
- 'http://schema.org/UsedCondition' => 'UsedCondition',
761
- 'http://schema.org/DamagedCondition' => 'DamagedCondition',
762
- 'http://schema.org/RefurbishedCondition' => 'RefurbishedCondition',
763
- ),
764
- 'desc' => __("Select a condition", "wp-seo-structured-data-schema")
765
- ),
766
- 'url' => array(
767
- 'title' => __('Product URL', "wp-seo-structured-data-schema"),
768
- 'type' => 'url',
769
- '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")
770
- ),
771
- )
772
- ),
773
- 'video' => array(
774
- 'pro' => false,
775
- 'title' => __('Video', "wp-seo-structured-data-schema"),
776
- 'fields' => array(
777
- 'active' => array(
778
- 'type' => 'checkbox'
779
- ),
780
- 'name' => array(
781
- 'title' => __('Name', "wp-seo-structured-data-schema"),
782
- 'type' => 'text',
783
- 'required' => true,
784
- 'desc' => __("The title of the video", "wp-seo-structured-data-schema")
785
- ),
786
- 'description' => array(
787
- 'title' => __('Description', "wp-seo-structured-data-schema"),
788
- 'type' => 'textarea',
789
- 'required' => true,
790
- 'desc' => __("The description of the video. New line is not supported.", "wp-seo-structured-data-schema")
791
- ),
792
- 'thumbnailUrl' => array(
793
- 'title' => 'Thumbnail URL',
794
- 'type' => 'url',
795
- 'placeholder' => "URL",
796
- 'required' => true,
797
- '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")
798
- ),
799
- 'uploadDate' => array(
800
- 'title' => __('Updated date', "wp-seo-structured-data-schema"),
801
- 'type' => 'text',
802
- 'class' => 'kcseo-date',
803
- 'required' => true,
804
- 'desc' => __('2021-02-05T08:00:00+08:00', "wp-seo-structured-data-schema")
805
- ),
806
- 'duration' => array(
807
- 'title' => __('Duration', "wp-seo-structured-data-schema"),
808
- 'type' => 'text',
809
- 'desc' => __("The duration of the video in ISO 8601 format.(PT1M33S)", "wp-seo-structured-data-schema")
810
- ),
811
- 'contentUrl' => array(
812
- 'title' => 'Content URL',
813
- 'type' => 'url',
814
- 'placeholder' => 'URL',
815
- '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")
816
- ),
817
- 'embedUrl' => array(
818
- 'title' => 'Embed URL',
819
- 'placeholder' => 'URL',
820
- 'type' => 'url',
821
- '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")
822
- ),
823
- 'interactionCount' => array(
824
- 'title' => __('Interaction count', "wp-seo-structured-data-schema"),
825
- 'type' => 'text',
826
- 'desc' => __("The number of times the video has been viewed.", "wp-seo-structured-data-schema")
827
- ),
828
- 'expires' => array(
829
- 'title' => __('Expires', "wp-seo-structured-data-schema"),
830
- 'type' => 'text',
831
- 'class' => 'kcseo-date',
832
- 'desc' => __("Like this: 2021-12-25 14:20:00", "wp-seo-structured-data-schema")
833
- ),
834
- )
835
- ),
836
- 'audio' => array(
837
- 'pro' => false,
838
- 'title' => __('Audio', "wp-seo-structured-data-schema"),
839
- 'fields' => array(
840
- 'active' => array(
841
- 'type' => 'checkbox'
842
- ),
843
- 'name' => array(
844
- 'title' => __('Name', "wp-seo-structured-data-schema"),
845
- 'type' => 'text',
846
- 'required' => true,
847
- 'desc' => __("The title of the audio", "wp-seo-structured-data-schema")
848
- ),
849
- 'description' => array(
850
- 'title' => __('Description', "wp-seo-structured-data-schema"),
851
- 'type' => 'textarea',
852
- 'desc' => __("The description of the audio. New line is not supported.", "wp-seo-structured-data-schema")
853
- ),
854
- 'contentUrl' => array(
855
- 'title' => 'Content URL',
856
- 'type' => 'url',
857
- 'placeholder' => 'URL',
858
- 'required' => true,
859
- 'desc' => esc_html__("A URL pointing to the actual audio media file. This file should be in .mp3, .wav, .mpc or other audio file format.", 'wp-seo-structured-data-schema')
860
- ),
861
- 'duration' => array(
862
- 'title' => __('Duration', "wp-seo-structured-data-schema"),
863
- 'type' => 'text',
864
- 'desc' => __("The duration of the audio in ISO 8601 format.(PT1M33S)", "wp-seo-structured-data-schema")
865
- ),
866
- 'encodingFormat' => array(
867
- 'type' => 'text',
868
- 'title' => esc_html__('Encoding Format', 'wp-seo-structured-data-schema'),
869
- 'desc' => esc_html__("The encoding format of audio like: 'audio/mpeg'", 'wp-seo-structured-data-schema')
870
- ),
871
- )
872
- ),
873
- 'service' => array(
874
- 'pro' => false,
875
- 'title' => __('Service', "wp-seo-structured-data-schema"),
876
- 'fields' => array(
877
- 'active' => array(
878
- 'type' => 'checkbox'
879
- ),
880
- 'name' => array(
881
- 'title' => __('Name', "wp-seo-structured-data-schema"),
882
- 'type' => 'text',
883
- 'required' => true,
884
- 'desc' => __("The name of the Service.", "wp-seo-structured-data-schema")
885
- ),
886
- 'serviceType' => array(
887
- 'title' => __('Service type', "wp-seo-structured-data-schema"),
888
- 'type' => 'text',
889
- 'required' => true,
890
- 'desc' => __("The type of service being offered, e.g. veterans' benefits, emergency relief, etc.", "wp-seo-structured-data-schema")
891
- ),
892
- 'additionalType' => array(
893
- 'title' => 'Additional type(URL)',
894
- 'type' => 'url',
895
- 'placeholder' => 'URL',
896
- '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")
897
- ),
898
- 'award' => array(
899
- 'title' => __('Award', "wp-seo-structured-data-schema"),
900
- 'type' => 'text',
901
- 'desc' => __("An award won by or for this service.", "wp-seo-structured-data-schema")
902
- ),
903
- 'category' => array(
904
- 'title' => __('Category', "wp-seo-structured-data-schema"),
905
- 'type' => 'text',
906
- 'desc' => __("A category for the service.", "wp-seo-structured-data-schema")
907
- ),
908
- 'providerMobility' => array(
909
- 'title' => __('Provider mobility', "wp-seo-structured-data-schema"),
910
- 'type' => 'text',
911
- 'desc' => __("Indicates the mobility of a provided service (e.g. 'static', 'dynamic').", "wp-seo-structured-data-schema")
912
- ),
913
- 'description' => array(
914
- 'title' => 'Description',
915
- 'type' => 'textarea',
916
- 'require' => true,
917
- 'desc' => __("A short description of the service. New line is not supported.", "wp-seo-structured-data-schema")
918
- ),
919
- 'image' => array(
920
- 'title' => 'Image URL',
921
- 'type' => 'url',
922
- 'require' => false,
923
- 'desc' => __("An image of the service. This should be a URL.", "wp-seo-structured-data-schema")
924
- ),
925
- 'mainEntityOfPage' => array(
926
- 'title' => 'Main entity of page URL',
927
- 'type' => 'url',
928
- 'require' => false,
929
- 'desc' => __("Indicates a page (or other CreativeWork) for which this thing is the main entity being described.", "wp-seo-structured-data-schema")
930
- ),
931
- 'sameAs' => array(
932
- 'title' => 'Same as URL',
933
- 'type' => 'url',
934
- 'placeholder' => 'URL',
935
- '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")
936
- ),
937
- 'url' => array(
938
- 'title' => 'Url of the service',
939
- 'type' => 'url',
940
- 'placeholder' => 'URL',
941
- 'desc' => __("URL of the service.", "wp-seo-structured-data-schema")
942
- ),
943
- 'alternateName' => array(
944
- 'title' => __('Alternate name', "wp-seo-structured-data-schema"),
945
- 'type' => 'text',
946
- 'desc' => __('An alias for the service.', "wp-seo-structured-data-schema")
947
- ),
948
- )
949
- ),
950
- 'about' => array(
951
- 'pro' => false,
952
- 'title' => __('About', "wp-seo-structured-data-schema"),
953
- 'fields' => array(
954
- 'active' => array(
955
- 'type' => 'checkbox'
956
- ),
957
- 'name' => array(
958
- 'type' => 'text',
959
- 'title' => esc_html__('Name', 'wp-seo-structured-data-schema'),
960
- 'required' => true
961
- ),
962
- 'description' => array(
963
- 'type' => 'textarea',
964
- 'title' => esc_html__('Description', 'wp-seo-structured-data-schema'),
965
- ),
966
- 'image' => array(
967
- 'type' => 'image',
968
- 'title' => esc_html__('Image', 'wp-seo-structured-data-schema'),
969
- ),
970
- 'url' => array(
971
- 'type' => 'url',
972
- 'title' => esc_html__('URL', 'wp-seo-structured-data-schema'),
973
- ),
974
- 'sameAs' => array(
975
- 'type' => 'textarea',
976
- 'title' => esc_html__("Author Same As profile link", 'wp-seo-structured-data-schema'),
977
- 'placeholder' => 'https://facebook.com/example&#10;https://twitter.com/example',
978
- 'desc' => wp_kses( __("A reference page that unambiguously indicates the item\'s identity; for example, the URL of the item\'s Wikipedia page, Freebase page, or official website.<br> Enter new line for every entry", 'wp-seo-structured-data-schema'), [ 'br' => [] ] )
979
- ),
980
- )
981
- ),
982
- 'contact' => array(
983
- 'pro' => false,
984
- 'title' => __('Contact', "wp-seo-structured-data-schema"),
985
- 'fields' => array(
986
- 'active' => array(
987
- 'type' => 'checkbox'
988
- ),
989
- 'name' => array(
990
- 'type' => 'text',
991
- 'title' => esc_html__('Name', 'wp-seo-structured-data-schema'),
992
- 'required' => true
993
- ),
994
- 'description' => array(
995
- 'type' => 'textarea',
996
- 'title' => esc_html__('Description', 'wp-seo-structured-data-schema'),
997
- ),
998
- 'image' => array(
999
- 'type' => 'image',
1000
- 'title' => esc_html__('Image', 'wp-seo-structured-data-schema'),
1001
- ),
1002
- 'url' => array(
1003
- 'type' => 'url',
1004
- 'title' => esc_html__('URL', 'wp-seo-structured-data-schema'),
1005
- ),
1006
- 'video' => array(
1007
- 'type' => 'url',
1008
- 'title' => esc_html__('Video URL', 'wp-seo-structured-data-schema'),
1009
- 'placeholder' => esc_html__('URL', 'wp-seo-structured-data-schema'),
1010
- 'desc' => esc_html__("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')
1011
- ),
1012
- 'sameAs' => array(
1013
- 'type' => 'textarea',
1014
- 'title' => esc_html__("Author Same As profile link", 'wp-seo-structured-data-schema'),
1015
- 'placeholder' => 'https://facebook.com/example&#10;https://twitter.com/example',
1016
- 'desc' => wp_kses( __("A reference page that unambiguously indicates the item\'s identity; for example, the URL of the item\'s Wikipedia page, Freebase page, or official website.<br> Enter new line for every entry", 'wp-seo-structured-data-schema'), [ 'br' => [] ] )
1017
- ),
1018
- )
1019
- ),
1020
- 'review' => array(
1021
- 'pro' => false,
1022
- 'title' => __('Review', "wp-seo-structured-data-schema"),
1023
- 'fields' => array(
1024
- 'active' => array(
1025
- 'type' => 'checkbox'
1026
- ),
1027
- 'review_notice_heading' => array(
1028
- 'title' => sprintf('<span style="display:block;text-align:center;color: red">%s</span>', __('Notice</span>', "wp-seo-structured-data-schema")),
1029
- 'type' => 'heading',
1030
- 'desc' => self::getReviewNotice()
1031
- ),
1032
- 'itemName' => array(
1033
- 'title' => __('Name of the reviewed item', "wp-seo-structured-data-schema"),
1034
- 'type' => 'text',
1035
- 'required' => true,
1036
- 'desc' => __("The item that is being reviewed.", "wp-seo-structured-data-schema")
1037
- ),
1038
- 'reviewBody' => array(
1039
- 'title' => __('Review body', "wp-seo-structured-data-schema"),
1040
- 'type' => 'textarea',
1041
- 'required' => true,
1042
- 'desc' => __("The actual body of the review.", "wp-seo-structured-data-schema")
1043
- ),
1044
- 'name' => array(
1045
- 'title' => __('Review name', "wp-seo-structured-data-schema"),
1046
- 'type' => 'text',
1047
- 'required' => true,
1048
- 'desc' => __("A particular name for the review.", "wp-seo-structured-data-schema")
1049
- ),
1050
- 'author' => array(
1051
- 'title' => __('Author', "wp-seo-structured-data-schema"),
1052
- 'type' => 'text',
1053
- 'required' => true,
1054
- 'author' => 'Author name',
1055
- 'desc' => __("The author of the review. The reviewer’s name needs to be a valid name.", "wp-seo-structured-data-schema")
1056
- ),
1057
- 'datePublished' => array(
1058
- 'title' => __('Date of Published', "wp-seo-structured-data-schema"),
1059
- 'type' => 'text',
1060
- 'class' => 'kcseo-date',
1061
- 'desc' => __("Like this: 2021-12-25 14:20:00", "wp-seo-structured-data-schema")
1062
- ),
1063
- 'ratingValue' => array(
1064
- 'title' => __('Rating value', "wp-seo-structured-data-schema"),
1065
- 'type' => 'number',
1066
- 'attr' => 'step="any"',
1067
- 'desc' => __("A numerical quality rating for the item.", "wp-seo-structured-data-schema")
1068
- ),
1069
- 'bestRating' => array(
1070
- 'title' => __('Best rating', "wp-seo-structured-data-schema"),
1071
- 'type' => 'number',
1072
- 'attr' => 'step="any"',
1073
- 'desc' => __("The highest value allowed in this rating system.", "wp-seo-structured-data-schema")
1074
- ),
1075
- 'worstRating' => array(
1076
- 'title' => __('Worst rating', "wp-seo-structured-data-schema"),
1077
- 'type' => 'number',
1078
- 'attr' => 'step="any"',
1079
- '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")
1080
- ),
1081
- 'publisher' => array(
1082
- 'title' => __('Name of the organization', "wp-seo-structured-data-schema"),
1083
- 'type' => 'text',
1084
- 'desc' => __('The publisher of the review.', "wp-seo-structured-data-schema")
1085
- )
1086
- )
1087
- ),
1088
- 'aggregate_rating' => array(
1089
- 'pro' => false,
1090
- 'title' => __('Aggregate Ratings', "wp-seo-structured-data-schema"),
1091
- 'fields' => array(
1092
- 'active' => array(
1093
- 'type' => 'checkbox'
1094
- ),
1095
- 'schema_type' => array(
1096
- 'title' => __('Schema type', "wp-seo-structured-data-schema"),
1097
- 'type' => 'schema_type',
1098
- 'required' => true,
1099
- 'options' => self::getSiteTypes(),
1100
- 'empty' => "Select one",
1101
- 'desc' => __("Use the most appropriate schema type for what is being reviewed.", "wp-seo-structured-data-schema")
1102
- ),
1103
- 'name' => array(
1104
- 'title' => __('Name of the item', "wp-seo-structured-data-schema"),
1105
- 'type' => 'text',
1106
- 'required' => true,
1107
- 'desc' => __("The item that is being rated.", "wp-seo-structured-data-schema")
1108
- ),
1109
- 'image' => array(
1110
- 'title' => 'Image',
1111
- 'type' => 'image',
1112
- 'required' => true,
1113
- 'holderClass' => 'kSeo-hidden aggregate-except-organization-holder'
1114
- ),
1115
- 'priceRange' => array(
1116
- 'title' => 'Price Range',
1117
- 'recommended' => true,
1118
- 'type' => 'text',
1119
- 'holderClass' => 'kSeo-hidden aggregate-except-organization-holder',
1120
- 'desc' => __("The price range of the business, for example $$$.", "wp-seo-structured-data-schema")
1121
- ),
1122
- 'telephone' => array(
1123
- 'title' => 'Telephone',
1124
- 'recommended' => true,
1125
- 'type' => 'text',
1126
- 'holderClass' => 'kSeo-hidden aggregate-except-organization-holder'
1127
- ),
1128
- 'address' => array(
1129
- 'title' => 'Address',
1130
- 'recommended' => true,
1131
- 'type' => 'text',
1132
- 'holderClass' => 'kSeo-hidden aggregate-except-organization-holder',
1133
- ),
1134
- 'description' => array(
1135
- 'title' => __('Description', "wp-seo-structured-data-schema"),
1136
- 'type' => 'textarea',
1137
- 'desc' => __("Description for thr review. New line is not supported.", "wp-seo-structured-data-schema")
1138
- ),
1139
- 'ratingCount' => array(
1140
- 'title' => __('Rating Count', "wp-seo-structured-data-schema"),
1141
- 'type' => 'number',
1142
- 'attr' => 'step="any"',
1143
- 'required' => true,
1144
- '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")
1145
- ),
1146
- 'reviewCount' => array(
1147
- 'title' => __('Review Count', "wp-seo-structured-data-schema"),
1148
- 'type' => 'number',
1149
- 'attr' => 'step="any"',
1150
- 'required' => true,
1151
- '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")
1152
- ),
1153
- 'ratingValue' => array(
1154
- 'title' => __('Rating Value', "wp-seo-structured-data-schema"),
1155
- 'attr' => 'step="any"',
1156
- 'type' => 'number',
1157
- 'required' => true,
1158
- 'desc' => __("A numerical quality rating for the item.", "wp-seo-structured-data-schema")
1159
- ),
1160
- 'bestRating' => array(
1161
- 'title' => __('Best Rating', "wp-seo-structured-data-schema"),
1162
- 'type' => 'number',
1163
- 'attr' => 'step="any"',
1164
- 'required' => true,
1165
- '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")
1166
- ),
1167
- 'worstRating' => array(
1168
- 'title' => __('Worst Rating', "wp-seo-structured-data-schema"),
1169
- 'type' => 'number',
1170
- 'attr' => 'step="any"',
1171
- 'required' => true,
1172
- '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")
1173
- )
1174
- )
1175
- ),
1176
- 'restaurant' => array(
1177
- 'pro' => false,
1178
- 'title' => __('Restaurant', "wp-seo-structured-data-schema"),
1179
- 'fields' => array(
1180
- 'active' => array(
1181
- 'type' => 'checkbox'
1182
- ),
1183
- 'name' => array(
1184
- 'title' => __('Name of the Restaurant', "wp-seo-structured-data-schema"),
1185
- 'type' => 'text',
1186
- 'required' => true
1187
- ),
1188
- 'description' => array(
1189
- 'title' => __('Description of the Restaurant', "wp-seo-structured-data-schema"),
1190
- 'type' => 'textarea',
1191
- 'desc' => esc_html__('New line is not supported.', "wp-seo-structured-data-schema")
1192
- ),
1193
- 'openingHours' => array(
1194
- 'title' => __('Opening Hours', "wp-seo-structured-data-schema"),
1195
- 'type' => 'textarea',
1196
- 'desc' => __('Mo,Tu,We,Th,Fr,Sa,Su 11:30-23:00', "wp-seo-structured-data-schema")
1197
- ),
1198
- 'telephone' => array(
1199
- 'title' => __('Telephone', "wp-seo-structured-data-schema"),
1200
- 'type' => 'text',
1201
- 'desc' => __('+155501003333', "wp-seo-structured-data-schema")
1202
- ),
1203
- 'menu' => array(
1204
- 'title' => __('Menu', "wp-seo-structured-data-schema"),
1205
- 'type' => 'text',
1206
- 'desc' => __('http://example.com/menu', "wp-seo-structured-data-schema")
1207
- ),
1208
- 'image' => array(
1209
- 'title' => __('Image', "wp-seo-structured-data-schema"),
1210
- 'type' => 'image',
1211
- 'required' => true
1212
- ),
1213
- 'address' => array(
1214
- 'title' => __('Address', "wp-seo-structured-data-schema"),
1215
- 'type' => 'textarea'
1216
- ),
1217
- 'priceRange' => array(
1218
- 'title' => __('Price Range', "wp-seo-structured-data-schema"),
1219
- 'type' => 'text',
1220
- 'desc' => __('The price range of the business, for example $$$', "wp-seo-structured-data-schema")
1221
- ),
1222
- 'servesCuisine' => array(
1223
- 'title' => __('Serves Cuisine', "wp-seo-structured-data-schema"),
1224
- 'type' => 'text',
1225
- 'desc' => __('The cuisine of the restaurant.', "wp-seo-structured-data-schema")
1226
- )
1227
- )
1228
- ),
1229
- 'localBusiness' => array(
1230
- 'pro' => false,
1231
- 'title' => __('Local Business', "wp-seo-structured-data-schema"),
1232
- 'fields' => array(
1233
- 'active' => array(
1234
- 'type' => 'checkbox'
1235
- ),
1236
- 'name' => array(
1237
- 'title' => __('Name', "wp-seo-structured-data-schema"),
1238
- 'type' => 'text',
1239
- 'required' => true
1240
- ),
1241
- 'description' => array(
1242
- 'title' => __('Description', "wp-seo-structured-data-schema"),
1243
- 'type' => 'textarea',
1244
- 'desc' => esc_html__('New line is not supported.', "wp-seo-structured-data-schema")
1245
- ),
1246
- 'image' => array(
1247
- 'title' => __('Business Logo', "wp-seo-structured-data-schema"),
1248
- 'type' => 'image',
1249
- 'required' => true
1250
- ),
1251
- 'priceRange' => array(
1252
- 'title' => __('Price Range', "wp-seo-structured-data-schema"),
1253
- 'type' => 'text',
1254
- 'recommended' => true,
1255
- 'desc' => __("The price range of the business, for example $$$.", "wp-seo-structured-data-schema")
1256
- ),
1257
- 'addressLocality' => array(
1258
- 'title' => __('Address locality', "wp-seo-structured-data-schema"),
1259
- 'type' => 'text',
1260
- 'desc' => __('City (i.e Kansas city)', "wp-seo-structured-data-schema")
1261
- ),
1262
- 'addressRegion' => array(
1263
- 'title' => __('Address region', "wp-seo-structured-data-schema"),
1264
- 'type' => 'text',
1265
- 'desc' => __('State (i.e. MO)', "wp-seo-structured-data-schema")
1266
- ),
1267
- 'postalCode' => array(
1268
- 'title' => __('Postal code', "wp-seo-structured-data-schema"),
1269
- 'type' => 'text',
1270
- ),
1271
- 'streetAddress' => array(
1272
- 'title' => __('Street address', "wp-seo-structured-data-schema"),
1273
- 'type' => 'text',
1274
- ),
1275
- 'telephone' => array(
1276
- 'title' => __('Telephone', "wp-seo-structured-data-schema"),
1277
- 'type' => 'text',
1278
- 'recommended' => true,
1279
- ),
1280
- 'review_section' => array(
1281
- 'title' => __('Review', "wp-seo-structured-data-schema"),
1282
- 'type' => 'heading',
1283
- 'desc' => __("To add review schema for this type, complete fields below and enable, others live blank.", "wp-seo-structured-data-schema")
1284
- ),
1285
- 'review_active' => array(
1286
- 'type' => 'checkbox'
1287
- ),
1288
- 'review_author' => array(
1289
- 'title' => __("Author", "wp-seo-structured-data-schema"),
1290
- 'type' => 'text',
1291
- 'required' => true
1292
- ),
1293
- 'review_author_sameAs' => array(
1294
- 'title' => __("Author Same As profile link", "wp-seo-structured-data-schema"),
1295
- 'type' => 'textarea',
1296
- 'attr' => 'placeholder="https://facebook.com/example&#10;https://twitter.com/example"',
1297
- 'required' => true,
1298
- 'desc' => __('A reference page that unambiguously indicates the item\'s identity; for example, the URL of the item\'s Wikipedia page, Freebase page, or official website.<br> Enter new line for every entry', "wp-seo-structured-data-schema")
1299
- ),
1300
- 'review_body' => array(
1301
- 'title' => __('Review body', "wp-seo-structured-data-schema"),
1302
- 'type' => 'textarea',
1303
- 'required' => true,
1304
- 'desc' => __("The actual body of the review.", "wp-seo-structured-data-schema")
1305
- ),
1306
- 'review_datePublished' => array(
1307
- 'title' => __('Date of Published', "wp-seo-structured-data-schema"),
1308
- 'type' => 'text',
1309
- 'class' => 'kcseo-date',
1310
- 'desc' => __("Like this: 2021-12-25 14:20:00", "wp-seo-structured-data-schema")
1311
- ),
1312
- 'review_ratingValue' => array(
1313
- 'title' => __('Rating value', "wp-seo-structured-data-schema"),
1314
- 'type' => 'number',
1315
- 'attr' => 'step="any"',
1316
- 'desc' => __("A numerical quality rating for the item.", "wp-seo-structured-data-schema")
1317
- ),
1318
- 'review_bestRating' => array(
1319
- 'title' => __('Best rating', "wp-seo-structured-data-schema"),
1320
- 'type' => 'number',
1321
- 'attr' => 'step="any"',
1322
- 'desc' => __("The highest value allowed in this rating system.", "wp-seo-structured-data-schema")
1323
- ),
1324
- 'review_worstRating' => array(
1325
- 'title' => __('Worst rating', "wp-seo-structured-data-schema"),
1326
- 'type' => 'number',
1327
- 'attr' => 'step="any"',
1328
- '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")
1329
- )
1330
- )
1331
- ),
1332
- 'book' => array(
1333
- 'pro' => true,
1334
- 'title' => __("Book", "wp-seo-structured-data-schema"),
1335
- ),
1336
- 'course' => array(
1337
- 'pro' => true,
1338
- 'title' => __("Course", "wp-seo-structured-data-schema"),
1339
- ),
1340
- 'JobPosting' => array(
1341
- 'pro' => true,
1342
- 'title' => __("Job Posting", "wp-seo-structured-data-schema"),
1343
- ),
1344
- 'movie' => array(
1345
- 'pro' => true,
1346
- 'title' => __("Movie", "wp-seo-structured-data-schema"),
1347
- ),
1348
- 'music' => array(
1349
- 'pro' => true,
1350
- 'title' => __("Music", "wp-seo-structured-data-schema"),
1351
- ),
1352
- 'recipe' => array(
1353
- 'pro' => true,
1354
- 'title' => __("Recipe", "wp-seo-structured-data-schema"),
1355
- ),
1356
- 'TVEpisode' => array(
1357
- 'pro' => true,
1358
- 'title' => __("TVEpisode", "wp-seo-structured-data-schema"),
1359
- ),
1360
- 'question' => array(
1361
- 'pro' => true,
1362
- 'title' => __("QAPage", "wp-seo-structured-data-schema"),
1363
- ),
1364
- 'itemList' => array(
1365
- 'pro' => true,
1366
- 'title' => __("Item List", "wp-seo-structured-data-schema"),
1367
- ),
1368
- 'specialAnnouncement' => [
1369
- 'title' => __('Special Announcement', "wp-seo-structured-data-schema"),
1370
- 'fields' => [
1371
- 'active' => [
1372
- 'type' => 'checkbox'
1373
- ],
1374
- 'name' => [
1375
- 'title' => __('Name', "wp-seo-structured-data-schema"),
1376
- 'type' => 'text',
1377
- 'desc' => __('SpecialAnnouncement.name: Name of the announcement. This text should be present on the underlying page.', "wp-seo-structured-data-schema"),
1378
- 'required' => true
1379
- ],
1380
- 'url' => [
1381
- 'title' => __('Page URL', "wp-seo-structured-data-schema"),
1382
- 'type' => 'url',
1383
- 'desc' => __('SpecialAnnouncement.url: URL of the page containing the announcements. If present, this must match the URL of the page containing the information.', "wp-seo-structured-data-schema"),
1384
- 'required' => true
1385
- ],
1386
- 'datePublished' => [
1387
- 'title' => __('Published date', "wp-seo-structured-data-schema"),
1388
- 'type' => 'text',
1389
- 'class' => 'kcseo-date',
1390
- 'desc' => __('Like this: 2021-12-25 14:20:00', "wp-seo-structured-data-schema"),
1391
- 'required' => true
1392
- ],
1393
- 'expires' => [
1394
- 'title' => __('Expires date', "wp-seo-structured-data-schema"),
1395
- 'type' => 'text',
1396
- 'class' => 'kcseo-date',
1397
- 'desc' => __('Like this: 2021-12-25 14:20:00', "wp-seo-structured-data-schema"),
1398
- 'recommended' => true,
1399
- ],
1400
- 'text' => [
1401
- 'title' => __('Text', "wp-seo-structured-data-schema"),
1402
- 'type' => 'textarea',
1403
- 'desc' => __('SpecialAnnouncement.text: Text of the announcements.', "wp-seo-structured-data-schema"),
1404
- 'required' => true
1405
- ],
1406
- 'locations' => [
1407
- 'title' => __('Announcement Locations', "wp-seo-structured-data-schema"),
1408
- 'type' => 'group',
1409
- 'duplicate' => true,
1410
- 'fields' => [
1411
- 'location_heading' => [
1412
- 'type' => 'heading',
1413
- 'title' => __('Announcement Location', "wp-seo-structured-data-schema")
1414
- ],
1415
- 'type' => [
1416
- 'title' => __('Type', "wp-seo-structured-data-schema"),
1417
- 'type' => 'select',
1418
- 'options' => self::announcementLocationTypes(),
1419
- 'required' => true
1420
- ],
1421
- 'name' => [
1422
- 'title' => __('Name', "wp-seo-structured-data-schema"),
1423
- 'type' => 'text',
1424
- 'desc' => __("SpecialAnnouncement.announcementLocation.name: ", "wp-seo-structured-data-schema"),
1425
- 'recommended' => true,
1426
- ],
1427
- 'url' => [
1428
- 'title' => __('URL', "wp-seo-structured-data-schema"),
1429
- 'type' => 'url',
1430
- 'recommended' => true,
1431
- 'desc' => __("SpecialAnnouncement.announcementLocation.url: URL", "wp-seo-structured-data-schema")
1432
- ],
1433
- 'address_street' => [
1434
- 'title' => __('Address: Street', "wp-seo-structured-data-schema"),
1435
- 'type' => 'text',
1436
- 'desc' => __('SpecialAnnouncement.announcementLocation.address.streetAddress: The street address. For example, 1600 Amphitheatre Pkwy.', "wp-seo-structured-data-schema"),
1437
- 'recommended' => true,
1438
- ],
1439
- 'address_locality' => [
1440
- 'title' => __('Address: Locality', "wp-seo-structured-data-schema"),
1441
- 'type' => 'text',
1442
- 'desc' => __('SpecialAnnouncement.announcementLocation.address.addressLocality: The locality in which the street address is, and which is in the region. For example, Mountain View.', "wp-seo-structured-data-schema"),
1443
- 'recommended' => true,
1444
- ],
1445
- 'address_post_code' => [
1446
- 'title' => __('Address: Post Code', "wp-seo-structured-data-schema"),
1447
- 'type' => 'text',
1448
- 'desc' => __('SpecialAnnouncement.announcementLocation.address.postalCode: The postal code. For example, 94043.', "wp-seo-structured-data-schema"),
1449
- 'recommended' => true,
1450
- ],
1451
- 'address_region' => [
1452
- 'title' => __('Address: Region', "wp-seo-structured-data-schema"),
1453
- 'type' => 'text',
1454
- 'desc' => __('SpecialAnnouncement.announcementLocation.address.addressRegion: The region in which the locality is, and which is in the country. For example, California.', "wp-seo-structured-data-schema"),
1455
- 'recommended' => true,
1456
- ],
1457
- 'address_country' => [
1458
- 'title' => __('Address: Country', "wp-seo-structured-data-schema"),
1459
- 'type' => 'text',
1460
- 'desc' => __('SpecialAnnouncement.announcementLocation.address.addressCountry: The country. For example, USA. You can also provide the two-letter ISO 3166-1 alpha-2 country code.', "wp-seo-structured-data-schema"),
1461
- 'recommended' => true,
1462
- ],
1463
- 'id' => [
1464
- 'title' => __('ID', "wp-seo-structured-data-schema"),
1465
- 'type' => 'text',
1466
- 'desc' => __('SpecialAnnouncement.announcementLocation.@id: An optional unique identifier so that you can reference pre-existing structured data for this location.', "wp-seo-structured-data-schema"),
1467
- ],
1468
- 'image' => array(
1469
- 'title' => __('Image', "wp-seo-structured-data-schema"),
1470
- 'type' => 'image'
1471
- ),
1472
- 'priceRange' => array(
1473
- 'title' => 'Price Range (Recommended)',
1474
- 'type' => 'text',
1475
- 'recommended' => true,
1476
- 'desc' => __("The price range of the business, for example $$$.", "wp-seo-structured-data-schema")
1477
- ),
1478
- 'telephone' => array(
1479
- 'title' => 'Telephone (Recommended)',
1480
- 'type' => 'text',
1481
- 'recommended' => true
1482
- )
1483
- ]
1484
- ],
1485
- ]
1486
- ]
1487
- );
1488
-
1489
- return apply_filters('kcseo_schema_types', $schemas);
1490
- }
1491
-
1492
- static function getSiteTypes() {
1493
- $siteTypes = array(
1494
- 'Organization',
1495
- 'LocalBusiness' => array(
1496
- 'AnimalShelter',
1497
- 'AutomotiveBusiness' => array(
1498
- 'AutoBodyShop',
1499
- 'AutoDealer',
1500
- 'AutoPartsStore',
1501
- 'AutoRental',
1502
- 'AutoRepair',
1503
- 'AutoWash',
1504
- 'GasStation',
1505
- 'MotorcycleDealer',
1506
- 'MotorcycleRepair'
1507
- ),
1508
- 'ChildCare',
1509
- 'DryCleaningOrLaundry',
1510
- 'EmergencyService',
1511
- 'EmploymentAgency',
1512
- 'EntertainmentBusiness' => array(
1513
- 'AdultEntertainment',
1514
- 'AmusementPark',
1515
- 'ArtGallery',
1516
- 'Casino',
1517
- 'ComedyClub',
1518
- 'MovieTheater',
1519
- 'NightClub',
1520
-
1521
- ),
1522
- 'FinancialService' => array(
1523
- 'AccountingService',
1524
- 'AutomatedTeller',
1525
- 'BankOrCreditUnion',
1526
- 'InsuranceAgency',
1527
- ),
1528
- 'FoodEstablishment' => array(
1529
- 'Bakery',
1530
- 'BarOrPub',
1531
- 'Brewery',
1532
- 'CafeOrCoffeeShop',
1533
- 'FastFoodRestaurant',
1534
- 'IceCreamShop',
1535
- 'Restaurant',
1536
- 'Winery',
1537
- ),
1538
- 'GovernmentOffice',
1539
- 'HealthAndBeautyBusiness' => array(
1540
- 'BeautySalon',
1541
- 'DaySpa',
1542
- 'HairSalon',
1543
- 'HealthClub',
1544
- 'NailSalon',
1545
- 'TattooParlor',
1546
- ),
1547
- 'HomeAndConstructionBusiness' => array(
1548
- 'Electrician',
1549
- 'GeneralContractor',
1550
- 'HVACBusiness',
1551
- 'HousePainter',
1552
- 'Locksmith',
1553
- 'MovingCompany',
1554
- 'Plumber',
1555
- 'RoofingContractor',
1556
- ),
1557
- 'InternetCafe',
1558
- 'LegalService' => array(
1559
- 'Attorney',
1560
- 'Notary',
1561
- ),
1562
- 'Library',
1563
- 'MedicalBusiness' => array(
1564
- 'CommunityHealth',
1565
- 'Dentist',
1566
- 'Dermatology',
1567
- 'DietNutrition',
1568
- 'Emergency',
1569
- 'Geriatric',
1570
- 'Gynecologic',
1571
- 'MedicalClinic',
1572
- 'Midwifery',
1573
- 'Nursing',
1574
- 'Obstetric',
1575
- 'Oncologic',
1576
- 'Optician',
1577
- 'Optometric',
1578
- 'Otolaryngologic',
1579
- 'Pediatric',
1580
- 'Pharmacy',
1581
- 'Physician',
1582
- 'Physiotherapy',
1583
- 'PlasticSurgery',
1584
- 'Podiatric',
1585
- 'PrimaryCare',
1586
- 'Psychiatric',
1587
- 'PublicHealth',
1588
- ),
1589
- 'LodgingBusiness' => array(
1590
- 'BedAndBreakfast',
1591
- 'Campground',
1592
- 'Hostel',
1593
- 'Hotel',
1594
- 'Motel',
1595
- 'Resort',
1596
- ),
1597
- 'ProfessionalService',
1598
- 'RadioStation',
1599
- 'RealEstateAgent',
1600
- 'RecyclingCenter',
1601
- 'SelfStorage',
1602
- 'ShoppingCenter',
1603
- 'SportsActivityLocation' => array(
1604
- 'BowlingAlley',
1605
- 'ExerciseGym',
1606
- 'GolfCourse',
1607
- 'HealthClub',
1608
- 'PublicSwimmingPool',
1609
- 'SkiResort',
1610
- 'SportsClub',
1611
- 'StadiumOrArena',
1612
- 'TennisComplex',
1613
- ),
1614
- 'Store' => array(
1615
- 'AutoPartsStore',
1616
- 'BikeStore',
1617
- 'BookStore',
1618
- 'ClothingStore',
1619
- 'ComputerStore',
1620
- 'ConvenienceStore',
1621
- 'DepartmentStore',
1622
- 'ElectronicsStore',
1623
- 'Florist',
1624
- 'FurnitureStore',
1625
- 'GardenStore',
1626
- 'GroceryStore',
1627
- 'HardwareStore',
1628
- 'HobbyShop',
1629
- 'HomeGoodsStore',
1630
- 'JewelryStore',
1631
- 'LiquorStore',
1632
- 'MensClothingStore',
1633
- 'MobilePhoneStore',
1634
- 'MovieRentalStore',
1635
- 'MusicStore',
1636
- 'OfficeEquipmentStore',
1637
- 'OutletStore',
1638
- 'PawnShop',
1639
- 'PetStore',
1640
- 'ShoeStore',
1641
- 'SportingGoodsStore',
1642
- 'TireShop',
1643
- 'ToyStore',
1644
- 'WholesaleStore'
1645
- ),
1646
- 'TelevisionStation',
1647
- 'TouristInformationCenter',
1648
- 'TravelAgency'
1649
- ),
1650
- 'NGO' => array(),
1651
- );
1652
-
1653
- return apply_filters('kcseo_site_types', $siteTypes);
1654
- }
1655
-
1656
- static function getCountryList() {
1657
- $countryList = array(
1658
- "AF" => "Afghanistan",
1659
- "AX" => "Aland Islands",
1660
- "AL" => "Albania",
1661
- "DZ" => "Algeria",
1662
- "AS" => "American Samoa",
1663
- "AD" => "Andorra",
1664
- "AO" => "Angola",
1665
- "AI" => "Anguilla",
1666
- "AQ" => "Antarctica",
1667
- "AG" => "Antigua and Barbuda",
1668
- "AR" => "Argentina",
1669
- "AM" => "Armenia",
1670
- "AW" => "Aruba",
1671
- "AU" => "Australia",
1672
- "AT" => "Austria",
1673
- "AZ" => "Azerbaijan",
1674
- "BS" => "Bahamas",
1675
- "BH" => "Bahrain",
1676
- "BD" => "Bangladesh",
1677
- "BB" => "Barbados",
1678
- "BY" => "Belarus",
1679
- "BE" => "Belgium",
1680
- "BZ" => "Belize",
1681
- "BJ" => "Benin",
1682
- "BM" => "Bermuda",
1683
- "BT" => "Bhutan",
1684
- "BO" => "Bolivia, Plurinational State of",
1685
- "BQ" => "Bonaire, Sint Eustatius and Saba",
1686
- "BA" => "Bosnia and Herzegovina",
1687
- "BW" => "Botswana",
1688
- "BV" => "Bouvet Island",
1689
- "BR" => "Brazil",
1690
- "IO" => "British Indian Ocean Territory",
1691
- "BN" => "Brunei Darussalam",
1692
- "BG" => "Bulgaria",
1693
- "BF" => "Burkina Faso",
1694
- "BI" => "Burundi",
1695
- "KH" => "Cambodia",
1696
- "CM" => "Cameroon",
1697
- "CA" => "Canada",
1698
- "CV" => "Cape Verde",
1699
- "KY" => "Cayman Islands",
1700
- "CF" => "Central African Republic",
1701
- "TD" => "Chad",
1702
- "CL" => "Chile",
1703
- "CN" => "China",
1704
- "CX" => "Christmas Island",
1705
- "CC" => "Cocos (Keeling) Islands",
1706
- "CO" => "Colombia",
1707
- "KM" => "Comoros",
1708
- "CG" => "Congo",
1709
- "CD" => "Congo, the Democratic Republic of the",
1710
- "CK" => "Cook Islands",
1711
- "CR" => "Costa Rica",
1712
- "CI" => "Côte d Ivoire",
1713
- "HR" => "Croatia",
1714
- "CU" => "Cuba",
1715
- "CW" => "Curaçao",
1716
- "CY" => "Cyprus",
1717
- "CZ" => "Czech Republic",
1718
- "DK" => "Denmark",
1719
- "DJ" => "Djibouti",
1720
- "DM" => "Dominica",
1721
- "DO" => "Dominican Republic",
1722
- "EC" => "Ecuador",
1723
- "EG" => "Egypt",
1724
- "SV" => "El Salvador",
1725
- "GQ" => "Equatorial Guinea",
1726
- "ER" => "Eritrea",
1727
- "EE" => "Estonia",
1728
- "ET" => "Ethiopia",
1729
- "FK" => "Falkland Islands (Malvinas)",
1730
- "FO" => "Faroe Islands",
1731
- "FJ" => "Fiji",
1732
- "FI" => "Finland",
1733
- "FR" => "France",
1734
- "GF" => "French Guiana",
1735
- "PF" => "French Polynesia",
1736
- "TF" => "French Southern Territories",
1737
- "GA" => "Gabon",
1738
- "GM" => "Gambia",
1739
- "GE" => "Georgia",
1740
- "DE" => "Germany",
1741
- "GH" => "Ghana",
1742
- "GI" => "Gibraltar",
1743
- "GR" => "Greece",
1744
- "GL" => "Greenland",
1745
- "GD" => "Grenada",
1746
- "GP" => "Guadeloupe",
1747
- "GU" => "Guam",
1748
- "GT" => "Guatemala",
1749
- "GG" => "Guernsey",
1750
- "GN" => "Guinea",
1751
- "GW" => "Guinea-Bissau",
1752
- "GY" => "Guyana",
1753
- "HT" => "Haiti",
1754
- "HM" => "Heard Island and McDonald Islands",
1755
- "VA" => "Holy See (Vatican City State)",
1756
- "HN" => "Honduras",
1757
- "HK" => "Hong Kong",
1758
- "HU" => "Hungary",
1759
- "IS" => "Iceland",
1760
- "IN" => "India",
1761
- "ID" => "Indonesia",
1762
- "IR" => "Iran, Islamic Republic of",
1763
- "IQ" => "Iraq",
1764
- "IE" => "Ireland",
1765
- "IM" => "Isle of Man",
1766
- "IL" => "Israel",
1767
- "IT" => "Italy",
1768
- "JM" => "Jamaica",
1769
- "JP" => "Japan",
1770
- "JE" => "Jersey",
1771
- "JO" => "Jordan",
1772
- "KZ" => "Kazakhstan",
1773
- "KE" => "Kenya",
1774
- "KI" => "Kiribati",
1775
- "KP" => "Korea, Democratic People's Republic of",
1776
- "KR" => "Korea, Republic of,",
1777
- "KW" => "Kuwait",
1778
- "KG" => "Kyrgyzstan",
1779
- "LA" => "Lao Peoples Democratic Republic",
1780
- "LV" => "Latvia",
1781
- "LB" => "Lebanon",
1782
- "LS" => "Lesotho",
1783
- "LR" => "Liberia",
1784
- "LY" => "Libya",
1785
- "LI" => "Liechtenstein",
1786
- "LT" => "Lithuania",
1787
- "LU" => "Luxembourg",
1788
- "MO" => "Macao",
1789
- "MK" => "Macedonia, the former Yugoslav Republic of",
1790
- "MG" => "Madagascar",
1791
- "MW" => "Malawi",
1792
- "MY" => "Malaysia",
1793
- "MV" => "Maldives",
1794
- "ML" => "Mali",
1795
- "MT" => "Malta",
1796
- "MH" => "Marshall Islands",
1797
- "MQ" => "Martinique",
1798
- "MR" => "Mauritania",
1799
- "MU" => "Mauritius",
1800
- "YT" => "Mayotte",
1801
- "MX" => "Mexico",
1802
- "FM" => "Micronesia, Federated States of",
1803
- "MD" => "Moldova, Republic of",
1804
- "MC" => "Monaco",
1805
- "MN" => "Mongolia",
1806
- "ME" => "Montenegro",
1807
- "MS" => "Montserrat",
1808
- "MA" => "Morocco",
1809
- "MZ" => "Mozambique",
1810
- "MM" => "Myanmar",
1811
- "NA" => "Namibia",
1812
- "NR" => "Nauru",
1813
- "NP" => "Nepal",
1814
- "NL" => "Netherlands",
1815
- "NC" => "New Caledonia",
1816
- "NZ" => "New Zealand",
1817
- "NI" => "Nicaragua",
1818
- "NE" => "Niger",
1819
- "NG" => "Nigeria",
1820
- "NU" => "Niue",
1821
- "NF" => "Norfolk Island",
1822
- "MP" => "Northern Mariana Islands",
1823
- "NO" => "Norway",
1824
- "OM" => "Oman",
1825
- "PK" => "Pakistan",
1826
- "PW" => "Palau",
1827
- "PS" => "Palestine, State of",
1828
- "PA" => "Panama",
1829
- "PG" => "Papua New Guinea",
1830
- "PY" => "Paraguay",
1831
- "PE" => "Peru",
1832
- "PH" => "Philippines",
1833
- "PN" => "Pitcairn",
1834
- "PL" => "Poland",
1835
- "PT" => "Portugal",
1836
- "PR" => "Puerto Rico",
1837
- "QA" => "Qatar",
1838
- "RE" => "Reunion",
1839
- "RO" => "Romania",
1840
- "RU" => "Russian Federation",
1841
- "RW" => "Rwanda",
1842
- "BL" => "Saint Barthélemy",
1843
- "SH" => "Saint Helena, Ascension and Tristan da Cunha",
1844
- "KN" => "Saint Kitts and Nevis",
1845
- "LC" => "Saint Lucia",
1846
- "MF" => "Saint Martin (French part)",
1847
- "PM" => "Saint Pierre and Miquelon",
1848
- "VC" => "Saint Vincent and the Grenadines",
1849
- "WS" => "Samoa",
1850
- "SM" => "San Marino",
1851
- "ST" => "Sao Tome and Principe",
1852
- "SA" => "Saudi Arabia",
1853
- "SN" => "Senegal",
1854
- "RS" => "Serbia",
1855
- "SC" => "Seychelles",
1856
- "SL" => "Sierra Leone",
1857
- "SG" => "Singapore",
1858
- "SX" => "Sint Maarten (Dutch part)",
1859
- "SK" => "Slovakia",
1860
- "SI" => "Slovenia",
1861
- "SB" => "Solomon Islands",
1862
- "SO" => "Somalia",
1863
- "ZA" => "South Africa",
1864
- "GS" => "South Georgia and the South Sandwich Islands",
1865
- "SS" => "South Sudan",
1866
- "ES" => "Spain",
1867
- "LK" => "Sri Lanka",
1868
- "SD" => "Sudan",
1869
- "SR" => "Suriname",
1870
- "SJ" => "Svalbard and Jan Mayen",
1871
- "SZ" => "Swaziland",
1872
- "SE" => "Sweden",
1873
- "CH" => "Switzerland",
1874
- "SY" => "Syrian Arab Republic",
1875
- "TW" => "Taiwan, Province of China",
1876
- "TJ" => "Tajikistan",
1877
- "TZ" => "Tanzania, United Republic of",
1878
- "TH" => "Thailand",
1879
- "TL" => "Timor-Leste",
1880
- "TG" => "Togo",
1881
- "TK" => "Tokelau",
1882
- "TO" => "Tonga",
1883
- "TT" => "Trinidad and Tobago",
1884
- "TN" => "Tunisia",
1885
- "TR" => "Turkey",
1886
- "TM" => "Turkmenistan",
1887
- "TC" => "Turks and Caicos Islands",
1888
- "TV" => "Tuvalu",
1889
- "UG" => "Uganda",
1890
- "UA" => "Ukraine",
1891
- "AE" => "United Arab Emirates",
1892
- "GB" => "United Kingdom",
1893
- "US" => "United States",
1894
- "UM" => "United States Minor Outlying Islands",
1895
- "UY" => "Uruguay",
1896
- "UZ" => "Uzbekistan",
1897
- "VU" => "Vanuatu",
1898
- "VE" => "Venezuela, Bolivarian Republic of",
1899
- "VN" => "Viet Nam",
1900
- "VG" => "Virgin Islands, British",
1901
- "VI" => "Virgin Islands, U.S.",
1902
- "WF" => "Wallis and Futuna",
1903
- "EH" => "Western Sahara",
1904
- "YE" => "Yemen",
1905
- "ZM" => "Zambia",
1906
- "ZW" => "Zimbabwe",
1907
- );
1908
-
1909
- return apply_filters('kcseo_country_list', $countryList);
1910
- }
1911
-
1912
- static function getContactTypes() {
1913
- $contact_types = array(
1914
- "customer service",
1915
- "customer support",
1916
- "technical support",
1917
- "billing support",
1918
- "bill payment",
1919
- "sales",
1920
- "reservations",
1921
- "credit card support",
1922
- "emergency",
1923
- "baggage tracking",
1924
- "roadside assistance",
1925
- "package tracking"
1926
- );
1927
-
1928
- return apply_filters('kcseo_contact_types', $contact_types);
1929
- }
1930
-
1931
- static function getLanguageList() {
1932
- $language_list = array(
1933
- "Akan",
1934
- "Amharic",
1935
- "Arabic",
1936
- "Assamese",
1937
- "Awadhi",
1938
- "Azerbaijani",
1939
- "Balochi",
1940
- "Belarusian",
1941
- "Bengali",
1942
- "Bhojpuri",
1943
- "Burmese",
1944
- "Cantonese",
1945
- "Cebuano",
1946
- "Chewa",
1947
- "Chhattisgarhi",
1948
- "Chittagonian",
1949
- "Czech",
1950
- "Deccan",
1951
- "Dhundhari",
1952
- "Dutch",
1953
- "English",
1954
- "French",
1955
- "Fula",
1956
- "Gan",
1957
- "German",
1958
- "Greek",
1959
- "Gujarati",
1960
- "Haitian Creole",
1961
- "Hakka",
1962
- "Haryanvi",
1963
- "Hausa",
1964
- "Hiligaynon",
1965
- "Hindi / Urdu",
1966
- "Hmong",
1967
- "Hungarian",
1968
- "Igbo",
1969
- "Ilokano",
1970
- "Italian",
1971
- "Japanese",
1972
- "Javanese",
1973
- "Jin",
1974
- "Kannada",
1975
- "Kazakh",
1976
- "Khmer",
1977
- "Kinyarwanda",
1978
- "Kirundi",
1979
- "Konkani",
1980
- "Korean",
1981
- "Kurdish",
1982
- "Madurese",
1983
- "Magahi",
1984
- "Maithili",
1985
- "Malagasy",
1986
- "Malay/Indonesian",
1987
- "Malayalam",
1988
- "Mandarin",
1989
- "Marathi",
1990
- "Marwari",
1991
- "Min Bei",
1992
- "Min Dong",
1993
- "Min Nan",
1994
- "Mossi",
1995
- "Nepali",
1996
- "Oriya",
1997
- "Oromo",
1998
- "Pashto",
1999
- "Persian",
2000
- "Polish",
2001
- "Portuguese",
2002
- "Punjabi",
2003
- "Quechua",
2004
- "Romanian",
2005
- "Russian",
2006
- "Saraiki",
2007
- "Serbo-Croatian",
2008
- "Shona",
2009
- "Sindhi",
2010
- "Sinhalese",
2011
- "Somali",
2012
- "Spanish",
2013
- "Sundanese",
2014
- "Swahili",
2015
- "Swedish",
2016
- "Sylheti",
2017
- "Tagalog",
2018
- "Tamil",
2019
- "Telugu",
2020
- "Thai",
2021
- "Turkish",
2022
- "Ukrainian",
2023
- "Uyghur",
2024
- "Uzbek",
2025
- "Vietnamese",
2026
- "Wu",
2027
- "Xhosa",
2028
- "Xiang",
2029
- "Yoruba",
2030
- "Zulu",
2031
- );
2032
-
2033
- return apply_filters('kcseo_language_list', $language_list);
2034
- }
2035
-
2036
- static function getSocialList() {
2037
- $socialList = array(
2038
- 'facebook' => __('Facebook'),
2039
- 'twitter' => __('Twitter'),
2040
- 'google-plus' => __('Google+'),
2041
- 'instagram' => __('Instagram'),
2042
- 'youtube' => __('Youtube'),
2043
- 'linkedin' => __('LinkedIn'),
2044
- 'myspace' => __('Myspace'),
2045
- 'pinterest' => __('Pinterest'),
2046
- 'soundcloud' => __('SoundCloud'),
2047
- 'tumblr' => __('Tumblr'),
2048
- 'wikidata' => __('Wikidata'),
2049
- );
2050
-
2051
- return apply_filters('kcseo_social_list', $socialList);
2052
- }
2053
-
2054
-
2055
- static function announcementLocationTypes() {
2056
- return apply_filters('kcseo_announcement_location_types', [
2057
- 'Airport',
2058
- 'Aquarium',
2059
- 'Beach',
2060
- 'Bridge',
2061
- 'BuddhistTemple',
2062
- 'BusStation',
2063
- 'BusStop',
2064
- 'Campground',
2065
- 'CatholicChurch',
2066
- 'Cemetery',
2067
- 'Church',
2068
- 'CivicStructure',
2069
- 'CityHall',
2070
- 'CollegeOrUniversity',
2071
- 'Courthouse',
2072
- 'CovidTestingFacility',
2073
- 'Crematorium',
2074
- 'DefenceEstablishment',
2075
- 'EducationalOrganization',
2076
- 'ElementarySchool',
2077
- 'Embassy',
2078
- 'EventVenue',
2079
- 'FireStation',
2080
- 'GovernmentBuilding',
2081
- 'HighSchool',
2082
- 'HinduTemple',
2083
- 'Hospital',
2084
- 'LegislativeBuilding',
2085
- 'MiddleSchool',
2086
- 'Mosque',
2087
- 'MovieTheater',
2088
- 'Museum',
2089
- 'MusicVenue',
2090
- 'Park',
2091
- 'ParkingFacility',
2092
- 'PerformingArtsTheater',
2093
- 'PlaceOfWorship',
2094
- 'Playground',
2095
- 'PoliceStation',
2096
- 'Preschool',
2097
- 'RVPark',
2098
- 'School',
2099
- 'StadiumOrArena',
2100
- 'SubwayStation',
2101
- 'Synagogue',
2102
- 'TaxiStand',
2103
- 'TrainStation',
2104
- 'Zoo',
2105
- ]);
2106
- }
2107
-
2108
- static function getReviewNotice() {
2109
- $html = null;
2110
- $html = '<span>As of September, Google made a major change to review snippet schema and structure data markup. Google no longer support "self-serving" independent markup tied to the general types and has narrow support to specific types.</span><br><br>
2111
- <span>You can read more about Google\'s change here:<br><a target="_blank" href="https://webmasters.googleblog.com/2019/09/making-review-rich-results-more-helpful.html">https://webmasters.googleblog.com/2019/09/making-review-rich-results-more-helpful.html</a></span><br><br>
2112
- <span style="font-weight: bold">If you are a user of our plugin prior to September 2019, you need to remove the review schema for this tab on all pages and post where you\'ve it for reviews and add back to the supported types (such as: book, course, event, movie, product, recipe, etc):</span><br><br>
2113
- <span style="display: block;margin: 0 auto;max-width: 800px;">1. Simple uncheck the "enable" tab in this section<br>
2114
- 2. Update the page or post to remove the review schema.<br>
2115
- 3. Then re-add new review schema within the appropriet type tab(i.e. book, course, event, movie, product, recipe, etc)</span>
2116
- <br>To review Google\'s documentation on <a target="_blank" href="https://developers.google.com/search/docs/data-types/review-snippet">https://developers.google.com/search/docs/data-types/review-snippet</a>';
2117
-
2118
- return $html;
2119
- }
2120
-
2121
  }
1
+ <?php
2
+
3
+ class KcSeoOptions
4
+ {
5
+
6
+ static function getSchemaTypes() {
7
+ $schemas = array(
8
+ 'article' => array(
9
+ 'pro' => false,
10
+ 'title' => __("Article", "wp-seo-structured-data-schema"),
11
+ 'fields' => array(
12
+ 'active' => array(
13
+ 'type' => 'checkbox'
14
+ ),
15
+ 'headline' => array(
16
+ 'title' => __('Headline', "wp-seo-structured-data-schema"),
17
+ 'type' => 'text',
18
+ 'desc' => __('Article title', "wp-seo-structured-data-schema"),
19
+ 'required' => true
20
+ ),
21
+ 'mainEntityOfPage' => array(
22
+ 'title' => __('Page URL', "wp-seo-structured-data-schema"),
23
+ 'type' => 'url',
24
+ 'desc' => __('The canonical URL of the article page', "wp-seo-structured-data-schema"),
25
+ 'required' => true
26
+ ),
27
+ 'author' => array(
28
+ 'title' => __('Author Name', "wp-seo-structured-data-schema"),
29
+ 'type' => 'text',
30
+ 'desc' => __('Author display name', "wp-seo-structured-data-schema"),
31
+ 'required' => true
32
+ ),
33
+ 'author_url' => array(
34
+ 'title' => __('Author URL', "wp-seo-structured-data-schema"),
35
+ 'type' => 'url',
36
+ 'required' => true
37
+ ),
38
+ 'image' => array(
39
+ 'title' => __('Article Feature Image', "wp-seo-structured-data-schema"),
40
+ 'type' => 'image',
41
+ 'required' => true,
42
+ 'desc' => __('Images should be at least 696 pixels wide.<br>Images should be in .jpg, .png, or. gif format.', "wp-seo-structured-data-schema")
43
+ ),
44
+ 'datePublished' => array(
45
+ 'title' => __('Published date', "wp-seo-structured-data-schema"),
46
+ 'type' => 'text',
47
+ 'class' => 'kcseo-date',
48
+ 'required' => true,
49
+ 'desc' => __('Like this: 2021-12-25 14:20:00', "wp-seo-structured-data-schema")
50
+ ),
51
+ 'dateModified' => array(
52
+ 'title' => __('Modified date', "wp-seo-structured-data-schema"),
53
+ 'type' => 'text',
54
+ 'class' => 'kcseo-date',
55
+ 'required' => true,
56
+ 'desc' => __('Like this: 2021-12-25 14:20:00', "wp-seo-structured-data-schema")
57
+ ),
58
+ 'publisher' => array(
59
+ 'title' => __('Publisher', "wp-seo-structured-data-schema"),
60
+ 'type' => 'text',
61
+ 'desc' => __('Publisher name or Organization name', "wp-seo-structured-data-schema"),
62
+ 'required' => true
63
+ ),
64
+ 'publisherImage' => array(
65
+ 'title' => __('Publisher Logo', "wp-seo-structured-data-schema"),
66
+ 'type' => 'image',
67
+ '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"),
68
+ 'required' => true
69
+ ),
70
+ 'description' => array(
71
+ 'title' => __('Description', "wp-seo-structured-data-schema"),
72
+ 'type' => 'textarea',
73
+ 'desc' => __('Short description. New line is not supported.', "wp-seo-structured-data-schema")
74
+ ),
75
+ 'articleBody' => array(
76
+ 'title' => __('Article body', "wp-seo-structured-data-schema"),
77
+ 'type' => 'textarea',
78
+ 'desc' => __('Article content', "wp-seo-structured-data-schema")
79
+ ),
80
+ 'alternativeHeadline' => array(
81
+ 'title' => __('Alternative headline', "wp-seo-structured-data-schema"),
82
+ 'type' => 'text',
83
+ 'desc' => __('A secondary headline for the article.', "wp-seo-structured-data-schema")
84
+ ),
85
+ 'video' => [
86
+ 'title' => __('Video', "wp-seo-structured-data-schema"),
87
+ 'type' => 'group',
88
+ 'fields' => [
89
+ 'video_heading' => [
90
+ 'type' => 'heading',
91
+ 'title' => __('Video', "wp-seo-structured-data-schema")
92
+ ],
93
+ 'name' => array(
94
+ 'type' => 'text',
95
+ 'title' => esc_html__('Name', "wp-seo-structured-data-schema"),
96
+ ),
97
+ 'description' => array(
98
+ 'type' => 'textarea',
99
+ 'title' => esc_html__('Description', "wp-seo-structured-data-schema")
100
+ ),
101
+ 'thumbnailUrl' => array(
102
+ 'type' => 'image',
103
+ 'title' => esc_html__('Image', "wp-seo-structured-data-schema")
104
+ ),
105
+ 'contentUrl' => array(
106
+ 'type' => 'url',
107
+ 'title' => esc_html__('Content URL', "wp-seo-structured-data-schema")
108
+ ),
109
+ 'embedUrl' => array(
110
+ 'type' => 'url',
111
+ 'title' => esc_html__('Embed URL', "wp-seo-structured-data-schema"),
112
+ 'desc' => esc_html__("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')
113
+ ),
114
+ 'uploadDate' => array(
115
+ 'type' => 'text',
116
+ 'title' => esc_html__('Upload date', "wp-seo-structured-data-schema"),
117
+ 'class' => 'rtrs-date',
118
+ 'required' => true,
119
+ 'desc' => esc_html__('Like this: 2021-08-25 14:20:00', "wp-seo-structured-data-schema")
120
+ ),
121
+ 'duration' => array(
122
+ 'type' => 'text',
123
+ 'title' => esc_html__('Duration', "wp-seo-structured-data-schema"),
124
+ 'desc' => esc_html__('Runtime of the movie in ISO 8601 format (for example, "PT2H22M" (142 minutes)).', "wp-seo-structured-data-schema")
125
+ ),
126
+ ]
127
+ ],
128
+ 'audio' => [
129
+ 'title' => __('Audio', "wp-seo-structured-data-schema"),
130
+ 'type' => 'group',
131
+ 'fields' => [
132
+ 'audio_heading' => [
133
+ 'type' => 'heading',
134
+ 'title' => __('Audio', "wp-seo-structured-data-schema")
135
+ ],
136
+ 'name' => array(
137
+ 'type' => 'text',
138
+ 'title' => esc_html__('Name', 'wp-seo-structured-data-schema'),
139
+ 'desc' => esc_html__("The title of the audio", 'wp-seo-structured-data-schema')
140
+ ),
141
+ 'description' => array(
142
+ 'type' => 'textarea',
143
+ 'title' => esc_html__('Description', 'wp-seo-structured-data-schema'),
144
+ 'desc' => esc_html__("The short description of the audio", 'wp-seo-structured-data-schema')
145
+ ),
146
+ 'duration' => array(
147
+ 'type' => 'text',
148
+ 'title' => esc_html__('Duration', 'wp-seo-structured-data-schema'),
149
+ 'desc' => esc_html__("The duration of the audio in ISO 8601 format.(PT1M33S)", 'wp-seo-structured-data-schema')
150
+ ),
151
+ 'contentUrl' => array(
152
+ 'type' => 'url',
153
+ 'title' => esc_html__('Content URL', 'wp-seo-structured-data-schema'),
154
+ 'placeholder' => esc_html__('URL', 'wp-seo-structured-data-schema'),
155
+ 'desc' => esc_html__("A URL pointing to the actual audio media file. This file should be in .mp3, .wav, .mpc or other audio file format.", 'wp-seo-structured-data-schema')
156
+ ),
157
+ 'encodingFormat' => array(
158
+ 'type' => 'text',
159
+ 'title' => esc_html__('Encoding Format', 'wp-seo-structured-data-schema'),
160
+ 'desc' => esc_html__("The encoding format of audio like: 'audio/mpeg'", 'wp-seo-structured-data-schema')
161
+ ),
162
+ ]
163
+ ],
164
+ )
165
+ ),
166
+ 'blog_posting' => array(
167
+ 'pro' => false,
168
+ 'title' => __('Blog Posting', "wp-seo-structured-data-schema"),
169
+ 'fields' => array(
170
+ 'active' => array(
171
+ 'type' => 'checkbox'
172
+ ),
173
+ 'headline' => array(
174
+ 'title' => __('Headline', "wp-seo-structured-data-schema"),
175
+ 'type' => 'text',
176
+ 'desc' => __('Blog posting title', "wp-seo-structured-data-schema"),
177
+ 'required' => true
178
+ ),
179
+ 'mainEntityOfPage' => array(
180
+ 'title' => __('Page URL', "wp-seo-structured-data-schema"),
181
+ 'type' => 'url',
182
+ 'desc' => __('The canonical URL of the article page', "wp-seo-structured-data-schema"),
183
+ 'required' => true
184
+ ),
185
+ 'author' => array(
186
+ 'title' => __('Author name', "wp-seo-structured-data-schema"),
187
+ 'type' => 'text',
188
+ 'desc' => __('Author display name', "wp-seo-structured-data-schema"),
189
+ 'required' => true
190
+ ),
191
+ 'author_url' => array(
192
+ 'title' => __('Author URL', "wp-seo-structured-data-schema"),
193
+ 'type' => 'url',
194
+ 'required' => true
195
+ ),
196
+ 'image' => array(
197
+ 'title' => __('Feature Image', "wp-seo-structured-data-schema"),
198
+ 'type' => 'image',
199
+ '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"),
200
+ 'required' => true
201
+ ),
202
+ 'datePublished' => array(
203
+ 'title' => __('Published date', "wp-seo-structured-data-schema"),
204
+ 'type' => 'text',
205
+ 'class' => 'kcseo-date',
206
+ 'desc' => __('Like this: 2021-12-25 14:20:00', "wp-seo-structured-data-schema"),
207
+ 'required' => true
208
+ ),
209
+ 'dateModified' => array(
210
+ 'title' => __('Modified date', "wp-seo-structured-data-schema"),
211
+ 'type' => 'text',
212
+ 'class' => 'kcseo-date',
213
+ 'desc' => __('Like this: 2021-12-25 14:20:00', "wp-seo-structured-data-schema"),
214
+ 'required' => true
215
+ ),
216
+ 'publisher' => array(
217
+ 'title' => __('Publisher', "wp-seo-structured-data-schema"),
218
+ 'type' => 'text',
219
+ 'desc' => __('Publisher name or Organization name', "wp-seo-structured-data-schema"),
220
+ 'required' => true
221
+ ),
222
+ 'publisherImage' => array(
223
+ 'title' => __('Publisher Logo', "wp-seo-structured-data-schema"),
224
+ 'type' => 'image',
225
+ '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"),
226
+ 'required' => true
227
+ ),
228
+ 'description' => array(
229
+ 'title' => __('Description', "wp-seo-structured-data-schema"),
230
+ 'type' => 'textarea',
231
+ 'desc' => __('Short description. New line is not supported.', "wp-seo-structured-data-schema")
232
+ ),
233
+ 'articleBody' => array(
234
+ 'title' => __('Article body', "wp-seo-structured-data-schema"),
235
+ 'type' => 'textarea',
236
+ 'desc' => __('Article content', "wp-seo-structured-data-schema")
237
+ ),
238
+ 'video' => [
239
+ 'title' => __('Video', "wp-seo-structured-data-schema"),
240
+ 'type' => 'group',
241
+ 'fields' => [
242
+ 'video_heading' => [
243
+ 'type' => 'heading',
244
+ 'title' => __('Video', "wp-seo-structured-data-schema")
245
+ ],
246
+ 'name' => array(
247
+ 'type' => 'text',
248
+ 'title' => esc_html__('Name', "wp-seo-structured-data-schema"),
249
+ ),
250
+ 'description' => array(
251
+ 'type' => 'textarea',
252
+ 'title' => esc_html__('Description', "wp-seo-structured-data-schema")
253
+ ),
254
+ 'thumbnailUrl' => array(
255
+ 'type' => 'image',
256
+ 'title' => esc_html__('Image', "wp-seo-structured-data-schema")
257
+ ),
258
+ 'contentUrl' => array(
259
+ 'type' => 'url',
260
+ 'title' => esc_html__('Content URL', "wp-seo-structured-data-schema")
261
+ ),
262
+ 'embedUrl' => array(
263
+ 'type' => 'url',
264
+ 'title' => esc_html__('Embed URL', "wp-seo-structured-data-schema"),
265
+ 'desc' => esc_html__("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')
266
+ ),
267
+ 'uploadDate' => array(
268
+ 'type' => 'text',
269
+ 'title' => esc_html__('Upload date', "wp-seo-structured-data-schema"),
270
+ 'class' => 'rtrs-date',
271
+ 'required' => true,
272
+ 'desc' => esc_html__('Like this: 2021-08-25 14:20:00', "wp-seo-structured-data-schema")
273
+ ),
274
+ 'duration' => array(
275
+ 'type' => 'text',
276
+ 'title' => esc_html__('Duration', "wp-seo-structured-data-schema"),
277
+ 'desc' => esc_html__('Runtime of the movie in ISO 8601 format (for example, "PT2H22M" (142 minutes)).', "wp-seo-structured-data-schema")
278
+ ),
279
+ ]
280
+ ],
281
+ 'audio' => [
282
+ 'title' => __('Audio', "wp-seo-structured-data-schema"),
283
+ 'type' => 'group',
284
+ 'fields' => [
285
+ 'audio_heading' => [
286
+ 'type' => 'heading',
287
+ 'title' => __('Audio', "wp-seo-structured-data-schema")
288
+ ],
289
+ 'name' => array(
290
+ 'type' => 'text',
291
+ 'title' => esc_html__('Name', 'wp-seo-structured-data-schema'),
292
+ 'desc' => esc_html__("The title of the audio", 'wp-seo-structured-data-schema')
293
+ ),
294
+ 'description' => array(
295
+ 'type' => 'textarea',
296
+ 'title' => esc_html__('Description', 'wp-seo-structured-data-schema'),
297
+ 'desc' => esc_html__("The short description of the audio", 'wp-seo-structured-data-schema')
298
+ ),
299
+ 'duration' => array(
300
+ 'type' => 'text',
301
+ 'title' => esc_html__('Duration', 'wp-seo-structured-data-schema'),
302
+ 'desc' => esc_html__("The duration of the audio in ISO 8601 format.(PT1M33S)", 'wp-seo-structured-data-schema')
303
+ ),
304
+ 'contentUrl' => array(
305
+ 'type' => 'url',
306
+ 'title' => esc_html__('Content URL', 'wp-seo-structured-data-schema'),
307
+ 'placeholder' => esc_html__('URL', 'wp-seo-structured-data-schema'),
308
+ 'desc' => esc_html__("A URL pointing to the actual audio media file. This file should be in .mp3, .wav, .mpc or other audio file format.", 'wp-seo-structured-data-schema')
309
+ ),
310
+ 'encodingFormat' => array(
311
+ 'type' => 'text',
312
+ 'title' => esc_html__('Encoding Format', 'wp-seo-structured-data-schema'),
313
+ 'desc' => esc_html__("The encoding format of audio like: 'audio/mpeg'", 'wp-seo-structured-data-schema')
314
+ ),
315
+ ]
316
+ ],
317
+ )
318
+ ),
319
+ 'news_article' => array(
320
+ 'pro' => false,
321
+ 'title' => __('News Article', "wp-seo-structured-data-schema"),
322
+ 'fields' => array(
323
+ 'active' => array(
324
+ 'type' => 'checkbox'
325
+ ),
326
+ 'headline' => array(
327
+ 'title' => __('Headline', "wp-seo-structured-data-schema"),
328
+ 'type' => 'text',
329
+ 'desc' => __('Article title', "wp-seo-structured-data-schema"),
330
+ 'required' => true
331
+ ),
332
+ 'mainEntityOfPage' => array(
333
+ 'title' => __('Page URL', "wp-seo-structured-data-schema"),
334
+ 'type' => 'url',
335
+ 'desc' => __('The canonical URL of the article page', "wp-seo-structured-data-schema"),
336
+ 'required' => true
337
+ ),
338
+ 'author' => array(
339
+ 'title' => __('Author', "wp-seo-structured-data-schema"),
340
+ 'type' => 'text',
341
+ 'desc' => __('Author display name', "wp-seo-structured-data-schema"),
342
+ 'required' => true
343
+ ),
344
+ 'author_url' => array(
345
+ 'title' => __('Author URL', "wp-seo-structured-data-schema"),
346
+ 'type' => 'url',
347
+ 'required' => true
348
+ ),
349
+ 'image' => array(
350
+ 'title' => __('Image', "wp-seo-structured-data-schema"),
351
+ 'type' => 'image',
352
+ '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"),
353
+ 'required' => true
354
+ ),
355
+ 'datePublished' => array(
356
+ 'title' => __('Published date', "wp-seo-structured-data-schema"),
357
+ 'type' => 'text',
358
+ 'class' => 'kcseo-date',
359
+ 'desc' => __('Like this: 2021-12-25 14:20:00', "wp-seo-structured-data-schema"),
360
+ 'required' => true
361
+ ),
362
+ 'dateModified' => array(
363
+ 'title' => __('Modified date', "wp-seo-structured-data-schema"),
364
+ 'type' => 'text',
365
+ 'class' => 'kcseo-date',
366
+ 'required' => true,
367
+ 'desc' => __('Like this: 2021-12-25 14:20:00', "wp-seo-structured-data-schema")
368
+ ),
369
+ 'publisher' => array(
370
+ 'title' => __('Publisher', "wp-seo-structured-data-schema"),
371
+ 'type' => 'text',
372
+ 'desc' => __('Publisher name or Organization name', "wp-seo-structured-data-schema"),
373
+ 'required' => true
374
+ ),
375
+ 'publisherImage' => array(
376
+ 'title' => __('Publisher Logo', "wp-seo-structured-data-schema"),
377
+ 'type' => 'image',
378
+ '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"),
379
+ 'required' => true
380
+ ),
381
+ 'description' => array(
382
+ 'title' => __('Description', "wp-seo-structured-data-schema"),
383
+ 'type' => 'textarea',
384
+ 'desc' => __('Short description. New line is not supported.', "wp-seo-structured-data-schema")
385
+ ),
386
+ 'articleBody' => array(
387
+ 'title' => __('Article body', "wp-seo-structured-data-schema"),
388
+ 'type' => 'textarea',
389
+ 'desc' => __('Article body content. New line is not supported.', "wp-seo-structured-data-schema")
390
+ ),
391
+ 'video' => [
392
+ 'title' => __('Video', "wp-seo-structured-data-schema"),
393
+ 'type' => 'group',
394
+ 'fields' => [
395
+ 'video_heading' => [
396
+ 'type' => 'heading',
397
+ 'title' => __('Video', "wp-seo-structured-data-schema")
398
+ ],
399
+ 'name' => array(
400
+ 'type' => 'text',
401
+ 'title' => esc_html__('Name', "wp-seo-structured-data-schema"),
402
+ ),
403
+ 'description' => array(
404
+ 'type' => 'textarea',
405
+ 'title' => esc_html__('Description', "wp-seo-structured-data-schema")
406
+ ),
407
+ 'thumbnailUrl' => array(
408
+ 'type' => 'image',
409
+ 'title' => esc_html__('Image', "wp-seo-structured-data-schema")
410
+ ),
411
+ 'contentUrl' => array(
412
+ 'type' => 'url',
413
+ 'title' => esc_html__('Content URL', "wp-seo-structured-data-schema")
414
+ ),
415
+ 'embedUrl' => array(
416
+ 'type' => 'url',
417
+ 'title' => esc_html__('Embed URL', "wp-seo-structured-data-schema"),
418
+ 'desc' => esc_html__("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')
419
+ ),
420
+ 'uploadDate' => array(
421
+ 'type' => 'text',
422
+ 'title' => esc_html__('Upload date', "wp-seo-structured-data-schema"),
423
+ 'class' => 'rtrs-date',
424
+ 'required' => true,
425
+ 'desc' => esc_html__('Like this: 2021-08-25 14:20:00', "wp-seo-structured-data-schema")
426
+ ),
427
+ 'duration' => array(
428
+ 'type' => 'text',
429
+ 'title' => esc_html__('Duration', "wp-seo-structured-data-schema"),
430
+ 'desc' => esc_html__('Runtime of the movie in ISO 8601 format (for example, "PT2H22M" (142 minutes)).', "wp-seo-structured-data-schema")
431
+ ),
432
+ ]
433
+ ],
434
+ 'audio' => [
435
+ 'title' => __('Audio', "wp-seo-structured-data-schema"),
436
+ 'type' => 'group',
437
+ 'fields' => [
438
+ 'audio_heading' => [
439
+ 'type' => 'heading',
440
+ 'title' => __('Audio', "wp-seo-structured-data-schema")
441
+ ],
442
+ 'name' => array(
443
+ 'type' => 'text',
444
+ 'title' => esc_html__('Name', 'wp-seo-structured-data-schema'),
445
+ 'desc' => esc_html__("The title of the audio", 'wp-seo-structured-data-schema')
446
+ ),
447
+ 'description' => array(
448
+ 'type' => 'textarea',
449
+ 'title' => esc_html__('Description', 'wp-seo-structured-data-schema'),
450
+ 'desc' => esc_html__("The short description of the audio", 'wp-seo-structured-data-schema')
451
+ ),
452
+ 'duration' => array(
453
+ 'type' => 'text',
454
+ 'title' => esc_html__('Duration', 'wp-seo-structured-data-schema'),
455
+ 'desc' => esc_html__("The duration of the audio in ISO 8601 format.(PT1M33S)", 'wp-seo-structured-data-schema')
456
+ ),
457
+ 'contentUrl' => array(
458
+ 'type' => 'url',
459
+ 'title' => esc_html__('Content URL', 'wp-seo-structured-data-schema'),
460
+ 'placeholder' => esc_html__('URL', 'wp-seo-structured-data-schema'),
461
+ 'desc' => esc_html__("A URL pointing to the actual audio media file. This file should be in .mp3, .wav, .mpc or other audio file format.", 'wp-seo-structured-data-schema')
462
+ ),
463
+ 'encodingFormat' => array(
464
+ 'type' => 'text',
465
+ 'title' => esc_html__('Encoding Format', 'wp-seo-structured-data-schema'),
466
+ 'desc' => esc_html__("The encoding format of audio like: 'audio/mpeg'", 'wp-seo-structured-data-schema')
467
+ ),
468
+ ]
469
+ ],
470
+ )
471
+ ),
472
+ 'event' => array(
473
+ 'pro' => false,
474
+ 'title' => __('Event', "wp-seo-structured-data-schema"),
475
+ 'fields' => array(
476
+ 'active' => array(
477
+ 'type' => 'checkbox'
478
+ ),
479
+ 'name' => array(
480
+ 'title' => __('Name', "wp-seo-structured-data-schema"),
481
+ 'type' => 'text',
482
+ 'required' => true,
483
+ 'desc' => __("The name of the event.", "wp-seo-structured-data-schema")
484
+ ),
485
+ 'locationName' => array(
486
+ 'title' => __('Location name', "wp-seo-structured-data-schema"),
487
+ 'type' => 'text',
488
+ 'required' => true,
489
+ 'desc' => __("Event Location name", "wp-seo-structured-data-schema")
490
+ ),
491
+ 'locationAddress' => array(
492
+ 'title' => __('Location address', "wp-seo-structured-data-schema"),
493
+ 'type' => 'text',
494
+ 'required' => true,
495
+ '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")
496
+ ),
497
+ 'startDate' => array(
498
+ 'title' => __('Start date', "wp-seo-structured-data-schema"),
499
+ 'type' => 'text',
500
+ 'class' => 'kcseo-date',
501
+ 'required' => true,
502
+ 'desc' => __("Event start date Like : 2017-10-16 4:00 AM", "wp-seo-structured-data-schema")
503
+ ),
504
+ 'endDate' => array(
505
+ 'title' => __('End date', "wp-seo-structured-data-schema"),
506
+ 'type' => 'text',
507
+ 'recommended' => true,
508
+ 'class' => 'kcseo-date',
509
+ 'desc' => __("Event end date Like : 2017-10-16 4:00 AM", "wp-seo-structured-data-schema")
510
+ ),
511
+ 'description' => array(
512
+ 'title' => __('Description', "wp-seo-structured-data-schema"),
513
+ 'type' => 'textarea',
514
+ 'recommended' => true,
515
+ 'desc' => __("Event description. New line is not supported.", "wp-seo-structured-data-schema")
516
+ ),
517
+ 'performerName' => array(
518
+ 'title' => __('Performer Name', "wp-seo-structured-data-schema"),
519
+ 'type' => 'text',
520
+ 'recommended' => true,
521
+ 'desc' => __("The performer's name.", "wp-seo-structured-data-schema")
522
+ ),
523
+ 'image' => array(
524
+ 'title' => __('Image URL', "wp-seo-structured-data-schema"),
525
+ 'type' => 'url',
526
+ 'recommended' => true,
527
+ 'desc' => __("URL of an image or logo for the event or tour", "wp-seo-structured-data-schema")
528
+ ),
529
+ 'price' => array(
530
+ 'title' => __('Price', "wp-seo-structured-data-schema"),
531
+ 'type' => 'number',
532
+ 'recommended' => true,
533
+ 'attr' => 'step="any"',
534
+ '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")
535
+ ),
536
+ 'priceCurrency' => array(
537
+ 'title' => __('Price currency', "wp-seo-structured-data-schema"),
538
+ 'type' => 'text',
539
+ 'desc' => __("The 3-letter currency code. (USD)", "wp-seo-structured-data-schema")
540
+ ),
541
+ 'availability' => array(
542
+ 'title' => 'Availability',
543
+ 'type' => 'select',
544
+ 'recommended' => true,
545
+ 'empty' => "Select one",
546
+ 'options' => array(
547
+ 'http://schema.org/InStock' => 'InStock',
548
+ 'http://schema.org/SoldOut' => 'SoldOut',
549
+ 'http://schema.org/PreOrder' => 'PreOrder',
550
+ ),
551
+ ),
552
+ 'validFrom' => array(
553
+ 'title' => __('Valid From', "wp-seo-structured-data-schema"),
554
+ 'type' => 'text',
555
+ 'recommended' => true,
556
+ 'class' => 'kcseo-date',
557
+ 'desc' => __(sprintf("The date and time when tickets go on sale (only required on date-restricted offers), in <a href='%s' target='_blank'>ISO-8601 format</a>", 'https://en.wikipedia.org/wiki/ISO_8601'), "wp-seo-structured-data-schema")
558
+ ),
559
+ 'url' => array(
560
+ 'title' => 'URL',
561
+ 'recommended' => true,
562
+ 'type' => 'url',
563
+ 'placeholder' => 'URL',
564
+ 'desc' => __("A link to the event's details page. <span class='required'>Not required but (Recommended)</span>", "wp-seo-structured-data-schema")
565
+ ),
566
+ 'review_section' => array(
567
+ 'title' => __('Review', "wp-seo-structured-data-schema"),
568
+ 'type' => 'heading',
569
+ 'desc' => __("To add review schema for this type, complete fields below and enable, others live blank.", "wp-seo-structured-data-schema")
570
+ ),
571
+ 'review_active' => array(
572
+ 'type' => 'checkbox'
573
+ ),
574
+ 'review_author' => array(
575
+ 'title' => __("Author", "wp-seo-structured-data-schema"),
576
+ 'type' => 'text',
577
+ 'required' => true
578
+ ),
579
+ 'review_author_sameAs' => array(
580
+ 'title' => __("Author Same As profile link", "wp-seo-structured-data-schema"),
581
+ 'type' => 'textarea',
582
+ 'attr' => 'placeholder="https://facebook.com/example&#10;https://twitter.com/example"',
583
+ 'required' => true,
584
+ 'desc' => __('A reference page that unambiguously indicates the item\'s identity; for example, the URL of the item\'s Wikipedia page, Freebase page, or official website.<br> Enter new line for every entry', "wp-seo-structured-data-schema")
585
+ ),
586
+ 'review_body' => array(
587
+ 'title' => __('Review body', "wp-seo-structured-data-schema"),
588
+ 'type' => 'textarea',
589
+ 'required' => true,
590
+ 'desc' => __("The actual body of the review.", "wp-seo-structured-data-schema")
591
+ ),
592
+ 'review_datePublished' => array(
593
+ 'title' => __('Date of Published', "wp-seo-structured-data-schema"),
594
+ 'type' => 'text',
595
+ 'class' => 'kcseo-date',
596
+ 'desc' => __("Like this: 2021-12-25 14:20:00", "wp-seo-structured-data-schema")
597
+ ),
598
+ 'review_ratingValue' => array(
599
+ 'title' => __('Rating value', "wp-seo-structured-data-schema"),
600
+ 'type' => 'number',
601
+ 'attr' => 'step="any"',
602
+ 'desc' => __("A numerical quality rating for the item.", "wp-seo-structured-data-schema")
603
+ ),
604
+ 'review_bestRating' => array(
605
+ 'title' => __('Best rating', "wp-seo-structured-data-schema"),
606
+ 'type' => 'number',
607
+ 'attr' => 'step="any"',
608
+ 'desc' => __("The highest value allowed in this rating system.", "wp-seo-structured-data-schema")
609
+ ),
610
+ 'review_worstRating' => array(
611
+ 'title' => __('Worst rating', "wp-seo-structured-data-schema"),
612
+ 'type' => 'number',
613
+ 'attr' => 'step="any"',
614
+ '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")
615
+ )
616
+ )
617
+ ),
618
+ 'product' => array(
619
+ 'pro' => false,
620
+ 'title' => __('Product', "wp-seo-structured-data-schema"),
621
+ 'fields' => array(
622
+ 'active' => array(
623
+ 'type' => 'checkbox'
624
+ ),
625
+ 'name' => array(
626
+ 'title' => __('Name', "wp-seo-structured-data-schema"),
627
+ 'type' => 'text',
628
+ 'required' => true,
629
+ 'desc' => __("The name of the product.", "wp-seo-structured-data-schema")
630
+ ),
631
+ 'image' => array(
632
+ 'title' => __('Image', "wp-seo-structured-data-schema"),
633
+ 'type' => 'image',
634
+ '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")
635
+ ),
636
+ 'description' => array(
637
+ 'title' => __('Description', "wp-seo-structured-data-schema"),
638
+ 'type' => 'textarea',
639
+ 'desc' => __("Product description. New line is not supported.", "wp-seo-structured-data-schema")
640
+ ),
641
+ 'sku' => array(
642
+ 'title' => __('SKU', "wp-seo-structured-data-schema"),
643
+ 'type' => 'text',
644
+ 'recommended' => true
645
+ ),
646
+ 'brand' => array(
647
+ 'title' => __('Brand', "wp-seo-structured-data-schema"),
648
+ 'type' => 'text',
649
+ 'recommended' => true,
650
+ 'desc' => __("The brand of the product.", "wp-seo-structured-data-schema")
651
+ ),
652
+ 'identifier_type' => array(
653
+ 'title' => __('Identifier Type', "wp-seo-structured-data-schema"),
654
+ 'type' => 'select',
655
+ 'recommended' => true,
656
+ 'options' => array(
657
+ 'mpn' => 'MPN',
658
+ 'isbn' => 'ISBN',
659
+ 'gtin8' => 'GTIN-8 (UPC, JAN)',
660
+ 'gtin12' => 'GTIN-12 (UPC)',
661
+ 'gtin13' => 'GTIN-13 (EAN,JAN)'
662
+ ),
663
+ 'desc' => __("<strong>MPN</strong><br>
664
+ &#8594; MPN(Manufacturer Part Number) Used globally, Alphanumeric digits (various lengths)<br>
665
+ <strong>GTIN</strong><br>
666
+ &#8594; UPC(Universal Product Code) Used in primarily North America. 12 numeric digits. eg. 892685001003.<br>
667
+ &#8594; EAN(European Article Number) Used primarily outside of North America. Typically 13 numeric digits (can occasionally be either eight or 14 numeric digits). eg. 4011200296908<br>
668
+ &#8594; ISBN(International Standard Book Number) Used globally, ISBN-13 (recommended), 13 numeric digits 978-0747595823<br>
669
+ &#8594; JAN(Japanese Article Number) Used only in Japan, 8 or 13 numeric digits.", "wp-seo-structured-data-schema")
670
+ ),
671
+ 'identifier' => array(
672
+ 'title' => __('Identifier', "wp-seo-structured-data-schema"),
673
+ 'type' => 'text',
674
+ 'recommended' => true,
675
+ 'desc' => __("Enter product unique identifier", "wp-seo-structured-data-schema")
676
+ ),
677
+ 'rating_section' => array(
678
+ 'title' => __('Product Review & Rating', "wp-seo-structured-data-schema"),
679
+ 'type' => 'heading',
680
+ ),
681
+ 'reviewRatingValue' => array(
682
+ 'title' => __('Review rating value', "wp-seo-structured-data-schema"),
683
+ 'type' => 'number',
684
+ 'recommended' => true,
685
+ 'attr' => 'step="any"',
686
+ 'desc' => __("Rating value. (1 , 2.5, 3, 5 etc)", "wp-seo-structured-data-schema")
687
+ ),
688
+ 'reviewBestRating' => array(
689
+ 'title' => __('Review Best rating', "wp-seo-structured-data-schema"),
690
+ 'type' => 'number',
691
+ 'recommended' => true,
692
+ 'attr' => 'step="any"',
693
+ ),
694
+ 'reviewWorstRating' => array(
695
+ 'title' => __('Review Worst rating', "wp-seo-structured-data-schema"),
696
+ 'type' => 'number',
697
+ 'recommended' => true,
698
+ 'attr' => 'step="any"',
699
+ ),
700
+ 'reviewAuthor' => array(
701
+ 'title' => __('Review author', "wp-seo-structured-data-schema"),
702
+ 'type' => 'text'
703
+ ),
704
+ 'ratingValue' => array(
705
+ 'title' => __('Rating value', "wp-seo-structured-data-schema"),
706
+ 'type' => 'number',
707
+ 'attr' => 'step="any"',
708
+ 'desc' => __("Rating value. (1 , 2.5, 3, 5 etc)", "wp-seo-structured-data-schema")
709
+ ),
710
+ 'reviewCount' => array(
711
+ 'title' => __('Total review count', "wp-seo-structured-data-schema"),
712
+ 'type' => 'number',
713
+ 'attr' => 'step="any"',
714
+ 'desc' => __("Review rating value. <span class='required'>This is required if (Rating value) is given</span>", "wp-seo-structured-data-schema")
715
+ ),
716
+ 'pricing_section' => array(
717
+ 'title' => __('Product Pricing', "wp-seo-structured-data-schema"),
718
+ 'type' => 'heading',
719
+ ),
720
+ 'price' => array(
721
+ 'title' => __('Price', "wp-seo-structured-data-schema"),
722
+ 'type' => 'number',
723
+ 'attr' => 'step="any"',
724
+ 'desc' => __("The lowest available price, including service charges and fees, of this type of ticket.", "wp-seo-structured-data-schema")
725
+ ),
726
+ 'priceValidUntil' => array(
727
+ 'title' => __('PriceValidUntil', "wp-seo-structured-data-schema"),
728
+ 'type' => 'text',
729
+ 'recommended' => true,
730
+ 'class' => 'kcseo-date',
731
+ 'desc' => __("The date (in ISO 8601 date and time format) after which the price will no longer be available.", "wp-seo-structured-data-schema")
732
+ ),
733
+ 'priceCurrency' => array(
734
+ 'title' => __('Price currency', "wp-seo-structured-data-schema"),
735
+ 'type' => 'text',
736
+ 'desc' => __("The 3-letter currency code.", "wp-seo-structured-data-schema")
737
+ ),
738
+ 'availability' => array(
739
+ 'title' => 'Availability',
740
+ 'type' => 'select',
741
+ 'empty' => "Select one",
742
+ 'options' => array(
743
+ 'http://schema.org/InStock' => 'InStock',
744
+ 'http://schema.org/InStoreOnly' => 'InStoreOnly',
745
+ 'http://schema.org/OutOfStock' => 'OutOfStock',
746
+ 'http://schema.org/SoldOut' => 'SoldOut',
747
+ 'http://schema.org/OnlineOnly' => 'OnlineOnly',
748
+ 'http://schema.org/LimitedAvailability' => 'LimitedAvailability',
749
+ 'http://schema.org/Discontinued' => 'Discontinued',
750
+ 'http://schema.org/PreOrder' => 'PreOrder',
751
+ ),
752
+ 'desc' => __("Select a availability type", "wp-seo-structured-data-schema")
753
+ ),
754
+ 'itemCondition' => array(
755
+ 'title' => 'Product condition',
756
+ 'type' => 'select',
757
+ 'empty' => "Select one",
758
+ 'options' => array(
759
+ 'http://schema.org/NewCondition' => 'NewCondition',
760
+ 'http://schema.org/UsedCondition' => 'UsedCondition',
761
+ 'http://schema.org/DamagedCondition' => 'DamagedCondition',
762
+ 'http://schema.org/RefurbishedCondition' => 'RefurbishedCondition',
763
+ ),
764
+ 'desc' => __("Select a condition", "wp-seo-structured-data-schema")
765
+ ),
766
+ 'url' => array(
767
+ 'title' => __('Product URL', "wp-seo-structured-data-schema"),
768
+ 'type' => 'url',
769
+ '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")
770
+ ),
771
+ )
772
+ ),
773
+ 'video' => array(
774
+ 'pro' => false,
775
+ 'title' => __('Video', "wp-seo-structured-data-schema"),
776
+ 'fields' => array(
777
+ 'active' => array(
778
+ 'type' => 'checkbox'
779
+ ),
780
+ 'name' => array(
781
+ 'title' => __('Name', "wp-seo-structured-data-schema"),
782
+ 'type' => 'text',
783
+ 'required' => true,
784
+ 'desc' => __("The title of the video", "wp-seo-structured-data-schema")
785
+ ),
786
+ 'description' => array(
787
+ 'title' => __('Description', "wp-seo-structured-data-schema"),
788
+ 'type' => 'textarea',
789
+ 'required' => true,
790
+ 'desc' => __("The description of the video. New line is not supported.", "wp-seo-structured-data-schema")
791
+ ),
792
+ 'thumbnailUrl' => array(
793
+ 'title' => 'Thumbnail URL',
794
+ 'type' => 'url',
795
+ 'placeholder' => "URL",
796
+ 'required' => true,
797
+ '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")
798
+ ),
799
+ 'uploadDate' => array(
800
+ 'title' => __('Updated date', "wp-seo-structured-data-schema"),
801
+ 'type' => 'text',
802
+ 'class' => 'kcseo-date',
803
+ 'required' => true,
804
+ 'desc' => __('2021-02-05T08:00:00+08:00', "wp-seo-structured-data-schema")
805
+ ),
806
+ 'duration' => array(
807
+ 'title' => __('Duration', "wp-seo-structured-data-schema"),
808
+ 'type' => 'text',
809
+ 'desc' => __("The duration of the video in ISO 8601 format.(PT1M33S)", "wp-seo-structured-data-schema")
810
+ ),
811
+ 'contentUrl' => array(
812
+ 'title' => 'Content URL',
813
+ 'type' => 'url',
814
+ 'placeholder' => 'URL',
815
+ '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")
816
+ ),
817
+ 'embedUrl' => array(
818
+ 'title' => 'Embed URL',
819
+ 'placeholder' => 'URL',
820
+ 'type' => 'url',
821
+ '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")
822
+ ),
823
+ 'interactionCount' => array(
824
+ 'title' => __('Interaction count', "wp-seo-structured-data-schema"),
825
+ 'type' => 'text',
826
+ 'desc' => __("The number of times the video has been viewed.", "wp-seo-structured-data-schema")
827
+ ),
828
+ 'expires' => array(
829
+ 'title' => __('Expires', "wp-seo-structured-data-schema"),
830
+ 'type' => 'text',
831
+ 'class' => 'kcseo-date',
832
+ 'desc' => __("Like this: 2021-12-25 14:20:00", "wp-seo-structured-data-schema")
833
+ ),
834
+ )
835
+ ),
836
+ 'audio' => array(
837
+ 'pro' => false,
838
+ 'title' => __('Audio', "wp-seo-structured-data-schema"),
839
+ 'fields' => array(
840
+ 'active' => array(
841
+ 'type' => 'checkbox'
842
+ ),
843
+ 'name' => array(
844
+ 'title' => __('Name', "wp-seo-structured-data-schema"),
845
+ 'type' => 'text',
846
+ 'required' => true,
847
+ 'desc' => __("The title of the audio", "wp-seo-structured-data-schema")
848
+ ),
849
+ 'description' => array(
850
+ 'title' => __('Description', "wp-seo-structured-data-schema"),
851
+ 'type' => 'textarea',
852
+ 'desc' => __("The description of the audio. New line is not supported.", "wp-seo-structured-data-schema")
853
+ ),
854
+ 'contentUrl' => array(
855
+ 'title' => 'Content URL',
856
+ 'type' => 'url',
857
+ 'placeholder' => 'URL',
858
+ 'required' => true,
859
+ 'desc' => esc_html__("A URL pointing to the actual audio media file. This file should be in .mp3, .wav, .mpc or other audio file format.", 'wp-seo-structured-data-schema')
860
+ ),
861
+ 'duration' => array(
862
+ 'title' => __('Duration', "wp-seo-structured-data-schema"),
863
+ 'type' => 'text',
864
+ 'desc' => __("The duration of the audio in ISO 8601 format.(PT1M33S)", "wp-seo-structured-data-schema")
865
+ ),
866
+ 'encodingFormat' => array(
867
+ 'type' => 'text',
868
+ 'title' => esc_html__('Encoding Format', 'wp-seo-structured-data-schema'),
869
+ 'desc' => esc_html__("The encoding format of audio like: 'audio/mpeg'", 'wp-seo-structured-data-schema')
870
+ ),
871
+ )
872
+ ),
873
+ 'service' => array(
874
+ 'pro' => false,
875
+ 'title' => __('Service', "wp-seo-structured-data-schema"),
876
+ 'fields' => array(
877
+ 'active' => array(
878
+ 'type' => 'checkbox'
879
+ ),
880
+ 'name' => array(
881
+ 'title' => __('Name', "wp-seo-structured-data-schema"),
882
+ 'type' => 'text',
883
+ 'required' => true,
884
+ 'desc' => __("The name of the Service.", "wp-seo-structured-data-schema")
885
+ ),
886
+ 'serviceType' => array(
887
+ 'title' => __('Service type', "wp-seo-structured-data-schema"),
888
+ 'type' => 'text',
889
+ 'required' => true,
890
+ 'desc' => __("The type of service being offered, e.g. veterans' benefits, emergency relief, etc.", "wp-seo-structured-data-schema")
891
+ ),
892
+ 'additionalType' => array(
893
+ 'title' => 'Additional type(URL)',
894
+ 'type' => 'url',
895
+ 'placeholder' => 'URL',
896
+ '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")
897
+ ),
898
+ 'award' => array(
899
+ 'title' => __('Award', "wp-seo-structured-data-schema"),
900
+ 'type' => 'text',
901
+ 'desc' => __("An award won by or for this service.", "wp-seo-structured-data-schema")
902
+ ),
903
+ 'category' => array(
904
+ 'title' => __('Category', "wp-seo-structured-data-schema"),
905
+ 'type' => 'text',
906
+ 'desc' => __("A category for the service.", "wp-seo-structured-data-schema")
907
+ ),
908
+ 'providerMobility' => array(
909
+ 'title' => __('Provider mobility', "wp-seo-structured-data-schema"),
910
+ 'type' => 'text',
911
+ 'desc' => __("Indicates the mobility of a provided service (e.g. 'static', 'dynamic').", "wp-seo-structured-data-schema")
912
+ ),
913
+ 'description' => array(
914
+ 'title' => 'Description',
915
+ 'type' => 'textarea',
916
+ 'require' => true,
917
+ 'desc' => __("A short description of the service. New line is not supported.", "wp-seo-structured-data-schema")
918
+ ),
919
+ 'image' => array(
920
+ 'title' => 'Image URL',
921
+ 'type' => 'url',
922
+ 'require' => false,
923
+ 'desc' => __("An image of the service. This should be a URL.", "wp-seo-structured-data-schema")
924
+ ),
925
+ 'mainEntityOfPage' => array(
926
+ 'title' => 'Main entity of page URL',
927
+ 'type' => 'url',
928
+ 'require' => false,
929
+ 'desc' => __("Indicates a page (or other CreativeWork) for which this thing is the main entity being described.", "wp-seo-structured-data-schema")
930
+ ),
931
+ 'sameAs' => array(
932
+ 'title' => 'Same as URL',
933
+ 'type' => 'url',
934
+ 'placeholder' => 'URL',
935
+ '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")
936
+ ),
937
+ 'url' => array(
938
+ 'title' => 'Url of the service',
939
+ 'type' => 'url',
940
+ 'placeholder' => 'URL',
941
+ 'desc' => __("URL of the service.", "wp-seo-structured-data-schema")
942
+ ),
943
+ 'alternateName' => array(
944
+ 'title' => __('Alternate name', "wp-seo-structured-data-schema"),
945
+ 'type' => 'text',
946
+ 'desc' => __('An alias for the service.', "wp-seo-structured-data-schema")
947
+ ),
948
+ )
949
+ ),
950
+ 'about' => array(
951
+ 'pro' => false,
952
+ 'title' => __('About', "wp-seo-structured-data-schema"),
953
+ 'fields' => array(
954
+ 'active' => array(
955
+ 'type' => 'checkbox'
956
+ ),
957
+ 'name' => array(
958
+ 'type' => 'text',
959
+ 'title' => esc_html__('Name', 'wp-seo-structured-data-schema'),
960
+ 'required' => true
961
+ ),
962
+ 'description' => array(
963
+ 'type' => 'textarea',
964
+ 'title' => esc_html__('Description', 'wp-seo-structured-data-schema'),
965
+ ),
966
+ 'image' => array(
967
+ 'type' => 'image',
968
+ 'title' => esc_html__('Image', 'wp-seo-structured-data-schema'),
969
+ ),
970
+ 'url' => array(
971
+ 'type' => 'url',
972
+ 'title' => esc_html__('URL', 'wp-seo-structured-data-schema'),
973
+ ),
974
+ 'sameAs' => array(
975
+ 'type' => 'textarea',
976
+ 'title' => esc_html__("Author Same As profile link", 'wp-seo-structured-data-schema'),
977
+ 'placeholder' => 'https://facebook.com/example&#10;https://twitter.com/example',
978
+ 'desc' => wp_kses( __("A reference page that unambiguously indicates the item\'s identity; for example, the URL of the item\'s Wikipedia page, Freebase page, or official website.<br> Enter new line for every entry", 'wp-seo-structured-data-schema'), [ 'br' => [] ] )
979
+ ),
980
+ )
981
+ ),
982
+ 'contact' => array(
983
+ 'pro' => false,
984
+ 'title' => __('Contact', "wp-seo-structured-data-schema"),
985
+ 'fields' => array(
986
+ 'active' => array(
987
+ 'type' => 'checkbox'
988
+ ),
989
+ 'name' => array(
990
+ 'type' => 'text',
991
+ 'title' => esc_html__('Name', 'wp-seo-structured-data-schema'),
992
+ 'required' => true
993
+ ),
994
+ 'description' => array(
995
+ 'type' => 'textarea',
996
+ 'title' => esc_html__('Description', 'wp-seo-structured-data-schema'),
997
+ ),
998
+ 'image' => array(
999
+ 'type' => 'image',
1000
+ 'title' => esc_html__('Image', 'wp-seo-structured-data-schema'),
1001
+ ),
1002
+ 'url' => array(
1003
+ 'type' => 'url',
1004
+ 'title' => esc_html__('URL', 'wp-seo-structured-data-schema'),
1005
+ ),
1006
+ 'video' => array(
1007
+ 'type' => 'url',
1008
+ 'title' => esc_html__('Video URL', 'wp-seo-structured-data-schema'),
1009
+ 'placeholder' => esc_html__('URL', 'wp-seo-structured-data-schema'),
1010
+ 'desc' => esc_html__("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')
1011
+ ),
1012
+ 'sameAs' => array(
1013
+ 'type' => 'textarea',
1014
+ 'title' => esc_html__("Author Same As profile link", 'wp-seo-structured-data-schema'),
1015
+ 'placeholder' => 'https://facebook.com/example&#10;https://twitter.com/example',
1016
+ 'desc' => wp_kses( __("A reference page that unambiguously indicates the item\'s identity; for example, the URL of the item\'s Wikipedia page, Freebase page, or official website.<br> Enter new line for every entry", 'wp-seo-structured-data-schema'), [ 'br' => [] ] )
1017
+ ),
1018
+ )
1019
+ ),
1020
+ 'review' => array(
1021
+ 'pro' => false,
1022
+ 'title' => __('Review', "wp-seo-structured-data-schema"),
1023
+ 'fields' => array(
1024
+ 'active' => array(
1025
+ 'type' => 'checkbox'
1026
+ ),
1027
+ 'review_notice_heading' => array(
1028
+ 'title' => sprintf('<span style="display:block;text-align:center;color: red">%s</span>', __('Notice</span>', "wp-seo-structured-data-schema")),
1029
+ 'type' => 'heading',
1030
+ 'desc' => self::getReviewNotice()
1031
+ ),
1032
+ 'itemName' => array(
1033
+ 'title' => __('Name of the reviewed item', "wp-seo-structured-data-schema"),
1034
+ 'type' => 'text',
1035
+ 'required' => true,
1036
+ 'desc' => __("The item that is being reviewed.", "wp-seo-structured-data-schema")
1037
+ ),
1038
+ 'reviewBody' => array(
1039
+ 'title' => __('Review body', "wp-seo-structured-data-schema"),
1040
+ 'type' => 'textarea',
1041
+ 'required' => true,
1042
+ 'desc' => __("The actual body of the review.", "wp-seo-structured-data-schema")
1043
+ ),
1044
+ 'name' => array(
1045
+ 'title' => __('Review name', "wp-seo-structured-data-schema"),
1046
+ 'type' => 'text',
1047
+ 'required' => true,
1048
+ 'desc' => __("A particular name for the review.", "wp-seo-structured-data-schema")
1049
+ ),
1050
+ 'author' => array(
1051
+ 'title' => __('Author', "wp-seo-structured-data-schema"),
1052
+ 'type' => 'text',
1053
+ 'required' => true,
1054
+ 'author' => 'Author name',
1055
+ 'desc' => __("The author of the review. The reviewer’s name needs to be a valid name.", "wp-seo-structured-data-schema")
1056
+ ),
1057
+ 'datePublished' => array(
1058
+ 'title' => __('Date of Published', "wp-seo-structured-data-schema"),
1059
+ 'type' => 'text',
1060
+ 'class' => 'kcseo-date',
1061
+ 'desc' => __("Like this: 2021-12-25 14:20:00", "wp-seo-structured-data-schema")
1062
+ ),
1063
+ 'ratingValue' => array(
1064
+ 'title' => __('Rating value', "wp-seo-structured-data-schema"),
1065
+ 'type' => 'number',
1066
+ 'attr' => 'step="any"',
1067
+ 'desc' => __("A numerical quality rating for the item.", "wp-seo-structured-data-schema")
1068
+ ),
1069
+ 'bestRating' => array(
1070
+ 'title' => __('Best rating', "wp-seo-structured-data-schema"),
1071
+ 'type' => 'number',
1072
+ 'attr' => 'step="any"',
1073
+ 'desc' => __("The highest value allowed in this rating system.", "wp-seo-structured-data-schema")
1074
+ ),
1075
+ 'worstRating' => array(
1076
+ 'title' => __('Worst rating', "wp-seo-structured-data-schema"),
1077
+ 'type' => 'number',
1078
+ 'attr' => 'step="any"',
1079
+ '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")
1080
+ ),
1081
+ 'publisher' => array(
1082
+ 'title' => __('Name of the organization', "wp-seo-structured-data-schema"),
1083
+ 'type' => 'text',
1084
+ 'desc' => __('The publisher of the review.', "wp-seo-structured-data-schema")
1085
+ )
1086
+ )
1087
+ ),
1088
+ 'aggregate_rating' => array(
1089
+ 'pro' => false,
1090
+ 'title' => __('Aggregate Ratings', "wp-seo-structured-data-schema"),
1091
+ 'fields' => array(
1092
+ 'active' => array(
1093
+ 'type' => 'checkbox'
1094
+ ),
1095
+ 'schema_type' => array(
1096
+ 'title' => __('Schema type', "wp-seo-structured-data-schema"),
1097
+ 'type' => 'schema_type',
1098
+ 'required' => true,
1099
+ 'options' => self::getSiteTypes(),
1100
+ 'empty' => "Select one",
1101
+ 'desc' => __("Use the most appropriate schema type for what is being reviewed.", "wp-seo-structured-data-schema")
1102
+ ),
1103
+ 'name' => array(
1104
+ 'title' => __('Name of the item', "wp-seo-structured-data-schema"),
1105
+ 'type' => 'text',
1106
+ 'required' => true,
1107
+ 'desc' => __("The item that is being rated.", "wp-seo-structured-data-schema")
1108
+ ),
1109
+ 'image' => array(
1110
+ 'title' => 'Image',
1111
+ 'type' => 'image',
1112
+ 'required' => true,
1113
+ 'holderClass' => 'kSeo-hidden aggregate-except-organization-holder'
1114
+ ),
1115
+ 'priceRange' => array(
1116
+ 'title' => 'Price Range',
1117
+ 'recommended' => true,
1118
+ 'type' => 'text',
1119
+ 'holderClass' => 'kSeo-hidden aggregate-except-organization-holder',
1120
+ 'desc' => __("The price range of the business, for example $$$.", "wp-seo-structured-data-schema")
1121
+ ),
1122
+ 'telephone' => array(
1123
+ 'title' => 'Telephone',
1124
+ 'recommended' => true,
1125
+ 'type' => 'text',
1126
+ 'holderClass' => 'kSeo-hidden aggregate-except-organization-holder'
1127
+ ),
1128
+ 'address' => array(
1129
+ 'title' => 'Address',
1130
+ 'recommended' => true,
1131
+ 'type' => 'text',
1132
+ 'holderClass' => 'kSeo-hidden aggregate-except-organization-holder',
1133
+ ),
1134
+ 'description' => array(
1135
+ 'title' => __('Description', "wp-seo-structured-data-schema"),
1136
+ 'type' => 'textarea',
1137
+ 'desc' => __("Description for thr review. New line is not supported.", "wp-seo-structured-data-schema")
1138
+ ),
1139
+ 'ratingCount' => array(
1140
+ 'title' => __('Rating Count', "wp-seo-structured-data-schema"),
1141
+ 'type' => 'number',
1142
+ 'attr' => 'step="any"',
1143
+ 'required' => true,
1144
+ '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")
1145
+ ),
1146
+ 'reviewCount' => array(
1147
+ 'title' => __('Review Count', "wp-seo-structured-data-schema"),
1148
+ 'type' => 'number',
1149
+ 'attr' => 'step="any"',
1150
+ 'required' => true,
1151
+ '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")
1152
+ ),
1153
+ 'ratingValue' => array(
1154
+ 'title' => __('Rating Value', "wp-seo-structured-data-schema"),
1155
+ 'attr' => 'step="any"',
1156
+ 'type' => 'number',
1157
+ 'required' => true,
1158
+ 'desc' => __("A numerical quality rating for the item.", "wp-seo-structured-data-schema")
1159
+ ),
1160
+ 'bestRating' => array(
1161
+ 'title' => __('Best Rating', "wp-seo-structured-data-schema"),
1162
+ 'type' => 'number',
1163
+ 'attr' => 'step="any"',
1164
+ 'required' => true,
1165
+ '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")
1166
+ ),
1167
+ 'worstRating' => array(
1168
+ 'title' => __('Worst Rating', "wp-seo-structured-data-schema"),
1169
+ 'type' => 'number',
1170
+ 'attr' => 'step="any"',
1171
+ 'required' => true,
1172
+ '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")
1173
+ )
1174
+ )
1175
+ ),
1176
+ 'restaurant' => array(
1177
+ 'pro' => false,
1178
+ 'title' => __('Restaurant', "wp-seo-structured-data-schema"),
1179
+ 'fields' => array(
1180
+ 'active' => array(
1181
+ 'type' => 'checkbox'
1182
+ ),
1183
+ 'name' => array(
1184
+ 'title' => __('Name of the Restaurant', "wp-seo-structured-data-schema"),
1185
+ 'type' => 'text',
1186
+ 'required' => true
1187
+ ),
1188
+ 'description' => array(
1189
+ 'title' => __('Description of the Restaurant', "wp-seo-structured-data-schema"),
1190
+ 'type' => 'textarea',
1191
+ 'desc' => esc_html__('New line is not supported.', "wp-seo-structured-data-schema")
1192
+ ),
1193
+ 'openingHours' => array(
1194
+ 'title' => __('Opening Hours', "wp-seo-structured-data-schema"),
1195
+ 'type' => 'textarea',
1196
+ 'desc' => __('Mo,Tu,We,Th,Fr,Sa,Su 11:30-23:00', "wp-seo-structured-data-schema")
1197
+ ),
1198
+ 'telephone' => array(
1199
+ 'title' => __('Telephone', "wp-seo-structured-data-schema"),
1200
+ 'type' => 'text',
1201
+ 'desc' => __('+155501003333', "wp-seo-structured-data-schema")
1202
+ ),
1203
+ 'menu' => array(
1204
+ 'title' => __('Menu', "wp-seo-structured-data-schema"),
1205
+ 'type' => 'text',
1206
+ 'desc' => __('http://example.com/menu', "wp-seo-structured-data-schema")
1207
+ ),
1208
+ 'image' => array(
1209
+ 'title' => __('Image', "wp-seo-structured-data-schema"),
1210
+ 'type' => 'image',
1211
+ 'required' => true
1212
+ ),
1213
+ 'address' => array(
1214
+ 'title' => __('Address', "wp-seo-structured-data-schema"),
1215
+ 'type' => 'textarea'
1216
+ ),
1217
+ 'priceRange' => array(
1218
+ 'title' => __('Price Range', "wp-seo-structured-data-schema"),
1219
+ 'type' => 'text',
1220
+ 'desc' => __('The price range of the business, for example $$$', "wp-seo-structured-data-schema")
1221
+ ),
1222
+ 'servesCuisine' => array(
1223
+ 'title' => __('Serves Cuisine', "wp-seo-structured-data-schema"),
1224
+ 'type' => 'text',
1225
+ 'desc' => __('The cuisine of the restaurant.', "wp-seo-structured-data-schema")
1226
+ )
1227
+ )
1228
+ ),
1229
+ 'localBusiness' => array(
1230
+ 'pro' => false,
1231
+ 'title' => __('Local Business', "wp-seo-structured-data-schema"),
1232
+ 'fields' => array(
1233
+ 'active' => array(
1234
+ 'type' => 'checkbox'
1235
+ ),
1236
+ 'name' => array(
1237
+ 'title' => __('Name', "wp-seo-structured-data-schema"),
1238
+ 'type' => 'text',
1239
+ 'required' => true
1240
+ ),
1241
+ 'description' => array(
1242
+ 'title' => __('Description', "wp-seo-structured-data-schema"),
1243
+ 'type' => 'textarea',
1244
+ 'desc' => esc_html__('New line is not supported.', "wp-seo-structured-data-schema")
1245
+ ),
1246
+ 'image' => array(
1247
+ 'title' => __('Business Logo', "wp-seo-structured-data-schema"),
1248
+ 'type' => 'image',
1249
+ 'required' => true
1250
+ ),
1251
+ 'priceRange' => array(
1252
+ 'title' => __('Price Range', "wp-seo-structured-data-schema"),
1253
+ 'type' => 'text',
1254
+ 'recommended' => true,
1255
+ 'desc' => __("The price range of the business, for example $$$.", "wp-seo-structured-data-schema")
1256
+ ),
1257
+ 'addressLocality' => array(
1258
+ 'title' => __('Address locality', "wp-seo-structured-data-schema"),
1259
+ 'type' => 'text',
1260
+ 'desc' => __('City (i.e Kansas city)', "wp-seo-structured-data-schema")
1261
+ ),
1262
+ 'addressRegion' => array(
1263
+ 'title' => __('Address region', "wp-seo-structured-data-schema"),
1264
+ 'type' => 'text',
1265
+ 'desc' => __('State (i.e. MO)', "wp-seo-structured-data-schema")
1266
+ ),
1267
+ 'postalCode' => array(
1268
+ 'title' => __('Postal code', "wp-seo-structured-data-schema"),
1269
+ 'type' => 'text',
1270
+ ),
1271
+ 'streetAddress' => array(
1272
+ 'title' => __('Street address', "wp-seo-structured-data-schema"),
1273
+ 'type' => 'text',
1274
+ ),
1275
+ 'telephone' => array(
1276
+ 'title' => __('Telephone', "wp-seo-structured-data-schema"),
1277
+ 'type' => 'text',
1278
+ 'recommended' => true,
1279
+ ),
1280
+ 'review_section' => array(
1281
+ 'title' => __('Review', "wp-seo-structured-data-schema"),
1282
+ 'type' => 'heading',
1283
+ 'desc' => __("To add review schema for this type, complete fields below and enable, others live blank.", "wp-seo-structured-data-schema")
1284
+ ),
1285
+ 'review_active' => array(
1286
+ 'type' => 'checkbox'
1287
+ ),
1288
+ 'review_author' => array(
1289
+ 'title' => __("Author", "wp-seo-structured-data-schema"),
1290
+ 'type' => 'text',
1291
+ 'required' => true
1292
+ ),
1293
+ 'review_author_sameAs' => array(
1294
+ 'title' => __("Author Same As profile link", "wp-seo-structured-data-schema"),
1295
+ 'type' => 'textarea',
1296
+ 'attr' => 'placeholder="https://facebook.com/example&#10;https://twitter.com/example"',
1297
+ 'required' => true,
1298
+ 'desc' => __('A reference page that unambiguously indicates the item\'s identity; for example, the URL of the item\'s Wikipedia page, Freebase page, or official website.<br> Enter new line for every entry', "wp-seo-structured-data-schema")
1299
+ ),
1300
+ 'review_body' => array(
1301
+ 'title' => __('Review body', "wp-seo-structured-data-schema"),
1302
+ 'type' => 'textarea',
1303
+ 'required' => true,
1304
+ 'desc' => __("The actual body of the review.", "wp-seo-structured-data-schema")
1305
+ ),
1306
+ 'review_datePublished' => array(
1307
+ 'title' => __('Date of Published', "wp-seo-structured-data-schema"),
1308
+ 'type' => 'text',
1309
+ 'class' => 'kcseo-date',
1310
+ 'desc' => __("Like this: 2021-12-25 14:20:00", "wp-seo-structured-data-schema")
1311
+ ),
1312
+ 'review_ratingValue' => array(
1313
+ 'title' => __('Rating value', "wp-seo-structured-data-schema"),
1314
+ 'type' => 'number',
1315
+ 'attr' => 'step="any"',
1316
+ 'desc' => __("A numerical quality rating for the item.", "wp-seo-structured-data-schema")
1317
+ ),
1318
+ 'review_bestRating' => array(
1319
+ 'title' => __('Best rating', "wp-seo-structured-data-schema"),
1320
+ 'type' => 'number',
1321
+ 'attr' => 'step="any"',
1322
+ 'desc' => __("The highest value allowed in this rating system.", "wp-seo-structured-data-schema")
1323
+ ),
1324
+ 'review_worstRating' => array(
1325
+ 'title' => __('Worst rating', "wp-seo-structured-data-schema"),
1326
+ 'type' => 'number',
1327
+ 'attr' => 'step="any"',
1328
+ '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")
1329
+ )
1330
+ )
1331
+ ),
1332
+ 'book' => array(
1333
+ 'pro' => true,
1334
+ 'title' => __("Book", "wp-seo-structured-data-schema"),
1335
+ ),
1336
+ 'course' => array(
1337
+ 'pro' => true,
1338
+ 'title' => __("Course", "wp-seo-structured-data-schema"),
1339
+ ),
1340
+ 'JobPosting' => array(
1341
+ 'pro' => true,
1342
+ 'title' => __("Job Posting", "wp-seo-structured-data-schema"),
1343
+ ),
1344
+ 'movie' => array(
1345
+ 'pro' => true,
1346
+ 'title' => __("Movie", "wp-seo-structured-data-schema"),
1347
+ ),
1348
+ 'music' => array(
1349
+ 'pro' => true,
1350
+ 'title' => __("Music", "wp-seo-structured-data-schema"),
1351
+ ),
1352
+ 'recipe' => array(
1353
+ 'pro' => true,
1354
+ 'title' => __("Recipe", "wp-seo-structured-data-schema"),
1355
+ ),
1356
+ 'TVEpisode' => array(
1357
+ 'pro' => true,
1358
+ 'title' => __("TVEpisode", "wp-seo-structured-data-schema"),
1359
+ ),
1360
+ 'question' => array(
1361
+ 'pro' => true,
1362
+ 'title' => __("QAPage", "wp-seo-structured-data-schema"),
1363
+ ),
1364
+ 'itemList' => array(
1365
+ 'pro' => true,
1366
+ 'title' => __("Item List", "wp-seo-structured-data-schema"),
1367
+ ),
1368
+ 'specialAnnouncement' => [
1369
+ 'title' => __('Special Announcement', "wp-seo-structured-data-schema"),
1370
+ 'fields' => [
1371
+ 'active' => [
1372
+ 'type' => 'checkbox'
1373
+ ],
1374
+ 'name' => [
1375
+ 'title' => __('Name', "wp-seo-structured-data-schema"),
1376
+ 'type' => 'text',
1377
+ 'desc' => __('SpecialAnnouncement.name: Name of the announcement. This text should be present on the underlying page.', "wp-seo-structured-data-schema"),
1378
+ 'required' => true
1379
+ ],
1380
+ 'url' => [
1381
+ 'title' => __('Page URL', "wp-seo-structured-data-schema"),
1382
+ 'type' => 'url',
1383
+ 'desc' => __('SpecialAnnouncement.url: URL of the page containing the announcements. If present, this must match the URL of the page containing the information.', "wp-seo-structured-data-schema"),
1384
+ 'required' => true
1385
+ ],
1386
+ 'datePublished' => [
1387
+ 'title' => __('Published date', "wp-seo-structured-data-schema"),
1388
+ 'type' => 'text',
1389
+ 'class' => 'kcseo-date',
1390
+ 'desc' => __('Like this: 2021-12-25 14:20:00', "wp-seo-structured-data-schema"),
1391
+ 'required' => true
1392
+ ],
1393
+ 'expires' => [
1394
+ 'title' => __('Expires date', "wp-seo-structured-data-schema"),
1395
+ 'type' => 'text',
1396
+ 'class' => 'kcseo-date',
1397
+ 'desc' => __('Like this: 2021-12-25 14:20:00', "wp-seo-structured-data-schema"),
1398
+ 'recommended' => true,
1399
+ ],
1400
+ 'text' => [
1401
+ 'title' => __('Text', "wp-seo-structured-data-schema"),
1402
+ 'type' => 'textarea',
1403
+ 'desc' => __('SpecialAnnouncement.text: Text of the announcements.', "wp-seo-structured-data-schema"),
1404
+ 'required' => true
1405
+ ],
1406
+ 'locations' => [
1407
+ 'title' => __('Announcement Locations', "wp-seo-structured-data-schema"),
1408
+ 'type' => 'group',
1409
+ 'duplicate' => true,
1410
+ 'fields' => [
1411
+ 'location_heading' => [
1412
+ 'type' => 'heading',
1413
+ 'title' => __('Announcement Location', "wp-seo-structured-data-schema")
1414
+ ],
1415
+ 'type' => [
1416
+ 'title' => __('Type', "wp-seo-structured-data-schema"),
1417
+ 'type' => 'select',
1418
+ 'options' => self::announcementLocationTypes(),
1419
+ 'required' => true
1420
+ ],
1421
+ 'name' => [
1422
+ 'title' => __('Name', "wp-seo-structured-data-schema"),
1423
+ 'type' => 'text',
1424
+ 'desc' => __("SpecialAnnouncement.announcementLocation.name: ", "wp-seo-structured-data-schema"),
1425
+ 'recommended' => true,
1426
+ ],
1427
+ 'url' => [
1428
+ 'title' => __('URL', "wp-seo-structured-data-schema"),
1429
+ 'type' => 'url',
1430
+ 'recommended' => true,
1431
+ 'desc' => __("SpecialAnnouncement.announcementLocation.url: URL", "wp-seo-structured-data-schema")
1432
+ ],
1433
+ 'address_street' => [
1434
+ 'title' => __('Address: Street', "wp-seo-structured-data-schema"),
1435
+ 'type' => 'text',
1436
+ 'desc' => __('SpecialAnnouncement.announcementLocation.address.streetAddress: The street address. For example, 1600 Amphitheatre Pkwy.', "wp-seo-structured-data-schema"),
1437
+ 'recommended' => true,
1438
+ ],
1439
+ 'address_locality' => [
1440
+ 'title' => __('Address: Locality', "wp-seo-structured-data-schema"),
1441
+ 'type' => 'text',
1442
+ 'desc' => __('SpecialAnnouncement.announcementLocation.address.addressLocality: The locality in which the street address is, and which is in the region. For example, Mountain View.', "wp-seo-structured-data-schema"),
1443
+ 'recommended' => true,
1444
+ ],
1445
+ 'address_post_code' => [
1446
+ 'title' => __('Address: Post Code', "wp-seo-structured-data-schema"),
1447
+ 'type' => 'text',
1448
+ 'desc' => __('SpecialAnnouncement.announcementLocation.address.postalCode: The postal code. For example, 94043.', "wp-seo-structured-data-schema"),
1449
+ 'recommended' => true,
1450
+ ],
1451
+ 'address_region' => [
1452
+ 'title' => __('Address: Region', "wp-seo-structured-data-schema"),
1453
+ 'type' => 'text',
1454
+ 'desc' => __('SpecialAnnouncement.announcementLocation.address.addressRegion: The region in which the locality is, and which is in the country. For example, California.', "wp-seo-structured-data-schema"),
1455
+ 'recommended' => true,
1456
+ ],
1457
+ 'address_country' => [
1458
+ 'title' => __('Address: Country', "wp-seo-structured-data-schema"),
1459
+ 'type' => 'text',
1460
+ 'desc' => __('SpecialAnnouncement.announcementLocation.address.addressCountry: The country. For example, USA. You can also provide the two-letter ISO 3166-1 alpha-2 country code.', "wp-seo-structured-data-schema"),
1461
+ 'recommended' => true,
1462
+ ],
1463
+ 'id' => [
1464
+ 'title' => __('ID', "wp-seo-structured-data-schema"),
1465
+ 'type' => 'text',
1466
+ 'desc' => __('SpecialAnnouncement.announcementLocation.@id: An optional unique identifier so that you can reference pre-existing structured data for this location.', "wp-seo-structured-data-schema"),
1467
+ ],
1468
+ 'image' => array(
1469
+ 'title' => __('Image', "wp-seo-structured-data-schema"),
1470
+ 'type' => 'image'
1471
+ ),
1472
+ 'priceRange' => array(
1473
+ 'title' => 'Price Range (Recommended)',
1474
+ 'type' => 'text',
1475
+ 'recommended' => true,
1476
+ 'desc' => __("The price range of the business, for example $$$.", "wp-seo-structured-data-schema")
1477
+ ),
1478
+ 'telephone' => array(
1479
+ 'title' => 'Telephone (Recommended)',
1480
+ 'type' => 'text',
1481
+ 'recommended' => true
1482
+ )
1483
+ ]
1484
+ ],
1485
+ ]
1486
+ ]
1487
+ );
1488
+
1489
+ return apply_filters('kcseo_schema_types', $schemas);
1490
+ }
1491
+
1492
+ static function getSiteTypes() {
1493
+ $siteTypes = array(
1494
+ 'Organization',
1495
+ 'LocalBusiness' => array(
1496
+ 'AnimalShelter',
1497
+ 'AutomotiveBusiness' => array(
1498
+ 'AutoBodyShop',
1499
+ 'AutoDealer',
1500
+ 'AutoPartsStore',
1501
+ 'AutoRental',
1502
+ 'AutoRepair',
1503
+ 'AutoWash',
1504
+ 'GasStation',
1505
+ 'MotorcycleDealer',
1506
+ 'MotorcycleRepair'
1507
+ ),
1508
+ 'ChildCare',
1509
+ 'DryCleaningOrLaundry',
1510
+ 'EmergencyService',
1511
+ 'EmploymentAgency',
1512
+ 'EntertainmentBusiness' => array(
1513
+ 'AdultEntertainment',
1514
+ 'AmusementPark',
1515
+ 'ArtGallery',
1516
+ 'Casino',
1517
+ 'ComedyClub',
1518
+ 'MovieTheater',
1519
+ 'NightClub',
1520
+
1521
+ ),
1522
+ 'FinancialService' => array(
1523
+ 'AccountingService',
1524
+ 'AutomatedTeller',
1525
+ 'BankOrCreditUnion',
1526
+ 'InsuranceAgency',
1527
+ ),
1528
+ 'FoodEstablishment' => array(
1529
+ 'Bakery',
1530
+ 'BarOrPub',
1531
+ 'Brewery',
1532
+ 'CafeOrCoffeeShop',
1533
+ 'FastFoodRestaurant',
1534
+ 'IceCreamShop',
1535
+ 'Restaurant',
1536
+ 'Winery',
1537
+ ),
1538
+ 'GovernmentOffice',
1539
+ 'HealthAndBeautyBusiness' => array(
1540
+ 'BeautySalon',
1541
+ 'DaySpa',
1542
+ 'HairSalon',
1543
+ 'HealthClub',
1544
+ 'NailSalon',
1545
+ 'TattooParlor',
1546
+ ),
1547
+ 'HomeAndConstructionBusiness' => array(
1548
+ 'Electrician',
1549
+ 'GeneralContractor',
1550
+ 'HVACBusiness',
1551
+ 'HousePainter',
1552
+ 'Locksmith',
1553
+ 'MovingCompany',
1554
+ 'Plumber',
1555
+ 'RoofingContractor',
1556
+ ),
1557
+ 'InternetCafe',
1558
+ 'LegalService' => array(
1559
+ 'Attorney',
1560
+ 'Notary',
1561
+ ),
1562
+ 'Library',
1563
+ 'MedicalBusiness' => array(
1564
+ 'CommunityHealth',
1565
+ 'Dentist',
1566
+ 'Dermatology',
1567
+ 'DietNutrition',
1568
+ 'Emergency',
1569
+ 'Geriatric',
1570
+ 'Gynecologic',
1571
+ 'MedicalClinic',
1572
+ 'Midwifery',
1573
+ 'Nursing',
1574
+ 'Obstetric',
1575
+ 'Oncologic',
1576
+ 'Optician',
1577
+ 'Optometric',
1578
+ 'Otolaryngologic',
1579
+ 'Pediatric',
1580
+ 'Pharmacy',
1581
+ 'Physician',
1582
+ 'Physiotherapy',
1583
+ 'PlasticSurgery',
1584
+ 'Podiatric',
1585
+ 'PrimaryCare',
1586
+ 'Psychiatric',
1587
+ 'PublicHealth',
1588
+ ),
1589
+ 'LodgingBusiness' => array(
1590
+ 'BedAndBreakfast',
1591
+ 'Campground',
1592
+ 'Hostel',
1593
+ 'Hotel',
1594
+ 'Motel',
1595
+ 'Resort',
1596
+ ),
1597
+ 'ProfessionalService',
1598
+ 'RadioStation',
1599
+ 'RealEstateAgent',
1600
+ 'RecyclingCenter',
1601
+ 'SelfStorage',
1602
+ 'ShoppingCenter',
1603
+ 'SportsActivityLocation' => array(
1604
+ 'BowlingAlley',
1605
+ 'ExerciseGym',
1606
+ 'GolfCourse',
1607
+ 'HealthClub',
1608
+ 'PublicSwimmingPool',
1609
+ 'SkiResort',
1610
+ 'SportsClub',
1611
+ 'StadiumOrArena',
1612
+ 'TennisComplex',
1613
+ ),
1614
+ 'Store' => array(
1615
+ 'AutoPartsStore',
1616
+ 'BikeStore',
1617
+ 'BookStore',
1618
+ 'ClothingStore',
1619
+ 'ComputerStore',
1620
+ 'ConvenienceStore',
1621
+ 'DepartmentStore',
1622
+ 'ElectronicsStore',
1623
+ 'Florist',
1624
+ 'FurnitureStore',
1625
+ 'GardenStore',
1626
+ 'GroceryStore',
1627
+ 'HardwareStore',
1628
+ 'HobbyShop',
1629
+ 'HomeGoodsStore',
1630
+ 'JewelryStore',
1631
+ 'LiquorStore',
1632
+ 'MensClothingStore',
1633
+ 'MobilePhoneStore',
1634
+ 'MovieRentalStore',
1635
+ 'MusicStore',
1636
+ 'OfficeEquipmentStore',
1637
+ 'OutletStore',
1638
+ 'PawnShop',
1639
+ 'PetStore',
1640
+ 'ShoeStore',
1641
+ 'SportingGoodsStore',
1642
+ 'TireShop',
1643
+ 'ToyStore',
1644
+ 'WholesaleStore'
1645
+ ),
1646
+ 'TelevisionStation',
1647
+ 'TouristInformationCenter',
1648
+ 'TravelAgency'
1649
+ ),
1650
+ 'NGO' => array(),
1651
+ );
1652
+
1653
+ return apply_filters('kcseo_site_types', $siteTypes);
1654
+ }
1655
+
1656
+ static function getCountryList() {
1657
+ $countryList = array(
1658
+ "AF" => "Afghanistan",
1659
+ "AX" => "Aland Islands",
1660
+ "AL" => "Albania",
1661
+ "DZ" => "Algeria",
1662
+ "AS" => "American Samoa",
1663
+ "AD" => "Andorra",
1664
+ "AO" => "Angola",
1665
+ "AI" => "Anguilla",
1666
+ "AQ" => "Antarctica",
1667
+ "AG" => "Antigua and Barbuda",
1668
+ "AR" => "Argentina",
1669
+ "AM" => "Armenia",
1670
+ "AW" => "Aruba",
1671
+ "AU" => "Australia",
1672
+ "AT" => "Austria",
1673
+ "AZ" => "Azerbaijan",
1674
+ "BS" => "Bahamas",
1675
+ "BH" => "Bahrain",
1676
+ "BD" => "Bangladesh",
1677
+ "BB" => "Barbados",
1678
+ "BY" => "Belarus",
1679
+ "BE" => "Belgium",
1680
+ "BZ" => "Belize",
1681
+ "BJ" => "Benin",
1682
+ "BM" => "Bermuda",
1683
+ "BT" => "Bhutan",
1684
+ "BO" => "Bolivia, Plurinational State of",
1685
+ "BQ" => "Bonaire, Sint Eustatius and Saba",
1686
+ "BA" => "Bosnia and Herzegovina",
1687
+ "BW" => "Botswana",
1688
+ "BV" => "Bouvet Island",
1689
+ "BR" => "Brazil",
1690
+ "IO" => "British Indian Ocean Territory",
1691
+ "BN" => "Brunei Darussalam",
1692
+ "BG" => "Bulgaria",
1693
+ "BF" => "Burkina Faso",
1694
+ "BI" => "Burundi",
1695
+ "KH" => "Cambodia",
1696
+ "CM" => "Cameroon",
1697
+ "CA" => "Canada",
1698
+ "CV" => "Cape Verde",
1699
+ "KY" => "Cayman Islands",
1700
+ "CF" => "Central African Republic",
1701
+ "TD" => "Chad",
1702
+ "CL" => "Chile",
1703
+ "CN" => "China",
1704
+ "CX" => "Christmas Island",
1705
+ "CC" => "Cocos (Keeling) Islands",
1706
+ "CO" => "Colombia",
1707
+ "KM" => "Comoros",
1708
+ "CG" => "Congo",
1709
+ "CD" => "Congo, the Democratic Republic of the",
1710
+ "CK" => "Cook Islands",
1711
+ "CR" => "Costa Rica",
1712
+ "CI" => "Côte d Ivoire",
1713
+ "HR" => "Croatia",
1714
+ "CU" => "Cuba",
1715
+ "CW" => "Curaçao",
1716
+ "CY" => "Cyprus",
1717
+ "CZ" => "Czech Republic",
1718
+ "DK" => "Denmark",
1719
+ "DJ" => "Djibouti",
1720
+ "DM" => "Dominica",
1721
+ "DO" => "Dominican Republic",
1722
+ "EC" => "Ecuador",
1723
+ "EG" => "Egypt",
1724
+ "SV" => "El Salvador",
1725
+ "GQ" => "Equatorial Guinea",
1726
+ "ER" => "Eritrea",
1727
+ "EE" => "Estonia",
1728
+ "ET" => "Ethiopia",
1729
+ "FK" => "Falkland Islands (Malvinas)",
1730
+ "FO" => "Faroe Islands",
1731
+ "FJ" => "Fiji",
1732
+ "FI" => "Finland",
1733
+ "FR" => "France",
1734
+ "GF" => "French Guiana",
1735
+ "PF" => "French Polynesia",
1736
+ "TF" => "French Southern Territories",
1737
+ "GA" => "Gabon",
1738
+ "GM" => "Gambia",
1739
+ "GE" => "Georgia",
1740
+ "DE" => "Germany",
1741
+ "GH" => "Ghana",
1742
+ "GI" => "Gibraltar",
1743
+ "GR" => "Greece",
1744
+ "GL" => "Greenland",
1745
+ "GD" => "Grenada",
1746
+ "GP" => "Guadeloupe",
1747
+ "GU" => "Guam",
1748
+ "GT" => "Guatemala",
1749
+ "GG" => "Guernsey",
1750
+ "GN" => "Guinea",
1751
+ "GW" => "Guinea-Bissau",
1752
+ "GY" => "Guyana",
1753
+ "HT" => "Haiti",
1754
+ "HM" => "Heard Island and McDonald Islands",
1755
+ "VA" => "Holy See (Vatican City State)",
1756
+ "HN" => "Honduras",
1757
+ "HK" => "Hong Kong",
1758
+ "HU" => "Hungary",
1759
+ "IS" => "Iceland",
1760
+ "IN" => "India",
1761
+ "ID" => "Indonesia",
1762
+ "IR" => "Iran, Islamic Republic of",
1763
+ "IQ" => "Iraq",
1764
+ "IE" => "Ireland",
1765
+ "IM" => "Isle of Man",
1766
+ "IL" => "Israel",
1767
+ "IT" => "Italy",
1768
+ "JM" => "Jamaica",
1769
+ "JP" => "Japan",
1770
+ "JE" => "Jersey",
1771
+ "JO" => "Jordan",
1772
+ "KZ" => "Kazakhstan",
1773
+ "KE" => "Kenya",
1774
+ "KI" => "Kiribati",
1775
+ "KP" => "Korea, Democratic People's Republic of",
1776
+ "KR" => "Korea, Republic of,",
1777
+ "KW" => "Kuwait",
1778
+ "KG" => "Kyrgyzstan",
1779
+ "LA" => "Lao Peoples Democratic Republic",
1780
+ "LV" => "Latvia",
1781
+ "LB" => "Lebanon",
1782
+ "LS" => "Lesotho",
1783
+ "LR" => "Liberia",
1784
+ "LY" => "Libya",
1785
+ "LI" => "Liechtenstein",
1786
+ "LT" => "Lithuania",
1787
+ "LU" => "Luxembourg",
1788
+ "MO" => "Macao",
1789
+ "MK" => "Macedonia, the former Yugoslav Republic of",
1790
+ "MG" => "Madagascar",
1791
+ "MW" => "Malawi",
1792
+ "MY" => "Malaysia",
1793
+ "MV" => "Maldives",
1794
+ "ML" => "Mali",
1795
+ "MT" => "Malta",
1796
+ "MH" => "Marshall Islands",
1797
+ "MQ" => "Martinique",
1798
+ "MR" => "Mauritania",
1799
+ "MU" => "Mauritius",
1800
+ "YT" => "Mayotte",
1801
+ "MX" => "Mexico",
1802
+ "FM" => "Micronesia, Federated States of",
1803
+ "MD" => "Moldova, Republic of",
1804
+ "MC" => "Monaco",
1805
+ "MN" => "Mongolia",
1806
+ "ME" => "Montenegro",
1807
+ "MS" => "Montserrat",
1808
+ "MA" => "Morocco",
1809
+ "MZ" => "Mozambique",
1810
+ "MM" => "Myanmar",
1811
+ "NA" => "Namibia",
1812
+ "NR" => "Nauru",
1813
+ "NP" => "Nepal",
1814
+ "NL" => "Netherlands",
1815
+ "NC" => "New Caledonia",
1816
+ "NZ" => "New Zealand",
1817
+ "NI" => "Nicaragua",
1818
+ "NE" => "Niger",
1819
+ "NG" => "Nigeria",
1820
+ "NU" => "Niue",
1821
+ "NF" => "Norfolk Island",
1822
+ "MP" => "Northern Mariana Islands",
1823
+ "NO" => "Norway",
1824
+ "OM" => "Oman",
1825
+ "PK" => "Pakistan",
1826
+ "PW" => "Palau",
1827
+ "PS" => "Palestine, State of",
1828
+ "PA" => "Panama",
1829
+ "PG" => "Papua New Guinea",
1830
+ "PY" => "Paraguay",
1831
+ "PE" => "Peru",
1832
+ "PH" => "Philippines",
1833
+ "PN" => "Pitcairn",
1834
+ "PL" => "Poland",
1835
+ "PT" => "Portugal",
1836
+ "PR" => "Puerto Rico",
1837
+ "QA" => "Qatar",
1838
+ "RE" => "Reunion",
1839
+ "RO" => "Romania",
1840
+ "RU" => "Russian Federation",
1841
+ "RW" => "Rwanda",
1842
+ "BL" => "Saint Barthélemy",
1843
+ "SH" => "Saint Helena, Ascension and Tristan da Cunha",
1844
+ "KN" => "Saint Kitts and Nevis",
1845
+ "LC" => "Saint Lucia",
1846
+ "MF" => "Saint Martin (French part)",
1847
+ "PM" => "Saint Pierre and Miquelon",
1848
+ "VC" => "Saint Vincent and the Grenadines",
1849
+ "WS" => "Samoa",
1850
+ "SM" => "San Marino",
1851
+ "ST" => "Sao Tome and Principe",
1852
+ "SA" => "Saudi Arabia",
1853
+ "SN" => "Senegal",
1854
+ "RS" => "Serbia",
1855
+ "SC" => "Seychelles",
1856
+ "SL" => "Sierra Leone",
1857
+ "SG" => "Singapore",
1858
+ "SX" => "Sint Maarten (Dutch part)",
1859
+ "SK" => "Slovakia",
1860
+ "SI" => "Slovenia",
1861
+ "SB" => "Solomon Islands",
1862
+ "SO" => "Somalia",
1863
+ "ZA" => "South Africa",
1864
+ "GS" => "South Georgia and the South Sandwich Islands",
1865
+ "SS" => "South Sudan",
1866
+ "ES" => "Spain",
1867
+ "LK" => "Sri Lanka",
1868
+ "SD" => "Sudan",
1869
+ "SR" => "Suriname",
1870
+ "SJ" => "Svalbard and Jan Mayen",
1871
+ "SZ" => "Swaziland",
1872
+ "SE" => "Sweden",
1873
+ "CH" => "Switzerland",
1874
+ "SY" => "Syrian Arab Republic",
1875
+ "TW" => "Taiwan, Province of China",
1876
+ "TJ" => "Tajikistan",
1877
+ "TZ" => "Tanzania, United Republic of",
1878
+ "TH" => "Thailand",
1879
+ "TL" => "Timor-Leste",
1880
+ "TG" => "Togo",
1881
+ "TK" => "Tokelau",
1882
+ "TO" => "Tonga",
1883
+ "TT" => "Trinidad and Tobago",
1884
+ "TN" => "Tunisia",
1885
+ "TR" => "Turkey",
1886
+ "TM" => "Turkmenistan",
1887
+ "TC" => "Turks and Caicos Islands",
1888
+ "TV" => "Tuvalu",
1889
+ "UG" => "Uganda",
1890
+ "UA" => "Ukraine",
1891
+ "AE" => "United Arab Emirates",
1892
+ "GB" => "United Kingdom",
1893
+ "US" => "United States",
1894
+ "UM" => "United States Minor Outlying Islands",
1895
+ "UY" => "Uruguay",
1896
+ "UZ" => "Uzbekistan",
1897
+ "VU" => "Vanuatu",
1898
+ "VE" => "Venezuela, Bolivarian Republic of",
1899
+ "VN" => "Viet Nam",
1900
+ "VG" => "Virgin Islands, British",
1901
+ "VI" => "Virgin Islands, U.S.",
1902
+ "WF" => "Wallis and Futuna",
1903
+ "EH" => "Western Sahara",
1904
+ "YE" => "Yemen",
1905
+ "ZM" => "Zambia",
1906
+ "ZW" => "Zimbabwe",
1907
+ );
1908
+
1909
+ return apply_filters('kcseo_country_list', $countryList);
1910
+ }
1911
+
1912
+ static function getContactTypes() {
1913
+ $contact_types = array(
1914
+ "customer service",
1915
+ "customer support",
1916
+ "technical support",
1917
+ "billing support",
1918
+ "bill payment",
1919
+ "sales",
1920
+ "reservations",
1921
+ "credit card support",
1922
+ "emergency",
1923
+ "baggage tracking",
1924
+ "roadside assistance",
1925
+ "package tracking"
1926
+ );
1927
+
1928
+ return apply_filters('kcseo_contact_types', $contact_types);
1929
+ }
1930
+
1931
+ static function getLanguageList() {
1932
+ $language_list = array(
1933
+ "Akan",
1934
+ "Amharic",
1935
+ "Arabic",
1936
+ "Assamese",
1937
+ "Awadhi",
1938
+ "Azerbaijani",
1939
+ "Balochi",
1940
+ "Belarusian",
1941
+ "Bengali",
1942
+ "Bhojpuri",
1943
+ "Burmese",
1944
+ "Cantonese",
1945
+ "Cebuano",
1946
+ "Chewa",
1947
+ "Chhattisgarhi",
1948
+ "Chittagonian",
1949
+ "Czech",
1950
+ "Deccan",
1951
+ "Dhundhari",
1952
+ "Dutch",
1953
+ "English",
1954
+ "French",
1955
+ "Fula",
1956
+ "Gan",
1957
+ "German",
1958
+ "Greek",
1959
+ "Gujarati",
1960
+ "Haitian Creole",
1961
+ "Hakka",
1962
+ "Haryanvi",
1963
+ "Hausa",
1964
+ "Hiligaynon",
1965
+ "Hindi / Urdu",
1966
+ "Hmong",
1967
+ "Hungarian",
1968
+ "Igbo",
1969
+ "Ilokano",
1970
+ "Italian",
1971
+ "Japanese",
1972
+ "Javanese",
1973
+ "Jin",
1974
+ "Kannada",
1975
+ "Kazakh",
1976
+ "Khmer",
1977
+ "Kinyarwanda",
1978
+ "Kirundi",
1979
+ "Konkani",
1980
+ "Korean",
1981
+ "Kurdish",
1982
+ "Madurese",
1983
+ "Magahi",
1984
+ "Maithili",
1985
+ "Malagasy",
1986
+ "Malay/Indonesian",
1987
+ "Malayalam",
1988
+ "Mandarin",
1989
+ "Marathi",
1990
+ "Marwari",
1991
+ "Min Bei",
1992
+ "Min Dong",
1993
+ "Min Nan",
1994
+ "Mossi",
1995
+ "Nepali",
1996
+ "Oriya",
1997
+ "Oromo",
1998
+ "Pashto",
1999
+ "Persian",
2000
+ "Polish",
2001
+ "Portuguese",
2002
+ "Punjabi",
2003
+ "Quechua",
2004
+ "Romanian",
2005
+ "Russian",
2006
+ "Saraiki",
2007
+ "Serbo-Croatian",
2008
+ "Shona",
2009
+ "Sindhi",
2010
+ "Sinhalese",
2011
+ "Somali",
2012
+ "Spanish",
2013
+ "Sundanese",
2014
+ "Swahili",
2015
+ "Swedish",
2016
+ "Sylheti",
2017
+ "Tagalog",
2018
+ "Tamil",
2019
+ "Telugu",
2020
+ "Thai",
2021
+ "Turkish",
2022
+ "Ukrainian",
2023
+ "Uyghur",
2024
+ "Uzbek",
2025
+ "Vietnamese",
2026
+ "Wu",
2027
+ "Xhosa",
2028
+ "Xiang",
2029
+ "Yoruba",
2030
+ "Zulu",
2031
+ );
2032
+
2033
+ return apply_filters('kcseo_language_list', $language_list);
2034
+ }
2035
+
2036
+ static function getSocialList() {
2037
+ $socialList = array(
2038
+ 'facebook' => __('Facebook'),
2039
+ 'twitter' => __('Twitter'),
2040
+ 'google-plus' => __('Google+'),
2041
+ 'instagram' => __('Instagram'),
2042
+ 'youtube' => __('Youtube'),
2043
+ 'linkedin' => __('LinkedIn'),
2044
+ 'myspace' => __('Myspace'),
2045
+ 'pinterest' => __('Pinterest'),
2046
+ 'soundcloud' => __('SoundCloud'),
2047
+ 'tumblr' => __('Tumblr'),
2048
+ 'wikidata' => __('Wikidata'),
2049
+ );
2050
+
2051
+ return apply_filters('kcseo_social_list', $socialList);
2052
+ }
2053
+
2054
+
2055
+ static function announcementLocationTypes() {
2056
+ return apply_filters('kcseo_announcement_location_types', [
2057
+ 'Airport',
2058
+ 'Aquarium',
2059
+ 'Beach',
2060
+ 'Bridge',
2061
+ 'BuddhistTemple',
2062
+ 'BusStation',
2063
+ 'BusStop',
2064
+ 'Campground',
2065
+ 'CatholicChurch',
2066
+ 'Cemetery',
2067
+ 'Church',
2068
+ 'CivicStructure',
2069
+ 'CityHall',
2070
+ 'CollegeOrUniversity',
2071
+ 'Courthouse',
2072
+ 'CovidTestingFacility',
2073
+ 'Crematorium',
2074
+ 'DefenceEstablishment',
2075
+ 'EducationalOrganization',
2076
+ 'ElementarySchool',
2077
+ 'Embassy',
2078
+ 'EventVenue',
2079
+ 'FireStation',
2080
+ 'GovernmentBuilding',
2081
+ 'HighSchool',
2082
+ 'HinduTemple',
2083
+ 'Hospital',
2084
+ 'LegislativeBuilding',
2085
+ 'MiddleSchool',
2086
+ 'Mosque',
2087
+ 'MovieTheater',
2088
+ 'Museum',
2089
+ 'MusicVenue',
2090
+ 'Park',
2091
+ 'ParkingFacility',
2092
+ 'PerformingArtsTheater',
2093
+ 'PlaceOfWorship',
2094
+ 'Playground',
2095
+ 'PoliceStation',
2096
+ 'Preschool',
2097
+ 'RVPark',
2098
+ 'School',
2099
+ 'StadiumOrArena',
2100
+ 'SubwayStation',
2101
+ 'Synagogue',
2102
+ 'TaxiStand',
2103
+ 'TrainStation',
2104
+ 'Zoo',
2105
+ ]);
2106
+ }
2107
+
2108
+ static function getReviewNotice() {
2109
+ $html = null;
2110
+ $html = '<span>As of September, Google made a major change to review snippet schema and structure data markup. Google no longer support "self-serving" independent markup tied to the general types and has narrow support to specific types.</span><br><br>
2111
+ <span>You can read more about Google\'s change here:<br><a target="_blank" href="https://webmasters.googleblog.com/2019/09/making-review-rich-results-more-helpful.html">https://webmasters.googleblog.com/2019/09/making-review-rich-results-more-helpful.html</a></span><br><br>
2112
+ <span style="font-weight: bold">If you are a user of our plugin prior to September 2019, you need to remove the review schema for this tab on all pages and post where you\'ve it for reviews and add back to the supported types (such as: book, course, event, movie, product, recipe, etc):</span><br><br>
2113
+ <span style="display: block;margin: 0 auto;max-width: 800px;">1. Simple uncheck the "enable" tab in this section<br>
2114
+ 2. Update the page or post to remove the review schema.<br>
2115
+ 3. Then re-add new review schema within the appropriet type tab(i.e. book, course, event, movie, product, recipe, etc)</span>
2116
+ <br>To review Google\'s documentation on <a target="_blank" href="https://developers.google.com/search/docs/data-types/review-snippet">https://developers.google.com/search/docs/data-types/review-snippet</a>';
2117
+
2118
+ return $html;
2119
+ }
2120
+
2121
  }
lib/init.php CHANGED
@@ -1,147 +1,147 @@
1
- <?php
2
-
3
- if ( ! class_exists( 'KcSeoWPSchema' ) ) {
4
-
5
- class KcSeoWPSchema {
6
- public $options;
7
- public $KcSeoPrefix;
8
-
9
- /**
10
- * Store the singleton object.
11
- */
12
- private static $singleton = false;
13
-
14
-
15
- /**
16
- * Fetch an instance of the class.
17
- */
18
- public static function getInstance() {
19
- if ( self::$singleton === false ) {
20
- self::$singleton = new self();
21
- }
22
-
23
- return self::$singleton;
24
- }
25
-
26
- function __construct() {
27
- $this->KcSeoPrefix = "_schema_";
28
- $this->options = array(
29
- 'main_settings' => 'kcseo_wp_schema_settings',
30
- 'settings' => 'kcseo_wp_schema',
31
- 'installed_version' => 'kcseo_wp_installed_version',
32
- 'version' => KCSEO_WP_SCHEMA_VERSION,
33
- '1_2_fix' => "kcseo_wp_1_2_data_fix"
34
- );
35
-
36
- $this->incPath = dirname( __FILE__ );
37
- $this->functionsPath = $this->incPath . '/functions/';
38
- $this->classesPath = $this->incPath . '/classes/';
39
- $this->viewsPath = $this->incPath . '/views/';
40
- $this->assetsUrl = KCSEO_WP_SCHEMA_URL . '/assets/';
41
- $this->modelPath = $this->incPath . '/models/';
42
-
43
- $this->KeSeoLoadFunctions( $this->functionsPath );
44
- $this->KcSeoLoadModel( $this->modelPath );
45
- $this->KcSeoLoadClass( $this->classesPath );
46
-
47
- }
48
-
49
- function KcSeoLoadClass( $dir ) {
50
- if ( ! file_exists( $dir ) ) {
51
- return;
52
- }
53
- $classes = array();
54
- foreach ( scandir( $dir ) as $item ) {
55
- if ( preg_match( "/.php$/i", $item ) ) {
56
- require_once( $dir . $item );
57
- $className = str_replace( ".php", "", $item );
58
- $classes[] = new $className;
59
- }
60
- }
61
-
62
- if ( $classes ) {
63
- foreach ( $classes as $class ) {
64
- $this->objects[] = $class;
65
- }
66
- }
67
- }
68
-
69
- function KcSeoLoadModel( $dir ) {
70
- if ( ! file_exists( $dir ) ) {
71
- return;
72
- }
73
- foreach ( scandir( $dir ) as $item ) {
74
- if ( preg_match( "/.php$/i", $item ) ) {
75
- require_once( $dir . $item );
76
- }
77
- }
78
- }
79
-
80
- function KeSeoLoadFunctions( $dir ) {
81
- if ( ! file_exists( $dir ) ) {
82
- return;
83
- }
84
- foreach ( scandir( $dir ) as $item ) {
85
- if ( preg_match( "/.php$/i", $item ) ) {
86
- require_once( $dir . $item );
87
- }
88
- }
89
- }
90
-
91
- function render( $viewName, $args = array() ) {
92
- global $KcSeoWPSchema;
93
- $path = str_replace( ".", "/", $viewName );
94
- $viewPath = $KcSeoWPSchema->viewsPath . $path . '.php';
95
- if ( ! file_exists( $viewPath ) ) {
96
- return;
97
- }
98
-
99
- if ( $args ) {
100
- extract( $args );
101
- }
102
- $pageReturn = include $viewPath;
103
- if ( $pageReturn AND $pageReturn <> 1 ) {
104
- return $pageReturn;
105
- }
106
- }
107
-
108
- /**
109
- * Dynamicaly call any method from models class
110
- * by pluginFramework instance
111
- */
112
- function __call( $name, $args ) {
113
- if ( ! is_array( $this->objects ) ) {
114
- return;
115
- }
116
- foreach ( $this->objects as $object ) {
117
- if ( method_exists( $object, $name ) ) {
118
- $count = count( $args );
119
- if ( $count == 0 ) {
120
- return $object->$name();
121
- } elseif ( $count == 1 ) {
122
- return $object->$name( $args[0] );
123
- } elseif ( $count == 2 ) {
124
- return $object->$name( $args[0], $args[1] );
125
- } elseif ( $count == 3 ) {
126
- return $object->$name( $args[0], $args[1], $args[2] );
127
- } elseif ( $count == 4 ) {
128
- return $object->$name( $args[0], $args[1], $args[2], $args[3] );
129
- } elseif ( $count == 5 ) {
130
- return $object->$name( $args[0], $args[1], $args[2], $args[3], $args[4] );
131
- } elseif ( $count == 6 ) {
132
- return $object->$name( $args[0], $args[1], $args[2], $args[3], $args[4], $args[5] );
133
- }
134
- }
135
- }
136
- }
137
- }
138
-
139
- global $KcSeoWPSchema;
140
- if ( ! is_object( $KcSeoWPSchema ) ) {
141
- $KcSeoWPSchema = kcseo();
142
- }
143
- }
144
-
145
- function kcseo() {
146
- return KcseoWPSchema::getInstance();
147
- }
1
+ <?php
2
+
3
+ if ( ! class_exists( 'KcSeoWPSchema' ) ) {
4
+
5
+ class KcSeoWPSchema {
6
+ public $options;
7
+ public $KcSeoPrefix;
8
+
9
+ /**
10
+ * Store the singleton object.
11
+ */
12
+ private static $singleton = false;
13
+
14
+
15
+ /**
16
+ * Fetch an instance of the class.
17
+ */
18
+ public static function getInstance() {
19
+ if ( self::$singleton === false ) {
20
+ self::$singleton = new self();
21
+ }
22
+
23
+ return self::$singleton;
24
+ }
25
+
26
+ function __construct() {
27
+ $this->KcSeoPrefix = "_schema_";
28
+ $this->options = array(
29
+ 'main_settings' => 'kcseo_wp_schema_settings',
30
+ 'settings' => 'kcseo_wp_schema',
31
+ 'installed_version' => 'kcseo_wp_installed_version',
32
+ 'version' => KCSEO_WP_SCHEMA_VERSION,
33
+ '1_2_fix' => "kcseo_wp_1_2_data_fix"
34
+ );
35
+
36
+ $this->incPath = dirname( __FILE__ );
37
+ $this->functionsPath = $this->incPath . '/functions/';
38
+ $this->classesPath = $this->incPath . '/classes/';
39
+ $this->viewsPath = $this->incPath . '/views/';
40
+ $this->assetsUrl = KCSEO_WP_SCHEMA_URL . '/assets/';
41
+ $this->modelPath = $this->incPath . '/models/';
42
+
43
+ $this->KeSeoLoadFunctions( $this->functionsPath );
44
+ $this->KcSeoLoadModel( $this->modelPath );
45
+ $this->KcSeoLoadClass( $this->classesPath );
46
+
47
+ }
48
+
49
+ function KcSeoLoadClass( $dir ) {
50
+ if ( ! file_exists( $dir ) ) {
51
+ return;
52
+ }
53
+ $classes = array();
54
+ foreach ( scandir( $dir ) as $item ) {
55
+ if ( preg_match( "/.php$/i", $item ) ) {
56
+ require_once( $dir . $item );
57
+ $className = str_replace( ".php", "", $item );
58
+ $classes[] = new $className;
59
+ }
60
+ }
61
+
62
+ if ( $classes ) {
63
+ foreach ( $classes as $class ) {
64
+ $this->objects[] = $class;
65
+ }
66
+ }
67
+ }
68
+
69
+ function KcSeoLoadModel( $dir ) {
70
+ if ( ! file_exists( $dir ) ) {
71
+ return;
72
+ }
73
+ foreach ( scandir( $dir ) as $item ) {
74
+ if ( preg_match( "/.php$/i", $item ) ) {
75
+ require_once( $dir . $item );
76
+ }
77
+ }
78
+ }
79
+
80
+ function KeSeoLoadFunctions( $dir ) {
81
+ if ( ! file_exists( $dir ) ) {
82
+ return;
83
+ }
84
+ foreach ( scandir( $dir ) as $item ) {
85
+ if ( preg_match( "/.php$/i", $item ) ) {
86
+ require_once( $dir . $item );
87
+ }
88
+ }
89
+ }
90
+
91
+ function render( $viewName, $args = array() ) {
92
+ global $KcSeoWPSchema;
93
+ $path = str_replace( ".", "/", $viewName );
94
+ $viewPath = $KcSeoWPSchema->viewsPath . $path . '.php';
95
+ if ( ! file_exists( $viewPath ) ) {
96
+ return;
97
+ }
98
+
99
+ if ( $args ) {
100
+ extract( $args );
101
+ }
102
+ $pageReturn = include $viewPath;
103
+ if ( $pageReturn AND $pageReturn <> 1 ) {
104
+ return $pageReturn;
105
+ }
106
+ }
107
+
108
+ /**
109
+ * Dynamicaly call any method from models class
110
+ * by pluginFramework instance
111
+ */
112
+ function __call( $name, $args ) {
113
+ if ( ! is_array( $this->objects ) ) {
114
+ return;
115
+ }
116
+ foreach ( $this->objects as $object ) {
117
+ if ( method_exists( $object, $name ) ) {
118
+ $count = count( $args );
119
+ if ( $count == 0 ) {
120
+ return $object->$name();
121
+ } elseif ( $count == 1 ) {
122
+ return $object->$name( $args[0] );
123
+ } elseif ( $count == 2 ) {
124
+ return $object->$name( $args[0], $args[1] );
125
+ } elseif ( $count == 3 ) {
126
+ return $object->$name( $args[0], $args[1], $args[2] );
127
+ } elseif ( $count == 4 ) {
128
+ return $object->$name( $args[0], $args[1], $args[2], $args[3] );
129
+ } elseif ( $count == 5 ) {
130
+ return $object->$name( $args[0], $args[1], $args[2], $args[3], $args[4] );
131
+ } elseif ( $count == 6 ) {
132
+ return $object->$name( $args[0], $args[1], $args[2], $args[3], $args[4], $args[5] );
133
+ }
134
+ }
135
+ }
136
+ }
137
+ }
138
+
139
+ global $KcSeoWPSchema;
140
+ if ( ! is_object( $KcSeoWPSchema ) ) {
141
+ $KcSeoWPSchema = kcseo();
142
+ }
143
+ }
144
+
145
+ function kcseo() {
146
+ return KcseoWPSchema::getInstance();
147
+ }
lib/models/KcSeoSchemaModel.php CHANGED
@@ -1,1186 +1,1186 @@
1
- <?php
2
-
3
- if (!class_exists('KcSeoSchemaModel')):
4
- class KcSeoSchemaModel
5
- {
6
-
7
- function __construct() {
8
-
9
- }
10
-
11
- function schemaOutput($schemaID, $metaData) {
12
- $html = null;
13
-
14
- if ($schemaID) {
15
- global $KcSeoWPSchema;
16
- switch ($schemaID) {
17
- case "article":
18
- $article = array(
19
- "@context" => "https://schema.org",
20
- "@type" => "Article"
21
- );
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['author_url']) ) {
38
- $article["author"]['url'] = $KcSeoWPSchema->sanitizeOutPut($metaData['author_url'], 'url');
39
- }
40
- }
41
- if (!empty($metaData['publisher'])) {
42
- if (!empty($metaData['publisherImage'])) {
43
- $img = $KcSeoWPSchema->imageInfo(absint($metaData['publisherImage']));
44
- $plA = array(
45
- "@type" => "ImageObject",
46
- "url" => $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url'),
47
- "height" => $img['height'],
48
- "width" => $img['width']
49
- );
50
- } else {
51
- $plA = array();
52
- }
53
- $article["publisher"] = array(
54
- "@type" => "Organization",
55
- "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['publisher']),
56
- "logo" => $plA
57
- );
58
- }
59
- if (!empty($metaData['alternativeHeadline'])) {
60
- $article["alternativeHeadline"] = $KcSeoWPSchema->sanitizeOutPut($metaData['alternativeHeadline']);
61
- }
62
- if (!empty($metaData['image'])) {
63
- $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
64
- $article["image"] = array(
65
- "@type" => "ImageObject",
66
- "url" => $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url'),
67
- "height" => $img['height'],
68
- "width" => $img['width']
69
- );
70
- }
71
- if (!empty($metaData['datePublished'])) {
72
- $article["datePublished"] = $KcSeoWPSchema->sanitizeOutPut($metaData['datePublished']);
73
- }
74
- if (!empty($metaData['dateModified'])) {
75
- $article["dateModified"] = $KcSeoWPSchema->sanitizeOutPut($metaData['dateModified']);
76
- }
77
- if (!empty($metaData['description'])) {
78
- $article["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
79
- 'textarea');
80
- }
81
- if (!empty($metaData['articleBody'])) {
82
- $article["articleBody"] = $KcSeoWPSchema->sanitizeOutPut($metaData['articleBody'],
83
- 'textarea');
84
- }
85
-
86
- if ( isset($metaData['video']) && is_array($metaData['video']) ) {
87
- $article_video = array();
88
- foreach ($metaData['video'] as $video_single) {
89
- if ( $video_single['name'] && $video_single['embedUrl'] ) {
90
- $video_single_schema = array(
91
- "@type" => "VideoObject",
92
- "name" => $video_single['name'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['name']) : '',
93
- "description" => $video_single['description'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['description']) : '',
94
- "contentUrl" => $video_single['contentUrl'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['contentUrl']) : '',
95
- "embedUrl" => $video_single['embedUrl'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['embedUrl']) : '',
96
- "uploadDate" => $video_single['uploadDate'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['uploadDate']) : '',
97
- "duration" => $video_single['duration'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['duration']) : '',
98
- );
99
- if (!empty($video_single['thumbnailUrl'])) {
100
- $img = $KcSeoWPSchema->imageInfo(absint($video_single['thumbnailUrl']));
101
- $video_single_schema["thumbnailUrl"] = $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url');
102
- }
103
-
104
- $article_video = $video_single_schema;
105
- }
106
- }
107
- if ( $article_video ) {
108
- $article['video'] = $article_video;
109
- }
110
- }
111
-
112
- if ( isset($metaData['audio']) && is_array($metaData['audio']) ) {
113
- $article_audio = array();
114
- foreach ($metaData['audio'] as $audio_single) {
115
- if ( $audio_single['name'] && $audio_single['contentUrl'] ) {
116
- $audio_single_schema = array(
117
- "@type" => "AudioObject",
118
- "name" => $audio_single['name'] ? $KcSeoWPSchema->sanitizeOutPut($audio_single['name']) : '',
119
- "description" => $audio_single['description'] ? $KcSeoWPSchema->sanitizeOutPut($audio_single['description']) : '',
120
- "duration" => $audio_single['duration'] ? $KcSeoWPSchema->sanitizeOutPut($audio_single['duration']) : '',
121
- "contentUrl" => $audio_single['contentUrl'] ? $KcSeoWPSchema->sanitizeOutPut($audio_single['contentUrl']) : '',
122
- "encodingFormat" => $audio_single['encodingFormat'] ? $KcSeoWPSchema->sanitizeOutPut($audio_single['encodingFormat']) : '',
123
- );
124
-
125
- $article_audio = $audio_single_schema;
126
- }
127
- }
128
- if ( $article_audio ) {
129
- $article['audio'] = $article_audio;
130
- }
131
- }
132
-
133
- $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_article', $article, $metaData));
134
- break;
135
-
136
- case "news_article":
137
- $newsArticle = array(
138
- "@context" => "https://schema.org",
139
- "@type" => "NewsArticle"
140
- );
141
- if (!empty($metaData['headline'])) {
142
- $newsArticle["headline"] = $KcSeoWPSchema->sanitizeOutPut($metaData['headline']);
143
- }
144
- if (!empty($metaData['mainEntityOfPage'])) {
145
- $newsArticle["mainEntityOfPage"] = array(
146
- "@type" => "WebPage",
147
- "@id" => $KcSeoWPSchema->sanitizeOutPut($metaData["mainEntityOfPage"])
148
- );
149
- }
150
- if (!empty($metaData['author'])) {
151
- $newsArticle["author"] = array(
152
- "@type" => "Person",
153
- "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['author'])
154
- );
155
-
156
- if ( !empty($metaData['author_url']) ) {
157
- $newsArticle["author"]['url'] = $KcSeoWPSchema->sanitizeOutPut($metaData['author_url'], 'url');
158
- }
159
- }
160
- if (!empty($metaData['image'])) {
161
- $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
162
- $newsArticle["image"] = array(
163
- "@type" => "ImageObject",
164
- "url" => $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url'),
165
- "height" => $img['height'],
166
- "width" => $img['width']
167
- );
168
- }
169
- if (!empty($metaData['datePublished'])) {
170
- $newsArticle["datePublished"] = $KcSeoWPSchema->sanitizeOutPut($metaData['datePublished']);
171
- }
172
- if (!empty($metaData['dateModified'])) {
173
- $newsArticle["dateModified"] = $KcSeoWPSchema->sanitizeOutPut($metaData['dateModified']);
174
- }
175
- if (!empty($metaData['publisher'])) {
176
- if (!empty($metaData['publisherImage'])) {
177
- $img = $KcSeoWPSchema->imageInfo(absint($metaData['publisherImage']));
178
- $plA = array(
179
- "@type" => "ImageObject",
180
- "url" => $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url'),
181
- "height" => $img['height'],
182
- "width" => $img['width']
183
- );
184
- } else {
185
- $plA = array();
186
- }
187
- $newsArticle["publisher"] = array(
188
- "@type" => "Organization",
189
- "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['publisher']),
190
- "logo" => $plA
191
- );
192
- }
193
- if (!empty($metaData['description'])) {
194
- $newsArticle["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
195
- 'textarea');
196
- }
197
- if (!empty($metaData['articleBody'])) {
198
- $newsArticle["articleBody"] = $KcSeoWPSchema->sanitizeOutPut($metaData['articleBody'],
199
- 'textarea');
200
- }
201
-
202
- if ( isset($metaData['video']) && is_array($metaData['video']) ) {
203
- $news_article_video = array();
204
- foreach ($metaData['video'] as $video_single) {
205
- if ( $video_single['name'] && $video_single['embedUrl'] ) {
206
- $video_single_schema = array(
207
- "@type" => "VideoObject",
208
- "name" => $video_single['name'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['name']) : '',
209
- "description" => $video_single['description'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['description']) : '',
210
- "contentUrl" => $video_single['contentUrl'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['contentUrl']) : '',
211
- "embedUrl" => $video_single['embedUrl'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['embedUrl']) : '',
212
- "uploadDate" => $video_single['uploadDate'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['uploadDate']) : '',
213
- "duration" => $video_single['duration'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['duration']) : '',
214
- );
215
- if (!empty($video_single['thumbnailUrl'])) {
216
- $img = $KcSeoWPSchema->imageInfo(absint($video_single['thumbnailUrl']));
217
- $video_single_schema["thumbnailUrl"] = $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url');
218
- }
219
-
220
- $news_article_video = $video_single_schema;
221
- }
222
- }
223
- if ( $news_article_video ) {
224
- $newsArticle['video'] = $news_article_video;
225
- }
226
- }
227
-
228
- if ( isset($metaData['audio']) && is_array($metaData['audio']) ) {
229
- $news_article_audio = array();
230
- foreach ($metaData['audio'] as $audio_single) {
231
- if ( $audio_single['name'] && $audio_single['contentUrl'] ) {
232
- $audio_single_schema = array(
233
- "@type" => "AudioObject",
234
- "name" => $audio_single['name'] ? $KcSeoWPSchema->sanitizeOutPut($audio_single['name']) : '',
235
- "description" => $audio_single['description'] ? $KcSeoWPSchema->sanitizeOutPut($audio_single['description']) : '',
236
- "duration" => $audio_single['duration'] ? $KcSeoWPSchema->sanitizeOutPut($audio_single['duration']) : '',
237
- "contentUrl" => $audio_single['contentUrl'] ? $KcSeoWPSchema->sanitizeOutPut($audio_single['contentUrl']) : '',
238
- "encodingFormat" => $audio_single['encodingFormat'] ? $KcSeoWPSchema->sanitizeOutPut($audio_single['encodingFormat']) : '',
239
- );
240
-
241
- $news_article_audio = $audio_single_schema;
242
- }
243
- }
244
- if ( $news_article_audio ) {
245
- $newsArticle['audio'] = $news_article_audio;
246
- }
247
- }
248
-
249
- $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_news_article', $newsArticle, $metaData));
250
- break;
251
-
252
- case "blog_posting":
253
- $blogPosting = array(
254
- "@context" => "https://schema.org",
255
- "@type" => "BlogPosting"
256
- );
257
- if (!empty($metaData['headline'])) {
258
- $blogPosting["headline"] = $KcSeoWPSchema->sanitizeOutPut($metaData['headline']);
259
- }
260
- if (!empty($metaData['mainEntityOfPage'])) {
261
- $blogPosting["mainEntityOfPage"] = array(
262
- "@type" => "WebPage",
263
- "@id" => $KcSeoWPSchema->sanitizeOutPut($metaData["mainEntityOfPage"])
264
- );
265
- }
266
- if (!empty($metaData['author'])) {
267
- $blogPosting["author"] = array(
268
- "@type" => "Person",
269
- "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['author'])
270
- );
271
-
272
- if ( !empty($metaData['author_url']) ) {
273
- $blogPosting["author"]['url'] = $KcSeoWPSchema->sanitizeOutPut($metaData['author_url'], 'url');
274
- }
275
- }
276
- if (!empty($metaData['image'])) {
277
- $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
278
- $blogPosting["image"] = array(
279
- "@type" => "ImageObject",
280
- "url" => $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url'),
281
- "height" => $img['height'],
282
- "width" => $img['width']
283
- );
284
- }
285
- if (!empty($metaData['datePublished'])) {
286
- $blogPosting["datePublished"] = $KcSeoWPSchema->sanitizeOutPut($metaData['datePublished']);
287
- }
288
- if (!empty($metaData['dateModified'])) {
289
- $blogPosting["dateModified"] = $KcSeoWPSchema->sanitizeOutPut($metaData['dateModified']);
290
- }
291
- if (!empty($metaData['publisher'])) {
292
- if (!empty($metaData['publisherImage'])) {
293
- $img = $KcSeoWPSchema->imageInfo(absint($metaData['publisherImage']));
294
- $plA = array(
295
- "@type" => "ImageObject",
296
- "url" => $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url'),
297
- "height" => $img['height'],
298
- "width" => $img['width']
299
- );
300
- } else {
301
- $plA = array();
302
- }
303
- $blogPosting["publisher"] = array(
304
- "@type" => "Organization",
305
- "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['publisher']),
306
- "logo" => $plA
307
- );
308
- }
309
- if (!empty($metaData['description'])) {
310
- $blogPosting["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
311
- 'textarea');
312
- }
313
- if (!empty($metaData['articleBody'])) {
314
- $blogPosting["articleBody"] = $KcSeoWPSchema->sanitizeOutPut($metaData['articleBody'],
315
- 'textarea');
316
- }
317
-
318
- if ( isset($metaData['video']) && is_array($metaData['video']) ) {
319
- $blog_posting_video = array();
320
- foreach ($metaData['video'] as $video_single) {
321
- if ( $video_single['name'] && $video_single['embedUrl'] ) {
322
- $video_single_schema = array(
323
- "@type" => "VideoObject",
324
- "name" => $video_single['name'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['name']) : '',
325
- "description" => $video_single['description'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['description']) : '',
326
- "contentUrl" => $video_single['contentUrl'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['contentUrl']) : '',
327
- "embedUrl" => $video_single['embedUrl'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['embedUrl']) : '',
328
- "uploadDate" => $video_single['uploadDate'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['uploadDate']) : '',
329
- "duration" => $video_single['duration'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['duration']) : '',
330
- );
331
- if (!empty($video_single['thumbnailUrl'])) {
332
- $img = $KcSeoWPSchema->imageInfo(absint($video_single['thumbnailUrl']));
333
- $video_single_schema["thumbnailUrl"] = $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url');
334
- }
335
-
336
- $blog_posting_video = $video_single_schema;
337
- }
338
- }
339
- if ( $blog_posting_video ) {
340
- $blogPosting['video'] = $blog_posting_video;
341
- }
342
- }
343
-
344
- if ( isset($metaData['audio']) && is_array($metaData['audio']) ) {
345
- $blog_posting_audio = array();
346
- foreach ($metaData['audio'] as $audio_single) {
347
- if ( $audio_single['name'] && $audio_single['contentUrl'] ) {
348
- $audio_single_schema = array(
349
- "@type" => "AudioObject",
350
- "name" => $audio_single['name'] ? $KcSeoWPSchema->sanitizeOutPut($audio_single['name']) : '',
351
- "description" => $audio_single['description'] ? $KcSeoWPSchema->sanitizeOutPut($audio_single['description']) : '',
352
- "duration" => $audio_single['duration'] ? $KcSeoWPSchema->sanitizeOutPut($audio_single['duration']) : '',
353
- "contentUrl" => $audio_single['contentUrl'] ? $KcSeoWPSchema->sanitizeOutPut($audio_single['contentUrl']) : '',
354
- "encodingFormat" => $audio_single['encodingFormat'] ? $KcSeoWPSchema->sanitizeOutPut($audio_single['encodingFormat']) : '',
355
- );
356
-
357
- $blog_posting_audio = $audio_single_schema;
358
- }
359
- }
360
- if ( $blog_posting_audio ) {
361
- $blogPosting['audio'] = $blog_posting_audio;
362
- }
363
- }
364
-
365
- $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_blog_posting', $blogPosting, $metaData));
366
- break;
367
-
368
- case 'event':
369
- $event = array(
370
- "@context" => "https://schema.org",
371
- "@type" => "Event"
372
- );
373
- if (!empty($metaData['name'])) {
374
- $event["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
375
- }
376
- if (!empty($metaData['startDate'])) {
377
- $event["startDate"] = $KcSeoWPSchema->sanitizeOutPut($metaData['startDate']);
378
- }
379
- if (!empty($metaData['endDate'])) {
380
- $event["endDate"] = $KcSeoWPSchema->sanitizeOutPut($metaData['endDate']);
381
- }
382
- if (!empty($metaData['description'])) {
383
- $event["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
384
- 'textarea');
385
- }
386
- if (!empty($metaData['performerName'])) {
387
- $event["performer"] = array(
388
- "@type" => "Person",
389
- "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['performerName'])
390
- );
391
- }
392
- if (!empty($metaData['image'])) {
393
- $event["image"] = $KcSeoWPSchema->sanitizeOutPut($metaData['image'], 'url');
394
- }
395
- if (!empty($metaData['locationName'])) {
396
- $event["location"] = array(
397
- "@type" => "Place",
398
- "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['locationName']),
399
- "address" => $KcSeoWPSchema->sanitizeOutPut($metaData['locationAddress'])
400
- );
401
- }
402
- if (!empty($metaData['price'])) {
403
- $event["offers"] = array(
404
- "@type" => "Offer",
405
- "price" => $KcSeoWPSchema->sanitizeOutPut($metaData['price'])
406
- );
407
- if (!empty($metaData['priceCurrency'])) {
408
- $event["offers"]['priceCurrency'] = $KcSeoWPSchema->sanitizeOutPut($metaData['priceCurrency']);
409
- }
410
- if (!empty($metaData['url'])) {
411
- $event["offers"]['url'] = $KcSeoWPSchema->sanitizeOutPut($metaData['url'], 'url');
412
- }
413
- if (!empty($metaData['availability'])) {
414
- $event["offers"]['availability'] = $KcSeoWPSchema->sanitizeOutPut($metaData['availability']);
415
- }
416
- if (!empty($metaData['validFrom'])) {
417
- $event["offers"]['validFrom'] = $KcSeoWPSchema->sanitizeOutPut($metaData['validFrom']);
418
- }
419
- }
420
- if (!empty($metaData['url'])) {
421
- $event["url"] = $KcSeoWPSchema->sanitizeOutPut($metaData['url'], 'url');
422
- }
423
- $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_event', $event, $metaData));
424
- if (isset($metaData['review_active'])) {
425
- $event_review = array(
426
- "@context" => "https://schema.org",
427
- "@type" => "Review"
428
- );
429
-
430
- if (isset($metaData['review_datePublished']) && !empty($metaData['review_datePublished'])) {
431
- $event_review["datePublished"] = $KcSeoWPSchema->sanitizeOutPut($metaData['review_datePublished']);
432
- }
433
- if (isset($metaData['review_body']) && !empty($metaData['review_body'])) {
434
- $event_review["reviewBody"] = $KcSeoWPSchema->sanitizeOutPut($metaData['review_body'], 'textarea');
435
- }
436
- unset($event['@context']);
437
- $event_review["itemReviewed"] = $event;
438
- if (!empty($metaData['review_author'])) {
439
- $event_review["author"] = array(
440
- "@type" => "Person",
441
- "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['review_author'])
442
- );
443
-
444
- if (isset($metaData['review_author_sameAs']) && !empty($metaData['review_author_sameAs'])) {
445
- $sameAs = KcSeoHelper::get_same_as($KcSeoWPSchema->sanitizeOutPut($metaData['review_author_sameAs'], "textarea"));
446
- if (!empty($sameAs)) {
447
- $event_review["author"]["sameAs"] = $sameAs;
448
- }
449
- }
450
- }
451
- if (isset($metaData['review_ratingValue'])) {
452
- $event_review["reviewRating"] = array(
453
- "@type" => "Rating",
454
- "ratingValue" => $KcSeoWPSchema->sanitizeOutPut($metaData['review_ratingValue'], 'number')
455
- );
456
- if (isset($metaData['review_bestRating'])) {
457
- $event_review["reviewRating"]["bestRating"] = $KcSeoWPSchema->sanitizeOutPut($metaData['review_bestRating'], 'number');
458
- }
459
- if (isset($metaData['review_worstRating'])) {
460
- $event_review["reviewRating"]["worstRating"] = $KcSeoWPSchema->sanitizeOutPut($metaData['review_worstRating'], 'number');
461
- }
462
- }
463
-
464
-
465
- $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_event_review', $event_review, $metaData));
466
- }
467
- break;
468
-
469
- case 'product':
470
- $product = array(
471
- "@context" => "https://schema.org",
472
- "@type" => "Product"
473
- );
474
- if (!empty($metaData['name'])) {
475
- $product["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
476
- }
477
- if (!empty($metaData['image'])) {
478
- $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
479
- $product["image"] = $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url');
480
- }
481
- if (!empty($metaData['description'])) {
482
- $product["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description']);
483
- }
484
- /* product identifier */
485
- if (!empty($metaData['sku'])) {
486
- $product["sku"] = $KcSeoWPSchema->sanitizeOutPut($metaData['sku']);
487
- }
488
- if (!empty($metaData['brand'])) {
489
- $product['brand'] = [
490
- "@type" => "Brand",
491
- "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['brand'])
492
- ];
493
- }
494
- if (!empty($metaData['identifier_type']) && !empty($metaData['identifier'])) {
495
- $product[$metaData['identifier_type']] = $KcSeoWPSchema->sanitizeOutPut($metaData['identifier']);
496
- }
497
- if (!empty($metaData['ratingValue'])) {
498
- $product["aggregateRating"] = array(
499
- "@type" => "AggregateRating",
500
- "ratingValue" => !empty($metaData['ratingValue']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['ratingValue']) : null,
501
- "reviewCount" => !empty($metaData['reviewCount']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['reviewCount']) : null
502
- );
503
- }
504
- if (!empty($metaData['reviewRatingValue']) || !empty($metaData['reviewBestRating']) || !empty($metaData['reviewWorstRating'])) {
505
- $product["review"] = array(
506
- "@type" => "Review",
507
- "reviewRating" => array(
508
- "@type" => "Rating",
509
- "ratingValue" => !empty($metaData['reviewRatingValue']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['reviewRatingValue']) : null,
510
- "bestRating" => !empty($metaData['reviewBestRating']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['reviewBestRating']) : null,
511
- "worstRating" => !empty($metaData['reviewWorstRating']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['reviewWorstRating']) : null
512
- ),
513
- "author" => array(
514
- "@type" => "Person",
515
- "name" => !empty($metaData['reviewAuthor']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['reviewAuthor']) : null
516
- )
517
- );
518
- }
519
- if (!empty($metaData['price'])) {
520
- $product["offers"] = array(
521
- "@type" => "Offer",
522
- "price" => $KcSeoWPSchema->sanitizeOutPut($metaData['price']),
523
- "priceValidUntil" => $KcSeoWPSchema->sanitizeOutPut($metaData['priceValidUntil']),
524
- "priceCurrency" => !empty($metaData['priceCurrency']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['priceCurrency']) : null,
525
- "itemCondition" => !empty($metaData['itemCondition']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['itemCondition']) : null,
526
- "availability" => !empty($metaData['availability']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['availability']) : null,
527
- "url" => !empty($metaData['url']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['url']) : null
528
- );
529
- }
530
- $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_product', $product, $metaData));
531
- break;
532
-
533
- case 'video':
534
- $video = array(
535
- "@context" => "https://schema.org",
536
- "@type" => "VideoObject"
537
- );
538
- if (!empty($metaData['name'])) {
539
- $video["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
540
- }
541
- if (!empty($metaData['description'])) {
542
- $video["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'], 'textarea');
543
- }
544
- if (!empty($metaData['thumbnailUrl'])) {
545
- $video["thumbnailUrl"] = $KcSeoWPSchema->sanitizeOutPut($metaData['thumbnailUrl'], 'url');
546
- }
547
- if (!empty($metaData['uploadDate'])) {
548
- $video["uploadDate"] = $KcSeoWPSchema->sanitizeOutPut($metaData['uploadDate']);
549
- }
550
- if (!empty($metaData['duration'])) {
551
- $video["duration"] = $KcSeoWPSchema->sanitizeOutPut($metaData['duration']);
552
- }
553
- if (!empty($metaData['contentUrl'])) {
554
- $video["contentUrl"] = $KcSeoWPSchema->sanitizeOutPut($metaData['contentUrl'], 'url');
555
- }
556
- if (!empty($metaData['embedUrl'])) {
557
- $video["embedUrl"] = $KcSeoWPSchema->sanitizeOutPut($metaData['embedUrl'], 'url');
558
- }
559
- if (!empty($metaData['interactionCount'])) {
560
- $video["interactionCount"] = $KcSeoWPSchema->sanitizeOutPut($metaData['interactionCount']);
561
- }
562
- if (!empty($metaData['expires'])) {
563
- $video["expires"] = $KcSeoWPSchema->sanitizeOutPut($metaData['expires']);
564
- }
565
- $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_video', $video, $metaData));
566
- break;
567
-
568
- case 'audio':
569
- $audio = array(
570
- "@context" => "https://schema.org",
571
- "@type" => "AudioObject"
572
- );
573
- if (!empty($metaData['name'])) {
574
- $audio["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
575
- }
576
- if (!empty($metaData['description'])) {
577
- $audio["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'], 'textarea');
578
- }
579
- if (!empty($metaData['contentUrl'])) {
580
- $audio["contentUrl"] = $KcSeoWPSchema->sanitizeOutPut($metaData['contentUrl'], 'url');
581
- }
582
- if (!empty($metaData['duration'])) {
583
- $audio["duration"] = $KcSeoWPSchema->sanitizeOutPut($metaData['duration']);
584
- }
585
- if (!empty($metaData['encodingFormat'])) {
586
- $audio["encodingFormat"] = $KcSeoWPSchema->sanitizeOutPut($metaData['encodingFormat']);
587
- }
588
- $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_audio', $audio, $metaData));
589
- break;
590
-
591
- case 'service':
592
- $service = array(
593
- "@context" => "https://schema.org",
594
- "@type" => "Service"
595
- );
596
- if (!empty($metaData['name'])) {
597
- $service["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
598
- }
599
- if (!empty($metaData['serviceType'])) {
600
- $service["serviceType"] = $KcSeoWPSchema->sanitizeOutPut($metaData['serviceType']);
601
- }
602
- if (!empty($metaData['award'])) {
603
- $service["award"] = $KcSeoWPSchema->sanitizeOutPut($metaData['award']);
604
- }
605
- if (!empty($metaData['category'])) {
606
- $service["category"] = $KcSeoWPSchema->sanitizeOutPut($metaData['category']);
607
- }
608
- if (!empty($metaData['providerMobility'])) {
609
- $service["providerMobility"] = $KcSeoWPSchema->sanitizeOutPut($metaData['providerMobility']);
610
- }
611
- if (!empty($metaData['additionalType'])) {
612
- $service["additionalType"] = $KcSeoWPSchema->sanitizeOutPut($metaData['additionalType']);
613
- }
614
- if (!empty($metaData['alternateName'])) {
615
- $service["alternateName"] = $KcSeoWPSchema->sanitizeOutPut($metaData['alternateName']);
616
- }
617
- if (!empty($metaData['image'])) {
618
- $service["image"] = $KcSeoWPSchema->sanitizeOutPut($metaData['image']);
619
- }
620
- if (!empty($metaData['mainEntityOfPage'])) {
621
- $service["mainEntityOfPage"] = $KcSeoWPSchema->sanitizeOutPut($metaData['mainEntityOfPage']);
622
- }
623
- if (!empty($metaData['sameAs'])) {
624
- $service["sameAs"] = $KcSeoWPSchema->sanitizeOutPut($metaData['sameAs']);
625
- }
626
- if (!empty($metaData['url'])) {
627
- $service["url"] = $KcSeoWPSchema->sanitizeOutPut($metaData['url'], 'url');
628
- }
629
- $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_service', $service, $metaData));
630
- break;
631
-
632
- case 'about':
633
- $aboutSchema = array(
634
- "@context" => "https://schema.org",
635
- "@type" => "AboutPage"
636
- );
637
-
638
- if (!empty($metaData['name'])) {
639
- $aboutSchema["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
640
- }
641
- if (!empty($metaData['description'])) {
642
- $aboutSchema["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
643
- 'textarea');
644
- }
645
- if (!empty($metaData['image'])) {
646
- $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
647
- $aboutSchema["image"] = array(
648
- "@type" => "ImageObject",
649
- "url" => $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url'),
650
- "height" => $img['height'],
651
- "width" => $img['width']
652
- );
653
- }
654
- if (!empty($metaData['url'])) {
655
- $aboutSchema["url"] = $KcSeoWPSchema->sanitizeOutPut($metaData['url'], 'url');
656
- }
657
-
658
- if (isset($metaData['sameAs']) && !empty($metaData['sameAs'])) {
659
- $sameAs = KcSeoHelper::get_same_as($KcSeoWPSchema->sanitizeOutPut($metaData['sameAs'], "textarea"));
660
- if (!empty($sameAs)) {
661
- $aboutSchema["sameAs"] = $sameAs;
662
- }
663
- }
664
-
665
- $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_about', $aboutSchema, $metaData));
666
- break;
667
-
668
- case 'contact':
669
- $contactSchema = array(
670
- "@context" => "https://schema.org",
671
- "@type" => "ContactPage"
672
- );
673
-
674
- if (!empty($metaData['name'])) {
675
- $contactSchema["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
676
- }
677
- if (!empty($metaData['description'])) {
678
- $contactSchema["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
679
- 'textarea');
680
- }
681
- if (!empty($metaData['image'])) {
682
- $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
683
- $contactSchema["image"] = array(
684
- "@type" => "ImageObject",
685
- "url" => $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url'),
686
- "height" => $img['height'],
687
- "width" => $img['width']
688
- );
689
- }
690
- if (!empty($metaData['url'])) {
691
- $contactSchema["url"] = $KcSeoWPSchema->sanitizeOutPut($metaData['url'], 'url');
692
- }
693
-
694
- $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_contact', $contactSchema, $metaData));
695
- break;
696
-
697
- case 'review':
698
- $review = array(
699
- "@context" => "https://schema.org",
700
- "@type" => "Review"
701
- );
702
- if (!empty($metaData['itemName'])) {
703
- $review["itemReviewed"] = array(
704
- "@type" => "product",
705
- "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['itemName'])
706
- );
707
- }
708
- if (!empty($metaData['ratingValue'])) {
709
- $review["reviewRating"] = array(
710
- "@type" => "Rating",
711
- "ratingValue" => $KcSeoWPSchema->sanitizeOutPut($metaData['ratingValue']),
712
- "bestRating" => $KcSeoWPSchema->sanitizeOutPut($metaData['bestRating']),
713
- "worstRating" => $KcSeoWPSchema->sanitizeOutPut($metaData['worstRating'])
714
- );
715
- }
716
- if (!empty($metaData['name'])) {
717
- $review["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
718
- }
719
- if (!empty($metaData['author'])) {
720
- $review["author"] = array(
721
- "@type" => "Person",
722
- "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['author'])
723
- );
724
- }
725
- if (!empty($metaData['reviewBody'])) {
726
- $review["reviewBody"] = $KcSeoWPSchema->sanitizeOutPut($metaData['reviewBody']);
727
- }
728
- if (!empty($metaData['datePublished'])) {
729
- $review["datePublished"] = $KcSeoWPSchema->sanitizeOutPut($metaData['datePublished']);
730
- }
731
- if (!empty($metaData['publisher'])) {
732
- $review["publisher"] = array(
733
- "@type" => "Organization",
734
- "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['publisher'])
735
- );
736
- }
737
- $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_review', $review, $metaData));
738
- break;
739
- case 'aggregate_rating':
740
- $aRating = array(
741
- "@context" => "https://schema.org",
742
- "@type" => !empty($metaData['schema_type']) ? $metaData['schema_type'] : "LocalBusiness"
743
- );
744
- if ("LocalBusiness" === $aRating['@type']) {
745
- $aRating['@id'] = get_home_url();
746
- }
747
- if (!empty($metaData['name'])) {
748
- $aRating["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
749
- }
750
- if (!empty($metaData['description'])) {
751
- $aRating["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
752
- 'textarea');
753
- }
754
- if ($aRating["@type"] != "Organization") {
755
- if (!empty($metaData['image'])) {
756
- $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
757
- $aRating["image"] = array(
758
- "@type" => "ImageObject",
759
- "url" => $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url'),
760
- "height" => $img['height'],
761
- "width" => $img['width']
762
- );
763
- }
764
- if (!empty($metaData['priceRange'])) {
765
- $aRating["priceRange"] = $KcSeoWPSchema->sanitizeOutPut($metaData['priceRange']);
766
- }
767
- if (!empty($metaData['telephone'])) {
768
- $aRating["telephone"] = $KcSeoWPSchema->sanitizeOutPut($metaData['telephone']);
769
- }
770
-
771
- if (!empty($metaData['address'])) {
772
- $aRating["address"] = $KcSeoWPSchema->sanitizeOutPut($metaData['address']);
773
- }
774
- }
775
-
776
- if (!empty($metaData['ratingValue'])) {
777
- $rValue = array();
778
- $rValue["@type"] = "AggregateRating";
779
- $rValue["ratingValue"] = $KcSeoWPSchema->sanitizeOutPut($metaData['ratingValue']);
780
- if (!empty($metaData['bestRating'])) {
781
- $rValue["bestRating"] = $KcSeoWPSchema->sanitizeOutPut($metaData['bestRating']);
782
- }
783
- if (!empty($metaData['worstRating'])) {
784
- $rValue["worstRating"] = $KcSeoWPSchema->sanitizeOutPut($metaData['worstRating']);
785
- }
786
- if (!empty($metaData['ratingCount'])) {
787
- $rValue["ratingCount"] = $KcSeoWPSchema->sanitizeOutPut($metaData['ratingCount']);
788
- }
789
-
790
- $aRating["aggregateRating"] = $rValue;
791
- }
792
- $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_aggregate_rating', $aRating, $metaData));
793
- break;
794
-
795
- case 'restaurant':
796
- $restaurant = array(
797
- "@context" => "https://schema.org",
798
- "@type" => "Restaurant"
799
- );
800
- if (!empty($metaData['name'])) {
801
- $restaurant["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
802
- }
803
- if (!empty($metaData['description'])) {
804
- $restaurant["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
805
- 'textarea');
806
- }
807
- if (!empty($metaData['openingHours'])) {
808
- $restaurant["openingHours"] = $KcSeoWPSchema->sanitizeOutPut($metaData['openingHours'],
809
- 'textarea');
810
- }
811
- if (!empty($metaData['telephone'])) {
812
- $restaurant["telephone"] = $KcSeoWPSchema->sanitizeOutPut($metaData['telephone']);
813
- }
814
- if (!empty($metaData['menu'])) {
815
- $restaurant["menu"] = $KcSeoWPSchema->sanitizeOutPut($metaData['menu'], 'url');
816
- }
817
- if (!empty($metaData['image'])) {
818
- $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
819
- $restaurant["image"] = $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url');
820
- }
821
- if (!empty($metaData['address'])) {
822
- $restaurant["address"] = $KcSeoWPSchema->sanitizeOutPut($metaData['address'], 'textarea');
823
- }
824
- if (!empty($metaData['priceRange'])) {
825
- $restaurant["priceRange"] = $KcSeoWPSchema->sanitizeOutPut($metaData['priceRange']);
826
- }
827
- if (!empty($metaData['servesCuisine'])) {
828
- $restaurant["servesCuisine"] = $KcSeoWPSchema->sanitizeOutPut($metaData['servesCuisine']);
829
- }
830
- $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_restaurant', $restaurant, $metaData));
831
- break;
832
-
833
- case 'localBusiness':
834
- $local_business = array(
835
- "@context" => "https://schema.org",
836
- "@type" => "LocalBusiness",
837
- '@id' => get_home_url()
838
- );
839
- if (!empty($metaData['name'])) {
840
- $local_business["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
841
- }
842
- if (!empty($metaData['description'])) {
843
- $local_business["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
844
- 'textarea');
845
- }
846
- if (!empty($metaData['image'])) {
847
- $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
848
- $local_business["image"] = $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url');
849
- }
850
- if (!empty($metaData['priceRange'])) {
851
- $local_business["priceRange"] = $KcSeoWPSchema->sanitizeOutPut($metaData['priceRange']);
852
- }
853
- if (!empty($metaData['addressLocality']) || !empty($metaData['addressRegion'])
854
- || !empty($metaData['postalCode']) || !empty($metaData['streetAddress'])) {
855
- $local_business["address"] = array(
856
- "@type" => "PostalAddress",
857
- "addressLocality" => $KcSeoWPSchema->sanitizeOutPut($metaData['addressLocality']),
858
- "addressRegion" => $KcSeoWPSchema->sanitizeOutPut($metaData['addressRegion']),
859
- "postalCode" => $KcSeoWPSchema->sanitizeOutPut($metaData['postalCode']),
860
- "streetAddress" => $KcSeoWPSchema->sanitizeOutPut($metaData['streetAddress'])
861
- );
862
- }
863
-
864
- if (!empty($metaData['telephone'])) {
865
- $local_business["telephone"] = $KcSeoWPSchema->sanitizeOutPut($metaData['telephone']);
866
- }
867
- $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_local_business', $local_business, $metaData));
868
- if (isset($metaData['review_active'])) {
869
- $local_business_review = array(
870
- "@context" => "https://schema.org",
871
- "@type" => "Review",
872
- );
873
- if (isset($metaData['review_datePublished']) && !empty($metaData['review_datePublished'])) {
874
- $local_business_review["datePublished"] = $KcSeoWPSchema->sanitizeOutPut($metaData['review_datePublished']);
875
- }
876
- if (isset($metaData['review_body']) && !empty($metaData['review_body'])) {
877
- $local_business_review["reviewBody"] = $KcSeoWPSchema->sanitizeOutPut($metaData['review_body'], 'textarea');
878
- }
879
-
880
- unset($local_business['@context']);
881
- if (isset($local_business["description"])) {
882
- $local_business_review["description"] = KcSeoHelper::filter_content($local_business["description"], 200);
883
- unset($local_business["description"]);
884
- }
885
- if (isset($metaData['review_sameAs']) && !empty($metaData['review_sameAs'])) {
886
- $sameAs = KcSeoHelper::get_same_as($KcSeoWPSchema->sanitizeOutPut($metaData['review_sameAs'], "textarea"));
887
- if (!empty($sameAs)) {
888
- $local_business["sameAs"] = $sameAs;
889
- }
890
- }
891
-
892
- $local_business_review["itemReviewed"] = $local_business;
893
- if (!empty($metaData['review_author'])) {
894
- $local_business_review["author"] = array(
895
- "@type" => "Person",
896
- "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['review_author'])
897
- );
898
-
899
- if (isset($metaData['review_author_sameAs']) && !empty($metaData['review_author_sameAs'])) {
900
- $sameAs = KcSeoHelper::get_same_as($KcSeoWPSchema->sanitizeOutPut($metaData['review_author_sameAs'], "textarea"));
901
- if (!empty($sameAs)) {
902
- $local_business_review["author"]["sameAs"] = $sameAs;
903
- }
904
- }
905
- }
906
- if (isset($metaData['review_ratingValue'])) {
907
- $local_business_review["reviewRating"] = array(
908
- "@type" => "Rating",
909
- "ratingValue" => $KcSeoWPSchema->sanitizeOutPut($metaData['review_ratingValue'], 'number')
910
- );
911
- if (isset($metaData['review_bestRating'])) {
912
- $local_business_review["reviewRating"]["bestRating"] = $KcSeoWPSchema->sanitizeOutPut($metaData['review_bestRating'], 'number');
913
- }
914
- if (isset($metaData['review_worstRating'])) {
915
- $local_business_review["reviewRating"]["worstRating"] = $KcSeoWPSchema->sanitizeOutPut($metaData['review_worstRating'], 'number');
916
- }
917
- }
918
- $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_local_business_review', $local_business_review, $metaData));
919
- }
920
- break;
921
- case 'specialAnnouncement':
922
- $announcement = array(
923
- "@context" => "https://schema.org",
924
- "@type" => "SpecialAnnouncement",
925
- "category" => "https://www.wikidata.org/wiki/Q81068910"
926
- );
927
- if (!empty($metaData['name'])) {
928
- $announcement['name'] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
929
- }
930
- if (!empty($metaData['datePublished'])) {
931
- $announcement['datePosted'] = $KcSeoWPSchema->sanitizeOutPut($metaData['datePublished']);
932
- }
933
- if (!empty($metaData['expires'])) {
934
- $announcement['expires'] = $KcSeoWPSchema->sanitizeOutPut($metaData['expires']);
935
- }
936
- if (!empty($metaData['text'])) {
937
- $announcement['text'] = $KcSeoWPSchema->sanitizeOutPut($metaData['text'], 'textarea');
938
- }
939
- if (!empty($metaData['url'])) {
940
- $announcement['url'] = $KcSeoWPSchema->sanitizeOutPut($metaData['url'], 'url');
941
- }
942
- if (isset($metaData['locations']) && is_array($metaData['locations']) && !empty($metaData['locations'])) {
943
- $locations_schema = [];
944
- foreach ($metaData['locations'] as $position => $location) {
945
- if ($location['type']) {
946
- $location_schema = array(
947
- "@type" => $KcSeoWPSchema->sanitizeOutPut($location['type']),
948
- 'name' => !empty($location['name']) ? $KcSeoWPSchema->sanitizeOutPut($location['name']) : "",
949
- 'url' => !empty($location['url']) ? $KcSeoWPSchema->sanitizeOutPut($location['url'], 'url') : '',
950
- "address" => [
951
- "@type" => "PostalAddress",
952
- ]
953
- );
954
- if (!empty($location['id'])) {
955
- $location_schema['@id'] = $KcSeoWPSchema->sanitizeOutPut($location['id']);
956
- }
957
- if (!empty($location['image'])) {
958
- $img = $KcSeoWPSchema->imageInfo(absint($location['image']));
959
- $location_schema["image"] = $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url');
960
- }
961
- if (!empty($location['url'])) {
962
- $location_schema['url'] = $KcSeoWPSchema->sanitizeOutPut($location['url'], 'url');
963
- }
964
- if (!empty($location['address_street'])) {
965
- $location_schema['address']['streetAddress'] = $KcSeoWPSchema->sanitizeOutPut($location['address_street']);
966
- }
967
- if (!empty($location['address_locality'])) {
968
- $location_schema['address']['addressLocality'] = $KcSeoWPSchema->sanitizeOutPut($location['address_locality']);
969
- }
970
- if (!empty($location['address_post_code'])) {
971
- $location_schema['address']['postalCode'] = $KcSeoWPSchema->sanitizeOutPut($location['address_post_code']);
972
- }
973
- if (!empty($location['address_region'])) {
974
- $location_schema['address']['addressRegion'] = $KcSeoWPSchema->sanitizeOutPut($location['address_region']);
975
- }
976
- if (!empty($location['address_country'])) {
977
- $location_schema['address']['addressCountry'] = $KcSeoWPSchema->sanitizeOutPut($location['address_country']);
978
- }
979
- if (!empty($location['priceRange'])) {
980
- $location_schema["priceRange"] = $KcSeoWPSchema->sanitizeOutPut($location['priceRange']);
981
- }
982
- if (!empty($location['telephone'])) {
983
- $location_schema["telephone"] = $KcSeoWPSchema->sanitizeOutPut($location['telephone']);
984
- }
985
- array_push($locations_schema, $location_schema);
986
- }
987
-
988
- }
989
- if (count($locations_schema) === 1) {
990
- $announcement['announcementLocation'] = $locations_schema[0];
991
- } else {
992
- $announcement['announcementLocation'] = $locations_schema;
993
- }
994
- }
995
- $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_item_list', $announcement, $metaData));
996
- break;
997
- default:
998
- break;
999
- }
1000
-
1001
- }
1002
-
1003
- return $html;
1004
- }
1005
-
1006
- function get_field($data) {
1007
- $html = null;
1008
- global $KcSeoWPSchema;
1009
- $id = $data['id'];
1010
- $name = $data['name'];
1011
- $value = $data['value'];
1012
- $attr = !empty($data['attr']) ? $data['attr'] : null;
1013
-
1014
- $class = isset($data['class']) ? ($data['class'] ? $data['class'] : null) : null;
1015
- $require = (isset($data['required']) ? ($data['required'] ? sprintf('<span data-kcseo-tooltip="%s" class="required">*</span>', __("Required", "wp-seo-structured-data-schema")) : null) : null);
1016
- $recommended = (isset($data['recommended']) ? ($data['recommended'] ? sprintf('<span data-kcseo-tooltip="%s" class="recommended">*</span>', __("Recommended", "wp-seo-structured-data-schema")) : null) : null);
1017
- $title = (isset($data['title']) ? ($data['title'] ? $data['title'] : null) : null);
1018
- $desc = (isset($data['desc']) ? ($data['desc'] ? $data['desc'] : null) : null);
1019
- $holderClass = (!empty($data['holderClass']) ? $data['holderClass'] : null);
1020
-
1021
- switch ($data['type']) {
1022
- case 'checkbox':
1023
- $checked = ($value ? "checked" : null);
1024
- $html .= "<div class='kSeo-checkbox-wrapper'>";
1025
- $html .= "<label for='{$id}'><input type='checkbox' id='{$id}' class='{$class}' name='{$name}' {$checked} value='1' /> Enable</label>";
1026
- $html .= "</div>";
1027
- break;
1028
- case 'text':
1029
- $html .= "<input type='text' id='{$id}' class='{$class}' {$attr} name='{$name}' value='" . esc_html($value) . "' />";
1030
- break;
1031
- case 'number':
1032
- if ($data['fieldId'] == 'price') {
1033
- $html .= "<input type='number' step='any' id='{$id}' class='{$class}' {$attr} name='{$name}' value='" . esc_attr($value) . "' />";
1034
- } else {
1035
- $html .= "<input type='number' id='{$id}' class='{$class}' name='{$name}' {$attr} value='" . esc_attr($value) . "' />";
1036
- }
1037
- break;
1038
- case 'textarea':
1039
- $html .= "<textarea id='{$id}' class='{$class}' {$attr} name='{$name}' >" . wp_kses($value,
1040
- array()) . "</textarea>";
1041
- break;
1042
- case 'image':
1043
- $html .= '<div class="kSeo-image">';
1044
- $ImageId = !empty($value) ? absint($value) : 0;
1045
- $image = $ingInfo = null;
1046
- if ($ImageId) {
1047
- $image = wp_get_attachment_image($ImageId, "thumbnail");
1048
- $imgData = $KcSeoWPSchema->imageInfo($ImageId);
1049
- $ingInfo .= "<span><strong>URL: </strong>{$imgData['url']}</span>";
1050
- $ingInfo .= "<span><strong>Width: </strong>{$imgData['width']}px</span>";
1051
- $ingInfo .= "<span><strong>Height: </strong>{$imgData['height']}px</span>";
1052
- }
1053
- $html .= "<div class='kSeo-image-wrapper'>";
1054
- $html .= '<span class="kSeoImgAdd"><span class="dashicons dashicons-plus-alt"></span></span>';
1055
- $html .= '<span class="kSeoImgRemove ' . ($image ? null : "kSeo-hidden") . '"><span class="dashicons dashicons-trash"></span></span>';
1056
- $html .= '<div class="kSeo-image-preview">' . $image . '</div>';
1057
- $html .= "<input type='hidden' name='{$name}' value='" . absint($ImageId) . "' />";
1058
- $html .= "</div>";
1059
- $html .= "<div class='image-info'>{$ingInfo}</div>";
1060
- $html .= '</div>';
1061
- break;
1062
- case 'select':
1063
- $html .= "<select name='{$name}' {$attr} class='select2 {$class}' id='{$id}'>";
1064
- if (!empty($data['empty'])) {
1065
- $html .= "<option value=''>{$data['empty']}</option>";
1066
- }
1067
- if (!empty($data['options']) && is_array($data['options'])) {
1068
- if ($this->isAssoc($data['options'])) {
1069
- foreach ($data['options'] as $optKey => $optValue) {
1070
- $slt = ($optKey == $value ? "selected" : null);
1071
- $html .= "<option value='" . esc_attr($optKey) . "' {$slt}>" . esc_html($optValue) . "</option>";
1072
- }
1073
- } else {
1074
- foreach ($data['options'] as $optValue) {
1075
- $slt = ($optValue == $value ? "selected" : null);
1076
- $html .= "<option value='" . esc_attr($optValue) . "' {$slt}>" . esc_html($optValue) . "</option>";
1077
- }
1078
- }
1079
- }
1080
- $html .= "</select>";
1081
- break;
1082
- case 'schema_type':
1083
- $html .= "<select name='{$name}' class='select2 {$class}' id='{$id}'>";
1084
- if (!empty($data['empty'])) {
1085
- $html .= "<option value=''>{$data['empty']}</option>";
1086
- }
1087
-
1088
- foreach ($data['options'] as $key => $site) {
1089
- if (is_array($site)) {
1090
- $slt = ($key == $value ? "selected" : null);
1091
- $html .= "<option value='$key' $slt>&nbsp;&nbsp;&nbsp;$key</option>";
1092
- foreach ($site as $inKey => $inSite) {
1093
- if (is_array($inSite)) {
1094
- $slt = ($inKey == $value ? "selected" : null);
1095
- $html .= "<option value='$inKey' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$inKey</option>";
1096
- foreach ($inSite as $inInKey => $inInSite) {
1097
- if (is_array($inInSite)) {
1098
- $slt = ($inInKey == $value ? "selected" : null);
1099
- $html .= "<option value='$inInKey' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$inInKey</option>";
1100
- foreach ($inInSite as $iSite) {
1101
- $slt = ($iSite == $value ? "selected" : null);
1102
- $html .= "<option value='$iSite' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$iSite</option>";
1103
- }
1104
- } else {
1105
- $slt = ($inInSite == $value ? "selected" : null);
1106
- $html .= "<option value='$inInSite' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$inInSite</option>";
1107
- }
1108
- }
1109
- } else {
1110
- $slt = ($inSite == $value ? "selected" : null);
1111
- $html .= "<option value='$inSite' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$inSite</option>";
1112
- }
1113
- }
1114
- } else {
1115
- $slt = ($site == $value ? "selected" : null);
1116
- $html .= "<option value='$site' $slt>$site</option>";
1117
- }
1118
- }
1119
- $html .= "</select>";
1120
- break;
1121
- default:
1122
- $html .= "<input id='{$id}' type='{$data['type']}' {$attr} value='" . esc_attr($value) . "' name='$name' />";
1123
- break;
1124
-
1125
- }
1126
- $label = "<label class='field-label' for='{$id}'>{$title}{$require}{$recommended}</label>";
1127
- $field_html = sprintf('<div class="field-content" id="%s-content">%s<p class="description">%s</div>', $id, $html, $desc);
1128
- if ($data['type'] == 'heading') {
1129
- $holderClass .= ' kcseo-heading-container';
1130
- $label = '';
1131
- $field_html = sprintf('<div class="kcseo-section-title-wrap">%s%s</div>',
1132
- $title ? sprintf('<h5>%s</h5>', $title) : '',
1133
- $desc ? sprintf('<p class="description">%s</p>', $desc) : null
1134
- );
1135
- }
1136
-
1137
- $html = sprintf('<div class="field-container %s" id="%s-container">%s%s</div>',
1138
- $holderClass,
1139
- $id,
1140
- $label,
1141
- $field_html
1142
- );
1143
-
1144
- return $html;
1145
- }
1146
-
1147
- /**
1148
- * @param array $data
1149
- *
1150
- * @return string|null
1151
- */
1152
- function get_jsonEncode($data = array()) {
1153
- $html = null;
1154
- if (!empty($data) && is_array($data)) {
1155
- $html .= '<script type="application/ld+json">' . json_encode($data,
1156
- JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . '</script>';
1157
- }
1158
-
1159
- return $html;
1160
- }
1161
-
1162
- function imgInfo($url = null) {
1163
- $img = array();
1164
- if ($url) {
1165
- $imgA = @getimagesize($url);
1166
- if (is_array($imgA) && !empty($imgA)) {
1167
- $img['width'] = $imgA[0];
1168
- $img['height'] = $imgA[1];
1169
- } else {
1170
- $img['width'] = 0;
1171
- $img['height'] = 0;
1172
- }
1173
- }
1174
-
1175
- return $img;
1176
- }
1177
-
1178
- function isAssoc($array) {
1179
- $keys = array_keys($array);
1180
-
1181
- return $keys !== array_keys($keys);
1182
- }
1183
-
1184
-
1185
- }
1186
  endif;
1
+ <?php
2
+
3
+ if (!class_exists('KcSeoSchemaModel')):
4
+ class KcSeoSchemaModel
5
+ {
6
+
7
+ function __construct() {
8
+
9
+ }
10
+
11
+ function schemaOutput($schemaID, $metaData) {
12
+ $html = null;
13
+
14
+ if ($schemaID) {
15
+ global $KcSeoWPSchema;
16
+ switch ($schemaID) {
17
+ case "article":
18
+ $article = array(
19
+ "@context" => "https://schema.org",
20
+ "@type" => "Article"
21
+ );
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['author_url']) ) {
38
+ $article["author"]['url'] = $KcSeoWPSchema->sanitizeOutPut($metaData['author_url'], 'url');
39
+ }
40
+ }
41
+ if (!empty($metaData['publisher'])) {
42
+ if (!empty($metaData['publisherImage'])) {
43
+ $img = $KcSeoWPSchema->imageInfo(absint($metaData['publisherImage']));
44
+ $plA = array(
45
+ "@type" => "ImageObject",
46
+ "url" => $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url'),
47
+ "height" => $img['height'],
48
+ "width" => $img['width']
49
+ );
50
+ } else {
51
+ $plA = array();
52
+ }
53
+ $article["publisher"] = array(
54
+ "@type" => "Organization",
55
+ "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['publisher']),
56
+ "logo" => $plA
57
+ );
58
+ }
59
+ if (!empty($metaData['alternativeHeadline'])) {
60
+ $article["alternativeHeadline"] = $KcSeoWPSchema->sanitizeOutPut($metaData['alternativeHeadline']);
61
+ }
62
+ if (!empty($metaData['image'])) {
63
+ $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
64
+ $article["image"] = array(
65
+ "@type" => "ImageObject",
66
+ "url" => $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url'),
67
+ "height" => $img['height'],
68
+ "width" => $img['width']
69
+ );
70
+ }
71
+ if (!empty($metaData['datePublished'])) {
72
+ $article["datePublished"] = $KcSeoWPSchema->sanitizeOutPut($metaData['datePublished']);
73
+ }
74
+ if (!empty($metaData['dateModified'])) {
75
+ $article["dateModified"] = $KcSeoWPSchema->sanitizeOutPut($metaData['dateModified']);
76
+ }
77
+ if (!empty($metaData['description'])) {
78
+ $article["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
79
+ 'textarea');
80
+ }
81
+ if (!empty($metaData['articleBody'])) {
82
+ $article["articleBody"] = $KcSeoWPSchema->sanitizeOutPut($metaData['articleBody'],
83
+ 'textarea');
84
+ }
85
+
86
+ if ( isset($metaData['video']) && is_array($metaData['video']) ) {
87
+ $article_video = array();
88
+ foreach ($metaData['video'] as $video_single) {
89
+ if ( $video_single['name'] && $video_single['embedUrl'] ) {
90
+ $video_single_schema = array(
91
+ "@type" => "VideoObject",
92
+ "name" => $video_single['name'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['name']) : '',
93
+ "description" => $video_single['description'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['description']) : '',
94
+ "contentUrl" => $video_single['contentUrl'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['contentUrl']) : '',
95
+ "embedUrl" => $video_single['embedUrl'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['embedUrl']) : '',
96
+ "uploadDate" => $video_single['uploadDate'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['uploadDate']) : '',
97
+ "duration" => $video_single['duration'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['duration']) : '',
98
+ );
99
+ if (!empty($video_single['thumbnailUrl'])) {
100
+ $img = $KcSeoWPSchema->imageInfo(absint($video_single['thumbnailUrl']));
101
+ $video_single_schema["thumbnailUrl"] = $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url');
102
+ }
103
+
104
+ $article_video = $video_single_schema;
105
+ }
106
+ }
107
+ if ( $article_video ) {
108
+ $article['video'] = $article_video;
109
+ }
110
+ }
111
+
112
+ if ( isset($metaData['audio']) && is_array($metaData['audio']) ) {
113
+ $article_audio = array();
114
+ foreach ($metaData['audio'] as $audio_single) {
115
+ if ( $audio_single['name'] && $audio_single['contentUrl'] ) {
116
+ $audio_single_schema = array(
117
+ "@type" => "AudioObject",
118
+ "name" => $audio_single['name'] ? $KcSeoWPSchema->sanitizeOutPut($audio_single['name']) : '',
119
+ "description" => $audio_single['description'] ? $KcSeoWPSchema->sanitizeOutPut($audio_single['description']) : '',
120
+ "duration" => $audio_single['duration'] ? $KcSeoWPSchema->sanitizeOutPut($audio_single['duration']) : '',
121
+ "contentUrl" => $audio_single['contentUrl'] ? $KcSeoWPSchema->sanitizeOutPut($audio_single['contentUrl']) : '',
122
+ "encodingFormat" => $audio_single['encodingFormat'] ? $KcSeoWPSchema->sanitizeOutPut($audio_single['encodingFormat']) : '',
123
+ );
124
+
125
+ $article_audio = $audio_single_schema;
126
+ }
127
+ }
128
+ if ( $article_audio ) {
129
+ $article['audio'] = $article_audio;
130
+ }
131
+ }
132
+
133
+ $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_article', $article, $metaData));
134
+ break;
135
+
136
+ case "news_article":
137
+ $newsArticle = array(
138
+ "@context" => "https://schema.org",
139
+ "@type" => "NewsArticle"
140
+ );
141
+ if (!empty($metaData['headline'])) {
142
+ $newsArticle["headline"] = $KcSeoWPSchema->sanitizeOutPut($metaData['headline']);
143
+ }
144
+ if (!empty($metaData['mainEntityOfPage'])) {
145
+ $newsArticle["mainEntityOfPage"] = array(
146
+ "@type" => "WebPage",
147
+ "@id" => $KcSeoWPSchema->sanitizeOutPut($metaData["mainEntityOfPage"])
148
+ );
149
+ }
150
+ if (!empty($metaData['author'])) {
151
+ $newsArticle["author"] = array(
152
+ "@type" => "Person",
153
+ "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['author'])
154
+ );
155
+
156
+ if ( !empty($metaData['author_url']) ) {
157
+ $newsArticle["author"]['url'] = $KcSeoWPSchema->sanitizeOutPut($metaData['author_url'], 'url');
158
+ }
159
+ }
160
+ if (!empty($metaData['image'])) {
161
+ $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
162
+ $newsArticle["image"] = array(
163
+ "@type" => "ImageObject",
164
+ "url" => $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url'),
165
+ "height" => $img['height'],
166
+ "width" => $img['width']
167
+ );
168
+ }
169
+ if (!empty($metaData['datePublished'])) {
170
+ $newsArticle["datePublished"] = $KcSeoWPSchema->sanitizeOutPut($metaData['datePublished']);
171
+ }
172
+ if (!empty($metaData['dateModified'])) {
173
+ $newsArticle["dateModified"] = $KcSeoWPSchema->sanitizeOutPut($metaData['dateModified']);
174
+ }
175
+ if (!empty($metaData['publisher'])) {
176
+ if (!empty($metaData['publisherImage'])) {
177
+ $img = $KcSeoWPSchema->imageInfo(absint($metaData['publisherImage']));
178
+ $plA = array(
179
+ "@type" => "ImageObject",
180
+ "url" => $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url'),
181
+ "height" => $img['height'],
182
+ "width" => $img['width']
183
+ );
184
+ } else {
185
+ $plA = array();
186
+ }
187
+ $newsArticle["publisher"] = array(
188
+ "@type" => "Organization",
189
+ "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['publisher']),
190
+ "logo" => $plA
191
+ );
192
+ }
193
+ if (!empty($metaData['description'])) {
194
+ $newsArticle["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
195
+ 'textarea');
196
+ }
197
+ if (!empty($metaData['articleBody'])) {
198
+ $newsArticle["articleBody"] = $KcSeoWPSchema->sanitizeOutPut($metaData['articleBody'],
199
+ 'textarea');
200
+ }
201
+
202
+ if ( isset($metaData['video']) && is_array($metaData['video']) ) {
203
+ $news_article_video = array();
204
+ foreach ($metaData['video'] as $video_single) {
205
+ if ( $video_single['name'] && $video_single['embedUrl'] ) {
206
+ $video_single_schema = array(
207
+ "@type" => "VideoObject",
208
+ "name" => $video_single['name'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['name']) : '',
209
+ "description" => $video_single['description'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['description']) : '',
210
+ "contentUrl" => $video_single['contentUrl'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['contentUrl']) : '',
211
+ "embedUrl" => $video_single['embedUrl'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['embedUrl']) : '',
212
+ "uploadDate" => $video_single['uploadDate'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['uploadDate']) : '',
213
+ "duration" => $video_single['duration'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['duration']) : '',
214
+ );
215
+ if (!empty($video_single['thumbnailUrl'])) {
216
+ $img = $KcSeoWPSchema->imageInfo(absint($video_single['thumbnailUrl']));
217
+ $video_single_schema["thumbnailUrl"] = $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url');
218
+ }
219
+
220
+ $news_article_video = $video_single_schema;
221
+ }
222
+ }
223
+ if ( $news_article_video ) {
224
+ $newsArticle['video'] = $news_article_video;
225
+ }
226
+ }
227
+
228
+ if ( isset($metaData['audio']) && is_array($metaData['audio']) ) {
229
+ $news_article_audio = array();
230
+ foreach ($metaData['audio'] as $audio_single) {
231
+ if ( $audio_single['name'] && $audio_single['contentUrl'] ) {
232
+ $audio_single_schema = array(
233
+ "@type" => "AudioObject",
234
+ "name" => $audio_single['name'] ? $KcSeoWPSchema->sanitizeOutPut($audio_single['name']) : '',
235
+ "description" => $audio_single['description'] ? $KcSeoWPSchema->sanitizeOutPut($audio_single['description']) : '',
236
+ "duration" => $audio_single['duration'] ? $KcSeoWPSchema->sanitizeOutPut($audio_single['duration']) : '',
237
+ "contentUrl" => $audio_single['contentUrl'] ? $KcSeoWPSchema->sanitizeOutPut($audio_single['contentUrl']) : '',
238
+ "encodingFormat" => $audio_single['encodingFormat'] ? $KcSeoWPSchema->sanitizeOutPut($audio_single['encodingFormat']) : '',
239
+ );
240
+
241
+ $news_article_audio = $audio_single_schema;
242
+ }
243
+ }
244
+ if ( $news_article_audio ) {
245
+ $newsArticle['audio'] = $news_article_audio;
246
+ }
247
+ }
248
+
249
+ $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_news_article', $newsArticle, $metaData));
250
+ break;
251
+
252
+ case "blog_posting":
253
+ $blogPosting = array(
254
+ "@context" => "https://schema.org",
255
+ "@type" => "BlogPosting"
256
+ );
257
+ if (!empty($metaData['headline'])) {
258
+ $blogPosting["headline"] = $KcSeoWPSchema->sanitizeOutPut($metaData['headline']);
259
+ }
260
+ if (!empty($metaData['mainEntityOfPage'])) {
261
+ $blogPosting["mainEntityOfPage"] = array(
262
+ "@type" => "WebPage",
263
+ "@id" => $KcSeoWPSchema->sanitizeOutPut($metaData["mainEntityOfPage"])
264
+ );
265
+ }
266
+ if (!empty($metaData['author'])) {
267
+ $blogPosting["author"] = array(
268
+ "@type" => "Person",
269
+ "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['author'])
270
+ );
271
+
272
+ if ( !empty($metaData['author_url']) ) {
273
+ $blogPosting["author"]['url'] = $KcSeoWPSchema->sanitizeOutPut($metaData['author_url'], 'url');
274
+ }
275
+ }
276
+ if (!empty($metaData['image'])) {
277
+ $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
278
+ $blogPosting["image"] = array(
279
+ "@type" => "ImageObject",
280
+ "url" => $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url'),
281
+ "height" => $img['height'],
282
+ "width" => $img['width']
283
+ );
284
+ }
285
+ if (!empty($metaData['datePublished'])) {
286
+ $blogPosting["datePublished"] = $KcSeoWPSchema->sanitizeOutPut($metaData['datePublished']);
287
+ }
288
+ if (!empty($metaData['dateModified'])) {
289
+ $blogPosting["dateModified"] = $KcSeoWPSchema->sanitizeOutPut($metaData['dateModified']);
290
+ }
291
+ if (!empty($metaData['publisher'])) {
292
+ if (!empty($metaData['publisherImage'])) {
293
+ $img = $KcSeoWPSchema->imageInfo(absint($metaData['publisherImage']));
294
+ $plA = array(
295
+ "@type" => "ImageObject",
296
+ "url" => $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url'),
297
+ "height" => $img['height'],
298
+ "width" => $img['width']
299
+ );
300
+ } else {
301
+ $plA = array();
302
+ }
303
+ $blogPosting["publisher"] = array(
304
+ "@type" => "Organization",
305
+ "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['publisher']),
306
+ "logo" => $plA
307
+ );
308
+ }
309
+ if (!empty($metaData['description'])) {
310
+ $blogPosting["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
311
+ 'textarea');
312
+ }
313
+ if (!empty($metaData['articleBody'])) {
314
+ $blogPosting["articleBody"] = $KcSeoWPSchema->sanitizeOutPut($metaData['articleBody'],
315
+ 'textarea');
316
+ }
317
+
318
+ if ( isset($metaData['video']) && is_array($metaData['video']) ) {
319
+ $blog_posting_video = array();
320
+ foreach ($metaData['video'] as $video_single) {
321
+ if ( $video_single['name'] && $video_single['embedUrl'] ) {
322
+ $video_single_schema = array(
323
+ "@type" => "VideoObject",
324
+ "name" => $video_single['name'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['name']) : '',
325
+ "description" => $video_single['description'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['description']) : '',
326
+ "contentUrl" => $video_single['contentUrl'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['contentUrl']) : '',
327
+ "embedUrl" => $video_single['embedUrl'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['embedUrl']) : '',
328
+ "uploadDate" => $video_single['uploadDate'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['uploadDate']) : '',
329
+ "duration" => $video_single['duration'] ? $KcSeoWPSchema->sanitizeOutPut($video_single['duration']) : '',
330
+ );
331
+ if (!empty($video_single['thumbnailUrl'])) {
332
+ $img = $KcSeoWPSchema->imageInfo(absint($video_single['thumbnailUrl']));
333
+ $video_single_schema["thumbnailUrl"] = $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url');
334
+ }
335
+
336
+ $blog_posting_video = $video_single_schema;
337
+ }
338
+ }
339
+ if ( $blog_posting_video ) {
340
+ $blogPosting['video'] = $blog_posting_video;
341
+ }
342
+ }
343
+
344
+ if ( isset($metaData['audio']) && is_array($metaData['audio']) ) {
345
+ $blog_posting_audio = array();
346
+ foreach ($metaData['audio'] as $audio_single) {
347
+ if ( $audio_single['name'] && $audio_single['contentUrl'] ) {
348
+ $audio_single_schema = array(
349
+ "@type" => "AudioObject",
350
+ "name" => $audio_single['name'] ? $KcSeoWPSchema->sanitizeOutPut($audio_single['name']) : '',
351
+ "description" => $audio_single['description'] ? $KcSeoWPSchema->sanitizeOutPut($audio_single['description']) : '',
352
+ "duration" => $audio_single['duration'] ? $KcSeoWPSchema->sanitizeOutPut($audio_single['duration']) : '',
353
+ "contentUrl" => $audio_single['contentUrl'] ? $KcSeoWPSchema->sanitizeOutPut($audio_single['contentUrl']) : '',
354
+ "encodingFormat" => $audio_single['encodingFormat'] ? $KcSeoWPSchema->sanitizeOutPut($audio_single['encodingFormat']) : '',
355
+ );
356
+
357
+ $blog_posting_audio = $audio_single_schema;
358
+ }
359
+ }
360
+ if ( $blog_posting_audio ) {
361
+ $blogPosting['audio'] = $blog_posting_audio;
362
+ }
363
+ }
364
+
365
+ $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_blog_posting', $blogPosting, $metaData));
366
+ break;
367
+
368
+ case 'event':
369
+ $event = array(
370
+ "@context" => "https://schema.org",
371
+ "@type" => "Event"
372
+ );
373
+ if (!empty($metaData['name'])) {
374
+ $event["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
375
+ }
376
+ if (!empty($metaData['startDate'])) {
377
+ $event["startDate"] = $KcSeoWPSchema->sanitizeOutPut($metaData['startDate']);
378
+ }
379
+ if (!empty($metaData['endDate'])) {
380
+ $event["endDate"] = $KcSeoWPSchema->sanitizeOutPut($metaData['endDate']);
381
+ }
382
+ if (!empty($metaData['description'])) {
383
+ $event["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
384
+ 'textarea');
385
+ }
386
+ if (!empty($metaData['performerName'])) {
387
+ $event["performer"] = array(
388
+ "@type" => "Person",
389
+ "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['performerName'])
390
+ );
391
+ }
392
+ if (!empty($metaData['image'])) {
393
+ $event["image"] = $KcSeoWPSchema->sanitizeOutPut($metaData['image'], 'url');
394
+ }
395
+ if (!empty($metaData['locationName'])) {
396
+ $event["location"] = array(
397
+ "@type" => "Place",
398
+ "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['locationName']),
399
+ "address" => $KcSeoWPSchema->sanitizeOutPut($metaData['locationAddress'])
400
+ );
401
+ }
402
+ if (!empty($metaData['price'])) {
403
+ $event["offers"] = array(
404
+ "@type" => "Offer",
405
+ "price" => $KcSeoWPSchema->sanitizeOutPut($metaData['price'])
406
+ );
407
+ if (!empty($metaData['priceCurrency'])) {
408
+ $event["offers"]['priceCurrency'] = $KcSeoWPSchema->sanitizeOutPut($metaData['priceCurrency']);
409
+ }
410
+ if (!empty($metaData['url'])) {
411
+ $event["offers"]['url'] = $KcSeoWPSchema->sanitizeOutPut($metaData['url'], 'url');
412
+ }
413
+ if (!empty($metaData['availability'])) {
414
+ $event["offers"]['availability'] = $KcSeoWPSchema->sanitizeOutPut($metaData['availability']);
415
+ }
416
+ if (!empty($metaData['validFrom'])) {
417
+ $event["offers"]['validFrom'] = $KcSeoWPSchema->sanitizeOutPut($metaData['validFrom']);
418
+ }
419
+ }
420
+ if (!empty($metaData['url'])) {
421
+ $event["url"] = $KcSeoWPSchema->sanitizeOutPut($metaData['url'], 'url');
422
+ }
423
+ $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_event', $event, $metaData));
424
+ if (isset($metaData['review_active'])) {
425
+ $event_review = array(
426
+ "@context" => "https://schema.org",
427
+ "@type" => "Review"
428
+ );
429
+
430
+ if (isset($metaData['review_datePublished']) && !empty($metaData['review_datePublished'])) {
431
+ $event_review["datePublished"] = $KcSeoWPSchema->sanitizeOutPut($metaData['review_datePublished']);
432
+ }
433
+ if (isset($metaData['review_body']) && !empty($metaData['review_body'])) {
434
+ $event_review["reviewBody"] = $KcSeoWPSchema->sanitizeOutPut($metaData['review_body'], 'textarea');
435
+ }
436
+ unset($event['@context']);
437
+ $event_review["itemReviewed"] = $event;
438
+ if (!empty($metaData['review_author'])) {
439
+ $event_review["author"] = array(
440
+ "@type" => "Person",
441
+ "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['review_author'])
442
+ );
443
+
444
+ if (isset($metaData['review_author_sameAs']) && !empty($metaData['review_author_sameAs'])) {
445
+ $sameAs = KcSeoHelper::get_same_as($KcSeoWPSchema->sanitizeOutPut($metaData['review_author_sameAs'], "textarea"));
446
+ if (!empty($sameAs)) {
447
+ $event_review["author"]["sameAs"] = $sameAs;
448
+ }
449
+ }
450
+ }
451
+ if (isset($metaData['review_ratingValue'])) {
452
+ $event_review["reviewRating"] = array(
453
+ "@type" => "Rating",
454
+ "ratingValue" => $KcSeoWPSchema->sanitizeOutPut($metaData['review_ratingValue'], 'number')
455
+ );
456
+ if (isset($metaData['review_bestRating'])) {
457
+ $event_review["reviewRating"]["bestRating"] = $KcSeoWPSchema->sanitizeOutPut($metaData['review_bestRating'], 'number');
458
+ }
459
+ if (isset($metaData['review_worstRating'])) {
460
+ $event_review["reviewRating"]["worstRating"] = $KcSeoWPSchema->sanitizeOutPut($metaData['review_worstRating'], 'number');
461
+ }
462
+ }
463
+
464
+
465
+ $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_event_review', $event_review, $metaData));
466
+ }
467
+ break;
468
+
469
+ case 'product':
470
+ $product = array(
471
+ "@context" => "https://schema.org",
472
+ "@type" => "Product"
473
+ );
474
+ if (!empty($metaData['name'])) {
475
+ $product["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
476
+ }
477
+ if (!empty($metaData['image'])) {
478
+ $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
479
+ $product["image"] = $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url');
480
+ }
481
+ if (!empty($metaData['description'])) {
482
+ $product["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description']);
483
+ }
484
+ /* product identifier */
485
+ if (!empty($metaData['sku'])) {
486
+ $product["sku"] = $KcSeoWPSchema->sanitizeOutPut($metaData['sku']);
487
+ }
488
+ if (!empty($metaData['brand'])) {
489
+ $product['brand'] = [
490
+ "@type" => "Brand",
491
+ "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['brand'])
492
+ ];
493
+ }
494
+ if (!empty($metaData['identifier_type']) && !empty($metaData['identifier'])) {
495
+ $product[$metaData['identifier_type']] = $KcSeoWPSchema->sanitizeOutPut($metaData['identifier']);
496
+ }
497
+ if (!empty($metaData['ratingValue'])) {
498
+ $product["aggregateRating"] = array(
499
+ "@type" => "AggregateRating",
500
+ "ratingValue" => !empty($metaData['ratingValue']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['ratingValue']) : null,
501
+ "reviewCount" => !empty($metaData['reviewCount']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['reviewCount']) : null
502
+ );
503
+ }
504
+ if (!empty($metaData['reviewRatingValue']) || !empty($metaData['reviewBestRating']) || !empty($metaData['reviewWorstRating'])) {
505
+ $product["review"] = array(
506
+ "@type" => "Review",
507
+ "reviewRating" => array(
508
+ "@type" => "Rating",
509
+ "ratingValue" => !empty($metaData['reviewRatingValue']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['reviewRatingValue']) : null,
510
+ "bestRating" => !empty($metaData['reviewBestRating']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['reviewBestRating']) : null,
511
+ "worstRating" => !empty($metaData['reviewWorstRating']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['reviewWorstRating']) : null
512
+ ),
513
+ "author" => array(
514
+ "@type" => "Person",
515
+ "name" => !empty($metaData['reviewAuthor']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['reviewAuthor']) : null
516
+ )
517
+ );
518
+ }
519
+ if (!empty($metaData['price'])) {
520
+ $product["offers"] = array(
521
+ "@type" => "Offer",
522
+ "price" => $KcSeoWPSchema->sanitizeOutPut($metaData['price']),
523
+ "priceValidUntil" => $KcSeoWPSchema->sanitizeOutPut($metaData['priceValidUntil']),
524
+ "priceCurrency" => !empty($metaData['priceCurrency']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['priceCurrency']) : null,
525
+ "itemCondition" => !empty($metaData['itemCondition']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['itemCondition']) : null,
526
+ "availability" => !empty($metaData['availability']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['availability']) : null,
527
+ "url" => !empty($metaData['url']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['url']) : null
528
+ );
529
+ }
530
+ $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_product', $product, $metaData));
531
+ break;
532
+
533
+ case 'video':
534
+ $video = array(
535
+ "@context" => "https://schema.org",
536
+ "@type" => "VideoObject"
537
+ );
538
+ if (!empty($metaData['name'])) {
539
+ $video["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
540
+ }
541
+ if (!empty($metaData['description'])) {
542
+ $video["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'], 'textarea');
543
+ }
544
+ if (!empty($metaData['thumbnailUrl'])) {
545
+ $video["thumbnailUrl"] = $KcSeoWPSchema->sanitizeOutPut($metaData['thumbnailUrl'], 'url');
546
+ }
547
+ if (!empty($metaData['uploadDate'])) {
548
+ $video["uploadDate"] = $KcSeoWPSchema->sanitizeOutPut($metaData['uploadDate']);
549
+ }
550
+ if (!empty($metaData['duration'])) {
551
+ $video["duration"] = $KcSeoWPSchema->sanitizeOutPut($metaData['duration']);
552
+ }
553
+ if (!empty($metaData['contentUrl'])) {
554
+ $video["contentUrl"] = $KcSeoWPSchema->sanitizeOutPut($metaData['contentUrl'], 'url');
555
+ }
556
+ if (!empty($metaData['embedUrl'])) {
557
+ $video["embedUrl"] = $KcSeoWPSchema->sanitizeOutPut($metaData['embedUrl'], 'url');
558
+ }
559
+ if (!empty($metaData['interactionCount'])) {
560
+ $video["interactionCount"] = $KcSeoWPSchema->sanitizeOutPut($metaData['interactionCount']);
561
+ }
562
+ if (!empty($metaData['expires'])) {
563
+ $video["expires"] = $KcSeoWPSchema->sanitizeOutPut($metaData['expires']);
564
+ }
565
+ $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_video', $video, $metaData));
566
+ break;
567
+
568
+ case 'audio':
569
+ $audio = array(
570
+ "@context" => "https://schema.org",
571
+ "@type" => "AudioObject"
572
+ );
573
+ if (!empty($metaData['name'])) {
574
+ $audio["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
575
+ }
576
+ if (!empty($metaData['description'])) {
577
+ $audio["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'], 'textarea');
578
+ }
579
+ if (!empty($metaData['contentUrl'])) {
580
+ $audio["contentUrl"] = $KcSeoWPSchema->sanitizeOutPut($metaData['contentUrl'], 'url');
581
+ }
582
+ if (!empty($metaData['duration'])) {
583
+ $audio["duration"] = $KcSeoWPSchema->sanitizeOutPut($metaData['duration']);
584
+ }
585
+ if (!empty($metaData['encodingFormat'])) {
586
+ $audio["encodingFormat"] = $KcSeoWPSchema->sanitizeOutPut($metaData['encodingFormat']);
587
+ }
588
+ $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_audio', $audio, $metaData));
589
+ break;
590
+
591
+ case 'service':
592
+ $service = array(
593
+ "@context" => "https://schema.org",
594
+ "@type" => "Service"
595
+ );
596
+ if (!empty($metaData['name'])) {
597
+ $service["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
598
+ }
599
+ if (!empty($metaData['serviceType'])) {
600
+ $service["serviceType"] = $KcSeoWPSchema->sanitizeOutPut($metaData['serviceType']);
601
+ }
602
+ if (!empty($metaData['award'])) {
603
+ $service["award"] = $KcSeoWPSchema->sanitizeOutPut($metaData['award']);
604
+ }
605
+ if (!empty($metaData['category'])) {
606
+ $service["category"] = $KcSeoWPSchema->sanitizeOutPut($metaData['category']);
607
+ }
608
+ if (!empty($metaData['providerMobility'])) {
609
+ $service["providerMobility"] = $KcSeoWPSchema->sanitizeOutPut($metaData['providerMobility']);
610
+ }
611
+ if (!empty($metaData['additionalType'])) {
612
+ $service["additionalType"] = $KcSeoWPSchema->sanitizeOutPut($metaData['additionalType']);
613
+ }
614
+ if (!empty($metaData['alternateName'])) {
615
+ $service["alternateName"] = $KcSeoWPSchema->sanitizeOutPut($metaData['alternateName']);
616
+ }
617
+ if (!empty($metaData['image'])) {
618
+ $service["image"] = $KcSeoWPSchema->sanitizeOutPut($metaData['image']);
619
+ }
620
+ if (!empty($metaData['mainEntityOfPage'])) {
621
+ $service["mainEntityOfPage"] = $KcSeoWPSchema->sanitizeOutPut($metaData['mainEntityOfPage']);
622
+ }
623
+ if (!empty($metaData['sameAs'])) {
624
+ $service["sameAs"] = $KcSeoWPSchema->sanitizeOutPut($metaData['sameAs']);
625
+ }
626
+ if (!empty($metaData['url'])) {
627
+ $service["url"] = $KcSeoWPSchema->sanitizeOutPut($metaData['url'], 'url');
628
+ }
629
+ $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_service', $service, $metaData));
630
+ break;
631
+
632
+ case 'about':
633
+ $aboutSchema = array(
634
+ "@context" => "https://schema.org",
635
+ "@type" => "AboutPage"
636
+ );
637
+
638
+ if (!empty($metaData['name'])) {
639
+ $aboutSchema["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
640
+ }
641
+ if (!empty($metaData['description'])) {
642
+ $aboutSchema["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
643
+ 'textarea');
644
+ }
645
+ if (!empty($metaData['image'])) {
646
+ $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
647
+ $aboutSchema["image"] = array(
648
+ "@type" => "ImageObject",
649
+ "url" => $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url'),
650
+ "height" => $img['height'],
651
+ "width" => $img['width']
652
+ );
653
+ }
654
+ if (!empty($metaData['url'])) {
655
+ $aboutSchema["url"] = $KcSeoWPSchema->sanitizeOutPut($metaData['url'], 'url');
656
+ }
657
+
658
+ if (isset($metaData['sameAs']) && !empty($metaData['sameAs'])) {
659
+ $sameAs = KcSeoHelper::get_same_as($KcSeoWPSchema->sanitizeOutPut($metaData['sameAs'], "textarea"));
660
+ if (!empty($sameAs)) {
661
+ $aboutSchema["sameAs"] = $sameAs;
662
+ }
663
+ }
664
+
665
+ $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_about', $aboutSchema, $metaData));
666
+ break;
667
+
668
+ case 'contact':
669
+ $contactSchema = array(
670
+ "@context" => "https://schema.org",
671
+ "@type" => "ContactPage"
672
+ );
673
+
674
+ if (!empty($metaData['name'])) {
675
+ $contactSchema["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
676
+ }
677
+ if (!empty($metaData['description'])) {
678
+ $contactSchema["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
679
+ 'textarea');
680
+ }
681
+ if (!empty($metaData['image'])) {
682
+ $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
683
+ $contactSchema["image"] = array(
684
+ "@type" => "ImageObject",
685
+ "url" => $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url'),
686
+ "height" => $img['height'],
687
+ "width" => $img['width']
688
+ );
689
+ }
690
+ if (!empty($metaData['url'])) {
691
+ $contactSchema["url"] = $KcSeoWPSchema->sanitizeOutPut($metaData['url'], 'url');
692
+ }
693
+
694
+ $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_contact', $contactSchema, $metaData));
695
+ break;
696
+
697
+ case 'review':
698
+ $review = array(
699
+ "@context" => "https://schema.org",
700
+ "@type" => "Review"
701
+ );
702
+ if (!empty($metaData['itemName'])) {
703
+ $review["itemReviewed"] = array(
704
+ "@type" => "product",
705
+ "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['itemName'])
706
+ );
707
+ }
708
+ if (!empty($metaData['ratingValue'])) {
709
+ $review["reviewRating"] = array(
710
+ "@type" => "Rating",
711
+ "ratingValue" => $KcSeoWPSchema->sanitizeOutPut($metaData['ratingValue']),
712
+ "bestRating" => $KcSeoWPSchema->sanitizeOutPut($metaData['bestRating']),
713
+ "worstRating" => $KcSeoWPSchema->sanitizeOutPut($metaData['worstRating'])
714
+ );
715
+ }
716
+ if (!empty($metaData['name'])) {
717
+ $review["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
718
+ }
719
+ if (!empty($metaData['author'])) {
720
+ $review["author"] = array(
721
+ "@type" => "Person",
722
+ "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['author'])
723
+ );
724
+ }
725
+ if (!empty($metaData['reviewBody'])) {
726
+ $review["reviewBody"] = $KcSeoWPSchema->sanitizeOutPut($metaData['reviewBody']);
727
+ }
728
+ if (!empty($metaData['datePublished'])) {
729
+ $review["datePublished"] = $KcSeoWPSchema->sanitizeOutPut($metaData['datePublished']);
730
+ }
731
+ if (!empty($metaData['publisher'])) {
732
+ $review["publisher"] = array(
733
+ "@type" => "Organization",
734
+ "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['publisher'])
735
+ );
736
+ }
737
+ $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_review', $review, $metaData));
738
+ break;
739
+ case 'aggregate_rating':
740
+ $aRating = array(
741
+ "@context" => "https://schema.org",
742
+ "@type" => !empty($metaData['schema_type']) ? $metaData['schema_type'] : "LocalBusiness"
743
+ );
744
+ if ("LocalBusiness" === $aRating['@type']) {
745
+ $aRating['@id'] = get_home_url();
746
+ }
747
+ if (!empty($metaData['name'])) {
748
+ $aRating["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
749
+ }
750
+ if (!empty($metaData['description'])) {
751
+ $aRating["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
752
+ 'textarea');
753
+ }
754
+ if ($aRating["@type"] != "Organization") {
755
+ if (!empty($metaData['image'])) {
756
+ $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
757
+ $aRating["image"] = array(
758
+ "@type" => "ImageObject",
759
+ "url" => $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url'),
760
+ "height" => $img['height'],
761
+ "width" => $img['width']
762
+ );
763
+ }
764
+ if (!empty($metaData['priceRange'])) {
765
+ $aRating["priceRange"] = $KcSeoWPSchema->sanitizeOutPut($metaData['priceRange']);
766
+ }
767
+ if (!empty($metaData['telephone'])) {
768
+ $aRating["telephone"] = $KcSeoWPSchema->sanitizeOutPut($metaData['telephone']);
769
+ }
770
+
771
+ if (!empty($metaData['address'])) {
772
+ $aRating["address"] = $KcSeoWPSchema->sanitizeOutPut($metaData['address']);
773
+ }
774
+ }
775
+
776
+ if (!empty($metaData['ratingValue'])) {
777
+ $rValue = array();
778
+ $rValue["@type"] = "AggregateRating";
779
+ $rValue["ratingValue"] = $KcSeoWPSchema->sanitizeOutPut($metaData['ratingValue']);
780
+ if (!empty($metaData['bestRating'])) {
781
+ $rValue["bestRating"] = $KcSeoWPSchema->sanitizeOutPut($metaData['bestRating']);
782
+ }
783
+ if (!empty($metaData['worstRating'])) {
784
+ $rValue["worstRating"] = $KcSeoWPSchema->sanitizeOutPut($metaData['worstRating']);
785
+ }
786
+ if (!empty($metaData['ratingCount'])) {
787
+ $rValue["ratingCount"] = $KcSeoWPSchema->sanitizeOutPut($metaData['ratingCount']);
788
+ }
789
+
790
+ $aRating["aggregateRating"] = $rValue;
791
+ }
792
+ $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_aggregate_rating', $aRating, $metaData));
793
+ break;
794
+
795
+ case 'restaurant':
796
+ $restaurant = array(
797
+ "@context" => "https://schema.org",
798
+ "@type" => "Restaurant"
799
+ );
800
+ if (!empty($metaData['name'])) {
801
+ $restaurant["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
802
+ }
803
+ if (!empty($metaData['description'])) {
804
+ $restaurant["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
805
+ 'textarea');
806
+ }
807
+ if (!empty($metaData['openingHours'])) {
808
+ $restaurant["openingHours"] = $KcSeoWPSchema->sanitizeOutPut($metaData['openingHours'],
809
+ 'textarea');
810
+ }
811
+ if (!empty($metaData['telephone'])) {
812
+ $restaurant["telephone"] = $KcSeoWPSchema->sanitizeOutPut($metaData['telephone']);
813
+ }
814
+ if (!empty($metaData['menu'])) {
815
+ $restaurant["menu"] = $KcSeoWPSchema->sanitizeOutPut($metaData['menu'], 'url');
816
+ }
817
+ if (!empty($metaData['image'])) {
818
+ $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
819
+ $restaurant["image"] = $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url');
820
+ }
821
+ if (!empty($metaData['address'])) {
822
+ $restaurant["address"] = $KcSeoWPSchema->sanitizeOutPut($metaData['address'], 'textarea');
823
+ }
824
+ if (!empty($metaData['priceRange'])) {
825
+ $restaurant["priceRange"] = $KcSeoWPSchema->sanitizeOutPut($metaData['priceRange']);
826
+ }
827
+ if (!empty($metaData['servesCuisine'])) {
828
+ $restaurant["servesCuisine"] = $KcSeoWPSchema->sanitizeOutPut($metaData['servesCuisine']);
829
+ }
830
+ $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_restaurant', $restaurant, $metaData));
831
+ break;
832
+
833
+ case 'localBusiness':
834
+ $local_business = array(
835
+ "@context" => "https://schema.org",
836
+ "@type" => "LocalBusiness",
837
+ '@id' => get_home_url()
838
+ );
839
+ if (!empty($metaData['name'])) {
840
+ $local_business["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
841
+ }
842
+ if (!empty($metaData['description'])) {
843
+ $local_business["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
844
+ 'textarea');
845
+ }
846
+ if (!empty($metaData['image'])) {
847
+ $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
848
+ $local_business["image"] = $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url');
849
+ }
850
+ if (!empty($metaData['priceRange'])) {
851
+ $local_business["priceRange"] = $KcSeoWPSchema->sanitizeOutPut($metaData['priceRange']);
852
+ }
853
+ if (!empty($metaData['addressLocality']) || !empty($metaData['addressRegion'])
854
+ || !empty($metaData['postalCode']) || !empty($metaData['streetAddress'])) {
855
+ $local_business["address"] = array(
856
+ "@type" => "PostalAddress",
857
+ "addressLocality" => $KcSeoWPSchema->sanitizeOutPut($metaData['addressLocality']),
858
+ "addressRegion" => $KcSeoWPSchema->sanitizeOutPut($metaData['addressRegion']),
859
+ "postalCode" => $KcSeoWPSchema->sanitizeOutPut($metaData['postalCode']),
860
+ "streetAddress" => $KcSeoWPSchema->sanitizeOutPut($metaData['streetAddress'])
861
+ );
862
+ }
863
+
864
+ if (!empty($metaData['telephone'])) {
865
+ $local_business["telephone"] = $KcSeoWPSchema->sanitizeOutPut($metaData['telephone']);
866
+ }
867
+ $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_local_business', $local_business, $metaData));
868
+ if (isset($metaData['review_active'])) {
869
+ $local_business_review = array(
870
+ "@context" => "https://schema.org",
871
+ "@type" => "Review",
872
+ );
873
+ if (isset($metaData['review_datePublished']) && !empty($metaData['review_datePublished'])) {
874
+ $local_business_review["datePublished"] = $KcSeoWPSchema->sanitizeOutPut($metaData['review_datePublished']);
875
+ }
876
+ if (isset($metaData['review_body']) && !empty($metaData['review_body'])) {
877
+ $local_business_review["reviewBody"] = $KcSeoWPSchema->sanitizeOutPut($metaData['review_body'], 'textarea');
878
+ }
879
+
880
+ unset($local_business['@context']);
881
+ if (isset($local_business["description"])) {
882
+ $local_business_review["description"] = KcSeoHelper::filter_content($local_business["description"], 200);
883
+ unset($local_business["description"]);
884
+ }
885
+ if (isset($metaData['review_sameAs']) && !empty($metaData['review_sameAs'])) {
886
+ $sameAs = KcSeoHelper::get_same_as($KcSeoWPSchema->sanitizeOutPut($metaData['review_sameAs'], "textarea"));
887
+ if (!empty($sameAs)) {
888
+ $local_business["sameAs"] = $sameAs;
889
+ }
890
+ }
891
+
892
+ $local_business_review["itemReviewed"] = $local_business;
893
+ if (!empty($metaData['review_author'])) {
894
+ $local_business_review["author"] = array(
895
+ "@type" => "Person",
896
+ "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['review_author'])
897
+ );
898
+
899
+ if (isset($metaData['review_author_sameAs']) && !empty($metaData['review_author_sameAs'])) {
900
+ $sameAs = KcSeoHelper::get_same_as($KcSeoWPSchema->sanitizeOutPut($metaData['review_author_sameAs'], "textarea"));
901
+ if (!empty($sameAs)) {
902
+ $local_business_review["author"]["sameAs"] = $sameAs;
903
+ }
904
+ }
905
+ }
906
+ if (isset($metaData['review_ratingValue'])) {
907
+ $local_business_review["reviewRating"] = array(
908
+ "@type" => "Rating",
909
+ "ratingValue" => $KcSeoWPSchema->sanitizeOutPut($metaData['review_ratingValue'], 'number')
910
+ );
911
+ if (isset($metaData['review_bestRating'])) {
912
+ $local_business_review["reviewRating"]["bestRating"] = $KcSeoWPSchema->sanitizeOutPut($metaData['review_bestRating'], 'number');
913
+ }
914
+ if (isset($metaData['review_worstRating'])) {
915
+ $local_business_review["reviewRating"]["worstRating"] = $KcSeoWPSchema->sanitizeOutPut($metaData['review_worstRating'], 'number');
916
+ }
917
+ }
918
+ $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_local_business_review', $local_business_review, $metaData));
919
+ }
920
+ break;
921
+ case 'specialAnnouncement':
922
+ $announcement = array(
923
+ "@context" => "https://schema.org",
924
+ "@type" => "SpecialAnnouncement",
925
+ "category" => "https://www.wikidata.org/wiki/Q81068910"
926
+ );
927
+ if (!empty($metaData['name'])) {
928
+ $announcement['name'] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
929
+ }
930
+ if (!empty($metaData['datePublished'])) {
931
+ $announcement['datePosted'] = $KcSeoWPSchema->sanitizeOutPut($metaData['datePublished']);
932
+ }
933
+ if (!empty($metaData['expires'])) {
934
+ $announcement['expires'] = $KcSeoWPSchema->sanitizeOutPut($metaData['expires']);
935
+ }
936
+ if (!empty($metaData['text'])) {
937
+ $announcement['text'] = $KcSeoWPSchema->sanitizeOutPut($metaData['text'], 'textarea');
938
+ }
939
+ if (!empty($metaData['url'])) {
940
+ $announcement['url'] = $KcSeoWPSchema->sanitizeOutPut($metaData['url'], 'url');
941
+ }
942
+ if (isset($metaData['locations']) && is_array($metaData['locations']) && !empty($metaData['locations'])) {
943
+ $locations_schema = [];
944
+ foreach ($metaData['locations'] as $position => $location) {
945
+ if ($location['type']) {
946
+ $location_schema = array(
947
+ "@type" => $KcSeoWPSchema->sanitizeOutPut($location['type']),
948
+ 'name' => !empty($location['name']) ? $KcSeoWPSchema->sanitizeOutPut($location['name']) : "",
949
+ 'url' => !empty($location['url']) ? $KcSeoWPSchema->sanitizeOutPut($location['url'], 'url') : '',
950
+ "address" => [
951
+ "@type" => "PostalAddress",
952
+ ]
953
+ );
954
+ if (!empty($location['id'])) {
955
+ $location_schema['@id'] = $KcSeoWPSchema->sanitizeOutPut($location['id']);
956
+ }
957
+ if (!empty($location['image'])) {
958
+ $img = $KcSeoWPSchema->imageInfo(absint($location['image']));
959
+ $location_schema["image"] = $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url');
960
+ }
961
+ if (!empty($location['url'])) {
962
+ $location_schema['url'] = $KcSeoWPSchema->sanitizeOutPut($location['url'], 'url');
963
+ }
964
+ if (!empty($location['address_street'])) {
965
+ $location_schema['address']['streetAddress'] = $KcSeoWPSchema->sanitizeOutPut($location['address_street']);
966
+ }
967
+ if (!empty($location['address_locality'])) {
968
+ $location_schema['address']['addressLocality'] = $KcSeoWPSchema->sanitizeOutPut($location['address_locality']);
969
+ }
970
+ if (!empty($location['address_post_code'])) {
971
+ $location_schema['address']['postalCode'] = $KcSeoWPSchema->sanitizeOutPut($location['address_post_code']);
972
+ }
973
+ if (!empty($location['address_region'])) {
974
+ $location_schema['address']['addressRegion'] = $KcSeoWPSchema->sanitizeOutPut($location['address_region']);
975
+ }
976
+ if (!empty($location['address_country'])) {
977
+ $location_schema['address']['addressCountry'] = $KcSeoWPSchema->sanitizeOutPut($location['address_country']);
978
+ }
979
+ if (!empty($location['priceRange'])) {
980
+ $location_schema["priceRange"] = $KcSeoWPSchema->sanitizeOutPut($location['priceRange']);
981
+ }
982
+ if (!empty($location['telephone'])) {
983
+ $location_schema["telephone"] = $KcSeoWPSchema->sanitizeOutPut($location['telephone']);
984
+ }
985
+ array_push($locations_schema, $location_schema);
986
+ }
987
+
988
+ }
989
+ if (count($locations_schema) === 1) {
990
+ $announcement['announcementLocation'] = $locations_schema[0];
991
+ } else {
992
+ $announcement['announcementLocation'] = $locations_schema;
993
+ }
994
+ }
995
+ $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_item_list', $announcement, $metaData));
996
+ break;
997
+ default:
998
+ break;
999
+ }
1000
+
1001
+ }
1002
+
1003
+ return $html;
1004
+ }
1005
+
1006
+ function get_field($data) {
1007
+ $html = null;
1008
+ global $KcSeoWPSchema;
1009
+ $id = $data['id'];
1010
+ $name = $data['name'];
1011
+ $value = $data['value'];
1012
+ $attr = !empty($data['attr']) ? $data['attr'] : null;
1013
+
1014
+ $class = isset($data['class']) ? ($data['class'] ? $data['class'] : null) : null;
1015
+ $require = (isset($data['required']) ? ($data['required'] ? sprintf('<span data-kcseo-tooltip="%s" class="required">*</span>', __("Required", "wp-seo-structured-data-schema")) : null) : null);
1016
+ $recommended = (isset($data['recommended']) ? ($data['recommended'] ? sprintf('<span data-kcseo-tooltip="%s" class="recommended">*</span>', __("Recommended", "wp-seo-structured-data-schema")) : null) : null);
1017
+ $title = (isset($data['title']) ? ($data['title'] ? $data['title'] : null) : null);
1018
+ $desc = (isset($data['desc']) ? ($data['desc'] ? $data['desc'] : null) : null);
1019
+ $holderClass = (!empty($data['holderClass']) ? $data['holderClass'] : null);
1020
+
1021
+ switch ($data['type']) {
1022
+ case 'checkbox':
1023
+ $checked = ($value ? "checked" : null);
1024
+ $html .= "<div class='kSeo-checkbox-wrapper'>";
1025
+ $html .= "<label for='{$id}'><input type='checkbox' id='{$id}' class='{$class}' name='{$name}' {$checked} value='1' /> Enable</label>";
1026
+ $html .= "</div>";
1027
+ break;
1028
+ case 'text':
1029
+ $html .= "<input type='text' id='{$id}' class='{$class}' {$attr} name='{$name}' value='" . esc_html($value) . "' />";
1030
+ break;
1031
+ case 'number':
1032
+ if ($data['fieldId'] == 'price') {
1033
+ $html .= "<input type='number' step='any' id='{$id}' class='{$class}' {$attr} name='{$name}' value='" . esc_attr($value) . "' />";
1034
+ } else {
1035
+ $html .= "<input type='number' id='{$id}' class='{$class}' name='{$name}' {$attr} value='" . esc_attr($value) . "' />";
1036
+ }
1037
+ break;
1038
+ case 'textarea':
1039
+ $html .= "<textarea id='{$id}' class='{$class}' {$attr} name='{$name}' >" . wp_kses($value,
1040
+ array()) . "</textarea>";
1041
+ break;
1042
+ case 'image':
1043
+ $html .= '<div class="kSeo-image">';
1044
+ $ImageId = !empty($value) ? absint($value) : 0;
1045
+ $image = $ingInfo = null;
1046
+ if ($ImageId) {
1047
+ $image = wp_get_attachment_image($ImageId, "thumbnail");
1048
+ $imgData = $KcSeoWPSchema->imageInfo($ImageId);
1049
+ $ingInfo .= "<span><strong>URL: </strong>{$imgData['url']}</span>";
1050
+ $ingInfo .= "<span><strong>Width: </strong>{$imgData['width']}px</span>";
1051
+ $ingInfo .= "<span><strong>Height: </strong>{$imgData['height']}px</span>";
1052
+ }
1053
+ $html .= "<div class='kSeo-image-wrapper'>";
1054
+ $html .= '<span class="kSeoImgAdd"><span class="dashicons dashicons-plus-alt"></span></span>';
1055
+ $html .= '<span class="kSeoImgRemove ' . ($image ? null : "kSeo-hidden") . '"><span class="dashicons dashicons-trash"></span></span>';
1056
+ $html .= '<div class="kSeo-image-preview">' . $image . '</div>';
1057
+ $html .= "<input type='hidden' name='{$name}' value='" . absint($ImageId) . "' />";
1058
+ $html .= "</div>";
1059
+ $html .= "<div class='image-info'>{$ingInfo}</div>";
1060
+ $html .= '</div>';
1061
+ break;
1062
+ case 'select':
1063
+ $html .= "<select name='{$name}' {$attr} class='select2 {$class}' id='{$id}'>";
1064
+ if (!empty($data['empty'])) {
1065
+ $html .= "<option value=''>{$data['empty']}</option>";
1066
+ }
1067
+ if (!empty($data['options']) && is_array($data['options'])) {
1068
+ if ($this->isAssoc($data['options'])) {
1069
+ foreach ($data['options'] as $optKey => $optValue) {
1070
+ $slt = ($optKey == $value ? "selected" : null);
1071
+ $html .= "<option value='" . esc_attr($optKey) . "' {$slt}>" . esc_html($optValue) . "</option>";
1072
+ }
1073
+ } else {
1074
+ foreach ($data['options'] as $optValue) {
1075
+ $slt = ($optValue == $value ? "selected" : null);
1076
+ $html .= "<option value='" . esc_attr($optValue) . "' {$slt}>" . esc_html($optValue) . "</option>";
1077
+ }
1078
+ }
1079
+ }
1080
+ $html .= "</select>";
1081
+ break;
1082
+ case 'schema_type':
1083
+ $html .= "<select name='{$name}' class='select2 {$class}' id='{$id}'>";
1084
+ if (!empty($data['empty'])) {
1085
+ $html .= "<option value=''>{$data['empty']}</option>";
1086
+ }
1087
+
1088
+ foreach ($data['options'] as $key => $site) {
1089
+ if (is_array($site)) {
1090
+ $slt = ($key == $value ? "selected" : null);
1091
+ $html .= "<option value='$key' $slt>&nbsp;&nbsp;&nbsp;$key</option>";
1092
+ foreach ($site as $inKey => $inSite) {
1093
+ if (is_array($inSite)) {
1094
+ $slt = ($inKey == $value ? "selected" : null);
1095
+ $html .= "<option value='$inKey' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$inKey</option>";
1096
+ foreach ($inSite as $inInKey => $inInSite) {
1097
+ if (is_array($inInSite)) {
1098
+ $slt = ($inInKey == $value ? "selected" : null);
1099
+ $html .= "<option value='$inInKey' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$inInKey</option>";
1100
+ foreach ($inInSite as $iSite) {
1101
+ $slt = ($iSite == $value ? "selected" : null);
1102
+ $html .= "<option value='$iSite' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$iSite</option>";
1103
+ }
1104
+ } else {
1105
+ $slt = ($inInSite == $value ? "selected" : null);
1106
+ $html .= "<option value='$inInSite' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$inInSite</option>";
1107
+ }
1108
+ }
1109
+ } else {
1110
+ $slt = ($inSite == $value ? "selected" : null);
1111
+ $html .= "<option value='$inSite' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$inSite</option>";
1112
+ }
1113
+ }
1114
+ } else {
1115
+ $slt = ($site == $value ? "selected" : null);
1116
+ $html .= "<option value='$site' $slt>$site</option>";
1117
+ }
1118
+ }
1119
+ $html .= "</select>";
1120
+ break;
1121
+ default:
1122
+ $html .= "<input id='{$id}' type='{$data['type']}' {$attr} value='" . esc_attr($value) . "' name='$name' />";
1123
+ break;
1124
+
1125
+ }
1126
+ $label = "<label class='field-label' for='{$id}'>{$title}{$require}{$recommended}</label>";
1127
+ $field_html = sprintf('<div class="field-content" id="%s-content">%s<p class="description">%s</div>', $id, $html, $desc);
1128
+ if ($data['type'] == 'heading') {
1129
+ $holderClass .= ' kcseo-heading-container';
1130
+ $label = '';
1131
+ $field_html = sprintf('<div class="kcseo-section-title-wrap">%s%s</div>',
1132
+ $title ? sprintf('<h5>%s</h5>', $title) : '',
1133
+ $desc ? sprintf('<p class="description">%s</p>', $desc) : null
1134
+ );
1135
+ }
1136
+
1137
+ $html = sprintf('<div class="field-container %s" id="%s-container">%s%s</div>',
1138
+ $holderClass,
1139
+ $id,
1140
+ $label,
1141
+ $field_html
1142
+ );
1143
+
1144
+ return $html;
1145
+ }
1146
+
1147
+ /**
1148
+ * @param array $data
1149
+ *
1150
+ * @return string|null
1151
+ */
1152
+ function get_jsonEncode($data = array()) {
1153
+ $html = null;
1154
+ if (!empty($data) && is_array($data)) {
1155
+ $html .= '<script type="application/ld+json">' . json_encode($data,
1156
+ JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . '</script>';
1157
+ }
1158
+
1159
+ return $html;
1160
+ }
1161
+
1162
+ function imgInfo($url = null) {
1163
+ $img = array();
1164
+ if ($url) {
1165
+ $imgA = @getimagesize($url);
1166
+ if (is_array($imgA) && !empty($imgA)) {
1167
+ $img['width'] = $imgA[0];
1168
+ $img['height'] = $imgA[1];
1169
+ } else {
1170
+ $img['width'] = 0;
1171
+ $img['height'] = 0;
1172
+ }
1173
+ }
1174
+
1175
+ return $img;
1176
+ }
1177
+
1178
+ function isAssoc($array) {
1179
+ $keys = array_keys($array);
1180
+
1181
+ return $keys !== array_keys($keys);
1182
+ }
1183
+
1184
+
1185
+ }
1186
  endif;
lib/views/schema-options.php CHANGED
@@ -1,568 +1,568 @@
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">
17
- <th>Website Url <span class="required">*</span></th>
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 esc_html_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>
30
- </div>
31
- </div>
32
- </td>
33
- </tr>
34
- <tr class="default">
35
- <th><?php esc_html_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 esc_html_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 (KcSeoOptions::getSiteTypes() 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 esc_html_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']) ? stripslashes( $settings['type_name'] ) : null); ?>"/>
82
- </td>
83
- </tr>
84
- <tr class="default all-type-data">
85
- <th><?php esc_html_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>
108
- <div class='image-info'><?php echo $ingInfo; ?></div>
109
- </div>
110
- </td>
111
- </tr>
112
- <tr class="default all-type-data">
113
- <th><?php esc_html_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 esc_html_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 esc_html_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 esc_html_e("The telephone number.", "wp-seo-structured-data-schema") ?></div>
128
- </td>
129
- </tr>
130
- <tr class="default">
131
- <th><?php esc_html_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 esc_html_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>
152
- </div>
153
- </td>
154
- </tr>
155
- <tr class="default restaurant">
156
- <th style="font-size: 18px; padding: 30px 0 5px;"><?php esc_html_e("Restaurant Information", "wp-seo-structured-data-schema") ?></th>
157
- </tr>
158
- <tr class="default restaurant">
159
- <th><?php esc_html_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 esc_html_e("Others local business info", "wp-seo-structured-data-schema") ?></th>
168
- </tr>
169
- <tr class="default business-info">
170
- <th><?php esc_html_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']) ? stripslashes($settings['business_info']['description']) : null); ?></textarea>
174
- </td>
175
- </tr>
176
- <tr class="default business-info">
177
- <th><?php esc_html_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/search/docs/advanced/structured-data">https://developers.google.com/search/docs/advanced/structured-data</a>
198
- </p>
199
- </div>
200
- </div>
201
- </td>
202
- </tr>
203
- <tr class="default business-info">
204
- <th style="font-size: 16px;"><?php esc_html_e("GeoCoordinates", "wp-seo-structured-data-schema") ?></th>
205
- </tr>
206
- <tr class="default business-info">
207
- <th style="text-align: right"><?php esc_html_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 esc_html_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 esc_html_e("Person", "wp-seo-structured-data-schema") ?></th>
222
- </tr>
223
- <tr class="default person">
224
- <th><?php esc_html_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 esc_html_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 esc_html_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 esc_html_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 esc_html_e("Add your personal photo here", "wp-seo-structured-data-schema") ?></p>
252
- </td>
253
- </tr>
254
- <tr class="default person">
255
- <th><?php esc_html_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 esc_html_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 esc_html_e("Address", "wp-seo-structured-data-schema") ?></th>
271
- </tr>
272
- <tr class="default">
273
- <th><?php esc_html_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 (KcSeoOptions::getCountryList() as $country) {
280
- $slt = ($country == $aCountry ? "selected" : null);
281
- echo "<option value='$country' $slt>$country</option>";
282
- }
283
- ?>
284
- </select>
285
- </td>
286
- </tr>
287
- <tr class="default">
288
- <th><?php esc_html_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 esc_html_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 esc_html_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 esc_html_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
-
315
- <div class="add-new-address-tools">
316
- <a id="kcseo-add-address"
317
- class="button button-primary"><?php esc_html_e("Add New Address", "wp-seo-structured-data-schema") ?></a>
318
- <span class='kcseo-pro-label'><?php esc_html_e("PRO", "wp-seo-structured-data-schema") ?></span>
319
- </div>
320
- </div>
321
- <div id="tabs-kcseo-container" class="rt-tab-container">
322
- <ul class="rt-tab-nav">
323
- <li class="active" data-id="tab-logo-url"><a
324
- href="#tab-logo-url"><?php esc_html_e("Organization Logo", "wp-seo-structured-data-schema") ?></a>
325
- </li>
326
- <li data-id="tab-social-profile">
327
- <a href="#tab-social-profile"><?php esc_html_e("Social Profile", "wp-seo-structured-data-schema") ?></a>
328
- </li>
329
- <li data-id="tab-corporate-contract">
330
- <a href="#tab-corporate-contract"><?php esc_html_e("Corporate Contacts", "wp-seo-structured-data-schema") ?></a>
331
- </li>
332
- </ul>
333
- <div id="tab-logo-url" class="rt-tab-content active">
334
- <table width="100%" cellpadding="10" class="form-table">
335
- <tr class="field_logo">
336
- <th><?php esc_html_e("Select Organization Logo", "wp-seo-structured-data-schema") ?></th>
337
- <td scope="row" style="position: relative">
338
- <div class="kSeo-image">
339
- <div class="kSeo-image-wrapper">
340
- <?php
341
- $organizationLogoId = !empty($settings['organization_logo']) ? absint($settings['organization_logo']) : null;
342
- $organizeImage = $imgInfo = null;
343
- if ($organizationLogoId) {
344
- $organizeImage = wp_get_attachment_image($organizationLogoId, "thumbnail");
345
- $imgData = $KcSeoWPSchema->imageInfo($organizationLogoId);
346
- $imgInfo .= "<span><strong>URL: </strong>{$imgData['url']}</span>";
347
- $imgInfo .= "<span><strong>Width: </strong>{$imgData['width']}px</span>";
348
- $imgInfo .= "<span><strong>Height: </strong>{$imgData['height']}px</span>";
349
- }
350
- ?>
351
- <span class="kSeoImgAdd"><span class="dashicons dashicons-plus-alt"></span></span>
352
- <span
353
- class="kSeoImgRemove <?php echo($organizationLogoId ? null : "kSeo-hidden"); ?>"><span
354
- class="dashicons dashicons-trash"></span></span>
355
- <div class="kSeo-image-preview"><?php echo $organizeImage; ?></div>
356
- <input type="hidden" name="organization_logo"
357
- value="<?php echo $organizationLogoId; ?>"/>
358
- </div>
359
- <div class='image-info'><?php echo $imgInfo; ?></div>
360
- </div>
361
- <div class="schema-tooltip-holder" style="left: 200px">
362
- <span class="schema-tooltip"></span>
363
- <div class="hidden">
364
- <p><b>Tip:</b> For some Rich Snippets that use the image property, no
365
- dimensions are specified, For other Rich Snippets that use the image
366
- property, Google specifies at least 160x90 pixels and at most 1920x1080
367
- pixels. For Google Search, the documentation for their Rich Snippets is
368
- at
369
- <a href="https://developers.google.com/structured-data/rich-snippets/.">https://developers.google.com/structured-data/rich-snippets/.</a>
370
- </p>
371
- </div>
372
- </div>
373
- </td>
374
- </tr>
375
- </table>
376
- </div>
377
- <div id="tab-social-profile" class="rt-tab-content">
378
- <table width="100%" cellpadding="10" class="form-table">
379
- <tr class="field_social">
380
- <th><?php esc_html_e("Company Name", "wp-seo-structured-data-schema") ?></th>
381
- <td align="left" scope="row">
382
- <input type="text" class="regular-text" name="social_company_name"
383
- value="<?php echo(!empty($settings['social_company_name']) ? esc_attr($settings['social_company_name']) : null); ?>"/>
384
- </td>
385
- </tr>
386
- <tr class="field_social_title">
387
- <th style="font-size: 18px; padding: 10px 0;"><?php esc_html_e("Social Profiles", "wp-seo-structured-data-schema") ?></th>
388
- </tr>
389
- <tr class="social_field_link">
390
- <th><?php esc_html_e("Social Profile", "wp-seo-structured-data-schema") ?></th>
391
- <th>
392
- <div id="social-field-holder">
393
- <?php
394
- $socialP = (!empty($settings['social']) ? $settings['social'] : array());
395
- if (is_array($socialP) && !empty($socialP)) {
396
- $html = null;
397
- $i = 0;
398
- foreach ($socialP as $socialD) {
399
- $html .= "<div class='sfield'>";
400
- $html .= "<select name='social[$i][id]'>";
401
- foreach (KcSeoOptions::getSocialList() as $sId => $social) {
402
- $slt = ($sId == $socialD['id'] ? "selected" : null);
403
- $html .= "<option value='$sId' $slt>$social</option>";
404
- }
405
- $html .= "</select>";
406
- $html .= "<input type='text' name='social[$i][link]' value='{$socialD['link']}'>";
407
- $html .= '<span class="dashicons dashicons-trash social-remove"></span>';
408
- $html .= "</div>";
409
- $i++;
410
- }
411
- echo $html;
412
- }
413
- ?>
414
- </div>
415
- <a class="button button-primary add-new"
416
- id="social-add"><?php esc_html_e("Add Social Profile", "wp-seo-structured-data-schema") ?></a>
417
- </th>
418
- </tr>
419
- </table>
420
- </div>
421
- <div id="tab-corporate-contract" class="rt-tab-content">
422
- <table width="100%" cellpadding="10" class="form-table">
423
- <tr class="field_contact">
424
- <th style="font-size: 18px; padding: 10px 0;"><?php esc_html_e("Contacts", "wp-seo-structured-data-schema") ?></th>
425
- </tr>
426
- <tr class="field_contact">
427
- <th>Contact Type</th>
428
- <td scope="row">
429
- <select name="contact[contactType]" class="select2" style="width: 200px">
430
- <?php
431
- $contactType = !empty($settings['contact']['contactType']) ? $settings['contact']['contactType'] : null;
432
- foreach (KcSeoOptions::getContactTypes() as $cType) {
433
- $slt = ($cType == $contactType ? "selected" : null);
434
- echo "<option value='$cType' $slt>$cType</option>";
435
- }
436
-
437
- ?>
438
- </select>
439
- </td>
440
-
441
- </tr>
442
- <tr class="field_contact">
443
- <th><?php esc_html_e("Contact Phone", "wp-seo-structured-data-schema") ?></th>
444
- <td align="left" scope="row">
445
- <input type="text" class="regular-text" name="contact[telephone]"
446
- value="<?php echo(!empty($settings['contact']['telephone']) ? esc_attr($settings['contact']['telephone']) : null); ?>"/>
447
- <p class="description kco-telephone"><?php esc_html_e("Please follow the format below", "wp-seo-structured-data-schema") ?>
448
- <span
449
- style="font-size: 11px;">+1-505-998-3793</span><span
450
- style="font-size: 11px;">+(Country Code) 425 123-4567</span><span
451
- style="font-size: 11px;">+(Country Code) 42 68 53 01</span><span
452
- style="font-size: 11px;">+44-2078225951</span><span
453
- style="font-size: 11px;">1 (855) 469-6378</span>
454
- </p>
455
- </td>
456
- </tr>
457
- <tr class="field_contact">
458
- <th><?php esc_html_e("Contact Email", "wp-seo-structured-data-schema") ?></th>
459
- <td align="left" scope="row">
460
- <input type="text" class="regular-text" name="contact[email]"
461
- value="<?php echo(!empty($settings['contact']['email']) ? sanitize_email($settings['contact']['email']) : null); ?>"/>
462
- </td>
463
- </tr>
464
- <tr class="field_contact">
465
- <th><?php esc_html_e("Contact Option", "wp-seo-structured-data-schema") ?></th>
466
- <td align="left" scope="row">
467
- <select name="contact[contactOption]" class="select2 withEmptyOption"
468
- style="width: 200px">
469
- <option value=""><?php esc_html_e("Select an option", "wp-seo-structured-data-schema") ?></option>
470
- <option value="TollFree" <?php
471
- $cPtOpt = !empty($settings['contact']['contactOption']) ? $settings['contact']['contactOption'] : null;
472
- echo($cPtOpt == "TollFree" ? "selected" : null); ?>><?php esc_html_e("TollFree", "wp-seo-structured-data-schema") ?>
473
- </option>
474
- <option
475
- value="HearingImpairedSupported" <?php echo($settings['contact']['contactOption'] == "HearingImpairedSupported" ? "selected" : null); ?>>
476
- <?php esc_html_e("HearingImpairedSupported", "wp-seo-structured-data-schema") ?>
477
- </option>
478
- </select>
479
- </td>
480
- </tr>
481
- <tr class="field_contact">
482
- <th><?php esc_html_e("Area Served", "wp-seo-structured-data-schema") ?></th>
483
- <td align="left" scope="row">
484
- <div class="area_served_wrapper">
485
- <select id="area_served" class="select2" name="area_served[]"
486
- multiple="multiple"
487
- style="width: 50%">
488
- <?php
489
- $areaServed = !empty($settings['area_served']) ? $settings['area_served'] : array();
490
- foreach (KcSeoOptions::getCountryList() as $countryId => $country) {
491
- $slt = (in_array($countryId, $areaServed) ? "selected" : null);
492
- echo "<option value='$countryId' $slt>$country</option>";
493
- }
494
- ?>
495
- </select>
496
- </div>
497
- </td>
498
- </tr>
499
- <tr class="field_contact">
500
- <th><?php esc_html_e("Available language", "wp-seo-structured-data-schema") ?></th>
501
- <td scope="row" class="lang">
502
- <select class="select2" name="availableLanguage[]" style="width: 50%"
503
- multiple="multiple">
504
- <?php
505
- $lanAvailable = !empty($settings['availableLanguage']) ? $settings['availableLanguage'] : array();
506
- foreach (KcSeoOptions::getLanguageList() as $language) {
507
- $slt = (in_array($language, $lanAvailable) ? "selected" : null);
508
- echo "<option value='$language' $slt>$language</option>";
509
- }
510
- ?>
511
- </select>
512
- </td>
513
- </tr>
514
- </table>
515
- </div>
516
- </div>
517
-
518
- <h2><?php esc_html_e("Site Schema", "wp-seo-structured-data-schema") ?></h2>
519
- <table width="100%" cellpadding="10" class="form-table">
520
- <tr class="default">
521
- <th><?php esc_html_e("Disable Site Schema", "wp-seo-structured-data-schema") ?></th>
522
- <td align="left" scope="row">
523
- <input type="checkbox"
524
- name="disable_site_schema" <?php echo(!empty($settings['disable_site_schema']) ? "checked" : null); ?>
525
- value="1"/>
526
- </td>
527
- </tr>
528
- <tr class="default">
529
- <th><?php esc_html_e("Enable Site link Search Box", "wp-seo-structured-data-schema") ?></th>
530
- <td align="left" scope="row">
531
- <input type="checkbox"
532
- name="homeonly" <?php echo(!empty($settings['homeonly']) ? "checked" : null); ?>
533
- value="1"/>
534
- <p class="description"><?php esc_html_e("Note: Preferred Name markup may no longer be supported by Google", "wp-seo-structured-data-schema") ?></p>
535
- </td>
536
- </tr>
537
- <tr class="default">
538
- <th><?php esc_html_e("Site Name:", "wp-seo-structured-data-schema") ?></th>
539
- <td align="left" scope="row">
540
- <input type="text" class="regular-text" name="sitename"
541
- value="<?php echo(!empty($settings['sitename']) ? esc_attr($settings['sitename']) : null); ?>"/>
542
- </td>
543
- </tr>
544
- <tr class="default">
545
- <th><?php esc_html_e("Site Alternative Name:", "wp-seo-structured-data-schema") ?></th>
546
- <td align="left" scope="row">
547
- <input type="text" class="regular-text" name="siteaname"
548
- value="<?php echo(!empty($settings['siteaname']) ? esc_attr($settings['siteaname']) : null); ?>"/>
549
- </td>
550
- </tr>
551
- <tr class="default">
552
- <th><?php esc_html_e("Site Url:", "wp-seo-structured-data-schema") ?></th>
553
- <td align="left" scope="row">
554
- <input type="text" class="regular-text" name="siteurl"
555
- value="<?php echo(!empty($settings['siteurl']) ? esc_attr($settings['siteurl']) : get_home_url()); ?>"/>
556
- </td>
557
- </tr>
558
- </table>
559
- <p class="submit"><input type="submit" name="submit" id="tlpSaveButton" class="button button-primary"
560
- value="<?php esc_html_e('Save Changes', "wp-seo-structured-data-schema"); ?>"></p>
561
-
562
- <?php wp_nonce_field($KcSeoWPSchema->nonceText(), '_kcseo_nonce'); ?>
563
- </form>
564
- <div id="response"></div>
565
- </div>
566
- <?php $KcSeoWPSchema->advertisingBlock(); ?>
567
- </div>
568
- </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">
17
+ <th>Website Url <span class="required">*</span></th>
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 esc_html_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>
30
+ </div>
31
+ </div>
32
+ </td>
33
+ </tr>
34
+ <tr class="default">
35
+ <th><?php esc_html_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 esc_html_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 (KcSeoOptions::getSiteTypes() 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 esc_html_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']) ? stripslashes( $settings['type_name'] ) : null); ?>"/>
82
+ </td>
83
+ </tr>
84
+ <tr class="default all-type-data">
85
+ <th><?php esc_html_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>
108
+ <div class='image-info'><?php echo $ingInfo; ?></div>
109
+ </div>
110
+ </td>
111
+ </tr>
112
+ <tr class="default all-type-data">
113
+ <th><?php esc_html_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 esc_html_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 esc_html_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 esc_html_e("The telephone number.", "wp-seo-structured-data-schema") ?></div>
128
+ </td>
129
+ </tr>
130
+ <tr class="default">
131
+ <th><?php esc_html_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 esc_html_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>
152
+ </div>
153
+ </td>
154
+ </tr>
155
+ <tr class="default restaurant">
156
+ <th style="font-size: 18px; padding: 30px 0 5px;"><?php esc_html_e("Restaurant Information", "wp-seo-structured-data-schema") ?></th>
157
+ </tr>
158
+ <tr class="default restaurant">
159
+ <th><?php esc_html_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 esc_html_e("Others local business info", "wp-seo-structured-data-schema") ?></th>
168
+ </tr>
169
+ <tr class="default business-info">
170
+ <th><?php esc_html_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']) ? stripslashes($settings['business_info']['description']) : null); ?></textarea>
174
+ </td>
175
+ </tr>
176
+ <tr class="default business-info">
177
+ <th><?php esc_html_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/search/docs/advanced/structured-data">https://developers.google.com/search/docs/advanced/structured-data</a>
198
+ </p>
199
+ </div>
200
+ </div>
201
+ </td>
202
+ </tr>
203
+ <tr class="default business-info">
204
+ <th style="font-size: 16px;"><?php esc_html_e("GeoCoordinates", "wp-seo-structured-data-schema") ?></th>
205
+ </tr>
206
+ <tr class="default business-info">
207
+ <th style="text-align: right"><?php esc_html_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 esc_html_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 esc_html_e("Person", "wp-seo-structured-data-schema") ?></th>
222
+ </tr>
223
+ <tr class="default person">
224
+ <th><?php esc_html_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 esc_html_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 esc_html_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 esc_html_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 esc_html_e("Add your personal photo here", "wp-seo-structured-data-schema") ?></p>
252
+ </td>
253
+ </tr>
254
+ <tr class="default person">
255
+ <th><?php esc_html_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 esc_html_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 esc_html_e("Address", "wp-seo-structured-data-schema") ?></th>
271
+ </tr>
272
+ <tr class="default">
273
+ <th><?php esc_html_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 (KcSeoOptions::getCountryList() as $country) {
280
+ $slt = ($country == $aCountry ? "selected" : null);
281
+ echo "<option value='$country' $slt>$country</option>";
282
+ }
283
+ ?>
284
+ </select>
285
+ </td>
286
+ </tr>
287
+ <tr class="default">
288
+ <th><?php esc_html_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 esc_html_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 esc_html_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 esc_html_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
+
315
+ <div class="add-new-address-tools">
316
+ <a id="kcseo-add-address"
317
+ class="button button-primary"><?php esc_html_e("Add New Address", "wp-seo-structured-data-schema") ?></a>
318
+ <span class='kcseo-pro-label'><?php esc_html_e("PRO", "wp-seo-structured-data-schema") ?></span>
319
+ </div>
320
+ </div>
321
+ <div id="tabs-kcseo-container" class="rt-tab-container">
322
+ <ul class="rt-tab-nav">
323
+ <li class="active" data-id="tab-logo-url"><a
324
+ href="#tab-logo-url"><?php esc_html_e("Organization Logo", "wp-seo-structured-data-schema") ?></a>
325
+ </li>
326
+ <li data-id="tab-social-profile">
327
+ <a href="#tab-social-profile"><?php esc_html_e("Social Profile", "wp-seo-structured-data-schema") ?></a>
328
+ </li>
329
+ <li data-id="tab-corporate-contract">
330
+ <a href="#tab-corporate-contract"><?php esc_html_e("Corporate Contacts", "wp-seo-structured-data-schema") ?></a>
331
+ </li>
332
+ </ul>
333
+ <div id="tab-logo-url" class="rt-tab-content active">
334
+ <table width="100%" cellpadding="10" class="form-table">
335
+ <tr class="field_logo">
336
+ <th><?php esc_html_e("Select Organization Logo", "wp-seo-structured-data-schema") ?></th>
337
+ <td scope="row" style="position: relative">
338
+ <div class="kSeo-image">
339
+ <div class="kSeo-image-wrapper">
340
+ <?php
341
+ $organizationLogoId = !empty($settings['organization_logo']) ? absint($settings['organization_logo']) : null;
342
+ $organizeImage = $imgInfo = null;
343
+ if ($organizationLogoId) {
344
+ $organizeImage = wp_get_attachment_image($organizationLogoId, "thumbnail");
345
+ $imgData = $KcSeoWPSchema->imageInfo($organizationLogoId);
346
+ $imgInfo .= "<span><strong>URL: </strong>{$imgData['url']}</span>";
347
+ $imgInfo .= "<span><strong>Width: </strong>{$imgData['width']}px</span>";
348
+ $imgInfo .= "<span><strong>Height: </strong>{$imgData['height']}px</span>";
349
+ }
350
+ ?>
351
+ <span class="kSeoImgAdd"><span class="dashicons dashicons-plus-alt"></span></span>
352
+ <span
353
+ class="kSeoImgRemove <?php echo($organizationLogoId ? null : "kSeo-hidden"); ?>"><span
354
+ class="dashicons dashicons-trash"></span></span>
355
+ <div class="kSeo-image-preview"><?php echo $organizeImage; ?></div>
356
+ <input type="hidden" name="organization_logo"
357
+ value="<?php echo $organizationLogoId; ?>"/>
358
+ </div>
359
+ <div class='image-info'><?php echo $imgInfo; ?></div>
360
+ </div>
361
+ <div class="schema-tooltip-holder" style="left: 200px">
362
+ <span class="schema-tooltip"></span>
363
+ <div class="hidden">
364
+ <p><b>Tip:</b> For some Rich Snippets that use the image property, no
365
+ dimensions are specified, For other Rich Snippets that use the image
366
+ property, Google specifies at least 160x90 pixels and at most 1920x1080
367
+ pixels. For Google Search, the documentation for their Rich Snippets is
368
+ at
369
+ <a href="https://developers.google.com/structured-data/rich-snippets/.">https://developers.google.com/structured-data/rich-snippets/.</a>
370
+ </p>
371
+ </div>
372
+ </div>
373
+ </td>
374
+ </tr>
375
+ </table>
376
+ </div>
377
+ <div id="tab-social-profile" class="rt-tab-content">
378
+ <table width="100%" cellpadding="10" class="form-table">
379
+ <tr class="field_social">
380
+ <th><?php esc_html_e("Company Name", "wp-seo-structured-data-schema") ?></th>
381
+ <td align="left" scope="row">
382
+ <input type="text" class="regular-text" name="social_company_name"
383
+ value="<?php echo(!empty($settings['social_company_name']) ? esc_attr($settings['social_company_name']) : null); ?>"/>
384
+ </td>
385
+ </tr>
386
+ <tr class="field_social_title">
387
+ <th style="font-size: 18px; padding: 10px 0;"><?php esc_html_e("Social Profiles", "wp-seo-structured-data-schema") ?></th>
388
+ </tr>
389
+ <tr class="social_field_link">
390
+ <th><?php esc_html_e("Social Profile", "wp-seo-structured-data-schema") ?></th>
391
+ <th>
392
+ <div id="social-field-holder">
393
+ <?php
394
+ $socialP = (!empty($settings['social']) ? $settings['social'] : array());
395
+ if (is_array($socialP) && !empty($socialP)) {
396
+ $html = null;
397
+ $i = 0;
398
+ foreach ($socialP as $socialD) {
399
+ $html .= "<div class='sfield'>";
400
+ $html .= "<select name='social[$i][id]'>";
401
+ foreach (KcSeoOptions::getSocialList() as $sId => $social) {
402
+ $slt = ($sId == $socialD['id'] ? "selected" : null);
403
+ $html .= "<option value='$sId' $slt>$social</option>";
404
+ }
405
+ $html .= "</select>";
406
+ $html .= "<input type='text' name='social[$i][link]' value='{$socialD['link']}'>";
407
+ $html .= '<span class="dashicons dashicons-trash social-remove"></span>';
408
+ $html .= "</div>";
409
+ $i++;
410
+ }
411
+ echo $html;
412
+ }
413
+ ?>
414
+ </div>
415
+ <a class="button button-primary add-new"
416
+ id="social-add"><?php esc_html_e("Add Social Profile", "wp-seo-structured-data-schema") ?></a>
417
+ </th>
418
+ </tr>
419
+ </table>
420
+ </div>
421
+ <div id="tab-corporate-contract" class="rt-tab-content">
422
+ <table width="100%" cellpadding="10" class="form-table">
423
+ <tr class="field_contact">
424
+ <th style="font-size: 18px; padding: 10px 0;"><?php esc_html_e("Contacts", "wp-seo-structured-data-schema") ?></th>
425
+ </tr>
426
+ <tr class="field_contact">
427
+ <th>Contact Type</th>
428
+ <td scope="row">
429
+ <select name="contact[contactType]" class="select2" style="width: 200px">
430
+ <?php
431
+ $contactType = !empty($settings['contact']['contactType']) ? $settings['contact']['contactType'] : null;
432
+ foreach (KcSeoOptions::getContactTypes() as $cType) {
433
+ $slt = ($cType == $contactType ? "selected" : null);
434
+ echo "<option value='$cType' $slt>$cType</option>";
435
+ }
436
+
437
+ ?>
438
+ </select>
439
+ </td>
440
+
441
+ </tr>
442
+ <tr class="field_contact">
443
+ <th><?php esc_html_e("Contact Phone", "wp-seo-structured-data-schema") ?></th>
444
+ <td align="left" scope="row">
445
+ <input type="text" class="regular-text" name="contact[telephone]"
446
+ value="<?php echo(!empty($settings['contact']['telephone']) ? esc_attr($settings['contact']['telephone']) : null); ?>"/>
447
+ <p class="description kco-telephone"><?php esc_html_e("Please follow the format below", "wp-seo-structured-data-schema") ?>
448
+ <span
449
+ style="font-size: 11px;">+1-505-998-3793</span><span
450
+ style="font-size: 11px;">+(Country Code) 425 123-4567</span><span
451
+ style="font-size: 11px;">+(Country Code) 42 68 53 01</span><span
452
+ style="font-size: 11px;">+44-2078225951</span><span
453
+ style="font-size: 11px;">1 (855) 469-6378</span>
454
+ </p>
455
+ </td>
456
+ </tr>
457
+ <tr class="field_contact">
458
+ <th><?php esc_html_e("Contact Email", "wp-seo-structured-data-schema") ?></th>
459
+ <td align="left" scope="row">
460
+ <input type="text" class="regular-text" name="contact[email]"
461
+ value="<?php echo(!empty($settings['contact']['email']) ? sanitize_email($settings['contact']['email']) : null); ?>"/>
462
+ </td>
463
+ </tr>
464
+ <tr class="field_contact">
465
+ <th><?php esc_html_e("Contact Option", "wp-seo-structured-data-schema") ?></th>
466
+ <td align="left" scope="row">
467
+ <select name="contact[contactOption]" class="select2 withEmptyOption"
468
+ style="width: 200px">
469
+ <option value=""><?php esc_html_e("Select an option", "wp-seo-structured-data-schema") ?></option>
470
+ <option value="TollFree" <?php
471
+ $cPtOpt = !empty($settings['contact']['contactOption']) ? $settings['contact']['contactOption'] : null;
472
+ echo($cPtOpt == "TollFree" ? "selected" : null); ?>><?php esc_html_e("TollFree", "wp-seo-structured-data-schema") ?>
473
+ </option>
474
+ <option
475
+ value="HearingImpairedSupported" <?php echo($settings['contact']['contactOption'] == "HearingImpairedSupported" ? "selected" : null); ?>>
476
+ <?php esc_html_e("HearingImpairedSupported", "wp-seo-structured-data-schema") ?>
477
+ </option>
478
+ </select>
479
+ </td>
480
+ </tr>
481
+ <tr class="field_contact">
482
+ <th><?php esc_html_e("Area Served", "wp-seo-structured-data-schema") ?></th>
483
+ <td align="left" scope="row">
484
+ <div class="area_served_wrapper">
485
+ <select id="area_served" class="select2" name="area_served[]"
486
+ multiple="multiple"
487
+ style="width: 50%">
488
+ <?php
489
+ $areaServed = !empty($settings['area_served']) ? $settings['area_served'] : array();
490
+ foreach (KcSeoOptions::getCountryList() as $countryId => $country) {
491
+ $slt = (in_array($countryId, $areaServed) ? "selected" : null);
492
+ echo "<option value='$countryId' $slt>$country</option>";
493
+ }
494
+ ?>
495
+ </select>
496
+ </div>
497
+ </td>
498
+ </tr>
499
+ <tr class="field_contact">
500
+ <th><?php esc_html_e("Available language", "wp-seo-structured-data-schema") ?></th>
501
+ <td scope="row" class="lang">
502
+ <select class="select2" name="availableLanguage[]" style="width: 50%"
503
+ multiple="multiple">
504
+ <?php
505
+ $lanAvailable = !empty($settings['availableLanguage']) ? $settings['availableLanguage'] : array();
506
+ foreach (KcSeoOptions::getLanguageList() as $language) {
507
+ $slt = (in_array($language, $lanAvailable) ? "selected" : null);
508
+ echo "<option value='$language' $slt>$language</option>";
509
+ }
510
+ ?>
511
+ </select>
512
+ </td>
513
+ </tr>
514
+ </table>
515
+ </div>
516
+ </div>
517
+
518
+ <h2><?php esc_html_e("Site Schema", "wp-seo-structured-data-schema") ?></h2>
519
+ <table width="100%" cellpadding="10" class="form-table">
520
+ <tr class="default">
521
+ <th><?php esc_html_e("Disable Site Schema", "wp-seo-structured-data-schema") ?></th>
522
+ <td align="left" scope="row">
523
+ <input type="checkbox"
524
+ name="disable_site_schema" <?php echo(!empty($settings['disable_site_schema']) ? "checked" : null); ?>
525
+ value="1"/>
526
+ </td>
527
+ </tr>
528
+ <tr class="default">
529
+ <th><?php esc_html_e("Enable Site link Search Box", "wp-seo-structured-data-schema") ?></th>
530
+ <td align="left" scope="row">
531
+ <input type="checkbox"
532
+ name="homeonly" <?php echo(!empty($settings['homeonly']) ? "checked" : null); ?>
533
+ value="1"/>
534
+ <p class="description"><?php esc_html_e("Note: Preferred Name markup may no longer be supported by Google", "wp-seo-structured-data-schema") ?></p>
535
+ </td>
536
+ </tr>
537
+ <tr class="default">
538
+ <th><?php esc_html_e("Site Name:", "wp-seo-structured-data-schema") ?></th>
539
+ <td align="left" scope="row">
540
+ <input type="text" class="regular-text" name="sitename"
541
+ value="<?php echo(!empty($settings['sitename']) ? esc_attr($settings['sitename']) : null); ?>"/>
542
+ </td>
543
+ </tr>
544
+ <tr class="default">
545
+ <th><?php esc_html_e("Site Alternative Name:", "wp-seo-structured-data-schema") ?></th>
546
+ <td align="left" scope="row">
547
+ <input type="text" class="regular-text" name="siteaname"
548
+ value="<?php echo(!empty($settings['siteaname']) ? esc_attr($settings['siteaname']) : null); ?>"/>
549
+ </td>
550
+ </tr>
551
+ <tr class="default">
552
+ <th><?php esc_html_e("Site Url:", "wp-seo-structured-data-schema") ?></th>
553
+ <td align="left" scope="row">
554
+ <input type="text" class="regular-text" name="siteurl"
555
+ value="<?php echo(!empty($settings['siteurl']) ? esc_attr($settings['siteurl']) : get_home_url()); ?>"/>
556
+ </td>
557
+ </tr>
558
+ </table>
559
+ <p class="submit"><input type="submit" name="submit" id="tlpSaveButton" class="button button-primary"
560
+ value="<?php esc_html_e('Save Changes', "wp-seo-structured-data-schema"); ?>"></p>
561
+
562
+ <?php wp_nonce_field($KcSeoWPSchema->nonceText(), '_kcseo_nonce'); ?>
563
+ </form>
564
+ <div id="response"></div>
565
+ </div>
566
+ <?php $KcSeoWPSchema->advertisingBlock(); ?>
567
+ </div>
568
+ </div>
lib/views/settings.php CHANGED
@@ -1,161 +1,161 @@
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>
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 ); ?>
17
- name="site_schema"
18
- value="home_page" id="site_schema_home"><label for="site_schema_home"><?php _e( "Home page
19
- only", "wp-seo-structured-data-schema" ) ?></label><br>
20
- <input type="radio" <?php echo( $dd == 'all' ? 'checked' : null ); ?> name="site_schema"
21
- value="all"
22
- id="site_schema_all"><label for="site_schema_all"><?php _e( "Sitewide (Apply General Settings schema
23
- sitewide)", "wp-seo-structured-data-schema" ) ?></label><br>
24
- <input type="radio" <?php echo( $dd == 'off' ? 'checked' : null ); ?> name="site_schema"
25
- value="off"
26
- id="site_schema_off"><label
27
- for="site_schema_off"><?php _e( "Turn off (Turn off global schema)", "wp-seo-structured-data-schema" ) ?></label>
28
- </td>
29
- </tr>
30
- <tr>
31
- <th>
32
- <?php _e( "Post Type", "wp-seo-structured-data-schema" ) ?>
33
- <span class='kcseo-pro-label'><?php _e( "PRO", "wp-seo-structured-data-schema" ) ?></span>
34
- </th>
35
- <td align="left" scope="row">
36
- <?php
37
- $postTypes = $KcSeoWPSchema->get_post_type_list();
38
- foreach ( $postTypes as $key => $value ) {
39
- echo "<label for='pt-{$key}'><input disabled id='pt-{$key}' type='checkbox' /> {$value}</label><br>";
40
- }
41
- ?>
42
- </td>
43
- </tr>
44
- <tr>
45
- <th colspan="2">
46
- <h3><?php _e( "Site Navigation Element Schema", "wp-seo-structured-data-schema" ) ?></h3>
47
- </th>
48
- </tr>
49
- <tr>
50
- <th>
51
- <?php _e( "Publisher Name", "wp-seo-structured-data-schema" ) ?>
52
- <span class='kcseo-pro-label'><?php _e( "PRO", "wp-seo-structured-data-schema" ) ?></span>
53
- </th>
54
- <td align="left" scope="row">
55
- <select disabled>
56
- <option value=""><?php _e( "Select one menu", "wp-seo-structure-data-schema-pro" ) ?></option>
57
- <?php
58
- $menus = get_terms( 'nav_menu' );
59
- if ( ! empty( $menus ) ) {
60
- foreach ( $menus as $menu ) {
61
- $slt = ( ! empty( $settings['site_nav'] ) && $settings['site_nav'] == $menu->term_id ) ? " selected" : null;
62
- echo "<option value='{$menu->term_id}'{$slt}>{$menu->name}</option>";
63
- }
64
- }
65
- ?>
66
- </select>
67
- <p class="description"><?php _e( "Please deselect the navigation menu if you want to deactivate site navigation
68
- schema.", "wp-seo-structured-data-schema" ) ?></p>
69
- </td>
70
- </tr>
71
- <tr>
72
- <th colspan="2"><h3><?php _e( "Publisher Information", "wp-seo-structured-data-schema" ) ?></h3>
73
- </th>
74
- </tr>
75
- <tr>
76
- <th>
77
- <?php _e( "Publisher Name", "wp-seo-structured-data-schema" ) ?>
78
- <span class='kcseo-pro-label'><?php _e( "PRO", "wp-seo-structured-data-schema" ) ?></span>
79
- </th>
80
- <td align="left" scope="row">
81
- <input type="text" disabled class="disabled regular-text" value=""/>
82
- </td>
83
- </tr>
84
- <tr>
85
- <th>
86
- <?php _e( "Publisher Logo", "wp-seo-structured-data-schema" ) ?>
87
- <span class='kcseo-pro-label'><?php _e( "PRO", "wp-seo-structured-data-schema" ) ?></span>
88
- </th>
89
- <td align="left" scope="row"></td>
90
- </tr>
91
- <tr>
92
- <th colspan="2">
93
- <h3><?php esc_html_e( "Third party plugin Settings", "wp-seo-structured-data-schema" ) ?></h3>
94
- </th>
95
- </tr>
96
- <tr>
97
- <th><?php esc_html_e( "YOAST SEO Default Schema JSON-LD", "wp-seo-structured-data-schema" ) ?></th>
98
- <td align="left" scope="row">
99
- <?php $dd = ! empty( $settings['yoast_wpseo_json_ld'] ) ? "checked" : null; ?>
100
- <input type="checkbox" <?php echo $dd; ?> name="yoast_wpseo_json_ld" value="1"
101
- id="yoast-wpseo-json-ld"><label
102
- for="yoast-wpseo-json-ld"><?php esc_html_e( "Disable", "wp-seo-structured-data-schema" ) ?></label>
103
- <p class="description"><?php esc_html_e( "This will remove all default schema generated by Yoast SEO plugin.", "wp-seo-structured-data-schema" ) ?></p>
104
- </td>
105
- </tr>
106
- <tr>
107
- <th><?php esc_html_e( "YOAST SEO sitelinks searchbox", "wp-seo-structured-data-schema" ) ?></th>
108
- <td align="left" scope="row">
109
- <?php $dd = ! empty( $settings['yoast_wpseo_json_ld_search'] ) ? "checked" : null; ?>
110
- <input type="checkbox" <?php echo $dd; ?> name="yoast_wpseo_json_ld_search" value="1"
111
- id="yoast-wpseo-json-ld-search"><label
112
- for="yoast-wpseo-json-ld-search"><?php esc_html_e( "Disable", "wp-seo-structured-data-schema" ) ?></label>
113
- <p class="description"><?php esc_html_e( "This will remove sitelinks searchbox generated by Yoast SEO plugin.", "wp-seo-structured-data-schema" ) ?></p>
114
- </td>
115
- </tr>
116
- <tr>
117
- <th><?php esc_html_e( "Woocommerce default schema", "wp-seo-structured-data-schema" ) ?></th>
118
- <td align="left" scope="row">
119
- <?php $dd = ! empty( $settings['wc_schema_disable'] ) ? "checked" : null; ?>
120
- <input type="checkbox" <?php echo $dd; ?> name="wc_schema_disable" value="1"
121
- id="wc-schema-disable"><label
122
- for="wc-schema-disable"><?php esc_html_e( "Disable", "wp-seo-structured-data-schema" ) ?></label>
123
- <p class="description"><?php esc_html_e( "This will remove Woocommerce plugin generated schema.", "wp-seo-structured-data-schema" ) ?></p>
124
- </td>
125
- </tr>
126
- <tr>
127
- <th><?php esc_html_e( "Easy Digital Download default schema", "wp-seo-structured-data-schema" ) ?></th>
128
- <td align="left" scope="row">
129
- <?php $dd = ! empty( $settings['edd_schema_microdata'] ) ? "checked" : null; ?>
130
- <input type="checkbox" <?php echo $dd; ?> name="edd_schema_microdata" value="1"
131
- id="edd-schema-microdata"><label
132
- for="edd-schema-microdata"><?php esc_html_e( "Disable", "wp-seo-structured-data-schema" ) ?></label>
133
- <p class="description"><?php esc_html_e( "This will remove Easy Digital Download plugin generated schema.", "wp-seo-structured-data-schema" ) ?></p>
134
- </td>
135
- </tr>
136
- <tr>
137
- <th colspan="2"><h3><?php _e( "System Settings", "wp-seo-structured-data-schema" ) ?></h3></th>
138
- </tr>
139
- <tr>
140
- <th><?php _e( "Delete all data", "wp-seo-structured-data-schema" ) ?></th>
141
- <td align="left" scope="row">
142
- <?php $dd = ! empty( $settings['delete-data'] ) ? "checked" : null; ?>
143
- <input type="checkbox" <?php echo $dd; ?> name="delete-data" value="1"
144
- id="delete-data"><label
145
- for="delete-data"><?php _e( "Enable", "wp-seo-structured-data-schema" ) ?></label>
146
- <p class="description"><?php _e( "This will delete all schema created and applied by this plugin when plugin is
147
- deleted.", "wp-seo-structured-data-schema" ) ?></p>
148
- </td>
149
- </tr>
150
- </table>
151
- <p class="submit"><input type="submit" name="submit" id="tlpSaveButton" class="button button-primary"
152
- value="<?php _e( 'Save Changes', "wp-seo-structured-data-schema" ); ?>"></p>
153
-
154
- <?php wp_nonce_field( $KcSeoWPSchema->nonceText(), '_kcseo_nonce' ); ?>
155
- </form>
156
- <div id="response"></div>
157
- </div>
158
- <?php $KcSeoWPSchema->advertisingBlock(); ?>
159
- </div>
160
-
161
  </div>
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>
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 ); ?>
17
+ name="site_schema"
18
+ value="home_page" id="site_schema_home"><label for="site_schema_home"><?php _e( "Home page
19
+ only", "wp-seo-structured-data-schema" ) ?></label><br>
20
+ <input type="radio" <?php echo( $dd == 'all' ? 'checked' : null ); ?> name="site_schema"
21
+ value="all"
22
+ id="site_schema_all"><label for="site_schema_all"><?php _e( "Sitewide (Apply General Settings schema
23
+ sitewide)", "wp-seo-structured-data-schema" ) ?></label><br>
24
+ <input type="radio" <?php echo( $dd == 'off' ? 'checked' : null ); ?> name="site_schema"
25
+ value="off"
26
+ id="site_schema_off"><label
27
+ for="site_schema_off"><?php _e( "Turn off (Turn off global schema)", "wp-seo-structured-data-schema" ) ?></label>
28
+ </td>
29
+ </tr>
30
+ <tr>
31
+ <th>
32
+ <?php _e( "Post Type", "wp-seo-structured-data-schema" ) ?>
33
+ <span class='kcseo-pro-label'><?php _e( "PRO", "wp-seo-structured-data-schema" ) ?></span>
34
+ </th>
35
+ <td align="left" scope="row">
36
+ <?php
37
+ $postTypes = $KcSeoWPSchema->get_post_type_list();
38
+ foreach ( $postTypes as $key => $value ) {
39
+ echo "<label for='pt-{$key}'><input disabled id='pt-{$key}' type='checkbox' /> {$value}</label><br>";
40
+ }
41
+ ?>
42
+ </td>
43
+ </tr>
44
+ <tr>
45
+ <th colspan="2">
46
+ <h3><?php _e( "Site Navigation Element Schema", "wp-seo-structured-data-schema" ) ?></h3>
47
+ </th>
48
+ </tr>
49
+ <tr>
50
+ <th>
51
+ <?php _e( "Publisher Name", "wp-seo-structured-data-schema" ) ?>
52
+ <span class='kcseo-pro-label'><?php _e( "PRO", "wp-seo-structured-data-schema" ) ?></span>
53
+ </th>
54
+ <td align="left" scope="row">
55
+ <select disabled>
56
+ <option value=""><?php _e( "Select one menu", "wp-seo-structure-data-schema-pro" ) ?></option>
57
+ <?php
58
+ $menus = get_terms( 'nav_menu' );
59
+ if ( ! empty( $menus ) ) {
60
+ foreach ( $menus as $menu ) {
61
+ $slt = ( ! empty( $settings['site_nav'] ) && $settings['site_nav'] == $menu->term_id ) ? " selected" : null;
62
+ echo "<option value='{$menu->term_id}'{$slt}>{$menu->name}</option>";
63
+ }
64
+ }
65
+ ?>
66
+ </select>
67
+ <p class="description"><?php _e( "Please deselect the navigation menu if you want to deactivate site navigation
68
+ schema.", "wp-seo-structured-data-schema" ) ?></p>
69
+ </td>
70
+ </tr>
71
+ <tr>
72
+ <th colspan="2"><h3><?php _e( "Publisher Information", "wp-seo-structured-data-schema" ) ?></h3>
73
+ </th>
74
+ </tr>
75
+ <tr>
76
+ <th>
77
+ <?php _e( "Publisher Name", "wp-seo-structured-data-schema" ) ?>
78
+ <span class='kcseo-pro-label'><?php _e( "PRO", "wp-seo-structured-data-schema" ) ?></span>
79
+ </th>
80
+ <td align="left" scope="row">
81
+ <input type="text" disabled class="disabled regular-text" value=""/>
82
+ </td>
83
+ </tr>
84
+ <tr>
85
+ <th>
86
+ <?php _e( "Publisher Logo", "wp-seo-structured-data-schema" ) ?>
87
+ <span class='kcseo-pro-label'><?php _e( "PRO", "wp-seo-structured-data-schema" ) ?></span>
88
+ </th>
89
+ <td align="left" scope="row"></td>
90
+ </tr>
91
+ <tr>
92
+ <th colspan="2">
93
+ <h3><?php esc_html_e( "Third party plugin Settings", "wp-seo-structured-data-schema" ) ?></h3>
94
+ </th>
95
+ </tr>
96
+ <tr>
97
+ <th><?php esc_html_e( "YOAST SEO Default Schema JSON-LD", "wp-seo-structured-data-schema" ) ?></th>
98
+ <td align="left" scope="row">
99
+ <?php $dd = ! empty( $settings['yoast_wpseo_json_ld'] ) ? "checked" : null; ?>
100
+ <input type="checkbox" <?php echo $dd; ?> name="yoast_wpseo_json_ld" value="1"
101
+ id="yoast-wpseo-json-ld"><label
102
+ for="yoast-wpseo-json-ld"><?php esc_html_e( "Disable", "wp-seo-structured-data-schema" ) ?></label>
103
+ <p class="description"><?php esc_html_e( "This will remove all default schema generated by Yoast SEO plugin.", "wp-seo-structured-data-schema" ) ?></p>
104
+ </td>
105
+ </tr>
106
+ <tr>
107
+ <th><?php esc_html_e( "YOAST SEO sitelinks searchbox", "wp-seo-structured-data-schema" ) ?></th>
108
+ <td align="left" scope="row">
109
+ <?php $dd = ! empty( $settings['yoast_wpseo_json_ld_search'] ) ? "checked" : null; ?>
110
+ <input type="checkbox" <?php echo $dd; ?> name="yoast_wpseo_json_ld_search" value="1"
111
+ id="yoast-wpseo-json-ld-search"><label
112
+ for="yoast-wpseo-json-ld-search"><?php esc_html_e( "Disable", "wp-seo-structured-data-schema" ) ?></label>
113
+ <p class="description"><?php esc_html_e( "This will remove sitelinks searchbox generated by Yoast SEO plugin.", "wp-seo-structured-data-schema" ) ?></p>
114
+ </td>
115
+ </tr>
116
+ <tr>
117
+ <th><?php esc_html_e( "Woocommerce default schema", "wp-seo-structured-data-schema" ) ?></th>
118
+ <td align="left" scope="row">
119
+ <?php $dd = ! empty( $settings['wc_schema_disable'] ) ? "checked" : null; ?>
120
+ <input type="checkbox" <?php echo $dd; ?> name="wc_schema_disable" value="1"
121
+ id="wc-schema-disable"><label
122
+ for="wc-schema-disable"><?php esc_html_e( "Disable", "wp-seo-structured-data-schema" ) ?></label>
123
+ <p class="description"><?php esc_html_e( "This will remove Woocommerce plugin generated schema.", "wp-seo-structured-data-schema" ) ?></p>
124
+ </td>
125
+ </tr>
126
+ <tr>
127
+ <th><?php esc_html_e( "Easy Digital Download default schema", "wp-seo-structured-data-schema" ) ?></th>
128
+ <td align="left" scope="row">
129
+ <?php $dd = ! empty( $settings['edd_schema_microdata'] ) ? "checked" : null; ?>
130
+ <input type="checkbox" <?php echo $dd; ?> name="edd_schema_microdata" value="1"
131
+ id="edd-schema-microdata"><label
132
+ for="edd-schema-microdata"><?php esc_html_e( "Disable", "wp-seo-structured-data-schema" ) ?></label>
133
+ <p class="description"><?php esc_html_e( "This will remove Easy Digital Download plugin generated schema.", "wp-seo-structured-data-schema" ) ?></p>
134
+ </td>
135
+ </tr>
136
+ <tr>
137
+ <th colspan="2"><h3><?php _e( "System Settings", "wp-seo-structured-data-schema" ) ?></h3></th>
138
+ </tr>
139
+ <tr>
140
+ <th><?php _e( "Delete all data", "wp-seo-structured-data-schema" ) ?></th>
141
+ <td align="left" scope="row">
142
+ <?php $dd = ! empty( $settings['delete-data'] ) ? "checked" : null; ?>
143
+ <input type="checkbox" <?php echo $dd; ?> name="delete-data" value="1"
144
+ id="delete-data"><label
145
+ for="delete-data"><?php _e( "Enable", "wp-seo-structured-data-schema" ) ?></label>
146
+ <p class="description"><?php _e( "This will delete all schema created and applied by this plugin when plugin is
147
+ deleted.", "wp-seo-structured-data-schema" ) ?></p>
148
+ </td>
149
+ </tr>
150
+ </table>
151
+ <p class="submit"><input type="submit" name="submit" id="tlpSaveButton" class="button button-primary"
152
+ value="<?php _e( 'Save Changes', "wp-seo-structured-data-schema" ); ?>"></p>
153
+
154
+ <?php wp_nonce_field( $KcSeoWPSchema->nonceText(), '_kcseo_nonce' ); ?>
155
+ </form>
156
+ <div id="response"></div>
157
+ </div>
158
+ <?php $KcSeoWPSchema->advertisingBlock(); ?>
159
+ </div>
160
+
161
  </div>
wp-seo-structured-data-schema.php CHANGED
@@ -1,67 +1,59 @@
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.7.0
7
- * Author: WPSEMPlugins
8
- * Author URI: https://wpsemplugins.com/
9
- * Text Domain: wp-seo-structured-data-schema
10
- * Domain Path: /languages
11
- * License: GPLv3
12
- * License URI: http://www.gnu.org/licenses/gpl-3.0.html
13
- */
14
- if ( ! defined( 'ABSPATH' ) ) {
15
- exit;
16
- }
17
- // Define KCSEO_VERSION VERSION.
18
- if ( ! defined( 'KCSEO_VERSION' ) ) {
19
- define( 'KCSEO_VERSION', '2.7.0' );
20
- }
21
- if ( ! defined( 'JSON_UNESCAPED_SLASHES' ) ) {
22
- define( 'JSON_UNESCAPED_SLASHES', 64 );
23
- }
24
- if ( ! defined( 'JSON_PRETTY_PRINT' ) ) {
25
- define( 'JSON_PRETTY_PRINT', 128 );
26
- }
27
- if ( ! defined( 'JSON_UNESCAPED_UNICODE' ) ) {
28
- define( 'JSON_UNESCAPED_UNICODE', 256 );
29
- }
30
-
31
-
32
- $plugin_data = get_file_data( __FILE__, array( 'Version' => 'Version' ), false );
33
- define( 'KCSEO_WP_SCHEMA_VERSION', $plugin_data['Version'] );
34
- define( 'KCSEO_WP_SCHEMA_SLUG', 'wp-seo-structured-data-schema' );
35
- define( 'KCSEO_WP_SCHEMA_PATH', dirname( __FILE__ ) );
36
- define( 'KCSEO_WP_SCHEMA_PLUGIN_ACTIVE_FILE_NAME', plugin_basename( __FILE__ ) );
37
- define( 'KCSEO_WP_SCHEMA_URL', plugins_url( '', __FILE__ ) );
38
- define( 'KCSEO_WP_SCHEMA_LANGUAGE_PATH', dirname( plugin_basename( __FILE__ ) ) . '/languages' );
39
-
40
- require( 'lib/init.php' );
41
- register_uninstall_hook( __FILE__, 'KCSEO_uninstall' );
42
-
43
- if ( ! function_exists( 'KCSEO_uninstall' ) ) {
44
- function KCSEO_uninstall() {
45
- $settings = get_option( kcseo()->options['main_settings'] );
46
- if ( ! empty( $settings['delete-data'] ) ) {
47
- $schemaFields = KcSeoOptions::getSchemaTypes();
48
-
49
- $args = array(
50
- 'post_type' => array( 'page', 'post' ),
51
- 'posts_per_page' => '-1'
52
- );
53
- $pages = new WP_Query ( $args );
54
- if ( $pages->have_posts() ) {
55
-
56
- while ( $pages->have_posts() ) {
57
- $pages->the_post();
58
- foreach ( $schemaFields as $schemaID => $schema ) {
59
- delete_post_meta( get_the_ID(), '_schema_' . $schemaID );
60
- }
61
- }
62
- wp_reset_postdata();
63
- }
64
- }
65
-
66
- }
67
- }
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.7.1
7
+ * Author: WPSEMPlugins
8
+ * Author URI: https://wpsemplugins.com/
9
+ * Text Domain: wp-seo-structured-data-schema
10
+ * Domain Path: /languages
11
+ * License: GPLv3
12
+ * License URI: http://www.gnu.org/licenses/gpl-3.0.html.
13
+ */
14
+ if (! defined('ABSPATH')) {
15
+ exit;
16
+ }
17
+ if (! defined('JSON_UNESCAPED_SLASHES')) {
18
+ define('JSON_UNESCAPED_SLASHES', 64);
19
+ }
20
+ if (! defined('JSON_PRETTY_PRINT')) {
21
+ define('JSON_PRETTY_PRINT', 128);
22
+ }
23
+ if (! defined('JSON_UNESCAPED_UNICODE')) {
24
+ define('JSON_UNESCAPED_UNICODE', 256);
25
+ }
26
+
27
+ define('KCSEO_WP_SCHEMA_VERSION', '2.7.1');
28
+ define('KCSEO_WP_SCHEMA_SLUG', 'wp-seo-structured-data-schema');
29
+ define('KCSEO_WP_SCHEMA_PATH', dirname(__FILE__));
30
+ define('KCSEO_WP_SCHEMA_PLUGIN_ACTIVE_FILE_NAME', plugin_basename(__FILE__));
31
+ define('KCSEO_WP_SCHEMA_URL', plugins_url('', __FILE__));
32
+ define('KCSEO_WP_SCHEMA_LANGUAGE_PATH', dirname(plugin_basename(__FILE__)) . '/languages');
33
+
34
+ require 'lib/init.php';
35
+ register_uninstall_hook(__FILE__, 'KCSEO_uninstall');
36
+
37
+ if (! function_exists('KCSEO_uninstall')) {
38
+ function KCSEO_uninstall() {
39
+ $settings = get_option(kcseo()->options['main_settings']);
40
+ if (! empty($settings['delete-data'])) {
41
+ $schemaFields = KcSeoOptions::getSchemaTypes();
42
+
43
+ $args = [
44
+ 'post_type' => ['page', 'post'],
45
+ 'posts_per_page' => '-1',
46
+ ];
47
+ $pages = new WP_Query($args);
48
+ if ($pages->have_posts()) {
49
+ while ($pages->have_posts()) {
50
+ $pages->the_post();
51
+ foreach ($schemaFields as $schemaID => $schema) {
52
+ delete_post_meta(get_the_ID(), '_schema_' . $schemaID);
53
+ }
54
+ }
55
+ wp_reset_postdata();
56
+ }
57
+ }
58
+ }
59
+ }