WP SEO Structured Data Schema - Version 2.7.3

Version Description

(Apr 04, 2022) = * Fixed: Support Issue Fixed;

=

Download this release

Release Info

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

Code changes from version 2.7.2 to 2.7.3

Files changed (65) hide show
  1. README.txt +221 -222
  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/js/admin.js +257 -257
  6. assets/js/i18n/ar.js +2 -2
  7. assets/js/i18n/az.js +2 -2
  8. assets/js/i18n/bg.js +2 -2
  9. assets/js/i18n/ca.js +2 -2
  10. assets/js/i18n/cs.js +2 -2
  11. assets/js/i18n/da.js +2 -2
  12. assets/js/i18n/de.js +2 -2
  13. assets/js/i18n/en.js +2 -2
  14. assets/js/i18n/es.js +2 -2
  15. assets/js/i18n/et.js +2 -2
  16. assets/js/i18n/eu.js +2 -2
  17. assets/js/i18n/fa.js +2 -2
  18. assets/js/i18n/fi.js +2 -2
  19. assets/js/i18n/fr.js +2 -2
  20. assets/js/i18n/gl.js +2 -2
  21. assets/js/i18n/he.js +2 -2
  22. assets/js/i18n/hi.js +2 -2
  23. assets/js/i18n/hr.js +2 -2
  24. assets/js/i18n/hu.js +2 -2
  25. assets/js/i18n/id.js +2 -2
  26. assets/js/i18n/is.js +2 -2
  27. assets/js/i18n/it.js +2 -2
  28. assets/js/i18n/ja.js +2 -2
  29. assets/js/i18n/ko.js +2 -2
  30. assets/js/i18n/lt.js +2 -2
  31. assets/js/i18n/lv.js +2 -2
  32. assets/js/i18n/mk.js +2 -2
  33. assets/js/i18n/ms.js +2 -2
  34. assets/js/i18n/nb.js +2 -2
  35. assets/js/i18n/nl.js +2 -2
  36. assets/js/i18n/pl.js +2 -2
  37. assets/js/i18n/pt-BR.js +2 -2
  38. assets/js/i18n/pt.js +2 -2
  39. assets/js/i18n/ro.js +2 -2
  40. assets/js/i18n/ru.js +2 -2
  41. assets/js/i18n/sk.js +2 -2
  42. assets/js/i18n/sr-Cyrl.js +2 -2
  43. assets/js/i18n/sr.js +2 -2
  44. assets/js/i18n/sv.js +2 -2
  45. assets/js/i18n/th.js +2 -2
  46. assets/js/i18n/tr.js +2 -2
  47. assets/js/i18n/uk.js +2 -2
  48. assets/js/i18n/vi.js +2 -2
  49. assets/js/i18n/zh-CN.js +2 -2
  50. assets/js/i18n/zh-TW.js +2 -2
  51. assets/js/jquery.qtip.js +3246 -3246
  52. assets/js/select2.min.js +1 -1
  53. index.php +2 -2
  54. languages/wp-seo-structured-data-schema.pot +237 -237
  55. lib/classes/KcSeoHelper.php +537 -537
  56. lib/classes/KcSeoHooks.php +64 -64
  57. lib/classes/KcSeoInit.php +217 -217
  58. lib/classes/KcSeoMetaData.php +187 -187
  59. lib/classes/KcSeoOffer.php +98 -98
  60. lib/classes/KcSeoOutput.php +219 -219
  61. lib/functions/KcSeoFunctions.php +20 -20
  62. lib/functions/KcSeoOptions.php +2164 -2160
  63. lib/init.php +147 -147
  64. lib/models/KcSeoSchemaModel.php +1201 -1201
  65. lib/views/schema-options.php +0 -295
README.txt CHANGED
@@ -1,222 +1,221 @@
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.2
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.2 (Apr 04, 2022) =
134
- * Added: Meta field added for Event Organizer, Organizer Url, EventAttendanceMod , eventStatus
135
- * Fixed: Default value set for admin url
136
-
137
- == 2.7.1 (Nov 23, 2021) =
138
- * Fixed: Some functional issue
139
-
140
- == 2.7.0 (Oct 28, 2021) =
141
- * Added: About Schema
142
- * Added: Contact Schema
143
- * Added: Audio Schema
144
- * Added: Audio and Video schema in Article, NewsArticle & BlogPosting Schema
145
- * Fixed: Some bug and warning type schema.
146
-
147
- == 2.6.17.2 =
148
- * Fix local business @id property
149
-
150
- == 2.6.17.1 =
151
- * Fix post save issue
152
-
153
- == 2.6.17 =
154
- * Update description issue at export
155
-
156
- == 2.6.16 =
157
- * Add WordPress 5.7 compatibility
158
-
159
- == 2.6.15 =
160
- * PHP Bug Fix
161
-
162
- == 2.6.14 =
163
- * Fix video embed URL issue
164
-
165
- == 2.6.13 =
166
- * New schema ( COVID 19 )
167
-
168
- == 2.6.12 =
169
- * Php bug fix
170
-
171
- == 2.6.11 =
172
- * Coding update
173
-
174
- == 2.6.10 =
175
- * Bug fix
176
-
177
- == 2.6.0 =
178
- * Update review Schema.
179
-
180
- == 2.5.9 =
181
- * Fix PHP error
182
-
183
- == 2.5.8 =
184
- * Fix Javascript issue
185
- * Update Contact Type
186
-
187
- == 2.5.7 =
188
- * Add Time for post
189
- * Event Start & End Time
190
- * Fix URL www issue.
191
- * Product Identifier for e-commerce
192
-
193
- == 2.5.6 =
194
- * Fix event
195
- * AMP support
196
- * Fix Spelling
197
-
198
- == 2.5.5 =
199
- * Add Site schema control
200
- * Fix Site schema search link
201
-
202
- == 2.5.4 =
203
- * Add a Hack
204
-
205
- == 2.5.3 =
206
- * Bug fixed
207
-
208
- == 2.5.2 =
209
- * Add Some pro feature list
210
- * Update compatibility with others plugin.
211
-
212
- == 2.5.1 =
213
- * A option for Turn off global schema
214
- * Full Translation support
215
-
216
- = 2.5 =
217
- * Lat/Log issue fix
218
- * Rating issue
219
- * Image issue
220
-
221
- = 2.4 =
222
- * 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.3
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.3 (Apr 04, 2022) =
134
+ * Fixed: Support Issue Fixed;
135
+
136
+ == 2.7.1 (Nov 23, 2021) =
137
+ * Fixed: Some functional issue
138
+
139
+ == 2.7.0 (Oct 28, 2021) =
140
+ * Added: About Schema
141
+ * Added: Contact Schema
142
+ * Added: Audio Schema
143
+ * Added: Audio and Video schema in Article, NewsArticle & BlogPosting Schema
144
+ * Fixed: Some bug and warning type schema.
145
+
146
+ == 2.6.17.2 =
147
+ * Fix local business @id property
148
+
149
+ == 2.6.17.1 =
150
+ * Fix post save issue
151
+
152
+ == 2.6.17 =
153
+ * Update description issue at export
154
+
155
+ == 2.6.16 =
156
+ * Add WordPress 5.7 compatibility
157
+
158
+ == 2.6.15 =
159
+ * PHP Bug Fix
160
+
161
+ == 2.6.14 =
162
+ * Fix video embed URL issue
163
+
164
+ == 2.6.13 =
165
+ * New schema ( COVID 19 )
166
+
167
+ == 2.6.12 =
168
+ * Php bug fix
169
+
170
+ == 2.6.11 =
171
+ * Coding update
172
+
173
+ == 2.6.10 =
174
+ * Bug fix
175
+
176
+ == 2.6.0 =
177
+ * Update review Schema.
178
+
179
+ == 2.5.9 =
180
+ * Fix PHP error
181
+
182
+ == 2.5.8 =
183
+ * Fix Javascript issue
184
+ * Update Contact Type
185
+
186
+ == 2.5.7 =
187
+ * Add Time for post
188
+ * Event Start & End Time
189
+ * Fix URL www issue.
190
+ * Product Identifier for e-commerce
191
+
192
+ == 2.5.6 =
193
+ * Fix event
194
+ * AMP support
195
+ * Fix Spelling
196
+
197
+ == 2.5.5 =
198
+ * Add Site schema control
199
+ * Fix Site schema search link
200
+
201
+ == 2.5.4 =
202
+ * Add a Hack
203
+
204
+ == 2.5.3 =
205
+ * Bug fixed
206
+
207
+ == 2.5.2 =
208
+ * Add Some pro feature list
209
+ * Update compatibility with others plugin.
210
+
211
+ == 2.5.1 =
212
+ * A option for Turn off global schema
213
+ * Full Translation support
214
+
215
+ = 2.5 =
216
+ * Lat/Log issue fix
217
+ * Rating issue
218
+ * Image issue
219
+
220
+ = 2.4 =
221
+ * 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/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/jquery.qtip.js CHANGED
@@ -1,99 +1,99 @@
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
- /*global window: false, jQuery: false, console: false, define: false */
14
-
15
- /* Cache window, document, undefined */
16
- (function( window, document, undefined ) {
17
-
18
- // Uses AMD or browser globals to create a jQuery plugin.
19
- (function( factory ) {
20
- "use strict";
21
- if(typeof define === 'function' && define.amd) {
22
- define(['jquery'], factory);
23
- }
24
- else if(jQuery && !jQuery.fn.qtip) {
25
- factory(jQuery);
26
- }
27
- }
28
- (function($) {
29
- "use strict"; // Enable ECMAScript "strict" operation for this function. See more: http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/
30
- ;// Munge the primitives - Paul Irish tip
31
- var TRUE = true,
32
- FALSE = false,
33
- NULL = null,
34
-
35
- // Common variables
36
- X = 'x', Y = 'y',
37
- WIDTH = 'width',
38
- HEIGHT = 'height',
39
-
40
- // Positioning sides
41
- TOP = 'top',
42
- LEFT = 'left',
43
- BOTTOM = 'bottom',
44
- RIGHT = 'right',
45
- CENTER = 'center',
46
-
47
- // Position adjustment types
48
- FLIP = 'flip',
49
- FLIPINVERT = 'flipinvert',
50
- SHIFT = 'shift',
51
-
52
- // Shortcut vars
53
- QTIP, PROTOTYPE, CORNER, CHECKS,
54
- PLUGINS = {},
55
- NAMESPACE = 'qtip',
56
- ATTR_HAS = 'data-hasqtip',
57
- ATTR_ID = 'data-qtip-id',
58
- WIDGET = ['ui-widget', 'ui-tooltip'],
59
- SELECTOR = '.'+NAMESPACE,
60
- INACTIVE_EVENTS = 'click dblclick mousedown mouseup mousemove mouseleave mouseenter'.split(' '),
61
-
62
- CLASS_FIXED = NAMESPACE+'-fixed',
63
- CLASS_DEFAULT = NAMESPACE + '-default',
64
- CLASS_FOCUS = NAMESPACE + '-focus',
65
- CLASS_HOVER = NAMESPACE + '-hover',
66
- CLASS_DISABLED = NAMESPACE+'-disabled',
67
-
68
- replaceSuffix = '_replacedByqTip',
69
- oldtitle = 'oldtitle',
70
- trackingBound,
71
-
72
- // Browser detection
73
- BROWSER = {
74
- /*
75
- * IE version detection
76
- *
77
- * Adapted from: http://ajaxian.com/archives/attack-of-the-ie-conditional-comment
78
- * Credit to James Padolsey for the original implemntation!
79
- */
80
- ie: (function(){
81
- for (
82
- var v = 4, i = document.createElement("div");
83
- (i.innerHTML = "<!--[if gt IE " + v + "]><i></i><![endif]-->") && i.getElementsByTagName("i")[0];
84
- v+=1
85
- ) {}
86
- return v > 4 ? v : NaN;
87
- }()),
88
-
89
- /*
90
- * iOS version detection
91
- */
92
- iOS: parseFloat(
93
- ('' + (/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent) || [0,''])[1])
94
- .replace('undefined', '3_2').replace('_', '.').replace('_', '')
95
- ) || FALSE
96
- };
97
  ;function QTip(target, options, id, attr) {
98
  // Elements and ID
99
  this.id = id;
@@ -299,3153 +299,3153 @@ PROTOTYPE.destroy = function(immediate) {
299
 
300
  return this.target;
301
  };
302
- ;function invalidOpt(a) {
303
- return a === NULL || $.type(a) !== 'object';
304
- }
305
-
306
- function invalidContent(c) {
307
- return !( $.isFunction(c) || (c && c.attr) || c.length || ($.type(c) === 'object' && (c.jquery || c.then) ));
308
- }
309
-
310
- // Option object sanitizer
311
- function sanitizeOptions(opts) {
312
- var content, text, ajax, once;
313
-
314
- if(invalidOpt(opts)) { return FALSE; }
315
-
316
- if(invalidOpt(opts.metadata)) {
317
- opts.metadata = { type: opts.metadata };
318
- }
319
-
320
- if('content' in opts) {
321
- content = opts.content;
322
-
323
- if(invalidOpt(content) || content.jquery || content.done) {
324
- content = opts.content = {
325
- text: (text = invalidContent(content) ? FALSE : content)
326
- };
327
- }
328
- else { text = content.text; }
329
-
330
- // DEPRECATED - Old content.ajax plugin functionality
331
- // Converts it into the proper Deferred syntax
332
- if('ajax' in content) {
333
- ajax = content.ajax;
334
- once = ajax && ajax.once !== FALSE;
335
- delete content.ajax;
336
-
337
- content.text = function(event, api) {
338
- var loading = text || $(this).attr(api.options.content.attr) || 'Loading...',
339
-
340
- deferred = $.ajax(
341
- $.extend({}, ajax, { context: api })
342
- )
343
- .then(ajax.success, NULL, ajax.error)
344
- .then(function(content) {
345
- if(content && once) { api.set('content.text', content); }
346
- return content;
347
- },
348
- function(xhr, status, error) {
349
- if(api.destroyed || xhr.status === 0) { return; }
350
- api.set('content.text', status + ': ' + error);
351
- });
352
-
353
- return !once ? (api.set('content.text', loading), deferred) : loading;
354
- };
355
- }
356
-
357
- if('title' in content) {
358
- if($.isPlainObject(content.title)) {
359
- content.button = content.title.button;
360
- content.title = content.title.text;
361
- }
362
-
363
- if(invalidContent(content.title || FALSE)) {
364
- content.title = FALSE;
365
- }
366
- }
367
- }
368
-
369
- if('position' in opts && invalidOpt(opts.position)) {
370
- opts.position = { my: opts.position, at: opts.position };
371
- }
372
-
373
- if('show' in opts && invalidOpt(opts.show)) {
374
- opts.show = opts.show.jquery ? { target: opts.show } :
375
- opts.show === TRUE ? { ready: TRUE } : { event: opts.show };
376
- }
377
-
378
- if('hide' in opts && invalidOpt(opts.hide)) {
379
- opts.hide = opts.hide.jquery ? { target: opts.hide } : { event: opts.hide };
380
- }
381
-
382
- if('style' in opts && invalidOpt(opts.style)) {
383
- opts.style = { classes: opts.style };
384
- }
385
-
386
- // Sanitize plugin options
387
- $.each(PLUGINS, function() {
388
- this.sanitize && this.sanitize(opts);
389
- });
390
-
391
- return opts;
392
- }
393
-
394
- // Setup builtin .set() option checks
395
- CHECKS = PROTOTYPE.checks = {
396
- builtin: {
397
- // Core checks
398
- '^id$': function(obj, o, v, prev) {
399
- var id = v === TRUE ? QTIP.nextid : v,
400
- new_id = NAMESPACE + '-' + id;
401
-
402
- if(id !== FALSE && id.length > 0 && !$('#'+new_id).length) {
403
- this._id = new_id;
404
-
405
- if(this.rendered) {
406
- this.tooltip[0].id = this._id;
407
- this.elements.content[0].id = this._id + '-content';
408
- this.elements.title[0].id = this._id + '-title';
409
- }
410
- }
411
- else { obj[o] = prev; }
412
- },
413
- '^prerender': function(obj, o, v) {
414
- v && !this.rendered && this.render(this.options.show.ready);
415
- },
416
-
417
- // Content checks
418
- '^content.text$': function(obj, o, v) {
419
- this._updateContent(v);
420
- },
421
- '^content.attr$': function(obj, o, v, prev) {
422
- if(this.options.content.text === this.target.attr(prev)) {
423
- this._updateContent( this.target.attr(v) );
424
- }
425
- },
426
- '^content.title$': function(obj, o, v) {
427
- // Remove title if content is null
428
- if(!v) { return this._removeTitle(); }
429
-
430
- // If title isn't already created, create it now and update
431
- v && !this.elements.title && this._createTitle();
432
- this._updateTitle(v);
433
- },
434
- '^content.button$': function(obj, o, v) {
435
- this._updateButton(v);
436
- },
437
- '^content.title.(text|button)$': function(obj, o, v) {
438
- this.set('content.'+o, v); // Backwards title.text/button compat
439
- },
440
-
441
- // Position checks
442
- '^position.(my|at)$': function(obj, o, v){
443
- 'string' === typeof v && (this.position[o] = obj[o] = new CORNER(v, o === 'at'));
444
- },
445
- '^position.container$': function(obj, o, v){
446
- this.rendered && this.tooltip.appendTo(v);
447
- },
448
-
449
- // Show checks
450
- '^show.ready$': function(obj, o, v) {
451
- v && (!this.rendered && this.render(TRUE) || this.toggle(TRUE));
452
- },
453
-
454
- // Style checks
455
- '^style.classes$': function(obj, o, v, p) {
456
- this.rendered && this.tooltip.removeClass(p).addClass(v);
457
- },
458
- '^style.(width|height)': function(obj, o, v) {
459
- this.rendered && this.tooltip.css(o, v);
460
- },
461
- '^style.widget|content.title': function() {
462
- this.rendered && this._setWidget();
463
- },
464
- '^style.def': function(obj, o, v) {
465
- this.rendered && this.tooltip.toggleClass(CLASS_DEFAULT, !!v);
466
- },
467
-
468
- // Events check
469
- '^events.(render|show|move|hide|focus|blur)$': function(obj, o, v) {
470
- this.rendered && this.tooltip[($.isFunction(v) ? '' : 'un') + 'bind']('tooltip'+o, v);
471
- },
472
-
473
- // Properties which require event reassignment
474
- '^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)': function() {
475
- if(!this.rendered) { return; }
476
-
477
- // Set tracking flag
478
- var posOptions = this.options.position;
479
- this.tooltip.attr('tracking', posOptions.target === 'mouse' && posOptions.adjust.mouse);
480
-
481
- // Reassign events
482
- this._unassignEvents();
483
- this._assignEvents();
484
- }
485
- }
486
- };
487
-
488
- // Dot notation converter
489
- function convertNotation(options, notation) {
490
- var i = 0, obj, option = options,
491
-
492
- // Split notation into array
493
- levels = notation.split('.');
494
-
495
- // Loop through
496
- while( option = option[ levels[i++] ] ) {
497
- if(i < levels.length) { obj = option; }
498
- }
499
-
500
- return [obj || options, levels.pop()];
501
- }
502
-
503
- PROTOTYPE.get = function(notation) {
504
- if(this.destroyed) { return this; }
505
-
506
- var o = convertNotation(this.options, notation.toLowerCase()),
507
- result = o[0][ o[1] ];
508
-
509
- return result.precedance ? result.string() : result;
510
- };
511
-
512
- function setCallback(notation, args) {
513
- var category, rule, match;
514
-
515
- for(category in this.checks) {
516
- for(rule in this.checks[category]) {
517
- if(match = (new RegExp(rule, 'i')).exec(notation)) {
518
- args.push(match);
519
-
520
- if(category === 'builtin' || this.plugins[category]) {
521
- this.checks[category][rule].apply(
522
- this.plugins[category] || this, args
523
- );
524
- }
525
- }
526
- }
527
- }
528
- }
529
-
530
- var rmove = /^position\.(my|at|adjust|target|container|viewport)|style|content|show\.ready/i,
531
- rrender = /^prerender|show\.ready/i;
532
-
533
- PROTOTYPE.set = function(option, value) {
534
- if(this.destroyed) { return this; }
535
-
536
- var rendered = this.rendered,
537
- reposition = FALSE,
538
- options = this.options,
539
- checks = this.checks,
540
- name;
541
-
542
- // Convert singular option/value pair into object form
543
- if('string' === typeof option) {
544
- name = option; option = {}; option[name] = value;
545
- }
546
- else { option = $.extend({}, option); }
547
-
548
- // Set all of the defined options to their new values
549
- $.each(option, function(notation, value) {
550
- if(rendered && rrender.test(notation)) {
551
- delete option[notation]; return;
552
- }
553
-
554
- // Set new obj value
555
- var obj = convertNotation(options, notation.toLowerCase()), previous;
556
- previous = obj[0][ obj[1] ];
557
- obj[0][ obj[1] ] = value && value.nodeType ? $(value) : value;
558
-
559
- // Also check if we need to reposition
560
- reposition = rmove.test(notation) || reposition;
561
-
562
- // Set the new params for the callback
563
- option[notation] = [obj[0], obj[1], value, previous];
564
- });
565
-
566
- // Re-sanitize options
567
- sanitizeOptions(options);
568
-
569
- /*
570
- * Execute any valid callbacks for the set options
571
- * Also set positioning flag so we don't get loads of redundant repositioning calls.
572
- */
573
- this.positioning = TRUE;
574
- $.each(option, $.proxy(setCallback, this));
575
- this.positioning = FALSE;
576
-
577
- // Update position if needed
578
- if(this.rendered && this.tooltip[0].offsetWidth > 0 && reposition) {
579
- this.reposition( options.position.target === 'mouse' ? NULL : this.cache.event );
580
- }
581
-
582
- return this;
583
- };
584
- ;PROTOTYPE._update = function(content, element, reposition) {
585
- var self = this,
586
- cache = this.cache;
587
-
588
- // Make sure tooltip is rendered and content is defined. If not return
589
- if(!this.rendered || !content) { return FALSE; }
590
-
591
- // Use function to parse content
592
- if($.isFunction(content)) {
593
- content = content.call(this.elements.target, cache.event, this) || '';
594
- }
595
-
596
- // Handle deferred content
597
- if($.isFunction(content.then)) {
598
- cache.waiting = TRUE;
599
- return content.then(function(c) {
600
- cache.waiting = FALSE;
601
- return self._update(c, element);
602
- }, NULL, function(e) {
603
- return self._update(e, element);
604
- });
605
- }
606
-
607
- // If content is null... return false
608
- if(content === FALSE || (!content && content !== '')) { return FALSE; }
609
-
610
- // Append new content if its a DOM array and show it if hidden
611
- if(content.jquery && content.length > 0) {
612
- element.empty().append(
613
- content.css({ display: 'block', visibility: 'visible' })
614
- );
615
- }
616
-
617
- // Content is a regular string, insert the new content
618
- else { element.html(content); }
619
-
620
- // Wait for content to be loaded, and reposition
621
- return this._waitForContent(element).then(function(images) {
622
- if(self.rendered && self.tooltip[0].offsetWidth > 0) {
623
- self.reposition(cache.event, !images.length);
624
- }
625
- });
626
- };
627
-
628
- PROTOTYPE._waitForContent = function(element) {
629
- var cache = this.cache;
630
-
631
- // Set flag
632
- cache.waiting = TRUE;
633
-
634
- // If imagesLoaded is included, ensure images have loaded and return promise
635
- return ( $.fn.imagesLoaded ? element.imagesLoaded() : $.Deferred().resolve([]) )
636
- .done(function() { cache.waiting = FALSE; })
637
- .promise();
638
- };
639
-
640
- PROTOTYPE._updateContent = function(content, reposition) {
641
- this._update(content, this.elements.content, reposition);
642
- };
643
-
644
- PROTOTYPE._updateTitle = function(content, reposition) {
645
- if(this._update(content, this.elements.title, reposition) === FALSE) {
646
- this._removeTitle(FALSE);
647
- }
648
- };
649
-
650
- PROTOTYPE._createTitle = function()
651
- {
652
- var elements = this.elements,
653
- id = this._id+'-title';
654
-
655
- // Destroy previous title element, if present
656
- if(elements.titlebar) { this._removeTitle(); }
657
-
658
- // Create title bar and title elements
659
- elements.titlebar = $('<div />', {
660
- 'class': NAMESPACE + '-titlebar ' + (this.options.style.widget ? createWidgetClass('header') : '')
661
- })
662
- .append(
663
- elements.title = $('<div />', {
664
- 'id': id,
665
- 'class': NAMESPACE + '-title',
666
- 'aria-atomic': TRUE
667
- })
668
- )
669
- .insertBefore(elements.content)
670
-
671
- // Button-specific events
672
- .delegate('.qtip-close', 'mousedown keydown mouseup keyup mouseout', function(event) {
673
- $(this).toggleClass('ui-state-active ui-state-focus', event.type.substr(-4) === 'down');
674
- })
675
- .delegate('.qtip-close', 'mouseover mouseout', function(event){
676
- $(this).toggleClass('ui-state-hover', event.type === 'mouseover');
677
- });
678
-
679
- // Create button if enabled
680
- if(this.options.content.button) { this._createButton(); }
681
- };
682
-
683
- PROTOTYPE._removeTitle = function(reposition)
684
- {
685
- var elements = this.elements;
686
-
687
- if(elements.title) {
688
- elements.titlebar.remove();
689
- elements.titlebar = elements.title = elements.button = NULL;
690
-
691
- // Reposition if enabled
692
- if(reposition !== FALSE) { this.reposition(); }
693
- }
694
- };
695
- ;PROTOTYPE._createPosClass = function(my) {
696
- return NAMESPACE + '-pos-' + (my || this.options.position.my).abbrev();
697
- };
698
-
699
- PROTOTYPE.reposition = function(event, effect) {
700
- if(!this.rendered || this.positioning || this.destroyed) { return this; }
701
-
702
- // Set positioning flag
703
- this.positioning = TRUE;
704
-
705
- var cache = this.cache,
706
- tooltip = this.tooltip,
707
- posOptions = this.options.position,
708
- target = posOptions.target,
709
- my = posOptions.my,
710
- at = posOptions.at,
711
- viewport = posOptions.viewport,
712
- container = posOptions.container,
713
- adjust = posOptions.adjust,
714
- method = adjust.method.split(' '),
715
- tooltipWidth = tooltip.outerWidth(FALSE),
716
- tooltipHeight = tooltip.outerHeight(FALSE),
717
- targetWidth = 0,
718
- targetHeight = 0,
719
- type = tooltip.css('position'),
720
- position = { left: 0, top: 0 },
721
- visible = tooltip[0].offsetWidth > 0,
722
- isScroll = event && event.type === 'scroll',
723
- win = $(window),
724
- doc = container[0].ownerDocument,
725
- mouse = this.mouse,
726
- pluginCalculations, offset, adjusted, newClass;
727
-
728
- // Check if absolute position was passed
729
- if($.isArray(target) && target.length === 2) {
730
- // Force left top and set position
731
- at = { x: LEFT, y: TOP };
732
- position = { left: target[0], top: target[1] };
733
- }
734
-
735
- // Check if mouse was the target
736
- else if(target === 'mouse') {
737
- // Force left top to allow flipping
738
- at = { x: LEFT, y: TOP };
739
-
740
- // Use the mouse origin that caused the show event, if distance hiding is enabled
741
- if((!adjust.mouse || this.options.hide.distance) && cache.origin && cache.origin.pageX) {
742
- event = cache.origin;
743
- }
744
-
745
- // Use cached event for resize/scroll events
746
- else if(!event || (event && (event.type === 'resize' || event.type === 'scroll'))) {
747
- event = cache.event;
748
- }
749
-
750
- // Otherwise, use the cached mouse coordinates if available
751
- else if(mouse && mouse.pageX) {
752
- event = mouse;
753
- }
754
-
755
- // Calculate body and container offset and take them into account below
756
- if(type !== 'static') { position = container.offset(); }
757
- if(doc.body.offsetWidth !== (window.innerWidth || doc.documentElement.clientWidth)) {
758
- offset = $(document.body).offset();
759
- }
760
-
761
- // Use event coordinates for position
762
- position = {
763
- left: event.pageX - position.left + (offset && offset.left || 0),
764
- top: event.pageY - position.top + (offset && offset.top || 0)
765
- };
766
-
767
- // Scroll events are a pain, some browsers
768
- if(adjust.mouse && isScroll && mouse) {
769
- position.left -= (mouse.scrollX || 0) - win.scrollLeft();
770
- position.top -= (mouse.scrollY || 0) - win.scrollTop();
771
- }
772
- }
773
-
774
- // Target wasn't mouse or absolute...
775
- else {
776
- // Check if event targetting is being used
777
- if(target === 'event') {
778
- if(event && event.target && event.type !== 'scroll' && event.type !== 'resize') {
779
- cache.target = $(event.target);
780
- }
781
- else if(!event.target) {
782
- cache.target = this.elements.target;
783
- }
784
- }
785
- else if(target !== 'event'){
786
- cache.target = $(target.jquery ? target : this.elements.target);
787
- }
788
- target = cache.target;
789
-
790
- // Parse the target into a jQuery object and make sure there's an element present
791
- target = $(target).eq(0);
792
- if(target.length === 0) { return this; }
793
-
794
- // Check if window or document is the target
795
- else if(target[0] === document || target[0] === window) {
796
- targetWidth = BROWSER.iOS ? window.innerWidth : target.width();
797
- targetHeight = BROWSER.iOS ? window.innerHeight : target.height();
798
-
799
- if(target[0] === window) {
800
- position = {
801
- top: (viewport || target).scrollTop(),
802
- left: (viewport || target).scrollLeft()
803
- };
804
- }
805
- }
806
-
807
- // Check if the target is an <AREA> element
808
- else if(PLUGINS.imagemap && target.is('area')) {
809
- pluginCalculations = PLUGINS.imagemap(this, target, at, PLUGINS.viewport ? method : FALSE);
810
- }
811
-
812
- // Check if the target is an SVG element
813
- else if(PLUGINS.svg && target && target[0].ownerSVGElement) {
814
- pluginCalculations = PLUGINS.svg(this, target, at, PLUGINS.viewport ? method : FALSE);
815
- }
816
-
817
- // Otherwise use regular jQuery methods
818
- else {
819
- targetWidth = target.outerWidth(FALSE);
820
- targetHeight = target.outerHeight(FALSE);
821
- position = target.offset();
822
- }
823
-
824
- // Parse returned plugin values into proper variables
825
- if(pluginCalculations) {
826
- targetWidth = pluginCalculations.width;
827
- targetHeight = pluginCalculations.height;
828
- offset = pluginCalculations.offset;
829
- position = pluginCalculations.position;
830
- }
831
-
832
- // Adjust position to take into account offset parents
833
- position = this.reposition.offset(target, position, container);
834
-
835
- // Adjust for position.fixed tooltips (and also iOS scroll bug in v3.2-4.0 & v4.3-4.3.2)
836
- if((BROWSER.iOS > 3.1 && BROWSER.iOS < 4.1) ||
837
- (BROWSER.iOS >= 4.3 && BROWSER.iOS < 4.33) ||
838
- (!BROWSER.iOS && type === 'fixed')
839
- ){
840
- position.left -= win.scrollLeft();
841
- position.top -= win.scrollTop();
842
- }
843
-
844
- // Adjust position relative to target
845
- if(!pluginCalculations || (pluginCalculations && pluginCalculations.adjustable !== FALSE)) {
846
- position.left += at.x === RIGHT ? targetWidth : at.x === CENTER ? targetWidth / 2 : 0;
847
- position.top += at.y === BOTTOM ? targetHeight : at.y === CENTER ? targetHeight / 2 : 0;
848
- }
849
- }
850
-
851
- // Adjust position relative to tooltip
852
- position.left += adjust.x + (my.x === RIGHT ? -tooltipWidth : my.x === CENTER ? -tooltipWidth / 2 : 0);
853
- position.top += adjust.y + (my.y === BOTTOM ? -tooltipHeight : my.y === CENTER ? -tooltipHeight / 2 : 0);
854
-
855
- // Use viewport adjustment plugin if enabled
856
- if(PLUGINS.viewport) {
857
- adjusted = position.adjusted = PLUGINS.viewport(
858
- this, position, posOptions, targetWidth, targetHeight, tooltipWidth, tooltipHeight
859
- );
860
-
861
- // Apply offsets supplied by positioning plugin (if used)
862
- if(offset && adjusted.left) { position.left += offset.left; }
863
- if(offset && adjusted.top) { position.top += offset.top; }
864
-
865
- // Apply any new 'my' position
866
- if(adjusted.my) { this.position.my = adjusted.my; }
867
- }
868
-
869
- // Viewport adjustment is disabled, set values to zero
870
- else { position.adjusted = { left: 0, top: 0 }; }
871
-
872
- // Set tooltip position class if it's changed
873
- if(cache.posClass !== (newClass = this._createPosClass(this.position.my))) {
874
- tooltip.removeClass(cache.posClass).addClass( (cache.posClass = newClass) );
875
- }
876
-
877
- // tooltipmove event
878
- if(!this._trigger('move', [position, viewport.elem || viewport], event)) { return this; }
879
- delete position.adjusted;
880
-
881
- // If effect is disabled, target it mouse, no animation is defined or positioning gives NaN out, set CSS directly
882
- if(effect === FALSE || !visible || isNaN(position.left) || isNaN(position.top) || target === 'mouse' || !$.isFunction(posOptions.effect)) {
883
- tooltip.css(position);
884
- }
885
-
886
- // Use custom function if provided
887
- else if($.isFunction(posOptions.effect)) {
888
- posOptions.effect.call(tooltip, this, $.extend({}, position));
889
- tooltip.queue(function(next) {
890
- // Reset attributes to avoid cross-browser rendering bugs
891
- $(this).css({ opacity: '', height: '' });
892
- if(BROWSER.ie) { this.style.removeAttribute('filter'); }
893
-
894
- next();
895
- });
896
- }
897
-
898
- // Set positioning flag
899
- this.positioning = FALSE;
900
-
901
- return this;
902
- };
903
-
904
- // Custom (more correct for qTip!) offset calculator
905
- PROTOTYPE.reposition.offset = function(elem, pos, container) {
906
- if(!container[0]) { return pos; }
907
-
908
- var ownerDocument = $(elem[0].ownerDocument),
909
- quirks = !!BROWSER.ie && document.compatMode !== 'CSS1Compat',
910
- parent = container[0],
911
- scrolled, position, parentOffset, overflow;
912
-
913
- function scroll(e, i) {
914
- pos.left += i * e.scrollLeft();
915
- pos.top += i * e.scrollTop();
916
- }
917
-
918
- // Compensate for non-static containers offset
919
- do {
920
- if((position = $.css(parent, 'position')) !== 'static') {
921
- if(position === 'fixed') {
922
- parentOffset = parent.getBoundingClientRect();
923
- scroll(ownerDocument, -1);
924
- }
925
- else {
926
- parentOffset = $(parent).position();
927
- parentOffset.left += (parseFloat($.css(parent, 'borderLeftWidth')) || 0);
928
- parentOffset.top += (parseFloat($.css(parent, 'borderTopWidth')) || 0);
929
- }
930
-
931
- pos.left -= parentOffset.left + (parseFloat($.css(parent, 'marginLeft')) || 0);
932
- pos.top -= parentOffset.top + (parseFloat($.css(parent, 'marginTop')) || 0);
933
-
934
- // If this is the first parent element with an overflow of "scroll" or "auto", store it
935
- if(!scrolled && (overflow = $.css(parent, 'overflow')) !== 'hidden' && overflow !== 'visible') { scrolled = $(parent); }
936
- }
937
- }
938
- while((parent = parent.offsetParent));
939
-
940
- // Compensate for containers scroll if it also has an offsetParent (or in IE quirks mode)
941
- if(scrolled && (scrolled[0] !== ownerDocument[0] || quirks)) {
942
- scroll(scrolled, 1);
943
- }
944
-
945
- return pos;
946
- };
947
-
948
- // Corner class
949
- var C = (CORNER = PROTOTYPE.reposition.Corner = function(corner, forceY) {
950
- corner = ('' + corner).replace(/([A-Z])/, ' $1').replace(/middle/gi, CENTER).toLowerCase();
951
- this.x = (corner.match(/left|right/i) || corner.match(/center/) || ['inherit'])[0].toLowerCase();
952
- this.y = (corner.match(/top|bottom|center/i) || ['inherit'])[0].toLowerCase();
953
- this.forceY = !!forceY;
954
-
955
- var f = corner.charAt(0);
956
- this.precedance = (f === 't' || f === 'b' ? Y : X);
957
- }).prototype;
958
-
959
- C.invert = function(z, center) {
960
- this[z] = this[z] === LEFT ? RIGHT : this[z] === RIGHT ? LEFT : center || this[z];
961
- };
962
-
963
- C.string = function(join) {
964
- var x = this.x, y = this.y;
965
-
966
- var result = x !== y ?
967
- (x === 'center' || y !== 'center' && (this.precedance === Y || this.forceY) ?
968
- [y,x] : [x,y]
969
- ) :
970
- [x];
971
-
972
- return join !== false ? result.join(' ') : result;
973
- };
974
-
975
- C.abbrev = function() {
976
- var result = this.string(false);
977
- return result[0].charAt(0) + (result[1] && result[1].charAt(0) || '');
978
- };
979
-
980
- C.clone = function() {
981
- return new CORNER( this.string(), this.forceY );
982
- };
983
-
984
- ;
985
- PROTOTYPE.toggle = function(state, event) {
986
- var cache = this.cache,
987
- options = this.options,
988
- tooltip = this.tooltip;
989
-
990
- // Try to prevent flickering when tooltip overlaps show element
991
- if(event) {
992
- if((/over|enter/).test(event.type) && cache.event && (/out|leave/).test(cache.event.type) &&
993
- options.show.target.add(event.target).length === options.show.target.length &&
994
- tooltip.has(event.relatedTarget).length) {
995
- return this;
996
- }
997
-
998
- // Cache event
999
- cache.event = $.event.fix(event);
1000
- }
1001
-
1002
- // If we're currently waiting and we've just hidden... stop it
1003
- this.waiting && !state && (this.hiddenDuringWait = TRUE);
1004
-
1005
- // Render the tooltip if showing and it isn't already
1006
- if(!this.rendered) { return state ? this.render(1) : this; }
1007
- else if(this.destroyed || this.disabled) { return this; }
1008
-
1009
- var type = state ? 'show' : 'hide',
1010
- opts = this.options[type],
1011
- otherOpts = this.options[ !state ? 'show' : 'hide' ],
1012
- posOptions = this.options.position,
1013
- contentOptions = this.options.content,
1014
- width = this.tooltip.css('width'),
1015
- visible = this.tooltip.is(':visible'),
1016
- animate = state || opts.target.length === 1,
1017
- sameTarget = !event || opts.target.length < 2 || cache.target[0] === event.target,
1018
- identicalState, allow, showEvent, delay, after;
1019
-
1020
- // Detect state if valid one isn't provided
1021
- if((typeof state).search('boolean|number')) { state = !visible; }
1022
-
1023
- // Check if the tooltip is in an identical state to the new would-be state
1024
- identicalState = !tooltip.is(':animated') && visible === state && sameTarget;
1025
-
1026
- // Fire tooltip(show/hide) event and check if destroyed
1027
- allow = !identicalState ? !!this._trigger(type, [90]) : NULL;
1028
-
1029
- // Check to make sure the tooltip wasn't destroyed in the callback
1030
- if(this.destroyed) { return this; }
1031
-
1032
- // If the user didn't stop the method prematurely and we're showing the tooltip, focus it
1033
- if(allow !== FALSE && state) { this.focus(event); }
1034
-
1035
- // If the state hasn't changed or the user stopped it, return early
1036
- if(!allow || identicalState) { return this; }
1037
-
1038
- // Set ARIA hidden attribute
1039
- $.attr(tooltip[0], 'aria-hidden', !!!state);
1040
-
1041
- // Execute state specific properties
1042
- if(state) {
1043
- // Store show origin coordinates
1044
- this.mouse && (cache.origin = $.event.fix(this.mouse));
1045
-
1046
- // Update tooltip content & title if it's a dynamic function
1047
- if($.isFunction(contentOptions.text)) { this._updateContent(contentOptions.text, FALSE); }
1048
- if($.isFunction(contentOptions.title)) { this._updateTitle(contentOptions.title, FALSE); }
1049
-
1050
- // Cache mousemove events for positioning purposes (if not already tracking)
1051
- if(!trackingBound && posOptions.target === 'mouse' && posOptions.adjust.mouse) {
1052
- $(document).bind('mousemove.'+NAMESPACE, this._storeMouse);
1053
- trackingBound = TRUE;
1054
- }
1055
-
1056
- // Update the tooltip position (set width first to prevent viewport/max-width issues)
1057
- if(!width) { tooltip.css('width', tooltip.outerWidth(FALSE)); }
1058
- this.reposition(event, arguments[2]);
1059
- if(!width) { tooltip.css('width', ''); }
1060
-
1061
- // Hide other tooltips if tooltip is solo
1062
- if(!!opts.solo) {
1063
- (typeof opts.solo === 'string' ? $(opts.solo) : $(SELECTOR, opts.solo))
1064
- .not(tooltip).not(opts.target).qtip('hide', $.Event('tooltipsolo'));
1065
- }
1066
- }
1067
- else {
1068
- // Clear show timer if we're hiding
1069
- clearTimeout(this.timers.show);
1070
-
1071
- // Remove cached origin on hide
1072
- delete cache.origin;
1073
-
1074
- // Remove mouse tracking event if not needed (all tracking qTips are hidden)
1075
- if(trackingBound && !$(SELECTOR+'[tracking="true"]:visible', opts.solo).not(tooltip).length) {
1076
- $(document).unbind('mousemove.'+NAMESPACE);
1077
- trackingBound = FALSE;
1078
- }
1079
-
1080
- // Blur the tooltip
1081
- this.blur(event);
1082
- }
1083
-
1084
- // Define post-animation, state specific properties
1085
- after = $.proxy(function() {
1086
- if(state) {
1087
- // Prevent antialias from disappearing in IE by removing filter
1088
- if(BROWSER.ie) { tooltip[0].style.removeAttribute('filter'); }
1089
-
1090
- // Remove overflow setting to prevent tip bugs
1091
- tooltip.css('overflow', '');
1092
-
1093
- // Autofocus elements if enabled
1094
- if('string' === typeof opts.autofocus) {
1095
- $(this.options.show.autofocus, tooltip).focus();
1096
- }
1097
-
1098
- // If set, hide tooltip when inactive for delay period
1099
- this.options.show.target.trigger('qtip-'+this.id+'-inactive');
1100
- }
1101
- else {
1102
- // Reset CSS states
1103
- tooltip.css({
1104
- display: '',
1105
- visibility: '',
1106
- opacity: '',
1107
- left: '',
1108
- top: ''
1109
- });
1110
- }
1111
-
1112
- // tooltipvisible/tooltiphidden events
1113
- this._trigger(state ? 'visible' : 'hidden');
1114
- }, this);
1115
-
1116
- // If no effect type is supplied, use a simple toggle
1117
- if(opts.effect === FALSE || animate === FALSE) {
1118
- tooltip[ type ]();
1119
- after();
1120
- }
1121
-
1122
- // Use custom function if provided
1123
- else if($.isFunction(opts.effect)) {
1124
- tooltip.stop(1, 1);
1125
- opts.effect.call(tooltip, this);
1126
- tooltip.queue('fx', function(n) {
1127
- after(); n();
1128
- });
1129
- }
1130
-
1131
- // Use basic fade function by default
1132
- else { tooltip.fadeTo(90, state ? 1 : 0, after); }
1133
-
1134
- // If inactive hide method is set, active it
1135
- if(state) { opts.target.trigger('qtip-'+this.id+'-inactive'); }
1136
-
1137
- return this;
1138
- };
1139
-
1140
- PROTOTYPE.show = function(event) { return this.toggle(TRUE, event); };
1141
-
1142
- PROTOTYPE.hide = function(event) { return this.toggle(FALSE, event); };
1143
- ;PROTOTYPE.focus = function(event) {
1144
- if(!this.rendered || this.destroyed) { return this; }
1145
-
1146
- var qtips = $(SELECTOR),
1147
- tooltip = this.tooltip,
1148
- curIndex = parseInt(tooltip[0].style.zIndex, 10),
1149
- newIndex = QTIP.zindex + qtips.length,
1150
- focusedElem;
1151
-
1152
- // Only update the z-index if it has changed and tooltip is not already focused
1153
- if(!tooltip.hasClass(CLASS_FOCUS)) {
1154
- // tooltipfocus event
1155
- if(this._trigger('focus', [newIndex], event)) {
1156
- // Only update z-index's if they've changed
1157
- if(curIndex !== newIndex) {
1158
- // Reduce our z-index's and keep them properly ordered
1159
- qtips.each(function() {
1160
- if(this.style.zIndex > curIndex) {
1161
- this.style.zIndex = this.style.zIndex - 1;
1162
- }
1163
- });
1164
-
1165
- // Fire blur event for focused tooltip
1166
- qtips.filter('.' + CLASS_FOCUS).qtip('blur', event);
1167
- }
1168
-
1169
- // Set the new z-index
1170
- tooltip.addClass(CLASS_FOCUS)[0].style.zIndex = newIndex;
1171
- }
1172
- }
1173
-
1174
- return this;
1175
- };
1176
-
1177
- PROTOTYPE.blur = function(event) {
1178
- if(!this.rendered || this.destroyed) { return this; }
1179
-
1180
- // Set focused status to FALSE
1181
- this.tooltip.removeClass(CLASS_FOCUS);
1182
-
1183
- // tooltipblur event
1184
- this._trigger('blur', [ this.tooltip.css('zIndex') ], event);
1185
-
1186
- return this;
1187
- };
1188
- ;PROTOTYPE.disable = function(state) {
1189
- if(this.destroyed) { return this; }
1190
-
1191
- // If 'toggle' is passed, toggle the current state
1192
- if(state === 'toggle') {
1193
- state = !(this.rendered ? this.tooltip.hasClass(CLASS_DISABLED) : this.disabled);
1194
- }
1195
-
1196
- // Disable if no state passed
1197
- else if('boolean' !== typeof state) {
1198
- state = TRUE;
1199
- }
1200
-
1201
- if(this.rendered) {
1202
- this.tooltip.toggleClass(CLASS_DISABLED, state)
1203
- .attr('aria-disabled', state);
1204
- }
1205
-
1206
- this.disabled = !!state;
1207
-
1208
- return this;
1209
- };
1210
-
1211
- PROTOTYPE.enable = function() { return this.disable(FALSE); };
1212
- ;PROTOTYPE._createButton = function()
1213
- {
1214
- var self = this,
1215
- elements = this.elements,
1216
- tooltip = elements.tooltip,
1217
- button = this.options.content.button,
1218
- isString = typeof button === 'string',
1219
- close = isString ? button : 'Close tooltip';
1220
-
1221
- if(elements.button) { elements.button.remove(); }
1222
-
1223
- // Use custom button if one was supplied by user, else use default
1224
- if(button.jquery) {
1225
- elements.button = button;
1226
- }
1227
- else {
1228
- elements.button = $('<a />', {
1229
- 'class': 'qtip-close ' + (this.options.style.widget ? '' : NAMESPACE+'-icon'),
1230
- 'title': close,
1231
- 'aria-label': close
1232
- })
1233
- .prepend(
1234
- $('<span />', {
1235
- 'class': 'ui-icon ui-icon-close',
1236
- 'html': '&times;'
1237
- })
1238
- );
1239
- }
1240
-
1241
- // Create button and setup attributes
1242
- elements.button.appendTo(elements.titlebar || tooltip)
1243
- .attr('role', 'button')
1244
- .click(function(event) {
1245
- if(!tooltip.hasClass(CLASS_DISABLED)) { self.hide(event); }
1246
- return FALSE;
1247
- });
1248
- };
1249
-
1250
- PROTOTYPE._updateButton = function(button)
1251
- {
1252
- // Make sure tooltip is rendered and if not, return
1253
- if(!this.rendered) { return FALSE; }
1254
-
1255
- var elem = this.elements.button;
1256
- if(button) { this._createButton(); }
1257
- else { elem.remove(); }
1258
- };
1259
- ;// Widget class creator
1260
- function createWidgetClass(cls) {
1261
- return WIDGET.concat('').join(cls ? '-'+cls+' ' : ' ');
1262
- }
1263
-
1264
- // Widget class setter method
1265
- PROTOTYPE._setWidget = function()
1266
- {
1267
- var on = this.options.style.widget,
1268
- elements = this.elements,
1269
- tooltip = elements.tooltip,
1270
- disabled = tooltip.hasClass(CLASS_DISABLED);
1271
-
1272
- tooltip.removeClass(CLASS_DISABLED);
1273
- CLASS_DISABLED = on ? 'ui-state-disabled' : 'qtip-disabled';
1274
- tooltip.toggleClass(CLASS_DISABLED, disabled);
1275
-
1276
- tooltip.toggleClass('ui-helper-reset '+createWidgetClass(), on).toggleClass(CLASS_DEFAULT, this.options.style.def && !on);
1277
-
1278
- if(elements.content) {
1279
- elements.content.toggleClass( createWidgetClass('content'), on);
1280
- }
1281
- if(elements.titlebar) {
1282
- elements.titlebar.toggleClass( createWidgetClass('header'), on);
1283
- }
1284
- if(elements.button) {
1285
- elements.button.toggleClass(NAMESPACE+'-icon', !on);
1286
- }
1287
- };
1288
- ;function delay(callback, duration) {
1289
- // If tooltip has displayed, start hide timer
1290
- if(duration > 0) {
1291
- return setTimeout(
1292
- $.proxy(callback, this), duration
1293
- );
1294
- }
1295
- else{ callback.call(this); }
1296
- }
1297
-
1298
- function showMethod(event) {
1299
- if(this.tooltip.hasClass(CLASS_DISABLED)) { return; }
1300
-
1301
- // Clear hide timers
1302
- clearTimeout(this.timers.show);
1303
- clearTimeout(this.timers.hide);
1304
-
1305
- // Start show timer
1306
- this.timers.show = delay.call(this,
1307
- function() { this.toggle(TRUE, event); },
1308
- this.options.show.delay
1309
- );
1310
- }
1311
-
1312
- function hideMethod(event) {
1313
- if(this.tooltip.hasClass(CLASS_DISABLED) || this.destroyed) { return; }
1314
-
1315
- // Check if new target was actually the tooltip element
1316
- var relatedTarget = $(event.relatedTarget),
1317
- ontoTooltip = relatedTarget.closest(SELECTOR)[0] === this.tooltip[0],
1318
- ontoTarget = relatedTarget[0] === this.options.show.target[0];
1319
-
1320
- // Clear timers and stop animation queue
1321
- clearTimeout(this.timers.show);
1322
- clearTimeout(this.timers.hide);
1323
-
1324
- // Prevent hiding if tooltip is fixed and event target is the tooltip.
1325
- // Or if mouse positioning is enabled and cursor momentarily overlaps
1326
- if(this !== relatedTarget[0] &&
1327
- (this.options.position.target === 'mouse' && ontoTooltip) ||
1328
- (this.options.hide.fixed && (
1329
- (/mouse(out|leave|move)/).test(event.type) && (ontoTooltip || ontoTarget))
1330
- ))
1331
- {
1332
- try {
1333
- event.preventDefault();
1334
- event.stopImmediatePropagation();
1335
- } catch(e) {}
1336
-
1337
- return;
1338
- }
1339
-
1340
- // If tooltip has displayed, start hide timer
1341
- this.timers.hide = delay.call(this,
1342
- function() { this.toggle(FALSE, event); },
1343
- this.options.hide.delay,
1344
- this
1345
- );
1346
- }
1347
-
1348
- function inactiveMethod(event) {
1349
- if(this.tooltip.hasClass(CLASS_DISABLED) || !this.options.hide.inactive) { return; }
1350
-
1351
- // Clear timer
1352
- clearTimeout(this.timers.inactive);
1353
-
1354
- this.timers.inactive = delay.call(this,
1355
- function(){ this.hide(event); },
1356
- this.options.hide.inactive
1357
- );
1358
- }
1359
-
1360
- function repositionMethod(event) {
1361
- if(this.rendered && this.tooltip[0].offsetWidth > 0) { this.reposition(event); }
1362
- }
1363
-
1364
- // Store mouse coordinates
1365
- PROTOTYPE._storeMouse = function(event) {
1366
- (this.mouse = $.event.fix(event)).type = 'mousemove';
1367
- return this;
1368
- };
1369
-
1370
- // Bind events
1371
- PROTOTYPE._bind = function(targets, events, method, suffix, context) {
1372
- if(!targets || !method || !events.length) { return; }
1373
- var ns = '.' + this._id + (suffix ? '-'+suffix : '');
1374
- $(targets).bind(
1375
- (events.split ? events : events.join(ns + ' ')) + ns,
1376
- $.proxy(method, context || this)
1377
- );
1378
- return this;
1379
- };
1380
- PROTOTYPE._unbind = function(targets, suffix) {
1381
- targets && $(targets).unbind('.' + this._id + (suffix ? '-'+suffix : ''));
1382
- return this;
1383
- };
1384
-
1385
- // Global delegation helper
1386
- function delegate(selector, events, method) {
1387
- $(document.body).delegate(selector,
1388
- (events.split ? events : events.join('.'+NAMESPACE + ' ')) + '.'+NAMESPACE,
1389
- function() {
1390
- var api = QTIP.api[ $.attr(this, ATTR_ID) ];
1391
- api && !api.disabled && method.apply(api, arguments);
1392
- }
1393
- );
1394
- }
1395
- // Event trigger
1396
- PROTOTYPE._trigger = function(type, args, event) {
1397
- var callback = $.Event('tooltip'+type);
1398
- callback.originalEvent = (event && $.extend({}, event)) || this.cache.event || NULL;
1399
-
1400
- this.triggering = type;
1401
- this.tooltip.trigger(callback, [this].concat(args || []));
1402
- this.triggering = FALSE;
1403
-
1404
- return !callback.isDefaultPrevented();
1405
- };
1406
-
1407
- PROTOTYPE._bindEvents = function(showEvents, hideEvents, showTargets, hideTargets, showMethod, hideMethod) {
1408
- // Get tasrgets that lye within both
1409
- var similarTargets = showTargets.filter( hideTargets ).add( hideTargets.filter(showTargets) ),
1410
- toggleEvents = [];
1411
-
1412
- // If hide and show targets are the same...
1413
- if(similarTargets.length) {
1414
-
1415
- // Filter identical show/hide events
1416
- $.each(hideEvents, function(i, type) {
1417
- var showIndex = $.inArray(type, showEvents);
1418
-
1419
- // Both events are identical, remove from both hide and show events
1420
- // and append to toggleEvents
1421
- showIndex > -1 && toggleEvents.push( showEvents.splice( showIndex, 1 )[0] );
1422
- });
1423
-
1424
- // Toggle events are special case of identical show/hide events, which happen in sequence
1425
- if(toggleEvents.length) {
1426
- // Bind toggle events to the similar targets
1427
- this._bind(similarTargets, toggleEvents, function(event) {
1428
- var state = this.rendered ? this.tooltip[0].offsetWidth > 0 : false;
1429
- (state ? hideMethod : showMethod).call(this, event);
1430
- });
1431
-
1432
- // Remove the similar targets from the regular show/hide bindings
1433
- showTargets = showTargets.not(similarTargets);
1434
- hideTargets = hideTargets.not(similarTargets);
1435
- }
1436
- }
1437
-
1438
- // Apply show/hide/toggle events
1439
- this._bind(showTargets, showEvents, showMethod);
1440
- this._bind(hideTargets, hideEvents, hideMethod);
1441
- };
1442
-
1443
- PROTOTYPE._assignInitialEvents = function(event) {
1444
- var options = this.options,
1445
- showTarget = options.show.target,
1446
- hideTarget = options.hide.target,
1447
- showEvents = options.show.event ? $.trim('' + options.show.event).split(' ') : [],
1448
- hideEvents = options.hide.event ? $.trim('' + options.hide.event).split(' ') : [];
1449
-
1450
- // Catch remove/removeqtip events on target element to destroy redundant tooltips
1451
- this._bind(this.elements.target, ['remove', 'removeqtip'], function(event) {
1452
- this.destroy(true);
1453
- }, 'destroy');
1454
-
1455
- /*
1456
- * Make sure hoverIntent functions properly by using mouseleave as a hide event if
1457
- * mouseenter/mouseout is used for show.event, even if it isn't in the users options.
1458
- */
1459
- if(/mouse(over|enter)/i.test(options.show.event) && !/mouse(out|leave)/i.test(options.hide.event)) {
1460
- hideEvents.push('mouseleave');
1461
- }
1462
-
1463
- /*
1464
- * Also make sure initial mouse targetting works correctly by caching mousemove coords
1465
- * on show targets before the tooltip has rendered. Also set onTarget when triggered to
1466
- * keep mouse tracking working.
1467
- */
1468
- this._bind(showTarget, 'mousemove', function(event) {
1469
- this._storeMouse(event);
1470
- this.cache.onTarget = TRUE;
1471
- });
1472
-
1473
- // Define hoverIntent function
1474
- function hoverIntent(event) {
1475
- // Only continue if tooltip isn't disabled
1476
- if(this.disabled || this.destroyed) { return FALSE; }
1477
-
1478
- // Cache the event data
1479
- this.cache.event = event && $.event.fix(event);
1480
- this.cache.target = event && $(event.target);
1481
-
1482
- // Start the event sequence
1483
- clearTimeout(this.timers.show);
1484
- this.timers.show = delay.call(this,
1485
- function() { this.render(typeof event === 'object' || options.show.ready); },
1486
- options.prerender ? 0 : options.show.delay
1487
- );
1488
- }
1489
-
1490
- // Filter and bind events
1491
- this._bindEvents(showEvents, hideEvents, showTarget, hideTarget, hoverIntent, function() {
1492
- if(!this.timers) { return FALSE; }
1493
- clearTimeout(this.timers.show);
1494
- });
1495
-
1496
- // Prerendering is enabled, create tooltip now
1497
- if(options.show.ready || options.prerender) { hoverIntent.call(this, event); }
1498
- };
1499
-
1500
- // Event assignment method
1501
- PROTOTYPE._assignEvents = function() {
1502
- var self = this,
1503
- options = this.options,
1504
- posOptions = options.position,
1505
-
1506
- tooltip = this.tooltip,
1507
- showTarget = options.show.target,
1508
- hideTarget = options.hide.target,
1509
- containerTarget = posOptions.container,
1510
- viewportTarget = posOptions.viewport,
1511
- documentTarget = $(document),
1512
- bodyTarget = $(document.body),
1513
- windowTarget = $(window),
1514
-
1515
- showEvents = options.show.event ? $.trim('' + options.show.event).split(' ') : [],
1516
- hideEvents = options.hide.event ? $.trim('' + options.hide.event).split(' ') : [];
1517
-
1518
-
1519
- // Assign passed event callbacks
1520
- $.each(options.events, function(name, callback) {
1521
- self._bind(tooltip, name === 'toggle' ? ['tooltipshow','tooltiphide'] : ['tooltip'+name], callback, null, tooltip);
1522
- });
1523
-
1524
- // Hide tooltips when leaving current window/frame (but not select/option elements)
1525
- if(/mouse(out|leave)/i.test(options.hide.event) && options.hide.leave === 'window') {
1526
- this._bind(documentTarget, ['mouseout', 'blur'], function(event) {
1527
- if(!/select|option/.test(event.target.nodeName) && !event.relatedTarget) {
1528
- this.hide(event);
1529
- }
1530
- });
1531
- }
1532
-
1533
- // Enable hide.fixed by adding appropriate class
1534
- if(options.hide.fixed) {
1535
- hideTarget = hideTarget.add( tooltip.addClass(CLASS_FIXED) );
1536
- }
1537
-
1538
- /*
1539
- * Make sure hoverIntent functions properly by using mouseleave to clear show timer if
1540
- * mouseenter/mouseout is used for show.event, even if it isn't in the users options.
1541
- */
1542
- else if(/mouse(over|enter)/i.test(options.show.event)) {
1543
- this._bind(hideTarget, 'mouseleave', function() {
1544
- clearTimeout(this.timers.show);
1545
- });
1546
- }
1547
-
1548
- // Hide tooltip on document mousedown if unfocus events are enabled
1549
- if(('' + options.hide.event).indexOf('unfocus') > -1) {
1550
- this._bind(containerTarget.closest('html'), ['mousedown', 'touchstart'], function(event) {
1551
- var elem = $(event.target),
1552
- enabled = this.rendered && !this.tooltip.hasClass(CLASS_DISABLED) && this.tooltip[0].offsetWidth > 0,
1553
- isAncestor = elem.parents(SELECTOR).filter(this.tooltip[0]).length > 0;
1554
-
1555
- if(elem[0] !== this.target[0] && elem[0] !== this.tooltip[0] && !isAncestor &&
1556
- !this.target.has(elem[0]).length && enabled
1557
- ) {
1558
- this.hide(event);
1559
- }
1560
- });
1561
- }
1562
-
1563
- // Check if the tooltip hides when inactive
1564
- if('number' === typeof options.hide.inactive) {
1565
- // Bind inactive method to show target(s) as a custom event
1566
- this._bind(showTarget, 'qtip-'+this.id+'-inactive', inactiveMethod, 'inactive');
1567
-
1568
- // Define events which reset the 'inactive' event handler
1569
- this._bind(hideTarget.add(tooltip), QTIP.inactiveEvents, inactiveMethod);
1570
- }
1571
-
1572
- // Filter and bind events
1573
- this._bindEvents(showEvents, hideEvents, showTarget, hideTarget, showMethod, hideMethod);
1574
-
1575
- // Mouse movement bindings
1576
- this._bind(showTarget.add(tooltip), 'mousemove', function(event) {
1577
- // Check if the tooltip hides when mouse is moved a certain distance
1578
- if('number' === typeof options.hide.distance) {
1579
- var origin = this.cache.origin || {},
1580
- limit = this.options.hide.distance,
1581
- abs = Math.abs;
1582
-
1583
- // Check if the movement has gone beyond the limit, and hide it if so
1584
- if(abs(event.pageX - origin.pageX) >= limit || abs(event.pageY - origin.pageY) >= limit) {
1585
- this.hide(event);
1586
- }
1587
- }
1588
-
1589
- // Cache mousemove coords on show targets
1590
- this._storeMouse(event);
1591
- });
1592
-
1593
- // Mouse positioning events
1594
- if(posOptions.target === 'mouse') {
1595
- // If mouse adjustment is on...
1596
- if(posOptions.adjust.mouse) {
1597
- // Apply a mouseleave event so we don't get problems with overlapping
1598
- if(options.hide.event) {
1599
- // Track if we're on the target or not
1600
- this._bind(showTarget, ['mouseenter', 'mouseleave'], function(event) {
1601
- if(!this.cache) {return FALSE; }
1602
- this.cache.onTarget = event.type === 'mouseenter';
1603
- });
1604
- }
1605
-
1606
- // Update tooltip position on mousemove
1607
- this._bind(documentTarget, 'mousemove', function(event) {
1608
- // Update the tooltip position only if the tooltip is visible and adjustment is enabled
1609
- if(this.rendered && this.cache.onTarget && !this.tooltip.hasClass(CLASS_DISABLED) && this.tooltip[0].offsetWidth > 0) {
1610
- this.reposition(event);
1611
- }
1612
- });
1613
- }
1614
- }
1615
-
1616
- // Adjust positions of the tooltip on window resize if enabled
1617
- if(posOptions.adjust.resize || viewportTarget.length) {
1618
- this._bind( $.event.special.resize ? viewportTarget : windowTarget, 'resize', repositionMethod );
1619
- }
1620
-
1621
- // Adjust tooltip position on scroll of the window or viewport element if present
1622
- if(posOptions.adjust.scroll) {
1623
- this._bind( windowTarget.add(posOptions.container), 'scroll', repositionMethod );
1624
- }
1625
- };
1626
-
1627
- // Un-assignment method
1628
- PROTOTYPE._unassignEvents = function() {
1629
- var options = this.options,
1630
- showTargets = options.show.target,
1631
- hideTargets = options.hide.target,
1632
- targets = $.grep([
1633
- this.elements.target[0],
1634
- this.rendered && this.tooltip[0],
1635
- options.position.container[0],
1636
- options.position.viewport[0],
1637
- options.position.container.closest('html')[0], // unfocus
1638
- window,
1639
- document
1640
- ], function(i) {
1641
- return typeof i === 'object';
1642
- });
1643
-
1644
- // Add show and hide targets if they're valid
1645
- if(showTargets && showTargets.toArray) {
1646
- targets = targets.concat(showTargets.toArray());
1647
- }
1648
- if(hideTargets && hideTargets.toArray) {
1649
- targets = targets.concat(hideTargets.toArray());
1650
- }
1651
-
1652
- // Unbind the events
1653
- this._unbind(targets)
1654
- ._unbind(targets, 'destroy')
1655
- ._unbind(targets, 'inactive');
1656
- };
1657
-
1658
- // Apply common event handlers using delegate (avoids excessive .bind calls!)
1659
- $(function() {
1660
- delegate(SELECTOR, ['mouseenter', 'mouseleave'], function(event) {
1661
- var state = event.type === 'mouseenter',
1662
- tooltip = $(event.currentTarget),
1663
- target = $(event.relatedTarget || event.target),
1664
- options = this.options;
1665
-
1666
- // On mouseenter...
1667
- if(state) {
1668
- // Focus the tooltip on mouseenter (z-index stacking)
1669
- this.focus(event);
1670
-
1671
- // Clear hide timer on tooltip hover to prevent it from closing
1672
- tooltip.hasClass(CLASS_FIXED) && !tooltip.hasClass(CLASS_DISABLED) && clearTimeout(this.timers.hide);
1673
- }
1674
-
1675
- // On mouseleave...
1676
- else {
1677
- // When mouse tracking is enabled, hide when we leave the tooltip and not onto the show target (if a hide event is set)
1678
- if(options.position.target === 'mouse' && options.position.adjust.mouse &&
1679
- options.hide.event && options.show.target && !target.closest(options.show.target[0]).length) {
1680
- this.hide(event);
1681
- }
1682
- }
1683
-
1684
- // Add hover class
1685
- tooltip.toggleClass(CLASS_HOVER, state);
1686
- });
1687
-
1688
- // Define events which reset the 'inactive' event handler
1689
- delegate('['+ATTR_ID+']', INACTIVE_EVENTS, inactiveMethod);
1690
- });
1691
- ;// Initialization method
1692
- function init(elem, id, opts) {
1693
- var obj, posOptions, attr, config, title,
1694
-
1695
- // Setup element references
1696
- docBody = $(document.body),
1697
-
1698
- // Use document body instead of document element if needed
1699
- newTarget = elem[0] === document ? docBody : elem,
1700
-
1701
- // Grab metadata from element if plugin is present
1702
- metadata = (elem.metadata) ? elem.metadata(opts.metadata) : NULL,
1703
-
1704
- // If metadata type if HTML5, grab 'name' from the object instead, or use the regular data object otherwise
1705
- metadata5 = opts.metadata.type === 'html5' && metadata ? metadata[opts.metadata.name] : NULL,
1706
-
1707
- // Grab data from metadata.name (or data-qtipopts as fallback) using .data() method,
1708
- html5 = elem.data(opts.metadata.name || 'qtipopts');
1709
-
1710
- // If we don't get an object returned attempt to parse it manualyl without parseJSON
1711
- try { html5 = typeof html5 === 'string' ? $.parseJSON(html5) : html5; } catch(e) {}
1712
-
1713
- // Merge in and sanitize metadata
1714
- config = $.extend(TRUE, {}, QTIP.defaults, opts,
1715
- typeof html5 === 'object' ? sanitizeOptions(html5) : NULL,
1716
- sanitizeOptions(metadata5 || metadata));
1717
-
1718
- // Re-grab our positioning options now we've merged our metadata and set id to passed value
1719
- posOptions = config.position;
1720
- config.id = id;
1721
-
1722
- // Setup missing content if none is detected
1723
- if('boolean' === typeof config.content.text) {
1724
- attr = elem.attr(config.content.attr);
1725
-
1726
- // Grab from supplied attribute if available
1727
- if(config.content.attr !== FALSE && attr) { config.content.text = attr; }
1728
-
1729
- // No valid content was found, abort render
1730
- else { return FALSE; }
1731
- }
1732
-
1733
- // Setup target options
1734
- if(!posOptions.container.length) { posOptions.container = docBody; }
1735
- if(posOptions.target === FALSE) { posOptions.target = newTarget; }
1736
- if(config.show.target === FALSE) { config.show.target = newTarget; }
1737
- if(config.show.solo === TRUE) { config.show.solo = posOptions.container.closest('body'); }
1738
- if(config.hide.target === FALSE) { config.hide.target = newTarget; }
1739
- if(config.position.viewport === TRUE) { config.position.viewport = posOptions.container; }
1740
-
1741
- // Ensure we only use a single container
1742
- posOptions.container = posOptions.container.eq(0);
1743
-
1744
- // Convert position corner values into x and y strings
1745
- posOptions.at = new CORNER(posOptions.at, TRUE);
1746
- posOptions.my = new CORNER(posOptions.my);
1747
-
1748
- // Destroy previous tooltip if overwrite is enabled, or skip element if not
1749
- if(elem.data(NAMESPACE)) {
1750
- if(config.overwrite) {
1751
- elem.qtip('destroy', true);
1752
- }
1753
- else if(config.overwrite === FALSE) {
1754
- return FALSE;
1755
- }
1756
- }
1757
-
1758
- // Add has-qtip attribute
1759
- elem.attr(ATTR_HAS, id);
1760
-
1761
- // Remove title attribute and store it if present
1762
- if(config.suppress && (title = elem.attr('title'))) {
1763
- // Final attr call fixes event delegatiom and IE default tooltip showing problem
1764
- elem.removeAttr('title').attr(oldtitle, title).attr('title', '');
1765
- }
1766
-
1767
- // Initialize the tooltip and add API reference
1768
- obj = new QTip(elem, config, id, !!attr);
1769
- elem.data(NAMESPACE, obj);
1770
-
1771
- return obj;
1772
- }
1773
-
1774
- // jQuery $.fn extension method
1775
- QTIP = $.fn.qtip = function(options, notation, newValue)
1776
- {
1777
- var command = ('' + options).toLowerCase(), // Parse command
1778
- returned = NULL,
1779
- args = $.makeArray(arguments).slice(1),
1780
- event = args[args.length - 1],
1781
- opts = this[0] ? $.data(this[0], NAMESPACE) : NULL;
1782
-
1783
- // Check for API request
1784
- if((!arguments.length && opts) || command === 'api') {
1785
- return opts;
1786
- }
1787
-
1788
- // Execute API command if present
1789
- else if('string' === typeof options) {
1790
- this.each(function() {
1791
- var api = $.data(this, NAMESPACE);
1792
- if(!api) { return TRUE; }
1793
-
1794
- // Cache the event if possible
1795
- if(event && event.timeStamp) { api.cache.event = event; }
1796
-
1797
- // Check for specific API commands
1798
- if(notation && (command === 'option' || command === 'options')) {
1799
- if(newValue !== undefined || $.isPlainObject(notation)) {
1800
- api.set(notation, newValue);
1801
- }
1802
- else {
1803
- returned = api.get(notation);
1804
- return FALSE;
1805
- }
1806
- }
1807
-
1808
- // Execute API command
1809
- else if(api[command]) {
1810
- api[command].apply(api, args);
1811
- }
1812
- });
1813
-
1814
- return returned !== NULL ? returned : this;
1815
- }
1816
-
1817
- // No API commands. validate provided options and setup qTips
1818
- else if('object' === typeof options || !arguments.length) {
1819
- // Sanitize options first
1820
- opts = sanitizeOptions($.extend(TRUE, {}, options));
1821
-
1822
- return this.each(function(i) {
1823
- var api, id;
1824
-
1825
- // Find next available ID, or use custom ID if provided
1826
- id = $.isArray(opts.id) ? opts.id[i] : opts.id;
1827
- id = !id || id === FALSE || id.length < 1 || QTIP.api[id] ? QTIP.nextid++ : id;
1828
-
1829
- // Initialize the qTip and re-grab newly sanitized options
1830
- api = init($(this), id, opts);
1831
- if(api === FALSE) { return TRUE; }
1832
- else { QTIP.api[id] = api; }
1833
-
1834
- // Initialize plugins
1835
- $.each(PLUGINS, function() {
1836
- if(this.initialize === 'initialize') { this(api); }
1837
- });
1838
-
1839
- // Assign initial pre-render events
1840
- api._assignInitialEvents(event);
1841
- });
1842
- }
1843
- };
1844
-
1845
- // Expose class
1846
- $.qtip = QTip;
1847
-
1848
- // Populated in render method
1849
- QTIP.api = {};
1850
- ;$.each({
1851
- /* Allow other plugins to successfully retrieve the title of an element with a qTip applied */
1852
- attr: function(attr, val) {
1853
- if(this.length) {
1854
- var self = this[0],
1855
- title = 'title',
1856
- api = $.data(self, 'qtip');
1857
-
1858
- if(attr === title && api && 'object' === typeof api && api.options.suppress) {
1859
- if(arguments.length < 2) {
1860
- return $.attr(self, oldtitle);
1861
- }
1862
-
1863
- // If qTip is rendered and title was originally used as content, update it
1864
- if(api && api.options.content.attr === title && api.cache.attr) {
1865
- api.set('content.text', val);
1866
- }
1867
-
1868
- // Use the regular attr method to set, then cache the result
1869
- return this.attr(oldtitle, val);
1870
- }
1871
- }
1872
-
1873
- return $.fn['attr'+replaceSuffix].apply(this, arguments);
1874
- },
1875
-
1876
- /* Allow clone to correctly retrieve cached title attributes */
1877
- clone: function(keepData) {
1878
- var titles = $([]), title = 'title',
1879
-
1880
- // Clone our element using the real clone method
1881
- elems = $.fn['clone'+replaceSuffix].apply(this, arguments);
1882
-
1883
- // Grab all elements with an oldtitle set, and change it to regular title attribute, if keepData is false
1884
- if(!keepData) {
1885
- elems.filter('['+oldtitle+']').attr('title', function() {
1886
- return $.attr(this, oldtitle);
1887
- })
1888
- .removeAttr(oldtitle);
1889
- }
1890
-
1891
- return elems;
1892
- }
1893
- }, function(name, func) {
1894
- if(!func || $.fn[name+replaceSuffix]) { return TRUE; }
1895
-
1896
- var old = $.fn[name+replaceSuffix] = $.fn[name];
1897
- $.fn[name] = function() {
1898
- return func.apply(this, arguments) || old.apply(this, arguments);
1899
- };
1900
- });
1901
-
1902
- /* Fire off 'removeqtip' handler in $.cleanData if jQuery UI not present (it already does similar).
1903
- * This snippet is taken directly from jQuery UI source code found here:
1904
- * http://code.jquery.com/ui/jquery-ui-git.js
1905
- */
1906
- if(!$.ui) {
1907
- $['cleanData'+replaceSuffix] = $.cleanData;
1908
- $.cleanData = function( elems ) {
1909
- for(var i = 0, elem; (elem = $( elems[i] )).length; i++) {
1910
- if(elem.attr(ATTR_HAS)) {
1911
- try { elem.triggerHandler('removeqtip'); }
1912
- catch( e ) {}
1913
- }
1914
- }
1915
- $['cleanData'+replaceSuffix].apply(this, arguments);
1916
- };
1917
- }
1918
- ;// qTip version
1919
- QTIP.version = '2.2.1';
1920
-
1921
- // Base ID for all qTips
1922
- QTIP.nextid = 0;
1923
-
1924
- // Inactive events array
1925
- QTIP.inactiveEvents = INACTIVE_EVENTS;
1926
-
1927
- // Base z-index for all qTips
1928
- QTIP.zindex = 15000;
1929
-
1930
- // Define configuration defaults
1931
- QTIP.defaults = {
1932
- prerender: FALSE,
1933
- id: FALSE,
1934
- overwrite: TRUE,
1935
- suppress: TRUE,
1936
- content: {
1937
- text: TRUE,
1938
- attr: 'title',
1939
- title: FALSE,
1940
- button: FALSE
1941
- },
1942
- position: {
1943
- my: 'top left',
1944
- at: 'bottom right',
1945
- target: FALSE,
1946
- container: FALSE,
1947
- viewport: FALSE,
1948
- adjust: {
1949
- x: 0, y: 0,
1950
- mouse: TRUE,
1951
- scroll: TRUE,
1952
- resize: TRUE,
1953
- method: 'flipinvert flipinvert'
1954
- },
1955
- effect: function(api, pos, viewport) {
1956
- $(this).animate(pos, {
1957
- duration: 200,
1958
- queue: FALSE
1959
- });
1960
- }
1961
- },
1962
- show: {
1963
- target: FALSE,
1964
- event: 'mouseenter',
1965
- effect: TRUE,
1966
- delay: 90,
1967
- solo: FALSE,
1968
- ready: FALSE,
1969
- autofocus: FALSE
1970
- },
1971
- hide: {
1972
- target: FALSE,
1973
- event: 'mouseleave',
1974
- effect: TRUE,
1975
- delay: 0,
1976
- fixed: FALSE,
1977
- inactive: FALSE,
1978
- leave: 'window',
1979
- distance: FALSE
1980
- },
1981
- style: {
1982
- classes: '',
1983
- widget: FALSE,
1984
- width: FALSE,
1985
- height: FALSE,
1986
- def: TRUE
1987
- },
1988
- events: {
1989
- render: NULL,
1990
- move: NULL,
1991
- show: NULL,
1992
- hide: NULL,
1993
- toggle: NULL,
1994
- visible: NULL,
1995
- hidden: NULL,
1996
- focus: NULL,
1997
- blur: NULL
1998
- }
1999
- };
2000
- ;var TIP,
2001
-
2002
- // .bind()/.on() namespace
2003
- TIPNS = '.qtip-tip',
2004
-
2005
- // Common CSS strings
2006
- MARGIN = 'margin',
2007
- BORDER = 'border',
2008
- COLOR = 'color',
2009
- BG_COLOR = 'background-color',
2010
- TRANSPARENT = 'transparent',
2011
- IMPORTANT = ' !important',
2012
-
2013
- // Check if the browser supports <canvas/> elements
2014
- HASCANVAS = !!document.createElement('canvas').getContext,
2015
-
2016
- // Invalid colour values used in parseColours()
2017
- INVALID = /rgba?\(0, 0, 0(, 0)?\)|transparent|#123456/i;
2018
-
2019
- // Camel-case method, taken from jQuery source
2020
- // http://code.jquery.com/jquery-1.8.0.js
2021
- function camel(s) { return s.charAt(0).toUpperCase() + s.slice(1); }
2022
-
2023
- /*
2024
- * Modified from Modernizr's testPropsAll()
2025
- * http://modernizr.com/downloads/modernizr-latest.js
2026
- */
2027
- var cssProps = {}, cssPrefixes = ["Webkit", "O", "Moz", "ms"];
2028
- function vendorCss(elem, prop) {
2029
- var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1),
2030
- props = (prop + ' ' + cssPrefixes.join(ucProp + ' ') + ucProp).split(' '),
2031
- cur, val, i = 0;
2032
-
2033
- // If the property has already been mapped...
2034
- if(cssProps[prop]) { return elem.css(cssProps[prop]); }
2035
-
2036
- while((cur = props[i++])) {
2037
- if((val = elem.css(cur)) !== undefined) {
2038
- return cssProps[prop] = cur, val;
2039
- }
2040
- }
2041
- }
2042
-
2043
- // Parse a given elements CSS property into an int
2044
- function intCss(elem, prop) {
2045
- return Math.ceil(parseFloat(vendorCss(elem, prop)));
2046
- }
2047
-
2048
-
2049
- // VML creation (for IE only)
2050
- if(!HASCANVAS) {
2051
- var createVML = function(tag, props, style) {
2052
- return '<qtipvml:'+tag+' xmlns="urn:schemas-microsoft.com:vml" class="qtip-vml" '+(props||'')+
2053
- ' style="behavior: url(#default#VML); '+(style||'')+ '" />';
2054
- };
2055
- }
2056
-
2057
- // Canvas only definitions
2058
- else {
2059
- var PIXEL_RATIO = window.devicePixelRatio || 1,
2060
- BACKING_STORE_RATIO = (function() {
2061
- var context = document.createElement('canvas').getContext('2d');
2062
- return context.backingStorePixelRatio || context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio ||
2063
- context.msBackingStorePixelRatio || context.oBackingStorePixelRatio || 1;
2064
- }()),
2065
- SCALE = PIXEL_RATIO / BACKING_STORE_RATIO;
2066
- }
2067
-
2068
-
2069
- function Tip(qtip, options) {
2070
- this._ns = 'tip';
2071
- this.options = options;
2072
- this.offset = options.offset;
2073
- this.size = [ options.width, options.height ];
2074
-
2075
- // Initialize
2076
- this.init( (this.qtip = qtip) );
2077
- }
2078
-
2079
- $.extend(Tip.prototype, {
2080
- init: function(qtip) {
2081
- var context, tip;
2082
-
2083
- // Create tip element and prepend to the tooltip
2084
- tip = this.element = qtip.elements.tip = $('<div />', { 'class': NAMESPACE+'-tip' }).prependTo(qtip.tooltip);
2085
-
2086
- // Create tip drawing element(s)
2087
- if(HASCANVAS) {
2088
- // save() as soon as we create the canvas element so FF2 doesn't bork on our first restore()!
2089
- context = $('<canvas />').appendTo(this.element)[0].getContext('2d');
2090
-
2091
- // Setup constant parameters
2092
- context.lineJoin = 'miter';
2093
- context.miterLimit = 100000;
2094
- context.save();
2095
- }
2096
- else {
2097
- context = createVML('shape', 'coordorigin="0,0"', 'position:absolute;');
2098
- this.element.html(context + context);
2099
-
2100
- // Prevent mousing down on the tip since it causes problems with .live() handling in IE due to VML
2101
- qtip._bind( $('*', tip).add(tip), ['click', 'mousedown'], function(event) { event.stopPropagation(); }, this._ns);
2102
- }
2103
-
2104
- // Bind update events
2105
- qtip._bind(qtip.tooltip, 'tooltipmove', this.reposition, this._ns, this);
2106
-
2107
- // Create it
2108
- this.create();
2109
- },
2110
-
2111
- _swapDimensions: function() {
2112
- this.size[0] = this.options.height;
2113
- this.size[1] = this.options.width;
2114
- },
2115
- _resetDimensions: function() {
2116
- this.size[0] = this.options.width;
2117
- this.size[1] = this.options.height;
2118
- },
2119
-
2120
- _useTitle: function(corner) {
2121
- var titlebar = this.qtip.elements.titlebar;
2122
- return titlebar && (
2123
- corner.y === TOP || (corner.y === CENTER && this.element.position().top + (this.size[1] / 2) + this.options.offset < titlebar.outerHeight(TRUE))
2124
- );
2125
- },
2126
-
2127
- _parseCorner: function(corner) {
2128
- var my = this.qtip.options.position.my;
2129
-
2130
- // Detect corner and mimic properties
2131
- if(corner === FALSE || my === FALSE) {
2132
- corner = FALSE;
2133
- }
2134
- else if(corner === TRUE) {
2135
- corner = new CORNER( my.string() );
2136
- }
2137
- else if(!corner.string) {
2138
- corner = new CORNER(corner);
2139
- corner.fixed = TRUE;
2140
- }
2141
-
2142
- return corner;
2143
- },
2144
-
2145
- _parseWidth: function(corner, side, use) {
2146
- var elements = this.qtip.elements,
2147
- prop = BORDER + camel(side) + 'Width';
2148
-
2149
- return (use ? intCss(use, prop) : (
2150
- intCss(elements.content, prop) ||
2151
- intCss(this._useTitle(corner) && elements.titlebar || elements.content, prop) ||
2152
- intCss(elements.tooltip, prop)
2153
- )) || 0;
2154
- },
2155
-
2156
- _parseRadius: function(corner) {
2157
- var elements = this.qtip.elements,
2158
- prop = BORDER + camel(corner.y) + camel(corner.x) + 'Radius';
2159
-
2160
- return BROWSER.ie < 9 ? 0 :
2161
- intCss(this._useTitle(corner) && elements.titlebar || elements.content, prop) ||
2162
- intCss(elements.tooltip, prop) || 0;
2163
- },
2164
-
2165
- _invalidColour: function(elem, prop, compare) {
2166
- var val = elem.css(prop);
2167
- return !val || (compare && val === elem.css(compare)) || INVALID.test(val) ? FALSE : val;
2168
- },
2169
-
2170
- _parseColours: function(corner) {
2171
- var elements = this.qtip.elements,
2172
- tip = this.element.css('cssText', ''),
2173
- borderSide = BORDER + camel(corner[ corner.precedance ]) + camel(COLOR),
2174
- colorElem = this._useTitle(corner) && elements.titlebar || elements.content,
2175
- css = this._invalidColour, color = [];
2176
-
2177
- // Attempt to detect the background colour from various elements, left-to-right precedance
2178
- color[0] = css(tip, BG_COLOR) || css(colorElem, BG_COLOR) || css(elements.content, BG_COLOR) ||
2179
- css(elements.tooltip, BG_COLOR) || tip.css(BG_COLOR);
2180
-
2181
- // Attempt to detect the correct border side colour from various elements, left-to-right precedance
2182
- color[1] = css(tip, borderSide, COLOR) || css(colorElem, borderSide, COLOR) ||
2183
- css(elements.content, borderSide, COLOR) || css(elements.tooltip, borderSide, COLOR) || elements.tooltip.css(borderSide);
2184
-
2185
- // Reset background and border colours
2186
- $('*', tip).add(tip).css('cssText', BG_COLOR+':'+TRANSPARENT+IMPORTANT+';'+BORDER+':0'+IMPORTANT+';');
2187
-
2188
- return color;
2189
- },
2190
-
2191
- _calculateSize: function(corner) {
2192
- var y = corner.precedance === Y,
2193
- width = this.options['width'],
2194
- height = this.options['height'],
2195
- isCenter = corner.abbrev() === 'c',
2196
- base = (y ? width: height) * (isCenter ? 0.5 : 1),
2197
- pow = Math.pow,
2198
- round = Math.round,
2199
- bigHyp, ratio, result,
2200
-
2201
- smallHyp = Math.sqrt( pow(base, 2) + pow(height, 2) ),
2202
- hyp = [ (this.border / base) * smallHyp, (this.border / height) * smallHyp ];
2203
-
2204
- hyp[2] = Math.sqrt( pow(hyp[0], 2) - pow(this.border, 2) );
2205
- hyp[3] = Math.sqrt( pow(hyp[1], 2) - pow(this.border, 2) );
2206
-
2207
- bigHyp = smallHyp + hyp[2] + hyp[3] + (isCenter ? 0 : hyp[0]);
2208
- ratio = bigHyp / smallHyp;
2209
-
2210
- result = [ round(ratio * width), round(ratio * height) ];
2211
- return y ? result : result.reverse();
2212
- },
2213
-
2214
- // Tip coordinates calculator
2215
- _calculateTip: function(corner, size, scale) {
2216
- scale = scale || 1;
2217
- size = size || this.size;
2218
-
2219
- var width = size[0] * scale,
2220
- height = size[1] * scale,
2221
- width2 = Math.ceil(width / 2), height2 = Math.ceil(height / 2),
2222
-
2223
- // Define tip coordinates in terms of height and width values
2224
- tips = {
2225
- br: [0,0, width,height, width,0],
2226
- bl: [0,0, width,0, 0,height],
2227
- tr: [0,height, width,0, width,height],
2228
- tl: [0,0, 0,height, width,height],
2229
- tc: [0,height, width2,0, width,height],
2230
- bc: [0,0, width,0, width2,height],
2231
- rc: [0,0, width,height2, 0,height],
2232
- lc: [width,0, width,height, 0,height2]
2233
- };
2234
-
2235
- // Set common side shapes
2236
- tips.lt = tips.br; tips.rt = tips.bl;
2237
- tips.lb = tips.tr; tips.rb = tips.tl;
2238
-
2239
- return tips[ corner.abbrev() ];
2240
- },
2241
-
2242
- // Tip coordinates drawer (canvas)
2243
- _drawCoords: function(context, coords) {
2244
- context.beginPath();
2245
- context.moveTo(coords[0], coords[1]);
2246
- context.lineTo(coords[2], coords[3]);
2247
- context.lineTo(coords[4], coords[5]);
2248
- context.closePath();
2249
- },
2250
-
2251
- create: function() {
2252
- // Determine tip corner
2253
- var c = this.corner = (HASCANVAS || BROWSER.ie) && this._parseCorner(this.options.corner);
2254
-
2255
- // If we have a tip corner...
2256
- if( (this.enabled = !!this.corner && this.corner.abbrev() !== 'c') ) {
2257
- // Cache it
2258
- this.qtip.cache.corner = c.clone();
2259
-
2260
- // Create it
2261
- this.update();
2262
- }
2263
-
2264
- // Toggle tip element
2265
- this.element.toggle(this.enabled);
2266
-
2267
- return this.corner;
2268
- },
2269
-
2270
- update: function(corner, position) {
2271
- if(!this.enabled) { return this; }
2272
-
2273
- var elements = this.qtip.elements,
2274
- tip = this.element,
2275
- inner = tip.children(),
2276
- options = this.options,
2277
- curSize = this.size,
2278
- mimic = options.mimic,
2279
- round = Math.round,
2280
- color, precedance, context,
2281
- coords, bigCoords, translate, newSize, border, BACKING_STORE_RATIO;
2282
-
2283
- // Re-determine tip if not already set
2284
- if(!corner) { corner = this.qtip.cache.corner || this.corner; }
2285
-
2286
- // Use corner property if we detect an invalid mimic value
2287
- if(mimic === FALSE) { mimic = corner; }
2288
-
2289
- // Otherwise inherit mimic properties from the corner object as necessary
2290
- else {
2291
- mimic = new CORNER(mimic);
2292
- mimic.precedance = corner.precedance;
2293
-
2294
- if(mimic.x === 'inherit') { mimic.x = corner.x; }
2295
- else if(mimic.y === 'inherit') { mimic.y = corner.y; }
2296
- else if(mimic.x === mimic.y) {
2297
- mimic[ corner.precedance ] = corner[ corner.precedance ];
2298
- }
2299
- }
2300
- precedance = mimic.precedance;
2301
-
2302
- // Ensure the tip width.height are relative to the tip position
2303
- if(corner.precedance === X) { this._swapDimensions(); }
2304
- else { this._resetDimensions(); }
2305
-
2306
- // Update our colours
2307
- color = this.color = this._parseColours(corner);
2308
-
2309
- // Detect border width, taking into account colours
2310
- if(color[1] !== TRANSPARENT) {
2311
- // Grab border width
2312
- border = this.border = this._parseWidth(corner, corner[corner.precedance]);
2313
-
2314
- // If border width isn't zero, use border color as fill if it's not invalid (1.0 style tips)
2315
- if(options.border && border < 1 && !INVALID.test(color[1])) { color[0] = color[1]; }
2316
-
2317
- // Set border width (use detected border width if options.border is true)
2318
- this.border = border = options.border !== TRUE ? options.border : border;
2319
- }
2320
-
2321
- // Border colour was invalid, set border to zero
2322
- else { this.border = border = 0; }
2323
-
2324
- // Determine tip size
2325
- newSize = this.size = this._calculateSize(corner);
2326
- tip.css({
2327
- width: newSize[0],
2328
- height: newSize[1],
2329
- lineHeight: newSize[1]+'px'
2330
- });
2331
-
2332
- // Calculate tip translation
2333
- if(corner.precedance === Y) {
2334
- translate = [
2335
- round(mimic.x === LEFT ? border : mimic.x === RIGHT ? newSize[0] - curSize[0] - border : (newSize[0] - curSize[0]) / 2),
2336
- round(mimic.y === TOP ? newSize[1] - curSize[1] : 0)
2337
- ];
2338
- }
2339
- else {
2340
- translate = [
2341
- round(mimic.x === LEFT ? newSize[0] - curSize[0] : 0),
2342
- round(mimic.y === TOP ? border : mimic.y === BOTTOM ? newSize[1] - curSize[1] - border : (newSize[1] - curSize[1]) / 2)
2343
- ];
2344
- }
2345
-
2346
- // Canvas drawing implementation
2347
- if(HASCANVAS) {
2348
- // Grab canvas context and clear/save it
2349
- context = inner[0].getContext('2d');
2350
- context.restore(); context.save();
2351
- context.clearRect(0,0,6000,6000);
2352
-
2353
- // Calculate coordinates
2354
- coords = this._calculateTip(mimic, curSize, SCALE);
2355
- bigCoords = this._calculateTip(mimic, this.size, SCALE);
2356
-
2357
- // Set the canvas size using calculated size
2358
- inner.attr(WIDTH, newSize[0] * SCALE).attr(HEIGHT, newSize[1] * SCALE);
2359
- inner.css(WIDTH, newSize[0]).css(HEIGHT, newSize[1]);
2360
-
2361
- // Draw the outer-stroke tip
2362
- this._drawCoords(context, bigCoords);
2363
- context.fillStyle = color[1];
2364
- context.fill();
2365
-
2366
- // Draw the actual tip
2367
- context.translate(translate[0] * SCALE, translate[1] * SCALE);
2368
- this._drawCoords(context, coords);
2369
- context.fillStyle = color[0];
2370
- context.fill();
2371
- }
2372
-
2373
- // VML (IE Proprietary implementation)
2374
- else {
2375
- // Calculate coordinates
2376
- coords = this._calculateTip(mimic);
2377
-
2378
- // Setup coordinates string
2379
- coords = 'm' + coords[0] + ',' + coords[1] + ' l' + coords[2] +
2380
- ',' + coords[3] + ' ' + coords[4] + ',' + coords[5] + ' xe';
2381
-
2382
- // Setup VML-specific offset for pixel-perfection
2383
- translate[2] = border && /^(r|b)/i.test(corner.string()) ?
2384
- BROWSER.ie === 8 ? 2 : 1 : 0;
2385
-
2386
- // Set initial CSS
2387
- inner.css({
2388
- coordsize: (newSize[0]+border) + ' ' + (newSize[1]+border),
2389
- antialias: ''+(mimic.string().indexOf(CENTER) > -1),
2390
- left: translate[0] - (translate[2] * Number(precedance === X)),
2391
- top: translate[1] - (translate[2] * Number(precedance === Y)),
2392
- width: newSize[0] + border,
2393
- height: newSize[1] + border
2394
- })
2395
- .each(function(i) {
2396
- var $this = $(this);
2397
-
2398
- // Set shape specific attributes
2399
- $this[ $this.prop ? 'prop' : 'attr' ]({
2400
- coordsize: (newSize[0]+border) + ' ' + (newSize[1]+border),
2401
- path: coords,
2402
- fillcolor: color[0],
2403
- filled: !!i,
2404
- stroked: !i
2405
- })
2406
- .toggle(!!(border || i));
2407
-
2408
- // Check if border is enabled and add stroke element
2409
- !i && $this.html( createVML(
2410
- 'stroke', 'weight="'+(border*2)+'px" color="'+color[1]+'" miterlimit="1000" joinstyle="miter"'
2411
- ) );
2412
- });
2413
- }
2414
-
2415
- // Opera bug #357 - Incorrect tip position
2416
- // https://github.com/Craga89/qTip2/issues/367
2417
- window.opera && setTimeout(function() {
2418
- elements.tip.css({
2419
- display: 'inline-block',
2420
- visibility: 'visible'
2421
- });
2422
- }, 1);
2423
-
2424
- // Position if needed
2425
- if(position !== FALSE) { this.calculate(corner, newSize); }
2426
- },
2427
-
2428
- calculate: function(corner, size) {
2429
- if(!this.enabled) { return FALSE; }
2430
-
2431
- var self = this,
2432
- elements = this.qtip.elements,
2433
- tip = this.element,
2434
- userOffset = this.options.offset,
2435
- isWidget = elements.tooltip.hasClass('ui-widget'),
2436
- position = { },
2437
- precedance, corners;
2438
-
2439
- // Inherit corner if not provided
2440
- corner = corner || this.corner;
2441
- precedance = corner.precedance;
2442
-
2443
- // Determine which tip dimension to use for adjustment
2444
- size = size || this._calculateSize(corner);
2445
-
2446
- // Setup corners and offset array
2447
- corners = [ corner.x, corner.y ];
2448
- if(precedance === X) { corners.reverse(); }
2449
-
2450
- // Calculate tip position
2451
- $.each(corners, function(i, side) {
2452
- var b, bc, br;
2453
-
2454
- if(side === CENTER) {
2455
- b = precedance === Y ? LEFT : TOP;
2456
- position[ b ] = '50%';
2457
- position[MARGIN+'-' + b] = -Math.round(size[ precedance === Y ? 0 : 1 ] / 2) + userOffset;
2458
- }
2459
- else {
2460
- b = self._parseWidth(corner, side, elements.tooltip);
2461
- bc = self._parseWidth(corner, side, elements.content);
2462
- br = self._parseRadius(corner);
2463
-
2464
- position[ side ] = Math.max(-self.border, i ? bc : (userOffset + (br > b ? br : -b)));
2465
- }
2466
- });
2467
-
2468
- // Adjust for tip size
2469
- position[ corner[precedance] ] -= size[ precedance === X ? 0 : 1 ];
2470
-
2471
- // Set and return new position
2472
- tip.css({ margin: '', top: '', bottom: '', left: '', right: '' }).css(position);
2473
- return position;
2474
- },
2475
-
2476
- reposition: function(event, api, pos, viewport) {
2477
- if(!this.enabled) { return; }
2478
-
2479
- var cache = api.cache,
2480
- newCorner = this.corner.clone(),
2481
- adjust = pos.adjusted,
2482
- method = api.options.position.adjust.method.split(' '),
2483
- horizontal = method[0],
2484
- vertical = method[1] || method[0],
2485
- shift = { left: FALSE, top: FALSE, x: 0, y: 0 },
2486
- offset, css = {}, props;
2487
-
2488
- function shiftflip(direction, precedance, popposite, side, opposite) {
2489
- // Horizontal - Shift or flip method
2490
- if(direction === SHIFT && newCorner.precedance === precedance && adjust[side] && newCorner[popposite] !== CENTER) {
2491
- newCorner.precedance = newCorner.precedance === X ? Y : X;
2492
- }
2493
- else if(direction !== SHIFT && adjust[side]){
2494
- newCorner[precedance] = newCorner[precedance] === CENTER ?
2495
- (adjust[side] > 0 ? side : opposite) : (newCorner[precedance] === side ? opposite : side);
2496
- }
2497
- }
2498
-
2499
- function shiftonly(xy, side, opposite) {
2500
- if(newCorner[xy] === CENTER) {
2501
- css[MARGIN+'-'+side] = shift[xy] = offset[MARGIN+'-'+side] - adjust[side];
2502
- }
2503
- else {
2504
- props = offset[opposite] !== undefined ?
2505
- [ adjust[side], -offset[side] ] : [ -adjust[side], offset[side] ];
2506
-
2507
- if( (shift[xy] = Math.max(props[0], props[1])) > props[0] ) {
2508
- pos[side] -= adjust[side];
2509
- shift[side] = FALSE;
2510
- }
2511
-
2512
- css[ offset[opposite] !== undefined ? opposite : side ] = shift[xy];
2513
- }
2514
- }
2515
-
2516
- // If our tip position isn't fixed e.g. doesn't adjust with viewport...
2517
- if(this.corner.fixed !== TRUE) {
2518
- // Perform shift/flip adjustments
2519
- shiftflip(horizontal, X, Y, LEFT, RIGHT);
2520
- shiftflip(vertical, Y, X, TOP, BOTTOM);
2521
-
2522
- // Update and redraw the tip if needed (check cached details of last drawn tip)
2523
- if(newCorner.string() !== cache.corner.string() || cache.cornerTop !== adjust.top || cache.cornerLeft !== adjust.left) {
2524
- this.update(newCorner, FALSE);
2525
- }
2526
- }
2527
-
2528
- // Setup tip offset properties
2529
- offset = this.calculate(newCorner);
2530
-
2531
- // Readjust offset object to make it left/top
2532
- if(offset.right !== undefined) { offset.left = -offset.right; }
2533
- if(offset.bottom !== undefined) { offset.top = -offset.bottom; }
2534
- offset.user = this.offset;
2535
-
2536
- // Perform shift adjustments
2537
- if(shift.left = (horizontal === SHIFT && !!adjust.left)) { shiftonly(X, LEFT, RIGHT); }
2538
- if(shift.top = (vertical === SHIFT && !!adjust.top)) { shiftonly(Y, TOP, BOTTOM); }
2539
-
2540
- /*
2541
- * If the tip is adjusted in both dimensions, or in a
2542
- * direction that would cause it to be anywhere but the
2543
- * outer border, hide it!
2544
- */
2545
- this.element.css(css).toggle(
2546
- !((shift.x && shift.y) || (newCorner.x === CENTER && shift.y) || (newCorner.y === CENTER && shift.x))
2547
- );
2548
-
2549
- // Adjust position to accomodate tip dimensions
2550
- pos.left -= offset.left.charAt ? offset.user :
2551
- horizontal !== SHIFT || shift.top || !shift.left && !shift.top ? offset.left + this.border : 0;
2552
- pos.top -= offset.top.charAt ? offset.user :
2553
- vertical !== SHIFT || shift.left || !shift.left && !shift.top ? offset.top + this.border : 0;
2554
-
2555
- // Cache details
2556
- cache.cornerLeft = adjust.left; cache.cornerTop = adjust.top;
2557
- cache.corner = newCorner.clone();
2558
- },
2559
-
2560
- destroy: function() {
2561
- // Unbind events
2562
- this.qtip._unbind(this.qtip.tooltip, this._ns);
2563
-
2564
- // Remove the tip element(s)
2565
- if(this.qtip.elements.tip) {
2566
- this.qtip.elements.tip.find('*')
2567
- .remove().end().remove();
2568
- }
2569
- }
2570
- });
2571
-
2572
- TIP = PLUGINS.tip = function(api) {
2573
- return new Tip(api, api.options.style.tip);
2574
- };
2575
-
2576
- // Initialize tip on render
2577
- TIP.initialize = 'render';
2578
-
2579
- // Setup plugin sanitization options
2580
- TIP.sanitize = function(options) {
2581
- if(options.style && 'tip' in options.style) {
2582
- var opts = options.style.tip;
2583
- if(typeof opts !== 'object') { opts = options.style.tip = { corner: opts }; }
2584
- if(!(/string|boolean/i).test(typeof opts.corner)) { opts.corner = TRUE; }
2585
- }
2586
- };
2587
-
2588
- // Add new option checks for the plugin
2589
- CHECKS.tip = {
2590
- '^position.my|style.tip.(corner|mimic|border)$': function() {
2591
- // Make sure a tip can be drawn
2592
- this.create();
2593
-
2594
- // Reposition the tooltip
2595
- this.qtip.reposition();
2596
- },
2597
- '^style.tip.(height|width)$': function(obj) {
2598
- // Re-set dimensions and redraw the tip
2599
- this.size = [ obj.width, obj.height ];
2600
- this.update();
2601
-
2602
- // Reposition the tooltip
2603
- this.qtip.reposition();
2604
- },
2605
- '^content.title|style.(classes|widget)$': function() {
2606
- this.update();
2607
- }
2608
- };
2609
-
2610
- // Extend original qTip defaults
2611
- $.extend(TRUE, QTIP.defaults, {
2612
- style: {
2613
- tip: {
2614
- corner: TRUE,
2615
- mimic: FALSE,
2616
- width: 6,
2617
- height: 6,
2618
- border: TRUE,
2619
- offset: 0
2620
- }
2621
- }
2622
- });
2623
- ;PLUGINS.viewport = function(api, position, posOptions, targetWidth, targetHeight, elemWidth, elemHeight)
2624
- {
2625
- var target = posOptions.target,
2626
- tooltip = api.elements.tooltip,
2627
- my = posOptions.my,
2628
- at = posOptions.at,
2629
- adjust = posOptions.adjust,
2630
- method = adjust.method.split(' '),
2631
- methodX = method[0],
2632
- methodY = method[1] || method[0],
2633
- viewport = posOptions.viewport,
2634
- container = posOptions.container,
2635
- cache = api.cache,
2636
- adjusted = { left: 0, top: 0 },
2637
- fixed, newMy, containerOffset, containerStatic,
2638
- viewportWidth, viewportHeight, viewportScroll, viewportOffset;
2639
-
2640
- // If viewport is not a jQuery element, or it's the window/document, or no adjustment method is used... return
2641
- if(!viewport.jquery || target[0] === window || target[0] === document.body || adjust.method === 'none') {
2642
- return adjusted;
2643
- }
2644
-
2645
- // Cach container details
2646
- containerOffset = container.offset() || adjusted;
2647
- containerStatic = container.css('position') === 'static';
2648
-
2649
- // Cache our viewport details
2650
- fixed = tooltip.css('position') === 'fixed';
2651
- viewportWidth = viewport[0] === window ? viewport.width() : viewport.outerWidth(FALSE);
2652
- viewportHeight = viewport[0] === window ? viewport.height() : viewport.outerHeight(FALSE);
2653
- viewportScroll = { left: fixed ? 0 : viewport.scrollLeft(), top: fixed ? 0 : viewport.scrollTop() };
2654
- viewportOffset = viewport.offset() || adjusted;
2655
-
2656
- // Generic calculation method
2657
- function calculate(side, otherSide, type, adjust, side1, side2, lengthName, targetLength, elemLength) {
2658
- var initialPos = position[side1],
2659
- mySide = my[side],
2660
- atSide = at[side],
2661
- isShift = type === SHIFT,
2662
- myLength = mySide === side1 ? elemLength : mySide === side2 ? -elemLength : -elemLength / 2,
2663
- atLength = atSide === side1 ? targetLength : atSide === side2 ? -targetLength : -targetLength / 2,
2664
- sideOffset = viewportScroll[side1] + viewportOffset[side1] - (containerStatic ? 0 : containerOffset[side1]),
2665
- overflow1 = sideOffset - initialPos,
2666
- overflow2 = initialPos + elemLength - (lengthName === WIDTH ? viewportWidth : viewportHeight) - sideOffset,
2667
- offset = myLength - (my.precedance === side || mySide === my[otherSide] ? atLength : 0) - (atSide === CENTER ? targetLength / 2 : 0);
2668
-
2669
- // shift
2670
- if(isShift) {
2671
- offset = (mySide === side1 ? 1 : -1) * myLength;
2672
-
2673
- // Adjust position but keep it within viewport dimensions
2674
- position[side1] += overflow1 > 0 ? overflow1 : overflow2 > 0 ? -overflow2 : 0;
2675
- position[side1] = Math.max(
2676
- -containerOffset[side1] + viewportOffset[side1],
2677
- initialPos - offset,
2678
- Math.min(
2679
- Math.max(
2680
- -containerOffset[side1] + viewportOffset[side1] + (lengthName === WIDTH ? viewportWidth : viewportHeight),
2681
- initialPos + offset
2682
- ),
2683
- position[side1],
2684
-
2685
- // Make sure we don't adjust complete off the element when using 'center'
2686
- mySide === 'center' ? initialPos - myLength : 1E9
2687
- )
2688
- );
2689
-
2690
- }
2691
-
2692
- // flip/flipinvert
2693
- else {
2694
- // Update adjustment amount depending on if using flipinvert or flip
2695
- adjust *= (type === FLIPINVERT ? 2 : 0);
2696
-
2697
- // Check for overflow on the left/top
2698
- if(overflow1 > 0 && (mySide !== side1 || overflow2 > 0)) {
2699
- position[side1] -= offset + adjust;
2700
- newMy.invert(side, side1);
2701
- }
2702
-
2703
- // Check for overflow on the bottom/right
2704
- else if(overflow2 > 0 && (mySide !== side2 || overflow1 > 0) ) {
2705
- position[side1] -= (mySide === CENTER ? -offset : offset) + adjust;
2706
- newMy.invert(side, side2);
2707
- }
2708
-
2709
- // Make sure we haven't made things worse with the adjustment and reset if so
2710
- if(position[side1] < viewportScroll && -position[side1] > overflow2) {
2711
- position[side1] = initialPos; newMy = my.clone();
2712
- }
2713
- }
2714
-
2715
- return position[side1] - initialPos;
2716
- }
2717
-
2718
- // Set newMy if using flip or flipinvert methods
2719
- if(methodX !== 'shift' || methodY !== 'shift') { newMy = my.clone(); }
2720
-
2721
- // Adjust position based onviewport and adjustment options
2722
- adjusted = {
2723
- left: methodX !== 'none' ? calculate( X, Y, methodX, adjust.x, LEFT, RIGHT, WIDTH, targetWidth, elemWidth ) : 0,
2724
- top: methodY !== 'none' ? calculate( Y, X, methodY, adjust.y, TOP, BOTTOM, HEIGHT, targetHeight, elemHeight ) : 0,
2725
- my: newMy
2726
- };
2727
-
2728
- return adjusted;
2729
- };
2730
- ;PLUGINS.polys = {
2731
- // POLY area coordinate calculator
2732
- // Special thanks to Ed Cradock for helping out with this.
2733
- // Uses a binary search algorithm to find suitable coordinates.
2734
- polygon: function(baseCoords, corner) {
2735
- var result = {
2736
- width: 0, height: 0,
2737
- position: {
2738
- top: 1e10, right: 0,
2739
- bottom: 0, left: 1e10
2740
- },
2741
- adjustable: FALSE
2742
- },
2743
- i = 0, next,
2744
- coords = [],
2745
- compareX = 1, compareY = 1,
2746
- realX = 0, realY = 0,
2747
- newWidth, newHeight;
2748
-
2749
- // First pass, sanitize coords and determine outer edges
2750
- i = baseCoords.length; while(i--) {
2751
- next = [ parseInt(baseCoords[--i], 10), parseInt(baseCoords[i+1], 10) ];
2752
-
2753
- if(next[0] > result.position.right){ result.position.right = next[0]; }
2754
- if(next[0] < result.position.left){ result.position.left = next[0]; }
2755
- if(next[1] > result.position.bottom){ result.position.bottom = next[1]; }
2756
- if(next[1] < result.position.top){ result.position.top = next[1]; }
2757
-
2758
- coords.push(next);
2759
- }
2760
-
2761
- // Calculate height and width from outer edges
2762
- newWidth = result.width = Math.abs(result.position.right - result.position.left);
2763
- newHeight = result.height = Math.abs(result.position.bottom - result.position.top);
2764
-
2765
- // If it's the center corner...
2766
- if(corner.abbrev() === 'c') {
2767
- result.position = {
2768
- left: result.position.left + (result.width / 2),
2769
- top: result.position.top + (result.height / 2)
2770
- };
2771
- }
2772
- else {
2773
- // Second pass, use a binary search algorithm to locate most suitable coordinate
2774
- while(newWidth > 0 && newHeight > 0 && compareX > 0 && compareY > 0)
2775
- {
2776
- newWidth = Math.floor(newWidth / 2);
2777
- newHeight = Math.floor(newHeight / 2);
2778
-
2779
- if(corner.x === LEFT){ compareX = newWidth; }
2780
- else if(corner.x === RIGHT){ compareX = result.width - newWidth; }
2781
- else{ compareX += Math.floor(newWidth / 2); }
2782
-
2783
- if(corner.y === TOP){ compareY = newHeight; }
2784
- else if(corner.y === BOTTOM){ compareY = result.height - newHeight; }
2785
- else{ compareY += Math.floor(newHeight / 2); }
2786
-
2787
- i = coords.length; while(i--)
2788
- {
2789
- if(coords.length < 2){ break; }
2790
-
2791
- realX = coords[i][0] - result.position.left;
2792
- realY = coords[i][1] - result.position.top;
2793
-
2794
- if((corner.x === LEFT && realX >= compareX) ||
2795
- (corner.x === RIGHT && realX <= compareX) ||
2796
- (corner.x === CENTER && (realX < compareX || realX > (result.width - compareX))) ||
2797
- (corner.y === TOP && realY >= compareY) ||
2798
- (corner.y === BOTTOM && realY <= compareY) ||
2799
- (corner.y === CENTER && (realY < compareY || realY > (result.height - compareY)))) {
2800
- coords.splice(i, 1);
2801
- }
2802
- }
2803
- }
2804
- result.position = { left: coords[0][0], top: coords[0][1] };
2805
- }
2806
-
2807
- return result;
2808
- },
2809
-
2810
- rect: function(ax, ay, bx, by) {
2811
- return {
2812
- width: Math.abs(bx - ax),
2813
- height: Math.abs(by - ay),
2814
- position: {
2815
- left: Math.min(ax, bx),
2816
- top: Math.min(ay, by)
2817
- }
2818
- };
2819
- },
2820
-
2821
- _angles: {
2822
- tc: 3 / 2, tr: 7 / 4, tl: 5 / 4,
2823
- bc: 1 / 2, br: 1 / 4, bl: 3 / 4,
2824
- rc: 2, lc: 1, c: 0
2825
- },
2826
- ellipse: function(cx, cy, rx, ry, corner) {
2827
- var c = PLUGINS.polys._angles[ corner.abbrev() ],
2828
- rxc = c === 0 ? 0 : rx * Math.cos( c * Math.PI ),
2829
- rys = ry * Math.sin( c * Math.PI );
2830
-
2831
- return {
2832
- width: (rx * 2) - Math.abs(rxc),
2833
- height: (ry * 2) - Math.abs(rys),
2834
- position: {
2835
- left: cx + rxc,
2836
- top: cy + rys
2837
- },
2838
- adjustable: FALSE
2839
- };
2840
- },
2841
- circle: function(cx, cy, r, corner) {
2842
- return PLUGINS.polys.ellipse(cx, cy, r, r, corner);
2843
- }
2844
- };
2845
- ;PLUGINS.imagemap = function(api, area, corner, adjustMethod)
2846
- {
2847
- if(!area.jquery) { area = $(area); }
2848
-
2849
- var shape = (area.attr('shape') || 'rect').toLowerCase().replace('poly', 'polygon'),
2850
- image = $('img[usemap="#'+area.parent('map').attr('name')+'"]'),
2851
- coordsString = $.trim(area.attr('coords')),
2852
- coordsArray = coordsString.replace(/,$/, '').split(','),
2853
- imageOffset, coords, i, next, result, len;
2854
-
2855
- // If we can't find the image using the map...
2856
- if(!image.length) { return FALSE; }
2857
-
2858
- // Pass coordinates string if polygon
2859
- if(shape === 'polygon') {
2860
- result = PLUGINS.polys.polygon(coordsArray, corner);
2861
- }
2862
-
2863
- // Otherwise parse the coordinates and pass them as arguments
2864
- else if(PLUGINS.polys[shape]) {
2865
- for(i = -1, len = coordsArray.length, coords = []; ++i < len;) {
2866
- coords.push( parseInt(coordsArray[i], 10) );
2867
- }
2868
-
2869
- result = PLUGINS.polys[shape].apply(
2870
- this, coords.concat(corner)
2871
- );
2872
- }
2873
-
2874
- // If no shapre calculation method was found, return false
2875
- else { return FALSE; }
2876
-
2877
- // Make sure we account for padding and borders on the image
2878
- imageOffset = image.offset();
2879
- imageOffset.left += Math.ceil((image.outerWidth(FALSE) - image.width()) / 2);
2880
- imageOffset.top += Math.ceil((image.outerHeight(FALSE) - image.height()) / 2);
2881
-
2882
- // Add image position to offset coordinates
2883
- result.position.left += imageOffset.left;
2884
- result.position.top += imageOffset.top;
2885
-
2886
- return result;
2887
- };
2888
- ;PLUGINS.svg = function(api, svg, corner)
2889
- {
2890
- var doc = $(document),
2891
- elem = svg[0],
2892
- root = $(elem.ownerSVGElement),
2893
- ownerDocument = elem.ownerDocument,
2894
- strokeWidth2 = (parseInt(svg.css('stroke-width'), 10) || 0) / 2,
2895
- frameOffset, mtx, transformed, viewBox,
2896
- len, next, i, points,
2897
- result, position, dimensions;
2898
-
2899
- // Ascend the parentNode chain until we find an element with getBBox()
2900
- while(!elem.getBBox) { elem = elem.parentNode; }
2901
- if(!elem.getBBox || !elem.parentNode) { return FALSE; }
2902
-
2903
- // Determine which shape calculation to use
2904
- switch(elem.nodeName) {
2905
- case 'ellipse':
2906
- case 'circle':
2907
- result = PLUGINS.polys.ellipse(
2908
- elem.cx.baseVal.value,
2909
- elem.cy.baseVal.value,
2910
- (elem.rx || elem.r).baseVal.value + strokeWidth2,
2911
- (elem.ry || elem.r).baseVal.value + strokeWidth2,
2912
- corner
2913
- );
2914
- break;
2915
-
2916
- case 'line':
2917
- case 'polygon':
2918
- case 'polyline':
2919
- // Determine points object (line has none, so mimic using array)
2920
- points = elem.points || [
2921
- { x: elem.x1.baseVal.value, y: elem.y1.baseVal.value },
2922
- { x: elem.x2.baseVal.value, y: elem.y2.baseVal.value }
2923
- ];
2924
-
2925
- for(result = [], i = -1, len = points.numberOfItems || points.length; ++i < len;) {
2926
- next = points.getItem ? points.getItem(i) : points[i];
2927
- result.push.apply(result, [next.x, next.y]);
2928
- }
2929
-
2930
- result = PLUGINS.polys.polygon(result, corner);
2931
- break;
2932
-
2933
- // Unknown shape or rectangle? Use bounding box
2934
- default:
2935
- result = elem.getBBox();
2936
- result = {
2937
- width: result.width,
2938
- height: result.height,
2939
- position: {
2940
- left: result.x,
2941
- top: result.y
2942
- }
2943
- };
2944
- break;
2945
- }
2946
-
2947
- // Shortcut assignments
2948
- position = result.position;
2949
- root = root[0];
2950
-
2951
- // Convert position into a pixel value
2952
- if(root.createSVGPoint) {
2953
- mtx = elem.getScreenCTM();
2954
- points = root.createSVGPoint();
2955
-
2956
- points.x = position.left;
2957
- points.y = position.top;
2958
- transformed = points.matrixTransform( mtx );
2959
- position.left = transformed.x;
2960
- position.top = transformed.y;
2961
- }
2962
-
2963
- // Check the element is not in a child document, and if so, adjust for frame elements offset
2964
- if(ownerDocument !== document && api.position.target !== 'mouse') {
2965
- frameOffset = $((ownerDocument.defaultView || ownerDocument.parentWindow).frameElement).offset();
2966
- if(frameOffset) {
2967
- position.left += frameOffset.left;
2968
- position.top += frameOffset.top;
2969
- }
2970
- }
2971
-
2972
- // Adjust by scroll offset of owner document
2973
- ownerDocument = $(ownerDocument);
2974
- position.left += ownerDocument.scrollLeft();
2975
- position.top += ownerDocument.scrollTop();
2976
-
2977
- return result;
2978
- };
2979
- ;var MODAL, OVERLAY,
2980
- MODALCLASS = 'qtip-modal',
2981
- MODALSELECTOR = '.'+MODALCLASS;
2982
-
2983
- OVERLAY = function()
2984
- {
2985
- var self = this,
2986
- focusableElems = {},
2987
- current, onLast,
2988
- prevState, elem;
2989
-
2990
- // Modified code from jQuery UI 1.10.0 source
2991
- // http://code.jquery.com/ui/1.10.0/jquery-ui.js
2992
- function focusable(element) {
2993
- // Use the defined focusable checker when possible
2994
- if($.expr[':'].focusable) { return $.expr[':'].focusable; }
2995
-
2996
- var isTabIndexNotNaN = !isNaN($.attr(element, 'tabindex')),
2997
- nodeName = element.nodeName && element.nodeName.toLowerCase(),
2998
- map, mapName, img;
2999
-
3000
- if('area' === nodeName) {
3001
- map = element.parentNode;
3002
- mapName = map.name;
3003
- if(!element.href || !mapName || map.nodeName.toLowerCase() !== 'map') {
3004
- return false;
3005
- }
3006
- img = $('img[usemap=#' + mapName + ']')[0];
3007
- return !!img && img.is(':visible');
3008
- }
3009
- return (/input|select|textarea|button|object/.test( nodeName ) ?
3010
- !element.disabled :
3011
- 'a' === nodeName ?
3012
- element.href || isTabIndexNotNaN :
3013
- isTabIndexNotNaN
3014
- );
3015
- }
3016
-
3017
- // Focus inputs using cached focusable elements (see update())
3018
- function focusInputs(blurElems) {
3019
- // Blurring body element in IE causes window.open windows to unfocus!
3020
- if(focusableElems.length < 1 && blurElems.length) { blurElems.not('body').blur(); }
3021
-
3022
- // Focus the inputs
3023
- else { focusableElems.first().focus(); }
3024
- }
3025
-
3026
- // Steal focus from elements outside tooltip
3027
- function stealFocus(event) {
3028
- if(!elem.is(':visible')) { return; }
3029
-
3030
- var target = $(event.target),
3031
- tooltip = current.tooltip,
3032
- container = target.closest(SELECTOR),
3033
- targetOnTop;
3034
-
3035
- // Determine if input container target is above this
3036
- targetOnTop = container.length < 1 ? FALSE :
3037
- (parseInt(container[0].style.zIndex, 10) > parseInt(tooltip[0].style.zIndex, 10));
3038
-
3039
- // If we're showing a modal, but focus has landed on an input below
3040
- // this modal, divert focus to the first visible input in this modal
3041
- // or if we can't find one... the tooltip itself
3042
- if(!targetOnTop && target.closest(SELECTOR)[0] !== tooltip[0]) {
3043
- focusInputs(target);
3044
- }
3045
-
3046
- // Detect when we leave the last focusable element...
3047
- onLast = event.target === focusableElems[focusableElems.length - 1];
3048
- }
3049
-
3050
- $.extend(self, {
3051
- init: function() {
3052
- // Create document overlay
3053
- elem = self.elem = $('<div />', {
3054
- id: 'qtip-overlay',
3055
- html: '<div></div>',
3056
- mousedown: function() { return FALSE; }
3057
- })
3058
- .hide();
3059
-
3060
- // Make sure we can't focus anything outside the tooltip
3061
- $(document.body).bind('focusin'+MODALSELECTOR, stealFocus);
3062
-
3063
- // Apply keyboard "Escape key" close handler
3064
- $(document).bind('keydown'+MODALSELECTOR, function(event) {
3065
- if(current && current.options.show.modal.escape && event.keyCode === 27) {
3066
- current.hide(event);
3067
- }
3068
- });
3069
-
3070
- // Apply click handler for blur option
3071
- elem.bind('click'+MODALSELECTOR, function(event) {
3072
- if(current && current.options.show.modal.blur) {
3073
- current.hide(event);
3074
- }
3075
- });
3076
-
3077
- return self;
3078
- },
3079
-
3080
- update: function(api) {
3081
- // Update current API reference
3082
- current = api;
3083
-
3084
- // Update focusable elements if enabled
3085
- if(api.options.show.modal.stealfocus !== FALSE) {
3086
- focusableElems = api.tooltip.find('*').filter(function() {
3087
- return focusable(this);
3088
- });
3089
- }
3090
- else { focusableElems = []; }
3091
- },
3092
-
3093
- toggle: function(api, state, duration) {
3094
- var docBody = $(document.body),
3095
- tooltip = api.tooltip,
3096
- options = api.options.show.modal,
3097
- effect = options.effect,
3098
- type = state ? 'show': 'hide',
3099
- visible = elem.is(':visible'),
3100
- visibleModals = $(MODALSELECTOR).filter(':visible:not(:animated)').not(tooltip),
3101
- zindex;
3102
-
3103
- // Set active tooltip API reference
3104
- self.update(api);
3105
-
3106
- // If the modal can steal the focus...
3107
- // Blur the current item and focus anything in the modal we an
3108
- if(state && options.stealfocus !== FALSE) {
3109
- focusInputs( $(':focus') );
3110
- }
3111
-
3112
- // Toggle backdrop cursor style on show
3113
- elem.toggleClass('blurs', options.blur);
3114
-
3115
- // Append to body on show
3116
- if(state) {
3117
- elem.appendTo(document.body);
3118
- }
3119
-
3120
- // Prevent modal from conflicting with show.solo, and don't hide backdrop is other modals are visible
3121
- if((elem.is(':animated') && visible === state && prevState !== FALSE) || (!state && visibleModals.length)) {
3122
- return self;
3123
- }
3124
-
3125
- // Stop all animations
3126
- elem.stop(TRUE, FALSE);
3127
-
3128
- // Use custom function if provided
3129
- if($.isFunction(effect)) {
3130
- effect.call(elem, state);
3131
- }
3132
-
3133
- // If no effect type is supplied, use a simple toggle
3134
- else if(effect === FALSE) {
3135
- elem[ type ]();
3136
- }
3137
-
3138
- // Use basic fade function
3139
- else {
3140
- elem.fadeTo( parseInt(duration, 10) || 90, state ? 1 : 0, function() {
3141
- if(!state) { elem.hide(); }
3142
- });
3143
- }
3144
-
3145
- // Reset position and detach from body on hide
3146
- if(!state) {
3147
- elem.queue(function(next) {
3148
- elem.css({ left: '', top: '' });
3149
- if(!$(MODALSELECTOR).length) { elem.detach(); }
3150
- next();
3151
- });
3152
- }
3153
-
3154
- // Cache the state
3155
- prevState = state;
3156
-
3157
- // If the tooltip is destroyed, set reference to null
3158
- if(current.destroyed) { current = NULL; }
3159
-
3160
- return self;
3161
- }
3162
- });
3163
-
3164
- self.init();
3165
- };
3166
- OVERLAY = new OVERLAY();
3167
-
3168
- function Modal(api, options) {
3169
- this.options = options;
3170
- this._ns = '-modal';
3171
-
3172
- this.init( (this.qtip = api) );
3173
- }
3174
-
3175
- $.extend(Modal.prototype, {
3176
- init: function(qtip) {
3177
- var tooltip = qtip.tooltip;
3178
-
3179
- // If modal is disabled... return
3180
- if(!this.options.on) { return this; }
3181
-
3182
- // Set overlay reference
3183
- qtip.elements.overlay = OVERLAY.elem;
3184
-
3185
- // Add unique attribute so we can grab modal tooltips easily via a SELECTOR, and set z-index
3186
- tooltip.addClass(MODALCLASS).css('z-index', QTIP.modal_zindex + $(MODALSELECTOR).length);
3187
-
3188
- // Apply our show/hide/focus modal events
3189
- qtip._bind(tooltip, ['tooltipshow', 'tooltiphide'], function(event, api, duration) {
3190
- var oEvent = event.originalEvent;
3191
-
3192
- // Make sure mouseout doesn't trigger a hide when showing the modal and mousing onto backdrop
3193
- if(event.target === tooltip[0]) {
3194
- if(oEvent && event.type === 'tooltiphide' && /mouse(leave|enter)/.test(oEvent.type) && $(oEvent.relatedTarget).closest(OVERLAY.elem[0]).length) {
3195
- try { event.preventDefault(); } catch(e) {}
3196
- }
3197
- else if(!oEvent || (oEvent && oEvent.type !== 'tooltipsolo')) {
3198
- this.toggle(event, event.type === 'tooltipshow', duration);
3199
- }
3200
- }
3201
- }, this._ns, this);
3202
-
3203
- // Adjust modal z-index on tooltip focus
3204
- qtip._bind(tooltip, 'tooltipfocus', function(event, api) {
3205
- // If focus was cancelled before it reached us, don't do anything
3206
- if(event.isDefaultPrevented() || event.target !== tooltip[0]) { return; }
3207
-
3208
- var qtips = $(MODALSELECTOR),
3209
-
3210
- // Keep the modal's lower than other, regular qtips
3211
- newIndex = QTIP.modal_zindex + qtips.length,
3212
- curIndex = parseInt(tooltip[0].style.zIndex, 10);
3213
-
3214
- // Set overlay z-index
3215
- OVERLAY.elem[0].style.zIndex = newIndex - 1;
3216
-
3217
- // Reduce modal z-index's and keep them properly ordered
3218
- qtips.each(function() {
3219
- if(this.style.zIndex > curIndex) {
3220
- this.style.zIndex -= 1;
3221
- }
3222
- });
3223
-
3224
- // Fire blur event for focused tooltip
3225
- qtips.filter('.' + CLASS_FOCUS).qtip('blur', event.originalEvent);
3226
-
3227
- // Set the new z-index
3228
- tooltip.addClass(CLASS_FOCUS)[0].style.zIndex = newIndex;
3229
-
3230
- // Set current
3231
- OVERLAY.update(api);
3232
-
3233
- // Prevent default handling
3234
- try { event.preventDefault(); } catch(e) {}
3235
- }, this._ns, this);
3236
-
3237
- // Focus any other visible modals when this one hides
3238
- qtip._bind(tooltip, 'tooltiphide', function(event) {
3239
- if(event.target === tooltip[0]) {
3240
- $(MODALSELECTOR).filter(':visible').not(tooltip).last().qtip('focus', event);
3241
- }
3242
- }, this._ns, this);
3243
- },
3244
-
3245
- toggle: function(event, state, duration) {
3246
- // Make sure default event hasn't been prevented
3247
- if(event && event.isDefaultPrevented()) { return this; }
3248
-
3249
- // Toggle it
3250
- OVERLAY.toggle(this.qtip, !!state, duration);
3251
- },
3252
-
3253
- destroy: function() {
3254
- // Remove modal class
3255
- this.qtip.tooltip.removeClass(MODALCLASS);
3256
-
3257
- // Remove bound events
3258
- this.qtip._unbind(this.qtip.tooltip, this._ns);
3259
-
3260
- // Delete element reference
3261
- OVERLAY.toggle(this.qtip, FALSE);
3262
- delete this.qtip.elements.overlay;
3263
- }
3264
- });
3265
-
3266
-
3267
- MODAL = PLUGINS.modal = function(api) {
3268
- return new Modal(api, api.options.show.modal);
3269
- };
3270
-
3271
- // Setup sanitiztion rules
3272
- MODAL.sanitize = function(opts) {
3273
- if(opts.show) {
3274
- if(typeof opts.show.modal !== 'object') { opts.show.modal = { on: !!opts.show.modal }; }
3275
- else if(typeof opts.show.modal.on === 'undefined') { opts.show.modal.on = TRUE; }
3276
- }
3277
- };
3278
-
3279
- // Base z-index for all modal tooltips (use qTip core z-index as a base)
3280
- QTIP.modal_zindex = QTIP.zindex - 200;
3281
-
3282
- // Plugin needs to be initialized on render
3283
- MODAL.initialize = 'render';
3284
-
3285
- // Setup option set checks
3286
- CHECKS.modal = {
3287
- '^show.modal.(on|blur)$': function() {
3288
- // Initialise
3289
- this.destroy();
3290
- this.init();
3291
-
3292
- // Show the modal if not visible already and tooltip is visible
3293
- this.qtip.elems.overlay.toggle(
3294
- this.qtip.tooltip[0].offsetWidth > 0
3295
- );
3296
- }
3297
- };
3298
-
3299
- // Extend original api defaults
3300
- $.extend(TRUE, QTIP.defaults, {
3301
- show: {
3302
- modal: {
3303
- on: FALSE,
3304
- effect: TRUE,
3305
- blur: TRUE,
3306
- stealfocus: TRUE,
3307
- escape: TRUE
3308
- }
3309
- }
3310
- });
3311
- ;var IE6,
3312
-
3313
- /*
3314
- * BGIFrame adaption (http://plugins.jquery.com/project/bgiframe)
3315
- * Special thanks to Brandon Aaron
3316
- */
3317
- BGIFRAME = '<iframe class="qtip-bgiframe" frameborder="0" tabindex="-1" src="javascript:\'\';" ' +
3318
- ' style="display:block; position:absolute; z-index:-1; filter:alpha(opacity=0); ' +
3319
- '-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";"></iframe>';
3320
-
3321
- function Ie6(api, qtip) {
3322
- this._ns = 'ie6';
3323
- this.init( (this.qtip = api) );
3324
- }
3325
-
3326
- $.extend(Ie6.prototype, {
3327
- _scroll : function() {
3328
- var overlay = this.qtip.elements.overlay;
3329
- overlay && (overlay[0].style.top = $(window).scrollTop() + 'px');
3330
- },
3331
-
3332
- init: function(qtip) {
3333
- var tooltip = qtip.tooltip,
3334
- scroll;
3335
-
3336
- // Create the BGIFrame element if needed
3337
- if($('select, object').length < 1) {
3338
- this.bgiframe = qtip.elements.bgiframe = $(BGIFRAME).appendTo(tooltip);
3339
-
3340
- // Update BGIFrame on tooltip move
3341
- qtip._bind(tooltip, 'tooltipmove', this.adjustBGIFrame, this._ns, this);
3342
- }
3343
-
3344
- // redraw() container for width/height calculations
3345
- this.redrawContainer = $('<div/>', { id: NAMESPACE+'-rcontainer' })
3346
- .appendTo(document.body);
3347
-
3348
- // Fixup modal plugin if present too
3349
- if( qtip.elements.overlay && qtip.elements.overlay.addClass('qtipmodal-ie6fix') ) {
3350
- qtip._bind(window, ['scroll', 'resize'], this._scroll, this._ns, this);
3351
- qtip._bind(tooltip, ['tooltipshow'], this._scroll, this._ns, this);
3352
- }
3353
-
3354
- // Set dimensions
3355
- this.redraw();
3356
- },
3357
-
3358
- adjustBGIFrame: function() {
3359
- var tooltip = this.qtip.tooltip,
3360
- dimensions = {
3361
- height: tooltip.outerHeight(FALSE),
3362
- width: tooltip.outerWidth(FALSE)
3363
- },
3364
- plugin = this.qtip.plugins.tip,
3365
- tip = this.qtip.elements.tip,
3366
- tipAdjust, offset;
3367
-
3368
- // Adjust border offset
3369
- offset = parseInt(tooltip.css('borderLeftWidth'), 10) || 0;
3370
- offset = { left: -offset, top: -offset };
3371
-
3372
- // Adjust for tips plugin
3373
- if(plugin && tip) {
3374
- tipAdjust = (plugin.corner.precedance === 'x') ? [WIDTH, LEFT] : [HEIGHT, TOP];
3375
- offset[ tipAdjust[1] ] -= tip[ tipAdjust[0] ]();
3376
- }
3377
-
3378
- // Update bgiframe
3379
- this.bgiframe.css(offset).css(dimensions);
3380
- },
3381
-
3382
- // Max/min width simulator function
3383
- redraw: function() {
3384
- if(this.qtip.rendered < 1 || this.drawing) { return this; }
3385
-
3386
- var tooltip = this.qtip.tooltip,
3387
- style = this.qtip.options.style,
3388
- container = this.qtip.options.position.container,
3389
- perc, width, max, min;
3390
-
3391
- // Set drawing flag
3392
- this.qtip.drawing = 1;
3393
-
3394
- // If tooltip has a set height/width, just set it... like a boss!
3395
- if(style.height) { tooltip.css(HEIGHT, style.height); }
3396
- if(style.width) { tooltip.css(WIDTH, style.width); }
3397
-
3398
- // Simulate max/min width if not set width present...
3399
- else {
3400
- // Reset width and add fluid class
3401
- tooltip.css(WIDTH, '').appendTo(this.redrawContainer);
3402
-
3403
- // Grab our tooltip width (add 1 if odd so we don't get wrapping problems.. huzzah!)
3404
- width = tooltip.width();
3405
- if(width % 2 < 1) { width += 1; }
3406
-
3407
- // Grab our max/min properties
3408
- max = tooltip.css('maxWidth') || '';
3409
- min = tooltip.css('minWidth') || '';
3410
-
3411
- // Parse into proper pixel values
3412
- perc = (max + min).indexOf('%') > -1 ? container.width() / 100 : 0;
3413
- max = ((max.indexOf('%') > -1 ? perc : 1) * parseInt(max, 10)) || width;
3414
- min = ((min.indexOf('%') > -1 ? perc : 1) * parseInt(min, 10)) || 0;
3415
-
3416
- // Determine new dimension size based on max/min/current values
3417
- width = max + min ? Math.min(Math.max(width, min), max) : width;
3418
-
3419
- // Set the newly calculated width and remvoe fluid class
3420
- tooltip.css(WIDTH, Math.round(width)).appendTo(container);
3421
- }
3422
-
3423
- // Set drawing flag
3424
- this.drawing = 0;
3425
-
3426
- return this;
3427
- },
3428
-
3429
- destroy: function() {
3430
- // Remove iframe
3431
- this.bgiframe && this.bgiframe.remove();
3432
-
3433
- // Remove bound events
3434
- this.qtip._unbind([window, this.qtip.tooltip], this._ns);
3435
- }
3436
- });
3437
-
3438
- IE6 = PLUGINS.ie6 = function(api) {
3439
- // Proceed only if the browser is IE6
3440
- return BROWSER.ie === 6 ? new Ie6(api) : FALSE;
3441
- };
3442
-
3443
- IE6.initialize = 'render';
3444
-
3445
- CHECKS.ie6 = {
3446
- '^content|style$': function() {
3447
- this.redraw();
3448
- }
3449
- };
3450
- ;}));
3451
- }( window, document ));
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
+ /*global window: false, jQuery: false, console: false, define: false */
14
+
15
+ /* Cache window, document, undefined */
16
+ (function( window, document, undefined ) {
17
+
18
+ // Uses AMD or browser globals to create a jQuery plugin.
19
+ (function( factory ) {
20
+ "use strict";
21
+ if(typeof define === 'function' && define.amd) {
22
+ define(['jquery'], factory);
23
+ }
24
+ else if(jQuery && !jQuery.fn.qtip) {
25
+ factory(jQuery);
26
+ }
27
+ }
28
+ (function($) {
29
+ "use strict"; // Enable ECMAScript "strict" operation for this function. See more: http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/
30
+ ;// Munge the primitives - Paul Irish tip
31
+ var TRUE = true,
32
+ FALSE = false,
33
+ NULL = null,
34
+
35
+ // Common variables
36
+ X = 'x', Y = 'y',
37
+ WIDTH = 'width',
38
+ HEIGHT = 'height',
39
+
40
+ // Positioning sides
41
+ TOP = 'top',
42
+ LEFT = 'left',
43
+ BOTTOM = 'bottom',
44
+ RIGHT = 'right',
45
+ CENTER = 'center',
46
+
47
+ // Position adjustment types
48
+ FLIP = 'flip',
49
+ FLIPINVERT = 'flipinvert',
50
+ SHIFT = 'shift',
51
+
52
+ // Shortcut vars
53
+ QTIP, PROTOTYPE, CORNER, CHECKS,
54
+ PLUGINS = {},
55
+ NAMESPACE = 'qtip',
56
+ ATTR_HAS = 'data-hasqtip',
57
+ ATTR_ID = 'data-qtip-id',
58
+ WIDGET = ['ui-widget', 'ui-tooltip'],
59
+ SELECTOR = '.'+NAMESPACE,
60
+ INACTIVE_EVENTS = 'click dblclick mousedown mouseup mousemove mouseleave mouseenter'.split(' '),
61
+
62
+ CLASS_FIXED = NAMESPACE+'-fixed',
63
+ CLASS_DEFAULT = NAMESPACE + '-default',
64
+ CLASS_FOCUS = NAMESPACE + '-focus',
65
+ CLASS_HOVER = NAMESPACE + '-hover',
66
+ CLASS_DISABLED = NAMESPACE+'-disabled',
67
+
68
+ replaceSuffix = '_replacedByqTip',
69
+ oldtitle = 'oldtitle',
70
+ trackingBound,
71
+
72
+ // Browser detection
73
+ BROWSER = {
74
+ /*
75
+ * IE version detection
76
+ *
77
+ * Adapted from: http://ajaxian.com/archives/attack-of-the-ie-conditional-comment
78
+ * Credit to James Padolsey for the original implemntation!
79
+ */
80
+ ie: (function(){
81
+ for (
82
+ var v = 4, i = document.createElement("div");
83
+ (i.innerHTML = "<!--[if gt IE " + v + "]><i></i><![endif]-->") && i.getElementsByTagName("i")[0];
84
+ v+=1
85
+ ) {}
86
+ return v > 4 ? v : NaN;
87
+ }()),
88
+
89
+ /*
90
+ * iOS version detection
91
+ */
92
+ iOS: parseFloat(
93
+ ('' + (/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent) || [0,''])[1])
94
+ .replace('undefined', '3_2').replace('_', '.').replace('_', '')
95
+ ) || FALSE
96
+ };
97
  ;function QTip(target, options, id, attr) {
98
  // Elements and ID
99
  this.id = id;
299
 
300
  return this.target;
301
  };
302
+ ;function invalidOpt(a) {
303
+ return a === NULL || $.type(a) !== 'object';
304
+ }
305
+
306
+ function invalidContent(c) {
307
+ return !( $.isFunction(c) || (c && c.attr) || c.length || ($.type(c) === 'object' && (c.jquery || c.then) ));
308
+ }
309
+
310
+ // Option object sanitizer
311
+ function sanitizeOptions(opts) {
312
+ var content, text, ajax, once;
313
+
314
+ if(invalidOpt(opts)) { return FALSE; }
315
+
316
+ if(invalidOpt(opts.metadata)) {
317
+ opts.metadata = { type: opts.metadata };
318
+ }
319
+
320
+ if('content' in opts) {
321
+ content = opts.content;
322
+
323
+ if(invalidOpt(content) || content.jquery || content.done) {
324
+ content = opts.content = {
325
+ text: (text = invalidContent(content) ? FALSE : content)
326
+ };
327
+ }
328
+ else { text = content.text; }
329
+
330
+ // DEPRECATED - Old content.ajax plugin functionality
331
+ // Converts it into the proper Deferred syntax
332
+ if('ajax' in content) {
333
+ ajax = content.ajax;
334
+ once = ajax && ajax.once !== FALSE;
335
+ delete content.ajax;
336
+
337
+ content.text = function(event, api) {
338
+ var loading = text || $(this).attr(api.options.content.attr) || 'Loading...',
339
+
340
+ deferred = $.ajax(
341
+ $.extend({}, ajax, { context: api })
342
+ )
343
+ .then(ajax.success, NULL, ajax.error)
344
+ .then(function(content) {
345
+ if(content && once) { api.set('content.text', content); }
346
+ return content;
347
+ },
348
+ function(xhr, status, error) {
349
+ if(api.destroyed || xhr.status === 0) { return; }
350
+ api.set('content.text', status + ': ' + error);
351
+ });
352
+
353
+ return !once ? (api.set('content.text', loading), deferred) : loading;
354
+ };
355
+ }
356
+
357
+ if('title' in content) {
358
+ if($.isPlainObject(content.title)) {
359
+ content.button = content.title.button;
360
+ content.title = content.title.text;
361
+ }
362
+
363
+ if(invalidContent(content.title || FALSE)) {
364
+ content.title = FALSE;
365
+ }
366
+ }
367
+ }
368
+
369
+ if('position' in opts && invalidOpt(opts.position)) {
370
+ opts.position = { my: opts.position, at: opts.position };
371
+ }
372
+
373
+ if('show' in opts && invalidOpt(opts.show)) {
374
+ opts.show = opts.show.jquery ? { target: opts.show } :
375
+ opts.show === TRUE ? { ready: TRUE } : { event: opts.show };
376
+ }
377
+
378
+ if('hide' in opts && invalidOpt(opts.hide)) {
379
+ opts.hide = opts.hide.jquery ? { target: opts.hide } : { event: opts.hide };
380
+ }
381
+
382
+ if('style' in opts && invalidOpt(opts.style)) {
383
+ opts.style = { classes: opts.style };
384
+ }
385
+
386
+ // Sanitize plugin options
387
+ $.each(PLUGINS, function() {
388
+ this.sanitize && this.sanitize(opts);
389
+ });
390
+
391
+ return opts;
392
+ }
393
+
394
+ // Setup builtin .set() option checks
395
+ CHECKS = PROTOTYPE.checks = {
396
+ builtin: {
397
+ // Core checks
398
+ '^id$': function(obj, o, v, prev) {
399
+ var id = v === TRUE ? QTIP.nextid : v,
400
+ new_id = NAMESPACE + '-' + id;
401
+
402
+ if(id !== FALSE && id.length > 0 && !$('#'+new_id).length) {
403
+ this._id = new_id;
404
+
405
+ if(this.rendered) {
406
+ this.tooltip[0].id = this._id;
407
+ this.elements.content[0].id = this._id + '-content';
408
+ this.elements.title[0].id = this._id + '-title';
409
+ }
410
+ }
411
+ else { obj[o] = prev; }
412
+ },
413
+ '^prerender': function(obj, o, v) {
414
+ v && !this.rendered && this.render(this.options.show.ready);
415
+ },
416
+
417
+ // Content checks
418
+ '^content.text$': function(obj, o, v) {
419
+ this._updateContent(v);
420
+ },
421
+ '^content.attr$': function(obj, o, v, prev) {
422
+ if(this.options.content.text === this.target.attr(prev)) {
423
+ this._updateContent( this.target.attr(v) );
424
+ }
425
+ },
426
+ '^content.title$': function(obj, o, v) {
427
+ // Remove title if content is null
428
+ if(!v) { return this._removeTitle(); }
429
+
430
+ // If title isn't already created, create it now and update
431
+ v && !this.elements.title && this._createTitle();
432
+ this._updateTitle(v);
433
+ },
434
+ '^content.button$': function(obj, o, v) {
435
+ this._updateButton(v);
436
+ },
437
+ '^content.title.(text|button)$': function(obj, o, v) {
438
+ this.set('content.'+o, v); // Backwards title.text/button compat
439
+ },
440
+
441
+ // Position checks
442
+ '^position.(my|at)$': function(obj, o, v){
443
+ 'string' === typeof v && (this.position[o] = obj[o] = new CORNER(v, o === 'at'));
444
+ },
445
+ '^position.container$': function(obj, o, v){
446
+ this.rendered && this.tooltip.appendTo(v);
447
+ },
448
+
449
+ // Show checks
450
+ '^show.ready$': function(obj, o, v) {
451
+ v && (!this.rendered && this.render(TRUE) || this.toggle(TRUE));
452
+ },
453
+
454
+ // Style checks
455
+ '^style.classes$': function(obj, o, v, p) {
456
+ this.rendered && this.tooltip.removeClass(p).addClass(v);
457
+ },
458
+ '^style.(width|height)': function(obj, o, v) {
459
+ this.rendered && this.tooltip.css(o, v);
460
+ },
461
+ '^style.widget|content.title': function() {
462
+ this.rendered && this._setWidget();
463
+ },
464
+ '^style.def': function(obj, o, v) {
465
+ this.rendered && this.tooltip.toggleClass(CLASS_DEFAULT, !!v);
466
+ },
467
+
468
+ // Events check
469
+ '^events.(render|show|move|hide|focus|blur)$': function(obj, o, v) {
470
+ this.rendered && this.tooltip[($.isFunction(v) ? '' : 'un') + 'bind']('tooltip'+o, v);
471
+ },
472
+
473
+ // Properties which require event reassignment
474
+ '^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)': function() {
475
+ if(!this.rendered) { return; }
476
+
477
+ // Set tracking flag
478
+ var posOptions = this.options.position;
479
+ this.tooltip.attr('tracking', posOptions.target === 'mouse' && posOptions.adjust.mouse);
480
+
481
+ // Reassign events
482
+ this._unassignEvents();
483
+ this._assignEvents();
484
+ }
485
+ }
486
+ };
487
+
488
+ // Dot notation converter
489
+ function convertNotation(options, notation) {
490
+ var i = 0, obj, option = options,
491
+
492
+ // Split notation into array
493
+ levels = notation.split('.');
494
+
495
+ // Loop through
496
+ while( option = option[ levels[i++] ] ) {
497
+ if(i < levels.length) { obj = option; }
498
+ }
499
+
500
+ return [obj || options, levels.pop()];
501
+ }
502
+
503
+ PROTOTYPE.get = function(notation) {
504
+ if(this.destroyed) { return this; }
505
+
506
+ var o = convertNotation(this.options, notation.toLowerCase()),
507
+ result = o[0][ o[1] ];
508
+
509
+ return result.precedance ? result.string() : result;
510
+ };
511
+
512
+ function setCallback(notation, args) {
513
+ var category, rule, match;
514
+
515
+ for(category in this.checks) {
516
+ for(rule in this.checks[category]) {
517
+ if(match = (new RegExp(rule, 'i')).exec(notation)) {
518
+ args.push(match);
519
+
520
+ if(category === 'builtin' || this.plugins[category]) {
521
+ this.checks[category][rule].apply(
522
+ this.plugins[category] || this, args
523
+ );
524
+ }
525
+ }
526
+ }
527
+ }
528
+ }
529
+
530
+ var rmove = /^position\.(my|at|adjust|target|container|viewport)|style|content|show\.ready/i,
531
+ rrender = /^prerender|show\.ready/i;
532
+
533
+ PROTOTYPE.set = function(option, value) {
534
+ if(this.destroyed) { return this; }
535
+
536
+ var rendered = this.rendered,
537
+ reposition = FALSE,
538
+ options = this.options,
539
+ checks = this.checks,
540
+ name;
541
+
542
+ // Convert singular option/value pair into object form
543
+ if('string' === typeof option) {
544
+ name = option; option = {}; option[name] = value;
545
+ }
546
+ else { option = $.extend({}, option); }
547
+
548
+ // Set all of the defined options to their new values
549
+ $.each(option, function(notation, value) {
550
+ if(rendered && rrender.test(notation)) {
551
+ delete option[notation]; return;
552
+ }
553
+
554
+ // Set new obj value
555
+ var obj = convertNotation(options, notation.toLowerCase()), previous;
556
+ previous = obj[0][ obj[1] ];
557
+ obj[0][ obj[1] ] = value && value.nodeType ? $(value) : value;
558
+
559
+ // Also check if we need to reposition
560
+ reposition = rmove.test(notation) || reposition;
561
+
562
+ // Set the new params for the callback
563
+ option[notation] = [obj[0], obj[1], value, previous];
564
+ });
565
+
566
+ // Re-sanitize options
567
+ sanitizeOptions(options);
568
+
569
+ /*
570
+ * Execute any valid callbacks for the set options
571
+ * Also set positioning flag so we don't get loads of redundant repositioning calls.
572
+ */
573
+ this.positioning = TRUE;
574
+ $.each(option, $.proxy(setCallback, this));
575
+ this.positioning = FALSE;
576
+
577
+ // Update position if needed
578
+ if(this.rendered && this.tooltip[0].offsetWidth > 0 && reposition) {
579
+ this.reposition( options.position.target === 'mouse' ? NULL : this.cache.event );
580
+ }
581
+
582
+ return this;
583
+ };
584
+ ;PROTOTYPE._update = function(content, element, reposition) {
585
+ var self = this,
586
+ cache = this.cache;
587
+
588
+ // Make sure tooltip is rendered and content is defined. If not return
589
+ if(!this.rendered || !content) { return FALSE; }
590
+
591
+ // Use function to parse content
592
+ if($.isFunction(content)) {
593
+ content = content.call(this.elements.target, cache.event, this) || '';
594
+ }
595
+
596
+ // Handle deferred content
597
+ if($.isFunction(content.then)) {
598
+ cache.waiting = TRUE;
599
+ return content.then(function(c) {
600
+ cache.waiting = FALSE;
601
+ return self._update(c, element);
602
+ }, NULL, function(e) {
603
+ return self._update(e, element);
604
+ });
605
+ }
606
+
607
+ // If content is null... return false
608
+ if(content === FALSE || (!content && content !== '')) { return FALSE; }
609
+
610
+ // Append new content if its a DOM array and show it if hidden
611
+ if(content.jquery && content.length > 0) {
612
+ element.empty().append(
613
+ content.css({ display: 'block', visibility: 'visible' })
614
+ );
615
+ }
616
+
617
+ // Content is a regular string, insert the new content
618
+ else { element.html(content); }
619
+
620
+ // Wait for content to be loaded, and reposition
621
+ return this._waitForContent(element).then(function(images) {
622
+ if(self.rendered && self.tooltip[0].offsetWidth > 0) {
623
+ self.reposition(cache.event, !images.length);
624
+ }
625
+ });
626
+ };
627
+
628
+ PROTOTYPE._waitForContent = function(element) {
629
+ var cache = this.cache;
630
+
631
+ // Set flag
632
+ cache.waiting = TRUE;
633
+
634
+ // If imagesLoaded is included, ensure images have loaded and return promise
635
+ return ( $.fn.imagesLoaded ? element.imagesLoaded() : $.Deferred().resolve([]) )
636
+ .done(function() { cache.waiting = FALSE; })
637
+ .promise();
638
+ };
639
+
640
+ PROTOTYPE._updateContent = function(content, reposition) {
641
+ this._update(content, this.elements.content, reposition);
642
+ };
643
+
644
+ PROTOTYPE._updateTitle = function(content, reposition) {
645
+ if(this._update(content, this.elements.title, reposition) === FALSE) {
646
+ this._removeTitle(FALSE);
647
+ }
648
+ };
649
+
650
+ PROTOTYPE._createTitle = function()
651
+ {
652
+ var elements = this.elements,
653
+ id = this._id+'-title';
654
+
655
+ // Destroy previous title element, if present
656
+ if(elements.titlebar) { this._removeTitle(); }
657
+
658
+ // Create title bar and title elements
659
+ elements.titlebar = $('<div />', {
660
+ 'class': NAMESPACE + '-titlebar ' + (this.options.style.widget ? createWidgetClass('header') : '')
661
+ })
662
+ .append(
663
+ elements.title = $('<div />', {
664
+ 'id': id,
665
+ 'class': NAMESPACE + '-title',
666
+ 'aria-atomic': TRUE
667
+ })
668
+ )
669
+ .insertBefore(elements.content)
670
+
671
+ // Button-specific events
672
+ .delegate('.qtip-close', 'mousedown keydown mouseup keyup mouseout', function(event) {
673
+ $(this).toggleClass('ui-state-active ui-state-focus', event.type.substr(-4) === 'down');
674
+ })
675
+ .delegate('.qtip-close', 'mouseover mouseout', function(event){
676
+ $(this).toggleClass('ui-state-hover', event.type === 'mouseover');
677
+ });
678
+
679
+ // Create button if enabled
680
+ if(this.options.content.button) { this._createButton(); }
681
+ };
682
+
683
+ PROTOTYPE._removeTitle = function(reposition)
684
+ {
685
+ var elements = this.elements;
686
+
687
+ if(elements.title) {
688
+ elements.titlebar.remove();
689
+ elements.titlebar = elements.title = elements.button = NULL;
690
+
691
+ // Reposition if enabled
692
+ if(reposition !== FALSE) { this.reposition(); }
693
+ }
694
+ };
695
+ ;PROTOTYPE._createPosClass = function(my) {
696
+ return NAMESPACE + '-pos-' + (my || this.options.position.my).abbrev();
697
+ };
698
+
699
+ PROTOTYPE.reposition = function(event, effect) {
700
+ if(!this.rendered || this.positioning || this.destroyed) { return this; }
701
+
702
+ // Set positioning flag
703
+ this.positioning = TRUE;
704
+
705
+ var cache = this.cache,
706
+ tooltip = this.tooltip,
707
+ posOptions = this.options.position,
708
+ target = posOptions.target,
709
+ my = posOptions.my,
710
+ at = posOptions.at,
711
+ viewport = posOptions.viewport,
712
+ container = posOptions.container,
713
+ adjust = posOptions.adjust,
714
+ method = adjust.method.split(' '),
715
+ tooltipWidth = tooltip.outerWidth(FALSE),
716
+ tooltipHeight = tooltip.outerHeight(FALSE),
717
+ targetWidth = 0,
718
+ targetHeight = 0,
719
+ type = tooltip.css('position'),
720
+ position = { left: 0, top: 0 },
721
+ visible = tooltip[0].offsetWidth > 0,
722
+ isScroll = event && event.type === 'scroll',
723
+ win = $(window),
724
+ doc = container[0].ownerDocument,
725
+ mouse = this.mouse,
726
+ pluginCalculations, offset, adjusted, newClass;
727
+
728
+ // Check if absolute position was passed
729
+ if($.isArray(target) && target.length === 2) {
730
+ // Force left top and set position
731
+ at = { x: LEFT, y: TOP };
732
+ position = { left: target[0], top: target[1] };
733
+ }
734
+
735
+ // Check if mouse was the target
736
+ else if(target === 'mouse') {
737
+ // Force left top to allow flipping
738
+ at = { x: LEFT, y: TOP };
739
+
740
+ // Use the mouse origin that caused the show event, if distance hiding is enabled
741
+ if((!adjust.mouse || this.options.hide.distance) && cache.origin && cache.origin.pageX) {
742
+ event = cache.origin;
743
+ }
744
+
745
+ // Use cached event for resize/scroll events
746
+ else if(!event || (event && (event.type === 'resize' || event.type === 'scroll'))) {
747
+ event = cache.event;
748
+ }
749
+
750
+ // Otherwise, use the cached mouse coordinates if available
751
+ else if(mouse && mouse.pageX) {
752
+ event = mouse;
753
+ }
754
+
755
+ // Calculate body and container offset and take them into account below
756
+ if(type !== 'static') { position = container.offset(); }
757
+ if(doc.body.offsetWidth !== (window.innerWidth || doc.documentElement.clientWidth)) {
758
+ offset = $(document.body).offset();
759
+ }
760
+
761
+ // Use event coordinates for position
762
+ position = {
763
+ left: event.pageX - position.left + (offset && offset.left || 0),
764
+ top: event.pageY - position.top + (offset && offset.top || 0)
765
+ };
766
+
767
+ // Scroll events are a pain, some browsers
768
+ if(adjust.mouse && isScroll && mouse) {
769
+ position.left -= (mouse.scrollX || 0) - win.scrollLeft();
770
+ position.top -= (mouse.scrollY || 0) - win.scrollTop();
771
+ }
772
+ }
773
+
774
+ // Target wasn't mouse or absolute...
775
+ else {
776
+ // Check if event targetting is being used
777
+ if(target === 'event') {
778
+ if(event && event.target && event.type !== 'scroll' && event.type !== 'resize') {
779
+ cache.target = $(event.target);
780
+ }
781
+ else if(!event.target) {
782
+ cache.target = this.elements.target;
783
+ }
784
+ }
785
+ else if(target !== 'event'){
786
+ cache.target = $(target.jquery ? target : this.elements.target);
787
+ }
788
+ target = cache.target;
789
+
790
+ // Parse the target into a jQuery object and make sure there's an element present
791
+ target = $(target).eq(0);
792
+ if(target.length === 0) { return this; }
793
+
794
+ // Check if window or document is the target
795
+ else if(target[0] === document || target[0] === window) {
796
+ targetWidth = BROWSER.iOS ? window.innerWidth : target.width();
797
+ targetHeight = BROWSER.iOS ? window.innerHeight : target.height();
798
+
799
+ if(target[0] === window) {
800
+ position = {
801
+ top: (viewport || target).scrollTop(),
802
+ left: (viewport || target).scrollLeft()
803
+ };
804
+ }
805
+ }
806
+
807
+ // Check if the target is an <AREA> element
808
+ else if(PLUGINS.imagemap && target.is('area')) {
809
+ pluginCalculations = PLUGINS.imagemap(this, target, at, PLUGINS.viewport ? method : FALSE);
810
+ }
811
+
812
+ // Check if the target is an SVG element
813
+ else if(PLUGINS.svg && target && target[0].ownerSVGElement) {
814
+ pluginCalculations = PLUGINS.svg(this, target, at, PLUGINS.viewport ? method : FALSE);
815
+ }
816
+
817
+ // Otherwise use regular jQuery methods
818
+ else {
819
+ targetWidth = target.outerWidth(FALSE);
820
+ targetHeight = target.outerHeight(FALSE);
821
+ position = target.offset();
822
+ }
823
+
824
+ // Parse returned plugin values into proper variables
825
+ if(pluginCalculations) {
826
+ targetWidth = pluginCalculations.width;
827
+ targetHeight = pluginCalculations.height;
828
+ offset = pluginCalculations.offset;
829
+ position = pluginCalculations.position;
830
+ }
831
+
832
+ // Adjust position to take into account offset parents
833
+ position = this.reposition.offset(target, position, container);
834
+
835
+ // Adjust for position.fixed tooltips (and also iOS scroll bug in v3.2-4.0 & v4.3-4.3.2)
836
+ if((BROWSER.iOS > 3.1 && BROWSER.iOS < 4.1) ||
837
+ (BROWSER.iOS >= 4.3 && BROWSER.iOS < 4.33) ||
838
+ (!BROWSER.iOS && type === 'fixed')
839
+ ){
840
+ position.left -= win.scrollLeft();
841
+ position.top -= win.scrollTop();
842
+ }
843
+
844
+ // Adjust position relative to target
845
+ if(!pluginCalculations || (pluginCalculations && pluginCalculations.adjustable !== FALSE)) {
846
+ position.left += at.x === RIGHT ? targetWidth : at.x === CENTER ? targetWidth / 2 : 0;
847
+ position.top += at.y === BOTTOM ? targetHeight : at.y === CENTER ? targetHeight / 2 : 0;
848
+ }
849
+ }
850
+
851
+ // Adjust position relative to tooltip
852
+ position.left += adjust.x + (my.x === RIGHT ? -tooltipWidth : my.x === CENTER ? -tooltipWidth / 2 : 0);
853
+ position.top += adjust.y + (my.y === BOTTOM ? -tooltipHeight : my.y === CENTER ? -tooltipHeight / 2 : 0);
854
+
855
+ // Use viewport adjustment plugin if enabled
856
+ if(PLUGINS.viewport) {
857
+ adjusted = position.adjusted = PLUGINS.viewport(
858
+ this, position, posOptions, targetWidth, targetHeight, tooltipWidth, tooltipHeight
859
+ );
860
+
861
+ // Apply offsets supplied by positioning plugin (if used)
862
+ if(offset && adjusted.left) { position.left += offset.left; }
863
+ if(offset && adjusted.top) { position.top += offset.top; }
864
+
865
+ // Apply any new 'my' position
866
+ if(adjusted.my) { this.position.my = adjusted.my; }
867
+ }
868
+
869
+ // Viewport adjustment is disabled, set values to zero
870
+ else { position.adjusted = { left: 0, top: 0 }; }
871
+
872
+ // Set tooltip position class if it's changed
873
+ if(cache.posClass !== (newClass = this._createPosClass(this.position.my))) {
874
+ tooltip.removeClass(cache.posClass).addClass( (cache.posClass = newClass) );
875
+ }
876
+
877
+ // tooltipmove event
878
+ if(!this._trigger('move', [position, viewport.elem || viewport], event)) { return this; }
879
+ delete position.adjusted;
880
+
881
+ // If effect is disabled, target it mouse, no animation is defined or positioning gives NaN out, set CSS directly
882
+ if(effect === FALSE || !visible || isNaN(position.left) || isNaN(position.top) || target === 'mouse' || !$.isFunction(posOptions.effect)) {
883
+ tooltip.css(position);
884
+ }
885
+
886
+ // Use custom function if provided
887
+ else if($.isFunction(posOptions.effect)) {
888
+ posOptions.effect.call(tooltip, this, $.extend({}, position));
889
+ tooltip.queue(function(next) {
890
+ // Reset attributes to avoid cross-browser rendering bugs
891
+ $(this).css({ opacity: '', height: '' });
892
+ if(BROWSER.ie) { this.style.removeAttribute('filter'); }
893
+
894
+ next();
895
+ });
896
+ }
897
+
898
+ // Set positioning flag
899
+ this.positioning = FALSE;
900
+
901
+ return this;
902
+ };
903
+
904
+ // Custom (more correct for qTip!) offset calculator
905
+ PROTOTYPE.reposition.offset = function(elem, pos, container) {
906
+ if(!container[0]) { return pos; }
907
+
908
+ var ownerDocument = $(elem[0].ownerDocument),
909
+ quirks = !!BROWSER.ie && document.compatMode !== 'CSS1Compat',
910
+ parent = container[0],
911
+ scrolled, position, parentOffset, overflow;
912
+
913
+ function scroll(e, i) {
914
+ pos.left += i * e.scrollLeft();
915
+ pos.top += i * e.scrollTop();
916
+ }
917
+
918
+ // Compensate for non-static containers offset
919
+ do {
920
+ if((position = $.css(parent, 'position')) !== 'static') {
921
+ if(position === 'fixed') {
922
+ parentOffset = parent.getBoundingClientRect();
923
+ scroll(ownerDocument, -1);
924
+ }
925
+ else {
926
+ parentOffset = $(parent).position();
927
+ parentOffset.left += (parseFloat($.css(parent, 'borderLeftWidth')) || 0);
928
+ parentOffset.top += (parseFloat($.css(parent, 'borderTopWidth')) || 0);
929
+ }
930
+
931
+ pos.left -= parentOffset.left + (parseFloat($.css(parent, 'marginLeft')) || 0);
932
+ pos.top -= parentOffset.top + (parseFloat($.css(parent, 'marginTop')) || 0);
933
+
934
+ // If this is the first parent element with an overflow of "scroll" or "auto", store it
935
+ if(!scrolled && (overflow = $.css(parent, 'overflow')) !== 'hidden' && overflow !== 'visible') { scrolled = $(parent); }
936
+ }
937
+ }
938
+ while((parent = parent.offsetParent));
939
+
940
+ // Compensate for containers scroll if it also has an offsetParent (or in IE quirks mode)
941
+ if(scrolled && (scrolled[0] !== ownerDocument[0] || quirks)) {
942
+ scroll(scrolled, 1);
943
+ }
944
+
945
+ return pos;
946
+ };
947
+
948
+ // Corner class
949
+ var C = (CORNER = PROTOTYPE.reposition.Corner = function(corner, forceY) {
950
+ corner = ('' + corner).replace(/([A-Z])/, ' $1').replace(/middle/gi, CENTER).toLowerCase();
951
+ this.x = (corner.match(/left|right/i) || corner.match(/center/) || ['inherit'])[0].toLowerCase();
952
+ this.y = (corner.match(/top|bottom|center/i) || ['inherit'])[0].toLowerCase();
953
+ this.forceY = !!forceY;
954
+
955
+ var f = corner.charAt(0);
956
+ this.precedance = (f === 't' || f === 'b' ? Y : X);
957
+ }).prototype;
958
+
959
+ C.invert = function(z, center) {
960
+ this[z] = this[z] === LEFT ? RIGHT : this[z] === RIGHT ? LEFT : center || this[z];
961
+ };
962
+
963
+ C.string = function(join) {
964
+ var x = this.x, y = this.y;
965
+
966
+ var result = x !== y ?
967
+ (x === 'center' || y !== 'center' && (this.precedance === Y || this.forceY) ?
968
+ [y,x] : [x,y]
969
+ ) :
970
+ [x];
971
+
972
+ return join !== false ? result.join(' ') : result;
973
+ };
974
+
975
+ C.abbrev = function() {
976
+ var result = this.string(false);
977
+ return result[0].charAt(0) + (result[1] && result[1].charAt(0) || '');
978
+ };
979
+
980
+ C.clone = function() {
981
+ return new CORNER( this.string(), this.forceY );
982
+ };
983
+
984
+ ;
985
+ PROTOTYPE.toggle = function(state, event) {
986
+ var cache = this.cache,
987
+ options = this.options,
988
+ tooltip = this.tooltip;
989
+
990
+ // Try to prevent flickering when tooltip overlaps show element
991
+ if(event) {
992
+ if((/over|enter/).test(event.type) && cache.event && (/out|leave/).test(cache.event.type) &&
993
+ options.show.target.add(event.target).length === options.show.target.length &&
994
+ tooltip.has(event.relatedTarget).length) {
995
+ return this;
996
+ }
997
+
998
+ // Cache event
999
+ cache.event = $.event.fix(event);
1000
+ }
1001
+
1002
+ // If we're currently waiting and we've just hidden... stop it
1003
+ this.waiting && !state && (this.hiddenDuringWait = TRUE);
1004
+
1005
+ // Render the tooltip if showing and it isn't already
1006
+ if(!this.rendered) { return state ? this.render(1) : this; }
1007
+ else if(this.destroyed || this.disabled) { return this; }
1008
+
1009
+ var type = state ? 'show' : 'hide',
1010
+ opts = this.options[type],
1011
+ otherOpts = this.options[ !state ? 'show' : 'hide' ],
1012
+ posOptions = this.options.position,
1013
+ contentOptions = this.options.content,
1014
+ width = this.tooltip.css('width'),
1015
+ visible = this.tooltip.is(':visible'),
1016
+ animate = state || opts.target.length === 1,
1017
+ sameTarget = !event || opts.target.length < 2 || cache.target[0] === event.target,
1018
+ identicalState, allow, showEvent, delay, after;
1019
+
1020
+ // Detect state if valid one isn't provided
1021
+ if((typeof state).search('boolean|number')) { state = !visible; }
1022
+
1023
+ // Check if the tooltip is in an identical state to the new would-be state
1024
+ identicalState = !tooltip.is(':animated') && visible === state && sameTarget;
1025
+
1026
+ // Fire tooltip(show/hide) event and check if destroyed
1027
+ allow = !identicalState ? !!this._trigger(type, [90]) : NULL;
1028
+
1029
+ // Check to make sure the tooltip wasn't destroyed in the callback
1030
+ if(this.destroyed) { return this; }
1031
+
1032
+ // If the user didn't stop the method prematurely and we're showing the tooltip, focus it
1033
+ if(allow !== FALSE && state) { this.focus(event); }
1034
+
1035
+ // If the state hasn't changed or the user stopped it, return early
1036
+ if(!allow || identicalState) { return this; }
1037
+
1038
+ // Set ARIA hidden attribute
1039
+ $.attr(tooltip[0], 'aria-hidden', !!!state);
1040
+
1041
+ // Execute state specific properties
1042
+ if(state) {
1043
+ // Store show origin coordinates
1044
+ this.mouse && (cache.origin = $.event.fix(this.mouse));
1045
+
1046
+ // Update tooltip content & title if it's a dynamic function
1047
+ if($.isFunction(contentOptions.text)) { this._updateContent(contentOptions.text, FALSE); }
1048
+ if($.isFunction(contentOptions.title)) { this._updateTitle(contentOptions.title, FALSE); }
1049
+
1050
+ // Cache mousemove events for positioning purposes (if not already tracking)
1051
+ if(!trackingBound && posOptions.target === 'mouse' && posOptions.adjust.mouse) {
1052
+ $(document).bind('mousemove.'+NAMESPACE, this._storeMouse);
1053
+ trackingBound = TRUE;
1054
+ }
1055
+
1056
+ // Update the tooltip position (set width first to prevent viewport/max-width issues)
1057
+ if(!width) { tooltip.css('width', tooltip.outerWidth(FALSE)); }
1058
+ this.reposition(event, arguments[2]);
1059
+ if(!width) { tooltip.css('width', ''); }
1060
+
1061
+ // Hide other tooltips if tooltip is solo
1062
+ if(!!opts.solo) {
1063
+ (typeof opts.solo === 'string' ? $(opts.solo) : $(SELECTOR, opts.solo))
1064
+ .not(tooltip).not(opts.target).qtip('hide', $.Event('tooltipsolo'));
1065
+ }
1066
+ }
1067
+ else {
1068
+ // Clear show timer if we're hiding
1069
+ clearTimeout(this.timers.show);
1070
+
1071
+ // Remove cached origin on hide
1072
+ delete cache.origin;
1073
+
1074
+ // Remove mouse tracking event if not needed (all tracking qTips are hidden)
1075
+ if(trackingBound && !$(SELECTOR+'[tracking="true"]:visible', opts.solo).not(tooltip).length) {
1076
+ $(document).unbind('mousemove.'+NAMESPACE);
1077
+ trackingBound = FALSE;
1078
+ }
1079
+
1080
+ // Blur the tooltip
1081
+ this.blur(event);
1082
+ }
1083
+
1084
+ // Define post-animation, state specific properties
1085
+ after = $.proxy(function() {
1086
+ if(state) {
1087
+ // Prevent antialias from disappearing in IE by removing filter
1088
+ if(BROWSER.ie) { tooltip[0].style.removeAttribute('filter'); }
1089
+
1090
+ // Remove overflow setting to prevent tip bugs
1091
+ tooltip.css('overflow', '');
1092
+
1093
+ // Autofocus elements if enabled
1094
+ if('string' === typeof opts.autofocus) {
1095
+ $(this.options.show.autofocus, tooltip).focus();
1096
+ }
1097
+
1098
+ // If set, hide tooltip when inactive for delay period
1099
+ this.options.show.target.trigger('qtip-'+this.id+'-inactive');
1100
+ }
1101
+ else {
1102
+ // Reset CSS states
1103
+ tooltip.css({
1104
+ display: '',
1105
+ visibility: '',
1106
+ opacity: '',
1107
+ left: '',
1108
+ top: ''
1109
+ });
1110
+ }
1111
+
1112
+ // tooltipvisible/tooltiphidden events
1113
+ this._trigger(state ? 'visible' : 'hidden');
1114
+ }, this);
1115
+
1116
+ // If no effect type is supplied, use a simple toggle
1117
+ if(opts.effect === FALSE || animate === FALSE) {
1118
+ tooltip[ type ]();
1119
+ after();
1120
+ }
1121
+
1122
+ // Use custom function if provided
1123
+ else if($.isFunction(opts.effect)) {
1124
+ tooltip.stop(1, 1);
1125
+ opts.effect.call(tooltip, this);
1126
+ tooltip.queue('fx', function(n) {
1127
+ after(); n();
1128
+ });
1129
+ }
1130
+
1131
+ // Use basic fade function by default
1132
+ else { tooltip.fadeTo(90, state ? 1 : 0, after); }
1133
+
1134
+ // If inactive hide method is set, active it
1135
+ if(state) { opts.target.trigger('qtip-'+this.id+'-inactive'); }
1136
+
1137
+ return this;
1138
+ };
1139
+
1140
+ PROTOTYPE.show = function(event) { return this.toggle(TRUE, event); };
1141
+
1142
+ PROTOTYPE.hide = function(event) { return this.toggle(FALSE, event); };
1143
+ ;PROTOTYPE.focus = function(event) {
1144
+ if(!this.rendered || this.destroyed) { return this; }
1145
+
1146
+ var qtips = $(SELECTOR),
1147
+ tooltip = this.tooltip,
1148
+ curIndex = parseInt(tooltip[0].style.zIndex, 10),
1149
+ newIndex = QTIP.zindex + qtips.length,
1150
+ focusedElem;
1151
+
1152
+ // Only update the z-index if it has changed and tooltip is not already focused
1153
+ if(!tooltip.hasClass(CLASS_FOCUS)) {
1154
+ // tooltipfocus event
1155
+ if(this._trigger('focus', [newIndex], event)) {
1156
+ // Only update z-index's if they've changed
1157
+ if(curIndex !== newIndex) {
1158
+ // Reduce our z-index's and keep them properly ordered
1159
+ qtips.each(function() {
1160
+ if(this.style.zIndex > curIndex) {
1161
+ this.style.zIndex = this.style.zIndex - 1;
1162
+ }
1163
+ });
1164
+
1165
+ // Fire blur event for focused tooltip
1166
+ qtips.filter('.' + CLASS_FOCUS).qtip('blur', event);
1167
+ }
1168
+
1169
+ // Set the new z-index
1170
+ tooltip.addClass(CLASS_FOCUS)[0].style.zIndex = newIndex;
1171
+ }
1172
+ }
1173
+
1174
+ return this;
1175
+ };
1176
+
1177
+ PROTOTYPE.blur = function(event) {
1178
+ if(!this.rendered || this.destroyed) { return this; }
1179
+
1180
+ // Set focused status to FALSE
1181
+ this.tooltip.removeClass(CLASS_FOCUS);
1182
+
1183
+ // tooltipblur event
1184
+ this._trigger('blur', [ this.tooltip.css('zIndex') ], event);
1185
+
1186
+ return this;
1187
+ };
1188
+ ;PROTOTYPE.disable = function(state) {
1189
+ if(this.destroyed) { return this; }
1190
+
1191
+ // If 'toggle' is passed, toggle the current state
1192
+ if(state === 'toggle') {
1193
+ state = !(this.rendered ? this.tooltip.hasClass(CLASS_DISABLED) : this.disabled);
1194
+ }
1195
+
1196
+ // Disable if no state passed
1197
+ else if('boolean' !== typeof state) {
1198
+ state = TRUE;
1199
+ }
1200
+
1201
+ if(this.rendered) {
1202
+ this.tooltip.toggleClass(CLASS_DISABLED, state)
1203
+ .attr('aria-disabled', state);
1204
+ }
1205
+
1206
+ this.disabled = !!state;
1207
+
1208
+ return this;
1209
+ };
1210
+
1211
+ PROTOTYPE.enable = function() { return this.disable(FALSE); };
1212
+ ;PROTOTYPE._createButton = function()
1213
+ {
1214
+ var self = this,
1215
+ elements = this.elements,
1216
+ tooltip = elements.tooltip,
1217
+ button = this.options.content.button,
1218
+ isString = typeof button === 'string',
1219
+ close = isString ? button : 'Close tooltip';
1220
+
1221
+ if(elements.button) { elements.button.remove(); }
1222
+
1223
+ // Use custom button if one was supplied by user, else use default
1224
+ if(button.jquery) {
1225
+ elements.button = button;
1226
+ }
1227
+ else {
1228
+ elements.button = $('<a />', {
1229
+ 'class': 'qtip-close ' + (this.options.style.widget ? '' : NAMESPACE+'-icon'),
1230
+ 'title': close,
1231
+ 'aria-label': close
1232
+ })
1233
+ .prepend(
1234
+ $('<span />', {
1235
+ 'class': 'ui-icon ui-icon-close',
1236
+ 'html': '&times;'
1237
+ })
1238
+ );
1239
+ }
1240
+
1241
+ // Create button and setup attributes
1242
+ elements.button.appendTo(elements.titlebar || tooltip)
1243
+ .attr('role', 'button')
1244
+ .click(function(event) {
1245
+ if(!tooltip.hasClass(CLASS_DISABLED)) { self.hide(event); }
1246
+ return FALSE;
1247
+ });
1248
+ };
1249
+
1250
+ PROTOTYPE._updateButton = function(button)
1251
+ {
1252
+ // Make sure tooltip is rendered and if not, return
1253
+ if(!this.rendered) { return FALSE; }
1254
+
1255
+ var elem = this.elements.button;
1256
+ if(button) { this._createButton(); }
1257
+ else { elem.remove(); }
1258
+ };
1259
+ ;// Widget class creator
1260
+ function createWidgetClass(cls) {
1261
+ return WIDGET.concat('').join(cls ? '-'+cls+' ' : ' ');
1262
+ }
1263
+
1264
+ // Widget class setter method
1265
+ PROTOTYPE._setWidget = function()
1266
+ {
1267
+ var on = this.options.style.widget,
1268
+ elements = this.elements,
1269
+ tooltip = elements.tooltip,
1270
+ disabled = tooltip.hasClass(CLASS_DISABLED);
1271
+
1272
+ tooltip.removeClass(CLASS_DISABLED);
1273
+ CLASS_DISABLED = on ? 'ui-state-disabled' : 'qtip-disabled';
1274
+ tooltip.toggleClass(CLASS_DISABLED, disabled);
1275
+
1276
+ tooltip.toggleClass('ui-helper-reset '+createWidgetClass(), on).toggleClass(CLASS_DEFAULT, this.options.style.def && !on);
1277
+
1278
+ if(elements.content) {
1279
+ elements.content.toggleClass( createWidgetClass('content'), on);
1280
+ }
1281
+ if(elements.titlebar) {
1282
+ elements.titlebar.toggleClass( createWidgetClass('header'), on);
1283
+ }
1284
+ if(elements.button) {
1285
+ elements.button.toggleClass(NAMESPACE+'-icon', !on);
1286
+ }
1287
+ };
1288
+ ;function delay(callback, duration) {
1289
+ // If tooltip has displayed, start hide timer
1290
+ if(duration > 0) {
1291
+ return setTimeout(
1292
+ $.proxy(callback, this), duration
1293
+ );
1294
+ }
1295
+ else{ callback.call(this); }
1296
+ }
1297
+
1298
+ function showMethod(event) {
1299
+ if(this.tooltip.hasClass(CLASS_DISABLED)) { return; }
1300
+
1301
+ // Clear hide timers
1302
+ clearTimeout(this.timers.show);
1303
+ clearTimeout(this.timers.hide);
1304
+
1305
+ // Start show timer
1306
+ this.timers.show = delay.call(this,
1307
+ function() { this.toggle(TRUE, event); },
1308
+ this.options.show.delay
1309
+ );
1310
+ }
1311
+
1312
+ function hideMethod(event) {
1313
+ if(this.tooltip.hasClass(CLASS_DISABLED) || this.destroyed) { return; }
1314
+
1315
+ // Check if new target was actually the tooltip element
1316
+ var relatedTarget = $(event.relatedTarget),
1317
+ ontoTooltip = relatedTarget.closest(SELECTOR)[0] === this.tooltip[0],
1318
+ ontoTarget = relatedTarget[0] === this.options.show.target[0];
1319
+
1320
+ // Clear timers and stop animation queue
1321
+ clearTimeout(this.timers.show);
1322
+ clearTimeout(this.timers.hide);
1323
+
1324
+ // Prevent hiding if tooltip is fixed and event target is the tooltip.
1325
+ // Or if mouse positioning is enabled and cursor momentarily overlaps
1326
+ if(this !== relatedTarget[0] &&
1327
+ (this.options.position.target === 'mouse' && ontoTooltip) ||
1328
+ (this.options.hide.fixed && (
1329
+ (/mouse(out|leave|move)/).test(event.type) && (ontoTooltip || ontoTarget))
1330
+ ))
1331
+ {
1332
+ try {
1333
+ event.preventDefault();
1334
+ event.stopImmediatePropagation();
1335
+ } catch(e) {}
1336
+
1337
+ return;
1338
+ }
1339
+
1340
+ // If tooltip has displayed, start hide timer
1341
+ this.timers.hide = delay.call(this,
1342
+ function() { this.toggle(FALSE, event); },
1343
+ this.options.hide.delay,
1344
+ this
1345
+ );
1346
+ }
1347
+
1348
+ function inactiveMethod(event) {
1349
+ if(this.tooltip.hasClass(CLASS_DISABLED) || !this.options.hide.inactive) { return; }
1350
+
1351
+ // Clear timer
1352
+ clearTimeout(this.timers.inactive);
1353
+
1354
+ this.timers.inactive = delay.call(this,
1355
+ function(){ this.hide(event); },
1356
+ this.options.hide.inactive
1357
+ );
1358
+ }
1359
+
1360
+ function repositionMethod(event) {
1361
+ if(this.rendered && this.tooltip[0].offsetWidth > 0) { this.reposition(event); }
1362
+ }
1363
+
1364
+ // Store mouse coordinates
1365
+ PROTOTYPE._storeMouse = function(event) {
1366
+ (this.mouse = $.event.fix(event)).type = 'mousemove';
1367
+ return this;
1368
+ };
1369
+
1370
+ // Bind events
1371
+ PROTOTYPE._bind = function(targets, events, method, suffix, context) {
1372
+ if(!targets || !method || !events.length) { return; }
1373
+ var ns = '.' + this._id + (suffix ? '-'+suffix : '');
1374
+ $(targets).bind(
1375
+ (events.split ? events : events.join(ns + ' ')) + ns,
1376
+ $.proxy(method, context || this)
1377
+ );
1378
+ return this;
1379
+ };
1380
+ PROTOTYPE._unbind = function(targets, suffix) {
1381
+ targets && $(targets).unbind('.' + this._id + (suffix ? '-'+suffix : ''));
1382
+ return this;
1383
+ };
1384
+
1385
+ // Global delegation helper
1386
+ function delegate(selector, events, method) {
1387
+ $(document.body).delegate(selector,
1388
+ (events.split ? events : events.join('.'+NAMESPACE + ' ')) + '.'+NAMESPACE,
1389
+ function() {
1390
+ var api = QTIP.api[ $.attr(this, ATTR_ID) ];
1391
+ api && !api.disabled && method.apply(api, arguments);
1392
+ }
1393
+ );
1394
+ }
1395
+ // Event trigger
1396
+ PROTOTYPE._trigger = function(type, args, event) {
1397
+ var callback = $.Event('tooltip'+type);
1398
+ callback.originalEvent = (event && $.extend({}, event)) || this.cache.event || NULL;
1399
+
1400
+ this.triggering = type;
1401
+ this.tooltip.trigger(callback, [this].concat(args || []));
1402
+ this.triggering = FALSE;
1403
+
1404
+ return !callback.isDefaultPrevented();
1405
+ };
1406
+
1407
+ PROTOTYPE._bindEvents = function(showEvents, hideEvents, showTargets, hideTargets, showMethod, hideMethod) {
1408
+ // Get tasrgets that lye within both
1409
+ var similarTargets = showTargets.filter( hideTargets ).add( hideTargets.filter(showTargets) ),
1410
+ toggleEvents = [];
1411
+
1412
+ // If hide and show targets are the same...
1413
+ if(similarTargets.length) {
1414
+
1415
+ // Filter identical show/hide events
1416
+ $.each(hideEvents, function(i, type) {
1417
+ var showIndex = $.inArray(type, showEvents);
1418
+
1419
+ // Both events are identical, remove from both hide and show events
1420
+ // and append to toggleEvents
1421
+ showIndex > -1 && toggleEvents.push( showEvents.splice( showIndex, 1 )[0] );
1422
+ });
1423
+
1424
+ // Toggle events are special case of identical show/hide events, which happen in sequence
1425
+ if(toggleEvents.length) {
1426
+ // Bind toggle events to the similar targets
1427
+ this._bind(similarTargets, toggleEvents, function(event) {
1428
+ var state = this.rendered ? this.tooltip[0].offsetWidth > 0 : false;
1429
+ (state ? hideMethod : showMethod).call(this, event);
1430
+ });
1431
+
1432
+ // Remove the similar targets from the regular show/hide bindings
1433
+ showTargets = showTargets.not(similarTargets);
1434
+ hideTargets = hideTargets.not(similarTargets);
1435
+ }
1436
+ }
1437
+
1438
+ // Apply show/hide/toggle events
1439
+ this._bind(showTargets, showEvents, showMethod);
1440
+ this._bind(hideTargets, hideEvents, hideMethod);
1441
+ };
1442
+
1443
+ PROTOTYPE._assignInitialEvents = function(event) {
1444
+ var options = this.options,
1445
+ showTarget = options.show.target,
1446
+ hideTarget = options.hide.target,
1447
+ showEvents = options.show.event ? $.trim('' + options.show.event).split(' ') : [],
1448
+ hideEvents = options.hide.event ? $.trim('' + options.hide.event).split(' ') : [];
1449
+
1450
+ // Catch remove/removeqtip events on target element to destroy redundant tooltips
1451
+ this._bind(this.elements.target, ['remove', 'removeqtip'], function(event) {
1452
+ this.destroy(true);
1453
+ }, 'destroy');
1454
+
1455
+ /*
1456
+ * Make sure hoverIntent functions properly by using mouseleave as a hide event if
1457
+ * mouseenter/mouseout is used for show.event, even if it isn't in the users options.
1458
+ */
1459
+ if(/mouse(over|enter)/i.test(options.show.event) && !/mouse(out|leave)/i.test(options.hide.event)) {
1460
+ hideEvents.push('mouseleave');
1461
+ }
1462
+
1463
+ /*
1464
+ * Also make sure initial mouse targetting works correctly by caching mousemove coords
1465
+ * on show targets before the tooltip has rendered. Also set onTarget when triggered to
1466
+ * keep mouse tracking working.
1467
+ */
1468
+ this._bind(showTarget, 'mousemove', function(event) {
1469
+ this._storeMouse(event);
1470
+ this.cache.onTarget = TRUE;
1471
+ });
1472
+
1473
+ // Define hoverIntent function
1474
+ function hoverIntent(event) {
1475
+ // Only continue if tooltip isn't disabled
1476
+ if(this.disabled || this.destroyed) { return FALSE; }
1477
+
1478
+ // Cache the event data
1479
+ this.cache.event = event && $.event.fix(event);
1480
+ this.cache.target = event && $(event.target);
1481
+
1482
+ // Start the event sequence
1483
+ clearTimeout(this.timers.show);
1484
+ this.timers.show = delay.call(this,
1485
+ function() { this.render(typeof event === 'object' || options.show.ready); },
1486
+ options.prerender ? 0 : options.show.delay
1487
+ );
1488
+ }
1489
+
1490
+ // Filter and bind events
1491
+ this._bindEvents(showEvents, hideEvents, showTarget, hideTarget, hoverIntent, function() {
1492
+ if(!this.timers) { return FALSE; }
1493
+ clearTimeout(this.timers.show);
1494
+ });
1495
+
1496
+ // Prerendering is enabled, create tooltip now
1497
+ if(options.show.ready || options.prerender) { hoverIntent.call(this, event); }
1498
+ };
1499
+
1500
+ // Event assignment method
1501
+ PROTOTYPE._assignEvents = function() {
1502
+ var self = this,
1503
+ options = this.options,
1504
+ posOptions = options.position,
1505
+
1506
+ tooltip = this.tooltip,
1507
+ showTarget = options.show.target,
1508
+ hideTarget = options.hide.target,
1509
+ containerTarget = posOptions.container,
1510
+ viewportTarget = posOptions.viewport,
1511
+ documentTarget = $(document),
1512
+ bodyTarget = $(document.body),
1513
+ windowTarget = $(window),
1514
+
1515
+ showEvents = options.show.event ? $.trim('' + options.show.event).split(' ') : [],
1516
+ hideEvents = options.hide.event ? $.trim('' + options.hide.event).split(' ') : [];
1517
+
1518
+
1519
+ // Assign passed event callbacks
1520
+ $.each(options.events, function(name, callback) {
1521
+ self._bind(tooltip, name === 'toggle' ? ['tooltipshow','tooltiphide'] : ['tooltip'+name], callback, null, tooltip);
1522
+ });
1523
+
1524
+ // Hide tooltips when leaving current window/frame (but not select/option elements)
1525
+ if(/mouse(out|leave)/i.test(options.hide.event) && options.hide.leave === 'window') {
1526
+ this._bind(documentTarget, ['mouseout', 'blur'], function(event) {
1527
+ if(!/select|option/.test(event.target.nodeName) && !event.relatedTarget) {
1528
+ this.hide(event);
1529
+ }
1530
+ });
1531
+ }
1532
+
1533
+ // Enable hide.fixed by adding appropriate class
1534
+ if(options.hide.fixed) {
1535
+ hideTarget = hideTarget.add( tooltip.addClass(CLASS_FIXED) );
1536
+ }
1537
+
1538
+ /*
1539
+ * Make sure hoverIntent functions properly by using mouseleave to clear show timer if
1540
+ * mouseenter/mouseout is used for show.event, even if it isn't in the users options.
1541
+ */
1542
+ else if(/mouse(over|enter)/i.test(options.show.event)) {
1543
+ this._bind(hideTarget, 'mouseleave', function() {
1544
+ clearTimeout(this.timers.show);
1545
+ });
1546
+ }
1547
+
1548
+ // Hide tooltip on document mousedown if unfocus events are enabled
1549
+ if(('' + options.hide.event).indexOf('unfocus') > -1) {
1550
+ this._bind(containerTarget.closest('html'), ['mousedown', 'touchstart'], function(event) {
1551
+ var elem = $(event.target),
1552
+ enabled = this.rendered && !this.tooltip.hasClass(CLASS_DISABLED) && this.tooltip[0].offsetWidth > 0,
1553
+ isAncestor = elem.parents(SELECTOR).filter(this.tooltip[0]).length > 0;
1554
+
1555
+ if(elem[0] !== this.target[0] && elem[0] !== this.tooltip[0] && !isAncestor &&
1556
+ !this.target.has(elem[0]).length && enabled
1557
+ ) {
1558
+ this.hide(event);
1559
+ }
1560
+ });
1561
+ }
1562
+
1563
+ // Check if the tooltip hides when inactive
1564
+ if('number' === typeof options.hide.inactive) {
1565
+ // Bind inactive method to show target(s) as a custom event
1566
+ this._bind(showTarget, 'qtip-'+this.id+'-inactive', inactiveMethod, 'inactive');
1567
+
1568
+ // Define events which reset the 'inactive' event handler
1569
+ this._bind(hideTarget.add(tooltip), QTIP.inactiveEvents, inactiveMethod);
1570
+ }
1571
+
1572
+ // Filter and bind events
1573
+ this._bindEvents(showEvents, hideEvents, showTarget, hideTarget, showMethod, hideMethod);
1574
+
1575
+ // Mouse movement bindings
1576
+ this._bind(showTarget.add(tooltip), 'mousemove', function(event) {
1577
+ // Check if the tooltip hides when mouse is moved a certain distance
1578
+ if('number' === typeof options.hide.distance) {
1579
+ var origin = this.cache.origin || {},
1580
+ limit = this.options.hide.distance,
1581
+ abs = Math.abs;
1582
+
1583
+ // Check if the movement has gone beyond the limit, and hide it if so
1584
+ if(abs(event.pageX - origin.pageX) >= limit || abs(event.pageY - origin.pageY) >= limit) {
1585
+ this.hide(event);
1586
+ }
1587
+ }
1588
+
1589
+ // Cache mousemove coords on show targets
1590
+ this._storeMouse(event);
1591
+ });
1592
+
1593
+ // Mouse positioning events
1594
+ if(posOptions.target === 'mouse') {
1595
+ // If mouse adjustment is on...
1596
+ if(posOptions.adjust.mouse) {
1597
+ // Apply a mouseleave event so we don't get problems with overlapping
1598
+ if(options.hide.event) {
1599
+ // Track if we're on the target or not
1600
+ this._bind(showTarget, ['mouseenter', 'mouseleave'], function(event) {
1601
+ if(!this.cache) {return FALSE; }
1602
+ this.cache.onTarget = event.type === 'mouseenter';
1603
+ });
1604
+ }
1605
+
1606
+ // Update tooltip position on mousemove
1607
+ this._bind(documentTarget, 'mousemove', function(event) {
1608
+ // Update the tooltip position only if the tooltip is visible and adjustment is enabled
1609
+ if(this.rendered && this.cache.onTarget && !this.tooltip.hasClass(CLASS_DISABLED) && this.tooltip[0].offsetWidth > 0) {
1610
+ this.reposition(event);
1611
+ }
1612
+ });
1613
+ }
1614
+ }
1615
+
1616
+ // Adjust positions of the tooltip on window resize if enabled
1617
+ if(posOptions.adjust.resize || viewportTarget.length) {
1618
+ this._bind( $.event.special.resize ? viewportTarget : windowTarget, 'resize', repositionMethod );
1619
+ }
1620
+
1621
+ // Adjust tooltip position on scroll of the window or viewport element if present
1622
+ if(posOptions.adjust.scroll) {
1623
+ this._bind( windowTarget.add(posOptions.container), 'scroll', repositionMethod );
1624
+ }
1625
+ };
1626
+
1627
+ // Un-assignment method
1628
+ PROTOTYPE._unassignEvents = function() {
1629
+ var options = this.options,
1630
+ showTargets = options.show.target,
1631
+ hideTargets = options.hide.target,
1632
+ targets = $.grep([
1633
+ this.elements.target[0],
1634
+ this.rendered && this.tooltip[0],
1635
+ options.position.container[0],
1636
+ options.position.viewport[0],
1637
+ options.position.container.closest('html')[0], // unfocus
1638
+ window,
1639
+ document
1640
+ ], function(i) {
1641
+ return typeof i === 'object';
1642
+ });
1643
+
1644
+ // Add show and hide targets if they're valid
1645
+ if(showTargets && showTargets.toArray) {
1646
+ targets = targets.concat(showTargets.toArray());
1647
+ }
1648
+ if(hideTargets && hideTargets.toArray) {
1649
+ targets = targets.concat(hideTargets.toArray());
1650
+ }
1651
+
1652
+ // Unbind the events
1653
+ this._unbind(targets)
1654
+ ._unbind(targets, 'destroy')
1655
+ ._unbind(targets, 'inactive');
1656
+ };
1657
+
1658
+ // Apply common event handlers using delegate (avoids excessive .bind calls!)
1659
+ $(function() {
1660
+ delegate(SELECTOR, ['mouseenter', 'mouseleave'], function(event) {
1661
+ var state = event.type === 'mouseenter',
1662
+ tooltip = $(event.currentTarget),
1663
+ target = $(event.relatedTarget || event.target),
1664
+ options = this.options;
1665
+
1666
+ // On mouseenter...
1667
+ if(state) {
1668
+ // Focus the tooltip on mouseenter (z-index stacking)
1669
+ this.focus(event);
1670
+
1671
+ // Clear hide timer on tooltip hover to prevent it from closing
1672
+ tooltip.hasClass(CLASS_FIXED) && !tooltip.hasClass(CLASS_DISABLED) && clearTimeout(this.timers.hide);
1673
+ }
1674
+
1675
+ // On mouseleave...
1676
+ else {
1677
+ // When mouse tracking is enabled, hide when we leave the tooltip and not onto the show target (if a hide event is set)
1678
+ if(options.position.target === 'mouse' && options.position.adjust.mouse &&
1679
+ options.hide.event && options.show.target && !target.closest(options.show.target[0]).length) {
1680
+ this.hide(event);
1681
+ }
1682
+ }
1683
+
1684
+ // Add hover class
1685
+ tooltip.toggleClass(CLASS_HOVER, state);
1686
+ });
1687
+
1688
+ // Define events which reset the 'inactive' event handler
1689
+ delegate('['+ATTR_ID+']', INACTIVE_EVENTS, inactiveMethod);
1690
+ });
1691
+ ;// Initialization method
1692
+ function init(elem, id, opts) {
1693
+ var obj, posOptions, attr, config, title,
1694
+
1695
+ // Setup element references
1696
+ docBody = $(document.body),
1697
+
1698
+ // Use document body instead of document element if needed
1699
+ newTarget = elem[0] === document ? docBody : elem,
1700
+
1701
+ // Grab metadata from element if plugin is present
1702
+ metadata = (elem.metadata) ? elem.metadata(opts.metadata) : NULL,
1703
+
1704
+ // If metadata type if HTML5, grab 'name' from the object instead, or use the regular data object otherwise
1705
+ metadata5 = opts.metadata.type === 'html5' && metadata ? metadata[opts.metadata.name] : NULL,
1706
+
1707
+ // Grab data from metadata.name (or data-qtipopts as fallback) using .data() method,
1708
+ html5 = elem.data(opts.metadata.name || 'qtipopts');
1709
+
1710
+ // If we don't get an object returned attempt to parse it manualyl without parseJSON
1711
+ try { html5 = typeof html5 === 'string' ? $.parseJSON(html5) : html5; } catch(e) {}
1712
+
1713
+ // Merge in and sanitize metadata
1714
+ config = $.extend(TRUE, {}, QTIP.defaults, opts,
1715
+ typeof html5 === 'object' ? sanitizeOptions(html5) : NULL,
1716
+ sanitizeOptions(metadata5 || metadata));
1717
+
1718
+ // Re-grab our positioning options now we've merged our metadata and set id to passed value
1719
+ posOptions = config.position;
1720
+ config.id = id;
1721
+
1722
+ // Setup missing content if none is detected
1723
+ if('boolean' === typeof config.content.text) {
1724
+ attr = elem.attr(config.content.attr);
1725
+
1726
+ // Grab from supplied attribute if available
1727
+ if(config.content.attr !== FALSE && attr) { config.content.text = attr; }
1728
+
1729
+ // No valid content was found, abort render
1730
+ else { return FALSE; }
1731
+ }
1732
+
1733
+ // Setup target options
1734
+ if(!posOptions.container.length) { posOptions.container = docBody; }
1735
+ if(posOptions.target === FALSE) { posOptions.target = newTarget; }
1736
+ if(config.show.target === FALSE) { config.show.target = newTarget; }
1737
+ if(config.show.solo === TRUE) { config.show.solo = posOptions.container.closest('body'); }
1738
+ if(config.hide.target === FALSE) { config.hide.target = newTarget; }
1739
+ if(config.position.viewport === TRUE) { config.position.viewport = posOptions.container; }
1740
+
1741
+ // Ensure we only use a single container
1742
+ posOptions.container = posOptions.container.eq(0);
1743
+
1744
+ // Convert position corner values into x and y strings
1745
+ posOptions.at = new CORNER(posOptions.at, TRUE);
1746
+ posOptions.my = new CORNER(posOptions.my);
1747
+
1748
+ // Destroy previous tooltip if overwrite is enabled, or skip element if not
1749
+ if(elem.data(NAMESPACE)) {
1750
+ if(config.overwrite) {
1751
+ elem.qtip('destroy', true);
1752
+ }
1753
+ else if(config.overwrite === FALSE) {
1754
+ return FALSE;
1755
+ }
1756
+ }
1757
+
1758
+ // Add has-qtip attribute
1759
+ elem.attr(ATTR_HAS, id);
1760
+
1761
+ // Remove title attribute and store it if present
1762
+ if(config.suppress && (title = elem.attr('title'))) {
1763
+ // Final attr call fixes event delegatiom and IE default tooltip showing problem
1764
+ elem.removeAttr('title').attr(oldtitle, title).attr('title', '');
1765
+ }
1766
+
1767
+ // Initialize the tooltip and add API reference
1768
+ obj = new QTip(elem, config, id, !!attr);
1769
+ elem.data(NAMESPACE, obj);
1770
+
1771
+ return obj;
1772
+ }
1773
+
1774
+ // jQuery $.fn extension method
1775
+ QTIP = $.fn.qtip = function(options, notation, newValue)
1776
+ {
1777
+ var command = ('' + options).toLowerCase(), // Parse command
1778
+ returned = NULL,
1779
+ args = $.makeArray(arguments).slice(1),
1780
+ event = args[args.length - 1],
1781
+ opts = this[0] ? $.data(this[0], NAMESPACE) : NULL;
1782
+
1783
+ // Check for API request
1784
+ if((!arguments.length && opts) || command === 'api') {
1785
+ return opts;
1786
+ }
1787
+
1788
+ // Execute API command if present
1789
+ else if('string' === typeof options) {
1790
+ this.each(function() {
1791
+ var api = $.data(this, NAMESPACE);
1792
+ if(!api) { return TRUE; }
1793
+
1794
+ // Cache the event if possible
1795
+ if(event && event.timeStamp) { api.cache.event = event; }
1796
+
1797
+ // Check for specific API commands
1798
+ if(notation && (command === 'option' || command === 'options')) {
1799
+ if(newValue !== undefined || $.isPlainObject(notation)) {
1800
+ api.set(notation, newValue);
1801
+ }
1802
+ else {
1803
+ returned = api.get(notation);
1804
+ return FALSE;
1805
+ }
1806
+ }
1807
+
1808
+ // Execute API command
1809
+ else if(api[command]) {
1810
+ api[command].apply(api, args);
1811
+ }
1812
+ });
1813
+
1814
+ return returned !== NULL ? returned : this;
1815
+ }
1816
+
1817
+ // No API commands. validate provided options and setup qTips
1818
+ else if('object' === typeof options || !arguments.length) {
1819
+ // Sanitize options first
1820
+ opts = sanitizeOptions($.extend(TRUE, {}, options));
1821
+
1822
+ return this.each(function(i) {
1823
+ var api, id;
1824
+
1825
+ // Find next available ID, or use custom ID if provided
1826
+ id = $.isArray(opts.id) ? opts.id[i] : opts.id;
1827
+ id = !id || id === FALSE || id.length < 1 || QTIP.api[id] ? QTIP.nextid++ : id;
1828
+
1829
+ // Initialize the qTip and re-grab newly sanitized options
1830
+ api = init($(this), id, opts);
1831
+ if(api === FALSE) { return TRUE; }
1832
+ else { QTIP.api[id] = api; }
1833
+
1834
+ // Initialize plugins
1835
+ $.each(PLUGINS, function() {
1836
+ if(this.initialize === 'initialize') { this(api); }
1837
+ });
1838
+
1839
+ // Assign initial pre-render events
1840
+ api._assignInitialEvents(event);
1841
+ });
1842
+ }
1843
+ };
1844
+
1845
+ // Expose class
1846
+ $.qtip = QTip;
1847
+
1848
+ // Populated in render method
1849
+ QTIP.api = {};
1850
+ ;$.each({
1851
+ /* Allow other plugins to successfully retrieve the title of an element with a qTip applied */
1852
+ attr: function(attr, val) {
1853
+ if(this.length) {
1854
+ var self = this[0],
1855
+ title = 'title',
1856
+ api = $.data(self, 'qtip');
1857
+
1858
+ if(attr === title && api && 'object' === typeof api && api.options.suppress) {
1859
+ if(arguments.length < 2) {
1860
+ return $.attr(self, oldtitle);
1861
+ }
1862
+
1863
+ // If qTip is rendered and title was originally used as content, update it
1864
+ if(api && api.options.content.attr === title && api.cache.attr) {
1865
+ api.set('content.text', val);
1866
+ }
1867
+
1868
+ // Use the regular attr method to set, then cache the result
1869
+ return this.attr(oldtitle, val);
1870
+ }
1871
+ }
1872
+
1873
+ return $.fn['attr'+replaceSuffix].apply(this, arguments);
1874
+ },
1875
+
1876
+ /* Allow clone to correctly retrieve cached title attributes */
1877
+ clone: function(keepData) {
1878
+ var titles = $([]), title = 'title',
1879
+
1880
+ // Clone our element using the real clone method
1881
+ elems = $.fn['clone'+replaceSuffix].apply(this, arguments);
1882
+
1883
+ // Grab all elements with an oldtitle set, and change it to regular title attribute, if keepData is false
1884
+ if(!keepData) {
1885
+ elems.filter('['+oldtitle+']').attr('title', function() {
1886
+ return $.attr(this, oldtitle);
1887
+ })
1888
+ .removeAttr(oldtitle);
1889
+ }
1890
+
1891
+ return elems;
1892
+ }
1893
+ }, function(name, func) {
1894
+ if(!func || $.fn[name+replaceSuffix]) { return TRUE; }
1895
+
1896
+ var old = $.fn[name+replaceSuffix] = $.fn[name];
1897
+ $.fn[name] = function() {
1898
+ return func.apply(this, arguments) || old.apply(this, arguments);
1899
+ };
1900
+ });
1901
+
1902
+ /* Fire off 'removeqtip' handler in $.cleanData if jQuery UI not present (it already does similar).
1903
+ * This snippet is taken directly from jQuery UI source code found here:
1904
+ * http://code.jquery.com/ui/jquery-ui-git.js
1905
+ */
1906
+ if(!$.ui) {
1907
+ $['cleanData'+replaceSuffix] = $.cleanData;
1908
+ $.cleanData = function( elems ) {
1909
+ for(var i = 0, elem; (elem = $( elems[i] )).length; i++) {
1910
+ if(elem.attr(ATTR_HAS)) {
1911
+ try { elem.triggerHandler('removeqtip'); }
1912
+ catch( e ) {}
1913
+ }
1914
+ }
1915
+ $['cleanData'+replaceSuffix].apply(this, arguments);
1916
+ };
1917
+ }
1918
+ ;// qTip version
1919
+ QTIP.version = '2.2.1';
1920
+
1921
+ // Base ID for all qTips
1922
+ QTIP.nextid = 0;
1923
+
1924
+ // Inactive events array
1925
+ QTIP.inactiveEvents = INACTIVE_EVENTS;
1926
+
1927
+ // Base z-index for all qTips
1928
+ QTIP.zindex = 15000;
1929
+
1930
+ // Define configuration defaults
1931
+ QTIP.defaults = {
1932
+ prerender: FALSE,
1933
+ id: FALSE,
1934
+ overwrite: TRUE,
1935
+ suppress: TRUE,
1936
+ content: {
1937
+ text: TRUE,
1938
+ attr: 'title',
1939
+ title: FALSE,
1940
+ button: FALSE
1941
+ },
1942
+ position: {
1943
+ my: 'top left',
1944
+ at: 'bottom right',
1945
+ target: FALSE,
1946
+ container: FALSE,
1947
+ viewport: FALSE,
1948
+ adjust: {
1949
+ x: 0, y: 0,
1950
+ mouse: TRUE,
1951
+ scroll: TRUE,
1952
+ resize: TRUE,
1953
+ method: 'flipinvert flipinvert'
1954
+ },
1955
+ effect: function(api, pos, viewport) {
1956
+ $(this).animate(pos, {
1957
+ duration: 200,
1958
+ queue: FALSE
1959
+ });
1960
+ }
1961
+ },
1962
+ show: {
1963
+ target: FALSE,
1964
+ event: 'mouseenter',
1965
+ effect: TRUE,
1966
+ delay: 90,
1967
+ solo: FALSE,
1968
+ ready: FALSE,
1969
+ autofocus: FALSE
1970
+ },
1971
+ hide: {
1972
+ target: FALSE,
1973
+ event: 'mouseleave',
1974
+ effect: TRUE,
1975
+ delay: 0,
1976
+ fixed: FALSE,
1977
+ inactive: FALSE,
1978
+ leave: 'window',
1979
+ distance: FALSE
1980
+ },
1981
+ style: {
1982
+ classes: '',
1983
+ widget: FALSE,
1984
+ width: FALSE,
1985
+ height: FALSE,
1986
+ def: TRUE
1987
+ },
1988
+ events: {
1989
+ render: NULL,
1990
+ move: NULL,
1991
+ show: NULL,
1992
+ hide: NULL,
1993
+ toggle: NULL,
1994
+ visible: NULL,
1995
+ hidden: NULL,
1996
+ focus: NULL,
1997
+ blur: NULL
1998
+ }
1999
+ };
2000
+ ;var TIP,
2001
+
2002
+ // .bind()/.on() namespace
2003
+ TIPNS = '.qtip-tip',
2004
+
2005
+ // Common CSS strings
2006
+ MARGIN = 'margin',
2007
+ BORDER = 'border',
2008
+ COLOR = 'color',
2009
+ BG_COLOR = 'background-color',
2010
+ TRANSPARENT = 'transparent',
2011
+ IMPORTANT = ' !important',
2012
+
2013
+ // Check if the browser supports <canvas/> elements
2014
+ HASCANVAS = !!document.createElement('canvas').getContext,
2015
+
2016
+ // Invalid colour values used in parseColours()
2017
+ INVALID = /rgba?\(0, 0, 0(, 0)?\)|transparent|#123456/i;
2018
+
2019
+ // Camel-case method, taken from jQuery source
2020
+ // http://code.jquery.com/jquery-1.8.0.js
2021
+ function camel(s) { return s.charAt(0).toUpperCase() + s.slice(1); }
2022
+
2023
+ /*
2024
+ * Modified from Modernizr's testPropsAll()
2025
+ * http://modernizr.com/downloads/modernizr-latest.js
2026
+ */
2027
+ var cssProps = {}, cssPrefixes = ["Webkit", "O", "Moz", "ms"];
2028
+ function vendorCss(elem, prop) {
2029
+ var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1),
2030
+ props = (prop + ' ' + cssPrefixes.join(ucProp + ' ') + ucProp).split(' '),
2031
+ cur, val, i = 0;
2032
+
2033
+ // If the property has already been mapped...
2034
+ if(cssProps[prop]) { return elem.css(cssProps[prop]); }
2035
+
2036
+ while((cur = props[i++])) {
2037
+ if((val = elem.css(cur)) !== undefined) {
2038
+ return cssProps[prop] = cur, val;
2039
+ }
2040
+ }
2041
+ }
2042
+
2043
+ // Parse a given elements CSS property into an int
2044
+ function intCss(elem, prop) {
2045
+ return Math.ceil(parseFloat(vendorCss(elem, prop)));
2046
+ }
2047
+
2048
+
2049
+ // VML creation (for IE only)
2050
+ if(!HASCANVAS) {
2051
+ var createVML = function(tag, props, style) {
2052
+ return '<qtipvml:'+tag+' xmlns="urn:schemas-microsoft.com:vml" class="qtip-vml" '+(props||'')+
2053
+ ' style="behavior: url(#default#VML); '+(style||'')+ '" />';
2054
+ };
2055
+ }
2056
+
2057
+ // Canvas only definitions
2058
+ else {
2059
+ var PIXEL_RATIO = window.devicePixelRatio || 1,
2060
+ BACKING_STORE_RATIO = (function() {
2061
+ var context = document.createElement('canvas').getContext('2d');
2062
+ return context.backingStorePixelRatio || context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio ||
2063
+ context.msBackingStorePixelRatio || context.oBackingStorePixelRatio || 1;
2064
+ }()),
2065
+ SCALE = PIXEL_RATIO / BACKING_STORE_RATIO;
2066
+ }
2067
+
2068
+
2069
+ function Tip(qtip, options) {
2070
+ this._ns = 'tip';
2071
+ this.options = options;
2072
+ this.offset = options.offset;
2073
+ this.size = [ options.width, options.height ];
2074
+
2075
+ // Initialize
2076
+ this.init( (this.qtip = qtip) );
2077
+ }
2078
+
2079
+ $.extend(Tip.prototype, {
2080
+ init: function(qtip) {
2081
+ var context, tip;
2082
+
2083
+ // Create tip element and prepend to the tooltip
2084
+ tip = this.element = qtip.elements.tip = $('<div />', { 'class': NAMESPACE+'-tip' }).prependTo(qtip.tooltip);
2085
+
2086
+ // Create tip drawing element(s)
2087
+ if(HASCANVAS) {
2088
+ // save() as soon as we create the canvas element so FF2 doesn't bork on our first restore()!
2089
+ context = $('<canvas />').appendTo(this.element)[0].getContext('2d');
2090
+
2091
+ // Setup constant parameters
2092
+ context.lineJoin = 'miter';
2093
+ context.miterLimit = 100000;
2094
+ context.save();
2095
+ }
2096
+ else {
2097
+ context = createVML('shape', 'coordorigin="0,0"', 'position:absolute;');
2098
+ this.element.html(context + context);
2099
+
2100
+ // Prevent mousing down on the tip since it causes problems with .live() handling in IE due to VML
2101
+ qtip._bind( $('*', tip).add(tip), ['click', 'mousedown'], function(event) { event.stopPropagation(); }, this._ns);
2102
+ }
2103
+
2104
+ // Bind update events
2105
+ qtip._bind(qtip.tooltip, 'tooltipmove', this.reposition, this._ns, this);
2106
+
2107
+ // Create it
2108
+ this.create();
2109
+ },
2110
+
2111
+ _swapDimensions: function() {
2112
+ this.size[0] = this.options.height;
2113
+ this.size[1] = this.options.width;
2114
+ },
2115
+ _resetDimensions: function() {
2116
+ this.size[0] = this.options.width;
2117
+ this.size[1] = this.options.height;
2118
+ },
2119
+
2120
+ _useTitle: function(corner) {
2121
+ var titlebar = this.qtip.elements.titlebar;
2122
+ return titlebar && (
2123
+ corner.y === TOP || (corner.y === CENTER && this.element.position().top + (this.size[1] / 2) + this.options.offset < titlebar.outerHeight(TRUE))
2124
+ );
2125
+ },
2126
+
2127
+ _parseCorner: function(corner) {
2128
+ var my = this.qtip.options.position.my;
2129
+
2130
+ // Detect corner and mimic properties
2131
+ if(corner === FALSE || my === FALSE) {
2132
+ corner = FALSE;
2133
+ }
2134
+ else if(corner === TRUE) {
2135
+ corner = new CORNER( my.string() );
2136
+ }
2137
+ else if(!corner.string) {
2138
+ corner = new CORNER(corner);
2139
+ corner.fixed = TRUE;
2140
+ }
2141
+
2142
+ return corner;
2143
+ },
2144
+
2145
+ _parseWidth: function(corner, side, use) {
2146
+ var elements = this.qtip.elements,
2147
+ prop = BORDER + camel(side) + 'Width';
2148
+
2149
+ return (use ? intCss(use, prop) : (
2150
+ intCss(elements.content, prop) ||
2151
+ intCss(this._useTitle(corner) && elements.titlebar || elements.content, prop) ||
2152
+ intCss(elements.tooltip, prop)
2153
+ )) || 0;
2154
+ },
2155
+
2156
+ _parseRadius: function(corner) {
2157
+ var elements = this.qtip.elements,
2158
+ prop = BORDER + camel(corner.y) + camel(corner.x) + 'Radius';
2159
+
2160
+ return BROWSER.ie < 9 ? 0 :
2161
+ intCss(this._useTitle(corner) && elements.titlebar || elements.content, prop) ||
2162
+ intCss(elements.tooltip, prop) || 0;
2163
+ },
2164
+
2165
+ _invalidColour: function(elem, prop, compare) {
2166
+ var val = elem.css(prop);
2167
+ return !val || (compare && val === elem.css(compare)) || INVALID.test(val) ? FALSE : val;
2168
+ },
2169
+
2170
+ _parseColours: function(corner) {
2171
+ var elements = this.qtip.elements,
2172
+ tip = this.element.css('cssText', ''),
2173
+ borderSide = BORDER + camel(corner[ corner.precedance ]) + camel(COLOR),
2174
+ colorElem = this._useTitle(corner) && elements.titlebar || elements.content,
2175
+ css = this._invalidColour, color = [];
2176
+
2177
+ // Attempt to detect the background colour from various elements, left-to-right precedance
2178
+ color[0] = css(tip, BG_COLOR) || css(colorElem, BG_COLOR) || css(elements.content, BG_COLOR) ||
2179
+ css(elements.tooltip, BG_COLOR) || tip.css(BG_COLOR);
2180
+
2181
+ // Attempt to detect the correct border side colour from various elements, left-to-right precedance
2182
+ color[1] = css(tip, borderSide, COLOR) || css(colorElem, borderSide, COLOR) ||
2183
+ css(elements.content, borderSide, COLOR) || css(elements.tooltip, borderSide, COLOR) || elements.tooltip.css(borderSide);
2184
+
2185
+ // Reset background and border colours
2186
+ $('*', tip).add(tip).css('cssText', BG_COLOR+':'+TRANSPARENT+IMPORTANT+';'+BORDER+':0'+IMPORTANT+';');
2187
+
2188
+ return color;
2189
+ },
2190
+
2191
+ _calculateSize: function(corner) {
2192
+ var y = corner.precedance === Y,
2193
+ width = this.options['width'],
2194
+ height = this.options['height'],
2195
+ isCenter = corner.abbrev() === 'c',
2196
+ base = (y ? width: height) * (isCenter ? 0.5 : 1),
2197
+ pow = Math.pow,
2198
+ round = Math.round,
2199
+ bigHyp, ratio, result,
2200
+
2201
+ smallHyp = Math.sqrt( pow(base, 2) + pow(height, 2) ),
2202
+ hyp = [ (this.border / base) * smallHyp, (this.border / height) * smallHyp ];
2203
+
2204
+ hyp[2] = Math.sqrt( pow(hyp[0], 2) - pow(this.border, 2) );
2205
+ hyp[3] = Math.sqrt( pow(hyp[1], 2) - pow(this.border, 2) );
2206
+
2207
+ bigHyp = smallHyp + hyp[2] + hyp[3] + (isCenter ? 0 : hyp[0]);
2208
+ ratio = bigHyp / smallHyp;
2209
+
2210
+ result = [ round(ratio * width), round(ratio * height) ];
2211
+ return y ? result : result.reverse();
2212
+ },
2213
+
2214
+ // Tip coordinates calculator
2215
+ _calculateTip: function(corner, size, scale) {
2216
+ scale = scale || 1;
2217
+ size = size || this.size;
2218
+
2219
+ var width = size[0] * scale,
2220
+ height = size[1] * scale,
2221
+ width2 = Math.ceil(width / 2), height2 = Math.ceil(height / 2),
2222
+
2223
+ // Define tip coordinates in terms of height and width values
2224
+ tips = {
2225
+ br: [0,0, width,height, width,0],
2226
+ bl: [0,0, width,0, 0,height],
2227
+ tr: [0,height, width,0, width,height],
2228
+ tl: [0,0, 0,height, width,height],
2229
+ tc: [0,height, width2,0, width,height],
2230
+ bc: [0,0, width,0, width2,height],
2231
+ rc: [0,0, width,height2, 0,height],
2232
+ lc: [width,0, width,height, 0,height2]
2233
+ };
2234
+
2235
+ // Set common side shapes
2236
+ tips.lt = tips.br; tips.rt = tips.bl;
2237
+ tips.lb = tips.tr; tips.rb = tips.tl;
2238
+
2239
+ return tips[ corner.abbrev() ];
2240
+ },
2241
+
2242
+ // Tip coordinates drawer (canvas)
2243
+ _drawCoords: function(context, coords) {
2244
+ context.beginPath();
2245
+ context.moveTo(coords[0], coords[1]);
2246
+ context.lineTo(coords[2], coords[3]);
2247
+ context.lineTo(coords[4], coords[5]);
2248
+ context.closePath();
2249
+ },
2250
+
2251
+ create: function() {
2252
+ // Determine tip corner
2253
+ var c = this.corner = (HASCANVAS || BROWSER.ie) && this._parseCorner(this.options.corner);
2254
+
2255
+ // If we have a tip corner...
2256
+ if( (this.enabled = !!this.corner && this.corner.abbrev() !== 'c') ) {
2257
+ // Cache it
2258
+ this.qtip.cache.corner = c.clone();
2259
+
2260
+ // Create it
2261
+ this.update();
2262
+ }
2263
+
2264
+ // Toggle tip element
2265
+ this.element.toggle(this.enabled);
2266
+
2267
+ return this.corner;
2268
+ },
2269
+
2270
+ update: function(corner, position) {
2271
+ if(!this.enabled) { return this; }
2272
+
2273
+ var elements = this.qtip.elements,
2274
+ tip = this.element,
2275
+ inner = tip.children(),
2276
+ options = this.options,
2277
+ curSize = this.size,
2278
+ mimic = options.mimic,
2279
+ round = Math.round,
2280
+ color, precedance, context,
2281
+ coords, bigCoords, translate, newSize, border, BACKING_STORE_RATIO;
2282
+
2283
+ // Re-determine tip if not already set
2284
+ if(!corner) { corner = this.qtip.cache.corner || this.corner; }
2285
+
2286
+ // Use corner property if we detect an invalid mimic value
2287
+ if(mimic === FALSE) { mimic = corner; }
2288
+
2289
+ // Otherwise inherit mimic properties from the corner object as necessary
2290
+ else {
2291
+ mimic = new CORNER(mimic);
2292
+ mimic.precedance = corner.precedance;
2293
+
2294
+ if(mimic.x === 'inherit') { mimic.x = corner.x; }
2295
+ else if(mimic.y === 'inherit') { mimic.y = corner.y; }
2296
+ else if(mimic.x === mimic.y) {
2297
+ mimic[ corner.precedance ] = corner[ corner.precedance ];
2298
+ }
2299
+ }
2300
+ precedance = mimic.precedance;
2301
+
2302
+ // Ensure the tip width.height are relative to the tip position
2303
+ if(corner.precedance === X) { this._swapDimensions(); }
2304
+ else { this._resetDimensions(); }
2305
+
2306
+ // Update our colours
2307
+ color = this.color = this._parseColours(corner);
2308
+
2309
+ // Detect border width, taking into account colours
2310
+ if(color[1] !== TRANSPARENT) {
2311
+ // Grab border width
2312
+ border = this.border = this._parseWidth(corner, corner[corner.precedance]);
2313
+
2314
+ // If border width isn't zero, use border color as fill if it's not invalid (1.0 style tips)
2315
+ if(options.border && border < 1 && !INVALID.test(color[1])) { color[0] = color[1]; }
2316
+
2317
+ // Set border width (use detected border width if options.border is true)
2318
+ this.border = border = options.border !== TRUE ? options.border : border;
2319
+ }
2320
+
2321
+ // Border colour was invalid, set border to zero
2322
+ else { this.border = border = 0; }
2323
+
2324
+ // Determine tip size
2325
+ newSize = this.size = this._calculateSize(corner);
2326
+ tip.css({
2327
+ width: newSize[0],
2328
+ height: newSize[1],
2329
+ lineHeight: newSize[1]+'px'
2330
+ });
2331
+
2332
+ // Calculate tip translation
2333
+ if(corner.precedance === Y) {
2334
+ translate = [
2335
+ round(mimic.x === LEFT ? border : mimic.x === RIGHT ? newSize[0] - curSize[0] - border : (newSize[0] - curSize[0]) / 2),
2336
+ round(mimic.y === TOP ? newSize[1] - curSize[1] : 0)
2337
+ ];
2338
+ }
2339
+ else {
2340
+ translate = [
2341
+ round(mimic.x === LEFT ? newSize[0] - curSize[0] : 0),
2342
+ round(mimic.y === TOP ? border : mimic.y === BOTTOM ? newSize[1] - curSize[1] - border : (newSize[1] - curSize[1]) / 2)
2343
+ ];
2344
+ }
2345
+
2346
+ // Canvas drawing implementation
2347
+ if(HASCANVAS) {
2348
+ // Grab canvas context and clear/save it
2349
+ context = inner[0].getContext('2d');
2350
+ context.restore(); context.save();
2351
+ context.clearRect(0,0,6000,6000);
2352
+
2353
+ // Calculate coordinates
2354
+ coords = this._calculateTip(mimic, curSize, SCALE);
2355
+ bigCoords = this._calculateTip(mimic, this.size, SCALE);
2356
+
2357
+ // Set the canvas size using calculated size
2358
+ inner.attr(WIDTH, newSize[0] * SCALE).attr(HEIGHT, newSize[1] * SCALE);
2359
+ inner.css(WIDTH, newSize[0]).css(HEIGHT, newSize[1]);
2360
+
2361
+ // Draw the outer-stroke tip
2362
+ this._drawCoords(context, bigCoords);
2363
+ context.fillStyle = color[1];
2364
+ context.fill();
2365
+
2366
+ // Draw the actual tip
2367
+ context.translate(translate[0] * SCALE, translate[1] * SCALE);
2368
+ this._drawCoords(context, coords);
2369
+ context.fillStyle = color[0];
2370
+ context.fill();
2371
+ }
2372
+
2373
+ // VML (IE Proprietary implementation)
2374
+ else {
2375
+ // Calculate coordinates
2376
+ coords = this._calculateTip(mimic);
2377
+
2378
+ // Setup coordinates string
2379
+ coords = 'm' + coords[0] + ',' + coords[1] + ' l' + coords[2] +
2380
+ ',' + coords[3] + ' ' + coords[4] + ',' + coords[5] + ' xe';
2381
+
2382
+ // Setup VML-specific offset for pixel-perfection
2383
+ translate[2] = border && /^(r|b)/i.test(corner.string()) ?
2384
+ BROWSER.ie === 8 ? 2 : 1 : 0;
2385
+
2386
+ // Set initial CSS
2387
+ inner.css({
2388
+ coordsize: (newSize[0]+border) + ' ' + (newSize[1]+border),
2389
+ antialias: ''+(mimic.string().indexOf(CENTER) > -1),
2390
+ left: translate[0] - (translate[2] * Number(precedance === X)),
2391
+ top: translate[1] - (translate[2] * Number(precedance === Y)),
2392
+ width: newSize[0] + border,
2393
+ height: newSize[1] + border
2394
+ })
2395
+ .each(function(i) {
2396
+ var $this = $(this);
2397
+
2398
+ // Set shape specific attributes
2399
+ $this[ $this.prop ? 'prop' : 'attr' ]({
2400
+ coordsize: (newSize[0]+border) + ' ' + (newSize[1]+border),
2401
+ path: coords,
2402
+ fillcolor: color[0],
2403
+ filled: !!i,
2404
+ stroked: !i
2405
+ })
2406
+ .toggle(!!(border || i));
2407
+
2408
+ // Check if border is enabled and add stroke element
2409
+ !i && $this.html( createVML(
2410
+ 'stroke', 'weight="'+(border*2)+'px" color="'+color[1]+'" miterlimit="1000" joinstyle="miter"'
2411
+ ) );
2412
+ });
2413
+ }
2414
+
2415
+ // Opera bug #357 - Incorrect tip position
2416
+ // https://github.com/Craga89/qTip2/issues/367
2417
+ window.opera && setTimeout(function() {
2418
+ elements.tip.css({
2419
+ display: 'inline-block',
2420
+ visibility: 'visible'
2421
+ });
2422
+ }, 1);
2423
+
2424
+ // Position if needed
2425
+ if(position !== FALSE) { this.calculate(corner, newSize); }
2426
+ },
2427
+
2428
+ calculate: function(corner, size) {
2429
+ if(!this.enabled) { return FALSE; }
2430
+
2431
+ var self = this,
2432
+ elements = this.qtip.elements,
2433
+ tip = this.element,
2434
+ userOffset = this.options.offset,
2435
+ isWidget = elements.tooltip.hasClass('ui-widget'),
2436
+ position = { },
2437
+ precedance, corners;
2438
+
2439
+ // Inherit corner if not provided
2440
+ corner = corner || this.corner;
2441
+ precedance = corner.precedance;
2442
+
2443
+ // Determine which tip dimension to use for adjustment
2444
+ size = size || this._calculateSize(corner);
2445
+
2446
+ // Setup corners and offset array
2447
+ corners = [ corner.x, corner.y ];
2448
+ if(precedance === X) { corners.reverse(); }
2449
+
2450
+ // Calculate tip position
2451
+ $.each(corners, function(i, side) {
2452
+ var b, bc, br;
2453
+
2454
+ if(side === CENTER) {
2455
+ b = precedance === Y ? LEFT : TOP;
2456
+ position[ b ] = '50%';
2457
+ position[MARGIN+'-' + b] = -Math.round(size[ precedance === Y ? 0 : 1 ] / 2) + userOffset;
2458
+ }
2459
+ else {
2460
+ b = self._parseWidth(corner, side, elements.tooltip);
2461
+ bc = self._parseWidth(corner, side, elements.content);
2462
+ br = self._parseRadius(corner);
2463
+
2464
+ position[ side ] = Math.max(-self.border, i ? bc : (userOffset + (br > b ? br : -b)));
2465
+ }
2466
+ });
2467
+
2468
+ // Adjust for tip size
2469
+ position[ corner[precedance] ] -= size[ precedance === X ? 0 : 1 ];
2470
+
2471
+ // Set and return new position
2472
+ tip.css({ margin: '', top: '', bottom: '', left: '', right: '' }).css(position);
2473
+ return position;
2474
+ },
2475
+
2476
+ reposition: function(event, api, pos, viewport) {
2477
+ if(!this.enabled) { return; }
2478
+
2479
+ var cache = api.cache,
2480
+ newCorner = this.corner.clone(),
2481
+ adjust = pos.adjusted,
2482
+ method = api.options.position.adjust.method.split(' '),
2483
+ horizontal = method[0],
2484
+ vertical = method[1] || method[0],
2485
+ shift = { left: FALSE, top: FALSE, x: 0, y: 0 },
2486
+ offset, css = {}, props;
2487
+
2488
+ function shiftflip(direction, precedance, popposite, side, opposite) {
2489
+ // Horizontal - Shift or flip method
2490
+ if(direction === SHIFT && newCorner.precedance === precedance && adjust[side] && newCorner[popposite] !== CENTER) {
2491
+ newCorner.precedance = newCorner.precedance === X ? Y : X;
2492
+ }
2493
+ else if(direction !== SHIFT && adjust[side]){
2494
+ newCorner[precedance] = newCorner[precedance] === CENTER ?
2495
+ (adjust[side] > 0 ? side : opposite) : (newCorner[precedance] === side ? opposite : side);
2496
+ }
2497
+ }
2498
+
2499
+ function shiftonly(xy, side, opposite) {
2500
+ if(newCorner[xy] === CENTER) {
2501
+ css[MARGIN+'-'+side] = shift[xy] = offset[MARGIN+'-'+side] - adjust[side];
2502
+ }
2503
+ else {
2504
+ props = offset[opposite] !== undefined ?
2505
+ [ adjust[side], -offset[side] ] : [ -adjust[side], offset[side] ];
2506
+
2507
+ if( (shift[xy] = Math.max(props[0], props[1])) > props[0] ) {
2508
+ pos[side] -= adjust[side];
2509
+ shift[side] = FALSE;
2510
+ }
2511
+
2512
+ css[ offset[opposite] !== undefined ? opposite : side ] = shift[xy];
2513
+ }
2514
+ }
2515
+
2516
+ // If our tip position isn't fixed e.g. doesn't adjust with viewport...
2517
+ if(this.corner.fixed !== TRUE) {
2518
+ // Perform shift/flip adjustments
2519
+ shiftflip(horizontal, X, Y, LEFT, RIGHT);
2520
+ shiftflip(vertical, Y, X, TOP, BOTTOM);
2521
+
2522
+ // Update and redraw the tip if needed (check cached details of last drawn tip)
2523
+ if(newCorner.string() !== cache.corner.string() || cache.cornerTop !== adjust.top || cache.cornerLeft !== adjust.left) {
2524
+ this.update(newCorner, FALSE);
2525
+ }
2526
+ }
2527
+
2528
+ // Setup tip offset properties
2529
+ offset = this.calculate(newCorner);
2530
+
2531
+ // Readjust offset object to make it left/top
2532
+ if(offset.right !== undefined) { offset.left = -offset.right; }
2533
+ if(offset.bottom !== undefined) { offset.top = -offset.bottom; }
2534
+ offset.user = this.offset;
2535
+
2536
+ // Perform shift adjustments
2537
+ if(shift.left = (horizontal === SHIFT && !!adjust.left)) { shiftonly(X, LEFT, RIGHT); }
2538
+ if(shift.top = (vertical === SHIFT && !!adjust.top)) { shiftonly(Y, TOP, BOTTOM); }
2539
+
2540
+ /*
2541
+ * If the tip is adjusted in both dimensions, or in a
2542
+ * direction that would cause it to be anywhere but the
2543
+ * outer border, hide it!
2544
+ */
2545
+ this.element.css(css).toggle(
2546
+ !((shift.x && shift.y) || (newCorner.x === CENTER && shift.y) || (newCorner.y === CENTER && shift.x))
2547
+ );
2548
+
2549
+ // Adjust position to accomodate tip dimensions
2550
+ pos.left -= offset.left.charAt ? offset.user :
2551
+ horizontal !== SHIFT || shift.top || !shift.left && !shift.top ? offset.left + this.border : 0;
2552
+ pos.top -= offset.top.charAt ? offset.user :
2553
+ vertical !== SHIFT || shift.left || !shift.left && !shift.top ? offset.top + this.border : 0;
2554
+
2555
+ // Cache details
2556
+ cache.cornerLeft = adjust.left; cache.cornerTop = adjust.top;
2557
+ cache.corner = newCorner.clone();
2558
+ },
2559
+
2560
+ destroy: function() {
2561
+ // Unbind events
2562
+ this.qtip._unbind(this.qtip.tooltip, this._ns);
2563
+
2564
+ // Remove the tip element(s)
2565
+ if(this.qtip.elements.tip) {
2566
+ this.qtip.elements.tip.find('*')
2567
+ .remove().end().remove();
2568
+ }
2569
+ }
2570
+ });
2571
+
2572
+ TIP = PLUGINS.tip = function(api) {
2573
+ return new Tip(api, api.options.style.tip);
2574
+ };
2575
+
2576
+ // Initialize tip on render
2577
+ TIP.initialize = 'render';
2578
+
2579
+ // Setup plugin sanitization options
2580
+ TIP.sanitize = function(options) {
2581
+ if(options.style && 'tip' in options.style) {
2582
+ var opts = options.style.tip;
2583
+ if(typeof opts !== 'object') { opts = options.style.tip = { corner: opts }; }
2584
+ if(!(/string|boolean/i).test(typeof opts.corner)) { opts.corner = TRUE; }
2585
+ }
2586
+ };
2587
+
2588
+ // Add new option checks for the plugin
2589
+ CHECKS.tip = {
2590
+ '^position.my|style.tip.(corner|mimic|border)$': function() {
2591
+ // Make sure a tip can be drawn
2592
+ this.create();
2593
+
2594
+ // Reposition the tooltip
2595
+ this.qtip.reposition();
2596
+ },
2597
+ '^style.tip.(height|width)$': function(obj) {
2598
+ // Re-set dimensions and redraw the tip
2599
+ this.size = [ obj.width, obj.height ];
2600
+ this.update();
2601
+
2602
+ // Reposition the tooltip
2603
+ this.qtip.reposition();
2604
+ },
2605
+ '^content.title|style.(classes|widget)$': function() {
2606
+ this.update();
2607
+ }
2608
+ };
2609
+
2610
+ // Extend original qTip defaults
2611
+ $.extend(TRUE, QTIP.defaults, {
2612
+ style: {
2613
+ tip: {
2614
+ corner: TRUE,
2615
+ mimic: FALSE,
2616
+ width: 6,
2617
+ height: 6,
2618
+ border: TRUE,
2619
+ offset: 0
2620
+ }
2621
+ }
2622
+ });
2623
+ ;PLUGINS.viewport = function(api, position, posOptions, targetWidth, targetHeight, elemWidth, elemHeight)
2624
+ {
2625
+ var target = posOptions.target,
2626
+ tooltip = api.elements.tooltip,
2627
+ my = posOptions.my,
2628
+ at = posOptions.at,
2629
+ adjust = posOptions.adjust,
2630
+ method = adjust.method.split(' '),
2631
+ methodX = method[0],
2632
+ methodY = method[1] || method[0],
2633
+ viewport = posOptions.viewport,
2634
+ container = posOptions.container,
2635
+ cache = api.cache,
2636
+ adjusted = { left: 0, top: 0 },
2637
+ fixed, newMy, containerOffset, containerStatic,
2638
+ viewportWidth, viewportHeight, viewportScroll, viewportOffset;
2639
+
2640
+ // If viewport is not a jQuery element, or it's the window/document, or no adjustment method is used... return
2641
+ if(!viewport.jquery || target[0] === window || target[0] === document.body || adjust.method === 'none') {
2642
+ return adjusted;
2643
+ }
2644
+
2645
+ // Cach container details
2646
+ containerOffset = container.offset() || adjusted;
2647
+ containerStatic = container.css('position') === 'static';
2648
+
2649
+ // Cache our viewport details
2650
+ fixed = tooltip.css('position') === 'fixed';
2651
+ viewportWidth = viewport[0] === window ? viewport.width() : viewport.outerWidth(FALSE);
2652
+ viewportHeight = viewport[0] === window ? viewport.height() : viewport.outerHeight(FALSE);
2653
+ viewportScroll = { left: fixed ? 0 : viewport.scrollLeft(), top: fixed ? 0 : viewport.scrollTop() };
2654
+ viewportOffset = viewport.offset() || adjusted;
2655
+
2656
+ // Generic calculation method
2657
+ function calculate(side, otherSide, type, adjust, side1, side2, lengthName, targetLength, elemLength) {
2658
+ var initialPos = position[side1],
2659
+ mySide = my[side],
2660
+ atSide = at[side],
2661
+ isShift = type === SHIFT,
2662
+ myLength = mySide === side1 ? elemLength : mySide === side2 ? -elemLength : -elemLength / 2,
2663
+ atLength = atSide === side1 ? targetLength : atSide === side2 ? -targetLength : -targetLength / 2,
2664
+ sideOffset = viewportScroll[side1] + viewportOffset[side1] - (containerStatic ? 0 : containerOffset[side1]),
2665
+ overflow1 = sideOffset - initialPos,
2666
+ overflow2 = initialPos + elemLength - (lengthName === WIDTH ? viewportWidth : viewportHeight) - sideOffset,
2667
+ offset = myLength - (my.precedance === side || mySide === my[otherSide] ? atLength : 0) - (atSide === CENTER ? targetLength / 2 : 0);
2668
+
2669
+ // shift
2670
+ if(isShift) {
2671
+ offset = (mySide === side1 ? 1 : -1) * myLength;
2672
+
2673
+ // Adjust position but keep it within viewport dimensions
2674
+ position[side1] += overflow1 > 0 ? overflow1 : overflow2 > 0 ? -overflow2 : 0;
2675
+ position[side1] = Math.max(
2676
+ -containerOffset[side1] + viewportOffset[side1],
2677
+ initialPos - offset,
2678
+ Math.min(
2679
+ Math.max(
2680
+ -containerOffset[side1] + viewportOffset[side1] + (lengthName === WIDTH ? viewportWidth : viewportHeight),
2681
+ initialPos + offset
2682
+ ),
2683
+ position[side1],
2684
+
2685
+ // Make sure we don't adjust complete off the element when using 'center'
2686
+ mySide === 'center' ? initialPos - myLength : 1E9
2687
+ )
2688
+ );
2689
+
2690
+ }
2691
+
2692
+ // flip/flipinvert
2693
+ else {
2694
+ // Update adjustment amount depending on if using flipinvert or flip
2695
+ adjust *= (type === FLIPINVERT ? 2 : 0);
2696
+
2697
+ // Check for overflow on the left/top
2698
+ if(overflow1 > 0 && (mySide !== side1 || overflow2 > 0)) {
2699
+ position[side1] -= offset + adjust;
2700
+ newMy.invert(side, side1);
2701
+ }
2702
+
2703
+ // Check for overflow on the bottom/right
2704
+ else if(overflow2 > 0 && (mySide !== side2 || overflow1 > 0) ) {
2705
+ position[side1] -= (mySide === CENTER ? -offset : offset) + adjust;
2706
+ newMy.invert(side, side2);
2707
+ }
2708
+
2709
+ // Make sure we haven't made things worse with the adjustment and reset if so
2710
+ if(position[side1] < viewportScroll && -position[side1] > overflow2) {
2711
+ position[side1] = initialPos; newMy = my.clone();
2712
+ }
2713
+ }
2714
+
2715
+ return position[side1] - initialPos;
2716
+ }
2717
+
2718
+ // Set newMy if using flip or flipinvert methods
2719
+ if(methodX !== 'shift' || methodY !== 'shift') { newMy = my.clone(); }
2720
+
2721
+ // Adjust position based onviewport and adjustment options
2722
+ adjusted = {
2723
+ left: methodX !== 'none' ? calculate( X, Y, methodX, adjust.x, LEFT, RIGHT, WIDTH, targetWidth, elemWidth ) : 0,
2724
+ top: methodY !== 'none' ? calculate( Y, X, methodY, adjust.y, TOP, BOTTOM, HEIGHT, targetHeight, elemHeight ) : 0,
2725
+ my: newMy
2726
+ };
2727
+
2728
+ return adjusted;
2729
+ };
2730
+ ;PLUGINS.polys = {
2731
+ // POLY area coordinate calculator
2732
+ // Special thanks to Ed Cradock for helping out with this.
2733
+ // Uses a binary search algorithm to find suitable coordinates.
2734
+ polygon: function(baseCoords, corner) {
2735
+ var result = {
2736
+ width: 0, height: 0,
2737
+ position: {
2738
+ top: 1e10, right: 0,
2739
+ bottom: 0, left: 1e10
2740
+ },
2741
+ adjustable: FALSE
2742
+ },
2743
+ i = 0, next,
2744
+ coords = [],
2745
+ compareX = 1, compareY = 1,
2746
+ realX = 0, realY = 0,
2747
+ newWidth, newHeight;
2748
+
2749
+ // First pass, sanitize coords and determine outer edges
2750
+ i = baseCoords.length; while(i--) {
2751
+ next = [ parseInt(baseCoords[--i], 10), parseInt(baseCoords[i+1], 10) ];
2752
+
2753
+ if(next[0] > result.position.right){ result.position.right = next[0]; }
2754
+ if(next[0] < result.position.left){ result.position.left = next[0]; }
2755
+ if(next[1] > result.position.bottom){ result.position.bottom = next[1]; }
2756
+ if(next[1] < result.position.top){ result.position.top = next[1]; }
2757
+
2758
+ coords.push(next);
2759
+ }
2760
+
2761
+ // Calculate height and width from outer edges
2762
+ newWidth = result.width = Math.abs(result.position.right - result.position.left);
2763
+ newHeight = result.height = Math.abs(result.position.bottom - result.position.top);
2764
+
2765
+ // If it's the center corner...
2766
+ if(corner.abbrev() === 'c') {
2767
+ result.position = {
2768
+ left: result.position.left + (result.width / 2),
2769
+ top: result.position.top + (result.height / 2)
2770
+ };
2771
+ }
2772
+ else {
2773
+ // Second pass, use a binary search algorithm to locate most suitable coordinate
2774
+ while(newWidth > 0 && newHeight > 0 && compareX > 0 && compareY > 0)
2775
+ {
2776
+ newWidth = Math.floor(newWidth / 2);
2777
+ newHeight = Math.floor(newHeight / 2);
2778
+
2779
+ if(corner.x === LEFT){ compareX = newWidth; }
2780
+ else if(corner.x === RIGHT){ compareX = result.width - newWidth; }
2781
+ else{ compareX += Math.floor(newWidth / 2); }
2782
+
2783
+ if(corner.y === TOP){ compareY = newHeight; }
2784
+ else if(corner.y === BOTTOM){ compareY = result.height - newHeight; }
2785
+ else{ compareY += Math.floor(newHeight / 2); }
2786
+
2787
+ i = coords.length; while(i--)
2788
+ {
2789
+ if(coords.length < 2){ break; }
2790
+
2791
+ realX = coords[i][0] - result.position.left;
2792
+ realY = coords[i][1] - result.position.top;
2793
+
2794
+ if((corner.x === LEFT && realX >= compareX) ||
2795
+ (corner.x === RIGHT && realX <= compareX) ||
2796
+ (corner.x === CENTER && (realX < compareX || realX > (result.width - compareX))) ||
2797
+ (corner.y === TOP && realY >= compareY) ||
2798
+ (corner.y === BOTTOM && realY <= compareY) ||
2799
+ (corner.y === CENTER && (realY < compareY || realY > (result.height - compareY)))) {
2800
+ coords.splice(i, 1);
2801
+ }
2802
+ }
2803
+ }
2804
+ result.position = { left: coords[0][0], top: coords[0][1] };
2805
+ }
2806
+
2807
+ return result;
2808
+ },
2809
+
2810
+ rect: function(ax, ay, bx, by) {
2811
+ return {
2812
+ width: Math.abs(bx - ax),
2813
+ height: Math.abs(by - ay),
2814
+ position: {
2815
+ left: Math.min(ax, bx),
2816
+ top: Math.min(ay, by)
2817
+ }
2818
+ };
2819
+ },
2820
+
2821
+ _angles: {
2822
+ tc: 3 / 2, tr: 7 / 4, tl: 5 / 4,
2823
+ bc: 1 / 2, br: 1 / 4, bl: 3 / 4,
2824
+ rc: 2, lc: 1, c: 0
2825
+ },
2826
+ ellipse: function(cx, cy, rx, ry, corner) {
2827
+ var c = PLUGINS.polys._angles[ corner.abbrev() ],
2828
+ rxc = c === 0 ? 0 : rx * Math.cos( c * Math.PI ),
2829
+ rys = ry * Math.sin( c * Math.PI );
2830
+
2831
+ return {
2832
+ width: (rx * 2) - Math.abs(rxc),
2833
+ height: (ry * 2) - Math.abs(rys),
2834
+ position: {
2835
+ left: cx + rxc,
2836
+ top: cy + rys
2837
+ },
2838
+ adjustable: FALSE
2839
+ };
2840
+ },
2841
+ circle: function(cx, cy, r, corner) {
2842
+ return PLUGINS.polys.ellipse(cx, cy, r, r, corner);
2843
+ }
2844
+ };
2845
+ ;PLUGINS.imagemap = function(api, area, corner, adjustMethod)
2846
+ {
2847
+ if(!area.jquery) { area = $(area); }
2848
+
2849
+ var shape = (area.attr('shape') || 'rect').toLowerCase().replace('poly', 'polygon'),
2850
+ image = $('img[usemap="#'+area.parent('map').attr('name')+'"]'),
2851
+ coordsString = $.trim(area.attr('coords')),
2852
+ coordsArray = coordsString.replace(/,$/, '').split(','),
2853
+ imageOffset, coords, i, next, result, len;
2854
+
2855
+ // If we can't find the image using the map...
2856
+ if(!image.length) { return FALSE; }
2857
+
2858
+ // Pass coordinates string if polygon
2859
+ if(shape === 'polygon') {
2860
+ result = PLUGINS.polys.polygon(coordsArray, corner);
2861
+ }
2862
+
2863
+ // Otherwise parse the coordinates and pass them as arguments
2864
+ else if(PLUGINS.polys[shape]) {
2865
+ for(i = -1, len = coordsArray.length, coords = []; ++i < len;) {
2866
+ coords.push( parseInt(coordsArray[i], 10) );
2867
+ }
2868
+
2869
+ result = PLUGINS.polys[shape].apply(
2870
+ this, coords.concat(corner)
2871
+ );
2872
+ }
2873
+
2874
+ // If no shapre calculation method was found, return false
2875
+ else { return FALSE; }
2876
+
2877
+ // Make sure we account for padding and borders on the image
2878
+ imageOffset = image.offset();
2879
+ imageOffset.left += Math.ceil((image.outerWidth(FALSE) - image.width()) / 2);
2880
+ imageOffset.top += Math.ceil((image.outerHeight(FALSE) - image.height()) / 2);
2881
+
2882
+ // Add image position to offset coordinates
2883
+ result.position.left += imageOffset.left;
2884
+ result.position.top += imageOffset.top;
2885
+
2886
+ return result;
2887
+ };
2888
+ ;PLUGINS.svg = function(api, svg, corner)
2889
+ {
2890
+ var doc = $(document),
2891
+ elem = svg[0],
2892
+ root = $(elem.ownerSVGElement),
2893
+ ownerDocument = elem.ownerDocument,
2894
+ strokeWidth2 = (parseInt(svg.css('stroke-width'), 10) || 0) / 2,
2895
+ frameOffset, mtx, transformed, viewBox,
2896
+ len, next, i, points,
2897
+ result, position, dimensions;
2898
+
2899
+ // Ascend the parentNode chain until we find an element with getBBox()
2900
+ while(!elem.getBBox) { elem = elem.parentNode; }
2901
+ if(!elem.getBBox || !elem.parentNode) { return FALSE; }
2902
+
2903
+ // Determine which shape calculation to use
2904
+ switch(elem.nodeName) {
2905
+ case 'ellipse':
2906
+ case 'circle':
2907
+ result = PLUGINS.polys.ellipse(
2908
+ elem.cx.baseVal.value,
2909
+ elem.cy.baseVal.value,
2910
+ (elem.rx || elem.r).baseVal.value + strokeWidth2,
2911
+ (elem.ry || elem.r).baseVal.value + strokeWidth2,
2912
+ corner
2913
+ );
2914
+ break;
2915
+
2916
+ case 'line':
2917
+ case 'polygon':
2918
+ case 'polyline':
2919
+ // Determine points object (line has none, so mimic using array)
2920
+ points = elem.points || [
2921
+ { x: elem.x1.baseVal.value, y: elem.y1.baseVal.value },
2922
+ { x: elem.x2.baseVal.value, y: elem.y2.baseVal.value }
2923
+ ];
2924
+
2925
+ for(result = [], i = -1, len = points.numberOfItems || points.length; ++i < len;) {
2926
+ next = points.getItem ? points.getItem(i) : points[i];
2927
+ result.push.apply(result, [next.x, next.y]);
2928
+ }
2929
+
2930
+ result = PLUGINS.polys.polygon(result, corner);
2931
+ break;
2932
+
2933
+ // Unknown shape or rectangle? Use bounding box
2934
+ default:
2935
+ result = elem.getBBox();
2936
+ result = {
2937
+ width: result.width,
2938
+ height: result.height,
2939
+ position: {
2940
+ left: result.x,
2941
+ top: result.y
2942
+ }
2943
+ };
2944
+ break;
2945
+ }
2946
+
2947
+ // Shortcut assignments
2948
+ position = result.position;
2949
+ root = root[0];
2950
+
2951
+ // Convert position into a pixel value
2952
+ if(root.createSVGPoint) {
2953
+ mtx = elem.getScreenCTM();
2954
+ points = root.createSVGPoint();
2955
+
2956
+ points.x = position.left;
2957
+ points.y = position.top;
2958
+ transformed = points.matrixTransform( mtx );
2959
+ position.left = transformed.x;
2960
+ position.top = transformed.y;
2961
+ }
2962
+
2963
+ // Check the element is not in a child document, and if so, adjust for frame elements offset
2964
+ if(ownerDocument !== document && api.position.target !== 'mouse') {
2965
+ frameOffset = $((ownerDocument.defaultView || ownerDocument.parentWindow).frameElement).offset();
2966
+ if(frameOffset) {
2967
+ position.left += frameOffset.left;
2968
+ position.top += frameOffset.top;
2969
+ }
2970
+ }
2971
+
2972
+ // Adjust by scroll offset of owner document
2973
+ ownerDocument = $(ownerDocument);
2974
+ position.left += ownerDocument.scrollLeft();
2975
+ position.top += ownerDocument.scrollTop();
2976
+
2977
+ return result;
2978
+ };
2979
+ ;var MODAL, OVERLAY,
2980
+ MODALCLASS = 'qtip-modal',
2981
+ MODALSELECTOR = '.'+MODALCLASS;
2982
+
2983
+ OVERLAY = function()
2984
+ {
2985
+ var self = this,
2986
+ focusableElems = {},
2987
+ current, onLast,
2988
+ prevState, elem;
2989
+
2990
+ // Modified code from jQuery UI 1.10.0 source
2991
+ // http://code.jquery.com/ui/1.10.0/jquery-ui.js
2992
+ function focusable(element) {
2993
+ // Use the defined focusable checker when possible
2994
+ if($.expr[':'].focusable) { return $.expr[':'].focusable; }
2995
+
2996
+ var isTabIndexNotNaN = !isNaN($.attr(element, 'tabindex')),
2997
+ nodeName = element.nodeName && element.nodeName.toLowerCase(),
2998
+ map, mapName, img;
2999
+
3000
+ if('area' === nodeName) {
3001
+ map = element.parentNode;
3002
+ mapName = map.name;
3003
+ if(!element.href || !mapName || map.nodeName.toLowerCase() !== 'map') {
3004
+ return false;
3005
+ }
3006
+ img = $('img[usemap=#' + mapName + ']')[0];
3007
+ return !!img && img.is(':visible');
3008
+ }
3009
+ return (/input|select|textarea|button|object/.test( nodeName ) ?
3010
+ !element.disabled :
3011
+ 'a' === nodeName ?
3012
+ element.href || isTabIndexNotNaN :
3013
+ isTabIndexNotNaN
3014
+ );
3015
+ }
3016
+
3017
+ // Focus inputs using cached focusable elements (see update())
3018
+ function focusInputs(blurElems) {
3019
+ // Blurring body element in IE causes window.open windows to unfocus!
3020
+ if(focusableElems.length < 1 && blurElems.length) { blurElems.not('body').blur(); }
3021
+
3022
+ // Focus the inputs
3023
+ else { focusableElems.first().focus(); }
3024
+ }
3025
+
3026
+ // Steal focus from elements outside tooltip
3027
+ function stealFocus(event) {
3028
+ if(!elem.is(':visible')) { return; }
3029
+
3030
+ var target = $(event.target),
3031
+ tooltip = current.tooltip,
3032
+ container = target.closest(SELECTOR),
3033
+ targetOnTop;
3034
+
3035
+ // Determine if input container target is above this
3036
+ targetOnTop = container.length < 1 ? FALSE :
3037
+ (parseInt(container[0].style.zIndex, 10) > parseInt(tooltip[0].style.zIndex, 10));
3038
+
3039
+ // If we're showing a modal, but focus has landed on an input below
3040
+ // this modal, divert focus to the first visible input in this modal
3041
+ // or if we can't find one... the tooltip itself
3042
+ if(!targetOnTop && target.closest(SELECTOR)[0] !== tooltip[0]) {
3043
+ focusInputs(target);
3044
+ }
3045
+
3046
+ // Detect when we leave the last focusable element...
3047
+ onLast = event.target === focusableElems[focusableElems.length - 1];
3048
+ }
3049
+
3050
+ $.extend(self, {
3051
+ init: function() {
3052
+ // Create document overlay
3053
+ elem = self.elem = $('<div />', {
3054
+ id: 'qtip-overlay',
3055
+ html: '<div></div>',
3056
+ mousedown: function() { return FALSE; }
3057
+ })
3058
+ .hide();
3059
+
3060
+ // Make sure we can't focus anything outside the tooltip
3061
+ $(document.body).bind('focusin'+MODALSELECTOR, stealFocus);
3062
+
3063
+ // Apply keyboard "Escape key" close handler
3064
+ $(document).bind('keydown'+MODALSELECTOR, function(event) {
3065
+ if(current && current.options.show.modal.escape && event.keyCode === 27) {
3066
+ current.hide(event);
3067
+ }
3068
+ });
3069
+
3070
+ // Apply click handler for blur option
3071
+ elem.bind('click'+MODALSELECTOR, function(event) {
3072
+ if(current && current.options.show.modal.blur) {
3073
+ current.hide(event);
3074
+ }
3075
+ });
3076
+
3077
+ return self;
3078
+ },
3079
+
3080
+ update: function(api) {
3081
+ // Update current API reference
3082
+ current = api;
3083
+
3084
+ // Update focusable elements if enabled
3085
+ if(api.options.show.modal.stealfocus !== FALSE) {
3086
+ focusableElems = api.tooltip.find('*').filter(function() {
3087
+ return focusable(this);
3088
+ });
3089
+ }
3090
+ else { focusableElems = []; }
3091
+ },
3092
+
3093
+ toggle: function(api, state, duration) {
3094
+ var docBody = $(document.body),
3095
+ tooltip = api.tooltip,
3096
+ options = api.options.show.modal,
3097
+ effect = options.effect,
3098
+ type = state ? 'show': 'hide',
3099
+ visible = elem.is(':visible'),
3100
+ visibleModals = $(MODALSELECTOR).filter(':visible:not(:animated)').not(tooltip),
3101
+ zindex;
3102
+
3103
+ // Set active tooltip API reference
3104
+ self.update(api);
3105
+
3106
+ // If the modal can steal the focus...
3107
+ // Blur the current item and focus anything in the modal we an
3108
+ if(state && options.stealfocus !== FALSE) {
3109
+ focusInputs( $(':focus') );
3110
+ }
3111
+
3112
+ // Toggle backdrop cursor style on show
3113
+ elem.toggleClass('blurs', options.blur);
3114
+
3115
+ // Append to body on show
3116
+ if(state) {
3117
+ elem.appendTo(document.body);
3118
+ }
3119
+
3120
+ // Prevent modal from conflicting with show.solo, and don't hide backdrop is other modals are visible
3121
+ if((elem.is(':animated') && visible === state && prevState !== FALSE) || (!state && visibleModals.length)) {
3122
+ return self;
3123
+ }
3124
+
3125
+ // Stop all animations
3126
+ elem.stop(TRUE, FALSE);
3127
+
3128
+ // Use custom function if provided
3129
+ if($.isFunction(effect)) {
3130
+ effect.call(elem, state);
3131
+ }
3132
+
3133
+ // If no effect type is supplied, use a simple toggle
3134
+ else if(effect === FALSE) {
3135
+ elem[ type ]();
3136
+ }
3137
+
3138
+ // Use basic fade function
3139
+ else {
3140
+ elem.fadeTo( parseInt(duration, 10) || 90, state ? 1 : 0, function() {
3141
+ if(!state) { elem.hide(); }
3142
+ });
3143
+ }
3144
+
3145
+ // Reset position and detach from body on hide
3146
+ if(!state) {
3147
+ elem.queue(function(next) {
3148
+ elem.css({ left: '', top: '' });
3149
+ if(!$(MODALSELECTOR).length) { elem.detach(); }
3150
+ next();
3151
+ });
3152
+ }
3153
+
3154
+ // Cache the state
3155
+ prevState = state;
3156
+
3157
+ // If the tooltip is destroyed, set reference to null
3158
+ if(current.destroyed) { current = NULL; }
3159
+
3160
+ return self;
3161
+ }
3162
+ });
3163
+
3164
+ self.init();
3165
+ };
3166
+ OVERLAY = new OVERLAY();
3167
+
3168
+ function Modal(api, options) {
3169
+ this.options = options;
3170
+ this._ns = '-modal';
3171
+
3172
+ this.init( (this.qtip = api) );
3173
+ }
3174
+
3175
+ $.extend(Modal.prototype, {
3176
+ init: function(qtip) {
3177
+ var tooltip = qtip.tooltip;
3178
+
3179
+ // If modal is disabled... return
3180
+ if(!this.options.on) { return this; }
3181
+
3182
+ // Set overlay reference
3183
+ qtip.elements.overlay = OVERLAY.elem;
3184
+
3185
+ // Add unique attribute so we can grab modal tooltips easily via a SELECTOR, and set z-index
3186
+ tooltip.addClass(MODALCLASS).css('z-index', QTIP.modal_zindex + $(MODALSELECTOR).length);
3187
+
3188
+ // Apply our show/hide/focus modal events
3189
+ qtip._bind(tooltip, ['tooltipshow', 'tooltiphide'], function(event, api, duration) {
3190
+ var oEvent = event.originalEvent;
3191
+
3192
+ // Make sure mouseout doesn't trigger a hide when showing the modal and mousing onto backdrop
3193
+ if(event.target === tooltip[0]) {
3194
+ if(oEvent && event.type === 'tooltiphide' && /mouse(leave|enter)/.test(oEvent.type) && $(oEvent.relatedTarget).closest(OVERLAY.elem[0]).length) {
3195
+ try { event.preventDefault(); } catch(e) {}
3196
+ }
3197
+ else if(!oEvent || (oEvent && oEvent.type !== 'tooltipsolo')) {
3198
+ this.toggle(event, event.type === 'tooltipshow', duration);
3199
+ }
3200
+ }
3201
+ }, this._ns, this);
3202
+
3203
+ // Adjust modal z-index on tooltip focus
3204
+ qtip._bind(tooltip, 'tooltipfocus', function(event, api) {
3205
+ // If focus was cancelled before it reached us, don't do anything
3206
+ if(event.isDefaultPrevented() || event.target !== tooltip[0]) { return; }
3207
+
3208
+ var qtips = $(MODALSELECTOR),
3209
+
3210
+ // Keep the modal's lower than other, regular qtips
3211
+ newIndex = QTIP.modal_zindex + qtips.length,
3212
+ curIndex = parseInt(tooltip[0].style.zIndex, 10);
3213
+
3214
+ // Set overlay z-index
3215
+ OVERLAY.elem[0].style.zIndex = newIndex - 1;
3216
+
3217
+ // Reduce modal z-index's and keep them properly ordered
3218
+ qtips.each(function() {
3219
+ if(this.style.zIndex > curIndex) {
3220
+ this.style.zIndex -= 1;
3221
+ }
3222
+ });
3223
+
3224
+ // Fire blur event for focused tooltip
3225
+ qtips.filter('.' + CLASS_FOCUS).qtip('blur', event.originalEvent);
3226
+
3227
+ // Set the new z-index
3228
+ tooltip.addClass(CLASS_FOCUS)[0].style.zIndex = newIndex;
3229
+
3230
+ // Set current
3231
+ OVERLAY.update(api);
3232
+
3233
+ // Prevent default handling
3234
+ try { event.preventDefault(); } catch(e) {}
3235
+ }, this._ns, this);
3236
+
3237
+ // Focus any other visible modals when this one hides
3238
+ qtip._bind(tooltip, 'tooltiphide', function(event) {
3239
+ if(event.target === tooltip[0]) {
3240
+ $(MODALSELECTOR).filter(':visible').not(tooltip).last().qtip('focus', event);
3241
+ }
3242
+ }, this._ns, this);
3243
+ },
3244
+
3245
+ toggle: function(event, state, duration) {
3246
+ // Make sure default event hasn't been prevented
3247
+ if(event && event.isDefaultPrevented()) { return this; }
3248
+
3249
+ // Toggle it
3250
+ OVERLAY.toggle(this.qtip, !!state, duration);
3251
+ },
3252
+
3253
+ destroy: function() {
3254
+ // Remove modal class
3255
+ this.qtip.tooltip.removeClass(MODALCLASS);
3256
+
3257
+ // Remove bound events
3258
+ this.qtip._unbind(this.qtip.tooltip, this._ns);
3259
+
3260
+ // Delete element reference
3261
+ OVERLAY.toggle(this.qtip, FALSE);
3262
+ delete this.qtip.elements.overlay;
3263
+ }
3264
+ });
3265
+
3266
+
3267
+ MODAL = PLUGINS.modal = function(api) {
3268
+ return new Modal(api, api.options.show.modal);
3269
+ };
3270
+
3271
+ // Setup sanitiztion rules
3272
+ MODAL.sanitize = function(opts) {
3273
+ if(opts.show) {
3274
+ if(typeof opts.show.modal !== 'object') { opts.show.modal = { on: !!opts.show.modal }; }
3275
+ else if(typeof opts.show.modal.on === 'undefined') { opts.show.modal.on = TRUE; }
3276
+ }
3277
+ };
3278
+
3279
+ // Base z-index for all modal tooltips (use qTip core z-index as a base)
3280
+ QTIP.modal_zindex = QTIP.zindex - 200;
3281
+
3282
+ // Plugin needs to be initialized on render
3283
+ MODAL.initialize = 'render';
3284
+
3285
+ // Setup option set checks
3286
+ CHECKS.modal = {
3287
+ '^show.modal.(on|blur)$': function() {
3288
+ // Initialise
3289
+ this.destroy();
3290
+ this.init();
3291
+
3292
+ // Show the modal if not visible already and tooltip is visible
3293
+ this.qtip.elems.overlay.toggle(
3294
+ this.qtip.tooltip[0].offsetWidth > 0
3295
+ );
3296
+ }
3297
+ };
3298
+
3299
+ // Extend original api defaults
3300
+ $.extend(TRUE, QTIP.defaults, {
3301
+ show: {
3302
+ modal: {
3303
+ on: FALSE,
3304
+ effect: TRUE,
3305
+ blur: TRUE,
3306
+ stealfocus: TRUE,
3307
+ escape: TRUE
3308
+ }
3309
+ }
3310
+ });
3311
+ ;var IE6,
3312
+
3313
+ /*
3314
+ * BGIFrame adaption (http://plugins.jquery.com/project/bgiframe)
3315
+ * Special thanks to Brandon Aaron
3316
+ */
3317
+ BGIFRAME = '<iframe class="qtip-bgiframe" frameborder="0" tabindex="-1" src="javascript:\'\';" ' +
3318
+ ' style="display:block; position:absolute; z-index:-1; filter:alpha(opacity=0); ' +
3319
+ '-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";"></iframe>';
3320
+
3321
+ function Ie6(api, qtip) {
3322
+ this._ns = 'ie6';
3323
+ this.init( (this.qtip = api) );
3324
+ }
3325
+
3326
+ $.extend(Ie6.prototype, {
3327
+ _scroll : function() {
3328
+ var overlay = this.qtip.elements.overlay;
3329
+ overlay && (overlay[0].style.top = $(window).scrollTop() + 'px');
3330
+ },
3331
+
3332
+ init: function(qtip) {
3333
+ var tooltip = qtip.tooltip,
3334
+ scroll;
3335
+
3336
+ // Create the BGIFrame element if needed
3337
+ if($('select, object').length < 1) {
3338
+ this.bgiframe = qtip.elements.bgiframe = $(BGIFRAME).appendTo(tooltip);
3339
+
3340
+ // Update BGIFrame on tooltip move
3341
+ qtip._bind(tooltip, 'tooltipmove', this.adjustBGIFrame, this._ns, this);
3342
+ }
3343
+
3344
+ // redraw() container for width/height calculations
3345
+ this.redrawContainer = $('<div/>', { id: NAMESPACE+'-rcontainer' })
3346
+ .appendTo(document.body);
3347
+
3348
+ // Fixup modal plugin if present too
3349
+ if( qtip.elements.overlay && qtip.elements.overlay.addClass('qtipmodal-ie6fix') ) {
3350
+ qtip._bind(window, ['scroll', 'resize'], this._scroll, this._ns, this);
3351
+ qtip._bind(tooltip, ['tooltipshow'], this._scroll, this._ns, this);
3352
+ }
3353
+
3354
+ // Set dimensions
3355
+ this.redraw();
3356
+ },
3357
+
3358
+ adjustBGIFrame: function() {
3359
+ var tooltip = this.qtip.tooltip,
3360
+ dimensions = {
3361
+ height: tooltip.outerHeight(FALSE),
3362
+ width: tooltip.outerWidth(FALSE)
3363
+ },
3364
+ plugin = this.qtip.plugins.tip,
3365
+ tip = this.qtip.elements.tip,
3366
+ tipAdjust, offset;
3367
+
3368
+ // Adjust border offset
3369
+ offset = parseInt(tooltip.css('borderLeftWidth'), 10) || 0;
3370
+ offset = { left: -offset, top: -offset };
3371
+
3372
+ // Adjust for tips plugin
3373
+ if(plugin && tip) {
3374
+ tipAdjust = (plugin.corner.precedance === 'x') ? [WIDTH, LEFT] : [HEIGHT, TOP];
3375
+ offset[ tipAdjust[1] ] -= tip[ tipAdjust[0] ]();
3376
+ }
3377
+
3378
+ // Update bgiframe
3379
+ this.bgiframe.css(offset).css(dimensions);
3380
+ },
3381
+
3382
+ // Max/min width simulator function
3383
+ redraw: function() {
3384
+ if(this.qtip.rendered < 1 || this.drawing) { return this; }
3385
+
3386
+ var tooltip = this.qtip.tooltip,
3387
+ style = this.qtip.options.style,
3388
+ container = this.qtip.options.position.container,
3389
+ perc, width, max, min;
3390
+
3391
+ // Set drawing flag
3392
+ this.qtip.drawing = 1;
3393
+
3394
+ // If tooltip has a set height/width, just set it... like a boss!
3395
+ if(style.height) { tooltip.css(HEIGHT, style.height); }
3396
+ if(style.width) { tooltip.css(WIDTH, style.width); }
3397
+
3398
+ // Simulate max/min width if not set width present...
3399
+ else {
3400
+ // Reset width and add fluid class
3401
+ tooltip.css(WIDTH, '').appendTo(this.redrawContainer);
3402
+
3403
+ // Grab our tooltip width (add 1 if odd so we don't get wrapping problems.. huzzah!)
3404
+ width = tooltip.width();
3405
+ if(width % 2 < 1) { width += 1; }
3406
+
3407
+ // Grab our max/min properties
3408
+ max = tooltip.css('maxWidth') || '';
3409
+ min = tooltip.css('minWidth') || '';
3410
+
3411
+ // Parse into proper pixel values
3412
+ perc = (max + min).indexOf('%') > -1 ? container.width() / 100 : 0;
3413
+ max = ((max.indexOf('%') > -1 ? perc : 1) * parseInt(max, 10)) || width;
3414
+ min = ((min.indexOf('%') > -1 ? perc : 1) * parseInt(min, 10)) || 0;
3415
+
3416
+ // Determine new dimension size based on max/min/current values
3417
+ width = max + min ? Math.min(Math.max(width, min), max) : width;
3418
+
3419
+ // Set the newly calculated width and remvoe fluid class
3420
+ tooltip.css(WIDTH, Math.round(width)).appendTo(container);
3421
+ }
3422
+
3423
+ // Set drawing flag
3424
+ this.drawing = 0;
3425
+
3426
+ return this;
3427
+ },
3428
+
3429
+ destroy: function() {
3430
+ // Remove iframe
3431
+ this.bgiframe && this.bgiframe.remove();
3432
+
3433
+ // Remove bound events
3434
+ this.qtip._unbind([window, this.qtip.tooltip], this._ns);
3435
+ }
3436
+ });
3437
+
3438
+ IE6 = PLUGINS.ie6 = function(api) {
3439
+ // Proceed only if the browser is IE6
3440
+ return BROWSER.ie === 6 ? new Ie6(api) : FALSE;
3441
+ };
3442
+
3443
+ IE6.initialize = 'render';
3444
+
3445
+ CHECKS.ie6 = {
3446
+ '^content|style$': function() {
3447
+ this.redraw();
3448
+ }
3449
+ };
3450
+ ;}));
3451
+ }( window, document ));
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
@@ -57,11 +57,11 @@ msgstr ""
57
  msgid "Movies"
58
  msgstr ""
59
 
60
- #: ../lib/classes/KcSeoHelper.php:492, ../lib/functions/KcSeoOptions.php:1390
61
  msgid "Music"
62
  msgstr ""
63
 
64
- #: ../lib/classes/KcSeoHelper.php:493, ../lib/functions/KcSeoOptions.php:1394
65
  msgid "Recipe"
66
  msgstr ""
67
 
@@ -69,11 +69,11 @@ msgstr ""
69
  msgid "TV Episode"
70
  msgstr ""
71
 
72
- #: ../lib/classes/KcSeoHelper.php:495, ../lib/functions/KcSeoOptions.php:1402
73
  msgid "QAPage"
74
  msgstr ""
75
 
76
- #: ../lib/classes/KcSeoHelper.php:496, ../lib/functions/KcSeoOptions.php:1406
77
  msgid "Item List"
78
  msgstr ""
79
 
@@ -129,898 +129,898 @@ msgstr ""
129
  msgid "Don't miss out on our biggest sale of the year! Get your."
130
  msgstr ""
131
 
132
- #: ../lib/functions/KcSeoOptions.php:11
133
  msgid "Article"
134
  msgstr ""
135
 
136
- #: ../lib/functions/KcSeoOptions.php:17, ../lib/functions/KcSeoOptions.php:176, ../lib/functions/KcSeoOptions.php:330
137
  msgid "Headline"
138
  msgstr ""
139
 
140
- #: ../lib/functions/KcSeoOptions.php:19, ../lib/functions/KcSeoOptions.php:332
141
  msgid "Article title"
142
  msgstr ""
143
 
144
- #: ../lib/functions/KcSeoOptions.php:23, ../lib/functions/KcSeoOptions.php:182, ../lib/functions/KcSeoOptions.php:336, ../lib/functions/KcSeoOptions.php:1421
145
  msgid "Page URL"
146
  msgstr ""
147
 
148
- #: ../lib/functions/KcSeoOptions.php:25, ../lib/functions/KcSeoOptions.php:184, ../lib/functions/KcSeoOptions.php:338
149
  msgid "The canonical URL of the article page"
150
  msgstr ""
151
 
152
- #: ../lib/functions/KcSeoOptions.php:29
153
  msgid "Author Name"
154
  msgstr ""
155
 
156
- #: ../lib/functions/KcSeoOptions.php:31, ../lib/functions/KcSeoOptions.php:190, ../lib/functions/KcSeoOptions.php:344
157
  msgid "Author display name"
158
  msgstr ""
159
 
160
- #: ../lib/functions/KcSeoOptions.php:35, ../lib/functions/KcSeoOptions.php:194, ../lib/functions/KcSeoOptions.php:348
161
  msgid "Author URL"
162
  msgstr ""
163
 
164
- #: ../lib/functions/KcSeoOptions.php:41
165
  msgid "Article Feature Image"
166
  msgstr ""
167
 
168
- #: ../lib/functions/KcSeoOptions.php:44
169
  msgid "Images should be at least 696 pixels wide.<br>Images should be in .jpg, .png, or. gif format."
170
  msgstr ""
171
 
172
- #: ../lib/functions/KcSeoOptions.php:47, ../lib/functions/KcSeoOptions.php:206, ../lib/functions/KcSeoOptions.php:360, ../lib/functions/KcSeoOptions.php:1427
173
  msgid "Published date"
174
  msgstr ""
175
 
176
- #: ../lib/functions/KcSeoOptions.php:51, ../lib/functions/KcSeoOptions.php:58, ../lib/functions/KcSeoOptions.php:209, ../lib/functions/KcSeoOptions.php:216, ../lib/functions/KcSeoOptions.php:363, ../lib/functions/KcSeoOptions.php:371, ../lib/functions/KcSeoOptions.php:636, ../lib/functions/KcSeoOptions.php:872, ../lib/functions/KcSeoOptions.php:1101, ../lib/functions/KcSeoOptions.php:1350, ../lib/functions/KcSeoOptions.php:1430, ../lib/functions/KcSeoOptions.php:1437
177
  msgid "Like this: 2021-12-25 14:20:00"
178
  msgstr ""
179
 
180
- #: ../lib/functions/KcSeoOptions.php:54, ../lib/functions/KcSeoOptions.php:213, ../lib/functions/KcSeoOptions.php:367
181
  msgid "Modified date"
182
  msgstr ""
183
 
184
- #: ../lib/functions/KcSeoOptions.php:61, ../lib/functions/KcSeoOptions.php:220, ../lib/functions/KcSeoOptions.php:374
185
  msgid "Publisher"
186
  msgstr ""
187
 
188
- #: ../lib/functions/KcSeoOptions.php:63, ../lib/functions/KcSeoOptions.php:222, ../lib/functions/KcSeoOptions.php:376
189
  msgid "Publisher name or Organization name"
190
  msgstr ""
191
 
192
- #: ../lib/functions/KcSeoOptions.php:67, ../lib/functions/KcSeoOptions.php:226, ../lib/functions/KcSeoOptions.php:380, ../lib/views/settings.php:86
193
  msgid "Publisher Logo"
194
  msgstr ""
195
 
196
- #: ../lib/functions/KcSeoOptions.php:69, ../lib/functions/KcSeoOptions.php:228, ../lib/functions/KcSeoOptions.php:382
197
  msgid "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>"
198
  msgstr ""
199
 
200
- #: ../lib/functions/KcSeoOptions.php:73, ../lib/functions/KcSeoOptions.php:101, ../lib/functions/KcSeoOptions.php:145, ../lib/functions/KcSeoOptions.php:232, ../lib/functions/KcSeoOptions.php:255, ../lib/functions/KcSeoOptions.php:299, ../lib/functions/KcSeoOptions.php:386, ../lib/functions/KcSeoOptions.php:409, ../lib/functions/KcSeoOptions.php:453, ../lib/functions/KcSeoOptions.php:516, ../lib/functions/KcSeoOptions.php:677, ../lib/functions/KcSeoOptions.php:827, ../lib/functions/KcSeoOptions.php:890, ../lib/functions/KcSeoOptions.php:1004, ../lib/functions/KcSeoOptions.php:1036, ../lib/functions/KcSeoOptions.php:1175, ../lib/functions/KcSeoOptions.php:1282, ../lib/views/schema-options.php:170, ../lib/views/schema-options.php:255
201
  msgid "Description"
202
  msgstr ""
203
 
204
- #: ../lib/functions/KcSeoOptions.php:75, ../lib/functions/KcSeoOptions.php:234, ../lib/functions/KcSeoOptions.php:388
205
  msgid "Short description. New line is not supported."
206
  msgstr ""
207
 
208
- #: ../lib/functions/KcSeoOptions.php:78, ../lib/functions/KcSeoOptions.php:237, ../lib/functions/KcSeoOptions.php:391
209
  msgid "Article body"
210
  msgstr ""
211
 
212
- #: ../lib/functions/KcSeoOptions.php:80, ../lib/functions/KcSeoOptions.php:239
213
  msgid "Article content"
214
  msgstr ""
215
 
216
- #: ../lib/functions/KcSeoOptions.php:83
217
  msgid "Alternative headline"
218
  msgstr ""
219
 
220
- #: ../lib/functions/KcSeoOptions.php:85
221
  msgid "A secondary headline for the article."
222
  msgstr ""
223
 
224
- #: ../lib/functions/KcSeoOptions.php:88, ../lib/functions/KcSeoOptions.php:93, ../lib/functions/KcSeoOptions.php:242, ../lib/functions/KcSeoOptions.php:247, ../lib/functions/KcSeoOptions.php:396, ../lib/functions/KcSeoOptions.php:401, ../lib/functions/KcSeoOptions.php:815
225
  msgid "Video"
226
  msgstr ""
227
 
228
- #: ../lib/functions/KcSeoOptions.php:97, ../lib/functions/KcSeoOptions.php:140, ../lib/functions/KcSeoOptions.php:251, ../lib/functions/KcSeoOptions.php:294, ../lib/functions/KcSeoOptions.php:405, ../lib/functions/KcSeoOptions.php:448, ../lib/functions/KcSeoOptions.php:484, ../lib/functions/KcSeoOptions.php:666, ../lib/functions/KcSeoOptions.php:821, ../lib/functions/KcSeoOptions.php:884, ../lib/functions/KcSeoOptions.php:921, ../lib/functions/KcSeoOptions.php:999, ../lib/functions/KcSeoOptions.php:1031, ../lib/functions/KcSeoOptions.php:1277, ../lib/functions/KcSeoOptions.php:1415, ../lib/functions/KcSeoOptions.php:1462, ../lib/views/schema-options.php:224
229
  msgid "Name"
230
  msgstr ""
231
 
232
- #: ../lib/functions/KcSeoOptions.php:105, ../lib/functions/KcSeoOptions.php:259, ../lib/functions/KcSeoOptions.php:354, ../lib/functions/KcSeoOptions.php:413, ../lib/functions/KcSeoOptions.php:672, ../lib/functions/KcSeoOptions.php:1008, ../lib/functions/KcSeoOptions.php:1040, ../lib/functions/KcSeoOptions.php:1249, ../lib/functions/KcSeoOptions.php:1509, ../lib/views/schema-options.php:247
233
  msgid "Image"
234
  msgstr ""
235
 
236
- #: ../lib/functions/KcSeoOptions.php:109, ../lib/functions/KcSeoOptions.php:155, ../lib/functions/KcSeoOptions.php:263, ../lib/functions/KcSeoOptions.php:309, ../lib/functions/KcSeoOptions.php:417, ../lib/functions/KcSeoOptions.php:463
237
  msgid "Content URL"
238
  msgstr ""
239
 
240
- #: ../lib/functions/KcSeoOptions.php:113, ../lib/functions/KcSeoOptions.php:267, ../lib/functions/KcSeoOptions.php:421
241
  msgid "Embed URL"
242
  msgstr ""
243
 
244
- #: ../lib/functions/KcSeoOptions.php:114, ../lib/functions/KcSeoOptions.php:268, ../lib/functions/KcSeoOptions.php:422, ../lib/functions/KcSeoOptions.php:855, ../lib/functions/KcSeoOptions.php:1050
245
  msgid "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."
246
  msgstr ""
247
 
248
- #: ../lib/functions/KcSeoOptions.php:118, ../lib/functions/KcSeoOptions.php:272, ../lib/functions/KcSeoOptions.php:426
249
  msgid "Upload date"
250
  msgstr ""
251
 
252
- #: ../lib/functions/KcSeoOptions.php:121, ../lib/functions/KcSeoOptions.php:275, ../lib/functions/KcSeoOptions.php:429
253
  msgid "Like this: 2021-08-25 14:20:00"
254
  msgstr ""
255
 
256
- #: ../lib/functions/KcSeoOptions.php:125, ../lib/functions/KcSeoOptions.php:150, ../lib/functions/KcSeoOptions.php:279, ../lib/functions/KcSeoOptions.php:304, ../lib/functions/KcSeoOptions.php:433, ../lib/functions/KcSeoOptions.php:458, ../lib/functions/KcSeoOptions.php:847, ../lib/functions/KcSeoOptions.php:902
257
  msgid "Duration"
258
  msgstr ""
259
 
260
- #: ../lib/functions/KcSeoOptions.php:126, ../lib/functions/KcSeoOptions.php:280, ../lib/functions/KcSeoOptions.php:434
261
  msgid "Runtime of the movie in ISO 8601 format (for example, \"PT2H22M\" (142 minutes))."
262
  msgstr ""
263
 
264
- #: ../lib/functions/KcSeoOptions.php:131, ../lib/functions/KcSeoOptions.php:136, ../lib/functions/KcSeoOptions.php:285, ../lib/functions/KcSeoOptions.php:290, ../lib/functions/KcSeoOptions.php:439, ../lib/functions/KcSeoOptions.php:444, ../lib/functions/KcSeoOptions.php:878
265
  msgid "Audio"
266
  msgstr ""
267
 
268
- #: ../lib/functions/KcSeoOptions.php:141, ../lib/functions/KcSeoOptions.php:295, ../lib/functions/KcSeoOptions.php:449, ../lib/functions/KcSeoOptions.php:887
269
  msgid "The title of the audio"
270
  msgstr ""
271
 
272
- #: ../lib/functions/KcSeoOptions.php:146, ../lib/functions/KcSeoOptions.php:300, ../lib/functions/KcSeoOptions.php:454
273
  msgid "The short description of the audio"
274
  msgstr ""
275
 
276
- #: ../lib/functions/KcSeoOptions.php:151, ../lib/functions/KcSeoOptions.php:305, ../lib/functions/KcSeoOptions.php:459, ../lib/functions/KcSeoOptions.php:904
277
  msgid "The duration of the audio in ISO 8601 format.(PT1M33S)"
278
  msgstr ""
279
 
280
- #: ../lib/functions/KcSeoOptions.php:156, ../lib/functions/KcSeoOptions.php:310, ../lib/functions/KcSeoOptions.php:464, ../lib/functions/KcSeoOptions.php:1012, ../lib/functions/KcSeoOptions.php:1044, ../lib/functions/KcSeoOptions.php:1049, ../lib/functions/KcSeoOptions.php:1468
281
  msgid "URL"
282
  msgstr ""
283
 
284
- #: ../lib/functions/KcSeoOptions.php:157, ../lib/functions/KcSeoOptions.php:311, ../lib/functions/KcSeoOptions.php:465, ../lib/functions/KcSeoOptions.php:899
285
  msgid "A URL pointing to the actual audio media file. This file should be in .mp3, .wav, .mpc or other audio file format."
286
  msgstr ""
287
 
288
- #: ../lib/functions/KcSeoOptions.php:161, ../lib/functions/KcSeoOptions.php:315, ../lib/functions/KcSeoOptions.php:469, ../lib/functions/KcSeoOptions.php:908
289
  msgid "Encoding Format"
290
  msgstr ""
291
 
292
- #: ../lib/functions/KcSeoOptions.php:162, ../lib/functions/KcSeoOptions.php:316, ../lib/functions/KcSeoOptions.php:470, ../lib/functions/KcSeoOptions.php:909
293
  msgid "The encoding format of audio like: 'audio/mpeg'"
294
  msgstr ""
295
 
296
- #: ../lib/functions/KcSeoOptions.php:170
297
  msgid "Blog Posting"
298
  msgstr ""
299
 
300
- #: ../lib/functions/KcSeoOptions.php:178
301
  msgid "Blog posting title"
302
  msgstr ""
303
 
304
- #: ../lib/functions/KcSeoOptions.php:188
305
  msgid "Author name"
306
  msgstr ""
307
 
308
- #: ../lib/functions/KcSeoOptions.php:200
309
  msgid "Feature Image"
310
  msgstr ""
311
 
312
- #: ../lib/functions/KcSeoOptions.php:202, ../lib/functions/KcSeoOptions.php:356
313
  msgid "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."
314
  msgstr ""
315
 
316
- #: ../lib/functions/KcSeoOptions.php:324
317
  msgid "News Article"
318
  msgstr ""
319
 
320
- #: ../lib/functions/KcSeoOptions.php:342, ../lib/functions/KcSeoOptions.php:615, ../lib/functions/KcSeoOptions.php:1091, ../lib/functions/KcSeoOptions.php:1329
321
  msgid "Author"
322
  msgstr ""
323
 
324
- #: ../lib/functions/KcSeoOptions.php:393
325
  msgid "Article body content. New line is not supported."
326
  msgstr ""
327
 
328
- #: ../lib/functions/KcSeoOptions.php:478
329
  msgid "Event"
330
  msgstr ""
331
 
332
- #: ../lib/functions/KcSeoOptions.php:487
333
  msgid "The name of the event."
334
  msgstr ""
335
 
336
- #: ../lib/functions/KcSeoOptions.php:490
337
  msgid "Location name"
338
  msgstr ""
339
 
340
- #: ../lib/functions/KcSeoOptions.php:493
341
  msgid "Event Location name"
342
  msgstr ""
343
 
344
- #: ../lib/functions/KcSeoOptions.php:496
345
  msgid "Location address"
346
  msgstr ""
347
 
348
- #: ../lib/functions/KcSeoOptions.php:499
349
  msgid "The location of for example where the event is happening, an organization is located, or where an action takes place."
350
  msgstr ""
351
 
352
- #: ../lib/functions/KcSeoOptions.php:502
353
  msgid "Start date"
354
  msgstr ""
355
 
356
- #: ../lib/functions/KcSeoOptions.php:506
357
  msgid "Event start date Like : 2017-10-16 4:00 AM"
358
  msgstr ""
359
 
360
- #: ../lib/functions/KcSeoOptions.php:509
361
  msgid "End date"
362
  msgstr ""
363
 
364
- #: ../lib/functions/KcSeoOptions.php:513
365
  msgid "Event end date Like : 2017-10-16 4:00 AM"
366
  msgstr ""
367
 
368
- #: ../lib/functions/KcSeoOptions.php:519
369
  msgid "Event description. New line is not supported."
370
  msgstr ""
371
 
372
- #: ../lib/functions/KcSeoOptions.php:522
373
  msgid "Organizer"
374
  msgstr ""
375
 
376
- #: ../lib/functions/KcSeoOptions.php:525
377
  msgid "The Organizer."
378
  msgstr ""
379
 
380
- #: ../lib/functions/KcSeoOptions.php:528, ../lib/functions/KcSeoOptions.php:531
381
  msgid "Organizer URL"
382
  msgstr ""
383
 
384
- #: ../lib/functions/KcSeoOptions.php:534
385
  msgid "Performer Name"
386
  msgstr ""
387
 
388
- #: ../lib/functions/KcSeoOptions.php:537
389
  msgid "The performer's name."
390
  msgstr ""
391
 
392
- #: ../lib/functions/KcSeoOptions.php:564
393
  msgid "Image URL"
394
  msgstr ""
395
 
396
- #: ../lib/functions/KcSeoOptions.php:567
397
  msgid "URL of an image or logo for the event or tour"
398
  msgstr ""
399
 
400
- #: ../lib/functions/KcSeoOptions.php:570, ../lib/functions/KcSeoOptions.php:761
401
  msgid "Price"
402
  msgstr ""
403
 
404
- #: ../lib/functions/KcSeoOptions.php:574
405
  msgid "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>"
406
  msgstr ""
407
 
408
- #: ../lib/functions/KcSeoOptions.php:577, ../lib/functions/KcSeoOptions.php:774
409
  msgid "Price currency"
410
  msgstr ""
411
 
412
- #: ../lib/functions/KcSeoOptions.php:579
413
  msgid "The 3-letter currency code. (USD)"
414
  msgstr ""
415
 
416
- #: ../lib/functions/KcSeoOptions.php:593
417
  msgid "Valid From"
418
  msgstr ""
419
 
420
- #: ../lib/functions/KcSeoOptions.php:604
421
  msgid "A link to the event's details page. <span class='required'>Not required but (Recommended)</span>"
422
  msgstr ""
423
 
424
- #: ../lib/functions/KcSeoOptions.php:607, ../lib/functions/KcSeoOptions.php:1062, ../lib/functions/KcSeoOptions.php:1321
425
  msgid "Review"
426
  msgstr ""
427
 
428
- #: ../lib/functions/KcSeoOptions.php:609, ../lib/functions/KcSeoOptions.php:1323
429
  msgid "To add review schema for this type, complete fields below and enable, others live blank."
430
  msgstr ""
431
 
432
- #: ../lib/functions/KcSeoOptions.php:620, ../lib/functions/KcSeoOptions.php:1016, ../lib/functions/KcSeoOptions.php:1054, ../lib/functions/KcSeoOptions.php:1334
433
  msgid "Author Same As profile link"
434
  msgstr ""
435
 
436
- #: ../lib/functions/KcSeoOptions.php:624, ../lib/functions/KcSeoOptions.php:1338
437
  msgid "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"
438
  msgstr ""
439
 
440
- #: ../lib/functions/KcSeoOptions.php:627, ../lib/functions/KcSeoOptions.php:1079, ../lib/functions/KcSeoOptions.php:1341
441
  msgid "Review body"
442
  msgstr ""
443
 
444
- #: ../lib/functions/KcSeoOptions.php:630, ../lib/functions/KcSeoOptions.php:1082, ../lib/functions/KcSeoOptions.php:1344
445
  msgid "The actual body of the review."
446
  msgstr ""
447
 
448
- #: ../lib/functions/KcSeoOptions.php:633, ../lib/functions/KcSeoOptions.php:1098, ../lib/functions/KcSeoOptions.php:1347
449
  msgid "Date of Published"
450
  msgstr ""
451
 
452
- #: ../lib/functions/KcSeoOptions.php:639, ../lib/functions/KcSeoOptions.php:745, ../lib/functions/KcSeoOptions.php:1104, ../lib/functions/KcSeoOptions.php:1353
453
  msgid "Rating value"
454
  msgstr ""
455
 
456
- #: ../lib/functions/KcSeoOptions.php:642, ../lib/functions/KcSeoOptions.php:1107, ../lib/functions/KcSeoOptions.php:1198, ../lib/functions/KcSeoOptions.php:1356
457
  msgid "A numerical quality rating for the item."
458
  msgstr ""
459
 
460
- #: ../lib/functions/KcSeoOptions.php:645, ../lib/functions/KcSeoOptions.php:1110, ../lib/functions/KcSeoOptions.php:1359
461
  msgid "Best rating"
462
  msgstr ""
463
 
464
- #: ../lib/functions/KcSeoOptions.php:648, ../lib/functions/KcSeoOptions.php:1113, ../lib/functions/KcSeoOptions.php:1362
465
  msgid "The highest value allowed in this rating system."
466
  msgstr ""
467
 
468
- #: ../lib/functions/KcSeoOptions.php:651, ../lib/functions/KcSeoOptions.php:1116, ../lib/functions/KcSeoOptions.php:1365
469
  msgid "Worst rating"
470
  msgstr ""
471
 
472
- #: ../lib/functions/KcSeoOptions.php:654, ../lib/functions/KcSeoOptions.php:1119, ../lib/functions/KcSeoOptions.php:1368
473
  msgid "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."
474
  msgstr ""
475
 
476
- #: ../lib/functions/KcSeoOptions.php:660
477
  msgid "Product"
478
  msgstr ""
479
 
480
- #: ../lib/functions/KcSeoOptions.php:669
481
  msgid "The name of the product."
482
  msgstr ""
483
 
484
- #: ../lib/functions/KcSeoOptions.php:674
485
  msgid "The URL of a product photo. Pictures clearly showing the product, e.g. against a white background, are preferred."
486
  msgstr ""
487
 
488
- #: ../lib/functions/KcSeoOptions.php:679
489
  msgid "Product description. New line is not supported."
490
  msgstr ""
491
 
492
- #: ../lib/functions/KcSeoOptions.php:682
493
  msgid "SKU"
494
  msgstr ""
495
 
496
- #: ../lib/functions/KcSeoOptions.php:687
497
  msgid "Brand"
498
  msgstr ""
499
 
500
- #: ../lib/functions/KcSeoOptions.php:690
501
  msgid "The brand of the product."
502
  msgstr ""
503
 
504
- #: ../lib/functions/KcSeoOptions.php:693
505
  msgid "Identifier Type"
506
  msgstr ""
507
 
508
- #: ../lib/functions/KcSeoOptions.php:703
509
  msgid ""
510
- "<strong>MPN</strong><br>\n"
511
- " &#8594; MPN(Manufacturer Part Number) Used globally, Alphanumeric digits (various lengths)<br>\n"
512
- " <strong>GTIN</strong><br>\n"
513
- " &#8594; UPC(Universal Product Code) Used in primarily North America. 12 numeric digits. eg. 892685001003.<br>\n"
514
- " &#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"
515
- " &#8594; ISBN(International Standard Book Number) Used globally, ISBN-13 (recommended), 13 numeric digits 978-0747595823<br>\n"
516
  " &#8594; JAN(Japanese Article Number) Used only in Japan, 8 or 13 numeric digits."
517
  msgstr ""
518
 
519
- #: ../lib/functions/KcSeoOptions.php:712
520
  msgid "Identifier"
521
  msgstr ""
522
 
523
- #: ../lib/functions/KcSeoOptions.php:715
524
  msgid "Enter product unique identifier"
525
  msgstr ""
526
 
527
- #: ../lib/functions/KcSeoOptions.php:718
528
  msgid "Product Review & Rating"
529
  msgstr ""
530
 
531
- #: ../lib/functions/KcSeoOptions.php:722
532
  msgid "Review rating value"
533
  msgstr ""
534
 
535
- #: ../lib/functions/KcSeoOptions.php:726, ../lib/functions/KcSeoOptions.php:748
536
  msgid "Rating value. (1 , 2.5, 3, 5 etc)"
537
  msgstr ""
538
 
539
- #: ../lib/functions/KcSeoOptions.php:729
540
  msgid "Review Best rating"
541
  msgstr ""
542
 
543
- #: ../lib/functions/KcSeoOptions.php:735
544
  msgid "Review Worst rating"
545
  msgstr ""
546
 
547
- #: ../lib/functions/KcSeoOptions.php:741
548
  msgid "Review author"
549
  msgstr ""
550
 
551
- #: ../lib/functions/KcSeoOptions.php:751
552
  msgid "Total review count"
553
  msgstr ""
554
 
555
- #: ../lib/functions/KcSeoOptions.php:754
556
  msgid "Review rating value. <span class='required'>This is required if (Rating value) is given</span>"
557
  msgstr ""
558
 
559
- #: ../lib/functions/KcSeoOptions.php:757
560
  msgid "Product Pricing"
561
  msgstr ""
562
 
563
- #: ../lib/functions/KcSeoOptions.php:764
564
  msgid "The lowest available price, including service charges and fees, of this type of ticket."
565
  msgstr ""
566
 
567
- #: ../lib/functions/KcSeoOptions.php:767
568
  msgid "PriceValidUntil"
569
  msgstr ""
570
 
571
- #: ../lib/functions/KcSeoOptions.php:771
572
  msgid "The date (in ISO 8601 date and time format) after which the price will no longer be available."
573
  msgstr ""
574
 
575
- #: ../lib/functions/KcSeoOptions.php:776
576
  msgid "The 3-letter currency code."
577
  msgstr ""
578
 
579
- #: ../lib/functions/KcSeoOptions.php:792
580
  msgid "Select a availability type"
581
  msgstr ""
582
 
583
- #: ../lib/functions/KcSeoOptions.php:804
584
  msgid "Select a condition"
585
  msgstr ""
586
 
587
- #: ../lib/functions/KcSeoOptions.php:807
588
  msgid "Product URL"
589
  msgstr ""
590
 
591
- #: ../lib/functions/KcSeoOptions.php:809
592
  msgid "A URL to the product web page (that includes the Offer). (Don't use offerURL for markup that appears on the product page itself.)"
593
  msgstr ""
594
 
595
- #: ../lib/functions/KcSeoOptions.php:824
596
  msgid "The title of the video"
597
  msgstr ""
598
 
599
- #: ../lib/functions/KcSeoOptions.php:830
600
  msgid "The description of the video. New line is not supported."
601
  msgstr ""
602
 
603
- #: ../lib/functions/KcSeoOptions.php:837
604
  msgid "A URL pointing to the video thumbnail image file. Images must be at least 160x90 pixels and at most 1920x1080 pixels."
605
  msgstr ""
606
 
607
- #: ../lib/functions/KcSeoOptions.php:840
608
  msgid "Updated date"
609
  msgstr ""
610
 
611
- #: ../lib/functions/KcSeoOptions.php:844
612
  msgid "2021-02-05T08:00:00+08:00"
613
  msgstr ""
614
 
615
- #: ../lib/functions/KcSeoOptions.php:849
616
  msgid "The duration of the video in ISO 8601 format.(PT1M33S)"
617
  msgstr ""
618
 
619
- #: ../lib/functions/KcSeoOptions.php:861
620
  msgid "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."
621
  msgstr ""
622
 
623
- #: ../lib/functions/KcSeoOptions.php:864
624
  msgid "Interaction count"
625
  msgstr ""
626
 
627
- #: ../lib/functions/KcSeoOptions.php:866
628
  msgid "The number of times the video has been viewed."
629
  msgstr ""
630
 
631
- #: ../lib/functions/KcSeoOptions.php:869
632
  msgid "Expires"
633
  msgstr ""
634
 
635
- #: ../lib/functions/KcSeoOptions.php:892
636
  msgid "The description of the audio. New line is not supported."
637
  msgstr ""
638
 
639
- #: ../lib/functions/KcSeoOptions.php:915
640
  msgid "Service"
641
  msgstr ""
642
 
643
- #: ../lib/functions/KcSeoOptions.php:924
644
  msgid "The name of the Service."
645
  msgstr ""
646
 
647
- #: ../lib/functions/KcSeoOptions.php:927
648
  msgid "Service type"
649
  msgstr ""
650
 
651
- #: ../lib/functions/KcSeoOptions.php:930
652
  msgid "The type of service being offered, e.g. veterans' benefits, emergency relief, etc."
653
  msgstr ""
654
 
655
- #: ../lib/functions/KcSeoOptions.php:936
656
  msgid "An additional type for the service, typically used for adding more specific types from external vocabularies in microdata syntax."
657
  msgstr ""
658
 
659
- #: ../lib/functions/KcSeoOptions.php:939
660
  msgid "Award"
661
  msgstr ""
662
 
663
- #: ../lib/functions/KcSeoOptions.php:941
664
  msgid "An award won by or for this service."
665
  msgstr ""
666
 
667
- #: ../lib/functions/KcSeoOptions.php:944
668
  msgid "Category"
669
  msgstr ""
670
 
671
- #: ../lib/functions/KcSeoOptions.php:946
672
  msgid "A category for the service."
673
  msgstr ""
674
 
675
- #: ../lib/functions/KcSeoOptions.php:949
676
  msgid "Provider mobility"
677
  msgstr ""
678
 
679
- #: ../lib/functions/KcSeoOptions.php:951
680
  msgid "Indicates the mobility of a provided service (e.g. 'static', 'dynamic')."
681
  msgstr ""
682
 
683
- #: ../lib/functions/KcSeoOptions.php:957
684
  msgid "A short description of the service. New line is not supported."
685
  msgstr ""
686
 
687
- #: ../lib/functions/KcSeoOptions.php:963
688
  msgid "An image of the service. This should be a URL."
689
  msgstr ""
690
 
691
- #: ../lib/functions/KcSeoOptions.php:969
692
  msgid "Indicates a page (or other CreativeWork) for which this thing is the main entity being described."
693
  msgstr ""
694
 
695
- #: ../lib/functions/KcSeoOptions.php:975
696
  msgid "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."
697
  msgstr ""
698
 
699
- #: ../lib/functions/KcSeoOptions.php:981
700
  msgid "URL of the service."
701
  msgstr ""
702
 
703
- #: ../lib/functions/KcSeoOptions.php:984
704
  msgid "Alternate name"
705
  msgstr ""
706
 
707
- #: ../lib/functions/KcSeoOptions.php:986
708
  msgid "An alias for the service."
709
  msgstr ""
710
 
711
- #: ../lib/functions/KcSeoOptions.php:992
712
  msgid "About"
713
  msgstr ""
714
 
715
- #: ../lib/functions/KcSeoOptions.php:1018, ../lib/functions/KcSeoOptions.php:1056
716
  msgid "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"
717
  msgstr ""
718
 
719
- #: ../lib/functions/KcSeoOptions.php:1024
720
  msgid "Contact"
721
  msgstr ""
722
 
723
- #: ../lib/functions/KcSeoOptions.php:1048
724
  msgid "Video URL"
725
  msgstr ""
726
 
727
- #: ../lib/functions/KcSeoOptions.php:1068
728
  msgid "Notice</span>"
729
  msgstr ""
730
 
731
- #: ../lib/functions/KcSeoOptions.php:1073
732
  msgid "Name of the reviewed item"
733
  msgstr ""
734
 
735
- #: ../lib/functions/KcSeoOptions.php:1076
736
  msgid "The item that is being reviewed."
737
  msgstr ""
738
 
739
- #: ../lib/functions/KcSeoOptions.php:1085
740
  msgid "Review name"
741
  msgstr ""
742
 
743
- #: ../lib/functions/KcSeoOptions.php:1088
744
  msgid "A particular name for the review."
745
  msgstr ""
746
 
747
- #: ../lib/functions/KcSeoOptions.php:1095
748
  msgid "The author of the review. The reviewer’s name needs to be a valid name."
749
  msgstr ""
750
 
751
- #: ../lib/functions/KcSeoOptions.php:1122
752
  msgid "Name of the organization"
753
  msgstr ""
754
 
755
- #: ../lib/functions/KcSeoOptions.php:1124
756
  msgid "The publisher of the review."
757
  msgstr ""
758
 
759
- #: ../lib/functions/KcSeoOptions.php:1130
760
  msgid "Aggregate Ratings"
761
  msgstr ""
762
 
763
- #: ../lib/functions/KcSeoOptions.php:1136
764
  msgid "Schema type"
765
  msgstr ""
766
 
767
- #: ../lib/functions/KcSeoOptions.php:1141
768
  msgid "Use the most appropriate schema type for what is being reviewed."
769
  msgstr ""
770
 
771
- #: ../lib/functions/KcSeoOptions.php:1144
772
  msgid "Name of the item"
773
  msgstr ""
774
 
775
- #: ../lib/functions/KcSeoOptions.php:1147
776
  msgid "The item that is being rated."
777
  msgstr ""
778
 
779
- #: ../lib/functions/KcSeoOptions.php:1160, ../lib/functions/KcSeoOptions.php:1295, ../lib/functions/KcSeoOptions.php:1516, ../lib/views/schema-options.php:118
780
  msgid "The price range of the business, for example $$$."
781
  msgstr ""
782
 
783
- #: ../lib/functions/KcSeoOptions.php:1177
784
  msgid "Description for thr review. New line is not supported."
785
  msgstr ""
786
 
787
- #: ../lib/functions/KcSeoOptions.php:1180
788
  msgid "Rating Count"
789
  msgstr ""
790
 
791
- #: ../lib/functions/KcSeoOptions.php:1184
792
  msgid "The total number of ratings for the item on your site. <span class='required'>* At least one of ratingCount or reviewCount is required.</span>"
793
  msgstr ""
794
 
795
- #: ../lib/functions/KcSeoOptions.php:1187
796
  msgid "Review Count"
797
  msgstr ""
798
 
799
- #: ../lib/functions/KcSeoOptions.php:1191
800
  msgid "Specifies the number of people who provided a review with or without an accompanying rating. At least one of ratingCount or reviewCount is required."
801
  msgstr ""
802
 
803
- #: ../lib/functions/KcSeoOptions.php:1194
804
  msgid "Rating Value"
805
  msgstr ""
806
 
807
- #: ../lib/functions/KcSeoOptions.php:1201
808
  msgid "Best Rating"
809
  msgstr ""
810
 
811
- #: ../lib/functions/KcSeoOptions.php:1205
812
  msgid "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."
813
  msgstr ""
814
 
815
- #: ../lib/functions/KcSeoOptions.php:1208
816
  msgid "Worst Rating"
817
  msgstr ""
818
 
819
- #: ../lib/functions/KcSeoOptions.php:1212
820
  msgid "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."
821
  msgstr ""
822
 
823
- #: ../lib/functions/KcSeoOptions.php:1218
824
  msgid "Restaurant"
825
  msgstr ""
826
 
827
- #: ../lib/functions/KcSeoOptions.php:1224
828
  msgid "Name of the Restaurant"
829
  msgstr ""
830
 
831
- #: ../lib/functions/KcSeoOptions.php:1229
832
  msgid "Description of the Restaurant"
833
  msgstr ""
834
 
835
- #: ../lib/functions/KcSeoOptions.php:1231, ../lib/functions/KcSeoOptions.php:1284
836
  msgid "New line is not supported."
837
  msgstr ""
838
 
839
- #: ../lib/functions/KcSeoOptions.php:1234
840
  msgid "Opening Hours"
841
  msgstr ""
842
 
843
- #: ../lib/functions/KcSeoOptions.php:1236
844
  msgid "Mo,Tu,We,Th,Fr,Sa,Su 11:30-23:00"
845
  msgstr ""
846
 
847
- #: ../lib/functions/KcSeoOptions.php:1239, ../lib/functions/KcSeoOptions.php:1316
848
  msgid "Telephone"
849
  msgstr ""
850
 
851
- #: ../lib/functions/KcSeoOptions.php:1241
852
  msgid "+155501003333"
853
  msgstr ""
854
 
855
- #: ../lib/functions/KcSeoOptions.php:1244
856
  msgid "Menu"
857
  msgstr ""
858
 
859
- #: ../lib/functions/KcSeoOptions.php:1246
860
  msgid "http://example.com/menu"
861
  msgstr ""
862
 
863
- #: ../lib/functions/KcSeoOptions.php:1254, ../lib/views/schema-options.php:270
864
  msgid "Address"
865
  msgstr ""
866
 
867
- #: ../lib/functions/KcSeoOptions.php:1258, ../lib/functions/KcSeoOptions.php:1292, ../lib/views/schema-options.php:113
868
  msgid "Price Range"
869
  msgstr ""
870
 
871
- #: ../lib/functions/KcSeoOptions.php:1260
872
  msgid "The price range of the business, for example $$$"
873
  msgstr ""
874
 
875
- #: ../lib/functions/KcSeoOptions.php:1263
876
  msgid "Serves Cuisine"
877
  msgstr ""
878
 
879
- #: ../lib/functions/KcSeoOptions.php:1265, ../lib/views/schema-options.php:159
880
  msgid "The cuisine of the restaurant."
881
  msgstr ""
882
 
883
- #: ../lib/functions/KcSeoOptions.php:1271
884
  msgid "Local Business"
885
  msgstr ""
886
 
887
- #: ../lib/functions/KcSeoOptions.php:1287
888
  msgid "Business Logo"
889
  msgstr ""
890
 
891
- #: ../lib/functions/KcSeoOptions.php:1298
892
  msgid "Address locality"
893
  msgstr ""
894
 
895
- #: ../lib/functions/KcSeoOptions.php:1300
896
  msgid "City (i.e Kansas city)"
897
  msgstr ""
898
 
899
- #: ../lib/functions/KcSeoOptions.php:1303
900
  msgid "Address region"
901
  msgstr ""
902
 
903
- #: ../lib/functions/KcSeoOptions.php:1305
904
  msgid "State (i.e. MO)"
905
  msgstr ""
906
 
907
- #: ../lib/functions/KcSeoOptions.php:1308
908
  msgid "Postal code"
909
  msgstr ""
910
 
911
- #: ../lib/functions/KcSeoOptions.php:1312
912
  msgid "Street address"
913
  msgstr ""
914
 
915
- #: ../lib/functions/KcSeoOptions.php:1374
916
  msgid "Book"
917
  msgstr ""
918
 
919
- #: ../lib/functions/KcSeoOptions.php:1378
920
  msgid "Course"
921
  msgstr ""
922
 
923
- #: ../lib/functions/KcSeoOptions.php:1382
924
  msgid "Job Posting"
925
  msgstr ""
926
 
927
- #: ../lib/functions/KcSeoOptions.php:1386
928
  msgid "Movie"
929
  msgstr ""
930
 
931
- #: ../lib/functions/KcSeoOptions.php:1398
932
  msgid "TVEpisode"
933
  msgstr ""
934
 
935
- #: ../lib/functions/KcSeoOptions.php:1409
936
  msgid "Special Announcement"
937
  msgstr ""
938
 
939
- #: ../lib/functions/KcSeoOptions.php:1417
940
  msgid "SpecialAnnouncement.name: Name of the announcement. This text should be present on the underlying page."
941
  msgstr ""
942
 
943
- #: ../lib/functions/KcSeoOptions.php:1423
944
  msgid "SpecialAnnouncement.url: URL of the page containing the announcements. If present, this must match the URL of the page containing the information."
945
  msgstr ""
946
 
947
- #: ../lib/functions/KcSeoOptions.php:1434
948
  msgid "Expires date"
949
  msgstr ""
950
 
951
- #: ../lib/functions/KcSeoOptions.php:1441
952
  msgid "Text"
953
  msgstr ""
954
 
955
- #: ../lib/functions/KcSeoOptions.php:1443
956
  msgid "SpecialAnnouncement.text: Text of the announcements."
957
  msgstr ""
958
 
959
- #: ../lib/functions/KcSeoOptions.php:1447
960
  msgid "Announcement Locations"
961
  msgstr ""
962
 
963
- #: ../lib/functions/KcSeoOptions.php:1453
964
  msgid "Announcement Location"
965
  msgstr ""
966
 
967
- #: ../lib/functions/KcSeoOptions.php:1456
968
  msgid "Type"
969
  msgstr ""
970
 
971
- #: ../lib/functions/KcSeoOptions.php:1464
972
  msgid "SpecialAnnouncement.announcementLocation.name: "
973
  msgstr ""
974
 
975
- #: ../lib/functions/KcSeoOptions.php:1471
976
  msgid "SpecialAnnouncement.announcementLocation.url: URL"
977
  msgstr ""
978
 
979
- #: ../lib/functions/KcSeoOptions.php:1474
980
  msgid "Address: Street"
981
  msgstr ""
982
 
983
- #: ../lib/functions/KcSeoOptions.php:1476
984
  msgid "SpecialAnnouncement.announcementLocation.address.streetAddress: The street address. For example, 1600 Amphitheatre Pkwy."
985
  msgstr ""
986
 
987
- #: ../lib/functions/KcSeoOptions.php:1480
988
  msgid "Address: Locality"
989
  msgstr ""
990
 
991
- #: ../lib/functions/KcSeoOptions.php:1482
992
  msgid "SpecialAnnouncement.announcementLocation.address.addressLocality: The locality in which the street address is, and which is in the region. For example, Mountain View."
993
  msgstr ""
994
 
995
- #: ../lib/functions/KcSeoOptions.php:1486
996
  msgid "Address: Post Code"
997
  msgstr ""
998
 
999
- #: ../lib/functions/KcSeoOptions.php:1488
1000
  msgid "SpecialAnnouncement.announcementLocation.address.postalCode: The postal code. For example, 94043."
1001
  msgstr ""
1002
 
1003
- #: ../lib/functions/KcSeoOptions.php:1492
1004
  msgid "Address: Region"
1005
  msgstr ""
1006
 
1007
- #: ../lib/functions/KcSeoOptions.php:1494
1008
  msgid "SpecialAnnouncement.announcementLocation.address.addressRegion: The region in which the locality is, and which is in the country. For example, California."
1009
  msgstr ""
1010
 
1011
- #: ../lib/functions/KcSeoOptions.php:1498
1012
  msgid "Address: Country"
1013
  msgstr ""
1014
 
1015
- #: ../lib/functions/KcSeoOptions.php:1500
1016
  msgid "SpecialAnnouncement.announcementLocation.address.addressCountry: The country. For example, USA. You can also provide the two-letter ISO 3166-1 alpha-2 country code."
1017
  msgstr ""
1018
 
1019
- #: ../lib/functions/KcSeoOptions.php:1504
1020
  msgid "ID"
1021
  msgstr ""
1022
 
1023
- #: ../lib/functions/KcSeoOptions.php:1506
1024
  msgid "SpecialAnnouncement.announcementLocation.@id: An optional unique identifier so that you can reference pre-existing structured data for this location."
1025
  msgstr ""
1026
 
@@ -1070,7 +1070,7 @@ msgstr ""
1070
 
1071
  #: ../lib/views/schema-options.php:142
1072
  msgid ""
1073
- "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"
1074
  " as a schema “Type”): Pick LocalBusiness as a generic Type, then add additional type as follows:"
1075
  msgstr ""
1076
 
@@ -1248,13 +1248,13 @@ msgstr ""
1248
 
1249
  #: ../lib/views/settings.php:18
1250
  msgid ""
1251
- "Home page\n"
1252
  " only"
1253
  msgstr ""
1254
 
1255
  #: ../lib/views/settings.php:22
1256
  msgid ""
1257
- "Sitewide (Apply General Settings schema\n"
1258
  " sitewide)"
1259
  msgstr ""
1260
 
@@ -1276,7 +1276,7 @@ msgstr ""
1276
 
1277
  #: ../lib/views/settings.php:67
1278
  msgid ""
1279
- "Please deselect the navigation menu if you want to deactivate site navigation\n"
1280
  " schema."
1281
  msgstr ""
1282
 
@@ -1338,6 +1338,6 @@ msgstr ""
1338
 
1339
  #: ../lib/views/settings.php:146
1340
  msgid ""
1341
- "This will delete all schema created and applied by this plugin when plugin is\n"
1342
  " deleted."
1343
  msgstr ""
57
  msgid "Movies"
58
  msgstr ""
59
 
60
+ #: ../lib/classes/KcSeoHelper.php:492, ../lib/functions/KcSeoOptions.php:1394
61
  msgid "Music"
62
  msgstr ""
63
 
64
+ #: ../lib/classes/KcSeoHelper.php:493, ../lib/functions/KcSeoOptions.php:1398
65
  msgid "Recipe"
66
  msgstr ""
67
 
69
  msgid "TV Episode"
70
  msgstr ""
71
 
72
+ #: ../lib/classes/KcSeoHelper.php:495, ../lib/functions/KcSeoOptions.php:1406
73
  msgid "QAPage"
74
  msgstr ""
75
 
76
+ #: ../lib/classes/KcSeoHelper.php:496, ../lib/functions/KcSeoOptions.php:1410
77
  msgid "Item List"
78
  msgstr ""
79
 
129
  msgid "Don't miss out on our biggest sale of the year! Get your."
130
  msgstr ""
131
 
132
+ #: ../lib/functions/KcSeoOptions.php:15
133
  msgid "Article"
134
  msgstr ""
135
 
136
+ #: ../lib/functions/KcSeoOptions.php:21, ../lib/functions/KcSeoOptions.php:180, ../lib/functions/KcSeoOptions.php:334
137
  msgid "Headline"
138
  msgstr ""
139
 
140
+ #: ../lib/functions/KcSeoOptions.php:23, ../lib/functions/KcSeoOptions.php:336
141
  msgid "Article title"
142
  msgstr ""
143
 
144
+ #: ../lib/functions/KcSeoOptions.php:27, ../lib/functions/KcSeoOptions.php:186, ../lib/functions/KcSeoOptions.php:340, ../lib/functions/KcSeoOptions.php:1425
145
  msgid "Page URL"
146
  msgstr ""
147
 
148
+ #: ../lib/functions/KcSeoOptions.php:29, ../lib/functions/KcSeoOptions.php:188, ../lib/functions/KcSeoOptions.php:342
149
  msgid "The canonical URL of the article page"
150
  msgstr ""
151
 
152
+ #: ../lib/functions/KcSeoOptions.php:33
153
  msgid "Author Name"
154
  msgstr ""
155
 
156
+ #: ../lib/functions/KcSeoOptions.php:35, ../lib/functions/KcSeoOptions.php:194, ../lib/functions/KcSeoOptions.php:348
157
  msgid "Author display name"
158
  msgstr ""
159
 
160
+ #: ../lib/functions/KcSeoOptions.php:39, ../lib/functions/KcSeoOptions.php:198, ../lib/functions/KcSeoOptions.php:352
161
  msgid "Author URL"
162
  msgstr ""
163
 
164
+ #: ../lib/functions/KcSeoOptions.php:45
165
  msgid "Article Feature Image"
166
  msgstr ""
167
 
168
+ #: ../lib/functions/KcSeoOptions.php:48
169
  msgid "Images should be at least 696 pixels wide.<br>Images should be in .jpg, .png, or. gif format."
170
  msgstr ""
171
 
172
+ #: ../lib/functions/KcSeoOptions.php:51, ../lib/functions/KcSeoOptions.php:210, ../lib/functions/KcSeoOptions.php:364, ../lib/functions/KcSeoOptions.php:1431
173
  msgid "Published date"
174
  msgstr ""
175
 
176
+ #: ../lib/functions/KcSeoOptions.php:55, ../lib/functions/KcSeoOptions.php:62, ../lib/functions/KcSeoOptions.php:213, ../lib/functions/KcSeoOptions.php:220, ../lib/functions/KcSeoOptions.php:367, ../lib/functions/KcSeoOptions.php:375, ../lib/functions/KcSeoOptions.php:640, ../lib/functions/KcSeoOptions.php:876, ../lib/functions/KcSeoOptions.php:1105, ../lib/functions/KcSeoOptions.php:1354, ../lib/functions/KcSeoOptions.php:1434, ../lib/functions/KcSeoOptions.php:1441
177
  msgid "Like this: 2021-12-25 14:20:00"
178
  msgstr ""
179
 
180
+ #: ../lib/functions/KcSeoOptions.php:58, ../lib/functions/KcSeoOptions.php:217, ../lib/functions/KcSeoOptions.php:371
181
  msgid "Modified date"
182
  msgstr ""
183
 
184
+ #: ../lib/functions/KcSeoOptions.php:65, ../lib/functions/KcSeoOptions.php:224, ../lib/functions/KcSeoOptions.php:378
185
  msgid "Publisher"
186
  msgstr ""
187
 
188
+ #: ../lib/functions/KcSeoOptions.php:67, ../lib/functions/KcSeoOptions.php:226, ../lib/functions/KcSeoOptions.php:380
189
  msgid "Publisher name or Organization name"
190
  msgstr ""
191
 
192
+ #: ../lib/functions/KcSeoOptions.php:71, ../lib/functions/KcSeoOptions.php:230, ../lib/functions/KcSeoOptions.php:384, ../lib/views/settings.php:86
193
  msgid "Publisher Logo"
194
  msgstr ""
195
 
196
+ #: ../lib/functions/KcSeoOptions.php:73, ../lib/functions/KcSeoOptions.php:232, ../lib/functions/KcSeoOptions.php:386
197
  msgid "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>"
198
  msgstr ""
199
 
200
+ #: ../lib/functions/KcSeoOptions.php:77, ../lib/functions/KcSeoOptions.php:105, ../lib/functions/KcSeoOptions.php:149, ../lib/functions/KcSeoOptions.php:236, ../lib/functions/KcSeoOptions.php:259, ../lib/functions/KcSeoOptions.php:303, ../lib/functions/KcSeoOptions.php:390, ../lib/functions/KcSeoOptions.php:413, ../lib/functions/KcSeoOptions.php:457, ../lib/functions/KcSeoOptions.php:520, ../lib/functions/KcSeoOptions.php:681, ../lib/functions/KcSeoOptions.php:831, ../lib/functions/KcSeoOptions.php:894, ../lib/functions/KcSeoOptions.php:1008, ../lib/functions/KcSeoOptions.php:1040, ../lib/functions/KcSeoOptions.php:1179, ../lib/functions/KcSeoOptions.php:1286, ../lib/views/schema-options.php:170, ../lib/views/schema-options.php:255
201
  msgid "Description"
202
  msgstr ""
203
 
204
+ #: ../lib/functions/KcSeoOptions.php:79, ../lib/functions/KcSeoOptions.php:238, ../lib/functions/KcSeoOptions.php:392
205
  msgid "Short description. New line is not supported."
206
  msgstr ""
207
 
208
+ #: ../lib/functions/KcSeoOptions.php:82, ../lib/functions/KcSeoOptions.php:241, ../lib/functions/KcSeoOptions.php:395
209
  msgid "Article body"
210
  msgstr ""
211
 
212
+ #: ../lib/functions/KcSeoOptions.php:84, ../lib/functions/KcSeoOptions.php:243
213
  msgid "Article content"
214
  msgstr ""
215
 
216
+ #: ../lib/functions/KcSeoOptions.php:87
217
  msgid "Alternative headline"
218
  msgstr ""
219
 
220
+ #: ../lib/functions/KcSeoOptions.php:89
221
  msgid "A secondary headline for the article."
222
  msgstr ""
223
 
224
+ #: ../lib/functions/KcSeoOptions.php:92, ../lib/functions/KcSeoOptions.php:97, ../lib/functions/KcSeoOptions.php:246, ../lib/functions/KcSeoOptions.php:251, ../lib/functions/KcSeoOptions.php:400, ../lib/functions/KcSeoOptions.php:405, ../lib/functions/KcSeoOptions.php:819
225
  msgid "Video"
226
  msgstr ""
227
 
228
+ #: ../lib/functions/KcSeoOptions.php:101, ../lib/functions/KcSeoOptions.php:144, ../lib/functions/KcSeoOptions.php:255, ../lib/functions/KcSeoOptions.php:298, ../lib/functions/KcSeoOptions.php:409, ../lib/functions/KcSeoOptions.php:452, ../lib/functions/KcSeoOptions.php:488, ../lib/functions/KcSeoOptions.php:670, ../lib/functions/KcSeoOptions.php:825, ../lib/functions/KcSeoOptions.php:888, ../lib/functions/KcSeoOptions.php:925, ../lib/functions/KcSeoOptions.php:1003, ../lib/functions/KcSeoOptions.php:1035, ../lib/functions/KcSeoOptions.php:1281, ../lib/functions/KcSeoOptions.php:1419, ../lib/functions/KcSeoOptions.php:1466, ../lib/views/schema-options.php:224
229
  msgid "Name"
230
  msgstr ""
231
 
232
+ #: ../lib/functions/KcSeoOptions.php:109, ../lib/functions/KcSeoOptions.php:263, ../lib/functions/KcSeoOptions.php:358, ../lib/functions/KcSeoOptions.php:417, ../lib/functions/KcSeoOptions.php:676, ../lib/functions/KcSeoOptions.php:1012, ../lib/functions/KcSeoOptions.php:1044, ../lib/functions/KcSeoOptions.php:1253, ../lib/functions/KcSeoOptions.php:1513, ../lib/views/schema-options.php:247
233
  msgid "Image"
234
  msgstr ""
235
 
236
+ #: ../lib/functions/KcSeoOptions.php:113, ../lib/functions/KcSeoOptions.php:159, ../lib/functions/KcSeoOptions.php:267, ../lib/functions/KcSeoOptions.php:313, ../lib/functions/KcSeoOptions.php:421, ../lib/functions/KcSeoOptions.php:467
237
  msgid "Content URL"
238
  msgstr ""
239
 
240
+ #: ../lib/functions/KcSeoOptions.php:117, ../lib/functions/KcSeoOptions.php:271, ../lib/functions/KcSeoOptions.php:425
241
  msgid "Embed URL"
242
  msgstr ""
243
 
244
+ #: ../lib/functions/KcSeoOptions.php:118, ../lib/functions/KcSeoOptions.php:272, ../lib/functions/KcSeoOptions.php:426, ../lib/functions/KcSeoOptions.php:859, ../lib/functions/KcSeoOptions.php:1054
245
  msgid "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."
246
  msgstr ""
247
 
248
+ #: ../lib/functions/KcSeoOptions.php:122, ../lib/functions/KcSeoOptions.php:276, ../lib/functions/KcSeoOptions.php:430
249
  msgid "Upload date"
250
  msgstr ""
251
 
252
+ #: ../lib/functions/KcSeoOptions.php:125, ../lib/functions/KcSeoOptions.php:279, ../lib/functions/KcSeoOptions.php:433
253
  msgid "Like this: 2021-08-25 14:20:00"
254
  msgstr ""
255
 
256
+ #: ../lib/functions/KcSeoOptions.php:129, ../lib/functions/KcSeoOptions.php:154, ../lib/functions/KcSeoOptions.php:283, ../lib/functions/KcSeoOptions.php:308, ../lib/functions/KcSeoOptions.php:437, ../lib/functions/KcSeoOptions.php:462, ../lib/functions/KcSeoOptions.php:851, ../lib/functions/KcSeoOptions.php:906
257
  msgid "Duration"
258
  msgstr ""
259
 
260
+ #: ../lib/functions/KcSeoOptions.php:130, ../lib/functions/KcSeoOptions.php:284, ../lib/functions/KcSeoOptions.php:438
261
  msgid "Runtime of the movie in ISO 8601 format (for example, \"PT2H22M\" (142 minutes))."
262
  msgstr ""
263
 
264
+ #: ../lib/functions/KcSeoOptions.php:135, ../lib/functions/KcSeoOptions.php:140, ../lib/functions/KcSeoOptions.php:289, ../lib/functions/KcSeoOptions.php:294, ../lib/functions/KcSeoOptions.php:443, ../lib/functions/KcSeoOptions.php:448, ../lib/functions/KcSeoOptions.php:882
265
  msgid "Audio"
266
  msgstr ""
267
 
268
+ #: ../lib/functions/KcSeoOptions.php:145, ../lib/functions/KcSeoOptions.php:299, ../lib/functions/KcSeoOptions.php:453, ../lib/functions/KcSeoOptions.php:891
269
  msgid "The title of the audio"
270
  msgstr ""
271
 
272
+ #: ../lib/functions/KcSeoOptions.php:150, ../lib/functions/KcSeoOptions.php:304, ../lib/functions/KcSeoOptions.php:458
273
  msgid "The short description of the audio"
274
  msgstr ""
275
 
276
+ #: ../lib/functions/KcSeoOptions.php:155, ../lib/functions/KcSeoOptions.php:309, ../lib/functions/KcSeoOptions.php:463, ../lib/functions/KcSeoOptions.php:908
277
  msgid "The duration of the audio in ISO 8601 format.(PT1M33S)"
278
  msgstr ""
279
 
280
+ #: ../lib/functions/KcSeoOptions.php:160, ../lib/functions/KcSeoOptions.php:314, ../lib/functions/KcSeoOptions.php:468, ../lib/functions/KcSeoOptions.php:1016, ../lib/functions/KcSeoOptions.php:1048, ../lib/functions/KcSeoOptions.php:1053, ../lib/functions/KcSeoOptions.php:1472
281
  msgid "URL"
282
  msgstr ""
283
 
284
+ #: ../lib/functions/KcSeoOptions.php:161, ../lib/functions/KcSeoOptions.php:315, ../lib/functions/KcSeoOptions.php:469, ../lib/functions/KcSeoOptions.php:903
285
  msgid "A URL pointing to the actual audio media file. This file should be in .mp3, .wav, .mpc or other audio file format."
286
  msgstr ""
287
 
288
+ #: ../lib/functions/KcSeoOptions.php:165, ../lib/functions/KcSeoOptions.php:319, ../lib/functions/KcSeoOptions.php:473, ../lib/functions/KcSeoOptions.php:912
289
  msgid "Encoding Format"
290
  msgstr ""
291
 
292
+ #: ../lib/functions/KcSeoOptions.php:166, ../lib/functions/KcSeoOptions.php:320, ../lib/functions/KcSeoOptions.php:474, ../lib/functions/KcSeoOptions.php:913
293
  msgid "The encoding format of audio like: 'audio/mpeg'"
294
  msgstr ""
295
 
296
+ #: ../lib/functions/KcSeoOptions.php:174
297
  msgid "Blog Posting"
298
  msgstr ""
299
 
300
+ #: ../lib/functions/KcSeoOptions.php:182
301
  msgid "Blog posting title"
302
  msgstr ""
303
 
304
+ #: ../lib/functions/KcSeoOptions.php:192
305
  msgid "Author name"
306
  msgstr ""
307
 
308
+ #: ../lib/functions/KcSeoOptions.php:204
309
  msgid "Feature Image"
310
  msgstr ""
311
 
312
+ #: ../lib/functions/KcSeoOptions.php:206, ../lib/functions/KcSeoOptions.php:360
313
  msgid "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."
314
  msgstr ""
315
 
316
+ #: ../lib/functions/KcSeoOptions.php:328
317
  msgid "News Article"
318
  msgstr ""
319
 
320
+ #: ../lib/functions/KcSeoOptions.php:346, ../lib/functions/KcSeoOptions.php:619, ../lib/functions/KcSeoOptions.php:1095, ../lib/functions/KcSeoOptions.php:1333
321
  msgid "Author"
322
  msgstr ""
323
 
324
+ #: ../lib/functions/KcSeoOptions.php:397
325
  msgid "Article body content. New line is not supported."
326
  msgstr ""
327
 
328
+ #: ../lib/functions/KcSeoOptions.php:482
329
  msgid "Event"
330
  msgstr ""
331
 
332
+ #: ../lib/functions/KcSeoOptions.php:491
333
  msgid "The name of the event."
334
  msgstr ""
335
 
336
+ #: ../lib/functions/KcSeoOptions.php:494
337
  msgid "Location name"
338
  msgstr ""
339
 
340
+ #: ../lib/functions/KcSeoOptions.php:497
341
  msgid "Event Location name"
342
  msgstr ""
343
 
344
+ #: ../lib/functions/KcSeoOptions.php:500
345
  msgid "Location address"
346
  msgstr ""
347
 
348
+ #: ../lib/functions/KcSeoOptions.php:503
349
  msgid "The location of for example where the event is happening, an organization is located, or where an action takes place."
350
  msgstr ""
351
 
352
+ #: ../lib/functions/KcSeoOptions.php:506
353
  msgid "Start date"
354
  msgstr ""
355
 
356
+ #: ../lib/functions/KcSeoOptions.php:510
357
  msgid "Event start date Like : 2017-10-16 4:00 AM"
358
  msgstr ""
359
 
360
+ #: ../lib/functions/KcSeoOptions.php:513
361
  msgid "End date"
362
  msgstr ""
363
 
364
+ #: ../lib/functions/KcSeoOptions.php:517
365
  msgid "Event end date Like : 2017-10-16 4:00 AM"
366
  msgstr ""
367
 
368
+ #: ../lib/functions/KcSeoOptions.php:523
369
  msgid "Event description. New line is not supported."
370
  msgstr ""
371
 
372
+ #: ../lib/functions/KcSeoOptions.php:526
373
  msgid "Organizer"
374
  msgstr ""
375
 
376
+ #: ../lib/functions/KcSeoOptions.php:529
377
  msgid "The Organizer."
378
  msgstr ""
379
 
380
+ #: ../lib/functions/KcSeoOptions.php:532, ../lib/functions/KcSeoOptions.php:535
381
  msgid "Organizer URL"
382
  msgstr ""
383
 
384
+ #: ../lib/functions/KcSeoOptions.php:538
385
  msgid "Performer Name"
386
  msgstr ""
387
 
388
+ #: ../lib/functions/KcSeoOptions.php:541
389
  msgid "The performer's name."
390
  msgstr ""
391
 
392
+ #: ../lib/functions/KcSeoOptions.php:568
393
  msgid "Image URL"
394
  msgstr ""
395
 
396
+ #: ../lib/functions/KcSeoOptions.php:571
397
  msgid "URL of an image or logo for the event or tour"
398
  msgstr ""
399
 
400
+ #: ../lib/functions/KcSeoOptions.php:574, ../lib/functions/KcSeoOptions.php:765
401
  msgid "Price"
402
  msgstr ""
403
 
404
+ #: ../lib/functions/KcSeoOptions.php:578
405
  msgid "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>"
406
  msgstr ""
407
 
408
+ #: ../lib/functions/KcSeoOptions.php:581, ../lib/functions/KcSeoOptions.php:778
409
  msgid "Price currency"
410
  msgstr ""
411
 
412
+ #: ../lib/functions/KcSeoOptions.php:583
413
  msgid "The 3-letter currency code. (USD)"
414
  msgstr ""
415
 
416
+ #: ../lib/functions/KcSeoOptions.php:597
417
  msgid "Valid From"
418
  msgstr ""
419
 
420
+ #: ../lib/functions/KcSeoOptions.php:608
421
  msgid "A link to the event's details page. <span class='required'>Not required but (Recommended)</span>"
422
  msgstr ""
423
 
424
+ #: ../lib/functions/KcSeoOptions.php:611, ../lib/functions/KcSeoOptions.php:1066, ../lib/functions/KcSeoOptions.php:1325
425
  msgid "Review"
426
  msgstr ""
427
 
428
+ #: ../lib/functions/KcSeoOptions.php:613, ../lib/functions/KcSeoOptions.php:1327
429
  msgid "To add review schema for this type, complete fields below and enable, others live blank."
430
  msgstr ""
431
 
432
+ #: ../lib/functions/KcSeoOptions.php:624, ../lib/functions/KcSeoOptions.php:1020, ../lib/functions/KcSeoOptions.php:1058, ../lib/functions/KcSeoOptions.php:1338
433
  msgid "Author Same As profile link"
434
  msgstr ""
435
 
436
+ #: ../lib/functions/KcSeoOptions.php:628, ../lib/functions/KcSeoOptions.php:1342
437
  msgid "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"
438
  msgstr ""
439
 
440
+ #: ../lib/functions/KcSeoOptions.php:631, ../lib/functions/KcSeoOptions.php:1083, ../lib/functions/KcSeoOptions.php:1345
441
  msgid "Review body"
442
  msgstr ""
443
 
444
+ #: ../lib/functions/KcSeoOptions.php:634, ../lib/functions/KcSeoOptions.php:1086, ../lib/functions/KcSeoOptions.php:1348
445
  msgid "The actual body of the review."
446
  msgstr ""
447
 
448
+ #: ../lib/functions/KcSeoOptions.php:637, ../lib/functions/KcSeoOptions.php:1102, ../lib/functions/KcSeoOptions.php:1351
449
  msgid "Date of Published"
450
  msgstr ""
451
 
452
+ #: ../lib/functions/KcSeoOptions.php:643, ../lib/functions/KcSeoOptions.php:749, ../lib/functions/KcSeoOptions.php:1108, ../lib/functions/KcSeoOptions.php:1357
453
  msgid "Rating value"
454
  msgstr ""
455
 
456
+ #: ../lib/functions/KcSeoOptions.php:646, ../lib/functions/KcSeoOptions.php:1111, ../lib/functions/KcSeoOptions.php:1202, ../lib/functions/KcSeoOptions.php:1360
457
  msgid "A numerical quality rating for the item."
458
  msgstr ""
459
 
460
+ #: ../lib/functions/KcSeoOptions.php:649, ../lib/functions/KcSeoOptions.php:1114, ../lib/functions/KcSeoOptions.php:1363
461
  msgid "Best rating"
462
  msgstr ""
463
 
464
+ #: ../lib/functions/KcSeoOptions.php:652, ../lib/functions/KcSeoOptions.php:1117, ../lib/functions/KcSeoOptions.php:1366
465
  msgid "The highest value allowed in this rating system."
466
  msgstr ""
467
 
468
+ #: ../lib/functions/KcSeoOptions.php:655, ../lib/functions/KcSeoOptions.php:1120, ../lib/functions/KcSeoOptions.php:1369
469
  msgid "Worst rating"
470
  msgstr ""
471
 
472
+ #: ../lib/functions/KcSeoOptions.php:658, ../lib/functions/KcSeoOptions.php:1123, ../lib/functions/KcSeoOptions.php:1372
473
  msgid "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."
474
  msgstr ""
475
 
476
+ #: ../lib/functions/KcSeoOptions.php:664
477
  msgid "Product"
478
  msgstr ""
479
 
480
+ #: ../lib/functions/KcSeoOptions.php:673
481
  msgid "The name of the product."
482
  msgstr ""
483
 
484
+ #: ../lib/functions/KcSeoOptions.php:678
485
  msgid "The URL of a product photo. Pictures clearly showing the product, e.g. against a white background, are preferred."
486
  msgstr ""
487
 
488
+ #: ../lib/functions/KcSeoOptions.php:683
489
  msgid "Product description. New line is not supported."
490
  msgstr ""
491
 
492
+ #: ../lib/functions/KcSeoOptions.php:686
493
  msgid "SKU"
494
  msgstr ""
495
 
496
+ #: ../lib/functions/KcSeoOptions.php:691
497
  msgid "Brand"
498
  msgstr ""
499
 
500
+ #: ../lib/functions/KcSeoOptions.php:694
501
  msgid "The brand of the product."
502
  msgstr ""
503
 
504
+ #: ../lib/functions/KcSeoOptions.php:697
505
  msgid "Identifier Type"
506
  msgstr ""
507
 
508
+ #: ../lib/functions/KcSeoOptions.php:707
509
  msgid ""
510
+ "<strong>MPN</strong><br>
511
+ " &#8594; MPN(Manufacturer Part Number) Used globally, Alphanumeric digits (various lengths)<br>
512
+ " <strong>GTIN</strong><br>
513
+ " &#8594; UPC(Universal Product Code) Used in primarily North America. 12 numeric digits. eg. 892685001003.<br>
514
+ " &#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>
515
+ " &#8594; ISBN(International Standard Book Number) Used globally, ISBN-13 (recommended), 13 numeric digits 978-0747595823<br>
516
  " &#8594; JAN(Japanese Article Number) Used only in Japan, 8 or 13 numeric digits."
517
  msgstr ""
518
 
519
+ #: ../lib/functions/KcSeoOptions.php:716
520
  msgid "Identifier"
521
  msgstr ""
522
 
523
+ #: ../lib/functions/KcSeoOptions.php:719
524
  msgid "Enter product unique identifier"
525
  msgstr ""
526
 
527
+ #: ../lib/functions/KcSeoOptions.php:722
528
  msgid "Product Review & Rating"
529
  msgstr ""
530
 
531
+ #: ../lib/functions/KcSeoOptions.php:726
532
  msgid "Review rating value"
533
  msgstr ""
534
 
535
+ #: ../lib/functions/KcSeoOptions.php:730, ../lib/functions/KcSeoOptions.php:752
536
  msgid "Rating value. (1 , 2.5, 3, 5 etc)"
537
  msgstr ""
538
 
539
+ #: ../lib/functions/KcSeoOptions.php:733
540
  msgid "Review Best rating"
541
  msgstr ""
542
 
543
+ #: ../lib/functions/KcSeoOptions.php:739
544
  msgid "Review Worst rating"
545
  msgstr ""
546
 
547
+ #: ../lib/functions/KcSeoOptions.php:745
548
  msgid "Review author"
549
  msgstr ""
550
 
551
+ #: ../lib/functions/KcSeoOptions.php:755
552
  msgid "Total review count"
553
  msgstr ""
554
 
555
+ #: ../lib/functions/KcSeoOptions.php:758
556
  msgid "Review rating value. <span class='required'>This is required if (Rating value) is given</span>"
557
  msgstr ""
558
 
559
+ #: ../lib/functions/KcSeoOptions.php:761
560
  msgid "Product Pricing"
561
  msgstr ""
562
 
563
+ #: ../lib/functions/KcSeoOptions.php:768
564
  msgid "The lowest available price, including service charges and fees, of this type of ticket."
565
  msgstr ""
566
 
567
+ #: ../lib/functions/KcSeoOptions.php:771
568
  msgid "PriceValidUntil"
569
  msgstr ""
570
 
571
+ #: ../lib/functions/KcSeoOptions.php:775
572
  msgid "The date (in ISO 8601 date and time format) after which the price will no longer be available."
573
  msgstr ""
574
 
575
+ #: ../lib/functions/KcSeoOptions.php:780
576
  msgid "The 3-letter currency code."
577
  msgstr ""
578
 
579
+ #: ../lib/functions/KcSeoOptions.php:796
580
  msgid "Select a availability type"
581
  msgstr ""
582
 
583
+ #: ../lib/functions/KcSeoOptions.php:808
584
  msgid "Select a condition"
585
  msgstr ""
586
 
587
+ #: ../lib/functions/KcSeoOptions.php:811
588
  msgid "Product URL"
589
  msgstr ""
590
 
591
+ #: ../lib/functions/KcSeoOptions.php:813
592
  msgid "A URL to the product web page (that includes the Offer). (Don't use offerURL for markup that appears on the product page itself.)"
593
  msgstr ""
594
 
595
+ #: ../lib/functions/KcSeoOptions.php:828
596
  msgid "The title of the video"
597
  msgstr ""
598
 
599
+ #: ../lib/functions/KcSeoOptions.php:834
600
  msgid "The description of the video. New line is not supported."
601
  msgstr ""
602
 
603
+ #: ../lib/functions/KcSeoOptions.php:841
604
  msgid "A URL pointing to the video thumbnail image file. Images must be at least 160x90 pixels and at most 1920x1080 pixels."
605
  msgstr ""
606
 
607
+ #: ../lib/functions/KcSeoOptions.php:844
608
  msgid "Updated date"
609
  msgstr ""
610
 
611
+ #: ../lib/functions/KcSeoOptions.php:848
612
  msgid "2021-02-05T08:00:00+08:00"
613
  msgstr ""
614
 
615
+ #: ../lib/functions/KcSeoOptions.php:853
616
  msgid "The duration of the video in ISO 8601 format.(PT1M33S)"
617
  msgstr ""
618
 
619
+ #: ../lib/functions/KcSeoOptions.php:865
620
  msgid "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."
621
  msgstr ""
622
 
623
+ #: ../lib/functions/KcSeoOptions.php:868
624
  msgid "Interaction count"
625
  msgstr ""
626
 
627
+ #: ../lib/functions/KcSeoOptions.php:870
628
  msgid "The number of times the video has been viewed."
629
  msgstr ""
630
 
631
+ #: ../lib/functions/KcSeoOptions.php:873
632
  msgid "Expires"
633
  msgstr ""
634
 
635
+ #: ../lib/functions/KcSeoOptions.php:896
636
  msgid "The description of the audio. New line is not supported."
637
  msgstr ""
638
 
639
+ #: ../lib/functions/KcSeoOptions.php:919
640
  msgid "Service"
641
  msgstr ""
642
 
643
+ #: ../lib/functions/KcSeoOptions.php:928
644
  msgid "The name of the Service."
645
  msgstr ""
646
 
647
+ #: ../lib/functions/KcSeoOptions.php:931
648
  msgid "Service type"
649
  msgstr ""
650
 
651
+ #: ../lib/functions/KcSeoOptions.php:934
652
  msgid "The type of service being offered, e.g. veterans' benefits, emergency relief, etc."
653
  msgstr ""
654
 
655
+ #: ../lib/functions/KcSeoOptions.php:940
656
  msgid "An additional type for the service, typically used for adding more specific types from external vocabularies in microdata syntax."
657
  msgstr ""
658
 
659
+ #: ../lib/functions/KcSeoOptions.php:943
660
  msgid "Award"
661
  msgstr ""
662
 
663
+ #: ../lib/functions/KcSeoOptions.php:945
664
  msgid "An award won by or for this service."
665
  msgstr ""
666
 
667
+ #: ../lib/functions/KcSeoOptions.php:948
668
  msgid "Category"
669
  msgstr ""
670
 
671
+ #: ../lib/functions/KcSeoOptions.php:950
672
  msgid "A category for the service."
673
  msgstr ""
674
 
675
+ #: ../lib/functions/KcSeoOptions.php:953
676
  msgid "Provider mobility"
677
  msgstr ""
678
 
679
+ #: ../lib/functions/KcSeoOptions.php:955
680
  msgid "Indicates the mobility of a provided service (e.g. 'static', 'dynamic')."
681
  msgstr ""
682
 
683
+ #: ../lib/functions/KcSeoOptions.php:961
684
  msgid "A short description of the service. New line is not supported."
685
  msgstr ""
686
 
687
+ #: ../lib/functions/KcSeoOptions.php:967
688
  msgid "An image of the service. This should be a URL."
689
  msgstr ""
690
 
691
+ #: ../lib/functions/KcSeoOptions.php:973
692
  msgid "Indicates a page (or other CreativeWork) for which this thing is the main entity being described."
693
  msgstr ""
694
 
695
+ #: ../lib/functions/KcSeoOptions.php:979
696
  msgid "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."
697
  msgstr ""
698
 
699
+ #: ../lib/functions/KcSeoOptions.php:985
700
  msgid "URL of the service."
701
  msgstr ""
702
 
703
+ #: ../lib/functions/KcSeoOptions.php:988
704
  msgid "Alternate name"
705
  msgstr ""
706
 
707
+ #: ../lib/functions/KcSeoOptions.php:990
708
  msgid "An alias for the service."
709
  msgstr ""
710
 
711
+ #: ../lib/functions/KcSeoOptions.php:996
712
  msgid "About"
713
  msgstr ""
714
 
715
+ #: ../lib/functions/KcSeoOptions.php:1022, ../lib/functions/KcSeoOptions.php:1060
716
  msgid "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"
717
  msgstr ""
718
 
719
+ #: ../lib/functions/KcSeoOptions.php:1028
720
  msgid "Contact"
721
  msgstr ""
722
 
723
+ #: ../lib/functions/KcSeoOptions.php:1052
724
  msgid "Video URL"
725
  msgstr ""
726
 
727
+ #: ../lib/functions/KcSeoOptions.php:1072
728
  msgid "Notice</span>"
729
  msgstr ""
730
 
731
+ #: ../lib/functions/KcSeoOptions.php:1077
732
  msgid "Name of the reviewed item"
733
  msgstr ""
734
 
735
+ #: ../lib/functions/KcSeoOptions.php:1080
736
  msgid "The item that is being reviewed."
737
  msgstr ""
738
 
739
+ #: ../lib/functions/KcSeoOptions.php:1089
740
  msgid "Review name"
741
  msgstr ""
742
 
743
+ #: ../lib/functions/KcSeoOptions.php:1092
744
  msgid "A particular name for the review."
745
  msgstr ""
746
 
747
+ #: ../lib/functions/KcSeoOptions.php:1099
748
  msgid "The author of the review. The reviewer’s name needs to be a valid name."
749
  msgstr ""
750
 
751
+ #: ../lib/functions/KcSeoOptions.php:1126
752
  msgid "Name of the organization"
753
  msgstr ""
754
 
755
+ #: ../lib/functions/KcSeoOptions.php:1128
756
  msgid "The publisher of the review."
757
  msgstr ""
758
 
759
+ #: ../lib/functions/KcSeoOptions.php:1134
760
  msgid "Aggregate Ratings"
761
  msgstr ""
762
 
763
+ #: ../lib/functions/KcSeoOptions.php:1140
764
  msgid "Schema type"
765
  msgstr ""
766
 
767
+ #: ../lib/functions/KcSeoOptions.php:1145
768
  msgid "Use the most appropriate schema type for what is being reviewed."
769
  msgstr ""
770
 
771
+ #: ../lib/functions/KcSeoOptions.php:1148
772
  msgid "Name of the item"
773
  msgstr ""
774
 
775
+ #: ../lib/functions/KcSeoOptions.php:1151
776
  msgid "The item that is being rated."
777
  msgstr ""
778
 
779
+ #: ../lib/functions/KcSeoOptions.php:1164, ../lib/functions/KcSeoOptions.php:1299, ../lib/functions/KcSeoOptions.php:1520, ../lib/views/schema-options.php:118
780
  msgid "The price range of the business, for example $$$."
781
  msgstr ""
782
 
783
+ #: ../lib/functions/KcSeoOptions.php:1181
784
  msgid "Description for thr review. New line is not supported."
785
  msgstr ""
786
 
787
+ #: ../lib/functions/KcSeoOptions.php:1184
788
  msgid "Rating Count"
789
  msgstr ""
790
 
791
+ #: ../lib/functions/KcSeoOptions.php:1188
792
  msgid "The total number of ratings for the item on your site. <span class='required'>* At least one of ratingCount or reviewCount is required.</span>"
793
  msgstr ""
794
 
795
+ #: ../lib/functions/KcSeoOptions.php:1191
796
  msgid "Review Count"
797
  msgstr ""
798
 
799
+ #: ../lib/functions/KcSeoOptions.php:1195
800
  msgid "Specifies the number of people who provided a review with or without an accompanying rating. At least one of ratingCount or reviewCount is required."
801
  msgstr ""
802
 
803
+ #: ../lib/functions/KcSeoOptions.php:1198
804
  msgid "Rating Value"
805
  msgstr ""
806
 
807
+ #: ../lib/functions/KcSeoOptions.php:1205
808
  msgid "Best Rating"
809
  msgstr ""
810
 
811
+ #: ../lib/functions/KcSeoOptions.php:1209
812
  msgid "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."
813
  msgstr ""
814
 
815
+ #: ../lib/functions/KcSeoOptions.php:1212
816
  msgid "Worst Rating"
817
  msgstr ""
818
 
819
+ #: ../lib/functions/KcSeoOptions.php:1216
820
  msgid "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."
821
  msgstr ""
822
 
823
+ #: ../lib/functions/KcSeoOptions.php:1222
824
  msgid "Restaurant"
825
  msgstr ""
826
 
827
+ #: ../lib/functions/KcSeoOptions.php:1228
828
  msgid "Name of the Restaurant"
829
  msgstr ""
830
 
831
+ #: ../lib/functions/KcSeoOptions.php:1233
832
  msgid "Description of the Restaurant"
833
  msgstr ""
834
 
835
+ #: ../lib/functions/KcSeoOptions.php:1235, ../lib/functions/KcSeoOptions.php:1288
836
  msgid "New line is not supported."
837
  msgstr ""
838
 
839
+ #: ../lib/functions/KcSeoOptions.php:1238
840
  msgid "Opening Hours"
841
  msgstr ""
842
 
843
+ #: ../lib/functions/KcSeoOptions.php:1240
844
  msgid "Mo,Tu,We,Th,Fr,Sa,Su 11:30-23:00"
845
  msgstr ""
846
 
847
+ #: ../lib/functions/KcSeoOptions.php:1243, ../lib/functions/KcSeoOptions.php:1320
848
  msgid "Telephone"
849
  msgstr ""
850
 
851
+ #: ../lib/functions/KcSeoOptions.php:1245
852
  msgid "+155501003333"
853
  msgstr ""
854
 
855
+ #: ../lib/functions/KcSeoOptions.php:1248
856
  msgid "Menu"
857
  msgstr ""
858
 
859
+ #: ../lib/functions/KcSeoOptions.php:1250
860
  msgid "http://example.com/menu"
861
  msgstr ""
862
 
863
+ #: ../lib/functions/KcSeoOptions.php:1258, ../lib/views/schema-options.php:270
864
  msgid "Address"
865
  msgstr ""
866
 
867
+ #: ../lib/functions/KcSeoOptions.php:1262, ../lib/functions/KcSeoOptions.php:1296, ../lib/views/schema-options.php:113
868
  msgid "Price Range"
869
  msgstr ""
870
 
871
+ #: ../lib/functions/KcSeoOptions.php:1264
872
  msgid "The price range of the business, for example $$$"
873
  msgstr ""
874
 
875
+ #: ../lib/functions/KcSeoOptions.php:1267
876
  msgid "Serves Cuisine"
877
  msgstr ""
878
 
879
+ #: ../lib/functions/KcSeoOptions.php:1269, ../lib/views/schema-options.php:159
880
  msgid "The cuisine of the restaurant."
881
  msgstr ""
882
 
883
+ #: ../lib/functions/KcSeoOptions.php:1275
884
  msgid "Local Business"
885
  msgstr ""
886
 
887
+ #: ../lib/functions/KcSeoOptions.php:1291
888
  msgid "Business Logo"
889
  msgstr ""
890
 
891
+ #: ../lib/functions/KcSeoOptions.php:1302
892
  msgid "Address locality"
893
  msgstr ""
894
 
895
+ #: ../lib/functions/KcSeoOptions.php:1304
896
  msgid "City (i.e Kansas city)"
897
  msgstr ""
898
 
899
+ #: ../lib/functions/KcSeoOptions.php:1307
900
  msgid "Address region"
901
  msgstr ""
902
 
903
+ #: ../lib/functions/KcSeoOptions.php:1309
904
  msgid "State (i.e. MO)"
905
  msgstr ""
906
 
907
+ #: ../lib/functions/KcSeoOptions.php:1312
908
  msgid "Postal code"
909
  msgstr ""
910
 
911
+ #: ../lib/functions/KcSeoOptions.php:1316
912
  msgid "Street address"
913
  msgstr ""
914
 
915
+ #: ../lib/functions/KcSeoOptions.php:1378
916
  msgid "Book"
917
  msgstr ""
918
 
919
+ #: ../lib/functions/KcSeoOptions.php:1382
920
  msgid "Course"
921
  msgstr ""
922
 
923
+ #: ../lib/functions/KcSeoOptions.php:1386
924
  msgid "Job Posting"
925
  msgstr ""
926
 
927
+ #: ../lib/functions/KcSeoOptions.php:1390
928
  msgid "Movie"
929
  msgstr ""
930
 
931
+ #: ../lib/functions/KcSeoOptions.php:1402
932
  msgid "TVEpisode"
933
  msgstr ""
934
 
935
+ #: ../lib/functions/KcSeoOptions.php:1413
936
  msgid "Special Announcement"
937
  msgstr ""
938
 
939
+ #: ../lib/functions/KcSeoOptions.php:1421
940
  msgid "SpecialAnnouncement.name: Name of the announcement. This text should be present on the underlying page."
941
  msgstr ""
942
 
943
+ #: ../lib/functions/KcSeoOptions.php:1427
944
  msgid "SpecialAnnouncement.url: URL of the page containing the announcements. If present, this must match the URL of the page containing the information."
945
  msgstr ""
946
 
947
+ #: ../lib/functions/KcSeoOptions.php:1438
948
  msgid "Expires date"
949
  msgstr ""
950
 
951
+ #: ../lib/functions/KcSeoOptions.php:1445
952
  msgid "Text"
953
  msgstr ""
954
 
955
+ #: ../lib/functions/KcSeoOptions.php:1447
956
  msgid "SpecialAnnouncement.text: Text of the announcements."
957
  msgstr ""
958
 
959
+ #: ../lib/functions/KcSeoOptions.php:1451
960
  msgid "Announcement Locations"
961
  msgstr ""
962
 
963
+ #: ../lib/functions/KcSeoOptions.php:1457
964
  msgid "Announcement Location"
965
  msgstr ""
966
 
967
+ #: ../lib/functions/KcSeoOptions.php:1460
968
  msgid "Type"
969
  msgstr ""
970
 
971
+ #: ../lib/functions/KcSeoOptions.php:1468
972
  msgid "SpecialAnnouncement.announcementLocation.name: "
973
  msgstr ""
974
 
975
+ #: ../lib/functions/KcSeoOptions.php:1475
976
  msgid "SpecialAnnouncement.announcementLocation.url: URL"
977
  msgstr ""
978
 
979
+ #: ../lib/functions/KcSeoOptions.php:1478
980
  msgid "Address: Street"
981
  msgstr ""
982
 
983
+ #: ../lib/functions/KcSeoOptions.php:1480
984
  msgid "SpecialAnnouncement.announcementLocation.address.streetAddress: The street address. For example, 1600 Amphitheatre Pkwy."
985
  msgstr ""
986
 
987
+ #: ../lib/functions/KcSeoOptions.php:1484
988
  msgid "Address: Locality"
989
  msgstr ""
990
 
991
+ #: ../lib/functions/KcSeoOptions.php:1486
992
  msgid "SpecialAnnouncement.announcementLocation.address.addressLocality: The locality in which the street address is, and which is in the region. For example, Mountain View."
993
  msgstr ""
994
 
995
+ #: ../lib/functions/KcSeoOptions.php:1490
996
  msgid "Address: Post Code"
997
  msgstr ""
998
 
999
+ #: ../lib/functions/KcSeoOptions.php:1492
1000
  msgid "SpecialAnnouncement.announcementLocation.address.postalCode: The postal code. For example, 94043."
1001
  msgstr ""
1002
 
1003
+ #: ../lib/functions/KcSeoOptions.php:1496
1004
  msgid "Address: Region"
1005
  msgstr ""
1006
 
1007
+ #: ../lib/functions/KcSeoOptions.php:1498
1008
  msgid "SpecialAnnouncement.announcementLocation.address.addressRegion: The region in which the locality is, and which is in the country. For example, California."
1009
  msgstr ""
1010
 
1011
+ #: ../lib/functions/KcSeoOptions.php:1502
1012
  msgid "Address: Country"
1013
  msgstr ""
1014
 
1015
+ #: ../lib/functions/KcSeoOptions.php:1504
1016
  msgid "SpecialAnnouncement.announcementLocation.address.addressCountry: The country. For example, USA. You can also provide the two-letter ISO 3166-1 alpha-2 country code."
1017
  msgstr ""
1018
 
1019
+ #: ../lib/functions/KcSeoOptions.php:1508
1020
  msgid "ID"
1021
  msgstr ""
1022
 
1023
+ #: ../lib/functions/KcSeoOptions.php:1510
1024
  msgid "SpecialAnnouncement.announcementLocation.@id: An optional unique identifier so that you can reference pre-existing structured data for this location."
1025
  msgstr ""
1026
 
1070
 
1071
  #: ../lib/views/schema-options.php:142
1072
  msgid ""
1073
+ "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
1074
  " as a schema “Type”): Pick LocalBusiness as a generic Type, then add additional type as follows:"
1075
  msgstr ""
1076
 
1248
 
1249
  #: ../lib/views/settings.php:18
1250
  msgid ""
1251
+ "Home page
1252
  " only"
1253
  msgstr ""
1254
 
1255
  #: ../lib/views/settings.php:22
1256
  msgid ""
1257
+ "Sitewide (Apply General Settings schema
1258
  " sitewide)"
1259
  msgstr ""
1260
 
1276
 
1277
  #: ../lib/views/settings.php:67
1278
  msgid ""
1279
+ "Please deselect the navigation menu if you want to deactivate site navigation
1280
  " schema."
1281
  msgstr ""
1282
 
1338
 
1339
  #: ../lib/views/settings.php:146
1340
  msgid ""
1341
+ "This will delete all schema created and applied by this plugin when plugin is
1342
  " deleted."
1343
  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,64 +1,64 @@
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
- }
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,217 +1,217 @@
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;
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,188 +1,188 @@
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
- // Set Default Value.
89
- if ( ! $data['value'] && empty( $metaData ) && isset( $data['default'] ) && ! metadata_exists('post', $post->ID, $fieldId) ) {
90
- $data['value'] = !empty( $data['default'] ) ? $data['default'] : null ;
91
- }
92
-
93
- if ($data['type'] === 'group' && !empty($data['fields'])) {
94
- $groupMetaData = isset($metaData[$fieldId]) && !empty($metaData[$fieldId]) ? $metaData[$fieldId] : array(array());
95
- $html_g = null;
96
- $i = 0;
97
- foreach ($groupMetaData as $imDataId => $mData) {
98
- $html_gItem = null;
99
- foreach ($data['fields'] as $gFid => $field) {
100
- $field['fieldId'] = $fieldId . '-' . $gFid;
101
- $field['id'] = $tabId . "_" . $fieldId . '_' . $gFid;
102
- $field['name'] = $tabId . "[$fieldId]" . "[$imDataId][$gFid]";
103
- $field['value'] = (!empty($mData[$gFid]) ? $mData[$gFid] : null);
104
- $html_gItem .= $schemas->get_field($field);
105
- }
106
- $html_g .= sprintf('<div class="kcseo-group-item" data-index="%d" id="%s">%s%s%s</div>',
107
- $imDataId,
108
- $tabId . "_" . $fieldId . "_group_item_" . $imDataId,
109
- 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,
110
- $html_gItem,
111
- isset($data['duplicate']) ? '<div class="kc-bottom-toolbar"><span class="button button-primary kcseo-group-duplicate">Duplicate item</span></div>' : null
112
- );
113
- }
114
- $htmlCont .= sprintf('<div class="field-container kcseo-group-wrapper" data-duplicate="%d" data-group-id="%s" id="%s">%s</div>',
115
- isset($data['duplicate']) ? true : false,
116
- $tabId . "[$fieldId]",
117
- $tabId . "_" . $fieldId . "_group_wrapper",
118
- $html_g
119
- );
120
-
121
- } else {
122
- $htmlCont .= $schemas->get_field($data);
123
- }
124
- }
125
- }
126
- if (!empty($schema['pro']) && $schema['pro']) {
127
- $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>";
128
- }
129
- $htmlCont .= "</div>";
130
- }
131
- $htmlMenu .= "</ul>";
132
- $html .= $htmlMenu . $htmlCont;
133
- $html .= '<input type="hidden" id="_kcseo_ative_tab" name="_kcseo_ative_tab" value="' . $_kcseo_ative_tab . '" />';
134
- $html .= "</div>";
135
- $html .= "</div>";
136
- echo $html;
137
- }
138
-
139
- function save_KcSeo_schema_data($post_id, $post, $update) {
140
- if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
141
- return $post_id;
142
- }
143
- global $KcSeoWPSchema;
144
- $nonce = !empty($_REQUEST['_kcseo_nonce']) ? sanitize_text_field($_REQUEST['_kcseo_nonce']) : null;
145
- if (!wp_verify_nonce($nonce, $KcSeoWPSchema->nonceText())) {
146
- return $post_id;
147
- }
148
-
149
- // Check permissions
150
- if (!empty($_GET['post_type'])) {
151
- if (!current_user_can('edit_' . $_GET['post_type'], $post_id)) {
152
- return $post_id;
153
- }
154
- }
155
- $pt = $KcSeoWPSchema->kcSeoPostTypes();
156
- if (!in_array($post->post_type, $pt)) {
157
- return $post_id;
158
- }
159
-
160
- $meta = array();
161
- $schemaModel = new KcSeoSchemaModel;
162
- $schemaFields = KcSeoOptions::getSchemaTypes();
163
- foreach ($schemaFields as $schemaID => $schema) {
164
- $schemaMetaId = $KcSeoWPSchema->KcSeoPrefix . $schemaID;
165
- $data = array();
166
- if (!empty($schema['fields'])) {
167
- foreach ($schema['fields'] as $fieldId => $fieldData) {
168
- $value = (!empty($_REQUEST[$schemaMetaId][$fieldId]) ? $_REQUEST[$schemaMetaId][$fieldId] : null);
169
- $value = $KcSeoWPSchema->sanitize($fieldId, $fieldData, $value);
170
- $data[$fieldId] = $value;
171
- }
172
- }
173
- $meta[$schemaMetaId] = $data;
174
- }
175
- /* _kcseo_ative_tab */
176
- if (isset($_POST['_kcseo_ative_tab'])) {
177
- $meta['_kcseo_ative_tab'] = sanitize_text_field($_POST['_kcseo_ative_tab']);
178
- }
179
- if (count($meta) > 0) {
180
- foreach ($meta as $mKey => $mValue) {
181
- update_post_meta($post_id, $mKey, $mValue);
182
- }
183
- }
184
- }
185
-
186
- }
187
-
188
  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
+ // Set Default Value.
89
+ if ( ! $data['value'] && empty( $metaData ) && isset( $data['default'] ) && ! metadata_exists('post', $post->ID, $fieldId) ) {
90
+ $data['value'] = !empty( $data['default'] ) ? $data['default'] : null ;
91
+ }
92
+
93
+ if ($data['type'] === 'group' && !empty($data['fields'])) {
94
+ $groupMetaData = isset($metaData[$fieldId]) && !empty($metaData[$fieldId]) ? $metaData[$fieldId] : array(array());
95
+ $html_g = null;
96
+ $i = 0;
97
+ foreach ($groupMetaData as $imDataId => $mData) {
98
+ $html_gItem = null;
99
+ foreach ($data['fields'] as $gFid => $field) {
100
+ $field['fieldId'] = $fieldId . '-' . $gFid;
101
+ $field['id'] = $tabId . "_" . $fieldId . '_' . $gFid;
102
+ $field['name'] = $tabId . "[$fieldId]" . "[$imDataId][$gFid]";
103
+ $field['value'] = (!empty($mData[$gFid]) ? $mData[$gFid] : null);
104
+ $html_gItem .= $schemas->get_field($field);
105
+ }
106
+ $html_g .= sprintf('<div class="kcseo-group-item" data-index="%d" id="%s">%s%s%s</div>',
107
+ $imDataId,
108
+ $tabId . "_" . $fieldId . "_group_item_" . $imDataId,
109
+ 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,
110
+ $html_gItem,
111
+ isset($data['duplicate']) ? '<div class="kc-bottom-toolbar"><span class="button button-primary kcseo-group-duplicate">Duplicate item</span></div>' : null
112
+ );
113
+ }
114
+ $htmlCont .= sprintf('<div class="field-container kcseo-group-wrapper" data-duplicate="%d" data-group-id="%s" id="%s">%s</div>',
115
+ isset($data['duplicate']) ? true : false,
116
+ $tabId . "[$fieldId]",
117
+ $tabId . "_" . $fieldId . "_group_wrapper",
118
+ $html_g
119
+ );
120
+
121
+ } else {
122
+ $htmlCont .= $schemas->get_field($data);
123
+ }
124
+ }
125
+ }
126
+ if (!empty($schema['pro']) && $schema['pro']) {
127
+ $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>";
128
+ }
129
+ $htmlCont .= "</div>";
130
+ }
131
+ $htmlMenu .= "</ul>";
132
+ $html .= $htmlMenu . $htmlCont;
133
+ $html .= '<input type="hidden" id="_kcseo_ative_tab" name="_kcseo_ative_tab" value="' . $_kcseo_ative_tab . '" />';
134
+ $html .= "</div>";
135
+ $html .= "</div>";
136
+ echo $html;
137
+ }
138
+
139
+ function save_KcSeo_schema_data($post_id, $post, $update) {
140
+ if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
141
+ return $post_id;
142
+ }
143
+ global $KcSeoWPSchema;
144
+ $nonce = !empty($_REQUEST['_kcseo_nonce']) ? sanitize_text_field($_REQUEST['_kcseo_nonce']) : null;
145
+ if (!wp_verify_nonce($nonce, $KcSeoWPSchema->nonceText())) {
146
+ return $post_id;
147
+ }
148
+
149
+ // Check permissions
150
+ if (!empty($_GET['post_type'])) {
151
+ if (!current_user_can('edit_' . $_GET['post_type'], $post_id)) {
152
+ return $post_id;
153
+ }
154
+ }
155
+ $pt = $KcSeoWPSchema->kcSeoPostTypes();
156
+ if (!in_array($post->post_type, $pt)) {
157
+ return $post_id;
158
+ }
159
+
160
+ $meta = array();
161
+ $schemaModel = new KcSeoSchemaModel;
162
+ $schemaFields = KcSeoOptions::getSchemaTypes();
163
+ foreach ($schemaFields as $schemaID => $schema) {
164
+ $schemaMetaId = $KcSeoWPSchema->KcSeoPrefix . $schemaID;
165
+ $data = array();
166
+ if (!empty($schema['fields'])) {
167
+ foreach ($schema['fields'] as $fieldId => $fieldData) {
168
+ $value = (!empty($_REQUEST[$schemaMetaId][$fieldId]) ? $_REQUEST[$schemaMetaId][$fieldId] : null);
169
+ $value = $KcSeoWPSchema->sanitize($fieldId, $fieldData, $value);
170
+ $data[$fieldId] = $value;
171
+ }
172
+ }
173
+ $meta[$schemaMetaId] = $data;
174
+ }
175
+ /* _kcseo_ative_tab */
176
+ if (isset($_POST['_kcseo_ative_tab'])) {
177
+ $meta['_kcseo_ative_tab'] = sanitize_text_field($_POST['_kcseo_ative_tab']);
178
+ }
179
+ if (count($meta) > 0) {
180
+ foreach ($meta as $mKey => $mValue) {
181
+ update_post_meta($post_id, $mKey, $mValue);
182
+ }
183
+ }
184
+ }
185
+
186
+ }
187
+
188
  endif;
lib/classes/KcSeoOffer.php CHANGED
@@ -1,98 +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;
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,2161 +1,2165 @@
1
- <?php
2
-
3
- class KcSeoOptions
4
- {
5
-
6
- static function getSchemaTypes() {
7
- $author_url = get_userdata( get_current_user_id() )->user_url ;
8
- $schemas = array(
9
- 'article' => array(
10
- 'pro' => false,
11
- 'title' => __("Article", "wp-seo-structured-data-schema"),
12
- 'fields' => array(
13
- 'active' => array(
14
- 'type' => 'checkbox'
15
- ),
16
- 'headline' => array(
17
- 'title' => __('Headline', "wp-seo-structured-data-schema"),
18
- 'type' => 'text',
19
- 'desc' => __('Article title', "wp-seo-structured-data-schema"),
20
- 'required' => true
21
- ),
22
- 'mainEntityOfPage' => array(
23
- 'title' => __('Page URL', "wp-seo-structured-data-schema"),
24
- 'type' => 'url',
25
- 'desc' => __('The canonical URL of the article page', "wp-seo-structured-data-schema"),
26
- 'required' => true
27
- ),
28
- 'author' => array(
29
- 'title' => __('Author Name', "wp-seo-structured-data-schema"),
30
- 'type' => 'text',
31
- 'desc' => __('Author display name', "wp-seo-structured-data-schema"),
32
- 'required' => true
33
- ),
34
- 'author_url' => array(
35
- 'title' => __('Author URL', "wp-seo-structured-data-schema"),
36
- 'type' => 'url',
37
- 'required' => true,
38
- 'default' => $author_url,
39
- ),
40
- 'image' => array(
41
- 'title' => __('Article Feature Image', "wp-seo-structured-data-schema"),
42
- 'type' => 'image',
43
- 'required' => true,
44
- 'desc' => __('Images should be at least 696 pixels wide.<br>Images should be in .jpg, .png, or. gif format.', "wp-seo-structured-data-schema")
45
- ),
46
- 'datePublished' => array(
47
- 'title' => __('Published date', "wp-seo-structured-data-schema"),
48
- 'type' => 'text',
49
- 'class' => 'kcseo-date',
50
- 'required' => true,
51
- 'desc' => __('Like this: 2021-12-25 14:20:00', "wp-seo-structured-data-schema")
52
- ),
53
- 'dateModified' => array(
54
- 'title' => __('Modified date', "wp-seo-structured-data-schema"),
55
- 'type' => 'text',
56
- 'class' => 'kcseo-date',
57
- 'required' => true,
58
- 'desc' => __('Like this: 2021-12-25 14:20:00', "wp-seo-structured-data-schema")
59
- ),
60
- 'publisher' => array(
61
- 'title' => __('Publisher', "wp-seo-structured-data-schema"),
62
- 'type' => 'text',
63
- 'desc' => __('Publisher name or Organization name', "wp-seo-structured-data-schema"),
64
- 'required' => true
65
- ),
66
- 'publisherImage' => array(
67
- 'title' => __('Publisher Logo', "wp-seo-structured-data-schema"),
68
- 'type' => 'image',
69
- '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"),
70
- 'required' => true
71
- ),
72
- 'description' => array(
73
- 'title' => __('Description', "wp-seo-structured-data-schema"),
74
- 'type' => 'textarea',
75
- 'desc' => __('Short description. New line is not supported.', "wp-seo-structured-data-schema")
76
- ),
77
- 'articleBody' => array(
78
- 'title' => __('Article body', "wp-seo-structured-data-schema"),
79
- 'type' => 'textarea',
80
- 'desc' => __('Article content', "wp-seo-structured-data-schema")
81
- ),
82
- 'alternativeHeadline' => array(
83
- 'title' => __('Alternative headline', "wp-seo-structured-data-schema"),
84
- 'type' => 'text',
85
- 'desc' => __('A secondary headline for the article.', "wp-seo-structured-data-schema")
86
- ),
87
- 'video' => [
88
- 'title' => __('Video', "wp-seo-structured-data-schema"),
89
- 'type' => 'group',
90
- 'fields' => [
91
- 'video_heading' => [
92
- 'type' => 'heading',
93
- 'title' => __('Video', "wp-seo-structured-data-schema")
94
- ],
95
- 'name' => array(
96
- 'type' => 'text',
97
- 'title' => esc_html__('Name', "wp-seo-structured-data-schema"),
98
- ),
99
- 'description' => array(
100
- 'type' => 'textarea',
101
- 'title' => esc_html__('Description', "wp-seo-structured-data-schema")
102
- ),
103
- 'thumbnailUrl' => array(
104
- 'type' => 'image',
105
- 'title' => esc_html__('Image', "wp-seo-structured-data-schema")
106
- ),
107
- 'contentUrl' => array(
108
- 'type' => 'url',
109
- 'title' => esc_html__('Content URL', "wp-seo-structured-data-schema")
110
- ),
111
- 'embedUrl' => array(
112
- 'type' => 'url',
113
- 'title' => esc_html__('Embed URL', "wp-seo-structured-data-schema"),
114
- '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')
115
- ),
116
- 'uploadDate' => array(
117
- 'type' => 'text',
118
- 'title' => esc_html__('Upload date', "wp-seo-structured-data-schema"),
119
- 'class' => 'rtrs-date',
120
- 'required' => true,
121
- 'desc' => esc_html__('Like this: 2021-08-25 14:20:00', "wp-seo-structured-data-schema")
122
- ),
123
- 'duration' => array(
124
- 'type' => 'text',
125
- 'title' => esc_html__('Duration', "wp-seo-structured-data-schema"),
126
- 'desc' => esc_html__('Runtime of the movie in ISO 8601 format (for example, "PT2H22M" (142 minutes)).', "wp-seo-structured-data-schema")
127
- ),
128
- ]
129
- ],
130
- 'audio' => [
131
- 'title' => __('Audio', "wp-seo-structured-data-schema"),
132
- 'type' => 'group',
133
- 'fields' => [
134
- 'audio_heading' => [
135
- 'type' => 'heading',
136
- 'title' => __('Audio', "wp-seo-structured-data-schema")
137
- ],
138
- 'name' => array(
139
- 'type' => 'text',
140
- 'title' => esc_html__('Name', 'wp-seo-structured-data-schema'),
141
- 'desc' => esc_html__("The title of the audio", 'wp-seo-structured-data-schema')
142
- ),
143
- 'description' => array(
144
- 'type' => 'textarea',
145
- 'title' => esc_html__('Description', 'wp-seo-structured-data-schema'),
146
- 'desc' => esc_html__("The short description of the audio", 'wp-seo-structured-data-schema')
147
- ),
148
- 'duration' => array(
149
- 'type' => 'text',
150
- 'title' => esc_html__('Duration', 'wp-seo-structured-data-schema'),
151
- 'desc' => esc_html__("The duration of the audio in ISO 8601 format.(PT1M33S)", 'wp-seo-structured-data-schema')
152
- ),
153
- 'contentUrl' => array(
154
- 'type' => 'url',
155
- 'title' => esc_html__('Content URL', 'wp-seo-structured-data-schema'),
156
- 'placeholder' => esc_html__('URL', 'wp-seo-structured-data-schema'),
157
- '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')
158
- ),
159
- 'encodingFormat' => array(
160
- 'type' => 'text',
161
- 'title' => esc_html__('Encoding Format', 'wp-seo-structured-data-schema'),
162
- 'desc' => esc_html__("The encoding format of audio like: 'audio/mpeg'", 'wp-seo-structured-data-schema')
163
- ),
164
- ]
165
- ],
166
- )
167
- ),
168
- 'blog_posting' => array(
169
- 'pro' => false,
170
- 'title' => __('Blog Posting', "wp-seo-structured-data-schema"),
171
- 'fields' => array(
172
- 'active' => array(
173
- 'type' => 'checkbox'
174
- ),
175
- 'headline' => array(
176
- 'title' => __('Headline', "wp-seo-structured-data-schema"),
177
- 'type' => 'text',
178
- 'desc' => __('Blog posting title', "wp-seo-structured-data-schema"),
179
- 'required' => true
180
- ),
181
- 'mainEntityOfPage' => array(
182
- 'title' => __('Page URL', "wp-seo-structured-data-schema"),
183
- 'type' => 'url',
184
- 'desc' => __('The canonical URL of the article page', "wp-seo-structured-data-schema"),
185
- 'required' => true
186
- ),
187
- 'author' => array(
188
- 'title' => __('Author name', "wp-seo-structured-data-schema"),
189
- 'type' => 'text',
190
- 'desc' => __('Author display name', "wp-seo-structured-data-schema"),
191
- 'required' => true
192
- ),
193
- 'author_url' => array(
194
- 'title' => __('Author URL', "wp-seo-structured-data-schema"),
195
- 'type' => 'url',
196
- 'required' => true,
197
- 'default' => $author_url
198
- ),
199
- 'image' => array(
200
- 'title' => __('Feature Image', "wp-seo-structured-data-schema"),
201
- 'type' => 'image',
202
- '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"),
203
- 'required' => true
204
- ),
205
- 'datePublished' => array(
206
- 'title' => __('Published date', "wp-seo-structured-data-schema"),
207
- 'type' => 'text',
208
- 'class' => 'kcseo-date',
209
- 'desc' => __('Like this: 2021-12-25 14:20:00', "wp-seo-structured-data-schema"),
210
- 'required' => true
211
- ),
212
- 'dateModified' => array(
213
- 'title' => __('Modified date', "wp-seo-structured-data-schema"),
214
- 'type' => 'text',
215
- 'class' => 'kcseo-date',
216
- 'desc' => __('Like this: 2021-12-25 14:20:00', "wp-seo-structured-data-schema"),
217
- 'required' => true
218
- ),
219
- 'publisher' => array(
220
- 'title' => __('Publisher', "wp-seo-structured-data-schema"),
221
- 'type' => 'text',
222
- 'desc' => __('Publisher name or Organization name', "wp-seo-structured-data-schema"),
223
- 'required' => true
224
- ),
225
- 'publisherImage' => array(
226
- 'title' => __('Publisher Logo', "wp-seo-structured-data-schema"),
227
- 'type' => 'image',
228
- '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"),
229
- 'required' => true
230
- ),
231
- 'description' => array(
232
- 'title' => __('Description', "wp-seo-structured-data-schema"),
233
- 'type' => 'textarea',
234
- 'desc' => __('Short description. New line is not supported.', "wp-seo-structured-data-schema")
235
- ),
236
- 'articleBody' => array(
237
- 'title' => __('Article body', "wp-seo-structured-data-schema"),
238
- 'type' => 'textarea',
239
- 'desc' => __('Article content', "wp-seo-structured-data-schema")
240
- ),
241
- 'video' => [
242
- 'title' => __('Video', "wp-seo-structured-data-schema"),
243
- 'type' => 'group',
244
- 'fields' => [
245
- 'video_heading' => [
246
- 'type' => 'heading',
247
- 'title' => __('Video', "wp-seo-structured-data-schema")
248
- ],
249
- 'name' => array(
250
- 'type' => 'text',
251
- 'title' => esc_html__('Name', "wp-seo-structured-data-schema"),
252
- ),
253
- 'description' => array(
254
- 'type' => 'textarea',
255
- 'title' => esc_html__('Description', "wp-seo-structured-data-schema")
256
- ),
257
- 'thumbnailUrl' => array(
258
- 'type' => 'image',
259
- 'title' => esc_html__('Image', "wp-seo-structured-data-schema")
260
- ),
261
- 'contentUrl' => array(
262
- 'type' => 'url',
263
- 'title' => esc_html__('Content URL', "wp-seo-structured-data-schema")
264
- ),
265
- 'embedUrl' => array(
266
- 'type' => 'url',
267
- 'title' => esc_html__('Embed URL', "wp-seo-structured-data-schema"),
268
- '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')
269
- ),
270
- 'uploadDate' => array(
271
- 'type' => 'text',
272
- 'title' => esc_html__('Upload date', "wp-seo-structured-data-schema"),
273
- 'class' => 'rtrs-date',
274
- 'required' => true,
275
- 'desc' => esc_html__('Like this: 2021-08-25 14:20:00', "wp-seo-structured-data-schema")
276
- ),
277
- 'duration' => array(
278
- 'type' => 'text',
279
- 'title' => esc_html__('Duration', "wp-seo-structured-data-schema"),
280
- 'desc' => esc_html__('Runtime of the movie in ISO 8601 format (for example, "PT2H22M" (142 minutes)).', "wp-seo-structured-data-schema")
281
- ),
282
- ]
283
- ],
284
- 'audio' => [
285
- 'title' => __('Audio', "wp-seo-structured-data-schema"),
286
- 'type' => 'group',
287
- 'fields' => [
288
- 'audio_heading' => [
289
- 'type' => 'heading',
290
- 'title' => __('Audio', "wp-seo-structured-data-schema")
291
- ],
292
- 'name' => array(
293
- 'type' => 'text',
294
- 'title' => esc_html__('Name', 'wp-seo-structured-data-schema'),
295
- 'desc' => esc_html__("The title of the audio", 'wp-seo-structured-data-schema')
296
- ),
297
- 'description' => array(
298
- 'type' => 'textarea',
299
- 'title' => esc_html__('Description', 'wp-seo-structured-data-schema'),
300
- 'desc' => esc_html__("The short description of the audio", 'wp-seo-structured-data-schema')
301
- ),
302
- 'duration' => array(
303
- 'type' => 'text',
304
- 'title' => esc_html__('Duration', 'wp-seo-structured-data-schema'),
305
- 'desc' => esc_html__("The duration of the audio in ISO 8601 format.(PT1M33S)", 'wp-seo-structured-data-schema')
306
- ),
307
- 'contentUrl' => array(
308
- 'type' => 'url',
309
- 'title' => esc_html__('Content URL', 'wp-seo-structured-data-schema'),
310
- 'placeholder' => esc_html__('URL', 'wp-seo-structured-data-schema'),
311
- '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')
312
- ),
313
- 'encodingFormat' => array(
314
- 'type' => 'text',
315
- 'title' => esc_html__('Encoding Format', 'wp-seo-structured-data-schema'),
316
- 'desc' => esc_html__("The encoding format of audio like: 'audio/mpeg'", 'wp-seo-structured-data-schema')
317
- ),
318
- ]
319
- ],
320
- )
321
- ),
322
- 'news_article' => array(
323
- 'pro' => false,
324
- 'title' => __('News Article', "wp-seo-structured-data-schema"),
325
- 'fields' => array(
326
- 'active' => array(
327
- 'type' => 'checkbox'
328
- ),
329
- 'headline' => array(
330
- 'title' => __('Headline', "wp-seo-structured-data-schema"),
331
- 'type' => 'text',
332
- 'desc' => __('Article title', "wp-seo-structured-data-schema"),
333
- 'required' => true
334
- ),
335
- 'mainEntityOfPage' => array(
336
- 'title' => __('Page URL', "wp-seo-structured-data-schema"),
337
- 'type' => 'url',
338
- 'desc' => __('The canonical URL of the article page', "wp-seo-structured-data-schema"),
339
- 'required' => true
340
- ),
341
- 'author' => array(
342
- 'title' => __('Author', "wp-seo-structured-data-schema"),
343
- 'type' => 'text',
344
- 'desc' => __('Author display name', "wp-seo-structured-data-schema"),
345
- 'required' => true
346
- ),
347
- 'author_url' => array(
348
- 'title' => __('Author URL', "wp-seo-structured-data-schema"),
349
- 'type' => 'url',
350
- 'required' => true,
351
- 'default' => $author_url
352
- ),
353
- 'image' => array(
354
- 'title' => __('Image', "wp-seo-structured-data-schema"),
355
- 'type' => 'image',
356
- '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"),
357
- 'required' => true
358
- ),
359
- 'datePublished' => array(
360
- 'title' => __('Published date', "wp-seo-structured-data-schema"),
361
- 'type' => 'text',
362
- 'class' => 'kcseo-date',
363
- 'desc' => __('Like this: 2021-12-25 14:20:00', "wp-seo-structured-data-schema"),
364
- 'required' => true
365
- ),
366
- 'dateModified' => array(
367
- 'title' => __('Modified date', "wp-seo-structured-data-schema"),
368
- 'type' => 'text',
369
- 'class' => 'kcseo-date',
370
- 'required' => true,
371
- 'desc' => __('Like this: 2021-12-25 14:20:00', "wp-seo-structured-data-schema")
372
- ),
373
- 'publisher' => array(
374
- 'title' => __('Publisher', "wp-seo-structured-data-schema"),
375
- 'type' => 'text',
376
- 'desc' => __('Publisher name or Organization name', "wp-seo-structured-data-schema"),
377
- 'required' => true
378
- ),
379
- 'publisherImage' => array(
380
- 'title' => __('Publisher Logo', "wp-seo-structured-data-schema"),
381
- 'type' => 'image',
382
- '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"),
383
- 'required' => true
384
- ),
385
- 'description' => array(
386
- 'title' => __('Description', "wp-seo-structured-data-schema"),
387
- 'type' => 'textarea',
388
- 'desc' => __('Short description. New line is not supported.', "wp-seo-structured-data-schema")
389
- ),
390
- 'articleBody' => array(
391
- 'title' => __('Article body', "wp-seo-structured-data-schema"),
392
- 'type' => 'textarea',
393
- 'desc' => __('Article body content. New line is not supported.', "wp-seo-structured-data-schema")
394
- ),
395
- 'video' => [
396
- 'title' => __('Video', "wp-seo-structured-data-schema"),
397
- 'type' => 'group',
398
- 'fields' => [
399
- 'video_heading' => [
400
- 'type' => 'heading',
401
- 'title' => __('Video', "wp-seo-structured-data-schema")
402
- ],
403
- 'name' => array(
404
- 'type' => 'text',
405
- 'title' => esc_html__('Name', "wp-seo-structured-data-schema"),
406
- ),
407
- 'description' => array(
408
- 'type' => 'textarea',
409
- 'title' => esc_html__('Description', "wp-seo-structured-data-schema")
410
- ),
411
- 'thumbnailUrl' => array(
412
- 'type' => 'image',
413
- 'title' => esc_html__('Image', "wp-seo-structured-data-schema")
414
- ),
415
- 'contentUrl' => array(
416
- 'type' => 'url',
417
- 'title' => esc_html__('Content URL', "wp-seo-structured-data-schema")
418
- ),
419
- 'embedUrl' => array(
420
- 'type' => 'url',
421
- 'title' => esc_html__('Embed URL', "wp-seo-structured-data-schema"),
422
- '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')
423
- ),
424
- 'uploadDate' => array(
425
- 'type' => 'text',
426
- 'title' => esc_html__('Upload date', "wp-seo-structured-data-schema"),
427
- 'class' => 'rtrs-date',
428
- 'required' => true,
429
- 'desc' => esc_html__('Like this: 2021-08-25 14:20:00', "wp-seo-structured-data-schema")
430
- ),
431
- 'duration' => array(
432
- 'type' => 'text',
433
- 'title' => esc_html__('Duration', "wp-seo-structured-data-schema"),
434
- 'desc' => esc_html__('Runtime of the movie in ISO 8601 format (for example, "PT2H22M" (142 minutes)).', "wp-seo-structured-data-schema")
435
- ),
436
- ]
437
- ],
438
- 'audio' => [
439
- 'title' => __('Audio', "wp-seo-structured-data-schema"),
440
- 'type' => 'group',
441
- 'fields' => [
442
- 'audio_heading' => [
443
- 'type' => 'heading',
444
- 'title' => __('Audio', "wp-seo-structured-data-schema")
445
- ],
446
- 'name' => array(
447
- 'type' => 'text',
448
- 'title' => esc_html__('Name', 'wp-seo-structured-data-schema'),
449
- 'desc' => esc_html__("The title of the audio", 'wp-seo-structured-data-schema')
450
- ),
451
- 'description' => array(
452
- 'type' => 'textarea',
453
- 'title' => esc_html__('Description', 'wp-seo-structured-data-schema'),
454
- 'desc' => esc_html__("The short description of the audio", 'wp-seo-structured-data-schema')
455
- ),
456
- 'duration' => array(
457
- 'type' => 'text',
458
- 'title' => esc_html__('Duration', 'wp-seo-structured-data-schema'),
459
- 'desc' => esc_html__("The duration of the audio in ISO 8601 format.(PT1M33S)", 'wp-seo-structured-data-schema')
460
- ),
461
- 'contentUrl' => array(
462
- 'type' => 'url',
463
- 'title' => esc_html__('Content URL', 'wp-seo-structured-data-schema'),
464
- 'placeholder' => esc_html__('URL', 'wp-seo-structured-data-schema'),
465
- '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')
466
- ),
467
- 'encodingFormat' => array(
468
- 'type' => 'text',
469
- 'title' => esc_html__('Encoding Format', 'wp-seo-structured-data-schema'),
470
- 'desc' => esc_html__("The encoding format of audio like: 'audio/mpeg'", 'wp-seo-structured-data-schema')
471
- ),
472
- ]
473
- ],
474
- )
475
- ),
476
- 'event' => array(
477
- 'pro' => false,
478
- 'title' => __('Event', "wp-seo-structured-data-schema"),
479
- 'fields' => array(
480
- 'active' => array(
481
- 'type' => 'checkbox'
482
- ),
483
- 'name' => array(
484
- 'title' => __('Name', "wp-seo-structured-data-schema"),
485
- 'type' => 'text',
486
- 'required' => true,
487
- 'desc' => __("The name of the event.", "wp-seo-structured-data-schema")
488
- ),
489
- 'locationName' => array(
490
- 'title' => __('Location name', "wp-seo-structured-data-schema"),
491
- 'type' => 'text',
492
- 'required' => true,
493
- 'desc' => __("Event Location name", "wp-seo-structured-data-schema")
494
- ),
495
- 'locationAddress' => array(
496
- 'title' => __('Location address', "wp-seo-structured-data-schema"),
497
- 'type' => 'text',
498
- 'required' => true,
499
- '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")
500
- ),
501
- 'startDate' => array(
502
- 'title' => __('Start date', "wp-seo-structured-data-schema"),
503
- 'type' => 'text',
504
- 'class' => 'kcseo-date',
505
- 'required' => true,
506
- 'desc' => __("Event start date Like : 2017-10-16 4:00 AM", "wp-seo-structured-data-schema")
507
- ),
508
- 'endDate' => array(
509
- 'title' => __('End date', "wp-seo-structured-data-schema"),
510
- 'type' => 'text',
511
- 'recommended' => true,
512
- 'class' => 'kcseo-date',
513
- 'desc' => __("Event end date Like : 2017-10-16 4:00 AM", "wp-seo-structured-data-schema")
514
- ),
515
- 'description' => array(
516
- 'title' => __('Description', "wp-seo-structured-data-schema"),
517
- 'type' => 'textarea',
518
- 'recommended' => true,
519
- 'desc' => __("Event description. New line is not supported.", "wp-seo-structured-data-schema")
520
- ),
521
- 'organizer' => array(
522
- 'title' => __('Organizer', "wp-seo-structured-data-schema"),
523
- 'type' => 'text',
524
- 'recommended' => true,
525
- 'desc' => __("The Organizer.", "wp-seo-structured-data-schema")
526
- ),
527
- 'organizerUrl' => array(
528
- 'title' => __('Organizer URL', "wp-seo-structured-data-schema"),
529
- 'type' => 'url',
530
- 'recommended' => true,
531
- 'desc' => __("Organizer URL", "wp-seo-structured-data-schema")
532
- ),
533
- 'performerName' => array(
534
- 'title' => __('Performer Name', "wp-seo-structured-data-schema"),
535
- 'type' => 'text',
536
- 'recommended' => true,
537
- 'desc' => __("The performer's name.", "wp-seo-structured-data-schema")
538
- ),
539
- 'EventAttendanceMode' => array(
540
- 'title' => 'Event Attendance Mode',
541
- 'type' => 'select',
542
- 'recommended' => true,
543
- 'empty' => "Select one",
544
- 'options' => array(
545
- 'https://schema.org/OfflineEventAttendanceMode' => 'Offline',
546
- 'https://schema.org/OnlineEventAttendanceMode' => 'Online',
547
- 'https://schema.org/MixedEventAttendanceMode' => 'Mixed',
548
- ),
549
- ),
550
- 'eventStatus' => array(
551
- 'title' => 'Event Status',
552
- 'type' => 'select',
553
- 'recommended' => true,
554
- 'empty' => "Select one",
555
- 'options' => array(
556
- 'https://schema.org/EventScheduled' => 'EventScheduled',
557
- 'https://schema.org/EventCancelled' => 'EventCancelled',
558
- 'https://schema.org/EventMovedOnline' => 'EventMovedOnline',
559
- 'https://schema.org/EventPostponed' => 'EventPostponed',
560
- 'https://schema.org/EventRescheduled' => 'EventRescheduled',
561
- ),
562
- ),
563
- 'image' => array(
564
- 'title' => __('Image URL', "wp-seo-structured-data-schema"),
565
- 'type' => 'url',
566
- 'recommended' => true,
567
- 'desc' => __("URL of an image or logo for the event or tour", "wp-seo-structured-data-schema")
568
- ),
569
- 'price' => array(
570
- 'title' => __('Price', "wp-seo-structured-data-schema"),
571
- 'type' => 'number',
572
- 'recommended' => true,
573
- 'attr' => 'step="any"',
574
- '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")
575
- ),
576
- 'priceCurrency' => array(
577
- 'title' => __('Price currency', "wp-seo-structured-data-schema"),
578
- 'type' => 'text',
579
- 'desc' => __("The 3-letter currency code. (USD)", "wp-seo-structured-data-schema")
580
- ),
581
- 'availability' => array(
582
- 'title' => 'Availability',
583
- 'type' => 'select',
584
- 'recommended' => true,
585
- 'empty' => "Select one",
586
- 'options' => array(
587
- 'http://schema.org/InStock' => 'InStock',
588
- 'http://schema.org/SoldOut' => 'SoldOut',
589
- 'http://schema.org/PreOrder' => 'PreOrder',
590
- ),
591
- ),
592
- 'validFrom' => array(
593
- 'title' => __('Valid From', "wp-seo-structured-data-schema"),
594
- 'type' => 'text',
595
- 'recommended' => true,
596
- 'class' => 'kcseo-date',
597
- '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")
598
- ),
599
- 'url' => array(
600
- 'title' => 'URL',
601
- 'recommended' => true,
602
- 'type' => 'url',
603
- 'placeholder' => 'URL',
604
- 'desc' => __("A link to the event's details page. <span class='required'>Not required but (Recommended)</span>", "wp-seo-structured-data-schema")
605
- ),
606
- 'review_section' => array(
607
- 'title' => __('Review', "wp-seo-structured-data-schema"),
608
- 'type' => 'heading',
609
- 'desc' => __("To add review schema for this type, complete fields below and enable, others live blank.", "wp-seo-structured-data-schema")
610
- ),
611
- 'review_active' => array(
612
- 'type' => 'checkbox'
613
- ),
614
- 'review_author' => array(
615
- 'title' => __("Author", "wp-seo-structured-data-schema"),
616
- 'type' => 'text',
617
- 'required' => true
618
- ),
619
- 'review_author_sameAs' => array(
620
- 'title' => __("Author Same As profile link", "wp-seo-structured-data-schema"),
621
- 'type' => 'textarea',
622
- 'attr' => 'placeholder="https://facebook.com/example&#10;https://twitter.com/example"',
623
- 'required' => true,
624
- '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")
625
- ),
626
- 'review_body' => array(
627
- 'title' => __('Review body', "wp-seo-structured-data-schema"),
628
- 'type' => 'textarea',
629
- 'required' => true,
630
- 'desc' => __("The actual body of the review.", "wp-seo-structured-data-schema")
631
- ),
632
- 'review_datePublished' => array(
633
- 'title' => __('Date of Published', "wp-seo-structured-data-schema"),
634
- 'type' => 'text',
635
- 'class' => 'kcseo-date',
636
- 'desc' => __("Like this: 2021-12-25 14:20:00", "wp-seo-structured-data-schema")
637
- ),
638
- 'review_ratingValue' => array(
639
- 'title' => __('Rating value', "wp-seo-structured-data-schema"),
640
- 'type' => 'number',
641
- 'attr' => 'step="any"',
642
- 'desc' => __("A numerical quality rating for the item.", "wp-seo-structured-data-schema")
643
- ),
644
- 'review_bestRating' => array(
645
- 'title' => __('Best rating', "wp-seo-structured-data-schema"),
646
- 'type' => 'number',
647
- 'attr' => 'step="any"',
648
- 'desc' => __("The highest value allowed in this rating system.", "wp-seo-structured-data-schema")
649
- ),
650
- 'review_worstRating' => array(
651
- 'title' => __('Worst rating', "wp-seo-structured-data-schema"),
652
- 'type' => 'number',
653
- 'attr' => 'step="any"',
654
- '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")
655
- )
656
- )
657
- ),
658
- 'product' => array(
659
- 'pro' => false,
660
- 'title' => __('Product', "wp-seo-structured-data-schema"),
661
- 'fields' => array(
662
- 'active' => array(
663
- 'type' => 'checkbox'
664
- ),
665
- 'name' => array(
666
- 'title' => __('Name', "wp-seo-structured-data-schema"),
667
- 'type' => 'text',
668
- 'required' => true,
669
- 'desc' => __("The name of the product.", "wp-seo-structured-data-schema")
670
- ),
671
- 'image' => array(
672
- 'title' => __('Image', "wp-seo-structured-data-schema"),
673
- 'type' => 'image',
674
- '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")
675
- ),
676
- 'description' => array(
677
- 'title' => __('Description', "wp-seo-structured-data-schema"),
678
- 'type' => 'textarea',
679
- 'desc' => __("Product description. New line is not supported.", "wp-seo-structured-data-schema")
680
- ),
681
- 'sku' => array(
682
- 'title' => __('SKU', "wp-seo-structured-data-schema"),
683
- 'type' => 'text',
684
- 'recommended' => true
685
- ),
686
- 'brand' => array(
687
- 'title' => __('Brand', "wp-seo-structured-data-schema"),
688
- 'type' => 'text',
689
- 'recommended' => true,
690
- 'desc' => __("The brand of the product.", "wp-seo-structured-data-schema")
691
- ),
692
- 'identifier_type' => array(
693
- 'title' => __('Identifier Type', "wp-seo-structured-data-schema"),
694
- 'type' => 'select',
695
- 'recommended' => true,
696
- 'options' => array(
697
- 'mpn' => 'MPN',
698
- 'isbn' => 'ISBN',
699
- 'gtin8' => 'GTIN-8 (UPC, JAN)',
700
- 'gtin12' => 'GTIN-12 (UPC)',
701
- 'gtin13' => 'GTIN-13 (EAN,JAN)'
702
- ),
703
- 'desc' => __("<strong>MPN</strong><br>
704
- &#8594; MPN(Manufacturer Part Number) Used globally, Alphanumeric digits (various lengths)<br>
705
- <strong>GTIN</strong><br>
706
- &#8594; UPC(Universal Product Code) Used in primarily North America. 12 numeric digits. eg. 892685001003.<br>
707
- &#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>
708
- &#8594; ISBN(International Standard Book Number) Used globally, ISBN-13 (recommended), 13 numeric digits 978-0747595823<br>
709
- &#8594; JAN(Japanese Article Number) Used only in Japan, 8 or 13 numeric digits.", "wp-seo-structured-data-schema")
710
- ),
711
- 'identifier' => array(
712
- 'title' => __('Identifier', "wp-seo-structured-data-schema"),
713
- 'type' => 'text',
714
- 'recommended' => true,
715
- 'desc' => __("Enter product unique identifier", "wp-seo-structured-data-schema")
716
- ),
717
- 'rating_section' => array(
718
- 'title' => __('Product Review & Rating', "wp-seo-structured-data-schema"),
719
- 'type' => 'heading',
720
- ),
721
- 'reviewRatingValue' => array(
722
- 'title' => __('Review rating value', "wp-seo-structured-data-schema"),
723
- 'type' => 'number',
724
- 'recommended' => true,
725
- 'attr' => 'step="any"',
726
- 'desc' => __("Rating value. (1 , 2.5, 3, 5 etc)", "wp-seo-structured-data-schema")
727
- ),
728
- 'reviewBestRating' => array(
729
- 'title' => __('Review Best rating', "wp-seo-structured-data-schema"),
730
- 'type' => 'number',
731
- 'recommended' => true,
732
- 'attr' => 'step="any"',
733
- ),
734
- 'reviewWorstRating' => array(
735
- 'title' => __('Review Worst rating', "wp-seo-structured-data-schema"),
736
- 'type' => 'number',
737
- 'recommended' => true,
738
- 'attr' => 'step="any"',
739
- ),
740
- 'reviewAuthor' => array(
741
- 'title' => __('Review author', "wp-seo-structured-data-schema"),
742
- 'type' => 'text'
743
- ),
744
- 'ratingValue' => array(
745
- 'title' => __('Rating value', "wp-seo-structured-data-schema"),
746
- 'type' => 'number',
747
- 'attr' => 'step="any"',
748
- 'desc' => __("Rating value. (1 , 2.5, 3, 5 etc)", "wp-seo-structured-data-schema")
749
- ),
750
- 'reviewCount' => array(
751
- 'title' => __('Total review count', "wp-seo-structured-data-schema"),
752
- 'type' => 'number',
753
- 'attr' => 'step="any"',
754
- 'desc' => __("Review rating value. <span class='required'>This is required if (Rating value) is given</span>", "wp-seo-structured-data-schema")
755
- ),
756
- 'pricing_section' => array(
757
- 'title' => __('Product Pricing', "wp-seo-structured-data-schema"),
758
- 'type' => 'heading',
759
- ),
760
- 'price' => array(
761
- 'title' => __('Price', "wp-seo-structured-data-schema"),
762
- 'type' => 'number',
763
- 'attr' => 'step="any"',
764
- 'desc' => __("The lowest available price, including service charges and fees, of this type of ticket.", "wp-seo-structured-data-schema")
765
- ),
766
- 'priceValidUntil' => array(
767
- 'title' => __('PriceValidUntil', "wp-seo-structured-data-schema"),
768
- 'type' => 'text',
769
- 'recommended' => true,
770
- 'class' => 'kcseo-date',
771
- 'desc' => __("The date (in ISO 8601 date and time format) after which the price will no longer be available.", "wp-seo-structured-data-schema")
772
- ),
773
- 'priceCurrency' => array(
774
- 'title' => __('Price currency', "wp-seo-structured-data-schema"),
775
- 'type' => 'text',
776
- 'desc' => __("The 3-letter currency code.", "wp-seo-structured-data-schema")
777
- ),
778
- 'availability' => array(
779
- 'title' => 'Availability',
780
- 'type' => 'select',
781
- 'empty' => "Select one",
782
- 'options' => array(
783
- 'http://schema.org/InStock' => 'InStock',
784
- 'http://schema.org/InStoreOnly' => 'InStoreOnly',
785
- 'http://schema.org/OutOfStock' => 'OutOfStock',
786
- 'http://schema.org/SoldOut' => 'SoldOut',
787
- 'http://schema.org/OnlineOnly' => 'OnlineOnly',
788
- 'http://schema.org/LimitedAvailability' => 'LimitedAvailability',
789
- 'http://schema.org/Discontinued' => 'Discontinued',
790
- 'http://schema.org/PreOrder' => 'PreOrder',
791
- ),
792
- 'desc' => __("Select a availability type", "wp-seo-structured-data-schema")
793
- ),
794
- 'itemCondition' => array(
795
- 'title' => 'Product condition',
796
- 'type' => 'select',
797
- 'empty' => "Select one",
798
- 'options' => array(
799
- 'http://schema.org/NewCondition' => 'NewCondition',
800
- 'http://schema.org/UsedCondition' => 'UsedCondition',
801
- 'http://schema.org/DamagedCondition' => 'DamagedCondition',
802
- 'http://schema.org/RefurbishedCondition' => 'RefurbishedCondition',
803
- ),
804
- 'desc' => __("Select a condition", "wp-seo-structured-data-schema")
805
- ),
806
- 'url' => array(
807
- 'title' => __('Product URL', "wp-seo-structured-data-schema"),
808
- 'type' => 'url',
809
- '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")
810
- ),
811
- )
812
- ),
813
- 'video' => array(
814
- 'pro' => false,
815
- 'title' => __('Video', "wp-seo-structured-data-schema"),
816
- 'fields' => array(
817
- 'active' => array(
818
- 'type' => 'checkbox'
819
- ),
820
- 'name' => array(
821
- 'title' => __('Name', "wp-seo-structured-data-schema"),
822
- 'type' => 'text',
823
- 'required' => true,
824
- 'desc' => __("The title of the video", "wp-seo-structured-data-schema")
825
- ),
826
- 'description' => array(
827
- 'title' => __('Description', "wp-seo-structured-data-schema"),
828
- 'type' => 'textarea',
829
- 'required' => true,
830
- 'desc' => __("The description of the video. New line is not supported.", "wp-seo-structured-data-schema")
831
- ),
832
- 'thumbnailUrl' => array(
833
- 'title' => 'Thumbnail URL',
834
- 'type' => 'url',
835
- 'placeholder' => "URL",
836
- 'required' => true,
837
- '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")
838
- ),
839
- 'uploadDate' => array(
840
- 'title' => __('Updated date', "wp-seo-structured-data-schema"),
841
- 'type' => 'text',
842
- 'class' => 'kcseo-date',
843
- 'required' => true,
844
- 'desc' => __('2021-02-05T08:00:00+08:00', "wp-seo-structured-data-schema")
845
- ),
846
- 'duration' => array(
847
- 'title' => __('Duration', "wp-seo-structured-data-schema"),
848
- 'type' => 'text',
849
- 'desc' => __("The duration of the video in ISO 8601 format.(PT1M33S)", "wp-seo-structured-data-schema")
850
- ),
851
- 'contentUrl' => array(
852
- 'title' => 'Content URL',
853
- 'type' => 'url',
854
- 'placeholder' => 'URL',
855
- '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")
856
- ),
857
- 'embedUrl' => array(
858
- 'title' => 'Embed URL',
859
- 'placeholder' => 'URL',
860
- 'type' => 'url',
861
- '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")
862
- ),
863
- 'interactionCount' => array(
864
- 'title' => __('Interaction count', "wp-seo-structured-data-schema"),
865
- 'type' => 'text',
866
- 'desc' => __("The number of times the video has been viewed.", "wp-seo-structured-data-schema")
867
- ),
868
- 'expires' => array(
869
- 'title' => __('Expires', "wp-seo-structured-data-schema"),
870
- 'type' => 'text',
871
- 'class' => 'kcseo-date',
872
- 'desc' => __("Like this: 2021-12-25 14:20:00", "wp-seo-structured-data-schema")
873
- ),
874
- )
875
- ),
876
- 'audio' => array(
877
- 'pro' => false,
878
- 'title' => __('Audio', "wp-seo-structured-data-schema"),
879
- 'fields' => array(
880
- 'active' => array(
881
- 'type' => 'checkbox'
882
- ),
883
- 'name' => array(
884
- 'title' => __('Name', "wp-seo-structured-data-schema"),
885
- 'type' => 'text',
886
- 'required' => true,
887
- 'desc' => __("The title of the audio", "wp-seo-structured-data-schema")
888
- ),
889
- 'description' => array(
890
- 'title' => __('Description', "wp-seo-structured-data-schema"),
891
- 'type' => 'textarea',
892
- 'desc' => __("The description of the audio. New line is not supported.", "wp-seo-structured-data-schema")
893
- ),
894
- 'contentUrl' => array(
895
- 'title' => 'Content URL',
896
- 'type' => 'url',
897
- 'placeholder' => 'URL',
898
- 'required' => true,
899
- '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')
900
- ),
901
- 'duration' => array(
902
- 'title' => __('Duration', "wp-seo-structured-data-schema"),
903
- 'type' => 'text',
904
- 'desc' => __("The duration of the audio in ISO 8601 format.(PT1M33S)", "wp-seo-structured-data-schema")
905
- ),
906
- 'encodingFormat' => array(
907
- 'type' => 'text',
908
- 'title' => esc_html__('Encoding Format', 'wp-seo-structured-data-schema'),
909
- 'desc' => esc_html__("The encoding format of audio like: 'audio/mpeg'", 'wp-seo-structured-data-schema')
910
- ),
911
- )
912
- ),
913
- 'service' => array(
914
- 'pro' => false,
915
- 'title' => __('Service', "wp-seo-structured-data-schema"),
916
- 'fields' => array(
917
- 'active' => array(
918
- 'type' => 'checkbox'
919
- ),
920
- 'name' => array(
921
- 'title' => __('Name', "wp-seo-structured-data-schema"),
922
- 'type' => 'text',
923
- 'required' => true,
924
- 'desc' => __("The name of the Service.", "wp-seo-structured-data-schema")
925
- ),
926
- 'serviceType' => array(
927
- 'title' => __('Service type', "wp-seo-structured-data-schema"),
928
- 'type' => 'text',
929
- 'required' => true,
930
- 'desc' => __("The type of service being offered, e.g. veterans' benefits, emergency relief, etc.", "wp-seo-structured-data-schema")
931
- ),
932
- 'additionalType' => array(
933
- 'title' => 'Additional type(URL)',
934
- 'type' => 'url',
935
- 'placeholder' => 'URL',
936
- '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")
937
- ),
938
- 'award' => array(
939
- 'title' => __('Award', "wp-seo-structured-data-schema"),
940
- 'type' => 'text',
941
- 'desc' => __("An award won by or for this service.", "wp-seo-structured-data-schema")
942
- ),
943
- 'category' => array(
944
- 'title' => __('Category', "wp-seo-structured-data-schema"),
945
- 'type' => 'text',
946
- 'desc' => __("A category for the service.", "wp-seo-structured-data-schema")
947
- ),
948
- 'providerMobility' => array(
949
- 'title' => __('Provider mobility', "wp-seo-structured-data-schema"),
950
- 'type' => 'text',
951
- 'desc' => __("Indicates the mobility of a provided service (e.g. 'static', 'dynamic').", "wp-seo-structured-data-schema")
952
- ),
953
- 'description' => array(
954
- 'title' => 'Description',
955
- 'type' => 'textarea',
956
- 'require' => true,
957
- 'desc' => __("A short description of the service. New line is not supported.", "wp-seo-structured-data-schema")
958
- ),
959
- 'image' => array(
960
- 'title' => 'Image URL',
961
- 'type' => 'url',
962
- 'require' => false,
963
- 'desc' => __("An image of the service. This should be a URL.", "wp-seo-structured-data-schema")
964
- ),
965
- 'mainEntityOfPage' => array(
966
- 'title' => 'Main entity of page URL',
967
- 'type' => 'url',
968
- 'require' => false,
969
- 'desc' => __("Indicates a page (or other CreativeWork) for which this thing is the main entity being described.", "wp-seo-structured-data-schema")
970
- ),
971
- 'sameAs' => array(
972
- 'title' => 'Same as URL',
973
- 'type' => 'url',
974
- 'placeholder' => 'URL',
975
- '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")
976
- ),
977
- 'url' => array(
978
- 'title' => 'Url of the service',
979
- 'type' => 'url',
980
- 'placeholder' => 'URL',
981
- 'desc' => __("URL of the service.", "wp-seo-structured-data-schema")
982
- ),
983
- 'alternateName' => array(
984
- 'title' => __('Alternate name', "wp-seo-structured-data-schema"),
985
- 'type' => 'text',
986
- 'desc' => __('An alias for the service.', "wp-seo-structured-data-schema")
987
- ),
988
- )
989
- ),
990
- 'about' => array(
991
- 'pro' => false,
992
- 'title' => __('About', "wp-seo-structured-data-schema"),
993
- 'fields' => array(
994
- 'active' => array(
995
- 'type' => 'checkbox'
996
- ),
997
- 'name' => array(
998
- 'type' => 'text',
999
- 'title' => esc_html__('Name', 'wp-seo-structured-data-schema'),
1000
- 'required' => true
1001
- ),
1002
- 'description' => array(
1003
- 'type' => 'textarea',
1004
- 'title' => esc_html__('Description', 'wp-seo-structured-data-schema'),
1005
- ),
1006
- 'image' => array(
1007
- 'type' => 'image',
1008
- 'title' => esc_html__('Image', 'wp-seo-structured-data-schema'),
1009
- ),
1010
- 'url' => array(
1011
- 'type' => 'url',
1012
- 'title' => esc_html__('URL', 'wp-seo-structured-data-schema'),
1013
- ),
1014
- 'sameAs' => array(
1015
- 'type' => 'textarea',
1016
- 'title' => esc_html__("Author Same As profile link", 'wp-seo-structured-data-schema'),
1017
- 'placeholder' => 'https://facebook.com/example&#10;https://twitter.com/example',
1018
- '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' => [] ] )
1019
- ),
1020
- )
1021
- ),
1022
- 'contact' => array(
1023
- 'pro' => false,
1024
- 'title' => __('Contact', "wp-seo-structured-data-schema"),
1025
- 'fields' => array(
1026
- 'active' => array(
1027
- 'type' => 'checkbox'
1028
- ),
1029
- 'name' => array(
1030
- 'type' => 'text',
1031
- 'title' => esc_html__('Name', 'wp-seo-structured-data-schema'),
1032
- 'required' => true
1033
- ),
1034
- 'description' => array(
1035
- 'type' => 'textarea',
1036
- 'title' => esc_html__('Description', 'wp-seo-structured-data-schema'),
1037
- ),
1038
- 'image' => array(
1039
- 'type' => 'image',
1040
- 'title' => esc_html__('Image', 'wp-seo-structured-data-schema'),
1041
- ),
1042
- 'url' => array(
1043
- 'type' => 'url',
1044
- 'title' => esc_html__('URL', 'wp-seo-structured-data-schema'),
1045
- ),
1046
- 'video' => array(
1047
- 'type' => 'url',
1048
- 'title' => esc_html__('Video URL', 'wp-seo-structured-data-schema'),
1049
- 'placeholder' => esc_html__('URL', 'wp-seo-structured-data-schema'),
1050
- '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')
1051
- ),
1052
- 'sameAs' => array(
1053
- 'type' => 'textarea',
1054
- 'title' => esc_html__("Author Same As profile link", 'wp-seo-structured-data-schema'),
1055
- 'placeholder' => 'https://facebook.com/example&#10;https://twitter.com/example',
1056
- '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' => [] ] )
1057
- ),
1058
- )
1059
- ),
1060
- 'review' => array(
1061
- 'pro' => false,
1062
- 'title' => __('Review', "wp-seo-structured-data-schema"),
1063
- 'fields' => array(
1064
- 'active' => array(
1065
- 'type' => 'checkbox'
1066
- ),
1067
- 'review_notice_heading' => array(
1068
- 'title' => sprintf('<span style="display:block;text-align:center;color: red">%s</span>', __('Notice</span>', "wp-seo-structured-data-schema")),
1069
- 'type' => 'heading',
1070
- 'desc' => self::getReviewNotice()
1071
- ),
1072
- 'itemName' => array(
1073
- 'title' => __('Name of the reviewed item', "wp-seo-structured-data-schema"),
1074
- 'type' => 'text',
1075
- 'required' => true,
1076
- 'desc' => __("The item that is being reviewed.", "wp-seo-structured-data-schema")
1077
- ),
1078
- 'reviewBody' => array(
1079
- 'title' => __('Review body', "wp-seo-structured-data-schema"),
1080
- 'type' => 'textarea',
1081
- 'required' => true,
1082
- 'desc' => __("The actual body of the review.", "wp-seo-structured-data-schema")
1083
- ),
1084
- 'name' => array(
1085
- 'title' => __('Review name', "wp-seo-structured-data-schema"),
1086
- 'type' => 'text',
1087
- 'required' => true,
1088
- 'desc' => __("A particular name for the review.", "wp-seo-structured-data-schema")
1089
- ),
1090
- 'author' => array(
1091
- 'title' => __('Author', "wp-seo-structured-data-schema"),
1092
- 'type' => 'text',
1093
- 'required' => true,
1094
- 'author' => 'Author name',
1095
- 'desc' => __("The author of the review. The reviewer’s name needs to be a valid name.", "wp-seo-structured-data-schema")
1096
- ),
1097
- 'datePublished' => array(
1098
- 'title' => __('Date of Published', "wp-seo-structured-data-schema"),
1099
- 'type' => 'text',
1100
- 'class' => 'kcseo-date',
1101
- 'desc' => __("Like this: 2021-12-25 14:20:00", "wp-seo-structured-data-schema")
1102
- ),
1103
- 'ratingValue' => array(
1104
- 'title' => __('Rating value', "wp-seo-structured-data-schema"),
1105
- 'type' => 'number',
1106
- 'attr' => 'step="any"',
1107
- 'desc' => __("A numerical quality rating for the item.", "wp-seo-structured-data-schema")
1108
- ),
1109
- 'bestRating' => array(
1110
- 'title' => __('Best rating', "wp-seo-structured-data-schema"),
1111
- 'type' => 'number',
1112
- 'attr' => 'step="any"',
1113
- 'desc' => __("The highest value allowed in this rating system.", "wp-seo-structured-data-schema")
1114
- ),
1115
- 'worstRating' => array(
1116
- 'title' => __('Worst rating', "wp-seo-structured-data-schema"),
1117
- 'type' => 'number',
1118
- 'attr' => 'step="any"',
1119
- '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")
1120
- ),
1121
- 'publisher' => array(
1122
- 'title' => __('Name of the organization', "wp-seo-structured-data-schema"),
1123
- 'type' => 'text',
1124
- 'desc' => __('The publisher of the review.', "wp-seo-structured-data-schema")
1125
- )
1126
- )
1127
- ),
1128
- 'aggregate_rating' => array(
1129
- 'pro' => false,
1130
- 'title' => __('Aggregate Ratings', "wp-seo-structured-data-schema"),
1131
- 'fields' => array(
1132
- 'active' => array(
1133
- 'type' => 'checkbox'
1134
- ),
1135
- 'schema_type' => array(
1136
- 'title' => __('Schema type', "wp-seo-structured-data-schema"),
1137
- 'type' => 'schema_type',
1138
- 'required' => true,
1139
- 'options' => self::getSiteTypes(),
1140
- 'empty' => "Select one",
1141
- 'desc' => __("Use the most appropriate schema type for what is being reviewed.", "wp-seo-structured-data-schema")
1142
- ),
1143
- 'name' => array(
1144
- 'title' => __('Name of the item', "wp-seo-structured-data-schema"),
1145
- 'type' => 'text',
1146
- 'required' => true,
1147
- 'desc' => __("The item that is being rated.", "wp-seo-structured-data-schema")
1148
- ),
1149
- 'image' => array(
1150
- 'title' => 'Image',
1151
- 'type' => 'image',
1152
- 'required' => true,
1153
- 'holderClass' => 'kSeo-hidden aggregate-except-organization-holder'
1154
- ),
1155
- 'priceRange' => array(
1156
- 'title' => 'Price Range',
1157
- 'recommended' => true,
1158
- 'type' => 'text',
1159
- 'holderClass' => 'kSeo-hidden aggregate-except-organization-holder',
1160
- 'desc' => __("The price range of the business, for example $$$.", "wp-seo-structured-data-schema")
1161
- ),
1162
- 'telephone' => array(
1163
- 'title' => 'Telephone',
1164
- 'recommended' => true,
1165
- 'type' => 'text',
1166
- 'holderClass' => 'kSeo-hidden aggregate-except-organization-holder'
1167
- ),
1168
- 'address' => array(
1169
- 'title' => 'Address',
1170
- 'recommended' => true,
1171
- 'type' => 'text',
1172
- 'holderClass' => 'kSeo-hidden aggregate-except-organization-holder',
1173
- ),
1174
- 'description' => array(
1175
- 'title' => __('Description', "wp-seo-structured-data-schema"),
1176
- 'type' => 'textarea',
1177
- 'desc' => __("Description for thr review. New line is not supported.", "wp-seo-structured-data-schema")
1178
- ),
1179
- 'ratingCount' => array(
1180
- 'title' => __('Rating Count', "wp-seo-structured-data-schema"),
1181
- 'type' => 'number',
1182
- 'attr' => 'step="any"',
1183
- 'required' => true,
1184
- '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")
1185
- ),
1186
- 'reviewCount' => array(
1187
- 'title' => __('Review Count', "wp-seo-structured-data-schema"),
1188
- 'type' => 'number',
1189
- 'attr' => 'step="any"',
1190
- 'required' => true,
1191
- '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")
1192
- ),
1193
- 'ratingValue' => array(
1194
- 'title' => __('Rating Value', "wp-seo-structured-data-schema"),
1195
- 'attr' => 'step="any"',
1196
- 'type' => 'number',
1197
- 'required' => true,
1198
- 'desc' => __("A numerical quality rating for the item.", "wp-seo-structured-data-schema")
1199
- ),
1200
- 'bestRating' => array(
1201
- 'title' => __('Best Rating', "wp-seo-structured-data-schema"),
1202
- 'type' => 'number',
1203
- 'attr' => 'step="any"',
1204
- 'required' => true,
1205
- '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")
1206
- ),
1207
- 'worstRating' => array(
1208
- 'title' => __('Worst Rating', "wp-seo-structured-data-schema"),
1209
- 'type' => 'number',
1210
- 'attr' => 'step="any"',
1211
- 'required' => true,
1212
- '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")
1213
- )
1214
- )
1215
- ),
1216
- 'restaurant' => array(
1217
- 'pro' => false,
1218
- 'title' => __('Restaurant', "wp-seo-structured-data-schema"),
1219
- 'fields' => array(
1220
- 'active' => array(
1221
- 'type' => 'checkbox'
1222
- ),
1223
- 'name' => array(
1224
- 'title' => __('Name of the Restaurant', "wp-seo-structured-data-schema"),
1225
- 'type' => 'text',
1226
- 'required' => true
1227
- ),
1228
- 'description' => array(
1229
- 'title' => __('Description of the Restaurant', "wp-seo-structured-data-schema"),
1230
- 'type' => 'textarea',
1231
- 'desc' => esc_html__('New line is not supported.', "wp-seo-structured-data-schema")
1232
- ),
1233
- 'openingHours' => array(
1234
- 'title' => __('Opening Hours', "wp-seo-structured-data-schema"),
1235
- 'type' => 'textarea',
1236
- 'desc' => __('Mo,Tu,We,Th,Fr,Sa,Su 11:30-23:00', "wp-seo-structured-data-schema")
1237
- ),
1238
- 'telephone' => array(
1239
- 'title' => __('Telephone', "wp-seo-structured-data-schema"),
1240
- 'type' => 'text',
1241
- 'desc' => __('+155501003333', "wp-seo-structured-data-schema")
1242
- ),
1243
- 'menu' => array(
1244
- 'title' => __('Menu', "wp-seo-structured-data-schema"),
1245
- 'type' => 'text',
1246
- 'desc' => __('http://example.com/menu', "wp-seo-structured-data-schema")
1247
- ),
1248
- 'image' => array(
1249
- 'title' => __('Image', "wp-seo-structured-data-schema"),
1250
- 'type' => 'image',
1251
- 'required' => true
1252
- ),
1253
- 'address' => array(
1254
- 'title' => __('Address', "wp-seo-structured-data-schema"),
1255
- 'type' => 'textarea'
1256
- ),
1257
- 'priceRange' => array(
1258
- 'title' => __('Price Range', "wp-seo-structured-data-schema"),
1259
- 'type' => 'text',
1260
- 'desc' => __('The price range of the business, for example $$$', "wp-seo-structured-data-schema")
1261
- ),
1262
- 'servesCuisine' => array(
1263
- 'title' => __('Serves Cuisine', "wp-seo-structured-data-schema"),
1264
- 'type' => 'text',
1265
- 'desc' => __('The cuisine of the restaurant.', "wp-seo-structured-data-schema")
1266
- )
1267
- )
1268
- ),
1269
- 'localBusiness' => array(
1270
- 'pro' => false,
1271
- 'title' => __('Local Business', "wp-seo-structured-data-schema"),
1272
- 'fields' => array(
1273
- 'active' => array(
1274
- 'type' => 'checkbox'
1275
- ),
1276
- 'name' => array(
1277
- 'title' => __('Name', "wp-seo-structured-data-schema"),
1278
- 'type' => 'text',
1279
- 'required' => true
1280
- ),
1281
- 'description' => array(
1282
- 'title' => __('Description', "wp-seo-structured-data-schema"),
1283
- 'type' => 'textarea',
1284
- 'desc' => esc_html__('New line is not supported.', "wp-seo-structured-data-schema")
1285
- ),
1286
- 'image' => array(
1287
- 'title' => __('Business Logo', "wp-seo-structured-data-schema"),
1288
- 'type' => 'image',
1289
- 'required' => true
1290
- ),
1291
- 'priceRange' => array(
1292
- 'title' => __('Price Range', "wp-seo-structured-data-schema"),
1293
- 'type' => 'text',
1294
- 'recommended' => true,
1295
- 'desc' => __("The price range of the business, for example $$$.", "wp-seo-structured-data-schema")
1296
- ),
1297
- 'addressLocality' => array(
1298
- 'title' => __('Address locality', "wp-seo-structured-data-schema"),
1299
- 'type' => 'text',
1300
- 'desc' => __('City (i.e Kansas city)', "wp-seo-structured-data-schema")
1301
- ),
1302
- 'addressRegion' => array(
1303
- 'title' => __('Address region', "wp-seo-structured-data-schema"),
1304
- 'type' => 'text',
1305
- 'desc' => __('State (i.e. MO)', "wp-seo-structured-data-schema")
1306
- ),
1307
- 'postalCode' => array(
1308
- 'title' => __('Postal code', "wp-seo-structured-data-schema"),
1309
- 'type' => 'text',
1310
- ),
1311
- 'streetAddress' => array(
1312
- 'title' => __('Street address', "wp-seo-structured-data-schema"),
1313
- 'type' => 'text',
1314
- ),
1315
- 'telephone' => array(
1316
- 'title' => __('Telephone', "wp-seo-structured-data-schema"),
1317
- 'type' => 'text',
1318
- 'recommended' => true,
1319
- ),
1320
- 'review_section' => array(
1321
- 'title' => __('Review', "wp-seo-structured-data-schema"),
1322
- 'type' => 'heading',
1323
- 'desc' => __("To add review schema for this type, complete fields below and enable, others live blank.", "wp-seo-structured-data-schema")
1324
- ),
1325
- 'review_active' => array(
1326
- 'type' => 'checkbox'
1327
- ),
1328
- 'review_author' => array(
1329
- 'title' => __("Author", "wp-seo-structured-data-schema"),
1330
- 'type' => 'text',
1331
- 'required' => true
1332
- ),
1333
- 'review_author_sameAs' => array(
1334
- 'title' => __("Author Same As profile link", "wp-seo-structured-data-schema"),
1335
- 'type' => 'textarea',
1336
- 'attr' => 'placeholder="https://facebook.com/example&#10;https://twitter.com/example"',
1337
- 'required' => true,
1338
- '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")
1339
- ),
1340
- 'review_body' => array(
1341
- 'title' => __('Review body', "wp-seo-structured-data-schema"),
1342
- 'type' => 'textarea',
1343
- 'required' => true,
1344
- 'desc' => __("The actual body of the review.", "wp-seo-structured-data-schema")
1345
- ),
1346
- 'review_datePublished' => array(
1347
- 'title' => __('Date of Published', "wp-seo-structured-data-schema"),
1348
- 'type' => 'text',
1349
- 'class' => 'kcseo-date',
1350
- 'desc' => __("Like this: 2021-12-25 14:20:00", "wp-seo-structured-data-schema")
1351
- ),
1352
- 'review_ratingValue' => array(
1353
- 'title' => __('Rating value', "wp-seo-structured-data-schema"),
1354
- 'type' => 'number',
1355
- 'attr' => 'step="any"',
1356
- 'desc' => __("A numerical quality rating for the item.", "wp-seo-structured-data-schema")
1357
- ),
1358
- 'review_bestRating' => array(
1359
- 'title' => __('Best rating', "wp-seo-structured-data-schema"),
1360
- 'type' => 'number',
1361
- 'attr' => 'step="any"',
1362
- 'desc' => __("The highest value allowed in this rating system.", "wp-seo-structured-data-schema")
1363
- ),
1364
- 'review_worstRating' => array(
1365
- 'title' => __('Worst rating', "wp-seo-structured-data-schema"),
1366
- 'type' => 'number',
1367
- 'attr' => 'step="any"',
1368
- '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")
1369
- )
1370
- )
1371
- ),
1372
- 'book' => array(
1373
- 'pro' => true,
1374
- 'title' => __("Book", "wp-seo-structured-data-schema"),
1375
- ),
1376
- 'course' => array(
1377
- 'pro' => true,
1378
- 'title' => __("Course", "wp-seo-structured-data-schema"),
1379
- ),
1380
- 'JobPosting' => array(
1381
- 'pro' => true,
1382
- 'title' => __("Job Posting", "wp-seo-structured-data-schema"),
1383
- ),
1384
- 'movie' => array(
1385
- 'pro' => true,
1386
- 'title' => __("Movie", "wp-seo-structured-data-schema"),
1387
- ),
1388
- 'music' => array(
1389
- 'pro' => true,
1390
- 'title' => __("Music", "wp-seo-structured-data-schema"),
1391
- ),
1392
- 'recipe' => array(
1393
- 'pro' => true,
1394
- 'title' => __("Recipe", "wp-seo-structured-data-schema"),
1395
- ),
1396
- 'TVEpisode' => array(
1397
- 'pro' => true,
1398
- 'title' => __("TVEpisode", "wp-seo-structured-data-schema"),
1399
- ),
1400
- 'question' => array(
1401
- 'pro' => true,
1402
- 'title' => __("QAPage", "wp-seo-structured-data-schema"),
1403
- ),
1404
- 'itemList' => array(
1405
- 'pro' => true,
1406
- 'title' => __("Item List", "wp-seo-structured-data-schema"),
1407
- ),
1408
- 'specialAnnouncement' => [
1409
- 'title' => __('Special Announcement', "wp-seo-structured-data-schema"),
1410
- 'fields' => [
1411
- 'active' => [
1412
- 'type' => 'checkbox'
1413
- ],
1414
- 'name' => [
1415
- 'title' => __('Name', "wp-seo-structured-data-schema"),
1416
- 'type' => 'text',
1417
- 'desc' => __('SpecialAnnouncement.name: Name of the announcement. This text should be present on the underlying page.', "wp-seo-structured-data-schema"),
1418
- 'required' => true
1419
- ],
1420
- 'url' => [
1421
- 'title' => __('Page URL', "wp-seo-structured-data-schema"),
1422
- 'type' => 'url',
1423
- '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"),
1424
- 'required' => true
1425
- ],
1426
- 'datePublished' => [
1427
- 'title' => __('Published date', "wp-seo-structured-data-schema"),
1428
- 'type' => 'text',
1429
- 'class' => 'kcseo-date',
1430
- 'desc' => __('Like this: 2021-12-25 14:20:00', "wp-seo-structured-data-schema"),
1431
- 'required' => true
1432
- ],
1433
- 'expires' => [
1434
- 'title' => __('Expires date', "wp-seo-structured-data-schema"),
1435
- 'type' => 'text',
1436
- 'class' => 'kcseo-date',
1437
- 'desc' => __('Like this: 2021-12-25 14:20:00', "wp-seo-structured-data-schema"),
1438
- 'recommended' => true,
1439
- ],
1440
- 'text' => [
1441
- 'title' => __('Text', "wp-seo-structured-data-schema"),
1442
- 'type' => 'textarea',
1443
- 'desc' => __('SpecialAnnouncement.text: Text of the announcements.', "wp-seo-structured-data-schema"),
1444
- 'required' => true
1445
- ],
1446
- 'locations' => [
1447
- 'title' => __('Announcement Locations', "wp-seo-structured-data-schema"),
1448
- 'type' => 'group',
1449
- 'duplicate' => true,
1450
- 'fields' => [
1451
- 'location_heading' => [
1452
- 'type' => 'heading',
1453
- 'title' => __('Announcement Location', "wp-seo-structured-data-schema")
1454
- ],
1455
- 'type' => [
1456
- 'title' => __('Type', "wp-seo-structured-data-schema"),
1457
- 'type' => 'select',
1458
- 'options' => self::announcementLocationTypes(),
1459
- 'required' => true
1460
- ],
1461
- 'name' => [
1462
- 'title' => __('Name', "wp-seo-structured-data-schema"),
1463
- 'type' => 'text',
1464
- 'desc' => __("SpecialAnnouncement.announcementLocation.name: ", "wp-seo-structured-data-schema"),
1465
- 'recommended' => true,
1466
- ],
1467
- 'url' => [
1468
- 'title' => __('URL', "wp-seo-structured-data-schema"),
1469
- 'type' => 'url',
1470
- 'recommended' => true,
1471
- 'desc' => __("SpecialAnnouncement.announcementLocation.url: URL", "wp-seo-structured-data-schema")
1472
- ],
1473
- 'address_street' => [
1474
- 'title' => __('Address: Street', "wp-seo-structured-data-schema"),
1475
- 'type' => 'text',
1476
- 'desc' => __('SpecialAnnouncement.announcementLocation.address.streetAddress: The street address. For example, 1600 Amphitheatre Pkwy.', "wp-seo-structured-data-schema"),
1477
- 'recommended' => true,
1478
- ],
1479
- 'address_locality' => [
1480
- 'title' => __('Address: Locality', "wp-seo-structured-data-schema"),
1481
- 'type' => 'text',
1482
- '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"),
1483
- 'recommended' => true,
1484
- ],
1485
- 'address_post_code' => [
1486
- 'title' => __('Address: Post Code', "wp-seo-structured-data-schema"),
1487
- 'type' => 'text',
1488
- 'desc' => __('SpecialAnnouncement.announcementLocation.address.postalCode: The postal code. For example, 94043.', "wp-seo-structured-data-schema"),
1489
- 'recommended' => true,
1490
- ],
1491
- 'address_region' => [
1492
- 'title' => __('Address: Region', "wp-seo-structured-data-schema"),
1493
- 'type' => 'text',
1494
- '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"),
1495
- 'recommended' => true,
1496
- ],
1497
- 'address_country' => [
1498
- 'title' => __('Address: Country', "wp-seo-structured-data-schema"),
1499
- 'type' => 'text',
1500
- '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"),
1501
- 'recommended' => true,
1502
- ],
1503
- 'id' => [
1504
- 'title' => __('ID', "wp-seo-structured-data-schema"),
1505
- 'type' => 'text',
1506
- '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"),
1507
- ],
1508
- 'image' => array(
1509
- 'title' => __('Image', "wp-seo-structured-data-schema"),
1510
- 'type' => 'image'
1511
- ),
1512
- 'priceRange' => array(
1513
- 'title' => 'Price Range (Recommended)',
1514
- 'type' => 'text',
1515
- 'recommended' => true,
1516
- 'desc' => __("The price range of the business, for example $$$.", "wp-seo-structured-data-schema")
1517
- ),
1518
- 'telephone' => array(
1519
- 'title' => 'Telephone (Recommended)',
1520
- 'type' => 'text',
1521
- 'recommended' => true
1522
- )
1523
- ]
1524
- ],
1525
- ]
1526
- ]
1527
- );
1528
-
1529
- return apply_filters('kcseo_schema_types', $schemas);
1530
- }
1531
-
1532
- static function getSiteTypes() {
1533
- $siteTypes = array(
1534
- 'Organization',
1535
- 'LocalBusiness' => array(
1536
- 'AnimalShelter',
1537
- 'AutomotiveBusiness' => array(
1538
- 'AutoBodyShop',
1539
- 'AutoDealer',
1540
- 'AutoPartsStore',
1541
- 'AutoRental',
1542
- 'AutoRepair',
1543
- 'AutoWash',
1544
- 'GasStation',
1545
- 'MotorcycleDealer',
1546
- 'MotorcycleRepair'
1547
- ),
1548
- 'ChildCare',
1549
- 'DryCleaningOrLaundry',
1550
- 'EmergencyService',
1551
- 'EmploymentAgency',
1552
- 'EntertainmentBusiness' => array(
1553
- 'AdultEntertainment',
1554
- 'AmusementPark',
1555
- 'ArtGallery',
1556
- 'Casino',
1557
- 'ComedyClub',
1558
- 'MovieTheater',
1559
- 'NightClub',
1560
-
1561
- ),
1562
- 'FinancialService' => array(
1563
- 'AccountingService',
1564
- 'AutomatedTeller',
1565
- 'BankOrCreditUnion',
1566
- 'InsuranceAgency',
1567
- ),
1568
- 'FoodEstablishment' => array(
1569
- 'Bakery',
1570
- 'BarOrPub',
1571
- 'Brewery',
1572
- 'CafeOrCoffeeShop',
1573
- 'FastFoodRestaurant',
1574
- 'IceCreamShop',
1575
- 'Restaurant',
1576
- 'Winery',
1577
- ),
1578
- 'GovernmentOffice',
1579
- 'HealthAndBeautyBusiness' => array(
1580
- 'BeautySalon',
1581
- 'DaySpa',
1582
- 'HairSalon',
1583
- 'HealthClub',
1584
- 'NailSalon',
1585
- 'TattooParlor',
1586
- ),
1587
- 'HomeAndConstructionBusiness' => array(
1588
- 'Electrician',
1589
- 'GeneralContractor',
1590
- 'HVACBusiness',
1591
- 'HousePainter',
1592
- 'Locksmith',
1593
- 'MovingCompany',
1594
- 'Plumber',
1595
- 'RoofingContractor',
1596
- ),
1597
- 'InternetCafe',
1598
- 'LegalService' => array(
1599
- 'Attorney',
1600
- 'Notary',
1601
- ),
1602
- 'Library',
1603
- 'MedicalBusiness' => array(
1604
- 'CommunityHealth',
1605
- 'Dentist',
1606
- 'Dermatology',
1607
- 'DietNutrition',
1608
- 'Emergency',
1609
- 'Geriatric',
1610
- 'Gynecologic',
1611
- 'MedicalClinic',
1612
- 'Midwifery',
1613
- 'Nursing',
1614
- 'Obstetric',
1615
- 'Oncologic',
1616
- 'Optician',
1617
- 'Optometric',
1618
- 'Otolaryngologic',
1619
- 'Pediatric',
1620
- 'Pharmacy',
1621
- 'Physician',
1622
- 'Physiotherapy',
1623
- 'PlasticSurgery',
1624
- 'Podiatric',
1625
- 'PrimaryCare',
1626
- 'Psychiatric',
1627
- 'PublicHealth',
1628
- ),
1629
- 'LodgingBusiness' => array(
1630
- 'BedAndBreakfast',
1631
- 'Campground',
1632
- 'Hostel',
1633
- 'Hotel',
1634
- 'Motel',
1635
- 'Resort',
1636
- ),
1637
- 'ProfessionalService',
1638
- 'RadioStation',
1639
- 'RealEstateAgent',
1640
- 'RecyclingCenter',
1641
- 'SelfStorage',
1642
- 'ShoppingCenter',
1643
- 'SportsActivityLocation' => array(
1644
- 'BowlingAlley',
1645
- 'ExerciseGym',
1646
- 'GolfCourse',
1647
- 'HealthClub',
1648
- 'PublicSwimmingPool',
1649
- 'SkiResort',
1650
- 'SportsClub',
1651
- 'StadiumOrArena',
1652
- 'TennisComplex',
1653
- ),
1654
- 'Store' => array(
1655
- 'AutoPartsStore',
1656
- 'BikeStore',
1657
- 'BookStore',
1658
- 'ClothingStore',
1659
- 'ComputerStore',
1660
- 'ConvenienceStore',
1661
- 'DepartmentStore',
1662
- 'ElectronicsStore',
1663
- 'Florist',
1664
- 'FurnitureStore',
1665
- 'GardenStore',
1666
- 'GroceryStore',
1667
- 'HardwareStore',
1668
- 'HobbyShop',
1669
- 'HomeGoodsStore',
1670
- 'JewelryStore',
1671
- 'LiquorStore',
1672
- 'MensClothingStore',
1673
- 'MobilePhoneStore',
1674
- 'MovieRentalStore',
1675
- 'MusicStore',
1676
- 'OfficeEquipmentStore',
1677
- 'OutletStore',
1678
- 'PawnShop',
1679
- 'PetStore',
1680
- 'ShoeStore',
1681
- 'SportingGoodsStore',
1682
- 'TireShop',
1683
- 'ToyStore',
1684
- 'WholesaleStore'
1685
- ),
1686
- 'TelevisionStation',
1687
- 'TouristInformationCenter',
1688
- 'TravelAgency'
1689
- ),
1690
- 'NGO' => array(),
1691
- );
1692
-
1693
- return apply_filters('kcseo_site_types', $siteTypes);
1694
- }
1695
-
1696
- static function getCountryList() {
1697
- $countryList = array(
1698
- "AF" => "Afghanistan",
1699
- "AX" => "Aland Islands",
1700
- "AL" => "Albania",
1701
- "DZ" => "Algeria",
1702
- "AS" => "American Samoa",
1703
- "AD" => "Andorra",
1704
- "AO" => "Angola",
1705
- "AI" => "Anguilla",
1706
- "AQ" => "Antarctica",
1707
- "AG" => "Antigua and Barbuda",
1708
- "AR" => "Argentina",
1709
- "AM" => "Armenia",
1710
- "AW" => "Aruba",
1711
- "AU" => "Australia",
1712
- "AT" => "Austria",
1713
- "AZ" => "Azerbaijan",
1714
- "BS" => "Bahamas",
1715
- "BH" => "Bahrain",
1716
- "BD" => "Bangladesh",
1717
- "BB" => "Barbados",
1718
- "BY" => "Belarus",
1719
- "BE" => "Belgium",
1720
- "BZ" => "Belize",
1721
- "BJ" => "Benin",
1722
- "BM" => "Bermuda",
1723
- "BT" => "Bhutan",
1724
- "BO" => "Bolivia, Plurinational State of",
1725
- "BQ" => "Bonaire, Sint Eustatius and Saba",
1726
- "BA" => "Bosnia and Herzegovina",
1727
- "BW" => "Botswana",
1728
- "BV" => "Bouvet Island",
1729
- "BR" => "Brazil",
1730
- "IO" => "British Indian Ocean Territory",
1731
- "BN" => "Brunei Darussalam",
1732
- "BG" => "Bulgaria",
1733
- "BF" => "Burkina Faso",
1734
- "BI" => "Burundi",
1735
- "KH" => "Cambodia",
1736
- "CM" => "Cameroon",
1737
- "CA" => "Canada",
1738
- "CV" => "Cape Verde",
1739
- "KY" => "Cayman Islands",
1740
- "CF" => "Central African Republic",
1741
- "TD" => "Chad",
1742
- "CL" => "Chile",
1743
- "CN" => "China",
1744
- "CX" => "Christmas Island",
1745
- "CC" => "Cocos (Keeling) Islands",
1746
- "CO" => "Colombia",
1747
- "KM" => "Comoros",
1748
- "CG" => "Congo",
1749
- "CD" => "Congo, the Democratic Republic of the",
1750
- "CK" => "Cook Islands",
1751
- "CR" => "Costa Rica",
1752
- "CI" => "Côte d Ivoire",
1753
- "HR" => "Croatia",
1754
- "CU" => "Cuba",
1755
- "CW" => "Curaçao",
1756
- "CY" => "Cyprus",
1757
- "CZ" => "Czech Republic",
1758
- "DK" => "Denmark",
1759
- "DJ" => "Djibouti",
1760
- "DM" => "Dominica",
1761
- "DO" => "Dominican Republic",
1762
- "EC" => "Ecuador",
1763
- "EG" => "Egypt",
1764
- "SV" => "El Salvador",
1765
- "GQ" => "Equatorial Guinea",
1766
- "ER" => "Eritrea",
1767
- "EE" => "Estonia",
1768
- "ET" => "Ethiopia",
1769
- "FK" => "Falkland Islands (Malvinas)",
1770
- "FO" => "Faroe Islands",
1771
- "FJ" => "Fiji",
1772
- "FI" => "Finland",
1773
- "FR" => "France",
1774
- "GF" => "French Guiana",
1775
- "PF" => "French Polynesia",
1776
- "TF" => "French Southern Territories",
1777
- "GA" => "Gabon",
1778
- "GM" => "Gambia",
1779
- "GE" => "Georgia",
1780
- "DE" => "Germany",
1781
- "GH" => "Ghana",
1782
- "GI" => "Gibraltar",
1783
- "GR" => "Greece",
1784
- "GL" => "Greenland",
1785
- "GD" => "Grenada",
1786
- "GP" => "Guadeloupe",
1787
- "GU" => "Guam",
1788
- "GT" => "Guatemala",
1789
- "GG" => "Guernsey",
1790
- "GN" => "Guinea",
1791
- "GW" => "Guinea-Bissau",
1792
- "GY" => "Guyana",
1793
- "HT" => "Haiti",
1794
- "HM" => "Heard Island and McDonald Islands",
1795
- "VA" => "Holy See (Vatican City State)",
1796
- "HN" => "Honduras",
1797
- "HK" => "Hong Kong",
1798
- "HU" => "Hungary",
1799
- "IS" => "Iceland",
1800
- "IN" => "India",
1801
- "ID" => "Indonesia",
1802
- "IR" => "Iran, Islamic Republic of",
1803
- "IQ" => "Iraq",
1804
- "IE" => "Ireland",
1805
- "IM" => "Isle of Man",
1806
- "IL" => "Israel",
1807
- "IT" => "Italy",
1808
- "JM" => "Jamaica",
1809
- "JP" => "Japan",
1810
- "JE" => "Jersey",
1811
- "JO" => "Jordan",
1812
- "KZ" => "Kazakhstan",
1813
- "KE" => "Kenya",
1814
- "KI" => "Kiribati",
1815
- "KP" => "Korea, Democratic People's Republic of",
1816
- "KR" => "Korea, Republic of,",
1817
- "KW" => "Kuwait",
1818
- "KG" => "Kyrgyzstan",
1819
- "LA" => "Lao Peoples Democratic Republic",
1820
- "LV" => "Latvia",
1821
- "LB" => "Lebanon",
1822
- "LS" => "Lesotho",
1823
- "LR" => "Liberia",
1824
- "LY" => "Libya",
1825
- "LI" => "Liechtenstein",
1826
- "LT" => "Lithuania",
1827
- "LU" => "Luxembourg",
1828
- "MO" => "Macao",
1829
- "MK" => "Macedonia, the former Yugoslav Republic of",
1830
- "MG" => "Madagascar",
1831
- "MW" => "Malawi",
1832
- "MY" => "Malaysia",
1833
- "MV" => "Maldives",
1834
- "ML" => "Mali",
1835
- "MT" => "Malta",
1836
- "MH" => "Marshall Islands",
1837
- "MQ" => "Martinique",
1838
- "MR" => "Mauritania",
1839
- "MU" => "Mauritius",
1840
- "YT" => "Mayotte",
1841
- "MX" => "Mexico",
1842
- "FM" => "Micronesia, Federated States of",
1843
- "MD" => "Moldova, Republic of",
1844
- "MC" => "Monaco",
1845
- "MN" => "Mongolia",
1846
- "ME" => "Montenegro",
1847
- "MS" => "Montserrat",
1848
- "MA" => "Morocco",
1849
- "MZ" => "Mozambique",
1850
- "MM" => "Myanmar",
1851
- "NA" => "Namibia",
1852
- "NR" => "Nauru",
1853
- "NP" => "Nepal",
1854
- "NL" => "Netherlands",
1855
- "NC" => "New Caledonia",
1856
- "NZ" => "New Zealand",
1857
- "NI" => "Nicaragua",
1858
- "NE" => "Niger",
1859
- "NG" => "Nigeria",
1860
- "NU" => "Niue",
1861
- "NF" => "Norfolk Island",
1862
- "MP" => "Northern Mariana Islands",
1863
- "NO" => "Norway",
1864
- "OM" => "Oman",
1865
- "PK" => "Pakistan",
1866
- "PW" => "Palau",
1867
- "PS" => "Palestine, State of",
1868
- "PA" => "Panama",
1869
- "PG" => "Papua New Guinea",
1870
- "PY" => "Paraguay",
1871
- "PE" => "Peru",
1872
- "PH" => "Philippines",
1873
- "PN" => "Pitcairn",
1874
- "PL" => "Poland",
1875
- "PT" => "Portugal",
1876
- "PR" => "Puerto Rico",
1877
- "QA" => "Qatar",
1878
- "RE" => "Reunion",
1879
- "RO" => "Romania",
1880
- "RU" => "Russian Federation",
1881
- "RW" => "Rwanda",
1882
- "BL" => "Saint Barthélemy",
1883
- "SH" => "Saint Helena, Ascension and Tristan da Cunha",
1884
- "KN" => "Saint Kitts and Nevis",
1885
- "LC" => "Saint Lucia",
1886
- "MF" => "Saint Martin (French part)",
1887
- "PM" => "Saint Pierre and Miquelon",
1888
- "VC" => "Saint Vincent and the Grenadines",
1889
- "WS" => "Samoa",
1890
- "SM" => "San Marino",
1891
- "ST" => "Sao Tome and Principe",
1892
- "SA" => "Saudi Arabia",
1893
- "SN" => "Senegal",
1894
- "RS" => "Serbia",
1895
- "SC" => "Seychelles",
1896
- "SL" => "Sierra Leone",
1897
- "SG" => "Singapore",
1898
- "SX" => "Sint Maarten (Dutch part)",
1899
- "SK" => "Slovakia",
1900
- "SI" => "Slovenia",
1901
- "SB" => "Solomon Islands",
1902
- "SO" => "Somalia",
1903
- "ZA" => "South Africa",
1904
- "GS" => "South Georgia and the South Sandwich Islands",
1905
- "SS" => "South Sudan",
1906
- "ES" => "Spain",
1907
- "LK" => "Sri Lanka",
1908
- "SD" => "Sudan",
1909
- "SR" => "Suriname",
1910
- "SJ" => "Svalbard and Jan Mayen",
1911
- "SZ" => "Swaziland",
1912
- "SE" => "Sweden",
1913
- "CH" => "Switzerland",
1914
- "SY" => "Syrian Arab Republic",
1915
- "TW" => "Taiwan, Province of China",
1916
- "TJ" => "Tajikistan",
1917
- "TZ" => "Tanzania, United Republic of",
1918
- "TH" => "Thailand",
1919
- "TL" => "Timor-Leste",
1920
- "TG" => "Togo",
1921
- "TK" => "Tokelau",
1922
- "TO" => "Tonga",
1923
- "TT" => "Trinidad and Tobago",
1924
- "TN" => "Tunisia",
1925
- "TR" => "Turkey",
1926
- "TM" => "Turkmenistan",
1927
- "TC" => "Turks and Caicos Islands",
1928
- "TV" => "Tuvalu",
1929
- "UG" => "Uganda",
1930
- "UA" => "Ukraine",
1931
- "AE" => "United Arab Emirates",
1932
- "GB" => "United Kingdom",
1933
- "US" => "United States",
1934
- "UM" => "United States Minor Outlying Islands",
1935
- "UY" => "Uruguay",
1936
- "UZ" => "Uzbekistan",
1937
- "VU" => "Vanuatu",
1938
- "VE" => "Venezuela, Bolivarian Republic of",
1939
- "VN" => "Viet Nam",
1940
- "VG" => "Virgin Islands, British",
1941
- "VI" => "Virgin Islands, U.S.",
1942
- "WF" => "Wallis and Futuna",
1943
- "EH" => "Western Sahara",
1944
- "YE" => "Yemen",
1945
- "ZM" => "Zambia",
1946
- "ZW" => "Zimbabwe",
1947
- );
1948
-
1949
- return apply_filters('kcseo_country_list', $countryList);
1950
- }
1951
-
1952
- static function getContactTypes() {
1953
- $contact_types = array(
1954
- "customer service",
1955
- "customer support",
1956
- "technical support",
1957
- "billing support",
1958
- "bill payment",
1959
- "sales",
1960
- "reservations",
1961
- "credit card support",
1962
- "emergency",
1963
- "baggage tracking",
1964
- "roadside assistance",
1965
- "package tracking"
1966
- );
1967
-
1968
- return apply_filters('kcseo_contact_types', $contact_types);
1969
- }
1970
-
1971
- static function getLanguageList() {
1972
- $language_list = array(
1973
- "Akan",
1974
- "Amharic",
1975
- "Arabic",
1976
- "Assamese",
1977
- "Awadhi",
1978
- "Azerbaijani",
1979
- "Balochi",
1980
- "Belarusian",
1981
- "Bengali",
1982
- "Bhojpuri",
1983
- "Burmese",
1984
- "Cantonese",
1985
- "Cebuano",
1986
- "Chewa",
1987
- "Chhattisgarhi",
1988
- "Chittagonian",
1989
- "Czech",
1990
- "Deccan",
1991
- "Dhundhari",
1992
- "Dutch",
1993
- "English",
1994
- "French",
1995
- "Fula",
1996
- "Gan",
1997
- "German",
1998
- "Greek",
1999
- "Gujarati",
2000
- "Haitian Creole",
2001
- "Hakka",
2002
- "Haryanvi",
2003
- "Hausa",
2004
- "Hiligaynon",
2005
- "Hindi / Urdu",
2006
- "Hmong",
2007
- "Hungarian",
2008
- "Igbo",
2009
- "Ilokano",
2010
- "Italian",
2011
- "Japanese",
2012
- "Javanese",
2013
- "Jin",
2014
- "Kannada",
2015
- "Kazakh",
2016
- "Khmer",
2017
- "Kinyarwanda",
2018
- "Kirundi",
2019
- "Konkani",
2020
- "Korean",
2021
- "Kurdish",
2022
- "Madurese",
2023
- "Magahi",
2024
- "Maithili",
2025
- "Malagasy",
2026
- "Malay/Indonesian",
2027
- "Malayalam",
2028
- "Mandarin",
2029
- "Marathi",
2030
- "Marwari",
2031
- "Min Bei",
2032
- "Min Dong",
2033
- "Min Nan",
2034
- "Mossi",
2035
- "Nepali",
2036
- "Oriya",
2037
- "Oromo",
2038
- "Pashto",
2039
- "Persian",
2040
- "Polish",
2041
- "Portuguese",
2042
- "Punjabi",
2043
- "Quechua",
2044
- "Romanian",
2045
- "Russian",
2046
- "Saraiki",
2047
- "Serbo-Croatian",
2048
- "Shona",
2049
- "Sindhi",
2050
- "Sinhalese",
2051
- "Somali",
2052
- "Spanish",
2053
- "Sundanese",
2054
- "Swahili",
2055
- "Swedish",
2056
- "Sylheti",
2057
- "Tagalog",
2058
- "Tamil",
2059
- "Telugu",
2060
- "Thai",
2061
- "Turkish",
2062
- "Ukrainian",
2063
- "Uyghur",
2064
- "Uzbek",
2065
- "Vietnamese",
2066
- "Wu",
2067
- "Xhosa",
2068
- "Xiang",
2069
- "Yoruba",
2070
- "Zulu",
2071
- );
2072
-
2073
- return apply_filters('kcseo_language_list', $language_list);
2074
- }
2075
-
2076
- static function getSocialList() {
2077
- $socialList = array(
2078
- 'facebook' => __('Facebook'),
2079
- 'twitter' => __('Twitter'),
2080
- 'google-plus' => __('Google+'),
2081
- 'instagram' => __('Instagram'),
2082
- 'youtube' => __('Youtube'),
2083
- 'linkedin' => __('LinkedIn'),
2084
- 'myspace' => __('Myspace'),
2085
- 'pinterest' => __('Pinterest'),
2086
- 'soundcloud' => __('SoundCloud'),
2087
- 'tumblr' => __('Tumblr'),
2088
- 'wikidata' => __('Wikidata'),
2089
- );
2090
-
2091
- return apply_filters('kcseo_social_list', $socialList);
2092
- }
2093
-
2094
-
2095
- static function announcementLocationTypes() {
2096
- return apply_filters('kcseo_announcement_location_types', [
2097
- 'Airport',
2098
- 'Aquarium',
2099
- 'Beach',
2100
- 'Bridge',
2101
- 'BuddhistTemple',
2102
- 'BusStation',
2103
- 'BusStop',
2104
- 'Campground',
2105
- 'CatholicChurch',
2106
- 'Cemetery',
2107
- 'Church',
2108
- 'CivicStructure',
2109
- 'CityHall',
2110
- 'CollegeOrUniversity',
2111
- 'Courthouse',
2112
- 'CovidTestingFacility',
2113
- 'Crematorium',
2114
- 'DefenceEstablishment',
2115
- 'EducationalOrganization',
2116
- 'ElementarySchool',
2117
- 'Embassy',
2118
- 'EventVenue',
2119
- 'FireStation',
2120
- 'GovernmentBuilding',
2121
- 'HighSchool',
2122
- 'HinduTemple',
2123
- 'Hospital',
2124
- 'LegislativeBuilding',
2125
- 'MiddleSchool',
2126
- 'Mosque',
2127
- 'MovieTheater',
2128
- 'Museum',
2129
- 'MusicVenue',
2130
- 'Park',
2131
- 'ParkingFacility',
2132
- 'PerformingArtsTheater',
2133
- 'PlaceOfWorship',
2134
- 'Playground',
2135
- 'PoliceStation',
2136
- 'Preschool',
2137
- 'RVPark',
2138
- 'School',
2139
- 'StadiumOrArena',
2140
- 'SubwayStation',
2141
- 'Synagogue',
2142
- 'TaxiStand',
2143
- 'TrainStation',
2144
- 'Zoo',
2145
- ]);
2146
- }
2147
-
2148
- static function getReviewNotice() {
2149
- $html = null;
2150
- $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>
2151
- <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>
2152
- <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>
2153
- <span style="display: block;margin: 0 auto;max-width: 800px;">1. Simple uncheck the "enable" tab in this section<br>
2154
- 2. Update the page or post to remove the review schema.<br>
2155
- 3. Then re-add new review schema within the appropriet type tab(i.e. book, course, event, movie, product, recipe, etc)</span>
2156
- <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>';
2157
-
2158
- return $html;
2159
- }
2160
-
 
 
 
 
2161
  }
1
+ <?php
2
+
3
+ class KcSeoOptions
4
+ {
5
+
6
+ static function getSchemaTypes() {
7
+ $author_url = '' ;
8
+ $author = get_userdata( get_current_user_id() );
9
+ if( $author && is_object( $author ) ){
10
+ $author_url = $author->user_url;
11
+ }
12
+ $schemas = array(
13
+ 'article' => array(
14
+ 'pro' => false,
15
+ 'title' => __("Article", "wp-seo-structured-data-schema"),
16
+ 'fields' => array(
17
+ 'active' => array(
18
+ 'type' => 'checkbox'
19
+ ),
20
+ 'headline' => array(
21
+ 'title' => __('Headline', "wp-seo-structured-data-schema"),
22
+ 'type' => 'text',
23
+ 'desc' => __('Article title', "wp-seo-structured-data-schema"),
24
+ 'required' => true
25
+ ),
26
+ 'mainEntityOfPage' => array(
27
+ 'title' => __('Page URL', "wp-seo-structured-data-schema"),
28
+ 'type' => 'url',
29
+ 'desc' => __('The canonical URL of the article page', "wp-seo-structured-data-schema"),
30
+ 'required' => true
31
+ ),
32
+ 'author' => array(
33
+ 'title' => __('Author Name', "wp-seo-structured-data-schema"),
34
+ 'type' => 'text',
35
+ 'desc' => __('Author display name', "wp-seo-structured-data-schema"),
36
+ 'required' => true
37
+ ),
38
+ 'author_url' => array(
39
+ 'title' => __('Author URL', "wp-seo-structured-data-schema"),
40
+ 'type' => 'url',
41
+ 'required' => true,
42
+ 'default' => $author_url,
43
+ ),
44
+ 'image' => array(
45
+ 'title' => __('Article Feature Image', "wp-seo-structured-data-schema"),
46
+ 'type' => 'image',
47
+ 'required' => true,
48
+ 'desc' => __('Images should be at least 696 pixels wide.<br>Images should be in .jpg, .png, or. gif format.', "wp-seo-structured-data-schema")
49
+ ),
50
+ 'datePublished' => array(
51
+ 'title' => __('Published date', "wp-seo-structured-data-schema"),
52
+ 'type' => 'text',
53
+ 'class' => 'kcseo-date',
54
+ 'required' => true,
55
+ 'desc' => __('Like this: 2021-12-25 14:20:00', "wp-seo-structured-data-schema")
56
+ ),
57
+ 'dateModified' => array(
58
+ 'title' => __('Modified date', "wp-seo-structured-data-schema"),
59
+ 'type' => 'text',
60
+ 'class' => 'kcseo-date',
61
+ 'required' => true,
62
+ 'desc' => __('Like this: 2021-12-25 14:20:00', "wp-seo-structured-data-schema")
63
+ ),
64
+ 'publisher' => array(
65
+ 'title' => __('Publisher', "wp-seo-structured-data-schema"),
66
+ 'type' => 'text',
67
+ 'desc' => __('Publisher name or Organization name', "wp-seo-structured-data-schema"),
68
+ 'required' => true
69
+ ),
70
+ 'publisherImage' => array(
71
+ 'title' => __('Publisher Logo', "wp-seo-structured-data-schema"),
72
+ 'type' => 'image',
73
+ '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"),
74
+ 'required' => true
75
+ ),
76
+ 'description' => array(
77
+ 'title' => __('Description', "wp-seo-structured-data-schema"),
78
+ 'type' => 'textarea',
79
+ 'desc' => __('Short description. New line is not supported.', "wp-seo-structured-data-schema")
80
+ ),
81
+ 'articleBody' => array(
82
+ 'title' => __('Article body', "wp-seo-structured-data-schema"),
83
+ 'type' => 'textarea',
84
+ 'desc' => __('Article content', "wp-seo-structured-data-schema")
85
+ ),
86
+ 'alternativeHeadline' => array(
87
+ 'title' => __('Alternative headline', "wp-seo-structured-data-schema"),
88
+ 'type' => 'text',
89
+ 'desc' => __('A secondary headline for the article.', "wp-seo-structured-data-schema")
90
+ ),
91
+ 'video' => [
92
+ 'title' => __('Video', "wp-seo-structured-data-schema"),
93
+ 'type' => 'group',
94
+ 'fields' => [
95
+ 'video_heading' => [
96
+ 'type' => 'heading',
97
+ 'title' => __('Video', "wp-seo-structured-data-schema")
98
+ ],
99
+ 'name' => array(
100
+ 'type' => 'text',
101
+ 'title' => esc_html__('Name', "wp-seo-structured-data-schema"),
102
+ ),
103
+ 'description' => array(
104
+ 'type' => 'textarea',
105
+ 'title' => esc_html__('Description', "wp-seo-structured-data-schema")
106
+ ),
107
+ 'thumbnailUrl' => array(
108
+ 'type' => 'image',
109
+ 'title' => esc_html__('Image', "wp-seo-structured-data-schema")
110
+ ),
111
+ 'contentUrl' => array(
112
+ 'type' => 'url',
113
+ 'title' => esc_html__('Content URL', "wp-seo-structured-data-schema")
114
+ ),
115
+ 'embedUrl' => array(
116
+ 'type' => 'url',
117
+ 'title' => esc_html__('Embed URL', "wp-seo-structured-data-schema"),
118
+ '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')
119
+ ),
120
+ 'uploadDate' => array(
121
+ 'type' => 'text',
122
+ 'title' => esc_html__('Upload date', "wp-seo-structured-data-schema"),
123
+ 'class' => 'rtrs-date',
124
+ 'required' => true,
125
+ 'desc' => esc_html__('Like this: 2021-08-25 14:20:00', "wp-seo-structured-data-schema")
126
+ ),
127
+ 'duration' => array(
128
+ 'type' => 'text',
129
+ 'title' => esc_html__('Duration', "wp-seo-structured-data-schema"),
130
+ 'desc' => esc_html__('Runtime of the movie in ISO 8601 format (for example, "PT2H22M" (142 minutes)).', "wp-seo-structured-data-schema")
131
+ ),
132
+ ]
133
+ ],
134
+ 'audio' => [
135
+ 'title' => __('Audio', "wp-seo-structured-data-schema"),
136
+ 'type' => 'group',
137
+ 'fields' => [
138
+ 'audio_heading' => [
139
+ 'type' => 'heading',
140
+ 'title' => __('Audio', "wp-seo-structured-data-schema")
141
+ ],
142
+ 'name' => array(
143
+ 'type' => 'text',
144
+ 'title' => esc_html__('Name', 'wp-seo-structured-data-schema'),
145
+ 'desc' => esc_html__("The title of the audio", 'wp-seo-structured-data-schema')
146
+ ),
147
+ 'description' => array(
148
+ 'type' => 'textarea',
149
+ 'title' => esc_html__('Description', 'wp-seo-structured-data-schema'),
150
+ 'desc' => esc_html__("The short description of the audio", 'wp-seo-structured-data-schema')
151
+ ),
152
+ 'duration' => array(
153
+ 'type' => 'text',
154
+ 'title' => esc_html__('Duration', 'wp-seo-structured-data-schema'),
155
+ 'desc' => esc_html__("The duration of the audio in ISO 8601 format.(PT1M33S)", 'wp-seo-structured-data-schema')
156
+ ),
157
+ 'contentUrl' => array(
158
+ 'type' => 'url',
159
+ 'title' => esc_html__('Content URL', 'wp-seo-structured-data-schema'),
160
+ 'placeholder' => esc_html__('URL', 'wp-seo-structured-data-schema'),
161
+ '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')
162
+ ),
163
+ 'encodingFormat' => array(
164
+ 'type' => 'text',
165
+ 'title' => esc_html__('Encoding Format', 'wp-seo-structured-data-schema'),
166
+ 'desc' => esc_html__("The encoding format of audio like: 'audio/mpeg'", 'wp-seo-structured-data-schema')
167
+ ),
168
+ ]
169
+ ],
170
+ )
171
+ ),
172
+ 'blog_posting' => array(
173
+ 'pro' => false,
174
+ 'title' => __('Blog Posting', "wp-seo-structured-data-schema"),
175
+ 'fields' => array(
176
+ 'active' => array(
177
+ 'type' => 'checkbox'
178
+ ),
179
+ 'headline' => array(
180
+ 'title' => __('Headline', "wp-seo-structured-data-schema"),
181
+ 'type' => 'text',
182
+ 'desc' => __('Blog posting title', "wp-seo-structured-data-schema"),
183
+ 'required' => true
184
+ ),
185
+ 'mainEntityOfPage' => array(
186
+ 'title' => __('Page URL', "wp-seo-structured-data-schema"),
187
+ 'type' => 'url',
188
+ 'desc' => __('The canonical URL of the article page', "wp-seo-structured-data-schema"),
189
+ 'required' => true
190
+ ),
191
+ 'author' => array(
192
+ 'title' => __('Author name', "wp-seo-structured-data-schema"),
193
+ 'type' => 'text',
194
+ 'desc' => __('Author display name', "wp-seo-structured-data-schema"),
195
+ 'required' => true
196
+ ),
197
+ 'author_url' => array(
198
+ 'title' => __('Author URL', "wp-seo-structured-data-schema"),
199
+ 'type' => 'url',
200
+ 'required' => true,
201
+ 'default' => $author_url
202
+ ),
203
+ 'image' => array(
204
+ 'title' => __('Feature Image', "wp-seo-structured-data-schema"),
205
+ 'type' => 'image',
206
+ '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"),
207
+ 'required' => true
208
+ ),
209
+ 'datePublished' => array(
210
+ 'title' => __('Published 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
+ 'dateModified' => array(
217
+ 'title' => __('Modified date', "wp-seo-structured-data-schema"),
218
+ 'type' => 'text',
219
+ 'class' => 'kcseo-date',
220
+ 'desc' => __('Like this: 2021-12-25 14:20:00', "wp-seo-structured-data-schema"),
221
+ 'required' => true
222
+ ),
223
+ 'publisher' => array(
224
+ 'title' => __('Publisher', "wp-seo-structured-data-schema"),
225
+ 'type' => 'text',
226
+ 'desc' => __('Publisher name or Organization name', "wp-seo-structured-data-schema"),
227
+ 'required' => true
228
+ ),
229
+ 'publisherImage' => array(
230
+ 'title' => __('Publisher Logo', "wp-seo-structured-data-schema"),
231
+ 'type' => 'image',
232
+ '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"),
233
+ 'required' => true
234
+ ),
235
+ 'description' => array(
236
+ 'title' => __('Description', "wp-seo-structured-data-schema"),
237
+ 'type' => 'textarea',
238
+ 'desc' => __('Short description. New line is not supported.', "wp-seo-structured-data-schema")
239
+ ),
240
+ 'articleBody' => array(
241
+ 'title' => __('Article body', "wp-seo-structured-data-schema"),
242
+ 'type' => 'textarea',
243
+ 'desc' => __('Article content', "wp-seo-structured-data-schema")
244
+ ),
245
+ 'video' => [
246
+ 'title' => __('Video', "wp-seo-structured-data-schema"),
247
+ 'type' => 'group',
248
+ 'fields' => [
249
+ 'video_heading' => [
250
+ 'type' => 'heading',
251
+ 'title' => __('Video', "wp-seo-structured-data-schema")
252
+ ],
253
+ 'name' => array(
254
+ 'type' => 'text',
255
+ 'title' => esc_html__('Name', "wp-seo-structured-data-schema"),
256
+ ),
257
+ 'description' => array(
258
+ 'type' => 'textarea',
259
+ 'title' => esc_html__('Description', "wp-seo-structured-data-schema")
260
+ ),
261
+ 'thumbnailUrl' => array(
262
+ 'type' => 'image',
263
+ 'title' => esc_html__('Image', "wp-seo-structured-data-schema")
264
+ ),
265
+ 'contentUrl' => array(
266
+ 'type' => 'url',
267
+ 'title' => esc_html__('Content URL', "wp-seo-structured-data-schema")
268
+ ),
269
+ 'embedUrl' => array(
270
+ 'type' => 'url',
271
+ 'title' => esc_html__('Embed URL', "wp-seo-structured-data-schema"),
272
+ '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')
273
+ ),
274
+ 'uploadDate' => array(
275
+ 'type' => 'text',
276
+ 'title' => esc_html__('Upload date', "wp-seo-structured-data-schema"),
277
+ 'class' => 'rtrs-date',
278
+ 'required' => true,
279
+ 'desc' => esc_html__('Like this: 2021-08-25 14:20:00', "wp-seo-structured-data-schema")
280
+ ),
281
+ 'duration' => array(
282
+ 'type' => 'text',
283
+ 'title' => esc_html__('Duration', "wp-seo-structured-data-schema"),
284
+ 'desc' => esc_html__('Runtime of the movie in ISO 8601 format (for example, "PT2H22M" (142 minutes)).', "wp-seo-structured-data-schema")
285
+ ),
286
+ ]
287
+ ],
288
+ 'audio' => [
289
+ 'title' => __('Audio', "wp-seo-structured-data-schema"),
290
+ 'type' => 'group',
291
+ 'fields' => [
292
+ 'audio_heading' => [
293
+ 'type' => 'heading',
294
+ 'title' => __('Audio', "wp-seo-structured-data-schema")
295
+ ],
296
+ 'name' => array(
297
+ 'type' => 'text',
298
+ 'title' => esc_html__('Name', 'wp-seo-structured-data-schema'),
299
+ 'desc' => esc_html__("The title of the audio", 'wp-seo-structured-data-schema')
300
+ ),
301
+ 'description' => array(
302
+ 'type' => 'textarea',
303
+ 'title' => esc_html__('Description', 'wp-seo-structured-data-schema'),
304
+ 'desc' => esc_html__("The short description of the audio", 'wp-seo-structured-data-schema')
305
+ ),
306
+ 'duration' => array(
307
+ 'type' => 'text',
308
+ 'title' => esc_html__('Duration', 'wp-seo-structured-data-schema'),
309
+ 'desc' => esc_html__("The duration of the audio in ISO 8601 format.(PT1M33S)", 'wp-seo-structured-data-schema')
310
+ ),
311
+ 'contentUrl' => array(
312
+ 'type' => 'url',
313
+ 'title' => esc_html__('Content URL', 'wp-seo-structured-data-schema'),
314
+ 'placeholder' => esc_html__('URL', 'wp-seo-structured-data-schema'),
315
+ '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')
316
+ ),
317
+ 'encodingFormat' => array(
318
+ 'type' => 'text',
319
+ 'title' => esc_html__('Encoding Format', 'wp-seo-structured-data-schema'),
320
+ 'desc' => esc_html__("The encoding format of audio like: 'audio/mpeg'", 'wp-seo-structured-data-schema')
321
+ ),
322
+ ]
323
+ ],
324
+ )
325
+ ),
326
+ 'news_article' => array(
327
+ 'pro' => false,
328
+ 'title' => __('News Article', "wp-seo-structured-data-schema"),
329
+ 'fields' => array(
330
+ 'active' => array(
331
+ 'type' => 'checkbox'
332
+ ),
333
+ 'headline' => array(
334
+ 'title' => __('Headline', "wp-seo-structured-data-schema"),
335
+ 'type' => 'text',
336
+ 'desc' => __('Article title', "wp-seo-structured-data-schema"),
337
+ 'required' => true
338
+ ),
339
+ 'mainEntityOfPage' => array(
340
+ 'title' => __('Page URL', "wp-seo-structured-data-schema"),
341
+ 'type' => 'url',
342
+ 'desc' => __('The canonical URL of the article page', "wp-seo-structured-data-schema"),
343
+ 'required' => true
344
+ ),
345
+ 'author' => array(
346
+ 'title' => __('Author', "wp-seo-structured-data-schema"),
347
+ 'type' => 'text',
348
+ 'desc' => __('Author display name', "wp-seo-structured-data-schema"),
349
+ 'required' => true
350
+ ),
351
+ 'author_url' => array(
352
+ 'title' => __('Author URL', "wp-seo-structured-data-schema"),
353
+ 'type' => 'url',
354
+ 'required' => true,
355
+ 'default' => $author_url
356
+ ),
357
+ 'image' => array(
358
+ 'title' => __('Image', "wp-seo-structured-data-schema"),
359
+ 'type' => 'image',
360
+ '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"),
361
+ 'required' => true
362
+ ),
363
+ 'datePublished' => array(
364
+ 'title' => __('Published date', "wp-seo-structured-data-schema"),
365
+ 'type' => 'text',
366
+ 'class' => 'kcseo-date',
367
+ 'desc' => __('Like this: 2021-12-25 14:20:00', "wp-seo-structured-data-schema"),
368
+ 'required' => true
369
+ ),
370
+ 'dateModified' => array(
371
+ 'title' => __('Modified date', "wp-seo-structured-data-schema"),
372
+ 'type' => 'text',
373
+ 'class' => 'kcseo-date',
374
+ 'required' => true,
375
+ 'desc' => __('Like this: 2021-12-25 14:20:00', "wp-seo-structured-data-schema")
376
+ ),
377
+ 'publisher' => array(
378
+ 'title' => __('Publisher', "wp-seo-structured-data-schema"),
379
+ 'type' => 'text',
380
+ 'desc' => __('Publisher name or Organization name', "wp-seo-structured-data-schema"),
381
+ 'required' => true
382
+ ),
383
+ 'publisherImage' => array(
384
+ 'title' => __('Publisher Logo', "wp-seo-structured-data-schema"),
385
+ 'type' => 'image',
386
+ '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"),
387
+ 'required' => true
388
+ ),
389
+ 'description' => array(
390
+ 'title' => __('Description', "wp-seo-structured-data-schema"),
391
+ 'type' => 'textarea',
392
+ 'desc' => __('Short description. New line is not supported.', "wp-seo-structured-data-schema")
393
+ ),
394
+ 'articleBody' => array(
395
+ 'title' => __('Article body', "wp-seo-structured-data-schema"),
396
+ 'type' => 'textarea',
397
+ 'desc' => __('Article body content. New line is not supported.', "wp-seo-structured-data-schema")
398
+ ),
399
+ 'video' => [
400
+ 'title' => __('Video', "wp-seo-structured-data-schema"),
401
+ 'type' => 'group',
402
+ 'fields' => [
403
+ 'video_heading' => [
404
+ 'type' => 'heading',
405
+ 'title' => __('Video', "wp-seo-structured-data-schema")
406
+ ],
407
+ 'name' => array(
408
+ 'type' => 'text',
409
+ 'title' => esc_html__('Name', "wp-seo-structured-data-schema"),
410
+ ),
411
+ 'description' => array(
412
+ 'type' => 'textarea',
413
+ 'title' => esc_html__('Description', "wp-seo-structured-data-schema")
414
+ ),
415
+ 'thumbnailUrl' => array(
416
+ 'type' => 'image',
417
+ 'title' => esc_html__('Image', "wp-seo-structured-data-schema")
418
+ ),
419
+ 'contentUrl' => array(
420
+ 'type' => 'url',
421
+ 'title' => esc_html__('Content URL', "wp-seo-structured-data-schema")
422
+ ),
423
+ 'embedUrl' => array(
424
+ 'type' => 'url',
425
+ 'title' => esc_html__('Embed URL', "wp-seo-structured-data-schema"),
426
+ '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')
427
+ ),
428
+ 'uploadDate' => array(
429
+ 'type' => 'text',
430
+ 'title' => esc_html__('Upload date', "wp-seo-structured-data-schema"),
431
+ 'class' => 'rtrs-date',
432
+ 'required' => true,
433
+ 'desc' => esc_html__('Like this: 2021-08-25 14:20:00', "wp-seo-structured-data-schema")
434
+ ),
435
+ 'duration' => array(
436
+ 'type' => 'text',
437
+ 'title' => esc_html__('Duration', "wp-seo-structured-data-schema"),
438
+ 'desc' => esc_html__('Runtime of the movie in ISO 8601 format (for example, "PT2H22M" (142 minutes)).', "wp-seo-structured-data-schema")
439
+ ),
440
+ ]
441
+ ],
442
+ 'audio' => [
443
+ 'title' => __('Audio', "wp-seo-structured-data-schema"),
444
+ 'type' => 'group',
445
+ 'fields' => [
446
+ 'audio_heading' => [
447
+ 'type' => 'heading',
448
+ 'title' => __('Audio', "wp-seo-structured-data-schema")
449
+ ],
450
+ 'name' => array(
451
+ 'type' => 'text',
452
+ 'title' => esc_html__('Name', 'wp-seo-structured-data-schema'),
453
+ 'desc' => esc_html__("The title of the audio", 'wp-seo-structured-data-schema')
454
+ ),
455
+ 'description' => array(
456
+ 'type' => 'textarea',
457
+ 'title' => esc_html__('Description', 'wp-seo-structured-data-schema'),
458
+ 'desc' => esc_html__("The short description of the audio", 'wp-seo-structured-data-schema')
459
+ ),
460
+ 'duration' => array(
461
+ 'type' => 'text',
462
+ 'title' => esc_html__('Duration', 'wp-seo-structured-data-schema'),
463
+ 'desc' => esc_html__("The duration of the audio in ISO 8601 format.(PT1M33S)", 'wp-seo-structured-data-schema')
464
+ ),
465
+ 'contentUrl' => array(
466
+ 'type' => 'url',
467
+ 'title' => esc_html__('Content URL', 'wp-seo-structured-data-schema'),
468
+ 'placeholder' => esc_html__('URL', 'wp-seo-structured-data-schema'),
469
+ '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')
470
+ ),
471
+ 'encodingFormat' => array(
472
+ 'type' => 'text',
473
+ 'title' => esc_html__('Encoding Format', 'wp-seo-structured-data-schema'),
474
+ 'desc' => esc_html__("The encoding format of audio like: 'audio/mpeg'", 'wp-seo-structured-data-schema')
475
+ ),
476
+ ]
477
+ ],
478
+ )
479
+ ),
480
+ 'event' => array(
481
+ 'pro' => false,
482
+ 'title' => __('Event', "wp-seo-structured-data-schema"),
483
+ 'fields' => array(
484
+ 'active' => array(
485
+ 'type' => 'checkbox'
486
+ ),
487
+ 'name' => array(
488
+ 'title' => __('Name', "wp-seo-structured-data-schema"),
489
+ 'type' => 'text',
490
+ 'required' => true,
491
+ 'desc' => __("The name of the event.", "wp-seo-structured-data-schema")
492
+ ),
493
+ 'locationName' => array(
494
+ 'title' => __('Location name', "wp-seo-structured-data-schema"),
495
+ 'type' => 'text',
496
+ 'required' => true,
497
+ 'desc' => __("Event Location name", "wp-seo-structured-data-schema")
498
+ ),
499
+ 'locationAddress' => array(
500
+ 'title' => __('Location address', "wp-seo-structured-data-schema"),
501
+ 'type' => 'text',
502
+ 'required' => true,
503
+ '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")
504
+ ),
505
+ 'startDate' => array(
506
+ 'title' => __('Start date', "wp-seo-structured-data-schema"),
507
+ 'type' => 'text',
508
+ 'class' => 'kcseo-date',
509
+ 'required' => true,
510
+ 'desc' => __("Event start date Like : 2017-10-16 4:00 AM", "wp-seo-structured-data-schema")
511
+ ),
512
+ 'endDate' => array(
513
+ 'title' => __('End date', "wp-seo-structured-data-schema"),
514
+ 'type' => 'text',
515
+ 'recommended' => true,
516
+ 'class' => 'kcseo-date',
517
+ 'desc' => __("Event end date Like : 2017-10-16 4:00 AM", "wp-seo-structured-data-schema")
518
+ ),
519
+ 'description' => array(
520
+ 'title' => __('Description', "wp-seo-structured-data-schema"),
521
+ 'type' => 'textarea',
522
+ 'recommended' => true,
523
+ 'desc' => __("Event description. New line is not supported.", "wp-seo-structured-data-schema")
524
+ ),
525
+ 'organizer' => array(
526
+ 'title' => __('Organizer', "wp-seo-structured-data-schema"),
527
+ 'type' => 'text',
528
+ 'recommended' => true,
529
+ 'desc' => __("The Organizer.", "wp-seo-structured-data-schema")
530
+ ),
531
+ 'organizerUrl' => array(
532
+ 'title' => __('Organizer URL', "wp-seo-structured-data-schema"),
533
+ 'type' => 'url',
534
+ 'recommended' => true,
535
+ 'desc' => __("Organizer URL", "wp-seo-structured-data-schema")
536
+ ),
537
+ 'performerName' => array(
538
+ 'title' => __('Performer Name', "wp-seo-structured-data-schema"),
539
+ 'type' => 'text',
540
+ 'recommended' => true,
541
+ 'desc' => __("The performer's name.", "wp-seo-structured-data-schema")
542
+ ),
543
+ 'EventAttendanceMode' => array(
544
+ 'title' => 'Event Attendance Mode',
545
+ 'type' => 'select',
546
+ 'recommended' => true,
547
+ 'empty' => "Select one",
548
+ 'options' => array(
549
+ 'https://schema.org/OfflineEventAttendanceMode' => 'Offline',
550
+ 'https://schema.org/OnlineEventAttendanceMode' => 'Online',
551
+ 'https://schema.org/MixedEventAttendanceMode' => 'Mixed',
552
+ ),
553
+ ),
554
+ 'eventStatus' => array(
555
+ 'title' => 'Event Status',
556
+ 'type' => 'select',
557
+ 'recommended' => true,
558
+ 'empty' => "Select one",
559
+ 'options' => array(
560
+ 'https://schema.org/EventScheduled' => 'EventScheduled',
561
+ 'https://schema.org/EventCancelled' => 'EventCancelled',
562
+ 'https://schema.org/EventMovedOnline' => 'EventMovedOnline',
563
+ 'https://schema.org/EventPostponed' => 'EventPostponed',
564
+ 'https://schema.org/EventRescheduled' => 'EventRescheduled',
565
+ ),
566
+ ),
567
+ 'image' => array(
568
+ 'title' => __('Image URL', "wp-seo-structured-data-schema"),
569
+ 'type' => 'url',
570
+ 'recommended' => true,
571
+ 'desc' => __("URL of an image or logo for the event or tour", "wp-seo-structured-data-schema")
572
+ ),
573
+ 'price' => array(
574
+ 'title' => __('Price', "wp-seo-structured-data-schema"),
575
+ 'type' => 'number',
576
+ 'recommended' => true,
577
+ 'attr' => 'step="any"',
578
+ '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")
579
+ ),
580
+ 'priceCurrency' => array(
581
+ 'title' => __('Price currency', "wp-seo-structured-data-schema"),
582
+ 'type' => 'text',
583
+ 'desc' => __("The 3-letter currency code. (USD)", "wp-seo-structured-data-schema")
584
+ ),
585
+ 'availability' => array(
586
+ 'title' => 'Availability',
587
+ 'type' => 'select',
588
+ 'recommended' => true,
589
+ 'empty' => "Select one",
590
+ 'options' => array(
591
+ 'http://schema.org/InStock' => 'InStock',
592
+ 'http://schema.org/SoldOut' => 'SoldOut',
593
+ 'http://schema.org/PreOrder' => 'PreOrder',
594
+ ),
595
+ ),
596
+ 'validFrom' => array(
597
+ 'title' => __('Valid From', "wp-seo-structured-data-schema"),
598
+ 'type' => 'text',
599
+ 'recommended' => true,
600
+ 'class' => 'kcseo-date',
601
+ '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")
602
+ ),
603
+ 'url' => array(
604
+ 'title' => 'URL',
605
+ 'recommended' => true,
606
+ 'type' => 'url',
607
+ 'placeholder' => 'URL',
608
+ 'desc' => __("A link to the event's details page. <span class='required'>Not required but (Recommended)</span>", "wp-seo-structured-data-schema")
609
+ ),
610
+ 'review_section' => array(
611
+ 'title' => __('Review', "wp-seo-structured-data-schema"),
612
+ 'type' => 'heading',
613
+ 'desc' => __("To add review schema for this type, complete fields below and enable, others live blank.", "wp-seo-structured-data-schema")
614
+ ),
615
+ 'review_active' => array(
616
+ 'type' => 'checkbox'
617
+ ),
618
+ 'review_author' => array(
619
+ 'title' => __("Author", "wp-seo-structured-data-schema"),
620
+ 'type' => 'text',
621
+ 'required' => true
622
+ ),
623
+ 'review_author_sameAs' => array(
624
+ 'title' => __("Author Same As profile link", "wp-seo-structured-data-schema"),
625
+ 'type' => 'textarea',
626
+ 'attr' => 'placeholder="https://facebook.com/example&#10;https://twitter.com/example"',
627
+ 'required' => true,
628
+ '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")
629
+ ),
630
+ 'review_body' => array(
631
+ 'title' => __('Review body', "wp-seo-structured-data-schema"),
632
+ 'type' => 'textarea',
633
+ 'required' => true,
634
+ 'desc' => __("The actual body of the review.", "wp-seo-structured-data-schema")
635
+ ),
636
+ 'review_datePublished' => array(
637
+ 'title' => __('Date of Published', "wp-seo-structured-data-schema"),
638
+ 'type' => 'text',
639
+ 'class' => 'kcseo-date',
640
+ 'desc' => __("Like this: 2021-12-25 14:20:00", "wp-seo-structured-data-schema")
641
+ ),
642
+ 'review_ratingValue' => array(
643
+ 'title' => __('Rating value', "wp-seo-structured-data-schema"),
644
+ 'type' => 'number',
645
+ 'attr' => 'step="any"',
646
+ 'desc' => __("A numerical quality rating for the item.", "wp-seo-structured-data-schema")
647
+ ),
648
+ 'review_bestRating' => array(
649
+ 'title' => __('Best rating', "wp-seo-structured-data-schema"),
650
+ 'type' => 'number',
651
+ 'attr' => 'step="any"',
652
+ 'desc' => __("The highest value allowed in this rating system.", "wp-seo-structured-data-schema")
653
+ ),
654
+ 'review_worstRating' => array(
655
+ 'title' => __('Worst rating', "wp-seo-structured-data-schema"),
656
+ 'type' => 'number',
657
+ 'attr' => 'step="any"',
658
+ '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")
659
+ )
660
+ )
661
+ ),
662
+ 'product' => array(
663
+ 'pro' => false,
664
+ 'title' => __('Product', "wp-seo-structured-data-schema"),
665
+ 'fields' => array(
666
+ 'active' => array(
667
+ 'type' => 'checkbox'
668
+ ),
669
+ 'name' => array(
670
+ 'title' => __('Name', "wp-seo-structured-data-schema"),
671
+ 'type' => 'text',
672
+ 'required' => true,
673
+ 'desc' => __("The name of the product.", "wp-seo-structured-data-schema")
674
+ ),
675
+ 'image' => array(
676
+ 'title' => __('Image', "wp-seo-structured-data-schema"),
677
+ 'type' => 'image',
678
+ '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")
679
+ ),
680
+ 'description' => array(
681
+ 'title' => __('Description', "wp-seo-structured-data-schema"),
682
+ 'type' => 'textarea',
683
+ 'desc' => __("Product description. New line is not supported.", "wp-seo-structured-data-schema")
684
+ ),
685
+ 'sku' => array(
686
+ 'title' => __('SKU', "wp-seo-structured-data-schema"),
687
+ 'type' => 'text',
688
+ 'recommended' => true
689
+ ),
690
+ 'brand' => array(
691
+ 'title' => __('Brand', "wp-seo-structured-data-schema"),
692
+ 'type' => 'text',
693
+ 'recommended' => true,
694
+ 'desc' => __("The brand of the product.", "wp-seo-structured-data-schema")
695
+ ),
696
+ 'identifier_type' => array(
697
+ 'title' => __('Identifier Type', "wp-seo-structured-data-schema"),
698
+ 'type' => 'select',
699
+ 'recommended' => true,
700
+ 'options' => array(
701
+ 'mpn' => 'MPN',
702
+ 'isbn' => 'ISBN',
703
+ 'gtin8' => 'GTIN-8 (UPC, JAN)',
704
+ 'gtin12' => 'GTIN-12 (UPC)',
705
+ 'gtin13' => 'GTIN-13 (EAN,JAN)'
706
+ ),
707
+ 'desc' => __("<strong>MPN</strong><br>
708
+ &#8594; MPN(Manufacturer Part Number) Used globally, Alphanumeric digits (various lengths)<br>
709
+ <strong>GTIN</strong><br>
710
+ &#8594; UPC(Universal Product Code) Used in primarily North America. 12 numeric digits. eg. 892685001003.<br>
711
+ &#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>
712
+ &#8594; ISBN(International Standard Book Number) Used globally, ISBN-13 (recommended), 13 numeric digits 978-0747595823<br>
713
+ &#8594; JAN(Japanese Article Number) Used only in Japan, 8 or 13 numeric digits.", "wp-seo-structured-data-schema")
714
+ ),
715
+ 'identifier' => array(
716
+ 'title' => __('Identifier', "wp-seo-structured-data-schema"),
717
+ 'type' => 'text',
718
+ 'recommended' => true,
719
+ 'desc' => __("Enter product unique identifier", "wp-seo-structured-data-schema")
720
+ ),
721
+ 'rating_section' => array(
722
+ 'title' => __('Product Review & Rating', "wp-seo-structured-data-schema"),
723
+ 'type' => 'heading',
724
+ ),
725
+ 'reviewRatingValue' => array(
726
+ 'title' => __('Review rating value', "wp-seo-structured-data-schema"),
727
+ 'type' => 'number',
728
+ 'recommended' => true,
729
+ 'attr' => 'step="any"',
730
+ 'desc' => __("Rating value. (1 , 2.5, 3, 5 etc)", "wp-seo-structured-data-schema")
731
+ ),
732
+ 'reviewBestRating' => array(
733
+ 'title' => __('Review Best rating', "wp-seo-structured-data-schema"),
734
+ 'type' => 'number',
735
+ 'recommended' => true,
736
+ 'attr' => 'step="any"',
737
+ ),
738
+ 'reviewWorstRating' => array(
739
+ 'title' => __('Review Worst rating', "wp-seo-structured-data-schema"),
740
+ 'type' => 'number',
741
+ 'recommended' => true,
742
+ 'attr' => 'step="any"',
743
+ ),
744
+ 'reviewAuthor' => array(
745
+ 'title' => __('Review author', "wp-seo-structured-data-schema"),
746
+ 'type' => 'text'
747
+ ),
748
+ 'ratingValue' => array(
749
+ 'title' => __('Rating value', "wp-seo-structured-data-schema"),
750
+ 'type' => 'number',
751
+ 'attr' => 'step="any"',
752
+ 'desc' => __("Rating value. (1 , 2.5, 3, 5 etc)", "wp-seo-structured-data-schema")
753
+ ),
754
+ 'reviewCount' => array(
755
+ 'title' => __('Total review count', "wp-seo-structured-data-schema"),
756
+ 'type' => 'number',
757
+ 'attr' => 'step="any"',
758
+ 'desc' => __("Review rating value. <span class='required'>This is required if (Rating value) is given</span>", "wp-seo-structured-data-schema")
759
+ ),
760
+ 'pricing_section' => array(
761
+ 'title' => __('Product Pricing', "wp-seo-structured-data-schema"),
762
+ 'type' => 'heading',
763
+ ),
764
+ 'price' => array(
765
+ 'title' => __('Price', "wp-seo-structured-data-schema"),
766
+ 'type' => 'number',
767
+ 'attr' => 'step="any"',
768
+ 'desc' => __("The lowest available price, including service charges and fees, of this type of ticket.", "wp-seo-structured-data-schema")
769
+ ),
770
+ 'priceValidUntil' => array(
771
+ 'title' => __('PriceValidUntil', "wp-seo-structured-data-schema"),
772
+ 'type' => 'text',
773
+ 'recommended' => true,
774
+ 'class' => 'kcseo-date',
775
+ 'desc' => __("The date (in ISO 8601 date and time format) after which the price will no longer be available.", "wp-seo-structured-data-schema")
776
+ ),
777
+ 'priceCurrency' => array(
778
+ 'title' => __('Price currency', "wp-seo-structured-data-schema"),
779
+ 'type' => 'text',
780
+ 'desc' => __("The 3-letter currency code.", "wp-seo-structured-data-schema")
781
+ ),
782
+ 'availability' => array(
783
+ 'title' => 'Availability',
784
+ 'type' => 'select',
785
+ 'empty' => "Select one",
786
+ 'options' => array(
787
+ 'http://schema.org/InStock' => 'InStock',
788
+ 'http://schema.org/InStoreOnly' => 'InStoreOnly',
789
+ 'http://schema.org/OutOfStock' => 'OutOfStock',
790
+ 'http://schema.org/SoldOut' => 'SoldOut',
791
+ 'http://schema.org/OnlineOnly' => 'OnlineOnly',
792
+ 'http://schema.org/LimitedAvailability' => 'LimitedAvailability',
793
+ 'http://schema.org/Discontinued' => 'Discontinued',
794
+ 'http://schema.org/PreOrder' => 'PreOrder',
795
+ ),
796
+ 'desc' => __("Select a availability type", "wp-seo-structured-data-schema")
797
+ ),
798
+ 'itemCondition' => array(
799
+ 'title' => 'Product condition',
800
+ 'type' => 'select',
801
+ 'empty' => "Select one",
802
+ 'options' => array(
803
+ 'http://schema.org/NewCondition' => 'NewCondition',
804
+ 'http://schema.org/UsedCondition' => 'UsedCondition',
805
+ 'http://schema.org/DamagedCondition' => 'DamagedCondition',
806
+ 'http://schema.org/RefurbishedCondition' => 'RefurbishedCondition',
807
+ ),
808
+ 'desc' => __("Select a condition", "wp-seo-structured-data-schema")
809
+ ),
810
+ 'url' => array(
811
+ 'title' => __('Product URL', "wp-seo-structured-data-schema"),
812
+ 'type' => 'url',
813
+ '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")
814
+ ),
815
+ )
816
+ ),
817
+ 'video' => array(
818
+ 'pro' => false,
819
+ 'title' => __('Video', "wp-seo-structured-data-schema"),
820
+ 'fields' => array(
821
+ 'active' => array(
822
+ 'type' => 'checkbox'
823
+ ),
824
+ 'name' => array(
825
+ 'title' => __('Name', "wp-seo-structured-data-schema"),
826
+ 'type' => 'text',
827
+ 'required' => true,
828
+ 'desc' => __("The title of the video", "wp-seo-structured-data-schema")
829
+ ),
830
+ 'description' => array(
831
+ 'title' => __('Description', "wp-seo-structured-data-schema"),
832
+ 'type' => 'textarea',
833
+ 'required' => true,
834
+ 'desc' => __("The description of the video. New line is not supported.", "wp-seo-structured-data-schema")
835
+ ),
836
+ 'thumbnailUrl' => array(
837
+ 'title' => 'Thumbnail URL',
838
+ 'type' => 'url',
839
+ 'placeholder' => "URL",
840
+ 'required' => true,
841
+ '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")
842
+ ),
843
+ 'uploadDate' => array(
844
+ 'title' => __('Updated date', "wp-seo-structured-data-schema"),
845
+ 'type' => 'text',
846
+ 'class' => 'kcseo-date',
847
+ 'required' => true,
848
+ 'desc' => __('2021-02-05T08:00:00+08:00', "wp-seo-structured-data-schema")
849
+ ),
850
+ 'duration' => array(
851
+ 'title' => __('Duration', "wp-seo-structured-data-schema"),
852
+ 'type' => 'text',
853
+ 'desc' => __("The duration of the video in ISO 8601 format.(PT1M33S)", "wp-seo-structured-data-schema")
854
+ ),
855
+ 'contentUrl' => array(
856
+ 'title' => 'Content URL',
857
+ 'type' => 'url',
858
+ 'placeholder' => 'URL',
859
+ '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")
860
+ ),
861
+ 'embedUrl' => array(
862
+ 'title' => 'Embed URL',
863
+ 'placeholder' => 'URL',
864
+ 'type' => 'url',
865
+ '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")
866
+ ),
867
+ 'interactionCount' => array(
868
+ 'title' => __('Interaction count', "wp-seo-structured-data-schema"),
869
+ 'type' => 'text',
870
+ 'desc' => __("The number of times the video has been viewed.", "wp-seo-structured-data-schema")
871
+ ),
872
+ 'expires' => array(
873
+ 'title' => __('Expires', "wp-seo-structured-data-schema"),
874
+ 'type' => 'text',
875
+ 'class' => 'kcseo-date',
876
+ 'desc' => __("Like this: 2021-12-25 14:20:00", "wp-seo-structured-data-schema")
877
+ ),
878
+ )
879
+ ),
880
+ 'audio' => array(
881
+ 'pro' => false,
882
+ 'title' => __('Audio', "wp-seo-structured-data-schema"),
883
+ 'fields' => array(
884
+ 'active' => array(
885
+ 'type' => 'checkbox'
886
+ ),
887
+ 'name' => array(
888
+ 'title' => __('Name', "wp-seo-structured-data-schema"),
889
+ 'type' => 'text',
890
+ 'required' => true,
891
+ 'desc' => __("The title of the audio", "wp-seo-structured-data-schema")
892
+ ),
893
+ 'description' => array(
894
+ 'title' => __('Description', "wp-seo-structured-data-schema"),
895
+ 'type' => 'textarea',
896
+ 'desc' => __("The description of the audio. New line is not supported.", "wp-seo-structured-data-schema")
897
+ ),
898
+ 'contentUrl' => array(
899
+ 'title' => 'Content URL',
900
+ 'type' => 'url',
901
+ 'placeholder' => 'URL',
902
+ 'required' => true,
903
+ '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')
904
+ ),
905
+ 'duration' => array(
906
+ 'title' => __('Duration', "wp-seo-structured-data-schema"),
907
+ 'type' => 'text',
908
+ 'desc' => __("The duration of the audio in ISO 8601 format.(PT1M33S)", "wp-seo-structured-data-schema")
909
+ ),
910
+ 'encodingFormat' => array(
911
+ 'type' => 'text',
912
+ 'title' => esc_html__('Encoding Format', 'wp-seo-structured-data-schema'),
913
+ 'desc' => esc_html__("The encoding format of audio like: 'audio/mpeg'", 'wp-seo-structured-data-schema')
914
+ ),
915
+ )
916
+ ),
917
+ 'service' => array(
918
+ 'pro' => false,
919
+ 'title' => __('Service', "wp-seo-structured-data-schema"),
920
+ 'fields' => array(
921
+ 'active' => array(
922
+ 'type' => 'checkbox'
923
+ ),
924
+ 'name' => array(
925
+ 'title' => __('Name', "wp-seo-structured-data-schema"),
926
+ 'type' => 'text',
927
+ 'required' => true,
928
+ 'desc' => __("The name of the Service.", "wp-seo-structured-data-schema")
929
+ ),
930
+ 'serviceType' => array(
931
+ 'title' => __('Service type', "wp-seo-structured-data-schema"),
932
+ 'type' => 'text',
933
+ 'required' => true,
934
+ 'desc' => __("The type of service being offered, e.g. veterans' benefits, emergency relief, etc.", "wp-seo-structured-data-schema")
935
+ ),
936
+ 'additionalType' => array(
937
+ 'title' => 'Additional type(URL)',
938
+ 'type' => 'url',
939
+ 'placeholder' => 'URL',
940
+ '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")
941
+ ),
942
+ 'award' => array(
943
+ 'title' => __('Award', "wp-seo-structured-data-schema"),
944
+ 'type' => 'text',
945
+ 'desc' => __("An award won by or for this service.", "wp-seo-structured-data-schema")
946
+ ),
947
+ 'category' => array(
948
+ 'title' => __('Category', "wp-seo-structured-data-schema"),
949
+ 'type' => 'text',
950
+ 'desc' => __("A category for the service.", "wp-seo-structured-data-schema")
951
+ ),
952
+ 'providerMobility' => array(
953
+ 'title' => __('Provider mobility', "wp-seo-structured-data-schema"),
954
+ 'type' => 'text',
955
+ 'desc' => __("Indicates the mobility of a provided service (e.g. 'static', 'dynamic').", "wp-seo-structured-data-schema")
956
+ ),
957
+ 'description' => array(
958
+ 'title' => 'Description',
959
+ 'type' => 'textarea',
960
+ 'require' => true,
961
+ 'desc' => __("A short description of the service. New line is not supported.", "wp-seo-structured-data-schema")
962
+ ),
963
+ 'image' => array(
964
+ 'title' => 'Image URL',
965
+ 'type' => 'url',
966
+ 'require' => false,
967
+ 'desc' => __("An image of the service. This should be a URL.", "wp-seo-structured-data-schema")
968
+ ),
969
+ 'mainEntityOfPage' => array(
970
+ 'title' => 'Main entity of page URL',
971
+ 'type' => 'url',
972
+ 'require' => false,
973
+ 'desc' => __("Indicates a page (or other CreativeWork) for which this thing is the main entity being described.", "wp-seo-structured-data-schema")
974
+ ),
975
+ 'sameAs' => array(
976
+ 'title' => 'Same as URL',
977
+ 'type' => 'url',
978
+ 'placeholder' => 'URL',
979
+ '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")
980
+ ),
981
+ 'url' => array(
982
+ 'title' => 'Url of the service',
983
+ 'type' => 'url',
984
+ 'placeholder' => 'URL',
985
+ 'desc' => __("URL of the service.", "wp-seo-structured-data-schema")
986
+ ),
987
+ 'alternateName' => array(
988
+ 'title' => __('Alternate name', "wp-seo-structured-data-schema"),
989
+ 'type' => 'text',
990
+ 'desc' => __('An alias for the service.', "wp-seo-structured-data-schema")
991
+ ),
992
+ )
993
+ ),
994
+ 'about' => array(
995
+ 'pro' => false,
996
+ 'title' => __('About', "wp-seo-structured-data-schema"),
997
+ 'fields' => array(
998
+ 'active' => array(
999
+ 'type' => 'checkbox'
1000
+ ),
1001
+ 'name' => array(
1002
+ 'type' => 'text',
1003
+ 'title' => esc_html__('Name', 'wp-seo-structured-data-schema'),
1004
+ 'required' => true
1005
+ ),
1006
+ 'description' => array(
1007
+ 'type' => 'textarea',
1008
+ 'title' => esc_html__('Description', 'wp-seo-structured-data-schema'),
1009
+ ),
1010
+ 'image' => array(
1011
+ 'type' => 'image',
1012
+ 'title' => esc_html__('Image', 'wp-seo-structured-data-schema'),
1013
+ ),
1014
+ 'url' => array(
1015
+ 'type' => 'url',
1016
+ 'title' => esc_html__('URL', 'wp-seo-structured-data-schema'),
1017
+ ),
1018
+ 'sameAs' => array(
1019
+ 'type' => 'textarea',
1020
+ 'title' => esc_html__("Author Same As profile link", 'wp-seo-structured-data-schema'),
1021
+ 'placeholder' => 'https://facebook.com/example&#10;https://twitter.com/example',
1022
+ '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' => [] ] )
1023
+ ),
1024
+ )
1025
+ ),
1026
+ 'contact' => array(
1027
+ 'pro' => false,
1028
+ 'title' => __('Contact', "wp-seo-structured-data-schema"),
1029
+ 'fields' => array(
1030
+ 'active' => array(
1031
+ 'type' => 'checkbox'
1032
+ ),
1033
+ 'name' => array(
1034
+ 'type' => 'text',
1035
+ 'title' => esc_html__('Name', 'wp-seo-structured-data-schema'),
1036
+ 'required' => true
1037
+ ),
1038
+ 'description' => array(
1039
+ 'type' => 'textarea',
1040
+ 'title' => esc_html__('Description', 'wp-seo-structured-data-schema'),
1041
+ ),
1042
+ 'image' => array(
1043
+ 'type' => 'image',
1044
+ 'title' => esc_html__('Image', 'wp-seo-structured-data-schema'),
1045
+ ),
1046
+ 'url' => array(
1047
+ 'type' => 'url',
1048
+ 'title' => esc_html__('URL', 'wp-seo-structured-data-schema'),
1049
+ ),
1050
+ 'video' => array(
1051
+ 'type' => 'url',
1052
+ 'title' => esc_html__('Video URL', 'wp-seo-structured-data-schema'),
1053
+ 'placeholder' => esc_html__('URL', 'wp-seo-structured-data-schema'),
1054
+ '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')
1055
+ ),
1056
+ 'sameAs' => array(
1057
+ 'type' => 'textarea',
1058
+ 'title' => esc_html__("Author Same As profile link", 'wp-seo-structured-data-schema'),
1059
+ 'placeholder' => 'https://facebook.com/example&#10;https://twitter.com/example',
1060
+ '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' => [] ] )
1061
+ ),
1062
+ )
1063
+ ),
1064
+ 'review' => array(
1065
+ 'pro' => false,
1066
+ 'title' => __('Review', "wp-seo-structured-data-schema"),
1067
+ 'fields' => array(
1068
+ 'active' => array(
1069
+ 'type' => 'checkbox'
1070
+ ),
1071
+ 'review_notice_heading' => array(
1072
+ 'title' => sprintf('<span style="display:block;text-align:center;color: red">%s</span>', __('Notice</span>', "wp-seo-structured-data-schema")),
1073
+ 'type' => 'heading',
1074
+ 'desc' => self::getReviewNotice()
1075
+ ),
1076
+ 'itemName' => array(
1077
+ 'title' => __('Name of the reviewed item', "wp-seo-structured-data-schema"),
1078
+ 'type' => 'text',
1079
+ 'required' => true,
1080
+ 'desc' => __("The item that is being reviewed.", "wp-seo-structured-data-schema")
1081
+ ),
1082
+ 'reviewBody' => array(
1083
+ 'title' => __('Review body', "wp-seo-structured-data-schema"),
1084
+ 'type' => 'textarea',
1085
+ 'required' => true,
1086
+ 'desc' => __("The actual body of the review.", "wp-seo-structured-data-schema")
1087
+ ),
1088
+ 'name' => array(
1089
+ 'title' => __('Review name', "wp-seo-structured-data-schema"),
1090
+ 'type' => 'text',
1091
+ 'required' => true,
1092
+ 'desc' => __("A particular name for the review.", "wp-seo-structured-data-schema")
1093
+ ),
1094
+ 'author' => array(
1095
+ 'title' => __('Author', "wp-seo-structured-data-schema"),
1096
+ 'type' => 'text',
1097
+ 'required' => true,
1098
+ 'author' => 'Author name',
1099
+ 'desc' => __("The author of the review. The reviewer’s name needs to be a valid name.", "wp-seo-structured-data-schema")
1100
+ ),
1101
+ 'datePublished' => array(
1102
+ 'title' => __('Date of Published', "wp-seo-structured-data-schema"),
1103
+ 'type' => 'text',
1104
+ 'class' => 'kcseo-date',
1105
+ 'desc' => __("Like this: 2021-12-25 14:20:00", "wp-seo-structured-data-schema")
1106
+ ),
1107
+ 'ratingValue' => array(
1108
+ 'title' => __('Rating value', "wp-seo-structured-data-schema"),
1109
+ 'type' => 'number',
1110
+ 'attr' => 'step="any"',
1111
+ 'desc' => __("A numerical quality rating for the item.", "wp-seo-structured-data-schema")
1112
+ ),
1113
+ 'bestRating' => array(
1114
+ 'title' => __('Best rating', "wp-seo-structured-data-schema"),
1115
+ 'type' => 'number',
1116
+ 'attr' => 'step="any"',
1117
+ 'desc' => __("The highest value allowed in this rating system.", "wp-seo-structured-data-schema")
1118
+ ),
1119
+ 'worstRating' => array(
1120
+ 'title' => __('Worst rating', "wp-seo-structured-data-schema"),
1121
+ 'type' => 'number',
1122
+ 'attr' => 'step="any"',
1123
+ '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")
1124
+ ),
1125
+ 'publisher' => array(
1126
+ 'title' => __('Name of the organization', "wp-seo-structured-data-schema"),
1127
+ 'type' => 'text',
1128
+ 'desc' => __('The publisher of the review.', "wp-seo-structured-data-schema")
1129
+ )
1130
+ )
1131
+ ),
1132
+ 'aggregate_rating' => array(
1133
+ 'pro' => false,
1134
+ 'title' => __('Aggregate Ratings', "wp-seo-structured-data-schema"),
1135
+ 'fields' => array(
1136
+ 'active' => array(
1137
+ 'type' => 'checkbox'
1138
+ ),
1139
+ 'schema_type' => array(
1140
+ 'title' => __('Schema type', "wp-seo-structured-data-schema"),
1141
+ 'type' => 'schema_type',
1142
+ 'required' => true,
1143
+ 'options' => self::getSiteTypes(),
1144
+ 'empty' => "Select one",
1145
+ 'desc' => __("Use the most appropriate schema type for what is being reviewed.", "wp-seo-structured-data-schema")
1146
+ ),
1147
+ 'name' => array(
1148
+ 'title' => __('Name of the item', "wp-seo-structured-data-schema"),
1149
+ 'type' => 'text',
1150
+ 'required' => true,
1151
+ 'desc' => __("The item that is being rated.", "wp-seo-structured-data-schema")
1152
+ ),
1153
+ 'image' => array(
1154
+ 'title' => 'Image',
1155
+ 'type' => 'image',
1156
+ 'required' => true,
1157
+ 'holderClass' => 'kSeo-hidden aggregate-except-organization-holder'
1158
+ ),
1159
+ 'priceRange' => array(
1160
+ 'title' => 'Price Range',
1161
+ 'recommended' => true,
1162
+ 'type' => 'text',
1163
+ 'holderClass' => 'kSeo-hidden aggregate-except-organization-holder',
1164
+ 'desc' => __("The price range of the business, for example $$$.", "wp-seo-structured-data-schema")
1165
+ ),
1166
+ 'telephone' => array(
1167
+ 'title' => 'Telephone',
1168
+ 'recommended' => true,
1169
+ 'type' => 'text',
1170
+ 'holderClass' => 'kSeo-hidden aggregate-except-organization-holder'
1171
+ ),
1172
+ 'address' => array(
1173
+ 'title' => 'Address',
1174
+ 'recommended' => true,
1175
+ 'type' => 'text',
1176
+ 'holderClass' => 'kSeo-hidden aggregate-except-organization-holder',
1177
+ ),
1178
+ 'description' => array(
1179
+ 'title' => __('Description', "wp-seo-structured-data-schema"),
1180
+ 'type' => 'textarea',
1181
+ 'desc' => __("Description for thr review. New line is not supported.", "wp-seo-structured-data-schema")
1182
+ ),
1183
+ 'ratingCount' => array(
1184
+ 'title' => __('Rating Count', "wp-seo-structured-data-schema"),
1185
+ 'type' => 'number',
1186
+ 'attr' => 'step="any"',
1187
+ 'required' => true,
1188
+ '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")
1189
+ ),
1190
+ 'reviewCount' => array(
1191
+ 'title' => __('Review Count', "wp-seo-structured-data-schema"),
1192
+ 'type' => 'number',
1193
+ 'attr' => 'step="any"',
1194
+ 'required' => true,
1195
+ '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")
1196
+ ),
1197
+ 'ratingValue' => array(
1198
+ 'title' => __('Rating Value', "wp-seo-structured-data-schema"),
1199
+ 'attr' => 'step="any"',
1200
+ 'type' => 'number',
1201
+ 'required' => true,
1202
+ 'desc' => __("A numerical quality rating for the item.", "wp-seo-structured-data-schema")
1203
+ ),
1204
+ 'bestRating' => array(
1205
+ 'title' => __('Best Rating', "wp-seo-structured-data-schema"),
1206
+ 'type' => 'number',
1207
+ 'attr' => 'step="any"',
1208
+ 'required' => true,
1209
+ '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")
1210
+ ),
1211
+ 'worstRating' => array(
1212
+ 'title' => __('Worst Rating', "wp-seo-structured-data-schema"),
1213
+ 'type' => 'number',
1214
+ 'attr' => 'step="any"',
1215
+ 'required' => true,
1216
+ '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")
1217
+ )
1218
+ )
1219
+ ),
1220
+ 'restaurant' => array(
1221
+ 'pro' => false,
1222
+ 'title' => __('Restaurant', "wp-seo-structured-data-schema"),
1223
+ 'fields' => array(
1224
+ 'active' => array(
1225
+ 'type' => 'checkbox'
1226
+ ),
1227
+ 'name' => array(
1228
+ 'title' => __('Name of the Restaurant', "wp-seo-structured-data-schema"),
1229
+ 'type' => 'text',
1230
+ 'required' => true
1231
+ ),
1232
+ 'description' => array(
1233
+ 'title' => __('Description of the Restaurant', "wp-seo-structured-data-schema"),
1234
+ 'type' => 'textarea',
1235
+ 'desc' => esc_html__('New line is not supported.', "wp-seo-structured-data-schema")
1236
+ ),
1237
+ 'openingHours' => array(
1238
+ 'title' => __('Opening Hours', "wp-seo-structured-data-schema"),
1239
+ 'type' => 'textarea',
1240
+ 'desc' => __('Mo,Tu,We,Th,Fr,Sa,Su 11:30-23:00', "wp-seo-structured-data-schema")
1241
+ ),
1242
+ 'telephone' => array(
1243
+ 'title' => __('Telephone', "wp-seo-structured-data-schema"),
1244
+ 'type' => 'text',
1245
+ 'desc' => __('+155501003333', "wp-seo-structured-data-schema")
1246
+ ),
1247
+ 'menu' => array(
1248
+ 'title' => __('Menu', "wp-seo-structured-data-schema"),
1249
+ 'type' => 'text',
1250
+ 'desc' => __('http://example.com/menu', "wp-seo-structured-data-schema")
1251
+ ),
1252
+ 'image' => array(
1253
+ 'title' => __('Image', "wp-seo-structured-data-schema"),
1254
+ 'type' => 'image',
1255
+ 'required' => true
1256
+ ),
1257
+ 'address' => array(
1258
+ 'title' => __('Address', "wp-seo-structured-data-schema"),
1259
+ 'type' => 'textarea'
1260
+ ),
1261
+ 'priceRange' => array(
1262
+ 'title' => __('Price Range', "wp-seo-structured-data-schema"),
1263
+ 'type' => 'text',
1264
+ 'desc' => __('The price range of the business, for example $$$', "wp-seo-structured-data-schema")
1265
+ ),
1266
+ 'servesCuisine' => array(
1267
+ 'title' => __('Serves Cuisine', "wp-seo-structured-data-schema"),
1268
+ 'type' => 'text',
1269
+ 'desc' => __('The cuisine of the restaurant.', "wp-seo-structured-data-schema")
1270
+ )
1271
+ )
1272
+ ),
1273
+ 'localBusiness' => array(
1274
+ 'pro' => false,
1275
+ 'title' => __('Local Business', "wp-seo-structured-data-schema"),
1276
+ 'fields' => array(
1277
+ 'active' => array(
1278
+ 'type' => 'checkbox'
1279
+ ),
1280
+ 'name' => array(
1281
+ 'title' => __('Name', "wp-seo-structured-data-schema"),
1282
+ 'type' => 'text',
1283
+ 'required' => true
1284
+ ),
1285
+ 'description' => array(
1286
+ 'title' => __('Description', "wp-seo-structured-data-schema"),
1287
+ 'type' => 'textarea',
1288
+ 'desc' => esc_html__('New line is not supported.', "wp-seo-structured-data-schema")
1289
+ ),
1290
+ 'image' => array(
1291
+ 'title' => __('Business Logo', "wp-seo-structured-data-schema"),
1292
+ 'type' => 'image',
1293
+ 'required' => true
1294
+ ),
1295
+ 'priceRange' => array(
1296
+ 'title' => __('Price Range', "wp-seo-structured-data-schema"),
1297
+ 'type' => 'text',
1298
+ 'recommended' => true,
1299
+ 'desc' => __("The price range of the business, for example $$$.", "wp-seo-structured-data-schema")
1300
+ ),
1301
+ 'addressLocality' => array(
1302
+ 'title' => __('Address locality', "wp-seo-structured-data-schema"),
1303
+ 'type' => 'text',
1304
+ 'desc' => __('City (i.e Kansas city)', "wp-seo-structured-data-schema")
1305
+ ),
1306
+ 'addressRegion' => array(
1307
+ 'title' => __('Address region', "wp-seo-structured-data-schema"),
1308
+ 'type' => 'text',
1309
+ 'desc' => __('State (i.e. MO)', "wp-seo-structured-data-schema")
1310
+ ),
1311
+ 'postalCode' => array(
1312
+ 'title' => __('Postal code', "wp-seo-structured-data-schema"),
1313
+ 'type' => 'text',
1314
+ ),
1315
+ 'streetAddress' => array(
1316
+ 'title' => __('Street address', "wp-seo-structured-data-schema"),
1317
+ 'type' => 'text',
1318
+ ),
1319
+ 'telephone' => array(
1320
+ 'title' => __('Telephone', "wp-seo-structured-data-schema"),
1321
+ 'type' => 'text',
1322
+ 'recommended' => true,
1323
+ ),
1324
+ 'review_section' => array(
1325
+ 'title' => __('Review', "wp-seo-structured-data-schema"),
1326
+ 'type' => 'heading',
1327
+ 'desc' => __("To add review schema for this type, complete fields below and enable, others live blank.", "wp-seo-structured-data-schema")
1328
+ ),
1329
+ 'review_active' => array(
1330
+ 'type' => 'checkbox'
1331
+ ),
1332
+ 'review_author' => array(
1333
+ 'title' => __("Author", "wp-seo-structured-data-schema"),
1334
+ 'type' => 'text',
1335
+ 'required' => true
1336
+ ),
1337
+ 'review_author_sameAs' => array(
1338
+ 'title' => __("Author Same As profile link", "wp-seo-structured-data-schema"),
1339
+ 'type' => 'textarea',
1340
+ 'attr' => 'placeholder="https://facebook.com/example&#10;https://twitter.com/example"',
1341
+ 'required' => true,
1342
+ '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")
1343
+ ),
1344
+ 'review_body' => array(
1345
+ 'title' => __('Review body', "wp-seo-structured-data-schema"),
1346
+ 'type' => 'textarea',
1347
+ 'required' => true,
1348
+ 'desc' => __("The actual body of the review.", "wp-seo-structured-data-schema")
1349
+ ),
1350
+ 'review_datePublished' => array(
1351
+ 'title' => __('Date of Published', "wp-seo-structured-data-schema"),
1352
+ 'type' => 'text',
1353
+ 'class' => 'kcseo-date',
1354
+ 'desc' => __("Like this: 2021-12-25 14:20:00", "wp-seo-structured-data-schema")
1355
+ ),
1356
+ 'review_ratingValue' => array(
1357
+ 'title' => __('Rating value', "wp-seo-structured-data-schema"),
1358
+ 'type' => 'number',
1359
+ 'attr' => 'step="any"',
1360
+ 'desc' => __("A numerical quality rating for the item.", "wp-seo-structured-data-schema")
1361
+ ),
1362
+ 'review_bestRating' => array(
1363
+ 'title' => __('Best rating', "wp-seo-structured-data-schema"),
1364
+ 'type' => 'number',
1365
+ 'attr' => 'step="any"',
1366
+ 'desc' => __("The highest value allowed in this rating system.", "wp-seo-structured-data-schema")
1367
+ ),
1368
+ 'review_worstRating' => array(
1369
+ 'title' => __('Worst rating', "wp-seo-structured-data-schema"),
1370
+ 'type' => 'number',
1371
+ 'attr' => 'step="any"',
1372
+ '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")
1373
+ )
1374
+ )
1375
+ ),
1376
+ 'book' => array(
1377
+ 'pro' => true,
1378
+ 'title' => __("Book", "wp-seo-structured-data-schema"),
1379
+ ),
1380
+ 'course' => array(
1381
+ 'pro' => true,
1382
+ 'title' => __("Course", "wp-seo-structured-data-schema"),
1383
+ ),
1384
+ 'JobPosting' => array(
1385
+ 'pro' => true,
1386
+ 'title' => __("Job Posting", "wp-seo-structured-data-schema"),
1387
+ ),
1388
+ 'movie' => array(
1389
+ 'pro' => true,
1390
+ 'title' => __("Movie", "wp-seo-structured-data-schema"),
1391
+ ),
1392
+ 'music' => array(
1393
+ 'pro' => true,
1394
+ 'title' => __("Music", "wp-seo-structured-data-schema"),
1395
+ ),
1396
+ 'recipe' => array(
1397
+ 'pro' => true,
1398
+ 'title' => __("Recipe", "wp-seo-structured-data-schema"),
1399
+ ),
1400
+ 'TVEpisode' => array(
1401
+ 'pro' => true,
1402
+ 'title' => __("TVEpisode", "wp-seo-structured-data-schema"),
1403
+ ),
1404
+ 'question' => array(
1405
+ 'pro' => true,
1406
+ 'title' => __("QAPage", "wp-seo-structured-data-schema"),
1407
+ ),
1408
+ 'itemList' => array(
1409
+ 'pro' => true,
1410
+ 'title' => __("Item List", "wp-seo-structured-data-schema"),
1411
+ ),
1412
+ 'specialAnnouncement' => [
1413
+ 'title' => __('Special Announcement', "wp-seo-structured-data-schema"),
1414
+ 'fields' => [
1415
+ 'active' => [
1416
+ 'type' => 'checkbox'
1417
+ ],
1418
+ 'name' => [
1419
+ 'title' => __('Name', "wp-seo-structured-data-schema"),
1420
+ 'type' => 'text',
1421
+ 'desc' => __('SpecialAnnouncement.name: Name of the announcement. This text should be present on the underlying page.', "wp-seo-structured-data-schema"),
1422
+ 'required' => true
1423
+ ],
1424
+ 'url' => [
1425
+ 'title' => __('Page URL', "wp-seo-structured-data-schema"),
1426
+ 'type' => 'url',
1427
+ '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"),
1428
+ 'required' => true
1429
+ ],
1430
+ 'datePublished' => [
1431
+ 'title' => __('Published date', "wp-seo-structured-data-schema"),
1432
+ 'type' => 'text',
1433
+ 'class' => 'kcseo-date',
1434
+ 'desc' => __('Like this: 2021-12-25 14:20:00', "wp-seo-structured-data-schema"),
1435
+ 'required' => true
1436
+ ],
1437
+ 'expires' => [
1438
+ 'title' => __('Expires date', "wp-seo-structured-data-schema"),
1439
+ 'type' => 'text',
1440
+ 'class' => 'kcseo-date',
1441
+ 'desc' => __('Like this: 2021-12-25 14:20:00', "wp-seo-structured-data-schema"),
1442
+ 'recommended' => true,
1443
+ ],
1444
+ 'text' => [
1445
+ 'title' => __('Text', "wp-seo-structured-data-schema"),
1446
+ 'type' => 'textarea',
1447
+ 'desc' => __('SpecialAnnouncement.text: Text of the announcements.', "wp-seo-structured-data-schema"),
1448
+ 'required' => true
1449
+ ],
1450
+ 'locations' => [
1451
+ 'title' => __('Announcement Locations', "wp-seo-structured-data-schema"),
1452
+ 'type' => 'group',
1453
+ 'duplicate' => true,
1454
+ 'fields' => [
1455
+ 'location_heading' => [
1456
+ 'type' => 'heading',
1457
+ 'title' => __('Announcement Location', "wp-seo-structured-data-schema")
1458
+ ],
1459
+ 'type' => [
1460
+ 'title' => __('Type', "wp-seo-structured-data-schema"),
1461
+ 'type' => 'select',
1462
+ 'options' => self::announcementLocationTypes(),
1463
+ 'required' => true
1464
+ ],
1465
+ 'name' => [
1466
+ 'title' => __('Name', "wp-seo-structured-data-schema"),
1467
+ 'type' => 'text',
1468
+ 'desc' => __("SpecialAnnouncement.announcementLocation.name: ", "wp-seo-structured-data-schema"),
1469
+ 'recommended' => true,
1470
+ ],
1471
+ 'url' => [
1472
+ 'title' => __('URL', "wp-seo-structured-data-schema"),
1473
+ 'type' => 'url',
1474
+ 'recommended' => true,
1475
+ 'desc' => __("SpecialAnnouncement.announcementLocation.url: URL", "wp-seo-structured-data-schema")
1476
+ ],
1477
+ 'address_street' => [
1478
+ 'title' => __('Address: Street', "wp-seo-structured-data-schema"),
1479
+ 'type' => 'text',
1480
+ 'desc' => __('SpecialAnnouncement.announcementLocation.address.streetAddress: The street address. For example, 1600 Amphitheatre Pkwy.', "wp-seo-structured-data-schema"),
1481
+ 'recommended' => true,
1482
+ ],
1483
+ 'address_locality' => [
1484
+ 'title' => __('Address: Locality', "wp-seo-structured-data-schema"),
1485
+ 'type' => 'text',
1486
+ '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"),
1487
+ 'recommended' => true,
1488
+ ],
1489
+ 'address_post_code' => [
1490
+ 'title' => __('Address: Post Code', "wp-seo-structured-data-schema"),
1491
+ 'type' => 'text',
1492
+ 'desc' => __('SpecialAnnouncement.announcementLocation.address.postalCode: The postal code. For example, 94043.', "wp-seo-structured-data-schema"),
1493
+ 'recommended' => true,
1494
+ ],
1495
+ 'address_region' => [
1496
+ 'title' => __('Address: Region', "wp-seo-structured-data-schema"),
1497
+ 'type' => 'text',
1498
+ '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"),
1499
+ 'recommended' => true,
1500
+ ],
1501
+ 'address_country' => [
1502
+ 'title' => __('Address: Country', "wp-seo-structured-data-schema"),
1503
+ 'type' => 'text',
1504
+ '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"),
1505
+ 'recommended' => true,
1506
+ ],
1507
+ 'id' => [
1508
+ 'title' => __('ID', "wp-seo-structured-data-schema"),
1509
+ 'type' => 'text',
1510
+ '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"),
1511
+ ],
1512
+ 'image' => array(
1513
+ 'title' => __('Image', "wp-seo-structured-data-schema"),
1514
+ 'type' => 'image'
1515
+ ),
1516
+ 'priceRange' => array(
1517
+ 'title' => 'Price Range (Recommended)',
1518
+ 'type' => 'text',
1519
+ 'recommended' => true,
1520
+ 'desc' => __("The price range of the business, for example $$$.", "wp-seo-structured-data-schema")
1521
+ ),
1522
+ 'telephone' => array(
1523
+ 'title' => 'Telephone (Recommended)',
1524
+ 'type' => 'text',
1525
+ 'recommended' => true
1526
+ )
1527
+ ]
1528
+ ],
1529
+ ]
1530
+ ]
1531
+ );
1532
+
1533
+ return apply_filters('kcseo_schema_types', $schemas);
1534
+ }
1535
+
1536
+ static function getSiteTypes() {
1537
+ $siteTypes = array(
1538
+ 'Organization',
1539
+ 'LocalBusiness' => array(
1540
+ 'AnimalShelter',
1541
+ 'AutomotiveBusiness' => array(
1542
+ 'AutoBodyShop',
1543
+ 'AutoDealer',
1544
+ 'AutoPartsStore',
1545
+ 'AutoRental',
1546
+ 'AutoRepair',
1547
+ 'AutoWash',
1548
+ 'GasStation',
1549
+ 'MotorcycleDealer',
1550
+ 'MotorcycleRepair'
1551
+ ),
1552
+ 'ChildCare',
1553
+ 'DryCleaningOrLaundry',
1554
+ 'EmergencyService',
1555
+ 'EmploymentAgency',
1556
+ 'EntertainmentBusiness' => array(
1557
+ 'AdultEntertainment',
1558
+ 'AmusementPark',
1559
+ 'ArtGallery',
1560
+ 'Casino',
1561
+ 'ComedyClub',
1562
+ 'MovieTheater',
1563
+ 'NightClub',
1564
+
1565
+ ),
1566
+ 'FinancialService' => array(
1567
+ 'AccountingService',
1568
+ 'AutomatedTeller',
1569
+ 'BankOrCreditUnion',
1570
+ 'InsuranceAgency',
1571
+ ),
1572
+ 'FoodEstablishment' => array(
1573
+ 'Bakery',
1574
+ 'BarOrPub',
1575
+ 'Brewery',
1576
+ 'CafeOrCoffeeShop',
1577
+ 'FastFoodRestaurant',
1578
+ 'IceCreamShop',
1579
+ 'Restaurant',
1580
+ 'Winery',
1581
+ ),
1582
+ 'GovernmentOffice',
1583
+ 'HealthAndBeautyBusiness' => array(
1584
+ 'BeautySalon',
1585
+ 'DaySpa',
1586
+ 'HairSalon',
1587
+ 'HealthClub',
1588
+ 'NailSalon',
1589
+ 'TattooParlor',
1590
+ ),
1591
+ 'HomeAndConstructionBusiness' => array(
1592
+ 'Electrician',
1593
+ 'GeneralContractor',
1594
+ 'HVACBusiness',
1595
+ 'HousePainter',
1596
+ 'Locksmith',
1597
+ 'MovingCompany',
1598
+ 'Plumber',
1599
+ 'RoofingContractor',
1600
+ ),
1601
+ 'InternetCafe',
1602
+ 'LegalService' => array(
1603
+ 'Attorney',
1604
+ 'Notary',
1605
+ ),
1606
+ 'Library',
1607
+ 'MedicalBusiness' => array(
1608
+ 'CommunityHealth',
1609
+ 'Dentist',
1610
+ 'Dermatology',
1611
+ 'DietNutrition',
1612
+ 'Emergency',
1613
+ 'Geriatric',
1614
+ 'Gynecologic',
1615
+ 'MedicalClinic',
1616
+ 'Midwifery',
1617
+ 'Nursing',
1618
+ 'Obstetric',
1619
+ 'Oncologic',
1620
+ 'Optician',
1621
+ 'Optometric',
1622
+ 'Otolaryngologic',
1623
+ 'Pediatric',
1624
+ 'Pharmacy',
1625
+ 'Physician',
1626
+ 'Physiotherapy',
1627
+ 'PlasticSurgery',
1628
+ 'Podiatric',
1629
+ 'PrimaryCare',
1630
+ 'Psychiatric',
1631
+ 'PublicHealth',
1632
+ ),
1633
+ 'LodgingBusiness' => array(
1634
+ 'BedAndBreakfast',
1635
+ 'Campground',
1636
+ 'Hostel',
1637
+ 'Hotel',
1638
+ 'Motel',
1639
+ 'Resort',
1640
+ ),
1641
+ 'ProfessionalService',
1642
+ 'RadioStation',
1643
+ 'RealEstateAgent',
1644
+ 'RecyclingCenter',
1645
+ 'SelfStorage',
1646
+ 'ShoppingCenter',
1647
+ 'SportsActivityLocation' => array(
1648
+ 'BowlingAlley',
1649
+ 'ExerciseGym',
1650
+ 'GolfCourse',
1651
+ 'HealthClub',
1652
+ 'PublicSwimmingPool',
1653
+ 'SkiResort',
1654
+ 'SportsClub',
1655
+ 'StadiumOrArena',
1656
+ 'TennisComplex',
1657
+ ),
1658
+ 'Store' => array(
1659
+ 'AutoPartsStore',
1660
+ 'BikeStore',
1661
+ 'BookStore',
1662
+ 'ClothingStore',
1663
+ 'ComputerStore',
1664
+ 'ConvenienceStore',
1665
+ 'DepartmentStore',
1666
+ 'ElectronicsStore',
1667
+ 'Florist',
1668
+ 'FurnitureStore',
1669
+ 'GardenStore',
1670
+ 'GroceryStore',
1671
+ 'HardwareStore',
1672
+ 'HobbyShop',
1673
+ 'HomeGoodsStore',
1674
+ 'JewelryStore',
1675
+ 'LiquorStore',
1676
+ 'MensClothingStore',
1677
+ 'MobilePhoneStore',
1678
+ 'MovieRentalStore',
1679
+ 'MusicStore',
1680
+ 'OfficeEquipmentStore',
1681
+ 'OutletStore',
1682
+ 'PawnShop',
1683
+ 'PetStore',
1684
+ 'ShoeStore',
1685
+ 'SportingGoodsStore',
1686
+ 'TireShop',
1687
+ 'ToyStore',
1688
+ 'WholesaleStore'
1689
+ ),
1690
+ 'TelevisionStation',
1691
+ 'TouristInformationCenter',
1692
+ 'TravelAgency'
1693
+ ),
1694
+ 'NGO' => array(),
1695
+ );
1696
+
1697
+ return apply_filters('kcseo_site_types', $siteTypes);
1698
+ }
1699
+
1700
+ static function getCountryList() {
1701
+ $countryList = array(
1702
+ "AF" => "Afghanistan",
1703
+ "AX" => "Aland Islands",
1704
+ "AL" => "Albania",
1705
+ "DZ" => "Algeria",
1706
+ "AS" => "American Samoa",
1707
+ "AD" => "Andorra",
1708
+ "AO" => "Angola",
1709
+ "AI" => "Anguilla",
1710
+ "AQ" => "Antarctica",
1711
+ "AG" => "Antigua and Barbuda",
1712
+ "AR" => "Argentina",
1713
+ "AM" => "Armenia",
1714
+ "AW" => "Aruba",
1715
+ "AU" => "Australia",
1716
+ "AT" => "Austria",
1717
+ "AZ" => "Azerbaijan",
1718
+ "BS" => "Bahamas",
1719
+ "BH" => "Bahrain",
1720
+ "BD" => "Bangladesh",
1721
+ "BB" => "Barbados",
1722
+ "BY" => "Belarus",
1723
+ "BE" => "Belgium",
1724
+ "BZ" => "Belize",
1725
+ "BJ" => "Benin",
1726
+ "BM" => "Bermuda",
1727
+ "BT" => "Bhutan",
1728
+ "BO" => "Bolivia, Plurinational State of",
1729
+ "BQ" => "Bonaire, Sint Eustatius and Saba",
1730
+ "BA" => "Bosnia and Herzegovina",
1731
+ "BW" => "Botswana",
1732
+ "BV" => "Bouvet Island",
1733
+ "BR" => "Brazil",
1734
+ "IO" => "British Indian Ocean Territory",
1735
+ "BN" => "Brunei Darussalam",
1736
+ "BG" => "Bulgaria",
1737
+ "BF" => "Burkina Faso",
1738
+ "BI" => "Burundi",
1739
+ "KH" => "Cambodia",
1740
+ "CM" => "Cameroon",
1741
+ "CA" => "Canada",
1742
+ "CV" => "Cape Verde",
1743
+ "KY" => "Cayman Islands",
1744
+ "CF" => "Central African Republic",
1745
+ "TD" => "Chad",
1746
+ "CL" => "Chile",
1747
+ "CN" => "China",
1748
+ "CX" => "Christmas Island",
1749
+ "CC" => "Cocos (Keeling) Islands",
1750
+ "CO" => "Colombia",
1751
+ "KM" => "Comoros",
1752
+ "CG" => "Congo",
1753
+ "CD" => "Congo, the Democratic Republic of the",
1754
+ "CK" => "Cook Islands",
1755
+ "CR" => "Costa Rica",
1756
+ "CI" => "Côte d Ivoire",
1757
+ "HR" => "Croatia",
1758
+ "CU" => "Cuba",
1759
+ "CW" => "Curaçao",
1760
+ "CY" => "Cyprus",
1761
+ "CZ" => "Czech Republic",
1762
+ "DK" => "Denmark",
1763
+ "DJ" => "Djibouti",
1764
+ "DM" => "Dominica",
1765
+ "DO" => "Dominican Republic",
1766
+ "EC" => "Ecuador",
1767
+ "EG" => "Egypt",
1768
+ "SV" => "El Salvador",
1769
+ "GQ" => "Equatorial Guinea",
1770
+ "ER" => "Eritrea",
1771
+ "EE" => "Estonia",
1772
+ "ET" => "Ethiopia",
1773
+ "FK" => "Falkland Islands (Malvinas)",
1774
+ "FO" => "Faroe Islands",
1775
+ "FJ" => "Fiji",
1776
+ "FI" => "Finland",
1777
+ "FR" => "France",
1778
+ "GF" => "French Guiana",
1779
+ "PF" => "French Polynesia",
1780
+ "TF" => "French Southern Territories",
1781
+ "GA" => "Gabon",
1782
+ "GM" => "Gambia",
1783
+ "GE" => "Georgia",
1784
+ "DE" => "Germany",
1785
+ "GH" => "Ghana",
1786
+ "GI" => "Gibraltar",
1787
+ "GR" => "Greece",
1788
+ "GL" => "Greenland",
1789
+ "GD" => "Grenada",
1790
+ "GP" => "Guadeloupe",
1791
+ "GU" => "Guam",
1792
+ "GT" => "Guatemala",
1793
+ "GG" => "Guernsey",
1794
+ "GN" => "Guinea",
1795
+ "GW" => "Guinea-Bissau",
1796
+ "GY" => "Guyana",
1797
+ "HT" => "Haiti",
1798
+ "HM" => "Heard Island and McDonald Islands",
1799
+ "VA" => "Holy See (Vatican City State)",
1800
+ "HN" => "Honduras",
1801
+ "HK" => "Hong Kong",
1802
+ "HU" => "Hungary",
1803
+ "IS" => "Iceland",
1804
+ "IN" => "India",
1805
+ "ID" => "Indonesia",
1806
+ "IR" => "Iran, Islamic Republic of",
1807
+ "IQ" => "Iraq",
1808
+ "IE" => "Ireland",
1809
+ "IM" => "Isle of Man",
1810
+ "IL" => "Israel",
1811
+ "IT" => "Italy",
1812
+ "JM" => "Jamaica",
1813
+ "JP" => "Japan",
1814
+ "JE" => "Jersey",
1815
+ "JO" => "Jordan",
1816
+ "KZ" => "Kazakhstan",
1817
+ "KE" => "Kenya",
1818
+ "KI" => "Kiribati",
1819
+ "KP" => "Korea, Democratic People's Republic of",
1820
+ "KR" => "Korea, Republic of,",
1821
+ "KW" => "Kuwait",
1822
+ "KG" => "Kyrgyzstan",
1823
+ "LA" => "Lao Peoples Democratic Republic",
1824
+ "LV" => "Latvia",
1825
+ "LB" => "Lebanon",
1826
+ "LS" => "Lesotho",
1827
+ "LR" => "Liberia",
1828
+ "LY" => "Libya",
1829
+ "LI" => "Liechtenstein",
1830
+ "LT" => "Lithuania",
1831
+ "LU" => "Luxembourg",
1832
+ "MO" => "Macao",
1833
+ "MK" => "Macedonia, the former Yugoslav Republic of",
1834
+ "MG" => "Madagascar",
1835
+ "MW" => "Malawi",
1836
+ "MY" => "Malaysia",
1837
+ "MV" => "Maldives",
1838
+ "ML" => "Mali",
1839
+ "MT" => "Malta",
1840
+ "MH" => "Marshall Islands",
1841
+ "MQ" => "Martinique",
1842
+ "MR" => "Mauritania",
1843
+ "MU" => "Mauritius",
1844
+ "YT" => "Mayotte",
1845
+ "MX" => "Mexico",
1846
+ "FM" => "Micronesia, Federated States of",
1847
+ "MD" => "Moldova, Republic of",
1848
+ "MC" => "Monaco",
1849
+ "MN" => "Mongolia",
1850
+ "ME" => "Montenegro",
1851
+ "MS" => "Montserrat",
1852
+ "MA" => "Morocco",
1853
+ "MZ" => "Mozambique",
1854
+ "MM" => "Myanmar",
1855
+ "NA" => "Namibia",
1856
+ "NR" => "Nauru",
1857
+ "NP" => "Nepal",
1858
+ "NL" => "Netherlands",
1859
+ "NC" => "New Caledonia",
1860
+ "NZ" => "New Zealand",
1861
+ "NI" => "Nicaragua",
1862
+ "NE" => "Niger",
1863
+ "NG" => "Nigeria",
1864
+ "NU" => "Niue",
1865
+ "NF" => "Norfolk Island",
1866
+ "MP" => "Northern Mariana Islands",
1867
+ "NO" => "Norway",
1868
+ "OM" => "Oman",
1869
+ "PK" => "Pakistan",
1870
+ "PW" => "Palau",
1871
+ "PS" => "Palestine, State of",
1872
+ "PA" => "Panama",
1873
+ "PG" => "Papua New Guinea",
1874
+ "PY" => "Paraguay",
1875
+ "PE" => "Peru",
1876
+ "PH" => "Philippines",
1877
+ "PN" => "Pitcairn",
1878
+ "PL" => "Poland",
1879
+ "PT" => "Portugal",
1880
+ "PR" => "Puerto Rico",
1881
+ "QA" => "Qatar",
1882
+ "RE" => "Reunion",
1883
+ "RO" => "Romania",
1884
+ "RU" => "Russian Federation",
1885
+ "RW" => "Rwanda",
1886
+ "BL" => "Saint Barthélemy",
1887
+ "SH" => "Saint Helena, Ascension and Tristan da Cunha",
1888
+ "KN" => "Saint Kitts and Nevis",
1889
+ "LC" => "Saint Lucia",
1890
+ "MF" => "Saint Martin (French part)",
1891
+ "PM" => "Saint Pierre and Miquelon",
1892
+ "VC" => "Saint Vincent and the Grenadines",
1893
+ "WS" => "Samoa",
1894
+ "SM" => "San Marino",
1895
+ "ST" => "Sao Tome and Principe",
1896
+ "SA" => "Saudi Arabia",
1897
+ "SN" => "Senegal",
1898
+ "RS" => "Serbia",
1899
+ "SC" => "Seychelles",
1900
+ "SL" => "Sierra Leone",
1901
+ "SG" => "Singapore",
1902
+ "SX" => "Sint Maarten (Dutch part)",
1903
+ "SK" => "Slovakia",
1904
+ "SI" => "Slovenia",
1905
+ "SB" => "Solomon Islands",
1906
+ "SO" => "Somalia",
1907
+ "ZA" => "South Africa",
1908
+ "GS" => "South Georgia and the South Sandwich Islands",
1909
+ "SS" => "South Sudan",
1910
+ "ES" => "Spain",
1911
+ "LK" => "Sri Lanka",
1912
+ "SD" => "Sudan",
1913
+ "SR" => "Suriname",
1914
+ "SJ" => "Svalbard and Jan Mayen",
1915
+ "SZ" => "Swaziland",
1916
+ "SE" => "Sweden",
1917
+ "CH" => "Switzerland",
1918
+ "SY" => "Syrian Arab Republic",
1919
+ "TW" => "Taiwan, Province of China",
1920
+ "TJ" => "Tajikistan",
1921
+ "TZ" => "Tanzania, United Republic of",
1922
+ "TH" => "Thailand",
1923
+ "TL" => "Timor-Leste",
1924
+ "TG" => "Togo",
1925
+ "TK" => "Tokelau",
1926
+ "TO" => "Tonga",
1927
+ "TT" => "Trinidad and Tobago",
1928
+ "TN" => "Tunisia",
1929
+ "TR" => "Turkey",
1930
+ "TM" => "Turkmenistan",
1931
+ "TC" => "Turks and Caicos Islands",
1932
+ "TV" => "Tuvalu",
1933
+ "UG" => "Uganda",
1934
+ "UA" => "Ukraine",
1935
+ "AE" => "United Arab Emirates",
1936
+ "GB" => "United Kingdom",
1937
+ "US" => "United States",
1938
+ "UM" => "United States Minor Outlying Islands",
1939
+ "UY" => "Uruguay",
1940
+ "UZ" => "Uzbekistan",
1941
+ "VU" => "Vanuatu",
1942
+ "VE" => "Venezuela, Bolivarian Republic of",
1943
+ "VN" => "Viet Nam",
1944
+ "VG" => "Virgin Islands, British",
1945
+ "VI" => "Virgin Islands, U.S.",
1946
+ "WF" => "Wallis and Futuna",
1947
+ "EH" => "Western Sahara",
1948
+ "YE" => "Yemen",
1949
+ "ZM" => "Zambia",
1950
+ "ZW" => "Zimbabwe",
1951
+ );
1952
+
1953
+ return apply_filters('kcseo_country_list', $countryList);
1954
+ }
1955
+
1956
+ static function getContactTypes() {
1957
+ $contact_types = array(
1958
+ "customer service",
1959
+ "customer support",
1960
+ "technical support",
1961
+ "billing support",
1962
+ "bill payment",
1963
+ "sales",
1964
+ "reservations",
1965
+ "credit card support",
1966
+ "emergency",
1967
+ "baggage tracking",
1968
+ "roadside assistance",
1969
+ "package tracking"
1970
+ );
1971
+
1972
+ return apply_filters('kcseo_contact_types', $contact_types);
1973
+ }
1974
+
1975
+ static function getLanguageList() {
1976
+ $language_list = array(
1977
+ "Akan",
1978
+ "Amharic",
1979
+ "Arabic",
1980
+ "Assamese",
1981
+ "Awadhi",
1982
+ "Azerbaijani",
1983
+ "Balochi",
1984
+ "Belarusian",
1985
+ "Bengali",
1986
+ "Bhojpuri",
1987
+ "Burmese",
1988
+ "Cantonese",
1989
+ "Cebuano",
1990
+ "Chewa",
1991
+ "Chhattisgarhi",
1992
+ "Chittagonian",
1993
+ "Czech",
1994
+ "Deccan",
1995
+ "Dhundhari",
1996
+ "Dutch",
1997
+ "English",
1998
+ "French",
1999
+ "Fula",
2000
+ "Gan",
2001
+ "German",
2002
+ "Greek",
2003
+ "Gujarati",
2004
+ "Haitian Creole",
2005
+ "Hakka",
2006
+ "Haryanvi",
2007
+ "Hausa",
2008
+ "Hiligaynon",
2009
+ "Hindi / Urdu",
2010
+ "Hmong",
2011
+ "Hungarian",
2012
+ "Igbo",
2013
+ "Ilokano",
2014
+ "Italian",
2015
+ "Japanese",
2016
+ "Javanese",
2017
+ "Jin",
2018
+ "Kannada",
2019
+ "Kazakh",
2020
+ "Khmer",
2021
+ "Kinyarwanda",
2022
+ "Kirundi",
2023
+ "Konkani",
2024
+ "Korean",
2025
+ "Kurdish",
2026
+ "Madurese",
2027
+ "Magahi",
2028
+ "Maithili",
2029
+ "Malagasy",
2030
+ "Malay/Indonesian",
2031
+ "Malayalam",
2032
+ "Mandarin",
2033
+ "Marathi",
2034
+ "Marwari",
2035
+ "Min Bei",
2036
+ "Min Dong",
2037
+ "Min Nan",
2038
+ "Mossi",
2039
+ "Nepali",
2040
+ "Oriya",
2041
+ "Oromo",
2042
+ "Pashto",
2043
+ "Persian",
2044
+ "Polish",
2045
+ "Portuguese",
2046
+ "Punjabi",
2047
+ "Quechua",
2048
+ "Romanian",
2049
+ "Russian",
2050
+ "Saraiki",
2051
+ "Serbo-Croatian",
2052
+ "Shona",
2053
+ "Sindhi",
2054
+ "Sinhalese",
2055
+ "Somali",
2056
+ "Spanish",
2057
+ "Sundanese",
2058
+ "Swahili",
2059
+ "Swedish",
2060
+ "Sylheti",
2061
+ "Tagalog",
2062
+ "Tamil",
2063
+ "Telugu",
2064
+ "Thai",
2065
+ "Turkish",
2066
+ "Ukrainian",
2067
+ "Uyghur",
2068
+ "Uzbek",
2069
+ "Vietnamese",
2070
+ "Wu",
2071
+ "Xhosa",
2072
+ "Xiang",
2073
+ "Yoruba",
2074
+ "Zulu",
2075
+ );
2076
+
2077
+ return apply_filters('kcseo_language_list', $language_list);
2078
+ }
2079
+
2080
+ static function getSocialList() {
2081
+ $socialList = array(
2082
+ 'facebook' => __('Facebook'),
2083
+ 'twitter' => __('Twitter'),
2084
+ 'google-plus' => __('Google+'),
2085
+ 'instagram' => __('Instagram'),
2086
+ 'youtube' => __('Youtube'),
2087
+ 'linkedin' => __('LinkedIn'),
2088
+ 'myspace' => __('Myspace'),
2089
+ 'pinterest' => __('Pinterest'),
2090
+ 'soundcloud' => __('SoundCloud'),
2091
+ 'tumblr' => __('Tumblr'),
2092
+ 'wikidata' => __('Wikidata'),
2093
+ );
2094
+
2095
+ return apply_filters('kcseo_social_list', $socialList);
2096
+ }
2097
+
2098
+
2099
+ static function announcementLocationTypes() {
2100
+ return apply_filters('kcseo_announcement_location_types', [
2101
+ 'Airport',
2102
+ 'Aquarium',
2103
+ 'Beach',
2104
+ 'Bridge',
2105
+ 'BuddhistTemple',
2106
+ 'BusStation',
2107
+ 'BusStop',
2108
+ 'Campground',
2109
+ 'CatholicChurch',
2110
+ 'Cemetery',
2111
+ 'Church',
2112
+ 'CivicStructure',
2113
+ 'CityHall',
2114
+ 'CollegeOrUniversity',
2115
+ 'Courthouse',
2116
+ 'CovidTestingFacility',
2117
+ 'Crematorium',
2118
+ 'DefenceEstablishment',
2119
+ 'EducationalOrganization',
2120
+ 'ElementarySchool',
2121
+ 'Embassy',
2122
+ 'EventVenue',
2123
+ 'FireStation',
2124
+ 'GovernmentBuilding',
2125
+ 'HighSchool',
2126
+ 'HinduTemple',
2127
+ 'Hospital',
2128
+ 'LegislativeBuilding',
2129
+ 'MiddleSchool',
2130
+ 'Mosque',
2131
+ 'MovieTheater',
2132
+ 'Museum',
2133
+ 'MusicVenue',
2134
+ 'Park',
2135
+ 'ParkingFacility',
2136
+ 'PerformingArtsTheater',
2137
+ 'PlaceOfWorship',
2138
+ 'Playground',
2139
+ 'PoliceStation',
2140
+ 'Preschool',
2141
+ 'RVPark',
2142
+ 'School',
2143
+ 'StadiumOrArena',
2144
+ 'SubwayStation',
2145
+ 'Synagogue',
2146
+ 'TaxiStand',
2147
+ 'TrainStation',
2148
+ 'Zoo',
2149
+ ]);
2150
+ }
2151
+
2152
+ static function getReviewNotice() {
2153
+ $html = null;
2154
+ $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>
2155
+ <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>
2156
+ <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>
2157
+ <span style="display: block;margin: 0 auto;max-width: 800px;">1. Simple uncheck the "enable" tab in this section<br>
2158
+ 2. Update the page or post to remove the review schema.<br>
2159
+ 3. Then re-add new review schema within the appropriet type tab(i.e. book, course, event, movie, product, recipe, etc)</span>
2160
+ <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>';
2161
+
2162
+ return $html;
2163
+ }
2164
+
2165
  }
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,1202 +1,1202 @@
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
-
396
- if (!empty($metaData['organizer'])) {
397
- $event['organizer'] = [
398
- "@type" => "Organization",
399
- "name" =>$KcSeoWPSchema->sanitizeOutPut($metaData['organizer'], 'text'),
400
- "url" => $KcSeoWPSchema->sanitizeOutPut($metaData['organizerUrl'], 'url')
401
- ];
402
- }
403
- if (!empty($metaData['eventStatus'])) {
404
- $event['eventStatus'] = $KcSeoWPSchema->sanitizeOutPut($metaData['eventStatus']);
405
- }
406
- if (!empty($metaData['EventAttendanceMode'])) {
407
- $event['EventAttendanceMode'] = $KcSeoWPSchema->sanitizeOutPut($metaData['EventAttendanceMode']);
408
- }
409
-
410
- if (!empty($metaData['locationName'])) {
411
- $event["location"] = array(
412
- "@type" => "Place",
413
- "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['locationName']),
414
- "address" => $KcSeoWPSchema->sanitizeOutPut($metaData['locationAddress'])
415
- );
416
- }
417
- if (!empty($metaData['price'])) {
418
- $event["offers"] = array(
419
- "@type" => "Offer",
420
- "price" => $KcSeoWPSchema->sanitizeOutPut($metaData['price'])
421
- );
422
- if (!empty($metaData['priceCurrency'])) {
423
- $event["offers"]['priceCurrency'] = $KcSeoWPSchema->sanitizeOutPut($metaData['priceCurrency']);
424
- }
425
- if (!empty($metaData['url'])) {
426
- $event["offers"]['url'] = $KcSeoWPSchema->sanitizeOutPut($metaData['url'], 'url');
427
- }
428
- if (!empty($metaData['availability'])) {
429
- $event["offers"]['availability'] = $KcSeoWPSchema->sanitizeOutPut($metaData['availability']);
430
- }
431
- if (!empty($metaData['validFrom'])) {
432
- $event["offers"]['validFrom'] = $KcSeoWPSchema->sanitizeOutPut($metaData['validFrom']);
433
- }
434
- }
435
- if (!empty($metaData['url'])) {
436
- $event["url"] = $KcSeoWPSchema->sanitizeOutPut($metaData['url'], 'url');
437
- }
438
-
439
- $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_event', $event, $metaData));
440
- if (isset($metaData['review_active'])) {
441
- $event_review = array(
442
- "@context" => "https://schema.org",
443
- "@type" => "Review"
444
- );
445
-
446
- if (isset($metaData['review_datePublished']) && !empty($metaData['review_datePublished'])) {
447
- $event_review["datePublished"] = $KcSeoWPSchema->sanitizeOutPut($metaData['review_datePublished']);
448
- }
449
- if (isset($metaData['review_body']) && !empty($metaData['review_body'])) {
450
- $event_review["reviewBody"] = $KcSeoWPSchema->sanitizeOutPut($metaData['review_body'], 'textarea');
451
- }
452
- unset($event['@context']);
453
- $event_review["itemReviewed"] = $event;
454
- if (!empty($metaData['review_author'])) {
455
- $event_review["author"] = array(
456
- "@type" => "Person",
457
- "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['review_author'])
458
- );
459
-
460
- if (isset($metaData['review_author_sameAs']) && !empty($metaData['review_author_sameAs'])) {
461
- $sameAs = KcSeoHelper::get_same_as($KcSeoWPSchema->sanitizeOutPut($metaData['review_author_sameAs'], "textarea"));
462
- if (!empty($sameAs)) {
463
- $event_review["author"]["sameAs"] = $sameAs;
464
- }
465
- }
466
- }
467
- if (isset($metaData['review_ratingValue'])) {
468
- $event_review["reviewRating"] = array(
469
- "@type" => "Rating",
470
- "ratingValue" => $KcSeoWPSchema->sanitizeOutPut($metaData['review_ratingValue'], 'number')
471
- );
472
- if (isset($metaData['review_bestRating'])) {
473
- $event_review["reviewRating"]["bestRating"] = $KcSeoWPSchema->sanitizeOutPut($metaData['review_bestRating'], 'number');
474
- }
475
- if (isset($metaData['review_worstRating'])) {
476
- $event_review["reviewRating"]["worstRating"] = $KcSeoWPSchema->sanitizeOutPut($metaData['review_worstRating'], 'number');
477
- }
478
- }
479
-
480
-
481
- $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_event_review', $event_review, $metaData));
482
- }
483
- break;
484
-
485
- case 'product':
486
- $product = array(
487
- "@context" => "https://schema.org",
488
- "@type" => "Product"
489
- );
490
- if (!empty($metaData['name'])) {
491
- $product["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
492
- }
493
- if (!empty($metaData['image'])) {
494
- $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
495
- $product["image"] = $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url');
496
- }
497
- if (!empty($metaData['description'])) {
498
- $product["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description']);
499
- }
500
- /* product identifier */
501
- if (!empty($metaData['sku'])) {
502
- $product["sku"] = $KcSeoWPSchema->sanitizeOutPut($metaData['sku']);
503
- }
504
- if (!empty($metaData['brand'])) {
505
- $product['brand'] = [
506
- "@type" => "Brand",
507
- "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['brand'])
508
- ];
509
- }
510
- if (!empty($metaData['identifier_type']) && !empty($metaData['identifier'])) {
511
- $product[$metaData['identifier_type']] = $KcSeoWPSchema->sanitizeOutPut($metaData['identifier']);
512
- }
513
- if (!empty($metaData['ratingValue'])) {
514
- $product["aggregateRating"] = array(
515
- "@type" => "AggregateRating",
516
- "ratingValue" => !empty($metaData['ratingValue']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['ratingValue']) : null,
517
- "reviewCount" => !empty($metaData['reviewCount']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['reviewCount']) : null
518
- );
519
- }
520
- if (!empty($metaData['reviewRatingValue']) || !empty($metaData['reviewBestRating']) || !empty($metaData['reviewWorstRating'])) {
521
- $product["review"] = array(
522
- "@type" => "Review",
523
- "reviewRating" => array(
524
- "@type" => "Rating",
525
- "ratingValue" => !empty($metaData['reviewRatingValue']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['reviewRatingValue']) : null,
526
- "bestRating" => !empty($metaData['reviewBestRating']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['reviewBestRating']) : null,
527
- "worstRating" => !empty($metaData['reviewWorstRating']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['reviewWorstRating']) : null
528
- ),
529
- "author" => array(
530
- "@type" => "Person",
531
- "name" => !empty($metaData['reviewAuthor']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['reviewAuthor']) : null
532
- )
533
- );
534
- }
535
- if (!empty($metaData['price'])) {
536
- $product["offers"] = array(
537
- "@type" => "Offer",
538
- "price" => $KcSeoWPSchema->sanitizeOutPut($metaData['price']),
539
- "priceValidUntil" => $KcSeoWPSchema->sanitizeOutPut($metaData['priceValidUntil']),
540
- "priceCurrency" => !empty($metaData['priceCurrency']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['priceCurrency']) : null,
541
- "itemCondition" => !empty($metaData['itemCondition']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['itemCondition']) : null,
542
- "availability" => !empty($metaData['availability']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['availability']) : null,
543
- "url" => !empty($metaData['url']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['url']) : null
544
- );
545
- }
546
- $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_product', $product, $metaData));
547
- break;
548
-
549
- case 'video':
550
- $video = array(
551
- "@context" => "https://schema.org",
552
- "@type" => "VideoObject"
553
- );
554
- if (!empty($metaData['name'])) {
555
- $video["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
556
- }
557
- if (!empty($metaData['description'])) {
558
- $video["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'], 'textarea');
559
- }
560
- if (!empty($metaData['thumbnailUrl'])) {
561
- $video["thumbnailUrl"] = $KcSeoWPSchema->sanitizeOutPut($metaData['thumbnailUrl'], 'url');
562
- }
563
- if (!empty($metaData['uploadDate'])) {
564
- $video["uploadDate"] = $KcSeoWPSchema->sanitizeOutPut($metaData['uploadDate']);
565
- }
566
- if (!empty($metaData['duration'])) {
567
- $video["duration"] = $KcSeoWPSchema->sanitizeOutPut($metaData['duration']);
568
- }
569
- if (!empty($metaData['contentUrl'])) {
570
- $video["contentUrl"] = $KcSeoWPSchema->sanitizeOutPut($metaData['contentUrl'], 'url');
571
- }
572
- if (!empty($metaData['embedUrl'])) {
573
- $video["embedUrl"] = $KcSeoWPSchema->sanitizeOutPut($metaData['embedUrl'], 'url');
574
- }
575
- if (!empty($metaData['interactionCount'])) {
576
- $video["interactionCount"] = $KcSeoWPSchema->sanitizeOutPut($metaData['interactionCount']);
577
- }
578
- if (!empty($metaData['expires'])) {
579
- $video["expires"] = $KcSeoWPSchema->sanitizeOutPut($metaData['expires']);
580
- }
581
- $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_video', $video, $metaData));
582
- break;
583
-
584
- case 'audio':
585
- $audio = array(
586
- "@context" => "https://schema.org",
587
- "@type" => "AudioObject"
588
- );
589
- if (!empty($metaData['name'])) {
590
- $audio["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
591
- }
592
- if (!empty($metaData['description'])) {
593
- $audio["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'], 'textarea');
594
- }
595
- if (!empty($metaData['contentUrl'])) {
596
- $audio["contentUrl"] = $KcSeoWPSchema->sanitizeOutPut($metaData['contentUrl'], 'url');
597
- }
598
- if (!empty($metaData['duration'])) {
599
- $audio["duration"] = $KcSeoWPSchema->sanitizeOutPut($metaData['duration']);
600
- }
601
- if (!empty($metaData['encodingFormat'])) {
602
- $audio["encodingFormat"] = $KcSeoWPSchema->sanitizeOutPut($metaData['encodingFormat']);
603
- }
604
- $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_audio', $audio, $metaData));
605
- break;
606
-
607
- case 'service':
608
- $service = array(
609
- "@context" => "https://schema.org",
610
- "@type" => "Service"
611
- );
612
- if (!empty($metaData['name'])) {
613
- $service["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
614
- }
615
- if (!empty($metaData['serviceType'])) {
616
- $service["serviceType"] = $KcSeoWPSchema->sanitizeOutPut($metaData['serviceType']);
617
- }
618
- if (!empty($metaData['award'])) {
619
- $service["award"] = $KcSeoWPSchema->sanitizeOutPut($metaData['award']);
620
- }
621
- if (!empty($metaData['category'])) {
622
- $service["category"] = $KcSeoWPSchema->sanitizeOutPut($metaData['category']);
623
- }
624
- if (!empty($metaData['providerMobility'])) {
625
- $service["providerMobility"] = $KcSeoWPSchema->sanitizeOutPut($metaData['providerMobility']);
626
- }
627
- if (!empty($metaData['additionalType'])) {
628
- $service["additionalType"] = $KcSeoWPSchema->sanitizeOutPut($metaData['additionalType']);
629
- }
630
- if (!empty($metaData['alternateName'])) {
631
- $service["alternateName"] = $KcSeoWPSchema->sanitizeOutPut($metaData['alternateName']);
632
- }
633
- if (!empty($metaData['image'])) {
634
- $service["image"] = $KcSeoWPSchema->sanitizeOutPut($metaData['image']);
635
- }
636
- if (!empty($metaData['mainEntityOfPage'])) {
637
- $service["mainEntityOfPage"] = $KcSeoWPSchema->sanitizeOutPut($metaData['mainEntityOfPage']);
638
- }
639
- if (!empty($metaData['sameAs'])) {
640
- $service["sameAs"] = $KcSeoWPSchema->sanitizeOutPut($metaData['sameAs']);
641
- }
642
- if (!empty($metaData['url'])) {
643
- $service["url"] = $KcSeoWPSchema->sanitizeOutPut($metaData['url'], 'url');
644
- }
645
- $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_service', $service, $metaData));
646
- break;
647
-
648
- case 'about':
649
- $aboutSchema = array(
650
- "@context" => "https://schema.org",
651
- "@type" => "AboutPage"
652
- );
653
-
654
- if (!empty($metaData['name'])) {
655
- $aboutSchema["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
656
- }
657
- if (!empty($metaData['description'])) {
658
- $aboutSchema["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
659
- 'textarea');
660
- }
661
- if (!empty($metaData['image'])) {
662
- $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
663
- $aboutSchema["image"] = array(
664
- "@type" => "ImageObject",
665
- "url" => $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url'),
666
- "height" => $img['height'],
667
- "width" => $img['width']
668
- );
669
- }
670
- if (!empty($metaData['url'])) {
671
- $aboutSchema["url"] = $KcSeoWPSchema->sanitizeOutPut($metaData['url'], 'url');
672
- }
673
-
674
- if (isset($metaData['sameAs']) && !empty($metaData['sameAs'])) {
675
- $sameAs = KcSeoHelper::get_same_as($KcSeoWPSchema->sanitizeOutPut($metaData['sameAs'], "textarea"));
676
- if (!empty($sameAs)) {
677
- $aboutSchema["sameAs"] = $sameAs;
678
- }
679
- }
680
-
681
- $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_about', $aboutSchema, $metaData));
682
- break;
683
-
684
- case 'contact':
685
- $contactSchema = array(
686
- "@context" => "https://schema.org",
687
- "@type" => "ContactPage"
688
- );
689
-
690
- if (!empty($metaData['name'])) {
691
- $contactSchema["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
692
- }
693
- if (!empty($metaData['description'])) {
694
- $contactSchema["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
695
- 'textarea');
696
- }
697
- if (!empty($metaData['image'])) {
698
- $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
699
- $contactSchema["image"] = array(
700
- "@type" => "ImageObject",
701
- "url" => $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url'),
702
- "height" => $img['height'],
703
- "width" => $img['width']
704
- );
705
- }
706
- if (!empty($metaData['url'])) {
707
- $contactSchema["url"] = $KcSeoWPSchema->sanitizeOutPut($metaData['url'], 'url');
708
- }
709
-
710
- $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_contact', $contactSchema, $metaData));
711
- break;
712
-
713
- case 'review':
714
- $review = array(
715
- "@context" => "https://schema.org",
716
- "@type" => "Review"
717
- );
718
- if (!empty($metaData['itemName'])) {
719
- $review["itemReviewed"] = array(
720
- "@type" => "product",
721
- "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['itemName'])
722
- );
723
- }
724
- if (!empty($metaData['ratingValue'])) {
725
- $review["reviewRating"] = array(
726
- "@type" => "Rating",
727
- "ratingValue" => $KcSeoWPSchema->sanitizeOutPut($metaData['ratingValue']),
728
- "bestRating" => $KcSeoWPSchema->sanitizeOutPut($metaData['bestRating']),
729
- "worstRating" => $KcSeoWPSchema->sanitizeOutPut($metaData['worstRating'])
730
- );
731
- }
732
- if (!empty($metaData['name'])) {
733
- $review["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
734
- }
735
- if (!empty($metaData['author'])) {
736
- $review["author"] = array(
737
- "@type" => "Person",
738
- "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['author'])
739
- );
740
- }
741
- if (!empty($metaData['reviewBody'])) {
742
- $review["reviewBody"] = $KcSeoWPSchema->sanitizeOutPut($metaData['reviewBody']);
743
- }
744
- if (!empty($metaData['datePublished'])) {
745
- $review["datePublished"] = $KcSeoWPSchema->sanitizeOutPut($metaData['datePublished']);
746
- }
747
- if (!empty($metaData['publisher'])) {
748
- $review["publisher"] = array(
749
- "@type" => "Organization",
750
- "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['publisher'])
751
- );
752
- }
753
- $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_review', $review, $metaData));
754
- break;
755
- case 'aggregate_rating':
756
- $aRating = array(
757
- "@context" => "https://schema.org",
758
- "@type" => !empty($metaData['schema_type']) ? $metaData['schema_type'] : "LocalBusiness"
759
- );
760
- if ("LocalBusiness" === $aRating['@type']) {
761
- $aRating['@id'] = get_home_url();
762
- }
763
- if (!empty($metaData['name'])) {
764
- $aRating["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
765
- }
766
- if (!empty($metaData['description'])) {
767
- $aRating["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
768
- 'textarea');
769
- }
770
- if ($aRating["@type"] != "Organization") {
771
- if (!empty($metaData['image'])) {
772
- $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
773
- $aRating["image"] = array(
774
- "@type" => "ImageObject",
775
- "url" => $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url'),
776
- "height" => $img['height'],
777
- "width" => $img['width']
778
- );
779
- }
780
- if (!empty($metaData['priceRange'])) {
781
- $aRating["priceRange"] = $KcSeoWPSchema->sanitizeOutPut($metaData['priceRange']);
782
- }
783
- if (!empty($metaData['telephone'])) {
784
- $aRating["telephone"] = $KcSeoWPSchema->sanitizeOutPut($metaData['telephone']);
785
- }
786
-
787
- if (!empty($metaData['address'])) {
788
- $aRating["address"] = $KcSeoWPSchema->sanitizeOutPut($metaData['address']);
789
- }
790
- }
791
-
792
- if (!empty($metaData['ratingValue'])) {
793
- $rValue = array();
794
- $rValue["@type"] = "AggregateRating";
795
- $rValue["ratingValue"] = $KcSeoWPSchema->sanitizeOutPut($metaData['ratingValue']);
796
- if (!empty($metaData['bestRating'])) {
797
- $rValue["bestRating"] = $KcSeoWPSchema->sanitizeOutPut($metaData['bestRating']);
798
- }
799
- if (!empty($metaData['worstRating'])) {
800
- $rValue["worstRating"] = $KcSeoWPSchema->sanitizeOutPut($metaData['worstRating']);
801
- }
802
- if (!empty($metaData['ratingCount'])) {
803
- $rValue["ratingCount"] = $KcSeoWPSchema->sanitizeOutPut($metaData['ratingCount']);
804
- }
805
-
806
- $aRating["aggregateRating"] = $rValue;
807
- }
808
- $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_aggregate_rating', $aRating, $metaData));
809
- break;
810
-
811
- case 'restaurant':
812
- $restaurant = array(
813
- "@context" => "https://schema.org",
814
- "@type" => "Restaurant"
815
- );
816
- if (!empty($metaData['name'])) {
817
- $restaurant["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
818
- }
819
- if (!empty($metaData['description'])) {
820
- $restaurant["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
821
- 'textarea');
822
- }
823
- if (!empty($metaData['openingHours'])) {
824
- $restaurant["openingHours"] = $KcSeoWPSchema->sanitizeOutPut($metaData['openingHours'],
825
- 'textarea');
826
- }
827
- if (!empty($metaData['telephone'])) {
828
- $restaurant["telephone"] = $KcSeoWPSchema->sanitizeOutPut($metaData['telephone']);
829
- }
830
- if (!empty($metaData['menu'])) {
831
- $restaurant["menu"] = $KcSeoWPSchema->sanitizeOutPut($metaData['menu'], 'url');
832
- }
833
- if (!empty($metaData['image'])) {
834
- $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
835
- $restaurant["image"] = $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url');
836
- }
837
- if (!empty($metaData['address'])) {
838
- $restaurant["address"] = $KcSeoWPSchema->sanitizeOutPut($metaData['address'], 'textarea');
839
- }
840
- if (!empty($metaData['priceRange'])) {
841
- $restaurant["priceRange"] = $KcSeoWPSchema->sanitizeOutPut($metaData['priceRange']);
842
- }
843
- if (!empty($metaData['servesCuisine'])) {
844
- $restaurant["servesCuisine"] = $KcSeoWPSchema->sanitizeOutPut($metaData['servesCuisine']);
845
- }
846
- $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_restaurant', $restaurant, $metaData));
847
- break;
848
-
849
- case 'localBusiness':
850
- $local_business = array(
851
- "@context" => "https://schema.org",
852
- "@type" => "LocalBusiness",
853
- '@id' => get_home_url()
854
- );
855
- if (!empty($metaData['name'])) {
856
- $local_business["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
857
- }
858
- if (!empty($metaData['description'])) {
859
- $local_business["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
860
- 'textarea');
861
- }
862
- if (!empty($metaData['image'])) {
863
- $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
864
- $local_business["image"] = $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url');
865
- }
866
- if (!empty($metaData['priceRange'])) {
867
- $local_business["priceRange"] = $KcSeoWPSchema->sanitizeOutPut($metaData['priceRange']);
868
- }
869
- if (!empty($metaData['addressLocality']) || !empty($metaData['addressRegion'])
870
- || !empty($metaData['postalCode']) || !empty($metaData['streetAddress'])) {
871
- $local_business["address"] = array(
872
- "@type" => "PostalAddress",
873
- "addressLocality" => $KcSeoWPSchema->sanitizeOutPut($metaData['addressLocality']),
874
- "addressRegion" => $KcSeoWPSchema->sanitizeOutPut($metaData['addressRegion']),
875
- "postalCode" => $KcSeoWPSchema->sanitizeOutPut($metaData['postalCode']),
876
- "streetAddress" => $KcSeoWPSchema->sanitizeOutPut($metaData['streetAddress'])
877
- );
878
- }
879
-
880
- if (!empty($metaData['telephone'])) {
881
- $local_business["telephone"] = $KcSeoWPSchema->sanitizeOutPut($metaData['telephone']);
882
- }
883
- $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_local_business', $local_business, $metaData));
884
- if (isset($metaData['review_active'])) {
885
- $local_business_review = array(
886
- "@context" => "https://schema.org",
887
- "@type" => "Review",
888
- );
889
- if (isset($metaData['review_datePublished']) && !empty($metaData['review_datePublished'])) {
890
- $local_business_review["datePublished"] = $KcSeoWPSchema->sanitizeOutPut($metaData['review_datePublished']);
891
- }
892
- if (isset($metaData['review_body']) && !empty($metaData['review_body'])) {
893
- $local_business_review["reviewBody"] = $KcSeoWPSchema->sanitizeOutPut($metaData['review_body'], 'textarea');
894
- }
895
-
896
- unset($local_business['@context']);
897
- if (isset($local_business["description"])) {
898
- $local_business_review["description"] = KcSeoHelper::filter_content($local_business["description"], 200);
899
- unset($local_business["description"]);
900
- }
901
- if (isset($metaData['review_sameAs']) && !empty($metaData['review_sameAs'])) {
902
- $sameAs = KcSeoHelper::get_same_as($KcSeoWPSchema->sanitizeOutPut($metaData['review_sameAs'], "textarea"));
903
- if (!empty($sameAs)) {
904
- $local_business["sameAs"] = $sameAs;
905
- }
906
- }
907
-
908
- $local_business_review["itemReviewed"] = $local_business;
909
- if (!empty($metaData['review_author'])) {
910
- $local_business_review["author"] = array(
911
- "@type" => "Person",
912
- "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['review_author'])
913
- );
914
-
915
- if (isset($metaData['review_author_sameAs']) && !empty($metaData['review_author_sameAs'])) {
916
- $sameAs = KcSeoHelper::get_same_as($KcSeoWPSchema->sanitizeOutPut($metaData['review_author_sameAs'], "textarea"));
917
- if (!empty($sameAs)) {
918
- $local_business_review["author"]["sameAs"] = $sameAs;
919
- }
920
- }
921
- }
922
- if (isset($metaData['review_ratingValue'])) {
923
- $local_business_review["reviewRating"] = array(
924
- "@type" => "Rating",
925
- "ratingValue" => $KcSeoWPSchema->sanitizeOutPut($metaData['review_ratingValue'], 'number')
926
- );
927
- if (isset($metaData['review_bestRating'])) {
928
- $local_business_review["reviewRating"]["bestRating"] = $KcSeoWPSchema->sanitizeOutPut($metaData['review_bestRating'], 'number');
929
- }
930
- if (isset($metaData['review_worstRating'])) {
931
- $local_business_review["reviewRating"]["worstRating"] = $KcSeoWPSchema->sanitizeOutPut($metaData['review_worstRating'], 'number');
932
- }
933
- }
934
- $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_local_business_review', $local_business_review, $metaData));
935
- }
936
- break;
937
- case 'specialAnnouncement':
938
- $announcement = array(
939
- "@context" => "https://schema.org",
940
- "@type" => "SpecialAnnouncement",
941
- "category" => "https://www.wikidata.org/wiki/Q81068910"
942
- );
943
- if (!empty($metaData['name'])) {
944
- $announcement['name'] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
945
- }
946
- if (!empty($metaData['datePublished'])) {
947
- $announcement['datePosted'] = $KcSeoWPSchema->sanitizeOutPut($metaData['datePublished']);
948
- }
949
- if (!empty($metaData['expires'])) {
950
- $announcement['expires'] = $KcSeoWPSchema->sanitizeOutPut($metaData['expires']);
951
- }
952
- if (!empty($metaData['text'])) {
953
- $announcement['text'] = $KcSeoWPSchema->sanitizeOutPut($metaData['text'], 'textarea');
954
- }
955
- if (!empty($metaData['url'])) {
956
- $announcement['url'] = $KcSeoWPSchema->sanitizeOutPut($metaData['url'], 'url');
957
- }
958
- if (isset($metaData['locations']) && is_array($metaData['locations']) && !empty($metaData['locations'])) {
959
- $locations_schema = [];
960
- foreach ($metaData['locations'] as $position => $location) {
961
- if ($location['type']) {
962
- $location_schema = array(
963
- "@type" => $KcSeoWPSchema->sanitizeOutPut($location['type']),
964
- 'name' => !empty($location['name']) ? $KcSeoWPSchema->sanitizeOutPut($location['name']) : "",
965
- 'url' => !empty($location['url']) ? $KcSeoWPSchema->sanitizeOutPut($location['url'], 'url') : '',
966
- "address" => [
967
- "@type" => "PostalAddress",
968
- ]
969
- );
970
- if (!empty($location['id'])) {
971
- $location_schema['@id'] = $KcSeoWPSchema->sanitizeOutPut($location['id']);
972
- }
973
- if (!empty($location['image'])) {
974
- $img = $KcSeoWPSchema->imageInfo(absint($location['image']));
975
- $location_schema["image"] = $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url');
976
- }
977
- if (!empty($location['url'])) {
978
- $location_schema['url'] = $KcSeoWPSchema->sanitizeOutPut($location['url'], 'url');
979
- }
980
- if (!empty($location['address_street'])) {
981
- $location_schema['address']['streetAddress'] = $KcSeoWPSchema->sanitizeOutPut($location['address_street']);
982
- }
983
- if (!empty($location['address_locality'])) {
984
- $location_schema['address']['addressLocality'] = $KcSeoWPSchema->sanitizeOutPut($location['address_locality']);
985
- }
986
- if (!empty($location['address_post_code'])) {
987
- $location_schema['address']['postalCode'] = $KcSeoWPSchema->sanitizeOutPut($location['address_post_code']);
988
- }
989
- if (!empty($location['address_region'])) {
990
- $location_schema['address']['addressRegion'] = $KcSeoWPSchema->sanitizeOutPut($location['address_region']);
991
- }
992
- if (!empty($location['address_country'])) {
993
- $location_schema['address']['addressCountry'] = $KcSeoWPSchema->sanitizeOutPut($location['address_country']);
994
- }
995
- if (!empty($location['priceRange'])) {
996
- $location_schema["priceRange"] = $KcSeoWPSchema->sanitizeOutPut($location['priceRange']);
997
- }
998
- if (!empty($location['telephone'])) {
999
- $location_schema["telephone"] = $KcSeoWPSchema->sanitizeOutPut($location['telephone']);
1000
- }
1001
- array_push($locations_schema, $location_schema);
1002
- }
1003
-
1004
- }
1005
- if (count($locations_schema) === 1) {
1006
- $announcement['announcementLocation'] = $locations_schema[0];
1007
- } else {
1008
- $announcement['announcementLocation'] = $locations_schema;
1009
- }
1010
- }
1011
- $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_item_list', $announcement, $metaData));
1012
- break;
1013
- default:
1014
- break;
1015
- }
1016
-
1017
- }
1018
-
1019
- return $html;
1020
- }
1021
-
1022
- function get_field($data) {
1023
- $html = null;
1024
- global $KcSeoWPSchema;
1025
- $id = $data['id'];
1026
- $name = $data['name'];
1027
- $value = $data['value'];
1028
- $attr = !empty($data['attr']) ? $data['attr'] : null;
1029
-
1030
- $class = isset($data['class']) ? ($data['class'] ? $data['class'] : null) : null;
1031
- $require = (isset($data['required']) ? ($data['required'] ? sprintf('<span data-kcseo-tooltip="%s" class="required">*</span>', __("Required", "wp-seo-structured-data-schema")) : null) : null);
1032
- $recommended = (isset($data['recommended']) ? ($data['recommended'] ? sprintf('<span data-kcseo-tooltip="%s" class="recommended">*</span>', __("Recommended", "wp-seo-structured-data-schema")) : null) : null);
1033
- $title = (isset($data['title']) ? ($data['title'] ? $data['title'] : null) : null);
1034
- $desc = (isset($data['desc']) ? ($data['desc'] ? $data['desc'] : null) : null);
1035
- $holderClass = (!empty($data['holderClass']) ? $data['holderClass'] : null);
1036
-
1037
- switch ($data['type']) {
1038
- case 'checkbox':
1039
- $checked = ($value ? "checked" : null);
1040
- $html .= "<div class='kSeo-checkbox-wrapper'>";
1041
- $html .= "<label for='{$id}'><input type='checkbox' id='{$id}' class='{$class}' name='{$name}' {$checked} value='1' /> Enable</label>";
1042
- $html .= "</div>";
1043
- break;
1044
- case 'text':
1045
- $html .= "<input type='text' id='{$id}' class='{$class}' {$attr} name='{$name}' value='" . esc_html($value) . "' />";
1046
- break;
1047
- case 'number':
1048
- if ($data['fieldId'] == 'price') {
1049
- $html .= "<input type='number' step='any' id='{$id}' class='{$class}' {$attr} name='{$name}' value='" . esc_attr($value) . "' />";
1050
- } else {
1051
- $html .= "<input type='number' id='{$id}' class='{$class}' name='{$name}' {$attr} value='" . esc_attr($value) . "' />";
1052
- }
1053
- break;
1054
- case 'textarea':
1055
- $html .= "<textarea id='{$id}' class='{$class}' {$attr} name='{$name}' >" . wp_kses($value,
1056
- array()) . "</textarea>";
1057
- break;
1058
- case 'image':
1059
- $html .= '<div class="kSeo-image">';
1060
- $ImageId = !empty($value) ? absint($value) : 0;
1061
- $image = $ingInfo = null;
1062
- if ($ImageId) {
1063
- $image = wp_get_attachment_image($ImageId, "thumbnail");
1064
- $imgData = $KcSeoWPSchema->imageInfo($ImageId);
1065
- $ingInfo .= "<span><strong>URL: </strong>{$imgData['url']}</span>";
1066
- $ingInfo .= "<span><strong>Width: </strong>{$imgData['width']}px</span>";
1067
- $ingInfo .= "<span><strong>Height: </strong>{$imgData['height']}px</span>";
1068
- }
1069
- $html .= "<div class='kSeo-image-wrapper'>";
1070
- $html .= '<span class="kSeoImgAdd"><span class="dashicons dashicons-plus-alt"></span></span>';
1071
- $html .= '<span class="kSeoImgRemove ' . ($image ? null : "kSeo-hidden") . '"><span class="dashicons dashicons-trash"></span></span>';
1072
- $html .= '<div class="kSeo-image-preview">' . $image . '</div>';
1073
- $html .= "<input type='hidden' name='{$name}' value='" . absint($ImageId) . "' />";
1074
- $html .= "</div>";
1075
- $html .= "<div class='image-info'>{$ingInfo}</div>";
1076
- $html .= '</div>';
1077
- break;
1078
- case 'select':
1079
- $html .= "<select name='{$name}' {$attr} class='select2 {$class}' id='{$id}'>";
1080
- if (!empty($data['empty'])) {
1081
- $html .= "<option value=''>{$data['empty']}</option>";
1082
- }
1083
- if (!empty($data['options']) && is_array($data['options'])) {
1084
- if ($this->isAssoc($data['options'])) {
1085
- foreach ($data['options'] as $optKey => $optValue) {
1086
- $slt = ($optKey == $value ? "selected" : null);
1087
- $html .= "<option value='" . esc_attr($optKey) . "' {$slt}>" . esc_html($optValue) . "</option>";
1088
- }
1089
- } else {
1090
- foreach ($data['options'] as $optValue) {
1091
- $slt = ($optValue == $value ? "selected" : null);
1092
- $html .= "<option value='" . esc_attr($optValue) . "' {$slt}>" . esc_html($optValue) . "</option>";
1093
- }
1094
- }
1095
- }
1096
- $html .= "</select>";
1097
- break;
1098
- case 'schema_type':
1099
- $html .= "<select name='{$name}' class='select2 {$class}' id='{$id}'>";
1100
- if (!empty($data['empty'])) {
1101
- $html .= "<option value=''>{$data['empty']}</option>";
1102
- }
1103
-
1104
- foreach ($data['options'] as $key => $site) {
1105
- if (is_array($site)) {
1106
- $slt = ($key == $value ? "selected" : null);
1107
- $html .= "<option value='$key' $slt>&nbsp;&nbsp;&nbsp;$key</option>";
1108
- foreach ($site as $inKey => $inSite) {
1109
- if (is_array($inSite)) {
1110
- $slt = ($inKey == $value ? "selected" : null);
1111
- $html .= "<option value='$inKey' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$inKey</option>";
1112
- foreach ($inSite as $inInKey => $inInSite) {
1113
- if (is_array($inInSite)) {
1114
- $slt = ($inInKey == $value ? "selected" : null);
1115
- $html .= "<option value='$inInKey' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$inInKey</option>";
1116
- foreach ($inInSite as $iSite) {
1117
- $slt = ($iSite == $value ? "selected" : null);
1118
- $html .= "<option value='$iSite' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$iSite</option>";
1119
- }
1120
- } else {
1121
- $slt = ($inInSite == $value ? "selected" : null);
1122
- $html .= "<option value='$inInSite' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$inInSite</option>";
1123
- }
1124
- }
1125
- } else {
1126
- $slt = ($inSite == $value ? "selected" : null);
1127
- $html .= "<option value='$inSite' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$inSite</option>";
1128
- }
1129
- }
1130
- } else {
1131
- $slt = ($site == $value ? "selected" : null);
1132
- $html .= "<option value='$site' $slt>$site</option>";
1133
- }
1134
- }
1135
- $html .= "</select>";
1136
- break;
1137
- default:
1138
- $html .= "<input id='{$id}' type='{$data['type']}' {$attr} value='" . esc_attr($value) . "' name='$name' />";
1139
- break;
1140
-
1141
- }
1142
- $label = "<label class='field-label' for='{$id}'>{$title}{$require}{$recommended}</label>";
1143
- $field_html = sprintf('<div class="field-content" id="%s-content">%s<p class="description">%s</div>', $id, $html, $desc);
1144
- if ($data['type'] == 'heading') {
1145
- $holderClass .= ' kcseo-heading-container';
1146
- $label = '';
1147
- $field_html = sprintf('<div class="kcseo-section-title-wrap">%s%s</div>',
1148
- $title ? sprintf('<h5>%s</h5>', $title) : '',
1149
- $desc ? sprintf('<p class="description">%s</p>', $desc) : null
1150
- );
1151
- }
1152
-
1153
- $html = sprintf('<div class="field-container %s" id="%s-container">%s%s</div>',
1154
- $holderClass,
1155
- $id,
1156
- $label,
1157
- $field_html
1158
- );
1159
-
1160
- return $html;
1161
- }
1162
-
1163
- /**
1164
- * @param array $data
1165
- *
1166
- * @return string|null
1167
- */
1168
- function get_jsonEncode($data = array()) {
1169
- $html = null;
1170
- if (!empty($data) && is_array($data)) {
1171
- $html .= '<script type="application/ld+json">' . json_encode($data,
1172
- JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . '</script>';
1173
- }
1174
-
1175
- return $html;
1176
- }
1177
-
1178
- function imgInfo($url = null) {
1179
- $img = array();
1180
- if ($url) {
1181
- $imgA = @getimagesize($url);
1182
- if (is_array($imgA) && !empty($imgA)) {
1183
- $img['width'] = $imgA[0];
1184
- $img['height'] = $imgA[1];
1185
- } else {
1186
- $img['width'] = 0;
1187
- $img['height'] = 0;
1188
- }
1189
- }
1190
-
1191
- return $img;
1192
- }
1193
-
1194
- function isAssoc($array) {
1195
- $keys = array_keys($array);
1196
-
1197
- return $keys !== array_keys($keys);
1198
- }
1199
-
1200
-
1201
- }
1202
  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
+
396
+ if (!empty($metaData['organizer'])) {
397
+ $event['organizer'] = [
398
+ "@type" => "Organization",
399
+ "name" =>$KcSeoWPSchema->sanitizeOutPut($metaData['organizer'], 'text'),
400
+ "url" => $KcSeoWPSchema->sanitizeOutPut($metaData['organizerUrl'], 'url')
401
+ ];
402
+ }
403
+ if (!empty($metaData['eventStatus'])) {
404
+ $event['eventStatus'] = $KcSeoWPSchema->sanitizeOutPut($metaData['eventStatus']);
405
+ }
406
+ if (!empty($metaData['EventAttendanceMode'])) {
407
+ $event['EventAttendanceMode'] = $KcSeoWPSchema->sanitizeOutPut($metaData['EventAttendanceMode']);
408
+ }
409
+
410
+ if (!empty($metaData['locationName'])) {
411
+ $event["location"] = array(
412
+ "@type" => "Place",
413
+ "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['locationName']),
414
+ "address" => $KcSeoWPSchema->sanitizeOutPut($metaData['locationAddress'])
415
+ );
416
+ }
417
+ if (!empty($metaData['price'])) {
418
+ $event["offers"] = array(
419
+ "@type" => "Offer",
420
+ "price" => $KcSeoWPSchema->sanitizeOutPut($metaData['price'])
421
+ );
422
+ if (!empty($metaData['priceCurrency'])) {
423
+ $event["offers"]['priceCurrency'] = $KcSeoWPSchema->sanitizeOutPut($metaData['priceCurrency']);
424
+ }
425
+ if (!empty($metaData['url'])) {
426
+ $event["offers"]['url'] = $KcSeoWPSchema->sanitizeOutPut($metaData['url'], 'url');
427
+ }
428
+ if (!empty($metaData['availability'])) {
429
+ $event["offers"]['availability'] = $KcSeoWPSchema->sanitizeOutPut($metaData['availability']);
430
+ }
431
+ if (!empty($metaData['validFrom'])) {
432
+ $event["offers"]['validFrom'] = $KcSeoWPSchema->sanitizeOutPut($metaData['validFrom']);
433
+ }
434
+ }
435
+ if (!empty($metaData['url'])) {
436
+ $event["url"] = $KcSeoWPSchema->sanitizeOutPut($metaData['url'], 'url');
437
+ }
438
+
439
+ $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_event', $event, $metaData));
440
+ if (isset($metaData['review_active'])) {
441
+ $event_review = array(
442
+ "@context" => "https://schema.org",
443
+ "@type" => "Review"
444
+ );
445
+
446
+ if (isset($metaData['review_datePublished']) && !empty($metaData['review_datePublished'])) {
447
+ $event_review["datePublished"] = $KcSeoWPSchema->sanitizeOutPut($metaData['review_datePublished']);
448
+ }
449
+ if (isset($metaData['review_body']) && !empty($metaData['review_body'])) {
450
+ $event_review["reviewBody"] = $KcSeoWPSchema->sanitizeOutPut($metaData['review_body'], 'textarea');
451
+ }
452
+ unset($event['@context']);
453
+ $event_review["itemReviewed"] = $event;
454
+ if (!empty($metaData['review_author'])) {
455
+ $event_review["author"] = array(
456
+ "@type" => "Person",
457
+ "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['review_author'])
458
+ );
459
+
460
+ if (isset($metaData['review_author_sameAs']) && !empty($metaData['review_author_sameAs'])) {
461
+ $sameAs = KcSeoHelper::get_same_as($KcSeoWPSchema->sanitizeOutPut($metaData['review_author_sameAs'], "textarea"));
462
+ if (!empty($sameAs)) {
463
+ $event_review["author"]["sameAs"] = $sameAs;
464
+ }
465
+ }
466
+ }
467
+ if (isset($metaData['review_ratingValue'])) {
468
+ $event_review["reviewRating"] = array(
469
+ "@type" => "Rating",
470
+ "ratingValue" => $KcSeoWPSchema->sanitizeOutPut($metaData['review_ratingValue'], 'number')
471
+ );
472
+ if (isset($metaData['review_bestRating'])) {
473
+ $event_review["reviewRating"]["bestRating"] = $KcSeoWPSchema->sanitizeOutPut($metaData['review_bestRating'], 'number');
474
+ }
475
+ if (isset($metaData['review_worstRating'])) {
476
+ $event_review["reviewRating"]["worstRating"] = $KcSeoWPSchema->sanitizeOutPut($metaData['review_worstRating'], 'number');
477
+ }
478
+ }
479
+
480
+
481
+ $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_event_review', $event_review, $metaData));
482
+ }
483
+ break;
484
+
485
+ case 'product':
486
+ $product = array(
487
+ "@context" => "https://schema.org",
488
+ "@type" => "Product"
489
+ );
490
+ if (!empty($metaData['name'])) {
491
+ $product["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
492
+ }
493
+ if (!empty($metaData['image'])) {
494
+ $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
495
+ $product["image"] = $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url');
496
+ }
497
+ if (!empty($metaData['description'])) {
498
+ $product["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description']);
499
+ }
500
+ /* product identifier */
501
+ if (!empty($metaData['sku'])) {
502
+ $product["sku"] = $KcSeoWPSchema->sanitizeOutPut($metaData['sku']);
503
+ }
504
+ if (!empty($metaData['brand'])) {
505
+ $product['brand'] = [
506
+ "@type" => "Brand",
507
+ "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['brand'])
508
+ ];
509
+ }
510
+ if (!empty($metaData['identifier_type']) && !empty($metaData['identifier'])) {
511
+ $product[$metaData['identifier_type']] = $KcSeoWPSchema->sanitizeOutPut($metaData['identifier']);
512
+ }
513
+ if (!empty($metaData['ratingValue'])) {
514
+ $product["aggregateRating"] = array(
515
+ "@type" => "AggregateRating",
516
+ "ratingValue" => !empty($metaData['ratingValue']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['ratingValue']) : null,
517
+ "reviewCount" => !empty($metaData['reviewCount']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['reviewCount']) : null
518
+ );
519
+ }
520
+ if (!empty($metaData['reviewRatingValue']) || !empty($metaData['reviewBestRating']) || !empty($metaData['reviewWorstRating'])) {
521
+ $product["review"] = array(
522
+ "@type" => "Review",
523
+ "reviewRating" => array(
524
+ "@type" => "Rating",
525
+ "ratingValue" => !empty($metaData['reviewRatingValue']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['reviewRatingValue']) : null,
526
+ "bestRating" => !empty($metaData['reviewBestRating']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['reviewBestRating']) : null,
527
+ "worstRating" => !empty($metaData['reviewWorstRating']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['reviewWorstRating']) : null
528
+ ),
529
+ "author" => array(
530
+ "@type" => "Person",
531
+ "name" => !empty($metaData['reviewAuthor']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['reviewAuthor']) : null
532
+ )
533
+ );
534
+ }
535
+ if (!empty($metaData['price'])) {
536
+ $product["offers"] = array(
537
+ "@type" => "Offer",
538
+ "price" => $KcSeoWPSchema->sanitizeOutPut($metaData['price']),
539
+ "priceValidUntil" => $KcSeoWPSchema->sanitizeOutPut($metaData['priceValidUntil']),
540
+ "priceCurrency" => !empty($metaData['priceCurrency']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['priceCurrency']) : null,
541
+ "itemCondition" => !empty($metaData['itemCondition']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['itemCondition']) : null,
542
+ "availability" => !empty($metaData['availability']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['availability']) : null,
543
+ "url" => !empty($metaData['url']) ? $KcSeoWPSchema->sanitizeOutPut($metaData['url']) : null
544
+ );
545
+ }
546
+ $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_product', $product, $metaData));
547
+ break;
548
+
549
+ case 'video':
550
+ $video = array(
551
+ "@context" => "https://schema.org",
552
+ "@type" => "VideoObject"
553
+ );
554
+ if (!empty($metaData['name'])) {
555
+ $video["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
556
+ }
557
+ if (!empty($metaData['description'])) {
558
+ $video["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'], 'textarea');
559
+ }
560
+ if (!empty($metaData['thumbnailUrl'])) {
561
+ $video["thumbnailUrl"] = $KcSeoWPSchema->sanitizeOutPut($metaData['thumbnailUrl'], 'url');
562
+ }
563
+ if (!empty($metaData['uploadDate'])) {
564
+ $video["uploadDate"] = $KcSeoWPSchema->sanitizeOutPut($metaData['uploadDate']);
565
+ }
566
+ if (!empty($metaData['duration'])) {
567
+ $video["duration"] = $KcSeoWPSchema->sanitizeOutPut($metaData['duration']);
568
+ }
569
+ if (!empty($metaData['contentUrl'])) {
570
+ $video["contentUrl"] = $KcSeoWPSchema->sanitizeOutPut($metaData['contentUrl'], 'url');
571
+ }
572
+ if (!empty($metaData['embedUrl'])) {
573
+ $video["embedUrl"] = $KcSeoWPSchema->sanitizeOutPut($metaData['embedUrl'], 'url');
574
+ }
575
+ if (!empty($metaData['interactionCount'])) {
576
+ $video["interactionCount"] = $KcSeoWPSchema->sanitizeOutPut($metaData['interactionCount']);
577
+ }
578
+ if (!empty($metaData['expires'])) {
579
+ $video["expires"] = $KcSeoWPSchema->sanitizeOutPut($metaData['expires']);
580
+ }
581
+ $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_video', $video, $metaData));
582
+ break;
583
+
584
+ case 'audio':
585
+ $audio = array(
586
+ "@context" => "https://schema.org",
587
+ "@type" => "AudioObject"
588
+ );
589
+ if (!empty($metaData['name'])) {
590
+ $audio["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
591
+ }
592
+ if (!empty($metaData['description'])) {
593
+ $audio["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'], 'textarea');
594
+ }
595
+ if (!empty($metaData['contentUrl'])) {
596
+ $audio["contentUrl"] = $KcSeoWPSchema->sanitizeOutPut($metaData['contentUrl'], 'url');
597
+ }
598
+ if (!empty($metaData['duration'])) {
599
+ $audio["duration"] = $KcSeoWPSchema->sanitizeOutPut($metaData['duration']);
600
+ }
601
+ if (!empty($metaData['encodingFormat'])) {
602
+ $audio["encodingFormat"] = $KcSeoWPSchema->sanitizeOutPut($metaData['encodingFormat']);
603
+ }
604
+ $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_audio', $audio, $metaData));
605
+ break;
606
+
607
+ case 'service':
608
+ $service = array(
609
+ "@context" => "https://schema.org",
610
+ "@type" => "Service"
611
+ );
612
+ if (!empty($metaData['name'])) {
613
+ $service["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
614
+ }
615
+ if (!empty($metaData['serviceType'])) {
616
+ $service["serviceType"] = $KcSeoWPSchema->sanitizeOutPut($metaData['serviceType']);
617
+ }
618
+ if (!empty($metaData['award'])) {
619
+ $service["award"] = $KcSeoWPSchema->sanitizeOutPut($metaData['award']);
620
+ }
621
+ if (!empty($metaData['category'])) {
622
+ $service["category"] = $KcSeoWPSchema->sanitizeOutPut($metaData['category']);
623
+ }
624
+ if (!empty($metaData['providerMobility'])) {
625
+ $service["providerMobility"] = $KcSeoWPSchema->sanitizeOutPut($metaData['providerMobility']);
626
+ }
627
+ if (!empty($metaData['additionalType'])) {
628
+ $service["additionalType"] = $KcSeoWPSchema->sanitizeOutPut($metaData['additionalType']);
629
+ }
630
+ if (!empty($metaData['alternateName'])) {
631
+ $service["alternateName"] = $KcSeoWPSchema->sanitizeOutPut($metaData['alternateName']);
632
+ }
633
+ if (!empty($metaData['image'])) {
634
+ $service["image"] = $KcSeoWPSchema->sanitizeOutPut($metaData['image']);
635
+ }
636
+ if (!empty($metaData['mainEntityOfPage'])) {
637
+ $service["mainEntityOfPage"] = $KcSeoWPSchema->sanitizeOutPut($metaData['mainEntityOfPage']);
638
+ }
639
+ if (!empty($metaData['sameAs'])) {
640
+ $service["sameAs"] = $KcSeoWPSchema->sanitizeOutPut($metaData['sameAs']);
641
+ }
642
+ if (!empty($metaData['url'])) {
643
+ $service["url"] = $KcSeoWPSchema->sanitizeOutPut($metaData['url'], 'url');
644
+ }
645
+ $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_service', $service, $metaData));
646
+ break;
647
+
648
+ case 'about':
649
+ $aboutSchema = array(
650
+ "@context" => "https://schema.org",
651
+ "@type" => "AboutPage"
652
+ );
653
+
654
+ if (!empty($metaData['name'])) {
655
+ $aboutSchema["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
656
+ }
657
+ if (!empty($metaData['description'])) {
658
+ $aboutSchema["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
659
+ 'textarea');
660
+ }
661
+ if (!empty($metaData['image'])) {
662
+ $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
663
+ $aboutSchema["image"] = array(
664
+ "@type" => "ImageObject",
665
+ "url" => $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url'),
666
+ "height" => $img['height'],
667
+ "width" => $img['width']
668
+ );
669
+ }
670
+ if (!empty($metaData['url'])) {
671
+ $aboutSchema["url"] = $KcSeoWPSchema->sanitizeOutPut($metaData['url'], 'url');
672
+ }
673
+
674
+ if (isset($metaData['sameAs']) && !empty($metaData['sameAs'])) {
675
+ $sameAs = KcSeoHelper::get_same_as($KcSeoWPSchema->sanitizeOutPut($metaData['sameAs'], "textarea"));
676
+ if (!empty($sameAs)) {
677
+ $aboutSchema["sameAs"] = $sameAs;
678
+ }
679
+ }
680
+
681
+ $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_about', $aboutSchema, $metaData));
682
+ break;
683
+
684
+ case 'contact':
685
+ $contactSchema = array(
686
+ "@context" => "https://schema.org",
687
+ "@type" => "ContactPage"
688
+ );
689
+
690
+ if (!empty($metaData['name'])) {
691
+ $contactSchema["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
692
+ }
693
+ if (!empty($metaData['description'])) {
694
+ $contactSchema["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
695
+ 'textarea');
696
+ }
697
+ if (!empty($metaData['image'])) {
698
+ $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
699
+ $contactSchema["image"] = array(
700
+ "@type" => "ImageObject",
701
+ "url" => $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url'),
702
+ "height" => $img['height'],
703
+ "width" => $img['width']
704
+ );
705
+ }
706
+ if (!empty($metaData['url'])) {
707
+ $contactSchema["url"] = $KcSeoWPSchema->sanitizeOutPut($metaData['url'], 'url');
708
+ }
709
+
710
+ $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_contact', $contactSchema, $metaData));
711
+ break;
712
+
713
+ case 'review':
714
+ $review = array(
715
+ "@context" => "https://schema.org",
716
+ "@type" => "Review"
717
+ );
718
+ if (!empty($metaData['itemName'])) {
719
+ $review["itemReviewed"] = array(
720
+ "@type" => "product",
721
+ "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['itemName'])
722
+ );
723
+ }
724
+ if (!empty($metaData['ratingValue'])) {
725
+ $review["reviewRating"] = array(
726
+ "@type" => "Rating",
727
+ "ratingValue" => $KcSeoWPSchema->sanitizeOutPut($metaData['ratingValue']),
728
+ "bestRating" => $KcSeoWPSchema->sanitizeOutPut($metaData['bestRating']),
729
+ "worstRating" => $KcSeoWPSchema->sanitizeOutPut($metaData['worstRating'])
730
+ );
731
+ }
732
+ if (!empty($metaData['name'])) {
733
+ $review["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
734
+ }
735
+ if (!empty($metaData['author'])) {
736
+ $review["author"] = array(
737
+ "@type" => "Person",
738
+ "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['author'])
739
+ );
740
+ }
741
+ if (!empty($metaData['reviewBody'])) {
742
+ $review["reviewBody"] = $KcSeoWPSchema->sanitizeOutPut($metaData['reviewBody']);
743
+ }
744
+ if (!empty($metaData['datePublished'])) {
745
+ $review["datePublished"] = $KcSeoWPSchema->sanitizeOutPut($metaData['datePublished']);
746
+ }
747
+ if (!empty($metaData['publisher'])) {
748
+ $review["publisher"] = array(
749
+ "@type" => "Organization",
750
+ "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['publisher'])
751
+ );
752
+ }
753
+ $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_review', $review, $metaData));
754
+ break;
755
+ case 'aggregate_rating':
756
+ $aRating = array(
757
+ "@context" => "https://schema.org",
758
+ "@type" => !empty($metaData['schema_type']) ? $metaData['schema_type'] : "LocalBusiness"
759
+ );
760
+ if ("LocalBusiness" === $aRating['@type']) {
761
+ $aRating['@id'] = get_home_url();
762
+ }
763
+ if (!empty($metaData['name'])) {
764
+ $aRating["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
765
+ }
766
+ if (!empty($metaData['description'])) {
767
+ $aRating["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
768
+ 'textarea');
769
+ }
770
+ if ($aRating["@type"] != "Organization") {
771
+ if (!empty($metaData['image'])) {
772
+ $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
773
+ $aRating["image"] = array(
774
+ "@type" => "ImageObject",
775
+ "url" => $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url'),
776
+ "height" => $img['height'],
777
+ "width" => $img['width']
778
+ );
779
+ }
780
+ if (!empty($metaData['priceRange'])) {
781
+ $aRating["priceRange"] = $KcSeoWPSchema->sanitizeOutPut($metaData['priceRange']);
782
+ }
783
+ if (!empty($metaData['telephone'])) {
784
+ $aRating["telephone"] = $KcSeoWPSchema->sanitizeOutPut($metaData['telephone']);
785
+ }
786
+
787
+ if (!empty($metaData['address'])) {
788
+ $aRating["address"] = $KcSeoWPSchema->sanitizeOutPut($metaData['address']);
789
+ }
790
+ }
791
+
792
+ if (!empty($metaData['ratingValue'])) {
793
+ $rValue = array();
794
+ $rValue["@type"] = "AggregateRating";
795
+ $rValue["ratingValue"] = $KcSeoWPSchema->sanitizeOutPut($metaData['ratingValue']);
796
+ if (!empty($metaData['bestRating'])) {
797
+ $rValue["bestRating"] = $KcSeoWPSchema->sanitizeOutPut($metaData['bestRating']);
798
+ }
799
+ if (!empty($metaData['worstRating'])) {
800
+ $rValue["worstRating"] = $KcSeoWPSchema->sanitizeOutPut($metaData['worstRating']);
801
+ }
802
+ if (!empty($metaData['ratingCount'])) {
803
+ $rValue["ratingCount"] = $KcSeoWPSchema->sanitizeOutPut($metaData['ratingCount']);
804
+ }
805
+
806
+ $aRating["aggregateRating"] = $rValue;
807
+ }
808
+ $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_aggregate_rating', $aRating, $metaData));
809
+ break;
810
+
811
+ case 'restaurant':
812
+ $restaurant = array(
813
+ "@context" => "https://schema.org",
814
+ "@type" => "Restaurant"
815
+ );
816
+ if (!empty($metaData['name'])) {
817
+ $restaurant["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
818
+ }
819
+ if (!empty($metaData['description'])) {
820
+ $restaurant["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
821
+ 'textarea');
822
+ }
823
+ if (!empty($metaData['openingHours'])) {
824
+ $restaurant["openingHours"] = $KcSeoWPSchema->sanitizeOutPut($metaData['openingHours'],
825
+ 'textarea');
826
+ }
827
+ if (!empty($metaData['telephone'])) {
828
+ $restaurant["telephone"] = $KcSeoWPSchema->sanitizeOutPut($metaData['telephone']);
829
+ }
830
+ if (!empty($metaData['menu'])) {
831
+ $restaurant["menu"] = $KcSeoWPSchema->sanitizeOutPut($metaData['menu'], 'url');
832
+ }
833
+ if (!empty($metaData['image'])) {
834
+ $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
835
+ $restaurant["image"] = $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url');
836
+ }
837
+ if (!empty($metaData['address'])) {
838
+ $restaurant["address"] = $KcSeoWPSchema->sanitizeOutPut($metaData['address'], 'textarea');
839
+ }
840
+ if (!empty($metaData['priceRange'])) {
841
+ $restaurant["priceRange"] = $KcSeoWPSchema->sanitizeOutPut($metaData['priceRange']);
842
+ }
843
+ if (!empty($metaData['servesCuisine'])) {
844
+ $restaurant["servesCuisine"] = $KcSeoWPSchema->sanitizeOutPut($metaData['servesCuisine']);
845
+ }
846
+ $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_restaurant', $restaurant, $metaData));
847
+ break;
848
+
849
+ case 'localBusiness':
850
+ $local_business = array(
851
+ "@context" => "https://schema.org",
852
+ "@type" => "LocalBusiness",
853
+ '@id' => get_home_url()
854
+ );
855
+ if (!empty($metaData['name'])) {
856
+ $local_business["name"] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
857
+ }
858
+ if (!empty($metaData['description'])) {
859
+ $local_business["description"] = $KcSeoWPSchema->sanitizeOutPut($metaData['description'],
860
+ 'textarea');
861
+ }
862
+ if (!empty($metaData['image'])) {
863
+ $img = $KcSeoWPSchema->imageInfo(absint($metaData['image']));
864
+ $local_business["image"] = $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url');
865
+ }
866
+ if (!empty($metaData['priceRange'])) {
867
+ $local_business["priceRange"] = $KcSeoWPSchema->sanitizeOutPut($metaData['priceRange']);
868
+ }
869
+ if (!empty($metaData['addressLocality']) || !empty($metaData['addressRegion'])
870
+ || !empty($metaData['postalCode']) || !empty($metaData['streetAddress'])) {
871
+ $local_business["address"] = array(
872
+ "@type" => "PostalAddress",
873
+ "addressLocality" => $KcSeoWPSchema->sanitizeOutPut($metaData['addressLocality']),
874
+ "addressRegion" => $KcSeoWPSchema->sanitizeOutPut($metaData['addressRegion']),
875
+ "postalCode" => $KcSeoWPSchema->sanitizeOutPut($metaData['postalCode']),
876
+ "streetAddress" => $KcSeoWPSchema->sanitizeOutPut($metaData['streetAddress'])
877
+ );
878
+ }
879
+
880
+ if (!empty($metaData['telephone'])) {
881
+ $local_business["telephone"] = $KcSeoWPSchema->sanitizeOutPut($metaData['telephone']);
882
+ }
883
+ $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_local_business', $local_business, $metaData));
884
+ if (isset($metaData['review_active'])) {
885
+ $local_business_review = array(
886
+ "@context" => "https://schema.org",
887
+ "@type" => "Review",
888
+ );
889
+ if (isset($metaData['review_datePublished']) && !empty($metaData['review_datePublished'])) {
890
+ $local_business_review["datePublished"] = $KcSeoWPSchema->sanitizeOutPut($metaData['review_datePublished']);
891
+ }
892
+ if (isset($metaData['review_body']) && !empty($metaData['review_body'])) {
893
+ $local_business_review["reviewBody"] = $KcSeoWPSchema->sanitizeOutPut($metaData['review_body'], 'textarea');
894
+ }
895
+
896
+ unset($local_business['@context']);
897
+ if (isset($local_business["description"])) {
898
+ $local_business_review["description"] = KcSeoHelper::filter_content($local_business["description"], 200);
899
+ unset($local_business["description"]);
900
+ }
901
+ if (isset($metaData['review_sameAs']) && !empty($metaData['review_sameAs'])) {
902
+ $sameAs = KcSeoHelper::get_same_as($KcSeoWPSchema->sanitizeOutPut($metaData['review_sameAs'], "textarea"));
903
+ if (!empty($sameAs)) {
904
+ $local_business["sameAs"] = $sameAs;
905
+ }
906
+ }
907
+
908
+ $local_business_review["itemReviewed"] = $local_business;
909
+ if (!empty($metaData['review_author'])) {
910
+ $local_business_review["author"] = array(
911
+ "@type" => "Person",
912
+ "name" => $KcSeoWPSchema->sanitizeOutPut($metaData['review_author'])
913
+ );
914
+
915
+ if (isset($metaData['review_author_sameAs']) && !empty($metaData['review_author_sameAs'])) {
916
+ $sameAs = KcSeoHelper::get_same_as($KcSeoWPSchema->sanitizeOutPut($metaData['review_author_sameAs'], "textarea"));
917
+ if (!empty($sameAs)) {
918
+ $local_business_review["author"]["sameAs"] = $sameAs;
919
+ }
920
+ }
921
+ }
922
+ if (isset($metaData['review_ratingValue'])) {
923
+ $local_business_review["reviewRating"] = array(
924
+ "@type" => "Rating",
925
+ "ratingValue" => $KcSeoWPSchema->sanitizeOutPut($metaData['review_ratingValue'], 'number')
926
+ );
927
+ if (isset($metaData['review_bestRating'])) {
928
+ $local_business_review["reviewRating"]["bestRating"] = $KcSeoWPSchema->sanitizeOutPut($metaData['review_bestRating'], 'number');
929
+ }
930
+ if (isset($metaData['review_worstRating'])) {
931
+ $local_business_review["reviewRating"]["worstRating"] = $KcSeoWPSchema->sanitizeOutPut($metaData['review_worstRating'], 'number');
932
+ }
933
+ }
934
+ $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_local_business_review', $local_business_review, $metaData));
935
+ }
936
+ break;
937
+ case 'specialAnnouncement':
938
+ $announcement = array(
939
+ "@context" => "https://schema.org",
940
+ "@type" => "SpecialAnnouncement",
941
+ "category" => "https://www.wikidata.org/wiki/Q81068910"
942
+ );
943
+ if (!empty($metaData['name'])) {
944
+ $announcement['name'] = $KcSeoWPSchema->sanitizeOutPut($metaData['name']);
945
+ }
946
+ if (!empty($metaData['datePublished'])) {
947
+ $announcement['datePosted'] = $KcSeoWPSchema->sanitizeOutPut($metaData['datePublished']);
948
+ }
949
+ if (!empty($metaData['expires'])) {
950
+ $announcement['expires'] = $KcSeoWPSchema->sanitizeOutPut($metaData['expires']);
951
+ }
952
+ if (!empty($metaData['text'])) {
953
+ $announcement['text'] = $KcSeoWPSchema->sanitizeOutPut($metaData['text'], 'textarea');
954
+ }
955
+ if (!empty($metaData['url'])) {
956
+ $announcement['url'] = $KcSeoWPSchema->sanitizeOutPut($metaData['url'], 'url');
957
+ }
958
+ if (isset($metaData['locations']) && is_array($metaData['locations']) && !empty($metaData['locations'])) {
959
+ $locations_schema = [];
960
+ foreach ($metaData['locations'] as $position => $location) {
961
+ if ($location['type']) {
962
+ $location_schema = array(
963
+ "@type" => $KcSeoWPSchema->sanitizeOutPut($location['type']),
964
+ 'name' => !empty($location['name']) ? $KcSeoWPSchema->sanitizeOutPut($location['name']) : "",
965
+ 'url' => !empty($location['url']) ? $KcSeoWPSchema->sanitizeOutPut($location['url'], 'url') : '',
966
+ "address" => [
967
+ "@type" => "PostalAddress",
968
+ ]
969
+ );
970
+ if (!empty($location['id'])) {
971
+ $location_schema['@id'] = $KcSeoWPSchema->sanitizeOutPut($location['id']);
972
+ }
973
+ if (!empty($location['image'])) {
974
+ $img = $KcSeoWPSchema->imageInfo(absint($location['image']));
975
+ $location_schema["image"] = $KcSeoWPSchema->sanitizeOutPut($img['url'], 'url');
976
+ }
977
+ if (!empty($location['url'])) {
978
+ $location_schema['url'] = $KcSeoWPSchema->sanitizeOutPut($location['url'], 'url');
979
+ }
980
+ if (!empty($location['address_street'])) {
981
+ $location_schema['address']['streetAddress'] = $KcSeoWPSchema->sanitizeOutPut($location['address_street']);
982
+ }
983
+ if (!empty($location['address_locality'])) {
984
+ $location_schema['address']['addressLocality'] = $KcSeoWPSchema->sanitizeOutPut($location['address_locality']);
985
+ }
986
+ if (!empty($location['address_post_code'])) {
987
+ $location_schema['address']['postalCode'] = $KcSeoWPSchema->sanitizeOutPut($location['address_post_code']);
988
+ }
989
+ if (!empty($location['address_region'])) {
990
+ $location_schema['address']['addressRegion'] = $KcSeoWPSchema->sanitizeOutPut($location['address_region']);
991
+ }
992
+ if (!empty($location['address_country'])) {
993
+ $location_schema['address']['addressCountry'] = $KcSeoWPSchema->sanitizeOutPut($location['address_country']);
994
+ }
995
+ if (!empty($location['priceRange'])) {
996
+ $location_schema["priceRange"] = $KcSeoWPSchema->sanitizeOutPut($location['priceRange']);
997
+ }
998
+ if (!empty($location['telephone'])) {
999
+ $location_schema["telephone"] = $KcSeoWPSchema->sanitizeOutPut($location['telephone']);
1000
+ }
1001
+ array_push($locations_schema, $location_schema);
1002
+ }
1003
+
1004
+ }
1005
+ if (count($locations_schema) === 1) {
1006
+ $announcement['announcementLocation'] = $locations_schema[0];
1007
+ } else {
1008
+ $announcement['announcementLocation'] = $locations_schema;
1009
+ }
1010
+ }
1011
+ $html .= $this->get_jsonEncode(apply_filters('kcseo_snippet_item_list', $announcement, $metaData));
1012
+ break;
1013
+ default:
1014
+ break;
1015
+ }
1016
+
1017
+ }
1018
+
1019
+ return $html;
1020
+ }
1021
+
1022
+ function get_field($data) {
1023
+ $html = null;
1024
+ global $KcSeoWPSchema;
1025
+ $id = $data['id'];
1026
+ $name = $data['name'];
1027
+ $value = $data['value'];
1028
+ $attr = !empty($data['attr']) ? $data['attr'] : null;
1029
+
1030
+ $class = isset($data['class']) ? ($data['class'] ? $data['class'] : null) : null;
1031
+ $require = (isset($data['required']) ? ($data['required'] ? sprintf('<span data-kcseo-tooltip="%s" class="required">*</span>', __("Required", "wp-seo-structured-data-schema")) : null) : null);
1032
+ $recommended = (isset($data['recommended']) ? ($data['recommended'] ? sprintf('<span data-kcseo-tooltip="%s" class="recommended">*</span>', __("Recommended", "wp-seo-structured-data-schema")) : null) : null);
1033
+ $title = (isset($data['title']) ? ($data['title'] ? $data['title'] : null) : null);
1034
+ $desc = (isset($data['desc']) ? ($data['desc'] ? $data['desc'] : null) : null);
1035
+ $holderClass = (!empty($data['holderClass']) ? $data['holderClass'] : null);
1036
+
1037
+ switch ($data['type']) {
1038
+ case 'checkbox':
1039
+ $checked = ($value ? "checked" : null);
1040
+ $html .= "<div class='kSeo-checkbox-wrapper'>";
1041
+ $html .= "<label for='{$id}'><input type='checkbox' id='{$id}' class='{$class}' name='{$name}' {$checked} value='1' /> Enable</label>";
1042
+ $html .= "</div>";
1043
+ break;
1044
+ case 'text':
1045
+ $html .= "<input type='text' id='{$id}' class='{$class}' {$attr} name='{$name}' value='" . esc_html($value) . "' />";
1046
+ break;
1047
+ case 'number':
1048
+ if ($data['fieldId'] == 'price') {
1049
+ $html .= "<input type='number' step='any' id='{$id}' class='{$class}' {$attr} name='{$name}' value='" . esc_attr($value) . "' />";
1050
+ } else {
1051
+ $html .= "<input type='number' id='{$id}' class='{$class}' name='{$name}' {$attr} value='" . esc_attr($value) . "' />";
1052
+ }
1053
+ break;
1054
+ case 'textarea':
1055
+ $html .= "<textarea id='{$id}' class='{$class}' {$attr} name='{$name}' >" . wp_kses($value,
1056
+ array()) . "</textarea>";
1057
+ break;
1058
+ case 'image':
1059
+ $html .= '<div class="kSeo-image">';
1060
+ $ImageId = !empty($value) ? absint($value) : 0;
1061
+ $image = $ingInfo = null;
1062
+ if ($ImageId) {
1063
+ $image = wp_get_attachment_image($ImageId, "thumbnail");
1064
+ $imgData = $KcSeoWPSchema->imageInfo($ImageId);
1065
+ $ingInfo .= "<span><strong>URL: </strong>{$imgData['url']}</span>";
1066
+ $ingInfo .= "<span><strong>Width: </strong>{$imgData['width']}px</span>";
1067
+ $ingInfo .= "<span><strong>Height: </strong>{$imgData['height']}px</span>";
1068
+ }
1069
+ $html .= "<div class='kSeo-image-wrapper'>";
1070
+ $html .= '<span class="kSeoImgAdd"><span class="dashicons dashicons-plus-alt"></span></span>';
1071
+ $html .= '<span class="kSeoImgRemove ' . ($image ? null : "kSeo-hidden") . '"><span class="dashicons dashicons-trash"></span></span>';
1072
+ $html .= '<div class="kSeo-image-preview">' . $image . '</div>';
1073
+ $html .= "<input type='hidden' name='{$name}' value='" . absint($ImageId) . "' />";
1074
+ $html .= "</div>";
1075
+ $html .= "<div class='image-info'>{$ingInfo}</div>";
1076
+ $html .= '</div>';
1077
+ break;
1078
+ case 'select':
1079
+ $html .= "<select name='{$name}' {$attr} class='select2 {$class}' id='{$id}'>";
1080
+ if (!empty($data['empty'])) {
1081
+ $html .= "<option value=''>{$data['empty']}</option>";
1082
+ }
1083
+ if (!empty($data['options']) && is_array($data['options'])) {
1084
+ if ($this->isAssoc($data['options'])) {
1085
+ foreach ($data['options'] as $optKey => $optValue) {
1086
+ $slt = ($optKey == $value ? "selected" : null);
1087
+ $html .= "<option value='" . esc_attr($optKey) . "' {$slt}>" . esc_html($optValue) . "</option>";
1088
+ }
1089
+ } else {
1090
+ foreach ($data['options'] as $optValue) {
1091
+ $slt = ($optValue == $value ? "selected" : null);
1092
+ $html .= "<option value='" . esc_attr($optValue) . "' {$slt}>" . esc_html($optValue) . "</option>";
1093
+ }
1094
+ }
1095
+ }
1096
+ $html .= "</select>";
1097
+ break;
1098
+ case 'schema_type':
1099
+ $html .= "<select name='{$name}' class='select2 {$class}' id='{$id}'>";
1100
+ if (!empty($data['empty'])) {
1101
+ $html .= "<option value=''>{$data['empty']}</option>";
1102
+ }
1103
+
1104
+ foreach ($data['options'] as $key => $site) {
1105
+ if (is_array($site)) {
1106
+ $slt = ($key == $value ? "selected" : null);
1107
+ $html .= "<option value='$key' $slt>&nbsp;&nbsp;&nbsp;$key</option>";
1108
+ foreach ($site as $inKey => $inSite) {
1109
+ if (is_array($inSite)) {
1110
+ $slt = ($inKey == $value ? "selected" : null);
1111
+ $html .= "<option value='$inKey' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$inKey</option>";
1112
+ foreach ($inSite as $inInKey => $inInSite) {
1113
+ if (is_array($inInSite)) {
1114
+ $slt = ($inInKey == $value ? "selected" : null);
1115
+ $html .= "<option value='$inInKey' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$inInKey</option>";
1116
+ foreach ($inInSite as $iSite) {
1117
+ $slt = ($iSite == $value ? "selected" : null);
1118
+ $html .= "<option value='$iSite' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$iSite</option>";
1119
+ }
1120
+ } else {
1121
+ $slt = ($inInSite == $value ? "selected" : null);
1122
+ $html .= "<option value='$inInSite' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$inInSite</option>";
1123
+ }
1124
+ }
1125
+ } else {
1126
+ $slt = ($inSite == $value ? "selected" : null);
1127
+ $html .= "<option value='$inSite' $slt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$inSite</option>";
1128
+ }
1129
+ }
1130
+ } else {
1131
+ $slt = ($site == $value ? "selected" : null);
1132
+ $html .= "<option value='$site' $slt>$site</option>";
1133
+ }
1134
+ }
1135
+ $html .= "</select>";
1136
+ break;
1137
+ default:
1138
+ $html .= "<input id='{$id}' type='{$data['type']}' {$attr} value='" . esc_attr($value) . "' name='$name' />";
1139
+ break;
1140
+
1141
+ }
1142
+ $label = "<label class='field-label' for='{$id}'>{$title}{$require}{$recommended}</label>";
1143
+ $field_html = sprintf('<div class="field-content" id="%s-content">%s<p class="description">%s</div>', $id, $html, $desc);
1144
+ if ($data['type'] == 'heading') {
1145
+ $holderClass .= ' kcseo-heading-container';
1146
+ $label = '';
1147
+ $field_html = sprintf('<div class="kcseo-section-title-wrap">%s%s</div>',
1148
+ $title ? sprintf('<h5>%s</h5>', $title) : '',
1149
+ $desc ? sprintf('<p class="description">%s</p>', $desc) : null
1150
+ );
1151
+ }
1152
+
1153
+ $html = sprintf('<div class="field-container %s" id="%s-container">%s%s</div>',
1154
+ $holderClass,
1155
+ $id,
1156
+ $label,
1157
+ $field_html
1158
+ );
1159
+
1160
+ return $html;
1161
+ }
1162
+
1163
+ /**
1164
+ * @param array $data
1165
+ *
1166
+ * @return string|null
1167
+ */
1168
+ function get_jsonEncode($data = array()) {
1169
+ $html = null;
1170
+ if (!empty($data) && is_array($data)) {
1171
+ $html .= '<script type="application/ld+json">' . json_encode($data,
1172
+ JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . '</script>';
1173
+ }
1174
+
1175
+ return $html;
1176
+ }
1177
+
1178
+ function imgInfo($url = null) {
1179
+ $img = array();
1180
+ if ($url) {
1181
+ $imgA = @getimagesize($url);
1182
+ if (is_array($imgA) && !empty($imgA)) {
1183
+ $img['width'] = $imgA[0];
1184
+ $img['height'] = $imgA[1];
1185
+ } else {
1186
+ $img['width'] = 0;
1187
+ $img['height'] = 0;
1188
+ }
1189
+ }
1190
+
1191
+ return $img;
1192
+ }
1193
+
1194
+ function isAssoc($array) {
1195
+ $keys = array_keys($array);
1196
+
1197
+ return $keys !== array_keys($keys);
1198
+ }
1199
+
1200
+
1201
+ }
1202
  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
-