Schema - Version 1.6

Version Description

  • Fixed exclude post was not working properly.
  • Fixed cached post meta timestamp should be deleted on post save.
  • Fixed Schema post type label value.
  • Fixed Schema post types was not created on plugin activation.
  • Fixed schema reference post meta was not saved for scheduled posts.
  • Enhanced gravatar validation function.
  • Enhanced Blog markup performance by pulling data from cached post meta.
  • Added missing BlogPosting description in Blog page markup.
  • Added sameAs markup to BlogPosting property in Blog page markup.
  • Added sameAs markup to About page.
  • Added sameAs markup to Contact page.
  • Added new filter schema_blog_output to allow dev extend markups.
  • Added new filter schema_about_page_output to allow dev extend markups.
  • Added new filter schema_contact_page_output to allow dev extend markups.
  • Added missing post meta to the plugin uninstall function.
  • Added new function for recursive array search to admin functions file.
  • Modified readme.txt file.
Download this release

Release Info

Developer hishaman
Plugin Icon 128x128 Schema
Version 1.6
Comparing to
See all releases

Code changes from version 1.6.9.8.2 to 1.6

Files changed (87) hide show
  1. README.md +0 -74
  2. assets/css/admin.css +0 -54
  3. assets/css/admin.min.css +1 -1
  4. assets/css/schema-bootstrap.css +0 -3049
  5. assets/css/schema-bootstrap.min.css +0 -1
  6. assets/fonts/dashicons.eot +0 -0
  7. assets/fonts/dashicons.svg +0 -0
  8. assets/fonts/dashicons.ttf +0 -0
  9. assets/fonts/dashicons.woff +0 -0
  10. includes/admin/admin-bar-menu.php +4 -2
  11. includes/admin/admin-functions.php +77 -108
  12. includes/admin/admin-pages.php +2 -3
  13. includes/admin/class-menu.php +9 -38
  14. includes/admin/class-notices.php +0 -3
  15. includes/admin/class-welcome.php +10 -33
  16. includes/admin/extensions.php +0 -185
  17. includes/admin/meta-tax.php +7 -7
  18. includes/admin/meta-tax/.gitignore +1 -0
  19. includes/admin/meta-tax/README.md +0 -0
  20. includes/admin/meta-tax/class-meta-tax.php +1 -1
  21. includes/admin/meta-tax/class-usage-demo.php +0 -0
  22. includes/admin/meta-tax/css/tax-meta-class.css +1 -1
  23. includes/admin/meta-tax/images/add.png +0 -0
  24. includes/admin/meta-tax/images/delete-16.png +0 -0
  25. includes/admin/meta-tax/images/edit.png +0 -0
  26. includes/admin/meta-tax/images/remove.png +0 -0
  27. includes/admin/meta-tax/js/tax-meta-clss.js +0 -0
  28. includes/admin/meta-tax/lang/default.mo +0 -0
  29. includes/admin/meta-tax/lang/default.po +0 -0
  30. includes/admin/meta-tax/lang/fr_FR.mo +0 -0
  31. includes/admin/meta-tax/lang/fr_FR.po +0 -0
  32. includes/admin/meta-tax/license.txt +0 -0
  33. includes/admin/meta-tax/migration/tax_to_term_meta.php +141 -141
  34. includes/admin/meta.php +23 -45
  35. includes/admin/meta/class-meta.php +88 -229
  36. includes/admin/meta/css/chosen-sprite.png +0 -0
  37. includes/admin/meta/css/chosen-sprite@2x.png +0 -0
  38. includes/admin/meta/css/chosen.css +397 -9
  39. includes/admin/meta/css/jqueryui.css +0 -0
  40. includes/admin/meta/css/meta_box.css +17 -41
  41. includes/admin/meta/images/chosen-sprite.png +0 -0
  42. includes/admin/meta/images/image.png +0 -0
  43. includes/admin/meta/images/sprite.png +0 -0
  44. includes/admin/meta/js/chosen.js +9 -2
  45. includes/admin/meta/js/schema.js +11 -7
  46. includes/admin/meta/js/scripts.js +181 -197
  47. includes/admin/meta/sample.php +1 -1
  48. includes/admin/post-type/class-columns.php +0 -356
  49. includes/admin/post-type/schema-columns.php +0 -91
  50. includes/admin/post-type/schema-post-type.php +8 -6
  51. includes/admin/ref.php +10 -17
  52. includes/admin/settings/contextual-help.php +4 -4
  53. includes/admin/settings/register-settings.php +44 -78
  54. includes/admin/updater/class-license-handler.php +3 -3
  55. includes/admin/updater/class-updater.php +31 -126
  56. includes/deprecated-functions.php +20 -4
  57. includes/extensions/audio-object.php +0 -5
  58. includes/extensions/author.php +8 -10
  59. includes/extensions/breadcrumbs.php +0 -419
  60. includes/extensions/comment.php +2 -0
  61. includes/extensions/page-about.php +6 -6
  62. includes/extensions/page-contact.php +6 -6
  63. includes/extensions/post-meta-generator.php +5 -20
  64. includes/extensions/sameAs.php +5 -11
  65. includes/extensions/video-object.php +10 -18
  66. includes/integrations/amp.php +30 -8
  67. includes/integrations/edd.php +0 -40
  68. includes/integrations/genesis.php +12 -47
  69. includes/integrations/seo-framework.php +4 -2
  70. includes/integrations/thirstyaffiliates.php +0 -30
  71. includes/integrations/woocommerce.php +0 -27
  72. includes/integrations/yoast-seo.php +8 -93
  73. includes/json/author.php +4 -7
  74. includes/json/blog.php +41 -63
  75. includes/json/category.php +12 -29
  76. includes/json/knowledge-graph.php +48 -73
  77. includes/json/post-type-archive.php +0 -133
  78. includes/json/schema-output.php +40 -34
  79. includes/json/search-results.php +3 -3
  80. includes/json/tag.php +0 -101
  81. includes/json/taxonomy.php +0 -77
  82. includes/json/web-page-element.php +0 -163
  83. includes/misc-functions.php +33 -476
  84. includes/misc/auto_featured_img.php +62 -0
  85. includes/scripts.php +1 -3
  86. readme.txt +15 -283
  87. schema.php +10 -22
README.md CHANGED
@@ -1,5 +1,4 @@
1
  # [Schema](http://schema.press) #
2
- ============
3
 
4
  ### Welcome to our GitHub Repository
5
 
@@ -10,76 +9,3 @@ Schema is a light-weight plugin for adding schema.org structured data markup in
10
  By including structured data appropriate to your content, your site can enhance its search results and presentation.
11
 
12
  More information can be found at [scema.press](https://schema.press/).
13
-
14
- ### What is Schema markup?
15
-
16
- Schema markup is code (semantic vocabulary) that you put on your website to help the search engines return more informative results for users. So, Schema is not just for SEO reasons, it’s also for the benefit of the searcher.
17
-
18
- ### Schema Key Features
19
-
20
- * Easy to use, set it and forget it, with minimal settings.
21
- * Enable Schema types at once per post type or post category.
22
- * Valid markup, test it in Google Structured Data Testing Tool.
23
- * Output JSON-LD format, the most recommended by Google.
24
- * Reuse data saved in post meta, which is created by other plugins.
25
- * Extensible, means you can extend its functionality via other plugins, extensions or within your Theme’s functions.php file.
26
-
27
- ### Plugin Extensions
28
-
29
- * [Schema Review](https://wordpress.org/plugins/schema-review/): Extend Schema functionality by adding review and rating Structured Data functionality for Editors and Authors.
30
- * [Schema Default Image](https://wordpress.org/plugins/schema-default-image/): Add ability to set a default WordPress Featured image for schema.org markup.
31
-
32
- ### Supported Google/Schema Markups
33
-
34
- * [Knowledge Graph](https://developers.google.com/structured-data/customize/overview)
35
- * [Logos](https://developers.google.com/structured-data/customize/logos)
36
- * [Company Contact Numbers](https://developers.google.com/structured-data/customize/contact-points)
37
- * [Social Profile Links](https://developers.google.com/structured-data/customize/social-profiles)
38
-
39
- * Style Your Search Results:
40
- * [Enable Sitelinks Search Box](https://developers.google.com/structured-data/customize/logos)
41
- * [Show Your Site Name in Search](https://developers.google.com/structured-data/site-name)
42
-
43
- ### Supported Schema Types
44
-
45
- * Creative Work
46
- * [Article](https://schema.org/Article) enabled on Pages
47
- * [BlogPosting](https://schema.org/BlogPosting) enabled on Posts
48
- * [NewsArticle](https://schema.org/NewsArticle)
49
- * [Report](https://schema.org/Report)
50
- * [ScholarlyArticle](https://schema.org/ScholarlyArticle)
51
- * [TechArticle](https://schema.org/TechArticle)
52
-
53
- * [Blog](https://schema.org/Blog) to markup Blog posts list page.
54
- * [WPHeader](https://schema.org/WPHeader) to markup Web Page Header.
55
- * [WPFooter](https://schema.org/WPFooter) to markup Web Page Footer.
56
- * [BreadcrumbList](https://schema.org/BreadcrumbList) to markup Breadcrumbs.
57
- * [CollectionPage](https://schema.org/CollectionPage) to markup Categories Archives.
58
- * [CollectionPage](https://schema.org/CollectionPage) to markup Tags Archives.
59
- * [AboutPage](https://schema.org/AboutPage) to markup the About page.
60
- * [ContactPage](https://schema.org/ContactPage) to markup the Contact page.
61
- * [Person](https://schema.org/Person) enabled on Author pages
62
- * [VideoObject](https://schema.org/VideoObject) enable automatically on all videos embedded with oEmbed. Supports VideoPress, YouTube, TED, Vimeo, Dailymotion, and Vine.
63
- * [AudioObject](https://schema.org/AudioObject) enable automatically on all audio embedded with oEmbed. Supports SoundCloud, and Mixcloud.
64
-
65
-
66
- ### Supported Plugins
67
-
68
- Schema plugin integrates, and play nicely with:
69
-
70
- * Yoast SEO
71
- * AMP plugin
72
- * WPRichSnippets
73
- * The SEO Framework
74
- * Visual Composer
75
- * ThirstyAffiliates
76
- * WooCommerce
77
- * Easy Digital Downloads (EDD)
78
-
79
- ### Supported Themes
80
-
81
- * Genesis 2.x
82
- * Thesis 2.x
83
- * Divi
84
-
85
- More information and documentation can be found at [scema.press](https://schema.press/).
1
  # [Schema](http://schema.press) #
 
2
 
3
  ### Welcome to our GitHub Repository
4
 
9
  By including structured data appropriate to your content, your site can enhance its search results and presentation.
10
 
11
  More information can be found at [scema.press](https://schema.press/).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/css/admin.css CHANGED
@@ -93,21 +93,6 @@ a.schema-wp-delete:hover {
93
  color: #ccc;
94
  }
95
 
96
- /* rating scale table */
97
- table.schema-review-rating-scale {
98
- background: none;
99
- background-color:inherit;
100
- max-width: 680px;
101
- }
102
-
103
- .schema-review-rating-scale tr th {
104
- padding: 6px 10px 6px 10px
105
- }
106
-
107
- .schema-review-rating-scale td {
108
- padding: 6px 5px 6px 10px;
109
- }
110
-
111
  /* General Settings Styles
112
  -------------------------------------------------------------- */
113
 
@@ -290,42 +275,3 @@ table.schema-review-rating-scale {
290
  .wrap-licenses p.submit {
291
  clear: both;
292
  }
293
-
294
- /* Extensions */
295
-
296
- #schema-wp-extensions h2 {
297
- margin: 0 0 15px;
298
- }
299
-
300
- #schema-wp-extensions .schema-wp-extension {
301
- display: inline-block;
302
- vertical-align: top;
303
- margin: 0 11px 14px 0;
304
- background: #fff;
305
- border: 1px solid #ccc;
306
- width: 320px;
307
- padding: 14px;
308
- min-height: 290px;
309
- position: relative;
310
- }
311
-
312
- #schema-wp-extensions .schema-wp-extension h3 {
313
- margin: 0 0 8px;
314
- font-size: 13px;
315
- }
316
-
317
- #schema-wp-extensions .schema-wp-extension .button-secondary {
318
- position: absolute;
319
- bottom: 14px;
320
- left: 14px;
321
- }
322
-
323
- #schema-wp-extensions .schema-wp-extension .wp-post-image {
324
- width: 100%;
325
- height: auto;
326
- display: block;
327
- }
328
-
329
- .schema-wp-extensions-footer {
330
- padding-top: 10px;
331
- }
93
  color: #ccc;
94
  }
95
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  /* General Settings Styles
97
  -------------------------------------------------------------- */
98
 
275
  .wrap-licenses p.submit {
276
  clear: both;
277
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/css/admin.min.css CHANGED
@@ -1 +1 @@
1
- .schema-wp-wrap a,.wrap-licenses .schema-wp-license-data.license-expires-soon-notice a:hover,.wrap-licenses .schema-wp-license-data.schema-wp-license-expired a:hover,.wrap-licenses .schema-wp-license-data[class*=schema-wp-license-] a:hover{text-decoration:none}@font-face{font-family:schema-wp-dashicons;src:url(../fonts/dashicons.eot);src:url(../fonts/dashicons.eot?#iefix) format("embedded-opentype"),url(../fonts/dashicons.woff) format("woff"),url(../fonts/dashicons.ttf) format("truetype"),url(../fonts/dashicons.svg#dashicons) format("svg")}#adminmenu #toplevel_page_schema div.wp-menu-image:before{font-family:schema-wp-dashicons!important;content:"\e900"}.schema-wp-ajax-search-wrap{position:relative}.schema-wp-ajax{position:absolute;right:8px;top:1px}.feature-section ul{list-style:disc inside}.return-to-dashboard i{margin-right:2px;font-size:16px;margin-top:1px}.changelog .sub-section{width:50%;display:block;float:left}@media (max-width:800px){.changelog .sub-section{width:auto}}#preview_image{margin:15px 0;width:300px}#preview_image img{height:auto;display:block;max-width:100%}.schema-wp-hidden{display:none}.schema-wp-clearfix:after{content:".";display:block;height:0;text-indent:-9999px;visibility:hidden}a.schema-wp-delete{color:#a00}a.schema-wp-delete:hover{color:red}::-webkit-input-placeholder{color:#ccc}::-moz-placeholder{color:#ccc}:-ms-input-placeholder{color:#ccc}:-moz-placeholder{color:#ccc}table.schema-review-rating-scale{background:0 0;background-color:inherit;max-width:680px}.schema-review-rating-scale tr th{padding:6px 10px}.schema-review-rating-scale td{padding:6px 5px 6px 10px}.download_page_edd-settings .form-table label{color:#666;font-size:14px;font-style:italic;margin:4px 0 0}.download_page_edd-settings .form-table input.small-text~label,.download_page_edd-settings .form-table input[type=checkbox]+label{display:inline}.download_page_edd-settings .form-table tr>th>h3,.download_page_edd-settings .form-table tr>th>strong{font-size:1.2em;font-weight:600;margin:0 auto}.schema-wp-help-tip{cursor:help}.schema-wp-ui-tooltip{background:#333!important;border-radius:3px!important;box-shadow:1px 1px 2px 1px rgba(214,214,214,.5);color:#dedede!important;max-width:300px;padding:7px;text-rendering:optimizeLegibility}#schema-wp-add-ons h2.nav-tab-wrapper{position:relative}.schema-wp-tab-span{top:-6px;right:0;position:absolute}.schema-wp-add-ons-footer{padding-top:10px}#schema-wp-add-ons h2{margin:0 0 15px}#schema-wp-add-ons h2 .button-primary{position:absolute}#schema-wp-add-ons .schema-wp-extension{background:#fff;border:1px solid #ccc;float:left;padding:14px;position:relative;margin:0 15px 15px 0;width:320px;height:315px}#schema-wp-add-ons .schema-wp-extension h3{font-size:13px;margin:0 0 8px}#schema-wp-add-ons .schema-wp-extension .button-secondary{position:absolute;bottom:14px;left:14px}#schema-wp-add-ons .schema-wp-browse-all{clear:both;width:100%}#schema-wp-add-ons .schema-wp-extension .third-party{display:none}#schema-wp-add-ons .schema-wp-starter-package{background-color:#85c0e5;border-color:#62a9d7;color:#fff}#schema-wp-add-ons .schema-wp-starter-package h3{color:#fff}#schema-wp-add-ons .schema-wp-extension .wp-post-image{width:100%;height:auto}.wrap-licenses .form-table,.wrap-licenses caption,.wrap-licenses tbody,.wrap-licenses td,.wrap-licenses tfoot,.wrap-licenses th,.wrap-licenses thead,.wrap-licenses tr{display:block}.wrap-licenses .form-table tr{float:left;margin:0 15px 15px 0;background:#fff;border:1px solid #ccc;width:30.5%;max-width:350px;padding:14px;min-height:220px;position:relative;box-sizing:border-box}.wrap-licenses .form-table th{background:#f9f9f9;padding:14px;border-bottom:1px solid #ccc;margin:-14px -14px 20px;width:100%}.wrap-licenses .form-table td{padding:0}.wrap-licenses td input.regular-text{margin:0 0 8px;width:100%}.wrap-licenses .schema-wp-license-data[class*=schema-wp-license-]{position:absolute;background:#fafafa;padding:14px;border-top:1px solid #eee;margin:20px -14px -14px;min-height:67px;width:100%;bottom:14px;box-sizing:border-box}.wrap-licenses .schema-wp-license-data[class*=schema-wp-license-] a{color:#444}.wrap-licenses .schema-wp-license-data.license-expires-soon-notice{background-color:#00a0d2;color:#fff;border-color:#00a0d2}.wrap-licenses .schema-wp-license-data.schema-wp-license-expired{background-color:#e24e4e;color:#fff;border-color:#e24e4e}.wrap-licenses .schema-wp-license-data.schema-wp-license-error,.wrap-licenses .schema-wp-license-data.schema-wp-license-invalid,.wrap-licenses .schema-wp-license-data.schema-wp-license-item_name_mismatch,.wrap-licenses .schema-wp-license-data.schema-wp-license-missing,.wrap-licenses .schema-wp-license-data.schema-wp-license-site_inactive{background-color:#ffebcd;border-color:#ffebcd}.wrap-licenses .schema-wp-license-data p{font-size:13px;margin-top:0}.wrap-licenses .schema-wp-license-data.license-expires-soon-notice a,.wrap-licenses .schema-wp-license-data.schema-wp-license-expired a{color:#fff}.wrap-licenses p.submit{clear:both}#schema-wp-extensions h2{margin:0 0 15px}#schema-wp-extensions .schema-wp-extension{display:inline-block;vertical-align:top;margin:0 11px 14px 0;background:#fff;border:1px solid #ccc;width:320px;padding:14px;min-height:290px;position:relative}#schema-wp-extensions .schema-wp-extension h3{margin:0 0 8px;font-size:13px}#schema-wp-extensions .schema-wp-extension .button-secondary{position:absolute;bottom:14px;left:14px}#schema-wp-extensions .schema-wp-extension .wp-post-image{width:100%;height:auto;display:block}.schema-wp-extensions-footer{padding-top:10px}
1
+ .schema-wp-wrap a,.wrap-licenses .schema-wp-license-data.license-expires-soon-notice a:hover,.wrap-licenses .schema-wp-license-data.schema-wp-license-expired a:hover,.wrap-licenses .schema-wp-license-data[class*=schema-wp-license-] a:hover{text-decoration:none}@font-face{font-family:schema-wp-dashicons;src:url(../fonts/dashicons.eot);src:url(../fonts/dashicons.eot?#iefix) format("embedded-opentype"),url(../fonts/dashicons.woff) format("woff"),url(../fonts/dashicons.ttf) format("truetype"),url(../fonts/dashicons.svg#dashicons) format("svg")}#adminmenu #toplevel_page_schema div.wp-menu-image:before{font-family:schema-wp-dashicons!important;content:"\e900"}.schema-wp-ajax-search-wrap{position:relative}.schema-wp-ajax{position:absolute;right:8px;top:1px}.feature-section ul{list-style:disc inside}.return-to-dashboard i{margin-right:2px;font-size:16px;margin-top:1px}.changelog .sub-section{width:50%;display:block;float:left}@media (max-width:800px){.changelog .sub-section{width:auto}}#preview_image{margin:15px 0;width:300px}#preview_image img{height:auto;display:block;max-width:100%}.schema-wp-hidden{display:none}.schema-wp-clearfix:after{content:".";display:block;height:0;text-indent:-9999px;visibility:hidden}a.schema-wp-delete{color:#a00}a.schema-wp-delete:hover{color:red}::-webkit-input-placeholder{color:#ccc}::-moz-placeholder{color:#ccc}:-ms-input-placeholder{color:#ccc}:-moz-placeholder{color:#ccc}.download_page_edd-settings .form-table label{color:#666;font-size:14px;font-style:italic;margin:4px 0 0}.download_page_edd-settings .form-table input.small-text~label,.download_page_edd-settings .form-table input[type=checkbox]+label{display:inline}.download_page_edd-settings .form-table tr>th>h3,.download_page_edd-settings .form-table tr>th>strong{font-size:1.2em;font-weight:600;margin:0 auto}.schema-wp-help-tip{cursor:help}.schema-wp-ui-tooltip{background:#333!important;border-radius:3px!important;box-shadow:1px 1px 2px 1px rgba(214,214,214,.5);color:#dedede!important;max-width:300px;padding:7px;text-rendering:optimizeLegibility}#schema-wp-add-ons h2.nav-tab-wrapper{position:relative}.schema-wp-tab-span{top:-6px;right:0;position:absolute}.schema-wp-add-ons-footer{padding-top:10px}#schema-wp-add-ons h2{margin:0 0 15px}#schema-wp-add-ons h2 .button-primary{position:absolute}#schema-wp-add-ons .schema-wp-extension{background:#fff;border:1px solid #ccc;float:left;padding:14px;position:relative;margin:0 15px 15px 0;width:320px;height:315px}#schema-wp-add-ons .schema-wp-extension h3{font-size:13px;margin:0 0 8px}#schema-wp-add-ons .schema-wp-extension .button-secondary{position:absolute;bottom:14px;left:14px}#schema-wp-add-ons .schema-wp-browse-all{clear:both;width:100%}#schema-wp-add-ons .schema-wp-extension .third-party{display:none}#schema-wp-add-ons .schema-wp-starter-package{background-color:#85c0e5;border-color:#62a9d7;color:#fff}#schema-wp-add-ons .schema-wp-starter-package h3{color:#fff}#schema-wp-add-ons .schema-wp-extension .wp-post-image{width:100%;height:auto}.wrap-licenses .form-table,.wrap-licenses caption,.wrap-licenses tbody,.wrap-licenses td,.wrap-licenses tfoot,.wrap-licenses th,.wrap-licenses thead,.wrap-licenses tr{display:block}.wrap-licenses .form-table tr{float:left;margin:0 15px 15px 0;background:#fff;border:1px solid #ccc;width:30.5%;max-width:350px;padding:14px;min-height:220px;position:relative;box-sizing:border-box}.wrap-licenses .form-table th{background:#f9f9f9;padding:14px;border-bottom:1px solid #ccc;margin:-14px -14px 20px;width:100%}.wrap-licenses .form-table td{padding:0}.wrap-licenses td input.regular-text{margin:0 0 8px;width:100%}.wrap-licenses .schema-wp-license-data[class*=schema-wp-license-]{position:absolute;background:#fafafa;padding:14px;border-top:1px solid #eee;margin:20px -14px -14px;min-height:67px;width:100%;bottom:14px;box-sizing:border-box}.wrap-licenses .schema-wp-license-data[class*=schema-wp-license-] a{color:#444}.wrap-licenses .schema-wp-license-data.license-expires-soon-notice{background-color:#00a0d2;color:#fff;border-color:#00a0d2}.wrap-licenses .schema-wp-license-data.schema-wp-license-expired{background-color:#e24e4e;color:#fff;border-color:#e24e4e}.wrap-licenses .schema-wp-license-data.schema-wp-license-error,.wrap-licenses .schema-wp-license-data.schema-wp-license-invalid,.wrap-licenses .schema-wp-license-data.schema-wp-license-item_name_mismatch,.wrap-licenses .schema-wp-license-data.schema-wp-license-missing,.wrap-licenses .schema-wp-license-data.schema-wp-license-site_inactive{background-color:#ffebcd;border-color:#ffebcd}.wrap-licenses .schema-wp-license-data p{font-size:13px;margin-top:0}.wrap-licenses .schema-wp-license-data.license-expires-soon-notice a,.wrap-licenses .schema-wp-license-data.schema-wp-license-expired a{color:#fff}.wrap-licenses p.submit{clear:both}
assets/css/schema-bootstrap.css DELETED
@@ -1,3049 +0,0 @@
1
- .schema-container {
2
- margin-right: auto;
3
- margin-left: auto;
4
- padding-right: 15px;
5
- padding-left: 15px;
6
- width: 100%;
7
- }
8
-
9
- @media (min-width: 576px) {
10
- .schema-container {
11
- max-width: 540px;
12
- }
13
- }
14
-
15
- @media (min-width: 768px) {
16
- .schema-container {
17
- max-width: 720px;
18
- }
19
- }
20
-
21
- @media (min-width: 992px) {
22
- .schema-container {
23
- max-width: 960px;
24
- }
25
- }
26
-
27
- @media (min-width: 1200px) {
28
- .schema-container {
29
- max-width: 1140px;
30
- }
31
- }
32
-
33
- .schema-container-fluid {
34
- width: 100%;
35
- margin-right: auto;
36
- margin-left: auto;
37
- padding-right: 15px;
38
- padding-left: 15px;
39
- width: 100%;
40
- }
41
-
42
- .schema-row {
43
- display: -ms-flexbox;
44
- display: flex;
45
- -ms-flex-wrap: wrap;
46
- flex-wrap: wrap;
47
- margin-right: -15px;
48
- margin-left: -15px;
49
- }
50
-
51
- .schema-no-gutters {
52
- margin-right: 0;
53
- margin-left: 0;
54
- }
55
-
56
- .schema-no-gutters > .schema-col,
57
- .schema-no-gutters > [class*="schema-col-"] {
58
- padding-right: 0;
59
- padding-left: 0;
60
- }
61
-
62
- .schema-col-1, .schema-col-2, .schema-col-3, .schema-col-4, .schema-col-5, .schema-col-6, .schema-col-7, .schema-col-8, .schema-col-9, .schema-col-10, .schema-col-11, .schema-col-12, .schema-col,
63
- .schema-col-auto, .schema-col-sm-1, .schema-col-sm-2, .schema-col-sm-3, .schema-col-sm-4, .schema-col-sm-5, .schema-col-sm-6, .schema-col-sm-7, .schema-col-sm-8, .schema-col-sm-9, .schema-col-sm-10, .schema-col-sm-11, .schema-col-sm-12, .schema-col-sm,
64
- .schema-col-sm-auto, .schema-col-md-1, .schema-col-md-2, .schema-col-md-3, .schema-col-md-4, .schema-col-md-5, .schema-col-md-6, .schema-col-md-7, .schema-col-md-8, .schema-col-md-9, .schema-col-md-10, .schema-col-md-11, .schema-col-md-12, .schema-col-md,
65
- .schema-col-md-auto, .schema-col-lg-1, .schema-col-lg-2, .schema-col-lg-3, .schema-col-lg-4, .schema-col-lg-5, .schema-col-lg-6, .schema-col-lg-7, .schema-col-lg-8, .schema-col-lg-9, .schema-col-lg-10, .schema-col-lg-11, .schema-col-lg-12, .schema-col-lg,
66
- .schema-col-lg-auto, .schema-col-xl-1, .schema-col-xl-2, .schema-col-xl-3, .schema-col-xl-4, .schema-col-xl-5, .schema-col-xl-6, .schema-col-xl-7, .schema-col-xl-8, .schema-col-xl-9, .schema-col-xl-10, .schema-col-xl-11, .schema-col-xl-12, .schema-col-xl,
67
- .schema-col-xl-auto {
68
- position: relative;
69
- width: 100%;
70
- min-height: 1px;
71
- padding-right: 15px;
72
- padding-left: 15px;
73
- }
74
-
75
- .schema-col {
76
- -ms-flex-preferred-size: 0;
77
- flex-basis: 0;
78
- -ms-flex-positive: 1;
79
- flex-grow: 1;
80
- max-width: 100%;
81
- }
82
-
83
- .schema-col-auto {
84
- -ms-flex: 0 0 auto;
85
- flex: 0 0 auto;
86
- width: auto;
87
- max-width: none;
88
- }
89
-
90
- .schema-col-1 {
91
- -ms-flex: 0 0 8.333333%;
92
- flex: 0 0 8.333333%;
93
- max-width: 8.333333%;
94
- }
95
-
96
- .schema-col-2 {
97
- -ms-flex: 0 0 16.666667%;
98
- flex: 0 0 16.666667%;
99
- max-width: 16.666667%;
100
- }
101
-
102
- .schema-col-3 {
103
- -ms-flex: 0 0 25%;
104
- flex: 0 0 25%;
105
- max-width: 25%;
106
- }
107
-
108
- .schema-col-4 {
109
- -ms-flex: 0 0 33.333333%;
110
- flex: 0 0 33.333333%;
111
- max-width: 33.333333%;
112
- }
113
-
114
- .schema-col-5 {
115
- -ms-flex: 0 0 41.666667%;
116
- flex: 0 0 41.666667%;
117
- max-width: 41.666667%;
118
- }
119
-
120
- .schema-col-6 {
121
- -ms-flex: 0 0 50%;
122
- flex: 0 0 50%;
123
- max-width: 50%;
124
- }
125
-
126
- .schema-col-7 {
127
- -ms-flex: 0 0 58.333333%;
128
- flex: 0 0 58.333333%;
129
- max-width: 58.333333%;
130
- }
131
-
132
- .schema-col-8 {
133
- -ms-flex: 0 0 66.666667%;
134
- flex: 0 0 66.666667%;
135
- max-width: 66.666667%;
136
- }
137
-
138
- .schema-col-9 {
139
- -ms-flex: 0 0 75%;
140
- flex: 0 0 75%;
141
- max-width: 75%;
142
- }
143
-
144
- .schema-col-10 {
145
- -ms-flex: 0 0 83.333333%;
146
- flex: 0 0 83.333333%;
147
- max-width: 83.333333%;
148
- }
149
-
150
- .schema-col-11 {
151
- -ms-flex: 0 0 91.666667%;
152
- flex: 0 0 91.666667%;
153
- max-width: 91.666667%;
154
- }
155
-
156
- .schema-col-12 {
157
- -ms-flex: 0 0 100%;
158
- flex: 0 0 100%;
159
- max-width: 100%;
160
- }
161
-
162
- .schema-order-1 {
163
- -ms-flex-order: 1;
164
- order: 1;
165
- }
166
-
167
- .schema-order-2 {
168
- -ms-flex-order: 2;
169
- order: 2;
170
- }
171
-
172
- .schema-order-3 {
173
- -ms-flex-order: 3;
174
- order: 3;
175
- }
176
-
177
- .schema-order-4 {
178
- -ms-flex-order: 4;
179
- order: 4;
180
- }
181
-
182
- .schema-order-5 {
183
- -ms-flex-order: 5;
184
- order: 5;
185
- }
186
-
187
- .schema-order-6 {
188
- -ms-flex-order: 6;
189
- order: 6;
190
- }
191
-
192
- .schema-order-7 {
193
- -ms-flex-order: 7;
194
- order: 7;
195
- }
196
-
197
- .schema-order-8 {
198
- -ms-flex-order: 8;
199
- order: 8;
200
- }
201
-
202
- .schema-order-9 {
203
- -ms-flex-order: 9;
204
- order: 9;
205
- }
206
-
207
- .schema-order-10 {
208
- -ms-flex-order: 10;
209
- order: 10;
210
- }
211
-
212
- .schema-order-11 {
213
- -ms-flex-order: 11;
214
- order: 11;
215
- }
216
-
217
- .schema-order-12 {
218
- -ms-flex-order: 12;
219
- order: 12;
220
- }
221
-
222
- @media (min-width: 576px) {
223
- .schema-col-sm {
224
- -ms-flex-preferred-size: 0;
225
- flex-basis: 0;
226
- -ms-flex-positive: 1;
227
- flex-grow: 1;
228
- max-width: 100%;
229
- }
230
- .schema-col-sm-auto {
231
- -ms-flex: 0 0 auto;
232
- flex: 0 0 auto;
233
- width: auto;
234
- max-width: none;
235
- }
236
- .schema-col-sm-1 {
237
- -ms-flex: 0 0 8.333333%;
238
- flex: 0 0 8.333333%;
239
- max-width: 8.333333%;
240
- }
241
- .schema-col-sm-2 {
242
- -ms-flex: 0 0 16.666667%;
243
- flex: 0 0 16.666667%;
244
- max-width: 16.666667%;
245
- }
246
- .schema-col-sm-3 {
247
- -ms-flex: 0 0 25%;
248
- flex: 0 0 25%;
249
- max-width: 25%;
250
- }
251
- .schema-col-sm-4 {
252
- -ms-flex: 0 0 33.333333%;
253
- flex: 0 0 33.333333%;
254
- max-width: 33.333333%;
255
- }
256
- .schema-col-sm-5 {
257
- -ms-flex: 0 0 41.666667%;
258
- flex: 0 0 41.666667%;
259
- max-width: 41.666667%;
260
- }
261
- .schema-col-sm-6 {
262
- -ms-flex: 0 0 50%;
263
- flex: 0 0 50%;
264
- max-width: 50%;
265
- }
266
- .schema-col-sm-7 {
267
- -ms-flex: 0 0 58.333333%;
268
- flex: 0 0 58.333333%;
269
- max-width: 58.333333%;
270
- }
271
- .schema-col-sm-8 {
272
- -ms-flex: 0 0 66.666667%;
273
- flex: 0 0 66.666667%;
274
- max-width: 66.666667%;
275
- }
276
- .schema-col-sm-9 {
277
- -ms-flex: 0 0 75%;
278
- flex: 0 0 75%;
279
- max-width: 75%;
280
- }
281
- .schema-col-sm-10 {
282
- -ms-flex: 0 0 83.333333%;
283
- flex: 0 0 83.333333%;
284
- max-width: 83.333333%;
285
- }
286
- .schema-col-sm-11 {
287
- -ms-flex: 0 0 91.666667%;
288
- flex: 0 0 91.666667%;
289
- max-width: 91.666667%;
290
- }
291
- .schema-col-sm-12 {
292
- -ms-flex: 0 0 100%;
293
- flex: 0 0 100%;
294
- max-width: 100%;
295
- }
296
- .schema-order-sm-1 {
297
- -ms-flex-order: 1;
298
- order: 1;
299
- }
300
- .schema-order-sm-2 {
301
- -ms-flex-order: 2;
302
- order: 2;
303
- }
304
- .schema-order-sm-3 {
305
- -ms-flex-order: 3;
306
- order: 3;
307
- }
308
- .schema-order-sm-4 {
309
- -ms-flex-order: 4;
310
- order: 4;
311
- }
312
- .schema-order-sm-5 {
313
- -ms-flex-order: 5;
314
- order: 5;
315
- }
316
- .schema-order-sm-6 {
317
- -ms-flex-order: 6;
318
- order: 6;
319
- }
320
- .schema-order-sm-7 {
321
- -ms-flex-order: 7;
322
- order: 7;
323
- }
324
- .schema-order-sm-8 {
325
- -ms-flex-order: 8;
326
- order: 8;
327
- }
328
- .schema-order-sm-9 {
329
- -ms-flex-order: 9;
330
- order: 9;
331
- }
332
- .schema-order-sm-10 {
333
- -ms-flex-order: 10;
334
- order: 10;
335
- }
336
- .schema-order-sm-11 {
337
- -ms-flex-order: 11;
338
- order: 11;
339
- }
340
- .schema-order-sm-12 {
341
- -ms-flex-order: 12;
342
- order: 12;
343
- }
344
- }
345
-
346
- @media (min-width: 768px) {
347
- .schema-col-md {
348
- -ms-flex-preferred-size: 0;
349
- flex-basis: 0;
350
- -ms-flex-positive: 1;
351
- flex-grow: 1;
352
- max-width: 100%;
353
- }
354
- .schema-col-md-auto {
355
- -ms-flex: 0 0 auto;
356
- flex: 0 0 auto;
357
- width: auto;
358
- max-width: none;
359
- }
360
- .schema-col-md-1 {
361
- -ms-flex: 0 0 8.333333%;
362
- flex: 0 0 8.333333%;
363
- max-width: 8.333333%;
364
- }
365
- .schema-col-md-2 {
366
- -ms-flex: 0 0 16.666667%;
367
- flex: 0 0 16.666667%;
368
- max-width: 16.666667%;
369
- }
370
- .schema-col-md-3 {
371
- -ms-flex: 0 0 25%;
372
- flex: 0 0 25%;
373
- max-width: 25%;
374
- }
375
- .schema-col-md-4 {
376
- -ms-flex: 0 0 33.333333%;
377
- flex: 0 0 33.333333%;
378
- max-width: 33.333333%;
379
- }
380
- .schema-col-md-5 {
381
- -ms-flex: 0 0 41.666667%;
382
- flex: 0 0 41.666667%;
383
- max-width: 41.666667%;
384
- }
385
- .schema-col-md-6 {
386
- -ms-flex: 0 0 50%;
387
- flex: 0 0 50%;
388
- max-width: 50%;
389
- }
390
- .schema-col-md-7 {
391
- -ms-flex: 0 0 58.333333%;
392
- flex: 0 0 58.333333%;
393
- max-width: 58.333333%;
394
- }
395
- .schema-col-md-8 {
396
- -ms-flex: 0 0 66.666667%;
397
- flex: 0 0 66.666667%;
398
- max-width: 66.666667%;
399
- }
400
- .schema-col-md-9 {
401
- -ms-flex: 0 0 75%;
402
- flex: 0 0 75%;
403
- max-width: 75%;
404
- }
405
- .schema-col-md-10 {
406
- -ms-flex: 0 0 83.333333%;
407
- flex: 0 0 83.333333%;
408
- max-width: 83.333333%;
409
- }
410
- .schema-col-md-11 {
411
- -ms-flex: 0 0 91.666667%;
412
- flex: 0 0 91.666667%;
413
- max-width: 91.666667%;
414
- }
415
- .schema-col-md-12 {
416
- -ms-flex: 0 0 100%;
417
- flex: 0 0 100%;
418
- max-width: 100%;
419
- }
420
- .schema-order-md-1 {
421
- -ms-flex-order: 1;
422
- order: 1;
423
- }
424
- .schema-order-md-2 {
425
- -ms-flex-order: 2;
426
- order: 2;
427
- }
428
- .schema-order-md-3 {
429
- -ms-flex-order: 3;
430
- order: 3;
431
- }
432
- .schema-order-md-4 {
433
- -ms-flex-order: 4;
434
- order: 4;
435
- }
436
- .schema-order-md-5 {
437
- -ms-flex-order: 5;
438
- order: 5;
439
- }
440
- .schema-order-md-6 {
441
- -ms-flex-order: 6;
442
- order: 6;
443
- }
444
- .schema-order-md-7 {
445
- -ms-flex-order: 7;
446
- order: 7;
447
- }
448
- .schema-order-md-8 {
449
- -ms-flex-order: 8;
450
- order: 8;
451
- }
452
- .schema-order-md-9 {
453
- -ms-flex-order: 9;
454
- order: 9;
455
- }
456
- .schema-order-md-10 {
457
- -ms-flex-order: 10;
458
- order: 10;
459
- }
460
- .schema-order-md-11 {
461
- -ms-flex-order: 11;
462
- order: 11;
463
- }
464
- .schema-order-md-12 {
465
- -ms-flex-order: 12;
466
- order: 12;
467
- }
468
- }
469
-
470
- @media (min-width: 992px) {
471
- .schema-col-lg {
472
- -ms-flex-preferred-size: 0;
473
- flex-basis: 0;
474
- -ms-flex-positive: 1;
475
- flex-grow: 1;
476
- max-width: 100%;
477
- }
478
- .schema-col-lg-auto {
479
- -ms-flex: 0 0 auto;
480
- flex: 0 0 auto;
481
- width: auto;
482
- max-width: none;
483
- }
484
- .schema-col-lg-1 {
485
- -ms-flex: 0 0 8.333333%;
486
- flex: 0 0 8.333333%;
487
- max-width: 8.333333%;
488
- }
489
- .schema-col-lg-2 {
490
- -ms-flex: 0 0 16.666667%;
491
- flex: 0 0 16.666667%;
492
- max-width: 16.666667%;
493
- }
494
- .schema-col-lg-3 {
495
- -ms-flex: 0 0 25%;
496
- flex: 0 0 25%;
497
- max-width: 25%;
498
- }
499
- .schema-col-lg-4 {
500
- -ms-flex: 0 0 33.333333%;
501
- flex: 0 0 33.333333%;
502
- max-width: 33.333333%;
503
- }
504
- .schema-col-lg-5 {
505
- -ms-flex: 0 0 41.666667%;
506
- flex: 0 0 41.666667%;
507
- max-width: 41.666667%;
508
- }
509
- .schema-col-lg-6 {
510
- -ms-flex: 0 0 50%;
511
- flex: 0 0 50%;
512
- max-width: 50%;
513
- }
514
- .schema-col-lg-7 {
515
- -ms-flex: 0 0 58.333333%;
516
- flex: 0 0 58.333333%;
517
- max-width: 58.333333%;
518
- }
519
- .schema-col-lg-8 {
520
- -ms-flex: 0 0 66.666667%;
521
- flex: 0 0 66.666667%;
522
- max-width: 66.666667%;
523
- }
524
- .schema-col-lg-9 {
525
- -ms-flex: 0 0 75%;
526
- flex: 0 0 75%;
527
- max-width: 75%;
528
- }
529
- .schema-col-lg-10 {
530
- -ms-flex: 0 0 83.333333%;
531
- flex: 0 0 83.333333%;
532
- max-width: 83.333333%;
533
- }
534
- .schema-col-lg-11 {
535
- -ms-flex: 0 0 91.666667%;
536
- flex: 0 0 91.666667%;
537
- max-width: 91.666667%;
538
- }
539
- .schema-col-lg-12 {
540
- -ms-flex: 0 0 100%;
541
- flex: 0 0 100%;
542
- max-width: 100%;
543
- }
544
- .schema-order-lg-1 {
545
- -ms-flex-order: 1;
546
- order: 1;
547
- }
548
- .schema-order-lg-2 {
549
- -ms-flex-order: 2;
550
- order: 2;
551
- }
552
- .schema-order-lg-3 {
553
- -ms-flex-order: 3;
554
- order: 3;
555
- }
556
- .schema-order-lg-4 {
557
- -ms-flex-order: 4;
558
- order: 4;
559
- }
560
- .schema-order-lg-5 {
561
- -ms-flex-order: 5;
562
- order: 5;
563
- }
564
- .schema-order-lg-6 {
565
- -ms-flex-order: 6;
566
- order: 6;
567
- }
568
- .schema-order-lg-7 {
569
- -ms-flex-order: 7;
570
- order: 7;
571
- }
572
- .schema-order-lg-8 {
573
- -ms-flex-order: 8;
574
- order: 8;
575
- }
576
- .schema-order-lg-9 {
577
- -ms-flex-order: 9;
578
- order: 9;
579
- }
580
- .schema-order-lg-10 {
581
- -ms-flex-order: 10;
582
- order: 10;
583
- }
584
- .schema-order-lg-11 {
585
- -ms-flex-order: 11;
586
- order: 11;
587
- }
588
- .schema-order-lg-12 {
589
- -ms-flex-order: 12;
590
- order: 12;
591
- }
592
- }
593
-
594
- @media (min-width: 1200px) {
595
- .schema-col-xl {
596
- -ms-flex-preferred-size: 0;
597
- flex-basis: 0;
598
- -ms-flex-positive: 1;
599
- flex-grow: 1;
600
- max-width: 100%;
601
- }
602
- .schema-col-xl-auto {
603
- -ms-flex: 0 0 auto;
604
- flex: 0 0 auto;
605
- width: auto;
606
- max-width: none;
607
- }
608
- .schema-col-xl-1 {
609
- -ms-flex: 0 0 8.333333%;
610
- flex: 0 0 8.333333%;
611
- max-width: 8.333333%;
612
- }
613
- .schema-col-xl-2 {
614
- -ms-flex: 0 0 16.666667%;
615
- flex: 0 0 16.666667%;
616
- max-width: 16.666667%;
617
- }
618
- .schema-col-xl-3 {
619
- -ms-flex: 0 0 25%;
620
- flex: 0 0 25%;
621
- max-width: 25%;
622
- }
623
- .schema-col-xl-4 {
624
- -ms-flex: 0 0 33.333333%;
625
- flex: 0 0 33.333333%;
626
- max-width: 33.333333%;
627
- }
628
- .schema-col-xl-5 {
629
- -ms-flex: 0 0 41.666667%;
630
- flex: 0 0 41.666667%;
631
- max-width: 41.666667%;
632
- }
633
- .schema-col-xl-6 {
634
- -ms-flex: 0 0 50%;
635
- flex: 0 0 50%;
636
- max-width: 50%;
637
- }
638
- .schema-col-xl-7 {
639
- -ms-flex: 0 0 58.333333%;
640
- flex: 0 0 58.333333%;
641
- max-width: 58.333333%;
642
- }
643
- .schema-col-xl-8 {
644
- -ms-flex: 0 0 66.666667%;
645
- flex: 0 0 66.666667%;
646
- max-width: 66.666667%;
647
- }
648
- .schema-col-xl-9 {
649
- -ms-flex: 0 0 75%;
650
- flex: 0 0 75%;
651
- max-width: 75%;
652
- }
653
- .schema-col-xl-10 {
654
- -ms-flex: 0 0 83.333333%;
655
- flex: 0 0 83.333333%;
656
- max-width: 83.333333%;
657
- }
658
- .schema-col-xl-11 {
659
- -ms-flex: 0 0 91.666667%;
660
- flex: 0 0 91.666667%;
661
- max-width: 91.666667%;
662
- }
663
- .schema-col-xl-12 {
664
- -ms-flex: 0 0 100%;
665
- flex: 0 0 100%;
666
- max-width: 100%;
667
- }
668
- .schema-order-xl-1 {
669
- -ms-flex-order: 1;
670
- order: 1;
671
- }
672
- .schema-order-xl-2 {
673
- -ms-flex-order: 2;
674
- order: 2;
675
- }
676
- .schema-order-xl-3 {
677
- -ms-flex-order: 3;
678
- order: 3;
679
- }
680
- .schema-order-xl-4 {
681
- -ms-flex-order: 4;
682
- order: 4;
683
- }
684
- .schema-order-xl-5 {
685
- -ms-flex-order: 5;
686
- order: 5;
687
- }
688
- .schema-order-xl-6 {
689
- -ms-flex-order: 6;
690
- order: 6;
691
- }
692
- .schema-order-xl-7 {
693
- -ms-flex-order: 7;
694
- order: 7;
695
- }
696
- .schema-order-xl-8 {
697
- -ms-flex-order: 8;
698
- order: 8;
699
- }
700
- .schema-order-xl-9 {
701
- -ms-flex-order: 9;
702
- order: 9;
703
- }
704
- .schema-order-xl-10 {
705
- -ms-flex-order: 10;
706
- order: 10;
707
- }
708
- .schema-order-xl-11 {
709
- -ms-flex-order: 11;
710
- order: 11;
711
- }
712
- .schema-order-xl-12 {
713
- -ms-flex-order: 12;
714
- order: 12;
715
- }
716
- }
717
-
718
- .schema-flex-row {
719
- -ms-flex-direction: row !important;
720
- flex-direction: row !important;
721
- }
722
-
723
- .schema-flex-column {
724
- -ms-flex-direction: column !important;
725
- flex-direction: column !important;
726
- }
727
-
728
- .schema-flex-row-reverse {
729
- -ms-flex-direction: row-reverse !important;
730
- flex-direction: row-reverse !important;
731
- }
732
-
733
- .schema-flex-column-reverse {
734
- -ms-flex-direction: column-reverse !important;
735
- flex-direction: column-reverse !important;
736
- }
737
-
738
- .schema-flex-wrap {
739
- -ms-flex-wrap: wrap !important;
740
- flex-wrap: wrap !important;
741
- }
742
-
743
- .schema-flex-nowrap {
744
- -ms-flex-wrap: nowrap !important;
745
- flex-wrap: nowrap !important;
746
- }
747
-
748
- .schema-flex-wrap-reverse {
749
- -ms-flex-wrap: wrap-reverse !important;
750
- flex-wrap: wrap-reverse !important;
751
- }
752
-
753
- .schema-justify-content-start {
754
- -ms-flex-pack: start !important;
755
- justify-content: flex-start !important;
756
- }
757
-
758
- .schema-justify-content-end {
759
- -ms-flex-pack: end !important;
760
- justify-content: flex-end !important;
761
- }
762
-
763
- .schema-justify-content-center {
764
- -ms-flex-pack: center !important;
765
- justify-content: center !important;
766
- }
767
-
768
- .schema-justify-content-between {
769
- -ms-flex-pack: justify !important;
770
- justify-content: space-between !important;
771
- }
772
-
773
- .schema-justify-content-around {
774
- -ms-flex-pack: distribute !important;
775
- justify-content: space-around !important;
776
- }
777
-
778
- .schema-align-items-start {
779
- -ms-flex-align: start !important;
780
- align-items: flex-start !important;
781
- }
782
-
783
- .schema-align-items-end {
784
- -ms-flex-align: end !important;
785
- align-items: flex-end !important;
786
- }
787
-
788
- .schema-align-items-center {
789
- -ms-flex-align: center !important;
790
- align-items: center !important;
791
- }
792
-
793
- .schema-align-items-baseline {
794
- -ms-flex-align: baseline !important;
795
- align-items: baseline !important;
796
- }
797
-
798
- .schema-align-items-stretch {
799
- -ms-flex-align: stretch !important;
800
- align-items: stretch !important;
801
- }
802
-
803
- .schema-align-content-start {
804
- -ms-flex-line-pack: start !important;
805
- align-content: flex-start !important;
806
- }
807
-
808
- .schema-align-content-end {
809
- -ms-flex-line-pack: end !important;
810
- align-content: flex-end !important;
811
- }
812
-
813
- .schema-align-content-center {
814
- -ms-flex-line-pack: center !important;
815
- align-content: center !important;
816
- }
817
-
818
- .schema-align-content-between {
819
- -ms-flex-line-pack: justify !important;
820
- align-content: space-between !important;
821
- }
822
-
823
- .schema-align-content-around {
824
- -ms-flex-line-pack: distribute !important;
825
- align-content: space-around !important;
826
- }
827
-
828
- .schema-align-content-stretch {
829
- -ms-flex-line-pack: stretch !important;
830
- align-content: stretch !important;
831
- }
832
-
833
- .schema-align-self-auto {
834
- -ms-flex-item-align: auto !important;
835
- align-self: auto !important;
836
- }
837
-
838
- .schema-align-self-start {
839
- -ms-flex-item-align: start !important;
840
- align-self: flex-start !important;
841
- }
842
-
843
- .schema-align-self-end {
844
- -ms-flex-item-align: end !important;
845
- align-self: flex-end !important;
846
- }
847
-
848
- .schema-align-self-center {
849
- -ms-flex-item-align: center !important;
850
- align-self: center !important;
851
- }
852
-
853
- .schema-align-self-baseline {
854
- -ms-flex-item-align: baseline !important;
855
- align-self: baseline !important;
856
- }
857
-
858
- .schema-align-self-stretch {
859
- -ms-flex-item-align: stretch !important;
860
- align-self: stretch !important;
861
- }
862
-
863
- @media (min-width: 576px) {
864
- .schema-flex-sm-row {
865
- -ms-flex-direction: row !important;
866
- flex-direction: row !important;
867
- }
868
- .schema-flex-sm-column {
869
- -ms-flex-direction: column !important;
870
- flex-direction: column !important;
871
- }
872
- .schema-flex-sm-row-reverse {
873
- -ms-flex-direction: row-reverse !important;
874
- flex-direction: row-reverse !important;
875
- }
876
- .schema-flex-sm-column-reverse {
877
- -ms-flex-direction: column-reverse !important;
878
- flex-direction: column-reverse !important;
879
- }
880
- .schema-flex-sm-wrap {
881
- -ms-flex-wrap: wrap !important;
882
- flex-wrap: wrap !important;
883
- }
884
- .schema-flex-sm-nowrap {
885
- -ms-flex-wrap: nowrap !important;
886
- flex-wrap: nowrap !important;
887
- }
888
- .schema-flex-sm-wrap-reverse {
889
- -ms-flex-wrap: wrap-reverse !important;
890
- flex-wrap: wrap-reverse !important;
891
- }
892
- .schema-justify-content-sm-start {
893
- -ms-flex-pack: start !important;
894
- justify-content: flex-start !important;
895
- }
896
- .schema-justify-content-sm-end {
897
- -ms-flex-pack: end !important;
898
- justify-content: flex-end !important;
899
- }
900
- .schema-justify-content-sm-center {
901
- -ms-flex-pack: center !important;
902
- justify-content: center !important;
903
- }
904
- .schema-justify-content-sm-between {
905
- -ms-flex-pack: justify !important;
906
- justify-content: space-between !important;
907
- }
908
- .schema-justify-content-sm-around {
909
- -ms-flex-pack: distribute !important;
910
- justify-content: space-around !important;
911
- }
912
- .schema-align-items-sm-start {
913
- -ms-flex-align: start !important;
914
- align-items: flex-start !important;
915
- }
916
- .schema-align-items-sm-end {
917
- -ms-flex-align: end !important;
918
- align-items: flex-end !important;
919
- }
920
- .schema-align-items-sm-center {
921
- -ms-flex-align: center !important;
922
- align-items: center !important;
923
- }
924
- .schema-align-items-sm-baseline {
925
- -ms-flex-align: baseline !important;
926
- align-items: baseline !important;
927
- }
928
- .schema-align-items-sm-stretch {
929
- -ms-flex-align: stretch !important;
930
- align-items: stretch !important;
931
- }
932
- .schema-align-content-sm-start {
933
- -ms-flex-line-pack: start !important;
934
- align-content: flex-start !important;
935
- }
936
- .schema-align-content-sm-end {
937
- -ms-flex-line-pack: end !important;
938
- align-content: flex-end !important;
939
- }
940
- .schema-align-content-sm-center {
941
- -ms-flex-line-pack: center !important;
942
- align-content: center !important;
943
- }
944
- .schema-align-content-sm-between {
945
- -ms-flex-line-pack: justify !important;
946
- align-content: space-between !important;
947
- }
948
- .schema-align-content-sm-around {
949
- -ms-flex-line-pack: distribute !important;
950
- align-content: space-around !important;
951
- }
952
- .schema-align-content-sm-stretch {
953
- -ms-flex-line-pack: stretch !important;
954
- align-content: stretch !important;
955
- }
956
- .schema-align-self-sm-auto {
957
- -ms-flex-item-align: auto !important;
958
- align-self: auto !important;
959
- }
960
- .schema-align-self-sm-start {
961
- -ms-flex-item-align: start !important;
962
- align-self: flex-start !important;
963
- }
964
- .schema-align-self-sm-end {
965
- -ms-flex-item-align: end !important;
966
- align-self: flex-end !important;
967
- }
968
- .schema-align-self-sm-center {
969
- -ms-flex-item-align: center !important;
970
- align-self: center !important;
971
- }
972
- .schema-align-self-sm-baseline {
973
- -ms-flex-item-align: baseline !important;
974
- align-self: baseline !important;
975
- }
976
- .schema-align-self-sm-stretch {
977
- -ms-flex-item-align: stretch !important;
978
- align-self: stretch !important;
979
- }
980
- }
981
-
982
- @media (min-width: 768px) {
983
- .schema-flex-md-row {
984
- -ms-flex-direction: row !important;
985
- flex-direction: row !important;
986
- }
987
- .schema-flex-md-column {
988
- -ms-flex-direction: column !important;
989
- flex-direction: column !important;
990
- }
991
- .schema-flex-md-row-reverse {
992
- -ms-flex-direction: row-reverse !important;
993
- flex-direction: row-reverse !important;
994
- }
995
- .schema-flex-md-column-reverse {
996
- -ms-flex-direction: column-reverse !important;
997
- flex-direction: column-reverse !important;
998
- }
999
- .schema-flex-md-wrap {
1000
- -ms-flex-wrap: wrap !important;
1001
- flex-wrap: wrap !important;
1002
- }
1003
- .schema-flex-md-nowrap {
1004
- -ms-flex-wrap: nowrap !important;
1005
- flex-wrap: nowrap !important;
1006
- }
1007
- .schema-flex-md-wrap-reverse {
1008
- -ms-flex-wrap: wrap-reverse !important;
1009
- flex-wrap: wrap-reverse !important;
1010
- }
1011
- .schema-justify-content-md-start {
1012
- -ms-flex-pack: start !important;
1013
- justify-content: flex-start !important;
1014
- }
1015
- .schema-justify-content-md-end {
1016
- -ms-flex-pack: end !important;
1017
- justify-content: flex-end !important;
1018
- }
1019
- .schema-justify-content-md-center {
1020
- -ms-flex-pack: center !important;
1021
- justify-content: center !important;
1022
- }
1023
- .schema-justify-content-md-between {
1024
- -ms-flex-pack: justify !important;
1025
- justify-content: space-between !important;
1026
- }
1027
- .schema-justify-content-md-around {
1028
- -ms-flex-pack: distribute !important;
1029
- justify-content: space-around !important;
1030
- }
1031
- .schema-align-items-md-start {
1032
- -ms-flex-align: start !important;
1033
- align-items: flex-start !important;
1034
- }
1035
- .schema-align-items-md-end {
1036
- -ms-flex-align: end !important;
1037
- align-items: flex-end !important;
1038
- }
1039
- .schema-align-items-md-center {
1040
- -ms-flex-align: center !important;
1041
- align-items: center !important;
1042
- }
1043
- .schema-align-items-md-baseline {
1044
- -ms-flex-align: baseline !important;
1045
- align-items: baseline !important;
1046
- }
1047
- .schema-align-items-md-stretch {
1048
- -ms-flex-align: stretch !important;
1049
- align-items: stretch !important;
1050
- }
1051
- .schema-align-content-md-start {
1052
- -ms-flex-line-pack: start !important;
1053
- align-content: flex-start !important;
1054
- }
1055
- .schema-align-content-md-end {
1056
- -ms-flex-line-pack: end !important;
1057
- align-content: flex-end !important;
1058
- }
1059
- .schema-align-content-md-center {
1060
- -ms-flex-line-pack: center !important;
1061
- align-content: center !important;
1062
- }
1063
- .schema-align-content-md-between {
1064
- -ms-flex-line-pack: justify !important;
1065
- align-content: space-between !important;
1066
- }
1067
- .schema-align-content-md-around {
1068
- -ms-flex-line-pack: distribute !important;
1069
- align-content: space-around !important;
1070
- }
1071
- .schema-align-content-md-stretch {
1072
- -ms-flex-line-pack: stretch !important;
1073
- align-content: stretch !important;
1074
- }
1075
- .schema-align-self-md-auto {
1076
- -ms-flex-item-align: auto !important;
1077
- align-self: auto !important;
1078
- }
1079
- .schema-align-self-md-start {
1080
- -ms-flex-item-align: start !important;
1081
- align-self: flex-start !important;
1082
- }
1083
- .schema-align-self-md-end {
1084
- -ms-flex-item-align: end !important;
1085
- align-self: flex-end !important;
1086
- }
1087
- .schema-align-self-md-center {
1088
- -ms-flex-item-align: center !important;
1089
- align-self: center !important;
1090
- }
1091
- .schema-align-self-md-baseline {
1092
- -ms-flex-item-align: baseline !important;
1093
- align-self: baseline !important;
1094
- }
1095
- .schema-align-self-md-stretch {
1096
- -ms-flex-item-align: stretch !important;
1097
- align-self: stretch !important;
1098
- }
1099
- }
1100
-
1101
- @media (min-width: 992px) {
1102
- .schema-flex-lg-row {
1103
- -ms-flex-direction: row !important;
1104
- flex-direction: row !important;
1105
- }
1106
- .schema-flex-lg-column {
1107
- -ms-flex-direction: column !important;
1108
- flex-direction: column !important;
1109
- }
1110
- .schema-flex-lg-row-reverse {
1111
- -ms-flex-direction: row-reverse !important;
1112
- flex-direction: row-reverse !important;
1113
- }
1114
- .schema-flex-lg-column-reverse {
1115
- -ms-flex-direction: column-reverse !important;
1116
- flex-direction: column-reverse !important;
1117
- }
1118
- .schema-flex-lg-wrap {
1119
- -ms-flex-wrap: wrap !important;
1120
- flex-wrap: wrap !important;
1121
- }
1122
- .schema-flex-lg-nowrap {
1123
- -ms-flex-wrap: nowrap !important;
1124
- flex-wrap: nowrap !important;
1125
- }
1126
- .schema-flex-lg-wrap-reverse {
1127
- -ms-flex-wrap: wrap-reverse !important;
1128
- flex-wrap: wrap-reverse !important;
1129
- }
1130
- .schema-justify-content-lg-start {
1131
- -ms-flex-pack: start !important;
1132
- justify-content: flex-start !important;
1133
- }
1134
- .schema-justify-content-lg-end {
1135
- -ms-flex-pack: end !important;
1136
- justify-content: flex-end !important;
1137
- }
1138
- .schema-justify-content-lg-center {
1139
- -ms-flex-pack: center !important;
1140
- justify-content: center !important;
1141
- }
1142
- .schema-justify-content-lg-between {
1143
- -ms-flex-pack: justify !important;
1144
- justify-content: space-between !important;
1145
- }
1146
- .schema-justify-content-lg-around {
1147
- -ms-flex-pack: distribute !important;
1148
- justify-content: space-around !important;
1149
- }
1150
- .schema-align-items-lg-start {
1151
- -ms-flex-align: start !important;
1152
- align-items: flex-start !important;
1153
- }
1154
- .schema-align-items-lg-end {
1155
- -ms-flex-align: end !important;
1156
- align-items: flex-end !important;
1157
- }
1158
- .schema-align-items-lg-center {
1159
- -ms-flex-align: center !important;
1160
- align-items: center !important;
1161
- }
1162
- .schema-align-items-lg-baseline {
1163
- -ms-flex-align: baseline !important;
1164
- align-items: baseline !important;
1165
- }
1166
- .schema-align-items-lg-stretch {
1167
- -ms-flex-align: stretch !important;
1168
- align-items: stretch !important;
1169
- }
1170
- .schema-align-content-lg-start {
1171
- -ms-flex-line-pack: start !important;
1172
- align-content: flex-start !important;
1173
- }
1174
- .schema-align-content-lg-end {
1175
- -ms-flex-line-pack: end !important;
1176
- align-content: flex-end !important;
1177
- }
1178
- .schema-align-content-lg-center {
1179
- -ms-flex-line-pack: center !important;
1180
- align-content: center !important;
1181
- }
1182
- .schema-align-content-lg-between {
1183
- -ms-flex-line-pack: justify !important;
1184
- align-content: space-between !important;
1185
- }
1186
- .schema-align-content-lg-around {
1187
- -ms-flex-line-pack: distribute !important;
1188
- align-content: space-around !important;
1189
- }
1190
- .schema-align-content-lg-stretch {
1191
- -ms-flex-line-pack: stretch !important;
1192
- align-content: stretch !important;
1193
- }
1194
- .schema-align-self-lg-auto {
1195
- -ms-flex-item-align: auto !important;
1196
- align-self: auto !important;
1197
- }
1198
- .schema-align-self-lg-start {
1199
- -ms-flex-item-align: start !important;
1200
- align-self: flex-start !important;
1201
- }
1202
- .schema-align-self-lg-end {
1203
- -ms-flex-item-align: end !important;
1204
- align-self: flex-end !important;
1205
- }
1206
- .schema-align-self-lg-center {
1207
- -ms-flex-item-align: center !important;
1208
- align-self: center !important;
1209
- }
1210
- .schema-align-self-lg-baseline {
1211
- -ms-flex-item-align: baseline !important;
1212
- align-self: baseline !important;
1213
- }
1214
- .schema-align-self-lg-stretch {
1215
- -ms-flex-item-align: stretch !important;
1216
- align-self: stretch !important;
1217
- }
1218
- }
1219
-
1220
- @media (min-width: 1200px) {
1221
- .schema-flex-xl-row {
1222
- -ms-flex-direction: row !important;
1223
- flex-direction: row !important;
1224
- }
1225
- .schema-flex-xl-column {
1226
- -ms-flex-direction: column !important;
1227
- flex-direction: column !important;
1228
- }
1229
- .schema-flex-xl-row-reverse {
1230
- -ms-flex-direction: row-reverse !important;
1231
- flex-direction: row-reverse !important;
1232
- }
1233
- .schema-flex-xl-column-reverse {
1234
- -ms-flex-direction: column-reverse !important;
1235
- flex-direction: column-reverse !important;
1236
- }
1237
- .schema-flex-xl-wrap {
1238
- -ms-flex-wrap: wrap !important;
1239
- flex-wrap: wrap !important;
1240
- }
1241
- .schema-flex-xl-nowrap {
1242
- -ms-flex-wrap: nowrap !important;
1243
- flex-wrap: nowrap !important;
1244
- }
1245
- .schema-flex-xl-wrap-reverse {
1246
- -ms-flex-wrap: wrap-reverse !important;
1247
- flex-wrap: wrap-reverse !important;
1248
- }
1249
- .schema-justify-content-xl-start {
1250
- -ms-flex-pack: start !important;
1251
- justify-content: flex-start !important;
1252
- }
1253
- .schema-justify-content-xl-end {
1254
- -ms-flex-pack: end !important;
1255
- justify-content: flex-end !important;
1256
- }
1257
- .schema-justify-content-xl-center {
1258
- -ms-flex-pack: center !important;
1259
- justify-content: center !important;
1260
- }
1261
- .schema-justify-content-xl-between {
1262
- -ms-flex-pack: justify !important;
1263
- justify-content: space-between !important;
1264
- }
1265
- .schema-justify-content-xl-around {
1266
- -ms-flex-pack: distribute !important;
1267
- justify-content: space-around !important;
1268
- }
1269
- .schema-align-items-xl-start {
1270
- -ms-flex-align: start !important;
1271
- align-items: flex-start !important;
1272
- }
1273
- .schema-align-items-xl-end {
1274
- -ms-flex-align: end !important;
1275
- align-items: flex-end !important;
1276
- }
1277
- .schema-align-items-xl-center {
1278
- -ms-flex-align: center !important;
1279
- align-items: center !important;
1280
- }
1281
- .schema-align-items-xl-baseline {
1282
- -ms-flex-align: baseline !important;
1283
- align-items: baseline !important;
1284
- }
1285
- .schema-align-items-xl-stretch {
1286
- -ms-flex-align: stretch !important;
1287
- align-items: stretch !important;
1288
- }
1289
- .schema-align-content-xl-start {
1290
- -ms-flex-line-pack: start !important;
1291
- align-content: flex-start !important;
1292
- }
1293
- .schema-align-content-xl-end {
1294
- -ms-flex-line-pack: end !important;
1295
- align-content: flex-end !important;
1296
- }
1297
- .schema-align-content-xl-center {
1298
- -ms-flex-line-pack: center !important;
1299
- align-content: center !important;
1300
- }
1301
- .schema-align-content-xl-between {
1302
- -ms-flex-line-pack: justify !important;
1303
- align-content: space-between !important;
1304
- }
1305
- .schema-align-content-xl-around {
1306
- -ms-flex-line-pack: distribute !important;
1307
- align-content: space-around !important;
1308
- }
1309
- .schema-align-content-xl-stretch {
1310
- -ms-flex-line-pack: stretch !important;
1311
- align-content: stretch !important;
1312
- }
1313
- .schema-align-self-xl-auto {
1314
- -ms-flex-item-align: auto !important;
1315
- align-self: auto !important;
1316
- }
1317
- .schema-align-self-xl-start {
1318
- -ms-flex-item-align: start !important;
1319
- align-self: flex-start !important;
1320
- }
1321
- .schema-align-self-xl-end {
1322
- -ms-flex-item-align: end !important;
1323
- align-self: flex-end !important;
1324
- }
1325
- .schema-align-self-xl-center {
1326
- -ms-flex-item-align: center !important;
1327
- align-self: center !important;
1328
- }
1329
- .schema-align-self-xl-baseline {
1330
- -ms-flex-item-align: baseline !important;
1331
- align-self: baseline !important;
1332
- }
1333
- .schema-align-self-xl-stretch {
1334
- -ms-flex-item-align: stretch !important;
1335
- align-self: stretch !important;
1336
- }
1337
- }
1338
-
1339
- .schema-img {
1340
- vertical-align: middle;
1341
- border-style: none;
1342
- }
1343
-
1344
- .schema a,
1345
- .schema area,
1346
- .schema button,
1347
- .schema [role="button"],
1348
- .schema input,
1349
- .schema label,
1350
- .schema select,
1351
- .schema summary,
1352
- .schema textarea {
1353
- -ms-touch-action: manipulation;
1354
- touch-action: manipulation;
1355
- }
1356
-
1357
- .schema table {
1358
- border-collapse: collapse;
1359
- }
1360
-
1361
- .schema caption {
1362
- padding-top: 0.75rem;
1363
- padding-bottom: 0.75rem;
1364
- color: #868e96;
1365
- text-align: left;
1366
- caption-side: bottom;
1367
- }
1368
-
1369
- .schema th {
1370
- text-align: left;
1371
- }
1372
-
1373
- .schema label {
1374
- display: inline-block;
1375
- margin-bottom: .5rem;
1376
- }
1377
-
1378
- .schema button:focus {
1379
- outline: 1px dotted;
1380
- outline: 5px auto -webkit-focus-ring-color;
1381
- }
1382
-
1383
- .schema input,
1384
- .schema button,
1385
- .schema select,
1386
- .schema optgroup,
1387
- .schema textarea {
1388
- margin: 0;
1389
- font-family: inherit;
1390
- font-size: inherit;
1391
- line-height: inherit;
1392
- }
1393
-
1394
- .schema button,
1395
- .schema input {
1396
- overflow: visible;
1397
- }
1398
-
1399
- .schema button,
1400
- .schema select {
1401
- text-transform: none;
1402
- }
1403
-
1404
- .schema button,
1405
- .schema html [type="button"],
1406
- .schema [type="reset"],
1407
- .schema [type="submit"] {
1408
- -webkit-appearance: button;
1409
- }
1410
-
1411
- .schema button::-moz-focus-inner,
1412
- .schema [type="button"]::-moz-focus-inner,
1413
- .schema [type="reset"]::-moz-focus-inner,
1414
- .schema [type="submit"]::-moz-focus-inner {
1415
- padding: 0;
1416
- border-style: none;
1417
- }
1418
-
1419
- input[type="radio"],
1420
- input[type="checkbox"] {
1421
- box-sizing: border-box;
1422
- padding: 0;
1423
- }
1424
-
1425
- .schema input[type="date"],
1426
- .schema input[type="time"],
1427
- .schema input[type="datetime-local"],
1428
- .schema input[type="month"] {
1429
- -webkit-appearance: listbox;
1430
- }
1431
-
1432
- .schema textarea {
1433
- overflow: auto;
1434
- resize: vertical;
1435
- }
1436
-
1437
- .schema fieldset {
1438
- min-width: 0;
1439
- padding: 0;
1440
- margin: 0;
1441
- border: 0;
1442
- }
1443
-
1444
- .schema legend {
1445
- display: block;
1446
- width: 100%;
1447
- max-width: 100%;
1448
- padding: 0;
1449
- margin-bottom: .5rem;
1450
- font-size: 1.5rem;
1451
- line-height: inherit;
1452
- color: inherit;
1453
- white-space: normal;
1454
- }
1455
-
1456
-
1457
-
1458
- /* Table */
1459
-
1460
- .schema-table {
1461
- width: 100%;
1462
- max-width: 100%;
1463
- margin-bottom: 1rem;
1464
- background-color: transparent;
1465
- }
1466
-
1467
- .schema-table th,
1468
- .schema-table td {
1469
- padding: 0.75rem;
1470
- vertical-align: top;
1471
- border-top: 1px solid #e9ecef;
1472
- }
1473
-
1474
- .schema-table thead th {
1475
- vertical-align: bottom;
1476
- border-bottom: 2px solid #e9ecef;
1477
- }
1478
-
1479
- .schema-table tbody + tbody {
1480
- border-top: 2px solid #e9ecef;
1481
- }
1482
-
1483
- .schema-table .schema-table {
1484
- background-color: #fff;
1485
- }
1486
-
1487
- .schema-table-sm th,
1488
- .schema-table-sm td {
1489
- padding: 0.3rem;
1490
- }
1491
-
1492
- .schema-table-bordered {
1493
- border: 1px solid #e9ecef;
1494
- }
1495
-
1496
- .schema-table-bordered th,
1497
- .schema-table-bordered td {
1498
- border: 1px solid #e9ecef;
1499
- }
1500
-
1501
- .schema-table-bordered thead th,
1502
- .schema-table-bordered thead td {
1503
- border-bottom-width: 2px;
1504
- }
1505
-
1506
- .schema-table-striped tbody tr:nth-of-type(odd) {
1507
- background-color: rgba(0, 0, 0, 0.05);
1508
- }
1509
-
1510
- .schema-table-hover tbody tr:hover {
1511
- background-color: rgba(0, 0, 0, 0.075);
1512
- }
1513
-
1514
- .schema-table-primary,
1515
- .schema-table-primary > th,
1516
- .schema-table-primary > td {
1517
- background-color: #b8daff;
1518
- }
1519
-
1520
- .schema-table-hover .schema-table-primary:hover {
1521
- background-color: #9fcdff;
1522
- }
1523
-
1524
- .schema-table-hover .schema-table-primary:hover > td,
1525
- .schema-table-hover .schema-table-primary:hover > th {
1526
- background-color: #9fcdff;
1527
- }
1528
-
1529
- .schema-table-secondary,
1530
- .schema-table-secondary > th,
1531
- .schema-table-secondary > td {
1532
- background-color: #dddfe2;
1533
- }
1534
-
1535
- .schema-table-hover .schema-table-secondary:hover {
1536
- background-color: #cfd2d6;
1537
- }
1538
-
1539
- .schema-table-hover .schema-table-secondary:hover > td,
1540
- .schema-table-hover .schema-table-secondary:hover > th {
1541
- background-color: #cfd2d6;
1542
- }
1543
-
1544
- .schema-table-success,
1545
- .schema-table-success > th,
1546
- .schema-table-success > td {
1547
- background-color: #c3e6cb;
1548
- }
1549
-
1550
- .schema-table-hover .schema-table-success:hover {
1551
- background-color: #b1dfbb;
1552
- }
1553
-
1554
- .schema-table-hover .schema-table-success:hover > td,
1555
- .schema-table-hover .schema-table-success:hover > th {
1556
- background-color: #b1dfbb;
1557
- }
1558
-
1559
- .schema-table-info,
1560
- .schema-table-info > th,
1561
- .schema-table-info > td {
1562
- background-color: #bee5eb;
1563
- }
1564
-
1565
- .schema-table-hover .schema-table-info:hover {
1566
- background-color: #abdde5;
1567
- }
1568
-
1569
- .schema-table-hover .schema-table-info:hover > td,
1570
- .schema-table-hover .schema-table-info:hover > th {
1571
- background-color: #abdde5;
1572
- }
1573
-
1574
- .schema-table-warning,
1575
- .schema-table-warning > th,
1576
- .schema-table-warning > td {
1577
- background-color: #ffeeba;
1578
- }
1579
-
1580
- .schema-table-hover .schema-table-warning:hover {
1581
- background-color: #ffe8a1;
1582
- }
1583
-
1584
- .schema-table-hover .schema-table-warning:hover > td,
1585
- .schema-table-hover .schema-table-warning:hover > th {
1586
- background-color: #ffe8a1;
1587
- }
1588
-
1589
- .schema-table-danger,
1590
- .schema-table-danger > th,
1591
- .schema-table-danger > td {
1592
- background-color: #f5c6cb;
1593
- }
1594
-
1595
- .schema-table-hover .schema-table-danger:hover {
1596
- background-color: #f1b0b7;
1597
- }
1598
-
1599
- .schema-table-hover .schema-table-danger:hover > td,
1600
- .schema-table-hover .schema-table-danger:hover > th {
1601
- background-color: #f1b0b7;
1602
- }
1603
-
1604
- .schema-table-light,
1605
- .schema-table-light > th,
1606
- .schema-table-light > td {
1607
- background-color: #fdfdfe;
1608
- }
1609
-
1610
- .schema-table-hover .schema-table-light:hover {
1611
- background-color: #ececf6;
1612
- }
1613
-
1614
- .schema-table-hover .schema-table-light:hover > td,
1615
- .schema-table-hover .schema-table-light:hover > th {
1616
- background-color: #ececf6;
1617
- }
1618
-
1619
- .schema-table-dark,
1620
- .schema-table-dark > th,
1621
- .schema-table-dark > td {
1622
- background-color: #c6c8ca;
1623
- }
1624
-
1625
- .schema-table-hover .schema-table-dark:hover {
1626
- background-color: #b9bbbe;
1627
- }
1628
-
1629
- .schema-table-hover .schema-table-dark:hover > td,
1630
- .schema-table-hover .schema-table-dark:hover > th {
1631
- background-color: #b9bbbe;
1632
- }
1633
-
1634
- .schema-table-active,
1635
- .schema-table-active > th,
1636
- .schema-table-active > td {
1637
- background-color: rgba(0, 0, 0, 0.075);
1638
- }
1639
-
1640
- .schema-table-hover .schema-table-active:hover {
1641
- background-color: rgba(0, 0, 0, 0.075);
1642
- }
1643
-
1644
- .schema-table-hover .schema-table-active:hover > td,
1645
- .schema-table-hover .schema-table-active:hover > th {
1646
- background-color: rgba(0, 0, 0, 0.075);
1647
- }
1648
-
1649
- .thead-inverse th {
1650
- color: #fff;
1651
- background-color: #212529;
1652
- }
1653
-
1654
- .thead-default th {
1655
- color: #495057;
1656
- background-color: #e9ecef;
1657
- }
1658
-
1659
- .schema-table-inverse {
1660
- color: #fff;
1661
- background-color: #212529;
1662
- }
1663
-
1664
- .schema-table-inverse th,
1665
- .schema-table-inverse td,
1666
- .schema-table-inverse thead th {
1667
- border-color: #32383e;
1668
- }
1669
-
1670
- .schema-table-inverse.schema-table-bordered {
1671
- border: 0;
1672
- }
1673
-
1674
- .schema-table-inverse.schema-table-striped tbody tr:nth-of-type(odd) {
1675
- background-color: rgba(255, 255, 255, 0.05);
1676
- }
1677
-
1678
- .schema-table-inverse.schema-table-hover tbody tr:hover {
1679
- background-color: rgba(255, 255, 255, 0.075);
1680
- }
1681
-
1682
- @media (max-width: 991px) {
1683
- .schema-table-responsive {
1684
- display: block;
1685
- width: 100%;
1686
- overflow-x: auto;
1687
- -ms-overflow-style: -ms-autohiding-scrollbar;
1688
- }
1689
- .schema-table-responsive.schema-table-bordered {
1690
- border: 0;
1691
- }
1692
- }
1693
-
1694
- .schema-form-control {
1695
- display: block;
1696
- width: 100%;
1697
- padding: 0.5rem 0.75rem;
1698
- /*font-size: 1rem;*/
1699
- line-height: 1.25;
1700
- color: #495057;
1701
- background-color: #fff;
1702
- background-image: none;
1703
- background-clip: padding-box;
1704
- border: 1px solid rgba(0, 0, 0, 0.15);
1705
- border-radius: 0.25rem;
1706
- transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
1707
- }
1708
-
1709
- .schema-form-control::-ms-expand {
1710
- background-color: transparent;
1711
- border: 0;
1712
- }
1713
-
1714
- .schema-form-control:focus {
1715
- color: #495057;
1716
- background-color: #fff;
1717
- border-color: #80bdff;
1718
- outline: none;
1719
- }
1720
-
1721
- .schema-form-control::-webkit-input-placeholder {
1722
- color: #868e96;
1723
- opacity: 1;
1724
- }
1725
-
1726
- .schema-form-control:-ms-input-placeholder {
1727
- color: #868e96;
1728
- opacity: 1;
1729
- }
1730
-
1731
- .schema-form-control::placeholder {
1732
- color: #868e96;
1733
- opacity: 1;
1734
- }
1735
-
1736
- .schema-form-control:disabled, .schema-form-control[readonly] {
1737
- background-color: #e9ecef;
1738
- opacity: 1;
1739
- }
1740
-
1741
- select.schema-form-control:not([size]):not([multiple]) {
1742
- height: calc(2.25rem + 2px);
1743
- }
1744
-
1745
- select.schema-form-control:focus::-ms-value {
1746
- color: #495057;
1747
- background-color: #fff;
1748
- }
1749
-
1750
- .schema-form-control-file,
1751
- .schema-form-control-range {
1752
- display: block;
1753
- }
1754
-
1755
- .schema-col-form-label {
1756
- padding-top: calc(0.5rem - 1px * 2);
1757
- padding-bottom: calc(0.5rem - 1px * 2);
1758
- margin-bottom: 0;
1759
- }
1760
-
1761
- .schema-col-form-label-lg {
1762
- padding-top: calc(0.5rem - 1px * 2);
1763
- padding-bottom: calc(0.5rem - 1px * 2);
1764
- font-size: 1.25rem;
1765
- }
1766
-
1767
- .schema-col-form-label-sm {
1768
- padding-top: calc(0.25rem - 1px * 2);
1769
- padding-bottom: calc(0.25rem - 1px * 2);
1770
- font-size: 0.875rem;
1771
- }
1772
-
1773
- .schema-col-form-legend {
1774
- padding-top: 0.5rem;
1775
- padding-bottom: 0.5rem;
1776
- margin-bottom: 0;
1777
- font-size: 1rem;
1778
- }
1779
-
1780
- .schema-form-control-plaintext {
1781
- padding-top: 0.5rem;
1782
- padding-bottom: 0.5rem;
1783
- margin-bottom: 0;
1784
- line-height: 1.25;
1785
- border: solid transparent;
1786
- border-width: 1px 0;
1787
- }
1788
-
1789
- .schema-form-control-plaintext.schema-form-control-sm, .schema-input-group-sm > .schema-form-control-plaintext.schema-form-control,
1790
- .schema-input-group-sm > .schema-form-control-plaintext.schema-input-group-addon,
1791
- .schema-input-group-sm > .schema-input-group-btn > .schema-form-control-plaintext.schema-btn, .schema-form-control-plaintext.schema-form-control-lg, .schema-input-group-lg > .schema-form-control-plaintext.schema-form-control,
1792
- .schema-input-group-lg > .schema-form-control-plaintext.schema-input-group-addon,
1793
- .schema-input-group-lg > .schema-input-group-btn > .schema-form-control-plaintext.schema-btn {
1794
- padding-right: 0;
1795
- padding-left: 0;
1796
- }
1797
-
1798
- .schema-form-control-sm, .schema-input-group-sm > .schema-form-control,
1799
- .schema-input-group-sm > .schema-input-group-addon,
1800
- .schema-input-group-sm > .schema-input-group-btn > .schema-btn {
1801
- padding: 0.25rem 0.5rem;
1802
- font-size: 0.875rem;
1803
- line-height: 1.5;
1804
- border-radius: 0.2rem;
1805
- }
1806
-
1807
- select.schema-form-control-sm:not([size]):not([multiple]), .schema-input-group-sm > select.schema-form-control:not([size]):not([multiple]),
1808
- .schema-input-group-sm > select.schema-input-group-addon:not([size]):not([multiple]),
1809
- .schema-input-group-sm > .schema-input-group-btn > select.schema-btn:not([size]):not([multiple]) {
1810
- height: calc(1.8125rem + 2px);
1811
- }
1812
-
1813
- .schema-form-control-lg, .schema-input-group-lg > .schema-form-control,
1814
- .schema-input-group-lg > .schema-input-group-addon,
1815
- .schema-input-group-lg > .schema-input-group-btn > .schema-btn {
1816
- padding: 0.5rem 1rem;
1817
- font-size: 1.25rem;
1818
- line-height: 1.5;
1819
- border-radius: 0.3rem;
1820
- }
1821
-
1822
- select.schema-form-control-lg:not([size]):not([multiple]), .schema-input-group-lg > select.schema-form-control:not([size]):not([multiple]),
1823
- .schema-input-group-lg > select.schema-input-group-addon:not([size]):not([multiple]),
1824
- .schema-input-group-lg > .schema-input-group-btn > select.schema-btn:not([size]):not([multiple]) {
1825
- height: calc(2.3125rem + 2px);
1826
- }
1827
-
1828
- .schema-form-group {
1829
- margin-bottom: 1rem;
1830
- }
1831
-
1832
- .schema-form-text {
1833
- display: block;
1834
- margin-top: 0.25rem;
1835
- }
1836
-
1837
- .schema-form-row {
1838
- display: -ms-flexbox;
1839
- display: flex;
1840
- -ms-flex-wrap: wrap;
1841
- flex-wrap: wrap;
1842
- margin-right: -5px;
1843
- margin-left: -5px;
1844
- }
1845
-
1846
- .schema-form-row > .schema-col,
1847
- .schema-form-row > [class*="col-"] {
1848
- padding-right: 5px;
1849
- padding-left: 5px;
1850
- }
1851
-
1852
- .schema-form-check {
1853
- position: relative;
1854
- display: block;
1855
- margin-bottom: 0.5rem;
1856
- }
1857
-
1858
- .schema-form-check.disabled .schema-form-check-label {
1859
- color: #868e96;
1860
- }
1861
-
1862
- .schema-form-check-label {
1863
- padding-left: 1.25rem;
1864
- margin-bottom: 0;
1865
- }
1866
-
1867
- .schema-form-check-input {
1868
- position: absolute;
1869
- margin-top: 0.25rem;
1870
- margin-left: -1.25rem;
1871
- }
1872
-
1873
- .schema-form-check-input:only-child {
1874
- position: static;
1875
- }
1876
-
1877
- .schema-form-check-inline {
1878
- display: inline-block;
1879
- }
1880
-
1881
- .schema-form-check-inline .schema-form-check-label {
1882
- vertical-align: middle;
1883
- }
1884
-
1885
- .schema-form-check-inline + .schema-form-check-inline {
1886
- margin-left: 0.75rem;
1887
- }
1888
-
1889
- .schema-invalid-feedback {
1890
- display: none;
1891
- margin-top: .25rem;
1892
- font-size: .875rem;
1893
- color: #dc3545;
1894
- }
1895
-
1896
- .schema-invalid-tooltip {
1897
- position: absolute;
1898
- top: 100%;
1899
- z-index: 5;
1900
- display: none;
1901
- width: 250px;
1902
- padding: .5rem;
1903
- margin-top: .1rem;
1904
- font-size: .875rem;
1905
- line-height: 1;
1906
- color: #fff;
1907
- background-color: rgba(220, 53, 69, 0.8);
1908
- border-radius: .2rem;
1909
- }
1910
-
1911
- .schema-was-validated .schema-form-control:valid, .schema-form-control.is-valid, .schema-was-validated
1912
- .schema-custom-select:valid,
1913
- .schema-custom-select.is-valid {
1914
- border-color: #28a745;
1915
- }
1916
-
1917
- .schema-was-validated .schema-form-control:valid:focus, .schema-form-control.is-valid:focus, .schema-was-validated
1918
- .schema-custom-select:valid:focus,
1919
- .schema-custom-select.is-valid:focus {
1920
- box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
1921
- }
1922
-
1923
- .schema-was-validated .schema-form-control:valid ~ .schema-invalid-feedback,
1924
- .schema-was-validated .schema-form-control:valid ~ .schema-invalid-tooltip, .schema-form-control.is-valid ~ .schema-invalid-feedback,
1925
- .schema-form-control.is-valid ~ .schema-invalid-tooltip, .schema-was-validated
1926
- .schema-custom-select:valid ~ .schema-invalid-feedback,
1927
- .schema-was-validated
1928
- .schema-custom-select:valid ~ .schema-invalid-tooltip,
1929
- .schema-custom-select.is-valid ~ .schema-invalid-feedback,
1930
- .schema-custom-select.is-valid ~ .schema-invalid-tooltip {
1931
- display: block;
1932
- }
1933
-
1934
- .schema-was-validated .schema-form-check-input:valid + .schema-form-check-label, .schema-form-check-input.is-valid + .schema-form-check-label {
1935
- color: #28a745;
1936
- }
1937
-
1938
- .schema-was-validated .schema-custom-control-input:valid ~ .schema-custom-control-indicator, .schema-custom-control-input.is-valid ~ .schema-custom-control-indicator {
1939
- background-color: rgba(40, 167, 69, 0.25);
1940
- }
1941
-
1942
- .schema-was-validated .schema-custom-control-input:valid ~ .schema-custom-control-description, .schema-custom-control-input.is-valid ~ .schema-custom-control-description {
1943
- color: #28a745;
1944
- }
1945
-
1946
- .schema-was-validated .schema-custom-file-input:valid ~ .schema-custom-file-control, .schema-custom-file-input.is-valid ~ .schema-custom-file-control {
1947
- border-color: #28a745;
1948
- }
1949
-
1950
- .schema-was-validated .schema-custom-file-input:valid ~ .schema-custom-file-control::before, .schema-custom-file-input.is-valid ~ .schema-custom-file-control::before {
1951
- border-color: inherit;
1952
- }
1953
-
1954
- .schema-was-validated .schema-custom-file-input:valid:focus, .schema-custom-file-input.is-valid:focus {
1955
- box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
1956
- }
1957
-
1958
- .schema-was-validated .schema-form-control:invalid, .schema-form-control.is-invalid, .schema-was-validated
1959
- .schema-custom-select:invalid,
1960
- .schema-custom-select.is-invalid {
1961
- border-color: #dc3545;
1962
- }
1963
-
1964
- .schema-was-validated .schema-form-control:invalid:focus, .schema-form-control.is-invalid:focus, .schema-was-validated
1965
- .schema-custom-select:invalid:focus,
1966
- .schema-custom-select.is-invalid:focus {
1967
- box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
1968
- }
1969
-
1970
- .schema-was-validated .schema-form-control:invalid ~ .schema-invalid-feedback,
1971
- .schema-was-validated .schema-form-control:invalid ~ .schema-invalid-tooltip, .schema-form-control.is-invalid ~ .schema-invalid-feedback,
1972
- .schema-form-control.is-invalid ~ .schema-invalid-tooltip, .schema-was-validated
1973
- .schema-custom-select:invalid ~ .schema-invalid-feedback,
1974
- .schema-was-validated
1975
- .schema-custom-select:invalid ~ .schema-invalid-tooltip,
1976
- .schema-custom-select.is-invalid ~ .schema-invalid-feedback,
1977
- .schema-custom-select.is-invalid ~ .schema-invalid-tooltip {
1978
- display: block;
1979
- }
1980
-
1981
- .schema-was-validated .schema-form-check-input:invalid + .schema-form-check-label, .schema-form-check-input.is-invalid + .schema-form-check-label {
1982
- color: #dc3545;
1983
- }
1984
-
1985
- .schema-was-validated .schema-custom-control-input:invalid ~ .schema-custom-control-indicator, .schema-custom-control-input.is-invalid ~ .schema-custom-control-indicator {
1986
- background-color: rgba(220, 53, 69, 0.25);
1987
- }
1988
-
1989
- .schema-was-validated .schema-custom-control-input:invalid ~ .schema-custom-control-description, .schema-custom-control-input.is-invalid ~ .schema-custom-control-description {
1990
- color: #dc3545;
1991
- }
1992
-
1993
- .schema-was-validated .schema-custom-file-input:invalid ~ .schema-custom-file-control, .schema-custom-file-input.is-invalid ~ .schema-custom-file-control {
1994
- border-color: #dc3545;
1995
- }
1996
-
1997
- .schema-was-validated .schema-custom-file-input:invalid ~ .schema-custom-file-control::before, .schema-custom-file-input.is-invalid ~ .schema-custom-file-control::before {
1998
- border-color: inherit;
1999
- }
2000
-
2001
- .schema-was-validated .schema-custom-file-input:invalid:focus, .schema-custom-file-input.is-invalid:focus {
2002
- box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
2003
- }
2004
-
2005
- .schema-form-inline {
2006
- display: -ms-flexbox;
2007
- display: flex;
2008
- -ms-flex-flow: row wrap;
2009
- flex-flow: row wrap;
2010
- -ms-flex-align: center;
2011
- align-items: center;
2012
- }
2013
-
2014
- .schema-form-inline .schema-form-check {
2015
- width: 100%;
2016
- }
2017
-
2018
- @media (min-width: 576px) {
2019
- .schema-form-inline label {
2020
- display: -ms-flexbox;
2021
- display: flex;
2022
- -ms-flex-align: center;
2023
- align-items: center;
2024
- -ms-flex-pack: center;
2025
- justify-content: center;
2026
- margin-bottom: 0;
2027
- }
2028
- .schema-form-inline .schema-form-group {
2029
- display: -ms-flexbox;
2030
- display: flex;
2031
- -ms-flex: 0 0 auto;
2032
- flex: 0 0 auto;
2033
- -ms-flex-flow: row wrap;
2034
- flex-flow: row wrap;
2035
- -ms-flex-align: center;
2036
- align-items: center;
2037
- margin-bottom: 0;
2038
- }
2039
- .schema-form-inline .schema-form-control {
2040
- display: inline-block;
2041
- width: auto;
2042
- vertical-align: middle;
2043
- }
2044
- .schema-form-inline .schema-form-control-plaintext {
2045
- display: inline-block;
2046
- }
2047
- .schema-form-inline .schema-input-group {
2048
- width: auto;
2049
- }
2050
- .schema-form-inline .schema-form-control-label {
2051
- margin-bottom: 0;
2052
- vertical-align: middle;
2053
- }
2054
- .schema-form-inline .schema-form-check {
2055
- display: -ms-flexbox;
2056
- display: flex;
2057
- -ms-flex-align: center;
2058
- align-items: center;
2059
- -ms-flex-pack: center;
2060
- justify-content: center;
2061
- width: auto;
2062
- margin-top: 0;
2063
- margin-bottom: 0;
2064
- }
2065
- .schema-form-inline .schema-form-check-label {
2066
- padding-left: 0;
2067
- }
2068
- .schema-form-inline .schema-form-check-input {
2069
- position: relative;
2070
- margin-top: 0;
2071
- margin-right: 0.25rem;
2072
- margin-left: 0;
2073
- }
2074
- .schema-form-inline .schema-custom-control {
2075
- display: -ms-flexbox;
2076
- display: flex;
2077
- -ms-flex-align: center;
2078
- align-items: center;
2079
- -ms-flex-pack: center;
2080
- justify-content: center;
2081
- padding-left: 0;
2082
- }
2083
- .schema-form-inline .schema-custom-control-indicator {
2084
- position: static;
2085
- display: inline-block;
2086
- margin-right: 0.25rem;
2087
- vertical-align: text-bottom;
2088
- }
2089
- .schema-form-inline .schema-has-feedback .schema-form-control-feedback {
2090
- top: 0;
2091
- }
2092
- }
2093
-
2094
-
2095
-
2096
- .schema-btn{display:inline-block;font-weight:400;line-height:1.25;text-align:center;white-space:nowrap;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid transparent;padding:.5rem 1rem;font-size:1rem;border-radius:.25rem;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.schema-btn:focus,.schema-btn:hover{text-decoration:none}.schema-btn.focus,.schema-btn:focus{outline:0;-webkit-box-shadow:0 0 0 2px rgba(2,117,216,.25);box-shadow:0 0 0 2px rgba(2,117,216,.25)}.schema-btn.disabled,.schema-btn:disabled{cursor:not-allowed;opacity:.65}.schema-btn.active,.schema-btn:active{background-image:none}a.schema-btn.disabled,fieldset[disabled] a.schema-btn{pointer-events:none}.schema-btn-primary{color:#fff;background-color:#0275d8;border-color:#0275d8}.schema-btn-primary:hover{color:#fff;background-color:#025aa5;border-color:#01549b}.schema-btn-primary.focus,.schema-btn-primary:focus{-webkit-box-shadow:0 0 0 2px rgba(2,117,216,.5);box-shadow:0 0 0 2px rgba(2,117,216,.5)}.schema-btn-primary.disabled,.schema-btn-primary:disabled{background-color:#0275d8;border-color:#0275d8}.schema-btn-primary.active,.schema-btn-primary:active,.show>.schema-btn-primary.dropdown-toggle{color:#fff;background-color:#025aa5;background-image:none;border-color:#01549b}.schema-btn-secondary{color:#292b2c;background-color:#fff;border-color:#ccc}.schema-btn-secondary:hover{color:#292b2c;background-color:#e6e6e6;border-color:#adadad}.schema-btn-secondary.focus,.schema-btn-secondary:focus{-webkit-box-shadow:0 0 0 2px rgba(204,204,204,.5);box-shadow:0 0 0 2px rgba(204,204,204,.5)}.schema-btn-secondary.disabled,.schema-btn-secondary:disabled{background-color:#fff;border-color:#ccc}.schema-btn-secondary.active,.schema-btn-secondary:active,.show>.schema-btn-secondary.dropdown-toggle{color:#292b2c;background-color:#e6e6e6;background-image:none;border-color:#adadad}.schema-btn-info{color:#fff;background-color:#5bc0de;border-color:#5bc0de}.schema-btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#2aabd2}.schema-btn-info.focus,.schema-btn-info:focus{-webkit-box-shadow:0 0 0 2px rgba(91,192,222,.5);box-shadow:0 0 0 2px rgba(91,192,222,.5)}.schema-btn-info.disabled,.schema-btn-info:disabled{background-color:#5bc0de;border-color:#5bc0de}.schema-btn-info.active,.schema-btn-info:active,.show>.schema-btn-info.dropdown-toggle{color:#fff;background-color:#31b0d5;background-image:none;border-color:#2aabd2}.schema-btn-success{color:#fff;background-color:#5cb85c;border-color:#5cb85c}.schema-btn-success:hover{color:#fff;background-color:#449d44;border-color:#419641}.schema-btn-success.focus,.schema-btn-success:focus{-webkit-box-shadow:0 0 0 2px rgba(92,184,92,.5);box-shadow:0 0 0 2px rgba(92,184,92,.5)}.schema-btn-success.disabled,.schema-btn-success:disabled{background-color:#5cb85c;border-color:#5cb85c}.schema-btn-success.active,.schema-btn-success:active,.show>.schema-btn-success.dropdown-toggle{color:#fff;background-color:#449d44;background-image:none;border-color:#419641}.schema-btn-warning{color:#fff;background-color:#f0ad4e;border-color:#f0ad4e}.schema-btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#eb9316}.schema-btn-warning.focus,.schema-btn-warning:focus{-webkit-box-shadow:0 0 0 2px rgba(240,173,78,.5);box-shadow:0 0 0 2px rgba(240,173,78,.5)}.schema-btn-warning.disabled,.schema-btn-warning:disabled{background-color:#f0ad4e;border-color:#f0ad4e}.schema-btn-warning.active,.schema-btn-warning:active,.show>.schema-btn-warning.dropdown-toggle{color:#fff;background-color:#ec971f;background-image:none;border-color:#eb9316}.schema-btn-danger{color:#fff;background-color:#d9534f;border-color:#d9534f}.schema-btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#c12e2a}.schema-btn-danger.focus,.schema-btn-danger:focus{-webkit-box-shadow:0 0 0 2px rgba(217,83,79,.5);box-shadow:0 0 0 2px rgba(217,83,79,.5)}.schema-btn-danger.disabled,.schema-btn-danger:disabled{background-color:#d9534f;border-color:#d9534f}.schema-btn-danger.active,.schema-btn-danger:active,.show>.schema-btn-danger.dropdown-toggle{color:#fff;background-color:#c9302c;background-image:none;border-color:#c12e2a}.schema-btn-outline-primary{color:#0275d8;background-image:none;background-color:transparent;border-color:#0275d8}.schema-btn-outline-primary:hover{color:#fff;background-color:#0275d8;border-color:#0275d8}.schema-btn-outline-primary.focus,.schema-btn-outline-primary:focus{-webkit-box-shadow:0 0 0 2px rgba(2,117,216,.5);box-shadow:0 0 0 2px rgba(2,117,216,.5)}.schema-btn-outline-primary.disabled,.schema-btn-outline-primary:disabled{color:#0275d8;background-color:transparent}.schema-btn-outline-primary.active,.schema-btn-outline-primary:active,.show>.schema-btn-outline-primary.dropdown-toggle{color:#fff;background-color:#0275d8;border-color:#0275d8}.schema-btn-outline-secondary{color:#ccc;background-image:none;background-color:transparent;border-color:#ccc}.schema-btn-outline-secondary:hover{color:#fff;background-color:#ccc;border-color:#ccc}.schema-btn-outline-secondary.focus,.schema-btn-outline-secondary:focus{-webkit-box-shadow:0 0 0 2px rgba(204,204,204,.5);box-shadow:0 0 0 2px rgba(204,204,204,.5)}.schema-btn-outline-secondary.disabled,.schema-btn-outline-secondary:disabled{color:#ccc;background-color:transparent}.schema-btn-outline-secondary.active,.schema-btn-outline-secondary:active,.show>.schema-btn-outline-secondary.dropdown-toggle{color:#fff;background-color:#ccc;border-color:#ccc}.schema-btn-outline-info{color:#5bc0de;background-image:none;background-color:transparent;border-color:#5bc0de}.schema-btn-outline-info:hover{color:#fff;background-color:#5bc0de;border-color:#5bc0de}.schema-btn-outline-info.focus,.schema-btn-outline-info:focus{-webkit-box-shadow:0 0 0 2px rgba(91,192,222,.5);box-shadow:0 0 0 2px rgba(91,192,222,.5)}.schema-btn-outline-info.disabled,.schema-btn-outline-info:disabled{color:#5bc0de;background-color:transparent}.schema-btn-outline-info.active,.schema-btn-outline-info:active,.show>.schema-btn-outline-info.dropdown-toggle{color:#fff;background-color:#5bc0de;border-color:#5bc0de}.schema-btn-outline-success{color:#5cb85c;background-image:none;background-color:transparent;border-color:#5cb85c}.schema-btn-outline-success:hover{color:#fff;background-color:#5cb85c;border-color:#5cb85c}.schema-btn-outline-success.focus,.schema-btn-outline-success:focus{-webkit-box-shadow:0 0 0 2px rgba(92,184,92,.5);box-shadow:0 0 0 2px rgba(92,184,92,.5)}.schema-btn-outline-success.disabled,.schema-btn-outline-success:disabled{color:#5cb85c;background-color:transparent}.schema-btn-outline-success.active,.schema-btn-outline-success:active,.show>.schema-btn-outline-success.dropdown-toggle{color:#fff;background-color:#5cb85c;border-color:#5cb85c}.schema-btn-outline-warning{color:#f0ad4e;background-image:none;background-color:transparent;border-color:#f0ad4e}.schema-btn-outline-warning:hover{color:#fff;background-color:#f0ad4e;border-color:#f0ad4e}.schema-btn-outline-warning.focus,.schema-btn-outline-warning:focus{-webkit-box-shadow:0 0 0 2px rgba(240,173,78,.5);box-shadow:0 0 0 2px rgba(240,173,78,.5)}.schema-btn-outline-warning.disabled,.schema-btn-outline-warning:disabled{color:#f0ad4e;background-color:transparent}.schema-btn-outline-warning.active,.schema-btn-outline-warning:active,.show>.schema-btn-outline-warning.dropdown-toggle{color:#fff;background-color:#f0ad4e;border-color:#f0ad4e}.schema-btn-outline-danger{color:#d9534f;background-image:none;background-color:transparent;border-color:#d9534f}.schema-btn-outline-danger:hover{color:#fff;background-color:#d9534f;border-color:#d9534f}.schema-btn-outline-danger.focus,.schema-btn-outline-danger:focus{-webkit-box-shadow:0 0 0 2px rgba(217,83,79,.5);box-shadow:0 0 0 2px rgba(217,83,79,.5)}.schema-btn-outline-danger.disabled,.schema-btn-outline-danger:disabled{color:#d9534f;background-color:transparent}.schema-btn-outline-danger.active,.schema-btn-outline-danger:active,.show>.schema-btn-outline-danger.dropdown-toggle{color:#fff;background-color:#d9534f;border-color:#d9534f}.schema-btn-link{font-weight:400;color:#0275d8;border-radius:0}.schema-btn-link,.schema-btn-link.active,.schema-btn-link:active,.schema-btn-link:disabled{background-color:transparent}.schema-btn-link,.schema-btn-link:active,.schema-btn-link:focus{border-color:transparent}.schema-btn-link:hover{border-color:transparent}.schema-btn-link:focus,.schema-btn-link:hover{color:#014c8c;text-decoration:underline;background-color:transparent}.schema-btn-link:disabled{color:#636c72}.schema-btn-link:disabled:focus,.schema-btn-link:disabled:hover{text-decoration:none}.schema-btn-group-lg>.schema-btn,.schema-btn-lg{padding:.75rem 1.5rem;font-size:1.25rem;border-radius:.3rem}.schema-btn-group-sm>.schema-btn,.schema-btn-sm{padding:.25rem .5rem;font-size:.875rem;border-radius:.2rem}.schema-btn-block{display:block;width:100%}.schema-btn-block+.schema-btn-block{margin-top:.5rem}input[type=button].schema-btn-block,input[type=reset].schema-btn-block,input[type=submit].schema-btn-block{width:100%}
2097
- .schema-fade {
2098
- opacity: 0;
2099
- transition: opacity 0.15s linear;
2100
- }
2101
-
2102
- .schema-fade.schema-show {
2103
- opacity: 1;
2104
- }
2105
-
2106
- .schema-collapse {
2107
- display: none;
2108
- }
2109
-
2110
- .schema-collapse.schema-show {
2111
- display: block;
2112
- }
2113
-
2114
- tr.schema-collapse.schema-show {
2115
- display: table-row;
2116
- }
2117
-
2118
- tbody.schema-collapse.schema-show {
2119
- display: table-row-group;
2120
- }
2121
-
2122
- .schema-collapsing {
2123
- position: relative;
2124
- height: 0;
2125
- overflow: hidden;
2126
- transition: height 0.35s ease;
2127
- }
2128
-
2129
- .schema-dropup,
2130
- .schema-dropdown {
2131
- position: relative;
2132
- }
2133
-
2134
- .schema-dropdown-toggle::after {
2135
- display: inline-block;
2136
- width: 0;
2137
- height: 0;
2138
- margin-left: 0.255em;
2139
- vertical-align: 0.255em;
2140
- content: "";
2141
- border-top: 0.3em solid;
2142
- border-right: 0.3em solid transparent;
2143
- border-left: 0.3em solid transparent;
2144
- }
2145
-
2146
- .schema-dropdown-toggle:empty::after {
2147
- margin-left: 0;
2148
- }
2149
-
2150
- .schema-dropup .schema-dropdown-menu {
2151
- margin-top: 0;
2152
- margin-bottom: 0.125rem;
2153
- }
2154
-
2155
- .schema-dropup .schema-dropdown-toggle::after {
2156
- border-top: 0;
2157
- border-bottom: 0.3em solid;
2158
- }
2159
-
2160
- .schema-dropdown-menu {
2161
- position: absolute;
2162
- top: 100%;
2163
- left: 0;
2164
- z-index: 1000;
2165
- display: none;
2166
- float: left;
2167
- min-width: 10rem;
2168
- padding: 0.5rem 0;
2169
- margin: 0.125rem 0 0;
2170
- font-size: 1rem;
2171
- color: #212529;
2172
- text-align: left;
2173
- list-style: none;
2174
- background-color: #fff;
2175
- background-clip: padding-box;
2176
- border: 1px solid rgba(0, 0, 0, 0.15);
2177
- border-radius: 0.25rem;
2178
- }
2179
-
2180
- .schema-dropdown-divider {
2181
- height: 0;
2182
- margin: 0.5rem 0;
2183
- overflow: hidden;
2184
- border-top: 1px solid #e9ecef;
2185
- }
2186
-
2187
- .schema-dropdown-item {
2188
- display: block;
2189
- width: 100%;
2190
- padding: 0.25rem 1.5rem;
2191
- clear: both;
2192
- font-weight: normal;
2193
- color: #212529;
2194
- text-align: inherit;
2195
- white-space: nowrap;
2196
- background: none;
2197
- border: 0;
2198
- }
2199
-
2200
- .schema-dropdown-item:focus, .schema-dropdown-item:hover {
2201
- color: #16181b;
2202
- text-decoration: none;
2203
- background-color: #f8f9fa;
2204
- }
2205
-
2206
- .schema-dropdown-item.active, .schema-dropdown-item:active {
2207
- color: #fff;
2208
- text-decoration: none;
2209
- background-color: #007bff;
2210
- }
2211
-
2212
- .schema-dropdown-item.disabled, .schema-dropdown-item:disabled {
2213
- color: #868e96;
2214
- background-color: transparent;
2215
- }
2216
-
2217
- .schema-show > a {
2218
- outline: 0;
2219
- }
2220
-
2221
- .schema-dropdown-menu.schema-show {
2222
- display: block;
2223
- }
2224
-
2225
- .schema-dropdown-header {
2226
- display: block;
2227
- padding: 0.5rem 1.5rem;
2228
- margin-bottom: 0;
2229
- font-size: 0.875rem;
2230
- color: #868e96;
2231
- white-space: nowrap;
2232
- }
2233
-
2234
- .schema-btn-group,
2235
- .schema-btn-group-vertical {
2236
- position: relative;
2237
- display: -ms-inline-flexbox;
2238
- display: inline-flex;
2239
- vertical-align: middle;
2240
- }
2241
-
2242
- .schema-btn-group > .schema-btn,
2243
- .schema-btn-group-vertical > .schema-btn {
2244
- position: relative;
2245
- -ms-flex: 0 1 auto;
2246
- flex: 0 1 auto;
2247
- margin-bottom: 0;
2248
- }
2249
-
2250
- .schema-btn-group > .schema-btn:hover,
2251
- .schema-btn-group-vertical > .schema-btn:hover {
2252
- z-index: 2;
2253
- }
2254
-
2255
- .schema-btn-group > .schema-btn:focus, .schema-btn-group > .schema-btn:active, .schema-btn-group > .schema-btn.active,
2256
- .schema-btn-group-vertical > .schema-btn:focus,
2257
- .schema-btn-group-vertical > .schema-btn:active,
2258
- .schema-btn-group-vertical > .schema-btn.active {
2259
- z-index: 2;
2260
- }
2261
-
2262
- .schema-btn-group .schema-btn + .schema-btn,
2263
- .schema-btn-group .schema-btn + .schema-btn-group,
2264
- .schema-btn-group .schema-btn-group + .schema-btn,
2265
- .schema-btn-group .schema-btn-group + .schema-btn-group,
2266
- .schema-btn-group-vertical .schema-btn + .schema-btn,
2267
- .schema-btn-group-vertical .schema-btn + .schema-btn-group,
2268
- .schema-btn-group-vertical .schema-btn-group + .schema-btn,
2269
- .schema-btn-group-vertical .schema-btn-group + .schema-btn-group {
2270
- margin-left: -1px;
2271
- }
2272
-
2273
- .schema-btn-toolbar {
2274
- display: -ms-flexbox;
2275
- display: flex;
2276
- -ms-flex-wrap: wrap;
2277
- flex-wrap: wrap;
2278
- -ms-flex-pack: start;
2279
- justify-content: flex-start;
2280
- }
2281
-
2282
- .schema-btn-toolbar .schema-input-group {
2283
- width: auto;
2284
- }
2285
-
2286
- .schema-btn-group > .schema-btn:not(:first-child):not(:last-child):not(.schema-dropdown-toggle) {
2287
- border-radius: 0;
2288
- }
2289
-
2290
- .schema-btn-group > .schema-btn:first-child {
2291
- margin-left: 0;
2292
- }
2293
-
2294
- .schema-btn-group > .schema-btn:first-child:not(:last-child):not(.schema-dropdown-toggle) {
2295
- border-top-right-radius: 0;
2296
- border-bottom-right-radius: 0;
2297
- }
2298
-
2299
- .schema-btn-group > .schema-btn:last-child:not(:first-child),
2300
- .schema-btn-group > .schema-dropdown-toggle:not(:first-child) {
2301
- border-top-left-radius: 0;
2302
- border-bottom-left-radius: 0;
2303
- }
2304
-
2305
- .schema-btn-group > .schema-btn-group {
2306
- float: left;
2307
- }
2308
-
2309
- .schema-btn-group > .schema-btn-group:not(:first-child):not(:last-child) > .schema-btn {
2310
- border-radius: 0;
2311
- }
2312
-
2313
- .schema-btn-group > .schema-btn-group:first-child:not(:last-child) > .schema-btn:last-child,
2314
- .schema-btn-group > .schema-btn-group:first-child:not(:last-child) > .schema-dropdown-toggle {
2315
- border-top-right-radius: 0;
2316
- border-bottom-right-radius: 0;
2317
- }
2318
-
2319
- .schema-btn-group > .schema-btn-group:last-child:not(:first-child) > .schema-btn:first-child {
2320
- border-top-left-radius: 0;
2321
- border-bottom-left-radius: 0;
2322
- }
2323
-
2324
- .schema-btn + .schema-dropdown-toggle-split {
2325
- padding-right: 0.5625rem;
2326
- padding-left: 0.5625rem;
2327
- }
2328
-
2329
- .schema-btn + .schema-dropdown-toggle-split::after {
2330
- margin-left: 0;
2331
- }
2332
-
2333
- .schema-btn-sm + .schema-dropdown-toggle-split, .schema-btn-group-sm > .schema-btn + .schema-dropdown-toggle-split {
2334
- padding-right: 0.375rem;
2335
- padding-left: 0.375rem;
2336
- }
2337
-
2338
- .schema-btn-lg + .schema-dropdown-toggle-split, .schema-btn-group-lg > .schema-btn + .schema-dropdown-toggle-split {
2339
- padding-right: 0.75rem;
2340
- padding-left: 0.75rem;
2341
- }
2342
-
2343
- .schema-btn-group-vertical {
2344
- display: -ms-inline-flexbox;
2345
- display: inline-flex;
2346
- -ms-flex-direction: column;
2347
- flex-direction: column;
2348
- -ms-flex-align: start;
2349
- align-items: flex-start;
2350
- -ms-flex-pack: center;
2351
- justify-content: center;
2352
- }
2353
-
2354
- .schema-btn-group-vertical .schema-btn,
2355
- .schema-btn-group-vertical .schema-btn-group {
2356
- width: 100%;
2357
- }
2358
-
2359
- .schema-btn-group-vertical > .schema-btn + .schema-btn,
2360
- .schema-btn-group-vertical > .schema-btn + .schema-btn-group,
2361
- .schema-btn-group-vertical > .schema-btn-group + .schema-btn,
2362
- .schema-btn-group-vertical > .schema-btn-group + .schema-btn-group {
2363
- margin-top: -1px;
2364
- margin-left: 0;
2365
- }
2366
-
2367
- .schema-btn-group-vertical > .schema-btn:not(:first-child):not(:last-child) {
2368
- border-radius: 0;
2369
- }
2370
-
2371
- .schema-btn-group-vertical > .schema-btn:first-child:not(:last-child) {
2372
- border-bottom-right-radius: 0;
2373
- border-bottom-left-radius: 0;
2374
- }
2375
-
2376
- .schema-btn-group-vertical > .schema-btn:last-child:not(:first-child) {
2377
- border-top-left-radius: 0;
2378
- border-top-right-radius: 0;
2379
- }
2380
-
2381
- .schema-btn-group-vertical > .schema-btn-group:not(:first-child):not(:last-child) > .schema-btn {
2382
- border-radius: 0;
2383
- }
2384
-
2385
- .schema-btn-group-vertical > .schema-btn-group:first-child:not(:last-child) > .schema-btn:last-child,
2386
- .schema-btn-group-vertical > .schema-btn-group:first-child:not(:last-child) > .schema-dropdown-toggle {
2387
- border-bottom-right-radius: 0;
2388
- border-bottom-left-radius: 0;
2389
- }
2390
-
2391
- .schema-btn-group-vertical > .schema-btn-group:last-child:not(:first-child) > .schema-btn:first-child {
2392
- border-top-left-radius: 0;
2393
- border-top-right-radius: 0;
2394
- }
2395
-
2396
- .schema [data-toggle="buttons"] > .schema-btn input[type="radio"],
2397
- .schema [data-toggle="buttons"] > .schema-btn input[type="checkbox"],
2398
- .schema [data-toggle="buttons"] > .schema-btn-group > .schema-btn input[type="radio"],
2399
- .schema [data-toggle="buttons"] > .schema-btn-group > .schema-btn input[type="checkbox"] {
2400
- position: absolute;
2401
- clip: rect(0, 0, 0, 0);
2402
- pointer-events: none;
2403
- }
2404
-
2405
- .schema-input-group {
2406
- position: relative;
2407
- display: -ms-flexbox;
2408
- display: flex;
2409
- width: 100%;
2410
- }
2411
-
2412
- .schema-input-group .schema-form-control {
2413
- position: relative;
2414
- z-index: 2;
2415
- -ms-flex: 1 1 auto;
2416
- flex: 1 1 auto;
2417
- width: 1%;
2418
- margin-bottom: 0;
2419
- }
2420
-
2421
- .schema-input-group .schema-form-control:focus, .schema-input-group .schema-form-control:active, .schema-input-group .schema-form-control:hover {
2422
- z-index: 3;
2423
- }
2424
-
2425
- .schema-input-group-addon,
2426
- .schema-input-group-btn,
2427
- .schema-input-group .schema-form-control {
2428
- display: -ms-flexbox;
2429
- display: flex;
2430
- -ms-flex-align: center;
2431
- align-items: center;
2432
- }
2433
-
2434
- .schema-input-group-addon:not(:first-child):not(:last-child),
2435
- .schema-input-group-btn:not(:first-child):not(:last-child),
2436
- .schema-input-group .schema-form-control:not(:first-child):not(:last-child) {
2437
- border-radius: 0;
2438
- }
2439
-
2440
- .schema-input-group-addon,
2441
- .schema-input-group-btn {
2442
- white-space: nowrap;
2443
- vertical-align: middle;
2444
- }
2445
-
2446
- .schema-input-group-addon {
2447
- padding: 0.5rem 0.75rem;
2448
- margin-bottom: 0;
2449
- font-size: 1rem;
2450
- font-weight: normal;
2451
- line-height: 1.25;
2452
- color: #495057;
2453
- text-align: center;
2454
- background-color: #e9ecef;
2455
- border: 1px solid rgba(0, 0, 0, 0.15);
2456
- border-radius: 0.25rem;
2457
- }
2458
-
2459
- .schema-input-group-addon.schema-form-control-sm,
2460
- .schema-input-group-sm > .schema-input-group-addon,
2461
- .schema-input-group-sm > .schema-input-group-btn > .schema-input-group-addon.schema-btn {
2462
- padding: 0.25rem 0.5rem;
2463
- font-size: 0.875rem;
2464
- border-radius: 0.2rem;
2465
- }
2466
-
2467
- .schema-input-group-addon.schema-form-control-lg,
2468
- .schema-input-group-lg > .schema-input-group-addon,
2469
- .schema-input-group-lg > .schema-input-group-btn > .schema-input-group-addon.schema-btn {
2470
- padding: 0.5rem 1rem;
2471
- font-size: 1.25rem;
2472
- border-radius: 0.3rem;
2473
- }
2474
-
2475
- .schema-input-group-addon input[type="radio"],
2476
- .schema-input-group-addon input[type="checkbox"] {
2477
- margin-top: 0;
2478
- }
2479
-
2480
- .schema-input-group .schema-form-control:not(:last-child),
2481
- .schema-input-group-addon:not(:last-child),
2482
- .schema-input-group-btn:not(:last-child) > .schema-btn,
2483
- .schema-input-group-btn:not(:last-child) > .schema-btn-group > .schema-btn,
2484
- .schema-input-group-btn:not(:last-child) > .schema-dropdown-toggle,
2485
- .schema-input-group-btn:not(:first-child) > .schema-btn:not(:last-child):not(.schema-dropdown-toggle),
2486
- .schema-input-group-btn:not(:first-child) > .schema-btn-group:not(:last-child) > .schema-btn {
2487
- border-top-right-radius: 0;
2488
- border-bottom-right-radius: 0;
2489
- }
2490
-
2491
- .schema-input-group-addon:not(:last-child) {
2492
- border-right: 0;
2493
- }
2494
-
2495
- .schema-input-group-addon {
2496
- vertical-align:top;
2497
- display: inline-block;
2498
- }
2499
-
2500
- .schema-input-group .schema-form-control:not(:first-child),
2501
- .schema-input-group-addon:not(:first-child),
2502
- .schema-input-group-btn:not(:first-child) > .schema-btn,
2503
- .schema-input-group-btn:not(:first-child) > .schema-btn-group > .schema-btn,
2504
- .schema-input-group-btn:not(:first-child) > .schema-dropdown-toggle,
2505
- .schema-input-group-btn:not(:last-child) > .schema-btn:not(:first-child),
2506
- .schema-input-group-btn:not(:last-child) > .schema-btn-group:not(:first-child) > .schema-btn {
2507
- border-top-left-radius: 0;
2508
- border-bottom-left-radius: 0;
2509
- }
2510
-
2511
- .schema-form-control + .schema-input-group-addon:not(:first-child) {
2512
- border-left: 0;
2513
- }
2514
-
2515
- .schema-input-group-btn {
2516
- position: relative;
2517
- font-size: 0;
2518
- white-space: nowrap;
2519
- }
2520
-
2521
- .schema-input-group-btn > .schema-btn {
2522
- position: relative;
2523
- }
2524
-
2525
- .schema-input-group-btn > .schema-btn + .schema-btn {
2526
- margin-left: -1px;
2527
- }
2528
-
2529
- .schema-input-group-btn > .schema-btn:focus, .schema-input-group-btn > .schema-btn:active, .schema-input-group-btn > .schema-btn:hover {
2530
- z-index: 3;
2531
- }
2532
-
2533
- .schema-input-group-btn:not(:last-child) > .schema-btn,
2534
- .schema-input-group-btn:not(:last-child) > .schema-btn-group {
2535
- margin-right: -1px;
2536
- }
2537
-
2538
- .schema-input-group-btn:not(:first-child) > .schema-btn,
2539
- .schema-input-group-btn:not(:first-child) > .schema-btn-group {
2540
- z-index: 2;
2541
- margin-left: -1px;
2542
- }
2543
-
2544
- .schema-input-group-btn:not(:first-child) > .schema-btn:focus, .schema-input-group-btn:not(:first-child) > .schema-btn:active, .schema-input-group-btn:not(:first-child) > .schema-btn:hover,
2545
- .schema-input-group-btn:not(:first-child) > .schema-btn-group:focus,
2546
- .schema-input-group-btn:not(:first-child) > .schema-btn-group:active,
2547
- .schema-input-group-btn:not(:first-child) > .schema-btn-group:hover {
2548
- z-index: 3;
2549
- }
2550
-
2551
- .schema-custom-control {
2552
- position: relative;
2553
- display: -ms-inline-flexbox;
2554
- display: inline-flex;
2555
- min-height: 1.5rem;
2556
- padding-left: 1.5rem;
2557
- margin-right: 1rem;
2558
- }
2559
-
2560
- .schema-custom-control-input {
2561
- position: absolute;
2562
- z-index: -1;
2563
- opacity: 0;
2564
- }
2565
-
2566
- .schema-custom-control-input:checked ~ .schema-custom-control-indicator {
2567
- color: #fff;
2568
- background-color: #007bff;
2569
- }
2570
-
2571
- .schema-custom-control-input:focus ~ .schema-custom-control-indicator {
2572
- box-shadow: 0 0 0 1px #fff, 0 0 0 3px #007bff;
2573
- }
2574
-
2575
- .schema-custom-control-input:active ~ .schema-custom-control-indicator {
2576
- color: #fff;
2577
- background-color: #b3d7ff;
2578
- }
2579
-
2580
- .schema-custom-control-input:disabled ~ .schema-custom-control-indicator {
2581
- background-color: #e9ecef;
2582
- }
2583
-
2584
- .schema-custom-control-input:disabled ~ .schema-custom-control-description {
2585
- color: #868e96;
2586
- }
2587
-
2588
- .schema-custom-control-indicator {
2589
- position: absolute;
2590
- top: 0.25rem;
2591
- left: 0;
2592
- display: block;
2593
- width: 1rem;
2594
- height: 1rem;
2595
- pointer-events: none;
2596
- -webkit-user-select: none;
2597
- -moz-user-select: none;
2598
- -ms-user-select: none;
2599
- user-select: none;
2600
- background-color: #ddd;
2601
- background-repeat: no-repeat;
2602
- background-position: center center;
2603
- background-size: 50% 50%;
2604
- }
2605
-
2606
- .schema-custom-checkbox .schema-custom-control-indicator {
2607
- border-radius: 0.25rem;
2608
- }
2609
-
2610
- .schema-custom-checkbox .schema-custom-control-input:checked ~ .schema-custom-control-indicator {
2611
- background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E");
2612
- }
2613
-
2614
- .schema-custom-checkbox .schema-custom-control-input:indeterminate ~ .schema-custom-control-indicator {
2615
- background-color: #007bff;
2616
- background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3E%3Cpath stroke='%23fff' d='M0 2h4'/%3E%3C/svg%3E");
2617
- }
2618
-
2619
- .schema-custom-radio .schema-custom-control-indicator {
2620
- border-radius: 50%;
2621
- }
2622
-
2623
- .schema-custom-radio .schema-custom-control-input:checked ~ .schema-custom-control-indicator {
2624
- background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%23fff'/%3E%3C/svg%3E");
2625
- }
2626
-
2627
- .schema-custom-controls-stacked {
2628
- display: -ms-flexbox;
2629
- display: flex;
2630
- -ms-flex-direction: column;
2631
- flex-direction: column;
2632
- }
2633
-
2634
- .schema-custom-controls-stacked .schema-custom-control {
2635
- margin-bottom: 0.25rem;
2636
- }
2637
-
2638
- .schema-custom-controls-stacked .schema-custom-control + .schema-custom-control {
2639
- margin-left: 0;
2640
- }
2641
-
2642
- .schema-custom-select {
2643
- display: inline-block;
2644
- max-width: 100%;
2645
- height: calc(2.25rem + 2px);
2646
- padding: 0.375rem 1.75rem 0.375rem 0.75rem;
2647
- line-height: 1.25;
2648
- color: #495057;
2649
- vertical-align: middle;
2650
- background: #fff url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23333' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
2651
- background-size: 8px 10px;
2652
- border: 1px solid rgba(0, 0, 0, 0.15);
2653
- border-radius: 0.25rem;
2654
- -webkit-appearance: none;
2655
- -moz-appearance: none;
2656
- appearance: none;
2657
- }
2658
-
2659
- .schema-custom-select:focus {
2660
- border-color: #80bdff;
2661
- outline: none;
2662
- }
2663
-
2664
- .schema-custom-select:focus::-ms-value {
2665
- color: #495057;
2666
- background-color: #fff;
2667
- }
2668
-
2669
- .schema-custom-select:disabled {
2670
- color: #868e96;
2671
- background-color: #e9ecef;
2672
- }
2673
-
2674
- .schema-custom-select::-ms-expand {
2675
- opacity: 0;
2676
- }
2677
-
2678
- .schema-custom-select-sm {
2679
- height: calc(1.8125rem + 2px);
2680
- padding-top: 0.375rem;
2681
- padding-bottom: 0.375rem;
2682
- font-size: 75%;
2683
- }
2684
-
2685
- .schema-custom-file {
2686
- position: relative;
2687
- display: inline-block;
2688
- max-width: 100%;
2689
- height: 2.5rem;
2690
- margin-bottom: 0;
2691
- }
2692
-
2693
- .schema-custom-file-input {
2694
- min-width: 14rem;
2695
- max-width: 100%;
2696
- height: 2.5rem;
2697
- margin: 0;
2698
- opacity: 0;
2699
- }
2700
-
2701
- .schema-custom-file-control {
2702
- position: absolute;
2703
- top: 0;
2704
- right: 0;
2705
- left: 0;
2706
- z-index: 5;
2707
- height: 2.5rem;
2708
- padding: 0.5rem 1rem;
2709
- line-height: 1.5;
2710
- color: #495057;
2711
- pointer-events: none;
2712
- -webkit-user-select: none;
2713
- -moz-user-select: none;
2714
- -ms-user-select: none;
2715
- user-select: none;
2716
- background-color: #fff;
2717
- border: 1px solid rgba(0, 0, 0, 0.15);
2718
- border-radius: 0.25rem;
2719
- }
2720
-
2721
- .schema-custom-file-control:lang(en):empty::after {
2722
- content: "Choose file...";
2723
- }
2724
-
2725
- .schema-custom-file-control::before {
2726
- position: absolute;
2727
- top: -1px;
2728
- right: -1px;
2729
- bottom: -1px;
2730
- z-index: 6;
2731
- display: block;
2732
- height: 2.5rem;
2733
- padding: 0.5rem 1rem;
2734
- line-height: 1.5;
2735
- color: #495057;
2736
- background-color: #e9ecef;
2737
- border: 1px solid rgba(0, 0, 0, 0.15);
2738
- border-radius: 0 0.25rem 0.25rem 0;
2739
- }
2740
-
2741
- .schema-custom-file-control:lang(en)::before {
2742
- content: "Browse";
2743
- }
2744
-
2745
-
2746
- .schema-modal-open {
2747
- overflow: hidden;
2748
- }
2749
-
2750
- .schema-modal {
2751
- position: fixed;
2752
- top: 0;
2753
- right: 0;
2754
- bottom: 0;
2755
- left: 0;
2756
- z-index: 1050;
2757
- display: none;
2758
- overflow: hidden;
2759
- outline: 0;
2760
- }
2761
-
2762
- .schema-modal.fade .schema-modal-dialog {
2763
- transition: -webkit-transform 0.3s ease-out;
2764
- transition: transform 0.3s ease-out;
2765
- transition: transform 0.3s ease-out, -webkit-transform 0.3s ease-out;
2766
- -webkit-transform: translate(0, -25%);
2767
- transform: translate(0, -25%);
2768
- }
2769
-
2770
- .schema-modal.show .schema-modal-dialog {
2771
- -webkit-transform: translate(0, 0);
2772
- transform: translate(0, 0);
2773
- }
2774
-
2775
- .schema-modal-open .schema-modal {
2776
- overflow-x: hidden;
2777
- overflow-y: auto;
2778
- }
2779
-
2780
- .schema-modal-dialog {
2781
- position: relative;
2782
- width: auto;
2783
- margin: 10px;
2784
- }
2785
-
2786
- .schema-modal-content {
2787
- position: relative;
2788
- display: -ms-flexbox;
2789
- display: flex;
2790
- -ms-flex-direction: column;
2791
- flex-direction: column;
2792
- background-color: #fff;
2793
- background-clip: padding-box;
2794
- border: 1px solid rgba(0, 0, 0, 0.2);
2795
- border-radius: 0.3rem;
2796
- outline: 0;
2797
- }
2798
-
2799
- .schema-modal-backdrop {
2800
- position: fixed;
2801
- top: 0;
2802
- right: 0;
2803
- bottom: 0;
2804
- left: 0;
2805
- z-index: 1040;
2806
- background-color: #000;
2807
- }
2808
-
2809
- .schema-modal-backdrop.fade {
2810
- opacity: 0;
2811
- }
2812
-
2813
- .schema-modal-backdrop.show {
2814
- opacity: 0.5;
2815
- }
2816
-
2817
- .schema-modal-header {
2818
- display: -ms-flexbox;
2819
- display: flex;
2820
- -ms-flex-align: center;
2821
- align-items: center;
2822
- -ms-flex-pack: justify;
2823
- justify-content: space-between;
2824
- padding: 15px;
2825
- border-bottom: 1px solid #e9ecef;
2826
- }
2827
-
2828
- .schema-modal-title {
2829
- margin-bottom: 0;
2830
- line-height: 1.5;
2831
- }
2832
-
2833
- .schema-modal-body {
2834
- position: relative;
2835
- -ms-flex: 1 1 auto;
2836
- flex: 1 1 auto;
2837
- padding: 15px;
2838
- }
2839
-
2840
- .schema-modal-footer {
2841
- display: -ms-flexbox;
2842
- display: flex;
2843
- -ms-flex-align: center;
2844
- align-items: center;
2845
- -ms-flex-pack: end;
2846
- justify-content: flex-end;
2847
- padding: 15px;
2848
- border-top: 1px solid #e9ecef;
2849
- }
2850
-
2851
- .schema-modal-footer > :not(:first-child) {
2852
- margin-left: .25rem;
2853
- }
2854
-
2855
- .schema-modal-footer > :not(:last-child) {
2856
- margin-right: .25rem;
2857
- }
2858
-
2859
- .schema-modal-scrollbar-measure {
2860
- position: absolute;
2861
- top: -9999px;
2862
- width: 50px;
2863
- height: 50px;
2864
- overflow: scroll;
2865
- }
2866
-
2867
- @media (min-width: 576px) {
2868
- .schema-modal-dialog {
2869
- max-width: 500px;
2870
- margin: 30px auto;
2871
- }
2872
- .schema-modal-sm {
2873
- max-width: 300px;
2874
- }
2875
- }
2876
-
2877
- @media (min-width: 992px) {
2878
- .schema-modal-lg {
2879
- max-width: 800px;
2880
- }
2881
- }
2882
-
2883
-
2884
- /* progress */
2885
- @-webkit-keyframes progress-bar-stripes {
2886
- from {
2887
- background-position: 1rem 0;
2888
- }
2889
- to {
2890
- background-position: 0 0;
2891
- }
2892
- }
2893
-
2894
- @keyframes progress-bar-stripes {
2895
- from {
2896
- background-position: 1rem 0;
2897
- }
2898
- to {
2899
- background-position: 0 0;
2900
- }
2901
- }
2902
-
2903
- /* progress */
2904
- .schema-progress {
2905
- display: -ms-flexbox;
2906
- display: flex;
2907
- overflow: hidden;
2908
- font-size: 0.75rem;
2909
- line-height: 1rem;
2910
- text-align: center;
2911
- background-color: #e9ecef;
2912
- border-radius: 0.25rem;
2913
- }
2914
-
2915
- .schema-progress-bar {
2916
- height: 1rem;
2917
- line-height: 1rem;
2918
- color: #fff;
2919
- background-color: #007bff;
2920
- transition: width 0.6s ease;
2921
- }
2922
-
2923
- .schema-progress-bar-striped {
2924
- background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
2925
- background-size: 1rem 1rem;
2926
- }
2927
-
2928
- .schema-progress-bar-animated {
2929
- -webkit-animation: progress-bar-stripes 1s linear infinite;
2930
- animation: progress-bar-stripes 1s linear infinite;
2931
- }
2932
-
2933
- /* badge */
2934
- .schema-badge {
2935
- display: inline-block;
2936
- padding: 0.25em 0.4em;
2937
- font-size: 75%;
2938
- font-weight: bold;
2939
- line-height: 1;
2940
- color: #fff;
2941
- text-align: center;
2942
- white-space: nowrap;
2943
- vertical-align: baseline;
2944
- border-radius: 0.25rem;
2945
- }
2946
-
2947
- .schema-badge:empty {
2948
- display: none;
2949
- }
2950
-
2951
- .schema-btn .schema-badge {
2952
- position: relative;
2953
- top: -1px;
2954
- }
2955
-
2956
- .schema-badge-pill {
2957
- padding-right: 0.6em;
2958
- padding-left: 0.6em;
2959
- border-radius: 10rem;
2960
- }
2961
-
2962
- .schema-badge-primary {
2963
- color: #fff;
2964
- background-color: #007bff;
2965
- }
2966
-
2967
- .schema-badge-primary[href]:focus, .schema-badge-primary[href]:hover {
2968
- color: #fff;
2969
- text-decoration: none;
2970
- background-color: #0062cc;
2971
- }
2972
-
2973
- .schema-badge-secondary {
2974
- color: #fff;
2975
- background-color: #868e96;
2976
- }
2977
-
2978
- .schema-badge-secondary[href]:focus, .schema-badge-secondary[href]:hover {
2979
- color: #fff;
2980
- text-decoration: none;
2981
- background-color: #6c757d;
2982
- }
2983
-
2984
- .schema-badge-success {
2985
- color: #fff;
2986
- background-color: #28a745;
2987
- }
2988
-
2989
- .schema-badge-success[href]:focus, .schema-badge-success[href]:hover {
2990
- color: #fff;
2991
- text-decoration: none;
2992
- background-color: #1e7e34;
2993
- }
2994
-
2995
- .schema-badge-info {
2996
- color: #fff;
2997
- background-color: #17a2b8;
2998
- }
2999
-
3000
- .schema-badge-info[href]:focus, .schema-badge-info[href]:hover {
3001
- color: #fff;
3002
- text-decoration: none;
3003
- background-color: #117a8b;
3004
- }
3005
-
3006
- .schema-badge-warning {
3007
- color: #111;
3008
- background-color: #ffc107;
3009
- }
3010
-
3011
- .schema-badge-warning[href]:focus, .schema-badge-warning[href]:hover {
3012
- color: #111;
3013
- text-decoration: none;
3014
- background-color: #d39e00;
3015
- }
3016
-
3017
- .schema-badge-danger {
3018
- color: #fff;
3019
- background-color: #dc3545;
3020
- }
3021
-
3022
- .schema-badge-danger[href]:focus, .schema-badge-danger[href]:hover {
3023
- color: #fff;
3024
- text-decoration: none;
3025
- background-color: #bd2130;
3026
- }
3027
-
3028
- .schema-badge-light {
3029
- color: #111;
3030
- background-color: #f8f9fa;
3031
- }
3032
-
3033
- .schema-badge-light[href]:focus, .schema-badge-light[href]:hover {
3034
- color: #111;
3035
- text-decoration: none;
3036
- background-color: #dae0e5;
3037
- }
3038
-
3039
- .schema-badge-dark {
3040
- color: #fff;
3041
- background-color: #343a40;
3042
- }
3043
-
3044
- .schema-badge-dark[href]:focus, .schema-badge-dark[href]:hover {
3045
- color: #fff;
3046
- text-decoration: none;
3047
- background-color: #1d2124;
3048
- }
3049
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/css/schema-bootstrap.min.css DELETED
@@ -1 +0,0 @@
1
- .schema-container,.schema-container-fluid{margin-right:auto;margin-left:auto;padding-right:15px;padding-left:15px;width:100%}.schema caption,.schema th{text-align:left}.schema-custom-file-input.is-valid:focus,.schema-custom-select.is-valid:focus,.schema-form-control.is-valid:focus,.schema-was-validated .schema-custom-file-input:valid:focus,.schema-was-validated .schema-custom-select:valid:focus,.schema-was-validated .schema-form-control:valid:focus{box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.schema-btn,.schema-custom-control-indicator{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}@media (min-width:576px){.schema-container{max-width:540px}}@media (min-width:768px){.schema-container{max-width:720px}}@media (min-width:992px){.schema-container{max-width:960px}}@media (min-width:1200px){.schema-container{max-width:1140px}}.schema-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}.schema-no-gutters{margin-right:0;margin-left:0}.schema-no-gutters>.schema-col,.schema-no-gutters>[class*=schema-col-]{padding-right:0;padding-left:0}.schema-col,.schema-col-1,.schema-col-10,.schema-col-11,.schema-col-12,.schema-col-2,.schema-col-3,.schema-col-4,.schema-col-5,.schema-col-6,.schema-col-7,.schema-col-8,.schema-col-9,.schema-col-auto,.schema-col-lg,.schema-col-lg-1,.schema-col-lg-10,.schema-col-lg-11,.schema-col-lg-12,.schema-col-lg-2,.schema-col-lg-3,.schema-col-lg-4,.schema-col-lg-5,.schema-col-lg-6,.schema-col-lg-7,.schema-col-lg-8,.schema-col-lg-9,.schema-col-lg-auto,.schema-col-md,.schema-col-md-1,.schema-col-md-10,.schema-col-md-11,.schema-col-md-12,.schema-col-md-2,.schema-col-md-3,.schema-col-md-4,.schema-col-md-5,.schema-col-md-6,.schema-col-md-7,.schema-col-md-8,.schema-col-md-9,.schema-col-md-auto,.schema-col-sm,.schema-col-sm-1,.schema-col-sm-10,.schema-col-sm-11,.schema-col-sm-12,.schema-col-sm-2,.schema-col-sm-3,.schema-col-sm-4,.schema-col-sm-5,.schema-col-sm-6,.schema-col-sm-7,.schema-col-sm-8,.schema-col-sm-9,.schema-col-sm-auto,.schema-col-xl,.schema-col-xl-1,.schema-col-xl-10,.schema-col-xl-11,.schema-col-xl-12,.schema-col-xl-2,.schema-col-xl-3,.schema-col-xl-4,.schema-col-xl-5,.schema-col-xl-6,.schema-col-xl-7,.schema-col-xl-8,.schema-col-xl-9,.schema-col-xl-auto{position:relative;width:100%;min-height:1px;padding-right:15px;padding-left:15px}.schema-col{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.schema-col-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.schema-col-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.schema-col-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.schema-col-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.schema-col-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.schema-col-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.schema-col-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.schema-col-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.schema-col-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.schema-col-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.schema-col-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.schema-col-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.schema-col-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.schema-order-1{-ms-flex-order:1;order:1}.schema-order-2{-ms-flex-order:2;order:2}.schema-order-3{-ms-flex-order:3;order:3}.schema-order-4{-ms-flex-order:4;order:4}.schema-order-5{-ms-flex-order:5;order:5}.schema-order-6{-ms-flex-order:6;order:6}.schema-order-7{-ms-flex-order:7;order:7}.schema-order-8{-ms-flex-order:8;order:8}.schema-order-9{-ms-flex-order:9;order:9}.schema-order-10{-ms-flex-order:10;order:10}.schema-order-11{-ms-flex-order:11;order:11}.schema-order-12{-ms-flex-order:12;order:12}@media (min-width:576px){.schema-col-sm{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.schema-col-sm-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.schema-col-sm-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.schema-col-sm-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.schema-col-sm-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.schema-col-sm-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.schema-col-sm-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.schema-col-sm-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.schema-col-sm-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.schema-col-sm-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.schema-col-sm-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.schema-col-sm-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.schema-col-sm-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.schema-col-sm-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.schema-order-sm-1{-ms-flex-order:1;order:1}.schema-order-sm-2{-ms-flex-order:2;order:2}.schema-order-sm-3{-ms-flex-order:3;order:3}.schema-order-sm-4{-ms-flex-order:4;order:4}.schema-order-sm-5{-ms-flex-order:5;order:5}.schema-order-sm-6{-ms-flex-order:6;order:6}.schema-order-sm-7{-ms-flex-order:7;order:7}.schema-order-sm-8{-ms-flex-order:8;order:8}.schema-order-sm-9{-ms-flex-order:9;order:9}.schema-order-sm-10{-ms-flex-order:10;order:10}.schema-order-sm-11{-ms-flex-order:11;order:11}.schema-order-sm-12{-ms-flex-order:12;order:12}}@media (min-width:768px){.schema-col-md{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.schema-col-md-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.schema-col-md-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.schema-col-md-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.schema-col-md-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.schema-col-md-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.schema-col-md-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.schema-col-md-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.schema-col-md-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.schema-col-md-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.schema-col-md-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.schema-col-md-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.schema-col-md-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.schema-col-md-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.schema-order-md-1{-ms-flex-order:1;order:1}.schema-order-md-2{-ms-flex-order:2;order:2}.schema-order-md-3{-ms-flex-order:3;order:3}.schema-order-md-4{-ms-flex-order:4;order:4}.schema-order-md-5{-ms-flex-order:5;order:5}.schema-order-md-6{-ms-flex-order:6;order:6}.schema-order-md-7{-ms-flex-order:7;order:7}.schema-order-md-8{-ms-flex-order:8;order:8}.schema-order-md-9{-ms-flex-order:9;order:9}.schema-order-md-10{-ms-flex-order:10;order:10}.schema-order-md-11{-ms-flex-order:11;order:11}.schema-order-md-12{-ms-flex-order:12;order:12}}@media (min-width:992px){.schema-col-lg{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.schema-col-lg-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.schema-col-lg-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.schema-col-lg-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.schema-col-lg-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.schema-col-lg-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.schema-col-lg-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.schema-col-lg-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.schema-col-lg-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.schema-col-lg-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.schema-col-lg-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.schema-col-lg-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.schema-col-lg-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.schema-col-lg-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.schema-order-lg-1{-ms-flex-order:1;order:1}.schema-order-lg-2{-ms-flex-order:2;order:2}.schema-order-lg-3{-ms-flex-order:3;order:3}.schema-order-lg-4{-ms-flex-order:4;order:4}.schema-order-lg-5{-ms-flex-order:5;order:5}.schema-order-lg-6{-ms-flex-order:6;order:6}.schema-order-lg-7{-ms-flex-order:7;order:7}.schema-order-lg-8{-ms-flex-order:8;order:8}.schema-order-lg-9{-ms-flex-order:9;order:9}.schema-order-lg-10{-ms-flex-order:10;order:10}.schema-order-lg-11{-ms-flex-order:11;order:11}.schema-order-lg-12{-ms-flex-order:12;order:12}}@media (min-width:1200px){.schema-col-xl{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.schema-col-xl-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.schema-col-xl-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.schema-col-xl-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.schema-col-xl-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.schema-col-xl-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.schema-col-xl-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.schema-col-xl-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.schema-col-xl-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.schema-col-xl-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.schema-col-xl-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.schema-col-xl-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.schema-col-xl-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.schema-col-xl-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.schema-order-xl-1{-ms-flex-order:1;order:1}.schema-order-xl-2{-ms-flex-order:2;order:2}.schema-order-xl-3{-ms-flex-order:3;order:3}.schema-order-xl-4{-ms-flex-order:4;order:4}.schema-order-xl-5{-ms-flex-order:5;order:5}.schema-order-xl-6{-ms-flex-order:6;order:6}.schema-order-xl-7{-ms-flex-order:7;order:7}.schema-order-xl-8{-ms-flex-order:8;order:8}.schema-order-xl-9{-ms-flex-order:9;order:9}.schema-order-xl-10{-ms-flex-order:10;order:10}.schema-order-xl-11{-ms-flex-order:11;order:11}.schema-order-xl-12{-ms-flex-order:12;order:12}}.schema-flex-row{-ms-flex-direction:row!important;flex-direction:row!important}.schema-flex-column{-ms-flex-direction:column!important;flex-direction:column!important}.schema-flex-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.schema-flex-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.schema-flex-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.schema-flex-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.schema-flex-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.schema-justify-content-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.schema-justify-content-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.schema-justify-content-center{-ms-flex-pack:center!important;justify-content:center!important}.schema-justify-content-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.schema-justify-content-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.schema-align-items-start{-ms-flex-align:start!important;align-items:flex-start!important}.schema-align-items-end{-ms-flex-align:end!important;align-items:flex-end!important}.schema-align-items-center{-ms-flex-align:center!important;align-items:center!important}.schema-align-items-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.schema-align-items-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.schema-align-content-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.schema-align-content-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.schema-align-content-center{-ms-flex-line-pack:center!important;align-content:center!important}.schema-align-content-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.schema-align-content-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.schema-align-content-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.schema-align-self-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.schema-align-self-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.schema-align-self-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.schema-align-self-center{-ms-flex-item-align:center!important;align-self:center!important}.schema-align-self-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.schema-align-self-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}@media (min-width:576px){.schema-flex-sm-row{-ms-flex-direction:row!important;flex-direction:row!important}.schema-flex-sm-column{-ms-flex-direction:column!important;flex-direction:column!important}.schema-flex-sm-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.schema-flex-sm-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.schema-flex-sm-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.schema-flex-sm-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.schema-flex-sm-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.schema-justify-content-sm-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.schema-justify-content-sm-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.schema-justify-content-sm-center{-ms-flex-pack:center!important;justify-content:center!important}.schema-justify-content-sm-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.schema-justify-content-sm-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.schema-align-items-sm-start{-ms-flex-align:start!important;align-items:flex-start!important}.schema-align-items-sm-end{-ms-flex-align:end!important;align-items:flex-end!important}.schema-align-items-sm-center{-ms-flex-align:center!important;align-items:center!important}.schema-align-items-sm-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.schema-align-items-sm-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.schema-align-content-sm-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.schema-align-content-sm-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.schema-align-content-sm-center{-ms-flex-line-pack:center!important;align-content:center!important}.schema-align-content-sm-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.schema-align-content-sm-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.schema-align-content-sm-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.schema-align-self-sm-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.schema-align-self-sm-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.schema-align-self-sm-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.schema-align-self-sm-center{-ms-flex-item-align:center!important;align-self:center!important}.schema-align-self-sm-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.schema-align-self-sm-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width:768px){.schema-flex-md-row{-ms-flex-direction:row!important;flex-direction:row!important}.schema-flex-md-column{-ms-flex-direction:column!important;flex-direction:column!important}.schema-flex-md-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.schema-flex-md-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.schema-flex-md-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.schema-flex-md-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.schema-flex-md-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.schema-justify-content-md-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.schema-justify-content-md-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.schema-justify-content-md-center{-ms-flex-pack:center!important;justify-content:center!important}.schema-justify-content-md-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.schema-justify-content-md-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.schema-align-items-md-start{-ms-flex-align:start!important;align-items:flex-start!important}.schema-align-items-md-end{-ms-flex-align:end!important;align-items:flex-end!important}.schema-align-items-md-center{-ms-flex-align:center!important;align-items:center!important}.schema-align-items-md-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.schema-align-items-md-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.schema-align-content-md-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.schema-align-content-md-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.schema-align-content-md-center{-ms-flex-line-pack:center!important;align-content:center!important}.schema-align-content-md-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.schema-align-content-md-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.schema-align-content-md-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.schema-align-self-md-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.schema-align-self-md-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.schema-align-self-md-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.schema-align-self-md-center{-ms-flex-item-align:center!important;align-self:center!important}.schema-align-self-md-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.schema-align-self-md-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width:992px){.schema-flex-lg-row{-ms-flex-direction:row!important;flex-direction:row!important}.schema-flex-lg-column{-ms-flex-direction:column!important;flex-direction:column!important}.schema-flex-lg-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.schema-flex-lg-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.schema-flex-lg-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.schema-flex-lg-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.schema-flex-lg-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.schema-justify-content-lg-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.schema-justify-content-lg-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.schema-justify-content-lg-center{-ms-flex-pack:center!important;justify-content:center!important}.schema-justify-content-lg-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.schema-justify-content-lg-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.schema-align-items-lg-start{-ms-flex-align:start!important;align-items:flex-start!important}.schema-align-items-lg-end{-ms-flex-align:end!important;align-items:flex-end!important}.schema-align-items-lg-center{-ms-flex-align:center!important;align-items:center!important}.schema-align-items-lg-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.schema-align-items-lg-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.schema-align-content-lg-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.schema-align-content-lg-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.schema-align-content-lg-center{-ms-flex-line-pack:center!important;align-content:center!important}.schema-align-content-lg-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.schema-align-content-lg-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.schema-align-content-lg-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.schema-align-self-lg-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.schema-align-self-lg-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.schema-align-self-lg-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.schema-align-self-lg-center{-ms-flex-item-align:center!important;align-self:center!important}.schema-align-self-lg-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.schema-align-self-lg-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width:1200px){.schema-flex-xl-row{-ms-flex-direction:row!important;flex-direction:row!important}.schema-flex-xl-column{-ms-flex-direction:column!important;flex-direction:column!important}.schema-flex-xl-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.schema-flex-xl-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.schema-flex-xl-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.schema-flex-xl-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.schema-flex-xl-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.schema-justify-content-xl-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.schema-justify-content-xl-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.schema-justify-content-xl-center{-ms-flex-pack:center!important;justify-content:center!important}.schema-justify-content-xl-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.schema-justify-content-xl-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.schema-align-items-xl-start{-ms-flex-align:start!important;align-items:flex-start!important}.schema-align-items-xl-end{-ms-flex-align:end!important;align-items:flex-end!important}.schema-align-items-xl-center{-ms-flex-align:center!important;align-items:center!important}.schema-align-items-xl-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.schema-align-items-xl-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.schema-align-content-xl-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.schema-align-content-xl-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.schema-align-content-xl-center{-ms-flex-line-pack:center!important;align-content:center!important}.schema-align-content-xl-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.schema-align-content-xl-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.schema-align-content-xl-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.schema-align-self-xl-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.schema-align-self-xl-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.schema-align-self-xl-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.schema-align-self-xl-center{-ms-flex-item-align:center!important;align-self:center!important}.schema-align-self-xl-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.schema-align-self-xl-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}.schema-img{vertical-align:middle;border-style:none}.schema [role=button],.schema a,.schema area,.schema button,.schema input,.schema label,.schema select,.schema summary,.schema textarea{-ms-touch-action:manipulation;touch-action:manipulation}.schema table{border-collapse:collapse}.schema caption{padding-top:.75rem;padding-bottom:.75rem;color:#868e96;caption-side:bottom}.schema label{display:inline-block;margin-bottom:.5rem}.schema button:focus{outline:dotted 1px;outline:-webkit-focus-ring-color auto 5px}.schema button,.schema input,.schema optgroup,.schema select,.schema textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}.schema button,.schema input{overflow:visible}.schema button,.schema select{text-transform:none}.schema [type=reset],.schema [type=submit],.schema button,.schema html [type=button]{-webkit-appearance:button}.schema [type=button]::-moz-focus-inner,.schema [type=reset]::-moz-focus-inner,.schema [type=submit]::-moz-focus-inner,.schema button::-moz-focus-inner{padding:0;border-style:none}input[type=radio],input[type=checkbox]{box-sizing:border-box;padding:0}.schema input[type=date],.schema input[type=time],.schema input[type=datetime-local],.schema input[type=month]{-webkit-appearance:listbox}.schema textarea{overflow:auto;resize:vertical}.schema fieldset{min-width:0;padding:0;margin:0;border:0}.schema legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}.schema-table{width:100%;max-width:100%;margin-bottom:1rem;background-color:transparent}.schema-table td,.schema-table th{padding:.75rem;vertical-align:top;border-top:1px solid #e9ecef}.schema-table thead th{vertical-align:bottom;border-bottom:2px solid #e9ecef}.schema-table tbody+tbody{border-top:2px solid #e9ecef}.schema-table .schema-table{background-color:#fff}.schema-table-sm td,.schema-table-sm th{padding:.3rem}.schema-table-bordered,.schema-table-bordered td,.schema-table-bordered th{border:1px solid #e9ecef}.schema-table-bordered thead td,.schema-table-bordered thead th{border-bottom-width:2px}.schema-table-striped tbody tr:nth-of-type(odd){background-color:rgba(0,0,0,.05)}.schema-table-hover tbody tr:hover{background-color:rgba(0,0,0,.075)}.schema-table-primary,.schema-table-primary>td,.schema-table-primary>th{background-color:#b8daff}.schema-table-hover .schema-table-primary:hover,.schema-table-hover .schema-table-primary:hover>td,.schema-table-hover .schema-table-primary:hover>th{background-color:#9fcdff}.schema-table-secondary,.schema-table-secondary>td,.schema-table-secondary>th{background-color:#dddfe2}.schema-table-hover .schema-table-secondary:hover,.schema-table-hover .schema-table-secondary:hover>td,.schema-table-hover .schema-table-secondary:hover>th{background-color:#cfd2d6}.schema-table-success,.schema-table-success>td,.schema-table-success>th{background-color:#c3e6cb}.schema-table-hover .schema-table-success:hover,.schema-table-hover .schema-table-success:hover>td,.schema-table-hover .schema-table-success:hover>th{background-color:#b1dfbb}.schema-table-info,.schema-table-info>td,.schema-table-info>th{background-color:#bee5eb}.schema-table-hover .schema-table-info:hover,.schema-table-hover .schema-table-info:hover>td,.schema-table-hover .schema-table-info:hover>th{background-color:#abdde5}.schema-table-warning,.schema-table-warning>td,.schema-table-warning>th{background-color:#ffeeba}.schema-table-hover .schema-table-warning:hover,.schema-table-hover .schema-table-warning:hover>td,.schema-table-hover .schema-table-warning:hover>th{background-color:#ffe8a1}.schema-table-danger,.schema-table-danger>td,.schema-table-danger>th{background-color:#f5c6cb}.schema-table-hover .schema-table-danger:hover,.schema-table-hover .schema-table-danger:hover>td,.schema-table-hover .schema-table-danger:hover>th{background-color:#f1b0b7}.schema-table-light,.schema-table-light>td,.schema-table-light>th{background-color:#fdfdfe}.schema-table-hover .schema-table-light:hover,.schema-table-hover .schema-table-light:hover>td,.schema-table-hover .schema-table-light:hover>th{background-color:#ececf6}.schema-table-dark,.schema-table-dark>td,.schema-table-dark>th{background-color:#c6c8ca}.schema-table-hover .schema-table-dark:hover,.schema-table-hover .schema-table-dark:hover>td,.schema-table-hover .schema-table-dark:hover>th{background-color:#b9bbbe}.schema-table-active,.schema-table-active>td,.schema-table-active>th,.schema-table-hover .schema-table-active:hover,.schema-table-hover .schema-table-active:hover>td,.schema-table-hover .schema-table-active:hover>th{background-color:rgba(0,0,0,.075)}.thead-inverse th{color:#fff;background-color:#212529}.thead-default th{color:#495057;background-color:#e9ecef}.schema-table-inverse{color:#fff;background-color:#212529}.schema-table-inverse td,.schema-table-inverse th,.schema-table-inverse thead th{border-color:#32383e}.schema-table-inverse.schema-table-bordered{border:0}.schema-table-inverse.schema-table-striped tbody tr:nth-of-type(odd){background-color:rgba(255,255,255,.05)}.schema-table-inverse.schema-table-hover tbody tr:hover{background-color:rgba(255,255,255,.075)}@media (max-width:991px){.schema-table-responsive{display:block;width:100%;overflow-x:auto;-ms-overflow-style:-ms-autohiding-scrollbar}.schema-table-responsive.schema-table-bordered{border:0}}.schema-form-control{display:block;width:100%;padding:.5rem .75rem;line-height:1.25;color:#495057;background-color:#fff;background-image:none;background-clip:padding-box;border:1px solid rgba(0,0,0,.15);border-radius:.25rem;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.schema-col-form-label,.schema-col-form-label-lg{padding-top:calc(.5rem - 1px * 2);padding-bottom:calc(.5rem - 1px * 2)}.schema-form-control::-ms-expand{background-color:transparent;border:0}.schema-form-control:focus{color:#495057;background-color:#fff;border-color:#80bdff;outline:0}.schema-form-control::-webkit-input-placeholder{color:#868e96;opacity:1}.schema-form-control:-ms-input-placeholder{color:#868e96;opacity:1}.schema-form-control::placeholder{color:#868e96;opacity:1}.schema-form-control:disabled,.schema-form-control[readonly]{background-color:#e9ecef;opacity:1}select.schema-form-control:not([size]):not([multiple]){height:calc(2.25rem + 2px)}select.schema-form-control:focus::-ms-value{color:#495057;background-color:#fff}.schema-form-control-file,.schema-form-control-range{display:block}.schema-col-form-label{margin-bottom:0}.schema-col-form-label-lg{font-size:1.25rem}.schema-col-form-label-sm{padding-top:calc(.25rem - 1px * 2);padding-bottom:calc(.25rem - 1px * 2);font-size:.875rem}.schema-col-form-legend,.schema-form-control-plaintext{padding-top:.5rem;padding-bottom:.5rem;margin-bottom:0}.schema-col-form-legend{font-size:1rem}.schema-form-control-plaintext{line-height:1.25;border:solid transparent;border-width:1px 0}.schema-custom-file-input.is-valid~.schema-custom-file-control,.schema-custom-select.is-valid,.schema-form-control.is-valid,.schema-was-validated .schema-custom-file-input:valid~.schema-custom-file-control,.schema-was-validated .schema-custom-select:valid,.schema-was-validated .schema-form-control:valid{border-color:#28a745}.schema-form-control-plaintext.schema-form-control-lg,.schema-form-control-plaintext.schema-form-control-sm,.schema-input-group-lg>.schema-form-control-plaintext.schema-form-control,.schema-input-group-lg>.schema-form-control-plaintext.schema-input-group-addon,.schema-input-group-lg>.schema-input-group-btn>.schema-form-control-plaintext.schema-btn,.schema-input-group-sm>.schema-form-control-plaintext.schema-form-control,.schema-input-group-sm>.schema-form-control-plaintext.schema-input-group-addon,.schema-input-group-sm>.schema-input-group-btn>.schema-form-control-plaintext.schema-btn{padding-right:0;padding-left:0}.schema-form-control-sm,.schema-input-group-sm>.schema-form-control,.schema-input-group-sm>.schema-input-group-addon,.schema-input-group-sm>.schema-input-group-btn>.schema-btn{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.schema-input-group-sm>.schema-input-group-btn>select.schema-btn:not([size]):not([multiple]),.schema-input-group-sm>select.schema-form-control:not([size]):not([multiple]),.schema-input-group-sm>select.schema-input-group-addon:not([size]):not([multiple]),select.schema-form-control-sm:not([size]):not([multiple]){height:calc(1.8125rem + 2px)}.schema-form-control-lg,.schema-input-group-lg>.schema-form-control,.schema-input-group-lg>.schema-input-group-addon,.schema-input-group-lg>.schema-input-group-btn>.schema-btn{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}.schema-input-group-lg>.schema-input-group-btn>select.schema-btn:not([size]):not([multiple]),.schema-input-group-lg>select.schema-form-control:not([size]):not([multiple]),.schema-input-group-lg>select.schema-input-group-addon:not([size]):not([multiple]),select.schema-form-control-lg:not([size]):not([multiple]){height:calc(2.3125rem + 2px)}.schema-form-group{margin-bottom:1rem}.schema-form-text{display:block;margin-top:.25rem}.schema-form-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-5px;margin-left:-5px}.schema-form-row>.schema-col,.schema-form-row>[class*=col-]{padding-right:5px;padding-left:5px}.schema-form-check{position:relative;display:block;margin-bottom:.5rem}.schema-form-check.disabled .schema-form-check-label{color:#868e96}.schema-form-check-label{padding-left:1.25rem;margin-bottom:0}.schema-form-check-input{position:absolute;margin-top:.25rem;margin-left:-1.25rem}.schema-form-check-input:only-child{position:static}.schema-form-check-inline{display:inline-block}.schema-form-check-inline .schema-form-check-label{vertical-align:middle}.schema-form-check-inline+.schema-form-check-inline{margin-left:.75rem}.schema-invalid-feedback{display:none;margin-top:.25rem;font-size:.875rem;color:#dc3545}.schema-invalid-tooltip{position:absolute;top:100%;z-index:5;display:none;width:250px;padding:.5rem;margin-top:.1rem;font-size:.875rem;line-height:1;color:#fff;background-color:rgba(220,53,69,.8);border-radius:.2rem}.schema-custom-select.is-invalid~.schema-invalid-feedback,.schema-custom-select.is-invalid~.schema-invalid-tooltip,.schema-custom-select.is-valid~.schema-invalid-feedback,.schema-custom-select.is-valid~.schema-invalid-tooltip,.schema-form-control.is-invalid~.schema-invalid-feedback,.schema-form-control.is-invalid~.schema-invalid-tooltip,.schema-form-control.is-valid~.schema-invalid-feedback,.schema-form-control.is-valid~.schema-invalid-tooltip,.schema-was-validated .schema-custom-select:invalid~.schema-invalid-feedback,.schema-was-validated .schema-custom-select:invalid~.schema-invalid-tooltip,.schema-was-validated .schema-custom-select:valid~.schema-invalid-feedback,.schema-was-validated .schema-custom-select:valid~.schema-invalid-tooltip,.schema-was-validated .schema-form-control:invalid~.schema-invalid-feedback,.schema-was-validated .schema-form-control:invalid~.schema-invalid-tooltip,.schema-was-validated .schema-form-control:valid~.schema-invalid-feedback,.schema-was-validated .schema-form-control:valid~.schema-invalid-tooltip{display:block}.schema-custom-control-input.is-valid~.schema-custom-control-description,.schema-form-check-input.is-valid+.schema-form-check-label,.schema-was-validated .schema-custom-control-input:valid~.schema-custom-control-description,.schema-was-validated .schema-form-check-input:valid+.schema-form-check-label{color:#28a745}.schema-custom-control-input.is-valid~.schema-custom-control-indicator,.schema-was-validated .schema-custom-control-input:valid~.schema-custom-control-indicator{background-color:rgba(40,167,69,.25)}.schema-custom-control-input.is-invalid~.schema-custom-control-description,.schema-form-check-input.is-invalid+.schema-form-check-label,.schema-was-validated .schema-custom-control-input:invalid~.schema-custom-control-description,.schema-was-validated .schema-form-check-input:invalid+.schema-form-check-label{color:#dc3545}.schema-custom-file-input.is-valid~.schema-custom-file-control::before,.schema-was-validated .schema-custom-file-input:valid~.schema-custom-file-control::before{border-color:inherit}.schema-custom-file-input.is-invalid~.schema-custom-file-control,.schema-custom-select.is-invalid,.schema-form-control.is-invalid,.schema-was-validated .schema-custom-file-input:invalid~.schema-custom-file-control,.schema-was-validated .schema-custom-select:invalid,.schema-was-validated .schema-form-control:invalid{border-color:#dc3545}.schema-custom-file-input.is-invalid:focus,.schema-custom-select.is-invalid:focus,.schema-form-control.is-invalid:focus,.schema-was-validated .schema-custom-file-input:invalid:focus,.schema-was-validated .schema-custom-select:invalid:focus,.schema-was-validated .schema-form-control:invalid:focus{box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.schema-custom-control-input.is-invalid~.schema-custom-control-indicator,.schema-was-validated .schema-custom-control-input:invalid~.schema-custom-control-indicator{background-color:rgba(220,53,69,.25)}.schema-custom-file-input.is-invalid~.schema-custom-file-control::before,.schema-was-validated .schema-custom-file-input:invalid~.schema-custom-file-control::before{border-color:inherit}.schema-form-inline{display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex-align:center;align-items:center}.schema-form-inline .schema-form-check{width:100%}@media (min-width:576px){.schema-form-inline label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;margin-bottom:0}.schema-form-inline .schema-form-group{display:-ms-flexbox;display:flex;-ms-flex:0 0 auto;flex:0 0 auto;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex-align:center;align-items:center;margin-bottom:0}.schema-form-inline .schema-form-control{display:inline-block;width:auto;vertical-align:middle}.schema-form-inline .schema-form-control-plaintext{display:inline-block}.schema-form-inline .schema-input-group{width:auto}.schema-form-inline .schema-form-control-label{margin-bottom:0;vertical-align:middle}.schema-form-inline .schema-form-check{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:auto;margin-top:0;margin-bottom:0}.schema-form-inline .schema-form-check-label{padding-left:0}.schema-form-inline .schema-form-check-input{position:relative;margin-top:0;margin-right:.25rem;margin-left:0}.schema-form-inline .schema-custom-control{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding-left:0}.schema-form-inline .schema-custom-control-indicator{position:static;display:inline-block;margin-right:.25rem;vertical-align:text-bottom}.schema-form-inline .schema-has-feedback .schema-form-control-feedback{top:0}}.schema-btn{display:inline-block;font-weight:400;line-height:1.25;text-align:center;white-space:nowrap;vertical-align:middle;user-select:none;border:1px solid transparent;padding:.5rem 1rem;font-size:1rem;border-radius:.25rem;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.schema-btn:focus,.schema-btn:hover{text-decoration:none}.schema-btn.focus,.schema-btn:focus{outline:0;-webkit-box-shadow:0 0 0 2px rgba(2,117,216,.25);box-shadow:0 0 0 2px rgba(2,117,216,.25)}.schema-btn.disabled,.schema-btn:disabled{cursor:not-allowed;opacity:.65}.schema-btn.active,.schema-btn:active{background-image:none}a.schema-btn.disabled,fieldset[disabled] a.schema-btn{pointer-events:none}.schema-btn-primary{color:#fff;background-color:#0275d8;border-color:#0275d8}.schema-btn-primary:hover{color:#fff;background-color:#025aa5;border-color:#01549b}.schema-btn-primary.focus,.schema-btn-primary:focus{-webkit-box-shadow:0 0 0 2px rgba(2,117,216,.5);box-shadow:0 0 0 2px rgba(2,117,216,.5)}.schema-btn-primary.disabled,.schema-btn-primary:disabled{background-color:#0275d8;border-color:#0275d8}.schema-btn-primary.active,.schema-btn-primary:active,.show>.schema-btn-primary.dropdown-toggle{color:#fff;background-color:#025aa5;background-image:none;border-color:#01549b}.schema-btn-secondary{color:#292b2c;background-color:#fff;border-color:#ccc}.schema-btn-secondary:hover{color:#292b2c;background-color:#e6e6e6;border-color:#adadad}.schema-btn-secondary.focus,.schema-btn-secondary:focus{-webkit-box-shadow:0 0 0 2px rgba(204,204,204,.5);box-shadow:0 0 0 2px rgba(204,204,204,.5)}.schema-btn-secondary.disabled,.schema-btn-secondary:disabled{background-color:#fff;border-color:#ccc}.schema-btn-secondary.active,.schema-btn-secondary:active,.show>.schema-btn-secondary.dropdown-toggle{color:#292b2c;background-color:#e6e6e6;background-image:none;border-color:#adadad}.schema-btn-info{color:#fff;background-color:#5bc0de;border-color:#5bc0de}.schema-btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#2aabd2}.schema-btn-info.focus,.schema-btn-info:focus{-webkit-box-shadow:0 0 0 2px rgba(91,192,222,.5);box-shadow:0 0 0 2px rgba(91,192,222,.5)}.schema-btn-info.disabled,.schema-btn-info:disabled{background-color:#5bc0de;border-color:#5bc0de}.schema-btn-info.active,.schema-btn-info:active,.show>.schema-btn-info.dropdown-toggle{color:#fff;background-color:#31b0d5;background-image:none;border-color:#2aabd2}.schema-btn-success{color:#fff;background-color:#5cb85c;border-color:#5cb85c}.schema-btn-success:hover{color:#fff;background-color:#449d44;border-color:#419641}.schema-btn-success.focus,.schema-btn-success:focus{-webkit-box-shadow:0 0 0 2px rgba(92,184,92,.5);box-shadow:0 0 0 2px rgba(92,184,92,.5)}.schema-btn-success.disabled,.schema-btn-success:disabled{background-color:#5cb85c;border-color:#5cb85c}.schema-btn-success.active,.schema-btn-success:active,.show>.schema-btn-success.dropdown-toggle{color:#fff;background-color:#449d44;background-image:none;border-color:#419641}.schema-btn-warning{color:#fff;background-color:#f0ad4e;border-color:#f0ad4e}.schema-btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#eb9316}.schema-btn-warning.focus,.schema-btn-warning:focus{-webkit-box-shadow:0 0 0 2px rgba(240,173,78,.5);box-shadow:0 0 0 2px rgba(240,173,78,.5)}.schema-btn-warning.disabled,.schema-btn-warning:disabled{background-color:#f0ad4e;border-color:#f0ad4e}.schema-btn-warning.active,.schema-btn-warning:active,.show>.schema-btn-warning.dropdown-toggle{color:#fff;background-color:#ec971f;background-image:none;border-color:#eb9316}.schema-btn-danger{color:#fff;background-color:#d9534f;border-color:#d9534f}.schema-btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#c12e2a}.schema-btn-danger.focus,.schema-btn-danger:focus{-webkit-box-shadow:0 0 0 2px rgba(217,83,79,.5);box-shadow:0 0 0 2px rgba(217,83,79,.5)}.schema-btn-danger.disabled,.schema-btn-danger:disabled{background-color:#d9534f;border-color:#d9534f}.schema-btn-danger.active,.schema-btn-danger:active,.show>.schema-btn-danger.dropdown-toggle{color:#fff;background-color:#c9302c;background-image:none;border-color:#c12e2a}.schema-btn-outline-primary{color:#0275d8;background-image:none;background-color:transparent;border-color:#0275d8}.schema-btn-outline-primary:hover{color:#fff;background-color:#0275d8;border-color:#0275d8}.schema-btn-outline-primary.focus,.schema-btn-outline-primary:focus{-webkit-box-shadow:0 0 0 2px rgba(2,117,216,.5);box-shadow:0 0 0 2px rgba(2,117,216,.5)}.schema-btn-outline-primary.disabled,.schema-btn-outline-primary:disabled{color:#0275d8;background-color:transparent}.schema-btn-outline-primary.active,.schema-btn-outline-primary:active,.show>.schema-btn-outline-primary.dropdown-toggle{color:#fff;background-color:#0275d8;border-color:#0275d8}.schema-btn-outline-secondary{color:#ccc;background-image:none;background-color:transparent;border-color:#ccc}.schema-btn-outline-secondary:hover{color:#fff;background-color:#ccc;border-color:#ccc}.schema-btn-outline-secondary.focus,.schema-btn-outline-secondary:focus{-webkit-box-shadow:0 0 0 2px rgba(204,204,204,.5);box-shadow:0 0 0 2px rgba(204,204,204,.5)}.schema-btn-outline-secondary.disabled,.schema-btn-outline-secondary:disabled{color:#ccc;background-color:transparent}.schema-btn-outline-secondary.active,.schema-btn-outline-secondary:active,.show>.schema-btn-outline-secondary.dropdown-toggle{color:#fff;background-color:#ccc;border-color:#ccc}.schema-btn-outline-info{color:#5bc0de;background-image:none;background-color:transparent;border-color:#5bc0de}.schema-btn-outline-info:hover{color:#fff;background-color:#5bc0de;border-color:#5bc0de}.schema-btn-outline-info.focus,.schema-btn-outline-info:focus{-webkit-box-shadow:0 0 0 2px rgba(91,192,222,.5);box-shadow:0 0 0 2px rgba(91,192,222,.5)}.schema-btn-outline-info.disabled,.schema-btn-outline-info:disabled{color:#5bc0de;background-color:transparent}.schema-btn-outline-info.active,.schema-btn-outline-info:active,.show>.schema-btn-outline-info.dropdown-toggle{color:#fff;background-color:#5bc0de;border-color:#5bc0de}.schema-btn-outline-success{color:#5cb85c;background-image:none;background-color:transparent;border-color:#5cb85c}.schema-btn-outline-success:hover{color:#fff;background-color:#5cb85c;border-color:#5cb85c}.schema-btn-outline-success.focus,.schema-btn-outline-success:focus{-webkit-box-shadow:0 0 0 2px rgba(92,184,92,.5);box-shadow:0 0 0 2px rgba(92,184,92,.5)}.schema-btn-outline-success.disabled,.schema-btn-outline-success:disabled{color:#5cb85c;background-color:transparent}.schema-btn-outline-success.active,.schema-btn-outline-success:active,.show>.schema-btn-outline-success.dropdown-toggle{color:#fff;background-color:#5cb85c;border-color:#5cb85c}.schema-btn-outline-warning{color:#f0ad4e;background-image:none;background-color:transparent;border-color:#f0ad4e}.schema-btn-outline-warning:hover{color:#fff;background-color:#f0ad4e;border-color:#f0ad4e}.schema-btn-outline-warning.focus,.schema-btn-outline-warning:focus{-webkit-box-shadow:0 0 0 2px rgba(240,173,78,.5);box-shadow:0 0 0 2px rgba(240,173,78,.5)}.schema-btn-outline-warning.disabled,.schema-btn-outline-warning:disabled{color:#f0ad4e;background-color:transparent}.schema-btn-outline-warning.active,.schema-btn-outline-warning:active,.show>.schema-btn-outline-warning.dropdown-toggle{color:#fff;background-color:#f0ad4e;border-color:#f0ad4e}.schema-btn-outline-danger{color:#d9534f;background-image:none;background-color:transparent;border-color:#d9534f}.schema-btn-outline-danger:hover{color:#fff;background-color:#d9534f;border-color:#d9534f}.schema-btn-outline-danger.focus,.schema-btn-outline-danger:focus{-webkit-box-shadow:0 0 0 2px rgba(217,83,79,.5);box-shadow:0 0 0 2px rgba(217,83,79,.5)}.schema-btn-outline-danger.disabled,.schema-btn-outline-danger:disabled{color:#d9534f;background-color:transparent}.schema-btn-outline-danger.active,.schema-btn-outline-danger:active,.show>.schema-btn-outline-danger.dropdown-toggle{color:#fff;background-color:#d9534f;border-color:#d9534f}.schema-btn-link{font-weight:400;color:#0275d8;border-radius:0}.schema-btn-link,.schema-btn-link.active,.schema-btn-link:active,.schema-btn-link:disabled{background-color:transparent}.schema-btn-link,.schema-btn-link:active,.schema-btn-link:focus,.schema-btn-link:hover{border-color:transparent}.schema-btn-link:focus,.schema-btn-link:hover{color:#014c8c;text-decoration:underline;background-color:transparent}.schema-btn-link:disabled{color:#636c72}.schema-btn-link:disabled:focus,.schema-btn-link:disabled:hover{text-decoration:none}.schema-btn-group-lg>.schema-btn,.schema-btn-lg{padding:.75rem 1.5rem;font-size:1.25rem;border-radius:.3rem}.schema-btn-group-sm>.schema-btn,.schema-btn-sm{padding:.25rem .5rem;font-size:.875rem;border-radius:.2rem}.schema-btn-block{display:block;width:100%}.schema-btn-block+.schema-btn-block{margin-top:.5rem}input[type=button].schema-btn-block,input[type=reset].schema-btn-block,input[type=submit].schema-btn-block{width:100%}.schema-fade{opacity:0;transition:opacity .15s linear}.schema-fade.schema-show{opacity:1}.schema-collapse{display:none}.schema-collapse.schema-show{display:block}tr.schema-collapse.schema-show{display:table-row}tbody.schema-collapse.schema-show{display:table-row-group}.schema-collapsing{position:relative;height:0;overflow:hidden;transition:height .35s ease}.schema-dropdown,.schema-dropup{position:relative}.schema-dropdown-toggle::after{display:inline-block;width:0;height:0;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-left:.3em solid transparent}.schema-dropdown-toggle:empty::after{margin-left:0}.schema-dropup .schema-dropdown-menu{margin-top:0;margin-bottom:.125rem}.schema-dropup .schema-dropdown-toggle::after{border-top:0;border-bottom:.3em solid}.schema-dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:10rem;padding:.5rem 0;margin:.125rem 0 0;font-size:1rem;color:#212529;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.15);border-radius:.25rem}.schema-dropdown-divider{height:0;margin:.5rem 0;overflow:hidden;border-top:1px solid #e9ecef}.schema-dropdown-item{display:block;width:100%;padding:.25rem 1.5rem;clear:both;font-weight:400;color:#212529;text-align:inherit;white-space:nowrap;background:0 0;border:0}.schema-btn-group-vertical>.schema-btn-group:not(:first-child):not(:last-child)>.schema-btn,.schema-btn-group-vertical>.schema-btn:not(:first-child):not(:last-child),.schema-btn-group>.schema-btn-group:not(:first-child):not(:last-child)>.schema-btn,.schema-btn-group>.schema-btn:not(:first-child):not(:last-child):not(.schema-dropdown-toggle),.schema-input-group .schema-form-control:not(:first-child):not(:last-child),.schema-input-group-addon:not(:first-child):not(:last-child),.schema-input-group-btn:not(:first-child):not(:last-child){border-radius:0}.schema-dropdown-item:focus,.schema-dropdown-item:hover{color:#16181b;text-decoration:none;background-color:#f8f9fa}.schema-dropdown-item.active,.schema-dropdown-item:active{color:#fff;text-decoration:none;background-color:#007bff}.schema-dropdown-item.disabled,.schema-dropdown-item:disabled{color:#868e96;background-color:transparent}.schema-show>a{outline:0}.schema-dropdown-menu.schema-show{display:block}.schema-dropdown-header{display:block;padding:.5rem 1.5rem;margin-bottom:0;font-size:.875rem;color:#868e96;white-space:nowrap}.schema-btn-group,.schema-btn-group-vertical{position:relative;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle}.schema-btn-group-vertical>.schema-btn,.schema-btn-group>.schema-btn{position:relative;-ms-flex:0 1 auto;flex:0 1 auto;margin-bottom:0}.schema-btn-group-vertical>.schema-btn.active,.schema-btn-group-vertical>.schema-btn:active,.schema-btn-group-vertical>.schema-btn:focus,.schema-btn-group-vertical>.schema-btn:hover,.schema-btn-group>.schema-btn.active,.schema-btn-group>.schema-btn:active,.schema-btn-group>.schema-btn:focus,.schema-btn-group>.schema-btn:hover{z-index:2}.schema-btn-group .schema-btn+.schema-btn,.schema-btn-group .schema-btn+.schema-btn-group,.schema-btn-group .schema-btn-group+.schema-btn,.schema-btn-group .schema-btn-group+.schema-btn-group,.schema-btn-group-vertical .schema-btn+.schema-btn,.schema-btn-group-vertical .schema-btn+.schema-btn-group,.schema-btn-group-vertical .schema-btn-group+.schema-btn,.schema-btn-group-vertical .schema-btn-group+.schema-btn-group{margin-left:-1px}.schema-btn+.schema-dropdown-toggle-split::after,.schema-btn-group>.schema-btn:first-child{margin-left:0}.schema-btn-toolbar{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:start;justify-content:flex-start}.schema-btn-toolbar .schema-input-group{width:auto}.schema-btn-group>.schema-btn:first-child:not(:last-child):not(.schema-dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.schema-btn-group>.schema-btn:last-child:not(:first-child),.schema-btn-group>.schema-dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.schema-btn-group>.schema-btn-group{float:left}.schema-btn-group>.schema-btn-group:first-child:not(:last-child)>.schema-btn:last-child,.schema-btn-group>.schema-btn-group:first-child:not(:last-child)>.schema-dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.schema-btn-group>.schema-btn-group:last-child:not(:first-child)>.schema-btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.schema-btn+.schema-dropdown-toggle-split{padding-right:.5625rem;padding-left:.5625rem}.schema-btn-group-sm>.schema-btn+.schema-dropdown-toggle-split,.schema-btn-sm+.schema-dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}.schema-btn-group-lg>.schema-btn+.schema-dropdown-toggle-split,.schema-btn-lg+.schema-dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.schema-btn-group-vertical{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:center;justify-content:center}.schema-btn-group-vertical .schema-btn,.schema-btn-group-vertical .schema-btn-group{width:100%}.schema-btn-group-vertical>.schema-btn+.schema-btn,.schema-btn-group-vertical>.schema-btn+.schema-btn-group,.schema-btn-group-vertical>.schema-btn-group+.schema-btn,.schema-btn-group-vertical>.schema-btn-group+.schema-btn-group{margin-top:-1px;margin-left:0}.schema-btn-group-vertical>.schema-btn:first-child:not(:last-child){border-bottom-right-radius:0;border-bottom-left-radius:0}.schema-btn-group-vertical>.schema-btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0}.schema-btn-group-vertical>.schema-btn-group:first-child:not(:last-child)>.schema-btn:last-child,.schema-btn-group-vertical>.schema-btn-group:first-child:not(:last-child)>.schema-dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.schema-btn-group-vertical>.schema-btn-group:last-child:not(:first-child)>.schema-btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.schema [data-toggle=buttons]>.schema-btn input[type=radio],.schema [data-toggle=buttons]>.schema-btn input[type=checkbox],.schema [data-toggle=buttons]>.schema-btn-group>.schema-btn input[type=radio],.schema [data-toggle=buttons]>.schema-btn-group>.schema-btn input[type=checkbox]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.schema-input-group{position:relative;display:-ms-flexbox;display:flex;width:100%}.schema-input-group .schema-form-control{position:relative;z-index:2;-ms-flex:1 1 auto;flex:1 1 auto;width:1%;margin-bottom:0}.schema-input-group .schema-form-control:active,.schema-input-group .schema-form-control:focus,.schema-input-group .schema-form-control:hover,.schema-input-group-btn>.schema-btn:active,.schema-input-group-btn>.schema-btn:focus,.schema-input-group-btn>.schema-btn:hover{z-index:3}.schema-input-group .schema-form-control,.schema-input-group-addon,.schema-input-group-btn{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.schema-input-group-addon,.schema-input-group-btn{white-space:nowrap;vertical-align:middle}.schema-input-group-addon{padding:.5rem .75rem;margin-bottom:0;font-size:1rem;font-weight:400;line-height:1.25;color:#495057;text-align:center;background-color:#e9ecef;border:1px solid rgba(0,0,0,.15);border-radius:.25rem;vertical-align:top;display:inline-block}.schema-input-group-addon.schema-form-control-sm,.schema-input-group-sm>.schema-input-group-addon,.schema-input-group-sm>.schema-input-group-btn>.schema-input-group-addon.schema-btn{padding:.25rem .5rem;font-size:.875rem;border-radius:.2rem}.schema-input-group-addon.schema-form-control-lg,.schema-input-group-lg>.schema-input-group-addon,.schema-input-group-lg>.schema-input-group-btn>.schema-input-group-addon.schema-btn{padding:.5rem 1rem;font-size:1.25rem;border-radius:.3rem}.schema-input-group-addon input[type=radio],.schema-input-group-addon input[type=checkbox]{margin-top:0}.schema-input-group .schema-form-control:not(:last-child),.schema-input-group-addon:not(:last-child),.schema-input-group-btn:not(:first-child)>.schema-btn-group:not(:last-child)>.schema-btn,.schema-input-group-btn:not(:first-child)>.schema-btn:not(:last-child):not(.schema-dropdown-toggle),.schema-input-group-btn:not(:last-child)>.schema-btn,.schema-input-group-btn:not(:last-child)>.schema-btn-group>.schema-btn,.schema-input-group-btn:not(:last-child)>.schema-dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.schema-input-group-addon:not(:last-child){border-right:0}.schema-input-group .schema-form-control:not(:first-child),.schema-input-group-addon:not(:first-child),.schema-input-group-btn:not(:first-child)>.schema-btn,.schema-input-group-btn:not(:first-child)>.schema-btn-group>.schema-btn,.schema-input-group-btn:not(:first-child)>.schema-dropdown-toggle,.schema-input-group-btn:not(:last-child)>.schema-btn-group:not(:first-child)>.schema-btn,.schema-input-group-btn:not(:last-child)>.schema-btn:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.schema-form-control+.schema-input-group-addon:not(:first-child){border-left:0}.schema-input-group-btn{position:relative;font-size:0;white-space:nowrap}.schema-input-group-btn>.schema-btn{position:relative}.schema-input-group-btn>.schema-btn+.schema-btn{margin-left:-1px}.schema-input-group-btn:not(:last-child)>.schema-btn,.schema-input-group-btn:not(:last-child)>.schema-btn-group{margin-right:-1px}.schema-input-group-btn:not(:first-child)>.schema-btn,.schema-input-group-btn:not(:first-child)>.schema-btn-group{z-index:2;margin-left:-1px}.schema-input-group-btn:not(:first-child)>.schema-btn-group:active,.schema-input-group-btn:not(:first-child)>.schema-btn-group:focus,.schema-input-group-btn:not(:first-child)>.schema-btn-group:hover,.schema-input-group-btn:not(:first-child)>.schema-btn:active,.schema-input-group-btn:not(:first-child)>.schema-btn:focus,.schema-input-group-btn:not(:first-child)>.schema-btn:hover{z-index:3}.schema-custom-control{position:relative;display:-ms-inline-flexbox;display:inline-flex;min-height:1.5rem;padding-left:1.5rem;margin-right:1rem}.schema-custom-control-input{position:absolute;z-index:-1;opacity:0}.schema-custom-control-input:checked~.schema-custom-control-indicator{color:#fff;background-color:#007bff}.schema-custom-control-input:focus~.schema-custom-control-indicator{box-shadow:0 0 0 1px #fff,0 0 0 3px #007bff}.schema-custom-control-input:active~.schema-custom-control-indicator{color:#fff;background-color:#b3d7ff}.schema-custom-control-input:disabled~.schema-custom-control-indicator{background-color:#e9ecef}.schema-custom-control-input:disabled~.schema-custom-control-description{color:#868e96}.schema-custom-control-indicator{position:absolute;top:.25rem;left:0;display:block;width:1rem;height:1rem;pointer-events:none;user-select:none;background-color:#ddd;background-repeat:no-repeat;background-position:center center;background-size:50% 50%}.schema-custom-checkbox .schema-custom-control-indicator{border-radius:.25rem}.schema-custom-checkbox .schema-custom-control-input:checked~.schema-custom-control-indicator{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E")}.schema-custom-checkbox .schema-custom-control-input:indeterminate~.schema-custom-control-indicator{background-color:#007bff;background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3E%3Cpath stroke='%23fff' d='M0 2h4'/%3E%3C/svg%3E")}.schema-custom-radio .schema-custom-control-indicator{border-radius:50%}.schema-custom-radio .schema-custom-control-input:checked~.schema-custom-control-indicator{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%23fff'/%3E%3C/svg%3E")}.schema-custom-controls-stacked{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.schema-custom-controls-stacked .schema-custom-control{margin-bottom:.25rem}.schema-custom-controls-stacked .schema-custom-control+.schema-custom-control{margin-left:0}.schema-custom-select{display:inline-block;max-width:100%;height:calc(2.25rem + 2px);padding:.375rem 1.75rem .375rem .75rem;line-height:1.25;color:#495057;vertical-align:middle;background:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23333' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E") right .75rem center no-repeat #fff;background-size:8px 10px;border:1px solid rgba(0,0,0,.15);border-radius:.25rem;-webkit-appearance:none;-moz-appearance:none;appearance:none}.schema-custom-select:focus{border-color:#80bdff;outline:0}.schema-custom-select:focus::-ms-value{color:#495057;background-color:#fff}.schema-custom-select:disabled{color:#868e96;background-color:#e9ecef}.schema-custom-select::-ms-expand{opacity:0}.schema-custom-select-sm{height:calc(1.8125rem + 2px);padding-top:.375rem;padding-bottom:.375rem;font-size:75%}.schema-custom-file{position:relative;display:inline-block;max-width:100%;height:2.5rem;margin-bottom:0}.schema-custom-file-control,.schema-custom-file-control::before{position:absolute;height:2.5rem;padding:.5rem 1rem;color:#495057;line-height:1.5}.schema-custom-file-input{min-width:14rem;max-width:100%;height:2.5rem;margin:0;opacity:0}.schema-custom-file-control{top:0;right:0;left:0;z-index:5;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#fff;border:1px solid rgba(0,0,0,.15);border-radius:.25rem}.schema-custom-file-control:lang(en):empty::after{content:"Choose file..."}.schema-custom-file-control::before{top:-1px;right:-1px;bottom:-1px;z-index:6;display:block;background-color:#e9ecef;border:1px solid rgba(0,0,0,.15);border-radius:0 .25rem .25rem 0}.schema-custom-file-control:lang(en)::before{content:"Browse"}.schema-modal-open{overflow:hidden}.schema-modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;outline:0}.schema-modal.fade .schema-modal-dialog{transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out;transition:transform .3s ease-out,-webkit-transform .3s ease-out;-webkit-transform:translate(0,-25%);transform:translate(0,-25%)}.schema-modal.show .schema-modal-dialog{-webkit-transform:translate(0,0);transform:translate(0,0)}.schema-modal-open .schema-modal{overflow-x:hidden;overflow-y:auto}.schema-modal-dialog{position:relative;width:auto;margin:10px}.schema-modal-content{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem;outline:0}.schema-badge,.schema-progress{text-align:center;border-radius:.25rem}.schema-modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.schema-modal-backdrop.fade{opacity:0}.schema-modal-backdrop.show{opacity:.5}.schema-modal-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:15px;border-bottom:1px solid #e9ecef}.schema-modal-title{margin-bottom:0;line-height:1.5}.schema-modal-body{position:relative;-ms-flex:1 1 auto;flex:1 1 auto;padding:15px}.schema-modal-footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end;padding:15px;border-top:1px solid #e9ecef}.schema-modal-footer>:not(:first-child){margin-left:.25rem}.schema-modal-footer>:not(:last-child){margin-right:.25rem}.schema-modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:576px){.schema-modal-dialog{max-width:500px;margin:30px auto}.schema-modal-sm{max-width:300px}}@media (min-width:992px){.schema-modal-lg{max-width:800px}}@-webkit-keyframes progress-bar-stripes{from{background-position:1rem 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:1rem 0}to{background-position:0 0}}.schema-progress{display:-ms-flexbox;display:flex;overflow:hidden;font-size:.75rem;line-height:1rem;background-color:#e9ecef}.schema-badge-primary,.schema-progress-bar{background-color:#007bff;color:#fff}.schema-progress-bar{height:1rem;line-height:1rem;transition:width .6s ease}.schema-progress-bar-striped{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:1rem 1rem}.schema-progress-bar-animated{-webkit-animation:progress-bar-stripes 1s linear infinite;animation:progress-bar-stripes 1s linear infinite}.schema-badge{display:inline-block;padding:.25em .4em;font-size:75%;font-weight:700;line-height:1;color:#fff;white-space:nowrap;vertical-align:baseline}.schema-badge:empty{display:none}.schema-btn .schema-badge{position:relative;top:-1px}.schema-badge-pill{padding-right:.6em;padding-left:.6em;border-radius:10rem}.schema-badge-primary[href]:focus,.schema-badge-primary[href]:hover{color:#fff;text-decoration:none;background-color:#0062cc}.schema-badge-secondary{color:#fff;background-color:#868e96}.schema-badge-secondary[href]:focus,.schema-badge-secondary[href]:hover{color:#fff;text-decoration:none;background-color:#6c757d}.schema-badge-success{color:#fff;background-color:#28a745}.schema-badge-success[href]:focus,.schema-badge-success[href]:hover{color:#fff;text-decoration:none;background-color:#1e7e34}.schema-badge-info{color:#fff;background-color:#17a2b8}.schema-badge-info[href]:focus,.schema-badge-info[href]:hover{color:#fff;text-decoration:none;background-color:#117a8b}.schema-badge-warning{color:#111;background-color:#ffc107}.schema-badge-warning[href]:focus,.schema-badge-warning[href]:hover{color:#111;text-decoration:none;background-color:#d39e00}.schema-badge-danger{color:#fff;background-color:#dc3545}.schema-badge-danger[href]:focus,.schema-badge-danger[href]:hover{color:#fff;text-decoration:none;background-color:#bd2130}.schema-badge-light{color:#111;background-color:#f8f9fa}.schema-badge-light[href]:focus,.schema-badge-light[href]:hover{color:#111;text-decoration:none;background-color:#dae0e5}.schema-badge-dark{color:#fff;background-color:#343a40}.schema-badge-dark[href]:focus,.schema-badge-dark[href]:hover{color:#fff;text-decoration:none;background-color:#1d2124}
 
assets/fonts/dashicons.eot CHANGED
File without changes
assets/fonts/dashicons.svg CHANGED
File without changes
assets/fonts/dashicons.ttf CHANGED
File without changes
assets/fonts/dashicons.woff CHANGED
File without changes
includes/admin/admin-bar-menu.php CHANGED
@@ -17,6 +17,8 @@ add_action( 'admin_bar_menu', 'schema_wp_admin_bar_menu_items', 99 );
17
  * @since 1.5.4
18
  */
19
  function schema_wp_admin_bar_menu_items( $admin_bar ) {
 
 
20
 
21
  /* This print_r will show you the current contents of the admin menu bar, use it if you want to examine the $admin_bar array
22
  * echo "<pre>";
@@ -30,8 +32,8 @@ function schema_wp_admin_bar_menu_items( $admin_bar ) {
30
  // Get current page url
31
  $url = 'http' . (isset($_SERVER['HTTPS']) ? 's' : '') . '://' . "{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}";
32
 
33
- // If user can't publish posts, then get out
34
- if ( ! current_user_can( 'publish_posts' ) ) return;
35
 
36
  $admin_bar->add_menu( array(
37
  'id' => 'schema-test-item',
17
  * @since 1.5.4
18
  */
19
  function schema_wp_admin_bar_menu_items( $admin_bar ) {
20
+
21
+ global $post;
22
 
23
  /* This print_r will show you the current contents of the admin menu bar, use it if you want to examine the $admin_bar array
24
  * echo "<pre>";
32
  // Get current page url
33
  $url = 'http' . (isset($_SERVER['HTTPS']) ? 's' : '') . '://' . "{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}";
34
 
35
+ // If user can't edit posts, then get out
36
+ if ( ! current_user_can( 'edit_post', $post->ID ) ) return;
37
 
38
  $admin_bar->add_menu( array(
39
  'id' => 'schema-test-item',
includes/admin/admin-functions.php CHANGED
@@ -13,32 +13,6 @@
13
  if ( ! defined( 'ABSPATH' ) ) exit;
14
 
15
 
16
- add_action( 'schema_wp_do_after_settings_updated', 'schema_wp_after_update_settings' );
17
- /**
18
- * Delete Schema KSON-LD cached data in post meta on plugin settings update
19
- *
20
- *
21
- * @since 1.6.1
22
- */
23
- function schema_wp_after_update_settings() {
24
-
25
- // Delete cached data in post meta
26
- schema_wp_json_delete_cache();
27
- }
28
-
29
- /**
30
- * Delete Schema KSON-LD cached data in post meta
31
- *
32
- *
33
- * @since 1.6.1
34
- */
35
- function schema_wp_json_delete_cache() {
36
-
37
- // Delete cached data in post meta
38
- delete_post_meta_by_key( '_schema_json' );
39
- delete_post_meta_by_key( '_schema_json_timestamp' );
40
- }
41
-
42
  /**
43
  * Sanitizes a string key for Schema Settings
44
  *
@@ -62,6 +36,7 @@ function schema_wp_sanitize_key( $key ) {
62
  return apply_filters( 'schema_wp_sanitize_key', $key, $raw_key );
63
  }
64
 
 
65
  /**
66
  * Convert an object to an associative array.
67
  *
@@ -83,6 +58,7 @@ function schema_wp_object_to_array( $data ) {
83
  return $data;
84
  }
85
 
 
86
  /**
87
  * Flatten an array
88
  *
@@ -100,6 +76,7 @@ function schema_wp_array_flatten($array) {
100
  return $return;
101
  }
102
 
 
103
  /**
104
  * Retrieve a post given its title.
105
  *
@@ -123,6 +100,7 @@ function schema_wp_get_post_by_title($page_title, $post_type = 'post' , $output
123
  return null;
124
  }
125
 
 
126
  /**
127
  * Recursive array search
128
  *
@@ -141,6 +119,79 @@ function schema_wp_recursive_array_search( $needle, $haystack ) {
141
  return false;
142
  }
143
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
144
  /**
145
  * Get corporate contacts types
146
  *
@@ -166,85 +217,3 @@ function schema_wp_get_corporate_contacts_types() {
166
  return apply_filters( 'schema_wp_corporate_contacts_types', $corporate_contacts_types );
167
  }
168
 
169
- /**
170
- * Get post types
171
- *
172
- * @since 1.6.9.1
173
- * @return array $post_types of all registered post types
174
- */
175
- function schema_wp_get_post_types() {
176
-
177
- $post_types = array();
178
- $builtin = array();
179
-
180
- $builtin['post'] = array(
181
- 'name' => 'post',
182
- 'label' => 'Post'
183
- );
184
-
185
- $builtin['page'] = array(
186
- 'name' => 'page',
187
- 'label' => 'Page'
188
- );
189
-
190
- // all CPTs.
191
- $cpts_obj = get_post_types( array(
192
- 'public' => true,
193
- '_builtin' => false
194
- ) ,
195
- 'objects'); // return post types 'objects'
196
-
197
- if ( ! empty($cpts_obj) ) {
198
- // prepare array
199
- foreach ( $cpts_obj as $cpt => $info ) {
200
- $cpts[$cpt] = array(
201
- 'name' => $cpt,
202
- 'label' => $info->label
203
- );
204
- }
205
-
206
- // merge Builtin types and 'important' CPTs to resulting array to use as argument.
207
- $post_types = array_merge( $builtin, $cpts );
208
- } else {
209
-
210
- $post_types = $builtin;
211
- }
212
-
213
- // debug
214
- //echo'<pre>';print_r($post_types);echo'</pre>';
215
-
216
- return apply_filters( 'schema_wp_post_types', $post_types );
217
- }
218
-
219
- /**
220
- * Get the current post type in the WordPress Admin
221
- *
222
- * @url https://gist.github.com/DomenicF/3ebcf7d53ce3182854716c4d8f1ab2e2
223
- * @since 1.6.9.6
224
- * @return array $post_types of all registered post types
225
- */
226
- function schema_wp_get_current_post_type() {
227
- global $post, $typenow, $current_screen;
228
- //we have a post so we can just get the post type from that
229
- if ( $post && $post->post_type ) {
230
- return $post->post_type;
231
- }
232
- //check the global $typenow - set in admin.php
233
- elseif ( $typenow ) {
234
- return $typenow;
235
- }
236
- //check the global $current_screen object - set in sceen.php
237
- elseif ( $current_screen && $current_screen->post_type ) {
238
- return $current_screen->post_type;
239
- }
240
- //check the post_type querystring
241
- elseif ( isset( $_REQUEST['post_type'] ) ) {
242
- return sanitize_key( $_REQUEST['post_type'] );
243
- }
244
- //lastly check if post ID is in query string
245
- elseif ( isset( $_REQUEST['post'] ) ) {
246
- return get_post_type( $_REQUEST['post'] );
247
- }
248
- //we do not know the post type!
249
- return null;
250
- }
13
  if ( ! defined( 'ABSPATH' ) ) exit;
14
 
15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  /**
17
  * Sanitizes a string key for Schema Settings
18
  *
36
  return apply_filters( 'schema_wp_sanitize_key', $key, $raw_key );
37
  }
38
 
39
+
40
  /**
41
  * Convert an object to an associative array.
42
  *
58
  return $data;
59
  }
60
 
61
+
62
  /**
63
  * Flatten an array
64
  *
76
  return $return;
77
  }
78
 
79
+
80
  /**
81
  * Retrieve a post given its title.
82
  *
100
  return null;
101
  }
102
 
103
+
104
  /**
105
  * Recursive array search
106
  *
119
  return false;
120
  }
121
 
122
+
123
+ /**
124
+ * Get Currencies
125
+ *
126
+ * @since 1.0
127
+ * @return array $currencies A list of the available currencies
128
+ */
129
+ function schema_wp_get_currencies() {
130
+
131
+ $currencies = array(
132
+ 'USD' => __( 'US Dollars', 'schema-wp' ),
133
+ 'EUR' => __( 'Euros', 'schema-wp' ),
134
+ 'AUD' => __( 'Australian Dollars', 'schema-wp' ),
135
+ 'BDT' => __( 'Bangladeshi Taka', 'schema-wp' ),
136
+ 'BRL' => __( 'Brazilian Real', 'schema-wp' ),
137
+ 'BGN' => __( 'Bulgarian Lev', 'schema-wp' ),
138
+ 'CAD' => __( 'Canadian Dollars', 'schema-wp' ),
139
+ 'CLP' => __( 'Chilean Peso', 'schema-wp' ),
140
+ 'CNY' => __( 'Chinese Yuan', 'schema-wp' ),
141
+ 'COP' => __( 'Colombian Peso', 'schema-wp' ),
142
+ 'HRK' => __( 'Croatia Kuna', 'schema-wp' ),
143
+ 'CZK' => __( 'Czech Koruna', 'schema-wp' ),
144
+ 'DKK' => __( 'Danish Krone', 'schema-wp' ),
145
+ 'DOP' => __( 'Dominican Peso', 'schema-wp' ),
146
+ 'EGP' => __( 'Egyptian Pound', 'schema-wp' ),
147
+ 'HKD' => __( 'Hong Kong Dollar', 'schema-wp' ),
148
+ 'HUF' => __( 'Hungarian Forint', 'schema-wp' ),
149
+ 'ISK' => __( 'Icelandic Krona', 'schema-wp' ),
150
+ 'IDR' => __( 'Indonesia Rupiah', 'schema-wp' ),
151
+ 'INR' => __( 'Indian Rupee', 'schema-wp' ),
152
+ 'ILS' => __( 'Israeli Shekel', 'schema-wp' ),
153
+ 'JPY' => __( 'Japanese Yen', 'schema-wp' ),
154
+ 'KIP' => __( 'Lao Kip', 'schema-wp' ),
155
+ 'MYR' => __( 'Malaysian Ringgits', 'schema-wp' ),
156
+ 'MXN' => __( 'Mexican Peso', 'schema-wp' ),
157
+ 'NPR' => __( 'Nepali Rupee', 'schema-wp' ),
158
+ 'NGN' => __( 'Nigerian Naira', 'schema-wp' ),
159
+ 'NOK' => __( 'Norwegian Krone', 'schema-wp' ),
160
+ 'NZD' => __( 'New Zealand Dollar', 'schema-wp' ),
161
+ 'PYG' => __( 'Paraguayan Guaraní', 'schema-wp' ),
162
+ 'PHP' => __( 'Philippine Pesos', 'schema-wp' ),
163
+ 'PLN' => __( 'Polish Zloty', 'schema-wp' ),
164
+ 'GBP' => __( 'Pounds Sterling', 'schema-wp' ),
165
+ 'RON' => __( 'Romanian Leu', 'schema-wp' ),
166
+ 'RUB' => __( 'Russian Ruble', 'schema-wp' ),
167
+ 'SGD' => __( 'Singapore Dollar', 'schema-wp' ),
168
+ 'ZAR' => __( 'South African Rand', 'schema-wp' ),
169
+ 'KRW' => __( 'South Korean Won', 'schema-wp' ),
170
+ 'SEK' => __( 'Swedish Krona', 'schema-wp' ),
171
+ 'CHF' => __( 'Swiss Franc', 'schema-wp' ),
172
+ 'TWD' => __( 'Taiwan New Dollars', 'schema-wp' ),
173
+ 'THB' => __( 'Thai Baht', 'schema-wp' ),
174
+ 'TRY' => __( 'Turkish Lira', 'schema-wp' ),
175
+ 'AED' => __( 'United Arab Emirates Dirham', 'schema-wp' ),
176
+ 'VND' => __( 'Vietnamese Dong', 'schema-wp' ),
177
+ );
178
+
179
+ return apply_filters( 'schema_wp_currencies', $currencies );
180
+ }
181
+
182
+
183
+ /**
184
+ * Get the store's set currency
185
+ *
186
+ * @since 1.0
187
+ * @return string The currency code
188
+ */
189
+ function schema_wp_get_currency() {
190
+ $currency = schema_wp()->settings->get( 'currency', 'USD' );
191
+ return apply_filters( 'schema_wp_currency', $currency );
192
+ }
193
+
194
+
195
  /**
196
  * Get corporate contacts types
197
  *
217
  return apply_filters( 'schema_wp_corporate_contacts_types', $corporate_contacts_types );
218
  }
219
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/admin/admin-pages.php CHANGED
@@ -1,6 +1,7 @@
1
  <?php
 
2
  /**
3
- * Determines whether the current admin page is an Schema admin page.
4
  *
5
  * Only works after the `wp_loaded` hook, & most effective
6
  * starting on `admin_menu` hook.
@@ -19,10 +20,8 @@ function schema_wp_is_admin_page() {
19
  }
20
 
21
  $page = isset( $_GET['page'] ) ? $_GET['page'] : '';
22
-
23
  $pages = array(
24
  'schema',
25
- 'schema-extensions',
26
  'schema-wp-getting-started',
27
  'schema-wp-what-is-new',
28
  'schema-wp-credits'
1
  <?php
2
+
3
  /**
4
+ * Determines whether the current admin page is an Schema admin page.
5
  *
6
  * Only works after the `wp_loaded` hook, & most effective
7
  * starting on `admin_menu` hook.
20
  }
21
 
22
  $page = isset( $_GET['page'] ) ? $_GET['page'] : '';
 
23
  $pages = array(
24
  'schema',
 
25
  'schema-wp-getting-started',
26
  'schema-wp-what-is-new',
27
  'schema-wp-credits'
includes/admin/class-menu.php CHANGED
@@ -1,27 +1,16 @@
1
  <?php
2
- /**
3
- * Class Menu - admin menues
4
- *
5
- * @package Schema
6
- * @subpackage Admin Functions/Formatting
7
- * @copyright Copyright (c) 2016, Hesham Zebida
8
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
9
- * @since 1.0
10
- */
11
 
12
  // Exit if accessed directly
13
  if ( ! defined( 'ABSPATH' ) ) exit;
14
 
15
  class Schema_WP_Admin_Menu {
16
 
 
17
  public function __construct() {
18
- add_action( 'admin_menu', array( $this, 'register_main_menus' ), 10 );
19
- add_action( 'admin_menu', array( $this, 'register_types_menus' ), 20 );
20
- add_action( 'admin_menu', array( $this, 'register_extensions_menus' ), 30 );
21
- add_action( 'admin_menu', array( $this, 'register_about_menus' ), 40 );
22
  }
23
 
24
- public function register_main_menus() {
25
 
26
  global $schema_wp_options_page;
27
 
@@ -42,14 +31,6 @@ class Schema_WP_Admin_Menu {
42
  'schema_wp_options_page'
43
  );
44
 
45
- // Contextual Help
46
- // @since 1.5.9.3
47
- if ( $schema_wp_options_page )
48
- add_action( 'load-' . $schema_wp_options_page, 'schema_wp_settings_contextual_help' );
49
- }
50
-
51
- public function register_types_menus() {
52
-
53
  add_submenu_page(
54
  'schema',
55
  __( 'Types', 'schema-wp' ),
@@ -57,29 +38,19 @@ class Schema_WP_Admin_Menu {
57
  'manage_schema_options',
58
  'edit.php?post_type=schema'
59
  );
60
- }
61
-
62
- public function register_extensions_menus() {
63
-
64
- add_submenu_page(
65
- 'schema',
66
- __( 'Extensions', 'schema-wp' ),
67
- __( 'Extensions', 'schema-wp' ),
68
- 'manage_schema_options',
69
- 'schema-extensions',
70
- 'schema_wp_admin_extensions_page'
71
- );
72
- }
73
-
74
- public function register_about_menus() {
75
 
76
  add_submenu_page(
77
  'schema',
78
  __( 'About', 'schema-wp' ),
79
  __( 'About', 'schema-wp' ),
80
  'manage_schema_options',
81
- 'admin.php?page=schema-wp-what-is-new'
82
  );
 
 
 
 
 
83
  }
84
 
85
  }
1
  <?php
 
 
 
 
 
 
 
 
 
2
 
3
  // Exit if accessed directly
4
  if ( ! defined( 'ABSPATH' ) ) exit;
5
 
6
  class Schema_WP_Admin_Menu {
7
 
8
+
9
  public function __construct() {
10
+ add_action( 'admin_menu', array( $this, 'register_menus' ) );
 
 
 
11
  }
12
 
13
+ public function register_menus() {
14
 
15
  global $schema_wp_options_page;
16
 
31
  'schema_wp_options_page'
32
  );
33
 
 
 
 
 
 
 
 
 
34
  add_submenu_page(
35
  'schema',
36
  __( 'Types', 'schema-wp' ),
38
  'manage_schema_options',
39
  'edit.php?post_type=schema'
40
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
 
42
  add_submenu_page(
43
  'schema',
44
  __( 'About', 'schema-wp' ),
45
  __( 'About', 'schema-wp' ),
46
  'manage_schema_options',
47
+ '?page=schema-wp-what-is-new'
48
  );
49
+
50
+ // Contextual Help
51
+ // @since 1.5.9.3
52
+ if ( $schema_wp_options_page )
53
+ add_action( 'load-' . $schema_wp_options_page, 'schema_wp_settings_contextual_help' );
54
  }
55
 
56
  }
includes/admin/class-notices.php CHANGED
@@ -15,9 +15,6 @@ class Schema_WP_Admin_Notices {
15
 
16
  if ( isset( $_GET['settings-updated'] ) && $_GET['settings-updated'] && isset( $_GET['page'] ) && $_GET['page'] == 'schema' ) {
17
  $message = __( 'Settings updated.', 'schema-wp' );
18
-
19
- // do action after settings updated
20
- do_action( 'schema_wp_do_after_settings_updated' );
21
  }
22
 
23
  if ( isset( $_GET['schema_wp_notice'] ) && $_GET['schema_wp_notice'] ) {
15
 
16
  if ( isset( $_GET['settings-updated'] ) && $_GET['settings-updated'] && isset( $_GET['page'] ) && $_GET['page'] == 'schema' ) {
17
  $message = __( 'Settings updated.', 'schema-wp' );
 
 
 
18
  }
19
 
20
  if ( isset( $_GET['schema_wp_notice'] ) && $_GET['schema_wp_notice'] ) {
includes/admin/class-welcome.php CHANGED
@@ -108,27 +108,24 @@ class Schema_WP_Welcome {
108
  text-align: center;
109
  background: url('<?php echo esc_url( $badge_url ); ?>') no-repeat;
110
  }
 
111
  .schema-wp-badge span {
112
  position: absolute;
113
  bottom: -30px;
114
  left: 0;
115
  width: 100%;
116
  }
 
117
  .about-wrap .schema-wp-badge {
118
  position: absolute;
119
  top: 0;
120
  right: 0;
121
  }
 
122
  .schema-wp-welcome-screenshots {
123
  float: right;
124
  margin-left: 60px !important;
125
  }
126
- .schema-wp-info-notice {
127
- border-left: 4px solid #5b9dd9;
128
- }
129
- .schema-wp-info-notice i {
130
- color: #5b9dd9;
131
- }
132
  @media (max-width: 800px) {
133
  .schema-wp-welcome-screenshots {
134
  float: none;
@@ -188,15 +185,9 @@ class Schema_WP_Welcome {
188
 
189
  <div class="changelog">
190
 
191
- <div class="update-nag schema-wp-info-notice">
192
- <h3><?php _e( 'Please update Schema Content settings!', 'schema-wp' );?></h3>
193
- <p><?php _e( 'The Content settings has been updated with new features including support for \'WPHeader\', \'WPFooter\', and \'BreadcrumbList\', please configure the', 'schema-wp' );?> <a href="<?php echo esc_url( admin_url( 'admin.php?page=schema&tab=content' ) ); ?>"><?php _e( 'plugin settings', 'schema-wp' ); ?></a></p>
194
-
195
- <p><i class="dashicons dashicons-warning"></i> <?php _e( 'If you are caching your site, make sure to clear cache for changes to take effect.', 'schema-wp' );?></p>
196
-
197
- </div>
198
 
199
  <div class="feature-section sub-section">
 
200
 
201
  <h2><?php _e( 'Support More Schema Types', 'schema-wp' );?></h2>
202
  <p><?php _e( 'Now, Schema plugin supports more schema.org types.', 'schema-wp' );?></p>
@@ -209,32 +200,17 @@ class Schema_WP_Welcome {
209
  <li><?php _e( 'Report', 'schema-wp' );?></li>
210
  <li><?php _e( 'ScholarlyArticle', 'schema-wp' );?></li>
211
  <li><?php _e( 'TechArticle', 'schema-wp' );?></li>
 
212
  </ul>
213
 
214
  <br>
215
 
216
  - <?php _e( 'Blog', 'schema-wp' );?> (<?php _e( 'for Blog posts list page', 'schema-wp' );?>)
217
 
218
- <br>
219
-
220
- - <?php _e( 'WPHeader', 'schema-wp' );?> (<?php _e( 'for Web Page Header', 'schema-wp' );?>)
221
-
222
- <br>
223
-
224
- - <?php _e( 'WPFooter', 'schema-wp' );?> (<?php _e( 'for Web Page Footer', 'schema-wp' );?>)
225
-
226
- <br>
227
-
228
- - <?php _e( 'BreadcrumbList', 'schema-wp' );?> (<?php _e( 'for Breadcrumbs', 'schema-wp' );?>)
229
-
230
  <br>
231
 
232
  - <?php _e( 'CollectionPage', 'schema-wp' );?> (<?php _e( 'for Categories', 'schema-wp' );?>)
233
 
234
- <br>
235
-
236
- - <?php _e( 'CollectionPage', 'schema-wp' );?> (<?php _e( 'for Tags', 'schema-wp' );?>)
237
-
238
  <br>
239
 
240
  - <?php _e( 'AboutPage', 'schema-wp' );?> (<?php _e( 'for the about page', 'schema-wp' );?>)
@@ -251,7 +227,7 @@ class Schema_WP_Welcome {
251
 
252
  - <?php _e( 'New Schema Type?', 'schema-wp' );?>
253
  <ul>
254
- <li><?php _e( 'Maybe coming soon!', 'schema-wp' );?></li>
255
  </ul>
256
 
257
  <div class="return-to-dashboard">
@@ -263,7 +239,7 @@ class Schema_WP_Welcome {
263
  <p><?php _e( 'Schema plays nicely and support themes mentioned below.', 'schema-wp' );?></p>
264
 
265
  <h3><?php _e( 'Play nicely with Yoast SEO', 'schema-wp' );?></h3>
266
- <p><?php _e( 'Now Schema plugin plays nicely with Yoast SEO plugin, you can have both plugins active with no conflicts.', 'schema-wp' );?></p>
267
 
268
  <h3><?php _e( 'Hello AMP!', 'schema-wp' );?></h3>
269
  <p><?php _e( 'If you are using the AMP plugin, Schema got you covered!', 'schema-wp' );?></p>
@@ -324,8 +300,8 @@ class Schema_WP_Welcome {
324
  <div class="wrap about-wrap">
325
  <h1><?php printf( __( 'Welcome to Schema v%s', 'schema-wp' ), esc_html( $display_version ) ); ?></h1>
326
  <div class="about-text"><?php echo __( 'Thank you for installing Schema. The best schema.org plugin for WordPress.', 'schema-wp' ); ?></div>
327
- <div class="schema-wp-badge"><span><?php printf( __( 'Version %s', 'schema-wp' ), esc_html( $display_version ) ); ?></span></div>
328
-
329
  <?php $this->tabs(); ?>
330
 
331
  <p class="about-description"><?php _e( 'Hang on! We are going to add more schema integration and cool features to Schema plugin.', 'schema-wp' ); ?></p>
@@ -351,6 +327,7 @@ class Schema_WP_Welcome {
351
 
352
  </div>
353
 
 
354
  <div class="changelog">
355
  <h3><?php _e( 'Need Help?', 'schema-wp' );?></h3>
356
 
108
  text-align: center;
109
  background: url('<?php echo esc_url( $badge_url ); ?>') no-repeat;
110
  }
111
+
112
  .schema-wp-badge span {
113
  position: absolute;
114
  bottom: -30px;
115
  left: 0;
116
  width: 100%;
117
  }
118
+
119
  .about-wrap .schema-wp-badge {
120
  position: absolute;
121
  top: 0;
122
  right: 0;
123
  }
124
+
125
  .schema-wp-welcome-screenshots {
126
  float: right;
127
  margin-left: 60px !important;
128
  }
 
 
 
 
 
 
129
  @media (max-width: 800px) {
130
  .schema-wp-welcome-screenshots {
131
  float: none;
185
 
186
  <div class="changelog">
187
 
 
 
 
 
 
 
 
188
 
189
  <div class="feature-section sub-section">
190
+
191
 
192
  <h2><?php _e( 'Support More Schema Types', 'schema-wp' );?></h2>
193
  <p><?php _e( 'Now, Schema plugin supports more schema.org types.', 'schema-wp' );?></p>
200
  <li><?php _e( 'Report', 'schema-wp' );?></li>
201
  <li><?php _e( 'ScholarlyArticle', 'schema-wp' );?></li>
202
  <li><?php _e( 'TechArticle', 'schema-wp' );?></li>
203
+
204
  </ul>
205
 
206
  <br>
207
 
208
  - <?php _e( 'Blog', 'schema-wp' );?> (<?php _e( 'for Blog posts list page', 'schema-wp' );?>)
209
 
 
 
 
 
 
 
 
 
 
 
 
 
210
  <br>
211
 
212
  - <?php _e( 'CollectionPage', 'schema-wp' );?> (<?php _e( 'for Categories', 'schema-wp' );?>)
213
 
 
 
 
 
214
  <br>
215
 
216
  - <?php _e( 'AboutPage', 'schema-wp' );?> (<?php _e( 'for the about page', 'schema-wp' );?>)
227
 
228
  - <?php _e( 'New Schema Type?', 'schema-wp' );?>
229
  <ul>
230
+ <li><?php _e( 'coming soon!', 'schema-wp' );?></li>
231
  </ul>
232
 
233
  <div class="return-to-dashboard">
239
  <p><?php _e( 'Schema plays nicely and support themes mentioned below.', 'schema-wp' );?></p>
240
 
241
  <h3><?php _e( 'Play nicely with Yoast SEO', 'schema-wp' );?></h3>
242
+ <p><?php _e( 'Now Schema plugin plays nicely with Yoast SEO plugin, you can have both plugins active with no conflicts. Also, no settings need to be changed.', 'schema-wp' );?></p>
243
 
244
  <h3><?php _e( 'Hello AMP!', 'schema-wp' );?></h3>
245
  <p><?php _e( 'If you are using the AMP plugin, Schema got you covered!', 'schema-wp' );?></p>
300
  <div class="wrap about-wrap">
301
  <h1><?php printf( __( 'Welcome to Schema v%s', 'schema-wp' ), esc_html( $display_version ) ); ?></h1>
302
  <div class="about-text"><?php echo __( 'Thank you for installing Schema. The best schema.org plugin for WordPress.', 'schema-wp' ); ?></div>
303
+ <div class="schema-wp-badge"><span><?php printf( __( 'Version %s', 'schema-wp' ), esc_html( $display_version ) ); ?></span></div>
304
+
305
  <?php $this->tabs(); ?>
306
 
307
  <p class="about-description"><?php _e( 'Hang on! We are going to add more schema integration and cool features to Schema plugin.', 'schema-wp' ); ?></p>
327
 
328
  </div>
329
 
330
+
331
  <div class="changelog">
332
  <h3><?php _e( 'Need Help?', 'schema-wp' );?></h3>
333
 
includes/admin/extensions.php DELETED
@@ -1,185 +0,0 @@
1
- <?php
2
- /**
3
- * Admin Extensions
4
- *
5
- * @package Schema
6
- * @subpackage Admin Functions/Extensions
7
- * @copyright Copyright (c) 2017, Hesham Zebida
8
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
9
- * @since 1.6.9.8
10
- */
11
-
12
- // Exit if accessed directly
13
- if ( ! defined( 'ABSPATH' ) ) exit;
14
-
15
- /**
16
- * Extensions Page
17
- *
18
- * Renders the extensions page content.
19
- *
20
- * @since 1.6.9.8
21
- *
22
- * @return void
23
- */
24
- function schema_wp_admin_extensions_page() {
25
- /**
26
- * Filters the extensions tabs.
27
- *
28
- * @param array $tabs Extensions tabs.
29
- */
30
- $add_ons_tabs = (array) apply_filters( 'schema_wp_extensions_tabs', array(
31
- 'pro' => __('Pro'),
32
- 'official-free' => __('Official Free')
33
- ) );
34
-
35
- $active_tab = isset( $_GET['tab'] ) && array_key_exists( $_GET['tab'], $add_ons_tabs ) ? $_GET['tab'] : 'pro';
36
-
37
- ob_start();
38
- ?>
39
- <div class="wrap" id="schema-wp-extensions">
40
- <h1>
41
- <?php _e( 'Extensions for Schema', 'schema-wp' ); ?>
42
- <span>
43
- &nbsp;&nbsp;<a href="https://schema.press/downloads/?utm_source=plugin-extensions-page&utm_medium=plugin&utm_campaign=Schema%20Extensions%20Page&utm_content=All%20Extensions" class="button-primary" title="<?php _e( 'Browse all extensions', 'schema-wp' ); ?>" target="_blank"><?php _e( 'Browse all extensions', 'schema-wp' ); ?></a>
44
- </span>
45
- </h1>
46
- <p><?php _e( 'These extensions <em><strong>add functionality</strong></em> to your Schema-powered site.', 'affiliate-wp' ); ?></p>
47
- <h2 class="nav-tab-wrapper">
48
- <?php schema_wp_admin_navigation_tabs( $add_ons_tabs, $active_tab, array( 'settings-updated' => false ) ); ?>
49
- </h2>
50
- <div id="tab_container">
51
-
52
- <?php if ( 'pro' === $active_tab ) : ?>
53
- <p><?php printf( __( 'Pro Extensions are only available with a Professional or Ultimate license. If you already have one of these licenses, simply <a href="%s">log in to your account</a> to download any of these extensions.', 'schema-wp' ), 'https://schema.press/account/?utm_source=plugin-extensions-page&utm_medium=plugin&utm_campaign=Schema%20Extensions%20Page&utm_content=Account' ); ?></p>
54
- <p><?php printf( __( 'If you have a Personal or Plus license, you can easily upgrade from your account page to <a href="%s">get access to all of these extensions</a>!', 'schema-wp' ), 'https://schema.press/account/?utm_source=plugin-extensions-page&utm_medium=plugin&utm_campaign=Schema%20Extensions%20Page&utm_content=Account' ); ?></p>
55
- <?php else : ?>
56
- <p><?php _e( 'Our official free extensions are available to all license holders!', 'schema-wp' ); ?></p>
57
- <?php endif; ?>
58
-
59
- <?php echo schema_wp_extensions_get_rest( $active_tab ); ?>
60
- <div class="schema-wp-extensions-footer">
61
- <a href="https://schema.press/downloads/?utm_source=plugin-extensions-page&utm_medium=plugin&utm_campaign=Schema%20Extensions%20Page&utm_content=All%20Extensions" class="button-primary" title="<?php _e( 'Browse all extensions', 'schema-wp' ); ?>" target="_blank"><?php _e( 'Browse all extensions', 'schema-wp' ); ?></a>
62
- </div>
63
- </div>
64
- </div>
65
- <?php
66
- echo ob_get_clean();
67
- }
68
-
69
- /**
70
- * Extensions Get Product with REST
71
- *
72
- * Gets the extensions "products" with REST API, and filter results by category.
73
- *
74
- * @since 1.6.9.8
75
- *
76
- * @return void
77
- */
78
- function schema_wp_extensions_get_rest( $tab = 'pro' ) {
79
-
80
- $cache = get_transient( 'schema_wp_extensions_feed_' . $tab );
81
-
82
- // debug
83
- //$cache = false;
84
-
85
- if ( false === $cache ) {
86
-
87
- $url = 'https://schema.press/downloads/';
88
- $api_request = 'https://schema.press/edd-api/v2/products/';
89
- $api_response = wp_remote_get( $api_request );
90
-
91
- if ( ! is_wp_error( $api_response ) ) {
92
-
93
- $extensions = json_decode( wp_remote_retrieve_body( $api_response ), true );
94
-
95
- if ( $extensions && ! empty($extensions['products'] ) ) {
96
-
97
- foreach ( $extensions['products'] as $key => $extension ) {
98
-
99
- // get extension info
100
- $info = $extension['info'];
101
-
102
- // exclude Schema core plugin
103
- if ($info['slug'] === 'schema' ) continue;
104
-
105
- // exclude if not in this category
106
- $category = isset($info['category'][0]['slug']) ? $info['category'][0]['slug'] : '';
107
- if ( $category != $tab ) continue;
108
-
109
- // prepare info
110
- $ext_url = $url.$info['slug'].'/';
111
- $excerpt = wp_trim_words( $info['excerpt'], 18, '...' );
112
-
113
- // prepare our output
114
- $cache .= '<div class="schema-wp-extension">';
115
- $cache .= '<h3 class="schema-wp-extension-title">'.$info['title'].'</h3>';
116
- $cache .= '<a href="'.$ext_url.'?utm_source=plugin-extensions-page&amp;utm_medium=plugin&amp;utm_campaign=SchemaExtentionsPage&amp;utm_content='.$info['title'].'" title="Recurring Payments"><img width="880" height="440" src="'.$info['thumbnail'].'" class="attachment-showcase size-showcase wp-post-image" alt="" title="Recurring Payments"></a>';
117
- $cache .= '<p>'.$excerpt.'</p>';
118
- $cache .= '<a href="'.$ext_url.'?utm_source=plugin-extensions-page&amp;utm_medium=plugin&amp;utm_campaign=SchemaExtentionsPage&amp;utm_content='.$info['title'].'" title="Recurring Payments" class="button-secondary">'.__('Get this Extension', 'schema-wp').'</a>';
119
- $cache .= '</div>';
120
- } //end foreach
121
-
122
- if ( $cache ) {
123
- set_transient( 'schema_wp_extensions_feed_' . $tab, $cache, HOUR_IN_SECONDS );
124
- }
125
- } //end if ( $extensions )
126
-
127
- } else { //end if ( ! is_wp_error( $api_response ) )
128
-
129
- $cache = '<div class="error"><p>' . __( 'There was an error retrieving the extensions list from the server. Please try again later.', 'schema-wp' ) . '</div>';
130
- }
131
- } //end if ( false === $cache )
132
-
133
- return $cache;
134
- }
135
-
136
- /**
137
- * Outputs navigation tabs markup in core screens.
138
- *
139
- * @since 1.6.9.8
140
- *
141
- * @param array $tabs Navigation tabs.
142
- * @param string $active_tab Active tab slug.
143
- * @param array $query_args Optional. Query arguments used to build the tab URLs. Default empty array.
144
- */
145
- function schema_wp_admin_navigation_tabs( $tabs, $active_tab, $query_args = array() ) {
146
- $tabs = (array) $tabs;
147
-
148
- if ( empty( $tabs ) ) {
149
- return;
150
- }
151
-
152
- /**
153
- * Filters the navigation tabs immediately prior to output.
154
- *
155
- * @since 1.6.9.8
156
- *
157
- * @param array $tabs Tabs array.
158
- * @param string $active_tab Active tab slug.
159
- * @param array $query_args Query arguments used to build the tab URLs.
160
- */
161
- $tabs = apply_filters( 'schema_wp_admin_navigation_tabs', $tabs, $active_tab, $query_args );
162
-
163
- foreach ( $tabs as $tab_id => $tab_name ) {
164
- $query_args = array_merge( $query_args, array( 'tab' => $tab_id ) );
165
- $tab_url = add_query_arg( $query_args );
166
-
167
- printf( '<a href="%1$s" alt="%2$s" class="%3$s">%4$s</a>',
168
- esc_url( $tab_url ),
169
- esc_attr( $tab_name ),
170
- $active_tab == $tab_id ? 'nav-tab nav-tab-active' : 'nav-tab',
171
- esc_html( $tab_name )
172
- );
173
- }
174
-
175
- /**
176
- * Fires immediately after the navigation tabs output.
177
- *
178
- * @since 1.6.9.8
179
- *
180
- * @param array $tabs Tabs array.
181
- * @param string $active_tab Active tab slug.
182
- * @param array $query_args Query arguments used to build the tab URLs.
183
- */
184
- do_action( 'schema_wp_admin_after_navigation_tabs', $tabs, $active_tab, $query_args );
185
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/admin/meta-tax.php CHANGED
@@ -21,13 +21,13 @@ if (is_admin()){
21
  * configure your meta box
22
  */
23
  $config = array(
24
- 'id' => 'schema_wp_meta_box', // meta box id, unique per meta box
25
- 'title' => __('Schema', 'schema-wp'), // meta box title
26
- 'pages' => array('category', 'post_tag'), // taxonomy name, accept categories, post_tag and custom taxonomies
27
- 'context' => 'normal', // where the meta box appear: normal (default), advanced, side; optional
28
- 'fields' => array(), // list of meta fields (can be added by field arrays)
29
- 'local_images' => false, // Use local or hosted images (meta box images for add/remove)
30
- 'use_with_theme' => false // change path if used with theme set to true, false for a plugin or anything else for a custom path(default false).
31
  );
32
 
33
 
21
  * configure your meta box
22
  */
23
  $config = array(
24
+ 'id' => 'schema_wp_meta_box', // meta box id, unique per meta box
25
+ 'title' => __('Schema', 'schema-wp'), // meta box title
26
+ 'pages' => array('category'), // taxonomy name, accept categories, post_tag and custom taxonomies
27
+ 'context' => 'normal', // where the meta box appear: normal (default), advanced, side; optional
28
+ 'fields' => array(), // list of meta fields (can be added by field arrays)
29
+ 'local_images' => false, // Use local or hosted images (meta box images for add/remove)
30
+ 'use_with_theme' => false // change path if used with theme set to true, false for a plugin or anything else for a custom path(default false).
31
  );
32
 
33
 
includes/admin/meta-tax/.gitignore ADDED
@@ -0,0 +1 @@
 
1
+ .DS_Store
includes/admin/meta-tax/README.md CHANGED
File without changes
includes/admin/meta-tax/class-meta-tax.php CHANGED
@@ -1707,7 +1707,7 @@ class Schema_Custom_Add_Meta_Tax {
1707
  public function delete_taxonomy_metadata($term,$term_id) {
1708
  delete_option( 'tax_meta_'.$term_id );
1709
  if ( function_exists( 'delete_term_meta') ){
1710
- delete_term_meta( $term, $term_id );
1711
  }
1712
  }
1713
 
1707
  public function delete_taxonomy_metadata($term,$term_id) {
1708
  delete_option( 'tax_meta_'.$term_id );
1709
  if ( function_exists( 'delete_term_meta') ){
1710
+ delete_term_meta( $term_id );
1711
  }
1712
  }
1713
 
includes/admin/meta-tax/class-usage-demo.php CHANGED
File without changes
includes/admin/meta-tax/css/tax-meta-class.css CHANGED
@@ -21,7 +21,7 @@
21
 
22
  /* =Form Fields
23
  ----------------------------------------------- */
24
- /*.form-field input, .form-field textarea {width: 95%;}*/
25
  .wp-editor-wrap{width: 500px;} textarea.at-wysiwyg{width: 498px !important;}
26
  .rw-checkbox, .at-select, .at-text , .at-textarea{width: auto!important;}
27
  .postbox .at-field input,
21
 
22
  /* =Form Fields
23
  ----------------------------------------------- */
24
+ .form-field input, .form-field textarea {width: auto !important;}
25
  .wp-editor-wrap{width: 500px;} textarea.at-wysiwyg{width: 498px !important;}
26
  .rw-checkbox, .at-select, .at-text , .at-textarea{width: auto!important;}
27
  .postbox .at-field input,
includes/admin/meta-tax/images/add.png CHANGED
File without changes
includes/admin/meta-tax/images/delete-16.png CHANGED
File without changes
includes/admin/meta-tax/images/edit.png CHANGED
File without changes
includes/admin/meta-tax/images/remove.png CHANGED
File without changes
includes/admin/meta-tax/js/tax-meta-clss.js CHANGED
File without changes
includes/admin/meta-tax/lang/default.mo CHANGED
File without changes
includes/admin/meta-tax/lang/default.po CHANGED
File without changes
includes/admin/meta-tax/lang/fr_FR.mo CHANGED
File without changes
includes/admin/meta-tax/lang/fr_FR.po CHANGED
File without changes
includes/admin/meta-tax/license.txt CHANGED
File without changes
includes/admin/meta-tax/migration/tax_to_term_meta.php CHANGED
@@ -1,142 +1,142 @@
1
- <?php
2
- /**
3
- * tax_to_term_meta
4
- *
5
- * used to migrate data from options table to
6
- * WordPress 4.4 term meta table
7
- *
8
- * to use this migration class you must include it directly before
9
- * including the tax meta class file mainly if you want to use the old
10
- * 'get_tax_meta', 'delete_tax_meta', 'update_tax_meta',
11
- * 'get_tax_meta_strip' and 'get_tax_meta_all' this file also contains the
12
- * new definition of these functions to use the term meta api so you don't
13
- * have to go look around your code and replace every thing.
14
- *
15
- * @usage:
16
- *
17
- * require_once("Tax-meta-class/migration/tax_to_term_meta.php");
18
- * new tax_to_term_meta();
19
- *
20
- * @copyright 2012-2015 Ohad Raz
21
- * @author Ohad Raz (email: admin@bainternet.info)
22
- * @link https://en.bainternet.info
23
- *
24
- * @license GNU General Public LIcense v3.0 - license.txt
25
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
28
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
31
- * THE SOFTWARE.
32
- *
33
- * @package Tax Meta Class
34
- */
35
- class tax_to_term_meta{
36
- /**
37
- * delete data from options table
38
- * after migraion?
39
- * @var bool
40
- */
41
- public $delete_options = false;
42
- function __construct( $delete_options = false){
43
- $this->delete_options = $delete_options;
44
- $this->hooks();
45
- }
46
-
47
- function hooks(){
48
- add_action('init',array($this, 'migrate_data_maybe') );
49
- if ( $this->delete_options ){
50
- add_action('shutdown',array( $this, 'delete_options') );
51
- }
52
- }
53
-
54
- function migrate_data_maybe(){
55
- //needs migration?
56
- $do_migration = get_option('tax_meta_migrated', 'do_migration');
57
- if ( 'do_migration' == $do_migration ){
58
- $this->do_migration();
59
- update_option( 'tax_meta_migrated', 'done' );
60
- }
61
- }
62
-
63
- function do_migration(){
64
- $options = $this->get_options();
65
- foreach ($options as $option) {
66
- $term_id = $this->term_id_from_option( $option );
67
- $meta = get_option( $option );
68
- $this->tax_to_term( $term_id, $meta );
69
- if( $this->delete_options ){
70
- delete_option( $option );
71
- }
72
- }
73
- }
74
-
75
- function tax_to_term( $term_id, $meta ){
76
- foreach ((array)$meta as $meta_name => $meta_value) {
77
- update_term_meta( $term_id, $meta_name, $meta_value );
78
- }
79
- }
80
-
81
- function term_id_from_option( $option ){
82
- return str_replace('tax_meta_', '', $option );
83
- }
84
-
85
- function get_options(){
86
- global $wpdb;
87
- $query = "SELECT option_name
88
- FROM $wpdb->options
89
- WHERE option_name LIKE 'tax_meta_%'
90
- ";
91
- $options = $wpdb->get_col( $query );
92
- return $options;
93
- }
94
-
95
- function delete_options(){
96
- $options = $this->get_options();
97
- foreach ($options as $option) {
98
- delete_option( $option );
99
- }
100
- }
101
- }
102
-
103
- /*
104
- * meta functions for easy access using term meta api
105
- */
106
- //get term meta field
107
- if (!function_exists('get_tax_meta')){
108
- function get_tax_meta($term_id,$key,$multi = false){
109
- $term_id = (is_object($term_id))? $term_id->term_id: $term_id;
110
- return get_term_meta( $term_id, $key, $multi );
111
- }
112
- }
113
-
114
- //delete meta
115
- if (!function_exists('delete_tax_meta')){
116
- function delete_tax_meta($term_id,$key){
117
- $term_id = (is_object($term_id))? $term_id->term_id: $term_id;
118
- return delete_term_meta( $term_id, $key );
119
- }
120
- }
121
-
122
- //update meta
123
- if (!function_exists('update_tax_meta')){
124
- function update_tax_meta($term_id,$key,$value){
125
- $term_id = (is_object($term_id))? $term_id->term_id: $term_id;
126
- return update_term_meta( $term_id, $key, $value );
127
- }
128
- }
129
-
130
- //get term meta field and strip slashes
131
- if (!function_exists('get_tax_meta_strip')){
132
- function get_tax_meta_strip($term_id,$key,$multi = false){
133
- return stripslashes( get_term_meta( $term_id, $key, $multi ) );
134
- }
135
- }
136
- //get all meta fields of a term
137
- if (!function_exists('get_tax_meta_all')){
138
- function get_tax_meta_all( $term_id){
139
- $term_id = (is_object($term_id))? $term_id->term_id: $term_id;
140
- return get_term_meta( $term_id );
141
- }
142
  }
1
+ <?php
2
+ /**
3
+ * tax_to_term_meta
4
+ *
5
+ * used to migrate data from options table to
6
+ * WordPress 4.4 term meta table
7
+ *
8
+ * to use this migration class you must include it directly before
9
+ * including the tax meta class file mainly if you want to use the old
10
+ * 'get_tax_meta', 'delete_tax_meta', 'update_tax_meta',
11
+ * 'get_tax_meta_strip' and 'get_tax_meta_all' this file also contains the
12
+ * new definition of these functions to use the term meta api so you don't
13
+ * have to go look around your code and replace every thing.
14
+ *
15
+ * @usage:
16
+ *
17
+ * require_once("Tax-meta-class/migration/tax_to_term_meta.php");
18
+ * new tax_to_term_meta();
19
+ *
20
+ * @copyright 2012-2015 Ohad Raz
21
+ * @author Ohad Raz (email: admin@bainternet.info)
22
+ * @link https://en.bainternet.info
23
+ *
24
+ * @license GNU General Public LIcense v3.0 - license.txt
25
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
28
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
31
+ * THE SOFTWARE.
32
+ *
33
+ * @package Tax Meta Class
34
+ */
35
+ class tax_to_term_meta{
36
+ /**
37
+ * delete data from options table
38
+ * after migraion?
39
+ * @var bool
40
+ */
41
+ public $delete_options = false;
42
+ function __construct( $delete_options = false){
43
+ $this->delete_options = $delete_options;
44
+ $this->hooks();
45
+ }
46
+
47
+ function hooks(){
48
+ add_action('init',array($this, 'migrate_data_maybe') );
49
+ if ( $this->delete_options ){
50
+ add_action('shutdown',array( $this, 'delete_options') );
51
+ }
52
+ }
53
+
54
+ function migrate_data_maybe(){
55
+ //needs migration?
56
+ $do_migration = get_option('tax_meta_migrated', 'do_migration');
57
+ if ( 'do_migration' == $do_migration ){
58
+ $this->do_migration();
59
+ update_option( 'tax_meta_migrated', 'done' );
60
+ }
61
+ }
62
+
63
+ function do_migration(){
64
+ $options = $this->get_options();
65
+ foreach ($options as $option) {
66
+ $term_id = $this->term_id_from_option( $option );
67
+ $meta = get_option( $option );
68
+ $this->tax_to_term( $term_id, $meta );
69
+ if( $this->delete_options ){
70
+ delete_option( $option );
71
+ }
72
+ }
73
+ }
74
+
75
+ function tax_to_term( $term_id, $meta ){
76
+ foreach ((array)$meta as $meta_name => $meta_value) {
77
+ update_term_meta( $term_id, $meta_name, $meta_value );
78
+ }
79
+ }
80
+
81
+ function term_id_from_option( $option ){
82
+ return str_replace('tax_meta_', '', $option );
83
+ }
84
+
85
+ function get_options(){
86
+ global $wpdb;
87
+ $query = "SELECT option_name
88
+ FROM $wpdb->options
89
+ WHERE option_name LIKE 'tax_meta_%'
90
+ ";
91
+ $options = $wpdb->get_col( $query );
92
+ return $options;
93
+ }
94
+
95
+ function delete_options(){
96
+ $options = $this->get_options();
97
+ foreach ($options as $option) {
98
+ delete_option( $option );
99
+ }
100
+ }
101
+ }
102
+
103
+ /*
104
+ * meta functions for easy access using term meta api
105
+ */
106
+ //get term meta field
107
+ if (!function_exists('get_tax_meta')){
108
+ function get_tax_meta($term_id,$key,$multi = false){
109
+ $term_id = (is_object($term_id))? $term_id->term_id: $term_id;
110
+ return get_term_meta( $term_id, $key, $multi );
111
+ }
112
+ }
113
+
114
+ //delete meta
115
+ if (!function_exists('delete_tax_meta')){
116
+ function delete_tax_meta($term_id,$key){
117
+ $term_id = (is_object($term_id))? $term_id->term_id: $term_id;
118
+ return delete_term_meta( $term_id, $key );
119
+ }
120
+ }
121
+
122
+ //update meta
123
+ if (!function_exists('update_tax_meta')){
124
+ function update_tax_meta($term_id,$key,$value){
125
+ $term_id = (is_object($term_id))? $term_id->term_id: $term_id;
126
+ return update_term_meta( $term_id, $key, $value );
127
+ }
128
+ }
129
+
130
+ //get term meta field and strip slashes
131
+ if (!function_exists('get_tax_meta_strip')){
132
+ function get_tax_meta_strip($term_id,$key,$multi = false){
133
+ return stripslashes( get_term_meta( $term_id, $key, $multi ) );
134
+ }
135
+ }
136
+ //get all meta fields of a term
137
+ if (!function_exists('get_tax_meta_all')){
138
+ function get_tax_meta_all( $term_id){
139
+ $term_id = (is_object($term_id))? $term_id->term_id: $term_id;
140
+ return get_term_meta( $term_id );
141
+ }
142
  }
includes/admin/meta.php CHANGED
@@ -25,55 +25,33 @@ $prefix = '_schema_';
25
  *
26
  * @since 1.4
27
  */
28
- $fields_main = array( apply_filters( 'schema_wp_types_post_meta_fields',
29
-
30
- array( // Select box
31
- 'label' => __('Schema Markup Type', 'schema-wp'), // <label>
32
- 'desc' => __('Select Schema type which describes your content best', 'schema-wp'), // description
33
- 'id' => $prefix.'type', // field id and name
34
- 'type' => 'select', // type of field
35
- 'options' => apply_filters( 'schema_wp_types', array ( // array of options
36
- 'Article' => array ( // array key needs to be the same as the option value
37
- 'label' => __('Article', 'schema-wp'), // text displayed as the option
38
- 'value' => __('Article', 'schema-wp'), // value stored for the option
39
- )
40
- )),
41
- ), // end of array
42
-
43
- array(
44
- 'label' => __('Post meta', 'schema-wp'),
45
- 'tip' => __('Enable custom post meta box', 'schema-wp'),
46
- 'desc' => __('Enable post meta box?', 'schema-wp'),
47
- 'id' => $prefix.'post_meta_box_enabled',
48
- 'type' => 'checkbox'
49
- )
50
- )
51
- );
52
 
53
- $fields_main = apply_filters( 'schema_wp_types_post_meta_fields', array(
54
 
55
- 'schema_types' => array( // Select box
56
- 'label' => __('Schema Markup Type', 'schema-wp'), // <label>
57
- 'desc' => __('Select Schema type which describes your content best', 'schema-wp'), // description
58
  'id' => $prefix.'type', // field id and name
59
  'type' => 'select', // type of field
60
  'options' => apply_filters( 'schema_wp_types', array ( // array of options
61
- 'Article' => array ( // array key needs to be the same as the option value
62
- 'label' => __('Article', 'schema-wp'), // text displayed as the option
63
- 'value' => __('Article', 'schema-wp'), // value stored for the option
64
- )
65
  )
66
- )
67
  ), // end of array
68
 
69
- 'post_meta_box_enabled' => array(
70
  'label' => __('Post meta', 'schema-wp'),
71
- 'tip' => __('Enable custom post meta box', 'schema-wp'),
72
  'desc' => __('Enable post meta box?', 'schema-wp'),
73
  'id' => $prefix.'post_meta_box_enabled',
74
  'type' => 'checkbox'
75
- )
76
- ));
 
 
77
 
78
  /**
79
  * Schema Article post meta
@@ -84,7 +62,7 @@ $fields_article = array(
84
 
85
  array( // Select box
86
  'label' => __('Article Type', 'schema-wp'), // <label>
87
- 'desc' => __('Select more specific article type', 'schema-wp'), // description
88
  'tip' => __('It is recommended to set type BlogPosting for posts, and leave empty or set to General for page post type', 'schema-wp'),
89
  'id' => $prefix.'article_type', // field id and name
90
  'type' => 'select', // type of field
@@ -117,6 +95,7 @@ $fields_article = array(
117
  ),
118
  );
119
 
 
120
  /**
121
  * Post Types
122
  *
@@ -132,6 +111,8 @@ $fields_post_types = array(
132
  ),
133
  );
134
 
 
 
135
  /**
136
  * Post Meta Keys to Filters - post meta
137
  *
@@ -156,7 +137,7 @@ $fields_post_meta_box = array (
156
  'id' => $prefix.'post_meta_box', // field id and name
157
  'type' => 'repeatable_row', // type of field
158
  'sanitizer' => array( // array of sanitizers with matching kets to next array
159
- 'featured' => 'schema_wp_meta_box_santitize_boolean',
160
  'title' => 'sanitize_text_field',
161
  'desc' => 'wp_kses_data'
162
  ),
@@ -167,7 +148,6 @@ $fields_post_meta_box = array (
167
  'desc' => __('This is the filter name', 'schema-wp'), // description
168
  'id' => 'filter', // field id and name
169
  'type' => 'select', // type of field
170
- 'class' => 'schema_type_filter', // css class
171
  'selectone' => __('Select Filter', 'schema-wp'), // type of field
172
  'options' => apply_filters( 'schema_wp_post_meta', array ( // array of options
173
  'author_name' => array ( // array key needs to be the same as the option value
@@ -191,7 +171,7 @@ $fields_post_meta_box = array (
191
  'desc' => __('Add post meta key name as source', 'schema-wp'),
192
  'id' => 'key',
193
  'type' => 'text',
194
- 'size' => 'medium',
195
  'placeholder' => __('Meta Key Name', 'schema-wp'),
196
  ),
197
 
@@ -236,7 +216,7 @@ $fields_post_meta_box = array (
236
  'desc' => __('Field label', 'schema-wp'),
237
  'id' => 'label',
238
  'type' => 'text',
239
- 'size' => 'medium',
240
  'placeholder' => __('Label', 'schema-wp'),
241
  ),
242
 
@@ -268,7 +248,7 @@ $fields_post_meta_box = array (
268
  * var $priority string meta box priority (high, core, default, low)
269
  * var $js bool including javascript or not
270
  */
271
- $schema_box = new Schema_Custom_Add_Meta_Box( 'schema', __('Schema Settings', 'schema-wp'), $fields_main, 'schema', 'normal', 'high', true );
272
  $schema_article_box = new Schema_Custom_Add_Meta_Box( 'schema_article', __('Article', 'schema-wp'), $fields_article, 'schema', 'normal', 'high', true );
273
  $schema_cpt_box = new Schema_Custom_Add_Meta_Box( 'schema_cpt', __('Post Types', 'schema-wp'), $fields_post_types, 'schema', 'side', 'default', true );
274
  $schema_post_meta_box = new Schema_Custom_Add_Meta_Box( 'schema_post_meta_box', __('Post Meta', 'schema-wp'), $fields_post_meta_box, 'schema', 'normal', 'default', true );
@@ -279,8 +259,6 @@ $schema_post_meta_box = new Schema_Custom_Add_Meta_Box( 'schema_post_meta_box',
279
  *
280
  * Uses class Schema_Custom_Add_Meta_Box
281
  *
282
- * @todo this function is not used, make sure it's important before removing it!
283
- *
284
  * @since 1.5.7
285
  * @return true
286
  */
25
  *
26
  * @since 1.4
27
  */
28
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
 
30
+ $fields_main = array(
31
 
32
+ array( // Select box
33
+ 'label' => __('Type', 'schema-wp'), // <label>
34
+ 'desc' => __('Select Schema type.', 'schema-wp'), // description
35
  'id' => $prefix.'type', // field id and name
36
  'type' => 'select', // type of field
37
  'options' => apply_filters( 'schema_wp_types', array ( // array of options
38
+ 'Article' => array ( // array key needs to be the same as the option value
39
+ 'label' => __('Article', 'schema-wp'), // text displayed as the option
40
+ 'value' => __('Article', 'schema-wp'), // value stored for the option
 
41
  )
42
+ )),
43
  ), // end of array
44
 
45
+ 'post_meta_enabled' => array(
46
  'label' => __('Post meta', 'schema-wp'),
47
+ 'tip' => __('Enable custom post meta box.', 'schema-wp'),
48
  'desc' => __('Enable post meta box?', 'schema-wp'),
49
  'id' => $prefix.'post_meta_box_enabled',
50
  'type' => 'checkbox'
51
+ ),
52
+
53
+ );
54
+
55
 
56
  /**
57
  * Schema Article post meta
62
 
63
  array( // Select box
64
  'label' => __('Article Type', 'schema-wp'), // <label>
65
+ 'desc' => __('Select more specific article type.', 'schema-wp'), // description
66
  'tip' => __('It is recommended to set type BlogPosting for posts, and leave empty or set to General for page post type', 'schema-wp'),
67
  'id' => $prefix.'article_type', // field id and name
68
  'type' => 'select', // type of field
95
  ),
96
  );
97
 
98
+
99
  /**
100
  * Post Types
101
  *
111
  ),
112
  );
113
 
114
+
115
+
116
  /**
117
  * Post Meta Keys to Filters - post meta
118
  *
137
  'id' => $prefix.'post_meta_box', // field id and name
138
  'type' => 'repeatable_row', // type of field
139
  'sanitizer' => array( // array of sanitizers with matching kets to next array
140
+ 'featured' => 'meta_box_santitize_boolean',
141
  'title' => 'sanitize_text_field',
142
  'desc' => 'wp_kses_data'
143
  ),
148
  'desc' => __('This is the filter name', 'schema-wp'), // description
149
  'id' => 'filter', // field id and name
150
  'type' => 'select', // type of field
 
151
  'selectone' => __('Select Filter', 'schema-wp'), // type of field
152
  'options' => apply_filters( 'schema_wp_post_meta', array ( // array of options
153
  'author_name' => array ( // array key needs to be the same as the option value
171
  'desc' => __('Add post meta key name as source', 'schema-wp'),
172
  'id' => 'key',
173
  'type' => 'text',
174
+ 'size' => 'small',
175
  'placeholder' => __('Meta Key Name', 'schema-wp'),
176
  ),
177
 
216
  'desc' => __('Field label', 'schema-wp'),
217
  'id' => 'label',
218
  'type' => 'text',
219
+ 'size' => 'small',
220
  'placeholder' => __('Label', 'schema-wp'),
221
  ),
222
 
248
  * var $priority string meta box priority (high, core, default, low)
249
  * var $js bool including javascript or not
250
  */
251
+ $schema_box = new Schema_Custom_Add_Meta_Box( 'schema', __('Settings', 'schema-wp'), $fields_main, 'schema', 'normal', 'high', true );
252
  $schema_article_box = new Schema_Custom_Add_Meta_Box( 'schema_article', __('Article', 'schema-wp'), $fields_article, 'schema', 'normal', 'high', true );
253
  $schema_cpt_box = new Schema_Custom_Add_Meta_Box( 'schema_cpt', __('Post Types', 'schema-wp'), $fields_post_types, 'schema', 'side', 'default', true );
254
  $schema_post_meta_box = new Schema_Custom_Add_Meta_Box( 'schema_post_meta_box', __('Post Meta', 'schema-wp'), $fields_post_meta_box, 'schema', 'normal', 'default', true );
259
  *
260
  * Uses class Schema_Custom_Add_Meta_Box
261
  *
 
 
262
  * @since 1.5.7
263
  * @return true
264
  */
includes/admin/meta/class-meta.php CHANGED
@@ -22,7 +22,7 @@ define( 'SCHEMA_CUSTOM_METABOXES_DIR', plugin_dir_url( __FILE__ ) );
22
  *
23
  * @return string html for the field
24
  */
25
- function schema_wp_custom_meta_box_field( $field, $meta = null, $repeatable = null ) {
26
  if ( ! ( $field || is_array( $field ) ) )
27
  return;
28
 
@@ -34,19 +34,12 @@ function schema_wp_custom_meta_box_field( $field, $meta = null, $repeatable = nu
34
  $placeholder = isset( $field['placeholder'] ) ? $field['placeholder'] : null;
35
  $place = isset( $field['place'] ) ? $field['place'] : null;
36
  $size = isset( $field['size'] ) ? $field['size'] : 'regular';
37
- $class = isset( $field['class'] ) ? $field['class'] : '';
38
  $post_type = isset( $field['post_type'] ) ? $field['post_type'] : null;
39
  $options = isset( $field['options'] ) ? $field['options'] : null;
40
  $settings = isset( $field['settings'] ) ? $field['settings'] : null;
41
  $repeatable_fields = isset( $field['repeatable_fields'] ) ? $field['repeatable_fields'] : null;
42
  $selectone = isset( $field['selectone'] ) ? $field['selectone'] : __('Select One', 'schema-wp');
43
  $sanitizer = isset( $field['sanitizer'] ) ? $field['sanitizer'] : null;
44
- $default = isset( $field['default'] ) ? $field['default'] : null;
45
- $required = isset( $field['required'] ) ? $field['required'] : null;
46
- $min = isset( $field['min'] ) ? $field['min'] : null;
47
- $max = isset( $field['max'] ) ? $field['max'] : null;
48
- $step = isset( $field['step'] ) ? $field['step'] : null;
49
- $multiple = isset( $field['multiple'] ) ? $field['multiple'] : null;
50
 
51
  // the id and name for each field
52
  $id = $name = isset( $field['id'] ) ? $field['id'] : null;
@@ -55,13 +48,9 @@ function schema_wp_custom_meta_box_field( $field, $meta = null, $repeatable = nu
55
  $id = $repeatable[0] . '_' . $repeatable[1] . '_' . $id;
56
  }
57
  switch( $type ) {
58
- // separator
59
- case 'separator':
60
- echo '<div style="height:2px; border-bottom: 1px dashed #ccc;"></div>';
61
- break;
62
  // opening div
63
  case 'div_open':
64
- echo '<span id="' . esc_attr( $id ) . '" class="toggle">'.__('Advanced', 'schema-wp').' <span class="dashicons dashicons-arrow-down-alt2"></span></span>';
65
  echo '</li></ul><span style="clear:both;display:block;"></span><div id="' . esc_attr( $id ) . '_wrap" class="toggle_div"><ul>';
66
  break;
67
  // closing div
@@ -77,21 +66,20 @@ function schema_wp_custom_meta_box_field( $field, $meta = null, $repeatable = nu
77
  case 'tel':
78
  case 'email':
79
  default:
80
- if ( is_array($meta) ) continue; // if $meta has an array, continue to the next case, @since 1.6.9.4
81
- echo '<input type="' . $type . '" name="' . esc_attr( $name ) . '" id="' . esc_attr( $id ) . '" value="' . esc_attr( $meta ) . '" class="'.$size.'-text '.$class.'" size="30" placeholder="' . $placeholder . '" />
82
  <br />' . $desc;
83
  break;
84
  case 'url':
85
- echo '<input type="' . $type . '" name="' . esc_attr( $name ) . '" id="' . esc_attr( $id ) . '" placeholder="' . $placeholder . '" value="' . esc_url( $meta ) . '" class="regular-text '.$class.'" size="30" />
86
  <br />' . $desc;
87
  break;
88
  case 'number':
89
- echo '<input type="' . $type . '" name="' . esc_attr( $name ) . '" id="' . esc_attr( $id ) . '" value="' . intval( $meta ) . '" class="'.$size.'-text '.$class.'" size="30" />
90
  <br />' . $desc;
91
  break;
92
  // textarea
93
  case 'textarea':
94
- echo '<textarea name="' . esc_attr( $name ) . '" id="' . esc_attr( $id ) . '" placeholder="' . $placeholder . '" cols="60" rows="4" class="'.$class.'">' . esc_textarea( $meta ) . '</textarea>
95
  <br />' . $desc;
96
  break;
97
  // editor
@@ -106,12 +94,7 @@ function schema_wp_custom_meta_box_field( $field, $meta = null, $repeatable = nu
106
  // select, chosen
107
  case 'select':
108
  case 'chosen':
109
-
110
- if ( '' === $meta || array() === $meta ) {
111
- $meta = isset($field['default']) ? $field['default'] : '';
112
- }
113
-
114
- echo '<select name="' . esc_attr( $name ) . '" id="' . esc_attr( $id ) . '"' , $type == 'chosen' ? ' class="'.$class.' chosen"' : ' class="'.$class.'"' , isset( $multiple ) && $multiple == true ? ' multiple="multiple"' : '' , '>
115
  <option value="">' . $selectone . '</option>'; // Select One
116
  foreach ( $options as $option )
117
  echo '<option' . selected( $meta, $option['value'], false ) . ' value="' . $option['value'] . '">' . $option['label'] . '</option>';
@@ -133,14 +116,6 @@ function schema_wp_custom_meta_box_field( $field, $meta = null, $repeatable = nu
133
  <label for="' . esc_attr( $id ) . '-' . $option['value'] . '">' . $option['label'] . '</label></li>';
134
  echo '</ul><p>' . $desc . '</p>';
135
  break;
136
- // checkbox_group
137
- case 'checkbox_group_inline':
138
- echo '<ul class="meta_box_items">';
139
- foreach ( $options as $option )
140
- echo '<input class="'.esc_attr( $option['value'] ).'" type="checkbox" value="' . $option['value'] . '" name="' . esc_attr( $name ) . '[]" id="' . esc_attr( $id ) . '-' . $option['value'] . '"' , is_array( $meta ) && in_array( $option['value'], $meta ) ? ' checked="checked"' : '' , ' />
141
- <label for="' . esc_attr( $id ) . '-' . $option['value'] . '">' . $option['label'] . '</label><br>';
142
- echo '<p>' . $desc . '</p>';
143
- break;
144
  // color
145
  case 'color':
146
  $meta = $meta ? $meta : '#';
@@ -166,8 +141,7 @@ function schema_wp_custom_meta_box_field( $field, $meta = null, $repeatable = nu
166
  foreach ( $posts as $item )
167
  echo '<option value="' . $item->ID . '"' . selected( is_array( $meta ) && in_array( $item->ID, $meta ), true, false ) . '>' . $item->post_title . '</option>';
168
  $post_type_object = get_post_type_object( $post_type );
169
- if(isset($post_type_object->label))
170
- echo '</select> &nbsp;<span class="description"><a href="' . admin_url( 'edit.php?post_type=' . $post_type . '">Manage ' . $post_type_object->label ) . '</a></span><br />' . $desc;
171
  break;
172
  // post_checkboxes
173
  case 'post_checkboxes':
@@ -190,7 +164,7 @@ function schema_wp_custom_meta_box_field( $field, $meta = null, $repeatable = nu
190
  if ( is_array( $meta ) ) {
191
  $items = explode( ',', $meta[$area['id']] );
192
  foreach ( $items as $item ) {
193
- $output = $display == 'thumbnail' ? get_the_post_thumbnail( $item, array( 204, 30 ) ) : wp_filter_nohtml_kses(get_the_title( $item ));
194
  echo '<li id="' . $item . '">' . $output . '</li>';
195
  }
196
  }
@@ -210,7 +184,7 @@ function schema_wp_custom_meta_box_field( $field, $meta = null, $repeatable = nu
210
  echo '<ul class="post_drop_sort_source sort_list">
211
  <li class="post_drop_sort_area_name">Available ' . $label . '</li>';
212
  foreach ( $posts as $item ) {
213
- $output = $display == 'thumbnail' ? get_the_post_thumbnail( $item->ID, array( 204, 30 ) ) : wp_filter_nohtml_kses(get_the_title( $item->ID ));
214
  echo '<li id="' . $item->ID . '">' . $output . '</li>';
215
  }
216
  echo '</ul>';
@@ -232,17 +206,24 @@ function schema_wp_custom_meta_box_field( $field, $meta = null, $repeatable = nu
232
  break;
233
  // CPT, custom post types
234
  case 'cpt':
235
- $options = apply_filters('schema_wp_get_post_types_settings', schema_wp_get_post_types() );
 
 
 
 
 
 
 
 
 
 
 
236
  echo $desc;
237
- if (!empty($options)) {
238
- echo '<ul class="meta_box_cpt_items">';
239
- foreach ( $options as $option => $info )
240
- echo '<li><input type="checkbox" value="' . $option . '" name="' . esc_attr( $name ) . '['.$option.']" id="' . esc_attr( $id ) . '-' . $option . '"' , is_array( $meta ) && in_array( $option, $meta, true ) ? ' checked="checked"' : '' , ' />
241
- <label for="' . esc_attr( $id ) . '-' . $option. '">' . $info['label'] . '</label></li>';
242
- echo '</ul>';
243
- } else {
244
- echo '';
245
- }
246
  break;
247
  // tax_checkboxes
248
  case 'tax_checkboxes':
@@ -263,24 +244,11 @@ function schema_wp_custom_meta_box_field( $field, $meta = null, $repeatable = nu
263
  break;
264
  // slider
265
  case 'slider':
266
- $value = $meta != '' ? intval( $meta ) : '0';
267
  echo '<div id="' . esc_attr( $id ) . '-slider"></div>
268
  <br />
269
  <input type="text" name="' . esc_attr( $name ) . '" id="' . esc_attr( $id ) . '" value="' . $value . '" size="5" /> ' . $desc;
270
  break;
271
- // rating slider
272
- case 'sliderrating':
273
- $post_id = isset($_GET['post']) ? $_GET['post'] : null;
274
- $rating_type = schema_wp_review_get_rating_type( $post_id );
275
- $rating_scale = schema_wp_review_get_rating_scale( $rating_type );
276
- $value = $meta != '' ? intval( $meta ) : '0';
277
- $value = schema_wp_review_adjust_rating( $value, $rating_scale );
278
-
279
- //$value = $meta != '' ? intval( $meta ) : '0';
280
- echo '<div id="' . esc_attr( $id ) . '-sliderrating"></div>
281
- <br />
282
- <input type="text" readonly="readonly" name="' . esc_attr( $name ) . '" id="' . esc_attr( $id ) . '" class="' . esc_attr( $id ) . '" value="' . $value . '" size="5" />' . $desc;
283
- break;
284
  // image
285
  case 'image':
286
  $image = SCHEMA_CUSTOM_METABOXES_DIR . '/images/image.png';
@@ -331,7 +299,7 @@ function schema_wp_custom_meta_box_field( $field, $meta = null, $repeatable = nu
331
  if ( ! array_key_exists( $repeatable_field['id'], $meta[$i] ) )
332
  $meta[$i][$repeatable_field['id']] = null;
333
  echo '<label>' . $repeatable_field['label'] . '</label><p>';
334
- echo schema_wp_custom_meta_box_field( $repeatable_field, $meta[$i][$repeatable_field['id']], array( $id, $i ) );
335
  echo '</p>';
336
  } // end each field
337
  echo '</td><td><a class="meta_box_repeatable_remove repeatable-remove" href="#"><span class="dashicons dashicons-dismiss"></span></a></td></tr>';
@@ -378,7 +346,7 @@ function schema_wp_custom_meta_box_field( $field, $meta = null, $repeatable = nu
378
  //echo '<li><label>' . $repeatable_field['label'] . '</label>';
379
  echo '<li><label></label>';
380
  //echo '<li>';
381
- echo schema_wp_custom_meta_box_field( $repeatable_field, $meta[$i][$repeatable_field['id']], array( $id, $i ) );
382
  echo '</li>';
383
  } // end each field
384
  echo '</td><td><a class="meta_box_repeatable_remove" href="#"><span class="dashicons dashicons-dismiss"></span></a></td></tr>';
@@ -396,7 +364,6 @@ function schema_wp_custom_meta_box_field( $field, $meta = null, $repeatable = nu
396
  echo '</table>
397
  <p><br />' . $desc . '</p>';
398
  break;
399
-
400
  } //end switch
401
 
402
  }
@@ -409,36 +376,18 @@ function schema_wp_custom_meta_box_field( $field, $meta = null, $repeatable = nu
409
  * @param array $haystack an array to search the type in
410
  *
411
  * @return bool whether or not the type is in the provided array
412
- * @since 1.0
413
  */
414
- function schema_wp_meta_box_find_field_type($keySearch, $array) {
415
-
416
- if ( ! is_array( $array) ) return;
417
-
418
- foreach ($array as $key => $item) {
419
-
420
- if ( isset( $key['type'] ) && $key['type'] == 'repeatable' )
421
- return schema_wp_meta_box_find_field_type( $keySearch, $key['repeatable_fields'] );
422
- elseif ( isset( $key['type'] ) && $key['type'] == 'repeatable_row' )
423
- return schema_wp_meta_box_find_field_type( $keySearch, $h['repeatable_fields'] );
424
- elseif ( ( isset( $key['type'] ) && $key['type'] == $keySearch ) || ( isset( $key['repeatable_type'] ) && $key['repeatable_type'] == $keySearch ) )
425
  return true;
426
-
427
- // additional check
428
- // @since 1.6.9.1
429
- if ($key == $keySearch) {
430
- return true;
431
- } else {
432
- if (is_array($item) && schema_wp_meta_box_find_field_type($item, $keySearch)) {
433
- return true;
434
- }
435
- }
436
- }
437
-
438
- return false;
439
  }
440
 
441
-
442
  /**
443
  * Find repeatable
444
  *
@@ -453,7 +402,7 @@ function schema_wp_meta_box_find_field_type($keySearch, $array) {
453
  *
454
  * @return bool whether or not the type is in the provided array
455
  */
456
- function schema_wp_meta_box_find_repeatable( $needle = 'repeatable', $haystack ) {
457
  foreach ( $haystack as $h )
458
  if ( isset( $h['type'] ) && $h['type'] == $needle )
459
  return true;
@@ -474,7 +423,7 @@ function schema_wp_meta_box_find_repeatable( $needle = 'repeatable', $haystack )
474
  *
475
  * @return bool whether or not the type is in the provided array
476
  */
477
- function schema_wp_meta_box_find_repeatable_row( $needle = 'repeatable_row', $haystack ) {
478
  foreach ( $haystack as $h )
479
  if ( isset( $h['type'] ) && $h['type'] == $needle )
480
  return true;
@@ -484,7 +433,7 @@ function schema_wp_meta_box_find_repeatable_row( $needle = 'repeatable_row', $ha
484
  /**
485
  * sanitize boolean inputs
486
  */
487
- function schema_wp_meta_box_santitize_boolean( $string ) {
488
  if ( ! isset( $string ) || $string != 1 || $string != true )
489
  return false;
490
  else
@@ -499,7 +448,7 @@ function schema_wp_meta_box_santitize_boolean( $string ) {
499
  *
500
  * @return a validated string
501
  */
502
- function schema_wp_meta_box_sanitize( $string, $function = 'sanitize_text_field' ) {
503
  switch ( $function ) {
504
  case 'intval':
505
  return intval( $string );
@@ -515,12 +464,8 @@ function schema_wp_meta_box_sanitize( $string, $function = 'sanitize_text_field'
515
  return is_email( $string );
516
  case 'sanitize_title':
517
  return sanitize_title( $string );
518
- case 'santitize_title_with_dashes':
519
- return sanitize_title_with_dashes( $string );
520
  case 'santitize_boolean':
521
  return santitize_boolean( $string );
522
- case 'sanitize_html_class':
523
- return sanitize_html_class( $string );
524
  case 'no_santitize':
525
  return $string;
526
  case 'sanitize_text_field':
@@ -538,7 +483,7 @@ function schema_wp_meta_box_sanitize( $string, $function = 'sanitize_text_field'
538
  *
539
  * @return array new array, fully mapped with the provided arrays
540
  */
541
- function schema_wp_meta_box_array_map_r( $func, $meta, $sanitizer ) {
542
 
543
  $newMeta = array();
544
  $meta = array_values( $meta );
@@ -569,7 +514,7 @@ function schema_wp_meta_box_array_map_r( $func, $meta, $sanitizer ) {
569
  */
570
  foreach( $array as $arrayKey => $arrayValue )
571
  if ( is_array( $arrayValue ) )
572
- $array[$arrayKey] = schema_wp_meta_box_array_map_r( $func, $arrayValue, $newSanitizer[$arrayKey] );
573
 
574
  $array = array_map( $func, $array, $newSanitizer );
575
  $newMeta[$key] = array_combine( $keys, array_values( $array ) );
@@ -617,52 +562,43 @@ class Schema_Custom_Add_Meta_Box {
617
  function admin_enqueue_scripts() {
618
  global $pagenow;
619
  if ( in_array( $pagenow, array( 'post-new.php', 'post.php' ) ) && in_array( get_post_type(), $this->page ) ) {
620
-
621
- // debug
622
- //echo'<pre>';print_r($this->fields);echo'</pre>';
623
-
624
  // js
625
- $deps = array( 'jquery' );
626
- if ( schema_wp_meta_box_find_field_type( 'date', $this->fields ) )
627
  $deps[] = 'jquery-ui-datepicker';
628
- if ( in_array( true, array(
629
- schema_wp_meta_box_find_field_type( 'slider', $this->fields ),
630
- schema_wp_meta_box_find_field_type( 'sliderrating', $this->fields )
631
- ) ) ) {
632
  $deps[] = 'jquery-ui-slider';
633
- }
634
- if ( schema_wp_meta_box_find_field_type( 'color', $this->fields ) )
635
  $deps[] = 'farbtastic';
636
  if ( in_array( true, array(
637
- schema_wp_meta_box_find_field_type( 'chosen', $this->fields ),
638
- schema_wp_meta_box_find_field_type( 'post_chosen', $this->fields )
639
  ) ) ) {
640
- wp_register_script( 'chosen', SCHEMA_CUSTOM_METABOXES_DIR . 'js/chosen.js', array( 'jquery' ) );
641
  $deps[] = 'chosen';
642
- wp_enqueue_style( 'chosen', SCHEMA_CUSTOM_METABOXES_DIR . 'css/chosen.css' );
643
  }
644
  if ( in_array( true, array(
645
- schema_wp_meta_box_find_field_type( 'date', $this->fields ),
646
- schema_wp_meta_box_find_field_type( 'slider', $this->fields ),
647
- schema_wp_meta_box_find_field_type( 'sliderrating', $this->fields ),
648
- schema_wp_meta_box_find_field_type( 'color', $this->fields ),
649
- schema_wp_meta_box_find_field_type( 'chosen', $this->fields ),
650
- schema_wp_meta_box_find_field_type( 'post_chosen', $this->fields ),
651
- schema_wp_meta_box_find_repeatable( 'repeatable', $this->fields ),
652
- schema_wp_meta_box_find_repeatable( 'repeatable_row', $this->fields ),
653
- schema_wp_meta_box_find_field_type( 'image', $this->fields ),
654
- schema_wp_meta_box_find_field_type( 'file', $this->fields )
655
  ) ) )
656
- wp_enqueue_script( 'meta_box', SCHEMA_CUSTOM_METABOXES_DIR . 'js/scripts.js', $deps );
657
 
658
  if ( in_array( true, array(
659
- schema_wp_meta_box_find_field_type( 'select', $this->fields )
660
  ) ) )
661
- wp_enqueue_script( 'schema_meta_box', SCHEMA_CUSTOM_METABOXES_DIR . 'js/schema.js', $deps );
662
 
663
  // Load media uploader required scripts
664
  if ( in_array( true, array(
665
- schema_wp_meta_box_find_field_type( 'image', $this->fields )
666
  ) ) ) {
667
  if(function_exists('wp_enqueue_media')) {
668
  wp_enqueue_media();
@@ -672,15 +608,15 @@ class Schema_Custom_Add_Meta_Box {
672
  wp_enqueue_style('thickbox');
673
  }
674
  }
675
-
676
  // css
677
  $deps = array();
678
- wp_register_style( 'jqueryui', SCHEMA_CUSTOM_METABOXES_DIR . 'css/jqueryui.css' );
679
- if ( schema_wp_meta_box_find_field_type( 'date', $this->fields ) || schema_wp_meta_box_find_field_type( 'slider', $this->fields ) || schema_wp_meta_box_find_field_type( 'sliderrating', $this->fields ) )
680
  $deps[] = 'jqueryui';
681
- if ( schema_wp_meta_box_find_field_type( 'color', $this->fields ) )
682
  $deps[] = 'farbtastic';
683
- wp_enqueue_style( 'meta_box', SCHEMA_CUSTOM_METABOXES_DIR . 'css/meta_box.css', $deps );
684
  }
685
  }
686
 
@@ -688,13 +624,10 @@ class Schema_Custom_Add_Meta_Box {
688
  * adds scripts to the head for special fields with extra js requirements
689
  */
690
  function admin_head() {
691
-
692
- if ( in_array( get_post_type(), $this->page ) && ( schema_wp_meta_box_find_field_type( 'date', $this->fields )
693
- || schema_wp_meta_box_find_field_type( 'slider', $this->fields )
694
- || schema_wp_meta_box_find_field_type( 'sliderrating', $this->fields ) ) ) {
695
 
696
  echo '<script type="text/javascript">
697
- jQuery(function($) {';
698
 
699
  foreach ( $this->fields as $field ) {
700
  switch( $field['type'] ) {
@@ -706,12 +639,11 @@ class Schema_Custom_Add_Meta_Box {
706
  break;
707
  // slider
708
  case 'slider' :
709
- $value = get_post_meta( get_the_ID(), $field['id'], true );
710
- if ( $value == '' )
711
- $value = $field['min'];
712
- echo '
713
  $( "#' . $field['id'] . '-slider" ).slider({
714
- range : "min",
715
  value: ' . $value . ',
716
  min: ' . $field['min'] . ',
717
  max: ' . $field['max'] . ',
@@ -721,67 +653,12 @@ class Schema_Custom_Add_Meta_Box {
721
  }
722
  });';
723
  break;
724
- // slider rating: Used by the Schema Review extension
725
- case 'sliderrating' :
726
- $post_id = get_the_ID();
727
- $value = get_post_meta( $post_id, $field['id'], true );
728
- if ( $value == '' )
729
- $value = $field['min'];
730
-
731
- $_scale = schema_wp_get_option( 'schema_review_rating_scale', false );
732
- $rating_type = schema_wp_review_get_rating_type( $post_id );
733
- $rating_scale = schema_wp_review_get_rating_scale( $rating_type );
734
- $value = schema_wp_review_adjust_rating( $value, $rating_scale );
735
-
736
- echo '
737
- $( "#' . $field['id'] . '-sliderrating" ).slider({
738
- range : "min",
739
- value: ' . $value . ',
740
- min: ' . $rating_scale['min'] . ',
741
- max: ' . $rating_scale['max'] . ',
742
- step: ' . $rating_scale['step'] . ',
743
- slide: function( event, ui ) {
744
- $( "#' . $field['id'] . '" ).val( ui.value );
745
- }
746
- });
747
-
748
- var RatingType = "";
749
- var RatingScale = ' . json_encode($_scale) . ';
750
- var newBegin = 0;
751
- var newEnd = 0;
752
- var newStep = 0;
753
-
754
- $("#_schema_review_rating_type").on("change", function() {
755
-
756
- var currentVal = parseInt($("#' . $field['id'] . '-sliderrating" ).slider("value")),
757
- RatingType = $("#_schema_review_rating_type").val();
758
-
759
- var newBegin = parseInt(RatingScale[RatingType]["min"]);
760
- var newEnd = parseInt(RatingScale[RatingType]["max"]);
761
- var newStep = parseFloat(RatingScale[RatingType]["step"]);
762
-
763
- if ( currentVal > newEnd ) var currentVal = newEnd;
764
-
765
-
766
- var $slide = $("#' . $field['id'] . '-sliderrating" ).slider({
767
- range : "min",
768
- value: currentVal,
769
- min: newBegin,
770
- max: newEnd,
771
- step: newStep,
772
- slide: function( event, ui ) {
773
- $( "#' . $field['id'] . '" ).val( ui.value );
774
- }
775
- });
776
- $slide.slider("value", $slide.slider("value"));
777
- });
778
- ';
779
- break;
780
  }
781
  }
782
 
783
  echo '});
784
- </script>';
 
785
  }
786
  }
787
 
@@ -805,9 +682,6 @@ class Schema_Custom_Add_Meta_Box {
805
  echo '<table class="form-table meta_box">';
806
  foreach ( $this->fields as $field) {
807
 
808
- if ( !isset($field['label']) )
809
- $field['label'] = null;
810
-
811
  // set tooltip
812
  $tip = isset( $field['tip'] ) ? '<span data-tooltip="'.$field['tip'].'"><span class="dashicons dashicons-info"></span></span>' : null;
813
 
@@ -819,13 +693,12 @@ class Schema_Custom_Add_Meta_Box {
819
  </tr>';
820
  }
821
  else {
822
- $label = isset($field['required']) ? $field['label'] . ' <span class="required">*</span>' : $field['label'];
823
  echo '<tr>
824
- <th style="width:20%"><label for="' . $field['id'] . '">' . $label . ' ' . $tip . '</label></th>
825
  <td>';
826
 
827
  $meta = get_post_meta( get_the_ID(), $field['id'], true);
828
- echo schema_wp_custom_meta_box_field( $field, $meta );
829
 
830
  echo '<td>
831
  </tr>';
@@ -838,7 +711,6 @@ class Schema_Custom_Add_Meta_Box {
838
  * saves the captured data
839
  */
840
  function save_box( $post_id ) {
841
-
842
  $post_type = get_post_type();
843
 
844
  // verify nonce
@@ -850,12 +722,8 @@ class Schema_Custom_Add_Meta_Box {
850
  if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
851
  return $post_id;
852
  // check permissions
853
- //if ( ! current_user_can( 'edit_page', $post_id ) )
854
- //return $post_id;
855
-
856
- // debug
857
- //if ( isset( $_POST['_schema_review_rating_type'] ) ) echo $_POST['_schema_review_rating_type'];
858
- //echo '<pre>'; print_r($_POST);echo'</pre>';
859
 
860
  // loop through fields and save the data
861
  foreach ( $this->fields as $field ) {
@@ -881,9 +749,9 @@ class Schema_Custom_Add_Meta_Box {
881
  } elseif ( isset( $new ) && $new != $old ) {
882
  $sanitizer = isset( $field['sanitizer'] ) ? $field['sanitizer'] : 'sanitize_text_field';
883
  if ( is_array( $new ) )
884
- $new = schema_wp_meta_box_array_map_r( 'schema_wp_meta_box_sanitize', $new, $sanitizer );
885
  else
886
- $new = schema_wp_meta_box_sanitize( $new, $sanitizer );
887
  update_post_meta( $post_id, $field['id'], $new );
888
  }
889
  }*/
@@ -901,22 +769,13 @@ class Schema_Custom_Add_Meta_Box {
901
  delete_post_meta( $post_id, $field['id'], $old );
902
  } elseif ( isset( $new ) && $new != $old ) {
903
  $sanitizer = isset( $field['sanitizer'] ) ? $field['sanitizer'] : 'sanitize_text_field';
904
- if ( is_array( $new ) )
905
- $new = schema_wp_meta_box_array_map_r( 'schema_wp_meta_box_sanitize', $new, $sanitizer );
906
  else
907
- $new = schema_wp_meta_box_sanitize( $new, $sanitizer );
908
-
909
  if( $field['type'] == 'date') {
910
  $new = strtotime($new);
911
  }
912
- if( $field['type'] == 'sliderrating') {
913
- // adjust rating before saving values
914
- if (function_exists('schema_wp_review_adjust_rating')) {
915
- $rating_type = schema_wp_review_get_rating_type( $post_id );
916
- $scale = schema_wp_review_get_rating_scale( $rating_type );
917
- $new = schema_wp_review_adjust_rating( $new, $scale, true );
918
- }
919
- }
920
 
921
  update_post_meta( $post_id, $field['id'], $new );
922
  }
@@ -924,4 +783,4 @@ class Schema_Custom_Add_Meta_Box {
924
  } // end foreach
925
  }
926
 
927
- }
22
  *
23
  * @return string html for the field
24
  */
25
+ function custom_meta_box_field( $field, $meta = null, $repeatable = null ) {
26
  if ( ! ( $field || is_array( $field ) ) )
27
  return;
28
 
34
  $placeholder = isset( $field['placeholder'] ) ? $field['placeholder'] : null;
35
  $place = isset( $field['place'] ) ? $field['place'] : null;
36
  $size = isset( $field['size'] ) ? $field['size'] : 'regular';
 
37
  $post_type = isset( $field['post_type'] ) ? $field['post_type'] : null;
38
  $options = isset( $field['options'] ) ? $field['options'] : null;
39
  $settings = isset( $field['settings'] ) ? $field['settings'] : null;
40
  $repeatable_fields = isset( $field['repeatable_fields'] ) ? $field['repeatable_fields'] : null;
41
  $selectone = isset( $field['selectone'] ) ? $field['selectone'] : __('Select One', 'schema-wp');
42
  $sanitizer = isset( $field['sanitizer'] ) ? $field['sanitizer'] : null;
 
 
 
 
 
 
43
 
44
  // the id and name for each field
45
  $id = $name = isset( $field['id'] ) ? $field['id'] : null;
48
  $id = $repeatable[0] . '_' . $repeatable[1] . '_' . $id;
49
  }
50
  switch( $type ) {
 
 
 
 
51
  // opening div
52
  case 'div_open':
53
+ echo '<span id="' . esc_attr( $id ) . '" class="toggle">'.__('Advanced', 'schema-wp').'</span>';
54
  echo '</li></ul><span style="clear:both;display:block;"></span><div id="' . esc_attr( $id ) . '_wrap" class="toggle_div"><ul>';
55
  break;
56
  // closing div
66
  case 'tel':
67
  case 'email':
68
  default:
69
+ echo '<input type="' . $type . '" name="' . esc_attr( $name ) . '" id="' . esc_attr( $id ) . '" value="' . esc_attr( $meta ) . '" class="'.$size.'-text" size="30" placeholder="' . $placeholder . '" />
 
70
  <br />' . $desc;
71
  break;
72
  case 'url':
73
+ echo '<input type="' . $type . '" name="' . esc_attr( $name ) . '" id="' . esc_attr( $id ) . '" value="' . esc_url( $meta ) . '" class="regular-text" size="30" />
74
  <br />' . $desc;
75
  break;
76
  case 'number':
77
+ echo '<input type="' . $type . '" name="' . esc_attr( $name ) . '" id="' . esc_attr( $id ) . '" value="' . intval( $meta ) . '" class="'.$size.'-text" size="30" />
78
  <br />' . $desc;
79
  break;
80
  // textarea
81
  case 'textarea':
82
+ echo '<textarea name="' . esc_attr( $name ) . '" id="' . esc_attr( $id ) . '" placeholder="' . $placeholder . '" cols="60" rows="4">' . esc_textarea( $meta ) . '</textarea>
83
  <br />' . $desc;
84
  break;
85
  // editor
94
  // select, chosen
95
  case 'select':
96
  case 'chosen':
97
+ echo '<select name="' . esc_attr( $name ) . '" id="' . esc_attr( $id ) . '"' , $type == 'chosen' ? ' class="chosen"' : '' , isset( $multiple ) && $multiple == true ? ' multiple="multiple"' : '' , '>
 
 
 
 
 
98
  <option value="">' . $selectone . '</option>'; // Select One
99
  foreach ( $options as $option )
100
  echo '<option' . selected( $meta, $option['value'], false ) . ' value="' . $option['value'] . '">' . $option['label'] . '</option>';
116
  <label for="' . esc_attr( $id ) . '-' . $option['value'] . '">' . $option['label'] . '</label></li>';
117
  echo '</ul><p>' . $desc . '</p>';
118
  break;
 
 
 
 
 
 
 
 
119
  // color
120
  case 'color':
121
  $meta = $meta ? $meta : '#';
141
  foreach ( $posts as $item )
142
  echo '<option value="' . $item->ID . '"' . selected( is_array( $meta ) && in_array( $item->ID, $meta ), true, false ) . '>' . $item->post_title . '</option>';
143
  $post_type_object = get_post_type_object( $post_type );
144
+ echo '</select> &nbsp;<span class="description"><a href="' . admin_url( 'edit.php?post_type=' . $post_type . '">Manage ' . $post_type_object->label ) . '</a></span><br />' . $desc;
 
145
  break;
146
  // post_checkboxes
147
  case 'post_checkboxes':
164
  if ( is_array( $meta ) ) {
165
  $items = explode( ',', $meta[$area['id']] );
166
  foreach ( $items as $item ) {
167
+ $output = $display == 'thumbnail' ? get_the_post_thumbnail( $item, array( 204, 30 ) ) : get_the_title( $item );
168
  echo '<li id="' . $item . '">' . $output . '</li>';
169
  }
170
  }
184
  echo '<ul class="post_drop_sort_source sort_list">
185
  <li class="post_drop_sort_area_name">Available ' . $label . '</li>';
186
  foreach ( $posts as $item ) {
187
+ $output = $display == 'thumbnail' ? get_the_post_thumbnail( $item->ID, array( 204, 30 ) ) : get_the_title( $item->ID );
188
  echo '<li id="' . $item->ID . '">' . $output . '</li>';
189
  }
190
  echo '</ul>';
206
  break;
207
  // CPT, custom post types
208
  case 'cpt':
209
+ // builtin types needed
210
+ $builtin = array(
211
+ 'post',
212
+ 'page',
213
+ );
214
+ // all CPTs.
215
+ $cpts = get_post_types( array(
216
+ 'public' => true,
217
+ '_builtin' => false
218
+ ) );
219
+ // merge Builtin types and 'important' CPTs to resulting array to use as argument.
220
+ $options = array_merge($builtin, $cpts);
221
  echo $desc;
222
+ echo '<ul class="meta_box_items">';
223
+ foreach ( $options as $option )
224
+ echo '<li><input type="checkbox" value="' . $option . '" name="' . esc_attr( $name ) . '['.$option.']" id="' . esc_attr( $id ) . '-' . $option . '"' , is_array( $meta ) && in_array( $option, $meta, true ) ? ' checked="checked"' : '' , ' />
225
+ <label for="' . esc_attr( $id ) . '-' . $option. '">' . $option . '</label></li>';
226
+ echo '</ul>';
 
 
 
 
227
  break;
228
  // tax_checkboxes
229
  case 'tax_checkboxes':
244
  break;
245
  // slider
246
  case 'slider':
247
+ $value = $meta != '' ? intval( $meta ) : '0';
248
  echo '<div id="' . esc_attr( $id ) . '-slider"></div>
249
  <br />
250
  <input type="text" name="' . esc_attr( $name ) . '" id="' . esc_attr( $id ) . '" value="' . $value . '" size="5" /> ' . $desc;
251
  break;
 
 
 
 
 
 
 
 
 
 
 
 
 
252
  // image
253
  case 'image':
254
  $image = SCHEMA_CUSTOM_METABOXES_DIR . '/images/image.png';
299
  if ( ! array_key_exists( $repeatable_field['id'], $meta[$i] ) )
300
  $meta[$i][$repeatable_field['id']] = null;
301
  echo '<label>' . $repeatable_field['label'] . '</label><p>';
302
+ echo custom_meta_box_field( $repeatable_field, $meta[$i][$repeatable_field['id']], array( $id, $i ) );
303
  echo '</p>';
304
  } // end each field
305
  echo '</td><td><a class="meta_box_repeatable_remove repeatable-remove" href="#"><span class="dashicons dashicons-dismiss"></span></a></td></tr>';
346
  //echo '<li><label>' . $repeatable_field['label'] . '</label>';
347
  echo '<li><label></label>';
348
  //echo '<li>';
349
+ echo custom_meta_box_field( $repeatable_field, $meta[$i][$repeatable_field['id']], array( $id, $i ) );
350
  echo '</li>';
351
  } // end each field
352
  echo '</td><td><a class="meta_box_repeatable_remove" href="#"><span class="dashicons dashicons-dismiss"></span></a></td></tr>';
364
  echo '</table>
365
  <p><br />' . $desc . '</p>';
366
  break;
 
367
  } //end switch
368
 
369
  }
376
  * @param array $haystack an array to search the type in
377
  *
378
  * @return bool whether or not the type is in the provided array
 
379
  */
380
+ function meta_box_find_field_type( $needle, $haystack ) {
381
+ foreach ( $haystack as $h )
382
+ if ( isset( $h['type'] ) && $h['type'] == 'repeatable' )
383
+ return meta_box_find_field_type( $needle, $h['repeatable_fields'] );
384
+ elseif ( isset( $h['type'] ) && $h['type'] == 'repeatable_row' )
385
+ return meta_box_find_field_type( $needle, $h['repeatable_fields'] );
386
+ elseif ( ( isset( $h['type'] ) && $h['type'] == $needle ) || ( isset( $h['repeatable_type'] ) && $h['repeatable_type'] == $needle ) )
 
 
 
 
387
  return true;
388
+ return false;
 
 
 
 
 
 
 
 
 
 
 
 
389
  }
390
 
 
391
  /**
392
  * Find repeatable
393
  *
402
  *
403
  * @return bool whether or not the type is in the provided array
404
  */
405
+ function meta_box_find_repeatable( $needle = 'repeatable', $haystack ) {
406
  foreach ( $haystack as $h )
407
  if ( isset( $h['type'] ) && $h['type'] == $needle )
408
  return true;
423
  *
424
  * @return bool whether or not the type is in the provided array
425
  */
426
+ function meta_box_find_repeatable_row( $needle = 'repeatable_row', $haystack ) {
427
  foreach ( $haystack as $h )
428
  if ( isset( $h['type'] ) && $h['type'] == $needle )
429
  return true;
433
  /**
434
  * sanitize boolean inputs
435
  */
436
+ function meta_box_santitize_boolean( $string ) {
437
  if ( ! isset( $string ) || $string != 1 || $string != true )
438
  return false;
439
  else
448
  *
449
  * @return a validated string
450
  */
451
+ function meta_box_sanitize( $string, $function = 'sanitize_text_field' ) {
452
  switch ( $function ) {
453
  case 'intval':
454
  return intval( $string );
464
  return is_email( $string );
465
  case 'sanitize_title':
466
  return sanitize_title( $string );
 
 
467
  case 'santitize_boolean':
468
  return santitize_boolean( $string );
 
 
469
  case 'no_santitize':
470
  return $string;
471
  case 'sanitize_text_field':
483
  *
484
  * @return array new array, fully mapped with the provided arrays
485
  */
486
+ function meta_box_array_map_r( $func, $meta, $sanitizer ) {
487
 
488
  $newMeta = array();
489
  $meta = array_values( $meta );
514
  */
515
  foreach( $array as $arrayKey => $arrayValue )
516
  if ( is_array( $arrayValue ) )
517
+ $array[$arrayKey] = meta_box_array_map_r( $func, $arrayValue, $newSanitizer[$arrayKey] );
518
 
519
  $array = array_map( $func, $array, $newSanitizer );
520
  $newMeta[$key] = array_combine( $keys, array_values( $array ) );
562
  function admin_enqueue_scripts() {
563
  global $pagenow;
564
  if ( in_array( $pagenow, array( 'post-new.php', 'post.php' ) ) && in_array( get_post_type(), $this->page ) ) {
 
 
 
 
565
  // js
566
+ $deps = array( 'jquery' );
567
+ if ( meta_box_find_field_type( 'date', $this->fields ) )
568
  $deps[] = 'jquery-ui-datepicker';
569
+ if ( meta_box_find_field_type( 'slider', $this->fields ) )
 
 
 
570
  $deps[] = 'jquery-ui-slider';
571
+ if ( meta_box_find_field_type( 'color', $this->fields ) )
 
572
  $deps[] = 'farbtastic';
573
  if ( in_array( true, array(
574
+ meta_box_find_field_type( 'chosen', $this->fields ),
575
+ meta_box_find_field_type( 'post_chosen', $this->fields )
576
  ) ) ) {
577
+ wp_register_script( 'chosen', SCHEMA_CUSTOM_METABOXES_DIR . '/js/chosen.js', array( 'jquery' ) );
578
  $deps[] = 'chosen';
579
+ wp_enqueue_style( 'chosen', SCHEMA_CUSTOM_METABOXES_DIR . '/css/chosen.css' );
580
  }
581
  if ( in_array( true, array(
582
+ meta_box_find_field_type( 'date', $this->fields ),
583
+ meta_box_find_field_type( 'slider', $this->fields ),
584
+ meta_box_find_field_type( 'color', $this->fields ),
585
+ meta_box_find_field_type( 'chosen', $this->fields ),
586
+ meta_box_find_field_type( 'post_chosen', $this->fields ),
587
+ meta_box_find_repeatable( 'repeatable', $this->fields ),
588
+ meta_box_find_repeatable( 'repeatable_row', $this->fields ),
589
+ meta_box_find_field_type( 'image', $this->fields ),
590
+ meta_box_find_field_type( 'file', $this->fields )
 
591
  ) ) )
592
+ wp_enqueue_script( 'meta_box', SCHEMA_CUSTOM_METABOXES_DIR . '/js/scripts.js', $deps );
593
 
594
  if ( in_array( true, array(
595
+ meta_box_find_field_type( 'select', $this->fields )
596
  ) ) )
597
+ wp_enqueue_script( 'schema_meta_box', SCHEMA_CUSTOM_METABOXES_DIR . '/js/schema.js', $deps );
598
 
599
  // Load media uploader required scripts
600
  if ( in_array( true, array(
601
+ meta_box_find_field_type( 'image', $this->fields )
602
  ) ) ) {
603
  if(function_exists('wp_enqueue_media')) {
604
  wp_enqueue_media();
608
  wp_enqueue_style('thickbox');
609
  }
610
  }
611
+
612
  // css
613
  $deps = array();
614
+ wp_register_style( 'jqueryui', SCHEMA_CUSTOM_METABOXES_DIR . '/css/jqueryui.css' );
615
+ if ( meta_box_find_field_type( 'date', $this->fields ) || meta_box_find_field_type( 'slider', $this->fields ) )
616
  $deps[] = 'jqueryui';
617
+ if ( meta_box_find_field_type( 'color', $this->fields ) )
618
  $deps[] = 'farbtastic';
619
+ wp_enqueue_style( 'meta_box', SCHEMA_CUSTOM_METABOXES_DIR . '/css/meta_box.css', $deps );
620
  }
621
  }
622
 
624
  * adds scripts to the head for special fields with extra js requirements
625
  */
626
  function admin_head() {
627
+ if ( in_array( get_post_type(), $this->page ) && ( meta_box_find_field_type( 'date', $this->fields ) || meta_box_find_field_type( 'slider', $this->fields ) ) ) {
 
 
 
628
 
629
  echo '<script type="text/javascript">
630
+ jQuery(function( $) {';
631
 
632
  foreach ( $this->fields as $field ) {
633
  switch( $field['type'] ) {
639
  break;
640
  // slider
641
  case 'slider' :
642
+ $value = get_post_meta( get_the_ID(), $field['id'], true );
643
+ if ( $value == '' )
644
+ $value = $field['min'];
645
+ echo '
646
  $( "#' . $field['id'] . '-slider" ).slider({
 
647
  value: ' . $value . ',
648
  min: ' . $field['min'] . ',
649
  max: ' . $field['max'] . ',
653
  }
654
  });';
655
  break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
656
  }
657
  }
658
 
659
  echo '});
660
+ </script>';
661
+
662
  }
663
  }
664
 
682
  echo '<table class="form-table meta_box">';
683
  foreach ( $this->fields as $field) {
684
 
 
 
 
685
  // set tooltip
686
  $tip = isset( $field['tip'] ) ? '<span data-tooltip="'.$field['tip'].'"><span class="dashicons dashicons-info"></span></span>' : null;
687
 
693
  </tr>';
694
  }
695
  else {
 
696
  echo '<tr>
697
+ <th style="width:20%"><label for="' . $field['id'] . '">' . $field['label'] . ' ' . $tip . '</label></th>
698
  <td>';
699
 
700
  $meta = get_post_meta( get_the_ID(), $field['id'], true);
701
+ echo custom_meta_box_field( $field, $meta );
702
 
703
  echo '<td>
704
  </tr>';
711
  * saves the captured data
712
  */
713
  function save_box( $post_id ) {
 
714
  $post_type = get_post_type();
715
 
716
  // verify nonce
722
  if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
723
  return $post_id;
724
  // check permissions
725
+ if ( ! current_user_can( 'edit_page', $post_id ) )
726
+ return $post_id;
 
 
 
 
727
 
728
  // loop through fields and save the data
729
  foreach ( $this->fields as $field ) {
749
  } elseif ( isset( $new ) && $new != $old ) {
750
  $sanitizer = isset( $field['sanitizer'] ) ? $field['sanitizer'] : 'sanitize_text_field';
751
  if ( is_array( $new ) )
752
+ $new = meta_box_array_map_r( 'meta_box_sanitize', $new, $sanitizer );
753
  else
754
+ $new = meta_box_sanitize( $new, $sanitizer );
755
  update_post_meta( $post_id, $field['id'], $new );
756
  }
757
  }*/
769
  delete_post_meta( $post_id, $field['id'], $old );
770
  } elseif ( isset( $new ) && $new != $old ) {
771
  $sanitizer = isset( $field['sanitizer'] ) ? $field['sanitizer'] : 'sanitize_text_field';
772
+ if ( is_array( $new ) )
773
+ $new = meta_box_array_map_r( 'meta_box_sanitize', $new, $sanitizer );
774
  else
775
+ $new = meta_box_sanitize( $new, $sanitizer );
 
776
  if( $field['type'] == 'date') {
777
  $new = strtotime($new);
778
  }
 
 
 
 
 
 
 
 
779
 
780
  update_post_meta( $post_id, $field['id'], $new );
781
  }
783
  } // end foreach
784
  }
785
 
786
+ }
includes/admin/meta/css/chosen-sprite.png DELETED
Binary file
includes/admin/meta/css/chosen-sprite@2x.png DELETED
Binary file
includes/admin/meta/css/chosen.css CHANGED
@@ -1,11 +1,399 @@
1
- /*!
2
- Chosen, a Select Box Enhancer for jQuery and Prototype
3
- by Patrick Filler for Harvest, http://getharvest.com
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
 
5
- Version 1.8.5
6
- Full source at https://github.com/harvesthq/chosen
7
- Copyright (c) 2011-2018 Harvest http://getharvest.com
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
 
9
- MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
10
- This file is generated by `grunt build`, do not edit it by hand.
11
- */.chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.chosen-container *{-webkit-box-sizing:border-box;box-sizing:border-box}.chosen-container .chosen-drop{position:absolute;top:100%;z-index:1010;width:100%;border:1px solid #aaa;border-top:0;background:#fff;-webkit-box-shadow:0 4px 5px rgba(0,0,0,.15);box-shadow:0 4px 5px rgba(0,0,0,.15);display:none}.chosen-container.chosen-with-drop .chosen-drop{display:block}.chosen-container a{cursor:pointer}.chosen-container .chosen-single .group-name,.chosen-container .search-choice .group-name{margin-right:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:400;color:#999}.chosen-container .chosen-single .group-name:after,.chosen-container .search-choice .group-name:after{content:":";padding-left:2px;vertical-align:top}.chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 0 0 8px;height:25px;border:1px solid #aaa;border-radius:5px;background-color:#fff;background:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#fff),color-stop(50%,#f6f6f6),color-stop(52%,#eee),to(#f4f4f4));background:linear-gradient(#fff 20%,#f6f6f6 50%,#eee 52%,#f4f4f4 100%);background-clip:padding-box;-webkit-box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);box-shadow:0 0 3px #fff inset,0 1px 1px rgba(0,0,0,.1);color:#444;text-decoration:none;white-space:nowrap;line-height:24px}.chosen-container-single .chosen-single input[type=text]{cursor:pointer;opacity:0;position:absolute;width:0}.chosen-container-single .chosen-default{color:#999}.chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap}.chosen-container-single .chosen-single-with-deselect span{margin-right:38px}.chosen-container-single .chosen-single abbr{position:absolute;top:6px;right:26px;display:block;width:12px;height:12px;background:url(chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-single .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single.chosen-disabled .chosen-single abbr:hover{background-position:-42px -10px}.chosen-container-single .chosen-single div{position:absolute;top:0;right:0;display:block;width:18px;height:100%}.chosen-container-single .chosen-single div b{display:block;width:100%;height:100%;background:url(chosen-sprite.png) no-repeat 0 2px}.chosen-container-single .chosen-search{position:relative;z-index:1010;margin:0;padding:3px 4px;white-space:nowrap}.chosen-container-single .chosen-search input[type=text]{margin:1px 0;padding:4px 20px 4px 5px;width:100%;height:auto;outline:0;border:1px solid #aaa;background:url(chosen-sprite.png) no-repeat 100% -20px;font-size:1em;font-family:sans-serif;line-height:normal;border-radius:0}.chosen-container-single .chosen-drop{margin-top:-1px;border-radius:0 0 4px 4px;background-clip:padding-box}.chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;opacity:0;pointer-events:none}.chosen-container .chosen-results{color:#444;position:relative;overflow-x:hidden;overflow-y:auto;margin:0 4px 4px 0;padding:0 0 0 4px;max-height:240px;-webkit-overflow-scrolling:touch}.chosen-container .chosen-results li{display:none;margin:0;padding:5px 6px;list-style:none;line-height:15px;word-wrap:break-word;-webkit-touch-callout:none}.chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer}.chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.chosen-container .chosen-results li.highlighted{background-color:#3875d7;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#3875d7),color-stop(90%,#2a62bc));background-image:linear-gradient(#3875d7 20%,#2a62bc 90%);color:#fff}.chosen-container .chosen-results li.no-results{color:#777;display:list-item;background:#f4f4f4}.chosen-container .chosen-results li.group-result{display:list-item;font-weight:700;cursor:default}.chosen-container .chosen-results li.group-option{padding-left:15px}.chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.chosen-container-multi .chosen-choices{position:relative;overflow:hidden;margin:0;padding:0 5px;width:100%;height:auto;border:1px solid #aaa;background-color:#fff;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(1%,#eee),color-stop(15%,#fff));background-image:linear-gradient(#eee 1%,#fff 15%);cursor:text}.chosen-container-multi .chosen-choices li{float:left;list-style:none}.chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.chosen-container-multi .chosen-choices li.search-field input[type=text]{margin:1px 0;padding:0;height:25px;outline:0;border:0!important;background:0 0!important;-webkit-box-shadow:none;box-shadow:none;color:#999;font-size:100%;font-family:sans-serif;line-height:normal;border-radius:0;width:25px}.chosen-container-multi .chosen-choices li.search-choice{position:relative;margin:3px 5px 3px 0;padding:3px 20px 3px 5px;border:1px solid #aaa;max-width:100%;border-radius:3px;background-color:#eee;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),to(#eee));background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);background-size:100% 19px;background-repeat:repeat-x;background-clip:padding-box;-webkit-box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);box-shadow:0 0 2px #fff inset,0 1px 0 rgba(0,0,0,.05);color:#333;line-height:13px;cursor:default}.chosen-container-multi .chosen-choices li.search-choice span{word-wrap:break-word}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close{position:absolute;top:4px;right:3px;display:block;width:12px;height:12px;background:url(chosen-sprite.png) -42px 1px no-repeat;font-size:1px}.chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover{background-position:-42px -10px}.chosen-container-multi .chosen-choices li.search-choice-disabled{padding-right:5px;border:1px solid #ccc;background-color:#e4e4e4;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#f4f4f4),color-stop(50%,#f0f0f0),color-stop(52%,#e8e8e8),to(#eee));background-image:linear-gradient(#f4f4f4 20%,#f0f0f0 50%,#e8e8e8 52%,#eee 100%);color:#666}.chosen-container-multi .chosen-choices li.search-choice-focus{background:#d4d4d4}.chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close{background-position:-42px -10px}.chosen-container-multi .chosen-results{margin:0;padding:0}.chosen-container-multi .chosen-drop .result-selected{display:list-item;color:#ccc;cursor:default}.chosen-container-active .chosen-single{border:1px solid #5897fb;-webkit-box-shadow:0 0 5px rgba(0,0,0,.3);box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #aaa;border-bottom-right-radius:0;border-bottom-left-radius:0;background-image:-webkit-gradient(linear,left top,left bottom,color-stop(20%,#eee),color-stop(80%,#fff));background-image:linear-gradient(#eee 20%,#fff 80%);-webkit-box-shadow:0 1px 0 #fff inset;box-shadow:0 1px 0 #fff inset}.chosen-container-active.chosen-with-drop .chosen-single div{border-left:none;background:0 0}.chosen-container-active.chosen-with-drop .chosen-single div b{background-position:-18px 2px}.chosen-container-active .chosen-choices{border:1px solid #5897fb;-webkit-box-shadow:0 0 5px rgba(0,0,0,.3);box-shadow:0 0 5px rgba(0,0,0,.3)}.chosen-container-active .chosen-choices li.search-field input[type=text]{color:#222!important}.chosen-disabled{opacity:.5!important;cursor:default}.chosen-disabled .chosen-single{cursor:default}.chosen-disabled .chosen-choices .search-choice .search-choice-close{cursor:default}.chosen-rtl{text-align:right}.chosen-rtl .chosen-single{overflow:visible;padding:0 8px 0 0}.chosen-rtl .chosen-single span{margin-right:0;margin-left:26px;direction:rtl}.chosen-rtl .chosen-single-with-deselect span{margin-left:38px}.chosen-rtl .chosen-single div{right:auto;left:3px}.chosen-rtl .chosen-single abbr{right:auto;left:26px}.chosen-rtl .chosen-choices li{float:right}.chosen-rtl .chosen-choices li.search-field input[type=text]{direction:rtl}.chosen-rtl .chosen-choices li.search-choice{margin:3px 5px 3px 0;padding:3px 5px 3px 19px}.chosen-rtl .chosen-choices li.search-choice .search-choice-close{right:auto;left:4px}.chosen-rtl.chosen-container-single .chosen-results{margin:0 0 4px 4px;padding:0 4px 0 0}.chosen-rtl .chosen-results li.group-option{padding-right:15px;padding-left:0}.chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div{border-right:none}.chosen-rtl .chosen-search input[type=text]{padding:4px 5px 4px 20px;background:url(chosen-sprite.png) no-repeat -30px -20px;direction:rtl}.chosen-rtl.chosen-container-single .chosen-single div b{background-position:6px 2px}.chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b{background-position:-12px 2px}@media only screen and (-webkit-min-device-pixel-ratio:1.5),only screen and (min-resolution:144dpi),only screen and (min-resolution:1.5dppx){.chosen-container .chosen-results-scroll-down span,.chosen-container .chosen-results-scroll-up span,.chosen-container-multi .chosen-choices .search-choice .search-choice-close,.chosen-container-single .chosen-search input[type=text],.chosen-container-single .chosen-single abbr,.chosen-container-single .chosen-single div b,.chosen-rtl .chosen-search input[type=text]{background-image:url(chosen-sprite@2x.png)!important;background-size:52px 37px!important;background-repeat:no-repeat!important}}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* @group Base */
2
+ .chzn-container {
3
+ font-size: 13px;
4
+ position: relative;
5
+ display: inline-block;
6
+ zoom: 1;
7
+ *display: inline;
8
+ }
9
+ .chzn-container .chzn-drop {
10
+ background: #fff;
11
+ border: 1px solid #aaa;
12
+ border-top: 0;
13
+ position: absolute;
14
+ top: 29px;
15
+ left: 0;
16
+ -webkit-box-shadow: 0 4px 5px rgba(0,0,0,.15);
17
+ -moz-box-shadow : 0 4px 5px rgba(0,0,0,.15);
18
+ box-shadow : 0 4px 5px rgba(0,0,0,.15);
19
+ z-index: 1010;
20
+ }
21
+ /* @end */
22
 
23
+ /* @group Single Chosen */
24
+ .chzn-container-single .chzn-single {
25
+ background-color: #ffffff;
26
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0 );
27
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(20%, #ffffff), color-stop(50%, #f6f6f6), color-stop(52%, #eeeeee), color-stop(100%, #f4f4f4));
28
+ background-image: -webkit-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
29
+ background-image: -moz-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
30
+ background-image: -o-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
31
+ background-image: linear-gradient(#ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%);
32
+ -webkit-border-radius: 5px;
33
+ -moz-border-radius : 5px;
34
+ border-radius : 5px;
35
+ -moz-background-clip : padding;
36
+ -webkit-background-clip: padding-box;
37
+ background-clip : padding-box;
38
+ border: 1px solid #aaaaaa;
39
+ -webkit-box-shadow: 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1);
40
+ -moz-box-shadow : 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1);
41
+ box-shadow : 0 0 3px #ffffff inset, 0 1px 1px rgba(0,0,0,0.1);
42
+ display: block;
43
+ overflow: hidden;
44
+ white-space: nowrap;
45
+ position: relative;
46
+ height: 23px;
47
+ line-height: 24px;
48
+ padding: 0 0 0 8px;
49
+ color: #444444;
50
+ text-decoration: none;
51
+ }
52
+ .chzn-container-single .chzn-default {
53
+ color: #999;
54
+ }
55
+ .chzn-container-single .chzn-single span {
56
+ margin-right: 26px;
57
+ display: block;
58
+ overflow: hidden;
59
+ white-space: nowrap;
60
+ -o-text-overflow: ellipsis;
61
+ -ms-text-overflow: ellipsis;
62
+ text-overflow: ellipsis;
63
+ }
64
+ .chzn-container-single .chzn-single abbr {
65
+ display: block;
66
+ position: absolute;
67
+ right: 26px;
68
+ top: 6px;
69
+ width: 12px;
70
+ height: 13px;
71
+ font-size: 1px;
72
+ background: url('../images/chosen-sprite.png') right top no-repeat;
73
+ }
74
+ .chzn-container-single .chzn-single abbr:hover {
75
+ background-position: right -11px;
76
+ }
77
+ .chzn-container-single.chzn-disabled .chzn-single abbr:hover {
78
+ background-position: right top;
79
+ }
80
+ .chzn-container-single .chzn-single div {
81
+ position: absolute;
82
+ right: 0;
83
+ top: 0;
84
+ display: block;
85
+ height: 100%;
86
+ width: 18px;
87
+ }
88
+ .chzn-container-single .chzn-single div b {
89
+ background: url('../images/chosen-sprite.png') no-repeat 0 0;
90
+ display: block;
91
+ width: 100%;
92
+ height: 100%;
93
+ }
94
+ .chzn-container-single .chzn-search {
95
+ padding: 3px 4px;
96
+ position: relative;
97
+ margin: 0;
98
+ white-space: nowrap;
99
+ z-index: 1010;
100
+ }
101
+ .chzn-container-single .chzn-search input {
102
+ background: #fff url('../images/chosen-sprite.png') no-repeat 100% -22px;
103
+ background: url('../images/chosen-sprite.png') no-repeat 100% -22px, -webkit-gradient(linear, 0 0, 0 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
104
+ background: url('../images/chosen-sprite.png') no-repeat 100% -22px, -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
105
+ background: url('../images/chosen-sprite.png') no-repeat 100% -22px, -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
106
+ background: url('../images/chosen-sprite.png') no-repeat 100% -22px, -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
107
+ background: url('../images/chosen-sprite.png') no-repeat 100% -22px, linear-gradient(#eeeeee 1%, #ffffff 15%);
108
+ margin: 1px 0;
109
+ padding: 4px 20px 4px 5px;
110
+ outline: 0;
111
+ border: 1px solid #aaa;
112
+ font-family: sans-serif;
113
+ font-size: 1em;
114
+ }
115
+ .chzn-container-single .chzn-drop {
116
+ -webkit-border-radius: 0 0 4px 4px;
117
+ -moz-border-radius : 0 0 4px 4px;
118
+ border-radius : 0 0 4px 4px;
119
+ -moz-background-clip : padding;
120
+ -webkit-background-clip: padding-box;
121
+ background-clip : padding-box;
122
+ }
123
+ /* @end */
124
 
125
+ .chzn-container-single-nosearch .chzn-search input {
126
+ position: absolute;
127
+ left: -9000px;
128
+ }
129
+
130
+ /* @group Multi Chosen */
131
+ .chzn-container-multi .chzn-choices {
132
+ background-color: #fff;
133
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
134
+ background-image: -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
135
+ background-image: -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
136
+ background-image: -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
137
+ background-image: linear-gradient(#eeeeee 1%, #ffffff 15%);
138
+ border: 1px solid #aaa;
139
+ margin: 0;
140
+ padding: 0;
141
+ cursor: text;
142
+ overflow: hidden;
143
+ height: auto !important;
144
+ height: 1%;
145
+ position: relative;
146
+ }
147
+ .chzn-container-multi .chzn-choices li {
148
+ float: left;
149
+ list-style: none;
150
+ }
151
+ .chzn-container-multi .chzn-choices .search-field {
152
+ white-space: nowrap;
153
+ margin: 0;
154
+ padding: 0;
155
+ }
156
+ .chzn-container-multi .chzn-choices .search-field input {
157
+ color: #666;
158
+ background: transparent !important;
159
+ border: 0 !important;
160
+ font-family: sans-serif;
161
+ font-size: 100%;
162
+ height: 15px;
163
+ padding: 5px;
164
+ margin: 1px 0;
165
+ outline: 0;
166
+ -webkit-box-shadow: none;
167
+ -moz-box-shadow : none;
168
+ box-shadow : none;
169
+ }
170
+ .chzn-container-multi .chzn-choices .search-field .default {
171
+ color: #999;
172
+ padding:0 2px;
173
+ height:25px;
174
+ }
175
+ .chzn-container-multi .chzn-choices .search-choice {
176
+ -webkit-border-radius: 3px;
177
+ -moz-border-radius : 3px;
178
+ border-radius : 3px;
179
+ -moz-background-clip : padding;
180
+ -webkit-background-clip: padding-box;
181
+ background-clip : padding-box;
182
+ background-color: #e4e4e4;
183
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f4f4', endColorstr='#eeeeee', GradientType=0 );
184
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
185
+ background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
186
+ background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
187
+ background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
188
+ background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
189
+ -webkit-box-shadow: 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
190
+ -moz-box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
191
+ box-shadow : 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
192
+ color: #333;
193
+ border: 1px solid #aaaaaa;
194
+ line-height: 13px;
195
+ padding: 3px 20px 3px 5px;
196
+ margin: 3px 0 3px 5px;
197
+ position: relative;
198
+ cursor: default;
199
+ }
200
+ .chzn-container-multi .chzn-choices .search-choice.search-choice-disabled {
201
+ background-color: #e4e4e4;
202
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f4f4', endColorstr='#eeeeee', GradientType=0 );
203
+ background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
204
+ background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
205
+ background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
206
+ background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
207
+ background-image: -ms-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
208
+ background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
209
+ color: #666;
210
+ border: 1px solid #cccccc;
211
+ padding-right: 5px;
212
+ }
213
+ .chzn-container-multi .chzn-choices .search-choice-focus {
214
+ background: #d4d4d4;
215
+ }
216
+ .chzn-container-multi .chzn-choices .search-choice .search-choice-close {
217
+ display: block;
218
+ position: absolute;
219
+ right: 3px;
220
+ top: 4px;
221
+ width: 12px;
222
+ height: 13px;
223
+ font-size: 1px;
224
+ background: url('../images/chosen-sprite.png') right top no-repeat;
225
+ }
226
+ .chzn-container-multi .chzn-choices .search-choice .search-choice-close:hover {
227
+ background-position: right -11px;
228
+ }
229
+ .chzn-container-multi .chzn-choices .search-choice-focus .search-choice-close {
230
+ background-position: right -11px;
231
+ }
232
+ /* @end */
233
+
234
+ /* @group Results */
235
+ .chzn-container .chzn-results {
236
+ margin: 0 4px 4px 0;
237
+ max-height: 240px;
238
+ padding: 0 0 0 4px;
239
+ position: relative;
240
+ overflow-x: hidden;
241
+ overflow-y: auto;
242
+ -webkit-overflow-scrolling: touch;
243
+ }
244
+ .chzn-container-multi .chzn-results {
245
+ margin: -1px 0 0;
246
+ padding: 0;
247
+ }
248
+ .chzn-container .chzn-results li {
249
+ display: none;
250
+ line-height: 15px;
251
+ padding: 5px 6px;
252
+ margin: 0;
253
+ list-style: none;
254
+ }
255
+ .chzn-container .chzn-results .active-result {
256
+ cursor: pointer;
257
+ display: list-item;
258
+ }
259
+ .chzn-container .chzn-results .highlighted {
260
+ background-color: #3875d7;
261
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3875d7', endColorstr='#2a62bc', GradientType=0 );
262
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(20%, #3875d7), color-stop(90%, #2a62bc));
263
+ background-image: -webkit-linear-gradient(top, #3875d7 20%, #2a62bc 90%);
264
+ background-image: -moz-linear-gradient(top, #3875d7 20%, #2a62bc 90%);
265
+ background-image: -o-linear-gradient(top, #3875d7 20%, #2a62bc 90%);
266
+ background-image: linear-gradient(#3875d7 20%, #2a62bc 90%);
267
+ color: #fff;
268
+ }
269
+ .chzn-container .chzn-results li em {
270
+ background: #feffde;
271
+ font-style: normal;
272
+ }
273
+ .chzn-container .chzn-results .highlighted em {
274
+ background: transparent;
275
+ }
276
+ .chzn-container .chzn-results .no-results {
277
+ background: #f4f4f4;
278
+ display: list-item;
279
+ }
280
+ .chzn-container .chzn-results .group-result {
281
+ cursor: default;
282
+ color: #999;
283
+ font-weight: bold;
284
+ }
285
+ .chzn-container .chzn-results .group-option {
286
+ padding-left: 15px;
287
+ }
288
+ .chzn-container-multi .chzn-drop .result-selected {
289
+ display: none;
290
+ }
291
+ .chzn-container .chzn-results-scroll {
292
+ background: white;
293
+ margin: 0 4px;
294
+ position: absolute;
295
+ text-align: center;
296
+ width: 321px; /* This should by dynamic with js */
297
+ z-index: 1;
298
+ }
299
+ .chzn-container .chzn-results-scroll span {
300
+ display: inline-block;
301
+ height: 17px;
302
+ text-indent: -5000px;
303
+ width: 9px;
304
+ }
305
+ .chzn-container .chzn-results-scroll-down {
306
+ bottom: 0;
307
+ }
308
+ .chzn-container .chzn-results-scroll-down span {
309
+ background: url('../images/chosen-sprite.png') no-repeat -4px -3px;
310
+ }
311
+ .chzn-container .chzn-results-scroll-up span {
312
+ background: url('../images/chosen-sprite.png') no-repeat -22px -3px;
313
+ }
314
+ /* @end */
315
+
316
+ /* @group Active */
317
+ .chzn-container-active .chzn-single {
318
+ -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
319
+ -moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
320
+ box-shadow : 0 0 5px rgba(0,0,0,.3);
321
+ border: 1px solid #5897fb;
322
+ }
323
+ .chzn-container-active .chzn-single-with-drop {
324
+ border: 1px solid #aaa;
325
+ -webkit-box-shadow: 0 1px 0 #fff inset;
326
+ -moz-box-shadow : 0 1px 0 #fff inset;
327
+ box-shadow : 0 1px 0 #fff inset;
328
+ background-color: #eee;
329
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#ffffff', GradientType=0 );
330
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, color-stop(20%, #eeeeee), color-stop(80%, #ffffff));
331
+ background-image: -webkit-linear-gradient(top, #eeeeee 20%, #ffffff 80%);
332
+ background-image: -moz-linear-gradient(top, #eeeeee 20%, #ffffff 80%);
333
+ background-image: -o-linear-gradient(top, #eeeeee 20%, #ffffff 80%);
334
+ background-image: linear-gradient(#eeeeee 20%, #ffffff 80%);
335
+ -webkit-border-bottom-left-radius : 0;
336
+ -webkit-border-bottom-right-radius: 0;
337
+ -moz-border-radius-bottomleft : 0;
338
+ -moz-border-radius-bottomright: 0;
339
+ border-bottom-left-radius : 0;
340
+ border-bottom-right-radius: 0;
341
+ }
342
+ .chzn-container-active .chzn-single-with-drop div {
343
+ background: transparent;
344
+ border-left: none;
345
+ }
346
+ .chzn-container-active .chzn-single-with-drop div b {
347
+ background-position: -18px 1px;
348
+ }
349
+ .chzn-container-active .chzn-choices {
350
+ -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
351
+ -moz-box-shadow : 0 0 5px rgba(0,0,0,.3);
352
+ box-shadow : 0 0 5px rgba(0,0,0,.3);
353
+ border: 1px solid #5897fb;
354
+ }
355
+ .chzn-container-active .chzn-choices .search-field input {
356
+ color: #111 !important;
357
+ }
358
+ /* @end */
359
+
360
+ /* @group Disabled Support */
361
+ .chzn-disabled {
362
+ cursor: default;
363
+ opacity:0.5 !important;
364
+ }
365
+ .chzn-disabled .chzn-single {
366
+ cursor: default;
367
+ }
368
+ .chzn-disabled .chzn-choices .search-choice .search-choice-close {
369
+ cursor: default;
370
+ }
371
+
372
+ /* @group Right to Left */
373
+ .chzn-rtl { text-align: right; }
374
+ .chzn-rtl .chzn-single { padding: 0 8px 0 0; overflow: visible; }
375
+ .chzn-rtl .chzn-single span { margin-left: 26px; margin-right: 0; direction: rtl; }
376
+
377
+ .chzn-rtl .chzn-single div { left: 3px; right: auto; }
378
+ .chzn-rtl .chzn-single abbr {
379
+ left: 26px;
380
+ right: auto;
381
+ }
382
+ .chzn-rtl .chzn-choices .search-field input { direction: rtl; }
383
+ .chzn-rtl .chzn-choices li { float: right; }
384
+ .chzn-rtl .chzn-choices .search-choice { padding: 3px 5px 3px 19px; margin: 3px 5px 3px 0; }
385
+ .chzn-rtl .chzn-choices .search-choice .search-choice-close { left: 4px; right: auto; background-position: right top;}
386
+ .chzn-rtl.chzn-container-single .chzn-results { margin: 0 0 4px 4px; padding: 0 4px 0 0; }
387
+ .chzn-rtl .chzn-results .group-option { padding-left: 0; padding-right: 15px; }
388
+ .chzn-rtl.chzn-container-active .chzn-single-with-drop div { border-right: none; }
389
+ .chzn-rtl .chzn-search input {
390
+ background: #fff url('../images/chosen-sprite.png') no-repeat -38px -22px;
391
+ background: url('../images/chosen-sprite.png') no-repeat -38px -22px, -webkit-gradient(linear, 0 0, 0 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
392
+ background: url('../images/chosen-sprite.png') no-repeat -38px -22px, -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
393
+ background: url('../images/chosen-sprite.png') no-repeat -38px -22px, -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
394
+ background: url('../images/chosen-sprite.png') no-repeat -38px -22px, -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
395
+ background: url('../images/chosen-sprite.png') no-repeat -38px -22px, linear-gradient(#eeeeee 1%, #ffffff 15%);
396
+ padding: 4px 5px 4px 20px;
397
+ direction: rtl;
398
+ }
399
+ /* @end */
includes/admin/meta/css/jqueryui.css CHANGED
File without changes
includes/admin/meta/css/meta_box.css CHANGED
@@ -28,7 +28,7 @@
28
 
29
  /* repeatable */
30
  .form-table.meta_box .meta_box_repeatable {
31
- width:100%;
32
  }
33
  .form-table.meta_box .meta_box_repeatable th {
34
  width:auto !important;
@@ -37,7 +37,6 @@
37
  text-transform:uppercase;
38
  font-size:10px;
39
  text-shadow:none;
40
- color:#ccc;
41
  }
42
 
43
  .form-table.meta_box .meta_box_repeatable tfoot th {
@@ -49,7 +48,7 @@
49
  vertical-align:top;
50
  padding:10px;
51
  border-bottom:1px dashed #ccc;
52
- background:#fbfbfb;
53
  }
54
 
55
  .form-table.meta_box .meta_box_repeatable tr:nth-child(even) td {
@@ -116,7 +115,6 @@
116
  /*background:url(../images/sprite.png);*/
117
  margin-top:5px;
118
  text-decoration:none;
119
- cursor: pointer !important;
120
  }
121
 
122
  .meta_box_repeatable_add {
@@ -162,11 +160,7 @@
162
 
163
  /* Select */
164
  .form-table select {
165
- width:auto;
166
- }
167
-
168
- .chosen-container-multi {
169
- width: 95% !important;
170
  }
171
 
172
  .widget-content .meta_box_repeatable select {
@@ -221,7 +215,7 @@
221
  /**
222
  * Repeatable Row Styles
223
  */
224
- .meta_box_repeatable .meta_box_repeatable_row {
225
  width:100%;
226
  }
227
  .form-table.meta_box .meta_box_repeatable_row td * {
@@ -234,18 +228,18 @@
234
  display:block;
235
  float: left;
236
  padding: 5px;
237
- /*min-height: 60px;*/
238
  }
239
  .form-table.meta_box .meta_box_repeatable_row select/*,
240
  .form-table.meta_box .meta_box_repeatable_row textarea */ {
241
  max-width: 120px;
242
  width:120px;
243
- }/*
244
  .form-table.meta_box .meta_box_repeatable_row .small-text{
245
  max-width: 280px;
246
  width: 280px;
247
  height: 28px;
248
- }*/
249
  .form-table.meta_box .meta_box_repeatable_row input[type=radio],
250
  .form-table.meta_box .meta_box_repeatable_row input[type=checkbox] {
251
  float: left;
@@ -256,28 +250,22 @@
256
  line-height:inherit;
257
  float:none;
258
  }
259
- .meta_box_repeatable .description {
260
  font-size:11px;
261
  font-weight:300;
262
  }
263
- .meta_box_repeatable .meta_box_repeatable_remove,
264
- .meta_box_repeatable .ui-sortable-handle {
265
- border: none;
266
- }
267
- .meta_box_repeatable .meta_box_repeatable_remove:hover,
268
- .meta_box_repeatable .ui-sortable-handle:hover {
269
- cursor:move;
270
- }
271
- .meta_box_repeatable .meta_box_repeatable_remove{
272
  color:#ccc;
 
273
  }
274
- .meta_box_repeatable .meta_box_repeatable_remove:hover {
275
  color:#cc0000;
276
  }
277
- .meta_box_repeatable .ui-sortable-handle:hover {
278
  color:#333;
279
  }
280
- .meta_box_repeatable .dashicons {
281
  font-size:14px;
282
  width: 14px;
283
  height: 14px;
@@ -509,12 +497,6 @@
509
  margin-bottom: -16px;
510
  }
511
 
512
- /* Criteria fields */
513
- .criteria_fields {
514
- float: left;
515
- margin-right: 10px !important;
516
- }
517
-
518
  /* Custom */
519
  #schema_article {
520
  display: none;
@@ -526,15 +508,9 @@
526
  margin-bottom: 20px;
527
  display: block;
528
  }
529
- #_schema_review_pros-repeatable input,
530
- #_schema_review_cons-repeatable input {
531
- float:left;
532
- }
533
- .form-table.meta_box .meta_box_repeatable td * {
534
- margin:0;
535
- }
536
  /* Remove "+ Add New Category" */
537
- .post-type-schema .taxonomy-add-new {
538
  display:none;
539
  }
540
 
@@ -562,4 +538,4 @@
562
  }
563
  #schema_post_meta_box textarea:-ms-input-placeholder {
564
  color: #ccc;
565
- }
28
 
29
  /* repeatable */
30
  .form-table.meta_box .meta_box_repeatable {
31
+ width:510px;
32
  }
33
  .form-table.meta_box .meta_box_repeatable th {
34
  width:auto !important;
37
  text-transform:uppercase;
38
  font-size:10px;
39
  text-shadow:none;
 
40
  }
41
 
42
  .form-table.meta_box .meta_box_repeatable tfoot th {
48
  vertical-align:top;
49
  padding:10px;
50
  border-bottom:1px dashed #ccc;
51
+ background:#eee;
52
  }
53
 
54
  .form-table.meta_box .meta_box_repeatable tr:nth-child(even) td {
115
  /*background:url(../images/sprite.png);*/
116
  margin-top:5px;
117
  text-decoration:none;
 
118
  }
119
 
120
  .meta_box_repeatable_add {
160
 
161
  /* Select */
162
  .form-table select {
163
+ width:25em;
 
 
 
 
164
  }
165
 
166
  .widget-content .meta_box_repeatable select {
215
  /**
216
  * Repeatable Row Styles
217
  */
218
+ .form-table.meta_box .meta_box_repeatable_row {
219
  width:100%;
220
  }
221
  .form-table.meta_box .meta_box_repeatable_row td * {
228
  display:block;
229
  float: left;
230
  padding: 5px;
231
+ min-height: 60px;
232
  }
233
  .form-table.meta_box .meta_box_repeatable_row select/*,
234
  .form-table.meta_box .meta_box_repeatable_row textarea */ {
235
  max-width: 120px;
236
  width:120px;
237
+ }
238
  .form-table.meta_box .meta_box_repeatable_row .small-text{
239
  max-width: 280px;
240
  width: 280px;
241
  height: 28px;
242
+ }
243
  .form-table.meta_box .meta_box_repeatable_row input[type=radio],
244
  .form-table.meta_box .meta_box_repeatable_row input[type=checkbox] {
245
  float: left;
250
  line-height:inherit;
251
  float:none;
252
  }
253
+ .form-table.meta_box .meta_box_repeatable_row .description {
254
  font-size:11px;
255
  font-weight:300;
256
  }
257
+ .form-table.meta_box .meta_box_repeatable_row .meta_box_repeatable_remove,
258
+ .form-table.meta_box .meta_box_repeatable_row .ui-sortable-handle {
 
 
 
 
 
 
 
259
  color:#ccc;
260
+ border: none;
261
  }
262
+ .form-table.meta_box .meta_box_repeatable_row .meta_box_repeatable_remove:hover {
263
  color:#cc0000;
264
  }
265
+ .form-table.meta_box .meta_box_repeatable_row .ui-sortable-handle:hover {
266
  color:#333;
267
  }
268
+ .form-table.meta_box .meta_box_repeatable_row .dashicons {
269
  font-size:14px;
270
  width: 14px;
271
  height: 14px;
497
  margin-bottom: -16px;
498
  }
499
 
 
 
 
 
 
 
500
  /* Custom */
501
  #schema_article {
502
  display: none;
508
  margin-bottom: 20px;
509
  display: block;
510
  }
511
+
 
 
 
 
 
 
512
  /* Remove "+ Add New Category" */
513
+ #category-adder {
514
  display:none;
515
  }
516
 
538
  }
539
  #schema_post_meta_box textarea:-ms-input-placeholder {
540
  color: #ccc;
541
+ }
includes/admin/meta/images/chosen-sprite.png CHANGED
File without changes
includes/admin/meta/images/image.png CHANGED
File without changes
includes/admin/meta/images/sprite.png CHANGED
File without changes
includes/admin/meta/js/chosen.js CHANGED
@@ -1,3 +1,10 @@
1
- /* Chosen v1.8.5 | (c) 2011-2018 by Harvest | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md */
2
 
3
- (function(){var t,e,s,i,n=function(t,e){return function(){return t.apply(e,arguments)}},o=function(t,e){function s(){this.constructor=t}for(var i in e)r.call(e,i)&&(t[i]=e[i]);return s.prototype=e.prototype,t.prototype=new s,t.__super__=e.prototype,t},r={}.hasOwnProperty;(i=function(){function t(){this.options_index=0,this.parsed=[]}return t.prototype.add_node=function(t){return"OPTGROUP"===t.nodeName.toUpperCase()?this.add_group(t):this.add_option(t)},t.prototype.add_group=function(t){var e,s,i,n,o,r;for(e=this.parsed.length,this.parsed.push({array_index:e,group:!0,label:t.label,title:t.title?t.title:void 0,children:0,disabled:t.disabled,classes:t.className}),r=[],s=0,i=(o=t.childNodes).length;s<i;s++)n=o[s],r.push(this.add_option(n,e,t.disabled));return r},t.prototype.add_option=function(t,e,s){if("OPTION"===t.nodeName.toUpperCase())return""!==t.text?(null!=e&&(this.parsed[e].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:t.value,text:t.text,html:t.innerHTML,title:t.title?t.title:void 0,selected:t.selected,disabled:!0===s?s:t.disabled,group_array_index:e,group_label:null!=e?this.parsed[e].label:null,classes:t.className,style:t.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},t}()).select_to_array=function(t){var e,s,n,o,r;for(o=new i,s=0,n=(r=t.childNodes).length;s<n;s++)e=r[s],o.add_node(e);return o.parsed},e=function(){function t(e,s){this.form_field=e,this.options=null!=s?s:{},this.label_click_handler=n(this.label_click_handler,this),t.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return t.prototype.set_default_values=function(){return this.click_test_action=function(t){return function(e){return t.test_active_click(e)}}(this),this.activate_action=function(t){return function(e){return t.activate_field(e)}}(this),this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.is_rtl=this.options.rtl||/\bchosen-rtl\b/.test(this.form_field.className),this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text&&this.options.allow_single_deselect,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null==this.options.enable_split_word_search||this.options.enable_split_word_search,this.group_search=null==this.options.group_search||this.options.group_search,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null==this.options.single_backstroke_delete||this.options.single_backstroke_delete,this.max_selected_options=this.options.max_selected_options||Infinity,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null==this.options.display_selected_options||this.options.display_selected_options,this.display_disabled_options=null==this.options.display_disabled_options||this.options.display_disabled_options,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY,this.case_sensitive_search=this.options.case_sensitive_search||!1,this.hide_results_on_select=null==this.options.hide_results_on_select||this.options.hide_results_on_select},t.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||t.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||t.default_single_text,this.default_text=this.escape_html(this.default_text),this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||t.default_no_result_text},t.prototype.choice_label=function(t){return this.include_group_label_in_selected&&null!=t.group_label?"<b class='group-name'>"+t.group_label+"</b>"+t.html:t.html},t.prototype.mouse_enter=function(){return this.mouse_on_container=!0},t.prototype.mouse_leave=function(){return this.mouse_on_container=!1},t.prototype.input_focus=function(t){if(this.is_multiple){if(!this.active_field)return setTimeout(function(t){return function(){return t.container_mousedown()}}(this),50)}else if(!this.active_field)return this.activate_field()},t.prototype.input_blur=function(t){if(!this.mouse_on_container)return this.active_field=!1,setTimeout(function(t){return function(){return t.blur_test()}}(this),100)},t.prototype.label_click_handler=function(t){return this.is_multiple?this.container_mousedown(t):this.activate_field()},t.prototype.results_option_build=function(t){var e,s,i,n,o,r,h;for(e="",h=0,n=0,o=(r=this.results_data).length;n<o&&(s=r[n],i="",""!==(i=s.group?this.result_add_group(s):this.result_add_option(s))&&(h++,e+=i),(null!=t?t.first:void 0)&&(s.selected&&this.is_multiple?this.choice_build(s):s.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(s))),!(h>=this.max_shown_results));n++);return e},t.prototype.result_add_option=function(t){var e,s;return t.search_match&&this.include_option_in_results(t)?(e=[],t.disabled||t.selected&&this.is_multiple||e.push("active-result"),!t.disabled||t.selected&&this.is_multiple||e.push("disabled-result"),t.selected&&e.push("result-selected"),null!=t.group_array_index&&e.push("group-option"),""!==t.classes&&e.push(t.classes),s=document.createElement("li"),s.className=e.join(" "),t.style&&(s.style.cssText=t.style),s.setAttribute("data-option-array-index",t.array_index),s.innerHTML=t.highlighted_html||t.html,t.title&&(s.title=t.title),this.outerHTML(s)):""},t.prototype.result_add_group=function(t){var e,s;return(t.search_match||t.group_match)&&t.active_options>0?((e=[]).push("group-result"),t.classes&&e.push(t.classes),s=document.createElement("li"),s.className=e.join(" "),s.innerHTML=t.highlighted_html||this.escape_html(t.label),t.title&&(s.title=t.title),this.outerHTML(s)):""},t.prototype.results_update_field=function(){if(this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing)return this.winnow_results()},t.prototype.reset_single_select_options=function(){var t,e,s,i,n;for(n=[],t=0,e=(s=this.results_data).length;t<e;t++)(i=s[t]).selected?n.push(i.selected=!1):n.push(void 0);return n},t.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},t.prototype.results_search=function(t){return this.results_showing?this.winnow_results():this.results_show()},t.prototype.winnow_results=function(t){var e,s,i,n,o,r,h,l,c,_,a,u,d,f,p;for(this.no_results_clear(),_=0,e=(h=this.get_search_text()).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),c=this.get_search_regex(e),i=0,n=(l=this.results_data).length;i<n;i++)(o=l[i]).search_match=!1,a=null,u=null,o.highlighted_html="",this.include_option_in_results(o)&&(o.group&&(o.group_match=!1,o.active_options=0),null!=o.group_array_index&&this.results_data[o.group_array_index]&&(0===(a=this.results_data[o.group_array_index]).active_options&&a.search_match&&(_+=1),a.active_options+=1),p=o.group?o.label:o.text,o.group&&!this.group_search||(u=this.search_string_match(p,c),o.search_match=null!=u,o.search_match&&!o.group&&(_+=1),o.search_match?(h.length&&(d=u.index,r=p.slice(0,d),s=p.slice(d,d+h.length),f=p.slice(d+h.length),o.highlighted_html=this.escape_html(r)+"<em>"+this.escape_html(s)+"</em>"+this.escape_html(f)),null!=a&&(a.group_match=!0)):null!=o.group_array_index&&this.results_data[o.group_array_index].search_match&&(o.search_match=!0)));return this.result_clear_highlight(),_<1&&h.length?(this.update_results_content(""),this.no_results(h)):(this.update_results_content(this.results_option_build()),(null!=t?t.skip_highlight:void 0)?void 0:this.winnow_results_set_highlight())},t.prototype.get_search_regex=function(t){var e,s;return s=this.search_contains?t:"(^|\\s|\\b)"+t+"[^\\s]*",this.enable_split_word_search||this.search_contains||(s="^"+s),e=this.case_sensitive_search?"":"i",new RegExp(s,e)},t.prototype.search_string_match=function(t,e){var s;return s=e.exec(t),!this.search_contains&&(null!=s?s[1]:void 0)&&(s.index+=1),s},t.prototype.choices_count=function(){var t,e,s;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,t=0,e=(s=this.form_field.options).length;t<e;t++)s[t].selected&&(this.selected_option_count+=1);return this.selected_option_count},t.prototype.choices_click=function(t){if(t.preventDefault(),this.activate_field(),!this.results_showing&&!this.is_disabled)return this.results_show()},t.prototype.keydown_checker=function(t){var e,s;switch(s=null!=(e=t.which)?e:t.keyCode,this.search_field_scale(),8!==s&&this.pending_backstroke&&this.clear_backstroke(),s){case 8:this.backstroke_length=this.get_search_field_value().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(t),this.mouse_on_container=!1;break;case 13:case 27:this.results_showing&&t.preventDefault();break;case 32:this.disable_search&&t.preventDefault();break;case 38:t.preventDefault(),this.keyup_arrow();break;case 40:t.preventDefault(),this.keydown_arrow()}},t.prototype.keyup_checker=function(t){var e,s;switch(s=null!=(e=t.which)?e:t.keyCode,this.search_field_scale(),s){case 8:this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0?this.keydown_backstroke():this.pending_backstroke||(this.result_clear_highlight(),this.results_search());break;case 13:t.preventDefault(),this.results_showing&&this.result_select(t);break;case 27:this.results_showing&&this.results_hide();break;case 9:case 16:case 17:case 18:case 38:case 40:case 91:break;default:this.results_search()}},t.prototype.clipboard_event_checker=function(t){if(!this.is_disabled)return setTimeout(function(t){return function(){return t.results_search()}}(this),50)},t.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},t.prototype.include_option_in_results=function(t){return!(this.is_multiple&&!this.display_selected_options&&t.selected)&&(!(!this.display_disabled_options&&t.disabled)&&!t.empty)},t.prototype.search_results_touchstart=function(t){return this.touch_started=!0,this.search_results_mouseover(t)},t.prototype.search_results_touchmove=function(t){return this.touch_started=!1,this.search_results_mouseout(t)},t.prototype.search_results_touchend=function(t){if(this.touch_started)return this.search_results_mouseup(t)},t.prototype.outerHTML=function(t){var e;return t.outerHTML?t.outerHTML:((e=document.createElement("div")).appendChild(t),e.innerHTML)},t.prototype.get_single_html=function(){return'<a class="chosen-single chosen-default">\n <input class="chosen-focus-input" type="text" autocomplete="off" />\n <span>'+this.default_text+'</span>\n <div><b></b></div>\n</a>\n<div class="chosen-drop">\n <div class="chosen-search">\n <input class="chosen-search-input" type="text" autocomplete="off" />\n </div>\n <ul class="chosen-results"></ul>\n</div>'},t.prototype.get_multi_html=function(){return'<ul class="chosen-choices">\n <li class="search-field">\n <input class="chosen-search-input" type="text" autocomplete="off" value="'+this.default_text+'" />\n </li>\n</ul>\n<div class="chosen-drop">\n <ul class="chosen-results"></ul>\n</div>'},t.prototype.get_no_results_html=function(t){return'<li class="no-results">\n '+this.results_none_found+" <span>"+this.escape_html(t)+"</span>\n</li>"},t.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!(/iP(od|hone)/i.test(window.navigator.userAgent)||/IEMobile/i.test(window.navigator.userAgent)||/Windows Phone/i.test(window.navigator.userAgent)||/BlackBerry/i.test(window.navigator.userAgent)||/BB10/i.test(window.navigator.userAgent)||/Android.*Mobile/i.test(window.navigator.userAgent))},t.default_multiple_text="Select Some Options",t.default_single_text="Select an Option",t.default_no_result_text="No results match",t}(),(t=jQuery).fn.extend({chosen:function(i){return e.browser_is_supported()?this.each(function(e){var n,o;o=(n=t(this)).data("chosen"),"destroy"!==i?o instanceof s||n.data("chosen",new s(this,i)):o instanceof s&&o.destroy()}):this}}),s=function(s){function n(){return n.__super__.constructor.apply(this,arguments)}return o(n,e),n.prototype.setup=function(){return this.form_field_jq=t(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex},n.prototype.set_up_html=function(){var e,s;return(e=["chosen-container"]).push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&e.push(this.form_field.className),this.is_rtl&&e.push("chosen-rtl"),s={"class":e.join(" "),title:this.form_field.title},this.form_field.id.length&&(s.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=t("<div />",s),this.container.width(this.container_width()),this.is_multiple?this.container.html(this.get_multi_html()):this.container.html(this.get_single_html()),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input.chosen-search-input"),this.focus_field=this.container.find("input.chosen-focus-input"),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},n.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},n.prototype.register_observers=function(){var t;return this.container.on("touchstart.chosen",function(t){return function(e){t.container_mousedown(e)}}(this)),this.container.on("touchend.chosen",function(t){return function(e){t.container_mouseup(e)}}(this)),this.container.on("mousedown.chosen",function(t){return function(e){t.container_mousedown(e)}}(this)),this.container.on("mouseup.chosen",function(t){return function(e){t.container_mouseup(e)}}(this)),this.container.on("mouseenter.chosen",function(t){return function(e){t.mouse_enter(e)}}(this)),this.container.on("mouseleave.chosen",function(t){return function(e){t.mouse_leave(e)}}(this)),this.search_results.on("mouseup.chosen",function(t){return function(e){t.search_results_mouseup(e)}}(this)),this.search_results.on("mouseover.chosen",function(t){return function(e){t.search_results_mouseover(e)}}(this)),this.search_results.on("mouseout.chosen",function(t){return function(e){t.search_results_mouseout(e)}}(this)),this.search_results.on("mousewheel.chosen DOMMouseScroll.chosen",function(t){return function(e){t.search_results_mousewheel(e)}}(this)),this.search_results.on("touchstart.chosen",function(t){return function(e){t.search_results_touchstart(e)}}(this)),this.search_results.on("touchmove.chosen",function(t){return function(e){t.search_results_touchmove(e)}}(this)),this.search_results.on("touchend.chosen",function(t){return function(e){t.search_results_touchend(e)}}(this)),this.form_field_jq.on("chosen:updated.chosen",function(t){return function(e){t.results_update_field(e)}}(this)),this.form_field_jq.on("chosen:activate.chosen",function(t){return function(e){t.activate_field(e)}}(this)),this.form_field_jq.on("chosen:open.chosen",function(t){return function(e){t.container_mousedown(e)}}(this)),this.form_field_jq.on("chosen:close.chosen",function(t){return function(e){t.close_field(e)}}(this)),this.search_field.on("blur.chosen",function(t){return function(e){t.input_blur(e)}}(this)),this.search_field.on("keyup.chosen",function(t){return function(e){t.keyup_checker(e)}}(this)),this.search_field.on("keydown.chosen",function(t){return function(e){t.keydown_checker(e)}}(this)),this.search_field.on("focus.chosen",function(t){return function(e){t.input_focus(e)}}(this)),this.search_field.on("cut.chosen",function(t){return function(e){t.clipboard_event_checker(e)}}(this)),this.search_field.on("paste.chosen",function(t){return function(e){t.clipboard_event_checker(e)}}(this)),this.is_multiple?this.search_choices.on("click.chosen",function(t){return function(e){t.choices_click(e)}}(this)):(this.container.on("click.chosen",function(t){t.preventDefault()}),this.focus_field.on("blur.chosen",function(t){return function(e){t.input_blur(e)}}(this)),this.focus_field.on("focus.chosen",function(t){return function(e){t.input_focus(e)}}(this)),t=function(t){return function(){return t.search_field.val(t.focus_field.val()),t.focus_field.val("")}}(this),this.focus_field.on("keyup.chosen",function(e){return function(s){t(),e.keyup_checker(s)}}(this)),this.focus_field.on("keydown.chosen",function(e){return function(s){t(),e.keydown_checker(s)}}(this)),this.focus_field.on("cut.chosen",function(e){return function(s){setTimeout(t,0),e.clipboard_event_checker(s)}}(this)),this.focus_field.on("paste.chosen",function(e){return function(s){setTimeout(t,0),e.clipboard_event_checker(s)}}(this)))},n.prototype.destroy=function(){return t(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.form_field_label.length>0&&this.form_field_label.off("click.chosen"),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},n.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field.disabled||this.form_field_jq.parents("fieldset").is(":disabled"),this.container.toggleClass("chosen-disabled",this.is_disabled),this.search_field[0].disabled=this.is_disabled,this.is_multiple||this.selected_item.off("focus.chosen",this.activate_field),this.is_disabled?this.close_field():this.is_multiple?void 0:this.selected_item.on("focus.chosen",this.activate_field)},n.prototype.container_mousedown=function(e){var s;if(!this.is_disabled)return!e||"mousedown"!==(s=e.type)&&"touchstart"!==s||this.results_showing||e.preventDefault(),null!=e&&t(e.target).hasClass("search-choice-close")?void 0:(this.active_field?this.is_multiple||!e||t(e.target)[0]!==this.selected_item[0]&&!t(e.target).parents("a.chosen-single").length||(e.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),t(this.container[0].ownerDocument).on("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},n.prototype.container_mouseup=function(t){if("ABBR"===t.target.nodeName&&!this.is_disabled)return this.results_reset(t)},n.prototype.search_results_mousewheel=function(t){var e;if(t.originalEvent&&(e=t.originalEvent.deltaY||-t.originalEvent.wheelDelta||t.originalEvent.detail),null!=e)return t.preventDefault(),"DOMMouseScroll"===t.type&&(e*=40),this.search_results.scrollTop(e+this.search_results.scrollTop())},n.prototype.blur_test=function(t){if(!this.active_field&&this.container.hasClass("chosen-container-active"))return this.close_field()},n.prototype.close_field=function(){return t(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale(),this.search_field.blur()},n.prototype.activate_field=function(){if(!this.is_disabled)return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.focus()},n.prototype.test_active_click=function(e){var s;return(s=t(e.target).closest(".chosen-container")).length&&this.container[0]===s[0]?this.active_field=!0:this.close_field()},n.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=i.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.focus_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.focus_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},n.prototype.result_do_highlight=function(t){var e,s,i,n,o;if(t.length){if(this.result_clear_highlight(),this.result_highlight=t,this.result_highlight.addClass("highlighted"),i=parseInt(this.search_results.css("maxHeight"),10),o=this.search_results.scrollTop(),n=i+o,s=this.result_highlight.position().top+this.search_results.scrollTop(),(e=s+this.result_highlight.outerHeight())>=n)return this.search_results.scrollTop(e-i>0?e-i:0);if(s<o)return this.search_results.scrollTop(s)}},n.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},n.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.get_search_field_value()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},n.prototype.update_results_content=function(t){return this.search_results.html(t)},n.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),setTimeout(function(t){return function(){return t.focus_field.focus()}}(this),0),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},n.prototype.set_tab_index=function(t){var e,s;if(this.form_field.tabIndex)return s=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=s,null!=(e=this.focus_field[0])?e.tabIndex=s:void 0},n.prototype.set_label_behavior=function(){if(this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=t("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0)return this.form_field_label.on("click.chosen",this.label_click_handler)},n.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},n.prototype.search_results_mouseup=function(e){var s;if((s=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first()).length)return this.result_highlight=s,this.result_select(e),this.search_field.focus()},n.prototype.search_results_mouseover=function(e){var s;if(s=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first())return this.result_do_highlight(s)},n.prototype.search_results_mouseout=function(e){if(t(e.target).hasClass("active-result")||t(e.target).parents(".active-result").first())return this.result_clear_highlight()},n.prototype.choice_build=function(e){var s,i;return s=t("<li />",{"class":"search-choice"}).html("<span>"+this.choice_label(e)+"</span>"),e.disabled?s.addClass("search-choice-disabled"):((i=t("<a />",{"class":"search-choice-close","data-option-array-index":e.array_index})).on("click.chosen",function(t){return function(e){return t.choice_destroy_link_click(e)}}(this)),s.append(i)),this.search_container.before(s)},n.prototype.choice_destroy_link_click=function(e){if(e.preventDefault(),e.stopPropagation(),!this.is_disabled)return this.choice_destroy(t(e.target))},n.prototype.choice_destroy=function(t){if(this.result_deselect(t[0].getAttribute("data-option-array-index")))return this.active_field?this.search_field.focus():this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.get_search_field_value().length<1&&this.results_hide(),t.parents("li").first().remove(),this.search_field_scale()},n.prototype.results_reset=function(){if(this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.trigger_form_field_change(),this.active_field)return this.results_hide()},n.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},n.prototype.result_select=function(t){var e,s;if(this.result_highlight)return e=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?e.removeClass("active-result"):this.reset_single_select_options(),e.addClass("result-selected"),s=this.results_data[e[0].getAttribute("data-option-array-index")],s.selected=!0,this.form_field.options[s.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(s):this.single_set_selected_text(this.choice_label(s)),this.is_multiple&&(!this.hide_results_on_select||t.metaKey||t.ctrlKey)?t.metaKey||t.ctrlKey?this.winnow_results({skip_highlight:!0}):(this.search_field.val(""),this.winnow_results()):(this.results_hide(),this.show_search_field_default()),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.trigger_form_field_change({selected:this.form_field.options[s.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,t.preventDefault(),this.search_field_scale())},n.prototype.single_set_selected_text=function(t){return null==t&&(t=this.default_text),t===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(t)},n.prototype.result_deselect=function(t){var e;return e=this.results_data[t],!this.form_field.options[e.options_index].disabled&&(e.selected=!1,this.form_field.options[e.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.trigger_form_field_change({deselected:this.form_field.options[e.options_index].value}),this.search_field_scale(),!0)},n.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")},n.prototype.get_search_field_value=function(){return this.search_field.val()},n.prototype.get_search_text=function(){return t.trim(this.get_search_field_value())},n.prototype.escape_html=function(e){return t("<div/>").text(e).html()},n.prototype.winnow_results_set_highlight=function(){var t,e;if(e=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),null!=(t=e.length?e.first():this.search_results.find(".active-result").first()))return this.result_do_highlight(t)},n.prototype.no_results=function(t){var e;return e=this.get_no_results_html(t),this.search_results.append(e),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},n.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},n.prototype.keydown_arrow=function(){var t;return this.results_showing&&this.result_highlight?(t=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(t):void 0:this.results_show()},n.prototype.keyup_arrow=function(){var t;return this.results_showing||this.is_multiple?this.result_highlight?(t=this.result_highlight.prevAll("li.active-result")).length?this.result_do_highlight(t.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight()):void 0:this.results_show()},n.prototype.keydown_backstroke=function(){var t;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(t=this.search_container.siblings("li.search-choice").last()).length&&!t.hasClass("search-choice-disabled")?(this.pending_backstroke=t,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0},n.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},n.prototype.search_field_scale=function(){var e,s,i,n,o,r,h;if(this.is_multiple){for(o={position:"absolute",left:"-1000px",top:"-1000px",display:"none",whiteSpace:"pre"},s=0,i=(r=["fontSize","fontStyle","fontWeight","fontFamily","lineHeight","textTransform","letterSpacing"]).length;s<i;s++)o[n=r[s]]=this.search_field.css(n);return(e=t("<div />").css(o)).text(this.get_search_field_value()),t("body").append(e),h=e.width()+25,e.remove(),this.container.is(":visible")&&(h=Math.min(this.container.outerWidth()-10,h)),this.search_field.width(h)}},n.prototype.trigger_form_field_change=function(t){return this.form_field_jq.trigger("input",t),this.form_field_jq.trigger("change",t)},n}()}).call(this);
 
 
 
 
 
 
 
 
 
1
 
2
+ // by Patrick Filler for Harvest, http://getharvest.com
3
+ //
4
+ // Version 0.9.5
5
+ // Full source at https://github.com/harvesthq/chosen
6
+ // Copyright (c) 2011 Harvest http://getharvest.com
7
+
8
+ // MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
9
+ // This file is generated by `cake build`, do not edit it by hand.
10
+ ((function(){var a;a=function(){function a(){this.options_index=0,this.parsed=[]}return a.prototype.add_node=function(a){return a.nodeName==="OPTGROUP"?this.add_group(a):this.add_option(a)},a.prototype.add_group=function(a){var b,c,d,e,f,g;b=this.parsed.length,this.parsed.push({array_index:b,group:!0,label:a.label,children:0,disabled:a.disabled}),f=a.childNodes,g=[];for(d=0,e=f.length;d<e;d++)c=f[d],g.push(this.add_option(c,b,a.disabled));return g},a.prototype.add_option=function(a,b,c){if(a.nodeName==="OPTION")return a.text!==""?(b!=null&&(this.parsed[b].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:a.value,text:a.text,html:a.innerHTML,selected:a.selected,disabled:c===!0?c:a.disabled,group_array_index:b,classes:a.className,style:a.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},a}(),a.select_to_array=function(b){var c,d,e,f,g;d=new a,g=b.childNodes;for(e=0,f=g.length;e<f;e++)c=g[e],d.add_node(c);return d.parsed},this.SelectParser=a})).call(this),function(){var a,b,c=function(a,b){return function(){return a.apply(b,arguments)}};b=this,a=function(){function a(a,b){this.form_field=a,this.options=b!=null?b:{},this.set_default_values(),this.is_multiple=this.form_field.multiple,this.default_text_default=this.is_multiple?"Select Some Options":"Select an Option",this.setup(),this.set_up_html(),this.register_observers(),this.finish_setup()}return a.prototype.set_default_values=function(){return this.click_test_action=c(function(a){return this.test_active_click(a)},this),this.activate_action=c(function(a){return this.activate_field(a)},this),this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.result_single_selected=null,this.allow_single_deselect=this.options.allow_single_deselect!=null&&this.form_field.options[0].text===""?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.choices=0,this.results_none_found=this.options.no_results_text||"No results match"},a.prototype.mouse_enter=function(){return this.mouse_on_container=!0},a.prototype.mouse_leave=function(){return this.mouse_on_container=!1},a.prototype.input_focus=function(a){if(!this.active_field)return setTimeout(c(function(){return this.container_mousedown()},this),50)},a.prototype.input_blur=function(a){if(!this.mouse_on_container)return this.active_field=!1,setTimeout(c(function(){return this.blur_test()},this),100)},a.prototype.result_add_option=function(a){var b,c;return a.disabled?"":(a.dom_id=this.container_id+"_o_"+a.array_index,b=a.selected&&this.is_multiple?[]:["active-result"],a.selected&&b.push("result-selected"),a.group_array_index!=null&&b.push("group-option"),a.classes!==""&&b.push(a.classes),c=a.style.cssText!==""?' style="'+a.style+'"':"",'<li id="'+a.dom_id+'" class="'+b.join(" ")+'"'+c+">"+a.html+"</li>")},a.prototype.results_update_field=function(){return this.result_clear_highlight(),this.result_single_selected=null,this.results_build()},a.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},a.prototype.results_search=function(a){return this.results_showing?this.winnow_results():this.results_show()},a.prototype.keyup_checker=function(a){var b,c;b=(c=a.which)!=null?c:a.keyCode,this.search_field_scale();switch(b){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:a.preventDefault();if(this.results_showing)return this.result_select(a);break;case 27:if(this.results_showing)return this.results_hide();break;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},a.prototype.generate_field_id=function(){var a;return a=this.generate_random_id(),this.form_field.id=a,a},a.prototype.generate_random_char=function(){var a,b,c;return a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZ",c=Math.floor(Math.random()*a.length),b=a.substring(c,c+1)},a}(),b.AbstractChosen=a}.call(this),function(){var a,b,c,d,e=Object.prototype.hasOwnProperty,f=function(a,b){function d(){this.constructor=a}for(var c in b)e.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a},g=function(a,b){return function(){return a.apply(b,arguments)}};d=this,a=jQuery,a.fn.extend({chosen:function(c){return!a.browser.msie||a.browser.version!=="6.0"&&a.browser.version!=="7.0"?a(this).each(function(d){if(!a(this).hasClass("chzn-done"))return new b(this,c)}):this}}),b=function(){function b(){b.__super__.constructor.apply(this,arguments)}return f(b,AbstractChosen),b.prototype.setup=function(){return this.form_field_jq=a(this.form_field),this.allows_new_values=a(this.form_field).attr("data-allows-new-values"),this.is_rtl=this.form_field_jq.hasClass("chzn-rtl")},b.prototype.finish_setup=function(){return this.form_field_jq.addClass("chzn-done")},b.prototype.set_up_html=function(){var b,d,e,f;return this.container_id=this.form_field.id.length?this.form_field.id.replace(/(:|\.)/g,"_"):this.generate_field_id(),this.container_id+="_chzn",this.f_width=this.form_field_jq.outerWidth(),this.default_text=this.form_field_jq.data("placeholder")?this.form_field_jq.data("placeholder"):this.default_text_default,b=a("<div />",{id:this.container_id,"class":"chzn-container"+(this.is_rtl?" chzn-rtl":""),style:"width: "+this.f_width+"px;"}),this.is_multiple?b.html('<ul class="chzn-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>'):b.html('<a href="javascript:void(0)" class="chzn-single"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chzn-drop" style="left:-9000px;"><div class="chzn-search"><input type="text" autocomplete="off" /></div><ul class="chzn-results"></ul></div>'),this.form_field_jq.hide().after(b),this.container=a("#"+this.container_id),this.container.addClass("chzn-container-"+(this.is_multiple?"multi":"single")),!this.is_multiple&&this.form_field.options.length<=this.disable_search_threshold&&this.container.addClass("chzn-container-single-nosearch"),this.dropdown=this.container.find("div.chzn-drop").first(),d=this.container.height(),e=this.f_width-c(this.dropdown),this.dropdown.css({width:e+"px",top:d+"px"}),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chzn-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chzn-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chzn-search").first(),this.selected_item=this.container.find(".chzn-single").first(),f=e-c(this.search_container)-c(this.search_field),this.search_field.css({width:f+"px"})),this.results_build(),this.set_tab_index(),this.form_field_jq.trigger("liszt:ready",{chosen:this})},b.prototype.register_observers=function(){this.container.mousedown(g(function(a){return this.container_mousedown(a)},this)),this.container.mouseup(g(function(a){return this.container_mouseup(a)},this)),this.container.mouseenter(g(function(a){return this.mouse_enter(a)},this)),this.container.mouseleave(g(function(a){return this.mouse_leave(a)},this)),this.search_results.mouseup(g(function(a){return this.search_results_mouseup(a)},this)),this.search_results.mouseover(g(function(a){return this.search_results_mouseover(a)},this)),this.search_results.mouseout(g(function(a){return this.search_results_mouseout(a)},this)),this.form_field_jq.bind("liszt:updated",g(function(a){return this.results_update_field(a)},this)),this.search_field.blur(g(function(a){return this.input_blur(a)},this)),this.search_field.keyup(g(function(a){return this.keyup_checker(a)},this)),this.search_field.keydown(g(function(a){return this.keydown_checker(a)},this));if(this.is_multiple)return this.search_choices.click(g(function(a){return this.choices_click(a)},this)),this.search_field.focus(g(function(a){return this.input_focus(a)},this))},b.prototype.search_field_disabled=function(){this.is_disabled=this.form_field_jq.attr("disabled");if(this.is_disabled)return this.container.addClass("chzn-disabled"),this.search_field.attr("disabled",!0),this.is_multiple||this.selected_item.unbind("focus",this.activate_action),this.close_field();this.container.removeClass("chzn-disabled"),this.search_field.attr("disabled",!1);if(!this.is_multiple)return this.selected_item.bind("focus",this.activate_action)},b.prototype.container_mousedown=function(b){var c;if(!this.is_disabled)return c=b!=null?a(b.target).hasClass("search-choice-close"):!1,b&&b.type==="mousedown"&&b.stopPropagation(),!this.pending_destroy_click&&!c?(this.active_field?!this.is_multiple&&b&&(a(b.target)===this.selected_item||a(b.target).parents("a.chzn-single").length)&&(b.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(document).click(this.click_test_action),this.results_show()),this.activate_field()):this.pending_destroy_click=!1},b.prototype.container_mouseup=function(a){if(a.target.nodeName==="ABBR")return this.results_reset(a)},b.prototype.blur_test=function(a){if(!this.active_field&&this.container.hasClass("chzn-container-active"))return this.close_field()},b.prototype.close_field=function(){return a(document).unbind("click",this.click_test_action),this.is_multiple||(this.selected_item.attr("tabindex",this.search_field.attr("tabindex")),this.search_field.attr("tabindex",-1)),this.active_field=!1,this.results_hide(),this.container.removeClass("chzn-container-active"),this.winnow_results_clear(),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},b.prototype.activate_field=function(){return!this.is_multiple&&!this.active_field&&(this.search_field.attr("tabindex",this.selected_item.attr("tabindex")),this.selected_item.attr("tabindex",-1)),this.container.addClass("chzn-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},b.prototype.test_active_click=function(b){return a(b.target).parents("#"+this.container_id).length?this.active_field=!0:this.close_field()},b.prototype.results_build=function(){var a,b,c,e,f,g;c=new Date,this.parsing=!0,this.results_data=d.SelectParser.select_to_array(this.form_field),this.is_multiple&&this.choices>0?(this.search_choices.find("li.search-choice").remove(),this.choices=0):this.is_multiple||this.selected_item.find("span").text(this.default_text),a="",g=this.results_data;for(e=0,f=g.length;e<f;e++)b=g[e],b.group?a+=this.result_add_group(b):b.empty||(a+=this.result_add_option(b),b.selected&&this.is_multiple?this.choice_build(b):b.selected&&!this.is_multiple&&(this.selected_item.find("span").text(b.text),this.allow_single_deselect&&this.single_deselect_control_build()));return this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.search_results.html(a),this.parsing=!1},b.prototype.result_add_group=function(b){return b.disabled?"":(b.dom_id=this.container_id+"_g_"+b.array_index,'<li id="'+b.dom_id+'" class="group-result">'+a("<div />").text(b.label).html()+"</li>")},b.prototype.result_do_highlight=function(a){var b,c,d,e,f;if(a.length){this.result_clear_highlight(),this.result_highlight=a,this.result_highlight.addClass("highlighted"),d=parseInt(this.search_results.css("maxHeight"),10),f=this.search_results.scrollTop(),e=d+f,c=this.result_highlight.position().top+this.search_results.scrollTop(),b=c+this.result_highlight.outerHeight();if(b>=e)return this.search_results.scrollTop(b-d>0?b-d:0);if(c<f)return this.search_results.scrollTop(c)}},b.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},b.prototype.results_show=function(){var a;return this.is_multiple||(this.selected_item.addClass("chzn-single-with-drop"),this.result_single_selected&&this.result_do_highlight(this.result_single_selected)),a=this.is_multiple?this.container.height():this.container.height()-1,this.dropdown.css({top:a+"px",left:0}),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results()},b.prototype.results_hide=function(){return this.is_multiple||this.selected_item.removeClass("chzn-single-with-drop"),this.result_clear_highlight(),this.dropdown.css({left:"-9000px"}),this.results_showing=!1},b.prototype.set_tab_index=function(a){var b;if(this.form_field_jq.attr("tabindex"))return b=this.form_field_jq.attr("tabindex"),this.form_field_jq.attr("tabindex",-1),this.is_multiple?this.search_field.attr("tabindex",b):(this.selected_item.attr("tabindex",b),this.search_field.attr("tabindex",-1))},b.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},b.prototype.search_results_mouseup=function(b){var c;c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first();if(c.length)return this.result_highlight=c,this.result_select(b)},b.prototype.search_results_mouseover=function(b){var c;c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first();if(c)return this.result_do_highlight(c)},b.prototype.search_results_mouseout=function(b){if(a(b.target).hasClass("active-result"))return this.result_clear_highlight()},b.prototype.choices_click=function(b){b.preventDefault();if(this.active_field&&!a(b.target).hasClass("search-choice")&&!this.results_showing)return this.results_show()},b.prototype.choice_build=function(b){var c,d;return c=this.container_id+"_c_"+b.array_index,this.choices+=1,this.search_container.before('<li class="search-choice" id="'+c+'"><span>'+b.html+'</span><a href="javascript:void(0)" class="search-choice-close" rel="'+b.array_index+'"></a></li>'),d=a("#"+c).find("a").first(),d.click(g(function(a){return this.choice_destroy_link_click(a)},this))},b.prototype.choice_destroy_link_click=function(b){return b.preventDefault(),this.is_disabled?b.stopPropagation:(this.pending_destroy_click=!0,this.choice_destroy(a(b.target)))},b.prototype.choice_destroy=function(a){return this.choices-=1,this.show_search_field_default(),this.is_multiple&&this.choices>0&&this.search_field.val().length<1&&this.results_hide(),this.result_deselect(a.attr("rel")),a.parents("li").first().remove()},b.prototype.results_reset=function(b){this.form_field.options[0].selected=!0,this.selected_item.find("span").text(this.default_text),this.show_search_field_default(),a(b.target).remove(),this.form_field_jq.trigger("change");if(this.active_field)return this.results_hide()},b.prototype.result_select=function(a){var b,c,d,e;if(this.result_highlight)return b=this.result_highlight,c=b.attr("id"),this.result_clear_highlight(),this.is_multiple?this.result_deactivate(b):(this.search_results.find(".result-selected").removeClass("result-selected"),this.result_single_selected=b),b.addClass("result-selected"),e=c.substr(c.lastIndexOf("_")+1),d=this.results_data[e],d.selected=!0,this.form_field.options[d.options_index].selected=!0,this.is_multiple?this.choice_build(d):(this.selected_item.find("span").first().text(d.text),this.allow_single_deselect&&this.single_deselect_control_build()),(!a.metaKey||!this.is_multiple)&&this.results_hide(),this.search_field.val(""),this.form_field_jq.trigger("change"),this.search_field_scale();if(this.allows_new_values)return this.add_and_select_new_value(this,this.search_field.val())},b.prototype.result_activate=function(a){return a.addClass("active-result")},b.prototype.result_deactivate=function(a){return a.removeClass("active-result")},b.prototype.result_deselect=function(b){var c,d;return d=this.results_data[b],d.selected=!1,this.form_field.options[d.options_index].selected=!1,c=a("#"+this.container_id+"_o_"+b),c.removeClass("result-selected").addClass("active-result").show(),this.result_clear_highlight(),this.winnow_results(),this.form_field_jq.trigger("change"),this.search_field_scale()},b.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect&&this.selected_item.find("abbr").length<1)return this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>')},b.prototype.winnow_results=function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;j=new Date,this.no_results_clear(),h=0,i=this.search_field.val()===this.default_text?"":a("<div/>").text(a.trim(this.search_field.val())).html(),f=new RegExp("^"+i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),m=new RegExp(i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),r=this.results_data;for(n=0,p=r.length;n<p;n++){c=r[n];if(!c.disabled&&!c.empty)if(c.group)a("#"+c.dom_id).hide();else if(!this.is_multiple||!c.selected){b=!1,g=c.dom_id;if(f.test(c.html))b=!0,h+=1;else if(c.html.indexOf(" ")>=0||c.html.indexOf("[")===0){e=c.html.replace(/\[|\]/g,"").split(" ");if(e.length)for(o=0,q=e.length;o<q;o++)d=e[o],f.test(d)&&(b=!0,h+=1)}b?(i.length?(k=c.html.search(m),l=c.html.substr(0,k+i.length)+"</em>"+c.html.substr(k+i.length),l=l.substr(0,k)+"<em>"+l.substr(k)):l=c.html,a("#"+g).html!==l&&a("#"+g).html(l),this.result_activate(a("#"+g)),c.group_array_index!=null&&a("#"+this.results_data[c.group_array_index].dom_id).show()):(this.result_highlight&&g===this.result_highlight.attr("id")&&this.result_clear_highlight(),this.result_deactivate(a("#"+g)))}}return h<1&&i.length?this.no_results(i):this.winnow_results_set_highlight()},b.prototype.winnow_results_clear=function(){var b,c,d,e,f;this.search_field.val(""),c=this.search_results.find("li"),f=[];for(d=0,e=c.length;d<e;d++)b=c[d],b=a(b),f.push(b.hasClass("group-result")?b.show():!this.is_multiple||!b.hasClass("result-selected")?this.result_activate(b):void 0);return f},b.prototype.winnow_results_set_highlight=function(){var a,b;if(!this.result_highlight){b=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),a=b.length?b.first():this.search_results.find(".active-result").first();if(a!=null)return this.result_do_highlight(a)}},b.prototype.no_results=function(b){var c,d,e;return c="",this.allows_new_values&&(c='<div class="chzn-add-button"></div>'),d=a('<li class="no-results">'+this.results_none_found+' "<span></span>"'+c+"</li>"),d.find("span").first().html(b),this.allows_new_values&&(e=this,d.find(".chzn-add-button").first().click(function(a){return e.add_and_select_new_value(e,b),!1})),this.search_results.append(d)},b.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},b.prototype.add_and_select_new_value=function(b,c){var d;return a(b.form_field).append('<option value="'+c+'">'+c+"</option>"),d=b.search_field.val(),b.results_build(),b.search_field.val(d),b.results_show(),b.results_search(),b.result_select(a(b.form_field.options).last()),b.close_field()},b.prototype.keydown_arrow=function(){var b,c;this.result_highlight?this.results_showing&&(c=this.result_highlight.nextAll("li.active-result").first(),c&&this.result_do_highlight(c)):(b=this.search_results.find("li.active-result").first(),b&&this.result_do_highlight(a(b)));if(!this.results_showing)return this.results_show()},b.prototype.keyup_arrow=function(){var a;if(!this.results_showing&&!this.is_multiple)return this.results_show();if(this.result_highlight)return a=this.result_highlight.prevAll("li.active-result"),a.length?this.result_do_highlight(a.first()):(this.choices>0&&this.results_hide(),this.result_clear_highlight())},b.prototype.keydown_backstroke=function(){return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(this.pending_backstroke=this.search_container.siblings("li.search-choice").last(),this.pending_backstroke.addClass("search-choice-focus"))},b.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},b.prototype.keydown_checker=function(a){var b,c;b=(c=a.which)!=null?c:a.keyCode,this.search_field_scale(),b!==8&&this.pending_backstroke&&this.clear_backstroke();switch(b){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(a),this.mouse_on_container=!1;break;case 13:a.preventDefault();break;case 38:a.preventDefault(),this.keyup_arrow();break;case 40:this.keydown_arrow()}},b.prototype.search_field_scale=function(){var b,c,d,e,f,g,h,i,j;if(this.is_multiple){d=0,h=0,f="position:absolute; left: -1000px; top: -1000px; display:none;",g=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"];for(i=0,j=g.length;i<j;i++)e=g[i],f+=e+":"+this.search_field.css(e)+";";return c=a("<div />",{style:f}),c.text(this.search_field.val()),a("body").append(c),h=c.width()+25,c.remove(),h>this.f_width-10&&(h=this.f_width-10),this.search_field.css({width:h+"px"}),b=this.container.height(),this.dropdown.css({top:b+"px"})}},b.prototype.generate_random_id=function(){var b;b="sel"+this.generate_random_char()+this.generate_random_char()+this.generate_random_char();while(a("#"+b).length>0)b+=this.generate_random_char();return b},b}(),c=function(a){var b;return b=a.outerWidth()-a.width()},d.get_side_border_padding=c}.call(this)
includes/admin/meta/js/schema.js CHANGED
@@ -21,7 +21,7 @@ jQuery(function($) {
21
  });
22
 
23
 
24
- // repeated post meta group / show hide main meta box
25
  $('#schema_post_meta_box').hide();
26
 
27
  var post_meta_enabled = $("#_schema_post_meta_box_enabled").attr('checked');
@@ -38,18 +38,22 @@ jQuery(function($) {
38
  }
39
  });
40
 
41
- // repeated post meta group fields
42
- // first, hide all divs inside the repeatable row, which has the advanmced options
43
  $('.meta_box_repeatable_row div').hide();
 
 
 
 
 
 
44
 
45
- // do toggle
46
  $('.meta_box_repeatable_row .toggle').toggle(function() {
47
  $('#' + this.id + '_wrap').show();
48
- $(this).html('Less <span class="dashicons dashicons-arrow-up-alt2"></span>'); // Less options
 
49
  }, function() {
50
  $('#' + this.id + '_wrap').hide();
51
- $(this).html('Advanced <span class="dashicons dashicons-arrow-down-alt2"></span>'); // Advanced options
52
- //$(this).html(this.id);
53
  });
54
 
55
 
21
  });
22
 
23
 
24
+ // repeated post meta group
25
  $('#schema_post_meta_box').hide();
26
 
27
  var post_meta_enabled = $("#_schema_post_meta_box_enabled").attr('checked');
38
  }
39
  });
40
 
41
+ // repeated post meta group
 
42
  $('.meta_box_repeatable_row div').hide();
43
+ /*
44
+ $('.meta_box_repeatable_row input[type="checkbox"]').on('change', function() {
45
+ $('#' + this.id + '_div_open').toggle( this.checked );
46
+ });
47
+ */
48
+
49
 
 
50
  $('.meta_box_repeatable_row .toggle').toggle(function() {
51
  $('#' + this.id + '_wrap').show();
52
+ //$(this).parent().next('.toggle_div').show();
53
+ $(this).html('Less');
54
  }, function() {
55
  $('#' + this.id + '_wrap').hide();
56
+ $(this).html(this.id);
 
57
  });
58
 
59
 
includes/admin/meta/js/scripts.js CHANGED
@@ -1,205 +1,189 @@
1
  jQuery(function($) {
2
-
3
- // the upload image button, saves the id and outputs a preview of the image
4
- var imageFrame;
5
-
6
- $(document).on('click', '.meta_box_upload_image_button', function(e) {
7
- event.preventDefault();
8
-
9
- var options, attachment;
10
-
11
- $self = $(event.target);
12
- $div = $self.closest('div.meta_box_image');
13
-
14
- // if the frame already exists, open it
15
- if (imageFrame) {
16
- imageFrame.open();
17
- return;
18
- }
19
-
20
- // set our settings
21
- imageFrame = wp.media({
22
- title: 'Choose Image',
23
- multiple: false,
24
- library: {
25
- type: 'image'
26
- },
27
- button: {
28
- text: 'Use This Image'
29
- }
30
- });
31
-
32
- // set up our select handler
33
- imageFrame.on('select', function() {
34
- selection = imageFrame.state().get('selection');
35
-
36
- if (!selection)
37
- return;
38
-
39
- // loop through the selected files
40
- selection.each(function(attachment) {
41
- console.log(attachment);
42
- var src = attachment.attributes.sizes.full.url;
43
- var id = attachment.id;
44
-
45
- $div.find('.meta_box_preview_image').attr('src', src);
46
- $div.find('.meta_box_upload_image').val(id);
47
- });
48
- });
49
-
50
- // open the frame
51
- imageFrame.open();
52
- });
53
-
54
- // the remove image link, removes the image id from the hidden field and replaces the image preview
55
- $(document).on('click', '.meta_box_clear_image_button', function(e) {
56
- var defaultImage = $(this).parent().siblings('.meta_box_default_image').text();
57
- $(this).parent().siblings('.meta_box_upload_image').val('');
58
- $(this).parent().siblings('.meta_box_preview_image').attr('src', defaultImage);
59
- return false;
60
- });
61
-
62
- // the file image button, saves the id and outputs the file name
63
- var fileFrame;
64
-
65
- $(document).on('click', '.meta_box_upload_file_button', function(e) {
66
- e.preventDefault();
67
-
68
- var options, attachment;
69
-
70
- $self = $(event.target);
71
- $div = $self.closest('div.meta_box_file_stuff');
72
-
73
- // if the frame already exists, open it
74
- if (fileFrame) {
75
- fileFrame.open();
76
- return;
77
- }
78
-
79
- // set our settings
80
- fileFrame = wp.media({
81
- title: 'Choose File',
82
- multiple: false,
83
- library: {
84
- },
85
- button: {
86
- text: 'Use This File'
87
- }
88
- });
89
-
90
- // set up our select handler
91
- fileFrame.on('select', function() {
92
- selection = fileFrame.state().get('selection');
93
-
94
- if (!selection)
95
- return;
96
-
97
- // loop through the selected files
98
- selection.each(function(attachment) {
99
- console.log(attachment);
100
- var src = attachment.attributes.url;
101
- var id = attachment.id;
102
-
103
- $div.find('.meta_box_filename').text(src);
104
- $div.find('.meta_box_upload_file').val(src);
105
- $div.find('.meta_box_file').addClass('checked');
106
- });
107
- });
108
-
109
- // open the frame
110
- fileFrame.open();
111
- });
112
-
113
- // the remove image link, removes the image id from the hidden field and replaces the image preview
114
- $(document).on('click', '.meta_box_clear_file_button', function(e) {
115
- $(this).parent().siblings('.meta_box_upload_file').val('');
116
- $(this).parent().siblings('.meta_box_filename').text('');
117
- $(this).parent().siblings('.meta_box_file').removeClass('checked');
118
- return false;
119
- });
120
-
121
- // function to create an array of input values
122
- function ids(inputs) {
123
- var a = [];
124
- for (var i = 0; i < inputs.length; i++) {
125
- a.push(inputs[i].val);
126
- }
127
- //$("span").text(a.join(" "));
128
  }
129
- // repeatable fields
130
- $(document).on('click', '.meta_box_repeatable_add', function(e) {
131
- // clone
132
- var row = $(this).closest('.meta_box_repeatable').find('tbody tr:last-child');
133
- var clone = row.clone();
134
- clone.find('select.chosen').removeAttr('style', '').removeAttr('id', '').removeClass('chzn-done').data('chosen', null).next().remove();
135
- clone.find('input.regular-text, textarea, select').val('');
136
- clone.find('input[type=checkbox], input[type=radio]').attr('checked', false);
137
- clone.find('img.meta_box_preview_image').attr('src', '');
138
- row.after(clone);
139
-
140
- // increment name and id
141
- clone.find('input, textarea, select')
142
- .attr('name', function(index, name) {
143
- return name.replace(/(\d+)/, function(fullMatch, n) {
144
- return Number(n) + 1;
145
- });
146
- });
147
- clone.find('.toggle, .toggle_div')
148
- .attr('id', function(index, id) {
149
- return id.replace(/(\d+)/, function(fullMatch, n) {
150
- return Number(n) + 1;
151
- });
152
- });
153
- var arr = [];
154
- $('input.repeatable_id:text').each(function() {
155
- arr.push($(this).val());
156
- });
157
- clone.find('input.repeatable_id')
158
- .val(Number(Math.max.apply(Math, arr)) + 1);
159
- if (!!$.prototype.chosen) {
160
- clone.find('select.chosen')
161
- .chosen({allow_single_deselect: true});
162
- }
163
- //
164
- return false;
165
- });
166
-
167
- $(document).on('click', '.meta_box_repeatable_remove', function(e) {
168
- if (!confirm('Are you sure you want to delete this field?')) return false;
169
- $(this).closest('tr').remove();
170
- return false;
171
- });
172
 
173
- $('.meta_box_repeatable tbody').sortable({
174
- opacity: 0.6,
175
- revert: true,
176
- cursor: 'move',
177
- handle: '.hndle'
178
- });
179
-
180
- // post_drop_sort
181
- $('.sort_list').sortable({
182
- connectWith: '.sort_list',
183
- opacity: 0.6,
184
- revert: true,
185
- cursor: 'move',
186
- cancel: '.post_drop_sort_area_name',
187
- items: 'li:not(.post_drop_sort_area_name)',
 
 
 
 
 
188
  update: function(event, ui) {
189
- var result = $(this).sortable('toArray');
190
- var thisID = $(this).attr('id');
191
- $('.store-' + thisID).val(result);
192
- }
193
  });
194
 
195
- $('.sort_list').disableSelection();
196
 
197
- // turn select boxes into something magical
198
- if (!!$.prototype.chosen)
199
- $('.chosen').chosen({
200
- //disable_search_threshold: 10,
201
- //no_results_text: "Oops, nothing found!",
202
- //width: "95%",
203
- allow_single_deselect: true,
204
- });
205
  });
1
  jQuery(function($) {
2
+
3
+ // the upload image button, saves the id and outputs a preview of the image
4
+ var imageFrame;
5
+ $('.meta_box_upload_image_button').click(function(event) {
6
+ event.preventDefault();
7
+
8
+ var options, attachment;
9
+
10
+ $self = $(event.target);
11
+ $div = $self.closest('div.meta_box_image');
12
+
13
+ // if the frame already exists, open it
14
+ if ( imageFrame ) {
15
+ imageFrame.open();
16
+ return;
17
+ }
18
+
19
+ // set our settings
20
+ imageFrame = wp.media({
21
+ title: 'Choose Image',
22
+ multiple: false,
23
+ library: {
24
+ type: 'image'
25
+ },
26
+ button: {
27
+ text: 'Use This Image'
28
+ }
29
+ });
30
+
31
+ // set up our select handler
32
+ imageFrame.on( 'select', function() {
33
+ selection = imageFrame.state().get('selection');
34
+
35
+ if ( ! selection )
36
+ return;
37
+
38
+ // loop through the selected files
39
+ selection.each( function( attachment ) {
40
+ console.log(attachment);
41
+ var src = attachment.attributes.sizes.full.url;
42
+ var id = attachment.id;
43
+
44
+ $div.find('.meta_box_preview_image').attr('src', src);
45
+ $div.find('.meta_box_upload_image').val(id);
46
+ } );
47
+ });
48
+
49
+ // open the frame
50
+ imageFrame.open();
51
+ });
52
+
53
+ // the remove image link, removes the image id from the hidden field and replaces the image preview
54
+ $('.meta_box_clear_image_button').click(function() {
55
+ var defaultImage = $(this).parent().siblings('.meta_box_default_image').text();
56
+ $(this).parent().siblings('.meta_box_upload_image').val('');
57
+ $(this).parent().siblings('.meta_box_preview_image').attr('src', defaultImage);
58
+ return false;
59
+ });
60
+
61
+ // the file image button, saves the id and outputs the file name
62
+ var fileFrame;
63
+ $('.meta_box_upload_file_button').click(function(e) {
64
+ e.preventDefault();
65
+
66
+ var options, attachment;
67
+
68
+ $self = $(event.target);
69
+ $div = $self.closest('div.meta_box_file_stuff');
70
+
71
+ // if the frame already exists, open it
72
+ if ( fileFrame ) {
73
+ fileFrame.open();
74
+ return;
75
+ }
76
+
77
+ // set our settings
78
+ fileFrame = wp.media({
79
+ title: 'Choose File',
80
+ multiple: false,
81
+ library: {
82
+ type: 'file'
83
+ },
84
+ button: {
85
+ text: 'Use This File'
86
+ }
87
+ });
88
+
89
+ // set up our select handler
90
+ fileFrame.on( 'select', function() {
91
+ selection = fileFrame.state().get('selection');
92
+
93
+ if ( ! selection )
94
+ return;
95
+
96
+ // loop through the selected files
97
+ selection.each( function( attachment ) {
98
+ console.log(attachment);
99
+ var src = attachment.attributes.url;
100
+ var id = attachment.id;
101
+
102
+ $div.find('.meta_box_filename').text(src);
103
+ $div.find('.meta_box_upload_file').val(src);
104
+ $div.find('.meta_box_file').addClass('checked');
105
+ } );
106
+ });
107
+
108
+ // open the frame
109
+ fileFrame.open();
110
+ });
111
+
112
+ // the remove image link, removes the image id from the hidden field and replaces the image preview
113
+ $('.meta_box_clear_file_button').click(function() {
114
+ $(this).parent().siblings('.meta_box_upload_file').val('');
115
+ $(this).parent().siblings('.meta_box_filename').text('');
116
+ $(this).parent().siblings('.meta_box_file').removeClass('checked');
117
+ return false;
118
+ });
119
+
120
+ // function to create an array of input values
121
+ function ids(inputs) {
122
+ var a = [];
123
+ for (var i = 0; i < inputs.length; i++) {
124
+ a.push(inputs[i].val);
125
+ }
126
+ //$("span").text(a.join(" "));
 
127
  }
128
+ // repeatable fields
129
+ $('.meta_box_repeatable_add').live('click', function() {
130
+ // clone
131
+ var row = $(this).closest('.meta_box_repeatable').find('tbody tr:last-child');
132
+ var clone = row.clone();
133
+ clone.find('select.chosen').removeAttr('style', '').removeAttr('id', '').removeClass('chzn-done').data('chosen', null).next().remove();
134
+ clone.find('input.regular-text, input.small-text, textarea, select').val('');
135
+ clone.find('input[type=checkbox], input[type=radio]').attr('checked', false);
136
+ row.after(clone);
137
+ // increment name and id
138
+ clone.find('input, textarea, select')
139
+ .attr('name', function(index, name) {
140
+ return name.replace(/(\d+)/, function(fullMatch, n) {
141
+ return Number(n) + 1;
142
+ });
143
+ });
144
+ var arr = [];
145
+ $('input.repeatable_id:text').each(function(){ arr.push($(this).val()); });
146
+ clone.find('input.repeatable_id')
147
+ .val(Number(Math.max.apply( Math, arr )) + 1);
148
+ if (!!$.prototype.chosen) {
149
+ clone.find('select.chosen')
150
+ .chosen({allow_single_deselect: true});
151
+ }
152
+ //
153
+ return false;
154
+ });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
155
 
156
+ $('.meta_box_repeatable_remove').live('click', function(){
157
+ $(this).closest('tr').remove();
158
+ return false;
159
+ });
160
+
161
+ $('.meta_box_repeatable tbody').sortable({
162
+ opacity: 0.6,
163
+ revert: true,
164
+ cursor: 'move',
165
+ handle: '.hndle'
166
+ });
167
+
168
+ // post_drop_sort
169
+ $('.sort_list').sortable({
170
+ connectWith: '.sort_list',
171
+ opacity: 0.6,
172
+ revert: true,
173
+ cursor: 'move',
174
+ cancel: '.post_drop_sort_area_name',
175
+ items: 'li:not(.post_drop_sort_area_name)',
176
  update: function(event, ui) {
177
+ var result = $(this).sortable('toArray');
178
+ var thisID = $(this).attr('id');
179
+ $('.store-' + thisID).val(result)
180
+ }
181
  });
182
 
183
+ $('.sort_list').disableSelection();
184
 
185
+ // turn select boxes into something magical
186
+ if (!!$.prototype.chosen)
187
+ $('.chosen').chosen({ allow_single_deselect: true });
188
+
 
 
 
 
189
  });
includes/admin/meta/sample.php CHANGED
@@ -121,7 +121,7 @@ $fields = array(
121
  'id' => $prefix.'repeatable', // field id and name
122
  'type' => 'repeatable', // type of field
123
  'sanitizer' => array( // array of sanitizers with matching kets to next array
124
- 'featured' => 'schema_wp_meta_box_santitize_boolean',
125
  'title' => 'sanitize_text_field',
126
  'desc' => 'wp_kses_data'
127
  ),
121
  'id' => $prefix.'repeatable', // field id and name
122
  'type' => 'repeatable', // type of field
123
  'sanitizer' => array( // array of sanitizers with matching kets to next array
124
+ 'featured' => 'meta_box_santitize_boolean',
125
  'title' => 'sanitize_text_field',
126
  'desc' => 'wp_kses_data'
127
  ),
includes/admin/post-type/class-columns.php DELETED
@@ -1,356 +0,0 @@
1
- <?php
2
- /**
3
- * @package Schema - Class Schema CPT Columns
4
- * @category Core
5
- * @author Hesham Zebida
6
- * @version 1.6.7
7
- */
8
-
9
- // Exit if accessed directly
10
- if ( ! defined( 'ABSPATH' ) ) exit;
11
-
12
- if ( ! class_exists('Schema_WP_CPT_columns') ) {
13
- /**
14
- * CPT_columns
15
- * Simple class to add remove and manage admin post columns
16
- * @author Ohad Raz <admin@bainternet.info>
17
- * @version 0.1
18
- * @copyright 2013 Ohad Raz
19
- */
20
- class Schema_WP_CPT_columns{
21
- /**
22
- * $cpt_columns
23
- *
24
- * holds columns
25
- * @var array
26
- */
27
- public $cpt_columns = array();
28
- /**
29
- * $cpt_remove_columns
30
- *
31
- * holds columns to be removed
32
- * @var array
33
- */
34
- public $cpt_remove_columns = array();
35
- /**
36
- * $cpt_sortable_columns
37
- *
38
- * holds sortable columns
39
- * @var array
40
- */
41
- public $cpt_sortable_columns = array();
42
- /**
43
- * $cpt_name
44
- *
45
- * Holds custom post type name
46
- * @var string
47
- */
48
- public $cpt_name = '';
49
- /**
50
- * $replace
51
- *
52
- * Should coulmns be replace (true) or added (false)
53
- * @var boolean
54
- */
55
- public $replace = false;
56
- /**
57
- * __construct
58
- *
59
- * @author Ohad Raz <admin@bainternet.info>
60
- * @since 0.1
61
- * @param string $cpt custom post type name
62
- * @param boolean $replace (optional) replace or add
63
- */
64
- function __construct($cpt = '', $replace = false){
65
- $this->cpt_name = $cpt;
66
- $this->replace = $replace;
67
- //add columns
68
- add_filter( "manage_{$cpt}_posts_columns", array($this,'_cpt_columns' ),50);
69
- //remove columns
70
- add_filter( "manage_{$cpt}_posts_columns", array($this,'_cpt_columns_remove' ),60);
71
- //display columns
72
- add_action("manage_{$cpt}_posts_custom_column", array($this,'_cpt_custom_column'), 50, 2);
73
- //sortable columns
74
- add_filter( "manage_edit-{$cpt}_sortable_columns", array($this,"_sortable_columns" ),50);
75
- //sort order
76
- add_filter( 'pre_get_posts',array($this, '_column_orderby' ),50);
77
- }
78
-
79
- /**
80
- * _cpt_columns
81
- *
82
- * @author Ohad Raz <admin@bainternet.info>
83
- * @since 0.1
84
- * @param array $defaults
85
- * @return array
86
- */
87
- function _cpt_columns($defaults){
88
- global $typenow;
89
- if ($this->cpt_name == $typenow){
90
- $tmp = array();
91
- foreach ($this->cpt_columns as $key => $args) {
92
- $tmp[$key] = $args['label'];
93
- }
94
- if ($this->replace)
95
- return $tmp;
96
- else
97
- $defaults = array_merge($defaults,$tmp);
98
- }
99
-
100
- return $defaults;
101
- }
102
-
103
- /**
104
- * _cpt_columns_remove
105
- *
106
- * used to remove columns
107
- * @author Ohad Raz <admin@bainternet.info>
108
- * @since 0.1
109
- * @param array $columns
110
- * @return array
111
- */
112
- function _cpt_columns_remove($columns){
113
- foreach ($this->cpt_remove_columns as $key) {
114
- if (isset($columns[$key]))
115
- unset($columns[$key]);
116
- }
117
- return $columns;
118
- }
119
- /**
120
- * _sortable_columns
121
- *
122
- * sets sortable columns
123
- * @author Ohad Raz <admin@bainternet.info>
124
- * @since 0.1
125
- * @param array $columns
126
- * @return array
127
- */
128
- function _sortable_columns($columns){
129
- global $typenow;
130
- if ($this->cpt_name == $typenow){
131
- foreach ($this->cpt_sortable_columns as $key => $args) {
132
- $columns[$key] = $key;
133
- }
134
- }
135
- return $columns;
136
- }
137
- /**
138
- * _cpt_custom_column
139
- *
140
- * calls do_column() when the column is set
141
- * @author Ohad Raz <admin@bainternet.info>
142
- * @since 0.1
143
- * @param string $column_name column name
144
- * @param int $post_id post ID
145
- * @return void
146
- */
147
- function _cpt_custom_column($column_name, $post_id) {
148
- if(isset($this->cpt_columns[$column_name]))
149
- $this->do_column($post_id,$this->cpt_columns[$column_name],$column_name);
150
- }
151
-
152
- /**
153
- * do_column
154
- *
155
- * used to display the column
156
- * @author Ohad Raz <admin@bainternet.info>
157
- * @since 0.1
158
- * @param int $post_id post ID
159
- * @param array $column column args
160
- * @param string $column_name column name
161
- * @return void
162
- */
163
- function do_column($post_id,$column,$column_name){
164
- if (in_array($column['type'],array('text','thumb','post_meta','custom_tax', 'post_meta_array','indicator', 'cpt_post_count','markup_source') ) )
165
- echo $column['prefix'];
166
- switch ($column['type']) {
167
- case 'text':
168
- echo apply_filters( 'cpt_columns_text_'.$column_name, $column['text'],$post_id,$column, $column_name);
169
- break;
170
- case 'thumb':
171
- if (has_post_thumbnail( $post_id )){
172
- the_post_thumbnail( $column['size'] );
173
- }else{
174
- echo 'N/A';
175
- }
176
- break;
177
- case 'post_meta':
178
- $tmp = get_post_meta($post_id,$column['meta_key'],true);
179
- echo (!empty($tmp))? $tmp : $column['std'];
180
- break;
181
- case 'custom_tax':
182
- $post_type = get_post_type($post_id);
183
- $terms = get_the_terms($post_id, $column['taxonomy']);
184
- if ( !empty($terms) ) {
185
- foreach ( $terms as $term ){
186
- $href = "edit.php?post_type={$post_type}&{$column['taxonomy']}={$term->slug}";
187
- $name = esc_html(sanitize_term_field('name', $term->name, $term->term_id, $column['taxonomy'], 'edit'));
188
- $post_terms[] = "<a href='{$href}'>{$name}</a>";
189
- }
190
- echo join( ', ', $post_terms );
191
- }
192
- else echo '';
193
- break;
194
- case 'post_meta_array':
195
- $tmp = get_post_meta( $post_id, $column['meta_key'], true );
196
- if ( is_array($tmp) || ! empty($tmp) ) {
197
- foreach ($tmp as $key) {
198
- $pt = ( isset($key) ) ? get_post_type_object( $key ) : '';
199
- if ( isset($pt->label) ) {
200
- $count = wp_count_posts($key);
201
- //echo $pt->label . ' (' . $count->publish . ')';
202
- echo $pt->label;
203
- } else {echo (isset($column['std'])) ? $column['std'] : '';}
204
- }
205
- }
206
- break;
207
- case 'cpt_post_count':
208
- $tmp = get_post_meta( $post_id, $column['meta_key'], true );
209
- if ( is_array($tmp) || ! empty($tmp) ) {
210
- foreach ($tmp as $key) {
211
- $pt = ( isset($key) ) ? get_post_type_object( $key ) : '';
212
- if ( isset($pt->label) ) {
213
- $count = wp_count_posts($key);
214
- echo $count->publish;
215
- } else {echo (isset($column['std'])) ? $column['std'] : '';}
216
- }
217
- }
218
- break;
219
- case 'indicator':
220
- $tmp = get_post_meta( $post_id, $column['meta_key'], true );
221
- if ( isset($tmp) && $tmp) {
222
- echo '<span class="dashicons dashicons-marker" style="color:green;"></span>';
223
- } else {
224
- echo '<span class="dashicons dashicons-marker" style="color:#ccc;"></span>';
225
- }
226
- break;
227
- case 'markup_source':
228
- $tmp = get_post_meta( $post_id, $column['meta_key'], true );
229
- if ( isset($tmp) && $tmp) {
230
- if ($tmp == 'editor')
231
- echo '<span class="dashicons dashicons-admin-users">';
232
- if ($tmp == 'user')
233
- echo '<span class="dashicons dashicons-groups"></span>';
234
- } else {
235
- echo '<span class="dashicons dashicons-marker" style="color:#ccc;"></span>';
236
- }
237
- break;
238
- }//end switch
239
- if (in_array($column['type'],array('text','thumb','post_meta','custom_tax','post_meta_array','indicator', 'cpt_post_count','markup_source') ) )
240
- echo $column['suffix'];
241
- }//end do_column
242
-
243
- /**
244
- * _column_orderby
245
- *
246
- * used to roder by meta keys
247
- * @author Ohad Raz <admin@bainternet.info>
248
- * @since 0.1
249
- * @param object $query
250
- * @return void
251
- */
252
- function _column_orderby( $query ) {
253
- if( ! is_admin() )
254
- return;
255
-
256
- $orderby = $query->get( 'orderby');
257
- $keys = array_keys((array)$this->cpt_sortable_columns);
258
- if ( in_array($orderby,$keys) ) {
259
- //order by meta
260
- if ('post_meta' == $this->cpt_sortable_columns[$orderby]['type']){
261
- $query->set('meta_key',$orderby);
262
- $query->set('orderby',$this->cpt_sortable_columns[$orderby]['orderby']);
263
- }
264
- }
265
- }//end _column_orderby
266
-
267
- /**
268
- * add_column
269
- *
270
- * used to add column
271
- * @author Ohad Raz <admin@bainternet.info>
272
- * @since 0.1
273
- * @param string $key column id
274
- * @param array $args column arguments
275
- * @return void
276
- */
277
- function add_column($key,$args){
278
- $def = array(
279
- 'label' => 'column label',
280
- 'size' => array('80','80'),
281
- 'taxonomy' => '',
282
- 'meta_key' => '',
283
- 'sortable' => false,
284
- 'text' => '',
285
- 'type' => 'native', //'native','post_meta','custom_tax',text
286
- 'orderby' => 'meta_value',
287
- 'prefix' => '',
288
- 'suffix' => '',
289
- 'std' => '',
290
- );
291
- $this->cpt_columns[$key] = array_merge($def,$args);
292
-
293
- if ($this->cpt_columns[$key]['sortable'])
294
- $this->cpt_sortable_columns[$key] = $this->cpt_columns[$key];
295
- }//end add_column
296
-
297
- /**
298
- * remove_column
299
- *
300
- * Used to remove columns
301
- *
302
- * @author Ohad Raz <admin@bainternet.info>
303
- * @since 0.1
304
- * @param string $key column key to be removed
305
- * @return void
306
- */
307
- function remove_column($key){
308
- $this->cpt_remove_columns[] = $key;
309
- }//end remove_column
310
-
311
- }//end class
312
- }//end if
313
-
314
- /* usage:
315
- //create an instance
316
- $post_columns = new Schema_CPT_columns('post'); // if you want to replace and reorder columns then pass a second parameter as true
317
- //add native column
318
- $post_columns->add_column('title',
319
- array(
320
- 'label' => __('Title'),
321
- 'type' => 'native',
322
- 'sortable' => true
323
- )
324
- );
325
- //add thumbnail column
326
- $post_columns->add_column('post_thumb',
327
- array(
328
- 'label' => __('Thumb'),
329
- 'type' => 'thumb',
330
- 'size' => array('80,80') //size accepted by the_post_thumbnail as array or string
331
- )
332
- );
333
- //add taxonomy
334
- $post_columns->add_column('custom_tax_id',
335
- array(
336
- 'label' => __('Custom Taxonomy'),
337
- 'type' => 'custom_tax',
338
- 'taxonomy' => 'category' //taxonomy name
339
- )
340
- );
341
- //custom field column
342
- $post_columns->add_column('price',
343
- array(
344
- 'label' => __('Custom Field'),
345
- 'type' => 'post_meta',
346
- 'meta_key' => 'price', //meta_key
347
- 'orderby' => 'meta_value', //meta_value,meta_value_num
348
- 'sortable' => true,
349
- 'prefix' => "$",
350
- 'suffix' => "",
351
- 'def' => "", // default value in case post meta not found
352
- )
353
- );
354
- //remove date column
355
- $post_columns->remove_column('date');
356
- */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/admin/post-type/schema-columns.php DELETED
@@ -1,91 +0,0 @@
1
- <?php
2
- /**
3
- * @package Schema - Schema Post Type Columns
4
- * @category Core
5
- * @author Hesham Zebida
6
- * @version 1.6.7
7
- */
8
-
9
- // Exit if accessed directly
10
- if ( ! defined( 'ABSPATH' ) ) exit;
11
-
12
- if ( ! class_exists('Schema_WP_CPT_columns') ) return;
13
-
14
- $post_columns = new Schema_WP_CPT_columns('schema'); // if you want to replace and reorder columns then pass a second parameter as true
15
-
16
- //add native column
17
- $post_columns->add_column('title',
18
- array(
19
- 'label' => __('Name', 'schema-wp'),
20
- 'type' => 'native',
21
- 'sortable' => true
22
- )
23
- );
24
- //custom field column
25
- $post_columns->add_column('schema_type',
26
- array(
27
- 'label' => __('Schema Type', 'schema-wp'),
28
- 'type' => 'post_meta',
29
- 'meta_key' => '_schema_type', //meta_key
30
- 'orderby' => 'meta_value', //meta_value,meta_value_num
31
- 'sortable' => true,
32
- 'prefix' => "",
33
- 'suffix' => "",
34
- 'std' => __('Not set!'), // default value in case post meta not found
35
- )
36
- );
37
- $post_columns->add_column('schema_post_types',
38
- array(
39
- 'label' => __('Post Type', 'schema-wp'),
40
- 'type' => 'post_meta_array',
41
- 'meta_key' => '_schema_post_types', //meta_key
42
- 'orderby' => 'meta_value', //meta_value,meta_value_num
43
- 'sortable' => true,
44
- 'prefix' => "",
45
- 'suffix' => "",
46
- 'std' => __('-'), // default value in case post meta not found
47
- )
48
- );
49
- $post_columns->add_column('schema_cpt_post_count',
50
- array(
51
- 'label' => __('Content', 'schema-wp'),
52
- 'type' => 'cpt_post_count',
53
- 'meta_key' => '_schema_post_types', //meta_key
54
- 'orderby' => 'meta_value', //meta_value,meta_value_num
55
- 'sortable' => true,
56
- 'prefix' => "",
57
- 'suffix' => "",
58
- 'std' => __('-'), // default value in case post meta not found
59
- )
60
- );
61
-
62
- //remove columns
63
- $post_columns->remove_column('post_type');
64
- $post_columns->remove_column('categories');
65
- $post_columns->remove_column('date');
66
-
67
- // remove columns appended by
68
- $post_columns->remove_column('gadwp_stats');
69
- $post_columns->remove_column('mashsb_shares');
70
-
71
-
72
-
73
- add_filter( 'post_row_actions', 'remove_row_actions', 10, 1 );
74
- /**
75
- * Remove row actions: View.& Quick Edit links
76
- *
77
- * @since 1.6.7
78
- *
79
- * @param array $actions
80
- *
81
- * @return array
82
- */
83
- function remove_row_actions( $actions ) {
84
- if( get_post_type() === 'schema' ) {
85
- unset( $actions['view'] );
86
- unset( $actions['inline hide-if-no-js'] );
87
- }
88
-
89
- return $actions;
90
- }
91
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/admin/post-type/schema-post-type.php CHANGED
@@ -143,12 +143,12 @@ function schema_wp_cpt_remove_row_actions( $actions, $post ) {
143
 
144
  if( get_post_type() === 'schema' ) {
145
 
146
- //unset( $actions['edit'] );
147
- unset( $actions['view'] );
148
- //unset( $actions['trash'] );
149
- unset( $actions['inline hide-if-no-js'] );
150
- //$actions['inline hide-if-no-js'] .= __( 'Quick&nbsp;Edit' );
151
- }
152
  return $actions;
153
  }
154
 
@@ -174,6 +174,8 @@ function schema_wp_change_publish_button( $translation, $text ) {
174
  return $translation;
175
  }
176
 
 
 
177
  // Not used, found a better option below...
178
  add_action( 'transition_post_status', 'schema_wp_set_post_status_to_publish', 10, 3 );
179
  /**
143
 
144
  if( get_post_type() === 'schema' ) {
145
 
146
+ //unset( $actions['edit'] );
147
+ unset( $actions['view'] );
148
+ //unset( $actions['trash'] );
149
+ unset( $actions['inline hide-if-no-js'] );
150
+ //$actions['inline hide-if-no-js'] .= __( 'Quick&nbsp;Edit' );
151
+ }
152
  return $actions;
153
  }
154
 
174
  return $translation;
175
  }
176
 
177
+
178
+
179
  // Not used, found a better option below...
180
  add_action( 'transition_post_status', 'schema_wp_set_post_status_to_publish', 10, 3 );
181
  /**
includes/admin/ref.php CHANGED
@@ -44,8 +44,9 @@ function schema_wp_save_ref( $post_id, $post, $update ) {
44
  schema_wp_update_all_meta_ref( $post_id );
45
 
46
  // Delete cached data in post meta
47
- // @since 1.6.1
48
- schema_wp_json_delete_cache();
 
49
 
50
  // Debug
51
  //$msg = 'Is this un update? ';
@@ -76,8 +77,6 @@ function schema_wp_update_all_meta_ref( $schema_id ) {
76
 
77
  if ( ! is_array( $schema_type ) || empty( $schema_type) ) return false;
78
 
79
- $results = array();
80
-
81
  foreach( $schema_type as $schema_enabled ) :
82
 
83
  $query = $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type = '%s'", $schema_enabled );
@@ -109,8 +108,6 @@ function schema_wp_update_all_meta_ref( $schema_id ) {
109
  */
110
  function schema_wp_update_meta_ref( $post_id ) {
111
 
112
- global $typenow;
113
-
114
  $schemas_enabled = array();
115
 
116
  // Get schame enabled array
@@ -121,14 +118,8 @@ function schema_wp_update_meta_ref( $post_id ) {
121
  // Get post type
122
  if ( is_admin() ) {
123
  // on back-end
124
- if ( ! function_exists( 'get_current_screen' ) ) {
125
- require_once( ABSPATH . 'wp-admin/includes/screen.php' );
126
- }
127
- // get the current screen
128
  $current_screen = get_current_screen();
129
- // check global variable $typenow, this to get post type when do a Quick Edit
130
- if ( empty($current_screen) ) { $post_type = $typenow; } else { $post_type = $current_screen->post_type;}
131
-
132
  } else {
133
  // on front-end
134
  $post_type = get_post_type($post_id);
@@ -178,18 +169,20 @@ add_action( 'wp_insert_post', 'schema_wp_add_ref', 10, 1 );
178
  */
179
  function schema_wp_add_ref( $post_id ) {
180
 
 
 
181
  if ( ! isset( $_POST['post_status'] ) ) return false;
182
 
 
 
183
  $slug = 'schema';
184
 
185
  // If this isn't a 'schema' post, don't update it.
186
- if ( get_post_type( $post_id ) == $slug ) {
187
  return $post_id;
188
  }
189
 
190
- $original_post_status = isset($_POST['original_post_status']) ? $_POST['original_post_status'] : '';
191
-
192
- if( ( $_POST['post_status'] == 'publish' ) && ( $original_post_status != 'publish' ) ) {
193
 
194
  schema_wp_update_meta_ref( $post_id );
195
  }
44
  schema_wp_update_all_meta_ref( $post_id );
45
 
46
  // Delete cached data in post meta
47
+ // @since 1.5.9.9
48
+ delete_post_meta_by_key( '_schema_json' );
49
+ delete_post_meta_by_key( '_schema_json_timestamp' );
50
 
51
  // Debug
52
  //$msg = 'Is this un update? ';
77
 
78
  if ( ! is_array( $schema_type ) || empty( $schema_type) ) return false;
79
 
 
 
80
  foreach( $schema_type as $schema_enabled ) :
81
 
82
  $query = $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_type = '%s'", $schema_enabled );
108
  */
109
  function schema_wp_update_meta_ref( $post_id ) {
110
 
 
 
111
  $schemas_enabled = array();
112
 
113
  // Get schame enabled array
118
  // Get post type
119
  if ( is_admin() ) {
120
  // on back-end
 
 
 
 
121
  $current_screen = get_current_screen();
122
+ $post_type = $current_screen->post_type;
 
 
123
  } else {
124
  // on front-end
125
  $post_type = get_post_type($post_id);
169
  */
170
  function schema_wp_add_ref( $post_id ) {
171
 
172
+ global $post;
173
+
174
  if ( ! isset( $_POST['post_status'] ) ) return false;
175
 
176
+ //$current_screen = get_current_screen();
177
+ //$post_type = $current_screen->post_type;
178
  $slug = 'schema';
179
 
180
  // If this isn't a 'schema' post, don't update it.
181
+ if ( $slug != $post->post_type ) {
182
  return $post_id;
183
  }
184
 
185
+ if( ( $_POST['post_status'] == 'publish' ) && ( $_POST['original_post_status'] != 'publish' ) ) {
 
 
186
 
187
  schema_wp_update_meta_ref( $post_id );
188
  }
includes/admin/settings/contextual-help.php CHANGED
@@ -24,25 +24,25 @@ function schema_wp_settings_contextual_help() {
24
 
25
  $screen->set_help_sidebar(
26
  '<p><strong>' . sprintf( __( 'For more information:', 'schema-wp' ) . '</strong></p>' .
27
- '<p>' . sprintf( __( 'Visit the <a href="%s">documentation</a> on the schema.press website.', 'schema-wp' ), esc_url( 'https://schema.press/docs/' ) ) ) . '</p>' .
28
  '<p>' . sprintf(
29
  __( '<a href="%s">Post an issue</a> on <a href="%s">GitHub</a>. View <a href="%s">extensions</a>', 'schema-wp' ),
30
  esc_url( 'https://github.com/schemapress/Schema/issues' ),
31
  esc_url( 'https://github.com/schemapress/Schema' ),
32
- esc_url( 'https://schema.press/docs/?utm_source=plugin-settings-page&utm_medium=contextual-help-sidebar&utm_term=extensions&utm_campaign=ContextualHelp' )
33
  ) . '</p>'
34
  );
35
 
36
  $screen->add_help_tab( array(
37
  'id' => 'schema-wp-settings-general',
38
  'title' => __( 'General', 'schema-wp' ),
39
- 'content' => '<p>' . __( 'This screen provides the most basic settings for configuring Schema plugin on your site. You can set Schema for About and Contact pages, and turn automatic <em>Feature image</em> on and off...etc', 'schema-wp' ) . '</p>'
40
  ) );
41
 
42
  $screen->add_help_tab( array(
43
  'id' => 'schema-wp-settings-knowledge-graph',
44
  'title' => __( 'Knowledge Graph', 'schema-wp' ),
45
- 'content' => '<p>' . __( 'This screen provides settings for configuring the Knowledge Graph. You can set Organization Info and Corporate Contacts.', 'schema-wp' ) . '</p>'
46
  ) );
47
 
48
  $screen->add_help_tab( array(
24
 
25
  $screen->set_help_sidebar(
26
  '<p><strong>' . sprintf( __( 'For more information:', 'schema-wp' ) . '</strong></p>' .
27
+ '<p>' . sprintf( __( 'Visit the <a href="%s">documentation</a> on the schema.press website.', 'schema-wp' ), esc_url( 'http://schema.press/docs/' ) ) ) . '</p>' .
28
  '<p>' . sprintf(
29
  __( '<a href="%s">Post an issue</a> on <a href="%s">GitHub</a>. View <a href="%s">extensions</a>', 'schema-wp' ),
30
  esc_url( 'https://github.com/schemapress/Schema/issues' ),
31
  esc_url( 'https://github.com/schemapress/Schema' ),
32
+ esc_url( 'https://wpsite.tools/vendor/schemapress/?utm_source=plugin-settings-page&utm_medium=contextual-help-sidebar&utm_term=extensions&utm_campaign=ContextualHelp' )
33
  ) . '</p>'
34
  );
35
 
36
  $screen->add_help_tab( array(
37
  'id' => 'schema-wp-settings-general',
38
  'title' => __( 'General', 'schema-wp' ),
39
+ 'content' => '<p>' . __( 'This screen provides the most basic settings for configuring your store. You can set Schema for pages, and turn automatic <em>Feature image</em> on and off.', 'schema-wp' ) . '</p>'
40
  ) );
41
 
42
  $screen->add_help_tab( array(
43
  'id' => 'schema-wp-settings-knowledge-graph',
44
  'title' => __( 'Knowledge Graph', 'schema-wp' ),
45
+ 'content' => '<p>' . __( 'This screen provides settings for configuring your Knowledge Graph. You can set Organization Info and Corporate Contacts.', 'schema-wp' ) . '</p>'
46
  ) );
47
 
48
  $screen->add_help_tab( array(
includes/admin/settings/register-settings.php CHANGED
@@ -2,9 +2,9 @@
2
  /**
3
  * Register Settings
4
  *
5
- * @package Schema
6
  * @subpackage Admin/Settings
7
- * @copyright Copyright (c) 2016, Hesham Zebida
8
  * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
9
  * @since 1.0
10
  */
@@ -19,7 +19,7 @@ if ( !defined( 'ABSPATH' ) ) exit;
19
  * Looks to see if the specified setting exists, returns default if not
20
  *
21
  * @since 1.8.4
22
- * @global $schema_wp_options Array of all the Schema Options
23
  * @return mixed
24
  */
25
  function schema_wp_get_option( $key = '', $default = false ) {
@@ -39,7 +39,7 @@ function schema_wp_get_option( $key = '', $default = false ) {
39
  * @since 2.3
40
  * @param string $key The Key to update
41
  * @param string|bool|int $value The value to set the key to
42
- * @global $schema_wp_options Array of all the Schema Options
43
  * @return boolean True if updated, false if not.
44
  */
45
  function schema_wp_update_option( $key = '', $value = false ) {
@@ -68,6 +68,7 @@ function schema_wp_update_option( $key = '', $value = false ) {
68
  if ( $did_update ){
69
  global $schema_wp_options;
70
  $schema_wp_options[ $key ] = $value;
 
71
  }
72
 
73
  return $did_update;
@@ -82,7 +83,7 @@ function schema_wp_update_option( $key = '', $value = false ) {
82
  *
83
  * @since 2.3
84
  * @param string $key The Key to delete
85
- * @global $schema_wp_options Array of all the Schema Options
86
  * @return boolean True if removed, false if not.
87
  */
88
  function schema_wp_delete_option( $key = '' ) {
@@ -119,7 +120,7 @@ function schema_wp_delete_option( $key = '' ) {
119
  * Retrieves all plugin settings
120
  *
121
  * @since 1.0
122
- * @return array Schema settings
123
  */
124
  function schema_wp_get_settings() {
125
 
@@ -205,6 +206,7 @@ function schema_wp_register_settings() {
205
  'faux' => isset( $option['faux'] ) ? $option['faux'] : false,
206
  'tooltip_title' => isset( $option['tooltip_title'] ) ? $option['tooltip_title'] : false,
207
  'tooltip_desc' => isset( $option['tooltip_desc'] ) ? $option['tooltip_desc'] : false,
 
208
  'post_type' => isset( $option['post_type'] ) ? $option['post_type'] : false,
209
  )
210
  );
@@ -228,7 +230,7 @@ add_action( 'admin_init', 'schema_wp_register_settings' );
228
  function schema_wp_get_registered_settings() {
229
 
230
  /**
231
- * 'Whitelisted' Schema settings, filters are provided for each settings
232
  * section to allow extensions and other plugins to add their own settings
233
  */
234
  $schema_wp_settings = array(
@@ -250,16 +252,16 @@ function schema_wp_get_registered_settings() {
250
  'type' => 'post_select',
251
  'post_type' => 'page'
252
  ),
253
- /*'auto_featured_img' => array(
254
  'id' => 'auto_featured_img',
255
  'name' => __( 'Set Featured image automatically?', 'schema-wp' ),
256
  'desc' => __( 'Check this box if you would like Schema to try setting Featured image while you create or edit the post.', 'schema-wp' ),
257
  'type' => 'checkbox'
258
- ),*/
259
  'publisher_logo' => array(
260
  'id' => 'publisher_logo',
261
  'name' => __( 'Publisher Logo', 'schema-wp' ),
262
- 'desc' => __( 'Publisher Logo should have a wide aspect ratio, not a square icon, it should be no wider than 600px, and no taller than 60px.', 'schema-wp' ) . ' <a href="https://developers.google.com/search/docs/data-types/articles#logo-guidelines" target="_blank">'.__('Logo guidelines', 'schema-wp').'</a>',
263
  'type' => 'image_upload',
264
  'std' => ''
265
  )
@@ -269,35 +271,25 @@ function schema_wp_get_registered_settings() {
269
 
270
  'content' => apply_filters( 'schema_wp_settings_content',
271
  array(
272
- 'web_page_element' => array(
273
- 'id' => 'web_page_element_enable',
274
- 'name' => __( 'WPHeader and WPFooter', 'schema-wp' ),
275
- 'desc' => __( 'enable?', 'schema-wp' ),
276
- 'type' => 'checkbox'
277
- ),
278
- 'breadcrumbs' => array(
279
- 'id' => 'breadcrumbs_enable',
280
- 'name' => __( 'Breadcrumbs', 'schema-wp' ),
281
- 'desc' => __( 'enable?', 'schema-wp' ),
282
- 'type' => 'checkbox'
283
- ),
284
  'comments' => array(
285
- 'id' => 'comments_enable',
286
- 'name' => __( 'Comments', 'schema-wp' ),
287
- 'desc' => __( 'enable?', 'schema-wp' ),
288
- 'type' => 'checkbox'
289
- ),
290
- 'video' => array(
291
- 'id' => 'video_object_enable',
292
- 'name' => __( 'VideoObject', 'schema-wp' ),
293
- 'desc' => __( 'enable?', 'schema-wp' ),
294
- 'type' => 'checkbox'
295
- ),
296
- 'audio' => array(
297
- 'id' => 'audio_object_enable',
298
- 'name' => __( 'AudioObject', 'schema-wp' ),
299
- 'desc' => __( 'enable?', 'schema-wp' ),
300
- 'type' => 'checkbox'
 
 
301
  )
302
  )
303
  ),
@@ -306,22 +298,10 @@ function schema_wp_get_registered_settings() {
306
  'knowledge_graph' => apply_filters('schema_wp_settings_knowledge_graph',
307
  array(
308
  'organization' => array( // section
309
- 'organization_or_person' => array(
310
- 'id' => 'organization_or_person',
311
- 'name' => __( 'Organization or Person?', 'schema-wp' ),
312
- 'desc' => '',
313
- 'type' => 'select',
314
- 'options' => array(
315
- '' => __('Select Type', 'schema-wp'),
316
- 'organization' => 'Organization',
317
- 'person' => 'Person'
318
- ),
319
- 'std' => ''
320
- ),
321
  'name' => array(
322
  'id' => 'name',
323
  'name' => __( 'Name', 'schema-wp' ),
324
- 'desc' => __( 'Organization or Person name.', 'schema-wp' ),
325
  'type' => 'text',
326
  'placeholder' => get_bloginfo( 'name' ),
327
  'std' => ''
@@ -329,7 +309,7 @@ function schema_wp_get_registered_settings() {
329
  'url' => array(
330
  'id' => 'url',
331
  'name' => __( 'Website', 'schema-wp' ),
332
- 'desc' => __( 'Organization or Person website URL.', 'schema-wp' ),
333
  'type' => 'text',
334
  'placeholder' => 'http://',
335
  'std' => ''
@@ -337,38 +317,26 @@ function schema_wp_get_registered_settings() {
337
  'logo' => array(
338
  'id' => 'logo',
339
  'name' => __( 'Logo', 'schema-wp' ),
340
- 'desc' => __( 'Organization logo.', 'schema-wp' ) . ' <a href="https://developers.google.com/search/docs/data-types/logo" target="_blank">'.__('Logo guidelines', 'schema-wp').'</a>',
341
  'type' => 'image_upload',
342
  'std' => ''
343
  )
344
  ),
345
 
346
- /** Corporate Contacts Settings */
347
  'corporate_contacts' => array( // section
348
-
349
- 'corporate_contacts_contact_type' => array(
350
- 'id' => 'corporate_contacts_contact_type',
351
- 'name' => __( 'Contact Type', 'schema-wp' ),
352
- 'desc' => '',
353
- 'type' => 'select',
354
- 'options' => schema_wp_get_corporate_contacts_types()
355
- ),
356
-
357
  'corporate_contacts_telephone' => array(
358
  'id' => 'corporate_contacts_telephone',
359
  'name' => __( 'Telephone', 'schema-wp' ),
360
- 'desc' => '<br>' . __('Recommended. An internationalized version of the phone number, starting with the "+" symbol and country code (+1 in the US and Canada).', 'schema-wp'),
361
  'type' => 'text',
362
  'std' => ''
363
  ),
364
-
365
- 'corporate_contacts_url' => array(
366
- 'id' => 'corporate_contacts_url',
367
- 'name' => __( 'URL', 'schema-wp' ),
368
- 'desc' => '<br>' . __('Recommended. The URL of contact page.', 'schema-wp'),
369
- 'type' => 'text',
370
- 'placeholder' => 'http://',
371
- 'std' => ''
372
  ),
373
 
374
  // Social Profiles
@@ -457,11 +425,11 @@ function schema_wp_get_registered_settings() {
457
  'placeholder' => 'http://',
458
  'std' => ''
459
  )
460
- )
461
  )
462
  ),
463
 
464
- /** Search Results Settings */
465
  'search_results' => apply_filters('schema_wp_settings_search_results',
466
  array(
467
  'sitelinks' => array( // section
@@ -533,7 +501,7 @@ function schema_wp_get_registered_settings() {
533
  * @since 1.0.8.2
534
  *
535
  * @param array $input The value inputted in the field
536
- * @global $schema_wp_options Array of all the Schema Options
537
  *
538
  * @return string $input Sanitizied value
539
  */
@@ -1307,8 +1275,6 @@ function schema_wp_post_select_callback( $args ) {
1307
 
1308
  echo $html;
1309
  }
1310
-
1311
-
1312
 
1313
  /**
1314
  * Registers the license field callback for Software Licensing
@@ -1508,7 +1474,7 @@ function schema_wp_hook_callback( $args ) {
1508
  }
1509
 
1510
  /**
1511
- * Set manage_schema_options as the cap required to save Schema settings pages
1512
  *
1513
  * @since 1.9
1514
  * @return string capability required
2
  /**
3
  * Register Settings
4
  *
5
+ * @package EDD
6
  * @subpackage Admin/Settings
7
+ * @copyright Copyright (c) 2015, Pippin Williamson
8
  * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
9
  * @since 1.0
10
  */
19
  * Looks to see if the specified setting exists, returns default if not
20
  *
21
  * @since 1.8.4
22
+ * @global $schema_wp_options Array of all the EDD Options
23
  * @return mixed
24
  */
25
  function schema_wp_get_option( $key = '', $default = false ) {
39
  * @since 2.3
40
  * @param string $key The Key to update
41
  * @param string|bool|int $value The value to set the key to
42
+ * @global $schema_wp_options Array of all the EDD Options
43
  * @return boolean True if updated, false if not.
44
  */
45
  function schema_wp_update_option( $key = '', $value = false ) {
68
  if ( $did_update ){
69
  global $schema_wp_options;
70
  $schema_wp_options[ $key ] = $value;
71
+
72
  }
73
 
74
  return $did_update;
83
  *
84
  * @since 2.3
85
  * @param string $key The Key to delete
86
+ * @global $schema_wp_options Array of all the EDD Options
87
  * @return boolean True if removed, false if not.
88
  */
89
  function schema_wp_delete_option( $key = '' ) {
120
  * Retrieves all plugin settings
121
  *
122
  * @since 1.0
123
+ * @return array EDD settings
124
  */
125
  function schema_wp_get_settings() {
126
 
206
  'faux' => isset( $option['faux'] ) ? $option['faux'] : false,
207
  'tooltip_title' => isset( $option['tooltip_title'] ) ? $option['tooltip_title'] : false,
208
  'tooltip_desc' => isset( $option['tooltip_desc'] ) ? $option['tooltip_desc'] : false,
209
+
210
  'post_type' => isset( $option['post_type'] ) ? $option['post_type'] : false,
211
  )
212
  );
230
  function schema_wp_get_registered_settings() {
231
 
232
  /**
233
+ * 'Whitelisted' EDD settings, filters are provided for each settings
234
  * section to allow extensions and other plugins to add their own settings
235
  */
236
  $schema_wp_settings = array(
252
  'type' => 'post_select',
253
  'post_type' => 'page'
254
  ),
255
+ 'auto_featured_img' => array(
256
  'id' => 'auto_featured_img',
257
  'name' => __( 'Set Featured image automatically?', 'schema-wp' ),
258
  'desc' => __( 'Check this box if you would like Schema to try setting Featured image while you create or edit the post.', 'schema-wp' ),
259
  'type' => 'checkbox'
260
+ ),
261
  'publisher_logo' => array(
262
  'id' => 'publisher_logo',
263
  'name' => __( 'Publisher Logo', 'schema-wp' ),
264
+ 'desc' => __( 'Publisher Logo should have a wide aspect ratio, not a square icon, it should be no wider than 600px, and no taller than 60px.', 'schema-wp' ) . ' <a href="https://developers.google.com/search/docs/data-types/articles#amp-logo-guidelines" target="_blank">'.__('Logo guidelines', 'schema-wp').'</a>',
265
  'type' => 'image_upload',
266
  'std' => ''
267
  )
271
 
272
  'content' => apply_filters( 'schema_wp_settings_content',
273
  array(
 
 
 
 
 
 
 
 
 
 
 
 
274
  'comments' => array(
275
+ 'id' => 'comments_enable',
276
+ 'name' => __( 'Enable Comments markup?', 'schema-wp' ),
277
+ 'desc' => __( 'Check this box if you would like Schema to output Comments markup.', 'schema-wp' ),
278
+ 'type' => 'checkbox'
279
+ ),
280
+ 'main' => array(
281
+ 'video' => array(
282
+ 'id' => 'video_object_enable',
283
+ 'name' => __( 'Enable VideoObject markup?', 'schema-wp' ),
284
+ 'desc' => __( 'Check this box if you would like Schema to output VideoObject markup.', 'schema-wp' ),
285
+ 'type' => 'checkbox'
286
+ ),
287
+ 'audio' => array(
288
+ 'id' => 'audio_object_enable',
289
+ 'name' => __( 'Enable AudioObject markup?', 'schema-wp' ),
290
+ 'desc' => __( 'Check this box if you would like Schema to output AudioObject markup.', 'schema-wp' ),
291
+ 'type' => 'checkbox'
292
+ )
293
  )
294
  )
295
  ),
298
  'knowledge_graph' => apply_filters('schema_wp_settings_knowledge_graph',
299
  array(
300
  'organization' => array( // section
 
 
 
 
 
 
 
 
 
 
 
 
301
  'name' => array(
302
  'id' => 'name',
303
  'name' => __( 'Name', 'schema-wp' ),
304
+ 'desc' => __( 'Your Organization name, or your name.', 'schema-wp' ),
305
  'type' => 'text',
306
  'placeholder' => get_bloginfo( 'name' ),
307
  'std' => ''
309
  'url' => array(
310
  'id' => 'url',
311
  'name' => __( 'Website', 'schema-wp' ),
312
+ 'desc' => __( 'Your Organization website URL.', 'schema-wp' ),
313
  'type' => 'text',
314
  'placeholder' => 'http://',
315
  'std' => ''
317
  'logo' => array(
318
  'id' => 'logo',
319
  'name' => __( 'Logo', 'schema-wp' ),
320
+ 'desc' => __( 'Your Organization logo.', 'schema-wp' ) . ' <a href="https://developers.google.com/search/docs/data-types/logo" target="_blank">'.__('Logo guidelines', 'schema-wp').'</a>',
321
  'type' => 'image_upload',
322
  'std' => ''
323
  )
324
  ),
325
 
 
326
  'corporate_contacts' => array( // section
 
 
 
 
 
 
 
 
 
327
  'corporate_contacts_telephone' => array(
328
  'id' => 'corporate_contacts_telephone',
329
  'name' => __( 'Telephone', 'schema-wp' ),
330
+ 'desc' => '<br>' . __('Required. An internationalized version of the phone number, starting with the "+" symbol and country code (+1 in the US and Canada).', 'schema-wp'),
331
  'type' => 'text',
332
  'std' => ''
333
  ),
334
+ 'corporate_contacts_contact_type' => array(
335
+ 'id' => 'corporate_contacts_contact_type',
336
+ 'name' => __( 'Contact Type', 'schema-wp' ),
337
+ 'desc' => '',
338
+ 'type' => 'select',
339
+ 'options' => schema_wp_get_corporate_contacts_types()
 
 
340
  ),
341
 
342
  // Social Profiles
425
  'placeholder' => 'http://',
426
  'std' => ''
427
  )
428
+ )
429
  )
430
  ),
431
 
432
+ /** Styles Settings */
433
  'search_results' => apply_filters('schema_wp_settings_search_results',
434
  array(
435
  'sitelinks' => array( // section
501
  * @since 1.0.8.2
502
  *
503
  * @param array $input The value inputted in the field
504
+ * @global $schema_wp_options Array of all the EDD Options
505
  *
506
  * @return string $input Sanitizied value
507
  */
1275
 
1276
  echo $html;
1277
  }
 
 
1278
 
1279
  /**
1280
  * Registers the license field callback for Software Licensing
1474
  }
1475
 
1476
  /**
1477
+ * Set manage_schema_options as the cap required to save EDD settings pages
1478
  *
1479
  * @since 1.9
1480
  * @return string capability required
includes/admin/updater/class-license-handler.php CHANGED
@@ -24,8 +24,8 @@ class Schema_WP_License {
24
  private $item_shortname;
25
  private $version;
26
  private $author;
27
- //private $api_url = 'https://schema.press/edd-sl-api/';
28
- private $api_url = 'https://schema.press/';
29
 
30
  /**
31
  * Class constructor
@@ -202,7 +202,7 @@ class Schema_WP_License {
202
 
203
  echo '<p>' . sprintf(
204
  __( 'Enter your extension license keys here to receive updates for purchased extensions. If your license key has expired, please <a href="%s" target="_blank">renew your license</a>.', 'schema-wp' ),
205
- 'https://schema.press/'
206
  ) . '</p>';
207
 
208
  $has_ran = true;
24
  private $item_shortname;
25
  private $version;
26
  private $author;
27
+ //private $api_url = 'https://wpsite.tools/edd-sl-api/';
28
+ private $api_url = 'https://wpsite.tools/';
29
 
30
  /**
31
  * Class constructor
202
 
203
  echo '<p>' . sprintf(
204
  __( 'Enter your extension license keys here to receive updates for purchased extensions. If your license key has expired, please <a href="%s" target="_blank">renew your license</a>.', 'schema-wp' ),
205
+ 'https://wpsite.tools/'
206
  ) . '</p>';
207
 
208
  $has_ran = true;
includes/admin/updater/class-updater.php CHANGED
@@ -9,8 +9,8 @@ if ( ! defined( 'ABSPATH' ) ) exit;
9
  /**
10
  * Allows plugins to use their own update API.
11
  *
12
- * @author Easy Digital Downloads
13
- * @version 1.6.14
14
  */
15
  class Schema_WP_SL_Plugin_Updater {
16
 
@@ -20,7 +20,6 @@ class Schema_WP_SL_Plugin_Updater {
20
  private $slug = '';
21
  private $version = '';
22
  private $wp_override = false;
23
- private $cache_key = '';
24
 
25
  /**
26
  * Class constructor.
@@ -42,8 +41,6 @@ class Schema_WP_SL_Plugin_Updater {
42
  $this->slug = basename( $_plugin_file, '.php' );
43
  $this->version = $_api_data['version'];
44
  $this->wp_override = isset( $_api_data['wp_override'] ) ? (bool) $_api_data['wp_override'] : false;
45
- $this->beta = ! empty( $this->api_data['beta'] ) ? true : false;
46
- $this->cache_key = md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) );
47
 
48
  $edd_plugin_data[ $this->slug ] = $this->api_data;
49
 
@@ -63,7 +60,7 @@ class Schema_WP_SL_Plugin_Updater {
63
 
64
  add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) );
65
  add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
66
- remove_action( 'after_plugin_row_' . $this->name, 'wp_plugin_update_row', 10 );
67
  add_action( 'after_plugin_row_' . $this->name, array( $this, 'show_update_notification' ), 10, 2 );
68
  add_action( 'admin_init', array( $this, 'show_changelog' ) );
69
 
@@ -98,14 +95,7 @@ class Schema_WP_SL_Plugin_Updater {
98
  return $_transient_data;
99
  }
100
 
101
- $version_info = $this->get_cached_version_info();
102
-
103
- if ( false === $version_info ) {
104
- $version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug, 'beta' => $this->beta ) );
105
-
106
- $this->set_version_info_cache( $version_info );
107
-
108
- }
109
 
110
  if ( false !== $version_info && is_object( $version_info ) && isset( $version_info->new_version ) ) {
111
 
@@ -115,7 +105,7 @@ class Schema_WP_SL_Plugin_Updater {
115
 
116
  }
117
 
118
- $_transient_data->last_checked = current_time( 'timestamp' );
119
  $_transient_data->checked[ $this->name ] = $this->version;
120
 
121
  }
@@ -156,25 +146,27 @@ class Schema_WP_SL_Plugin_Updater {
156
 
157
  if ( empty( $update_cache->response ) || empty( $update_cache->response[ $this->name ] ) ) {
158
 
159
- $version_info = $this->get_cached_version_info();
 
 
 
160
 
161
- if ( false === $version_info ) {
162
- $version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug, 'beta' => $this->beta ) );
163
 
164
- $this->set_version_info_cache( $version_info );
165
  }
166
 
167
- if ( ! is_object( $version_info ) ) {
168
  return;
169
  }
170
 
171
- if ( version_compare( $this->version, $version_info->new_version, '<' ) ) {
172
 
173
  $update_cache->response[ $this->name ] = $version_info;
174
 
175
  }
176
 
177
- $update_cache->last_checked = current_time( 'timestamp' );
178
  $update_cache->checked[ $this->name ] = $this->version;
179
 
180
  set_site_transient( 'update_plugins', $update_cache );
@@ -237,6 +229,7 @@ class Schema_WP_SL_Plugin_Updater {
237
  */
238
  public function plugins_api_filter( $_data, $_action = '', $_args = null ) {
239
 
 
240
  if ( $_action != 'plugin_information' ) {
241
 
242
  return $_data;
@@ -253,50 +246,28 @@ class Schema_WP_SL_Plugin_Updater {
253
  'slug' => $this->slug,
254
  'is_ssl' => is_ssl(),
255
  'fields' => array(
256
- 'banners' => array(),
257
  'reviews' => false
258
  )
259
  );
260
 
261
- $cache_key = 'edd_api_request_' . md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) );
262
 
263
- // Get the transient where we store the api request for this plugin for 24 hours
264
- $edd_api_request_transient = $this->get_cached_version_info( $cache_key );
265
 
266
  //If we have no transient-saved value, run the API, set a fresh transient with the API value, and return that value too right now.
267
- if ( empty( $edd_api_request_transient ) ) {
268
 
269
  $api_response = $this->api_request( 'plugin_information', $to_send );
270
 
271
- // Expires in 3 hours
272
- $this->set_version_info_cache( $api_response, $cache_key );
273
 
274
  if ( false !== $api_response ) {
275
  $_data = $api_response;
276
  }
277
 
278
- } else {
279
- $_data = $edd_api_request_transient;
280
- }
281
-
282
- // Convert sections into an associative array, since we're getting an object, but Core expects an array.
283
- if ( isset( $_data->sections ) && ! is_array( $_data->sections ) ) {
284
- $new_sections = array();
285
- foreach ( $_data->sections as $key => $value ) {
286
- $new_sections[ $key ] = $value;
287
- }
288
-
289
- $_data->sections = $new_sections;
290
- }
291
-
292
- // Convert banners into an associative array, since we're getting an object, but Core expects an array.
293
- if ( isset( $_data->banners ) && ! is_array( $_data->banners ) ) {
294
- $new_banners = array();
295
- foreach ( $_data->banners as $key => $value ) {
296
- $new_banners[ $key ] = $value;
297
- }
298
-
299
- $_data->banners = $new_banners;
300
  }
301
 
302
  return $_data;
@@ -310,13 +281,11 @@ class Schema_WP_SL_Plugin_Updater {
310
  * @return object $array
311
  */
312
  public function http_request_args( $args, $url ) {
313
-
314
- $verify_ssl = $this->verify_ssl();
315
  if ( strpos( $url, 'https://' ) !== false && strpos( $url, 'edd_action=package_download' ) ) {
316
- $args['sslverify'] = $verify_ssl;
317
  }
318
  return $args;
319
-
320
  }
321
 
322
  /**
@@ -349,15 +318,12 @@ class Schema_WP_SL_Plugin_Updater {
349
  'license' => ! empty( $data['license'] ) ? $data['license'] : '',
350
  'item_name' => isset( $data['item_name'] ) ? $data['item_name'] : false,
351
  'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false,
352
- 'version' => isset( $data['version'] ) ? $data['version'] : false,
353
  'slug' => $data['slug'],
354
  'author' => $data['author'],
355
- 'url' => home_url(),
356
- 'beta' => ! empty( $data['beta'] ),
357
  );
358
 
359
- $verify_ssl = $this->verify_ssl();
360
- $request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => $verify_ssl, 'body' => $api_params ) );
361
 
362
  if ( ! is_wp_error( $request ) ) {
363
  $request = json_decode( wp_remote_retrieve_body( $request ) );
@@ -369,16 +335,6 @@ class Schema_WP_SL_Plugin_Updater {
369
  $request = false;
370
  }
371
 
372
- if ( $request && isset( $request->banners ) ) {
373
- $request->banners = maybe_unserialize( $request->banners );
374
- }
375
-
376
- if( ! empty( $request->sections ) ) {
377
- foreach( $request->sections as $key => $section ) {
378
- $request->$key = (array) $section;
379
- }
380
- }
381
-
382
  return $request;
383
  }
384
 
@@ -403,9 +359,8 @@ class Schema_WP_SL_Plugin_Updater {
403
  }
404
 
405
  $data = $edd_plugin_data[ $_REQUEST['slug'] ];
406
- $beta = ! empty( $data['beta'] ) ? true : false;
407
- $cache_key = md5( 'edd_plugin_' . sanitize_key( $_REQUEST['plugin'] ) . '_' . $beta . '_version_info' );
408
- $version_info = $this->get_cached_version_info( $cache_key );
409
 
410
  if( false === $version_info ) {
411
 
@@ -415,31 +370,22 @@ class Schema_WP_SL_Plugin_Updater {
415
  'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false,
416
  'slug' => $_REQUEST['slug'],
417
  'author' => $data['author'],
418
- 'url' => home_url(),
419
- 'beta' => ! empty( $data['beta'] )
420
  );
421
 
422
- $verify_ssl = $this->verify_ssl();
423
- $request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => $verify_ssl, 'body' => $api_params ) );
424
 
425
  if ( ! is_wp_error( $request ) ) {
426
  $version_info = json_decode( wp_remote_retrieve_body( $request ) );
427
  }
428
 
429
-
430
  if ( ! empty( $version_info ) && isset( $version_info->sections ) ) {
431
  $version_info->sections = maybe_unserialize( $version_info->sections );
432
  } else {
433
  $version_info = false;
434
  }
435
 
436
- if( ! empty( $version_info ) ) {
437
- foreach( $version_info->sections as $key => $section ) {
438
- $version_info->$key = (array) $section;
439
- }
440
- }
441
-
442
- $this->set_version_info_cache( $version_info, $cache_key );
443
 
444
  }
445
 
@@ -450,45 +396,4 @@ class Schema_WP_SL_Plugin_Updater {
450
  exit;
451
  }
452
 
453
- public function get_cached_version_info( $cache_key = '' ) {
454
-
455
- if( empty( $cache_key ) ) {
456
- $cache_key = $this->cache_key;
457
- }
458
-
459
- $cache = get_option( $cache_key );
460
-
461
- if( empty( $cache['timeout'] ) || current_time( 'timestamp' ) > $cache['timeout'] ) {
462
- return false; // Cache is expired
463
- }
464
-
465
- return json_decode( $cache['value'] );
466
-
467
- }
468
-
469
- public function set_version_info_cache( $value = '', $cache_key = '' ) {
470
-
471
- if( empty( $cache_key ) ) {
472
- $cache_key = $this->cache_key;
473
- }
474
-
475
- $data = array(
476
- 'timeout' => strtotime( '+3 hours', current_time( 'timestamp' ) ),
477
- 'value' => json_encode( $value )
478
- );
479
-
480
- update_option( $cache_key, $data, 'no' );
481
-
482
- }
483
-
484
- /**
485
- * Returns if the SSL of the store should be verified.
486
- *
487
- * @since 1.6.13
488
- * @return bool
489
- */
490
- private function verify_ssl() {
491
- return (bool) apply_filters( 'edd_sl_api_request_verify_ssl', true, $this );
492
- }
493
-
494
  }
9
  /**
10
  * Allows plugins to use their own update API.
11
  *
12
+ * @author Pippin Williamson
13
+ * @version 1.6.5
14
  */
15
  class Schema_WP_SL_Plugin_Updater {
16
 
20
  private $slug = '';
21
  private $version = '';
22
  private $wp_override = false;
 
23
 
24
  /**
25
  * Class constructor.
41
  $this->slug = basename( $_plugin_file, '.php' );
42
  $this->version = $_api_data['version'];
43
  $this->wp_override = isset( $_api_data['wp_override'] ) ? (bool) $_api_data['wp_override'] : false;
 
 
44
 
45
  $edd_plugin_data[ $this->slug ] = $this->api_data;
46
 
60
 
61
  add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) );
62
  add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
63
+ remove_action( 'after_plugin_row_' . $this->name, 'wp_plugin_update_row', 10, 2 );
64
  add_action( 'after_plugin_row_' . $this->name, array( $this, 'show_update_notification' ), 10, 2 );
65
  add_action( 'admin_init', array( $this, 'show_changelog' ) );
66
 
95
  return $_transient_data;
96
  }
97
 
98
+ $version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug ) );
 
 
 
 
 
 
 
99
 
100
  if ( false !== $version_info && is_object( $version_info ) && isset( $version_info->new_version ) ) {
101
 
105
 
106
  }
107
 
108
+ $_transient_data->last_checked = time();
109
  $_transient_data->checked[ $this->name ] = $this->version;
110
 
111
  }
146
 
147
  if ( empty( $update_cache->response ) || empty( $update_cache->response[ $this->name ] ) ) {
148
 
149
+ $cache_key = md5( 'edd_plugin_' . sanitize_key( $this->name ) . '_version_info' );
150
+ $version_info = get_transient( $cache_key );
151
+
152
+ if( false === $version_info ) {
153
 
154
+ $version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug ) );
 
155
 
156
+ set_transient( $cache_key, $version_info, 3600 );
157
  }
158
 
159
+ if( ! is_object( $version_info ) ) {
160
  return;
161
  }
162
 
163
+ if( version_compare( $this->version, $version_info->new_version, '<' ) ) {
164
 
165
  $update_cache->response[ $this->name ] = $version_info;
166
 
167
  }
168
 
169
+ $update_cache->last_checked = time();
170
  $update_cache->checked[ $this->name ] = $this->version;
171
 
172
  set_site_transient( 'update_plugins', $update_cache );
229
  */
230
  public function plugins_api_filter( $_data, $_action = '', $_args = null ) {
231
 
232
+
233
  if ( $_action != 'plugin_information' ) {
234
 
235
  return $_data;
246
  'slug' => $this->slug,
247
  'is_ssl' => is_ssl(),
248
  'fields' => array(
249
+ 'banners' => false, // These will be supported soon hopefully
250
  'reviews' => false
251
  )
252
  );
253
 
254
+ $cache_key = 'edd_api_request_' . substr( md5( serialize( $this->slug ) ), 0, 15 );
255
 
256
+ //Get the transient where we store the api request for this plugin for 24 hours
257
+ $edd_api_request_transient = get_site_transient( $cache_key );
258
 
259
  //If we have no transient-saved value, run the API, set a fresh transient with the API value, and return that value too right now.
260
+ if ( empty( $edd_api_request_transient ) ){
261
 
262
  $api_response = $this->api_request( 'plugin_information', $to_send );
263
 
264
+ //Expires in 1 day
265
+ set_site_transient( $cache_key, $api_response, DAY_IN_SECONDS );
266
 
267
  if ( false !== $api_response ) {
268
  $_data = $api_response;
269
  }
270
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
271
  }
272
 
273
  return $_data;
281
  * @return object $array
282
  */
283
  public function http_request_args( $args, $url ) {
284
+ // If it is an https request and we are performing a package download, disable ssl verification
 
285
  if ( strpos( $url, 'https://' ) !== false && strpos( $url, 'edd_action=package_download' ) ) {
286
+ $args['sslverify'] = false;
287
  }
288
  return $args;
 
289
  }
290
 
291
  /**
318
  'license' => ! empty( $data['license'] ) ? $data['license'] : '',
319
  'item_name' => isset( $data['item_name'] ) ? $data['item_name'] : false,
320
  'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false,
 
321
  'slug' => $data['slug'],
322
  'author' => $data['author'],
323
+ 'url' => home_url()
 
324
  );
325
 
326
+ $request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
 
327
 
328
  if ( ! is_wp_error( $request ) ) {
329
  $request = json_decode( wp_remote_retrieve_body( $request ) );
335
  $request = false;
336
  }
337
 
 
 
 
 
 
 
 
 
 
 
338
  return $request;
339
  }
340
 
359
  }
360
 
361
  $data = $edd_plugin_data[ $_REQUEST['slug'] ];
362
+ $cache_key = md5( 'edd_plugin_' . sanitize_key( $_REQUEST['plugin'] ) . '_version_info' );
363
+ $version_info = get_transient( $cache_key );
 
364
 
365
  if( false === $version_info ) {
366
 
370
  'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false,
371
  'slug' => $_REQUEST['slug'],
372
  'author' => $data['author'],
373
+ 'url' => home_url()
 
374
  );
375
 
376
+ $request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
 
377
 
378
  if ( ! is_wp_error( $request ) ) {
379
  $version_info = json_decode( wp_remote_retrieve_body( $request ) );
380
  }
381
 
 
382
  if ( ! empty( $version_info ) && isset( $version_info->sections ) ) {
383
  $version_info->sections = maybe_unserialize( $version_info->sections );
384
  } else {
385
  $version_info = false;
386
  }
387
 
388
+ set_transient( $cache_key, $version_info, 3600 );
 
 
 
 
 
 
389
 
390
  }
391
 
396
  exit;
397
  }
398
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
399
  }
includes/deprecated-functions.php CHANGED
@@ -2,12 +2,28 @@
2
 
3
  /**
4
  * Deprecated Functions
5
- *
6
- * This file is made to keep older non-used functions as a refrence.
7
- *
8
- * The functions within these files are loaded since the file itself won't be loaded
9
  *
10
  * @since 1.6
11
  * @return void
12
  */
13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
  /**
4
  * Deprecated Functions
 
 
 
 
5
  *
6
  * @since 1.6
7
  * @return void
8
  */
9
 
10
+
11
+
12
+ add_filter('schema_output', 'schema_wp_exclude_output' );
13
+ /**
14
+ * Exclude Schema
15
+ *
16
+ * @since 1.5.6
17
+ */
18
+ function schema_wp_exclude_output( $schema ) {
19
+
20
+ global $post;
21
+
22
+ if ( empty($schema) ) return;
23
+
24
+ $exclude = get_post_meta( $post->ID, '_schema_exclude' , true );
25
+
26
+ //if ( isset($exclude) && $exclude == '1' ) return array();
27
+ if ( $exclude ) return;
28
+ return $schema;
29
+ }
includes/extensions/audio-object.php CHANGED
@@ -23,11 +23,6 @@ function schema_wp_audio_object_admin_init() {
23
 
24
  if ( ! class_exists( 'Schema_WP' ) ) return;
25
 
26
- $audio_object_enable = schema_wp_get_option( 'audio_object_enable' );
27
-
28
- if ( $audio_object_enable != true )
29
- return;
30
-
31
  $prefix = '_schema_audio_object_';
32
 
33
  $fields = array(
23
 
24
  if ( ! class_exists( 'Schema_WP' ) ) return;
25
 
 
 
 
 
 
26
  $prefix = '_schema_audio_object_';
27
 
28
  $fields = array(
includes/extensions/author.php CHANGED
@@ -22,8 +22,6 @@ function schema_wp_do_author( $schema ) {
22
 
23
  global $post;
24
 
25
- if ( ! isset($schema["@type"]) ) return $schema;
26
-
27
  $schema_type = $schema["@type"];
28
  $support_article_types = schema_wp_get_support_article_types();
29
 
@@ -87,7 +85,7 @@ function schema_wp_get_author_array( $post_id = null ) {
87
 
88
  // sameAs
89
  $website = esc_attr( stripslashes( get_the_author_meta( 'user_url', $post_author->ID ) ) );
90
- $googleplus = esc_attr( stripslashes( get_the_author_meta( 'googleplus', $post_author->ID ) ) );
91
  $facebook = esc_attr( stripslashes( get_the_author_meta( 'facebook', $post_author->ID) ) );
92
  $twitter = esc_attr( stripslashes( get_the_author_meta( 'twitter', $post_author->ID ) ) );
93
  $instagram = esc_attr( stripslashes( get_the_author_meta( 'instagram', $post_author->ID ) ) );
@@ -99,7 +97,7 @@ function schema_wp_get_author_array( $post_id = null ) {
99
  $tumblr = esc_attr( stripslashes( get_the_author_meta( 'tumblr', $post_author->ID ) ) );
100
  $github = esc_attr( stripslashes( get_the_author_meta( 'github', $post_author->ID ) ) );
101
 
102
- $sameAs_links = array( $website, $googleplus, $facebook, $twitter, $instagram, $youtube, $linkedin, $myspace, $pinterest, $soundcloud, $tumblr, $github);
103
 
104
  $social = array();
105
 
@@ -129,10 +127,10 @@ function schema_wp_get_author_array( $post_id = null ) {
129
  */
130
  function schema_wp_validate_gravatar( $email ) {
131
 
132
- $hashkey = md5(strtolower(trim($email)));
133
- $uri = 'http://www.gravatar.com/avatar/' . $hashkey . '?d=404';
134
- $data = get_transient($hashkey);
135
-
136
  if (false === $data) {
137
  $response = wp_remote_head($uri);
138
  if( is_wp_error($response) ) {
@@ -140,9 +138,9 @@ function schema_wp_validate_gravatar( $email ) {
140
  } else {
141
  $data = $response['response']['code'];
142
  }
143
- set_transient( $hashkey, $data, $expiration = 60*5);
 
144
  }
145
-
146
  if ($data == '200'){
147
  return true;
148
  } else {
22
 
23
  global $post;
24
 
 
 
25
  $schema_type = $schema["@type"];
26
  $support_article_types = schema_wp_get_support_article_types();
27
 
85
 
86
  // sameAs
87
  $website = esc_attr( stripslashes( get_the_author_meta( 'user_url', $post_author->ID ) ) );
88
+ $google = esc_attr( stripslashes( get_the_author_meta( 'google', $post_author->ID ) ) );
89
  $facebook = esc_attr( stripslashes( get_the_author_meta( 'facebook', $post_author->ID) ) );
90
  $twitter = esc_attr( stripslashes( get_the_author_meta( 'twitter', $post_author->ID ) ) );
91
  $instagram = esc_attr( stripslashes( get_the_author_meta( 'instagram', $post_author->ID ) ) );
97
  $tumblr = esc_attr( stripslashes( get_the_author_meta( 'tumblr', $post_author->ID ) ) );
98
  $github = esc_attr( stripslashes( get_the_author_meta( 'github', $post_author->ID ) ) );
99
 
100
+ $sameAs_links = array( $website, $google, $facebook, $twitter, $instagram, $youtube, $linkedin, $myspace, $pinterest, $soundcloud, $tumblr, $github);
101
 
102
  $social = array();
103
 
127
  */
128
  function schema_wp_validate_gravatar( $email ) {
129
 
130
+ $hashkey = md5(strtolower(trim($email)));
131
+ $uri = 'http://www.gravatar.com/avatar/' . $hashkey . '?d=404';
132
+
133
+ $data = wp_cache_get($hashkey);
134
  if (false === $data) {
135
  $response = wp_remote_head($uri);
136
  if( is_wp_error($response) ) {
138
  } else {
139
  $data = $response['response']['code'];
140
  }
141
+ wp_cache_set($hashkey, $data, $group = '', $expire = 60*5);
142
+
143
  }
 
144
  if ($data == '200'){
145
  return true;
146
  } else {
includes/extensions/breadcrumbs.php DELETED
@@ -1,419 +0,0 @@
1
- <?php
2
- /**
3
- * Class JSON LD Breadcrumb.
4
- *
5
- * @package JSON_LD_Breadcrumbs
6
- *
7
- * Credits: https://wordpress.org/plugins/json-ld-breadcrumbs/
8
- */
9
-
10
- // Exit if the file is called directy by URL.
11
- defined( 'ABSPATH' ) or exit;
12
-
13
-
14
- if ( ! class_exists( 'SCHEMA_JSON_LD_Breadcrumbs' ) ) {
15
-
16
- /**
17
- * Class JSON LD Breadcrumb.
18
- *
19
- * @since 1.0.0
20
- */
21
- class SCHEMA_JSON_LD_Breadcrumbs {
22
-
23
- /**
24
- * Instance of JSON_LD_Breadcrumbs
25
- *
26
- * @since v1.0.0
27
- * @var Object JSON_LD_Breadcrumbs
28
- */
29
- private static $_instance = null;
30
-
31
- /**
32
- * Crumb position. Increases everytime a new crumb is added.
33
- *
34
- * @since 1.0.0
35
- * @var integer
36
- */
37
- private $crumb_position = 0;
38
-
39
- /**
40
- * Crunbs Array
41
- *
42
- * @since 1.0.0
43
- * @var array
44
- */
45
- private $crumbs = array();
46
-
47
- /**
48
- * Initiate the class JSON_LD_Breadcrumbs
49
- *
50
- * @since 1.0.0
51
- * @return (Object) Instance of JSON_LD_Breadcrumbs
52
- */
53
- public static function instance() {
54
- if ( ! isset( self::$_instance ) ) {
55
- self::$_instance = new self;
56
- }
57
-
58
- return self::$_instance;
59
- }
60
-
61
- /**
62
- * Constructor.
63
- *
64
- * @since 1.0.0
65
- */
66
- private function __construct() {
67
- $this->post = ( isset( $GLOBALS['post'] ) ? $GLOBALS['post'] : null );
68
- $this->show_on_front = get_option( 'show_on_front' );
69
- $this->page_for_posts = get_option( 'page_for_posts' );
70
-
71
- $breadcrumbs_enable = schema_wp_get_option( 'breadcrumbs_enable' );
72
-
73
- if ( $breadcrumbs_enable ) {
74
-
75
- // if Breadcrumbs is enabled within the plugin settings
76
- add_action( 'wp_head', array( $this, 'set_crumbs' ) );
77
- }
78
- }
79
-
80
- /**
81
- * Initialize the Schema for the breadcrumbs markup.
82
- *
83
- * @since 1.0.0
84
- *
85
- * @param (Array) $breadcrumb Breadcrumbs array.
86
- *
87
- * @return (Array) $breadcrumb Breadcrumbs array.
88
- */
89
- private function initialize_breadcrumb_schema( $breadcrumb ) {
90
- $breadcrumb['@context'] = 'http://schema.org';
91
- $breadcrumb['@type'] = 'BreadcrumbList';
92
-
93
- return $breadcrumb;
94
- }
95
-
96
- /**
97
- * Adds homepage to the breadcrumb.
98
- *
99
- * @since 1.0.0
100
- */
101
- private function maybe_add_home_crumb() {
102
- // TODO: Add option in the admin panel to enable or disable home page in breadcrumb.
103
- // TODO: Add option in the admin panel to choose the text for home page.
104
- $this->add_crumb(
105
- 'Home',
106
- get_site_url()
107
- );
108
- }
109
-
110
- /**
111
- * Conditionally adds blog page to the breadcrumb.
112
- *
113
- * @since 1.0.0
114
- */
115
- private function maybe_add_blog_crumb() {
116
- if ( ( 'page' === $this->show_on_front && 'post' === get_post_type() ) && ( ! is_home() && ! is_search() ) ) {
117
- if ( $this->page_for_posts ) {
118
- $this->add_crumb( wp_filter_nohtml_kses( get_the_title( $this->page_for_posts ) ), get_permalink( $this->page_for_posts ) );
119
- }
120
- }
121
- }
122
-
123
- /**
124
- * Add crumb to the breadcrumbs array.
125
- *
126
- * @since 1.0.0
127
- *
128
- * @param String $name Name of the Breadcrumb element.
129
- * @param string $url URL of the Breadcrumb element.
130
- * @param string $image Image URL of the Breadcrumb element.
131
- */
132
- private function add_crumb( $name, $url = '', $image = '' ) {
133
- $this->crumb_position = $this->crumb_position + 1;
134
-
135
- if ( '' == $image ) {
136
- $this->crumbs[] = array(
137
- '@type' => 'ListItem',
138
- 'position' => $this->crumb_position,
139
- 'item' => array(
140
- '@id' => $url,
141
- 'name' => $name,
142
- ),
143
- );
144
- } else {
145
- $this->crumbs[] = array(
146
- '@type' => 'ListItem',
147
- 'position' => $this->crumb_position,
148
- 'item' => array(
149
- '@id' => $url,
150
- 'name' => $name,
151
- 'image' => $image,
152
- ),
153
- );
154
- }
155
- }
156
-
157
- /**
158
- * Post type archive title.
159
- *
160
- * @since 1.0.0
161
- *
162
- * @param string $pt The name of a registered post type.
163
- *
164
- * @return String Title of the post type.
165
- */
166
- private function post_type_archive_title( $pt ) {
167
- $archive_title = '';
168
-
169
- $post_type_obj = get_post_type_object( $pt );
170
- if ( is_object( $post_type_obj ) ) {
171
- if ( isset( $post_type_obj->label ) && '' !== $post_type_obj->label ) {
172
- $archive_title = $post_type_obj->label;
173
- } elseif ( isset( $post_type_obj->labels->menu_name ) && '' !== $post_type_obj->labels->menu_name ) {
174
- $archive_title = $post_type_obj->labels->menu_name;
175
- } else {
176
- $archive_title = $post_type_obj->name;
177
- }
178
- }
179
-
180
- return $archive_title;
181
- }
182
-
183
- /**
184
- * Conditionally adds the post type archive to the breadcrumb.
185
- *
186
- * @since 1.0.0
187
- */
188
- private function maybe_add_pt_archive_crumb_for_post() {
189
- if ( 'post' === $this->post->post_type ) {
190
- return;
191
- }
192
- if ( isset( $this->post->post_type ) && get_post_type_archive_link( $this->post->post_type ) ) {
193
- $this->add_crumb( $this->post_type_archive_title( $this->post->post_type ), get_post_type_archive_link( $this->post->post_type ) );
194
- }
195
- }
196
-
197
- /**
198
- * Conditionally adds taxanomy titles to the breadcrumb.
199
- *
200
- * @since 1.0.0
201
- */
202
- private function maybe_add_taxonomy_crumbs_for_post() {
203
- // TODO: Add an option in admin panel to choose taxanomy base in the breadcrumb.
204
- }
205
-
206
- /**
207
- * Adds post ancestor to the breadcrumb.
208
- *
209
- * @since 1.0.0
210
- */
211
- private function add_post_ancestor_crumbs() {
212
- $ancestors = $this->get_post_ancestors();
213
- if ( is_array( $ancestors ) && array() !== $ancestors ) {
214
- foreach ( $ancestors as $ancestor ) {
215
- $this->add_crumb( wp_filter_nohtml_kses( get_the_title( $ancestor ) ), get_permalink( $ancestor ) );
216
- }
217
- }
218
- }
219
-
220
- /**
221
- * Finds the post ancestors.
222
- *
223
- * @since 1.0.0
224
- * @return Array Ancestors for the current page.
225
- */
226
- private function get_post_ancestors() {
227
- $ancestors = array();
228
-
229
- if ( isset( $this->post->ancestors ) ) {
230
- if ( is_array( $this->post->ancestors ) ) {
231
- $ancestors = array_values( $this->post->ancestors );
232
- } else {
233
- $ancestors = array( $this->post->ancestors );
234
- }
235
- } elseif ( isset( $this->post->post_parent ) ) {
236
- $ancestors = array( $this->post->post_parent );
237
- }
238
-
239
- // Reverse the order so it's oldest to newest.
240
- $ancestors = array_reverse( $ancestors );
241
-
242
- return $ancestors;
243
- }
244
-
245
- /**
246
- * Add Taxanomies to breadcrumb.
247
- *
248
- * @since 1.0.0
249
- */
250
- private function add_crumbs_for_taxonomy() {
251
- $term = $GLOBALS['wp_query']->get_queried_object();
252
- $this->add_crumb( $term->name, get_term_link( $term ) );
253
- }
254
-
255
- /**
256
- * Add month to the breadcrumb.
257
- *
258
- * @since 1.0.0
259
- */
260
- private function add_month_crumb() {
261
- $this->add_crumb(
262
- 'Archives for ' . esc_html( single_month_title( ' ', false ) ),
263
- get_month_link( get_query_var( 'y' ), get_query_var( 'monthnum' ) )
264
- );
265
- }
266
-
267
- /**
268
- * Add Month and year to breadcrumb for date archive.
269
- *
270
- * @since 1.0.0
271
- */
272
- private function add_linked_month_year_crumb() {
273
- $this->add_crumb(
274
- $GLOBALS['wp_locale']->get_month( get_query_var( 'monthnum' ) ) . ' ' . get_query_var( 'year' ),
275
- get_month_link( get_query_var( 'year' ), get_query_var( 'monthnum' ) )
276
- );
277
- }
278
-
279
- /**
280
- * Add date to the breadcrumb.
281
- *
282
- * @since 1.0.0
283
- */
284
- private function add_date_crumb() {
285
- $this->add_crumb(
286
- 'Archives for ' . esc_html( single_month_title( ' ', false ) ),
287
- get_day_link( get_query_var( 'year' ), get_query_var( 'monthnum' ), get_query_var( 'day' ) )
288
- );
289
- }
290
-
291
- /**
292
- * Add year to the breadcrumb.
293
- *
294
- * @since 1.0.0
295
- */
296
- private function add_year_crumb() {
297
- $this->add_crumb(
298
- 'Archives for ' . esc_html( get_query_var( 'year' ) ),
299
- get_year_link( get_query_var( 'year' ) )
300
- );
301
- }
302
-
303
- /**
304
- * Conditionally add individual crumbs to the breadcrumb.
305
- *
306
- * @since 1.0.0
307
- */
308
- private function add_breadcrumb_crumbs() {
309
- global $wp_query;
310
-
311
- $this->maybe_add_home_crumb();
312
- $this->maybe_add_blog_crumb();
313
-
314
- if ( ( 'page' === $this->show_on_front && is_front_page() ) || ( 'posts' === $this->show_on_front && is_home() ) ) {
315
- // Do nothing.
316
- } elseif ( 'page' == $this->show_on_front && is_home() ) {
317
- $this->add_crumb( wp_filter_nohtml_kses( get_the_title( $this->page_for_posts ) ), get_permalink( $this->page_for_posts ) );
318
- } elseif ( is_singular() ) {
319
- $this->maybe_add_pt_archive_crumb_for_post();
320
-
321
- if ( isset( $this->post->post_parent ) && 0 == $this->post->post_parent ) {
322
- $this->maybe_add_taxonomy_crumbs_for_post();
323
- } else {
324
- $this->add_post_ancestor_crumbs();
325
- }
326
-
327
- if ( isset( $this->post->ID ) ) {
328
- $this->add_crumb( wp_filter_nohtml_kses( get_the_title( $this->post->ID ) ), get_permalink( $this->post->ID ), get_the_post_thumbnail_url( $this->post->ID, 'full' ) );
329
- }
330
- } else {
331
- if ( is_post_type_archive() ) {
332
- $post_type = $wp_query->get( 'post_type' );
333
-
334
- if ( $post_type && is_string( $post_type ) ) {
335
- $this->add_crumb( $this->post_type_archive_title( $post_type ), get_post_type_archive_link( $post_type ) );
336
- }
337
- } elseif ( is_tax() || is_tag() || is_category() ) {
338
- $this->add_crumbs_for_taxonomy();
339
- } elseif ( is_date() ) {
340
- if ( is_day() ) {
341
- $this->add_linked_month_year_crumb();
342
- $this->add_date_crumb();
343
- } elseif ( is_month() ) {
344
- $this->add_month_crumb();
345
- } elseif ( is_year() ) {
346
- $this->add_year_crumb();
347
- }
348
- } elseif ( is_author() ) {
349
- $user = $wp_query->get_queried_object();
350
- $this->add_crumb(
351
- 'Archives for ' . $user->display_name,
352
- get_author_posts_url( $user->ID, $user->nicename ),
353
- get_avatar_url( $user->ID )
354
- );
355
- } elseif ( is_search() ) {
356
- $this->add_crumb(
357
- 'Search results for ' . esc_html( get_search_query() ),
358
- get_search_link( get_query_var( 's' ) )
359
- );
360
- } elseif ( is_404() ) {
361
- $this->add_crumb(
362
- 'Error 404: Page not found',
363
- null
364
- );
365
- }// End if().
366
- }// End if().
367
-
368
- return apply_filters( 'schema_json_ld_breadcrumb_itemlist_array', $this->crumbs );
369
- }
370
-
371
- /**
372
- * Initialize the breadcrumbs.
373
- *
374
- * @since 1.0.0
375
- */
376
- public function set_crumbs() {
377
-
378
- // Allow disbakle/enable breadcrumbs output
379
- // @since 1.6.9.5
380
- $breadcrumb_enabled = apply_filters( 'schema_wp_breadcrumb_enabled', true );
381
- // check if enabled
382
- if ( ! $breadcrumb_enabled )
383
- return;
384
-
385
- $breadcrumb = array();
386
- $breadcrumb = $this->initialize_breadcrumb_schema( $breadcrumb );
387
-
388
- $breadcrumb['itemListElement'] = $this->add_breadcrumb_crumbs();
389
-
390
- $this->json_schema( apply_filters( 'schema_json_ld_breadcrumb_array', $breadcrumb ) );
391
- }
392
-
393
- /**
394
- * Output the ld+json schema markup.
395
- *
396
- * @since 1.0.0
397
- *
398
- * @param Array $schema Array to be converted to json markup.
399
- */
400
- private function json_schema( $schema ) {
401
-
402
- $schema_output = null;
403
-
404
- if ( ! empty( $schema ) && is_array( $schema ) ) {
405
- $schema_output .= "\n\n";
406
- $schema_output .= '<!-- This site is optimized with the Schema plugin v'.SCHEMAWP_VERSION.' - https://schema.press -->';
407
- $schema_output .= "\n";
408
- $schema_output .= '<script type="application/ld+json">' . json_encode( $schema, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES ) . '</script>';
409
- $schema_output .= "\n\n";
410
- }
411
-
412
- echo $schema_output;
413
- }
414
-
415
- }
416
-
417
- }// End if().
418
-
419
- add_action( 'wp', 'SCHEMA_JSON_LD_Breadcrumbs::instance' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/extensions/comment.php CHANGED
@@ -77,6 +77,8 @@ function schema_wp_do_comment( $schema ) {
77
  function schema_wp_get_comments() {
78
 
79
  global $post;
 
 
80
 
81
  $number = apply_filters( 'schema_wp_do_comments', '10'); // default = 10
82
 
77
  function schema_wp_get_comments() {
78
 
79
  global $post;
80
+
81
+ //$comments_number = get_comments_number($post->ID);
82
 
83
  $number = apply_filters( 'schema_wp_do_comments', '10'); // default = 10
84
 
includes/extensions/page-about.php CHANGED
@@ -54,7 +54,7 @@ function schema_wp_output_page_about() {
54
  $output .= "\n\n";
55
  $output .= '<!-- This site is optimized with the Schema plugin v'.SCHEMAWP_VERSION.' - http://schema.press -->';
56
  $output .= "\n";
57
- $output .= '<script type="application/ld+json">' . json_encode($json, JSON_UNESCAPED_UNICODE) . '</script>';
58
  $output .= "\n\n";
59
  }
60
 
@@ -102,17 +102,17 @@ function schema_wp_get_page_about_json( $type ) {
102
  );
103
  */
104
 
105
- $schema["headline"] = $json["headline"];
106
 
107
  //$schema["datePublished"] = $json["datePublished"];
108
- //$schema["dateModified"] = $json["dateModified"];
109
 
110
  if ( ! empty( $json["media"] ) ) {
111
  $schema["image"] = array(
112
  "@type" => "ImageObject",
113
- "url" => isset($json["media"]["url"]) ? $json["media"]["url"] : '',
114
- "width" => isset($json["media"]["width"]) ? $json["media"]["width"] : '',
115
- "height" => isset($json["media"]["height"]) ? $json["media"]["height"] : ''
116
  );
117
  }
118
 
54
  $output .= "\n\n";
55
  $output .= '<!-- This site is optimized with the Schema plugin v'.SCHEMAWP_VERSION.' - http://schema.press -->';
56
  $output .= "\n";
57
+ $output .= '<script type="application/ld+json">' . json_encode($json) . '</script>';
58
  $output .= "\n\n";
59
  }
60
 
102
  );
103
  */
104
 
105
+ $schema["headline"] = $json["headline"];
106
 
107
  //$schema["datePublished"] = $json["datePublished"];
108
+ //$schema["dateModified"] = $json["dateModified"];
109
 
110
  if ( ! empty( $json["media"] ) ) {
111
  $schema["image"] = array(
112
  "@type" => "ImageObject",
113
+ "url" => $json["media"]["image_url"],
114
+ "width" => $json["media"]["image_width"],
115
+ "height" => $json["media"]["image_height"]
116
  );
117
  }
118
 
includes/extensions/page-contact.php CHANGED
@@ -54,7 +54,7 @@ function schema_wp_output_page_contact() {
54
  $output .= "\n\n";
55
  $output .= '<!-- This site is optimized with the Schema plugin v'.SCHEMAWP_VERSION.' - http://schema.press -->';
56
  $output .= "\n";
57
- $output .= '<script type="application/ld+json">' . json_encode($json, JSON_UNESCAPED_UNICODE) . '</script>';
58
  $output .= "\n\n";
59
  }
60
 
@@ -102,17 +102,17 @@ function schema_wp_get_page_contact_json( $type ) {
102
  );
103
  */
104
 
105
- $schema["headline"] = $json["headline"];
106
 
107
  //$schema["datePublished"] = $json["datePublished"];
108
- //$schema["dateModified"] = $json["dateModified"];
109
 
110
  if ( ! empty( $json["media"] ) ) {
111
  $schema["image"] = array(
112
  "@type" => "ImageObject",
113
- "url" => isset($json["media"]["url"]) ? $json["media"]["url"] : '',
114
- "width" => isset($json["media"]["width"]) ? $json["media"]["width"] : '',
115
- "height" => isset($json["media"]["height"]) ? $json["media"]["height"] : ''
116
  );
117
  }
118
 
54
  $output .= "\n\n";
55
  $output .= '<!-- This site is optimized with the Schema plugin v'.SCHEMAWP_VERSION.' - http://schema.press -->';
56
  $output .= "\n";
57
+ $output .= '<script type="application/ld+json">' . json_encode($json) . '</script>';
58
  $output .= "\n\n";
59
  }
60
 
102
  );
103
  */
104
 
105
+ $schema["headline"] = $json["headline"];
106
 
107
  //$schema["datePublished"] = $json["datePublished"];
108
+ //$schema["dateModified"] = $json["dateModified"];
109
 
110
  if ( ! empty( $json["media"] ) ) {
111
  $schema["image"] = array(
112
  "@type" => "ImageObject",
113
+ "url" => $json["media"]["image_url"],
114
+ "width" => $json["media"]["image_width"],
115
+ "height" => $json["media"]["image_height"]
116
  );
117
  }
118
 
includes/extensions/post-meta-generator.php CHANGED
@@ -9,11 +9,13 @@
9
  * @since 1.5.9
10
  */
11
 
 
12
  // Exit if accessed directly
13
  if ( ! defined( 'ABSPATH' ) ) exit;
14
 
 
15
  /**
16
- * Post Meta Generator Class
17
  *
18
  * @since 1.5.9
19
  */
@@ -23,13 +25,6 @@ class Schema_Post_Meta_Generator {
23
 
24
  global $post, $meta_key;
25
 
26
- // check if generator is activated
27
- // @since 1.6.9.4
28
- $activate = apply_filters('schema_wp_post_meta_generator_activate', true);
29
- if ( ! $activate )
30
- return;
31
-
32
- // get schema ref
33
  $ref = isset($post->ID) ? get_post_meta( $post->ID, '_schema_ref', true ) : false;
34
 
35
  if ( $ref ) {
@@ -66,11 +61,8 @@ class Schema_Post_Meta_Generator {
66
  $post_meta_value = get_post_meta( $this->post_id, $meta_key, true );
67
 
68
  if ( isset($post_meta_value) && $post_meta_value != '' ) {
69
-
70
- // Anonymous function: automatically use filters to add values to schema output
71
  add_filter( $filter_name, function ($field_value) use ( $meta_key ) {
72
- // Here we can do more conditions
73
- // we can modify the output based on complix field types
74
  $field_value = get_post_meta( $this->post_id, $meta_key, true );
75
  return $field_value;
76
  } );
@@ -110,12 +102,6 @@ function schema_wp_generate_custom_post_meta_box() {
110
 
111
  if ( ! class_exists( 'Schema_WP' ) ) return;
112
 
113
- // check if post meta box generator is activated
114
- // @since 1.6.9.4
115
- $activate = apply_filters('schema_wp_post_meta_box_generator_activate', true);
116
- if ( ! $activate )
117
- return;
118
-
119
  global $post;
120
 
121
  /**
@@ -128,8 +114,7 @@ function schema_wp_generate_custom_post_meta_box() {
128
 
129
  if ( empty($schemas_enabled) ) return;
130
 
131
- // debug
132
- //echo'<pre>';print_r($schemas_enabled);echo'</pre>';
133
 
134
  // Get post type from current screen
135
  $current_screen = get_current_screen();
9
  * @since 1.5.9
10
  */
11
 
12
+
13
  // Exit if accessed directly
14
  if ( ! defined( 'ABSPATH' ) ) exit;
15
 
16
+
17
  /**
18
+ * Post Neta Generator Class
19
  *
20
  * @since 1.5.9
21
  */
25
 
26
  global $post, $meta_key;
27
 
 
 
 
 
 
 
 
28
  $ref = isset($post->ID) ? get_post_meta( $post->ID, '_schema_ref', true ) : false;
29
 
30
  if ( $ref ) {
61
  $post_meta_value = get_post_meta( $this->post_id, $meta_key, true );
62
 
63
  if ( isset($post_meta_value) && $post_meta_value != '' ) {
64
+
 
65
  add_filter( $filter_name, function ($field_value) use ( $meta_key ) {
 
 
66
  $field_value = get_post_meta( $this->post_id, $meta_key, true );
67
  return $field_value;
68
  } );
102
 
103
  if ( ! class_exists( 'Schema_WP' ) ) return;
104
 
 
 
 
 
 
 
105
  global $post;
106
 
107
  /**
114
 
115
  if ( empty($schemas_enabled) ) return;
116
 
117
+ //echo '<pre>'; print_r($schemas_enabled); echo '</pre>';
 
118
 
119
  // Get post type from current screen
120
  $current_screen = get_current_screen();
includes/extensions/sameAs.php CHANGED
@@ -9,9 +9,11 @@
9
  * @since 1.5.9.9
10
  */
11
 
 
12
  // Exit if accessed directly
13
  if ( ! defined( 'ABSPATH' ) ) exit;
14
 
 
15
  add_action( 'current_screen', 'schema_wp_sameAs_post_meta' );
16
  /**
17
  * Add exclude post meta box
@@ -22,11 +24,6 @@ function schema_wp_sameAs_post_meta() {
22
 
23
  if ( ! class_exists( 'Schema_WP' ) ) return;
24
 
25
- // filter this and return false to disable the function
26
- $enabled = apply_filters('schema_wp_sameAs_post_meta_enabled', true);
27
- if ( ! $enabled)
28
- return;
29
-
30
  global $post;
31
 
32
  $prefix = '_schema_';
@@ -81,6 +78,7 @@ function schema_wp_sameAs_post_meta() {
81
  endforeach;
82
  }
83
 
 
84
  add_filter('schema_output', 'schema_wp_sameAs_output' );
85
  add_filter('schema_about_page_output', 'schema_wp_sameAs_output' );
86
  add_filter('schema_contact_page_output', 'schema_wp_sameAs_output' );
@@ -91,11 +89,6 @@ add_filter('schema_contact_page_output', 'schema_wp_sameAs_output' );
91
  */
92
  function schema_wp_sameAs_output( $schema ) {
93
 
94
- // filter this and return false to disable the function
95
- $enabled = apply_filters('schema_wp_sameAs_output_enabled', true);
96
- if ( ! $enabled)
97
- return $schema;
98
-
99
  global $post;
100
 
101
  if ( empty($schema) ) return;
@@ -117,6 +110,7 @@ function schema_wp_sameAs_output( $schema ) {
117
  return $schema;
118
  }
119
 
 
120
  /**
121
  * Get sameAs
122
  *
@@ -142,4 +136,4 @@ function schema_wp_get_sameAs( $post_id = null ) {
142
  //echo '<pre>'; print_r($sameAs_array); echo '</pre>';exit;
143
 
144
  return $sameAs_array;
145
- }
9
  * @since 1.5.9.9
10
  */
11
 
12
+
13
  // Exit if accessed directly
14
  if ( ! defined( 'ABSPATH' ) ) exit;
15
 
16
+
17
  add_action( 'current_screen', 'schema_wp_sameAs_post_meta' );
18
  /**
19
  * Add exclude post meta box
24
 
25
  if ( ! class_exists( 'Schema_WP' ) ) return;
26
 
 
 
 
 
 
27
  global $post;
28
 
29
  $prefix = '_schema_';
78
  endforeach;
79
  }
80
 
81
+
82
  add_filter('schema_output', 'schema_wp_sameAs_output' );
83
  add_filter('schema_about_page_output', 'schema_wp_sameAs_output' );
84
  add_filter('schema_contact_page_output', 'schema_wp_sameAs_output' );
89
  */
90
  function schema_wp_sameAs_output( $schema ) {
91
 
 
 
 
 
 
92
  global $post;
93
 
94
  if ( empty($schema) ) return;
110
  return $schema;
111
  }
112
 
113
+
114
  /**
115
  * Get sameAs
116
  *
136
  //echo '<pre>'; print_r($sameAs_array); echo '</pre>';exit;
137
 
138
  return $sameAs_array;
139
+ }
includes/extensions/video-object.php CHANGED
@@ -21,13 +21,7 @@ function schema_wp_video_object_admin_init() {
21
 
22
  if ( ! is_admin() ) return;
23
 
24
- if ( ! class_exists( 'Schema_WP' ) )
25
- return;
26
-
27
- $video_objec_enable = schema_wp_get_option( 'video_object_enable' );
28
-
29
- if ( $video_objec_enable != true )
30
- return;
31
 
32
  $prefix = '_schema_video_object_';
33
 
@@ -243,17 +237,16 @@ function schema_wp_video_object_output( $schema ) {
243
 
244
  if ( $video_object_enable != true )
245
  return $schema;
246
-
247
  global $wp_query, $post, $wp_embed;
248
 
249
  // Maybe this is not needed!
250
  if ( ! $wp_query->is_main_query() ) return $schema;
251
 
252
- // This didn't work, that's why it's commented
253
- //if ( $wp_embed->last_url == '' || ! isset($wp_embed->last_url) ) return $schema;
254
 
255
  // Get post meta
256
- $schema_ref = get_post_meta( $post->ID, '_schema_ref', true );
257
 
258
  // Check for ref, if is not presented, then get out!
259
  if ( ! isset($schema_ref) || $schema_ref == '' ) return $schema;
@@ -262,7 +255,7 @@ function schema_wp_video_object_output( $schema ) {
262
  $type = get_post_meta( $schema_ref, '_schema_video_object_type', true );
263
 
264
  //if ( ! isset($enabled) ) $enabled = false; // default
265
- //if ( ! isset($video_object_type_enabled) || $video_object_type_enabled == '' ) $video_object_type_enabled = false; // default
266
  if ( ! isset($type) ) $type = 'none'; // default
267
 
268
  if ( $type != 'none' ) {
@@ -338,12 +331,11 @@ function schema_wp_video_object_output( $schema ) {
338
  }
339
 
340
  // Debug
341
- /*if (current_user_can( 'manage_options' )) {
342
- echo'<pre>'; print_r( $schema ); echo'</pre>';
343
- exit;
344
- echo 'Execution time in seconds: ' . (microtime(true) - $time_start) . '<br>';
345
- }
346
- */
347
 
348
  // finally!
349
  return $schema;
21
 
22
  if ( ! is_admin() ) return;
23
 
24
+ if ( ! class_exists( 'Schema_WP' ) ) return;
 
 
 
 
 
 
25
 
26
  $prefix = '_schema_video_object_';
27
 
237
 
238
  if ( $video_object_enable != true )
239
  return $schema;
240
+
241
  global $wp_query, $post, $wp_embed;
242
 
243
  // Maybe this is not needed!
244
  if ( ! $wp_query->is_main_query() ) return $schema;
245
 
246
+ if ( $wp_embed->last_url == '' || ! isset($wp_embed->last_url) ) return $schema;
 
247
 
248
  // Get post meta
249
+ $schema_ref = get_post_meta( $post->ID, '_schema_ref' , true );
250
 
251
  // Check for ref, if is not presented, then get out!
252
  if ( ! isset($schema_ref) || $schema_ref == '' ) return $schema;
255
  $type = get_post_meta( $schema_ref, '_schema_video_object_type', true );
256
 
257
  //if ( ! isset($enabled) ) $enabled = false; // default
258
+ //if ( ! isset($video_object_type_enabled) || $video_object_type_enabled == '' ) $video_object_type_enabled = false; // default
259
  if ( ! isset($type) ) $type = 'none'; // default
260
 
261
  if ( $type != 'none' ) {
331
  }
332
 
333
  // Debug
334
+ //if (current_user_can( 'manage_options' )) {
335
+ //echo'<pre>'; print_r( $schema ); echo'</pre>';
336
+ //exit;
337
+ //echo 'Execution time in seconds: ' . (microtime(true) - $time_start) . '<br>';
338
+ //}
 
339
 
340
  // finally!
341
  return $schema;
includes/integrations/amp.php CHANGED
@@ -10,20 +10,42 @@
10
  // Exit if accessed directly
11
  if ( ! defined( 'ABSPATH' ) ) exit;
12
 
13
- add_filter( 'amp_post_template_metadata', 'schema_wp_amp_modify_json_output', 10, 2 );
14
  /**
15
- * Modify AMP json-ld output
16
  *
17
- * @since 1.6.9.5
 
18
  */
19
- function schema_wp_amp_modify_json_output( $metadata, $post ) {
 
 
20
 
21
- $json = schema_wp_get_jsonld( $post->ID );
 
22
 
23
- if ( $json ) {
24
- return $json;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  }
26
 
27
  // Return the un-filtered array
28
- return $metadata;
29
  }
 
 
 
 
10
  // Exit if accessed directly
11
  if ( ! defined( 'ABSPATH' ) ) exit;
12
 
13
+ add_filter('amp_post_template_metadata', 'schema_wp_amp');
14
  /**
15
+ * Override schema json-ld for AMP plugin
16
  *
17
+ * @since 1.3
18
+ * @return schema json-ld final output
19
  */
20
+ function schema_wp_amp( $jason_array ) {
21
+
22
+ global $post;
23
 
24
+ // Check if AMP plugin is active
25
+ if ( ! defined( 'AMP__FILE__' ) ) return;
26
 
27
+ // Check if AMP function exists
28
+ if ( ! function_exists('is_amp_endpoint') ) return;
29
+
30
+ // Check if an AMP version of a post is being viewed
31
+ if ( is_amp_endpoint() && is_single() ) {
32
+ $json = array();
33
+ // Get ref of Schema type in post meta
34
+ // @since 1.5.3
35
+ $ref = get_post_meta( $post->ID, '_schema_ref', true );
36
+ if ( $ref != '' ) {
37
+ $schema_type = get_post_meta( (int)$ref, '_schema_type', true );
38
+ $schema_sub_type = get_post_meta( (int)$ref, '_schema_article_type', true );
39
+ $type = ($schema_sub_type != '') ? $schema_sub_type : $schema_type;
40
+ $json = schema_wp_get_schema_json( $type );
41
+ return $json;
42
+ }
43
  }
44
 
45
  // Return the un-filtered array
46
+ return $jason_array;
47
  }
48
+
49
+
50
+
51
+
includes/integrations/edd.php DELETED
@@ -1,40 +0,0 @@
1
- <?php
2
- /**
3
- * Easy Digital Downloads (EDD)
4
- *
5
- *
6
- * Integrate with EDD plugin
7
- *
8
- * plugin url: https://wordpress.org/plugins/easy-digital-downloads/
9
- * @since 1.6.9.8
10
- */
11
-
12
- // Exit if accessed directly
13
- if ( ! defined( 'ABSPATH' ) ) exit;
14
-
15
- //add_filter( 'schema_wp_breadcrumb_enabled', 'schema_wp_breadcrumb_edd_product_disable' );
16
- /*
17
- * Disable breadcrumbs on WooCommerce
18
- *
19
- * @since 1.6.9.5
20
- */
21
- function schema_wp_breadcrumb_edd_product_disable( $breadcrumb_enabled ){
22
-
23
- if ( function_exists( 'edd_add_schema_microdata' ) ) {
24
- if ( edd_add_schema_microdata() ) return false;
25
- }
26
- return true;
27
- }
28
-
29
- add_action( 'schema_wp_action_post_type_archive', 'schema_wp_edd_add_schema_microdata_disable' );
30
- /*
31
- * Disable EDD Product markup output , it's hook to the post type archive function
32
- *
33
- * @since 1.6.9.8
34
- */
35
- function schema_wp_edd_add_schema_microdata_disable(){
36
-
37
- if ( function_exists( 'edd_add_schema_microdata' ) ) {
38
- add_filter( 'edd_add_schema_microdata', '__return_false' );
39
- }
40
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/integrations/genesis.php CHANGED
@@ -3,9 +3,9 @@
3
  * Genesis Theme
4
  *
5
  *
6
- * Remove Geiesis schema output
7
  *
8
- * plugin url: https://www.studiopress.com/
9
  * @since 1.5.4
10
  */
11
 
@@ -65,8 +65,10 @@ function schema_wp_genesis_attributes_removal_function( $attributes ) {
65
  $attributes['itemtype'] = '';
66
 
67
  return $attributes;
 
68
  }
69
 
 
70
  add_action( 'init', 'schema_wp_wprs_remove_genesis_search_form' );
71
  /*
72
  * Remove Genesis search form filter
@@ -75,9 +77,11 @@ add_action( 'init', 'schema_wp_wprs_remove_genesis_search_form' );
75
  */
76
  function schema_wp_wprs_remove_genesis_search_form() {
77
 
78
- remove_filter( 'get_search_form', 'genesis_search_form' );
 
79
  }
80
 
 
81
  /*
82
  * Add Genesis search form without markup
83
  *
@@ -98,14 +102,9 @@ add_filter( 'get_search_form', 'wp_schema_genesis_search_form' );
98
  *
99
  * @return string HTML markup.
100
  */
101
- function wp_schema_genesis_search_form( $form) {
102
-
103
- // Added extra checks for older versions of Genesis to prevent errors
104
- // @since 1.6.2
105
- if ( ! function_exists('genesis_html5') ) return $form;
106
- if ( ! function_exists('genesis_a11y') ) return $form;
107
- if ( ! function_exists('genesis_attr') ) return $form;
108
 
 
109
 
110
  $search_text = get_search_query() ? apply_filters( 'the_search_query', get_search_query() ) : apply_filters( 'genesis_search_text', __( 'Search this website', 'genesis' ) . ' &#x02026;' );
111
 
@@ -119,6 +118,8 @@ function wp_schema_genesis_search_form( $form) {
119
 
120
  $value_or_placeholder = ( get_search_query() == '' ) ? 'placeholder' : 'value';
121
 
 
 
122
  if ( genesis_html5() ) {
123
 
124
  $form = sprintf( '<form %s>', genesis_attr( 'search-form' ) );
@@ -154,6 +155,7 @@ function wp_schema_genesis_search_form( $form) {
154
  );
155
  }
156
 
 
157
  } else {
158
 
159
  $form = sprintf(
@@ -169,42 +171,5 @@ function wp_schema_genesis_search_form( $form) {
169
  }
170
 
171
  return apply_filters( 'genesis_search_form', $form, $search_text, $button_text, $label );
172
- }
173
-
174
- add_action( 'init', 'schema_wp_remove_genesis_breadcrumbs_attr_markup' );
175
- /*
176
- * Remove Genesis Breadcrumbs attributes
177
- *
178
- * @since 1.6.9.4
179
- */
180
- function schema_wp_remove_genesis_breadcrumbs_attr_markup() {
181
-
182
- $breadcrumbs_enable = schema_wp_get_option( 'breadcrumbs_enable' );
183
-
184
- if ( $breadcrumbs_enable ) {
185
-
186
- add_filter( 'genesis_attr_breadcrumb', 'schema_wp_genesis_attributes_removal_function', 20 );
187
- add_filter( 'genesis_attr_breadcrumb-link-wrap', 'schema_wp_genesis_attributes_removal_function', 20 );
188
-
189
- }
190
- }
191
 
192
- add_action( 'genesis_breadcrumb_link', 'schema_wp_remove_genesis_breadcrumbs_link_markup' );
193
- /*
194
- * Remove Genesis Breadcrumbs itemprop markup
195
- *
196
- * @since 1.6.9.4
197
- */
198
- function schema_wp_remove_genesis_breadcrumbs_link_markup( $output ) {
199
-
200
- $breadcrumbs_enable = schema_wp_get_option( 'breadcrumbs_enable' );
201
-
202
- if ( $breadcrumbs_enable ) {
203
-
204
- $output = str_replace('itemprop="name"', '', $output);
205
- $output = str_replace('itemprop="item"', '', $output);
206
-
207
- }
208
-
209
- return $output;
210
  }
3
  * Genesis Theme
4
  *
5
  *
6
+ * Remove Geiesis schema output from content
7
  *
8
+ * plugin url: http://www.studiopress.com/
9
  * @since 1.5.4
10
  */
11
 
65
  $attributes['itemtype'] = '';
66
 
67
  return $attributes;
68
+
69
  }
70
 
71
+
72
  add_action( 'init', 'schema_wp_wprs_remove_genesis_search_form' );
73
  /*
74
  * Remove Genesis search form filter
77
  */
78
  function schema_wp_wprs_remove_genesis_search_form() {
79
 
80
+ remove_filter( 'get_search_form', 'genesis_search_form' );
81
+
82
  }
83
 
84
+
85
  /*
86
  * Add Genesis search form without markup
87
  *
102
  *
103
  * @return string HTML markup.
104
  */
105
+ function wp_schema_genesis_search_form() {
 
 
 
 
 
 
106
 
107
+ if ( ! function_exists('genesis_html5') ) return;
108
 
109
  $search_text = get_search_query() ? apply_filters( 'the_search_query', get_search_query() ) : apply_filters( 'genesis_search_text', __( 'Search this website', 'genesis' ) . ' &#x02026;' );
110
 
118
 
119
  $value_or_placeholder = ( get_search_query() == '' ) ? 'placeholder' : 'value';
120
 
121
+
122
+
123
  if ( genesis_html5() ) {
124
 
125
  $form = sprintf( '<form %s>', genesis_attr( 'search-form' ) );
155
  );
156
  }
157
 
158
+
159
  } else {
160
 
161
  $form = sprintf(
171
  }
172
 
173
  return apply_filters( 'genesis_search_form', $form, $search_text, $button_text, $label );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
175
  }
includes/integrations/seo-framework.php CHANGED
@@ -12,7 +12,8 @@
12
  // Exit if accessed directly
13
  if ( ! defined( 'ABSPATH' ) ) exit;
14
 
15
- add_filter( 'schema_wp_filter_output_knowledge_graph', 'schema_wp_seo_framework_knowledge_graph_remove' );
 
16
  /*
17
  * Remove Knowledge Graph
18
  *
@@ -24,7 +25,8 @@ function schema_wp_seo_framework_knowledge_graph_remove( $knowledge_graph ) {
24
  return $knowledge_graph;
25
  }
26
 
27
- add_filter( 'schema_wp_output_sitelinks_search_box', 'schema_wp_seo_framework_sitelinks_search_box_remove' );
 
28
  /*
29
  * Remove SiteLinks Search Box
30
  *
12
  // Exit if accessed directly
13
  if ( ! defined( 'ABSPATH' ) ) exit;
14
 
15
+
16
+ add_action( 'schema_wp_output_knowledge_graph', 'schema_wp_seo_framework_knowledge_graph_remove' );
17
  /*
18
  * Remove Knowledge Graph
19
  *
25
  return $knowledge_graph;
26
  }
27
 
28
+
29
+ add_action( 'schema_wp_output_sitelinks_search_box', 'schema_wp_seo_framework_sitelinks_search_box_remove' );
30
  /*
31
  * Remove SiteLinks Search Box
32
  *
includes/integrations/thirstyaffiliates.php DELETED
@@ -1,30 +0,0 @@
1
- <?php
2
- /**
3
- * ThirstyAffiliates
4
- *
5
- *
6
- * Integrate with ThirstyAffiliates plugin
7
- *
8
- * plugin url: https://wprichsnippets.com/
9
- * @since 1.6.9.1
10
- */
11
-
12
- // Exit if accessed directly
13
- if ( ! defined( 'ABSPATH' ) ) exit;
14
-
15
-
16
- add_action( 'schema_wp_post_types', 'schema_wp_thirstyaffiliates_remove_cpt' );
17
- /*
18
- * Unset ThirstyAffiliates post type "thirstylink", plugin shouldn't ever run here at this pont!
19
- *
20
- * @since 1.6.9.1
21
- */
22
- function schema_wp_thirstyaffiliates_remove_cpt( $post_types ) {
23
-
24
- if (!is_plugin_active('thirstyaffiliates/thirstyaffiliates.php'))
25
- return $post_types;
26
-
27
- unset($post_types['thirstylink']);
28
-
29
- return $post_types;
30
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/integrations/woocommerce.php DELETED
@@ -1,27 +0,0 @@
1
- <?php
2
- /**
3
- * WooCommerce
4
- *
5
- *
6
- * Integrate with WooCommerce plugin
7
- *
8
- * plugin url: https://wordpress.org/plugins/woocommerce/
9
- * @since 1.6.9.5
10
- */
11
-
12
- // Exit if accessed directly
13
- if ( ! defined( 'ABSPATH' ) ) exit;
14
-
15
- add_filter( 'schema_wp_breadcrumb_enabled', 'schema_wp_breadcrumb_woo_product_disable' );
16
- /*
17
- * Disable breadcrumbs on WooCommerce
18
- *
19
- * @since 1.6.9.5
20
- */
21
- function schema_wp_breadcrumb_woo_product_disable( $breadcrumb_enabled ){
22
-
23
- if ( class_exists( 'woocommerce' ) ) {
24
- if ( is_woocommerce() ) return false;
25
- }
26
- return true;
27
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/integrations/yoast-seo.php CHANGED
@@ -12,113 +12,28 @@
12
  // Exit if accessed directly
13
  if ( ! defined( 'ABSPATH' ) ) exit;
14
 
15
- add_filter( 'wpseo_json_ld_output', 'schema_wp_remove_yoast_json', 10, 1 );
16
- /*
17
- * Remove Yoast SEO plugin JSON-LD output
18
- *
19
- * @since 1.6.4
20
- */
21
- function schema_wp_remove_yoast_json( $data ){
22
-
23
- $use_yoast_seo_json = schema_wp_get_option( 'use_yoast_seo_json' );
24
-
25
- if ( empty($use_yoast_seo_json) ) {
26
- $data = array();
27
- }
28
-
29
- return $data;
30
- }
31
 
32
- add_filter( 'wpseo_breadcrumb_output', 'my_wpseo_breadcrumb_output' );
33
- /*
34
- * Remove Yoast SEO plugin breadcrumb markup output
35
- *
36
- * @since 1.6.9.4
37
- */
38
- function my_wpseo_breadcrumb_output( $output ) {
39
-
40
- $breadcrumbs_enable = schema_wp_get_option( 'breadcrumbs_enable' );
41
-
42
- if ( $breadcrumbs_enable ) {
43
-
44
- // clean Yoast SEO from RDF markups
45
- $output = str_replace('xmlns:v="http://rdf.data-vocabulary.org/#"', '', $output);
46
- $output = str_replace('typeof="v:Breadcrumb"', '', $output);
47
- $output = str_replace('rel="v:url"', '', $output);
48
- $output = str_replace('property="v:title"', '', $output);
49
- $output = str_replace('rel="v:child"', '', $output);
50
- }
51
-
52
- return $output;
53
- }
54
-
55
- add_action( 'admin_init', 'schema_wp_yoast_seo_register_settings', 1 );
56
- /*
57
- * Register Yoast SEO plugin settings
58
- *
59
- * @since 1.6.4
60
- */
61
- function schema_wp_yoast_seo_register_settings() {
62
-
63
- if ( ! defined('WPSEO_VERSION') ) return;
64
-
65
- add_filter( 'schema_wp_settings_knowledge_graph', 'schema_wp_yoast_seo_settings_knowledge_graph');
66
- }
67
-
68
- /*
69
- * Add Yoast SEO plugin settings
70
- *
71
- * @since 1.6.4
72
- */
73
- function schema_wp_yoast_seo_settings_knowledge_graph( $settings_knowledge_graph ) {
74
-
75
- $settings_knowledge_graph['organization']['use_yoast_seo_json'] = array(
76
- 'id' => 'use_yoast_seo_json',
77
- 'name' => __( 'Use Yoast SEO markup?', 'schema-wp' ),
78
- 'desc' => '<span class="dashicons dashicons-warning"></span> '. __( 'Yoast SEO plugin is active!', 'schema-wp'). '<p>'. __('By default, Schema plugin will override Yoast SEO output. Check this box if you would like to disable Schema markup and use Yoast SEO output instead. (This will be enabled on Search Results feature as well)', 'schema-wp') . '</p>',
79
- 'type' => 'checkbox'
80
- );
81
-
82
- return $settings_knowledge_graph;
83
- }
84
-
85
- add_filter( 'schema_wp_filter_output_knowledge_graph', 'schema_wp_yoast_knowledge_graph_remove' );
86
  /*
87
  * Remove Knowledge Graph
88
  *
89
  * @since 1.5.6
90
  */
91
  function schema_wp_yoast_knowledge_graph_remove( $knowledge_graph ) {
92
-
93
- include_once(ABSPATH.'wp-admin/includes/plugin.php');
94
-
95
- // Plugin is active ?
96
- if( is_plugin_active( 'wordpress-seo/wp-seo.php' ) || is_plugin_active( 'wordpress-seo-premium/wp-seo-premium.php' ) ) {
97
-
98
- $use_yoast_seo_json = schema_wp_get_option( 'use_yoast_seo_json' );
99
-
100
- if ( ! empty($use_yoast_seo_json) )
101
- return; // do nothing!
102
- }
103
-
104
  return $knowledge_graph;
105
  }
106
 
107
- add_filter( 'schema_wp_output_sitelinks_search_box', 'schema_wp_yoast_sitelinks_search_box_remove' );
 
108
  /*
109
- * Remove SiteLinks & Search Box
110
  *
111
  * @since 1.5.6
112
  */
113
  function schema_wp_yoast_sitelinks_search_box_remove( $sitelinks_search_box ) {
114
- // Run only on front page and if Yoast SEO is active
115
- if ( ! is_front_page() ) return;
116
-
117
- $use_yoast_seo_json = schema_wp_get_option( 'use_yoast_seo_json' );
118
-
119
- if ( ! empty($use_yoast_seo_json) && defined('WPSEO_VERSION') ) {
120
- return; // do nothing!
121
- }
122
-
123
  return $sitelinks_search_box;
124
  }
12
  // Exit if accessed directly
13
  if ( ! defined( 'ABSPATH' ) ) exit;
14
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
+ add_action( 'schema_wp_output_knowledge_graph', 'schema_wp_yoast_knowledge_graph_remove' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  /*
18
  * Remove Knowledge Graph
19
  *
20
  * @since 1.5.6
21
  */
22
  function schema_wp_yoast_knowledge_graph_remove( $knowledge_graph ) {
23
+ // Run only on front page and make sure Yoast SEO isn't active
24
+ if (is_front_page() && defined('WPSEO_VERSION') ) return;
 
 
 
 
 
 
 
 
 
 
25
  return $knowledge_graph;
26
  }
27
 
28
+
29
+ add_action( 'schema_wp_output_sitelinks_search_box', 'schema_wp_yoast_sitelinks_search_box_remove' );
30
  /*
31
+ * Remove bar menu
32
  *
33
  * @since 1.5.6
34
  */
35
  function schema_wp_yoast_sitelinks_search_box_remove( $sitelinks_search_box ) {
36
+ // Run only on front page and make sure Yoast SEO isn't active
37
+ if (is_front_page() && defined('WPSEO_VERSION') ) return;
 
 
 
 
 
 
 
38
  return $sitelinks_search_box;
39
  }
includes/json/author.php CHANGED
@@ -28,7 +28,7 @@ function schema_wp_output_author() {
28
  $output .= "\n\n";
29
  $output .= '<!-- This site is optimized with the Schema plugin v'.SCHEMAWP_VERSION.' - http://schema.press -->';
30
  $output .= "\n";
31
- $output .= '<script type="application/ld+json">' . json_encode($json, JSON_UNESCAPED_UNICODE) . '</script>';
32
  $output .= "\n\n";
33
  }
34
 
@@ -38,7 +38,7 @@ function schema_wp_output_author() {
38
 
39
 
40
  /**
41
- * The main function responsible for putting schema array all together
42
  *
43
  * @param string $type for schema type (example: Person)
44
  * @since 1.4.5
@@ -72,11 +72,8 @@ function schema_wp_get_author_json( $type ) {
72
 
73
  if ( !empty($name) ) $schema['name'] = $name;
74
  //if ( !empty($email) ) $schema['email'] = $email;
75
- if ( !empty($url) ) {
76
- $schema['url'] = $url;
77
- $schema['@id'] = $url;
78
- }
79
  if ( !empty($desc) ) $schema['description'] = $desc;
80
 
81
- return apply_filters( 'schema_author_output', $schema );
82
  }
28
  $output .= "\n\n";
29
  $output .= '<!-- This site is optimized with the Schema plugin v'.SCHEMAWP_VERSION.' - http://schema.press -->';
30
  $output .= "\n";
31
+ $output .= '<script type="application/ld+json">' . json_encode($json) . '</script>';
32
  $output .= "\n\n";
33
  }
34
 
38
 
39
 
40
  /**
41
+ * The main function responsible for putting shema array all together
42
  *
43
  * @param string $type for schema type (example: Person)
44
  * @since 1.4.5
72
 
73
  if ( !empty($name) ) $schema['name'] = $name;
74
  //if ( !empty($email) ) $schema['email'] = $email;
75
+ if ( !empty($url) ) $schema['url'] = $url;
 
 
 
76
  if ( !empty($desc) ) $schema['description'] = $desc;
77
 
78
+ return $schema;
79
  }
includes/json/blog.php CHANGED
@@ -24,14 +24,11 @@ function schema_wp_output_blog() {
24
 
25
  $output = '';
26
 
27
- // debug
28
- //echo'<pre>';print_r($json);echo'</pre>';
29
-
30
- if ( $json ) {
31
  $output .= "\n\n";
32
- $output .= '<!-- This site is optimized with the Schema plugin v'.SCHEMAWP_VERSION.' - https://schema.press -->';
33
  $output .= "\n";
34
- $output .= '<script type="application/ld+json">' . json_encode($json, JSON_UNESCAPED_UNICODE) . '</script>';
35
  $output .= "\n\n";
36
  }
37
 
@@ -44,78 +41,59 @@ function schema_wp_output_blog() {
44
  * The main function responsible for putting shema array all together
45
  *
46
  * @param string $type for schema type (example: Person)
47
- * @since 1.6.9.5
48
  * @return schema output
49
  */
50
  function schema_wp_get_blog_json( $type ) {
51
 
52
- global $post, $wp_query, $query_string;
53
-
54
- // debug
55
- //echo'<pre>';print_r($wp_query);echo'</pre>';exit;
56
- //var_dump( $GLOBALS['wp_query'] );
57
 
58
- if ( empty($wp_query->query_vars) ) return;
59
 
60
- $blogPost = array();
61
- $schema = array();
 
62
 
63
- $secondary_loop = new WP_Query( $wp_query->query_vars );
 
 
64
 
65
- if ( $secondary_loop->have_posts() ):
66
-
67
- // get markup data for each post in the query
68
- if ( ! empty($secondary_loop->posts) ) {
69
- foreach ($secondary_loop->posts as $schema_post) {
70
-
71
- // pull json from post meta
72
- $schema_json = get_post_meta( $schema_post->ID, '_schema_json', true );
73
-
74
- if ( isset($schema_json) && is_array($schema_json) ) {
75
-
76
- $blogPost[] = $schema_json;
77
-
78
- } else {
79
-
80
- // create it
81
- $blogPost[] = apply_filters( 'schema_output_blog_post', array
82
- (
83
- '@type' => 'BlogPosting',
84
- 'headline' => wp_filter_nohtml_kses( get_the_title() ),
85
- //'description' => strip_shortcodes( get_the_excerpt($post->ID) ),
86
- 'url' => get_the_permalink(),
87
- 'sameAs' => schema_wp_get_sameAs($schema_post->ID),
88
- 'datePublished' => get_the_date('c'),
89
- 'dateModified' => get_the_modified_date('c'),
90
- 'mainEntityOfPage' => get_the_permalink(),
91
- 'author' => schema_wp_get_author_array(),
92
- 'publisher' => schema_wp_get_publisher_array(),
93
- 'image' => schema_wp_get_media($schema_post->ID),
94
- 'keywords' => schema_wp_get_post_tags($schema_post->ID),
95
- 'commentCount' => get_comments_number(),
96
- 'comment' => schema_wp_get_comments(),
97
- ));
98
- }
99
- }
100
- }
101
 
102
- wp_reset_postdata();
103
 
104
- // put all together
105
- $schema = array
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  (
107
  '@context' => 'http://schema.org/',
108
  '@type' => "Blog",
109
- 'headline' => get_option( 'page_for_posts' ) ? wp_filter_nohtml_kses( get_the_title( get_option( 'page_for_posts' ) ) ) : get_bloginfo( 'name' ),
110
  'description' => get_bloginfo( 'description' ),
111
- 'url' => get_option( 'page_for_posts' ) ? get_permalink( get_option( 'page_for_posts' ) ) : get_home_url(),
112
  'blogPost' => $blogPost,
113
  );
114
-
115
- endif;
116
-
117
- // debug
118
- //echo'<pre>';print_r($schema);echo'</pre>';exit;
119
-
120
  return apply_filters( 'schema_blog_output', $schema );
121
  }
24
 
25
  $output = '';
26
 
27
+ if ($json) {
 
 
 
28
  $output .= "\n\n";
29
+ $output .= '<!-- This site is optimized with the Schema plugin v'.SCHEMAWP_VERSION.' - http://schema.press -->';
30
  $output .= "\n";
31
+ $output .= '<script type="application/ld+json">' . json_encode($json) . '</script>';
32
  $output .= "\n\n";
33
  }
34
 
41
  * The main function responsible for putting shema array all together
42
  *
43
  * @param string $type for schema type (example: Person)
44
+ * @since 1.5.4
45
  * @return schema output
46
  */
47
  function schema_wp_get_blog_json( $type ) {
48
 
49
+ if ( ! isset($type) ) return;
 
 
 
 
50
 
51
+ global $post;
52
 
53
+ $blogPost = array();
54
+
55
+ while ( have_posts() ) : the_post();
56
 
57
+ // check JSON-LD in post meta
58
+ // @since 1.6
59
+ $blog_post_json = get_post_meta( $post->ID, '_schema_json', true );
60
 
61
+ if ( isset($blog_post_json) && !empty($blog_post_json) ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
 
63
+ $blogPost[] = $blog_post_json;
64
 
65
+ } else {
66
+
67
+ $blogPost[] = apply_filters( 'schema_output_blog_post', array
68
+ (
69
+ '@type' => 'BlogPosting',
70
+ 'headline' => get_the_title(),
71
+ //'description' => strip_shortcodes( get_the_excerpt($post->ID) ),
72
+ 'url' => get_the_permalink(),
73
+ 'sameAs' => schema_wp_get_sameAs($post->ID),
74
+ 'datePublished' => get_the_date('c'),
75
+ 'dateModified' => get_the_modified_date('c'),
76
+ 'mainEntityOfPage' => get_the_permalink(),
77
+ 'author' => schema_wp_get_author_array(),
78
+ 'publisher' => schema_wp_get_publisher_array(),
79
+ 'image' => schema_wp_get_media(),
80
+ 'keywords' => schema_wp_get_post_tags($post->ID),
81
+ 'commentCount' => get_comments_number(),
82
+ 'comment' => schema_wp_get_comments(),
83
+ ));
84
+ }
85
+
86
+ endwhile;
87
+
88
+ $schema = array
89
  (
90
  '@context' => 'http://schema.org/',
91
  '@type' => "Blog",
92
+ 'headline' => get_option( 'page_for_posts' ) ? get_the_title( get_option( 'page_for_posts' ) ) : get_bloginfo( 'name' ),
93
  'description' => get_bloginfo( 'description' ),
94
+ 'url' => get_option( 'page_for_posts' ) ? get_permalink( get_option( 'page_for_posts' ) ) : get_site_url(),
95
  'blogPost' => $blogPost,
96
  );
97
+
 
 
 
 
 
98
  return apply_filters( 'schema_blog_output', $schema );
99
  }
includes/json/category.php CHANGED
@@ -17,25 +17,20 @@ add_action('wp_head', 'schema_wp_output_category');
17
  */
18
  function schema_wp_output_category() {
19
 
20
- // filter this and return false to disable the function
21
- $enabled = apply_filters('schema_wp_output_category_enabled', true);
22
- if ( ! $enabled)
23
- return;
24
-
25
  if ( is_admin() ) return;
26
-
27
  // Run only on category pages
28
  if ( is_category() ) {
29
 
30
- $output = '';
31
 
32
- $json = schema_wp_get_category_json();
33
 
34
  if ($json) {
35
  $output .= "\n\n";
36
- $output .= '<!-- This site is optimized with the Schema plugin v'.SCHEMAWP_VERSION.' - https://schema.press -->';
37
  $output .= "\n";
38
- $output .= '<script type="application/ld+json">' . json_encode($json, JSON_UNESCAPED_UNICODE) . '</script>';
39
  $output .= "\n\n";
40
  }
41
 
@@ -51,34 +46,23 @@ function schema_wp_output_category() {
51
  * @since 1.5.7
52
  * @return array json
53
  */
54
- function schema_wp_get_category_json() {
55
-
 
 
56
  global $post, $query_string;
57
 
58
  // debug
59
  //echo'<pre>';print_r($query_string);echo'</pre>';exit;
60
 
61
- $blogPost = array();
62
- $json = array();
63
 
64
  $secondary_loop = new WP_Query( $query_string );
65
 
66
  if ( $secondary_loop->have_posts() ):
67
-
68
- // Faster way to get markup data
69
- // @since 1.6.9.4
70
- if ( ! empty($secondary_loop->posts) ) {
71
- foreach ($secondary_loop->posts as $schema_post) {
72
- $schema_json = get_post_meta( $schema_post->ID, '_schema_json', true );
73
- if ( isset($schema_json) ) {
74
- $blogPost[] = $schema_json;
75
- }
76
- }
77
- }
78
-
79
- /*
80
  while( $secondary_loop->have_posts() ): $secondary_loop->the_post();
81
-
82
  $blogPost[] = apply_filters( 'schema_output_category_post', array
83
  (
84
  '@type' => 'BlogPosting',
@@ -96,7 +80,6 @@ function schema_wp_get_category_json() {
96
  ));
97
 
98
  endwhile;
99
- */
100
 
101
  wp_reset_postdata();
102
 
17
  */
18
  function schema_wp_output_category() {
19
 
 
 
 
 
 
20
  if ( is_admin() ) return;
21
+
22
  // Run only on category pages
23
  if ( is_category() ) {
24
 
25
+ $json = schema_wp_get_category_json( 'Category' );
26
 
27
+ $output = '';
28
 
29
  if ($json) {
30
  $output .= "\n\n";
31
+ $output .= '<!-- This site is optimized with the Schema plugin v'.SCHEMAWP_VERSION.' - http://schema.press -->';
32
  $output .= "\n";
33
+ $output .= '<script type="application/ld+json">' . json_encode($json) . '</script>';
34
  $output .= "\n\n";
35
  }
36
 
46
  * @since 1.5.7
47
  * @return array json
48
  */
49
+ function schema_wp_get_category_json( $type ) {
50
+
51
+ if ( ! isset($type) ) return;
52
+
53
  global $post, $query_string;
54
 
55
  // debug
56
  //echo'<pre>';print_r($query_string);echo'</pre>';exit;
57
 
58
+ $blogPost = array();
 
59
 
60
  $secondary_loop = new WP_Query( $query_string );
61
 
62
  if ( $secondary_loop->have_posts() ):
63
+
 
 
 
 
 
 
 
 
 
 
 
 
64
  while( $secondary_loop->have_posts() ): $secondary_loop->the_post();
65
+
66
  $blogPost[] = apply_filters( 'schema_output_category_post', array
67
  (
68
  '@type' => 'BlogPosting',
80
  ));
81
 
82
  endwhile;
 
83
 
84
  wp_reset_postdata();
85
 
includes/json/knowledge-graph.php CHANGED
@@ -8,20 +8,6 @@
8
  // Exit if accessed directly
9
  if ( ! defined( 'ABSPATH' ) ) exit;
10
 
11
- add_filter( 'schema_wp_filter_output_knowledge_graph', 'schema_wp_do_output_knowledge_graph' );
12
- /*
13
- * Output Knowledge Graph markup
14
- *
15
- * @since 1.6.9.2
16
- */
17
- function schema_wp_do_output_knowledge_graph( $knowledge_graph ) {
18
- // Output Knowledge Graph only on front page
19
- if( ! is_front_page() )
20
- return;
21
-
22
- return $knowledge_graph;
23
- }
24
-
25
  add_action('wp_head', 'schema_wp_output_knowledge_graph');
26
  /**
27
  * The main function responsible for output schema json-ld
@@ -31,66 +17,54 @@ add_action('wp_head', 'schema_wp_output_knowledge_graph');
31
  */
32
  function schema_wp_output_knowledge_graph() {
33
 
34
- $json = schema_wp_get_knowledge_graph_json();
 
35
 
36
- $knowledge_graph = '';
37
-
38
- if ( $json ) {
39
- $knowledge_graph .= "\n\n";
40
- $knowledge_graph .= '<!-- This site is optimized with the Schema plugin v'.SCHEMAWP_VERSION.' - https://schema.press -->';
41
- $knowledge_graph .= "\n";
42
- $knowledge_graph .= '<script type="application/ld+json">' . json_encode($json, JSON_UNESCAPED_UNICODE) . '</script>';
43
- $knowledge_graph .= "\n\n";
44
- }
45
 
46
- $knowledge_graph = apply_filters( 'schema_wp_filter_output_knowledge_graph', $knowledge_graph );
47
-
48
- echo $knowledge_graph;
 
 
 
 
 
 
 
 
 
 
 
49
  }
50
 
 
51
  /**
52
- * The main function responsible for putting schema array all together
53
  *
54
  * @param string $type for schema type (example: Organization)
55
  * @since 1.0
56
- * @return array, schema output
57
  */
58
- function schema_wp_get_knowledge_graph_json() {
59
 
60
- $organization_or_person = schema_wp_get_option( 'organization_or_person' );
61
-
62
- if ( empty($organization_or_person) ) return;
63
-
64
- switch ( $organization_or_person ) {
65
- case "organization":
66
- $type = 'Organization';
67
- break;
68
- case "person":
69
- $type = 'Person';
70
- break;
71
- }
72
 
73
  $schema = array();
74
 
75
- $name = schema_wp_get_option( 'name' );
76
- $url = esc_attr( stripslashes( schema_wp_get_option( 'url' ) ) );
77
 
78
  if ( empty($name) || empty($url) ) return;
79
 
80
- // Set logo only when type = Organization
81
- if ( $type == 'Organization' ) {
82
- $logo = esc_attr( stripslashes( schema_wp_get_option( 'logo' ) ) );
83
- } else {
84
- $logo = '';
85
- }
86
 
87
  $schema['@context'] = "http://schema.org";
88
- $schema['@type'] = $type;
89
- $schema['@id'] = '#' . $organization_or_person;
90
 
91
- if ( !empty($name) ) $schema['name'] = $name;
92
- if ( !empty($url) ) $schema['url'] = $url;
93
- if ( !empty($logo) ) $schema['logo'] = $logo;
94
 
95
  // Get corporate contacts types array
96
  $corporate_contacts_types = schema_wp_get_corporate_contacts_types_array();
@@ -109,6 +83,7 @@ function schema_wp_get_knowledge_graph_json() {
109
  return apply_filters( 'schema_wp_knowledge_graph_json', $schema );
110
  }
111
 
 
112
  /**
113
  * Get Get corporate contacts types array
114
  *
@@ -117,29 +92,29 @@ function schema_wp_get_knowledge_graph_json() {
117
  */
118
  function schema_wp_get_corporate_contacts_types_array() {
119
 
120
- $corporate_contacts_types = array();
121
 
122
- $corporate_contacts_telephone = ( schema_wp_get_option( 'corporate_contacts_telephone' ) ) ? schema_wp_get_option( 'corporate_contacts_telephone' ) : '';
123
- $corporate_contacts_url = ( schema_wp_get_option( 'corporate_contacts_url' ) ) ? schema_wp_get_option( 'corporate_contacts_url' ) : '';
124
- $corporate_contacts_contact_type = ( schema_wp_get_option( 'corporate_contacts_contact_type' ) ) ? schema_wp_get_option( 'corporate_contacts_contact_type' ) : '';
125
 
126
- if ( $corporate_contacts_telephone || $corporate_contacts_url ) {
127
-
128
- // Remove dashes and replace it with a space
129
- $corporate_contacts_telephone = str_replace("_", " ", $corporate_contacts_telephone);
130
- $corporate_contacts_contact_type = str_replace("_", " ", $corporate_contacts_contact_type);
131
-
132
- $corporate_contacts_types = array(
133
- '@type' => 'ContactPoint', // default required value
134
- 'telephone' => $corporate_contacts_telephone,
135
- 'url' => $corporate_contacts_url,
136
- 'contactType' => $corporate_contacts_contact_type
137
  );
138
- }
139
 
140
- return $corporate_contacts_types;
 
 
 
 
141
  }
142
 
 
143
  /**
144
  * Get social links array
145
  *
@@ -161,7 +136,7 @@ function schema_wp_get_social_array() {
161
  $soundcloud = esc_attr( stripslashes( schema_wp_get_option( 'soundcloud' ) ) );
162
  $tumblr = esc_attr( stripslashes( schema_wp_get_option( 'tumblr' ) ) );
163
 
164
- $social_links = array( $google, $facebook, $twitter, $instagram, $youtube, $linkedin, $myspace, $pinterest, $soundcloud, $tumblr );
165
 
166
  // Remove empty fields
167
  foreach( $social_links as $profile ) {
8
  // Exit if accessed directly
9
  if ( ! defined( 'ABSPATH' ) ) exit;
10
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  add_action('wp_head', 'schema_wp_output_knowledge_graph');
12
  /**
13
  * The main function responsible for output schema json-ld
17
  */
18
  function schema_wp_output_knowledge_graph() {
19
 
20
+ // Run only on front page and make sure Yoast SEO isn't active
21
+ if ( is_front_page() ) {
22
 
23
+ $json = schema_wp_get_knowledge_graph_json( 'Organization' );
 
 
 
 
 
 
 
 
24
 
25
+ $knowledge_graph = '';
26
+
27
+ if ($json) {
28
+ $knowledge_graph .= "\n\n";
29
+ $knowledge_graph .= '<!-- This site is optimized with the Schema plugin v'.SCHEMAWP_VERSION.' - http://schema.press -->';
30
+ $knowledge_graph .= "\n";
31
+ $knowledge_graph .= '<script type="application/ld+json">' . json_encode($json) . '</script>';
32
+ $knowledge_graph .= "\n\n";
33
+ }
34
+
35
+ $knowledge_graph = apply_filters( 'schema_wp_output_knowledge_graph', $knowledge_graph );
36
+
37
+ echo $knowledge_graph;
38
+ }
39
  }
40
 
41
+
42
  /**
43
+ * The main function responsible for putting shema array all together
44
  *
45
  * @param string $type for schema type (example: Organization)
46
  * @since 1.0
47
+ * @return schema output
48
  */
49
+ function schema_wp_get_knowledge_graph_json( $type ) {
50
 
51
+ if ( ! isset($type) ) return;
 
 
 
 
 
 
 
 
 
 
 
52
 
53
  $schema = array();
54
 
55
+ $name = schema_wp_get_option( 'name' );
56
+ $url = esc_attr( stripslashes( schema_wp_get_option( 'url' ) ) );
57
 
58
  if ( empty($name) || empty($url) ) return;
59
 
60
+ $logo = esc_attr( stripslashes( schema_wp_get_option( 'logo' ) ) );
 
 
 
 
 
61
 
62
  $schema['@context'] = "http://schema.org";
63
+ $schema['@type'] = $type;
 
64
 
65
+ if ( !empty($name) ) $schema['name'] = $name;
66
+ if ( !empty($url) ) $schema['url'] = $url;
67
+ if ( !empty($logo) ) $schema['logo'] = $logo;
68
 
69
  // Get corporate contacts types array
70
  $corporate_contacts_types = schema_wp_get_corporate_contacts_types_array();
83
  return apply_filters( 'schema_wp_knowledge_graph_json', $schema );
84
  }
85
 
86
+
87
  /**
88
  * Get Get corporate contacts types array
89
  *
92
  */
93
  function schema_wp_get_corporate_contacts_types_array() {
94
 
95
+ $contact_type = array();
96
 
97
+ $corporate_contacts_telephone = schema_wp_get_option( 'corporate_contacts_telephone' );
98
+ $corporate_contacts_contact_type = schema_wp_get_option( 'corporate_contacts_contact_type' );
 
99
 
100
+ // Remove dashes and replace it with a space
101
+ $corporate_contacts_telephone = str_replace("_", " ", $corporate_contacts_telephone);
102
+ $corporate_contacts_contact_type = str_replace("_", " ", $corporate_contacts_contact_type);
103
+
104
+ $corporate_contacts_types = array(
105
+ '@type' => 'ContactPoint', // default required value
106
+ 'telephone' => $corporate_contacts_telephone,
107
+ 'contactType' => $corporate_contacts_contact_type
 
 
 
108
  );
 
109
 
110
+ // If phone is provided
111
+ if ( $corporate_contacts_telephone != '' ) return $corporate_contacts_types;
112
+
113
+ // Return an empty array
114
+ return array();
115
  }
116
 
117
+
118
  /**
119
  * Get social links array
120
  *
136
  $soundcloud = esc_attr( stripslashes( schema_wp_get_option( 'soundcloud' ) ) );
137
  $tumblr = esc_attr( stripslashes( schema_wp_get_option( 'tumblr' ) ) );
138
 
139
+ $social_links = array( $google, $facebook, $twitter, $instagram, $youtube, $linkedin, $myspace, $pinterest, $soundcloud, $tumblr);
140
 
141
  // Remove empty fields
142
  foreach( $social_links as $profile ) {
includes/json/post-type-archive.php DELETED
@@ -1,133 +0,0 @@
1
- <?php
2
- /**
3
- * Post Type Archives
4
- *
5
- * @since 1.6.9.8
6
- */
7
-
8
- // Exit if accessed directly
9
- if ( ! defined( 'ABSPATH' ) ) exit;
10
-
11
- add_action('wp_head', 'schema_wp_output_post_type_archive');
12
- /**
13
- * The main function responsible for output schema json-ld
14
- *
15
- * @since 1.6.9.8
16
- * @return schema json-ld final output
17
- */
18
- function schema_wp_output_post_type_archive() {
19
-
20
- global $post;
21
-
22
- // Run only on blog list page
23
- if ( is_post_type_archive() ) {
24
-
25
- $post_type = get_post_type();
26
-
27
- $enabled = schema_wp_is_post_type_enabled( $post_type ) ;
28
- if ( ! $enabled) return;
29
-
30
- //add_filter( 'edd_add_schema_microdata', '__return_false' );
31
- // add action to hook to this function
32
- do_action('schema_wp_action_post_type_archive');
33
-
34
- $json = schema_wp_get_post_type_archive_json( $post_type );
35
-
36
- $output = '';
37
-
38
- // debug
39
- //echo'<pre>';print_r($json);echo'</pre>';
40
-
41
- if ( $json ) {
42
- $output .= "\n\n";
43
- $output .= '<!-- This site is optimized with the Schema plugin v'.SCHEMAWP_VERSION.' - https://schema.press -->';
44
- $output .= "\n";
45
- $output .= '<script type="application/ld+json">' . json_encode($json, JSON_UNESCAPED_UNICODE) . '</script>';
46
- $output .= "\n\n";
47
- }
48
-
49
- echo $output;
50
- }
51
- }
52
-
53
- /**
54
- * The main function responsible for putting shema array all together
55
- *
56
- * @param string $type for schema type (example: Person)
57
- * @since 1.6.9.8
58
- * @return schema output
59
- */
60
- function schema_wp_get_post_type_archive_json( $post_type ) {
61
-
62
- global $post, $wp_query, $query_string;
63
-
64
- // debug
65
- //echo'<pre>';print_r($wp_query);echo'</pre>';exit;
66
- //var_dump( $GLOBALS['wp_query'] );
67
-
68
- if ( empty($wp_query->query_vars) ) return;
69
-
70
- $blogPost = array();
71
- $schema = array();
72
- $url = schema_wp_get_archive_link( $post_type ) ? schema_wp_get_archive_link($post_type) : get_home_url();
73
-
74
- $secondary_loop = new WP_Query( $wp_query->query_vars );
75
-
76
- if ( $secondary_loop->have_posts() ):
77
-
78
- // get markup data for each post in the query
79
- if ( ! empty($secondary_loop->posts) ) {
80
-
81
- $i = 1;
82
-
83
- foreach ($secondary_loop->posts as $schema_post) {
84
-
85
- // pull json from post meta
86
- $schema_json = get_post_meta( $schema_post->ID, '_schema_json', true );
87
-
88
- if ( isset($schema_json) && is_array($schema_json) ) {
89
-
90
- // override urls, fix for: All values provided for url must point to the same page.
91
- $schema_json['url'] = $url.'#'.$schema_post->post_name;
92
-
93
- $blogPost[] = array(
94
- '@type' => 'ListItem',
95
- //'url' => '', // ListItem with url and ListItem with item are incompatible.
96
- 'position' => $i,
97
- 'item' => $schema_json
98
- );
99
- }
100
-
101
- $i++;
102
- }// end foreach
103
- }
104
-
105
- wp_reset_postdata();
106
-
107
- // get post type details
108
- $post_type_archive_title = post_type_archive_title( __(''), false );
109
- $obj = get_post_type_object( $post_type );
110
-
111
- if ( ! empty($blogPost)) {
112
- // put all together
113
- $schema = array
114
- (
115
- '@context' => 'http://schema.org/',
116
- //'@type' => array('ItemList', 'CreativeWork', 'WebPage'),
117
- '@type' => array('ItemList', 'CreativeWork'),
118
- 'name' => isset($post_type_archive_title) ? $post_type_archive_title : get_bloginfo( 'name' ),
119
- 'description' => isset($obj->description) ? $obj->description : '',
120
- 'url' => $url,
121
- 'itemListOrder' => 'http://schema.org/ItemListOrderAscending',
122
- 'numberOfItems' => count($blogPost),
123
- 'itemListElement' => $blogPost,
124
- );
125
- }
126
-
127
- endif;
128
-
129
- // debug
130
- //echo'<pre>';print_r($schema);echo'</pre>';exit;
131
-
132
- return apply_filters( 'schema_post_type_archive_output', $schema );
133
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/json/schema-output.php CHANGED
@@ -19,10 +19,6 @@ function schema_wp_output() {
19
 
20
  global $post;
21
 
22
- // do not run if default search query has been set (mostly not needed)
23
- // @todo remove this if not needed
24
- //if ( isset($_GET['s']) ) return;
25
-
26
  // do not run on front, home page, archive pages, search result pages, and 404 error pages
27
  if ( is_archive() || is_home() || is_front_page() || is_search() || is_404() ) return;
28
 
@@ -32,11 +28,10 @@ function schema_wp_output() {
32
  // if ( wprs_is_enabled( $post->ID ) ) return;
33
  //}
34
 
35
- $pttimestamp = time() + get_option('gmt_offset') * 60*60;
36
- $pttimestamp_old = get_post_meta( $post->ID, '_schema_json_timestamp', true );
37
- $json = array();
38
 
39
- // exclude entry, do not output the schema markup
40
  // @since 1.6
41
  $exclude = get_post_meta( $post->ID, '_schema_exclude' , true );
42
  if ( $exclude )
@@ -44,7 +39,7 @@ function schema_wp_output() {
44
 
45
  // compare time stamp and check if json post meta value already exists
46
  // @since 1.5.9.7
47
- if ( isset($pttimestamp_old) && is_numeric($pttimestamp_old) ) {
48
  $time_diff = $pttimestamp - $pttimestamp_old;
49
  if ( $time_diff <= DAY_IN_SECONDS ) {
50
  $json = get_post_meta( $post->ID, '_schema_json', true );
@@ -58,7 +53,7 @@ function schema_wp_output() {
58
 
59
  $schemas_enabled = array();
60
 
61
- // get Schema enabled array
62
  $schemas_enabled = schema_wp_cpt_get_enabled();
63
 
64
  if ( empty($schemas_enabled) ) return;
@@ -126,9 +121,9 @@ function schema_wp_output() {
126
 
127
  if ( ! empty($json) ) {
128
  $output .= "\n\n";
129
- $output .= '<!-- This site is optimized with the Schema plugin v'.SCHEMAWP_VERSION.' - https://schema.press -->';
130
  $output .= "\n";
131
- $output .= '<script type="application/ld+json">' . json_encode($json, JSON_UNESCAPED_UNICODE) .'</script>';
132
  $output .= "\n\n";
133
  }
134
 
@@ -140,6 +135,7 @@ function schema_wp_output() {
140
  echo $output;
141
  }
142
 
 
143
  /**
144
  * The main function responsible for putting shema array all together
145
  *
@@ -180,33 +176,26 @@ function schema_wp_get_schema_json( $type ) {
180
  //$schema["author"] = $json['author'];
181
  }
182
 
183
- // get supported article types
184
- $support_article_types = schema_wp_get_support_article_types();
185
-
186
- // check if this type is supported Article, or sub of Article
187
- // if so, add required markup
188
- if ( in_array( $type, $support_article_types) ) {
189
- $schema["headline"] = $json["headline"];
190
- $schema["datePublished"] = $json["datePublished"];
191
- $schema["dateModified"] = $json["dateModified"];
192
-
193
- if ( ! empty( $json["publisher"] ) ) {
194
- $schema["publisher"] = $json["publisher"];
195
- }
196
- }
197
 
198
  if ( ! empty( $json["media"] ) ) {
199
  $schema["image"] = $json["media"];
200
  }
201
 
202
  if ( $json['category'] != '' ) {
203
- $schema["articleSection"] = $json['category'];
204
  }
205
 
206
  if ( $json['keywords'] != '' && $type == 'BlogPosting' ) {
207
  $schema["keywords"] = $json['keywords'];
208
  }
209
 
 
 
 
 
210
  if ( $json["description"] != '' ) {
211
  $schema["description"] = $json["description"];
212
  }
@@ -214,6 +203,7 @@ function schema_wp_get_schema_json( $type ) {
214
  return apply_filters( 'schema_output', $schema );
215
  }
216
 
 
217
  /**
218
  * Prepare for json array
219
  *
@@ -230,17 +220,33 @@ function schema_wp_get_schema_json_prepare( $post_id = null ) {
230
 
231
  $jason = array();
232
 
233
-
234
  // Get post content
235
  $content_post = get_post($post_id);
236
 
 
 
 
237
  // Get description
238
- $description = schema_wp_get_description( $post_id );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
239
 
240
  // Stuff for any page, if it exists
241
- $permalink = get_permalink( $post_id) ;
242
- $category = schema_wp_get_post_category( $post_id );
243
- $keywords = schema_wp_get_post_tags( $post_id );
244
 
245
  // Get publisher array
246
  $publisher = schema_wp_get_publisher_array();
@@ -252,7 +258,7 @@ function schema_wp_get_schema_json_prepare( $post_id = null ) {
252
  $json['description'] = $description;
253
  $json['permalink'] = $permalink;
254
 
255
- $json["datePublished"] = get_the_date( 'c', $post_id );
256
  $json["dateModified"] = get_post_modified_time( 'c', false, $post_id, false );
257
 
258
  $json['category'] = $category;
@@ -262,7 +268,7 @@ function schema_wp_get_schema_json_prepare( $post_id = null ) {
262
 
263
  $json['publisher'] = $publisher;
264
 
265
- // debug
266
  //echo '<pre>'; print_r($json); echo '</pre>';
267
 
268
  return apply_filters( 'schema_json', $json );
19
 
20
  global $post;
21
 
 
 
 
 
22
  // do not run on front, home page, archive pages, search result pages, and 404 error pages
23
  if ( is_archive() || is_home() || is_front_page() || is_search() || is_404() ) return;
24
 
28
  // if ( wprs_is_enabled( $post->ID ) ) return;
29
  //}
30
 
31
+ $pttimestamp = time() + get_option('gmt_offset') * 60*60;
32
+ $pttimestamp_old = get_post_meta( $post->ID, '_schema_json_timestamp', true );
 
33
 
34
+ // exclude post
35
  // @since 1.6
36
  $exclude = get_post_meta( $post->ID, '_schema_exclude' , true );
37
  if ( $exclude )
39
 
40
  // compare time stamp and check if json post meta value already exists
41
  // @since 1.5.9.7
42
+ if ( isset($pttimestamp_old) ) {
43
  $time_diff = $pttimestamp - $pttimestamp_old;
44
  if ( $time_diff <= DAY_IN_SECONDS ) {
45
  $json = get_post_meta( $post->ID, '_schema_json', true );
53
 
54
  $schemas_enabled = array();
55
 
56
+ // get schame enabled array
57
  $schemas_enabled = schema_wp_cpt_get_enabled();
58
 
59
  if ( empty($schemas_enabled) ) return;
121
 
122
  if ( ! empty($json) ) {
123
  $output .= "\n\n";
124
+ $output .= '<!-- This site is optimized with the Schema plugin v'.SCHEMAWP_VERSION.' - http://schema.press -->';
125
  $output .= "\n";
126
+ $output .= '<script type="application/ld+json">' . json_encode($json) .'</script>';
127
  $output .= "\n\n";
128
  }
129
 
135
  echo $output;
136
  }
137
 
138
+
139
  /**
140
  * The main function responsible for putting shema array all together
141
  *
176
  //$schema["author"] = $json['author'];
177
  }
178
 
179
+ $schema["headline"] = $json["headline"];
180
+ $schema["datePublished"] = $json["datePublished"];
181
+ $schema["dateModified"] = $json["dateModified"];
 
 
 
 
 
 
 
 
 
 
 
182
 
183
  if ( ! empty( $json["media"] ) ) {
184
  $schema["image"] = $json["media"];
185
  }
186
 
187
  if ( $json['category'] != '' ) {
188
+ $schema["ArticleSection"] = $json['category'];
189
  }
190
 
191
  if ( $json['keywords'] != '' && $type == 'BlogPosting' ) {
192
  $schema["keywords"] = $json['keywords'];
193
  }
194
 
195
+ if ( ! empty( $json["publisher"] ) ) {
196
+ $schema["publisher"] = $json["publisher"];
197
+ }
198
+
199
  if ( $json["description"] != '' ) {
200
  $schema["description"] = $json["description"];
201
  }
203
  return apply_filters( 'schema_output', $schema );
204
  }
205
 
206
+
207
  /**
208
  * Prepare for json array
209
  *
220
 
221
  $jason = array();
222
 
 
223
  // Get post content
224
  $content_post = get_post($post_id);
225
 
226
+ // Debug
227
+ //echo '<pre>'; print_r($content_post); echo '</pre>';
228
+
229
  // Get description
230
+ $full_content = $content_post->post_content;
231
+ $excerpt = $content_post->post_excerpt;
232
+
233
+ // Removed this line below to support Themes with Drag & Drop Page Builders
234
+ // @since 1.5.9
235
+ //$full_content = apply_filters('the_content', $full_content);
236
+ $full_content = str_replace(']]>', ']]&gt;', $full_content);
237
+ $full_content = wp_strip_all_tags( $full_content );
238
+
239
+ // Filter content before it gets shorter ;)
240
+ // @since 1.5.9
241
+ $full_content = apply_filters( 'schema_wp_filter_content', $full_content );
242
+
243
+ $short_content = wp_trim_words( $full_content, 49, '' );
244
+ $description = apply_filters ( 'schema_wp_filter_description', ( $excerpt != '' ) ? $excerpt : $short_content );
245
 
246
  // Stuff for any page, if it exists
247
+ $permalink = get_permalink($post_id);
248
+ $category = schema_wp_get_post_category($post_id);
249
+ $keywords = schema_wp_get_post_tags($post_id);
250
 
251
  // Get publisher array
252
  $publisher = schema_wp_get_publisher_array();
258
  $json['description'] = $description;
259
  $json['permalink'] = $permalink;
260
 
261
+ $json["datePublished"] = get_the_date( 'c', $post_id);
262
  $json["dateModified"] = get_post_modified_time( 'c', false, $post_id, false );
263
 
264
  $json['category'] = $category;
268
 
269
  $json['publisher'] = $publisher;
270
 
271
+ // Debug
272
  //echo '<pre>'; print_r($json); echo '</pre>';
273
 
274
  return apply_filters( 'schema_json', $json );
includes/json/search-results.php CHANGED
@@ -25,20 +25,19 @@ function schema_wp_output_sitelinks_search_box() {
25
  $site_name = schema_wp_get_option( 'site_name' );
26
  $site_alternate_name = schema_wp_get_option( 'site_alternate_name' );
27
 
28
- if ( ! isset($sitelinks_search_box) || ! $sitelinks_search_box ) return;
29
 
30
  $output .= PHP_EOL . '<script type="application/ld+json">' . PHP_EOL;
31
  $output .= '{' . PHP_EOL;
32
  $output .= ' "@context": "http://schema.org",' . PHP_EOL;
33
  $output .= ' "@type": "WebSite",' . PHP_EOL;
34
- $output .= ' "@id": "#website",' . PHP_EOL;
35
 
36
  if ( $site_name_enable ) {
37
  $output .= ' "name": "' . $site_name . '",' . PHP_EOL;
38
  if ( $site_alternate_name ) $output .= ' "alternateName": "' . $site_alternate_name . '",' . PHP_EOL;
39
  }
40
 
41
- $output .= ' "url": "' . get_home_url() . '/",' . PHP_EOL;
42
  $output .= ' "potentialAction": {' . PHP_EOL;
43
  $output .= ' "@type": "SearchAction",' . PHP_EOL;
44
  $output .= ' "target": "' . get_home_url() . '/?s={search_term_string}",' . PHP_EOL;
@@ -54,6 +53,7 @@ function schema_wp_output_sitelinks_search_box() {
54
  }
55
 
56
 
 
57
  //add_action('wp_head', 'schema_wp_output_sitelinks_search_box_disable');
58
  /**
59
  * Disable SiteLinks Search Box
25
  $site_name = schema_wp_get_option( 'site_name' );
26
  $site_alternate_name = schema_wp_get_option( 'site_alternate_name' );
27
 
28
+ if ( ! isset($sitelinks_search_box) ) return;
29
 
30
  $output .= PHP_EOL . '<script type="application/ld+json">' . PHP_EOL;
31
  $output .= '{' . PHP_EOL;
32
  $output .= ' "@context": "http://schema.org",' . PHP_EOL;
33
  $output .= ' "@type": "WebSite",' . PHP_EOL;
 
34
 
35
  if ( $site_name_enable ) {
36
  $output .= ' "name": "' . $site_name . '",' . PHP_EOL;
37
  if ( $site_alternate_name ) $output .= ' "alternateName": "' . $site_alternate_name . '",' . PHP_EOL;
38
  }
39
 
40
+ $output .= ' "url": "' . get_site_url() . '/",' . PHP_EOL;
41
  $output .= ' "potentialAction": {' . PHP_EOL;
42
  $output .= ' "@type": "SearchAction",' . PHP_EOL;
43
  $output .= ' "target": "' . get_home_url() . '/?s={search_term_string}",' . PHP_EOL;
53
  }
54
 
55
 
56
+
57
  //add_action('wp_head', 'schema_wp_output_sitelinks_search_box_disable');
58
  /**
59
  * Disable SiteLinks Search Box
includes/json/tag.php DELETED
@@ -1,101 +0,0 @@
1
- <?php
2
- /**
3
- * Tag
4
- *
5
- * @since 1.6.9.5
6
- */
7
-
8
- // Exit if accessed directly
9
- if ( ! defined( 'ABSPATH' ) ) exit;
10
-
11
- add_action('wp_head', 'schema_wp_output_tag');
12
- /**
13
- * The main function responsible for output schema json-ld
14
- *
15
- * @since 1.6.9.5
16
- * @return schema json-ld final output
17
- */
18
- function schema_wp_output_tag() {
19
-
20
- // filter this and return false to disable the function
21
- $enabled = apply_filters('schema_wp_output_tag_enabled', true);
22
- if ( ! $enabled)
23
- return;
24
-
25
- if ( is_admin() ) return;
26
-
27
- // Run only on category pages
28
- if ( is_tag() ) {
29
-
30
- $output = '';
31
-
32
- $json = schema_wp_get_tag_json();
33
-
34
- if ($json) {
35
- $output .= "\n\n";
36
- $output .= '<!-- This site is optimized with the Schema plugin v'.SCHEMAWP_VERSION.' - https://schema.press -->';
37
- $output .= "\n";
38
- $output .= '<script type="application/ld+json">' . json_encode($json, JSON_UNESCAPED_UNICODE) . '</script>';
39
- $output .= "\n\n";
40
- }
41
-
42
- echo $output;
43
- }
44
- }
45
-
46
-
47
- /**
48
- * The main function responsible for putting schema array all together
49
- *
50
- * @param string $type for schema type (example: CollectionPage)
51
- * @since 1.6.9.5
52
- * @return array json
53
- */
54
- function schema_wp_get_tag_json() {
55
-
56
- global $post, $query_string;
57
-
58
- // debug
59
- //echo'<pre>';print_r($query_string);echo'</pre>';exit;
60
-
61
- $blogPost = array();
62
- $json = array();
63
-
64
- $secondary_loop = new WP_Query( $query_string );
65
-
66
- if ( $secondary_loop->have_posts() ):
67
-
68
- // Get the markup data
69
- if ( ! empty($secondary_loop->posts) ) {
70
- foreach ($secondary_loop->posts as $schema_post) {
71
- $schema_json = get_post_meta( $schema_post->ID, '_schema_json', true );
72
- if ( isset($schema_json) ) {
73
- $blogPost[] = $schema_json;
74
- }
75
- }
76
- }
77
-
78
- wp_reset_postdata();
79
-
80
- $tag = get_the_tags();
81
-
82
- $tag_id = intval($tag[0]->term_id);
83
- $tag_link = get_tag_link( $tag_id );
84
- $tag_headline = single_tag_title( '', false ) . __(' Tag', 'schema-wp');
85
- $sameAs = get_term_meta( $tag_id, 'schema_wp_sameAs' );
86
-
87
- $json = array
88
- (
89
- '@context' => 'http://schema.org/',
90
- '@type' => "CollectionPage",
91
- 'headline' => $tag_headline,
92
- 'description' => strip_tags(tag_description()),
93
- 'url' => $tag_link,
94
- 'sameAs' => $sameAs,
95
- 'hasPart' => $blogPost
96
- );
97
-
98
- endif;
99
-
100
- return apply_filters( 'schema_tag_json', $json );
101
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/json/taxonomy.php DELETED
@@ -1,77 +0,0 @@
1
- <?php
2
- /**
3
- * Taxonomy
4
- *
5
- * @since 1.6.9.4
6
- */
7
-
8
- // Exit if accessed directly
9
- if ( ! defined( 'ABSPATH' ) ) exit;
10
-
11
- add_action('wp_head', 'schema_wp_output_taxonomy');
12
- /**
13
- * The main function responsible for output schema json-ld
14
- *
15
- * @since 1.6.9.4
16
- * @return schema json-ld final output
17
- */
18
- function schema_wp_output_taxonomy() {
19
-
20
- // filter this and return false to disable the function
21
- $enabled = apply_filters('schema_wp_output_taxonomy_enabled', true);
22
- if ( ! $enabled)
23
- return;
24
-
25
- if ( is_admin() ) return;
26
-
27
- // Run only on taxonomy pages
28
- if ( is_tax() ) {
29
-
30
- $output = '';
31
-
32
- $json = schema_wp_get_taxonomy_json();
33
-
34
- if ($json) {
35
- $output = "\n\n";
36
- $output .= '<!-- This site is optimized with the Schema plugin v'.SCHEMAWP_VERSION.' - https://schema.press -->';
37
- $output .= "\n";
38
- $output .= '<script type="application/ld+json">' . json_encode($json, JSON_UNESCAPED_UNICODE) . '</script>';
39
- $output .= "\n\n";
40
- }
41
-
42
- echo $output;
43
- }
44
- }
45
-
46
- /**
47
- * The main function responsible for putting shema array all together
48
- *
49
- * @since 1.6.9.4
50
- * @return array json
51
- */
52
- function schema_wp_get_taxonomy_json() {
53
-
54
- global $post, $query_string;
55
-
56
- $json = array();
57
-
58
- $secondary_loop = new WP_Query( $query_string );
59
-
60
- if ( $secondary_loop->have_posts() ):
61
-
62
- while( $secondary_loop->have_posts() ): $secondary_loop->the_post();
63
-
64
- $schema_json = get_post_meta( $post->ID, '_schema_json', true );
65
-
66
- if ( isset($schema_json) ) {
67
- $json[] = $schema_json;
68
- }
69
-
70
- endwhile;
71
-
72
- wp_reset_postdata();
73
-
74
- endif;
75
-
76
- return apply_filters( 'schema_taxonomy_json', $json );
77
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/json/web-page-element.php DELETED
@@ -1,163 +0,0 @@
1
- <?php
2
- /**
3
- * WebPageElement > WPHeader
4
- * WebPageElement > WPFooter
5
- *
6
- * @since 1.6.9.8
7
- */
8
-
9
- // Exit if accessed directly
10
- if ( ! defined( 'ABSPATH' ) ) exit;
11
-
12
- add_action('wp_head', 'schema_wp_output_web_page_element');
13
- /**
14
- * The main function responsible for output schema json-ld
15
- *
16
- * @since 1.6.9.8
17
- * @return schema json-ld final output
18
- */
19
- function schema_wp_output_web_page_element() {
20
-
21
- global $post;
22
-
23
- $enable = schema_wp_get_option( 'web_page_element_enable' );
24
-
25
- if ( $enable != true )
26
- return;
27
-
28
- // disable Genesis header markup
29
- add_filter( 'genesis_attr_site-header', 'schema_wp_genesis_attributes_removal_function', 20 );
30
- // disable Genesis footer markup
31
- add_filter( 'genesis_attr_site-footer', 'schema_wp_genesis_attributes_removal_function', 20 );
32
-
33
- $json = schema_wp_get_web_page_element_json();
34
-
35
- $output = '';
36
-
37
- // debug
38
- //echo'<pre>';print_r($json);echo'</pre>';
39
-
40
- if ( $json ) {
41
- $output .= "\n\n";
42
- $output .= '<!-- This site is optimized with the Schema plugin v'.SCHEMAWP_VERSION.' - https://schema.press -->';
43
- $output .= "\n";
44
- $output .= '<script type="application/ld+json">' . json_encode($json, JSON_UNESCAPED_UNICODE) . '</script>';
45
- $output .= "\n\n";
46
- }
47
-
48
- echo $output;
49
- }
50
-
51
- /**
52
- * The main function responsible for putting header array all together
53
- *
54
- * @since 1.6.9.8
55
- * @return schema output
56
- */
57
- function schema_wp_get_web_page_element_json() {
58
-
59
- global $wp_query;
60
-
61
- // get post type
62
- $post_type = get_post_type();
63
-
64
- // set defaults
65
- $headline = wp_filter_nohtml_kses( get_the_title() );
66
- $description = get_bloginfo( 'description' );
67
- $url = get_bloginfo( 'url' );
68
-
69
- if ( is_404() ) {
70
- // 404
71
- $headline = __( 'Page not found', 'schema-wp' );
72
- $description = __('It looks like nothing was found at this location!', 'schema-wp');
73
- $url = '';
74
- } elseif ( is_front_page() && is_home() ) {
75
- // Default homepage
76
- $headline = get_bloginfo( 'name' );
77
- $description = get_bloginfo( 'description' );
78
- $url = get_bloginfo( 'url' );
79
- } elseif ( is_front_page() ) {
80
- // static homepage
81
- $headline = get_bloginfo( 'name' );
82
- $description = get_bloginfo( 'description' );
83
- $url = get_bloginfo( 'url' );
84
- } elseif ( is_home() ) {
85
- // blog page
86
- $headline = get_bloginfo( 'name' );
87
- $description = get_bloginfo( 'description' );
88
- $url = schema_wp_get_blog_posts_page_url();
89
- } else {
90
- //everything else
91
-
92
- // get enabled post types
93
- $schema_enabled = schema_wp_cpt_get_enabled_post_types();
94
-
95
- if ( in_array( $post_type , $schema_enabled ) ) {
96
- if ( is_single() || is_singular() ) {
97
- // single and singular pages
98
- $headline = wp_filter_nohtml_kses( get_the_title() );
99
- $description = schema_wp_get_description();
100
- $url = get_permalink();
101
- }
102
- }
103
-
104
- }
105
-
106
- if ( is_archive() ) {
107
- // archive pages
108
- $headline = get_the_archive_title();
109
- $description = get_the_archive_description();
110
- $url = '';
111
- }
112
-
113
- if ( is_post_type_archive() ) {
114
- // post type archive pages
115
- $headline = post_type_archive_title( __(''), false );
116
- $obj = get_post_type_object($post_type);
117
- $description = isset($obj->description) ? $obj->description : '';
118
- $url = schema_wp_get_archive_link($post_type) ? schema_wp_get_archive_link($post_type) : get_home_url();
119
- }
120
-
121
- if ( is_search() ) {
122
- // search
123
- $query = get_search_query();
124
- $headline = sprintf( __( 'Search Results for &#8220;%s&#8221;' ), $query );
125
- $url = get_search_link( $query );
126
- $description = $wp_query->found_posts.' search results found for "'.$query.'".';
127
- }
128
-
129
- /*
130
- * WPHeader
131
- */
132
- $header = array(
133
- '@context' => 'http://schema.org/',
134
- '@type' => 'WPHeader',
135
- //'name' => get_bloginfo( 'name' ),
136
- 'url' => $url,
137
- 'headline' => wp_strip_all_tags($headline),
138
- 'description' => wp_trim_words( wp_strip_all_tags($description), 18, '...' ),
139
- //'keywords' => schema_wp_get_categories_as_keywords(),
140
- );
141
-
142
- /*
143
- * WPFooter
144
- */
145
- $footer = array(
146
- '@context' => 'http://schema.org/',
147
- '@type' => 'WPFooter',
148
- //'name' => get_bloginfo( 'name' ),
149
- 'url' => $url,
150
- 'headline' => wp_strip_all_tags($headline),
151
- 'description' => wp_trim_words( wp_strip_all_tags($description), 18, '...' ),
152
- //'keywords' => schema_wp_get_categories_as_keywords(),
153
- 'copyrightYear' => schema_wp_first_post_date( $format = 'Y' ),
154
- //'copyrightHolder' => schema_wp_get_knowledge_graph_json() // Organization or Person, @todo this didn't go well, it breaks Organization markup.
155
- );
156
-
157
- $page_element_output = array($header, $footer);
158
-
159
- // debug
160
- //echo'<pre>';print_r($schema);echo'</pre>';exit;
161
-
162
- return apply_filters( 'schema_web_page_element_output', $page_element_output );
163
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/misc-functions.php CHANGED
@@ -12,98 +12,6 @@
12
  // Exit if accessed directly
13
  if ( ! defined( 'ABSPATH' ) ) exit;
14
 
15
- /**
16
- * Check if post type is enabled
17
- *
18
- * @since 1.6.9.8
19
- *
20
- * @param int $post_type The post type.
21
- * @return string post ID, or false
22
- */
23
- function schema_wp_is_post_type_enabled( $post_type = null ) {
24
-
25
- if ( ! isset($post_type) ) $post_type = get_post_type();
26
- if ( ! isset($post_type) )
27
- return false;
28
-
29
- $enabled = false;
30
- $enabled_post_types = schema_wp_cpt_get_enabled_post_types();
31
-
32
- if ( in_array( $post_type, $enabled_post_types, false ) ) $enabled = true;
33
-
34
- return apply_filters( 'schema_wp_is_post_type_enabled', $enabled );
35
- }
36
-
37
- /**
38
- * Get schema ref for a post
39
- *
40
- * @since 1.6.9.5
41
- *
42
- * @param int $post_id The post ID.
43
- * @return string post ID, or false
44
- */
45
- function schema_wp_get_ref( $post_id = null ) {
46
-
47
- if ( ! isset($post_id) ) $post_id = isset($_GET['post']) ? $_GET['post'] : null;
48
-
49
- if ( ! isset($post_id) ) return false;
50
-
51
- $schema_ref = get_post_meta( $post_id, '_schema_ref', true );
52
-
53
- If ( ! isset($schema_ref) ) $schema_ref = fasle;
54
-
55
- return apply_filters( 'schema_wp_ref', $schema_ref );
56
- }
57
-
58
- /**
59
- * Get schema type for a post
60
- *
61
- * @since 1.6.9.5
62
- *
63
- * @param int $post_id The post ID.
64
- * @return string schema type, or false
65
- */
66
- function schema_wp_get_type( $post_id = null ) {
67
-
68
- if ( ! isset($post_id) ) $post_id = isset($_GET['post']) ? $_GET['post'] : null;
69
-
70
- if ( ! isset($post_id) ) return false;
71
-
72
-
73
- $schema_ref = schema_wp_get_ref( $post_id );
74
-
75
- $schema_type = false;
76
-
77
- if ( $schema_ref ) {
78
-
79
- $schema_type = get_post_meta( $schema_ref, '_schema_type', true );
80
- }
81
-
82
- return apply_filters( 'schema_wp_type', $schema_type );
83
- }
84
-
85
- /**
86
- * Get schema json-ld for a post
87
- *
88
- * @since 1.6.9.5
89
- *
90
- * @param int $post_id The post ID.
91
- * @return string post ID, or false
92
- */
93
- function schema_wp_get_jsonld( $post_id = null ) {
94
-
95
- global $post;
96
-
97
- if ( ! isset($post_id) ) $post_id = $post->ID;
98
-
99
- if ( ! isset($post_id ) ) return false;
100
-
101
- $schema_json = get_post_meta( $post_id, '_schema_json', true);
102
-
103
- If ( ! isset($schema_json )) $schema_json = fasle;
104
-
105
- return apply_filters( 'schema_wp_json', $schema_json );
106
- }
107
 
108
  /**
109
  * Get publisher array
@@ -126,8 +34,7 @@ function schema_wp_get_publisher_array() {
126
 
127
  $publisher = array(
128
  "@type" => "Organization", // default required value
129
- "@id" => get_bloginfo("url") . "/#organization",
130
- "name" => wp_filter_nohtml_kses($name),
131
  "logo" => array(
132
  "@type" => "ImageObject",
133
  "url" => $logo,
@@ -135,10 +42,11 @@ function schema_wp_get_publisher_array() {
135
  "height" => 60
136
  )
137
  );
138
-
139
  return apply_filters( 'schema_wp_publisher', $publisher );
140
  }
141
 
 
142
  /**
143
  * Get an array of enabled post types
144
  *
@@ -182,14 +90,13 @@ function schema_wp_cpt_get_enabled() {
182
 
183
  endforeach;
184
 
185
- wp_reset_postdata();
186
-
187
  // debug
188
  //echo '<pre>'; print_r($cpt_enabled); echo '</pre>'; exit;
189
 
190
  return apply_filters('schema_wp_cpt_enabled', $cpt_enabled);
191
  }
192
 
 
193
  /**
194
  * Get an array of enabled post types
195
  *
@@ -218,101 +125,34 @@ function schema_wp_cpt_get_enabled_post_types() {
218
  $schema_post_types = get_post_meta( $schema->ID, '_schema_post_types' , true );
219
 
220
  // Build our array
221
- $cpt_enabled[] = (is_array($schema_post_types)) ? reset($schema_post_types) : array();
 
222
 
223
  endforeach;
224
 
225
- wp_reset_postdata();
226
-
227
  // debug
228
  //echo '<pre>'; print_r($cpt_enabled); echo '</pre>'; exit;
229
  //echo reset($cpt_enabled[0]);
230
  return apply_filters('schema_wp_cpt_enabled_post_types', $cpt_enabled);
231
  }
232
 
233
- /**
234
- * Get schema ref by post type in admin page editor screen
235
- *
236
- * @since 1.6.9.3
237
- * @return array of enabled post types, schema type
238
- */
239
- function schema_wp_get_ref_by_post_type( $post_type = null ) {
240
-
241
- global $wpdb, $post;
242
-
243
- if ( ! isset($post_type) ) {
244
- // Get post type from current screen
245
- $current_screen = get_current_screen();
246
- $post_type = $current_screen->post_type;
247
- }
248
-
249
- $schema_posts = $wpdb->get_results ( "
250
- SELECT *
251
- FROM $wpdb->posts
252
- WHERE post_type = 'schema'
253
- AND post_status = 'publish'
254
- " );
255
-
256
- //echo '<pre>'; print_r($schema_posts); echo '</pre>';exit;
257
- if ( empty($schema_posts) ) return array();
258
-
259
- foreach ( $schema_posts as $key => $post ) {
260
- $supported_types = get_post_meta( $post->ID, '_schema_post_types', true );
261
- if ( ! empty($supported_types) && in_array( $post_type, $supported_types, true ) ) {
262
- return $post->ID;
263
- }
264
- }
265
- }
266
-
267
- /**
268
- * Get description
269
- *
270
- * @since 1.6.9.4
271
- * return string
272
- */
273
- function schema_wp_get_description( $post_id = null ) {
274
-
275
- global $post;
276
-
277
- if ( ! isset($post_id) ) $post_id = $post->ID;
278
-
279
- // Get post content
280
- $content_post = get_post($post_id);
281
-
282
- // Get description
283
- $full_content = $content_post->post_content;
284
- $excerpt = $content_post->post_excerpt;
285
-
286
- $full_content = str_replace(']]>', ']]&gt;', $full_content);
287
- $full_content = wp_strip_all_tags( $full_content );
288
-
289
- // Filter content before it gets shorter ;)
290
- // @since 1.5.9
291
- $full_content = apply_filters( 'schema_wp_filter_content', $full_content );
292
-
293
- $desc_word_count = apply_filters( 'schema_wp_filter_description_word_count', 49 );
294
- $short_content = wp_trim_words( $full_content, $desc_word_count, '' );
295
- $description = apply_filters( 'schema_wp_filter_description', ( $excerpt != '' ) ? $excerpt : $short_content );
296
-
297
- return $description;
298
- }
299
 
300
  /**
301
  * Get an array of enabled post types
302
  *
303
  * @since 1.4
304
- * @return array
305
  */
306
- function schema_wp_get_media( $post_id = null) {
307
 
308
  global $post;
309
 
310
- if ( ! isset( $post_id ) ) $post_id = $post->ID;
311
 
312
  $media = array();
313
 
314
  // Featured image
315
- $image_attributes = wp_get_attachment_image_src( get_post_thumbnail_id($post_id), 'full' );
316
  $image_url = $image_attributes[0];
317
  $image_width = ( $image_attributes[1] > 696 ) ? $image_attributes[1] : 696; // Images should be at least 696 pixels wide
318
  $image_height = $image_attributes[2];
@@ -320,7 +160,7 @@ function schema_wp_get_media( $post_id = null) {
320
  // Thesis 2.x Post Image
321
  $my_theme = wp_get_theme();
322
  if ( $my_theme->get( 'Name' ) == 'Thesis') {
323
- $image_attributes = get_post_meta( $post_id, '_thesis_post_image', true);
324
  if ( ! empty($image_attributes) ) {
325
  $image_url = $image_attributes['image']['url'];
326
  // Make sure url is valid
@@ -336,23 +176,18 @@ function schema_wp_get_media( $post_id = null) {
336
  // Try something else...
337
  // @since 1.5.4
338
  if ( ! isset($image_url) || $image_url == '' ) {
339
- // Make sure that PHP-XML extension is installed before parsing page HTML
340
- // @since 1.6.9.6
341
- if ( extension_loaded('xml') || extension_loaded('SimpleXML')) {
342
-
343
- if ( $post->post_content ) {
344
- $Document = new DOMDocument();
345
- @$Document->loadHTML( $post->post_content );
346
- $DocumentImages = $Document->getElementsByTagName( 'img' );
347
-
348
- if ( $DocumentImages->length ) {
349
- $image_url = $DocumentImages->item( 0 )->getAttribute( 'src' );
350
- $image_width = ( $DocumentImages->item( 0 )->getAttribute( 'width' ) > 696 ) ? $DocumentImages->item( 0 )->getAttribute( 'width' ) : 696;
351
- $image_height = $DocumentImages->item( 0 )->getAttribute( 'height' );
352
- }
353
  }
354
  }
355
- }
356
 
357
  // Check if there is no image, then return an empy array
358
  // @since 1.4.3
@@ -362,10 +197,10 @@ function schema_wp_get_media( $post_id = null) {
362
  if ( ! isset($image_height) || $image_height == '' ) return $media;
363
 
364
  $media = array (
365
- '@type' => 'ImageObject',
366
- 'url' => $image_url,
367
- 'width' => $image_width,
368
- 'height' => $image_height,
369
  );
370
 
371
  // debug
@@ -374,6 +209,7 @@ function schema_wp_get_media( $post_id = null) {
374
  return apply_filters( 'schema_wp_filter_media', $media );
375
  }
376
 
 
377
  /**
378
  * Get post single category,
379
  * the first category
@@ -393,6 +229,7 @@ function schema_wp_get_post_category( $post_id ) {
393
 
394
  return $category;
395
  }
 
396
 
397
  /**
398
  * Get post tags separate by commas,
@@ -454,6 +291,7 @@ function schema_wp_get_categories( $post_id ) {
454
  return apply_filters( 'schema_wp_filter_categories', $categories );
455
  }
456
 
 
457
  add_action( 'save_post', 'schema_save_categories', 10, 3 );
458
  /**
459
  * Save categories when a Schema post is saved.
@@ -486,30 +324,6 @@ function schema_save_categories( $post_id, $post, $update ) {
486
  update_post_meta($post_id, '_schema_categories', $post_categories);
487
  }
488
 
489
- /**
490
- * Get categories as a comma separated keywords
491
- *
492
- * @since 1.6.9.8
493
- * @return string
494
- */
495
- function schema_wp_get_categories_as_keywords() {
496
-
497
- $categories = get_categories( array(
498
- 'orderby' => 'name',
499
- 'order' => 'ASC'
500
- ) );
501
-
502
- $cat = array();
503
-
504
- foreach ( $categories as $category ) {
505
- $cat[] = $category->name;
506
- }
507
-
508
- // transform into a comma separated string
509
- $cat = implode(", ", $cat);
510
-
511
- return apply_filters( 'schema_wp_get_categories', $cat );
512
- }
513
 
514
  /**
515
  * Get supported Article types
@@ -524,6 +338,9 @@ function schema_wp_get_support_article_types() {
524
  return apply_filters( 'schema_wp_support_article_types', $support_article_types );
525
  }
526
 
 
 
 
527
  /**
528
  * Get time Seconds in ISO format
529
  *
@@ -561,6 +378,7 @@ function schema_wp_get_time_second_to_iso8601_duration( $time ) {
561
  return $str;
562
  }
563
 
 
564
  add_action( 'save_post', 'schema_wp_clear_json_on_post_save', 10, 3 );
565
  /**
566
  * Clear schema json on post save
@@ -579,7 +397,7 @@ function schema_wp_clear_json_on_post_save( $post_id, $post, $update ) {
579
  $slug = 'schema';
580
 
581
  // If this is a 'schema' post, don't update it.
582
- if ( get_post_type( $post_id ) == $slug ) {
583
  return $post_id;
584
  }
585
 
@@ -602,264 +420,3 @@ function schema_wp_clear_json_on_post_save( $post_id, $post, $update ) {
602
 
603
  return $post_id;
604
  }
605
-
606
- /**
607
- * Retrieves all the available currencies.
608
- *
609
- * @since 1.6.9
610
- * @return array
611
- */
612
- function schema_wp_get_currencies() {
613
- $currencies = array(
614
- 'AUD' => __( 'Australian Dollars', 'schema-wp' ),
615
- 'BDT' => __( 'Bangladeshi Taka', 'schema-wp' ),
616
- 'BRL' => __( 'Brazilian Real', 'schema-wp' ),
617
- 'BGN' => __( 'Bulgarian Lev', 'schema-wp' ),
618
- 'CAD' => __( 'Canadian Dollars', 'schema-wp' ),
619
- 'CLP' => __( 'Chilean Peso', 'schema-wp' ),
620
- 'CNY' => __( 'Chinese Yuan', 'schema-wp' ),
621
- 'COP' => __( 'Colombian Peso', 'schema-wp' ),
622
- 'CZK' => __( 'Czech Koruna', 'schema-wp' ),
623
- 'DKK' => __( 'Danish Krone', 'schema-wp' ),
624
- 'DOP' => __( 'Dominican Peso', 'schema-wp' ),
625
- 'EUR' => __( 'Euros', 'schema-wp' ),
626
- 'HKD' => __( 'Hong Kong Dollar', 'schema-wp' ),
627
- 'HRK' => __( 'Croatia kuna', 'schema-wp' ),
628
- 'HUF' => __( 'Hungarian Forint', 'schema-wp' ),
629
- 'ISK' => __( 'Icelandic krona', 'schema-wp' ),
630
- 'IDR' => __( 'Indonesia Rupiah', 'schema-wp' ),
631
- 'INR' => __( 'Indian Rupee', 'schema-wp' ),
632
- 'NPR' => __( 'Nepali Rupee', 'schema-wp' ),
633
- 'ILS' => __( 'Israeli Shekel', 'schema-wp' ),
634
- 'JPY' => __( 'Japanese Yen', 'schema-wp' ),
635
- 'KIP' => __( 'Lao Kip', 'schema-wp' ),
636
- 'KRW' => __( 'South Korean Won', 'schema-wp' ),
637
- 'MYR' => __( 'Malaysian Ringgits', 'schema-wp' ),
638
- 'MXN' => __( 'Mexican Peso', 'schema-wp' ),
639
- 'NGN' => __( 'Nigerian Naira', 'schema-wp' ),
640
- 'NOK' => __( 'Norwegian Krone', 'schema-wp' ),
641
- 'NZD' => __( 'New Zealand Dollar', 'schema-wp' ),
642
- 'PYG' => __( 'Paraguayan Guaraní', 'schema-wp' ),
643
- 'PHP' => __( 'Philippine Pesos', 'schema-wp' ),
644
- 'PLN' => __( 'Polish Zloty', 'schema-wp' ),
645
- 'GBP' => __( 'Pounds Sterling', 'schema-wp' ),
646
- 'RON' => __( 'Romanian Leu', 'schema-wp' ),
647
- 'RUB' => __( 'Russian Ruble', 'schema-wp' ),
648
- 'SGD' => __( 'Singapore Dollar', 'schema-wp' ),
649
- 'ZAR' => __( 'South African rand', 'schema-wp' ),
650
- 'SEK' => __( 'Swedish Krona', 'schema-wp' ),
651
- 'CHF' => __( 'Swiss Franc', 'schema-wp' ),
652
- 'TWD' => __( 'Taiwan New Dollars', 'schema-wp' ),
653
- 'THB' => __( 'Thai Baht', 'schema-wp' ),
654
- 'TRY' => __( 'Turkish Lira', 'schema-wp' ),
655
- 'USD' => __( 'US Dollars', 'schema-wp' ),
656
- 'VND' => __( 'Vietnamese Dong', 'schema-wp' ),
657
- 'EGP' => __( 'Egyptian Pound', 'schema-wp' ),
658
- );
659
-
660
- return apply_filters( 'schema_wp_currencies', $currencies );
661
- }
662
-
663
- /**
664
- * Retrieves symbol of the given currency.
665
- *
666
- * @since 1.6.9
667
- *
668
- * @param string $currency Currency code.
669
- *
670
- * @return string $currency_symbol Currency symbol.
671
- */
672
- function schema_wp_get_currency_symbol( $currency ) {
673
- switch ( $currency ) {
674
- case 'BDT':
675
- $currency_symbol = '&#2547;&nbsp;';
676
- break;
677
- case 'BRL' :
678
- $currency_symbol = '&#82;&#36;';
679
- break;
680
- case 'BGN' :
681
- $currency_symbol = '&#1083;&#1074;.';
682
- break;
683
- case 'AUD' :
684
- case 'CAD' :
685
- case 'CLP' :
686
- case 'COP' :
687
- case 'MXN' :
688
- case 'NZD' :
689
- case 'HKD' :
690
- case 'SGD' :
691
- case 'USD' :
692
- $currency_symbol = '&#36;';
693
- break;
694
- case 'EUR' :
695
- $currency_symbol = '&euro;';
696
- break;
697
- case 'CNY' :
698
- case 'RMB' :
699
- case 'JPY' :
700
- $currency_symbol = '&yen;';
701
- break;
702
- case 'RUB' :
703
- $currency_symbol = '&#1088;&#1091;&#1073;.';
704
- break;
705
- case 'KRW' :
706
- $currency_symbol = '&#8361;';
707
- break;
708
- case 'PYG' :
709
- $currency_symbol = '&#8370;';
710
- break;
711
- case 'TRY' :
712
- $currency_symbol = '&#8378;';
713
- break;
714
- case 'NOK' :
715
- $currency_symbol = '&#107;&#114;';
716
- break;
717
- case 'ZAR' :
718
- $currency_symbol = '&#82;';
719
- break;
720
- case 'CZK' :
721
- $currency_symbol = '&#75;&#269;';
722
- break;
723
- case 'MYR' :
724
- $currency_symbol = '&#82;&#77;';
725
- break;
726
- case 'DKK' :
727
- $currency_symbol = 'kr.';
728
- break;
729
- case 'HUF' :
730
- $currency_symbol = '&#70;&#116;';
731
- break;
732
- case 'IDR' :
733
- $currency_symbol = 'Rp';
734
- break;
735
- case 'INR' :
736
- $currency_symbol = '&#8377;';
737
- break;
738
- case 'NPR' :
739
- $currency_symbol = 'Rs.';
740
- break;
741
- case 'ISK' :
742
- $currency_symbol = 'Kr.';
743
- break;
744
- case 'ILS' :
745
- $currency_symbol = '&#8362;';
746
- break;
747
- case 'PHP' :
748
- $currency_symbol = '&#8369;';
749
- break;
750
- case 'PLN' :
751
- $currency_symbol = '&#122;&#322;';
752
- break;
753
- case 'SEK' :
754
- $currency_symbol = '&#107;&#114;';
755
- break;
756
- case 'CHF' :
757
- $currency_symbol = '&#67;&#72;&#70;';
758
- break;
759
- case 'TWD' :
760
- $currency_symbol = '&#78;&#84;&#36;';
761
- break;
762
- case 'THB' :
763
- $currency_symbol = '&#3647;';
764
- break;
765
- case 'GBP' :
766
- $currency_symbol = '&pound;';
767
- break;
768
- case 'RON' :
769
- $currency_symbol = 'lei';
770
- break;
771
- case 'VND' :
772
- $currency_symbol = '&#8363;';
773
- break;
774
- case 'NGN' :
775
- $currency_symbol = '&#8358;';
776
- break;
777
- case 'HRK' :
778
- $currency_symbol = 'Kn';
779
- break;
780
- case 'EGP' :
781
- $currency_symbol = 'EGP';
782
- break;
783
- case 'DOP' :
784
- $currency_symbol = 'RD&#36;';
785
- break;
786
- case 'KIP' :
787
- $currency_symbol = '&#8365;';
788
- break;
789
- default :
790
- $currency_symbol = $currency;
791
- break;
792
- }
793
-
794
- return apply_filters( 'schema_wp_currency_symbol', $currency_symbol, $currency );
795
- }
796
-
797
- /**
798
- * Get archive link
799
- *
800
- * @param string $post_type for custom post type
801
- * @since 1.6.9.8
802
- * @return string
803
- */
804
- function schema_wp_get_archive_link( $post_type ) {
805
- global $wp_post_types;
806
- $archive_link = false;
807
- if (isset($wp_post_types[$post_type])) {
808
- $wp_post_type = $wp_post_types[$post_type];
809
- if ($wp_post_type->publicly_queryable)
810
- if ($wp_post_type->has_archive && $wp_post_type->has_archive!==true)
811
- $slug = $wp_post_type->has_archive;
812
- else if (isset($wp_post_type->rewrite['slug']))
813
- $slug = $wp_post_type->rewrite['slug'];
814
- else
815
- $slug = $post_type;
816
- $archive_link = get_option( 'siteurl' ) . "/{$slug}/";
817
- }
818
- return apply_filters( 'schema_wp_archive_link', $archive_link, $post_type );
819
- }
820
-
821
- /**
822
- * Get blog posts page URL.
823
- *
824
- * @source https://gist.github.com/kellenmace/9ef19dd86580cb7e63720b396c8c2721
825
- * @since 1.6.9.8
826
- * @return string The blog posts page URL.
827
- */
828
- function schema_wp_get_blog_posts_page_url() {
829
- // If front page is set to display a static page, get the URL of the posts page.
830
- if ( 'page' === get_option( 'show_on_front' ) ) {
831
- return get_permalink( get_option( 'page_for_posts' ) );
832
- }
833
- // The front page IS the posts page. Get its URL.
834
- return get_home_url();
835
- }
836
-
837
- /**
838
- * Get First Post Date Function
839
- *
840
- * @since 1.6.9.8
841
- * @param $format Type of date format to return, using PHP date standard, default Y-m-d
842
- * @return Date of first post
843
- */
844
- function schema_wp_first_post_date( $format = 'Y-m-d' ) {
845
- // Setup get_posts arguments
846
- $ax_args = array(
847
- 'numberposts' => -1,
848
- 'post_status' => 'publish',
849
- 'order' => 'ASC'
850
- );
851
-
852
- // Get all posts in order of first to last
853
- $ax_get_all = get_posts($ax_args);
854
-
855
- // Extract first post from array
856
- $ax_first_post = $ax_get_all[0];
857
-
858
- // Assign first post date to var
859
- $ax_first_post_date = $ax_first_post->post_date;
860
-
861
- // return date in required format
862
- $output = date($format, strtotime($ax_first_post_date));
863
-
864
- return $output;
865
- }
12
  // Exit if accessed directly
13
  if ( ! defined( 'ABSPATH' ) ) exit;
14
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
  /**
17
  * Get publisher array
34
 
35
  $publisher = array(
36
  "@type" => "Organization", // default required value
37
+ "name" => $name,
 
38
  "logo" => array(
39
  "@type" => "ImageObject",
40
  "url" => $logo,
42
  "height" => 60
43
  )
44
  );
45
+
46
  return apply_filters( 'schema_wp_publisher', $publisher );
47
  }
48
 
49
+
50
  /**
51
  * Get an array of enabled post types
52
  *
90
 
91
  endforeach;
92
 
 
 
93
  // debug
94
  //echo '<pre>'; print_r($cpt_enabled); echo '</pre>'; exit;
95
 
96
  return apply_filters('schema_wp_cpt_enabled', $cpt_enabled);
97
  }
98
 
99
+
100
  /**
101
  * Get an array of enabled post types
102
  *
125
  $schema_post_types = get_post_meta( $schema->ID, '_schema_post_types' , true );
126
 
127
  // Build our array
128
+ $cpt_enabled[] = reset($schema_post_types);
129
+
130
 
131
  endforeach;
132
 
 
 
133
  // debug
134
  //echo '<pre>'; print_r($cpt_enabled); echo '</pre>'; exit;
135
  //echo reset($cpt_enabled[0]);
136
  return apply_filters('schema_wp_cpt_enabled_post_types', $cpt_enabled);
137
  }
138
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
 
140
  /**
141
  * Get an array of enabled post types
142
  *
143
  * @since 1.4
144
+ * @return array of enabled post types, schema type
145
  */
146
+ function schema_wp_get_media( $id = null) {
147
 
148
  global $post;
149
 
150
+ if ( ! isset( $id ) ) $id = $post->ID;
151
 
152
  $media = array();
153
 
154
  // Featured image
155
+ $image_attributes = wp_get_attachment_image_src( get_post_thumbnail_id($id), 'full' );
156
  $image_url = $image_attributes[0];
157
  $image_width = ( $image_attributes[1] > 696 ) ? $image_attributes[1] : 696; // Images should be at least 696 pixels wide
158
  $image_height = $image_attributes[2];
160
  // Thesis 2.x Post Image
161
  $my_theme = wp_get_theme();
162
  if ( $my_theme->get( 'Name' ) == 'Thesis') {
163
+ $image_attributes = get_post_meta( $id, '_thesis_post_image', true);
164
  if ( ! empty($image_attributes) ) {
165
  $image_url = $image_attributes['image']['url'];
166
  // Make sure url is valid
176
  // Try something else...
177
  // @since 1.5.4
178
  if ( ! isset($image_url) || $image_url == '' ) {
179
+ if ( $post->post_content ) {
180
+ $Document = new DOMDocument();
181
+ @$Document->loadHTML( $post->post_content );
182
+ $DocumentImages = $Document->getElementsByTagName( 'img' );
183
+
184
+ if ( $DocumentImages->length ) {
185
+ $image_url = $DocumentImages->item( 0 )->getAttribute( 'src' );
186
+ $image_width = ( $DocumentImages->item( 0 )->getAttribute( 'width' ) > 696 ) ? $DocumentImages->item( 0 )->getAttribute( 'width' ) : 696;
187
+ $image_height = $DocumentImages->item( 0 )->getAttribute( 'height' );
 
 
 
 
 
188
  }
189
  }
190
+ }
191
 
192
  // Check if there is no image, then return an empy array
193
  // @since 1.4.3
197
  if ( ! isset($image_height) || $image_height == '' ) return $media;
198
 
199
  $media = array (
200
+ '@type' => 'ImageObject',
201
+ 'url' => $image_url,
202
+ 'width' => $image_width,
203
+ 'height' => $image_height,
204
  );
205
 
206
  // debug
209
  return apply_filters( 'schema_wp_filter_media', $media );
210
  }
211
 
212
+
213
  /**
214
  * Get post single category,
215
  * the first category
229
 
230
  return $category;
231
  }
232
+
233
 
234
  /**
235
  * Get post tags separate by commas,
291
  return apply_filters( 'schema_wp_filter_categories', $categories );
292
  }
293
 
294
+
295
  add_action( 'save_post', 'schema_save_categories', 10, 3 );
296
  /**
297
  * Save categories when a Schema post is saved.
324
  update_post_meta($post_id, '_schema_categories', $post_categories);
325
  }
326
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
327
 
328
  /**
329
  * Get supported Article types
338
  return apply_filters( 'schema_wp_support_article_types', $support_article_types );
339
  }
340
 
341
+
342
+
343
+
344
  /**
345
  * Get time Seconds in ISO format
346
  *
378
  return $str;
379
  }
380
 
381
+
382
  add_action( 'save_post', 'schema_wp_clear_json_on_post_save', 10, 3 );
383
  /**
384
  * Clear schema json on post save
397
  $slug = 'schema';
398
 
399
  // If this is a 'schema' post, don't update it.
400
+ if ( $slug == $post->post_type ) {
401
  return $post_id;
402
  }
403
 
420
 
421
  return $post_id;
422
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/misc/auto_featured_img.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Auto Featured Image functions
4
+ *
5
+ * @package Schema Auto Featured Image
6
+ * @subpackage Auto Featured Image
7
+ * @copyright Copyright (c) 2016, Hesham Zebida
8
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
9
+ * @since 1.5.9.7
10
+ */
11
+
12
+ // Exit if accessed directly
13
+ if ( ! defined( 'ABSPATH' ) ) exit;
14
+
15
+
16
+ add_action('the_post', 'schema_wp_auto_featured_img_featured');
17
+ add_action('save_post', 'schema_wp_auto_featured_img_featured');
18
+ add_action('draft_to_publish', 'schema_wp_auto_featured_img_featured');
19
+ add_action('new_to_publish', 'schema_wp_auto_featured_img_featured');
20
+ add_action('pending_to_publish', 'schema_wp_auto_featured_img_featured');
21
+ add_action('future_to_publish', 'schema_wp_auto_featured_img_featured');
22
+ /**
23
+ * Set Featured image automatically while adding or updating the post.
24
+ *
25
+ * @since 1.4.6
26
+ */
27
+ function schema_wp_auto_featured_img_featured() {
28
+
29
+ global $post;
30
+
31
+ $auto_featured_img = schema_wp_get_option( 'auto_featured_img' );
32
+
33
+ if ( $auto_featured_img == true ) {
34
+
35
+ $schema_enabled_spt = schema_wp_cpt_get_enabled();
36
+
37
+ if ( empty($schemas_enabled) ) return;
38
+
39
+ $post_type = get_post_type();
40
+
41
+ foreach( $schemas_enabled as $schema_enabled ) :
42
+
43
+ // Get Schema enabled post types array
44
+ $schema_cpt = $schema_enabled['post_type'];
45
+
46
+ if ( ! empty($schema_cpt) && in_array( $post_type, $schema_cpt, true ) ) {
47
+
48
+ $already_has_thumb = has_post_thumbnail($post->ID);
49
+
50
+ if ( ! $already_has_thumb ) {
51
+ $attached_image = get_children( "post_parent=$post->ID&post_type=attachment&post_mime_type=image&numberposts=1" );
52
+ if ($attached_image) {
53
+ foreach ($attached_image as $attachment_id => $attachment) {
54
+ set_post_thumbnail($post->ID, $attachment_id);
55
+ } // end foreach
56
+ } // end if
57
+ } // end if
58
+ }
59
+
60
+ endforeach;
61
+ } // end if
62
+ }
includes/scripts.php CHANGED
@@ -3,8 +3,6 @@
3
  /**
4
  * Load the frontend scripts and styles
5
  *
6
- * This is not used since there is no scripts to load on front-end
7
- *
8
  * @since 1.0
9
  * @return void
10
  */
@@ -19,4 +17,4 @@ function schema_wp_frontend_scripts_and_styles() {
19
  $suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
20
 
21
  }
22
- //add_action( 'wp_enqueue_scripts', 'schema_wp_frontend_scripts_and_styles' );
3
  /**
4
  * Load the frontend scripts and styles
5
  *
 
 
6
  * @since 1.0
7
  * @return void
8
  */
17
  $suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
18
 
19
  }
20
+ add_action( 'wp_enqueue_scripts', 'schema_wp_frontend_scripts_and_styles' );
readme.txt CHANGED
@@ -1,13 +1,10 @@
1
  === Schema ===
2
  Contributors: hishaman, schemapress
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=NGVUBT2QXN7YL
4
- Tags: schema, schema.org, json, json-ld, google, seo, structured data, markup, search engine, search, rich snippets, breadcrumbs, social, post, page, plugin, wordpress, content, article, news, search results, site name, knowledge graph, social, social profiles, keywords, meta-tags, metadata, tags, categories, optimize, ranking, search engine optimization, search engines, serp, sitelinks, google sitelinks, sitelinks search box, google sitelinks search box, semantic, structured, canonical, custom post types, post type, title, terms, media, images, thumb, featured, url, video, video markup, video object, VideoObject, video schema, audio object, AudioObject, audio schema, audio, sameAs, about, contact, amp, mobile, taxonomy
5
- Requires at least: 4.0
6
- Tested up to: 4.9.6
7
- Requires PHP: 5.4
8
- Stable tag: 1.6.9.8
9
- License: GPLv2 or later
10
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
12
  Get the next generation of Schema Structured Data to enhance your WordPress site presentation in Google search results.
13
 
@@ -19,7 +16,7 @@ Super fast, light-weight plugin for adding schema.org structured data markup in
19
 
20
  Enhanced Presentation in Search Results By including structured data appropriate to your content, your site can enhance its search results and presentation.
21
 
22
- Check out the [Plugin Homepage](https://schema.press/) for more info and [documentation](https://schema.press/docs/).
23
 
24
 
25
  **What is Schema markup?**
@@ -29,16 +26,15 @@ Schema markup is code (semantic vocabulary) that you put on your website to help
29
  **Schema Key Features**
30
 
31
  * Easy to use, set it and forget it, with minimal settings.
32
- * Enable Schema types at once per post type or post category.
33
- * Valid markup, test it in Google Structured Data Testing Tool.
34
  * Output JSON-LD format, the most recommended by Google.
35
- * Reuse data saved in post meta, which is created by other plugins.
36
  * Extensible, means you can extend its functionality via other plugins, extensions or within your Theme’s functions.php file.
37
 
38
  **Plugin Extensions**
39
 
40
- * [Schema Review](https://wordpress.org/plugins/schema-review/): Extend Schema functionality by adding review and rating Structured Data functionality for Editors and Authors.
41
- * [Schema Default Image](https://wordpress.org/plugins/schema-default-image/): Add ability to set a default WordPress Featured image for schema.org markup.
42
 
43
  **Supported Google/Schema Markups**
44
 
@@ -53,7 +49,7 @@ Schema markup is code (semantic vocabulary) that you put on your website to help
53
 
54
  **Supported Schema Types**
55
 
56
- * Creative Work
57
  * [Article](https://schema.org/Article) enabled on Pages
58
  * [BlogPosting](https://schema.org/BlogPosting) enabled on Posts
59
  * [NewsArticle](https://schema.org/NewsArticle)
@@ -62,12 +58,7 @@ Schema markup is code (semantic vocabulary) that you put on your website to help
62
  * [TechArticle](https://schema.org/TechArticle)
63
 
64
  * [Blog](https://schema.org/Blog) to markup Blog posts list page.
65
- * [WPHeader](https://schema.org/WPHeader) to markup Web Page Header.
66
- * [WPFooter](https://schema.org/WPFooter) to markup Web Page Footer.
67
- * [BreadcrumbList](https://schema.org/BreadcrumbList) to markup Breadcrumbs.
68
- * [CollectionPage](https://schema.org/CollectionPage) to markup Categories Archives.
69
- * [CollectionPage](https://schema.org/CollectionPage) to markup Tags Archives.
70
- * [ItemList](https://schema.org/ItemList) to markup Post Type Archives.
71
  * [AboutPage](https://schema.org/AboutPage) to markup the About page.
72
  * [ContactPage](https://schema.org/ContactPage) to markup the Contact page.
73
  * [Person](https://schema.org/Person) enabled on Author pages
@@ -76,16 +67,11 @@ Schema markup is code (semantic vocabulary) that you put on your website to help
76
 
77
  **Supported Plugins**
78
 
79
- Schema plugin integrates, and play nicely with:
80
-
81
  * Yoast SEO
82
  * AMP plugin
83
  * WPRichSnippets
84
  * The SEO Framework
85
  * Visual Composer
86
- * ThirstyAffiliates
87
- * WooCommerce
88
- * Easy Digital Downloads (EDD)
89
 
90
  **Supported Themes**
91
 
@@ -103,28 +89,12 @@ Feel free to [fork the project on GitHub](https://github.com/schemapress/Schema)
103
  2. DO NOT change the name of the `schema` folder
104
  3. Activate the plugin through the 'Plugins' menu in WordPress
105
  4. Navigate to the `Schema > Settings` menu to configure the plugin
106
- 5. If you cache your site, make sure to clear cache after configuring the plugin settings.
107
 
108
  == Frequently Asked Questions ==
109
 
110
  = The plugin isn't working or have a bug? =
111
 
112
- Post detailed information about the issue in the [support forum](https://wordpress.org/support/plugin/schema) and we will work to fix it.
113
-
114
- = Is there any Documentation for this plugin? =
115
-
116
- Indeed, detailed information about the plugin can be found on the [documentation section](https://schema.press/docs/) on our website.
117
-
118
- = Are you going to add support for new schema.org types in the future? =
119
-
120
- Nope! The Schema plugin is meant to add markup to a basic WordPress installation, including those types (mostly Article, BlogPosting) which needs to be supported on a fresh install.
121
-
122
- Other schema.org types shall be added via [Plugin Extensions](https://schema.press/downloads/), or a custom code.
123
-
124
-
125
- = Is there a way to add a new schema.org type? =
126
-
127
- Luckily… Yes! Schema plugin has a filter which can be used to [add support for new schema.org types](https://schema.press/docs/adding-support-new-schema-org-types/).
128
 
129
  = Knowledge Graph is not showing? =
130
 
@@ -132,208 +102,27 @@ The plugin meant to validate markup in Google Structured Data Testing Tool, we d
132
 
133
  = I see an error in Google Structure Data Testing Tool =
134
 
135
- This could be for one -or more- of the following reasons:
136
 
137
  * Image error: This is a missing WordPress Featured image, try to upload a Featured image.
138
  * Logo error: This is a missing Publisher logo, it can be set in the plugin settings page, Schema > Settings > General > Publisher Logo.
139
 
140
- P.S. You may encounter errors for sites hosted locally, for accessibility reasons.
141
-
142
  = Compatible with Yoast SEO? =
143
 
144
- Yes, Schema plugin will detect Yoast SEO plugin and override its output on the front page of your site, this means all Knowledge Graph and Site Search output will be generated by Schema. However, the plugin settings gives you control over which plugin should output Knowledge Graph markup, Search Results, and Breadcrumbs.
145
 
146
  = Compatible with AMP plugin? =
147
 
148
  Yes, Schema plugin will detect AMP plugin and output a more complete and valid schema.org markup.
149
 
150
  == Screenshots ==
151
- 1. Plugin Settings page.
152
  2. Create new schema type screen.
153
  3. Create post meta fields with Post Meta Box generator feature.
154
  4. Google Structured Data Testing Tool.
155
 
156
  == Changelog ==
157
 
158
- = 1.6.9.8.2 =
159
- * Fixed typos when return false in a couple of functions.
160
- * Fixed fatal errors caused due duplicate function names with other plugin in post meta.
161
- * Fixed ImageObject output in the About and Contact pages.
162
- * Fixed the About admin sub menu item url, it was not pointing correctly in some cases.
163
- * Fixed duplicate schema output in some cases when Sitelinks Search Box is enabled.
164
- * Removed the Auto Featured Image feature, it was causing several issues.
165
- * Removed class-settings.php file, which was not used in the plugin.
166
- * Reverted all changes made in version 1.6.9.8 back, since issue has been solved!
167
- * Updated Chosen script and CSS to version 1.8.5 for post meta fields.
168
- * Updated the plugin welcome page.
169
- * Updated readme.txt file to include GPL license details.
170
-
171
- = 1.6.9.8.1 =
172
- * Reverted back all changes made in version 1.6.9.8, since it breaks!
173
-
174
- = 1.6.9.8 =
175
- * Fixed reset post query in post type enabled function.
176
- * Fixed headlines and names, make sure to remove and clean HTML tags.
177
- * Fixed front-end styles and scripts is not needed, commented the function for now.
178
- * Enhanced the Knowledge Graph functionality by adding a new field for contact URL.
179
- * Added new feature, support for WPHeader and WPFooter markup.
180
- * Added new feature, support for ItemList markup on post types archive pages.
181
- * Added new admin page for plugin Extensions.
182
- * Added new function schema_wp_get_archive_link to get archive page link.
183
- * Added new function schema_wp_get_categories_as_keywords to be used by WPHeader.
184
- * Added new function to get blog posts page URL.
185
- * Added new integration and fix for Easy Digital Downloads (EDD) plugin.
186
- * Updated the readme.txt and README.md files and pumped the tested WP version to 4.9
187
- * Code cleanup.
188
-
189
- = 1.6.9.7 =
190
- * Fix for Sitelinks Search Box markup output, echo the value instead of returning it.
191
-
192
- = 1.6.9.6 =
193
- * Fixed video object, removed a check for variable that always returns false.
194
- * Fixed Organization markup output, it was not working.
195
- * Fixed error, make sure PHP-XML extension is installed before parsing page HTML.
196
- * Fixed the query on home page, the blog posts page.
197
- * Fixed PHP notice when enabled types returns a string instead of an array.
198
- * Modified some wording and corrected typos across the plugin.
199
- * Added post id to the media function which is responsible for pulling images.
200
- * Added organization and author ids so Google can identify multiple.
201
- * Added post id to schema_wp_get_ref in schema_wp_get_type function.
202
- * Added new filter for overriding post type in Schema > Types screen.
203
- * Added new filter schema_author_output for overriding author markup output.
204
- * Added new filter sitelinks_search_box for overriding Sitelinks Search Box.
205
- * Added new function to get current post type.
206
- * Updated README.md file.
207
-
208
- = 1.6.9.5 =
209
- * Fixed markup errors on AMP pages, now markup is pulled correctly form Schema.
210
- * Fixed an error due to conflict with previously declared function in another plugin.
211
- * Fixed CSS style used to hide the taxonomy add new link, target only schema post type.
212
- * Fixed Warning raised by delete_term_meta when deleting tags.
213
- * Fixed breadcrumbs, disabled breadcrumbs on WooCommerce to avoid duplication.
214
- * Fixed meta tax styles for sameAs input.
215
- * Fixed Blog posts page markup, create own loop with WP_Query to avoid conflicts.
216
- * Added new function schema_wp_get_type to get schema type by post id.
217
- * Added new function schema_wp_get_ref to get schema reference by post id.
218
- * Added two new filters to allow disable default sameAs feature.
219
- * Added a new filter to disable breadcrumbs.
220
- * Added new feature, support for schema.org markup on tags archives pages.
221
- * Added new features, support for sameAs markup on tag archive pages.
222
- * Updated readme.txt file.
223
-
224
- = 1.6.9.4 =
225
- * Fixed bug in AMP plugin integration, function was called too early.
226
- * Fixed bug in post meta input field types when object post type is not set.
227
- * Fixed broken link in Contextual Help with the plugin settings pages.
228
- * Fixed bad requests happened in the backend for broken links.
229
- * Fixed PHP notice for undefined variable: results, in schema ref.
230
- * Fixed PHP notice in post meta Text input field when $meta has an array.
231
- * Added support for schema.org markup for taxonomy archive pages.
232
- * Added support for breadcrumbs json-ld, added new settings for it under Content tab.
233
- * Enhanced integration of Yoast SEO plugin, remove breadcrumb markup output automatically.
234
- * Enhanced integration of Genesis theme, remove breadcrumb markup output automatically.
235
- * Enhanced category archives markup, reduced 4 database queries, so now it is faster.
236
- * Enhanced Article schema output, only output if Article or sub types is chosen.
237
- * Enhanced post meta generator, added activation filters to generator and meta box.
238
- * Enhanced the display of post types list in Schema Types edit page.
239
- * Enhanced post meta save function, remove check for permissions on save.
240
- * Enhanced description by giving it its own function.
241
- * Updated readme.txt file, modified the plugin details and extended the FAQ section.
242
-
243
- = 1.6.9.3 =
244
- * Fixed a bug in Yoast SEO integration while checking if plugin is active.
245
- * Fixed a warning showing when original post status is not set.
246
- * Fixed a warning when use the Quick Edit screen, could not retrieve post type.
247
- * Fixed input field styles in post meta.
248
- * Added new filter schema_wp_filter_description_word_count for description words count.
249
- * Added new property for post meta called class, to allow styling and targeting inputs.
250
- * Added new custom Bootstrap 4 styles to be used by extensions.
251
- * Extended readme.txt file FAQ section with more details about the plugin.
252
- * Pumped tested version to 4.8.2
253
-
254
- = 1.6.9.2 =
255
- * Fixed post meta fields array, it was not defined properly.
256
- * Fixed minifying admin css file.
257
- * Fixed a bug in the Knowledge Graph markup output with other plugins.
258
- * Tweak modified admin menus to allow ordering admin sub menus by priority.
259
- * Added new filter schema_wp_types_post_meta_fields to allow adding fields to post meta.
260
- * Added new post meta field type for checkbox group inline.
261
- * Added better way to output Knowledge Graph markup, make it filterable.
262
-
263
- = 1.6.9.1 =
264
- * Fixed a notice when WP Rich Snippets plugin is active on a post.
265
- * Fixed post meta class issue, scripts was not loading properly for some types.
266
- * Fixed post meta slider field and added range min property for better presentation.
267
- * Tweak repeated row fields styles, removed the extra li height from post meta CSS.
268
- * Tweak remove repeated fields icon link hover, force mouse cursor to pointer.
269
- * Tweak remove functions from deprecated-functions file.
270
- * Added new post meta sanitizers, santitize_title_with_dashes and sanitize_html_class.
271
- * Added new alert when deleting repeated fields to enhance user experience.
272
- * Added new function and filter to admin backend schema_wp_get_post_types.
273
- * Added new integration for ThirstyAffiliates, prevent thirstylink type from showing.
274
- * Added the required PHP version 5.4 in readme.txt file.
275
-
276
- = 1.6.9 =
277
- * Fixed using JSON_UNESCAPED_UNICODE of PHP 5.4 or later.
278
- * Added new function schema_wp_get_currency_symbol to misc functions file.
279
- * Moved function schema_wp_get_currencies to misc file so it can be used globally.
280
- * Deprecate schema_wp_get_currency function, never been used.
281
- * Update: Bumped minimum required PHP version from 5.3 to 5.4
282
-
283
- = 1.6.8 =
284
- * Fixed googleplus key in user profile meta.
285
- * Fixed Quick Edit links removed on all post types, this should be limited only to schema.
286
-
287
- = 1.6.7 =
288
- * Added new class for admin post list columns, not Schema type has new columns.
289
- * Added new columns to Schema post type, example Schema Type, Post Type, and Content.
290
- * Removed the View and Quick Edit links from actions column.
291
- * Updated custom post meta class, added required and default options for fields.
292
- * Updated a few wording in the Types section in backend.
293
- * Updated custom post meta boxes CSS, set select input field width to auto.
294
- * Cleaned some code and removed code comments.
295
- * Tested with PHP version 7.0.22
296
-
297
- = 1.6.6 =
298
- * Fixed logo guidelines link in plugin settings.
299
- * Fixed site url by using get_home_url instead of get_site_url.
300
- * Fixed a few notices in about, contact, category, and 404 pages.
301
- * Fixed a Trying to get property of non-object warning when saving ref.
302
- * Fixed unwanted field id was showing in the repeated post meta generator.
303
- * Updated to version 1.6.13 of license handler for EDD.
304
- * Updated to version 1.6.11 of EDD updater class.
305
-
306
- = 1.6.5 =
307
- * Fixed empty array output on front page when set Yoast SEO output to true.
308
- * Cleaned comments in code files and corrected a couple of typos.
309
-
310
- = 1.6.4 =
311
- * Removed Yoast SEO plugin check, now it is done via the plugin settings.
312
- * Added new settings checkbox will show when Yoast SEO plugin is active.
313
- * Added Person markup, now a site can be defined as an Organization or a Person.
314
- * Added missing @id to Website markup.
315
- * Added missing @id to Organization markup.
316
- * Updated the welcome page.
317
- * Cleaned and enhanced wording in settings and comments in code files.
318
- * Modified tested up to version to 4.7
319
- * Modified requires at least version to 4.0
320
- * Modified readme.txt file.
321
-
322
- = 1.6.3 =
323
- * Fixed an error in schema markup caused by misspelling articleSection.
324
-
325
- = 1.6.2 =
326
- * Fixed fatal error when previewing or activating non-Genesis themes.
327
- * Fixed fatal error when calling get_current_screen in admin pages.
328
- * Fixes gravatar cached response problem.
329
- * Modified readme.txt file.
330
-
331
- = 1.6.1 =
332
- * Fixed hide VideoObject and AudioObject meta boxes if not enabled in settings.
333
- * Added new hook schema_wp_do_after_settings_updated.
334
- * Added new function schema_wp_json_delete_cache to flush cached json-ld post meta.
335
- * Added flush cached json-ld post meta whenever plugin settings got updated.
336
-
337
  = 1.6 =
338
  * Fixed exclude post was not working properly.
339
  * Fixed cached post meta timestamp should be deleted on post save.
@@ -607,63 +396,6 @@ Yes, Schema plugin will detect AMP plugin and output a more complete and valid s
607
 
608
  == Upgrade Notice ==
609
 
610
- = 1.6.9.8.2 =
611
- In this release, most of the reported bugs has been fixed. Please, update the plugin on your website now to get fixes and enhancements.
612
-
613
- = 1.6.9.8.1 =
614
- In this release, we reverted back to 1.6.9.8, update the plugin on your website now to get fixes.
615
-
616
- = 1.6.9.8 =
617
- In this release, most of the reported bugs has been fixed, including a fix for Easy Digital Downloads plugin. Also, new features has been introduced, example WPHeader and WPFooter markups, and support for ItemList markup on post types archive pages. Please, update the plugin on your website now to get fixes and enhancements.
618
-
619
- = 1.6.9.7 =
620
- This quick update include a fixe for Sitelinks Search Box markup output. Please, update the plugin on your site to get these fixes and enhancements.
621
-
622
- = 1.6.9.6 =
623
- This update include several bug fixes and enhancements. Please, update the plugin on your site to get these fixes and enhancements.
624
-
625
- = 1.6.9.5 =
626
- This update include several bug fixes and enhancements including AMP fixes, WooCommerce breadcrumb fixes, and introducing schema markup on tags archives pages. Please, update the plugin on your site to get these fixes and features.
627
-
628
- = 1.6.9.4 =
629
- This update include several bug fixes, enhancements, and new features including Breadcrumbs JSON-LD markup, which play nicely with Yoast SEO and Genesis. Please, update the plugin on your site to get these fixes and features.
630
-
631
- = 1.6.9.3 =
632
- This update include several bug fixes and new enhancements. Please, update the plugin on your site to get these fixes and enhancements.
633
-
634
- = 1.6.9.2 =
635
- This update include several bug fixes and new enhancements. Please, update the plugin on your site to get these fixes and enhancements.
636
-
637
- = 1.6.9.1 =
638
- This update include several bug fixes and user experience enhancements. Please, update the plugin on your site to get these fixes and enhancements.
639
-
640
- = 1.6.9 =
641
- This update include bug fixes, and more. Also minimum version of PHP is set to 5.4, so make sure you have this version running on your server. Please, update the plugin on your site to get these fixes.
642
-
643
- = 1.6.8 =
644
- This update include bug fixes. Please, update the plugin on your site to get these fixes.
645
-
646
- = 1.6.7 =
647
- This update include important functions, and introduce a new columns in Schema post type. Please, update the plugin on your site to get these new features.
648
-
649
- = 1.6.6 =
650
- This update include an important fixes. Please, update the plugin on your site to get this fix.
651
-
652
- = 1.6.5 =
653
- This update include important fixes for empty array output on front page when set Yoast SEO output to true. Please, update the plugin on your site to get this fix.
654
-
655
- = 1.6.4 =
656
- In this update, Schema will override Yoast SEO plugin JSON-LD output on the front page, also a new feature has been added to allow you define the site for an Organization or a Person. Upgrade now to get these enhancements, Note: you will need to configure the Knowledge Graph settings after the upgrade.
657
-
658
- = 1.6.3 =
659
- This update includes a fix for articleSection which caused an error in schema.org markup. Please, upgrade now to get this fix.
660
-
661
- = 1.6.2 =
662
- In this update, important bug fixes has been made, prevent fatal errors on admin pages and with older versions of Genesis. Please, upgrade now to get this fix.
663
-
664
- = 1.6.1 =
665
- In this update, a bug got fixed and a couple of other enhancements which enhance plugin settings usability has been applied. Please, upgrade now to get these enhancements.
666
-
667
  = 1.6 =
668
  Several bug fixes and enhancement has been done in this release, plus a new extension release for Schema Review. Please, upgrade now to get these enhancements.
669
 
1
  === Schema ===
2
  Contributors: hishaman, schemapress
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=NGVUBT2QXN7YL
4
+ Tags: schema, schema.org, json, json-ld, google, seo, structured data, markup, search engine, search, rich snippets, social, post, page, plugin, wordpress, content, article, news, search results, site name, knowledge graph, social, social profiles, keywords, meta-tags, metadata, tags, categories, optimize, ranking, search engine optimization, search engines, serp, sitelinks, google sitelinks, sitelinks search box, google sitelinks search box, semantic, structured, canonical, custom post types, post type, title, terms, media, images, thumb, featured, url, video, video markup, video object, VideoObject, video schema, audio object, AudioObject, audio schema, audio, sameAs, about, contact, amp, mobile
5
+ Requires at least: 3.0
6
+ Tested up to: 4.6.1
7
+ Stable tag: 1.6
 
 
 
8
 
9
  Get the next generation of Schema Structured Data to enhance your WordPress site presentation in Google search results.
10
 
16
 
17
  Enhanced Presentation in Search Results By including structured data appropriate to your content, your site can enhance its search results and presentation.
18
 
19
+ Check out the [Plugin Homepage](http://schema.press/) for more info and [documentation](http://schema.press/docs/).
20
 
21
 
22
  **What is Schema markup?**
26
  **Schema Key Features**
27
 
28
  * Easy to use, set it and forget it, with minimal settings.
29
+ * Enable Schema types at once per custom post type or post category.
30
+ * Provide a valid markup, test it in Google Structured Data Testing Tool.
31
  * Output JSON-LD format, the most recommended by Google.
32
+ * Can reuse data saved in post meta that is created by other plugins.
33
  * Extensible, means you can extend its functionality via other plugins, extensions or within your Theme’s functions.php file.
34
 
35
  **Plugin Extensions**
36
 
37
+ * [Schema Review](https://wordpress.org/plugins/schema-review/): extend Schema functionality by adding review and rating Structured Data functionality for Editors and Authors.
 
38
 
39
  **Supported Google/Schema Markups**
40
 
49
 
50
  **Supported Schema Types**
51
 
52
+ * Creative Works
53
  * [Article](https://schema.org/Article) enabled on Pages
54
  * [BlogPosting](https://schema.org/BlogPosting) enabled on Posts
55
  * [NewsArticle](https://schema.org/NewsArticle)
58
  * [TechArticle](https://schema.org/TechArticle)
59
 
60
  * [Blog](https://schema.org/Blog) to markup Blog posts list page.
61
+ * [CollectionPage](https://schema.org/CollectionPage) to markup Categories.
 
 
 
 
 
62
  * [AboutPage](https://schema.org/AboutPage) to markup the About page.
63
  * [ContactPage](https://schema.org/ContactPage) to markup the Contact page.
64
  * [Person](https://schema.org/Person) enabled on Author pages
67
 
68
  **Supported Plugins**
69
 
 
 
70
  * Yoast SEO
71
  * AMP plugin
72
  * WPRichSnippets
73
  * The SEO Framework
74
  * Visual Composer
 
 
 
75
 
76
  **Supported Themes**
77
 
89
  2. DO NOT change the name of the `schema` folder
90
  3. Activate the plugin through the 'Plugins' menu in WordPress
91
  4. Navigate to the `Schema > Settings` menu to configure the plugin
 
92
 
93
  == Frequently Asked Questions ==
94
 
95
  = The plugin isn't working or have a bug? =
96
 
97
+ Post detailed information about the issue in the [support forum](http://wordpress.org/support/plugin/schema) and we will work to fix it.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
 
99
  = Knowledge Graph is not showing? =
100
 
102
 
103
  = I see an error in Google Structure Data Testing Tool =
104
 
105
+ This could be for the following reasons:
106
 
107
  * Image error: This is a missing WordPress Featured image, try to upload a Featured image.
108
  * Logo error: This is a missing Publisher logo, it can be set in the plugin settings page, Schema > Settings > General > Publisher Logo.
109
 
 
 
110
  = Compatible with Yoast SEO? =
111
 
112
+ Yes, Schema plugin will detect Yoast SEO plugin and it will not output any markup on the front page of your site, this means all Knowledge Graph and Site Search output will be generated by Yoast SEO.
113
 
114
  = Compatible with AMP plugin? =
115
 
116
  Yes, Schema plugin will detect AMP plugin and output a more complete and valid schema.org markup.
117
 
118
  == Screenshots ==
119
+ 1. Knowledge Graph settings tab.
120
  2. Create new schema type screen.
121
  3. Create post meta fields with Post Meta Box generator feature.
122
  4. Google Structured Data Testing Tool.
123
 
124
  == Changelog ==
125
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
126
  = 1.6 =
127
  * Fixed exclude post was not working properly.
128
  * Fixed cached post meta timestamp should be deleted on post save.
396
 
397
  == Upgrade Notice ==
398
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
399
  = 1.6 =
400
  Several bug fixes and enhancement has been done in this release, plus a new extension release for Schema Review. Please, upgrade now to get these enhancements.
401
 
schema.php CHANGED
@@ -1,11 +1,11 @@
1
  <?php
2
  /**
3
  * Plugin Name: Schema
4
- * Plugin URI: https://schema.press
5
  * Description: The next generation of Structured Data.
6
  * Author: Hesham
7
  * Author URI: http://zebida.com
8
- * Version: 1.6.9.8.2
9
  * Text Domain: schema-wp
10
  * Domain Path: languages
11
  *
@@ -51,7 +51,7 @@ final class Schema_WP {
51
  *
52
  * @since 1.0
53
  */
54
- private $version = '1.6.9.8.2';
55
 
56
  /**
57
  * The settings instance variable
@@ -86,7 +86,7 @@ final class Schema_WP {
86
  if ( ! isset( self::$instance ) && ! ( self::$instance instanceof SCHEMA_WP ) ) {
87
  self::$instance = new SCHEMA_WP;
88
 
89
- if( version_compare( PHP_VERSION, '5.4', '<' ) ) {
90
 
91
  add_action( 'admin_notices', array( 'SCHEMA_WP', 'below_php_version_notice' ) );
92
 
@@ -137,7 +137,7 @@ final class Schema_WP {
137
  * @return void
138
  */
139
  public function below_php_version_notice() {
140
- echo '<div class="error"><p>' . __( 'Your version of PHP is below the minimum version of PHP required by Schema plugin. Please contact your host and request that your version be upgraded to 5.4 or later.', 'schema-wp' ) . '</p></div>';
141
  }
142
 
143
  /**
@@ -181,8 +181,6 @@ final class Schema_WP {
181
  global $schema_wp_options;
182
 
183
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/settings/register-settings.php';
184
-
185
- // get settings
186
  $schema_wp_options = schema_wp_get_settings();
187
 
188
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/class-capabilities.php';
@@ -197,8 +195,8 @@ final class Schema_WP {
197
  if( is_admin() ) {
198
 
199
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/meta/class-meta.php';
200
- require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/meta.php';
201
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/meta-tax/class-meta-tax.php';
 
202
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/meta-tax.php';
203
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/meta-exclude.php';
204
 
@@ -206,32 +204,26 @@ final class Schema_WP {
206
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/settings/contextual-help.php';
207
 
208
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/admin-pages.php';
209
- require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/extensions.php';
210
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/scripts.php';
211
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/class-menu.php';
212
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/class-notices.php';
213
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/class-welcome.php';
214
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/class-feedback.php';
215
 
216
- require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/post-type/class-columns.php';
217
- require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/post-type/schema-columns.php';
218
  }
219
 
220
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/misc-functions.php';
221
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/scripts.php';
222
 
223
- // Schema outputs
224
- require_once SCHEMAWP_PLUGIN_DIR . 'includes/json/web-page-element.php';
 
225
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/json/knowledge-graph.php';
226
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/json/search-results.php';
227
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/json/blog.php';
228
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/json/category.php';
229
- require_once SCHEMAWP_PLUGIN_DIR . 'includes/json/tag.php';
230
- require_once SCHEMAWP_PLUGIN_DIR . 'includes/json/post-type-archive.php';
231
- require_once SCHEMAWP_PLUGIN_DIR . 'includes/json/taxonomy.php';
232
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/json/author.php';
233
 
234
- // Schema main output
235
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/json/schema-output.php';
236
 
237
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/admin-bar-menu.php';
@@ -243,9 +235,6 @@ final class Schema_WP {
243
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/integrations/wp-rich-snippets.php';
244
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/integrations/seo-framework.php';
245
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/integrations/visual-composer.php';
246
- require_once SCHEMAWP_PLUGIN_DIR . 'includes/integrations/thirstyaffiliates.php';
247
- require_once SCHEMAWP_PLUGIN_DIR . 'includes/integrations/woocommerce.php';
248
- require_once SCHEMAWP_PLUGIN_DIR . 'includes/integrations/edd.php';
249
 
250
  // Theme Integrations
251
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/integrations/genesis.php';
@@ -254,7 +243,6 @@ final class Schema_WP {
254
 
255
  // Core Extensions
256
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/extensions/post-meta-generator.php';
257
- require_once SCHEMAWP_PLUGIN_DIR . 'includes/extensions/breadcrumbs.php';
258
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/extensions/author.php';
259
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/extensions/page-about.php';
260
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/extensions/page-contact.php';
@@ -263,7 +251,6 @@ final class Schema_WP {
263
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/extensions/sameAs.php';
264
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/extensions/comment.php';
265
 
266
- // Install
267
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/install.php';
268
  }
269
 
@@ -279,6 +266,7 @@ final class Schema_WP {
279
  //self::$instance->settings = new Schema_WP_Settings;
280
  }
281
 
 
282
  /**
283
  * Loads the plugin language files
284
  *
1
  <?php
2
  /**
3
  * Plugin Name: Schema
4
+ * Plugin URI: http://schema.press
5
  * Description: The next generation of Structured Data.
6
  * Author: Hesham
7
  * Author URI: http://zebida.com
8
+ * Version: 1.6
9
  * Text Domain: schema-wp
10
  * Domain Path: languages
11
  *
51
  *
52
  * @since 1.0
53
  */
54
+ private $version = '1.6';
55
 
56
  /**
57
  * The settings instance variable
86
  if ( ! isset( self::$instance ) && ! ( self::$instance instanceof SCHEMA_WP ) ) {
87
  self::$instance = new SCHEMA_WP;
88
 
89
+ if( version_compare( PHP_VERSION, '5.3', '<' ) ) {
90
 
91
  add_action( 'admin_notices', array( 'SCHEMA_WP', 'below_php_version_notice' ) );
92
 
137
  * @return void
138
  */
139
  public function below_php_version_notice() {
140
+ echo '<div class="error"><p>' . __( 'Your version of PHP is below the minimum version of PHP required by Schema plugin. Please contact your host and request that your version be upgraded to 5.3 or later.', 'schema-wp' ) . '</p></div>';
141
  }
142
 
143
  /**
181
  global $schema_wp_options;
182
 
183
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/settings/register-settings.php';
 
 
184
  $schema_wp_options = schema_wp_get_settings();
185
 
186
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/class-capabilities.php';
195
  if( is_admin() ) {
196
 
197
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/meta/class-meta.php';
 
198
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/meta-tax/class-meta-tax.php';
199
+ require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/meta.php';
200
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/meta-tax.php';
201
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/meta-exclude.php';
202
 
204
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/settings/contextual-help.php';
205
 
206
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/admin-pages.php';
 
207
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/scripts.php';
208
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/class-menu.php';
209
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/class-notices.php';
210
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/class-welcome.php';
211
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/class-feedback.php';
212
 
 
 
213
  }
214
 
215
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/misc-functions.php';
216
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/scripts.php';
217
 
218
+ // Misc
219
+ require_once SCHEMAWP_PLUGIN_DIR . 'includes/misc/auto_featured_img.php';
220
+
221
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/json/knowledge-graph.php';
222
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/json/search-results.php';
223
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/json/blog.php';
224
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/json/category.php';
 
 
 
225
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/json/author.php';
226
 
 
227
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/json/schema-output.php';
228
 
229
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/admin-bar-menu.php';
235
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/integrations/wp-rich-snippets.php';
236
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/integrations/seo-framework.php';
237
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/integrations/visual-composer.php';
 
 
 
238
 
239
  // Theme Integrations
240
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/integrations/genesis.php';
243
 
244
  // Core Extensions
245
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/extensions/post-meta-generator.php';
 
246
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/extensions/author.php';
247
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/extensions/page-about.php';
248
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/extensions/page-contact.php';
251
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/extensions/sameAs.php';
252
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/extensions/comment.php';
253
 
 
254
  require_once SCHEMAWP_PLUGIN_DIR . 'includes/install.php';
255
  }
256
 
266
  //self::$instance->settings = new Schema_WP_Settings;
267
  }
268
 
269
+
270
  /**
271
  * Loads the plugin language files
272
  *