Business Profile - Version 2.0.0

Version Description

(2020-01-31) = - This is a big update with many new features, corrections, revised admin styling, etc., so please take caution and test before updating on a live site (or wait a few days before updating in case some minor corrective updates need to be put out) - The Options pages have a brand new and easy-to-use design, to go hand in hand with the many, many new options! - Added in a new schemas functionality, to add structured data to any page or post - Added in WooCommerce integration for the schema functionality - Added in posts integration for the schema functionality - Added in default helpers for the schema functionality - Added in a walkthrough on installation to help you get going as quickly as possible - Added in defaults for several options - Added a Dashboard panel to the plugin admin - Updated the styling of certain default features to be consistent with new features - Other styling and ease-of-use changes - Updated the order, layout and descriptions of several options

Download this release

Release Info

Developer Rustaurius
Plugin Icon 128x128 Business Profile
Version 2.0.0
Comparing to
See all releases

Code changes from version 1.2.9 to 2.0.0

Files changed (248) hide show
  1. GPL.txt +279 -279
  2. Gruntfile.js +72 -72
  3. assets/.esformatter +14 -14
  4. assets/.jscsrc +165 -165
  5. assets/.jshintrc +25 -25
  6. assets/css/admin.css +1846 -35
  7. assets/css/contact-card.css +110 -110
  8. assets/img/bpfwp-dashboard-banner.png +0 -0
  9. assets/img/bpfwp-icon.png +0 -0
  10. assets/img/dash-asset-badge.png +0 -0
  11. assets/img/dash-asset-checkmark.png +0 -0
  12. assets/img/dash-asset-key.png +0 -0
  13. assets/img/dash-asset-stars.png +0 -0
  14. assets/img/ewd-support-icon-documentation.png +0 -0
  15. assets/img/ewd-support-icon-faqs.png +0 -0
  16. assets/img/ewd-support-icon-forum.png +0 -0
  17. assets/img/ewd-support-icon-youtube.png +0 -0
  18. assets/img/fivestartextlogo.png +0 -0
  19. assets/img/fivestartextlogowithstar.png +0 -0
  20. assets/img/options-asset-lock.png +0 -0
  21. assets/img/options-asset-star.png +0 -0
  22. assets/js/admin-schema-selector.js +49 -0
  23. assets/js/admin.js +68 -0
  24. assets/js/block-contact-card.js +117 -117
  25. assets/js/map.js +113 -113
  26. assets/js/schema-cpt.js +70 -0
  27. business-profile.php +340 -266
  28. includes/class-blocks.php +163 -163
  29. includes/class-compatibility.php +83 -83
  30. includes/class-contact-card-widget.php +167 -167
  31. includes/class-custom-post-types.php +1093 -568
  32. includes/class-dashboard.php +413 -0
  33. includes/class-integrations.php +186 -0
  34. includes/class-permissions.php +48 -0
  35. includes/class-sap-scheduler-meta.php +41 -41
  36. includes/class-schema-cpt.php +470 -0
  37. includes/class-schemas-manager.php +335 -0
  38. includes/class-settings.php +703 -555
  39. includes/class-template-loader.php +70 -70
  40. includes/deprecated/class-integrations.php +0 -179
  41. includes/helper-functions.php +101 -0
  42. includes/schemas/class-schema-accountingservice.php +75 -0
  43. includes/schemas/class-schema-adultentertainment.php +75 -0
  44. includes/schemas/class-schema-airline.php +108 -0
  45. includes/schemas/class-schema-amusementpark.php +75 -0
  46. includes/schemas/class-schema-animalshelter.php +75 -0
  47. includes/schemas/class-schema-archiveorganization.php +116 -0
  48. includes/schemas/class-schema-artgallery.php +75 -0
  49. includes/schemas/class-schema-article.php +167 -0
  50. includes/schemas/class-schema-attorney.php +75 -0
  51. includes/schemas/class-schema-autobodyshop.php +75 -0
  52. includes/schemas/class-schema-autodealer.php +75 -0
  53. includes/schemas/class-schema-automatedteller.php +75 -0
  54. includes/schemas/class-schema-automotivebusiness.php +85 -0
  55. includes/schemas/class-schema-autopartsstore.php +75 -0
  56. includes/schemas/class-schema-autorental.php +75 -0
  57. includes/schemas/class-schema-autorepair.php +75 -0
  58. includes/schemas/class-schema-autowash.php +75 -0
  59. includes/schemas/class-schema-bakery.php +75 -0
  60. includes/schemas/class-schema-bankorcreditunion.php +75 -0
  61. includes/schemas/class-schema-barorpub.php +75 -0
  62. includes/schemas/class-schema-beautysalon.php +75 -0
  63. includes/schemas/class-schema-bedandbreakfast.php +75 -0
  64. includes/schemas/class-schema-bikestore.php +75 -0
  65. includes/schemas/class-schema-book.php +143 -0
  66. includes/schemas/class-schema-bookstore.php +75 -0
  67. includes/schemas/class-schema-bowlingalley.php +75 -0
  68. includes/schemas/class-schema-breadcrumb.php +147 -0
  69. includes/schemas/class-schema-brewery.php +75 -0
  70. includes/schemas/class-schema-cafeorcoffeeshop.php +75 -0
  71. includes/schemas/class-schema-campground.php +75 -0
  72. includes/schemas/class-schema-carousel.php +140 -0
  73. includes/schemas/class-schema-casino.php +75 -0
  74. includes/schemas/class-schema-childcare.php +75 -0
  75. includes/schemas/class-schema-clothingstore.php +75 -0
  76. includes/schemas/class-schema-collegeoruniversity.php +75 -0
  77. includes/schemas/class-schema-comedyclub.php +75 -0
  78. includes/schemas/class-schema-communityhealth.php +75 -0
  79. includes/schemas/class-schema-computerstore.php +75 -0
  80. includes/schemas/class-schema-consortium.php +75 -0
  81. includes/schemas/class-schema-conveniencestore.php +75 -0
  82. includes/schemas/class-schema-corporation.php +89 -0
  83. includes/schemas/class-schema-course.php +112 -0
  84. includes/schemas/class-schema-criticreview.php +236 -0
  85. includes/schemas/class-schema-dancegroup.php +75 -0
  86. includes/schemas/class-schema-dataset.php +182 -0
  87. includes/schemas/class-schema-dayspa.php +75 -0
  88. includes/schemas/class-schema-dentist.php +75 -0
  89. includes/schemas/class-schema-departmentstore.php +75 -0
  90. includes/schemas/class-schema-dermatology.php +75 -0
  91. includes/schemas/class-schema-diagnosticlab.php +88 -0
  92. includes/schemas/class-schema-dietnutrition.php +75 -0
  93. includes/schemas/class-schema-distillery.php +75 -0
  94. includes/schemas/class-schema-drycleaningorlaundry.php +75 -0
  95. includes/schemas/class-schema-educationalorganization.php +103 -0
  96. includes/schemas/class-schema-electrician.php +75 -0
  97. includes/schemas/class-schema-electronicsstore.php +75 -0
  98. includes/schemas/class-schema-elementaryschool.php +75 -0
  99. includes/schemas/class-schema-emergency.php +75 -0
  100. includes/schemas/class-schema-emergencyservice.php +79 -0
  101. includes/schemas/class-schema-employeraggregaterating.php +124 -0
  102. includes/schemas/class-schema-employmentagency.php +75 -0
  103. includes/schemas/class-schema-entertainmentbusiness.php +83 -0
  104. includes/schemas/class-schema-event.php +164 -0
  105. includes/schemas/class-schema-exercisegym.php +75 -0
  106. includes/schemas/class-schema-factcheck.php +213 -0
  107. includes/schemas/class-schema-faqpage.php +116 -0
  108. includes/schemas/class-schema-fastfoodrestaurant.php +75 -0
  109. includes/schemas/class-schema-field.php +176 -0
  110. includes/schemas/class-schema-financialservice.php +93 -0
  111. includes/schemas/class-schema-firestation.php +75 -0
  112. includes/schemas/class-schema-florist.php +75 -0
  113. includes/schemas/class-schema-foodestablishment.php +110 -0
  114. includes/schemas/class-schema-fundingagency.php +75 -0
  115. includes/schemas/class-schema-fundingscheme.php +75 -0
  116. includes/schemas/class-schema-furniturestore.php +75 -0
  117. includes/schemas/class-schema-gardenstore.php +75 -0
  118. includes/schemas/class-schema-gasstation.php +75 -0
  119. includes/schemas/class-schema-generalcontractor.php +75 -0
  120. includes/schemas/class-schema-geriatric.php +75 -0
  121. includes/schemas/class-schema-golfcourse.php +75 -0
  122. includes/schemas/class-schema-governmentoffice.php +77 -0
  123. includes/schemas/class-schema-governmentorganization.php +75 -0
  124. includes/schemas/class-schema-grocerystore.php +75 -0
  125. includes/schemas/class-schema-gynecologic.php +75 -0
  126. includes/schemas/class-schema-hairsalon.php +75 -0
  127. includes/schemas/class-schema-hardwarestore.php +75 -0
  128. includes/schemas/class-schema-healthandbeautybusiness.php +82 -0
  129. includes/schemas/class-schema-healthclub.php +75 -0
  130. includes/schemas/class-schema-highschool.php +75 -0
  131. includes/schemas/class-schema-hobbyshop.php +75 -0
  132. includes/schemas/class-schema-homeandconstructionbusiness.php +84 -0
  133. includes/schemas/class-schema-homegoodsstore.php +75 -0
  134. includes/schemas/class-schema-hospital.php +75 -0
  135. includes/schemas/class-schema-hostel.php +75 -0
  136. includes/schemas/class-schema-hotel.php +75 -0
  137. includes/schemas/class-schema-housepainter.php +75 -0
  138. includes/schemas/class-schema-howto.php +146 -0
  139. includes/schemas/class-schema-hvacbusiness.php +75 -0
  140. includes/schemas/class-schema-icecreamshop.php +75 -0
  141. includes/schemas/class-schema-insuranceagency.php +75 -0
  142. includes/schemas/class-schema-internetcafe.php +75 -0
  143. includes/schemas/class-schema-jewelrystore.php +75 -0
  144. includes/schemas/class-schema-jobposting.php +216 -0
  145. includes/schemas/class-schema-legalservice.php +78 -0
  146. includes/schemas/class-schema-library.php +75 -0
  147. includes/schemas/class-schema-librarysystem.php +75 -0
  148. includes/schemas/class-schema-liquorstore.php +75 -0
  149. includes/schemas/class-schema-localbusiness.php +131 -0
  150. includes/schemas/class-schema-localbusinesslisting.php +249 -0
  151. includes/schemas/class-schema-locksmith.php +75 -0
  152. includes/schemas/class-schema-lodgingbusiness.php +127 -0
  153. includes/schemas/class-schema-logo.php +93 -0
  154. includes/schemas/class-schema-medicalbusiness.php +100 -0
  155. includes/schemas/class-schema-medicalclinic.php +75 -0
  156. includes/schemas/class-schema-medicalorganization.php +96 -0
  157. includes/schemas/class-schema-mensclothingstore.php +75 -0
  158. includes/schemas/class-schema-middleschool.php +75 -0
  159. includes/schemas/class-schema-midwifery.php +75 -0
  160. includes/schemas/class-schema-mobilephonestore.php +75 -0
  161. includes/schemas/class-schema-motel.php +75 -0
  162. includes/schemas/class-schema-motorcycledealer.php +75 -0
  163. includes/schemas/class-schema-motorcyclerepair.php +75 -0
  164. includes/schemas/class-schema-movie.php +216 -0
  165. includes/schemas/class-schema-movierentalstore.php +75 -0
  166. includes/schemas/class-schema-movietheater.php +88 -0
  167. includes/schemas/class-schema-movingcompany.php +75 -0
  168. includes/schemas/class-schema-musicgroup.php +88 -0
  169. includes/schemas/class-schema-musicstore.php +75 -0
  170. includes/schemas/class-schema-nailsalon.php +75 -0
  171. includes/schemas/class-schema-newsmediaorganization.php +88 -0
  172. includes/schemas/class-schema-ngo.php +75 -0
  173. includes/schemas/class-schema-nightclub.php +75 -0
  174. includes/schemas/class-schema-notary.php +75 -0
  175. includes/schemas/class-schema-nursing.php +75 -0
  176. includes/schemas/class-schema-obstetric.php +75 -0
  177. includes/schemas/class-schema-occupation.php +172 -0
  178. includes/schemas/class-schema-officeequipmentstore.php +75 -0
  179. includes/schemas/class-schema-oncologic.php +75 -0
  180. includes/schemas/class-schema-optician.php +75 -0
  181. includes/schemas/class-schema-optometric.php +75 -0
  182. includes/schemas/class-schema-organization.php +179 -0
  183. includes/schemas/class-schema-otolaryngologic.php +75 -0
  184. includes/schemas/class-schema-outletstore.php +75 -0
  185. includes/schemas/class-schema-pawnshop.php +75 -0
  186. includes/schemas/class-schema-pediatric.php +75 -0
  187. includes/schemas/class-schema-performinggroup.php +92 -0
  188. includes/schemas/class-schema-petstore.php +75 -0
  189. includes/schemas/class-schema-pharmacy.php +75 -0
  190. includes/schemas/class-schema-physician.php +75 -0
  191. includes/schemas/class-schema-physiotherapy.php +75 -0
  192. includes/schemas/class-schema-plasticsurgery.php +75 -0
  193. includes/schemas/class-schema-plumber.php +75 -0
  194. includes/schemas/class-schema-podiatric.php +75 -0
  195. includes/schemas/class-schema-policestation.php +75 -0
  196. includes/schemas/class-schema-postoffice.php +75 -0
  197. includes/schemas/class-schema-preschool.php +75 -0
  198. includes/schemas/class-schema-primarycare.php +75 -0
  199. includes/schemas/class-schema-product.php +220 -0
  200. includes/schemas/class-schema-professionalservice.php +75 -0
  201. includes/schemas/class-schema-project.php +78 -0
  202. includes/schemas/class-schema-psychiatric.php +75 -0
  203. includes/schemas/class-schema-publichealth.php +75 -0
  204. includes/schemas/class-schema-publicswimmingpool.php +75 -0
  205. includes/schemas/class-schema-qapage.php +225 -0
  206. includes/schemas/class-schema-radiostation.php +75 -0
  207. includes/schemas/class-schema-realestateagent.php +75 -0
  208. includes/schemas/class-schema-recipe.php +232 -0
  209. includes/schemas/class-schema-recyclingcenter.php +75 -0
  210. includes/schemas/class-schema-researchproject.php +75 -0
  211. includes/schemas/class-schema-resort.php +75 -0
  212. includes/schemas/class-schema-restaurant.php +75 -0
  213. includes/schemas/class-schema-reviewsnippet.php +191 -0
  214. includes/schemas/class-schema-roofingcontractor.php +75 -0
  215. includes/schemas/class-schema-school.php +75 -0
  216. includes/schemas/class-schema-selfstorage.php +75 -0
  217. includes/schemas/class-schema-shoestore.php +75 -0
  218. includes/schemas/class-schema-shoppingcenter.php +75 -0
  219. includes/schemas/class-schema-sitelinkssearchbox.php +106 -0
  220. includes/schemas/class-schema-skiresort.php +75 -0
  221. includes/schemas/class-schema-softwareapp.php +138 -0
  222. includes/schemas/class-schema-sportinggoodsstore.php +75 -0
  223. includes/schemas/class-schema-sportsactivitylocation.php +85 -0
  224. includes/schemas/class-schema-sportsclub.php +75 -0
  225. includes/schemas/class-schema-sportsorganization.php +90 -0
  226. includes/schemas/class-schema-sportsteam.php +110 -0
  227. includes/schemas/class-schema-stadiumorarena.php +75 -0
  228. includes/schemas/class-schema-store.php +106 -0
  229. includes/schemas/class-schema-subscriptionandpaywalledcontent.php +150 -0
  230. includes/schemas/class-schema-tattooparlor.php +75 -0
  231. includes/schemas/class-schema-televisionstation.php +75 -0
  232. includes/schemas/class-schema-tenniscomplex.php +75 -0
  233. includes/schemas/class-schema-theatergroup.php +75 -0
  234. includes/schemas/class-schema-tireshop.php +75 -0
  235. includes/schemas/class-schema-touristinformationcenter.php +75 -0
  236. includes/schemas/class-schema-toystore.php +75 -0
  237. includes/schemas/class-schema-travelagency.php +75 -0
  238. includes/schemas/class-schema-veterinarycare.php +75 -0
  239. includes/schemas/class-schema-video.php +143 -0
  240. includes/schemas/class-schema-wholesalestore.php +75 -0
  241. includes/schemas/class-schema-winery.php +75 -0
  242. includes/schemas/class-schema-workersunion.php +75 -0
  243. includes/schemas/class-schema.php +100 -0
  244. includes/template-functions.php +620 -620
  245. languages/business-profile-cs_CZ.po +1253 -1253
  246. languages/business-profile-es_CO.po +504 -504
  247. languages/business-profile-es_ES.po +545 -545
  248. languages/business-profile-he_IL.po +0 -286
GPL.txt CHANGED
@@ -1,280 +1,280 @@
1
- GNU GENERAL PUBLIC LICENSE
2
- Version 2, June 1991
3
-
4
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
6
-
7
- Everyone is permitted to copy and distribute verbatim copies
8
- of this license document, but changing it is not allowed.
9
-
10
- Preamble
11
-
12
- The licenses for most software are designed to take away your
13
- freedom to share and change it. By contrast, the GNU General Public
14
- License is intended to guarantee your freedom to share and change free
15
- software--to make sure the software is free for all its users. This
16
- General Public License applies to most of the Free Software
17
- Foundation's software and to any other program whose authors commit to
18
- using it. (Some other Free Software Foundation software is covered by
19
- the GNU Library General Public License instead.) You can apply it to
20
- your programs, too.
21
-
22
- When we speak of free software, we are referring to freedom, not
23
- price. Our General Public Licenses are designed to make sure that you
24
- have the freedom to distribute copies of free software (and charge for
25
- this service if you wish), that you receive source code or can get it
26
- if you want it, that you can change the software or use pieces of it
27
- in new free programs; and that you know you can do these things.
28
-
29
- To protect your rights, we need to make restrictions that forbid
30
- anyone to deny you these rights or to ask you to surrender the rights.
31
- These restrictions translate to certain responsibilities for you if you
32
- distribute copies of the software, or if you modify it.
33
-
34
- For example, if you distribute copies of such a program, whether
35
- gratis or for a fee, you must give the recipients all the rights that
36
- you have. You must make sure that they, too, receive or can get the
37
- source code. And you must show them these terms so they know their
38
- rights.
39
-
40
- We protect your rights with two steps: (1) copyright the software, and
41
- (2) offer you this license which gives you legal permission to copy,
42
- distribute and/or modify the software.
43
-
44
- Also, for each author's protection and ours, we want to make certain
45
- that everyone understands that there is no warranty for this free
46
- software. If the software is modified by someone else and passed on, we
47
- want its recipients to know that what they have is not the original, so
48
- that any problems introduced by others will not reflect on the original
49
- authors' reputations.
50
-
51
- Finally, any free program is threatened constantly by software
52
- patents. We wish to avoid the danger that redistributors of a free
53
- program will individually obtain patent licenses, in effect making the
54
- program proprietary. To prevent this, we have made it clear that any
55
- patent must be licensed for everyone's free use or not licensed at all.
56
-
57
- The precise terms and conditions for copying, distribution and
58
- modification follow.
59
-
60
- GNU GENERAL PUBLIC LICENSE
61
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
62
-
63
- 0. This License applies to any program or other work which contains
64
- a notice placed by the copyright holder saying it may be distributed
65
- under the terms of this General Public License. The "Program", below,
66
- refers to any such program or work, and a "work based on the Program"
67
- means either the Program or any derivative work under copyright law:
68
- that is to say, a work containing the Program or a portion of it,
69
- either verbatim or with modifications and/or translated into another
70
- language. (Hereinafter, translation is included without limitation in
71
- the term "modification".) Each licensee is addressed as "you".
72
-
73
- Activities other than copying, distribution and modification are not
74
- covered by this License; they are outside its scope. The act of
75
- running the Program is not restricted, and the output from the Program
76
- is covered only if its contents constitute a work based on the
77
- Program (independent of having been made by running the Program).
78
- Whether that is true depends on what the Program does.
79
-
80
- 1. You may copy and distribute verbatim copies of the Program's
81
- source code as you receive it, in any medium, provided that you
82
- conspicuously and appropriately publish on each copy an appropriate
83
- copyright notice and disclaimer of warranty; keep intact all the
84
- notices that refer to this License and to the absence of any warranty;
85
- and give any other recipients of the Program a copy of this License
86
- along with the Program.
87
-
88
- You may charge a fee for the physical act of transferring a copy, and
89
- you may at your option offer warranty protection in exchange for a fee.
90
-
91
- 2. You may modify your copy or copies of the Program or any portion
92
- of it, thus forming a work based on the Program, and copy and
93
- distribute such modifications or work under the terms of Section 1
94
- above, provided that you also meet all of these conditions:
95
-
96
- a) You must cause the modified files to carry prominent notices
97
- stating that you changed the files and the date of any change.
98
-
99
- b) You must cause any work that you distribute or publish, that in
100
- whole or in part contains or is derived from the Program or any
101
- part thereof, to be licensed as a whole at no charge to all third
102
- parties under the terms of this License.
103
-
104
- c) If the modified program normally reads commands interactively
105
- when run, you must cause it, when started running for such
106
- interactive use in the most ordinary way, to print or display an
107
- announcement including an appropriate copyright notice and a
108
- notice that there is no warranty (or else, saying that you provide
109
- a warranty) and that users may redistribute the program under
110
- these conditions, and telling the user how to view a copy of this
111
- License. (Exception: if the Program itself is interactive but
112
- does not normally print such an announcement, your work based on
113
- the Program is not required to print an announcement.)
114
-
115
- These requirements apply to the modified work as a whole. If
116
- identifiable sections of that work are not derived from the Program,
117
- and can be reasonably considered independent and separate works in
118
- themselves, then this License, and its terms, do not apply to those
119
- sections when you distribute them as separate works. But when you
120
- distribute the same sections as part of a whole which is a work based
121
- on the Program, the distribution of the whole must be on the terms of
122
- this License, whose permissions for other licensees extend to the
123
- entire whole, and thus to each and every part regardless of who wrote it.
124
- Thus, it is not the intent of this section to claim rights or contest
125
- your rights to work written entirely by you; rather, the intent is to
126
- exercise the right to control the distribution of derivative or
127
- collective works based on the Program.
128
-
129
- In addition, mere aggregation of another work not based on the Program
130
- with the Program (or with a work based on the Program) on a volume of
131
- a storage or distribution medium does not bring the other work under
132
- the scope of this License.
133
-
134
- 3. You may copy and distribute the Program (or a work based on it,
135
- under Section 2) in object code or executable form under the terms of
136
- Sections 1 and 2 above provided that you also do one of the following:
137
-
138
- a) Accompany it with the complete corresponding machine-readable
139
- source code, which must be distributed under the terms of Sections
140
- 1 and 2 above on a medium customarily used for software interchange; or,
141
-
142
- b) Accompany it with a written offer, valid for at least three
143
- years, to give any third party, for a charge no more than your
144
- cost of physically performing source distribution, a complete
145
- machine-readable copy of the corresponding source code, to be
146
- distributed under the terms of Sections 1 and 2 above on a medium
147
- customarily used for software interchange; or,
148
-
149
- c) Accompany it with the information you received as to the offer
150
- to distribute corresponding source code. (This alternative is
151
- allowed only for noncommercial distribution and only if you
152
- received the program in object code or executable form with such
153
- an offer, in accord with Subsection b above.)
154
-
155
- The source code for a work means the preferred form of the work for
156
- making modifications to it. For an executable work, complete source
157
- code means all the source code for all modules it contains, plus any
158
- associated interface definition files, plus the scripts used to
159
- control compilation and installation of the executable. However, as a
160
- special exception, the source code distributed need not include
161
- anything that is normally distributed (in either source or binary
162
- form) with the major components (compiler, kernel, and so on) of the
163
- operating system on which the executable runs, unless that component
164
- itself accompanies the executable.
165
-
166
- If distribution of executable or object code is made by offering
167
- access to copy from a designated place, then offering equivalent
168
- access to copy the source code from the same place counts as
169
- distribution of the source code, even though third parties are not
170
- compelled to copy the source along with the object code.
171
-
172
- 4. You may not copy, modify, sublicense, or distribute the Program
173
- except as expressly provided under this License. Any attempt
174
- otherwise to copy, modify, sublicense or distribute the Program is
175
- void, and will automatically terminate your rights under this License.
176
- However, parties who have received copies, or rights, from you under
177
- this License will not have their licenses terminated so long as such
178
- parties remain in full compliance.
179
-
180
- 5. You are not required to accept this License, since you have not
181
- signed it. However, nothing else grants you permission to modify or
182
- distribute the Program or its derivative works. These actions are
183
- prohibited by law if you do not accept this License. Therefore, by
184
- modifying or distributing the Program (or any work based on the
185
- Program), you indicate your acceptance of this License to do so, and
186
- all its terms and conditions for copying, distributing or modifying
187
- the Program or works based on it.
188
-
189
- 6. Each time you redistribute the Program (or any work based on the
190
- Program), the recipient automatically receives a license from the
191
- original licensor to copy, distribute or modify the Program subject to
192
- these terms and conditions. You may not impose any further
193
- restrictions on the recipients' exercise of the rights granted herein.
194
- You are not responsible for enforcing compliance by third parties to
195
- this License.
196
-
197
- 7. If, as a consequence of a court judgment or allegation of patent
198
- infringement or for any other reason (not limited to patent issues),
199
- conditions are imposed on you (whether by court order, agreement or
200
- otherwise) that contradict the conditions of this License, they do not
201
- excuse you from the conditions of this License. If you cannot
202
- distribute so as to satisfy simultaneously your obligations under this
203
- License and any other pertinent obligations, then as a consequence you
204
- may not distribute the Program at all. For example, if a patent
205
- license would not permit royalty-free redistribution of the Program by
206
- all those who receive copies directly or indirectly through you, then
207
- the only way you could satisfy both it and this License would be to
208
- refrain entirely from distribution of the Program.
209
-
210
- If any portion of this section is held invalid or unenforceable under
211
- any particular circumstance, the balance of the section is intended to
212
- apply and the section as a whole is intended to apply in other
213
- circumstances.
214
-
215
- It is not the purpose of this section to induce you to infringe any
216
- patents or other property right claims or to contest validity of any
217
- such claims; this section has the sole purpose of protecting the
218
- integrity of the free software distribution system, which is
219
- implemented by public license practices. Many people have made
220
- generous contributions to the wide range of software distributed
221
- through that system in reliance on consistent application of that
222
- system; it is up to the author/donor to decide if he or she is willing
223
- to distribute software through any other system and a licensee cannot
224
- impose that choice.
225
-
226
- This section is intended to make thoroughly clear what is believed to
227
- be a consequence of the rest of this License.
228
-
229
- 8. If the distribution and/or use of the Program is restricted in
230
- certain countries either by patents or by copyrighted interfaces, the
231
- original copyright holder who places the Program under this License
232
- may add an explicit geographical distribution limitation excluding
233
- those countries, so that distribution is permitted only in or among
234
- countries not thus excluded. In such case, this License incorporates
235
- the limitation as if written in the body of this License.
236
-
237
- 9. The Free Software Foundation may publish revised and/or new versions
238
- of the General Public License from time to time. Such new versions will
239
- be similar in spirit to the present version, but may differ in detail to
240
- address new problems or concerns.
241
-
242
- Each version is given a distinguishing version number. If the Program
243
- specifies a version number of this License which applies to it and "any
244
- later version", you have the option of following the terms and conditions
245
- either of that version or of any later version published by the Free
246
- Software Foundation. If the Program does not specify a version number of
247
- this License, you may choose any version ever published by the Free Software
248
- Foundation.
249
-
250
- 10. If you wish to incorporate parts of the Program into other free
251
- programs whose distribution conditions are different, write to the author
252
- to ask for permission. For software which is copyrighted by the Free
253
- Software Foundation, write to the Free Software Foundation; we sometimes
254
- make exceptions for this. Our decision will be guided by the two goals
255
- of preserving the free status of all derivatives of our free software and
256
- of promoting the sharing and reuse of software generally.
257
-
258
- NO WARRANTY
259
-
260
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261
- FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262
- OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263
- PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264
- OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265
- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266
- TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267
- PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268
- REPAIR OR CORRECTION.
269
-
270
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271
- WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272
- REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273
- INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274
- OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275
- TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276
- YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277
- PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278
- POSSIBILITY OF SUCH DAMAGES.
279
-
280
  END OF TERMS AND CONDITIONS
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 2, June 1991
3
+
4
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
6
+
7
+ Everyone is permitted to copy and distribute verbatim copies
8
+ of this license document, but changing it is not allowed.
9
+
10
+ Preamble
11
+
12
+ The licenses for most software are designed to take away your
13
+ freedom to share and change it. By contrast, the GNU General Public
14
+ License is intended to guarantee your freedom to share and change free
15
+ software--to make sure the software is free for all its users. This
16
+ General Public License applies to most of the Free Software
17
+ Foundation's software and to any other program whose authors commit to
18
+ using it. (Some other Free Software Foundation software is covered by
19
+ the GNU Library General Public License instead.) You can apply it to
20
+ your programs, too.
21
+
22
+ When we speak of free software, we are referring to freedom, not
23
+ price. Our General Public Licenses are designed to make sure that you
24
+ have the freedom to distribute copies of free software (and charge for
25
+ this service if you wish), that you receive source code or can get it
26
+ if you want it, that you can change the software or use pieces of it
27
+ in new free programs; and that you know you can do these things.
28
+
29
+ To protect your rights, we need to make restrictions that forbid
30
+ anyone to deny you these rights or to ask you to surrender the rights.
31
+ These restrictions translate to certain responsibilities for you if you
32
+ distribute copies of the software, or if you modify it.
33
+
34
+ For example, if you distribute copies of such a program, whether
35
+ gratis or for a fee, you must give the recipients all the rights that
36
+ you have. You must make sure that they, too, receive or can get the
37
+ source code. And you must show them these terms so they know their
38
+ rights.
39
+
40
+ We protect your rights with two steps: (1) copyright the software, and
41
+ (2) offer you this license which gives you legal permission to copy,
42
+ distribute and/or modify the software.
43
+
44
+ Also, for each author's protection and ours, we want to make certain
45
+ that everyone understands that there is no warranty for this free
46
+ software. If the software is modified by someone else and passed on, we
47
+ want its recipients to know that what they have is not the original, so
48
+ that any problems introduced by others will not reflect on the original
49
+ authors' reputations.
50
+
51
+ Finally, any free program is threatened constantly by software
52
+ patents. We wish to avoid the danger that redistributors of a free
53
+ program will individually obtain patent licenses, in effect making the
54
+ program proprietary. To prevent this, we have made it clear that any
55
+ patent must be licensed for everyone's free use or not licensed at all.
56
+
57
+ The precise terms and conditions for copying, distribution and
58
+ modification follow.
59
+
60
+ GNU GENERAL PUBLIC LICENSE
61
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
62
+
63
+ 0. This License applies to any program or other work which contains
64
+ a notice placed by the copyright holder saying it may be distributed
65
+ under the terms of this General Public License. The "Program", below,
66
+ refers to any such program or work, and a "work based on the Program"
67
+ means either the Program or any derivative work under copyright law:
68
+ that is to say, a work containing the Program or a portion of it,
69
+ either verbatim or with modifications and/or translated into another
70
+ language. (Hereinafter, translation is included without limitation in
71
+ the term "modification".) Each licensee is addressed as "you".
72
+
73
+ Activities other than copying, distribution and modification are not
74
+ covered by this License; they are outside its scope. The act of
75
+ running the Program is not restricted, and the output from the Program
76
+ is covered only if its contents constitute a work based on the
77
+ Program (independent of having been made by running the Program).
78
+ Whether that is true depends on what the Program does.
79
+
80
+ 1. You may copy and distribute verbatim copies of the Program's
81
+ source code as you receive it, in any medium, provided that you
82
+ conspicuously and appropriately publish on each copy an appropriate
83
+ copyright notice and disclaimer of warranty; keep intact all the
84
+ notices that refer to this License and to the absence of any warranty;
85
+ and give any other recipients of the Program a copy of this License
86
+ along with the Program.
87
+
88
+ You may charge a fee for the physical act of transferring a copy, and
89
+ you may at your option offer warranty protection in exchange for a fee.
90
+
91
+ 2. You may modify your copy or copies of the Program or any portion
92
+ of it, thus forming a work based on the Program, and copy and
93
+ distribute such modifications or work under the terms of Section 1
94
+ above, provided that you also meet all of these conditions:
95
+
96
+ a) You must cause the modified files to carry prominent notices
97
+ stating that you changed the files and the date of any change.
98
+
99
+ b) You must cause any work that you distribute or publish, that in
100
+ whole or in part contains or is derived from the Program or any
101
+ part thereof, to be licensed as a whole at no charge to all third
102
+ parties under the terms of this License.
103
+
104
+ c) If the modified program normally reads commands interactively
105
+ when run, you must cause it, when started running for such
106
+ interactive use in the most ordinary way, to print or display an
107
+ announcement including an appropriate copyright notice and a
108
+ notice that there is no warranty (or else, saying that you provide
109
+ a warranty) and that users may redistribute the program under
110
+ these conditions, and telling the user how to view a copy of this
111
+ License. (Exception: if the Program itself is interactive but
112
+ does not normally print such an announcement, your work based on
113
+ the Program is not required to print an announcement.)
114
+
115
+ These requirements apply to the modified work as a whole. If
116
+ identifiable sections of that work are not derived from the Program,
117
+ and can be reasonably considered independent and separate works in
118
+ themselves, then this License, and its terms, do not apply to those
119
+ sections when you distribute them as separate works. But when you
120
+ distribute the same sections as part of a whole which is a work based
121
+ on the Program, the distribution of the whole must be on the terms of
122
+ this License, whose permissions for other licensees extend to the
123
+ entire whole, and thus to each and every part regardless of who wrote it.
124
+ Thus, it is not the intent of this section to claim rights or contest
125
+ your rights to work written entirely by you; rather, the intent is to
126
+ exercise the right to control the distribution of derivative or
127
+ collective works based on the Program.
128
+
129
+ In addition, mere aggregation of another work not based on the Program
130
+ with the Program (or with a work based on the Program) on a volume of
131
+ a storage or distribution medium does not bring the other work under
132
+ the scope of this License.
133
+
134
+ 3. You may copy and distribute the Program (or a work based on it,
135
+ under Section 2) in object code or executable form under the terms of
136
+ Sections 1 and 2 above provided that you also do one of the following:
137
+
138
+ a) Accompany it with the complete corresponding machine-readable
139
+ source code, which must be distributed under the terms of Sections
140
+ 1 and 2 above on a medium customarily used for software interchange; or,
141
+
142
+ b) Accompany it with a written offer, valid for at least three
143
+ years, to give any third party, for a charge no more than your
144
+ cost of physically performing source distribution, a complete
145
+ machine-readable copy of the corresponding source code, to be
146
+ distributed under the terms of Sections 1 and 2 above on a medium
147
+ customarily used for software interchange; or,
148
+
149
+ c) Accompany it with the information you received as to the offer
150
+ to distribute corresponding source code. (This alternative is
151
+ allowed only for noncommercial distribution and only if you
152
+ received the program in object code or executable form with such
153
+ an offer, in accord with Subsection b above.)
154
+
155
+ The source code for a work means the preferred form of the work for
156
+ making modifications to it. For an executable work, complete source
157
+ code means all the source code for all modules it contains, plus any
158
+ associated interface definition files, plus the scripts used to
159
+ control compilation and installation of the executable. However, as a
160
+ special exception, the source code distributed need not include
161
+ anything that is normally distributed (in either source or binary
162
+ form) with the major components (compiler, kernel, and so on) of the
163
+ operating system on which the executable runs, unless that component
164
+ itself accompanies the executable.
165
+
166
+ If distribution of executable or object code is made by offering
167
+ access to copy from a designated place, then offering equivalent
168
+ access to copy the source code from the same place counts as
169
+ distribution of the source code, even though third parties are not
170
+ compelled to copy the source along with the object code.
171
+
172
+ 4. You may not copy, modify, sublicense, or distribute the Program
173
+ except as expressly provided under this License. Any attempt
174
+ otherwise to copy, modify, sublicense or distribute the Program is
175
+ void, and will automatically terminate your rights under this License.
176
+ However, parties who have received copies, or rights, from you under
177
+ this License will not have their licenses terminated so long as such
178
+ parties remain in full compliance.
179
+
180
+ 5. You are not required to accept this License, since you have not
181
+ signed it. However, nothing else grants you permission to modify or
182
+ distribute the Program or its derivative works. These actions are
183
+ prohibited by law if you do not accept this License. Therefore, by
184
+ modifying or distributing the Program (or any work based on the
185
+ Program), you indicate your acceptance of this License to do so, and
186
+ all its terms and conditions for copying, distributing or modifying
187
+ the Program or works based on it.
188
+
189
+ 6. Each time you redistribute the Program (or any work based on the
190
+ Program), the recipient automatically receives a license from the
191
+ original licensor to copy, distribute or modify the Program subject to
192
+ these terms and conditions. You may not impose any further
193
+ restrictions on the recipients' exercise of the rights granted herein.
194
+ You are not responsible for enforcing compliance by third parties to
195
+ this License.
196
+
197
+ 7. If, as a consequence of a court judgment or allegation of patent
198
+ infringement or for any other reason (not limited to patent issues),
199
+ conditions are imposed on you (whether by court order, agreement or
200
+ otherwise) that contradict the conditions of this License, they do not
201
+ excuse you from the conditions of this License. If you cannot
202
+ distribute so as to satisfy simultaneously your obligations under this
203
+ License and any other pertinent obligations, then as a consequence you
204
+ may not distribute the Program at all. For example, if a patent
205
+ license would not permit royalty-free redistribution of the Program by
206
+ all those who receive copies directly or indirectly through you, then
207
+ the only way you could satisfy both it and this License would be to
208
+ refrain entirely from distribution of the Program.
209
+
210
+ If any portion of this section is held invalid or unenforceable under
211
+ any particular circumstance, the balance of the section is intended to
212
+ apply and the section as a whole is intended to apply in other
213
+ circumstances.
214
+
215
+ It is not the purpose of this section to induce you to infringe any
216
+ patents or other property right claims or to contest validity of any
217
+ such claims; this section has the sole purpose of protecting the
218
+ integrity of the free software distribution system, which is
219
+ implemented by public license practices. Many people have made
220
+ generous contributions to the wide range of software distributed
221
+ through that system in reliance on consistent application of that
222
+ system; it is up to the author/donor to decide if he or she is willing
223
+ to distribute software through any other system and a licensee cannot
224
+ impose that choice.
225
+
226
+ This section is intended to make thoroughly clear what is believed to
227
+ be a consequence of the rest of this License.
228
+
229
+ 8. If the distribution and/or use of the Program is restricted in
230
+ certain countries either by patents or by copyrighted interfaces, the
231
+ original copyright holder who places the Program under this License
232
+ may add an explicit geographical distribution limitation excluding
233
+ those countries, so that distribution is permitted only in or among
234
+ countries not thus excluded. In such case, this License incorporates
235
+ the limitation as if written in the body of this License.
236
+
237
+ 9. The Free Software Foundation may publish revised and/or new versions
238
+ of the General Public License from time to time. Such new versions will
239
+ be similar in spirit to the present version, but may differ in detail to
240
+ address new problems or concerns.
241
+
242
+ Each version is given a distinguishing version number. If the Program
243
+ specifies a version number of this License which applies to it and "any
244
+ later version", you have the option of following the terms and conditions
245
+ either of that version or of any later version published by the Free
246
+ Software Foundation. If the Program does not specify a version number of
247
+ this License, you may choose any version ever published by the Free Software
248
+ Foundation.
249
+
250
+ 10. If you wish to incorporate parts of the Program into other free
251
+ programs whose distribution conditions are different, write to the author
252
+ to ask for permission. For software which is copyrighted by the Free
253
+ Software Foundation, write to the Free Software Foundation; we sometimes
254
+ make exceptions for this. Our decision will be guided by the two goals
255
+ of preserving the free status of all derivatives of our free software and
256
+ of promoting the sharing and reuse of software generally.
257
+
258
+ NO WARRANTY
259
+
260
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261
+ FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262
+ OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263
+ PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264
+ OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266
+ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267
+ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268
+ REPAIR OR CORRECTION.
269
+
270
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272
+ REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273
+ INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274
+ OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275
+ TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276
+ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277
+ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278
+ POSSIBILITY OF SUCH DAMAGES.
279
+
280
  END OF TERMS AND CONDITIONS
Gruntfile.js CHANGED
@@ -1,72 +1,72 @@
1
- 'use strict';
2
-
3
- module.exports = function(grunt) {
4
-
5
- // Project configuration.
6
- grunt.initConfig({
7
-
8
- // Load grunt project configuration
9
- pkg: grunt.file.readJSON('package.json'),
10
-
11
- // Configure JSHint
12
- jshint: {
13
- test: {
14
- src: 'assets/js/**/*.js'
15
- }
16
- },
17
-
18
- // Watch for changes on some files and auto-compile them
19
- watch: {
20
- js: {
21
- files: ['assets/js/**/*.js'],
22
- tasks: ['jshint']
23
- },
24
- },
25
-
26
- // Create a .pot file
27
- makepot: {
28
- target: {
29
- options: {
30
- domainPath: 'languages',
31
- processPot: function( pot, options ) {
32
- pot.headers['report-msgid-bugs-to'] = 'https://themeofthecrop.com';
33
- return pot;
34
- },
35
- type: 'wp-plugin',
36
- }
37
- }
38
- },
39
-
40
- // Build a package for distribution
41
- compress: {
42
- main: {
43
- options: {
44
- archive: 'business-profile-<%= pkg.version %>.zip'
45
- },
46
- files: [
47
- {
48
- src: [
49
- '*', '**/*',
50
- '!business-profile-<%= pkg.version %>.zip',
51
- '!.*', '!Gruntfile.js', '!package.json', '!node_modules', '!node_modules/**/*',
52
- '!**/.*', '!**/Gruntfile.js', '!**/package.json', '!**/node_modules', '!**/node_modules/**/*',
53
- ],
54
- dest: 'business-profile/',
55
- }
56
- ]
57
- }
58
- }
59
-
60
- });
61
-
62
- // Load tasks
63
- grunt.loadNpmTasks('grunt-contrib-compress');
64
- grunt.loadNpmTasks('grunt-contrib-jshint');
65
- grunt.loadNpmTasks('grunt-contrib-watch');
66
- grunt.loadNpmTasks('grunt-wp-i18n');
67
-
68
- // Default task(s).
69
- grunt.registerTask('default', ['watch']);
70
- grunt.registerTask('package', ['makepot', 'compress']);
71
-
72
- };
1
+ 'use strict';
2
+
3
+ module.exports = function(grunt) {
4
+
5
+ // Project configuration.
6
+ grunt.initConfig({
7
+
8
+ // Load grunt project configuration
9
+ pkg: grunt.file.readJSON('package.json'),
10
+
11
+ // Configure JSHint
12
+ jshint: {
13
+ test: {
14
+ src: 'assets/js/**/*.js'
15
+ }
16
+ },
17
+
18
+ // Watch for changes on some files and auto-compile them
19
+ watch: {
20
+ js: {
21
+ files: ['assets/js/**/*.js'],
22
+ tasks: ['jshint']
23
+ },
24
+ },
25
+
26
+ // Create a .pot file
27
+ makepot: {
28
+ target: {
29
+ options: {
30
+ domainPath: 'languages',
31
+ processPot: function( pot, options ) {
32
+ pot.headers['report-msgid-bugs-to'] = 'https://themeofthecrop.com';
33
+ return pot;
34
+ },
35
+ type: 'wp-plugin',
36
+ }
37
+ }
38
+ },
39
+
40
+ // Build a package for distribution
41
+ compress: {
42
+ main: {
43
+ options: {
44
+ archive: 'business-profile-<%= pkg.version %>.zip'
45
+ },
46
+ files: [
47
+ {
48
+ src: [
49
+ '*', '**/*',
50
+ '!business-profile-<%= pkg.version %>.zip',
51
+ '!.*', '!Gruntfile.js', '!package.json', '!node_modules', '!node_modules/**/*',
52
+ '!**/.*', '!**/Gruntfile.js', '!**/package.json', '!**/node_modules', '!**/node_modules/**/*',
53
+ ],
54
+ dest: 'business-profile/',
55
+ }
56
+ ]
57
+ }
58
+ }
59
+
60
+ });
61
+
62
+ // Load tasks
63
+ grunt.loadNpmTasks('grunt-contrib-compress');
64
+ grunt.loadNpmTasks('grunt-contrib-jshint');
65
+ grunt.loadNpmTasks('grunt-contrib-watch');
66
+ grunt.loadNpmTasks('grunt-wp-i18n');
67
+
68
+ // Default task(s).
69
+ grunt.registerTask('default', ['watch']);
70
+ grunt.registerTask('package', ['makepot', 'compress']);
71
+
72
+ };
assets/.esformatter CHANGED
@@ -1,14 +1,14 @@
1
- {
2
- "plugins": [
3
- "esformatter-wordpress"
4
- ],
5
- "whiteSpace": {
6
- "before": {
7
- "AssignmentOperator": -1,
8
- "PropertyValue": -1
9
- },
10
- "after": {
11
- "VariableName": -1
12
- }
13
- }
14
- }
1
+ {
2
+ "plugins": [
3
+ "esformatter-wordpress"
4
+ ],
5
+ "whiteSpace": {
6
+ "before": {
7
+ "AssignmentOperator": -1,
8
+ "PropertyValue": -1
9
+ },
10
+ "after": {
11
+ "VariableName": -1
12
+ }
13
+ }
14
+ }
assets/.jscsrc CHANGED
@@ -1,165 +1,165 @@
1
- {
2
- "requireSpacesInConditionalExpression": {
3
- "afterTest": true,
4
- "beforeConsequent": true,
5
- "afterConsequent": true,
6
- "beforeAlternate": true
7
- },
8
- "requireSpacesInFunction": {
9
- "beforeOpeningCurlyBrace": true
10
- },
11
- "disallowSpacesInAnonymousFunctionExpression": {
12
- "beforeOpeningRoundBrace": true
13
- },
14
- "requireMultipleVarDecl": "onevar",
15
- "requireSpacesInsideObjectBrackets": "all",
16
- "disallowSpaceAfterObjectKeys": true,
17
- "requireSpaceAfterBinaryOperators": [
18
- "=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=",
19
- "&=", "|=", "^=", "+=",
20
-
21
- "+", "-", "*", "/", "%", "<<", ">>", ">>>", "&",
22
- "|", "^", "&&", "||", "===", "==", ">=",
23
- "<=", "<", ">", "!=", "!=="
24
- ],
25
- "requireSpaceBeforeBinaryOperators": [
26
- "=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=",
27
- "&=", "|=", "^=", "+=",
28
-
29
- "+", "-", "*", "/", "%", "<<", ">>", ">>>", "&",
30
- "|", "^", "&&", "||", "===", "==", ">=",
31
- "<=", "<", ">", "!=", "!=="
32
- ],
33
- "disallowKeywords": ["with"],
34
- "disallowMultipleLineBreaks": true,
35
- "validateLineBreaks": "LF",
36
- "disallowMixedSpacesAndTabs": "smart",
37
- "disallowTrailingWhitespace": true,
38
- "requireCurlyBraces": [
39
- "if",
40
- "else",
41
- "for",
42
- "while",
43
- "do",
44
- "try",
45
- "catch"
46
- ],
47
- "requireSpaceBeforeBlockStatements": true,
48
- "requireParenthesesAroundIIFE": true,
49
- "requireBlocksOnNewline": true,
50
- "requireOperatorBeforeLineBreak": [
51
- "?",
52
- "=",
53
- "+",
54
- "-",
55
- "/",
56
- "*",
57
- "==",
58
- "===",
59
- "!=",
60
- "!==",
61
- ">",
62
- ">=",
63
- "<",
64
- "<="
65
- ],
66
- "requireSpaceBeforeBinaryOperators": [
67
- "?",
68
- "=",
69
- "+",
70
- "-",
71
- "/",
72
- "*",
73
- "==",
74
- "===",
75
- "!=",
76
- "!==",
77
- ">",
78
- ">=",
79
- "<",
80
- "<="
81
- ],
82
- "requireSpaceAfterBinaryOperators": [
83
- "?",
84
- "=",
85
- "+",
86
- "/",
87
- "*",
88
- ":",
89
- "==",
90
- "===",
91
- "!=",
92
- "!==",
93
- ">",
94
- ">=",
95
- "<",
96
- "<="
97
- ],
98
- "disallowSpaceBeforeBinaryOperators": [","],
99
- "disallowSpaceAfterBinaryOperators": [],
100
- "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~"],
101
- "requireSpaceAfterPrefixUnaryOperators": ["!"],
102
- "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
103
- "requireCamelCaseOrUpperCaseIdentifiers": true,
104
- "disallowMultipleLineStrings": true,
105
- "validateQuoteMarks": "'",
106
- "validateIndentation": "\t",
107
- "requireLineFeedAtFileEnd": true,
108
- "requireDotNotation": true,
109
- "disallowNewlineBeforeBlockStatements": true,
110
- "requireSpaceAfterKeywords": [
111
- "do",
112
- "for",
113
- "if",
114
- "else",
115
- "switch",
116
- "case",
117
- "try",
118
- "catch",
119
- "void",
120
- "while",
121
- "with",
122
- "return",
123
- "typeof"
124
- ],
125
- "requireSpaceAfterLineComment": true,
126
- "requireSpaceBeforeKeywords": [
127
- "else",
128
- "while",
129
- "catch"
130
- ],
131
- "requireSpaceBeforeObjectValues": true,
132
- "requireSpaceBetweenArguments": true,
133
- "requireSpacesInAnonymousFunctionExpression": {
134
- "beforeOpeningCurlyBrace": true
135
- },
136
- "requireSpacesInForStatement": true,
137
- "requireSpacesInsideArrayBrackets": "all",
138
- "requireSpacesInsideParentheses": {
139
- "all": true,
140
- "except": [
141
- "{",
142
- "}",
143
- "[",
144
- "]",
145
- "function"
146
- ]
147
- },
148
- "requireYodaConditions": true,
149
- "validateParameterSeparator": ", ",
150
-
151
- "disallowTrailingComma": true,
152
- "disallowPaddingNewlinesInBlocks": true,
153
- "disallowEmptyBlocks": true,
154
- "disallowQuotedKeysInObjects": "allButReserved",
155
- "disallowDanglingUnderscores": true,
156
- "requireCommaBeforeLineBreak": true,
157
- "disallowKeywordsOnNewLine": ["else"],
158
- "requireCapitalizedConstructors": true,
159
- "safeContextKeyword": [ "that" ],
160
- "jsDoc": {
161
- "checkParamNames": true,
162
- "checkRedundantParams": true,
163
- "requireParamTypes": true
164
- }
165
- }
1
+ {
2
+ "requireSpacesInConditionalExpression": {
3
+ "afterTest": true,
4
+ "beforeConsequent": true,
5
+ "afterConsequent": true,
6
+ "beforeAlternate": true
7
+ },
8
+ "requireSpacesInFunction": {
9
+ "beforeOpeningCurlyBrace": true
10
+ },
11
+ "disallowSpacesInAnonymousFunctionExpression": {
12
+ "beforeOpeningRoundBrace": true
13
+ },
14
+ "requireMultipleVarDecl": "onevar",
15
+ "requireSpacesInsideObjectBrackets": "all",
16
+ "disallowSpaceAfterObjectKeys": true,
17
+ "requireSpaceAfterBinaryOperators": [
18
+ "=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=",
19
+ "&=", "|=", "^=", "+=",
20
+
21
+ "+", "-", "*", "/", "%", "<<", ">>", ">>>", "&",
22
+ "|", "^", "&&", "||", "===", "==", ">=",
23
+ "<=", "<", ">", "!=", "!=="
24
+ ],
25
+ "requireSpaceBeforeBinaryOperators": [
26
+ "=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=",
27
+ "&=", "|=", "^=", "+=",
28
+
29
+ "+", "-", "*", "/", "%", "<<", ">>", ">>>", "&",
30
+ "|", "^", "&&", "||", "===", "==", ">=",
31
+ "<=", "<", ">", "!=", "!=="
32
+ ],
33
+ "disallowKeywords": ["with"],
34
+ "disallowMultipleLineBreaks": true,
35
+ "validateLineBreaks": "LF",
36
+ "disallowMixedSpacesAndTabs": "smart",
37
+ "disallowTrailingWhitespace": true,
38
+ "requireCurlyBraces": [
39
+ "if",
40
+ "else",
41
+ "for",
42
+ "while",
43
+ "do",
44
+ "try",
45
+ "catch"
46
+ ],
47
+ "requireSpaceBeforeBlockStatements": true,
48
+ "requireParenthesesAroundIIFE": true,
49
+ "requireBlocksOnNewline": true,
50
+ "requireOperatorBeforeLineBreak": [
51
+ "?",
52
+ "=",
53
+ "+",
54
+ "-",
55
+ "/",
56
+ "*",
57
+ "==",
58
+ "===",
59
+ "!=",
60
+ "!==",
61
+ ">",
62
+ ">=",
63
+ "<",
64
+ "<="
65
+ ],
66
+ "requireSpaceBeforeBinaryOperators": [
67
+ "?",
68
+ "=",
69
+ "+",
70
+ "-",
71
+ "/",
72
+ "*",
73
+ "==",
74
+ "===",
75
+ "!=",
76
+ "!==",
77
+ ">",
78
+ ">=",
79
+ "<",
80
+ "<="
81
+ ],
82
+ "requireSpaceAfterBinaryOperators": [
83
+ "?",
84
+ "=",
85
+ "+",
86
+ "/",
87
+ "*",
88
+ ":",
89
+ "==",
90
+ "===",
91
+ "!=",
92
+ "!==",
93
+ ">",
94
+ ">=",
95
+ "<",
96
+ "<="
97
+ ],
98
+ "disallowSpaceBeforeBinaryOperators": [","],
99
+ "disallowSpaceAfterBinaryOperators": [],
100
+ "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~"],
101
+ "requireSpaceAfterPrefixUnaryOperators": ["!"],
102
+ "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
103
+ "requireCamelCaseOrUpperCaseIdentifiers": true,
104
+ "disallowMultipleLineStrings": true,
105
+ "validateQuoteMarks": "'",
106
+ "validateIndentation": "\t",
107
+ "requireLineFeedAtFileEnd": true,
108
+ "requireDotNotation": true,
109
+ "disallowNewlineBeforeBlockStatements": true,
110
+ "requireSpaceAfterKeywords": [
111
+ "do",
112
+ "for",
113
+ "if",
114
+ "else",
115
+ "switch",
116
+ "case",
117
+ "try",
118
+ "catch",
119
+ "void",
120
+ "while",
121
+ "with",
122
+ "return",
123
+ "typeof"
124
+ ],
125
+ "requireSpaceAfterLineComment": true,
126
+ "requireSpaceBeforeKeywords": [
127
+ "else",
128
+ "while",
129
+ "catch"
130
+ ],
131
+ "requireSpaceBeforeObjectValues": true,
132
+ "requireSpaceBetweenArguments": true,
133
+ "requireSpacesInAnonymousFunctionExpression": {
134
+ "beforeOpeningCurlyBrace": true
135
+ },
136
+ "requireSpacesInForStatement": true,
137
+ "requireSpacesInsideArrayBrackets": "all",
138
+ "requireSpacesInsideParentheses": {
139
+ "all": true,
140
+ "except": [
141
+ "{",
142
+ "}",
143
+ "[",
144
+ "]",
145
+ "function"
146
+ ]
147
+ },
148
+ "requireYodaConditions": true,
149
+ "validateParameterSeparator": ", ",
150
+
151
+ "disallowTrailingComma": true,
152
+ "disallowPaddingNewlinesInBlocks": true,
153
+ "disallowEmptyBlocks": true,
154
+ "disallowQuotedKeysInObjects": "allButReserved",
155
+ "disallowDanglingUnderscores": true,
156
+ "requireCommaBeforeLineBreak": true,
157
+ "disallowKeywordsOnNewLine": ["else"],
158
+ "requireCapitalizedConstructors": true,
159
+ "safeContextKeyword": [ "that" ],
160
+ "jsDoc": {
161
+ "checkParamNames": true,
162
+ "checkRedundantParams": true,
163
+ "requireParamTypes": true
164
+ }
165
+ }
assets/.jshintrc CHANGED
@@ -1,25 +1,25 @@
1
- {
2
- "boss": true,
3
- "curly": true,
4
- "eqeqeq": true,
5
- "eqnull": true,
6
- "es3": true,
7
- "expr": true,
8
- "immed": true,
9
- "noarg": true,
10
- "onevar": true,
11
- "quotmark": "single",
12
- "trailing": true,
13
- "undef": true,
14
- "unused": true,
15
-
16
- "browser": true,
17
-
18
- "globals": {
19
- "_": false,
20
- "Backbone": false,
21
- "jQuery": false,
22
- "JSON": false,
23
- "wp": false
24
- }
25
- }
1
+ {
2
+ "boss": true,
3
+ "curly": true,
4
+ "eqeqeq": true,
5
+ "eqnull": true,
6
+ "es3": true,
7
+ "expr": true,
8
+ "immed": true,
9
+ "noarg": true,
10
+ "onevar": true,
11
+ "quotmark": "single",
12
+ "trailing": true,
13
+ "undef": true,
14
+ "unused": true,
15
+
16
+ "browser": true,
17
+
18
+ "globals": {
19
+ "_": false,
20
+ "Backbone": false,
21
+ "jQuery": false,
22
+ "JSON": false,
23
+ "wp": false
24
+ }
25
+ }
assets/css/admin.css CHANGED
@@ -1,35 +1,1846 @@
1
- /* Admin CSS styles for Business Profile */
2
- .bpfwp-meta-input {
3
- padding-top: 1em;
4
- }
5
-
6
- .bpfwp-meta-input textarea,
7
- .bpfwp-meta-input select,
8
- .bpfwp-meta-input input[type="text"],
9
- .bpfwp-meta-input input[type="email"],
10
- .bpfwp-meta-input input[type="tel"] {
11
- width: 100%;
12
- }
13
-
14
- .bpfwp-meta-input textarea {
15
- height: 8em;
16
- }
17
-
18
- .bpfwp-meta-geo_address,
19
- .sap-coords-result {
20
- margin: 0 -1em;
21
- padding: 1em;
22
- border-bottom: 1px solid #eee;
23
- }
24
-
25
- .sap-coords-result {
26
- padding: 0.25em 1em;
27
- }
28
-
29
- .sap-coords-result .dashicons {
30
- color: #aaa;
31
- }
32
-
33
- .bpfwp-meta-opening-hours .sap-scheduler-rule {
34
- border: 1px solid #eee;
35
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Admin CSS styles for Business Profile */
2
+
3
+ .bpfwp-clear {
4
+ clear: both;
5
+ }
6
+ .bpfwp-hidden {
7
+ display: none;
8
+ }
9
+
10
+ .bpfwp-meta-input {
11
+ position: relative;
12
+ clear: both;
13
+ width: 100%;
14
+ padding-top: 1em;
15
+ }
16
+ .bpfwp-meta-input.bpfwp-meta-post_type {
17
+ float: left;
18
+ }
19
+
20
+ .bpfwp-meta-input.bpfwp-meta-post_type h4 {
21
+ clear: both;
22
+ padding-top: 16px;
23
+ }
24
+
25
+ .bpfwp-meta-input label {
26
+ position: relative;
27
+ float: left;
28
+ width: 120px;
29
+ top: 5px;
30
+ }
31
+ .bpfwp-meta-input.bpfwp-meta-post_type label {
32
+ clear: left;
33
+ }
34
+
35
+ .bpfwp-meta-input label.bold-label {
36
+ font-weight: bold;
37
+ margin: 12px 0 16px;
38
+ position: relative;
39
+ }
40
+ .bpfwp-meta-input label.default-label {
41
+ font-weight: bold;
42
+ font-size: 1.3em;
43
+ margin: 16px 0 24px;
44
+ position: relative;
45
+ width: 100%;
46
+ }
47
+
48
+ .bpfwp-meta-input textarea,
49
+ .bpfwp-meta-input select,
50
+ .bpfwp-meta-input input[type="text"],
51
+ .bpfwp-meta-input input[type="email"],
52
+ .bpfwp-meta-input input[type="tel"] {
53
+ position: relative;
54
+ float: left;
55
+ border: 2px solid#ccc;
56
+ border-radius: 5px;
57
+ box-shadow: none;
58
+ max-width: 300px;
59
+ margin-bottom: 8px;
60
+ }
61
+ .bpfwp-meta-input select.no-margin {
62
+ margin-bottom: 0;
63
+ }
64
+
65
+ .bpfwp-meta-input textarea {
66
+ height: 8em;
67
+ }
68
+
69
+ .bpfwp-meta-input input[type="checkbox"] {
70
+ margin: 12px 0 24px;
71
+ }
72
+
73
+ .bpfwp-meta-input input::-webkit-input-placeholder {
74
+ color: #aaa;
75
+ font-size: 1em;
76
+ }
77
+ .bpfwp-meta-input input:-moz-placeholder { /* Firefox 18- */
78
+ color: #aaa;
79
+ font-size: 1em;
80
+ }
81
+ .bpfwp-meta-input input::-moz-placeholder { /* Firefox 19+ */
82
+ color: #aaa;
83
+ font-size: 1em;
84
+ }
85
+ .bpfwp-meta-input input:-ms-input-placeholder {
86
+ color: #aaa;
87
+ font-size: 1em;
88
+ }
89
+
90
+ .bpfwp-meta-geo_address,
91
+ .sap-coords-result {
92
+ margin: 0 -1em;
93
+ padding: 1em;
94
+ border-bottom: 1px solid #eee;
95
+ }
96
+
97
+ .sap-coords-result {
98
+ padding: 0.25em 1em;
99
+ }
100
+
101
+ .sap-coords-result .dashicons {
102
+ color: #aaa;
103
+ }
104
+
105
+ .bpfwp-meta-opening-hours .sap-scheduler-rule {
106
+ border: 1px solid #eee;
107
+ }
108
+
109
+
110
+ /****************************
111
+ * SCHEMA DEFAULTS HELPERS
112
+ ****************************/
113
+ .bpfwp-meta-input input[type="text"].bpfwp-schema-defaults-field {
114
+ width: calc(100% - 36px);
115
+ border-right: none;
116
+ margin-right: 0;
117
+ float: left;
118
+ }
119
+ .bpfwp-schema-defaults-helper {
120
+ display: block;
121
+ position: relative;
122
+ background: #1b335f;
123
+ color: #ffffff;
124
+ width: 20px;
125
+ font-size: 14px;
126
+ padding: 8px 5px 0px 5px;
127
+ height: 24px;
128
+ border-left: none;
129
+ float: left;
130
+ text-align: center;
131
+ cursor: pointer;
132
+ left: -4px;
133
+ border-top-right-radius: 5px;
134
+ border-bottom-right-radius: 5px;
135
+ }
136
+
137
+ .bpfwp-schema-defaults-helper-box {
138
+ position: fixed;
139
+ background: #ffffff;
140
+ top: 10vh;
141
+ width: 90%;
142
+ max-width: 960px;
143
+ height: 80vh;
144
+ margin: 0 auto;
145
+ left: 0;
146
+ right: 0;
147
+ z-index: 10001;
148
+ }
149
+ .bpfwp-schema-defaults-helper-box-inside {
150
+ position: relative;
151
+ float: left;
152
+ width: calc(100% - 72px);
153
+ height: calc(100% - 24px);
154
+ padding: 0 24px;
155
+ border: 6px solid #eee;
156
+ margin: 6px;
157
+ overflow-y: scroll;
158
+ }
159
+ .bpfwp-schema-defaults-helper-box-exit {
160
+ position: absolute;
161
+ top: 0;
162
+ right: 0;
163
+ width: 24px;
164
+ height: 24px;
165
+ background: #eee;
166
+ font-size: 16px;
167
+ font-weight: bold;
168
+ text-align: center;
169
+ text-transform: uppercase;
170
+ cursor: pointer;
171
+ }
172
+
173
+ .bpfwp-schema-defaults-helper-box h4 {
174
+ margin: 1.33em 0 0.5em;
175
+ }
176
+
177
+ .bpfwp-schema-defaults-helper-background {
178
+ position: fixed;
179
+ width: 100%;
180
+ height: 100%;
181
+ background: rgba(210,210,210,0.75);
182
+ top: 0;
183
+ left: 0;
184
+ z-index: 10000;
185
+ }
186
+
187
+ .bpfwp-schema-defaults-helper-metas-container {
188
+ margin-bottom: 8px;
189
+ }
190
+
191
+ .bpfwp-schema-defaults-helper-option {
192
+ cursor: pointer;
193
+ position: relative;
194
+ float: left;
195
+ width: 100%;
196
+ }
197
+ .bpfwp-schema-defaults-helper-option:hover {
198
+ background: rgba(27,51,95,.1);
199
+ }
200
+ .bpfwp-schema-defaults-helper-option-name {
201
+ width: 180px;
202
+ float: left;
203
+ }
204
+ .bpfwp-schema-defaults-helper-option-description {
205
+ width: calc(100% - 231px);
206
+ float: left;
207
+ }
208
+ .bpfwp-schema-defaults-helper-option-name {
209
+ border-left: 1px solid #ccc;
210
+ border-right: 1px solid #ccc;
211
+ border-bottom: 1px solid #ccc;
212
+ padding: 4px 12px;
213
+ }
214
+ .bpfwp-schema-defaults-helper-option-description {
215
+ border-right: 1px solid #ccc;
216
+ border-bottom: 1px solid #ccc;
217
+ padding: 4px 12px;
218
+ }
219
+ .bpfwp-schema-defaults-helper-option:first-of-type .bpfwp-schema-defaults-helper-option-name,
220
+ .bpfwp-schema-defaults-helper-option:first-of-type .bpfwp-schema-defaults-helper-option-description {
221
+ border-top: 1px solid #ccc;
222
+ }
223
+
224
+
225
+ /*** UPGRADE BANNER ***/
226
+ .bpfwp-temp-upgrade-banner {
227
+ position: relative;
228
+ float: left;
229
+ clear: both;
230
+ margin-left: -20px;
231
+ width: calc(100% + 20px);
232
+ padding-top: 22px;
233
+ height: 42px;
234
+ text-transform: uppercase;
235
+ text-align: center;
236
+ text-decoration: none;
237
+ color: #fff;
238
+ background: #365388;
239
+ }
240
+ .bpfwp-temp-upgrade-banner:hover {
241
+ color: #eee;
242
+ }
243
+
244
+
245
+
246
+ /*
247
+ ==============================================
248
+ NEW DASHBOARD
249
+ ==============================================
250
+ */
251
+
252
+
253
+ /*** WRAP ***/
254
+
255
+ .business-profile_page_bpfwp-dashboard #wpcontent {
256
+ padding-left: 0;
257
+ }
258
+ .business-profile_page_bpfwp-dashboard .wrap {
259
+ margin: 10px 0 0;
260
+ }
261
+
262
+ .bpfwp-import-export-container {
263
+ position: relative;
264
+ float: left;
265
+ margin-left: 32px;
266
+ width: calc(100% - 32px);
267
+ }
268
+
269
+
270
+ /*** BANNER ***/
271
+
272
+ .bpfwp-dashboard-new-upgrade-banner {
273
+ position: relative;
274
+ float: left;
275
+ margin-left: -20px;
276
+ width: calc(100% + 20px);
277
+ height: 256px;
278
+ background: url(../img/bpfwp-dashboard-banner.png) center no-repeat #1b0f49;
279
+ }
280
+ .bpfwp-dashboard-new-upgrade-banner .bpfwp-dashboard-banner-icon {
281
+ position: absolute;
282
+ height: 112px;
283
+ width: 112px;
284
+ left: 172px;
285
+ top: 72px;
286
+ background: url(../img/bpfwp-icon.png) no-repeat;
287
+ background-size: 112px 112px;
288
+ }
289
+ .bpfwp-dashboard-new-upgrade-banner .bpfwp-dashboard-banner-buttons {
290
+ position: absolute;
291
+ height: 112px;
292
+ width: 192px;
293
+ right: 128px;
294
+ top: 84px;
295
+ }
296
+ .bpfwp-dashboard-new-upgrade-button {
297
+ position: relative;
298
+ float: right;
299
+ width: 188px;
300
+ border: 2px solid #7CA3BF;
301
+ background-color: #7CA3BF;
302
+ color: #fff;
303
+ padding: 6px 0;
304
+ font-size: 12px;
305
+ text-decoration: none;
306
+ text-align: center;
307
+ margin-bottom: 20px;
308
+ font-weight: bold;
309
+ border-radius: 2px;
310
+ }
311
+ .bpfwp-dashboard-new-upgrade-button:hover {
312
+ background-color: #91B5CE;
313
+ border-color: #91B5CE;
314
+ color: #fff;
315
+ }
316
+ .bpfwp-dashboard-new-upgrade-button.bpfwp-dashboard-new-trial-button {
317
+ background-color: transparent;
318
+ color: #7CA3BF;
319
+ font-size: 11px;
320
+ cursor: pointer;
321
+ width: 192px;
322
+ }
323
+ .bpfwp-dashboard-new-upgrade-button.bpfwp-dashboard-new-trial-button:hover {
324
+ background-color: #7CA3BF;
325
+ border-color: #7CA3BF;
326
+ color: #fff;
327
+ }
328
+ .bpfwp-dashboard-new-upgrade-banner .bpfwp-dashboard-banner-text {
329
+ position: absolute;
330
+ width: calc(100% - 680px);
331
+ height: 112px;
332
+ top: 76px;
333
+ left: 320px;
334
+ color: #fff;
335
+ }
336
+ .bpfwp-dashboard-banner-title {
337
+ position: relative;
338
+ float: left;
339
+ width: 100%;
340
+ font-size: 29px;
341
+ line-height: 32px;
342
+ font-weight: bold;
343
+ }
344
+ .bpfwp-dashboard-banner-brief {
345
+ position: relative;
346
+ float: left;
347
+ width: 100%;
348
+ margin-top: 14px;
349
+ font-size: 14px;
350
+ }
351
+
352
+ @media screen and (min-width: 1700px) {
353
+ .bpfwp-dashboard-new-upgrade-banner .bpfwp-dashboard-banner-icon {
354
+ left: 272px;
355
+ }
356
+ .bpfwp-dashboard-new-upgrade-banner .bpfwp-dashboard-banner-buttons {
357
+ right: 228px;
358
+ }
359
+ .bpfwp-dashboard-new-upgrade-banner .bpfwp-dashboard-banner-text {
360
+ width: calc(100% - 880px);
361
+ left: 420px;
362
+ }
363
+ }
364
+ @media screen and (max-width: 1200px) {
365
+ .bpfwp-dashboard-new-upgrade-banner .bpfwp-dashboard-banner-icon {
366
+ left: 54px;
367
+ }
368
+ .bpfwp-dashboard-new-upgrade-banner .bpfwp-dashboard-banner-buttons {
369
+ right: 32px;
370
+ }
371
+ .bpfwp-dashboard-new-upgrade-banner .bpfwp-dashboard-banner-text {
372
+ width: calc(100% - 466px);
373
+ left: 202px;
374
+ }
375
+ }
376
+ @media screen and (max-width: 800px) {
377
+ .bpfwp-dashboard-new-upgrade-banner {
378
+ height: 512px;
379
+ height: 300px;
380
+ }
381
+ .bpfwp-dashboard-new-upgrade-banner .bpfwp-dashboard-banner-icon {
382
+ left: calc(50% - 56px);
383
+ top: 48px;
384
+ display: none;
385
+ }
386
+ .bpfwp-dashboard-new-upgrade-banner .bpfwp-dashboard-banner-text {
387
+ width: 80%;
388
+ left: 10%;
389
+ top: 208px;
390
+ height: 160px;
391
+ text-align: center;
392
+ height: 140px;
393
+ top: 42px;
394
+ }
395
+ .bpfwp-dashboard-banner-brief {
396
+ display: none;
397
+ }
398
+ .bpfwp-dashboard-new-upgrade-banner .bpfwp-dashboard-banner-buttons {
399
+ right: calc(50% - 96px);
400
+ top: 368px;
401
+ top: 172px;
402
+ }
403
+ }
404
+
405
+
406
+
407
+
408
+
409
+
410
+
411
+ /*** MENU ***/
412
+
413
+ .bpfwp-admin-header-menu {
414
+ background-color: #1b335f;
415
+ margin-bottom: 16px;
416
+ position: relative;
417
+ float: left;
418
+ width: 100%;
419
+ }
420
+ .business-profile_page_bpfwp-settings .bpfwp-admin-header-menu,
421
+ .post-type-schema .bpfwp-admin-header-menu,
422
+ .post-type-location .bpfwp-admin-header-menu {
423
+ margin-left: -20px;
424
+ width: calc(100% + 20px);
425
+ }
426
+ .bpfwp-admin-header-menu .nav-tab-wrapper, .wrap .bpfwp-admin-header-menu h2.nav-tab-wrapper {
427
+ border-bottom: 0 !important;
428
+ margin: 0;
429
+ padding-top: 0;
430
+ padding-bottom: 0;
431
+ line-height: inherit;
432
+ }
433
+ .bpfwp-admin-header-menu .nav-tab {
434
+ border: none;
435
+ margin-left: 0;
436
+ padding: 12px 48px;
437
+ font-size: 12px;
438
+ text-transform: uppercase;
439
+ background: #1b335f;
440
+ color: #fff;
441
+ border-right: 1px solid #42639F;
442
+ }
443
+
444
+ .bpfwp-admin-header-menu .nav-tab:hover {
445
+ background: #365388;
446
+ }
447
+ .bpfwp-admin-header-menu .nav-tab-active {
448
+ background: #365388;
449
+ color: #fff;
450
+ }
451
+ .bpfwp-admin-header-menu .nav-tab-active:hover {
452
+ background: #365388;
453
+ color: #fff;
454
+ }
455
+ .bpfwp-admin-header-menu .nav-tab#bpfwp-dash-mobile-menu-open {
456
+ display: none;
457
+ }
458
+
459
+ @media screen and (max-width: 1440px) {
460
+ .bpfwp-admin-header-menu .nav-tab {
461
+ padding: 12px 32px;
462
+ }
463
+ }
464
+ @media screen and (max-width: 1150px) {
465
+ .bpfwp-admin-header-menu .nav-tab {
466
+ padding: 12px 18px;
467
+ }
468
+ }
469
+ @media screen and (max-width: 800px) {
470
+ .bpfwp-admin-header-menu .nav-tab {
471
+ padding: 12px 0;
472
+ margin: 0;
473
+ width: 100%;
474
+ clear: both;
475
+ text-align: center;
476
+ border-right: none;
477
+ border-bottom: 1px solid #42639F;
478
+ }
479
+ .bpfwp-admin-header-menu .nav-tab:last-of-type {
480
+ border-bottom: none;
481
+ }
482
+ .bpfwp-admin-header-menu .nav-tab {
483
+ display: none;
484
+ }
485
+ .bpfwp-admin-header-menu .nav-tab#bpfwp-dash-mobile-menu-open {
486
+ display: block;
487
+ }
488
+ #bpfwp-dash-mobile-menu-up-caret {
489
+ display: none;
490
+ }
491
+ #bpfwp-dash-mobile-menu-down-caret {
492
+ display: inline;
493
+ }
494
+ }
495
+
496
+
497
+
498
+
499
+
500
+
501
+
502
+
503
+
504
+ /*** CONTENT ***/
505
+
506
+ #bpfwp-dashboard-content-area {
507
+ position: relative;
508
+ float: left;
509
+ width: calc(100% - 162px);
510
+ margin: 32px 20px 32px 142px;
511
+ }
512
+ #bpfwp-dashboard-content-left {
513
+ position: relative;
514
+ float: left;
515
+ width: 74%;
516
+ }
517
+ #bpfwp-dashboard-content-right {
518
+ position: relative;
519
+ float: right;
520
+ width: 24%;
521
+ }
522
+
523
+ .bpfwp-dashboard-new-widget-box {
524
+ position: relative;
525
+ float: left;
526
+ background: #fff;
527
+ box-shadow: -2px 2px 6px #ccc;
528
+ margin-bottom: 16px;
529
+ }
530
+ .bpfwp-dashboard-new-widget-box.ewd-widget-box-full {
531
+ width: 100%;
532
+ }
533
+ .bpfwp-dashboard-new-widget-box.ewd-widget-box-two-thirds {
534
+ width: 66%;
535
+ }
536
+ .bpfwp-dashboard-new-widget-box.ewd-widget-box-one-third {
537
+ width: 32%;
538
+ margin-left: 2%;
539
+ }
540
+ .bpfwp-dashboard-new-widget-box-top, .bpfwp-dashboard-new-widget-box-bottom {
541
+ position: relative;
542
+ float: left;
543
+ width: calc(100% - 32px);
544
+ padding: 8px 16px;
545
+ color: #777;
546
+ }
547
+ .bpfwp-dashboard-new-widget-box-top {
548
+ padding: 12px 16px;
549
+ font-weight: bold;
550
+ color: #444;
551
+ }
552
+ .bpfwp-dashboard-new-widget-box-bottom {
553
+ border-top: 1px solid #e2e2e2;
554
+ }
555
+
556
+ .bpfwp-dashboard-key-widget {
557
+ position: relative;
558
+ float: left;
559
+ width: calc(100% - 144px);
560
+ min-height: 30px;
561
+ margin: 24px 24px 8px;
562
+ padding: 0 0 0 96px;
563
+ background-image: url(../img/dash-asset-key.png);
564
+ background-position: left top;
565
+ background-size: 64px 30px;
566
+ background-repeat: no-repeat;
567
+ }
568
+ .bpfwp-dashboard-key-widget-input {
569
+ position: relative;
570
+ float: left;
571
+ width: calc(65% - 2px);
572
+ height: 30px;
573
+ padding: 4px 8px !important;
574
+ background: none;
575
+ border: 1px solid #e2e2e2 !important;
576
+ margin: 0 !important;
577
+ }
578
+ .bpfwp-dashboard-key-widget-input::placeholder {
579
+ color: #bbb;
580
+ }
581
+ .bpfwp-dashboard-key-widget-submit {
582
+ position: relative;
583
+ float: left;
584
+ width: 35%;
585
+ height: 30px;
586
+ font-size: 14px;
587
+ background: #f2b52f;
588
+ color: #fff;
589
+ border: none;
590
+ cursor: pointer;
591
+ margin: 0 !important;
592
+ }
593
+ .bpfwp-dashboard-key-widget-submit:hover {
594
+ background: #F2BD49;
595
+ }
596
+ .bpfwp-dashboard-key-widget-text {
597
+ position: relative;
598
+ float: left;
599
+ width: 100%;
600
+ margin-top: 7px;
601
+ font-size: 11px;
602
+ color: #888;
603
+ font-style: italic;
604
+ font-weight: normal;
605
+ }
606
+ .bpfwp-dashboard-key-widget-text a {
607
+ color: #7CA3BF;
608
+ text-decoration: none;
609
+ font-weight: bold;
610
+ }
611
+ .bpfwp-dashboard-key-widget-text a:hover {
612
+ color: #91B5CE;
613
+ text-decoration: none;
614
+ }
615
+
616
+ #bpfwp-dashboard-support-widget-box .bpfwp-dashboard-new-widget-box-top {
617
+ cursor: pointer;
618
+ }
619
+ #bpfwp-dash-mobile-support-down-caret {
620
+ display: none;
621
+ float: right;
622
+ }
623
+ #bpfwp-dash-mobile-support-up-caret {
624
+ display: inline;
625
+ float: right;
626
+ }
627
+ .bpfwp-dashboard-support-widgets {
628
+ position: relative;
629
+ float: left;
630
+ width: 90%;
631
+ padding: 14px 5%;
632
+ }
633
+ .bpfwp-dashboard-support-widgets li {
634
+ position: relative;
635
+ float: left;
636
+ width: 18.25%;
637
+ margin-right: 9%;
638
+ }
639
+ .bpfwp-dashboard-support-widgets li:last-of-type {
640
+ margin-right: 0;
641
+ }
642
+ .bpfwp-dashboard-support-widgets li a {
643
+ position: relative;
644
+ float: left;
645
+ width: 100%;
646
+ text-align: center;
647
+ color: #444;
648
+ text-decoration: none;
649
+ font-weight: bold;
650
+ }
651
+ .bpfwp-dashboard-support-widgets li a:hover {
652
+ color: #1b335f;
653
+ }
654
+ .bpfwp-dashboard-support-widgets li img {
655
+ position: relative;
656
+ float: left;
657
+ width: 80%;
658
+ height: auto;
659
+ border: none;
660
+ padding: 0 10% 12px;
661
+ }
662
+ .bpfwp-dashboard-support-widgets li .bpfwp-dashboard-support-widgets-text {
663
+ position: relative;
664
+ float: left;
665
+ width: 100%;
666
+ margin-top: 2px;
667
+ }
668
+
669
+ #bpfwp-dashboard-optional-table .bpfwp-dashboard-new-widget-box-top {
670
+ cursor: pointer;
671
+ }
672
+ #bpfwp-dash-optional-table-down-caret {
673
+ display: none;
674
+ float: right;
675
+ }
676
+ #bpfwp-dash-optional-table-up-caret {
677
+ display: inline;
678
+ float: right;
679
+ }
680
+
681
+ .bpfwp-dashboard-testimonials {
682
+ position: relative;
683
+ float: left;
684
+ width: 100%;
685
+ }
686
+ .bpfwp-dashboard-testimonials li {
687
+ position: relative;
688
+ float: left;
689
+ width: 100%;
690
+ text-align: center;
691
+ }
692
+ .bpfwp-dashboard-testimonials li img {
693
+ position: relative;
694
+ float: left;
695
+ width: 140px;
696
+ height: auto;
697
+ margin-top: 8px;
698
+ margin-left: calc(50% - 70px);
699
+ }
700
+ .bpfwp-dashboard-testimonials li .bpfwp-dashboard-testimonial-title {
701
+ position: relative;
702
+ float: left;
703
+ width: 100%;
704
+ margin: 28px 0 20px;
705
+ font-size: 30px;
706
+ line-height: 30px;
707
+ font-weight: bold;
708
+ }
709
+ .bpfwp-dashboard-testimonials li .bpfwp-dashboard-testimonial-author {
710
+ position: relative;
711
+ float: left;
712
+ width: 100%;
713
+ font-size: 16px;
714
+ }
715
+ .bpfwp-dashboard-testimonials li .bpfwp-dashboard-testimonial-text {
716
+ position: relative;
717
+ float: left;
718
+ width: 80%;
719
+ margin: 24px 10% 0;
720
+ font-size: 12px;
721
+ }
722
+ .bpfwp-dashboard-testimonials li .bpfwp-dashboard-testimonial-text a {
723
+ color: #7CA3BF;
724
+ text-decoration: none;
725
+ font-weight: bold;
726
+ }
727
+ .bpfwp-dashboard-testimonials li .bpfwp-dashboard-testimonial-text a:hover {
728
+ color: #91B5CE;
729
+ }
730
+
731
+ .bpfwp-dashboard-review-ask {
732
+ position: relative;
733
+ float: left;
734
+ width: calc(100% - 32px);
735
+ padding: 16px 16px 12px;
736
+ text-align: center;
737
+ }
738
+ .bpfwp-dashboard-review-ask img {
739
+ position: relative;
740
+ float: left;
741
+ width: 110px;
742
+ height: auto;
743
+ margin-left: calc(50% - 55px);
744
+ }
745
+ .bpfwp-dashboard-review-ask-text {
746
+ position: relative;
747
+ float: left;
748
+ width: 100%;
749
+ margin: 24px 0;
750
+ }
751
+ .bpfwp-dashboard-review-ask-button {
752
+ clear: both;
753
+ position: relative;
754
+ float: left;
755
+ width: calc(100% - 2px);
756
+ border: 1px solid #888;
757
+ background-color: transparent;
758
+ color: #888;
759
+ padding: 6px 0;
760
+ font-size: 12px;
761
+ text-decoration: none;
762
+ text-align: center;
763
+ font-weight: bold;
764
+ border-radius: 2px;
765
+ }
766
+ .bpfwp-dashboard-review-ask-button:hover {
767
+ background-color: #888;
768
+ border-color: #888;
769
+ color: #fff;
770
+ }
771
+ .bpfwp-dashboard-review-ask-dismiss {
772
+ position: relative;
773
+ float: left;
774
+ background: transparent;
775
+ border: none;
776
+ margin: 16px 0 0 0;
777
+ padding: 0;
778
+ width: 100%;
779
+ text-align: center;
780
+ color: #999;
781
+ font-size: 11px;
782
+ text-transform: uppercase;
783
+ cursor: pointer;
784
+ }
785
+ .bpfwp-dashboard-review-ask-dismiss:hover {
786
+ color: #555;
787
+ }
788
+
789
+ .bpfwp-dashboard-guarantee {
790
+ position: relative;
791
+ float: left;
792
+ width: calc(100% - 208px);
793
+ min-height: 127px;
794
+ margin: 20px 24px;
795
+ padding: 0 0 0 160px;
796
+ background-image: url(../img/dash-asset-badge.png);
797
+ background-position: left top;
798
+ background-size: 128px 127px;
799
+ background-repeat: no-repeat;
800
+ color: #777;
801
+ }
802
+ .bpfwp-dashboard-guarantee-title, .bpfwp-dashboard-guarantee-text {
803
+ position: relative;
804
+ float: left;
805
+ width: 100%;
806
+ margin-top: 16px;
807
+ }
808
+ .bpfwp-dashboard-guarantee-title {
809
+ font-size: 24px;
810
+ line-height: 24px;
811
+ }
812
+ .bpfwp-dashboard-guarantee-text {
813
+ font-size: 12px;
814
+ font-weight: normal;
815
+ }
816
+
817
+ .bpfwp-dashboard-get-premium-widget-trial-time {
818
+ position: relative;
819
+ float: left;
820
+ width: 100%;
821
+ margin-top: 6px;
822
+ background: #1b335f;
823
+ }
824
+ .bpfwp-dashboard-get-premium-widget-trial-days, .bpfwp-dashboard-get-premium-widget-trial-hours {
825
+ position: relative;
826
+ float: left;
827
+ text-align: center;
828
+ color: #fff;
829
+ font-size: 43px;
830
+ line-height: 35px;
831
+ padding: 24px 0 8px;
832
+ font-weight: bold;
833
+ }
834
+ .bpfwp-dashboard-get-premium-widget-trial-days span, .bpfwp-dashboard-get-premium-widget-trial-hours span {
835
+ position: relative;
836
+ float: left;
837
+ width: 100%;
838
+ font-size: 14px;
839
+ font-weight: normal;
840
+ }
841
+ .bpfwp-dashboard-get-premium-widget-trial-days {
842
+ width: calc(50% - 7px);
843
+ border-right: 7px solid #fff;
844
+ }
845
+ .bpfwp-dashboard-get-premium-widget-trial-hours {
846
+ width: 50%;
847
+ }
848
+ .bpfwp-dashboard-get-premium-widget-trial-time-left {
849
+ position: relative;
850
+ float: left;
851
+ width: 100%;
852
+ margin: 28px 0 24px;
853
+ color: #1b335f;
854
+ font-size: 24px;
855
+ text-align: center;
856
+ font-weight: bold;
857
+ }
858
+ .bpfwp-dashboard-get-premium-widget-features-title {
859
+ position: relative;
860
+ float: left;
861
+ width: calc(100% - 16px);
862
+ padding: 8px 8px 10px;
863
+ color: #7CA3BF;
864
+ font-size: 18px;
865
+ line-height: 1.5;
866
+ font-weight: bold;
867
+ }
868
+ .bpfwp-dashboard-get-premium-widget-features {
869
+ position: relative;
870
+ float: left;
871
+ width: calc(100% - 16px);
872
+ padding: 0 8px;
873
+ -webkit-margin-after: 0;
874
+ }
875
+ .bpfwp-dashboard-get-premium-widget-features li {
876
+ clear: both;
877
+ position: relative;
878
+ float: left;
879
+ width: calc(100% - 36px);
880
+ margin-bottom: 8px;
881
+ padding-left: 36px;
882
+ background-image: url(../img/dash-asset-checkmark.png);
883
+ background-position: left top;
884
+ background-size: 20px;
885
+ background-repeat: no-repeat;
886
+ font-style: italic;
887
+ }
888
+ .bpfwp-dashboard-get-premium-widget-features li:last-of-type {
889
+ background-image: none;
890
+ }
891
+ .bpfwp-dashboard-get-premium-widget-button {
892
+ clear: both;
893
+ position: relative;
894
+ float: left;
895
+ width: calc(100% - 20px);
896
+ margin: 16px 8px 10px;
897
+ border: 2px solid #7CA3BF;
898
+ background-color: #7CA3BF;
899
+ color: #fff;
900
+ padding: 6px 0;
901
+ font-size: 12px;
902
+ text-decoration: none;
903
+ text-align: center;
904
+ font-weight: bold;
905
+ border-radius: 2px;
906
+ }
907
+ .bpfwp-dashboard-get-premium-widget-button:hover {
908
+ background-color: #91B5CE;
909
+ border-color: #91B5CE;
910
+ color: #fff;
911
+ }
912
+ .bpfwp-dashboard-get-premium-widget-button.bpfwp-dashboard-new-trial-button {
913
+ background-color: transparent;
914
+ color: #7CA3BF;
915
+ font-size: 11px;
916
+ cursor: pointer;
917
+ width: calc(100% - 16px);
918
+ margin: 0 8px 16px;
919
+ }
920
+ .bpfwp-dashboard-get-premium-widget-button.bpfwp-dashboard-new-trial-button:hover {
921
+ background-color: #7CA3BF;
922
+ border-color: #7CA3BF;
923
+ color: #fff;
924
+ }
925
+
926
+ .bpfwp-dashboard-other-plugins {
927
+ position: relative;
928
+ float: left;
929
+ width: 100%;
930
+ }
931
+ .bpfwp-dashboard-other-plugins li {
932
+ position: relative;
933
+ float: left;
934
+ width: 100%;
935
+ margin-bottom: 24px;
936
+ }
937
+ .bpfwp-dashboard-other-plugins li:last-of-type {
938
+ margin-bottom: 12px;
939
+ }
940
+ .bpfwp-dashboard-other-plugins li img {
941
+ position: relative;
942
+ float: left;
943
+ width: 64px;
944
+ height: auto;
945
+ margin-right: 16px;
946
+ border: none;
947
+ }
948
+ .bpfwp-dashboard-other-plugins li .bpfwp-dashboard-other-plugins-text {
949
+ position: relative;
950
+ float: left;
951
+ width: calc(100% - 80px);
952
+ }
953
+ .bpfwp-dashboard-other-plugins li .bpfwp-dashboard-other-plugins-title {
954
+ position: relative;
955
+ float: left;
956
+ width: 100%;
957
+ font-size: 16px;
958
+ color: #444;
959
+ font-weight: bold;
960
+ }
961
+ .bpfwp-dashboard-other-plugins li .bpfwp-dashboard-other-plugins-blurb {
962
+ position: relative;
963
+ float: left;
964
+ width: 100%;
965
+ font-size: 11px;
966
+ margin-top: 8px;
967
+ }
968
+
969
+ @media screen and (min-width: 1441px) {
970
+ #bpfwp-dashboard-content-area {
971
+ width: calc(100% - 194px);
972
+ margin: 32px 20px 32px 174px;
973
+ }
974
+ }
975
+ @media screen and (max-width: 1150px) {
976
+ #bpfwp-dashboard-content-area {
977
+ width: calc(100% - 40px);
978
+ margin: 16px 20px 32px;
979
+ }
980
+ }
981
+ @media screen and (max-width: 1000px) {
982
+ .bpfwp-dashboard-key-widget-submit {
983
+ font-size: 12px;
984
+ }
985
+ }
986
+ @media screen and (max-width: 800px) {
987
+ #bpfwp-dashboard-content-left, #bpfwp-dashboard-content-right {
988
+ float: left;
989
+ width: 100%;
990
+ }
991
+ .bpfwp-dashboard-new-widget-box.ewd-widget-box-two-thirds, .bpfwp-dashboard-new-widget-box.ewd-widget-box-one-third {
992
+ width: 100%;
993
+ margin-left: 0;
994
+ }
995
+
996
+ .bpfwp-dashboard-key-widget {
997
+ width: calc(100% - 48px);
998
+ margin: 16px 24px 8px;
999
+ padding: 54px 0 0 0;
1000
+ background-image: url(../img/dash-asset-key.png);
1001
+ background-size: 64px 30px;
1002
+ background-position: center top;
1003
+ background-repeat: no-repeat;
1004
+ }
1005
+ .bpfwp-dashboard-key-widget-input {
1006
+ width: 100%;
1007
+ }
1008
+ .bpfwp-dashboard-key-widget-submit {
1009
+ width: 100%;
1010
+ margin: 8px 0 0 0 !important;
1011
+ font-size: 14px;
1012
+ }
1013
+ .bpfwp-dashboard-key-widget-text {
1014
+ margin-top: 16px;
1015
+ text-align: center;
1016
+ }
1017
+
1018
+ .bpfwp-dashboard-support-widgets {
1019
+ width: 90%;
1020
+ padding: 0 5%;
1021
+ }
1022
+ .bpfwp-dashboard-support-widgets li {
1023
+ width: 100%;
1024
+ margin: 0 0 12px 0;
1025
+ padding-bottom: 12px;
1026
+ border-bottom: 1px solid #ddd;
1027
+ }
1028
+ .bpfwp-dashboard-support-widgets li:last-of-type {
1029
+ border-bottom: none;
1030
+ margin-bottom: 0;
1031
+ }
1032
+ .bpfwp-dashboard-support-widgets li a {
1033
+ text-align: left;
1034
+ color: #444;
1035
+ }
1036
+ .bpfwp-dashboard-support-widgets li a:hover {
1037
+ color: #1b335f;
1038
+ }
1039
+ .bpfwp-dashboard-support-widgets li img {
1040
+ width: 32px;
1041
+ height: 32px;
1042
+ padding: 0 24px 0 16px;
1043
+ }
1044
+ .bpfwp-dashboard-support-widgets li .bpfwp-dashboard-support-widgets-text {
1045
+ width: calc(100% - 72px);
1046
+ margin-top: 7px;
1047
+ text-transform: uppercase;
1048
+ font-size: 11px;
1049
+ }
1050
+ #bpfwp-dashboard-support-widget-box .bpfwp-dashboard-new-widget-box-bottom {
1051
+ border-top: none;
1052
+ }
1053
+
1054
+ #bpfwp-dashboard-get-premium-widget-box {
1055
+ display: none;
1056
+ }
1057
+ }
1058
+
1059
+ @media screen and (max-width: 568px) {
1060
+ #bpfwp-dashboard-guarantee-widget-box {
1061
+ background: #1b335f;
1062
+ }
1063
+ .bpfwp-dashboard-guarantee {
1064
+ width: calc(100% - 48px);
1065
+ padding: 0;
1066
+ height: 199px;
1067
+ background-image: url(../img/dash-asset-badge.png);
1068
+ background-size: 200px 199px;
1069
+ background-position: center top;
1070
+ background-repeat: no-repeat;
1071
+ }
1072
+ .bpfwp-dashboard-guarantee-title, .bpfwp-dashboard-guarantee-text {
1073
+ display: none;
1074
+ }
1075
+ }
1076
+
1077
+
1078
+
1079
+ /*** FOOTER ***/
1080
+
1081
+ #bpfwp-dashboard-new-footer-one {
1082
+ position: relative;
1083
+ float: left;
1084
+ width: 100%;
1085
+ background: #fff;
1086
+ color: #777;
1087
+ }
1088
+ .bpfwp-dashboard-new-footer-one-inside {
1089
+ position: relative;
1090
+ float: left;
1091
+ width: 80%;
1092
+ margin: 0 10%;
1093
+ }
1094
+ .bpfwp-dashboard-new-footer-one-left {
1095
+ position: relative;
1096
+ float: left;
1097
+ width: calc(100% - 224px);
1098
+ margin-bottom: 32px;
1099
+ }
1100
+ .bpfwp-dashboard-new-footer-one-title {
1101
+ position: relative;
1102
+ float: left;
1103
+ width: 100%;
1104
+ margin-top: 56px;
1105
+ font-size: 24px;
1106
+ font-weight: bold;
1107
+ }
1108
+ .bpfwp-dashboard-new-footer-one-benefits {
1109
+ position: relative;
1110
+ float: left;
1111
+ width: 100%;
1112
+ margin-top: 32px;
1113
+ }
1114
+ .bpfwp-dashboard-new-footer-one-benefits li {
1115
+ position: relative;
1116
+ float: left;
1117
+ width: calc(33.333333% - 36px);
1118
+ margin-bottom: 11px;
1119
+ padding-left: 36px;
1120
+ background-image: url(../img/dash-asset-checkmark.png);
1121
+ background-position: left top;
1122
+ background-size: 20px;
1123
+ background-repeat: no-repeat;
1124
+ font-style: italic;
1125
+ }
1126
+
1127
+ .bpfwp-dashboard-new-footer-one-buttons {
1128
+ position: relative;
1129
+ float: right;
1130
+ width: 192px;
1131
+ margin-top: 112px;
1132
+ }
1133
+
1134
+ #bpfwp-dashboard-new-footer-two {
1135
+ position: relative;
1136
+ float: left;
1137
+ width: 100%;
1138
+ background: #1b335f;
1139
+ color: #D3DFF5;
1140
+ }
1141
+ .bpfwp-dashboard-new-footer-two-inside {
1142
+ position: relative;
1143
+ float: left;
1144
+ width: 90%;
1145
+ margin: 48px 5%;
1146
+ }
1147
+ .bpfwp-dashboard-new-footer-two-icon {
1148
+ position: relative;
1149
+ float: left;
1150
+ width: 200px;
1151
+ height: auto;
1152
+ margin-right: 40px;
1153
+ }
1154
+ .bpfwp-dashboard-new-footer-two-blurb {
1155
+ position: relative;
1156
+ float: left;
1157
+ width: 300px;
1158
+ line-height: 1.7;
1159
+ font-size: 12px;
1160
+ }
1161
+ .bpfwp-dashboard-new-footer-two-menu {
1162
+ position: relative;
1163
+ float: right;
1164
+ width: 150px;
1165
+ -webkit-margin-after: 0;
1166
+ -webkit-margin-before: 0;
1167
+ }
1168
+ .bpfwp-dashboard-new-footer-two-menu li {
1169
+ clear: both;
1170
+ position: relative;
1171
+ float: right;
1172
+ width: 100%;
1173
+ font-weight: bold;
1174
+ margin-bottom: 4px;
1175
+ color: #fff;
1176
+ font-size: 13px;
1177
+ }
1178
+ .bpfwp-dashboard-new-footer-two-menu li:first-of-type {
1179
+ margin-bottom: 9px;
1180
+ }
1181
+ .bpfwp-dashboard-new-footer-two-menu li:last-of-type {
1182
+ margin-bottom: 0;
1183
+ }
1184
+ .bpfwp-dashboard-new-footer-two-menu li a {
1185
+ font-weight: normal;
1186
+ color: #D3DFF5;
1187
+ text-decoration: none;
1188
+ font-size: 12px;
1189
+ }
1190
+ .bpfwp-dashboard-new-footer-two-menu li a:hover {
1191
+ color: #fff;
1192
+ }
1193
+
1194
+ @media screen and (max-width: 1100px) {
1195
+ .bpfwp-dashboard-new-footer-one-left {
1196
+ width: 100%;
1197
+ margin-bottom: 0;
1198
+ }
1199
+ .bpfwp-dashboard-new-footer-one-title {
1200
+ margin-top: 56px;
1201
+ font-size: 24px;
1202
+ line-height: 28px;
1203
+ text-align: center;
1204
+ }
1205
+ .bpfwp-dashboard-new-footer-one-benefits li {
1206
+ width: calc(50% - 36px);
1207
+ }
1208
+ .bpfwp-dashboard-new-footer-one-buttons {
1209
+ float: left;
1210
+ width: 100%;
1211
+ margin-top: 32px;
1212
+ margin-bottom: 24px;
1213
+ }
1214
+ .bpfwp-dashboard-new-footer-one-buttons .bpfwp-dashboard-new-upgrade-button {
1215
+ float: left;
1216
+ margin-left: calc(50% - 96px);
1217
+ }
1218
+
1219
+ .bpfwp-dashboard-new-footer-two-icon {
1220
+ clear: both;
1221
+ float: left;
1222
+ margin: 0 0 16px calc(50% - 55px);
1223
+ }
1224
+ .bpfwp-dashboard-new-footer-two-blurb {
1225
+ display: none;
1226
+ }
1227
+ .bpfwp-dashboard-new-footer-two-menu {
1228
+ float: left;
1229
+ width: 100%;
1230
+ margin-top: 32px;
1231
+ }
1232
+ .bpfwp-dashboard-new-footer-two-menu li {
1233
+ float: left;
1234
+ text-align: center;
1235
+ margin-bottom: 4px;
1236
+ font-size: 17px;
1237
+ }
1238
+ .bpfwp-dashboard-new-footer-two-menu li:first-of-type {
1239
+ margin-bottom: 9px;
1240
+ }
1241
+ .bpfwp-dashboard-new-footer-two-menu li:last-of-type {
1242
+ margin-bottom: 0;
1243
+ }
1244
+ .bpfwp-dashboard-new-footer-two-menu li a {
1245
+ font-size: 16px;
1246
+ }
1247
+ }
1248
+ @media screen and (max-width: 568px) {
1249
+ .bpfwp-dashboard-new-footer-one-benefits li {
1250
+ clear: both;
1251
+ width: calc(100% - 36px);
1252
+ }
1253
+ }
1254
+
1255
+
1256
+
1257
+
1258
+
1259
+
1260
+
1261
+
1262
+ /************************/
1263
+ /***** OPTIONS PAGE *****/
1264
+ /************************/
1265
+
1266
+ /* Side Menu */
1267
+ .business-profile_page_bpfwp-settings .wrap h2.nav-tab-wrapper {
1268
+ position: relative;
1269
+ float: left;
1270
+ border: none;
1271
+ width: 180px;
1272
+ box-shadow: -1px 1px 8px #ccc;
1273
+ overflow: hidden;
1274
+ padding-top: 0;
1275
+ margin-top: 20px;
1276
+ }
1277
+ .business-profile_page_bpfwp-settings .wrap h2.nav-tab-wrapper a {
1278
+ clear: both;
1279
+ display: block;
1280
+ position: relative;
1281
+ float: left;
1282
+ background-color: #e2e2e2;
1283
+ border: none;
1284
+ border-bottom: 1px solid #f1f1f1;
1285
+ color: #555;
1286
+ font-weight: bold;
1287
+ padding-left: 20px;
1288
+ width: calc(100% - 20px);
1289
+ text-align: left;
1290
+ margin: 0;
1291
+ height: 34px;
1292
+ line-height: 34px;
1293
+ font-size: 13px;
1294
+ }
1295
+ .business-profile_page_bpfwp-settings .wrap h2.nav-tab-wrapper a:last-of-type {
1296
+ border-bottom: none;
1297
+ }
1298
+ .business-profile_page_bpfwp-settings .wrap h2.nav-tab-wrapper a.nav-tab-active {
1299
+ box-shadow: none;
1300
+ background-color: #fff !important;
1301
+ color: #1b335f;
1302
+ border-left: 4px solid #1b335f;
1303
+ }
1304
+ .business-profile_page_bpfwp-settings .wrap h2.nav-tab-wrapper a:hover {
1305
+ color: #29324e;
1306
+ background-color: rgba(199,199,199, 0.5);
1307
+ box-shadow: none;
1308
+ border-left: 4px solid #29324e;
1309
+ }
1310
+ .business-profile_page_bpfwp-settings .wrap h2.nav-tab-wrapper a.nav-tab-active:hover {
1311
+ color: #1b335f;
1312
+ background-color: #fff;
1313
+ border-left: 4px solid #1b335f;
1314
+ }
1315
+
1316
+ /* Right side */
1317
+ .business-profile_page_bpfwp-settings .wrap form {
1318
+ display: block;
1319
+ position: relative;
1320
+ float: left;
1321
+ width: calc(100% - 276px);
1322
+ padding: 32px 48px;
1323
+ z-index: 999;
1324
+ background:#fff;
1325
+ margin: 20px 0 0 !important;
1326
+ min-height: 400px;
1327
+ border: none;
1328
+ }
1329
+
1330
+ .business-profile_page_bpfwp-settings .wrap form h2:first-of-type {
1331
+ font-size: 18px;
1332
+ color: #1b335f;
1333
+ margin: 0 0 32px !important;
1334
+ }
1335
+
1336
+ .business-profile_page_bpfwp-settings .wrap form h2:nth-of-type(1n+2) {
1337
+ position: relative;
1338
+ float: left;
1339
+ background: #1b335f;
1340
+ margin: 8px 0 0;
1341
+ font-size: 15px;
1342
+ font-weight: bold;
1343
+ color: #fff;
1344
+ padding: 12px 2%;
1345
+ width: 96%;
1346
+ text-transform: uppercase;
1347
+ z-index: 2;
1348
+ }
1349
+ .business-profile_page_bpfwp-settings .wrap form .form-table {
1350
+ width: 90%;
1351
+ margin: 0 auto 16px;
1352
+ box-shadow: 0 1px 12px #ddd;
1353
+ display: block;
1354
+ padding: 11px 5%;
1355
+ }
1356
+
1357
+ .business-profile_page_bpfwp-settings .wrap form p.description {
1358
+ display: none;
1359
+ }
1360
+ .business-profile_page_bpfwp-settings .wrap form .form-table p.description {
1361
+ display: block;
1362
+ }
1363
+ .business-profile_page_bpfwp-settings .wrap form .form-table p.description.disabled {
1364
+ color: #b5b5b5;
1365
+ }
1366
+
1367
+
1368
+ .bpfwp-premium-options-table-overlay + table th,
1369
+ .bpfwp-premium-options-table-overlay + table td {
1370
+ color: #b5b5b5;
1371
+ }
1372
+
1373
+
1374
+
1375
+
1376
+
1377
+ /************************
1378
+ TOGGLE SWITCHES
1379
+ ************************/
1380
+ .bpfwp-admin-hide-radios {
1381
+ display: none;
1382
+ }
1383
+
1384
+ /* The switch - the box around the slider */
1385
+ .bpfwp-admin-switch {
1386
+ position: relative;
1387
+ display: inline-block;
1388
+ width: 40px;
1389
+ height: 22px;
1390
+ }
1391
+
1392
+ /* Hide default HTML checkbox */
1393
+ .bpfwp-admin-switch input {display:none;}
1394
+
1395
+ /* The slider */
1396
+ .bpfwp-admin-switch-slider {
1397
+ position: absolute;
1398
+ cursor: pointer;
1399
+ top: 0;
1400
+ left: 0;
1401
+ right: 0;
1402
+ bottom: 0;
1403
+ background-color: #ccc;
1404
+ -webkit-transition: .4s;
1405
+ transition: .4s;
1406
+ }
1407
+
1408
+ .bpfwp-admin-switch-slider:before {
1409
+ position: absolute;
1410
+ content: "";
1411
+ height: 14px;
1412
+ width: 14px;
1413
+ left: 4px;
1414
+ bottom: 4px;
1415
+ background-color: white;
1416
+ -webkit-transition: .4s;
1417
+ transition: .4s;
1418
+ }
1419
+
1420
+ input:checked + .bpfwp-admin-switch-slider {
1421
+ background-color: #1b335f;
1422
+ }
1423
+
1424
+ input:focus + .bpfwp-admin-switch-slider {
1425
+ box-shadow: 0 0 1px #1b335f;
1426
+ }
1427
+
1428
+ input:checked + .bpfwp-admin-switch-slider:before {
1429
+ -webkit-transform: translateX(18px);
1430
+ -ms-transform: translateX(18px);
1431
+ transform: translateX(18px);
1432
+ }
1433
+
1434
+ /* Rounded sliders */
1435
+ .bpfwp-admin-switch-slider.round {
1436
+ border-radius: 34px;
1437
+ }
1438
+
1439
+ .bpfwp-admin-switch-slider.round:before {
1440
+ border-radius: 50%;
1441
+ }
1442
+
1443
+
1444
+ /* RADIO BUTTON AND CHECKBOX */
1445
+ .business-profile_page_bpfwp-settings .wrap form .form-table fieldset label {
1446
+ line-height: 1.4em;
1447
+ margin: .25em 0 .5em;
1448
+ display: inline-block;
1449
+ font-size: 14px;
1450
+ }
1451
+
1452
+ .bpfwp-admin-input-container input, .bpfwp-admin-input-container input:disabled {
1453
+ position: absolute;
1454
+ opacity: 0;
1455
+ }
1456
+ .bpfwp-admin-radio-button {
1457
+ position: relative;
1458
+ float: left;
1459
+ height: 14px;
1460
+ width: 14px;
1461
+ top: 1px;
1462
+ margin-right: 12px;
1463
+ background-color: #fff;
1464
+ border: 2px solid #aaa;
1465
+ border-radius: 50%;
1466
+ }
1467
+ .bpfwp-admin-input-container:hover input ~ .bpfwp-admin-radio-button {
1468
+ background-color: #E6FFFB;
1469
+ border-color: #1b335f;
1470
+ }
1471
+ .bpfwp-admin-input-container input:checked ~ .bpfwp-admin-radio-button {
1472
+ border-color: #1b335f;
1473
+ background-color: #fff;
1474
+ }
1475
+ .bpfwp-admin-radio-button:after {
1476
+ content: "";
1477
+ position: absolute;
1478
+ display: none;
1479
+ }
1480
+ .bpfwp-admin-input-container input:checked ~ .bpfwp-admin-radio-button:after {
1481
+ display: block;
1482
+ }
1483
+ .bpfwp-admin-input-container .bpfwp-admin-radio-button:after {
1484
+ top: 3px;
1485
+ left: 3px;
1486
+ width: 8px;
1487
+ height: 8px;
1488
+ border-radius: 50%;
1489
+ background: #1b335f;
1490
+ }
1491
+
1492
+ .bpfwp-admin-checkbox {
1493
+ position: relative;
1494
+ float: left;
1495
+ height: 14px;
1496
+ width: 14px;
1497
+ top: 1px;
1498
+ margin-right: 12px;
1499
+ background-color: #fff;
1500
+ border: 2px solid #aaa;
1501
+ }
1502
+ .bpfwp-admin-input-container:hover input ~ .bpfwp-admin-checkbox {
1503
+ background-color: #E6FFFB;
1504
+ border-color: #1b335f;
1505
+ }
1506
+ .bpfwp-admin-input-container input:checked ~ .bpfwp-admin-checkbox {
1507
+ border-color: #1b335f;
1508
+ background-color: #fff;
1509
+ }
1510
+ .bpfwp-admin-checkbox:after {
1511
+ content: "";
1512
+ position: absolute;
1513
+ display: none;
1514
+ }
1515
+ .bpfwp-admin-input-container input:checked ~ .bpfwp-admin-checkbox:after {
1516
+ display: block;
1517
+ }
1518
+ .bpfwp-admin-input-container .bpfwp-admin-checkbox:after {
1519
+ left: 4px;
1520
+ top: 1px;
1521
+ width: 4px;
1522
+ height: 8px;
1523
+ border: solid #1b335f;
1524
+ border-width: 0 2px 2px 0;
1525
+ -webkit-transform: rotate(45deg);
1526
+ -ms-transform: rotate(45deg);
1527
+ transform: rotate(45deg);
1528
+ }
1529
+
1530
+ /* Textbox and Text Area and Select boxes */
1531
+ .business-profile_page_bpfwp-settings .wrap form .form-table input[type=text],
1532
+ .business-profile_page_bpfwp-settings .wrap form .form-table input[type=search],
1533
+ .business-profile_page_bpfwp-settings .wrap form .form-table input[type=tel],
1534
+ .business-profile_page_bpfwp-settings .wrap form .form-table input[type=url],
1535
+ .business-profile_page_bpfwp-settings .wrap form .form-table input[type=week],
1536
+ .business-profile_page_bpfwp-settings .wrap form .form-table input[type=password],
1537
+ .business-profile_page_bpfwp-settings .wrap form .form-table input[type=color],
1538
+ .business-profile_page_bpfwp-settings .wrap form .form-table input[type=email],
1539
+ .business-profile_page_bpfwp-settings .wrap form .form-table input[type=number],
1540
+ .business-profile_page_bpfwp-settings .wrap form .form-table textarea,
1541
+ .business-profile_page_bpfwp-settings .wrap form .form-table select {
1542
+ border: 2px solid #ccc;
1543
+ border-radius: 5px;
1544
+ box-shadow: none;
1545
+ }
1546
+ .business-profile_page_bpfwp-settings .wrap form .form-table select,
1547
+ .business-profile_page_bpfwp-settings .wrap form .form-table textarea {
1548
+ width: auto !important;
1549
+ min-width: 50%;
1550
+ max-width: 100% !important;
1551
+ }
1552
+ #bpfwp-dining-block-length_count,
1553
+ #bpfwp-dining-block-length_unit {
1554
+ min-width: 0;
1555
+ }
1556
+
1557
+ .business-profile_page_bpfwp-settings .wrap form .form-table textarea {
1558
+ min-width: 300px;
1559
+ min-height: 200px;
1560
+ }
1561
+ .business-profile_page_bpfwp-settings .wrap form .form-table .wp-editor-wrap textarea {
1562
+ border: none;
1563
+ border-radius: 0;
1564
+ min-width: 0;
1565
+ max-width: 100%;
1566
+ min-height: 0;
1567
+ }
1568
+
1569
+
1570
+ /**************************
1571
+ OTHER OPTION PAGE STYLING
1572
+ **************************/
1573
+
1574
+ /*LOCK PREMIUM CONTENT*/
1575
+ .bpfwp-premium-options-table {
1576
+ position: relative;
1577
+ min-height: 240px;
1578
+ }
1579
+ .bpfwp-premium-options-table.Yes {
1580
+ min-height: 0;
1581
+ }
1582
+ .bpfwp-premium-options-table-overlay {
1583
+ position: absolute;
1584
+ top: 0;
1585
+ left: 0;
1586
+ width: 1000px;
1587
+ height: 500px;
1588
+ background: rgba(0,0,0,.45);
1589
+ z-index: 2;
1590
+ }
1591
+ .section-disabled {
1592
+ position: absolute;
1593
+ margin-top: 16px;
1594
+ width: 200px;
1595
+ height: 200px;
1596
+ padding: 16px;
1597
+ background: #fff;
1598
+ left: calc(50% - 116px);
1599
+ }
1600
+ .section-disabled img {
1601
+ position: relative;
1602
+ float: left;
1603
+ width: 40px;
1604
+ height: auto;
1605
+ margin: 16px 80px 24px;
1606
+ }
1607
+ .section-disabled p {
1608
+ margin: 16px 0;
1609
+ text-align: center;
1610
+ color: #888;
1611
+ }
1612
+ .section-disabled .bpfwp-dashboard-get-premium-widget-button {
1613
+ clear: both;
1614
+ position: relative;
1615
+ float: left;
1616
+ width: calc(100% - 20px);
1617
+ margin: 16px 8px;
1618
+ border: 2px solid #7CA3BF;
1619
+ background-color: #7CA3BF;
1620
+ color: #fff;
1621
+ padding: 6px 0;
1622
+ font-size: 12px;
1623
+ text-decoration: none;
1624
+ text-align: center;
1625
+ font-weight: bold;
1626
+ border-radius: 2px;
1627
+ }
1628
+ .section-disabled .bpfwp-dashboard-get-premium-widget-button:hover {
1629
+ background-color: #91B5CE;
1630
+ border-color: #91B5CE;
1631
+ color: #fff;
1632
+ }
1633
+
1634
+
1635
+ /*************
1636
+ RESPONSIVE
1637
+ *************/
1638
+ @media screen and (max-width: 1099px) {
1639
+ .business-profile_page_bpfwp-settings .wrap h2.nav-tab-wrapper {
1640
+ clear: both;
1641
+ width: 100%;
1642
+ }
1643
+ .business-profile_page_bpfwp-settings .wrap form {
1644
+ clear: both;
1645
+ width: calc(100% - 96px);
1646
+ }
1647
+ }
1648
+ @media screen and (max-width: 782px) {
1649
+ .business-profile_page_bpfwp-settings .wrap h2.nav-tab-wrapper {
1650
+ margin: 0 0 20px 0;
1651
+ }
1652
+ .business-profile_page_bpfwp-settings .wrap form {
1653
+ width: calc(100% - 96px);
1654
+ }
1655
+ .bpfwp-admin-section-heading {
1656
+ text-align: center;
1657
+ }
1658
+ .business-profile_page_bpfwp-settings .wrap form .form-table,
1659
+ .ufaq-styling-set .form-table {
1660
+ box-shadow: none;
1661
+ }
1662
+ .business-profile_page_bpfwp-settings .wrap form .form-table,
1663
+ .ufaq-styling-set .form-table,
1664
+ .business-profile_page_bpfwp-settings .wrap form .form-table tbody,
1665
+ .business-profile_page_bpfwp-settings .wrap form .form-table tr,
1666
+ .business-profile_page_bpfwp-settings .wrap form .form-table th,
1667
+ .business-profile_page_bpfwp-settings .wrap form .form-table td {
1668
+ clear: both;
1669
+ float: left;
1670
+ width: 100%;
1671
+ }
1672
+ .business-profile_page_bpfwp-settings .wrap form .form-table {
1673
+ padding: 11px 0;
1674
+ }
1675
+ .business-profile_page_bpfwp-settings .wrap form .form-table th {
1676
+ padding: 20px 5% 8px;
1677
+ width: 90%;
1678
+ height: auto;
1679
+ margin: 0;
1680
+ background-image: url(../images/options-asset-info.png);
1681
+ background-position: 95% 20px;
1682
+ background-size: 18px 18px;
1683
+ background-repeat: no-repeat;
1684
+ cursor: pointer;
1685
+ }
1686
+ .business-profile_page_bpfwp-settings .wrap form .form-table td {
1687
+ padding-top: 4px;
1688
+ }
1689
+ .business-profile_page_bpfwp-settings .wrap form .form-table td fieldset {
1690
+ position: relative;
1691
+ }
1692
+ .business-profile_page_bpfwp-settings .wrap form .form-table td label {
1693
+ position: relative;
1694
+ clear: both;
1695
+ float: left;
1696
+ width: 90%;
1697
+ margin-left: 5% !important;
1698
+ }
1699
+ .business-profile_page_bpfwp-settings .wrap form .form-table td label.bpfwp-admin-switch {
1700
+ position: absolute;
1701
+ width: 40px;
1702
+ top: -35px;
1703
+ right: 5%;
1704
+ }
1705
+ .business-profile_page_bpfwp-settings .wrap form .form-table td p {
1706
+ display: none;
1707
+ position: relative;
1708
+ float: left;
1709
+ width: 90%;
1710
+ padding: 10px 5% 24px;
1711
+ background: #f3f3f3;
1712
+ border-bottom: 1px solid #ccc;
1713
+ font-size: 13px;
1714
+ }
1715
+ .business-profile_page_bpfwp-settings .wrap form .form-table td input[type="button"] {
1716
+ display: block;
1717
+ margin: 10px auto 4px;
1718
+ }
1719
+ .bpfwp-admin-styling-section .ewd-admin-labelling-section label {
1720
+ width: 95%;
1721
+ margin: 0 2.5% 8px;
1722
+ }
1723
+ .bpfwp-admin-input-container {
1724
+ width: calc(100% - 16px);
1725
+ padding-left: 16px;
1726
+ }
1727
+
1728
+ .bpfwp-admin-styling-section {
1729
+ box-shadow: none;
1730
+ }
1731
+ .bpfwp-admin-styling-subsection, .bpfwp-admin-styling-subsection:first-of-type {
1732
+ width: 100%;
1733
+ padding-right: 0;
1734
+ padding-left: 0;
1735
+ }
1736
+ .bpfwp-admin-styling-subsection-label {
1737
+ width: 90%;
1738
+ padding: 0 5% 8px;
1739
+ }
1740
+ .ewdOptionHasInfo .bpfwp-admin-styling-subsection-label {
1741
+ padding: 0 calc(5% + 38px) 8px 5%;
1742
+ width: calc(90% - 38px);
1743
+ background-image: url(../images/options-asset-info.png);
1744
+ background-position: 95% 0;
1745
+ background-size: 18px 18px;
1746
+ background-repeat: no-repeat;
1747
+ }
1748
+ .bpfwp-admin-styling-subsection:first-of-type .bpfwp-admin-styling-subsection-label {
1749
+ padding: 20px 5% 8px;
1750
+ }
1751
+ .ewdOptionHasInfo:first-of-type .bpfwp-admin-styling-subsection-label {
1752
+ padding: 20px calc(5% + 38px) 8px 5%;
1753
+ background-image: url(../images/options-asset-info.png);
1754
+ background-position: 950% 20px;
1755
+ background-size: 18px 18px;
1756
+ background-repeat: no-repeat;
1757
+ }
1758
+ .bpfwp-admin-styling-subsection-content {
1759
+ width: 100%;
1760
+ padding: 0 ;
1761
+ }
1762
+ .bpfwp-admin-styling-subsection-content-each {
1763
+ margin-bottom: 10px;
1764
+ padding-bottom: 10px;
1765
+ border-bottom: 1px solid #ddd;
1766
+ }
1767
+ .bpfwp-admin-styling-subsection-content-each:last-of-type {
1768
+ border-bottom: none;
1769
+ }
1770
+ .bpfwp-admin-styling-subsection-content-label, .bpfwp-admin-styling-subsection-content-right {
1771
+ width: calc(90% - 16px);
1772
+ padding: 0 0 0 calc(5% + 16px);
1773
+ }
1774
+ .bpfwp-admin-styling-subsection-content-label {
1775
+ padding-top: 10px;
1776
+ padding-bottom: 15px;
1777
+ }
1778
+ .bpfwp-admin-styling-subsection-content label {
1779
+ width: 90%;
1780
+ margin-left: 5% !important;
1781
+ }
1782
+ .bpfwp-admin-styling-subsection p {
1783
+ display: none;
1784
+ position: relative;
1785
+ float: left;
1786
+ width: 90%;
1787
+ padding: 10px 5% 24px;
1788
+ background: #f3f3f3;
1789
+ border-bottom: 1px solid #ccc;
1790
+ font-size: 13px;
1791
+ }
1792
+ .bpfwp-admin-styling-section .ewd-admin-labelling-section label p {
1793
+ display: block;
1794
+ padding: 10px 0 0;
1795
+ background: transparent;
1796
+ border-bottom: none;
1797
+ }
1798
+ .bpfwp-admin-styling-text-input {
1799
+ width: 100%;
1800
+ }
1801
+ .bpfwp-admin-styling-subsection input[type="button"] {
1802
+ display: block;
1803
+ margin: 10px auto 0;
1804
+ }
1805
+
1806
+ }
1807
+
1808
+
1809
+
1810
+ /******************************************************************
1811
+ NEW STYLING FOR ADD/DELETE AREAS LIKE CUSTOM FIELDS
1812
+ ******************************************************************/
1813
+ .sap-infinite-table table th {
1814
+ padding: 0 10px !important;
1815
+ }
1816
+ .bpfwp-new-admin-add-button {
1817
+ position: relative;
1818
+ float: left;
1819
+ width: calc(100% - 4px);
1820
+ border: 2px dotted #bbb;
1821
+ text-align: center;
1822
+ padding: 12px 0;
1823
+ color: #999;
1824
+ }
1825
+ .bpfwp-new-admin-add-button:hover {
1826
+ background: #f5f5f5;
1827
+ color: #888;
1828
+ }
1829
+ .sap-infinite-table-row-delete,
1830
+ .bpfwp-custom-fields-add-nutrional-information {
1831
+ cursor: pointer;
1832
+ color: #1b335f;
1833
+ }
1834
+ .sap-infinite-table-row-delete:hover,
1835
+ .bpfwp-custom-fields-add-nutrional-information:hover {
1836
+ color: #4366A6;
1837
+ }
1838
+
1839
+
1840
+
1841
+ /*********************************/
1842
+ /*** TEMPORARY ***/
1843
+ /*********************************/
1844
+ ul.bpfwp-dashboard-new-footer-two-menu:first-of-type {
1845
+ display: none;
1846
+ }
assets/css/contact-card.css CHANGED
@@ -1,110 +1,110 @@
1
- /* Frontend CSS Stylesheet for Business Profile contact cards */
2
-
3
- .bp-contact-card {
4
- font-style: normal;
5
- }
6
- .bp-contact-card>div {
7
- margin: 1em 0;
8
- }
9
- .bp-name {
10
- font-weight: bold;
11
- }
12
- .bp-opening-hours {
13
- max-width: 25em;
14
- }
15
- .bp-opening-hours .bp-title {
16
- text-align: center;
17
- display: block;
18
- }
19
- .bp-weekday:before,
20
- .bp-weekday:after {
21
- content: " ";
22
- display: table;
23
- }
24
- .bp-weekday:after {
25
- clear: both;
26
- }
27
- .bp-weekday-name {
28
- float: left;
29
- clear: left;
30
- width: 45%;
31
- }
32
- .bp-times {
33
- float: right;
34
- clear: right;
35
- width: 45%;
36
- text-align: right;
37
- }
38
- .bp-times .bp-time {
39
- display: block;
40
- }
41
- .bp-map {
42
- height: 20em;
43
- color: #333;
44
- font-weight: 400;
45
- }
46
- .bp-map a {
47
- color: #3a84df;
48
- }
49
- .bp-map a:hover {
50
- text-decoration: underline;
51
- }
52
-
53
- .bp-map p {
54
- margin: 4px;
55
- line-height: 16px;
56
- font-weight: 400;
57
- }
58
-
59
- .bp-map img {
60
- max-width: none; /* Fixes Google Maps info window close button */
61
- }
62
-
63
- .bp-map-info-window {
64
- width: 200px;
65
- max-width: 100%;
66
- }
67
-
68
- .bp-directions:before,
69
- .bp-phone:before,
70
- .bp-contact:before,
71
- .bp-booking:before,
72
- .bp-opening-hours-brief:before,
73
- .bp-opening-hours .bp-title:before {
74
- display: inline-block;
75
- width: 1.5em;
76
- height: 1em;
77
- font-size: 1.5em;
78
- line-height: 1;
79
- font-family: dashicons;
80
- text-decoration: inherit;
81
- font-weight: 400;
82
- font-style: normal;
83
- vertical-align: top;
84
- text-align: center;
85
- -webkit-transition: color .1s ease-in 0;
86
- transition: color .1s ease-in 0;
87
- -webkit-font-smoothing: antialiased;
88
- -moz-osx-font-smoothing: grayscale;
89
- }
90
-
91
- .bp-directions:before {
92
- content: "\f230";
93
- }
94
-
95
- .bp-phone:before {
96
- content: "\f470";
97
- }
98
-
99
- .bp-contact:before {
100
- content: "\f466";
101
- }
102
-
103
- .bp-booking:before {
104
- content: "\f145";
105
- }
106
-
107
- .bp-opening-hours-brief:before,
108
- .bp-opening-hours .bp-title:before {
109
- content: "\f469";
110
- }
1
+ /* Frontend CSS Stylesheet for Business Profile contact cards */
2
+
3
+ .bp-contact-card {
4
+ font-style: normal;
5
+ }
6
+ .bp-contact-card>div {
7
+ margin: 1em 0;
8
+ }
9
+ .bp-name {
10
+ font-weight: bold;
11
+ }
12
+ .bp-opening-hours {
13
+ max-width: 25em;
14
+ }
15
+ .bp-opening-hours .bp-title {
16
+ text-align: center;
17
+ display: block;
18
+ }
19
+ .bp-weekday:before,
20
+ .bp-weekday:after {
21
+ content: " ";
22
+ display: table;
23
+ }
24
+ .bp-weekday:after {
25
+ clear: both;
26
+ }
27
+ .bp-weekday-name {
28
+ float: left;
29
+ clear: left;
30
+ width: 45%;
31
+ }
32
+ .bp-times {
33
+ float: right;
34
+ clear: right;
35
+ width: 45%;
36
+ text-align: right;
37
+ }
38
+ .bp-times .bp-time {
39
+ display: block;
40
+ }
41
+ .bp-map {
42
+ height: 20em;
43
+ color: #333;
44
+ font-weight: 400;
45
+ }
46
+ .bp-map a {
47
+ color: #3a84df;
48
+ }
49
+ .bp-map a:hover {
50
+ text-decoration: underline;
51
+ }
52
+
53
+ .bp-map p {
54
+ margin: 4px;
55
+ line-height: 16px;
56
+ font-weight: 400;
57
+ }
58
+
59
+ .bp-map img {
60
+ max-width: none; /* Fixes Google Maps info window close button */
61
+ }
62
+
63
+ .bp-map-info-window {
64
+ width: 200px;
65
+ max-width: 100%;
66
+ }
67
+
68
+ .bp-directions:before,
69
+ .bp-phone:before,
70
+ .bp-contact:before,
71
+ .bp-booking:before,
72
+ .bp-opening-hours-brief:before,
73
+ .bp-opening-hours .bp-title:before {
74
+ display: inline-block;
75
+ width: 1.5em;
76
+ height: 1em;
77
+ font-size: 1.5em;
78
+ line-height: 1;
79
+ font-family: dashicons;
80
+ text-decoration: inherit;
81
+ font-weight: 400;
82
+ font-style: normal;
83
+ vertical-align: top;
84
+ text-align: center;
85
+ -webkit-transition: color .1s ease-in 0;
86
+ transition: color .1s ease-in 0;
87
+ -webkit-font-smoothing: antialiased;
88
+ -moz-osx-font-smoothing: grayscale;
89
+ }
90
+
91
+ .bp-directions:before {
92
+ content: "\f230";
93
+ }
94
+
95
+ .bp-phone:before {
96
+ content: "\f470";
97
+ }
98
+
99
+ .bp-contact:before {
100
+ content: "\f466";
101
+ }
102
+
103
+ .bp-booking:before {
104
+ content: "\f145";
105
+ }
106
+
107
+ .bp-opening-hours-brief:before,
108
+ .bp-opening-hours .bp-title:before {
109
+ content: "\f469";
110
+ }
assets/img/bpfwp-dashboard-banner.png ADDED
Binary file
assets/img/bpfwp-icon.png ADDED
Binary file
assets/img/dash-asset-badge.png ADDED
Binary file
assets/img/dash-asset-checkmark.png ADDED
Binary file
assets/img/dash-asset-key.png ADDED
Binary file
assets/img/dash-asset-stars.png ADDED
Binary file
assets/img/ewd-support-icon-documentation.png ADDED
Binary file
assets/img/ewd-support-icon-faqs.png ADDED
Binary file
assets/img/ewd-support-icon-forum.png ADDED
Binary file
assets/img/ewd-support-icon-youtube.png ADDED
Binary file
assets/img/fivestartextlogo.png ADDED
Binary file
assets/img/fivestartextlogowithstar.png ADDED
Binary file
assets/img/options-asset-lock.png ADDED
Binary file
assets/img/options-asset-star.png ADDED
Binary file
assets/js/admin-schema-selector.js ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function() {
2
+ jQuery('select[name="schema_target_type"]').on('change', function() {
3
+ if ( jQuery(this).val() == 'post_type' ) {
4
+ jQuery('select[name="schema_target_value"]').find('option').remove();
5
+
6
+ jQuery.each(schema_option_data.post_types, function(key, post_type) {
7
+ jQuery('select[name="schema_target_value"]').append('<option value="' + post_type.name + '">' + post_type.label + '</option>');
8
+ });
9
+ }
10
+ else if ( jQuery(this).val() == 'post' ) {
11
+ jQuery('select[name="schema_target_value"]').find('option').remove();
12
+
13
+ jQuery.each(schema_option_data.posts, function(key, post) {
14
+ jQuery('select[name="schema_target_value"]').append('<option value="' + post.ID + '">' + post.post_title + '</option>');
15
+ });
16
+ }
17
+ else if ( jQuery(this).val() == 'page' ) {
18
+ jQuery('select[name="schema_target_value"]').find('option').remove();
19
+
20
+ jQuery.each(schema_option_data.pages, function(key, page) {
21
+ jQuery('select[name="schema_target_value"]').append('<option value="' + page.ID + '">' + page.post_title + '</option>');
22
+ });
23
+ }
24
+ else if ( jQuery(this).val() == 'post_category' ) {
25
+ jQuery('select[name="schema_target_value"]').find('option').remove();
26
+
27
+ jQuery.each(schema_option_data.post_categories, function(key, post_category) {
28
+ jQuery('select[name="schema_target_value"]').append('<option value="' + post_category.term_id + '">' + post_category.name + '</option>');
29
+ });
30
+ }
31
+ else if ( jQuery(this).val() == 'taxonomy' ) {
32
+ jQuery('select[name="schema_target_value"]').find('option').remove();
33
+
34
+ jQuery.each(schema_option_data.taxonomies, function(key, taxonomy) {
35
+ jQuery('select[name="schema_target_value"]').append('<option value="' + taxonomy.name + '">' + taxonomy.label + '</option>');
36
+ });
37
+ }
38
+ else if ( jQuery(this).val() == 'page_template' ) {
39
+ jQuery('select[name="schema_target_value"]').find('option').remove();
40
+
41
+ jQuery.each(schema_option_data.page_templates, function(name, file) {
42
+ jQuery('select[name="schema_target_value"]').append('<option value="' + file + '">' + name + '</option>');
43
+ });
44
+ }
45
+ else if ( jQuery(this).val() == 'global' ) {
46
+ jQuery('select[name="schema_target_value"]').find('option').remove();
47
+ }
48
+ });
49
+ });
assets/js/admin.js ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*NEW DASHBOARD MOBILE MENU AND WIDGET TOGGLING*/
2
+ jQuery(document).ready(function($){
3
+ $('#bpfwp-dash-mobile-menu-open').click(function(){
4
+ $('.bpfwp-admin-header-menu .nav-tab:nth-of-type(1n+2)').toggle();
5
+ $('#bpfwp-dash-mobile-menu-up-caret').toggle();
6
+ $('#bpfwp-dash-mobile-menu-down-caret').toggle();
7
+ return false;
8
+ });
9
+ $(function(){
10
+ $(window).resize(function(){
11
+ if($(window).width() > 800){
12
+ $('.bpfwp-admin-header-menu .nav-tab:nth-of-type(1n+2)').show();
13
+ }
14
+ else{
15
+ $('.bpfwp-admin-header-menu .nav-tab:nth-of-type(1n+2)').hide();
16
+ $('#bpfwp-dash-mobile-menu-up-caret').hide();
17
+ $('#bpfwp-dash-mobile-menu-down-caret').show();
18
+ }
19
+ }).resize();
20
+ });
21
+ $('#bpfwp-dashboard-support-widget-box .bpfwp-dashboard-new-widget-box-top').click(function(){
22
+ $('#bpfwp-dashboard-support-widget-box .bpfwp-dashboard-new-widget-box-bottom').toggle();
23
+ $('#bpfwp-dash-mobile-support-up-caret').toggle();
24
+ $('#bpfwp-dash-mobile-support-down-caret').toggle();
25
+ });
26
+ $('#bpfwp-dashboard-optional-table .bpfwp-dashboard-new-widget-box-top').click(function(){
27
+ $('#bpfwp-dashboard-optional-table .bpfwp-dashboard-new-widget-box-bottom').toggle();
28
+ $('#bpfwp-dash-optional-table-up-caret').toggle();
29
+ $('#bpfwp-dash-optional-table-down-caret').toggle();
30
+ });
31
+ });
32
+
33
+ /*LOCK BOXES*/
34
+ jQuery(document).ready(function($){
35
+ $(function(){
36
+ $(window).resize(function(){
37
+ $('.bpfwp-premium-options-table-overlay').each(function(){
38
+ var eachProTableOverlay = $(this);
39
+ var associatedTable = eachProTableOverlay.next();
40
+ var tableWidth = associatedTable.outerWidth(true);
41
+ associatedTable.css('min-height', '240px');
42
+ var tableHeight = associatedTable.outerHeight();
43
+ var tablePosition = associatedTable.position();
44
+ var tableLeft = tablePosition.left;
45
+ var tableTop = tablePosition.top;
46
+ eachProTableOverlay.css('width', tableWidth+'px');
47
+ eachProTableOverlay.css('height', tableHeight+'px');
48
+ eachProTableOverlay.css('left', tableLeft+'px');
49
+ eachProTableOverlay.css('top', tableTop+'px');
50
+ });
51
+ }).resize();
52
+ });
53
+ });
54
+
55
+ //OPTIONS PAGE YES/NO TOGGLE SWITCHES
56
+ jQuery(document).ready(function($){
57
+ $('.bpfwp-admin-option-toggle').on('change', function() {
58
+ var Input_Name = $(this).data('inputname'); console.log(Input_Name);
59
+ if ($(this).is(':checked')) {
60
+ $('input[name="' + Input_Name + '"][value="1"]').prop('checked', true).trigger('change');
61
+ $('input[name="' + Input_Name + '"][value=""]').prop('checked', false);
62
+ }
63
+ else {
64
+ $('input[name="' + Input_Name + '"][value="1"]').prop('checked', false).trigger('change');
65
+ $('input[name="' + Input_Name + '"][value=""]').prop('checked', true);
66
+ }
67
+ });
68
+ });
assets/js/block-contact-card.js CHANGED
@@ -1,117 +1,117 @@
1
- const { __ } = wp.i18n;
2
- const { registerBlockType } = wp.blocks;
3
- const { SelectControl, CheckboxControl, PanelBody, ServerSideRender, Disabled } = wp.components;
4
- const { InspectorControls } = wp.editor;
5
- const { locationOptions } = bpfwp_blocks;
6
-
7
- registerBlockType( 'business-profile/contact-card', {
8
- title: __( 'Contact Card', 'business-profile' ),
9
- category: 'widgets',
10
- icon: 'location',
11
- attributes: {
12
- location: {
13
- type: 'number',
14
- default: 0
15
- },
16
- show_name: {
17
- type: 'boolean',
18
- default: true
19
- },
20
- show_address: {
21
- type: 'boolean',
22
- default: true
23
- },
24
- show_get_directions: {
25
- type: 'boolean',
26
- default: true
27
- },
28
- show_phone: {
29
- type: 'boolean',
30
- default: true
31
- },
32
- show_contact: {
33
- type: 'boolean',
34
- default: true
35
- },
36
- show_opening_hours: {
37
- type: 'boolean',
38
- default: true
39
- },
40
- show_opening_hours_brief: {
41
- type: 'boolean',
42
- default: false
43
- },
44
- show_map: {
45
- type: 'boolean',
46
- default: true
47
- }
48
- },
49
- supports: {
50
- html: false,
51
- },
52
- edit( { attributes, setAttributes } ) {
53
-
54
- return (
55
- <div>
56
- <InspectorControls>
57
- <PanelBody>
58
- {locationOptions.length ? (
59
- <SelectControl
60
- label={ __( 'Select a Location', 'business-profile' ) }
61
- value={ attributes.location }
62
- onChange={ ( location ) => setAttributes( { location: parseInt( location, 10 ) } ) }
63
- options={ locationOptions }
64
- />
65
- ) : ''}
66
- <CheckboxControl
67
- label={ __( 'Show Name', 'business-profile') }
68
- checked={ attributes.show_name }
69
- onChange={ ( show_name ) => { setAttributes( { show_name } ) } }
70
- />
71
- <CheckboxControl
72
- label={ __( 'Show Address', 'business-profile') }
73
- checked={ attributes.show_address }
74
- onChange={ ( show_address ) => { setAttributes( { show_address } ) } }
75
- />
76
- <CheckboxControl
77
- label={ __( 'Show link to get directions on Google Maps', 'business-profile') }
78
- checked={ attributes.show_get_directions }
79
- onChange={ ( show_get_directions ) => { setAttributes( { show_get_directions } ) } }
80
- />
81
- <CheckboxControl
82
- label={ __( 'Show Phone number', 'business-profile') }
83
- checked={ attributes.show_phone }
84
- onChange={ ( show_phone ) => { setAttributes( { show_phone } ) } }
85
- />
86
- <CheckboxControl
87
- label={ __( 'Show contact details', 'business-profile') }
88
- checked={ attributes.show_contact }
89
- onChange={ ( show_contact ) => { setAttributes( { show_contact } ) } }
90
- />
91
- <CheckboxControl
92
- label={ __( 'Show Opening Hours', 'business-profile') }
93
- checked={ attributes.show_opening_hours }
94
- onChange={ ( show_opening_hours ) => { setAttributes( { show_opening_hours } ) } }
95
- />
96
- <CheckboxControl
97
- label={ __( 'Show brief opening hours on one line', 'business-profile') }
98
- checked={ attributes.show_opening_hours_brief }
99
- onChange={ ( show_opening_hours_brief ) => { setAttributes( { show_opening_hours_brief } ) } }
100
- />
101
- <CheckboxControl
102
- label={ __( 'Show Google Map', 'business-profile') }
103
- checked={ attributes.show_map }
104
- onChange={ ( show_map ) => { setAttributes( { show_map } ) } }
105
- />
106
- </PanelBody>
107
- </InspectorControls>
108
- <Disabled>
109
- <ServerSideRender block="business-profile/contact-card" attributes={ attributes } />
110
- </Disabled>
111
- </div>
112
- );
113
- },
114
- save() {
115
- return null;
116
- },
117
- } );
1
+ const { __ } = wp.i18n;
2
+ const { registerBlockType } = wp.blocks;
3
+ const { SelectControl, CheckboxControl, PanelBody, ServerSideRender, Disabled } = wp.components;
4
+ const { InspectorControls } = wp.editor;
5
+ const { locationOptions } = bpfwp_blocks;
6
+
7
+ registerBlockType( 'business-profile/contact-card', {
8
+ title: __( 'Contact Card', 'business-profile' ),
9
+ category: 'widgets',
10
+ icon: 'location',
11
+ attributes: {
12
+ location: {
13
+ type: 'number',
14
+ default: 0
15
+ },
16
+ show_name: {
17
+ type: 'boolean',
18
+ default: true
19
+ },
20
+ show_address: {
21
+ type: 'boolean',
22
+ default: true
23
+ },
24
+ show_get_directions: {
25
+ type: 'boolean',
26
+ default: true
27
+ },
28
+ show_phone: {
29
+ type: 'boolean',
30
+ default: true
31
+ },
32
+ show_contact: {
33
+ type: 'boolean',
34
+ default: true
35
+ },
36
+ show_opening_hours: {
37
+ type: 'boolean',
38
+ default: true
39
+ },
40
+ show_opening_hours_brief: {
41
+ type: 'boolean',
42
+ default: false
43
+ },
44
+ show_map: {
45
+ type: 'boolean',
46
+ default: true
47
+ }
48
+ },
49
+ supports: {
50
+ html: false,
51
+ },
52
+ edit( { attributes, setAttributes } ) {
53
+
54
+ return (
55
+ <div>
56
+ <InspectorControls>
57
+ <PanelBody>
58
+ {locationOptions.length ? (
59
+ <SelectControl
60
+ label={ __( 'Select a Location', 'business-profile' ) }
61
+ value={ attributes.location }
62
+ onChange={ ( location ) => setAttributes( { location: parseInt( location, 10 ) } ) }
63
+ options={ locationOptions }
64
+ />
65
+ ) : ''}
66
+ <CheckboxControl
67
+ label={ __( 'Show Name', 'business-profile') }
68
+ checked={ attributes.show_name }
69
+ onChange={ ( show_name ) => { setAttributes( { show_name } ) } }
70
+ />
71
+ <CheckboxControl
72
+ label={ __( 'Show Address', 'business-profile') }
73
+ checked={ attributes.show_address }
74
+ onChange={ ( show_address ) => { setAttributes( { show_address } ) } }
75
+ />
76
+ <CheckboxControl
77
+ label={ __( 'Show link to get directions on Google Maps', 'business-profile') }
78
+ checked={ attributes.show_get_directions }
79
+ onChange={ ( show_get_directions ) => { setAttributes( { show_get_directions } ) } }
80
+ />
81
+ <CheckboxControl
82
+ label={ __( 'Show Phone number', 'business-profile') }
83
+ checked={ attributes.show_phone }
84
+ onChange={ ( show_phone ) => { setAttributes( { show_phone } ) } }
85
+ />
86
+ <CheckboxControl
87
+ label={ __( 'Show contact details', 'business-profile') }
88
+ checked={ attributes.show_contact }
89
+ onChange={ ( show_contact ) => { setAttributes( { show_contact } ) } }
90
+ />
91
+ <CheckboxControl
92
+ label={ __( 'Show Opening Hours', 'business-profile') }
93
+ checked={ attributes.show_opening_hours }
94
+ onChange={ ( show_opening_hours ) => { setAttributes( { show_opening_hours } ) } }
95
+ />
96
+ <CheckboxControl
97
+ label={ __( 'Show brief opening hours on one line', 'business-profile') }
98
+ checked={ attributes.show_opening_hours_brief }
99
+ onChange={ ( show_opening_hours_brief ) => { setAttributes( { show_opening_hours_brief } ) } }
100
+ />
101
+ <CheckboxControl
102
+ label={ __( 'Show Google Map', 'business-profile') }
103
+ checked={ attributes.show_map }
104
+ onChange={ ( show_map ) => { setAttributes( { show_map } ) } }
105
+ />
106
+ </PanelBody>
107
+ </InspectorControls>
108
+ <Disabled>
109
+ <ServerSideRender block="business-profile/contact-card" attributes={ attributes } />
110
+ </Disabled>
111
+ </div>
112
+ );
113
+ },
114
+ save() {
115
+ return null;
116
+ },
117
+ } );
assets/js/map.js CHANGED
@@ -1,113 +1,113 @@
1
- /* global google */
2
- /**
3
- * Front-end JavaScript for Business Profile maps
4
- *
5
- * @copyright Copyright (c) 2016, Theme of the Crop
6
- * @license GPL-2.0+
7
- * @since 0.0.1
8
- */
9
-
10
- var bpfwp_map = bpfwp_map || {};
11
-
12
- /**
13
- * Set up a map using the Google Maps API and data attributes added to `.bp-map`
14
- * elements on a given page.
15
- *
16
- * @uses Google Maps API (https://developers.google.com/maps/web/)
17
- * @since 1.1.0
18
- */
19
- function bpInitializeMap() {
20
- 'use strict';
21
-
22
- bpfwp_map.maps = [];
23
- bpfwp_map.info_windows = [];
24
-
25
- jQuery( '.bp-map' ).each( function() {
26
- var id = jQuery( this ).attr( 'id' );
27
- var data = jQuery( this ).data();
28
-
29
- data.addressURI = encodeURIComponent( data.address.replace( /(<([^>]+)>)/ig, ', ' ) );
30
-
31
- // Google Maps API v3
32
- if ( 'undefined' !== typeof data.lat ) {
33
- data.addressURI = encodeURIComponent( data.address.replace( /(<([^>]+)>)/ig, ', ' ) );
34
- bpfwp_map.map_options = bpfwp_map.map_options || {};
35
- bpfwp_map.map_options.center = new google.maps.LatLng( data.lat, data.lon );
36
- if ( typeof bpfwp_map.map_options.zoom === 'undefined' ) {
37
- bpfwp_map.map_options.zoom = bpfwp_map.map_options.zoom || 15;
38
- }
39
- bpfwp_map.maps[ id ] = new google.maps.Map( document.getElementById( id ), bpfwp_map.map_options );
40
-
41
- var content = '<div class="bp-map-info-window">' + '<p><strong>' + data.name + '</strong></p>' + '<p>' + data.address.replace( /(?:\r\n|\r|\n)/g, '<br>' ) + '</p>';
42
-
43
- if ( 'undefined' !== typeof data.phone ) {
44
- content += '<p>' + data.phone + '</p>';
45
- }
46
-
47
- content += '<p><a target="_blank" href="//maps.google.com/maps?saddr=current+location&daddr=' + data.addressURI + '">' + bpfwp_map.strings.getDirections + '</a></p>' + '</div>';
48
-
49
- bpfwp_map.info_windows[ id ] = new google.maps.InfoWindow({
50
- position: bpfwp_map.map_options.center,
51
- content: content
52
- });
53
- bpfwp_map.info_windows[ id ].open( bpfwp_map.maps[ id ] );
54
-
55
- // Trigger an intiailized event on this dom element for third-party code
56
- jQuery( this ).trigger( 'bpfwp.map_initialized', [ id, bpfwp_map.maps[id], bpfwp_map.info_windows[id] ] );
57
-
58
- // Google Maps iframe embed (fallback if no lat/lon data available)
59
- } else if ( '' !== data.address ) {
60
- var bpMapIframe = document.createElement( 'iframe' );
61
-
62
- bpMapIframe.frameBorder = 0;
63
- bpMapIframe.style.width = '100%';
64
- bpMapIframe.style.height = '100%';
65
-
66
- if ( '' !== data.name ) {
67
- data.address = data.name + ',' + data.address;
68
- }
69
-
70
- bpMapIframe.src = '//maps.google.com/maps?output=embed&q=' + encodeURIComponent( data.address );
71
- bpMapIframe.src = '//maps.google.com/maps?output=embed&q=' + data.addressURI;
72
-
73
- jQuery( this ).html( bpMapIframe );
74
-
75
- // Trigger an intiailized event on this dom element for third-party code
76
- jQuery( this ).trigger( 'bpfwp.map_initialized_in_iframe', [ jQuery( this ) ] );
77
- }
78
- });
79
- }
80
-
81
- /**
82
- * Backwards-compatable alias function.
83
- *
84
- * @since 1.1.0
85
- */
86
- function bp_initialize_map() {
87
- bpInitializeMap();
88
- }
89
-
90
- jQuery( document ).ready( function() {
91
- 'use strict';
92
-
93
- // Allow developers to override the maps api loading and initializing.
94
- if ( ! bpfwp_map.autoload_google_maps ) {
95
- return;
96
- }
97
- // Load Google Maps API and initialize maps.
98
- if ( 'undefined' === typeof google || 'undefined' === typeof google.maps ) {
99
- var bpMapScript = document.createElement( 'script' );
100
- bpMapScript.type = 'text/javascript';
101
- bpMapScript.src = '//maps.googleapis.com/maps/api/js?v=3.exp&callback=bp_initialize_map';
102
-
103
- if ( 'undefined' !== typeof bpfwp_map.google_maps_api_key ) {
104
- bpMapScript.src += '&key=' + bpfwp_map.google_maps_api_key;
105
- }
106
-
107
- document.body.appendChild( bpMapScript );
108
- } else {
109
- // If the API is already loaded (eg - by a third-party theme or plugin),
110
- // just initialize the map.
111
- bp_initialize_map();
112
- }
113
- });
1
+ /* global google */
2
+ /**
3
+ * Front-end JavaScript for Business Profile maps
4
+ *
5
+ * @copyright Copyright (c) 2016, Theme of the Crop
6
+ * @license GPL-2.0+
7
+ * @since 0.0.1
8
+ */
9
+
10
+ var bpfwp_map = bpfwp_map || {};
11
+
12
+ /**
13
+ * Set up a map using the Google Maps API and data attributes added to `.bp-map`
14
+ * elements on a given page.
15
+ *
16
+ * @uses Google Maps API (https://developers.google.com/maps/web/)
17
+ * @since 1.1.0
18
+ */
19
+ function bpInitializeMap() {
20
+ 'use strict';
21
+
22
+ bpfwp_map.maps = [];
23
+ bpfwp_map.info_windows = [];
24
+
25
+ jQuery( '.bp-map' ).each( function() {
26
+ var id = jQuery( this ).attr( 'id' );
27
+ var data = jQuery( this ).data();
28
+
29
+ data.addressURI = encodeURIComponent( data.address.replace( /(<([^>]+)>)/ig, ', ' ) );
30
+
31
+ // Google Maps API v3
32
+ if ( 'undefined' !== typeof data.lat ) {
33
+ data.addressURI = encodeURIComponent( data.address.replace( /(<([^>]+)>)/ig, ', ' ) );
34
+ bpfwp_map.map_options = bpfwp_map.map_options || {};
35
+ bpfwp_map.map_options.center = new google.maps.LatLng( data.lat, data.lon );
36
+ if ( typeof bpfwp_map.map_options.zoom === 'undefined' ) {
37
+ bpfwp_map.map_options.zoom = bpfwp_map.map_options.zoom || 15;
38
+ }
39
+ bpfwp_map.maps[ id ] = new google.maps.Map( document.getElementById( id ), bpfwp_map.map_options );
40
+
41
+ var content = '<div class="bp-map-info-window">' + '<p><strong>' + data.name + '</strong></p>' + '<p>' + data.address.replace( /(?:\r\n|\r|\n)/g, '<br>' ) + '</p>';
42
+
43
+ if ( 'undefined' !== typeof data.phone ) {
44
+ content += '<p>' + data.phone + '</p>';
45
+ }
46
+
47
+ content += '<p><a target="_blank" href="//maps.google.com/maps?saddr=current+location&daddr=' + data.addressURI + '">' + bpfwp_map.strings.getDirections + '</a></p>' + '</div>';
48
+
49
+ bpfwp_map.info_windows[ id ] = new google.maps.InfoWindow({
50
+ position: bpfwp_map.map_options.center,
51
+ content: content
52
+ });
53
+ bpfwp_map.info_windows[ id ].open( bpfwp_map.maps[ id ] );
54
+
55
+ // Trigger an intiailized event on this dom element for third-party code
56
+ jQuery( this ).trigger( 'bpfwp.map_initialized', [ id, bpfwp_map.maps[id], bpfwp_map.info_windows[id] ] );
57
+
58
+ // Google Maps iframe embed (fallback if no lat/lon data available)
59
+ } else if ( '' !== data.address ) {
60
+ var bpMapIframe = document.createElement( 'iframe' );
61
+
62
+ bpMapIframe.frameBorder = 0;
63
+ bpMapIframe.style.width = '100%';
64
+ bpMapIframe.style.height = '100%';
65
+
66
+ if ( '' !== data.name ) {
67
+ data.address = data.name + ',' + data.address;
68
+ }
69
+
70
+ bpMapIframe.src = '//maps.google.com/maps?output=embed&q=' + encodeURIComponent( data.address );
71
+ bpMapIframe.src = '//maps.google.com/maps?output=embed&q=' + data.addressURI;
72
+
73
+ jQuery( this ).html( bpMapIframe );
74
+
75
+ // Trigger an intiailized event on this dom element for third-party code
76
+ jQuery( this ).trigger( 'bpfwp.map_initialized_in_iframe', [ jQuery( this ) ] );
77
+ }
78
+ });
79
+ }
80
+
81
+ /**
82
+ * Backwards-compatable alias function.
83
+ *
84
+ * @since 1.1.0
85
+ */
86
+ function bp_initialize_map() {
87
+ bpInitializeMap();
88
+ }
89
+
90
+ jQuery( document ).ready( function() {
91
+ 'use strict';
92
+
93
+ // Allow developers to override the maps api loading and initializing.
94
+ if ( ! bpfwp_map.autoload_google_maps ) {
95
+ return;
96
+ }
97
+ // Load Google Maps API and initialize maps.
98
+ if ( 'undefined' === typeof google || 'undefined' === typeof google.maps ) {
99
+ var bpMapScript = document.createElement( 'script' );
100
+ bpMapScript.type = 'text/javascript';
101
+ bpMapScript.src = '//maps.googleapis.com/maps/api/js?v=3.exp&callback=bp_initialize_map';
102
+
103
+ if ( 'undefined' !== typeof bpfwp_map.google_maps_api_key ) {
104
+ bpMapScript.src += '&key=' + bpfwp_map.google_maps_api_key;
105
+ }
106
+
107
+ document.body.appendChild( bpMapScript );
108
+ } else {
109
+ // If the API is already loaded (eg - by a third-party theme or plugin),
110
+ // just initialize the map.
111
+ bp_initialize_map();
112
+ }
113
+ });
assets/js/schema-cpt.js ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function() {
2
+ jQuery('.bpfwp-schema-defaults-helper').on('click', function() {
3
+ jQuery('.bpfwp-schema-defaults-helper-box').removeClass('bpfwp-hidden');
4
+ jQuery('.bpfwp-schema-defaults-helper-background').removeClass('bpfwp-hidden');
5
+
6
+ jQuery('.bpfwp-schema-defaults-helper-box').data('field_id', jQuery(this).data('field_id'));
7
+ });
8
+
9
+ jQuery('.bpfwp-schema-defaults-helper-box-exit').on('click', function() {
10
+ jQuery('.bpfwp-schema-defaults-helper-box').addClass('bpfwp-hidden');
11
+ jQuery('.bpfwp-schema-defaults-helper-background').addClass('bpfwp-hidden');
12
+ });
13
+
14
+ jQuery('.bpfwp-schema-defaults-helper-background').on('click', function() {
15
+ jQuery('.bpfwp-schema-defaults-helper-box').addClass('bpfwp-hidden');
16
+ jQuery('.bpfwp-schema-defaults-helper-background').addClass('bpfwp-hidden');
17
+ });
18
+ jQuery('.bpfwp-schema-defaults-helper-box-exit').on('click', function() {
19
+ jQuery('.bpfwp-schema-defaults-helper-box').addClass('bpfwp-hidden');
20
+ jQuery('.bpfwp-schema-defaults-helper-background').addClass('bpfwp-hidden');
21
+ });
22
+
23
+ jQuery('.bpfwp-schema-defaults-helper-option').on('click', function() {
24
+ var field_id = jQuery(this).parent().parent().parent().parent().data('field_id');
25
+ jQuery('input[data-field_id="' + field_id + '"].bpfwp-schema-defaults-field').val( jQuery(this).data('helper_value') );
26
+
27
+ jQuery('.bpfwp-schema-defaults-helper-box').addClass('bpfwp-hidden');
28
+ jQuery('.bpfwp-schema-defaults-helper-background').addClass('bpfwp-hidden');
29
+
30
+ jQuery('.bpfwp-schema-defaults-helper-box').removeData('field_id');
31
+ });
32
+
33
+ jQuery('.bpfwp-add-repeatable-field').on('click', function() {
34
+ var schema_type = jQuery(this).data('schema_type');
35
+ var field_name = jQuery(this).data('field_name');
36
+ var field_prefix = jQuery(this).data('field_prefix');
37
+ var field_slug = jQuery(this).data('field_slug');
38
+
39
+ var count_input_name = 'count_' + schema_type + '[' + field_prefix + ']';
40
+
41
+ var count = parseInt(jQuery('input[name="' + count_input_name + '"]').val()) + 1;
42
+
43
+ // up the count by 1
44
+ jQuery('input[name="' + count_input_name + '"]').val(count);
45
+
46
+ // add in the new set of inputs to add another of this field
47
+ jQuery(this).siblings('h4[data-field_name="' + field_name + '"]').first().clone().insertAfter('div[data-field_name="' + field_name + '"]:last');
48
+ jQuery(this).siblings('div[data-field_name="' + field_name + '"]').first().clone().insertAfter('h4[data-field_name="' + field_name + '"]:last');
49
+
50
+ // update the input names so that the count parameter is correct
51
+ jQuery(this).siblings('div[data-field_name="' + field_name + '"]').last().find('input').each(function() {
52
+ var input_name = jQuery(this).attr('name');
53
+ input_name = input_name.substring(0, input_name.lastIndexOf('['));
54
+ input_name += '[' + count + ']';
55
+
56
+ jQuery(this).attr('name', input_name);
57
+ jQuery(this).val('');
58
+ });
59
+
60
+ // update the label for names so that the count parameter is correct
61
+ jQuery(this).siblings('div[data-field_name="' + field_name + '"]').last().find('label').each(function() {
62
+ var label_for = jQuery(this).attr('for');
63
+ label_for = label_for.substring(0, label_for.lastIndexOf('['));
64
+ label_for += '[' + count + ']';
65
+
66
+ jQuery(this).attr('for', label_for);
67
+ });
68
+
69
+ });
70
+ });
business-profile.php CHANGED
@@ -1,266 +1,340 @@
1
- <?php
2
- /**
3
- * Plugin Name: Five Star Business Profile
4
- * Plugin URI: https://www.fivestarplugins.com/plugins/business-profile/
5
- * Description: Create and display an SEO friendly contact card with schema structured data. Supports a Google Map, opening hours and more.
6
- * Version: 1.2.9
7
- * Author: Five Star Plugins
8
- * Author URI: https://www.fivestarplugins.com
9
- * License: GPLv3
10
- * License URI:http://www.gnu.org/licenses/gpl-3.0.html
11
- *
12
- * Text Domain: business-profile
13
- * Domain Path: /languages/
14
- */
15
-
16
- defined( 'ABSPATH' ) || exit;
17
-
18
- if ( ! class_exists( 'bpfwpInit', false ) ) :
19
-
20
- class bpfwpInit {
21
-
22
- /**
23
- * Settings for displaying the contact card currently being handled.
24
- *
25
- * @since 0.0.1
26
- * @access public
27
- * @var array
28
- */
29
- public $display_settings = array();
30
-
31
- /**
32
- * Placeholder for the main settings class instance.
33
- *
34
- * @since 0.0.1
35
- * @access public
36
- * @var object bpfwpSettings
37
- */
38
- public $settings;
39
-
40
- /**
41
- * Placeholder for the main CPTs class instance.
42
- *
43
- * @since 0.0.1
44
- * @access public
45
- * @var object bpfwpCustomPostTypes
46
- */
47
- public $cpts;
48
-
49
- /**
50
- * Initialize the plugin and register hooks.
51
- *
52
- * @since 0.0.1
53
- * @access public
54
- * @return void
55
- */
56
- public function __construct() {
57
- self::constants();
58
- self::includes();
59
- self::instantiate();
60
- self::wp_hooks();
61
- if ( $this->settings->get_setting( 'multiple-locations' ) ) {
62
- register_activation_hook( __FILE__, array( $this->cpts, 'flush_rewrite_rules' ) );
63
- }
64
- }
65
-
66
- /**
67
- * Define plugin constants.
68
- *
69
- * @since 1.1.0
70
- * @access protected
71
- * @return void
72
- */
73
- protected function constants() {
74
- define( 'BPFWP_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
75
- define( 'BPFWP_PLUGIN_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
76
- define( 'BPFWP_PLUGIN_FNAME', plugin_basename( __FILE__ ) );
77
- define( 'BPFWP_VERSION', '1.2.6' );
78
- }
79
-
80
- /**
81
- * Include all plugin files.
82
- *
83
- * @since 1.1.0
84
- * @access protected
85
- * @return void
86
- */
87
- protected function includes() {
88
- require_once BPFWP_PLUGIN_DIR . '/includes/class-blocks.php';
89
- require_once BPFWP_PLUGIN_DIR . '/includes/class-compatibility.php';
90
- require_once BPFWP_PLUGIN_DIR . '/includes/class-custom-post-types.php';
91
- require_once BPFWP_PLUGIN_DIR . '/includes/deprecated/class-integrations.php';
92
- require_once BPFWP_PLUGIN_DIR . '/includes/class-settings.php';
93
- require_once BPFWP_PLUGIN_DIR . '/includes/class-template-loader.php';
94
- require_once BPFWP_PLUGIN_DIR . '/includes/template-functions.php';
95
- }
96
-
97
- /**
98
- * Spin up instances of our plugin classes.
99
- *
100
- * @since 1.1.0
101
- * @access protected
102
- * @return void
103
- */
104
- protected function instantiate() {
105
- new bpfwpCompatibility();
106
- new bpfwpIntegrations(); // Deprecated in v1.1.
107
- $this->settings = new bpfwpSettings();
108
- $this->cpts = new bpfwpCustomPostTypes();
109
- $this->blocks = new bpfwpBlocks();
110
-
111
- $this->blocks->run();
112
- if ( $this->settings->get_setting( 'multiple-locations' ) ) {
113
- $this->cpts->run();
114
- }
115
- }
116
-
117
- /**
118
- * Hook into WordPress.
119
- *
120
- * @since 1.1.0
121
- * @access protected
122
- * @return void
123
- */
124
- protected function wp_hooks() {
125
- add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
126
- add_action( 'wp_enqueue_scripts', array( $this, 'register_assets' ) );
127
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_assets' ) );
128
- add_action( 'widgets_init', array( $this, 'register_widgets' ) );
129
- add_filter( 'plugin_action_links', array( $this, 'plugin_action_links' ), 10, 2 );
130
- }
131
-
132
- /**
133
- * Load the plugin textdomain for localistion.
134
- *
135
- * @since 0.0.1
136
- * @access public
137
- * @return void
138
- */
139
- public function load_textdomain() {
140
- load_plugin_textdomain(
141
- 'business-profile',
142
- false,
143
- plugin_basename( dirname( __FILE__ ) ) . '/languages'
144
- );
145
- }
146
-
147
- /**
148
- * Register the front-end CSS styles
149
- *
150
- * @since 0.0.1
151
- * @access public
152
- * @return void
153
- */
154
- function register_assets() {
155
- wp_register_style(
156
- 'bpfwp-default',
157
- BPFWP_PLUGIN_URL . '/assets/css/contact-card.css',
158
- null,
159
- BPFWP_VERSION
160
- );
161
- wp_register_script(
162
- 'bpfwp-map',
163
- BPFWP_PLUGIN_URL . '/assets/js/map.js',
164
- array( 'jquery' ),
165
- BPFWP_VERSION,
166
- true
167
- );
168
- }
169
-
170
- /**
171
- * Register the widgets
172
- *
173
- * @since 0.0.1
174
- * @access public
175
- * @return void
176
- */
177
- public function register_widgets() {
178
- require_once BPFWP_PLUGIN_DIR . '/includes/class-contact-card-widget.php';
179
- register_widget( 'bpfwpContactCardWidget' );
180
- }
181
-
182
- /**
183
- * Enqueue the admin CSS for locations
184
- *
185
- * @since 1.1
186
- * @access public
187
- * @global WP_Post $post The current WordPress post object.
188
- * @param string $hook_suffix The current admin screen slug.
189
- * @return void
190
- */
191
- public function enqueue_admin_assets( $hook_suffix ) {
192
-
193
- global $post;
194
-
195
- if ( 'post-new.php' === $hook_suffix || 'post.php' === $hook_suffix ) {
196
- if ( $this->settings->get_setting( 'multiple-locations' ) && $this->cpts->location_cpt_slug === $post->post_type ) {
197
- wp_enqueue_style( 'bpfwp-admin-location', BPFWP_PLUGIN_URL . '/assets/css/admin.css' );
198
- }
199
- }
200
- }
201
-
202
- /**
203
- * Add links to the plugin listing on the installed plugins page
204
- *
205
- * @since 0.0.1
206
- * @access public
207
- * @param array $links The current plugin action links.
208
- * @param string $plugin The current plugin slug.
209
- * @return array $links Modified action links.
210
- */
211
- public function plugin_action_links( $links, $plugin ) {
212
- if ( BPFWP_PLUGIN_FNAME === $plugin ) {
213
- $links['help'] = sprintf( '<a href="http://doc.fivestarplugins.com/plugins/business-profile/" title="%s">%s</a>',
214
- __( 'View the help documentation for Business Profile', 'business-profile' ),
215
- __( 'Help', 'business-profile' )
216
- );
217
- }
218
-
219
- return $links;
220
- }
221
-
222
- /**
223
- * Retrieve the get_theme_supports() value for a feature
224
- *
225
- * @since 1.1
226
- * @access public
227
- * @param string $feature A theme support feature to get.
228
- * @return bool Whether or not a feature is supported.
229
- */
230
- public function get_theme_support( $feature ) {
231
-
232
- $theme_support = get_theme_support( 'business-profile' );
233
-
234
- if ( true === $theme_support ) {
235
- return true;
236
- } elseif ( false === $theme_support ) {
237
- return false;
238
- } else {
239
- $theme_support = (array) $theme_support;
240
- $theme_support = array_shift( $theme_support );
241
- return isset( $theme_support[ $feature ] ) && true === $theme_support[ $feature ];
242
- }
243
- }
244
-
245
- /**
246
- * Return a single instance of the main plugin class.
247
- *
248
- * Developers and tests may still create multiple instances by spinning
249
- * them up directly, but for most uses, this method is preferred.
250
- *
251
- * @since 1.1.0
252
- * @access public
253
- * @static
254
- * @return object bpfwpInit A single instance of the main plugin class.
255
- */
256
- public static function instance() {
257
- static $instance;
258
- if ( null === $instance ) {
259
- $instance = new self;
260
- }
261
- return $instance;
262
- }
263
- }
264
- endif;
265
-
266
- $bpfwp_controller = bpfwpInit::instance();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plugin Name: Five Star Business Profile and Schema
4
+ * Plugin URI: https://www.fivestarplugins.com/plugins/business-profile/
5
+ * Description: Add schema structured data to any page or post type. Create an SEO friendly contact card with your business info and associated schema. Supports Google Map, opening hours and more.
6
+ * Version: 2.0.0
7
+ * Author: Five Star Plugins
8
+ * Author URI: https://www.fivestarplugins.com
9
+ * License: GPLv3
10
+ * License URI:http://www.gnu.org/licenses/gpl-3.0.html
11
+ *
12
+ * Text Domain: business-profile
13
+ * Domain Path: /languages/
14
+ */
15
+
16
+ defined( 'ABSPATH' ) || exit;
17
+
18
+ if ( ! class_exists( 'bpfwpInit', false ) ) :
19
+
20
+ class bpfwpInit {
21
+
22
+ /**
23
+ * Settings for displaying the contact card currently being handled.
24
+ *
25
+ * @since 0.0.1
26
+ * @access public
27
+ * @var array
28
+ */
29
+ public $display_settings = array();
30
+
31
+ /**
32
+ * Placeholder for the main settings class instance.
33
+ *
34
+ * @since 0.0.1
35
+ * @access public
36
+ * @var object bpfwpSettings
37
+ */
38
+ public $settings;
39
+
40
+ /**
41
+ * Placeholder for the main CPTs class instance.
42
+ *
43
+ * @since 0.0.1
44
+ * @access public
45
+ * @var object bpfwpCustomPostTypes
46
+ */
47
+ public $cpts;
48
+
49
+ /**
50
+ * Initialize the plugin and register hooks.
51
+ *
52
+ * @since 0.0.1
53
+ * @access public
54
+ * @return void
55
+ */
56
+ public function __construct() {
57
+ self::constants();
58
+ self::includes();
59
+ self::instantiate();
60
+ self::wp_hooks();
61
+ if ( $this->settings->get_setting( 'multiple-locations' ) ) {
62
+ register_activation_hook( __FILE__, array( $this->cpts, 'flush_rewrite_rules' ) );
63
+ }
64
+
65
+ // Add the admin menu
66
+ add_action( 'admin_menu', array( $this, 'add_menu_page' ) );
67
+
68
+ // Load permissions and handle combination
69
+ require_once( BPFWP_PLUGIN_DIR . '/includes/class-permissions.php' );
70
+ $this->permissions = new bpfwpPermissions();
71
+
72
+ // Load plugin dashboard
73
+ require_once( BPFWP_PLUGIN_DIR . '/includes/class-dashboard.php' );
74
+ new bpfwpDashboard();
75
+
76
+ }
77
+
78
+ public function add_menu_page() {
79
+ add_menu_page(
80
+ __( 'Business Profile', 'business-profile' ),
81
+ __( 'Business Profile', 'business-profile' ),
82
+ 'manage_options',
83
+ 'bpfwp-business-profile',
84
+ '',
85
+ 'dashicons-businessperson'
86
+ );
87
+ }
88
+
89
+ /**
90
+ * Define plugin constants.
91
+ *
92
+ * @since 1.1.0
93
+ * @access protected
94
+ * @return void
95
+ */
96
+ protected function constants() {
97
+ define( 'BPFWP_PLUGIN_DIR', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
98
+ define( 'BPFWP_PLUGIN_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
99
+ define( 'BPFWP_PLUGIN_FNAME', plugin_basename( __FILE__ ) );
100
+ define( 'BPFWP_VERSION', '1.2.7' );
101
+ }
102
+
103
+ /**
104
+ * Include all plugin files.
105
+ *
106
+ * @since 1.1.0
107
+ * @access protected
108
+ * @return void
109
+ */
110
+ protected function includes() {
111
+ require_once BPFWP_PLUGIN_DIR . '/includes/class-blocks.php';
112
+ require_once BPFWP_PLUGIN_DIR . '/includes/class-compatibility.php';
113
+ require_once BPFWP_PLUGIN_DIR . '/includes/class-custom-post-types.php';
114
+ require_once BPFWP_PLUGIN_DIR . '/includes/class-integrations.php';
115
+ //require_once BPFWP_PLUGIN_DIR . '/includes/class-permissions.php';
116
+ require_once BPFWP_PLUGIN_DIR . '/includes/class-schemas-manager.php';
117
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema.php';
118
+ require_once BPFWP_PLUGIN_DIR . '/includes/class-settings.php';
119
+ require_once BPFWP_PLUGIN_DIR . '/includes/class-template-loader.php';
120
+ require_once BPFWP_PLUGIN_DIR . '/includes/template-functions.php';
121
+ require_once BPFWP_PLUGIN_DIR . '/includes/helper-functions.php';
122
+ }
123
+
124
+ /**
125
+ * Spin up instances of our plugin classes.
126
+ *
127
+ * @since 1.1.0
128
+ * @access protected
129
+ * @return void
130
+ */
131
+ protected function instantiate() {
132
+ new bpfwpCompatibility();
133
+ new bpfwpIntegrations(); // Deprecated in v1.1.
134
+ //$this->permissions = new bpfwpPermissions();
135
+ $this->schemas = new bpfwpSchemasManager();
136
+ $this->settings = new bpfwpSettings();
137
+ $this->cpts = new bpfwpCustomPostTypes();
138
+ $this->blocks = new bpfwpBlocks();
139
+
140
+ $this->blocks->run();
141
+ $this->cpts->run( $this->settings->get_setting('multiple-locations') );
142
+ }
143
+
144
+ /**
145
+ * Hook into WordPress.
146
+ *
147
+ * @since 1.1.0
148
+ * @access protected
149
+ * @return void
150
+ */
151
+ protected function wp_hooks() {
152
+ add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
153
+ add_action( 'admin_notices', array( $this, 'display_header_area') );
154
+ add_action( 'wp_enqueue_scripts', array( $this, 'register_assets' ) );
155
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_assets' ) );
156
+ add_action( 'widgets_init', array( $this, 'register_widgets' ) );
157
+ add_filter( 'plugin_action_links', array( $this, 'plugin_action_links' ), 10, 2 );
158
+ }
159
+
160
+ /**
161
+ * Load the plugin textdomain for localistion.
162
+ *
163
+ * @since 0.0.1
164
+ * @access public
165
+ * @return void
166
+ */
167
+ public function load_textdomain() {
168
+ load_plugin_textdomain(
169
+ 'business-profile',
170
+ false,
171
+ plugin_basename( dirname( __FILE__ ) ) . '/languages'
172
+ );
173
+ }
174
+
175
+ /**
176
+ * Register the front-end CSS styles
177
+ *
178
+ * @since 0.0.1
179
+ * @access public
180
+ * @return void
181
+ */
182
+ function register_assets() {
183
+ wp_register_style(
184
+ 'bpfwp-default',
185
+ BPFWP_PLUGIN_URL . '/assets/css/contact-card.css',
186
+ null,
187
+ BPFWP_VERSION
188
+ );
189
+ wp_register_script(
190
+ 'bpfwp-map',
191
+ BPFWP_PLUGIN_URL . '/assets/js/map.js',
192
+ array( 'jquery' ),
193
+ BPFWP_VERSION,
194
+ true
195
+ );
196
+ }
197
+
198
+ /**
199
+ * Register the widgets
200
+ *
201
+ * @since 0.0.1
202
+ * @access public
203
+ * @return void
204
+ */
205
+ public function register_widgets() {
206
+ require_once BPFWP_PLUGIN_DIR . '/includes/class-contact-card-widget.php';
207
+ register_widget( 'bpfwpContactCardWidget' );
208
+ }
209
+
210
+ public function display_header_area() {
211
+ global $bpfwp_controller, $post;
212
+
213
+ $screen = get_current_screen();
214
+ $screenID = $screen->id;
215
+ $screenPostType = $screen->post_type;
216
+ $settings = get_option( 'bpfwp-settings' );
217
+
218
+ if ( $screenID != 'business-profile_page_bpfwp-settings' && $screenID != 'business-profile_page_bpfwp-dashboard' && $screenPostType != 'location' && $screenPostType != 'schema' ) {return;}
219
+
220
+ if ( ! $bpfwp_controller->permissions->check_permission( 'premium' ) || get_option("BPFWP_Trial_Happening") == "Yes" ) {
221
+ ?>
222
+ <div class="bpfwp-dashboard-new-upgrade-banner">
223
+ <div class="bpfwp-dashboard-banner-icon"></div>
224
+ <div class="bpfwp-dashboard-banner-buttons">
225
+ <a class="bpfwp-dashboard-new-upgrade-button" href="https://www.fivestarplugins.com/license-payment/?Selected=BPFWP&Quantity=1" target="_blank">UPGRADE NOW</a>
226
+ </div>
227
+ <div class="bpfwp-dashboard-banner-text">
228
+ <div class="bpfwp-dashboard-banner-title">
229
+ GET FULL ACCESS WITH OUR PREMIUM VERSION
230
+ </div>
231
+ <div class="bpfwp-dashboard-banner-brief">
232
+ Automatic schema integration into posts and with other plugins, multiple locations and more!
233
+ </div>
234
+ </div>
235
+ </div>
236
+ <?php
237
+ }
238
+
239
+ ?>
240
+ <div class="bpfwp-admin-header-menu">
241
+ <h2 class="nav-tab-wrapper">
242
+ <a id="bpfwp-dash-mobile-menu-open" href="#" class="menu-tab nav-tab"><?php _e("MENU", 'business-profile'); ?><span id="bpfwp-dash-mobile-menu-down-caret">&nbsp;&nbsp;&#9660;</span><span id="bpfwp-dash-mobile-menu-up-caret">&nbsp;&nbsp;&#9650;</span></a>
243
+ <a id="dashboard-menu" href='admin.php?page=bpfwp-dashboard' class="menu-tab nav-tab <?php if ($screenID == 'profile_page_bpfwp-dashboard') {echo 'nav-tab-active';}?>"><?php _e("Dashboard", 'business-profile'); ?></a>
244
+ <?php if($settings['multiple-locations'] == 1){ ?><a id="locations-menu" href='edit.php?post_type=location' class="menu-tab nav-tab <?php if ($screenID == 'post-type-location') {echo 'nav-tab-active';}?>"><?php _e("Locations", 'business-profile'); ?></a><?php } ?>
245
+ <a id="schemas-menu" href='edit.php?post_type=schema' class="menu-tab nav-tab <?php if ($screenID == 'post-type-schema') {echo 'nav-tab-active';}?>"><?php _e("Schemas", 'business-profile'); ?></a>
246
+ <a id="options-menu" href='admin.php?page=bpfwp-settings' class="menu-tab nav-tab <?php if ($screenID == 'profile_page_bpfwp-settings') {echo 'nav-tab-active';}?>"><?php _e("Settings", 'business-profile'); ?></a>
247
+ </h2>
248
+ </div>
249
+ <?php
250
+ }
251
+
252
+ /**
253
+ * Enqueue the admin CSS for locations
254
+ *
255
+ * @since 1.1
256
+ * @access public
257
+ * @global WP_Post $post The current WordPress post object.
258
+ * @param string $hook_suffix The current admin screen slug.
259
+ * @return void
260
+ */
261
+ public function enqueue_admin_assets( $hook_suffix ) {
262
+
263
+ global $post;
264
+ $screen = get_current_screen();
265
+ $screenPostType = $screen->post_type;
266
+
267
+ if ( ('post-new.php' === $hook_suffix || 'post.php' === $hook_suffix) || $screenPostType == 'location' || $screenPostType == 'schema' ) {
268
+ //if ( $this->settings->get_setting( 'multiple-locations' ) && $this->cpts->location_cpt_slug === $post->post_type ) {
269
+ wp_enqueue_style( 'bpfwp-admin-location', BPFWP_PLUGIN_URL . '/assets/css/admin.css', array(), BPFWP_VERSION );
270
+ wp_enqueue_script( 'bpfwp-admin-js', BPFWP_PLUGIN_URL . '/assets/js/admin.js', array( 'jquery' ), BPFWP_VERSION, true );
271
+ //}
272
+ }
273
+ }
274
+
275
+ /**
276
+ * Add links to the plugin listing on the installed plugins page
277
+ *
278
+ * @since 0.0.1
279
+ * @access public
280
+ * @param array $links The current plugin action links.
281
+ * @param string $plugin The current plugin slug.
282
+ * @return array $links Modified action links.
283
+ */
284
+ public function plugin_action_links( $links, $plugin ) {
285
+ if ( BPFWP_PLUGIN_FNAME === $plugin ) {
286
+ $links['help'] = sprintf( '<a href="http://doc.fivestarplugins.com/plugins/business-profile/" title="%s">%s</a>',
287
+ __( 'View the help documentation for Business Profile', 'business-profile' ),
288
+ __( 'Help', 'business-profile' )
289
+ );
290
+ }
291
+
292
+ return $links;
293
+ }
294
+
295
+ /**
296
+ * Retrieve the get_theme_supports() value for a feature
297
+ *
298
+ * @since 1.1
299
+ * @access public
300
+ * @param string $feature A theme support feature to get.
301
+ * @return bool Whether or not a feature is supported.
302
+ */
303
+ public function get_theme_support( $feature ) {
304
+
305
+ $theme_support = get_theme_support( 'business-profile' );
306
+
307
+ if ( true === $theme_support ) {
308
+ return true;
309
+ } elseif ( false === $theme_support ) {
310
+ return false;
311
+ } else {
312
+ $theme_support = (array) $theme_support;
313
+ $theme_support = array_shift( $theme_support );
314
+ return isset( $theme_support[ $feature ] ) && true === $theme_support[ $feature ];
315
+ }
316
+ }
317
+
318
+ /**
319
+ * Return a single instance of the main plugin class.
320
+ *
321
+ * Developers and tests may still create multiple instances by spinning
322
+ * them up directly, but for most uses, this method is preferred.
323
+ *
324
+ * @since 1.1.0
325
+ * @access public
326
+ * @static
327
+ * @return object bpfwpInit A single instance of the main plugin class.
328
+ */
329
+ public static function instance() {
330
+ static $instance;
331
+ if ( null === $instance ) {
332
+ $instance = new self;
333
+ }
334
+ return $instance;
335
+ }
336
+ }
337
+ endif;
338
+
339
+ $bpfwp_controller = bpfwpInit::instance();
340
+
includes/class-blocks.php CHANGED
@@ -1,163 +1,163 @@
1
- <?php
2
- /**
3
- * Methods for handling blocks in the Gutenberg editor
4
- *
5
- * @package BusinessProfile
6
- * @copyright Copyright (c) 2018, Theme of the Crop
7
- * @license GPL-2.0+
8
- * @since 1.2.0
9
- */
10
-
11
- defined( 'ABSPATH' ) || exit;
12
-
13
- if ( ! class_exists( 'bpfwpBlocks', false ) ) :
14
-
15
- /**
16
- * Class to create, edit and display blocks for the Gutenberg editor
17
- *
18
- * @since 1.2
19
- */
20
- class bpfwpBlocks {
21
-
22
- /**
23
- * Register hooks
24
- *
25
- * @since 1.2
26
- * @access public
27
- * @return void
28
- */
29
- public function run() {
30
- add_action( 'init', array( $this, 'register' ) );
31
- }
32
-
33
- /**
34
- * Register blocks
35
- *
36
- * @since 1.1
37
- * @access public
38
- * @return void
39
- */
40
- public function register() {
41
-
42
- if ( !function_exists( 'register_block_type' ) ) {
43
- return;
44
- }
45
-
46
- wp_register_script(
47
- 'business-profile-blocks',
48
- BPFWP_PLUGIN_URL . '/assets/js/blocks.build.js',
49
- array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor' )
50
- );
51
-
52
- wp_register_script(
53
- 'bpfwp-map',
54
- BPFWP_PLUGIN_URL . '/assets/js/map.js',
55
- array( 'jquery' ),
56
- BPFWP_VERSION,
57
- true
58
- );
59
-
60
- wp_register_style(
61
- 'bpfwp-default',
62
- BPFWP_PLUGIN_URL . '/assets/css/contact-card.css',
63
- array()
64
- );
65
-
66
- register_block_type( 'business-profile/contact-card', array(
67
- 'editor_script' => array('business-profile-blocks', 'bpfwp-map'),
68
- 'editor_style' => 'bpfwp-default',
69
- 'render_callback' => 'bpwfwp_print_contact_card',
70
- 'attributes' => array(
71
- 'location' => array(
72
- 'type' => 'number',
73
- 'minimum' => '0',
74
- ),
75
- 'show_name' => array(
76
- 'type' => 'boolean',
77
- 'default' => true,
78
- ),
79
- 'show_address' => array(
80
- 'type' => 'boolean',
81
- 'default' => true,
82
- ),
83
- 'show_get_directions' => array(
84
- 'type' => 'boolean',
85
- 'default' => true,
86
- ),
87
- 'show_phone' => array(
88
- 'type' => 'boolean',
89
- 'default' => true,
90
- ),
91
- 'show_contact' => array(
92
- 'type' => 'boolean',
93
- 'default' => true,
94
- ),
95
- 'show_opening_hours' => array(
96
- 'type' => 'boolean',
97
- 'default' => true,
98
- ),
99
- 'show_opening_hours_brief' => array(
100
- 'type' => 'boolean',
101
- 'default' => false,
102
- ),
103
- 'show_map' => array(
104
- 'type' => 'boolean',
105
- 'default' => true,
106
- ),
107
- 'show_image' => array(
108
- 'type' => 'boolean',
109
- 'default' => true,
110
- ),
111
- ),
112
- ) );
113
-
114
- add_action( 'admin_init', array( $this, 'register_admin' ) );
115
- }
116
-
117
- /**
118
- * Register admin-only assets for block handling
119
- *
120
- * @since 1.2
121
- * @access public
122
- * @return void
123
- */
124
- public function register_admin() {
125
-
126
- global $bpfwp_controller;
127
-
128
- $location_options = array();
129
-
130
- if ( $bpfwp_controller->settings->get_setting( 'multiple-locations' ) ) {
131
- $locations = new WP_Query( array(
132
- 'post_type' => $bpfwp_controller->cpts->location_cpt_slug,
133
- 'posts_per_page' => 1000,
134
- 'post_status' => 'publish',
135
- ) );
136
-
137
- $location_options = array( array(
138
- 'value' => 0,
139
- 'label' => __('Use the main Business Profile'),
140
- ) );
141
- while ( $locations->have_posts() ) {
142
- $locations->the_post();
143
- $location_options[] = array(
144
- 'value' => get_the_ID(),
145
- 'label' => get_the_title(),
146
- );
147
- }
148
- wp_reset_postdata();
149
- }
150
-
151
- wp_add_inline_script(
152
- 'business-profile-blocks',
153
- sprintf(
154
- 'var bpfwp_blocks = %s;',
155
- json_encode( array(
156
- 'locationOptions' => $location_options,
157
- ) )
158
- ),
159
- 'before'
160
- );
161
- }
162
- }
163
- endif;
1
+ <?php
2
+ /**
3
+ * Methods for handling blocks in the Gutenberg editor
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2018, Theme of the Crop
7
+ * @license GPL-2.0+
8
+ * @since 1.2.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpBlocks', false ) ) :
14
+
15
+ /**
16
+ * Class to create, edit and display blocks for the Gutenberg editor
17
+ *
18
+ * @since 1.2
19
+ */
20
+ class bpfwpBlocks {
21
+
22
+ /**
23
+ * Register hooks
24
+ *
25
+ * @since 1.2
26
+ * @access public
27
+ * @return void
28
+ */
29
+ public function run() {
30
+ add_action( 'init', array( $this, 'register' ) );
31
+ }
32
+
33
+ /**
34
+ * Register blocks
35
+ *
36
+ * @since 1.1
37
+ * @access public
38
+ * @return void
39
+ */
40
+ public function register() {
41
+
42
+ if ( !function_exists( 'register_block_type' ) ) {
43
+ return;
44
+ }
45
+
46
+ wp_register_script(
47
+ 'business-profile-blocks',
48
+ BPFWP_PLUGIN_URL . '/assets/js/blocks.build.js',
49
+ array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor' )
50
+ );
51
+
52
+ wp_register_script(
53
+ 'bpfwp-map',
54
+ BPFWP_PLUGIN_URL . '/assets/js/map.js',
55
+ array( 'jquery' ),
56
+ BPFWP_VERSION,
57
+ true
58
+ );
59
+
60
+ wp_register_style(
61
+ 'bpfwp-default',
62
+ BPFWP_PLUGIN_URL . '/assets/css/contact-card.css',
63
+ array()
64
+ );
65
+
66
+ register_block_type( 'business-profile/contact-card', array(
67
+ 'editor_script' => array('business-profile-blocks', 'bpfwp-map'),
68
+ 'editor_style' => 'bpfwp-default',
69
+ 'render_callback' => 'bpwfwp_print_contact_card',
70
+ 'attributes' => array(
71
+ 'location' => array(
72
+ 'type' => 'number',
73
+ 'minimum' => '0',
74
+ ),
75
+ 'show_name' => array(
76
+ 'type' => 'boolean',
77
+ 'default' => true,
78
+ ),
79
+ 'show_address' => array(
80
+ 'type' => 'boolean',
81
+ 'default' => true,
82
+ ),
83
+ 'show_get_directions' => array(
84
+ 'type' => 'boolean',
85
+ 'default' => true,
86
+ ),
87
+ 'show_phone' => array(
88
+ 'type' => 'boolean',
89
+ 'default' => true,
90
+ ),
91
+ 'show_contact' => array(
92
+ 'type' => 'boolean',
93
+ 'default' => true,
94
+ ),
95
+ 'show_opening_hours' => array(
96
+ 'type' => 'boolean',
97
+ 'default' => true,
98
+ ),
99
+ 'show_opening_hours_brief' => array(
100
+ 'type' => 'boolean',
101
+ 'default' => false,
102
+ ),
103
+ 'show_map' => array(
104
+ 'type' => 'boolean',
105
+ 'default' => true,
106
+ ),
107
+ 'show_image' => array(
108
+ 'type' => 'boolean',
109
+ 'default' => true,
110
+ ),
111
+ ),
112
+ ) );
113
+
114
+ add_action( 'admin_init', array( $this, 'register_admin' ) );
115
+ }
116
+
117
+ /**
118
+ * Register admin-only assets for block handling
119
+ *
120
+ * @since 1.2
121
+ * @access public
122
+ * @return void
123
+ */
124
+ public function register_admin() {
125
+
126
+ global $bpfwp_controller;
127
+
128
+ $location_options = array();
129
+
130
+ if ( $bpfwp_controller->settings->get_setting( 'multiple-locations' ) ) {
131
+ $locations = new WP_Query( array(
132
+ 'post_type' => $bpfwp_controller->cpts->location_cpt_slug,
133
+ 'posts_per_page' => 1000,
134
+ 'post_status' => 'publish',
135
+ ) );
136
+
137
+ $location_options = array( array(
138
+ 'value' => 0,
139
+ 'label' => __('Use the main Business Profile'),
140
+ ) );
141
+ while ( $locations->have_posts() ) {
142
+ $locations->the_post();
143
+ $location_options[] = array(
144
+ 'value' => get_the_ID(),
145
+ 'label' => get_the_title(),
146
+ );
147
+ }
148
+ wp_reset_postdata();
149
+ }
150
+
151
+ wp_add_inline_script(
152
+ 'business-profile-blocks',
153
+ sprintf(
154
+ 'var bpfwp_blocks = %s;',
155
+ json_encode( array(
156
+ 'locationOptions' => $location_options,
157
+ ) )
158
+ ),
159
+ 'before'
160
+ );
161
+ }
162
+ }
163
+ endif;
includes/class-compatibility.php CHANGED
@@ -1,83 +1,83 @@
1
- <?php
2
- /**
3
- * Provide backwards compatibility for older versions of Business Profile.
4
- *
5
- * @package BusinessProfile
6
- * @copyright Copyright (c) 2016, Theme of the Crop
7
- * @license GPL-2.0+
8
- * @since 1.0.6
9
- */
10
-
11
- defined( 'ABSPATH' ) || exit;
12
-
13
- if ( ! class_exists( 'bpfwpCompatibility', false ) ) :
14
-
15
- /**
16
- * Class to handle backwards compatibility issues for Business Profile.
17
- *
18
- * @since 1.0.6
19
- */
20
- class bpfwpCompatibility {
21
-
22
- /**
23
- * Set up hooks.
24
- *
25
- * @since 1.0.6
26
- * @access public
27
- * @return void
28
- */
29
- public function __construct() {
30
- // Preserve this defined constant in case anyone relied on it
31
- // to check if the plugin was active.
32
- define( 'BPFWP_TEXTDOMAIN', 'bpfwpdomain' );
33
-
34
- // Load a .mo file for an old textdomain if one exists.
35
- add_filter( 'load_textdomain_mofile', array( $this, 'load_old_textdomain' ), 10, 2 );
36
-
37
- // Run a filter that was renamed in version 1.1.
38
- add_filter( 'bpfwp_default_display_settings', array( $this, 'run_contact_card_defaults' ) );
39
-
40
- }
41
-
42
- /**
43
- * Load a .mo file for an old textdomain if one exists
44
- *
45
- * In versions prior to 1.0.6, the textdomain did not match the plugin
46
- * slug. This had to be changed to comply with upcoming changes to
47
- * how translations are managed in the .org repo. This function
48
- * checks to see if an old translation file exists and loads it if
49
- * it does, so that people don't lose their translations.
50
- *
51
- * Old textdomain: bpfwpdomain
52
- *
53
- * @since 1.0.6
54
- * @access public
55
- * @param string $mofile The path to the current mofile.
56
- * @param string $textdomain The current textdomain.
57
- * @return string $mofile The modified mofile.
58
- */
59
- public function load_old_textdomain( $mofile, $textdomain ) {
60
- if ( 'business-profile' !== $textdomain ) {
61
- return $mofile;
62
- }
63
-
64
- if ( 0 === strpos( $mofile, WP_LANG_DIR . '/plugins/' ) && ! file_exists( $mofile ) ) {
65
- $mofile = dirname( $mofile ) . DIRECTORY_SEPARATOR . str_replace( $textdomain, 'bpfwpdomain', basename( $mofile ) );
66
- }
67
-
68
- return $mofile;
69
- }
70
-
71
- /**
72
- * Run a filter that was renamed in version 1.1
73
- *
74
- * @since 1.1
75
- * @access public
76
- * @param array $defaults The contact card defaults.
77
- * @return array $defaults The filtered contact card defaults.
78
- */
79
- public function run_contact_card_defaults( $defaults ) {
80
- return apply_filters( 'bpwfp_contact_card_defaults', $defaults );
81
- }
82
- }
83
- endif;
1
+ <?php
2
+ /**
3
+ * Provide backwards compatibility for older versions of Business Profile.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2016, Theme of the Crop
7
+ * @license GPL-2.0+
8
+ * @since 1.0.6
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpCompatibility', false ) ) :
14
+
15
+ /**
16
+ * Class to handle backwards compatibility issues for Business Profile.
17
+ *
18
+ * @since 1.0.6
19
+ */
20
+ class bpfwpCompatibility {
21
+
22
+ /**
23
+ * Set up hooks.
24
+ *
25
+ * @since 1.0.6
26
+ * @access public
27
+ * @return void
28
+ */
29
+ public function __construct() {
30
+ // Preserve this defined constant in case anyone relied on it
31
+ // to check if the plugin was active.
32
+ define( 'BPFWP_TEXTDOMAIN', 'bpfwpdomain' );
33
+
34
+ // Load a .mo file for an old textdomain if one exists.
35
+ add_filter( 'load_textdomain_mofile', array( $this, 'load_old_textdomain' ), 10, 2 );
36
+
37
+ // Run a filter that was renamed in version 1.1.
38
+ add_filter( 'bpfwp_default_display_settings', array( $this, 'run_contact_card_defaults' ) );
39
+
40
+ }
41
+
42
+ /**
43
+ * Load a .mo file for an old textdomain if one exists
44
+ *
45
+ * In versions prior to 1.0.6, the textdomain did not match the plugin
46
+ * slug. This had to be changed to comply with upcoming changes to
47
+ * how translations are managed in the .org repo. This function
48
+ * checks to see if an old translation file exists and loads it if
49
+ * it does, so that people don't lose their translations.
50
+ *
51
+ * Old textdomain: bpfwpdomain
52
+ *
53
+ * @since 1.0.6
54
+ * @access public
55
+ * @param string $mofile The path to the current mofile.
56
+ * @param string $textdomain The current textdomain.
57
+ * @return string $mofile The modified mofile.
58
+ */
59
+ public function load_old_textdomain( $mofile, $textdomain ) {
60
+ if ( 'business-profile' !== $textdomain ) {
61
+ return $mofile;
62
+ }
63
+
64
+ if ( 0 === strpos( $mofile, WP_LANG_DIR . '/plugins/' ) && ! file_exists( $mofile ) ) {
65
+ $mofile = dirname( $mofile ) . DIRECTORY_SEPARATOR . str_replace( $textdomain, 'bpfwpdomain', basename( $mofile ) );
66
+ }
67
+
68
+ return $mofile;
69
+ }
70
+
71
+ /**
72
+ * Run a filter that was renamed in version 1.1
73
+ *
74
+ * @since 1.1
75
+ * @access public
76
+ * @param array $defaults The contact card defaults.
77
+ * @return array $defaults The filtered contact card defaults.
78
+ */
79
+ public function run_contact_card_defaults( $defaults ) {
80
+ return apply_filters( 'bpwfp_contact_card_defaults', $defaults );
81
+ }
82
+ }
83
+ endif;
includes/class-contact-card-widget.php CHANGED
@@ -1,167 +1,167 @@
1
- <?php
2
- /**
3
- * The contact card widget class.
4
- *
5
- * @package BusinessProfile
6
- * @copyright Copyright (c) 2016, Theme of the Crop
7
- * @license GPL-2.0+
8
- * @since 0.0.1
9
- */
10
-
11
- defined( 'ABSPATH' ) || exit;
12
-
13
- if ( ! class_exists( 'WP_Widget', false ) ) {
14
- require_once ABSPATH . 'wp-admin/includes/widgets.php';
15
- }
16
-
17
- if ( ! class_exists( 'bpfwpContactCardWidget', false ) ) :
18
-
19
- /**
20
- * Contact card widget
21
- *
22
- * Extends WP_Widget to display a contact card in a widget.
23
- *
24
- * @since 0.0.1
25
- */
26
- class bpfwpContactCardWidget extends WP_Widget {
27
-
28
- /**
29
- * Register widget with WordPress.
30
- *
31
- * @since 0.0.1
32
- * @access public
33
- * @return void
34
- */
35
- public function __construct() {
36
-
37
- // Display toggles.
38
- $this->toggles = apply_filters( 'bpfwp_widget_display_toggles', array(
39
- 'show_name' => __( 'Show Name', 'business-profile' ),
40
- 'show_address' => __( 'Show Address', 'business-profile' ),
41
- 'show_get_directions' => __( 'Show link to get directions on Google Maps', 'business-profile' ),
42
- 'show_phone' => __( 'Show Phone number', 'business-profile' ),
43
- 'show_contact' => __( 'Show contact details', 'business-profile' ),
44
- 'show_opening_hours' => __( 'Show Opening Hours', 'business-profile' ),
45
- 'show_opening_hours_brief' => __( 'Show brief opening hours on one line', 'business-profile' ),
46
- 'show_map' => __( 'Show Google Map', 'business-profile' ),
47
- )
48
- );
49
-
50
- parent::__construct(
51
- 'bpfwp_contact_card_widget',
52
- __( 'Contact Card', 'business-profile' ),
53
- array( 'description' => __( 'Display a contact card with your name, address, phone number, opening hours and map.', 'business-profile' ) )
54
- );
55
-
56
- }
57
-
58
- /**
59
- * Print the widget content
60
- *
61
- * @since 0.0.1
62
- * @access public
63
- * @param array $args Display arguments including before_title, after_title, before_widget, and after_widget.
64
- * @param array $instance The settings for the particular instance of the widget.
65
- * @return void
66
- */
67
- public function widget( $args, $instance ) {
68
- echo $args['before_widget'];
69
- if ( isset( $instance['title'] ) ) {
70
- $title = apply_filters( 'widget_title', $instance['title'] );
71
- echo $args['before_title'] . $title . $args['after_title'];
72
- }
73
- echo bpwfwp_print_contact_card( $instance );
74
- echo $args['after_widget'];
75
- }
76
-
77
- /**
78
- * Print the form to configure this widget in the admin panel.
79
- *
80
- * @since 1.0
81
- * @access public
82
- * @global object $bpfwp_controller BPFWP controller class instance.
83
- * @param array $instance Current widget settings.
84
- * @return void
85
- */
86
- public function form( $instance ) {
87
- global $bpfwp_controller;
88
- ?>
89
-
90
- <p>
91
- <label for="<?php echo $this->get_field_id( 'title' ); ?>"> <?php _e( 'Title' ); ?></label>
92
- <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text"<?php if ( isset( $instance['title'] ) ) : ?> value="<?php echo esc_attr( $instance['title'] ); ?>"<?php endif; ?>>
93
- </p>
94
-
95
- <?php
96
- if ( $bpfwp_controller->settings->get_setting( 'multiple-locations' ) ) :
97
-
98
- // Get an array of all locations with sane limits.
99
- $locations = array();
100
- $query = new WP_Query( array(
101
- 'post_type' => array( $bpfwp_controller->cpts->location_cpt_slug ),
102
- 'no_found_rows' => true,
103
- 'update_post_meta_cache' => false,
104
- 'update_post_term_cache' => false,
105
- 'posts_per_page' => 500,
106
- ) );
107
- if ( $query->have_posts() ) {
108
- while ( $query->have_posts() ) {
109
- $query->next_post();
110
- $locations[ $query->post->ID ] = $query->post->post_title;
111
- }
112
- }
113
- wp_reset_postdata();
114
- ?>
115
-
116
- <p>
117
- <label for="<?php echo $this->get_field_id( 'location' ); ?>"> <?php _e( 'Location' ); ?></label>
118
- <select name="<?php echo $this->get_field_name( 'location' ); ?>" id="<?php echo $this->get_field_id( 'location' ); ?>" class="widefat">
119
- <option><?php esc_html_e( 'Use Primary Business Profile' ); ?></option>
120
- <?php foreach ( $locations as $id => $title ) : ?>
121
- <option value="<?php echo absint( $id ); ?>"<?php if ( isset( $instance['location'] ) && $instance['location'] === $id ) : ?> selected<?php endif; ?>>
122
- <?php esc_attr_e( $title ); ?>
123
- </option>
124
- <?php endforeach; ?>
125
- </select>
126
- </p>
127
-
128
- <?php endif; // Locations. ?>
129
-
130
- <?php foreach ( $this->toggles as $id => $label ) : ?>
131
-
132
- <p>
133
- <input type="checkbox" id="<?php echo $this->get_field_id( $id ); ?>" name="<?php echo $this->get_field_name( $id ); ?>" value="1"<?php if ( ! empty( $instance[ $id ] ) ) : ?> checked="checked"<?php endif; ?>>
134
- <label for="<?php echo $this->get_field_id( $id ); ?>"> <?php echo $label; ?></label>
135
- </p>
136
-
137
- <?php endforeach;
138
- }
139
-
140
- /**
141
- * Sanitize and save the widget form values.
142
- *
143
- * @since 1.0
144
- * @access public
145
- * @param array $new_instance New settings for this instance as input by the user via form().
146
- * @param array $old_instance Old settings for this instance.
147
- * @return array $instance Settings to be saved.
148
- */
149
- public function update( $new_instance, $old_instance ) {
150
-
151
- $instance = array();
152
- if ( ! empty( $new_instance['title'] ) ) {
153
- $instance['title'] = strip_tags( $new_instance['title'] );
154
- }
155
-
156
- if ( ! empty( $new_instance['location'] ) ) {
157
- $instance['location'] = absint( $new_instance['location'] );
158
- }
159
-
160
- foreach ( $this->toggles as $id => $label ) {
161
- $instance[ $id ] = empty( $new_instance[ $id ] ) ? false : true;
162
- }
163
-
164
- return $instance;
165
- }
166
- }
167
- endif;
1
+ <?php
2
+ /**
3
+ * The contact card widget class.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2016, Theme of the Crop
7
+ * @license GPL-2.0+
8
+ * @since 0.0.1
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'WP_Widget', false ) ) {
14
+ require_once ABSPATH . 'wp-admin/includes/widgets.php';
15
+ }
16
+
17
+ if ( ! class_exists( 'bpfwpContactCardWidget', false ) ) :
18
+
19
+ /**
20
+ * Contact card widget
21
+ *
22
+ * Extends WP_Widget to display a contact card in a widget.
23
+ *
24
+ * @since 0.0.1
25
+ */
26
+ class bpfwpContactCardWidget extends WP_Widget {
27
+
28
+ /**
29
+ * Register widget with WordPress.
30
+ *
31
+ * @since 0.0.1
32
+ * @access public
33
+ * @return void
34
+ */
35
+ public function __construct() {
36
+
37
+ // Display toggles.
38
+ $this->toggles = apply_filters( 'bpfwp_widget_display_toggles', array(
39
+ 'show_name' => __( 'Show Name', 'business-profile' ),
40
+ 'show_address' => __( 'Show Address', 'business-profile' ),
41
+ 'show_get_directions' => __( 'Show link to get directions on Google Maps', 'business-profile' ),
42
+ 'show_phone' => __( 'Show Phone number', 'business-profile' ),
43
+ 'show_contact' => __( 'Show contact details', 'business-profile' ),
44
+ 'show_opening_hours' => __( 'Show Opening Hours', 'business-profile' ),
45
+ 'show_opening_hours_brief' => __( 'Show brief opening hours on one line', 'business-profile' ),
46
+ 'show_map' => __( 'Show Google Map', 'business-profile' ),
47
+ )
48
+ );
49
+
50
+ parent::__construct(
51
+ 'bpfwp_contact_card_widget',
52
+ __( 'Contact Card', 'business-profile' ),
53
+ array( 'description' => __( 'Display a contact card with your name, address, phone number, opening hours and map.', 'business-profile' ) )
54
+ );
55
+
56
+ }
57
+
58
+ /**
59
+ * Print the widget content
60
+ *
61
+ * @since 0.0.1
62
+ * @access public
63
+ * @param array $args Display arguments including before_title, after_title, before_widget, and after_widget.
64
+ * @param array $instance The settings for the particular instance of the widget.
65
+ * @return void
66
+ */
67
+ public function widget( $args, $instance ) {
68
+ echo $args['before_widget'];
69
+ if ( isset( $instance['title'] ) ) {
70
+ $title = apply_filters( 'widget_title', $instance['title'] );
71
+ echo $args['before_title'] . $title . $args['after_title'];
72
+ }
73
+ echo bpwfwp_print_contact_card( $instance );
74
+ echo $args['after_widget'];
75
+ }
76
+
77
+ /**
78
+ * Print the form to configure this widget in the admin panel.
79
+ *
80
+ * @since 1.0
81
+ * @access public
82
+ * @global object $bpfwp_controller BPFWP controller class instance.
83
+ * @param array $instance Current widget settings.
84
+ * @return void
85
+ */
86
+ public function form( $instance ) {
87
+ global $bpfwp_controller;
88
+ ?>
89
+
90
+ <p>
91
+ <label for="<?php echo $this->get_field_id( 'title' ); ?>"> <?php _e( 'Title' ); ?></label>
92
+ <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text"<?php if ( isset( $instance['title'] ) ) : ?> value="<?php echo esc_attr( $instance['title'] ); ?>"<?php endif; ?>>
93
+ </p>
94
+
95
+ <?php
96
+ if ( $bpfwp_controller->settings->get_setting( 'multiple-locations' ) ) :
97
+
98
+ // Get an array of all locations with sane limits.
99
+ $locations = array();
100
+ $query = new WP_Query( array(
101
+ 'post_type' => array( $bpfwp_controller->cpts->location_cpt_slug ),
102
+ 'no_found_rows' => true,
103
+ 'update_post_meta_cache' => false,
104
+ 'update_post_term_cache' => false,
105
+ 'posts_per_page' => 500,
106
+ ) );
107
+ if ( $query->have_posts() ) {
108
+ while ( $query->have_posts() ) {
109
+ $query->next_post();
110
+ $locations[ $query->post->ID ] = $query->post->post_title;
111
+ }
112
+ }
113
+ wp_reset_postdata();
114
+ ?>
115
+
116
+ <p>
117
+ <label for="<?php echo $this->get_field_id( 'location' ); ?>"> <?php _e( 'Location' ); ?></label>
118
+ <select name="<?php echo $this->get_field_name( 'location' ); ?>" id="<?php echo $this->get_field_id( 'location' ); ?>" class="widefat">
119
+ <option><?php esc_html_e( 'Use Primary Business Profile' ); ?></option>
120
+ <?php foreach ( $locations as $id => $title ) : ?>
121
+ <option value="<?php echo absint( $id ); ?>"<?php if ( isset( $instance['location'] ) && $instance['location'] === $id ) : ?> selected<?php endif; ?>>
122
+ <?php esc_attr_e( $title ); ?>
123
+ </option>
124
+ <?php endforeach; ?>
125
+ </select>
126
+ </p>
127
+
128
+ <?php endif; // Locations. ?>
129
+
130
+ <?php foreach ( $this->toggles as $id => $label ) : ?>
131
+
132
+ <p>
133
+ <input type="checkbox" id="<?php echo $this->get_field_id( $id ); ?>" name="<?php echo $this->get_field_name( $id ); ?>" value="1"<?php if ( ! empty( $instance[ $id ] ) ) : ?> checked="checked"<?php endif; ?>>
134
+ <label for="<?php echo $this->get_field_id( $id ); ?>"> <?php echo $label; ?></label>
135
+ </p>
136
+
137
+ <?php endforeach;
138
+ }
139
+
140
+ /**
141
+ * Sanitize and save the widget form values.
142
+ *
143
+ * @since 1.0
144
+ * @access public
145
+ * @param array $new_instance New settings for this instance as input by the user via form().
146
+ * @param array $old_instance Old settings for this instance.
147
+ * @return array $instance Settings to be saved.
148
+ */
149
+ public function update( $new_instance, $old_instance ) {
150
+
151
+ $instance = array();
152
+ if ( ! empty( $new_instance['title'] ) ) {
153
+ $instance['title'] = strip_tags( $new_instance['title'] );
154
+ }
155
+
156
+ if ( ! empty( $new_instance['location'] ) ) {
157
+ $instance['location'] = absint( $new_instance['location'] );
158
+ }
159
+
160
+ foreach ( $this->toggles as $id => $label ) {
161
+ $instance[ $id ] = empty( $new_instance[ $id ] ) ? false : true;
162
+ }
163
+
164
+ return $instance;
165
+ }
166
+ }
167
+ endif;
includes/class-custom-post-types.php CHANGED
@@ -1,568 +1,1093 @@
1
- <?php
2
- /**
3
- * Methods for our location custom post types.
4
- *
5
- * @package BusinessProfile
6
- * @copyright Copyright (c) 2016, Theme of the Crop
7
- * @license GPL-2.0+
8
- * @since 1.1.0
9
- */
10
-
11
- defined( 'ABSPATH' ) || exit;
12
-
13
- if ( ! class_exists( 'bpfwpCustomPostTypes', false ) ) :
14
-
15
- /**
16
- * Class to handle custom post type and post meta fields
17
- *
18
- * @since 1.1
19
- */
20
- class bpfwpCustomPostTypes {
21
-
22
- /**
23
- * Location post type slug
24
- *
25
- * @since 1.1
26
- * @access public
27
- * @var string
28
- */
29
- public $location_cpt_slug = 'location';
30
-
31
- /**
32
- * Register hooks
33
- *
34
- * @since 1.1
35
- * @access public
36
- * @return void
37
- */
38
- public function run() {
39
- add_action( 'init', array( $this, 'load_cpts' ) );
40
- add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) );
41
- add_action( 'edit_form_after_title', array( $this, 'add_meta_nonce' ) );
42
- add_action( 'save_post', array( $this, 'save_meta' ) );
43
- add_action( 'current_screen', array( $this, 'maybe_flush_rewrite_rules' ) );
44
- add_action( 'the_content', array( $this, 'append_to_content' ) );
45
- }
46
-
47
- /**
48
- * Register custom post types
49
- *
50
- * @since 1.1
51
- * @access public
52
- * @return void
53
- */
54
- public function load_cpts() {
55
-
56
- // Define the booking custom post type.
57
- $args = array(
58
- 'labels' => array(
59
- 'name' => __( 'Locations', 'business-profile' ),
60
- 'singular_name' => __( 'Location', 'business-profile' ),
61
- 'menu_name' => __( 'Locations', 'business-profile' ),
62
- 'name_admin_bar' => __( 'Locations', 'business-profile' ),
63
- 'add_new' => __( 'Add New', 'business-profile' ),
64
- 'add_new_item' => __( 'Add New Location', 'business-profile' ),
65
- 'edit_item' => __( 'Edit Location', 'business-profile' ),
66
- 'new_item' => __( 'New Location', 'business-profile' ),
67
- 'view_item' => __( 'View Location', 'business-profile' ),
68
- 'view_items' => __( 'View Locations', 'business-profile' ),
69
- 'search_items' => __( 'Search Locations', 'business-profile' ),
70
- 'not_found' => __( 'No locations found', 'business-profile' ),
71
- 'not_found_in_trash' => __( 'No locations found in trash', 'business-profile' ),
72
- 'all_items' => __( 'All Locations', 'business-profile' ),
73
- ),
74
- 'public' => true,
75
- 'show_in_menu' => 'bpfwp-locations',
76
- 'show_in_rest' => true,
77
- 'has_archive' => true,
78
- 'supports' => array( 'title', 'editor', 'thumbnail' ),
79
- );
80
-
81
- $this->location_cpt_slug = apply_filters( 'bpfwp_location_cpt_slug', $this->location_cpt_slug );
82
-
83
- // Create filter so addons can modify the arguments.
84
- $args = apply_filters( 'bpfwp_location_cpt_args', $args );
85
-
86
- // Register the post type.
87
- register_post_type( $this->location_cpt_slug, $args );
88
- }
89
-
90
- /**
91
- * Flush the rewrite rules
92
- *
93
- * This should only be called on plugin activation.
94
- *
95
- * @since 1.1
96
- * @access public
97
- * @return void
98
- */
99
- public function flush_rewrite_rules() {
100
-
101
- // Load CPTs before flushing, as recommended in the Codex.
102
- $this->load_cpts();
103
-
104
- flush_rewrite_rules();
105
- }
106
-
107
- /**
108
- * Maybe flush the rewrite rules if the multiple locations option has
109
- * been turned on.
110
- *
111
- * Should only be run on the Business Profile settings page
112
- *
113
- * @since 1.1
114
- * @access public
115
- * @param string $current_screen The current admin screen slug.
116
- * @return void
117
- */
118
- public function maybe_flush_rewrite_rules( $current_screen ) {
119
-
120
- global $admin_page_hooks;
121
- if ( empty( $admin_page_hooks['bpfwp-locations'] ) || $current_screen->base !== $admin_page_hooks['bpfwp-locations'] . '_page_bpfwp-settings' ) {
122
- return;
123
- }
124
-
125
- if ( ! bpfwp_setting( 'multiple-locations' ) ) {
126
- return;
127
- }
128
-
129
- $rules = get_option( 'rewrite_rules' );
130
- if ( ! array_key_exists( $this->location_cpt_slug . '/?$', $rules ) ) {
131
- $this->flush_rewrite_rules();
132
- }
133
- }
134
-
135
- /**
136
- * Add meta boxes when adding/editing locations
137
- *
138
- * @since 1.1
139
- * @access public
140
- * @return void
141
- */
142
- public function add_meta_boxes() {
143
-
144
- $meta_boxes = array(
145
-
146
- // Metabox to enter schema type.
147
- array(
148
- 'id' => 'bpfwp_schema_metabox',
149
- 'title' => __( 'Schema Type', 'business-profile' ),
150
- 'callback' => array( $this, 'print_schema_metabox' ),
151
- 'post_type' => $this->location_cpt_slug,
152
- 'context' => 'side',
153
- 'priority' => 'default',
154
- ),
155
-
156
- // Metabox to enter phone number, contact email address and
157
- // select a contact page.
158
- array(
159
- 'id' => 'bpfwp_contact_metabox',
160
- 'title' => __( 'Contact Details', 'business-profile' ),
161
- 'callback' => array( $this, 'print_contact_metabox' ),
162
- 'post_type' => $this->location_cpt_slug,
163
- 'context' => 'side',
164
- 'priority' => 'default',
165
- ),
166
-
167
- // Metabox to enter opening hours.
168
- array(
169
- 'id' => 'bpfwp_opening_hours_metabox',
170
- 'title' => __( 'Opening Hours', 'business-profile' ),
171
- 'callback' => array( $this, 'print_opening_hours_metabox' ),
172
- 'post_type' => $this->location_cpt_slug,
173
- 'context' => 'normal',
174
- 'priority' => 'default',
175
- ),
176
-
177
- );
178
-
179
- // Create filter so addons can modify the metaboxes.
180
- $meta_boxes = apply_filters( 'bpfwp_meta_boxes', $meta_boxes );
181
-
182
- // Create the metaboxes.
183
- foreach ( $meta_boxes as $meta_box ) {
184
- add_meta_box(
185
- $meta_box['id'],
186
- $meta_box['title'],
187
- $meta_box['callback'],
188
- $meta_box['post_type'],
189
- $meta_box['context'],
190
- $meta_box['priority']
191
- );
192
- }
193
- }
194
-
195
- /**
196
- * Output a hidden nonce field to secure the saving of post meta
197
- *
198
- * @since 1.1
199
- * @access public
200
- * @return void
201
- */
202
- public function add_meta_nonce() {
203
- global $post;
204
- if ( $post->post_type === $this->location_cpt_slug ) {
205
- wp_nonce_field( 'bpfwp_location_meta', 'bpfwp_location_meta_nonce' );
206
- }
207
- }
208
-
209
- /**
210
- * Output the metabox HTML to select a schema type
211
- *
212
- * @since 1.1
213
- * @access public
214
- * @param WP_Post $post The current post object.
215
- * @return void
216
- */
217
- public function print_schema_metabox( $post ) {
218
-
219
- global $bpfwp_controller;
220
- $schema_types = $bpfwp_controller->settings->get_schema_types();
221
- $selected = bpfwp_setting( 'schema-type', $post->ID );
222
-
223
- // Fall back to general setting.
224
- if ( empty( $selected ) ) {
225
- $selected = bpfwp_setting( 'schema-type' );
226
- }
227
- ?>
228
-
229
- <div class="bpfwp-meta-input bpfwp-meta-schema-type">
230
- <label for="bpfwp_schema-type">
231
- <?php esc_html_e( 'Schema type', 'business-profile' ); ?>
232
- </label>
233
- <select name="schema_type" id="bpfwp_schema-type" aria-describedby="bpfwp_schema-type_description">
234
- <?php foreach ( $schema_types as $key => $label ) : ?>
235
- <option value="<?php esc_attr_e( $key ); ?>"<?php if ( $selected === $key ) : ?> selected<?php endif; ?>>
236
- <?php esc_attr_e( $label ); ?>
237
- </option>
238
- <?php endforeach; ?>
239
- </select>
240
- <p class="description" id="bpfwp_schema-type_description">
241
- <?php esc_html_e( 'Select the option that best describes your business to improve how search engines understand your website.', 'business-profile' ); ?>
242
- <a href="http://schema.org/" target="_blank">Schema.org</a>
243
- </p>
244
- </div>
245
-
246
- <?php
247
- }
248
-
249
- /**
250
- * Output the metabox HTML to enter a phone number,
251
- * contact email address and select a contact page.
252
- *
253
- * @since 1.1
254
- * @access public
255
- * @param WP_Post $post The current post object.
256
- * @return void
257
- */
258
- public function print_contact_metabox( $post ) {
259
-
260
- global $bpfwp_controller;
261
-
262
- // Address mimics HTML markup from Simple Admin Pages component.
263
- wp_enqueue_script( 'bpfwp-admin-location-address', BPFWP_PLUGIN_URL . '/lib/simple-admin-pages/js/address.js', array( 'jquery' ) );
264
- wp_localize_script(
265
- 'bpfwp-admin-location-address',
266
- 'sap_address',
267
- array(
268
- 'api_key' => $bpfwp_controller->settings->get_setting( 'google-maps-api-key' ),
269
- 'strings' => array(
270
- 'no-setting' => __( 'No map coordinates set.', 'business-profile' ),
271
- 'sep-lat-lon' => _x( ', ', 'separates latitude and longitude', 'business-profile' ),
272
- 'retrieving' => __( 'Requesting new coordinates', 'business-profile' ),
273
- 'select' => __( 'Select a match below', 'business-profile' ),
274
- 'view' => __( 'View', 'business-profile' ),
275
- 'result_error' => __( 'Error', 'business-profile' ),
276
- 'result_invalid' => __( 'Invalid request. Be sure to fill out the address field before retrieving coordinates.', 'business-profile' ),
277
- 'result_denied' => __( 'Request denied.', 'business-profile' ),
278
- 'result_limit' => __( 'Request denied because you are over your request quota.', 'business-profile' ),
279
- 'result_empty' => __( 'Nothing was found at that address.', 'business-profile' ),
280
- ),
281
- )
282
- );
283
- ?>
284
-
285
- <div class="bpfwp-meta-input bpfwp-meta-geo_address sap-address">
286
- <textarea name="geo_address" id="bpfwp_address"><?php echo esc_textarea( get_post_meta( $post->ID, 'geo_address', true ) ); ?></textarea>
287
- <p class="sap-map-coords-wrapper">
288
- <span class="dashicons dashicons-location-alt"></span>
289
- <span class="sap-map-coords">
290
- <?php
291
- $geo_latitude = get_post_meta( $post->ID, 'geo_latitude', true );
292
- $geo_longitude = get_post_meta( $post->ID, 'geo_longitude', true );
293
- if ( empty( $geo_latitude ) || empty( $geo_longitude ) ) :
294
- esc_html_e( 'No map coordinates set.', 'business-profile' );
295
- else : ?>
296
- <?php echo get_post_meta( $post->ID, 'geo_latitude', true ) . esc_html_x( ', ', 'separates latitude and longitude', 'business-profile' ) . get_post_meta( $post->ID, 'geo_longitude', true ); ?>
297
- <a href="//maps.google.com/maps?q=<?php echo esc_attr( get_post_meta( $post->ID, 'geo_latitude', true ) ) . ',' . esc_attr( get_post_meta( $post->ID, 'geo_longitude', true ) ); ?>" class="sap-view-coords" target="_blank"><?php esc_html_e( 'View', 'business-profile' ); ?></a>
298
- <?php
299
- endif; ?>
300
- </span>
301
- </p>
302
- <p class="sap-coords-action-wrapper">
303
- <a href="#" class="sap-get-coords">
304
- <?php esc_html_e( 'Retrieve map coordinates', 'business-profile' ); ?>
305
- </a>
306
- <?php echo esc_html_x( ' | ', 'separator between admin action links in address component', 'business-profile' ); ?>
307
- <a href="#" class="sap-remove-coords">
308
- <?php esc_html_e( 'Remove map coordinates', 'business-profile' ); ?>
309
- </a>
310
- </p>
311
- <input type="hidden" class="lat" name="geo_latitude" value="<?php echo esc_attr( get_post_meta( $post->ID, 'geo_latitude', true ) ); ?>">
312
- <input type="hidden" class="lon" name="geo_longitude" value="<?php echo esc_attr( get_post_meta( $post->ID, 'geo_longitude', true ) ); ?>">
313
- </div>
314
-
315
- <?php
316
- // Get an array of all pages with sane limits.
317
- $pages = array();
318
- $query = new WP_Query( array(
319
- 'post_type' => array( 'page' ),
320
- 'no_found_rows' => true,
321
- 'update_post_meta_cache' => false,
322
- 'update_post_term_cache' => false,
323
- 'posts_per_page' => 500,
324
- ) );
325
- if ( $query->have_posts() ) {
326
- while ( $query->have_posts() ) {
327
- $query->next_post();
328
- $pages[ $query->post->ID ] = $query->post->post_title;
329
- }
330
- }
331
- wp_reset_postdata();
332
- ?>
333
-
334
- <div class="bpfwp-meta-input bpfwp-meta-contact-page">
335
- <label for="bpfwp_contact-page">
336
- <?php esc_html_e( 'Contact Page', 'business-profile' ); ?>
337
- </label>
338
- <select name="contact_post" id="bpfwp_contact-page">
339
- <option></option>
340
- <?php foreach ( $pages as $id => $title ) : ?>
341
- <option value="<?php echo absint( $id ); ?>"<?php if ( get_post_meta( $post->ID, 'contact_post', true ) == $id ) : ?> selected<?php endif; ?>>
342
- <?php esc_attr_e( $title ); ?>
343
- </option>
344
- <?php endforeach; ?>
345
- </select>
346
- </div>
347
-
348
- <div class="bpfwp-meta-input bpfwp-meta-contact-email">
349
- <label for="bpfwp_contact-email">
350
- <?php esc_html_e( 'Email Address (optional)', 'business-profile' ); ?>
351
- </label>
352
- <input type="email" name="contact_email" id="bpfwp_contact-email" value="<?php esc_attr_e( get_post_meta( $post->ID, 'contact_email', true ) ); ?>">
353
- </div>
354
-
355
- <div class="bpfwp-meta-input bpfwp-meta-phone">
356
- <label for="bpfwp_phone">
357
- <?php esc_html_e( 'Phone Number', 'business-profile' ); ?>
358
- </label>
359
- <input type="tel" name="phone" id="bpfwp_phone" value="<?php esc_attr_e( get_post_meta( $post->ID, 'phone', true ) ); ?>">
360
- </div>
361
-
362
- <?php
363
- }
364
-
365
- /**
366
- * Output the metabox HTML to define opening hours
367
- *
368
- * @since 1.1
369
- * @access public
370
- * @param WP_Post $post The current post object.
371
- * @return void
372
- */
373
- public function print_opening_hours_metabox( $post ) {
374
-
375
- $scheduler = $this->get_scheduler_meta_object( get_post_meta( $post->ID, 'opening_hours', true ) );
376
-
377
- // Load required scripts and styles.
378
- wp_enqueue_style( 'bpfwp-admin-location-sap', BPFWP_PLUGIN_URL . '/lib/simple-admin-pages/css/admin.css' );
379
- foreach ( $scheduler->styles as $handle => $style ) {
380
- wp_enqueue_style( $handle, BPFWP_PLUGIN_URL . '/lib/simple-admin-pages/' . $style['path'], $style['dependencies'], $style['version'], $style['media'] );
381
- }
382
- foreach ( $scheduler->scripts as $handle => $script ) {
383
- wp_enqueue_script( $handle, BPFWP_PLUGIN_URL . '/lib/simple-admin-pages/' . $script['path'], $script['dependencies'], $script['version'], $script['footer'] );
384
- }
385
- ?>
386
-
387
- <div class="bpfwp-meta-input bpfwp-meta-opening-hours">
388
- <?php $scheduler->display_setting(); ?>
389
- </div>
390
-
391
- <?php
392
- }
393
-
394
- /**
395
- * Get a modified Scheduler object from the Simple Admin Pages library
396
- *
397
- * This modified scheduler is used to display and sanitize a scheduler
398
- * component on the location post editing screen.
399
- *
400
- * @since 1.1
401
- * @access public
402
- * @see lib/simple-admin-pages/classes/AdminPageSetting.Scheduler.class.php
403
- * @param string $values Optional values to be set.
404
- * @return bpfwpSAPSchedulerMeta $scheduler An instance of the scheduler class.
405
- */
406
- public function get_scheduler_meta_object( $values = null ) {
407
-
408
- require_once BPFWP_PLUGIN_DIR . '/includes/class-sap-scheduler-meta.php';
409
- $scheduler = new bpfwpSAPSchedulerMeta(
410
- array(
411
- 'page' => 'dummy_page', // Required but not used.
412
- 'id' => 'opening_hours',
413
- 'title' => __( 'Opening Hours', 'business-profile' ),
414
- 'description' => __( 'Define your weekly opening hours by adding scheduling rules.', 'business-profile' ),
415
- 'weekdays' => array(
416
- 'monday' => _x( 'Mo', 'Monday abbreviation', 'business-profile' ),
417
- 'tuesday' => _x( 'Tu', 'Tuesday abbreviation', 'business-profile' ),
418
- 'wednesday' => _x( 'We', 'Wednesday abbreviation', 'business-profile' ),
419
- 'thursday' => _x( 'Th', 'Thursday abbreviation', 'business-profile' ),
420
- 'friday' => _x( 'Fr', 'Friday abbreviation', 'business-profile' ),
421
- 'saturday' => _x( 'Sa', 'Saturday abbreviation', 'business-profile' ),
422
- 'sunday' => _x( 'Su', 'Sunday abbreviation', 'business-profile' ),
423
- ),
424
- 'time_format' => _x( 'h:i A', 'Time format displayed in the opening hours setting panel in your admin area. Must match formatting rules at http://amsul.ca/pickadate.js/time.htm#formats', 'business-profile' ),
425
- 'date_format' => _x( 'mmmm d, yyyy', 'Date format displayed in the opening hours setting panel in your admin area. Must match formatting rules at http://amsul.ca/pickadate.js/date.htm#formatting-rules', 'business-profile' ),
426
- 'disable_weeks' => true,
427
- 'disable_date' => true,
428
- 'strings' => array(
429
- 'add_rule' => __( 'Add another opening time', 'business-profile' ),
430
- 'weekly' => _x( 'Weekly', 'Format of a scheduling rule', 'business-profile' ),
431
- 'monthly' => _x( 'Monthly', 'Format of a scheduling rule', 'business-profile' ),
432
- 'date' => _x( 'Date', 'Format of a scheduling rule', 'business-profile' ),
433
- 'weekdays' => _x( 'Days of the week', 'Label for selecting days of the week in a scheduling rule', 'business-profile' ),
434
- 'month_weeks' => _x( 'Weeks of the month', 'Label for selecting weeks of the month in a scheduling rule', 'business-profile' ),
435
- 'date_label' => _x( 'Date', 'Label to select a date for a scheduling rule', 'business-profile' ),
436
- 'time_label' => _x( 'Time', 'Label to select a time slot for a scheduling rule', 'business-profile' ),
437
- 'allday' => _x( 'All day', 'Label to set a scheduling rule to last all day', 'business-profile' ),
438
- 'start' => _x( 'Start', 'Label for the starting time of a scheduling rule', 'business-profile' ),
439
- 'end' => _x( 'End', 'Label for the ending time of a scheduling rule', 'business-profile' ),
440
- 'set_time_prompt' => _x( 'All day long. Want to %sset a time slot%s?', 'Prompt displayed when a scheduling rule is set without any time restrictions', 'business-profile' ),
441
- 'toggle' => _x( 'Open and close this rule', 'Toggle a scheduling rule open and closed', 'business-profile' ),
442
- 'delete' => _x( 'Delete rule', 'Delete a scheduling rule', 'business-profile' ),
443
- 'delete_schedule' => __( 'Delete scheduling rule', 'business-profile' ),
444
- 'never' => _x( 'Never', 'Brief default description of a scheduling rule when no weekdays or weeks are included in the rule', 'business-profile' ),
445
- 'weekly_always' => _x( 'Every day', 'Brief default description of a scheduling rule when all the weekdays/weeks are included in the rule', 'business-profile' ),
446
- 'monthly_weekdays' => _x( '%s on the %s week of the month', 'Brief default description of a scheduling rule when some weekdays are included on only some weeks of the month. %s should be left alone and will be replaced by a comma-separated list of days and weeks in the following format: M, T, W on the first, second week of the month', 'business-profile' ),
447
- 'monthly_weeks' => _x( '%s week of the month', 'Brief default description of a scheduling rule when some weeks of the month are included but all or no weekdays are selected. %s should be left alone and will be replaced by a comma-separated list of weeks in the following format: First, second week of the month', 'business-profile' ),
448
- 'all_day' => _x( 'All day', 'Brief default description of a scheduling rule when no times are set', 'business-profile' ),
449
- 'before' => _x( 'Ends at', 'Brief default description of a scheduling rule when an end time is set but no start time. If the end time is 6pm, it will read: Ends at 6pm', 'business-profile' ),
450
- 'after' => _x( 'Starts at', 'Brief default description of a scheduling rule when a start time is set but no end time. If the start time is 6pm, it will read: Starts at 6pm', 'business-profile' ),
451
- 'separator' => _x( '&mdash;', 'Separator between times of a scheduling rule', 'business-profile' ),
452
- ),
453
- )
454
- );
455
-
456
- if ( ! empty( $values ) ) {
457
- $scheduler->set_value( $values );
458
- }
459
-
460
- return $scheduler;
461
- }
462
-
463
- /**
464
- * Sanitize and save the post meta
465
- *
466
- * The actual sanitization and validation should be
467
- * performed in a bpfwpLocation object which will
468
- * handle all the location data, and perform loading
469
- * and saving.
470
- *
471
- * @since 1.1
472
- * @access public
473
- * @param int $post_id The current post ID.
474
- * @return int $post_id The current post ID.
475
- */
476
- public function save_meta( $post_id ) {
477
- if ( ! isset( $_POST['bpfwp_location_meta_nonce'] ) || ! wp_verify_nonce( sanitize_key( $_POST['bpfwp_location_meta_nonce'] ), 'bpfwp_location_meta' ) ) { // Input var okay.
478
- return $post_id;
479
- }
480
-
481
- if ( ! isset( $_POST['post_type'] ) || $_POST['post_type'] !== $this->location_cpt_slug ) { // Input var okay.
482
- return $post_id;
483
- }
484
-
485
- if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
486
- return $post_id;
487
- }
488
-
489
- if ( ! current_user_can( 'edit_post', $post_id ) ) {
490
- return $post_id;
491
- }
492
-
493
- $post_meta = array(
494
- 'schema_type' => 'sanitize_text_field',
495
- 'geo_address' => 'wp_kses_post',
496
- 'geo_latitude' => 'sanitize_text_field',
497
- 'geo_longitude' => 'sanitize_text_field',
498
- 'phone' => 'sanitize_text_field',
499
- 'contact_post' => 'absint',
500
- 'contact_email' => 'sanitize_email',
501
- 'opening_hours' => array( $this, 'sanitize_opening_hours' ),
502
- );
503
-
504
- foreach ( $post_meta as $key => $sanitizer ) {
505
-
506
- if ( ! isset( $_POST[ $key ] ) ) { // Input var okay.
507
- $_POST[ $key ] = '';
508
- }
509
-
510
- $cur = get_post_meta( $post_id, $key, true );
511
- $new = call_user_func( $sanitizer, wp_unslash( $_POST[ $key ] ) ); // Input var okay.
512
-
513
- if ( $new !== $cur ) {
514
- update_post_meta( $post_id, $key, $new );
515
- }
516
- }
517
-
518
- return $post_id;
519
- }
520
-
521
- /**
522
- * Sanitize opening hours
523
- *
524
- * This is a wrapper for the sanitization callback in the Scheduler
525
- * component of Simple Admin Pages
526
- *
527
- * @since 1.1
528
- * @access public
529
- * @see lib/simple-admin-pages/classes/AdminPageSetting.Scheduler.class.php
530
- * @param array $values Raw values for the opening hours.
531
- * @return array $values Sanitized values for the opening hours.
532
- */
533
- public function sanitize_opening_hours( $values ) {
534
- $scheduler = $this->get_scheduler_meta_object( $values );
535
- return $scheduler->sanitize_callback_wrapper( $values );
536
- }
537
-
538
- /**
539
- * Automatically append a contact card to `the_content` on location
540
- * single pages
541
- *
542
- * @since 1.1
543
- * @access public
544
- * @param string $content The current WordPress content.
545
- * @return string $content The modified WordPress content.
546
- */
547
- public function append_to_content( $content ) {
548
-
549
- if ( ! is_main_query() || ! in_the_loop() || post_password_required() ) {
550
- return $content;
551
- }
552
-
553
- global $bpfwp_controller;
554
-
555
- if ( $bpfwp_controller->get_theme_support( 'disable_append_to_content' ) ) {
556
- return $content;
557
- }
558
-
559
- global $post;
560
-
561
- if ( ! $post instanceof WP_Post || $post->post_type !== $bpfwp_controller->cpts->location_cpt_slug ) {
562
- return $content;
563
- }
564
-
565
- return $content . '[contact-card location=' . $post->ID . ' show_name=0]';
566
- }
567
- }
568
- endif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Methods for our location custom post types.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2016, Theme of the Crop
7
+ * @license GPL-2.0+
8
+ * @since 1.1.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpCustomPostTypes', false ) ) :
14
+
15
+ /**
16
+ * Class to handle custom post type and post meta fields
17
+ *
18
+ * @since 1.1
19
+ */
20
+ class bpfwpCustomPostTypes {
21
+
22
+ /**
23
+ * Whether to load location CPTs or not
24
+ *
25
+ * @since 2.0
26
+ * @access public
27
+ * @var boolean
28
+ */
29
+ public $run_locations = false;
30
+
31
+ /**
32
+ * Location post type slug
33
+ *
34
+ * @since 1.1
35
+ * @access public
36
+ * @var string
37
+ */
38
+ public $location_cpt_slug = 'location';
39
+
40
+ /**
41
+ * Location post type slug
42
+ *
43
+ * @since 1.1
44
+ * @access public
45
+ * @var string
46
+ */
47
+ public $schema_cpt_slug = 'schema';
48
+
49
+ /**
50
+ * Register hooks
51
+ *
52
+ * @since 1.1
53
+ * @access public
54
+ * @return void
55
+ */
56
+ public function run( $run_locations = false) {
57
+ $this->run_locations = $run_locations;
58
+
59
+ add_action( 'init', array( $this, 'load_cpts' ) );
60
+ add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) );
61
+ add_action( 'edit_form_after_title', array( $this, 'add_meta_nonce' ) );
62
+ add_action( 'current_screen', array( $this, 'maybe_flush_rewrite_rules' ) );
63
+ add_action( 'the_content', array( $this, 'append_to_content' ) );
64
+
65
+ add_action( 'save_post_' . $this->location_cpt_slug, array( $this, 'save_location_meta' ) );
66
+ add_action( 'save_post_' . $this->schema_cpt_slug, array( $this, 'save_schema_meta' ) );
67
+
68
+ add_action( 'wp_ajax_bpfwp_get_schema_fields', array( $this, 'get_schema_fields' ) );
69
+ }
70
+
71
+ /**
72
+ * Register custom post types
73
+ *
74
+ * @since 1.1
75
+ * @access public
76
+ * @return void
77
+ */
78
+ public function load_cpts() {
79
+
80
+ // Define the location custom post type.
81
+ $args = array(
82
+ 'labels' => array(
83
+ 'name' => __( 'Locations', 'business-profile' ),
84
+ 'singular_name' => __( 'Location', 'business-profile' ),
85
+ 'menu_name' => __( 'Locations', 'business-profile' ),
86
+ 'name_admin_bar' => __( 'Locations', 'business-profile' ),
87
+ 'add_new' => __( 'Add New', 'business-profile' ),
88
+ 'add_new_item' => __( 'Add New Location', 'business-profile' ),
89
+ 'edit_item' => __( 'Edit Location', 'business-profile' ),
90
+ 'new_item' => __( 'New Location', 'business-profile' ),
91
+ 'view_item' => __( 'View Location', 'business-profile' ),
92
+ 'view_items' => __( 'View Locations', 'business-profile' ),
93
+ 'search_items' => __( 'Search Locations', 'business-profile' ),
94
+ 'not_found' => __( 'No locations found', 'business-profile' ),
95
+ 'not_found_in_trash' => __( 'No locations found in trash', 'business-profile' ),
96
+ 'all_items' => __( 'Locations', 'business-profile' ),
97
+ ),
98
+ 'public' => true,
99
+ 'show_in_menu' => 'bpfwp-business-profile',
100
+ 'show_in_rest' => true,
101
+ 'has_archive' => true,
102
+ 'supports' => array( 'title', 'editor', 'thumbnail' ),
103
+ );
104
+
105
+ $this->location_cpt_slug = apply_filters( 'bpfwp_location_cpt_slug', $this->location_cpt_slug );
106
+
107
+ // Create filter so addons can modify the arguments.
108
+ $args = apply_filters( 'bpfwp_location_cpt_args', $args );
109
+
110
+ // Register the post type.
111
+ if ( $this->run_locations ) { register_post_type( $this->location_cpt_slug, $args ); }
112
+
113
+ // Define the schema custom post type.
114
+ $args = array(
115
+ 'labels' => array(
116
+ 'name' => __( 'Schemas', 'business-profile' ),
117
+ 'singular_name' => __( 'Schema', 'business-profile' ),
118
+ 'menu_name' => __( 'Schemas', 'business-profile' ),
119
+ 'name_admin_bar' => __( 'Schemas', 'business-profile' ),
120
+ 'add_new' => __( 'Add New', 'business-profile' ),
121
+ 'add_new_item' => __( 'Add New Schema', 'business-profile' ),
122
+ 'edit_item' => __( 'Edit Schema', 'business-profile' ),
123
+ 'new_item' => __( 'New Schema', 'business-profile' ),
124
+ 'view_item' => __( 'View Schema', 'business-profile' ),
125
+ 'view_items' => __( 'View Schemas', 'business-profile' ),
126
+ 'search_items' => __( 'Search Schemas', 'business-profile' ),
127
+ 'not_found' => __( 'No schemas found', 'business-profile' ),
128
+ 'not_found_in_trash' => __( 'No schemas found in trash', 'business-profile' ),
129
+ 'all_items' => __( 'Schemas', 'business-profile' ),
130
+ ),
131
+ 'public' => true,
132
+ 'show_ui' => true,
133
+ 'show_in_menu' => 'bpfwp-business-profile',
134
+ 'show_in_rest' => true,
135
+ 'has_archive' => true,
136
+ 'supports' => array( 'title' ),
137
+ );
138
+
139
+ $this->schema_cpt_slug = apply_filters( 'bpfwp_schema_cpt_slug', $this->schema_cpt_slug );
140
+
141
+ // Create filter so addons can modify the arguments.
142
+ $args = apply_filters( 'bpfwp_schema_cpt_args', $args );
143
+
144
+ // Register the post type.
145
+ register_post_type( $this->schema_cpt_slug, $args );
146
+ }
147
+
148
+ /**
149
+ * Flush the rewrite rules
150
+ *
151
+ * This should only be called on plugin activation.
152
+ *
153
+ * @since 1.1
154
+ * @access public
155
+ * @return void
156
+ */
157
+ public function flush_rewrite_rules() {
158
+
159
+ // Load CPTs before flushing, as recommended in the Codex.
160
+ $this->load_cpts();
161
+
162
+ flush_rewrite_rules();
163
+ }
164
+
165
+ /**
166
+ * Maybe flush the rewrite rules if the multiple locations option has
167
+ * been turned on.
168
+ *
169
+ * Should only be run on the Business Profile settings page
170
+ *
171
+ * @since 1.1
172
+ * @access public
173
+ * @param string $current_screen The current admin screen slug.
174
+ * @return void
175
+ */
176
+ public function maybe_flush_rewrite_rules( $current_screen ) {
177
+
178
+ global $admin_page_hooks;
179
+ if ( empty( $admin_page_hooks['bpfwp-locations'] ) || $current_screen->base !== $admin_page_hooks['bpfwp-locations'] . '_page_bpfwp-settings' ) {
180
+ return;
181
+ }
182
+
183
+ if ( ! bpfwp_setting( 'multiple-locations' ) ) {
184
+ return;
185
+ }
186
+
187
+ $rules = get_option( 'rewrite_rules' );
188
+ if ( ! array_key_exists( $this->location_cpt_slug . '/?$', $rules ) ) {
189
+ $this->flush_rewrite_rules();
190
+ }
191
+ }
192
+
193
+ /**
194
+ * Add meta boxes when adding/editing locations
195
+ *
196
+ * @since 1.1
197
+ * @access public
198
+ * @return void
199
+ */
200
+ public function add_meta_boxes() {
201
+
202
+ $meta_boxes = array(
203
+
204
+ // Metabox to enter schema type.
205
+ array(
206
+ 'id' => 'bpfwp_schema_metabox',
207
+ 'title' => __( 'Schema Type', 'business-profile' ),
208
+ 'callback' => array( $this, 'print_schema_metabox' ),
209
+ 'post_type' => $this->location_cpt_slug,
210
+ 'context' => 'side',
211
+ 'priority' => 'default',
212
+ ),
213
+
214
+ // Metabox to enter phone number, contact email address and
215
+ // select a contact page.
216
+ array(
217
+ 'id' => 'bpfwp_contact_metabox',
218
+ 'title' => __( 'Contact Details', 'business-profile' ),
219
+ 'callback' => array( $this, 'print_contact_metabox' ),
220
+ 'post_type' => $this->location_cpt_slug,
221
+ 'context' => 'side',
222
+ 'priority' => 'default',
223
+ ),
224
+
225
+ // Metabox to enter opening hours.
226
+ array(
227
+ 'id' => 'bpfwp_opening_hours_metabox',
228
+ 'title' => __( 'Opening Hours', 'business-profile' ),
229
+ 'callback' => array( $this, 'print_opening_hours_metabox' ),
230
+ 'post_type' => $this->location_cpt_slug,
231
+ 'context' => 'normal',
232
+ 'priority' => 'default',
233
+ ),
234
+
235
+ // Metabox to create Schema for specific post types, categories, etc.
236
+ array(
237
+ 'id' => 'bpfwp_schema_targeting_information',
238
+ 'title' => __( 'Schema Details', 'business-profile' ),
239
+ 'callback' => array( $this, 'print_schema_details_metabox' ),
240
+ 'post_type' => $this->schema_cpt_slug,
241
+ 'context' => 'normal',
242
+ 'priority' => 'high',
243
+ ),
244
+
245
+ );
246
+
247
+ // Create filter so addons can modify the metaboxes.
248
+ $meta_boxes = apply_filters( 'bpfwp_meta_boxes', $meta_boxes );
249
+
250
+ // Create the metaboxes.
251
+ foreach ( $meta_boxes as $meta_box ) {
252
+ add_meta_box(
253
+ $meta_box['id'],
254
+ $meta_box['title'],
255
+ $meta_box['callback'],
256
+ $meta_box['post_type'],
257
+ $meta_box['context'],
258
+ $meta_box['priority']
259
+ );
260
+ }
261
+ }
262
+
263
+ /**
264
+ * Output a hidden nonce field to secure the saving of post meta
265
+ *
266
+ * @since 1.1
267
+ * @access public
268
+ * @return void
269
+ */
270
+ public function add_meta_nonce() {
271
+ global $post;
272
+
273
+ if ( $post->post_type === $this->location_cpt_slug ) {
274
+ wp_nonce_field( 'bpfwp_location_meta', 'bpfwp_location_meta_nonce' );
275
+ }
276
+
277
+ if ( $post->post_type === $this->schema_cpt_slug ) {
278
+ wp_nonce_field( 'bpfwp_schema_meta', 'bpfwp_schema_meta_nonce' );
279
+ }
280
+ }
281
+
282
+ /**
283
+ * Output the metabox HTML to select a schema type
284
+ *
285
+ * @since 1.1
286
+ * @access public
287
+ * @param WP_Post $post The current post object.
288
+ * @return void
289
+ */
290
+ public function print_schema_metabox( $post ) {
291
+
292
+ global $bpfwp_controller;
293
+ $schema_types = $bpfwp_controller->settings->get_schema_types();
294
+ $selected = bpfwp_setting( 'schema-type', $post->ID );
295
+
296
+ // Fall back to general setting.
297
+ if ( empty( $selected ) ) {
298
+ $selected = bpfwp_setting( 'schema-type' );
299
+ }
300
+ ?>
301
+
302
+ <div class="bpfwp-meta-input bpfwp-meta-schema-type">
303
+ <label for="bpfwp_schema-type">
304
+ <?php esc_html_e( 'Schema type', 'business-profile' ); ?>
305
+ </label>
306
+ <select name="schema_type" id="bpfwp_schema-type" aria-describedby="bpfwp_schema-type_description">
307
+ <?php foreach ( $schema_types as $key => $label ) : ?>
308
+ <option value="<?php esc_attr_e( $key ); ?>"<?php if ( $selected === $key ) : ?> selected<?php endif; ?>>
309
+ <?php esc_attr_e( $label ); ?>
310
+ </option>
311
+ <?php endforeach; ?>
312
+ </select>
313
+ <p class="description" id="bpfwp_schema-type_description">
314
+ <?php esc_html_e( 'Select the option that best describes your business to improve how search engines understand your website.', 'business-profile' ); ?>
315
+ <a href="http://schema.org/" target="_blank">Schema.org</a>
316
+ </p>
317
+ </div>
318
+
319
+ <?php
320
+ }
321
+
322
+ /**
323
+ * Output the metabox HTML to enter a phone number,
324
+ * contact email address and select a contact page.
325
+ *
326
+ * @since 1.1
327
+ * @access public
328
+ * @param WP_Post $post The current post object.
329
+ * @return void
330
+ */
331
+ public function print_contact_metabox( $post ) {
332
+
333
+ global $bpfwp_controller;
334
+
335
+ // Address mimics HTML markup from Simple Admin Pages component.
336
+ wp_enqueue_script( 'bpfwp-admin-location-address', BPFWP_PLUGIN_URL . '/lib/simple-admin-pages/js/address.js', array( 'jquery' ), BPFWP_VERSION );
337
+ wp_localize_script(
338
+ 'bpfwp-admin-location-address',
339
+ 'sap_address',
340
+ array(
341
+ 'api_key' => $bpfwp_controller->settings->get_setting( 'google-maps-api-key' ),
342
+ 'strings' => array(
343
+ 'no-setting' => __( 'No map coordinates set.', 'business-profile' ),
344
+ 'sep-lat-lon' => _x( ', ', 'separates latitude and longitude', 'business-profile' ),
345
+ 'retrieving' => __( 'Requesting new coordinates', 'business-profile' ),
346
+ 'select' => __( 'Select a match below', 'business-profile' ),
347
+ 'view' => __( 'View', 'business-profile' ),
348
+ 'result_error' => __( 'Error', 'business-profile' ),
349
+ 'result_invalid' => __( 'Invalid request. Be sure to fill out the address field before retrieving coordinates.', 'business-profile' ),
350
+ 'result_denied' => __( 'Request denied.', 'business-profile' ),
351
+ 'result_limit' => __( 'Request denied because you are over your request quota.', 'business-profile' ),
352
+ 'result_empty' => __( 'Nothing was found at that address.', 'business-profile' ),
353
+ ),
354
+ )
355
+ );
356
+ ?>
357
+
358
+ <div class="bpfwp-meta-input bpfwp-meta-geo_address sap-address">
359
+ <textarea name="geo_address" id="bpfwp_address"><?php echo esc_textarea( get_post_meta( $post->ID, 'geo_address', true ) ); ?></textarea>
360
+ <p class="sap-map-coords-wrapper">
361
+ <span class="dashicons dashicons-location-alt"></span>
362
+ <span class="sap-map-coords">
363
+ <?php
364
+ $geo_latitude = get_post_meta( $post->ID, 'geo_latitude', true );
365
+ $geo_longitude = get_post_meta( $post->ID, 'geo_longitude', true );
366
+ if ( empty( $geo_latitude ) || empty( $geo_longitude ) ) :
367
+ esc_html_e( 'No map coordinates set.', 'business-profile' );
368
+ else : ?>
369
+ <?php echo get_post_meta( $post->ID, 'geo_latitude', true ) . esc_html_x( ', ', 'separates latitude and longitude', 'business-profile' ) . get_post_meta( $post->ID, 'geo_longitude', true ); ?>
370
+ <a href="//maps.google.com/maps?q=<?php echo esc_attr( get_post_meta( $post->ID, 'geo_latitude', true ) ) . ',' . esc_attr( get_post_meta( $post->ID, 'geo_longitude', true ) ); ?>" class="sap-view-coords" target="_blank"><?php esc_html_e( 'View', 'business-profile' ); ?></a>
371
+ <?php
372
+ endif; ?>
373
+ </span>
374
+ </p>
375
+ <p class="sap-coords-action-wrapper">
376
+ <a href="#" class="sap-get-coords">
377
+ <?php esc_html_e( 'Retrieve map coordinates', 'business-profile' ); ?>
378
+ </a>
379
+ <?php echo esc_html_x( ' | ', 'separator between admin action links in address component', 'business-profile' ); ?>
380
+ <a href="#" class="sap-remove-coords">
381
+ <?php esc_html_e( 'Remove map coordinates', 'business-profile' ); ?>
382
+ </a>
383
+ </p>
384
+ <input type="hidden" class="lat" name="geo_latitude" value="<?php echo esc_attr( get_post_meta( $post->ID, 'geo_latitude', true ) ); ?>">
385
+ <input type="hidden" class="lon" name="geo_longitude" value="<?php echo esc_attr( get_post_meta( $post->ID, 'geo_longitude', true ) ); ?>">
386
+ </div>
387
+
388
+ <?php
389
+ // Get an array of all pages with sane limits.
390
+ $pages = array();
391
+ $query = new WP_Query( array(
392
+ 'post_type' => array( 'page' ),
393
+ 'no_found_rows' => true,
394
+ 'update_post_meta_cache' => false,
395
+ 'update_post_term_cache' => false,
396
+ 'posts_per_page' => 500,
397
+ ) );
398
+ if ( $query->have_posts() ) {
399
+ while ( $query->have_posts() ) {
400
+ $query->next_post();
401
+ $pages[ $query->post->ID ] = $query->post->post_title;
402
+ }
403
+ }
404
+ wp_reset_postdata();
405
+ ?>
406
+
407
+ <div class="bpfwp-meta-input bpfwp-meta-contact-page">
408
+ <label for="bpfwp_contact-page">
409
+ <?php esc_html_e( 'Contact Page', 'business-profile' ); ?>
410
+ </label>
411
+ <select name="contact_post" id="bpfwp_contact-page">
412
+ <option></option>
413
+ <?php foreach ( $pages as $id => $title ) : ?>
414
+ <option value="<?php echo absint( $id ); ?>"<?php if ( get_post_meta( $post->ID, 'contact_post', true ) == $id ) : ?> selected<?php endif; ?>>
415
+ <?php esc_attr_e( $title ); ?>
416
+ </option>
417
+ <?php endforeach; ?>
418
+ </select>
419
+ </div>
420
+
421
+ <div class="bpfwp-meta-input bpfwp-meta-contact-email">
422
+ <label for="bpfwp_contact-email">
423
+ <?php esc_html_e( 'Email Address (optional)', 'business-profile' ); ?>
424
+ </label>
425
+ <input type="email" name="contact_email" id="bpfwp_contact-email" value="<?php esc_attr_e( get_post_meta( $post->ID, 'contact_email', true ) ); ?>">
426
+ </div>
427
+
428
+ <div class="bpfwp-meta-input bpfwp-meta-phone">
429
+ <label for="bpfwp_phone">
430
+ <?php esc_html_e( 'Phone Number', 'business-profile' ); ?>
431
+ </label>
432
+ <input type="tel" name="phone" id="bpfwp_phone" value="<?php esc_attr_e( get_post_meta( $post->ID, 'phone', true ) ); ?>">
433
+ </div>
434
+
435
+ <?php
436
+ }
437
+
438
+ /**
439
+ * Output the metabox HTML to define opening hours
440
+ *
441
+ * @since 1.1
442
+ * @access public
443
+ * @param WP_Post $post The current post object.
444
+ * @return void
445
+ */
446
+ public function print_opening_hours_metabox( $post ) {
447
+
448
+ $scheduler = $this->get_scheduler_meta_object( get_post_meta( $post->ID, 'opening_hours', true ) );
449
+
450
+ // Load required scripts and styles.
451
+ wp_enqueue_style( 'bpfwp-admin-location-sap', BPFWP_PLUGIN_URL . '/lib/simple-admin-pages/css/admin.css' );
452
+ foreach ( $scheduler->styles as $handle => $style ) {
453
+ wp_enqueue_style( $handle, BPFWP_PLUGIN_URL . '/lib/simple-admin-pages/' . $style['path'], $style['dependencies'], $style['version'], $style['media'] );
454
+ }
455
+ foreach ( $scheduler->scripts as $handle => $script ) {
456
+ wp_enqueue_script( $handle, BPFWP_PLUGIN_URL . '/lib/simple-admin-pages/' . $script['path'], $script['dependencies'], $script['version'], $script['footer'] );
457
+ }
458
+ ?>
459
+
460
+ <div class="bpfwp-meta-input bpfwp-meta-opening-hours">
461
+ <?php $scheduler->display_setting(); ?>
462
+ </div>
463
+
464
+ <?php
465
+ }
466
+
467
+ /**
468
+ * Output the metabox HTML to customize a new schema post
469
+ *
470
+ * @since 2.0.0
471
+ * @access public
472
+ * @param WP_Post $post The current post object.
473
+ * @return void
474
+ */
475
+ public function print_schema_details_metabox( $post ) {
476
+ global $bpfwp_controller;
477
+
478
+ $post_is_set = isset($bpfwp_controller->schemas->schema_cpts[$post->ID]);
479
+
480
+ $post_types = get_post_types( array( 'public' => true ), 'objects' );
481
+ $posts = get_posts( array( 'numberposts' => 1000 ) );
482
+ $pages = get_pages();
483
+ $post_categories = get_categories();
484
+ $taxonomies = get_taxonomies( array(), 'objects' );
485
+ $page_templates = get_page_templates();
486
+
487
+ $organization_schema_types = $bpfwp_controller->schemas->get_schema_organization_types();
488
+ $rich_results_schema_types = $bpfwp_controller->schemas->get_schema_rich_results_types();
489
+
490
+ $schema_fields = $post_is_set ? $bpfwp_controller->schemas->schema_cpts[$post->ID]->schema_class->fields : array();
491
+
492
+ // Add in the schema selector script and pass post_type, post, page, etc. data to javascript
493
+ wp_enqueue_script( 'bpfwp-admin-schema-selector', BPFWP_PLUGIN_URL . '/assets/js/admin-schema-selector.js', array( 'jquery' ) );
494
+ wp_localize_script(
495
+ 'bpfwp-admin-schema-selector',
496
+ 'schema_option_data',
497
+ array(
498
+ 'post_types' => $post_types,
499
+ 'posts' => $posts,
500
+ 'pages' => $pages,
501
+ 'post_categories' => $post_categories,
502
+ 'taxonomies' => $taxonomies,
503
+ 'page_templates' => $page_templates
504
+ )
505
+ );
506
+
507
+ $selected_target_type = $post_is_set ? $bpfwp_controller->schemas->schema_cpts[$post->ID]->target_type : '';
508
+ $selected_target_value = $post_is_set ? $bpfwp_controller->schemas->schema_cpts[$post->ID]->target_value : '';
509
+ $selected_schema = $post_is_set ? $bpfwp_controller->schemas->schema_cpts[$post->ID]->schema_type : '';
510
+ $field_defaults = $post_is_set ? $bpfwp_controller->schemas->schema_cpts[$post->ID]->field_defaults : array();
511
+ $default_display = $post_is_set ? $bpfwp_controller->schemas->schema_cpts[$post->ID]->default_display : false;
512
+
513
+ $this->field_id = 0;
514
+
515
+ ?>
516
+
517
+ <div class="bpfwp-meta-input bpfwp-meta-post_type">
518
+ <label for="schema_target_type">
519
+ <?php esc_html_e( 'Specify Target', 'business-profile' ); ?>
520
+ </label>
521
+ <select name="schema_target_type" class="no-margin">
522
+ <option value='post_type' <?php if ( $selected_target_type == 'post_type' ) : ?> selected<?php endif; ?>><?php _e( 'Post Type', 'business-profile' ); ?></option>
523
+ <option value='post' <?php if ( $selected_target_type == 'post' ) : ?> selected<?php endif; ?>><?php _e( 'Post', 'business-profile' ); ?></option>
524
+ <option value='page' <?php if ( $selected_target_type == 'page' ) : ?> selected<?php endif; ?>><?php _e( 'Page', 'business-profile' ); ?></option>
525
+ <?php // @to-do: add in the three target types below ?>
526
+ <!-- <option value='post_category' <?php if ( $selected_target_type == 'post_category' ) : ?> selected<?php endif; ?>><?php _e( 'Post Category', 'business-profile' ); ?></option>
527
+ <option value='taxonomy' <?php if ( $selected_target_type == 'taxonomy' ) : ?> selected<?php endif; ?>><?php _e( 'Taxonomy', 'business-profile' ); ?></option>
528
+ <option value='page_template' <?php if ( $selected_target_type == 'page_template' ) : ?> selected<?php endif; ?>><?php _e( 'Page Template', 'business-profile' ); ?></option> -->
529
+ <option value='global' <?php if ( $selected_target_type == 'global' ) : ?> selected<?php endif; ?>><?php _e( 'Global', 'business-profile' ); ?></option>
530
+ </select>
531
+ <select name="schema_target_value" class="no-margin">
532
+ <?php
533
+ if ( $selected_target_type == 'post_type' or ! $selected_target_type ) {
534
+ foreach ( $post_types as $post_type ) { ?>
535
+ <option value='<?php echo $post_type->name; ?>'<?php if ( $selected_target_value == $post_type->name ) : ?> selected<?php endif; ?>><?php echo $post_type->label; ?></option>
536
+ <?php }
537
+ }
538
+ elseif ( $selected_target_type == 'post' ) {
539
+ foreach ( $posts as $post ) { ?>
540
+ <option value='<?php echo $post->ID; ?>'<?php if ( $selected_target_value == $post->ID ) : ?> selected<?php endif; ?>><?php echo $post->post_title; ?></option>
541
+ <?php }
542
+ }
543
+ elseif ( $selected_target_type == 'page' ) {
544
+ foreach ( $pages as $page ) { ?>
545
+ <option value='<?php echo $page->ID; ?>'<?php if ( $selected_target_value == $page->ID ) : ?> selected<?php endif; ?>><?php echo $page->post_title; ?></option>
546
+ <?php }
547
+ } ?>
548
+ </select>
549
+ </div>
550
+
551
+ <div class="bpfwp-meta-input bpfwp-meta-schema_type">
552
+ <label for="schema_type">
553
+ <?php esc_html_e( 'Schema Type', 'business-profile' ); ?>
554
+ </label>
555
+ <select name="schema_type">
556
+ <option></option>
557
+ <optgroup label="Organization Types">
558
+ <?php foreach ( $organization_schema_types as $schema_slug => $schema_name ) : ?>
559
+ <option value="<?php echo $schema_slug; ?>"<?php if ( $selected_schema == $schema_slug ) : ?> selected<?php endif; ?>>
560
+ <?php esc_attr_e( $schema_name ); ?>
561
+ </option>
562
+ <?php endforeach; ?>
563
+ </optgroup>
564
+ <optgroup label="Rich Results Types">
565
+ <?php foreach ( $rich_results_schema_types as $schema_slug => $schema_name ) : ?>
566
+ <option value="<?php echo $schema_slug; ?>"<?php if ( $selected_schema == $schema_slug ) : ?> selected<?php endif; ?>>
567
+ <?php esc_attr_e( $schema_name ); ?>
568
+ </option>
569
+ <?php endforeach; ?>
570
+ </optgroup>
571
+ </select>
572
+ </div>
573
+
574
+ <div class="bpfwp-schema-defaults-helper-background bpfwp-hidden"></div>
575
+ <div class="bpfwp-schema-defaults-helper-box bpfwp-hidden">
576
+ <div class="bpfwp-schema-defaults-helper-box-inside">
577
+ <h3><?php esc_html_e( 'Available Default Values', 'business-profile' ); ?></h3>
578
+ <?php $this->print_helper_box_select(); ?>
579
+ <div class='bpfwp-schema-defaults-helper-box-exit'>x</div>
580
+ </div>
581
+ </div>
582
+
583
+ <div class="bpfwp-meta-input bpfwp-meta-field_defaults">
584
+ <label for="field_defaults" class="default-label">
585
+ <?php esc_html_e( 'Defaults', 'business-profile' ); ?>
586
+ </label>
587
+ <br><br>
588
+ <?php foreach ( $schema_fields as $field ) { ?>
589
+ <?php $this->get_callback_input( $field, $field_defaults ); ?>
590
+ <?php } ?>
591
+ </div>
592
+
593
+ <div class="bpfwp-meta-input bpfwp-default_display">
594
+ <label for="default_display">
595
+ <?php esc_html_e( 'Display For All Matching Items', 'business-profile' ); ?>
596
+ </label>
597
+ <input type="checkbox" name="default_display" <?php if ( $default_display ) : ?> checked<?php endif; ?>>
598
+ </div>
599
+
600
+ <?php
601
+ }
602
+
603
+ /**
604
+ * Outputs an input to allow editing of a field's default value
605
+ *
606
+ * @since 2.0.0
607
+ * @access public
608
+ * @param bpfwpSchemaField $field The schema field.
609
+ * @param array $field_defaults The default values for this Schema CPT.
610
+ * @return void
611
+ */
612
+ public function get_callback_input( $field, $field_defaults, $field_prefix = '' ) {
613
+ global $bpfwp_controller;
614
+
615
+ if ( $field->input == 'SchemaField' ) {
616
+ echo '<label for="field_defaults" class="bold-label">' . $field->name . '</label>';
617
+ echo '<div class="bpfwp-clear"></div>';
618
+ echo '<div>';
619
+ $field_prefix .= '_' . $field->slug;
620
+ foreach ( $field->children as $child_field ) { $this->get_callback_input( $child_field, $field_defaults, $field_prefix ); }
621
+ echo '</div>';
622
+ }
623
+ else {
624
+ echo '<label for="field_defaults">' . $field->name . '</label>';
625
+ //echo '<div class="bpfwp-clear"></div>';
626
+ echo '<input type="text" class="bpfwp-schema-defaults-field" name="field_defaults[' . $field_prefix . '_' . $field->slug .']" value="' . ( isset($field_defaults[$field_prefix . '_' . $field->slug]) ? $field_defaults[$field_prefix . '_' . $field->slug] : "" ) . '" placeholder="' . $field->callback . '" data-field_id="' . $this->field_id . '">';
627
+ if ( $bpfwp_controller->settings->get_setting( 'schema-default-helpers' ) ) { echo '<span class="bpfwp-schema-defaults-helper dashicons dashicons-arrow-down-alt2" data-field_id="' . $this->field_id . '"></span>'; }
628
+ echo '<div class="bpfwp-clear"></div>';
629
+
630
+ $this->field_id++;
631
+ }
632
+ }
633
+
634
+ /**
635
+ * Get a modified Scheduler object from the Simple Admin Pages library
636
+ *
637
+ * This modified scheduler is used to display and sanitize a scheduler
638
+ * component on the location post editing screen.
639
+ *
640
+ * @since 1.1
641
+ * @access public
642
+ * @see lib/simple-admin-pages/classes/AdminPageSetting.Scheduler.class.php
643
+ * @param string $values Optional values to be set.
644
+ * @return bpfwpSAPSchedulerMeta $scheduler An instance of the scheduler class.
645
+ */
646
+ public function get_scheduler_meta_object( $values = null ) {
647
+
648
+ require_once BPFWP_PLUGIN_DIR . '/includes/class-sap-scheduler-meta.php';
649
+ $scheduler = new bpfwpSAPSchedulerMeta(
650
+ array(
651
+ 'page' => 'dummy_page', // Required but not used.
652
+ 'id' => 'opening_hours',
653
+ 'title' => __( 'Opening Hours', 'business-profile' ),
654
+ 'description' => __( 'Define your weekly opening hours by adding scheduling rules.', 'business-profile' ),
655
+ 'weekdays' => array(
656
+ 'monday' => _x( 'Mo', 'Monday abbreviation', 'business-profile' ),
657
+ 'tuesday' => _x( 'Tu', 'Tuesday abbreviation', 'business-profile' ),
658
+ 'wednesday' => _x( 'We', 'Wednesday abbreviation', 'business-profile' ),
659
+ 'thursday' => _x( 'Th', 'Thursday abbreviation', 'business-profile' ),
660
+ 'friday' => _x( 'Fr', 'Friday abbreviation', 'business-profile' ),
661
+ 'saturday' => _x( 'Sa', 'Saturday abbreviation', 'business-profile' ),
662
+ 'sunday' => _x( 'Su', 'Sunday abbreviation', 'business-profile' ),
663
+ ),
664
+ 'time_format' => _x( 'h:i A', 'Time format displayed in the opening hours setting panel in your admin area. Must match formatting rules at http://amsul.ca/pickadate.js/time.htm#formats', 'business-profile' ),
665
+ 'date_format' => _x( 'mmmm d, yyyy', 'Date format displayed in the opening hours setting panel in your admin area. Must match formatting rules at http://amsul.ca/pickadate.js/date.htm#formatting-rules', 'business-profile' ),
666
+ 'disable_weeks' => true,
667
+ 'disable_date' => true,
668
+ 'strings' => array(
669
+ 'add_rule' => __( 'Add another opening time', 'business-profile' ),
670
+ 'weekly' => _x( 'Weekly', 'Format of a scheduling rule', 'business-profile' ),
671
+ 'monthly' => _x( 'Monthly', 'Format of a scheduling rule', 'business-profile' ),
672
+ 'date' => _x( 'Date', 'Format of a scheduling rule', 'business-profile' ),
673
+ 'weekdays' => _x( 'Days of the week', 'Label for selecting days of the week in a scheduling rule', 'business-profile' ),
674
+ 'month_weeks' => _x( 'Weeks of the month', 'Label for selecting weeks of the month in a scheduling rule', 'business-profile' ),
675
+ 'date_label' => _x( 'Date', 'Label to select a date for a scheduling rule', 'business-profile' ),
676
+ 'time_label' => _x( 'Time', 'Label to select a time slot for a scheduling rule', 'business-profile' ),
677
+ 'allday' => _x( 'All day', 'Label to set a scheduling rule to last all day', 'business-profile' ),
678
+ 'start' => _x( 'Start', 'Label for the starting time of a scheduling rule', 'business-profile' ),
679
+ 'end' => _x( 'End', 'Label for the ending time of a scheduling rule', 'business-profile' ),
680
+ 'set_time_prompt' => _x( 'All day long. Want to %sset a time slot%s?', 'Prompt displayed when a scheduling rule is set without any time restrictions', 'business-profile' ),
681
+ 'toggle' => _x( 'Open and close this rule', 'Toggle a scheduling rule open and closed', 'business-profile' ),
682
+ 'delete' => _x( 'Delete rule', 'Delete a scheduling rule', 'business-profile' ),
683
+ 'delete_schedule' => __( 'Delete scheduling rule', 'business-profile' ),
684
+ 'never' => _x( 'Never', 'Brief default description of a scheduling rule when no weekdays or weeks are included in the rule', 'business-profile' ),
685
+ 'weekly_always' => _x( 'Every day', 'Brief default description of a scheduling rule when all the weekdays/weeks are included in the rule', 'business-profile' ),
686
+ 'monthly_weekdays' => _x( '%s on the %s week of the month', 'Brief default description of a scheduling rule when some weekdays are included on only some weeks of the month. %s should be left alone and will be replaced by a comma-separated list of days and weeks in the following format: M, T, W on the first, second week of the month', 'business-profile' ),
687
+ 'monthly_weeks' => _x( '%s week of the month', 'Brief default description of a scheduling rule when some weeks of the month are included but all or no weekdays are selected. %s should be left alone and will be replaced by a comma-separated list of weeks in the following format: First, second week of the month', 'business-profile' ),
688
+ 'all_day' => _x( 'All day', 'Brief default description of a scheduling rule when no times are set', 'business-profile' ),
689
+ 'before' => _x( 'Ends at', 'Brief default description of a scheduling rule when an end time is set but no start time. If the end time is 6pm, it will read: Ends at 6pm', 'business-profile' ),
690
+ 'after' => _x( 'Starts at', 'Brief default description of a scheduling rule when a start time is set but no end time. If the start time is 6pm, it will read: Starts at 6pm', 'business-profile' ),
691
+ 'separator' => _x( '&mdash;', 'Separator between times of a scheduling rule', 'business-profile' ),
692
+ ),
693
+ )
694
+ );
695
+
696
+ if ( ! empty( $values ) ) {
697
+ $scheduler->set_value( $values );
698
+ }
699
+
700
+ return $scheduler;
701
+ }
702
+
703
+ /**
704
+ * Sanitize and save the location post meta
705
+ *
706
+ * The actual sanitization and validation should be
707
+ * performed in a bpfwpLocation object which will
708
+ * handle all the location data, and perform loading
709
+ * and saving.
710
+ *
711
+ * @since 1.1
712
+ * @access public
713
+ * @param int $post_id The current post ID.
714
+ * @return int $post_id The current post ID.
715
+ */
716
+ public function save_location_meta( $post_id ) {
717
+ if ( ! isset( $_POST['bpfwp_location_meta_nonce'] ) || ! wp_verify_nonce( sanitize_key( $_POST['bpfwp_location_meta_nonce'] ), 'bpfwp_location_meta' ) ) { // Input var okay.
718
+ return $post_id;
719
+ }
720
+
721
+
722
+ if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
723
+ return $post_id;
724
+ }
725
+
726
+ if ( ! current_user_can( 'edit_post', $post_id ) ) {
727
+ return $post_id;
728
+ }
729
+
730
+ $post_meta = array(
731
+ 'schema_type' => 'sanitize_text_field',
732
+ 'geo_address' => 'wp_kses_post',
733
+ 'geo_latitude' => 'sanitize_text_field',
734
+ 'geo_longitude' => 'sanitize_text_field',
735
+ 'phone' => 'sanitize_text_field',
736
+ 'contact_post' => 'absint',
737
+ 'contact_email' => 'sanitize_email',
738
+ 'opening_hours' => array( $this, 'sanitize_opening_hours' ),
739
+ );
740
+
741
+ foreach ( $post_meta as $key => $sanitizer ) {
742
+
743
+ if ( ! isset( $_POST[ $key ] ) ) { // Input var okay.
744
+ $_POST[ $key ] = '';
745
+ }
746
+
747
+ $cur = get_post_meta( $post_id, $key, true );
748
+ $new = call_user_func( $sanitizer, wp_unslash( $_POST[ $key ] ) ); // Input var okay.
749
+
750
+ if ( $new !== $cur ) {
751
+ update_post_meta( $post_id, $key, $new );
752
+ }
753
+ }
754
+
755
+ return $post_id;
756
+ }
757
+
758
+ /**
759
+ * Sanitize and save the schema post meta
760
+ *
761
+ *
762
+ * @since 2.0.0
763
+ * @access public
764
+ * @param int $post_id The current post ID.
765
+ * @return int $post_id The current post ID.
766
+ */
767
+ public function save_schema_meta( $post_id ) {
768
+ if ( ! isset( $_POST['bpfwp_schema_meta_nonce'] ) || ! wp_verify_nonce( sanitize_key( $_POST['bpfwp_schema_meta_nonce'] ), 'bpfwp_schema_meta' ) ) { // Input var okay.
769
+ return $post_id;
770
+ }
771
+
772
+
773
+ if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
774
+ return $post_id;
775
+ }
776
+
777
+ if ( ! current_user_can( 'edit_post', $post_id ) ) {
778
+ return $post_id;
779
+ }
780
+
781
+ $post_meta = array(
782
+ 'schema_target_type' => 'sanitize_text_field',
783
+ 'schema_target_value' => 'sanitize_text_field',
784
+ 'schema_type' => 'sanitize_text_field',
785
+ 'field_defaults' => 'sanitize_text_field',
786
+ 'default_display' => 'sanitize_text_field'
787
+ );
788
+
789
+ $post_meta_array = array();
790
+ foreach ( $post_meta as $key => $sanitizer ) {
791
+
792
+ if ( ! isset( $_POST[ $key ] ) ) { // Input var okay.
793
+ $_POST[ $key ] = '';
794
+ }
795
+
796
+ if ( is_array($_POST[ $key ]) ) { $value = array_map( $sanitizer, $_POST[ $key ] ); }
797
+ else { $value = call_user_func( $sanitizer, wp_unslash( $_POST[ $key ] ) ); } // Input var okay.
798
+
799
+ $post_meta_array[$key] = $value;
800
+ }
801
+
802
+ update_post_meta( $post_id, 'bpfwp-schema-data', $post_meta_array );
803
+
804
+ return $post_id;
805
+ }
806
+
807
+ /**
808
+ * Sanitize opening hours
809
+ *
810
+ * This is a wrapper for the sanitization callback in the Scheduler
811
+ * component of Simple Admin Pages
812
+ *
813
+ * @since 1.1
814
+ * @access public
815
+ * @see lib/simple-admin-pages/classes/AdminPageSetting.Scheduler.class.php
816
+ * @param array $values Raw values for the opening hours.
817
+ * @return array $values Sanitized values for the opening hours.
818
+ */
819
+ public function sanitize_opening_hours( $values ) {
820
+ $scheduler = $this->get_scheduler_meta_object( $values );
821
+ return $scheduler->sanitize_callback_wrapper( $values );
822
+ }
823
+
824
+ /**
825
+ * Automatically append a contact card to `the_content` on location
826
+ * single pages
827
+ *
828
+ * @since 1.1
829
+ * @access public
830
+ * @param string $content The current WordPress content.
831
+ * @return string $content The modified WordPress content.
832
+ */
833
+ public function append_to_content( $content ) {
834
+
835
+ if ( ! is_main_query() || ! in_the_loop() || post_password_required() ) {
836
+ return $content;
837
+ }
838
+
839
+ global $bpfwp_controller;
840
+
841
+ if ( $bpfwp_controller->get_theme_support( 'disable_append_to_content' ) ) {
842
+ return $content;
843
+ }
844
+
845
+ global $post;
846
+
847
+ if ( ! $post instanceof WP_Post || $post->post_type !== $bpfwp_controller->cpts->location_cpt_slug ) {
848
+ return $content;
849
+ }
850
+
851
+ return $content . '[contact-card location=' . $post->ID . ' show_name=0]';
852
+ }
853
+
854
+ /**
855
+ * Returns the schema fields for a particular Schema CPT
856
+ *
857
+ * @since 2.0.0
858
+ * @access public
859
+ */
860
+ public function get_schema_fields() {
861
+
862
+ }
863
+
864
+ /**
865
+ * Prints out the different functions, options and metas that can be used as default values for the various schemas
866
+ *
867
+ * @since 2.0.0
868
+ * @access public
869
+ */
870
+ public function print_helper_box_select() {
871
+
872
+ ?>
873
+ <div class="bpfwp-schema-defaults-helper-container">
874
+ <h4><?php esc_html_e( 'Functions', 'business-profile' ); ?></h4>
875
+ <div class="bpfwp-schema-defaults-helper-functions-container">
876
+ <?php $this->print_helper_options( 'function', $this->get_helper_function_options() ); ?>
877
+ </div>
878
+ <h4><?php esc_html_e( 'Options', 'business-profile' ); ?></h4>
879
+ <div class="bpfwp-schema-defaults-helper-options-container">
880
+ <?php $this->print_helper_options( 'option', $this->get_helper_option_options() ); ?>
881
+ </div>
882
+ <h4><?php esc_html_e( 'Meta', 'business-profile' ); ?></h4>
883
+ <div class="bpfwp-schema-defaults-helper-metas-container">
884
+ <?php $this->print_helper_options( 'meta', $this->get_helper_meta_options() ); ?>
885
+ </div>
886
+ </div>
887
+
888
+ <?php
889
+ }
890
+
891
+ /**
892
+ * Prints out the supplied options that can be used as default values for the various schemas
893
+ *
894
+ * @since 2.0.0
895
+ * @access public
896
+ * @param array $options The functions, options or metas that should be displayed.
897
+ */
898
+ public function print_helper_options( $operation, $options ) {
899
+
900
+ foreach ($options as $option) { ?>
901
+ <div class="bpfwp-schema-defaults-helper-option" data-helper_value="<?php echo $operation . ' ' . $option['value']; ?>">
902
+ <div class="bpfwp-schema-defaults-helper-option-name"><?php echo $option['display_name']; ?></div>
903
+ <div class="bpfwp-schema-defaults-helper-option-description"><?php echo $option['description']; ?></div>
904
+ </div>
905
+ <div class="bpfwp-clear"></div>
906
+
907
+ <?php }
908
+ }
909
+
910
+ /**
911
+ * Returns out the different functions that can be used as default values for the various schemas
912
+ *
913
+ * @since 2.0.0
914
+ * @access public
915
+ * @return array $helper_functions The available functions that can be selected.
916
+ */
917
+ public function get_helper_function_options() {
918
+
919
+ $helper_functions = array(
920
+ array(
921
+ 'section' => 'default',
922
+ 'display_name' => 'Title',
923
+ 'value' => 'get_the_title',
924
+ 'description' => 'Gets the title of the post'
925
+ ),
926
+ array(
927
+ 'section' => 'default',
928
+ 'display_name' => 'Excerpt',
929
+ 'value' => 'get_the_excerpt',
930
+ 'description' => 'Gets the post excerpt'
931
+ ),
932
+ array(
933
+ 'section' => 'default',
934
+ 'display_name' => 'Post Date',
935
+ 'value' => 'get_the_date',
936
+ 'description' => 'Gets the date the post was written'
937
+ ),
938
+ array(
939
+ 'section' => 'default',
940
+ 'display_name' => 'Modified Date',
941
+ 'value' => 'get_the_modified_date',
942
+ 'description' => 'Gets the date the post was last modified'
943
+ ),
944
+ array(
945
+ 'section' => 'default',
946
+ 'display_name' => 'Post Date/Time',
947
+ 'value' => 'get_post_datetime',
948
+ 'description' => 'Gets the date-time the post was written'
949
+ ),
950
+ array(
951
+ 'section' => 'default',
952
+ 'display_name' => 'Content',
953
+ 'value' => 'get_the_content',
954
+ 'description' => 'Gets the entire content of a post'
955
+ ),
956
+ array(
957
+ 'section' => 'bp_default',
958
+ 'display_name' => 'Image URL',
959
+ 'value' => 'bpfwp_get_post_image_url',
960
+ 'description' => 'Gets the URL of the featured image of a post'
961
+ ),
962
+ array(
963
+ 'section' => 'bp_default',
964
+ 'display_name' => 'Logo URL',
965
+ 'value' => 'bpfwp_get_site_logo_url',
966
+ 'description' => 'Gets the URL of the logo for the site'
967
+ ),
968
+ array(
969
+ 'section' => 'bp_default',
970
+ 'display_name' => 'Logo Width',
971
+ 'value' => 'bpfwp_get_site_logo_width',
972
+ 'description' => 'Gets the height of the site\'s logo in pixels'
973
+ ),
974
+ array(
975
+ 'section' => 'bp_default',
976
+ 'display_name' => 'Logo Height',
977
+ 'value' => 'bpfwp_get_site_logo_height',
978
+ 'description' => 'Gets the width of the site\'s logo in pixels'
979
+ ),
980
+ array(
981
+ 'section' => 'woocommerce',
982
+ 'display_name' => 'WC New Review Rating',
983
+ 'value' => 'bpfwp_wc_get_most_recent_review_rating',
984
+ 'description' => 'Gets the most recent rating for a WooCommerce product'
985
+ ),
986
+ array(
987
+ 'section' => 'woocommerce',
988
+ 'display_name' => 'WC New Review Body',
989
+ 'value' => 'bpfwp_wc_get_most_recent_review_body',
990
+ 'description' => 'Gets body of the most recent WooCommerce product review'
991
+ ),
992
+ array(
993
+ 'section' => 'woocommerce',
994
+ 'display_name' => 'WC New Review Author',
995
+ 'value' => 'bpfwp_wc_get_most_recent_review_author',
996
+ 'description' => 'Gets display name of the most recent WooCommerce product review author'
997
+ )
998
+ );
999
+
1000
+ return apply_filters( 'bpfwp-helper-function-options', $helper_functions );
1001
+ }
1002
+
1003
+ /**
1004
+ * Returns out the different options that can be used as default values for the various schemas
1005
+ *
1006
+ * @since 2.0.0
1007
+ * @access public
1008
+ * @return array $helper_options The available options that can be selected.
1009
+ */
1010
+ public function get_helper_option_options() {
1011
+
1012
+ $helper_options = array(
1013
+ array(
1014
+ 'section' => 'default',
1015
+ 'display_name' => 'Blog Name',
1016
+ 'value' => 'blogname',
1017
+ 'description' => 'Gets the name of the website set via the Settings menu'
1018
+ ),
1019
+ array(
1020
+ 'section' => 'default',
1021
+ 'display_name' => 'Description',
1022
+ 'value' => 'blogdescription',
1023
+ 'description' => 'Gets the description of the website set via the Settings menu'
1024
+ ),
1025
+ array(
1026
+ 'section' => 'default',
1027
+ 'display_name' => 'Site URL',
1028
+ 'value' => 'siteurl',
1029
+ 'description' => 'Gets the main URL for the website'
1030
+ ),
1031
+ array(
1032
+ 'section' => 'default',
1033
+ 'display_name' => 'Admin EmailL',
1034
+ 'value' => 'admin_email',
1035
+ 'description' => 'Gets the administrator\'s email address'
1036
+ )
1037
+ );
1038
+
1039
+ return apply_filters( 'bpfwp-helper-option-options', $helper_options );
1040
+ }
1041
+
1042
+ /**
1043
+ * Returns out the different metas that can be used as default values for the various schemas
1044
+ *
1045
+ * @since 2.0.0
1046
+ * @access public
1047
+ * @return array $helper_metas The available metas that can be selected.
1048
+ */
1049
+ public function get_helper_meta_options() {
1050
+
1051
+ $helper_metas = array(
1052
+ array(
1053
+ 'section' => 'woocommerce',
1054
+ 'display_name' => 'Product SKU',
1055
+ 'value' => '_sku',
1056
+ 'description' => 'Gets the SKU of a WooCommerce product'
1057
+ ),
1058
+ array(
1059
+ 'section' => 'woocommerce',
1060
+ 'display_name' => 'WC Average Rating',
1061
+ 'value' => '_wc_average_rating',
1062
+ 'description' => 'Gets the average rating for a WooCommerce product\'s reviews'
1063
+ ),
1064
+ array(
1065
+ 'section' => 'woocommerce',
1066
+ 'display_name' => 'WC Review Count',
1067
+ 'value' => '_wc_review_count',
1068
+ 'description' => 'Gets the total number of reviews for a WooCommerce product'
1069
+ ),
1070
+ array(
1071
+ 'section' => 'woocommerce',
1072
+ 'display_name' => 'Price',
1073
+ 'value' => '_price',
1074
+ 'description' => 'Gets the price of a WooCommerce product'
1075
+ ),
1076
+ array(
1077
+ 'section' => 'woocommerce',
1078
+ 'display_name' => 'Sale Price Valid Until',
1079
+ 'value' => '_sale_price_dates_to',
1080
+ 'description' => 'Gets the end date for the sale price of a WooCommerce product'
1081
+ ),
1082
+ array(
1083
+ 'section' => 'woocommerce',
1084
+ 'display_name' => 'Stock Status',
1085
+ 'value' => '_stock_status',
1086
+ 'description' => 'Gets the inventory status of a WooCommerce product'
1087
+ )
1088
+ );
1089
+
1090
+ return apply_filters( 'bpfwp-helper-meta-options', $helper_metas );
1091
+ }
1092
+ }
1093
+ endif;
includes/class-dashboard.php ADDED
@@ -0,0 +1,413 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !defined( 'ABSPATH' ) ) exit;
3
+
4
+ if ( !class_exists( 'bpfwpDashboard' ) ) {
5
+ /**
6
+ * Class to handle plugin dashboard
7
+ *
8
+ * @since 2.0.0
9
+ */
10
+ class bpfwpDashboard {
11
+
12
+ public $message;
13
+ public $status = true;
14
+
15
+ public function __construct() {
16
+ add_action( 'admin_menu', array( $this, 'add_dashboard_to_menu' ), 99 );
17
+ if ( isset($_POST['BPFWP_Upgrade_To_Full']) ) { add_action( 'init', array( $this, 'check_upgrade_code' ) ); }
18
+ if ( get_option( 'BPFWP_Trial_Happening' ) == 'Yes' ) {
19
+ add_action('admin_init', array( $this, 'check_trial_status' ) );
20
+ }
21
+
22
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
23
+ }
24
+
25
+ public function add_dashboard_to_menu() {
26
+ global $menu, $submenu;
27
+
28
+ add_submenu_page(
29
+ 'bpfwp-business-profile',
30
+ 'Dashboard',
31
+ 'Dashboard',
32
+ 'manage_options',
33
+ 'bpfwp-dashboard',
34
+ array($this, 'display_dashboard_screen')
35
+ );
36
+
37
+ // Create a new sub-menu in the order that we want
38
+ $new_submenu = array();
39
+ $menu_item_count = 5;
40
+ foreach ( $submenu['bpfwp-business-profile'] as $key => $sub_item ) {
41
+ if ( $sub_item[0] == 'Dashboard' ) { $new_submenu[0] = $sub_item; }
42
+ elseif ( $sub_item[0] == 'Locations' ) { $new_submenu[1] = $sub_item; }
43
+ elseif ( $sub_item[0] == 'Business Profile' ) { $new_submenu[2] = ''; }
44
+ elseif ( $sub_item[0] == 'Schemas' ) { $new_submenu[3] = $sub_item; }
45
+ elseif ( $sub_item[0] == 'Settings' ) { $new_submenu[4] = $sub_item; }
46
+ else {
47
+ $new_submenu[$menu_item_count] = $sub_item;
48
+ $menu_item_count++;
49
+ }
50
+ }
51
+ ksort($new_submenu);
52
+
53
+ $submenu['bpfwp-business-profile'] = $new_submenu;
54
+
55
+ if ( isset( $dashboard_key ) ) {
56
+ $submenu['bpfwp-business-profile'][0] = $submenu['bpfwp-business-profile'][$dashboard_key];
57
+ unset($submenu['bpfwp-business-profile'][$dashboard_key]);
58
+ }
59
+ }
60
+
61
+ // Enqueues the admin script so that our hacky sub-menu opening function can run
62
+ public function enqueue_scripts() {
63
+ $currentScreen = get_current_screen();
64
+ if ( $currentScreen->id == 'business-profile_page_bpfwp-dashboard' ) {
65
+ wp_enqueue_style( 'bpfwp-admin', BPFWP_PLUGIN_URL . '/assets/css/admin.css', array(), BPFWP_VERSION );
66
+ wp_enqueue_script( 'bpfwp-admin-js', BPFWP_PLUGIN_URL . '/assets/js/admin.js', array( 'jquery' ), BPFWP_VERSION, true );
67
+ }
68
+ }
69
+
70
+ public function check_upgrade_code() {
71
+ global $bpfwp_controller;
72
+
73
+ $key = trim($_POST['Key']);
74
+
75
+ if ($key == "FSP Trial" and !get_option("BPFWP_Trial_Happening")) {
76
+ $this->message = __("Trial successfully started!", 'business-profile');
77
+
78
+ update_option("BPFWP_Trial_Expiry_Time", time() + (7*24*60*60));
79
+ update_option("BPFWP_Trial_Happening", "Yes");
80
+
81
+ update_option( "bpfwp-pre-permission-level", get_option( 'bpfwp-permission-level' ) );
82
+ update_option( "bpfwp-permission-level", 2 );
83
+ $bpfwp_controller->permissions->update_permissions();
84
+
85
+ $Admin_Email = get_option('admin_email');
86
+
87
+ $opts = array('http'=>array('method'=>"GET"));
88
+ $context = stream_context_create($opts);
89
+ $Response = file_get_contents("http://www.fivestarplugins.com/key-check/Register_Trial.php?Plugin=BPFWP&Admin_Email=" . $Admin_Email . "&Site=" . get_bloginfo('wpurl'), false, $context);
90
+ }
91
+ elseif ($key == "FSP Trial") {
92
+ $this->status = false;
93
+ $this->message = __('Trial has already been used.', 'business-profile');
94
+ }
95
+ elseif (strlen($key) < 18 or strlen($key) > 22) {
96
+ $this->status = false;
97
+ $this->message = __('Invalid License Key', 'business-profile');
98
+ }
99
+ elseif ($key != "FSP Trial") {
100
+ $opts = array('http'=>array('method'=>"GET"));
101
+ $context = stream_context_create($opts);
102
+ $Response = unserialize(file_get_contents("http://www.fivestarplugins.com/key-check/FSP_BPFWP_KeyCheck.php?Key=" . $key . "&Site=" . get_bloginfo('wpurl'), false, $context));
103
+ print_r($Response);
104
+ if ($Response['Message_Type'] == "Error") {
105
+ $this->status = false;
106
+ $this->message = $Response['Message'];
107
+ }
108
+ else {
109
+ $this->message = $Response['Message'];
110
+ update_option("BPFWP_Trial_Happening", "No");
111
+ delete_option("BPFWP_Trial_Expiry_Time");
112
+
113
+ update_option( "bpfwp-permission-level", 2 );
114
+ $bpfwp_controller->permissions->update_permissions();
115
+ }
116
+ }
117
+
118
+ add_action( 'admin_notices', array( $this, 'display_notice' ) );
119
+ }
120
+
121
+ public function check_trial_status() {
122
+ global $bpfwp_controller;
123
+
124
+ if ( get_option("BPFWP_Trial_Happening") == "Yes" and get_option( 'BPFWP_Trial_Expiry_Time' ) < time() ) {
125
+ update_option( 'BPFWP_Trial_Happening', 'No');
126
+ update_option( 'bpfwp-permission-level', get_option( 'bpfwp-pre-permission-level' ) );
127
+
128
+ $bpfwp_controller->permissions->update_permissions();
129
+ }
130
+ }
131
+
132
+ public function display_dashboard_screen() {
133
+ global $bpfwp_controller;
134
+
135
+ $permission = $bpfwp_controller->permissions->check_permission( 'premium' );
136
+
137
+ ?>
138
+ <div id="bpfwp-dashboard-content-area">
139
+
140
+ <div id="bpfwp-dashboard-content-left">
141
+
142
+ <?php if ( ! $permission or get_option("BPFWP_Trial_Happening") == "Yes") { ?>
143
+ <div class="bpfwp-dashboard-new-widget-box ewd-widget-box-full">
144
+ <div class="bpfwp-dashboard-new-widget-box-top">
145
+ <form method="post" action="admin.php?page=bpfwp-dashboard" class="bpfwp-dashboard-key-widget">
146
+ <input class="bpfwp-dashboard-key-widget-input" name="Key" type="text" placeholder="<?php _e('Enter License Key Here', 'business-profile'); ?>">
147
+ <input class="bpfwp-dashboard-key-widget-submit" name="BPFWP_Upgrade_To_Full" type="submit" value="<?php _e('UNLOCK PREMIUM', 'business-profile'); ?>">
148
+ <div class="bpfwp-dashboard-key-widget-text">Don't have a key? <a href="https://www.fivestarplugins.com/license-payment/?Selected=BPFWP&Quantity=1" target="_blank">Upgrade Now</a> to unlock all premium features.</div>
149
+ </form>
150
+ </div>
151
+ </div>
152
+ <?php } ?>
153
+
154
+ <div class="bpfwp-dashboard-new-widget-box ewd-widget-box-full" id="bpfwp-dashboard-support-widget-box">
155
+ <div class="bpfwp-dashboard-new-widget-box-top">Get Support<span id="bpfwp-dash-mobile-support-down-caret">&nbsp;&nbsp;&#9660;</span><span id="bpfwp-dash-mobile-support-up-caret">&nbsp;&nbsp;&#9650;</span></div>
156
+ <div class="bpfwp-dashboard-new-widget-box-bottom">
157
+ <ul class="bpfwp-dashboard-support-widgets">
158
+ <li>
159
+ <a href="https://www.youtube.com/channel/UCZPuaoetCJB1vZOmpnMxJNw/featured" target="_blank">
160
+ <img src="<?php echo plugins_url( '../assets/img/ewd-support-icon-youtube.png', __FILE__ ); ?>">
161
+ <div class="bpfwp-dashboard-support-widgets-text">YouTube Tutorials</div>
162
+ </a>
163
+ </li>
164
+ <li>
165
+ <a href="https://wordpress.org/plugins/business-profile/#faq" target="_blank">
166
+ <img src="<?php echo plugins_url( '../assets/img/ewd-support-icon-faqs.png', __FILE__ ); ?>">
167
+ <div class="bpfwp-dashboard-support-widgets-text">Plugin FAQs</div>
168
+ </a>
169
+ </li>
170
+ <li>
171
+ <a href="http://doc.fivestarplugins.com/plugins/business-profile/" target="_blank">
172
+ <img src="<?php echo plugins_url( '../assets/img/ewd-support-icon-documentation.png', __FILE__ ); ?>">
173
+ <div class="bpfwp-dashboard-support-widgets-text">Documentation</div>
174
+ </a>
175
+ </li>
176
+ <li>
177
+ <a href="https://www.fivestarplugins.com/support-center/" target="_blank">
178
+ <img src="<?php echo plugins_url( '../assets/img/ewd-support-icon-forum.png', __FILE__ ); ?>">
179
+ <div class="bpfwp-dashboard-support-widgets-text">Get Support</div>
180
+ </a>
181
+ </li>
182
+ </ul>
183
+ </div>
184
+ </div>
185
+
186
+ <div class="bpfwp-dashboard-new-widget-box ewd-widget-box-full" id="bpfwp-dashboard-optional-table">
187
+ <div class="bpfwp-dashboard-new-widget-box-top">Location Summary<span id="bpfwp-dash-optional-table-down-caret">&nbsp;&nbsp;&#9660;</span><span id="bpfwp-dash-optional-table-up-caret">&nbsp;&nbsp;&#9650;</span></div>
188
+ <div class="bpfwp-dashboard-new-widget-box-bottom">
189
+ <table class='bpfwp-overview-table wp-list-table widefat fixed striped posts'>
190
+ <thead>
191
+ <tr>
192
+ <th><?php _e("Location", 'business-profile'); ?></th>
193
+ </tr>
194
+ </thead>
195
+ <tbody>
196
+ <?php
197
+ $args = array(
198
+ 'post_type' => 'location',
199
+ 'orderby' => 'date',
200
+ 'order' => 'DESC',
201
+ 'posts_per_page' => 10
202
+ );
203
+
204
+ $Dashboard_Locations_Query = new WP_Query($args);
205
+ $Dashboard_Locations = $Dashboard_Locations_Query->get_posts();
206
+
207
+ if (sizeOf($Dashboard_Locations) == 0) {echo "<tr><td colspan='3'>" . __("No Locations to display yet. Create a location for it to be displayed here.", 'business-profile') . "</td></tr>";}
208
+ else {
209
+ foreach ($Dashboard_Locations as $Dashboard_Location) { ?>
210
+ <tr>
211
+ <td><a href='post.php?post=<?php echo $Dashboard_Location->ID;?>&action=edit'><?php echo $Dashboard_Location->post_title; ?></a></td>
212
+ </tr>
213
+ <?php }
214
+ }
215
+ ?>
216
+ </tbody>
217
+ </table>
218
+ </div>
219
+ </div>
220
+
221
+ <?php /*<div class="bpfwp-dashboard-new-widget-box <?php echo ( ($hideReview != 'Yes' and $Ask_Review_Date < time()) ? 'ewd-widget-box-two-thirds' : 'ewd-widget-box-full' ); ?>">
222
+ <div class="bpfwp-dashboard-new-widget-box-top">What People Are Saying</div>
223
+ <div class="bpfwp-dashboard-new-widget-box-bottom">
224
+ <ul class="bpfwp-dashboard-testimonials">
225
+ <?php $randomTestimonial = rand(0,2);
226
+ if($randomTestimonial == 0){ ?>
227
+ <li id="bpfwp-dashboard-testimonial-one">
228
+ <img src="<?php echo plugins_url( '../assets/img/dash-asset-stars.png', __FILE__ ); ?>">
229
+ <div class="bpfwp-dashboard-testimonial-title">"Awesome. Just Awesome."</div>
230
+ <div class="bpfwp-dashboard-testimonial-author">- @shizart</div>
231
+ <div class="bpfwp-dashboard-testimonial-text">Thanks for this very well-made plugin. This works so well out of the box, I barely had to do ANYTHING to create an amazing FAQ accordion display... <a href="https://wordpress.org/support/topic/awesome-just-awesome-11/" target="_blank">read more</a></div>
232
+ </li>
233
+ <?php }
234
+ if($randomTestimonial == 1){ ?>
235
+ <li id="bpfwp-dashboard-testimonial-two">
236
+ <img src="<?php echo plugins_url( '../assets/img/dash-asset-stars.png', __FILE__ ); ?>">
237
+ <div class="bpfwp-dashboard-testimonial-title">"Absolutely perfect with great support"</div>
238
+ <div class="bpfwp-dashboard-testimonial-author">- @isaac85</div>
239
+ <div class="bpfwp-dashboard-testimonial-text">I tried several different FAQ plugins and this is by far the prettiest and easiest to use... <a href="https://wordpress.org/support/topic/absolutely-perfect-with-great-support/" target="_blank">read more</a></div>
240
+ </li>
241
+ <?php }
242
+ if($randomTestimonial == 2){ ?>
243
+ <li id="bpfwp-dashboard-testimonial-three">
244
+ <img src="<?php echo plugins_url( '../assets/img/dash-asset-stars.png', __FILE__ ); ?>">
245
+ <div class="bpfwp-dashboard-testimonial-title">"Perfect FAQ Plugin"</div>
246
+ <div class="bpfwp-dashboard-testimonial-author">- @muti-wp</div>
247
+ <div class="bpfwp-dashboard-testimonial-text">Works great! Easy to configure and to use. Thanks! <a href="https://wordpress.org/support/topic/perfect-faq-plugin/" target="_blank">read more</a></div>
248
+ </li>
249
+ <?php } ?>
250
+ </ul>
251
+ </div>
252
+ </div> */ ?>
253
+
254
+ <?php /* if($hideReview != 'Yes' and $Ask_Review_Date < time()){ ?>
255
+ <div class="bpfwp-dashboard-new-widget-box ewd-widget-box-one-third">
256
+ <div class="bpfwp-dashboard-new-widget-box-top">Leave a review</div>
257
+ <div class="bpfwp-dashboard-new-widget-box-bottom">
258
+ <div class="bpfwp-dashboard-review-ask">
259
+ <img src="<?php echo plugins_url( '../assets/img/dash-asset-stars.png', __FILE__ ); ?>">
260
+ <div class="bpfwp-dashboard-review-ask-text">If you enjoy this plugin and have a minute, please consider leaving a 5-star review. Thank you!</div>
261
+ <a href="https://wordpress.org/plugins/ultimate-faqs/#reviews" class="bpfwp-dashboard-review-ask-button">LEAVE A REVIEW</a>
262
+ <form action="admin.php?page=EWD-UFAQ-Options" method="post">
263
+ <input type="hidden" name="hide_ufaq_review_box_hidden" value="Yes">
264
+ <input type="submit" name="hide_ufaq_review_box_submit" class="bpfwp-dashboard-review-ask-dismiss" value="I've already left a review">
265
+ </form>
266
+ </div>
267
+ </div>
268
+ </div>
269
+ <?php } */ ?>
270
+
271
+ <?php if ( ! $permission or get_option("BPFWP_Trial_Happening") == "Yes" ) { ?>
272
+ <div class="bpfwp-dashboard-new-widget-box ewd-widget-box-full" id="bpfwp-dashboard-guarantee-widget-box">
273
+ <div class="bpfwp-dashboard-new-widget-box-top">
274
+ <div class="bpfwp-dashboard-guarantee">
275
+ <div class="bpfwp-dashboard-guarantee-title">14-Day 100% Money-Back Guarantee</div>
276
+ <div class="bpfwp-dashboard-guarantee-text">If you're not 100% satisfied with the premium version of our plugin - no problem. You have 14 days to receive a FULL REFUND. We're certain you won't need it, though.</div>
277
+ </div>
278
+ </div>
279
+ </div>
280
+ <?php } ?>
281
+
282
+ </div> <!-- left -->
283
+
284
+ <div id="bpfwp-dashboard-content-right">
285
+
286
+ <?php if ( ! $permission or get_option("BPFWP_Trial_Happening") == "Yes" ) { ?>
287
+ <div class="bpfwp-dashboard-new-widget-box ewd-widget-box-full" id="bpfwp-dashboard-get-premium-widget-box">
288
+ <div class="bpfwp-dashboard-new-widget-box-top">Get Premium</div>
289
+ <?php if(get_option("BPFWP_Trial_Happening") == "Yes"){
290
+ $trialExpireTime = get_option("BPFWP_Trial_Expiry_Time");
291
+ $currentTime = time();
292
+ $trialTimeLeft = $trialExpireTime - $currentTime;
293
+ $trialTimeLeftDays = ( date("d", $trialTimeLeft) ) - 1;
294
+ $trialTimeLeftHours = date("H", $trialTimeLeft);
295
+ ?>
296
+ <div class="bpfwp-dashboard-new-widget-box-bottom">
297
+ <div class="bpfwp-dashboard-get-premium-widget-trial-time">
298
+ <div class="bpfwp-dashboard-get-premium-widget-trial-days"><?php echo $trialTimeLeftDays; ?><span>days</span></div>
299
+ <div class="bpfwp-dashboard-get-premium-widget-trial-hours"><?php echo $trialTimeLeftHours; ?><span>hours</span></div>
300
+ </div>
301
+ <div class="bpfwp-dashboard-get-premium-widget-trial-time-left">LEFT IN TRIAL</div>
302
+ </div>
303
+ <?php } ?>
304
+ <div class="bpfwp-dashboard-new-widget-box-bottom">
305
+ <div class="bpfwp-dashboard-get-premium-widget-features-title"<?php echo ( get_option("BPFWP_Trial_Happening") == "Yes" ? "style='padding-top: 20px;'" : ""); ?>>GET FULL ACCESS WITH OUR PREMIUM VERSION AND GET:</div>
306
+ <ul class="bpfwp-dashboard-get-premium-widget-features">
307
+ <li>Multiple Layouts</li>
308
+ <li>Custom Fields</li>
309
+ <li>MailChimp Integration</li>
310
+ <li>Advanced Styling Options</li>
311
+ <li>+ More</li>
312
+ </ul>
313
+ <a href="https://www.fivestarplugins.com/license-payment/?Selected=BPFWP&Quantity=1" class="bpfwp-dashboard-get-premium-widget-button" target="_blank">UPGRADE NOW</a>
314
+ <?php if (!get_option("BPFWP_Trial_Happening")) { ?>
315
+ <form method="post" action="admin.php?page=bpfwp-dashboard">
316
+ <input name="Key" type="hidden" value='FSP Trial'>
317
+ <input name="BPFWP_Upgrade_To_Full" type="hidden" value='BPFWP_Upgrade_To_Full'>
318
+ <button class="bpfwp-dashboard-get-premium-widget-button bpfwp-dashboard-new-trial-button">GET FREE 7-DAY TRIAL</button>
319
+ </form>
320
+ <?php } ?>
321
+ </div>
322
+ </div>
323
+ <?php } ?>
324
+
325
+ <!-- <div class="bpfwp-dashboard-new-widget-box ewd-widget-box-full">
326
+ <div class="bpfwp-dashboard-new-widget-box-top">Other Plugins by Etoile</div>
327
+ <div class="bpfwp-dashboard-new-widget-box-bottom">
328
+ <ul class="bpfwp-dashboard-other-plugins">
329
+ <li>
330
+ <a href="https://wordpress.org/plugins/ultimate-product-catalogue/" target="_blank"><img src="<?php echo plugins_url( '../images/ewd-upcp-icon.png', __FILE__ ); ?>"></a>
331
+ <div class="bpfwp-dashboard-other-plugins-text">
332
+ <div class="bpfwp-dashboard-other-plugins-title">Product Catalog</div>
333
+ <div class="bpfwp-dashboard-other-plugins-blurb">Enables you to display your business's products in a clean and efficient manner.</div>
334
+ </div>
335
+ </li>
336
+ <li>
337
+ <a href="https://wordpress.org/plugins/ultimate-reviews/" target="_blank"><img src="<?php echo plugins_url( '../images/ewd-urp-icon.png', __FILE__ ); ?>"></a>
338
+ <div class="bpfwp-dashboard-other-plugins-text">
339
+ <div class="bpfwp-dashboard-other-plugins-title">Ultimate Reviews</div>
340
+ <div class="bpfwp-dashboard-other-plugins-blurb">Let visitors submit reviews and display them right in the tabbed page layout!</div>
341
+ </div>
342
+ </li>
343
+ </ul>
344
+ </div>
345
+ </div> -->
346
+
347
+ </div> <!-- right -->
348
+
349
+ </div> <!-- bpfwp-dashboard-content-area -->
350
+
351
+ <?php if ( ! $permission or get_option("BPFWP_Trial_Happening") == "Yes" ) { ?>
352
+ <div id="bpfwp-dashboard-new-footer-one">
353
+ <div class="bpfwp-dashboard-new-footer-one-inside">
354
+ <div class="bpfwp-dashboard-new-footer-one-left">
355
+ <div class="bpfwp-dashboard-new-footer-one-title">What's Included in Our Premium Version?</div>
356
+ <ul class="bpfwp-dashboard-new-footer-one-benefits">
357
+ <li>Multiple Form Layouts</li>
358
+ <li>Custom Form Fields</li>
359
+ <li>Advanced Email Designer</li>
360
+ <li>MailChimp Integration</li>
361
+ <li>Set Table and Seat Restrictions</li>
362
+ <li>Automatic Booking Confirmation</li>
363
+ <li>Bookings Page for Staff</li>
364
+ <li>Export Bookings</li>
365
+ <li>Advanced Styling Options</li>
366
+ </ul>
367
+ </div>
368
+ <div class="bpfwp-dashboard-new-footer-one-buttons">
369
+ <a class="bpfwp-dashboard-new-upgrade-button" href="https://www.fivestarplugins.com/license-payment/?Selected=BPFWP&Quantity=1" target="_blank">UPGRADE NOW</a>
370
+ </div>
371
+ </div>
372
+ </div> <!-- bpfwp-dashboard-new-footer-one -->
373
+ <?php } ?>
374
+ <div id="bpfwp-dashboard-new-footer-two">
375
+ <div class="bpfwp-dashboard-new-footer-two-inside">
376
+ <img src="<?php echo plugins_url( '../assets/img/fivestartextlogowithstar.png', __FILE__ ); ?>" class="bpfwp-dashboard-new-footer-two-icon">
377
+ <div class="bpfwp-dashboard-new-footer-two-blurb">
378
+ At Five Star Plugins, we build powerful, easy-to-use WordPress plugins with a focus on the restaurant, hospitality and business industries. With a modern, responsive look and a highly-customizable feature set, Five Star Plugins can be used as out-of-the-box solutions and can also be adapted to your specific requirements.
379
+ </div>
380
+ <ul class="bpfwp-dashboard-new-footer-two-menu">
381
+ <li>SOCIAL</li>
382
+ <li><a href="https://www.facebook.com/EtoileWebDesign/" target="_blank">Facebook</a></li>
383
+ <li><a href="https://twitter.com/EtoileWebDesign" target="_blank">Twitter</a></li>
384
+ <li><a href="https://www.fivestarplugins.com/blog/" target="_blank">Blog</a></li>
385
+ </ul>
386
+ <ul class="bpfwp-dashboard-new-footer-two-menu">
387
+ <li>SUPPORT</li>
388
+ <li><a href="https://www.youtube.com/channel/UCZPuaoetCJB1vZOmpnMxJNw/featured" target="_blank">YouTube Tutorials</a></li>
389
+ <li><a href="http://doc.fivestarplugins.com/plugins/business-profile/" target="_blank">Documentation</a></li>
390
+ <li><a href="https://www.fivestarplugins.com/support-center/" target="_blank">Get Support</a></li>
391
+ <li><a href="https://wordpress.org/plugins/business-profile/#faq" target="_blank">FAQs</a></li>
392
+ </ul>
393
+ </div>
394
+ </div> <!-- bpfwp-dashboard-new-footer-two -->
395
+
396
+ <?php }
397
+
398
+ public function get_term_from_array($terms, $term_id) {
399
+ foreach ($terms as $term) {if ($term->term_id == $term_id) {return $term;}}
400
+
401
+ return array();
402
+ }
403
+
404
+ public function display_notice() {
405
+ if ( $this->status ) {
406
+ echo "<div class='updated'><p>" . $this->message . "</p></div>";
407
+ }
408
+ else {
409
+ echo "<div class='error'><p>" . $this->message . "</p></div>";
410
+ }
411
+ }
412
+ }
413
+ } // endif
includes/class-integrations.php ADDED
@@ -0,0 +1,186 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Define settings used throughout the plugin.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2016, Theme of the Crop
7
+ * @license GPL-2.0+
8
+ * @since 0.0.1
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpIntegrations' ) ) :
14
+
15
+ /**
16
+ * Class to handle configurable settings for Business Profile
17
+ *
18
+ * @since 0.0.1
19
+ */
20
+ class bpfwpIntegrations {
21
+
22
+ /**
23
+ * Initialize the class and register hooks.
24
+ *
25
+ * @since 2.0.0
26
+ * @access public
27
+ * @return void
28
+ */
29
+ public function __construct() {
30
+
31
+ add_filter( 'sanitize_option_bpfwp-settings', array( $this, 'check_for_articles_rich_snippets_change' ), 100 );
32
+
33
+ add_filter( 'sanitize_option_bpfwp-settings', array( $this, 'check_for_wc_integration_change' ), 100 );
34
+ }
35
+
36
+ /**
37
+ * Check to see if WC integration was toggled on or off
38
+ *
39
+ * @since 2.0.0
40
+ */
41
+ public function check_for_articles_rich_snippets_change( $val ) {
42
+ global $bpfwp_controller;
43
+
44
+ // WooCommerce integration has been turned off
45
+ if ( empty( $val['article-rich-snippets'] ) and $bpfwp_controller->settings->get_setting( 'article-rich-snippets' ) ) {
46
+ $article_post = get_page_by_path( 'business-profile-article-schema', OBJECT, $bpfwp_controller->cpts->schema_cpt_slug );
47
+
48
+ if ($article_post) {
49
+ $post_data = array(
50
+ 'ID' => $article_post->ID,
51
+ 'post_status' => 'disabled'
52
+ );
53
+
54
+ wp_update_post( $post_data );
55
+ }
56
+ }
57
+ // WooCommerce integration has been turned on
58
+ elseif ( ! empty( $val['article-rich-snippets'] ) and ! $bpfwp_controller->settings->get_setting( 'article-rich-snippets' ) ) {
59
+ $article_post = get_page_by_path( 'business-profile-article-schema', OBJECT, $bpfwp_controller->cpts->schema_cpt_slug );
60
+
61
+ // Post exists, enable it
62
+ if ( $article_post ) {
63
+ $post_data = array(
64
+ 'ID' => $article_post->ID,
65
+ 'post_status' => 'publish'
66
+ );
67
+
68
+ wp_update_post( $post_data );
69
+ }
70
+ // Post doesn't exist, create it
71
+ else {
72
+ $post_data = array(
73
+ 'post_title' => 'Business Profile Article Schema',
74
+ 'post_name' => 'business-profile-article-schema',
75
+ 'post_type' => $bpfwp_controller->cpts->schema_cpt_slug,
76
+ 'post_status' => 'publish',
77
+ );
78
+
79
+ $bpwc_post_id = wp_insert_post( $post_data );
80
+
81
+ if ( $bpwc_post_id ) {
82
+ $schema_meta_data = array(
83
+ 'schema_target_type' => 'post_type',
84
+ 'schema_target_value' => 'post',
85
+ 'schema_type' => 'Article',
86
+ 'default_display' => 'on',
87
+ 'field_defaults' => array(
88
+ '_author_name' => 'function display_name get_the_author_meta',
89
+ '_datePublished' => 'function get_the_date',
90
+ '_dateModified' => 'function get_the_modified_date',
91
+ '_headline' => 'function get_the_title',
92
+ '_image' => 'function bpfwp_get_post_image_url',
93
+ '_description' => 'function get_the_excerpt',
94
+ '_publisher_name' => 'option blogname',
95
+ '_publisher_logo_height' => 'function bpfwp_get_site_logo_height',
96
+ '_publisher_logo_width' => 'function bpfwp_get_site_logo_width',
97
+ '_publisher_logo_url' => 'function bpfwp_get_site_logo_url'
98
+ )
99
+ );
100
+
101
+ update_post_meta( $bpwc_post_id, 'bpfwp-schema-data', $schema_meta_data );
102
+ }
103
+ }
104
+ }
105
+
106
+ return $val;
107
+ }
108
+
109
+ /**
110
+ * Check to see if WC integration was toggled on or off
111
+ *
112
+ * @since 2.0.0
113
+ */
114
+ public function check_for_wc_integration_change( $val ) {
115
+ global $bpfwp_controller;
116
+
117
+ // WooCommerce integration has been turned off
118
+ if ( empty( $val['woocommerce-integration'] ) and $bpfwp_controller->settings->get_setting( 'woocommerce-integration' ) ) {
119
+ $woocommerce_post = get_page_by_path( 'business-profile-woocommerce-schema', OBJECT, $bpfwp_controller->cpts->schema_cpt_slug );
120
+
121
+ if ($woocommerce_post) {
122
+ $post_data = array(
123
+ 'ID' => $woocommerce_post->ID,
124
+ 'post_status' => 'disabled'
125
+ );
126
+
127
+ wp_update_post( $post_data );
128
+ }
129
+ }
130
+ // WooCommerce integration has been turned on
131
+ elseif ( ! empty( $val['woocommerce-integration'] ) and ! $bpfwp_controller->settings->get_setting( 'woocommerce-integration' ) ) {
132
+ $woocommerce_post = get_page_by_path( 'business-profile-woocommerce-schema', OBJECT, $bpfwp_controller->cpts->schema_cpt_slug );
133
+
134
+ // Post exists, enable it
135
+ if ( $woocommerce_post ) {
136
+ $post_data = array(
137
+ 'ID' => $woocommerce_post->ID,
138
+ 'post_status' => 'publish'
139
+ );
140
+
141
+ wp_update_post( $post_data );
142
+ }
143
+ // Post doesn't exist, create it
144
+ else {
145
+ $post_data = array(
146
+ 'post_title' => 'Business Profile WooCommerce Schema',
147
+ 'post_name' => 'business-profile-woocommerce-schema',
148
+ 'post_type' => $bpfwp_controller->cpts->schema_cpt_slug,
149
+ 'post_status' => 'publish',
150
+ );
151
+
152
+ $bpwc_post_id = wp_insert_post( $post_data );
153
+
154
+ if ( $bpwc_post_id ) {
155
+ $schema_meta_data = array(
156
+ 'schema_target_type' => 'post_type',
157
+ 'schema_target_value' => 'product',
158
+ 'schema_type' => 'Product',
159
+ 'default_display' => 'on',
160
+ 'field_defaults' => array(
161
+ '_image' => 'function bpfwp_get_post_image_url',
162
+ '_description' => 'function get_the_excerpt',
163
+ '_sku' => 'meta _sku',
164
+ '_review_reviewRating_ratingValue' => 'function bpfwp_wc_get_most_recent_review_rating',
165
+ '_review_reviewBody' => 'function bpfwp_wc_get_most_recent_review_body',
166
+ '_review_author_name' => 'function bpfwp_wc_get_most_recent_review_author',
167
+ '_aggregateRating_ratingValue' => 'meta _wc_average_rating',
168
+ '_aggregateRating_reviewCount' => 'meta _wc_review_count',
169
+ '_offers_priceCurrency' => 'option woocommerce_currency',
170
+ '_offers_price' => 'meta _price',
171
+ '_offers_pricevalidUntil' => 'meta _sale_price_dates_to',
172
+ '_offers_availability' => 'meta _stock_status'
173
+ )
174
+ );
175
+
176
+ update_post_meta( $bpwc_post_id, 'bpfwp-schema-data', $schema_meta_data );
177
+ }
178
+ }
179
+ }
180
+
181
+ return $val;
182
+ }
183
+ }
184
+ endif;
185
+
186
+ ?>
includes/class-permissions.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( !defined( 'ABSPATH' ) ) exit;
3
+
4
+ if ( !class_exists( 'bpfwpPermissions' ) ) {
5
+ /**
6
+ * Class to handle plugin permissions for Restaurant Reservations
7
+ *
8
+ * @since 2.0.0
9
+ */
10
+ class bpfwpPermissions {
11
+
12
+ private $plugin_permissions;
13
+ private $permission_level;
14
+
15
+ public function __construct() {
16
+ $this->plugin_permissions = array(
17
+ "premium" => 2,
18
+ "locations" => 2,
19
+ "integrations" => 2,
20
+ );
21
+ }
22
+
23
+ public function set_permissions() {
24
+ global $bpfwp_controller;
25
+
26
+ $this->permission_level = 1;
27
+
28
+ update_option( "bpfwp-permission-level", $this->permission_level );
29
+ }
30
+
31
+ public function get_permission_level() {
32
+ $this->permission_level = get_option( "bpfwp-permission-level" );
33
+
34
+ if ( ! $this->permission_level ) { $this->set_permissions(); }
35
+ }
36
+
37
+ public function check_permission($permission_type = '') {
38
+ if ( ! $this->permission_level ) { $this->get_permission_level(); }
39
+
40
+ return ( array_key_exists( $permission_type, $this->plugin_permissions ) ? ( $this->permission_level >= $this->plugin_permissions[$permission_type] ? true : false ) : false );
41
+ }
42
+
43
+ public function update_permissions() {
44
+ $this->permission_level = get_option( "bpfwp-permission-level" );
45
+ }
46
+ }
47
+
48
+ }
includes/class-sap-scheduler-meta.php CHANGED
@@ -1,41 +1,41 @@
1
- <?php
2
- /**
3
- * Extend the Simple Admin Pages Scheduler component so that it can be used
4
- * in the location custom post type editing screen.
5
- *
6
- * @see lib/simple-admin-pages/classes/AdminPageSetting.Scheduler.class.php
7
- *
8
- * @package BusinessProfile
9
- * @copyright Copyright (c) 2016, Theme of the Crop
10
- * @license GPL-2.0+
11
- * @since 1.1
12
- */
13
-
14
- defined( 'ABSPATH' ) || exit;
15
-
16
- require_once BPFWP_PLUGIN_DIR . '/lib/simple-admin-pages/classes/AdminPageSetting.Scheduler.class.php';
17
-
18
- if ( ! class_exists( 'bpfwpSAPSchedulerMeta', false ) && class_exists( 'sapAdminPageSettingScheduler_2_1_2' ) ) :
19
-
20
- /**
21
- * Class to extend the Simple Admin Pages Scheduler component for use on
22
- * the location custom post type editing screen
23
- *
24
- * @since 1.1
25
- */
26
- class bpfwpSAPSchedulerMeta extends sapAdminPageSettingScheduler_2_1_2 {
27
-
28
- /**
29
- * Generate an option input field name. The default component appends
30
- * an admin page slug to the input field name. We only want the
31
- * object ID, which will be the post meta key.
32
- *
33
- * @since 1.1
34
- * @access public
35
- * @return string $id The input ID.
36
- */
37
- public function get_input_name() {
38
- return esc_attr( $this->id );
39
- }
40
- }
41
- endif;
1
+ <?php
2
+ /**
3
+ * Extend the Simple Admin Pages Scheduler component so that it can be used
4
+ * in the location custom post type editing screen.
5
+ *
6
+ * @see lib/simple-admin-pages/classes/AdminPageSetting.Scheduler.class.php
7
+ *
8
+ * @package BusinessProfile
9
+ * @copyright Copyright (c) 2016, Theme of the Crop
10
+ * @license GPL-2.0+
11
+ * @since 1.1
12
+ */
13
+
14
+ defined( 'ABSPATH' ) || exit;
15
+
16
+ require_once BPFWP_PLUGIN_DIR . '/lib/simple-admin-pages/classes/AdminPageSetting.Scheduler.class.php';
17
+
18
+ if ( ! class_exists( 'bpfwpSAPSchedulerMeta', false ) && class_exists( 'sapAdminPageSettingScheduler_2_1_2' ) ) :
19
+
20
+ /**
21
+ * Class to extend the Simple Admin Pages Scheduler component for use on
22
+ * the location custom post type editing screen
23
+ *
24
+ * @since 1.1
25
+ */
26
+ class bpfwpSAPSchedulerMeta extends sapAdminPageSettingScheduler_2_1_2 {
27
+
28
+ /**
29
+ * Generate an option input field name. The default component appends
30
+ * an admin page slug to the input field name. We only want the
31
+ * object ID, which will be the post meta key.
32
+ *
33
+ * @since 1.1
34
+ * @access public
35
+ * @return string $id The input ID.
36
+ */
37
+ public function get_input_name() {
38
+ return esc_attr( $this->id );
39
+ }
40
+ }
41
+ endif;
includes/class-schema-cpt.php ADDED
@@ -0,0 +1,470 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Creates a class based on a schema custom post type's data.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaCPT' ) ) :
14
+
15
+ /**
16
+ * Schema CPT-based class for Business Profile
17
+ *
18
+ * @since 2.0.0
19
+ */
20
+ class bpfwpSchemaCPT {
21
+
22
+ /**
23
+ * The the WP $post_id, if any, for this Schema CPT
24
+ *
25
+ * @since 2.0.0
26
+ * @access public
27
+ * @var int
28
+ */
29
+ public $post_id = '';
30
+ /**
31
+ * The targeted WP-object type
32
+ *
33
+ * @since 2.0.0
34
+ * @access public
35
+ * @var string
36
+ */
37
+ public $target_type = '';
38
+
39
+ /**
40
+ * The value for the target
41
+ *
42
+ * @since 2.0.0
43
+ * @access public
44
+ * @var string
45
+ */
46
+ public $target_value = '';
47
+
48
+ /**
49
+ * The schema type that should be added
50
+ *
51
+ * @since 2.0.0
52
+ * @access public
53
+ * @var string
54
+ */
55
+ public $schema_type = '';
56
+
57
+ /**
58
+ * The schema class that defines the fields, etc. used in the selected schema
59
+ *
60
+ * @since 2.0.0
61
+ * @access public
62
+ * @var bpfwpSchema child class
63
+ */
64
+ public $schema_class;
65
+
66
+ /**
67
+ * The default values that should be applied to each schema field
68
+ *
69
+ * @since 2.0.0
70
+ * @access public
71
+ * @var array
72
+ */
73
+ public $field_defaults = array();
74
+
75
+ /**
76
+ * Whether this schema should be applied to all matching posts by default
77
+ *
78
+ * @since 2.0.0
79
+ * @access public
80
+ * @var boolean
81
+ */
82
+ public $default_display = false;
83
+
84
+ /**
85
+ * Initialize the class and recursively initialize child classes.
86
+ *
87
+ * @since 2.0.0
88
+ * @access public
89
+ * @return void
90
+ */
91
+ public function __construct( $args ) {
92
+
93
+ $this->set_properties( $args );
94
+
95
+ if ( isset($this->schema_class) ){
96
+ add_action( 'admin_init', array( $this, 'set_admin_hooks' ) );
97
+ add_action( 'wp_footer', array( $this, 'set_display_hooks' ), 1 );
98
+ }
99
+ }
100
+
101
+ /**
102
+ * Load the schema's default fields
103
+ *
104
+ * @since 2.0.0
105
+ * @access public
106
+ * @return void
107
+ */
108
+ public function set_properties( $args ) {
109
+
110
+ if ( isset($args['post_id']) ) { $this->post_id = $args['post_id']; }
111
+ if ( isset($args['target_type']) ) { $this->target_type = $args['target_type']; }
112
+ if ( isset($args['target_value']) ) { $this->target_value = $args['target_value']; }
113
+ if ( isset($args['schema_type']) ) { $this->schema_type = $args['schema_type']; }
114
+ if ( isset($args['field_defaults']) ) { $this->field_defaults = $args['field_defaults']; }
115
+ if ( isset($args['default_display']) ) { $this->default_display = $args['default_display']; }
116
+
117
+ if ( isset($args['schema_type']) and $this->schema_type and is_file( BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . strtolower( $this->schema_type ) . '.php' ) ) {
118
+ include_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . strtolower( $this->schema_type ) . '.php';
119
+
120
+ $class_name = 'bpfwpSchema' . $this->schema_type;
121
+ $this->schema_class = new $class_name( array( 'depth' => 0 ) );
122
+ }
123
+ }
124
+
125
+
126
+ /**
127
+ * Set admin hooks to display and save the schema meta boxes based on the target type and value
128
+ *
129
+ * @since 2.0.0
130
+ * @access public
131
+ * @return void
132
+ */
133
+ public function set_admin_hooks() {
134
+ add_action( 'edit_form_after_title', array( $this, 'add_meta_nonce' ) );
135
+ add_action( 'add_meta_boxes', array( $this, 'add_meta_box' ) );
136
+ add_action( 'save_post', array( $this, 'save_meta' ) );
137
+
138
+ wp_enqueue_script( 'schema-cpt', BPFWP_PLUGIN_URL . '/assets/js/schema-cpt.js', array( 'jquery') );
139
+ }
140
+
141
+
142
+ /**
143
+ * Set admin hooks to display and save the schema meta boxes based on the target type and value
144
+ *
145
+ * @since 2.0.0
146
+ * @access public
147
+ * @return void
148
+ */
149
+ public function set_display_hooks() {
150
+ if ( $this->validate_target() ) {
151
+ add_filter( 'bpfwp_ld_json_output', array( $this, 'output_ld_json_data' ) );
152
+ }
153
+ }
154
+
155
+ /**
156
+ * Output a hidden nonce field to secure the saving of post meta
157
+ *
158
+ * @since 2.0.0
159
+ * @access public
160
+ * @return void
161
+ */
162
+ public function add_meta_nonce() {
163
+ if ( $this->validate_target() ) {
164
+ wp_nonce_field( 'bpfwp_schema_meta', 'bpfwp_schema_meta_nonce' );
165
+ }
166
+ }
167
+
168
+ /**
169
+ * Check whether meta boxes, nonces, etc. should be displayed during the current WP load process
170
+ *
171
+ * @since 2.0.0
172
+ * @access public
173
+ * @return void
174
+ */
175
+ public function validate_target( $target = null) {
176
+ global $post;
177
+
178
+ if ( ! $target ) {
179
+ $target = $post;
180
+ }
181
+
182
+ $valid_target = false;
183
+
184
+ if ( $this->target_type == 'post' and isset($target) and $target->ID == $this->target_value ) {
185
+ $valid_target = true;
186
+ }
187
+
188
+ if ( $this->target_type == 'post_type' and isset($target) and $target->post_type == $this->target_value ) {
189
+ $valid_target = true;
190
+ }
191
+
192
+ if ( $this->target_type == 'page' and isset($target) and $target->ID == $this->target_value ) {
193
+ $valid_target = true;
194
+ }
195
+
196
+ return $valid_target;
197
+ }
198
+
199
+ /**
200
+ * Registers a meta box for this schema CPT
201
+ *
202
+ * @since 2.0.0
203
+ * @access public
204
+ * @param WP_Post $post The current post object.
205
+ * @return void
206
+ */
207
+ public function add_meta_box( $post ) {
208
+ if ( ! $this->validate_target() ) { return; }
209
+
210
+ // Metabox to enter schema type.
211
+ $meta_box = array(
212
+ 'id' => 'bpfwp_schema_' . strtolower( $this->schema_type ) . '_metabox',
213
+ 'title' => $this->schema_type . __( ' Details', 'business-profile' ),
214
+ 'callback' => array( $this, 'print_schema_metabox' ),
215
+ 'context' => 'normal',
216
+ 'priority' => 'default',
217
+ );
218
+
219
+ if ( $this->target_type == 'post' ) { $meta_box['post_type'] = 'post'; }
220
+ elseif ( $this->target_type == 'page' ) { $meta_box['post_type'] = 'page'; }
221
+ elseif ( $this->target_type == 'post_type' ) { $meta_box['post_type'] = $this->target_value; }
222
+
223
+ // Create filter so addons can modify the metaboxes.
224
+ $meta_box = apply_filters( 'bpfwp_schema_cpt_meta_box', $meta_box );
225
+
226
+ add_meta_box(
227
+ $meta_box['id'],
228
+ $meta_box['title'],
229
+ $meta_box['callback'],
230
+ $meta_box['post_type'],
231
+ $meta_box['context'],
232
+ $meta_box['priority']
233
+ );
234
+ }
235
+
236
+
237
+ /**
238
+ * Output the metabox HTML to customize a schema's meta values
239
+ *
240
+ * @since 2.0.0
241
+ * @access public
242
+ * @param WP_Post $post The current post object.
243
+ * @return void
244
+ */
245
+ public function print_schema_metabox( $post ) {
246
+ $specified_values = get_post_meta( $post->ID, 'bpfwp_values_' . $this->schema_type, true );
247
+
248
+ ?>
249
+
250
+ <div class="bpfwp-meta-input bpfwp-meta-post_type">
251
+ <h3>
252
+ <?php esc_html_e( 'Schema Field Values', 'business-profile' ); ?>
253
+ </h3>
254
+
255
+ <?php foreach ( $this->schema_class->fields as $field ) {
256
+ $this->display_field( $field, $post, $specified_values);
257
+ } ?>
258
+
259
+ </div>
260
+ <?php }
261
+
262
+ /**
263
+ * Display a field to be edited for this CPT schema
264
+ *
265
+ * @since 2.0.0
266
+ * @access public
267
+ * @param bpfwpSchemaField $field The field to be displayed.
268
+ * @param WP_Post $post The current post object.
269
+ * @param array $specified_values The values that were saved for this CPT schema previously.
270
+ * @param int $count The number of times this field has been displayed.
271
+ * @return void
272
+ */
273
+ public function display_field( $field, $post, $specified_values, $field_prefix = '', $count = 1 ) {
274
+
275
+ $child_depth = 1;
276
+
277
+ if ( isset($specified_values[$field_prefix . '_' . $field->slug][$count]) ) { $value = $specified_values[$field_prefix . '_' . $field->slug][$count]; }
278
+
279
+ $field->callback = ( isset($this->field_defaults[$field_prefix . '_' . $field->slug]) and $this->field_defaults[$field_prefix . '_' . $field->slug] != '' ) ? $this->field_defaults[$field_prefix . '_' . $field->slug] : $field->callback;
280
+
281
+ $placeholder = $field->get_default_value( $post->ID, 'post' );
282
+
283
+ switch ( $field->input ) {
284
+ case 'SchemaField':
285
+ $field_prefix .= '_' . $field->slug;
286
+
287
+ for ( $i = 1; $i <= $child_depth; $i++ ) {
288
+ echo '<h4 class="' . ( $field->recommended ? 'recommended' : '' ) . '" data-field_name="' . $field->name . '">' . $field->name . '</h4>';
289
+
290
+ echo '<div class="bpfwp-schema-field-container" data-field_name="' . $field->name . '">';
291
+
292
+ foreach ( $field->children as $field_child ) { $child_depth = max($child_depth, $this->display_field( $field_child, $post, $specified_values, $field_prefix, $i ) ); }
293
+
294
+ echo '</div>';
295
+ }
296
+
297
+ if ( $field->repeatable ) {
298
+ echo '<div class="bpfwp-clear"></div>';
299
+ echo '<input type="hidden" name="count_' . $this->schema_type . '[' . $field_prefix . ']" value="' . $child_depth . '" />';
300
+ echo '<button class="bpfwp-add-repeatable-field" data-schema_type="' . $this->schema_type . '" data-field_name="' . $field->name . '" data-field_prefix="' . $field_prefix . '" data-field_slug="' . $field->slug . '">';
301
+ echo __('Add Another ', 'business-profile') . $field->name;
302
+ echo '</button>';
303
+ }
304
+
305
+ // reset depth in case you're going up to a schema field a level above
306
+ $child_depth = 1;
307
+
308
+ break;
309
+
310
+ case 'textarea':
311
+ // update the child_depth parameter if in a non-schema field
312
+ if ( isset($specified_values[$field_prefix . '_' . $field->slug]) and is_array($specified_values[$field_prefix . '_' . $field->slug]) ) { $child_depth = sizeOf( $specified_values[$field_prefix . '_' . $field->slug] ); }
313
+
314
+ echo '<label class="' . ( $field->recommended ? 'recommended' : '' ) . '" for="' . $this->schema_type . '[' . $field_prefix . '_' . $field->slug . '][' . $count . ']">' . $field->name . '</label>';
315
+
316
+ echo '<textarea name="' . $this->schema_type . '[' . $field_prefix . '_' . $field->slug . '][' . $count . ']" placeholder="' . ( isset($placeholder) ? $placeholder : "" ) . '">';
317
+ echo isset($value) ? $value : '';
318
+ echo '</textarea>';
319
+ break;
320
+
321
+ default:
322
+ // update the child_depth parameter if in a non-schema field
323
+ if ( isset($specified_values[$field_prefix . '_' . $field->slug]) and is_array($specified_values[$field_prefix . '_' . $field->slug]) ) { $child_depth = sizeOf( $specified_values[$field_prefix . '_' . $field->slug] ); }
324
+
325
+ echo '<label class="' . ( $field->recommended ? 'recommended' : '' ) . '" for="' . $this->schema_type . '[' . $field_prefix . '_' . $field->slug . '][' . $count . ']">' . $field->name . '</label>';
326
+
327
+ echo '<input type="' . $field->input . '" name="' . $this->schema_type . '[' . $field_prefix . '_' . $field->slug . '][' . $count . ']" placeholder="' . ( isset($placeholder) ? $placeholder : '' ) . '" value="' . ( isset($value) ? $value : '' ) . '" />';
328
+ }
329
+
330
+ return $child_depth;
331
+ }
332
+
333
+
334
+ /**
335
+ * Sanitize and save the schema post meta
336
+ *
337
+ * The actual sanitization and validation should be
338
+ * performed in a bpfwpLocation object which will
339
+ * handle all the location data, and perform loading
340
+ * and saving.
341
+ *
342
+ * @since 2.0.0
343
+ * @access public
344
+ * @param int $post_id The current post ID.
345
+ * @return int $post_id The current post ID.
346
+ */
347
+ public function save_meta( $post_id ) {
348
+ if ( ! isset( $_POST['bpfwp_schema_meta_nonce'] ) || ! wp_verify_nonce( sanitize_key( $_POST['bpfwp_schema_meta_nonce'] ), 'bpfwp_schema_meta' ) ) { // Input var okay.
349
+ return $post_id;
350
+ }
351
+
352
+ if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
353
+ return $post_id;
354
+ }
355
+
356
+ if ( ! current_user_can( 'edit_post', $post_id ) ) {
357
+ return $post_id;
358
+ }
359
+
360
+ if ( ! $this->validate_target( get_post( $post_id ) ) ) {
361
+ return $post_id;
362
+ }
363
+
364
+ global $values;
365
+ $values = array();
366
+ foreach ( $this->schema_class->fields as $field ) {
367
+ $this->get_field_save_value('_', $field);
368
+ }
369
+
370
+ update_post_meta( $post_id, 'bpfwp_values_' . $this->schema_type, $values );
371
+
372
+ return $post_id;
373
+ }
374
+
375
+ /**
376
+ * Get the value of a particular field that has been sent via POST
377
+ *
378
+ * @since 2.0.0
379
+ * @access public
380
+ * @param bpfwpSchemaField $field The field to be displayed.
381
+ * @param int $count The number of times this field has been displayed.
382
+ * @return mixed $field_value;
383
+ */
384
+ private function get_field_save_value( $field_prefix, $field, $count = 1 ) {
385
+ global $values;
386
+
387
+ if ( $field->input == 'SchemaField' ) {
388
+ foreach ( $field->children as $field_child ) {
389
+ if ( $field->repeatable ) { $max_count = $_POST['count_' . $this->schema_type][$field_prefix . $field->slug]; }
390
+ else { $max_count = 1; }
391
+
392
+ for ( $i = 1; $i <= $max_count; $i++ ) {
393
+ $new_field_prefix = $field_prefix . $field->slug . '_';
394
+ $value[$new_field_prefix . $field_child->slug] = $this->get_field_save_value($new_field_prefix, $field_child, $i);
395
+ }
396
+ }
397
+ }
398
+ else {
399
+ $values[$field_prefix . $field->slug][$count] = $_POST[$this->schema_type][$field_prefix . $field->slug][$count];
400
+ }
401
+
402
+ return $value;
403
+ }
404
+
405
+ /**
406
+ * Creates an output array based on this schema's class values
407
+ *
408
+ * @since 2.0.0
409
+ * @access public
410
+ * @param array $ld_json The ld+json data that will be output eventually.
411
+ * @return array $ld_json;
412
+ */
413
+ public function output_ld_json_data( $ld_json ) {
414
+ global $post;
415
+ // @to-do: THIS NEEDS TO BE CHANGED TO WORK WITH NON-POST OBJECTS
416
+ $values = get_post_meta( $post->ID, 'bpfwp_values_' . $this->schema_type, true );
417
+
418
+ $output = array();
419
+
420
+ $output['@context'] = 'http://schema.org';
421
+ $output['@type'] = $this->schema_type;
422
+
423
+ foreach ( $this->schema_class->fields as $field ) {
424
+ $output[$field->slug] = $this->get_field_output_value($values, $field);
425
+ }
426
+
427
+ $ld_json[] = $output;
428
+
429
+ return $ld_json;
430
+ }
431
+
432
+ /**
433
+ * Creates an output array based on this schema's class values
434
+ *
435
+ * @since 2.0.0
436
+ * @access public
437
+ * @param array $values The values that have been saved for this particular Schema CPT.
438
+ * @param bpfwpSchemaField $field The field that we're getting the value for.
439
+ * @param int $count Which iteration of this field are we retrieving.
440
+ * @return mixed $value;
441
+ */
442
+ public function get_field_output_value( $values, $field, $count = 1 ) {
443
+ global $post;
444
+
445
+ if ( $field->input == 'SchemaField' ) {
446
+ //$max_count = sizeOf($values[$field->slug]);
447
+ $max_count = 1;
448
+
449
+ for ( $i = 1; $i <= $max_count; $i++ ) {
450
+ foreach ( $field->children as $field_child ) {
451
+ //$value[$field_child->slug][$i] = $this->get_field_output_value($values[$field->slug], $field_child, $i);
452
+ $values[$field->slug] = isset($values[$field->slug]) ? $values[$field->slug] : array();
453
+ $value[$field_child->slug] = $this->get_field_output_value($values[$field->slug], $field_child, $i);
454
+ }
455
+ }
456
+ }
457
+ else {
458
+ $user_value = isset($values[$field->slug]) ? $values[$field->slug] : '';
459
+
460
+ if ( is_array( $user_value) ) { $user_value = $user_value[$count]; }
461
+
462
+ if ( ! $user_value ) { $default_value = $field->get_default_value($post->ID, 'post'); }
463
+
464
+ $value = $user_value ? $user_value : ( $default_value ? $default_value : '' );
465
+ }
466
+
467
+ return $value;
468
+ }
469
+ }
470
+ endif;
includes/class-schemas-manager.php ADDED
@@ -0,0 +1,335 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class to handle schema custom post types and general schema settings.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2016, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemasManager' ) ) :
14
+
15
+ /**
16
+ * Class to handle schema custom post types and general schema settings for Business Profile
17
+ *
18
+ * @since 2.0.0
19
+ */
20
+ class bpfwpSchemasManager {
21
+
22
+ /**
23
+ * Default values for settings
24
+ *
25
+ * @since 2.0.0
26
+ * @access public
27
+ * @var array
28
+ */
29
+ public $schema_cpts = array();
30
+
31
+ /**
32
+ * Initialize the class and register hooks.
33
+ *
34
+ * @since 2.0.0
35
+ * @access public
36
+ * @return void
37
+ */
38
+ public function __construct() {
39
+
40
+ add_action( 'init', array( $this, 'create_schema_cpts' ) );
41
+
42
+ add_action( 'wp_footer', array( $this, 'output_ld_json_content' ) );
43
+ }
44
+
45
+ /**
46
+ * Initialize the class and register hooks.
47
+ *
48
+ * @since 2.0.0
49
+ * @access public
50
+ * @return void
51
+ */
52
+ public function create_schema_cpts() {
53
+ global $bpfwp_controller;
54
+
55
+ require_once BPFWP_PLUGIN_DIR . '/includes/class-schema-cpt.php';
56
+ //require_once BPFWP_PLUGIN_DIR . '/includes/class-schema-cpt-post_type.php';
57
+
58
+ $schema_cpt_posts = get_posts( array( 'posts_per_page' => -1, 'post_type' => $bpfwp_controller->cpts->schema_cpt_slug ) );
59
+
60
+ foreach ( $schema_cpt_posts as $schema_post ) {
61
+ $schema_data = get_post_meta( $schema_post->ID, 'bpfwp-schema-data', true );
62
+
63
+ $schema_target_type = isset($schema_data['schema_target_type']) ? $schema_data['schema_target_type'] : '';
64
+ $schema_target_value = isset($schema_data['schema_target_value']) ? $schema_data['schema_target_value'] : '';
65
+ $schema_type = isset($schema_data['schema_type']) ? $schema_data['schema_type'] : '';
66
+ $field_defaults = isset($schema_data['field_defaults']) ? $schema_data['field_defaults'] : '';
67
+ $default_display = isset($schema_data['default_display']) ? $schema_data['default_display'] : '';
68
+
69
+ $this->schema_cpts[$schema_post->ID] = new bpfwpSchemaCPT( array(
70
+ 'post_id' => $schema_post->ID,
71
+ 'target_type' => $schema_target_type,
72
+ 'target_value' => $schema_target_value,
73
+ 'schema_type' => $schema_type,
74
+ 'field_defaults' => $field_defaults,
75
+ 'default_display' => $default_display,
76
+ ) );
77
+ }
78
+ }
79
+
80
+ /**
81
+ * Array of organization schema type options
82
+ *
83
+ * @since 2.0.0 public
84
+ * @return array A filtered list of schema types.
85
+ * @to-do: create schema classes for the other types needed
86
+ */
87
+ public function get_schema_organization_types() {
88
+ return apply_filters(
89
+ 'bp_schema_types',
90
+ array(
91
+ 'Organization' => 'Organization',
92
+ 'Airline' => 'Airline',
93
+ 'Consortium' => 'Consortium',
94
+ 'Corporation' => 'Corporation',
95
+ 'EducationalOrganization' => 'Educational Organization',
96
+ 'CollegeOrUniversity' => '- College or University',
97
+ 'ElementarySchool' => '- Elementary School',
98
+ 'HighSchool' => '- High School',
99
+ 'MiddleSchool' => '- Middle School',
100
+ 'Prechool' => '- Prechool',
101
+ 'School' => '- School',
102
+ 'FundingScheme' => 'Funding Scheme',
103
+ 'GovernmentOrganization' => 'Government Organization',
104
+ 'LibrarySystem' => 'Library System',
105
+ 'LocalBusiness' => 'Local Business',
106
+ 'AnimalShelter' => '- Animal Shelter',
107
+ 'AutomotiveBusiness' => '- Automotive Business',
108
+ 'AutoBodyShop' => '--- AutoBody Shop',
109
+ 'AutoDealer' => '--- Auto Dealer',
110
+ 'AutoPartsStore' => '--- Auto Parts Store',
111
+ 'AutoRental' => '--- Auto Rental',
112
+ 'AutoRepair' => '--- Auto Repair',
113
+ 'AutoWash' => '--- Auto Wash',
114
+ 'GasStation' => '--- Gas Station',
115
+ 'MotorcycleDealer' => '--- Motorcycle Dealer',
116
+ 'MotorcycleRepair' => '--- Motorcycle Repair',
117
+ 'ChildCare' => '- Child Care',
118
+ 'Dentist' => '- Dentist',
119
+ 'DryCleaningOrLaundry' => '- Dry Cleaning or Laundry',
120
+ 'EmergencyService' => '- Emergency Service',
121
+ 'FirsStation' => '--- Fire Station',
122
+ 'Hospital' => '--- Hospital',
123
+ 'PoliceStation' => '--- Police Station',
124
+ 'EmploymentAgency' => '- Employment Agency',
125
+ 'EntertainmentBusiness' => '- Entertainment Business',
126
+ 'AdultEntertainment' => '--- Adult Entertainment',
127
+ 'AmusementPark' => '--- Amusement Park',
128
+ 'ArtGallery' => '--- Art Gallery',
129
+ 'Casino' => '--- Casino',
130
+ 'ComedyClub' => '--- Comedy Club',
131
+ 'MovieTheater' => '--- Movie Theater',
132
+ 'NightClub' => '--- Night Club',
133
+ 'FinancialService' => '- Financial Service',
134
+ 'AccountingService' => '--- Accounting Service',
135
+ 'AutomatedTeller' => '--- Automated Teller',
136
+ 'BankOrCreditUnion' => '--- Bank or Credit Union',
137
+ 'InsuranceAgency' => '--- Insurance Agency',
138
+ 'FoodEstablishment' => '- Food Establishment',
139
+ 'Bakery' => '--- Bakery',
140
+ 'BarOrPub' => '--- Bar or Pub',
141
+ 'Brewery' => '--- Brewery',
142
+ 'CafeOrCoffeeShop' => '--- Cafe or Coffee Shop',
143
+ 'Distillery' => '--- Distillery',
144
+ 'FastFoodRestaurant' => '--- Fast Food Restaurant',
145
+ 'IceCreamShop' => '--- Ice Cream Shop',
146
+ 'Restaurant' => '--- Restaurant',
147
+ 'Winery' => '--- Winery',
148
+ 'GovernmentOffice' => '- Government Office',
149
+ 'PostOffice' => '--- Post Office',
150
+ 'HealthAndBeautyBusiness' => '- Health and Beauty Business',
151
+ 'BeautySalon' => '--- Beauty Salon',
152
+ 'DaySpa' => '--- Day Spa',
153
+ 'HairSalon' => '--- Hair Salon',
154
+ 'HealthClub' => '--- Health Club',
155
+ 'NailSalon' => '--- Nail Salon',
156
+ 'TattooParlor' => '--- Tattoo Parlor',
157
+ 'HomeAndConstructionBusiness' => '- Home and Construction Business',
158
+ 'Electrician' => '--- Electrician',
159
+ 'GeneralContractor' => '--- General Contractor',
160
+ 'HVACBusiness' => '--- HVAC Business',
161
+ 'HousePainter' => '--- House Painter',
162
+ 'Locksmith' => '--- Locksmith',
163
+ 'MovingCompany' => '--- Moving Company',
164
+ 'Plumber' => '--- Plumber',
165
+ 'RoofingContractor' => '--- Roofing Contractor',
166
+ 'InternetCafe' => '- Internet Cafe',
167
+ 'LegalService' => '- Legal Service',
168
+ 'Attorney' => '--- Attorney',
169
+ 'Notary' => '--- Notary',
170
+ 'Library' => '- Library',
171
+ 'LodgingBusiness' => '- Lodging Business',
172
+ 'BedAndBreakfast' => '--- Bed and Breakfast',
173
+ 'Campground' => '--- Campground',
174
+ 'Hostel' => '--- Hostel',
175
+ 'Hotel' => '--- Hotel',
176
+ 'Motel' => '--- Motel',
177
+ 'Resort' => '--- Resort',
178
+ 'MedicalBusiness' => '- Medical Business',
179
+ 'CommunityHealth' => '--- Community Health',
180
+ 'Dentist' => '--- Dentist',
181
+ 'Dermatology' => '--- Dermatology',
182
+ 'DietNutrition' => '--- Diet Nutrition',
183
+ 'Emergency' => '--- Emergency',
184
+ 'Geriatric' => '--- Geriatric',
185
+ 'Gynecologic' => '--- Gynecologic',
186
+ 'MedicalClinic' => '--- Medical Clinic',
187
+ 'Midwifery' => '--- Midwifery',
188
+ 'Nursing' => '--- Nursing',
189
+ 'Obstetric' => '--- Obstetric',
190
+ 'Oncologic' => '--- Oncologic',
191
+ 'Optician' => '--- Optician',
192
+ 'Optometric' => '--- Optometric',
193
+ 'Otolaryngologic' => '--- Otolaryngologic',
194
+ 'Pediatric' => '--- Pediatric',
195
+ 'Pharmacy' => '--- Pharmacy',
196
+ 'Physiotherapy' => '--- Physiotherapy',
197
+ 'PlasticSurgery' => '--- Plastic Surgery',
198
+ 'Podiatric' => '--- Podiatric',
199
+ 'PrimaryCare' => '--- Primary Care',
200
+ 'Psychiatric' => '--- Psychiatric',
201
+ 'PublicHealth' => '--- Public Health',
202
+ 'ProfessionalService' => '- Professional Service',
203
+ 'RadioStation' => '- Radio Station',
204
+ 'RealEstateAgent' => '- Real Estate Agent',
205
+ 'RecyclingCenter' => '- Recycling Center',
206
+ 'SelfStorage' => '- Self Storage',
207
+ 'ShoppingCenter' => '- Shopping Center',
208
+ 'SportsActivityLocation' => '- Sports Activity Location',
209
+ 'BowlingAlley' => '--- Bowling Alley',
210
+ 'ExerciseGym' => '--- Exercise Gym',
211
+ 'GolfCourse' => '--- Golf Course',
212
+ 'HealthClub' => '--- Health Club',
213
+ 'PublicSwimmingPool' => '--- Public Swimming Pool',
214
+ 'SkiResort' => '--- Ski Resort',
215
+ 'SportsClub' => '--- Sports Club',
216
+ 'StadiumOrArena' => '--- Stadium or Arena',
217
+ 'TennisComplex' => '--- Tennis Complex',
218
+ 'Store' => '- Store',
219
+ 'AutoPartsStore' => '--- Auto Parts Store',
220
+ 'BikeStore' => '--- Bike Store',
221
+ 'BookStore' => '--- Book Store',
222
+ 'ClothingStore' => '--- Clothing Store',
223
+ 'ComputerStore' => '--- Computer Store',
224
+ 'ConvenienceStore' => '--- Convenience Store',
225
+ 'DepartmentStore' => '--- Department Store',
226
+ 'ElectronicsStore' => '--- Electronics Store',
227
+ 'Florist' => '--- Florist',
228
+ 'FurnitureSotre' => '--- Furniture Store',
229
+ 'GardenStore' => '--- Garden Store',
230
+ 'GroceryStore' => '--- Grocery Store',
231
+ 'HardwareStore' => '--- Hardware Store',
232
+ 'HobbyShop' => '--- Hobby Shop',
233
+ 'HomeGoodsStore' => '--- Home Goods Store',
234
+ 'JewelryStore' => '--- Jewelry Store',
235
+ 'LiquorStore' => '--- Liquor Store',
236
+ 'MensClothingStore' => '--- Mens Clothing Store',
237
+ 'MobilePhoneStore' => '--- Mobile Phone Store',
238
+ 'MovieRentalStore' => '--- Movie Rental Store',
239
+ 'MusicStore' => '--- Music Store',
240
+ 'OfficeEquipmentStore' => '--- Office Equipment Store',
241
+ 'OutletStore' => '--- Outlet Store',
242
+ 'PawnShop' => '--- Pawn Shop',
243
+ 'PetStore' => '--- Pet Store',
244
+ 'ShoeStore' => '--- Shoe Store',
245
+ 'SportingGoodsStore' => '--- Sporting Goods Store',
246
+ 'TireShop' => '--- Tire Shop',
247
+ 'ToyStore' => '--- Toy Store',
248
+ 'WholesaleStore' => '--- Wholesale Store',
249
+ 'TelevisionStation' => '- Television Station',
250
+ 'TouristInformationCenter' => '- Tourist Information Center',
251
+ 'TravelAgency' => '- Travel Agency',
252
+ 'MedicalOrganization' => 'Medical Organization',
253
+ 'Dentist' => '- Dentist',
254
+ 'DiagnosticLab' => '- Diagnostic Lab',
255
+ 'Hospital' => '- Hospital',
256
+ 'MedicalClinic' => '- Medical Clinic',
257
+ 'Pharmacy' => '- Pharmacy',
258
+ 'Physician' => '- Physician',
259
+ 'VeterinaryCare' => '- Veterinary Care',
260
+ 'NGO' => 'NGO',
261
+ 'NewsMediaOrganization' => 'News Media Organization',
262
+ 'PerformingGroup' => 'PerformingGroup',
263
+ 'DanceGroup' => '- Dance Group',
264
+ 'MusicGroup' => '- Music Group',
265
+ 'TheaterGroup' => '- Theater Group',
266
+ 'Project' => 'Project',
267
+ 'FundingAgency' => '- Funding Agency',
268
+ 'ResearchProject' => '- Research Project',
269
+ 'SportsOrganization' => 'Sports Organization',
270
+ 'SportsTeam' => '- Sports Team',
271
+ 'WorkersUnion' => 'Workers Union',
272
+ )
273
+ );
274
+ }
275
+
276
+ /**
277
+ * Array of schema type options
278
+ *
279
+ * @since 2.0.0 public
280
+ * @return array A filtered list of schema types.
281
+ * @to-do: create schema classes for the other types needed
282
+ */
283
+ public function get_schema_rich_results_types() {
284
+ return apply_filters(
285
+ 'bp_rich_results_schema_types',
286
+ array(
287
+ 'Article' => 'Article',
288
+ 'Book' => 'Book',
289
+ 'Breadcrumb' => 'Breadcrumb List',
290
+ 'Carousel' => 'Carousel', // @type is ItemList
291
+ 'Course' => 'Course',
292
+ 'CriticReview' => 'Critic Review', // @type is Review
293
+ 'Dataset' => 'Dataset',
294
+ 'EmployerAggregateRating' => 'Employer Aggregate Rating',
295
+ 'Event' => 'Event',
296
+ 'FactCheck' => 'Fact Check',
297
+ 'FAQPage' => 'FAQ',
298
+ 'HowTo' => 'How-to',
299
+ 'JobPosting' => 'Job Posting',
300
+ 'LocalBusinessListing' => 'Local Business Listing',
301
+ 'Logo' => 'Logo', // @type is Organization
302
+ 'Movie' => 'Movie',
303
+ 'Occupation' => 'Occupation',
304
+ 'Product' => 'Product',
305
+ 'QAPage' => 'Q & A',
306
+ 'Recipe' => 'Recipe', // @type is ItemList
307
+ 'ReviewSnippet' => 'Review Snippet',
308
+ 'SitelinksSearchbox' => 'Sitelinks Searchbox', // Google modifies this slightly
309
+ 'SoftwareApp' => 'Software App',
310
+ 'SubscriptionAndPaywalledContent' => 'Subscription and Paywalled Content',
311
+ 'Video' => 'Video',
312
+ )
313
+ );
314
+ }
315
+
316
+ /**
317
+ * Array of schema type options
318
+ *
319
+ * @since 2.0.0
320
+ * @access public
321
+ * @return void
322
+ */
323
+ public function output_ld_json_content() {
324
+ $ld_json = array();
325
+
326
+ $ld_json_ouptut = apply_filters( 'bpfwp_ld_json_output', $ld_json );
327
+
328
+ if ( ! empty($ld_json_ouptut) ) {
329
+ echo '<script type="application/ld+json" class="bpfwp-ld-json-data">';
330
+ echo wp_json_encode( $ld_json_ouptut );
331
+ echo '</script>';
332
+ }
333
+ }
334
+ }
335
+ endif;
includes/class-settings.php CHANGED
@@ -1,555 +1,703 @@
1
- <?php
2
- /**
3
- * Define settings used throughout the plugin.
4
- *
5
- * @package BusinessProfile
6
- * @copyright Copyright (c) 2016, Theme of the Crop
7
- * @license GPL-2.0+
8
- * @since 0.0.1
9
- */
10
-
11
- defined( 'ABSPATH' ) || exit;
12
-
13
- if ( ! class_exists( 'bpfwpSettings' ) ) :
14
-
15
- /**
16
- * Class to handle configurable settings for Business Profile
17
- *
18
- * @since 0.0.1
19
- */
20
- class bpfwpSettings {
21
-
22
- /**
23
- * Default values for settings
24
- *
25
- * @since 0.0.1
26
- * @access public
27
- * @var array
28
- */
29
- public $defaults = array();
30
-
31
- /**
32
- * Default values for display settings
33
- *
34
- * @since 0.0.1
35
- * @access public
36
- * @var array
37
- */
38
- public $default_display_settings = array();
39
-
40
- /**
41
- * Stored values for settings
42
- *
43
- * @since 0.0.1
44
- * @access public
45
- * @var array
46
- */
47
- public $settings = array();
48
-
49
- /**
50
- * Initialize the class and register hooks.
51
- *
52
- * @since 0.0.1
53
- * @access public
54
- * @return void
55
- */
56
- public function __construct() {
57
-
58
- add_action( 'init', array( $this, 'set_defaults' ) );
59
-
60
- add_action( 'init', array( $this, 'load_settings_panel' ) );
61
-
62
- }
63
-
64
- /**
65
- * Load the plugin's default settings
66
- *
67
- * @since 0.0.1
68
- * @access public
69
- * @return void
70
- */
71
- public function set_defaults() {
72
-
73
- $this->defaults = array(
74
- 'schema_type' => 'Organization',
75
- 'name' => get_bloginfo( 'name' ),
76
- );
77
-
78
- $this->defaults = apply_filters( 'bpfwp_defaults', $this->defaults );
79
- }
80
-
81
- /**
82
- * Get default display settings
83
- *
84
- * Controls default visibility of elements in the contact card as well
85
- * as when template functions, like bpfwp_print_name, are called
86
- * directly.
87
- *
88
- * @since 1.1
89
- * @access public
90
- * @return array $default_display_settings The display settings defaults.
91
- */
92
- public function get_default_display_settings() {
93
-
94
- if ( ! empty( $this->default_display_settings ) ) {
95
- return $this->default_display_settings;
96
- }
97
-
98
- $this->default_display_settings = apply_filters(
99
- 'bpfwp_default_display_settings',
100
- array(
101
- 'location' => false,
102
- 'show_name' => true,
103
- 'show_address' => true,
104
- 'show_get_directions' => true,
105
- 'show_phone' => true,
106
- 'show_contact' => true,
107
- 'show_opening_hours' => true,
108
- 'show_opening_hours_brief' => false,
109
- 'show_map' => true,
110
- 'show_image' => false,
111
- )
112
- );
113
-
114
- return $this->default_display_settings;
115
- }
116
-
117
- /**
118
- * Get a setting's value or fallback to a default if one exists
119
- *
120
- * @since 0.0.1
121
- * @access public
122
- * @param string $setting The setting to retrieve.
123
- * @param string $location The location where the setting is used.
124
- * @return mixed A setting based on the key provided.
125
- */
126
- public function get_setting( $setting, $location = false ) {
127
-
128
- // Most settings are named with hyphens, but the schema_type uses
129
- // an underscore. This just provides a small convenience by allowing
130
- // users to look up the setting by `schema-type`.
131
- if ( 'schema-type' === $setting ) {
132
- $setting = 'schema_type';
133
- }
134
-
135
- if ( empty( $location ) ) {
136
- if ( empty( $this->settings ) ) {
137
- $this->settings = get_option( 'bpfwp-settings' );
138
- }
139
-
140
- if ( ! empty( $this->settings[ $setting ] ) ) {
141
- return $this->settings[ $setting ];
142
- }
143
-
144
- if ( ! empty( $this->defaults[ $setting ] ) ) {
145
- return $this->defaults[ $setting ];
146
- }
147
- } else {
148
-
149
- // Map setting slugs to post data.
150
- switch ( $setting ) {
151
-
152
- case 'schema_type' :
153
- return get_post_meta( $location, 'schema_type', true );
154
-
155
- case 'image' :
156
- return has_post_thumbnail( $location ) ? get_post_thumbnail_id( $location ) : $this->get_setting( $setting );
157
-
158
- case 'name' :
159
- return get_the_title( $location );
160
-
161
- case 'description' :
162
- return get_the_content( $location );
163
-
164
- case 'address' :
165
- return array(
166
- 'text' => get_post_meta( $location, 'geo_address', true ),
167
- 'lat' => get_post_meta( $location, 'geo_latitude', true ),
168
- 'lon' => get_post_meta( $location, 'geo_longitude', true ),
169
- );
170
-
171
- case 'phone' :
172
- return get_post_meta( $location, 'phone', true );
173
-
174
- case 'contact-page' :
175
- return get_post_meta( $location, 'contact_post', true );
176
-
177
- case 'contact-email' :
178
- return get_post_meta( $location, 'contact_email', true );
179
-
180
- case 'opening-hours' :
181
- return get_post_meta( $location, 'opening_hours', true );
182
- }
183
- }
184
-
185
- return null;
186
- }
187
-
188
- /**
189
- * Load the admin settings page.
190
- *
191
- * @since 0.0.1
192
- * @access public
193
- * @link https://github.com/NateWr/simple-admin-pages
194
- */
195
- public function load_settings_panel() {
196
-
197
- require_once BPFWP_PLUGIN_DIR . '/lib/simple-admin-pages/simple-admin-pages.php';
198
- $sap = sap_initialize_library(
199
- $args = array(
200
- 'version' => '2.1.2',
201
- 'lib_url' => BPFWP_PLUGIN_URL . '/lib/simple-admin-pages/',
202
- )
203
- );
204
-
205
- // Multiple location mode.
206
- if ( $this->get_setting( 'multiple-locations' ) ) {
207
-
208
- $sap->add_page(
209
- 'menu',
210
- array(
211
- 'id' => 'bpfwp-locations',
212
- 'title' => __( 'Locations', 'business-profile' ),
213
- 'menu_title' => __( 'Locations', 'business-profile' ),
214
- 'capability' => 'manage_options',
215
- 'icon' => 'dashicons-location',
216
- 'position' => null,
217
- )
218
- );
219
-
220
- $sap->add_page(
221
- 'submenu',
222
- array(
223
- 'id' => 'bpfwp-settings',
224
- 'parent_menu' => 'bpfwp-locations',
225
- 'title' => __( 'Business Profile', 'business-profile' ),
226
- 'menu_title' => __( 'Business Profile', 'business-profile' ),
227
- 'capability' => 'manage_options',
228
- )
229
- );
230
-
231
- // Single location mode.
232
- } else {
233
-
234
- $sap->add_page(
235
- 'menu',
236
- array(
237
- 'id' => 'bpfwp-settings',
238
- 'title' => __( 'Business Profile', 'business-profile' ),
239
- 'menu_title' => __( 'Business Profile', 'business-profile' ),
240
- 'capability' => 'manage_options',
241
- 'icon' => 'dashicons-businessman',
242
- 'position' => null,
243
- )
244
- );
245
-
246
- }
247
-
248
- $sap->add_section(
249
- 'bpfwp-settings',
250
- array(
251
- 'id' => 'bpfwp-seo',
252
- 'title' => __( 'Search Engine Optimization', 'business-profile' ),
253
- )
254
- );
255
-
256
- $sap->add_setting(
257
- 'bpfwp-settings',
258
- 'bpfwp-seo',
259
- 'select',
260
- array(
261
- 'id' => 'schema_type',
262
- 'title' => __( 'Schema Type', 'business-profile' ),
263
- 'description' => __( 'Select the option that best describes your business to improve how search engines understand your website.', 'business-profile' ) . ' <a href="http://schema.org/" target="_blank">Schema.org</a>',
264
- 'blank_option' => false,
265
- 'options' => $this->get_schema_types(),
266
- 'args' => array(
267
- 'label_for' => 'schema_type',
268
- 'class' => 'bpfwp-schema_type'
269
- )
270
- )
271
- );
272
-
273
- $sap->add_setting(
274
- 'bpfwp-settings',
275
- 'bpfwp-seo',
276
- 'image',
277
- array(
278
- 'id' => 'image',
279
- 'title' => __( 'Image', 'business-profile' ),
280
- 'description' => __( 'Google requires you provide an image to display with your local business search profile.', 'business-profile' ),
281
- 'strings' => array(
282
- 'add_image' => __( 'Add Image', 'business-profile' ),
283
- 'change_image' => __( 'Change Image', 'business-profile' ),
284
- 'remove_image' => __( 'Remove Image', 'business-profile' ),
285
- ),
286
- 'args' => array(
287
- 'label_for' => 'image',
288
- 'class' => 'bpfwp-image'
289
- ),
290
- )
291
- );
292
-
293
- $sap->add_section(
294
- 'bpfwp-settings',
295
- array(
296
- 'id' => 'bpfwp-contact',
297
- 'title' => __( 'Contact Information', 'business-profile' ),
298
- )
299
- );
300
-
301
- $sap->add_setting(
302
- 'bpfwp-settings',
303
- 'bpfwp-contact',
304
- 'text',
305
- array(
306
- 'id' => 'name',
307
- 'title' => __( 'Name', 'business-profile' ),
308
- 'description' => __( 'Enter the name of your business if it is different than the website name.', 'business-profile' ),
309
- 'placeholder' => $this->defaults['name'],
310
- 'args' => array(
311
- 'label_for' => 'bpfwp-settings[name]',
312
- 'class' => 'bpfwp-name'
313
- )
314
-
315
- )
316
- );
317
-
318
- $sap->add_setting(
319
- 'bpfwp-settings',
320
- 'bpfwp-contact',
321
- 'address',
322
- array(
323
- 'id' => 'address',
324
- 'title' => __( 'Address', 'business-profile' ),
325
- 'api_key_selector' => '.bpfwp-google-maps-api-key input',
326
- 'strings' => array(
327
- 'sep-action-links' => _x( ' | ', 'separator between admin action links in address component', 'business-profile' ),
328
- 'sep-lat-lon' => _x( ', ', 'separates latitude and longitude', 'business-profile' ),
329
- 'no-setting' => __( 'No map coordinates set.', 'business-profile' ),
330
- 'retrieving' => __( 'Requesting new coordinates', 'business-profile' ),
331
- 'select' => __( 'Select a match below', 'business-profile' ),
332
- 'view' => __( 'View', 'business-profile' ),
333
- 'retrieve' => __( 'Retrieve map coordinates', 'business-profile' ),
334
- 'remove' => __( 'Remove map coordinates', 'business-profile' ),
335
- 'try_again' => __( 'Try again?', 'business-profile' ),
336
- 'result_error' => __( 'Error', 'business-profile' ),
337
- 'result_invalid' => __( 'Invalid request. Be sure to fill out the address field before retrieving coordinates.', 'business-profile' ),
338
- 'result_denied' => __( 'Request denied.', 'business-profile' ),
339
- 'result_limit' => __( 'Request denied because you are over your request quota.', 'business-profile' ),
340
- 'result_empty' => __( 'Nothing was found at that address', 'business-profile' ),
341
- ),
342
- 'args' => array(
343
- 'label_for' => 'bpfwp-settings[address]',
344
- 'class' => 'bpfwp-address'
345
- )
346
- )
347
- );
348
-
349
- $sap->add_setting(
350
- 'bpfwp-settings',
351
- 'bpfwp-contact',
352
- 'text',
353
- array(
354
- 'id' => 'google-maps-api-key',
355
- 'title' => __( 'Google Maps API Key', 'business-profile' ),
356
- 'description' => sprintf(
357
- __( 'Google requires an API key to use their maps. %sGet an API key%s. A full walk-through is available in the %sdocumentiaton%s.', 'business-profile' ),
358
- '<a href="https://developers.google.com/maps/documentation/javascript/get-api-key">',
359
- '</a>',
360
- '<a href="http://doc.themeofthecrop.com/plugins/business-profile/user/faq#google-maps-api-key">',
361
- '</a>'
362
- ),
363
- 'args' => array(
364
- 'label_for' => 'bpfwp-settings[google-maps-api-key]',
365
- 'class' => 'bpfwp-google-maps-api-key'
366
- )
367
- )
368
- );
369
-
370
- $sap->add_setting(
371
- 'bpfwp-settings',
372
- 'bpfwp-contact',
373
- 'text',
374
- array(
375
- 'id' => 'phone',
376
- 'title' => __( 'Phone', 'business-profile' ),
377
- 'args' => array(
378
- 'label_for' => 'bpfwp-settings[phone]',
379
- 'class' => 'bpfwp-phone'
380
- )
381
- )
382
- );
383
-
384
- $sap->add_setting(
385
- 'bpfwp-settings',
386
- 'bpfwp-contact',
387
- 'post',
388
- array(
389
- 'id' => 'contact-page',
390
- 'title' => __( 'Contact Page', 'business-profile' ),
391
- 'description' => __( 'Select a page on your site where users can reach you, such as a contact form.', 'business-profile' ),
392
- 'blank_option' => true,
393
- 'args' => array(
394
- 'post_type' => 'page',
395
- 'posts_per_page' => -1,
396
- 'post_status' => 'publish',
397
- 'label_for' => 'bpfwp-settings[contact-page]',
398
- 'class' => 'bpfwp-contact-page'
399
- ),
400
- )
401
- );
402
-
403
- $sap->add_setting(
404
- 'bpfwp-settings',
405
- 'bpfwp-contact',
406
- 'text',
407
- array(
408
- 'id' => 'contact-email',
409
- 'title' => __( 'Email Address (optional)', 'business-profile' ),
410
- 'description' => __( 'Enter an email address only if you want to display this publicly. Showing your email address on your site may cause you to receive excessive spam.', 'business-profile' ),
411
- 'args' => array(
412
- 'label_for' => 'bpfwp-settings[contact-email]',
413
- 'class' => 'bpfwp-contact-email'
414
- )
415
- )
416
- );
417
-
418
- $sap->add_section(
419
- 'bpfwp-settings',
420
- array(
421
- 'id' => 'bpfwp-schedule',
422
- 'title' => __( 'Schedule', 'business-profile' ),
423
- )
424
- );
425
-
426
- $sap->add_setting(
427
- 'bpfwp-settings',
428
- 'bpfwp-schedule',
429
- 'scheduler',
430
- array(
431
- 'id' => 'opening-hours',
432
- 'title' => __( 'Opening Hours', 'business-profile' ),
433
- 'description' => __( 'Define your weekly opening hours by adding scheduling rules.', 'business-profile' ),
434
- 'weekdays' => array(
435
- 'monday' => _x( 'Mo', 'Monday abbreviation', 'business-profile' ),
436
- 'tuesday' => _x( 'Tu', 'Tuesday abbreviation', 'business-profile' ),
437
- 'wednesday' => _x( 'We', 'Wednesday abbreviation', 'business-profile' ),
438
- 'thursday' => _x( 'Th', 'Thursday abbreviation', 'business-profile' ),
439
- 'friday' => _x( 'Fr', 'Friday abbreviation', 'business-profile' ),
440
- 'saturday' => _x( 'Sa', 'Saturday abbreviation', 'business-profile' ),
441
- 'sunday' => _x( 'Su', 'Sunday abbreviation', 'business-profile' ),
442
- ),
443
- 'time_format' => _x( 'h:i A', 'Time format displayed in the opening hours setting panel in your admin area. Must match formatting rules at http://amsul.ca/pickadate.js/time.htm#formats', 'business-profile' ),
444
- 'date_format' => _x( 'mmmm d, yyyy', 'Date format displayed in the opening hours setting panel in your admin area. Must match formatting rules at http://amsul.ca/pickadate.js/date.htm#formatting-rules', 'business-profile' ),
445
- 'disable_weeks' => true,
446
- 'disable_date' => true,
447
- 'strings' => array(
448
- 'add_rule' => __( 'Add another opening time', 'business-profile' ),
449
- 'weekly' => _x( 'Weekly', 'Format of a scheduling rule', 'business-profile' ),
450
- 'monthly' => _x( 'Monthly', 'Format of a scheduling rule', 'business-profile' ),
451
- 'date' => _x( 'Date', 'Format of a scheduling rule', 'business-profile' ),
452
- 'weekdays' => _x( 'Days of the week', 'Label for selecting days of the week in a scheduling rule', 'business-profile' ),
453
- 'month_weeks' => _x( 'Weeks of the month', 'Label for selecting weeks of the month in a scheduling rule', 'business-profile' ),
454
- 'date_label' => _x( 'Date', 'Label to select a date for a scheduling rule', 'business-profile' ),
455
- 'time_label' => _x( 'Time', 'Label to select a time slot for a scheduling rule', 'business-profile' ),
456
- 'allday' => _x( 'All day', 'Label to set a scheduling rule to last all day', 'business-profile' ),
457
- 'start' => _x( 'Start', 'Label for the starting time of a scheduling rule', 'business-profile' ),
458
- 'end' => _x( 'End', 'Label for the ending time of a scheduling rule', 'business-profile' ),
459
- 'set_time_prompt' => _x( 'All day long. Want to %sset a time slot%s?', 'Prompt displayed when a scheduling rule is set without any time restrictions', 'business-profile' ),
460
- 'toggle' => _x( 'Open and close this rule', 'Toggle a scheduling rule open and closed', 'business-profile' ),
461
- 'delete' => _x( 'Delete rule', 'Delete a scheduling rule', 'business-profile' ),
462
- 'delete_schedule' => __( 'Delete scheduling rule', 'business-profile' ),
463
- 'never' => _x( 'Never', 'Brief default description of a scheduling rule when no weekdays or weeks are included in the rule', 'business-profile' ),
464
- 'weekly_always' => _x( 'Every day', 'Brief default description of a scheduling rule when all the weekdays/weeks are included in the rule', 'business-profile' ),
465
- 'monthly_weekdays' => _x( '%s on the %s week of the month', 'Brief default description of a scheduling rule when some weekdays are included on only some weeks of the month. %s should be left alone and will be replaced by a comma-separated list of days and weeks in the following format: M, T, W on the first, second week of the month', 'business-profile' ),
466
- 'monthly_weeks' => _x( '%s week of the month', 'Brief default description of a scheduling rule when some weeks of the month are included but all or no weekdays are selected. %s should be left alone and will be replaced by a comma-separated list of weeks in the following format: First, second week of the month', 'business-profile' ),
467
- 'all_day' => _x( 'All day', 'Brief default description of a scheduling rule when no times are set', 'business-profile' ),
468
- 'before' => _x( 'Ends at', 'Brief default description of a scheduling rule when an end time is set but no start time. If the end time is 6pm, it will read: Ends at 6pm', 'business-profile' ),
469
- 'after' => _x( 'Starts at', 'Brief default description of a scheduling rule when a start time is set but no end time. If the start time is 6pm, it will read: Starts at 6pm', 'business-profile' ),
470
- 'separator' => _x( '&mdash;', 'Separator between times of a scheduling rule', 'business-profile' ),
471
- ),
472
- 'args' => array(
473
- 'class' => 'bpfwp-opening-hours'
474
- )
475
- )
476
- );
477
-
478
- $sap->add_section(
479
- 'bpfwp-settings',
480
- array(
481
- 'id' => 'bpfwp-locations',
482
- 'title' => __( 'Multiple Locations', 'business-profile' ),
483
- )
484
- );
485
-
486
- $sap->add_setting(
487
- 'bpfwp-settings',
488
- 'bpfwp-locations',
489
- 'toggle',
490
- array(
491
- 'id' => 'multiple-locations',
492
- 'title' => __( 'Multiple Locations', 'business-profile' ),
493
- 'label' => __( 'Enable support for multiple business locations.', 'business-profile' ),
494
- 'args' => array(
495
- 'label_for' => 'bpfwp-settings[multiple-locations]',
496
- 'class' => 'bpfwp-multiple-locations'
497
- )
498
-
499
- )
500
- );
501
-
502
- $sap = apply_filters( 'bpfwp_settings_page', $sap );
503
-
504
- $sap->add_admin_menus();
505
-
506
- }
507
-
508
- /**
509
- * Array of schema type options
510
- *
511
- * @since 1.1
512
- * @access public
513
- * @return array A filtered list of schema types.
514
- */
515
- public function get_schema_types() {
516
- return apply_filters(
517
- 'bp_schema_types',
518
- array(
519
- 'Organization' => 'Organization',
520
- 'Corporation' => 'Corporation',
521
- 'EducationalOrganization' => 'Educational Organization',
522
- 'GovernmentOrganization' => 'Government Organization',
523
- 'LocalBusiness' => 'Local Business',
524
- 'AnimalShelter' => '- Animal Shelter',
525
- 'AutomotiveBusiness' => '- Automotive Business',
526
- 'ChildCare' => '- Child Care',
527
- 'DryCleaningOrLaundry' => '- Dry Cleaning or Laundry',
528
- 'EmergencyService' => '- Emergency Service',
529
- 'EmploymentAgency' => '- Employment Agency',
530
- 'EntertainmentBusiness' => '- Entertainment Business',
531
- 'FinancialService' => '- Financial Service',
532
- 'FoodEstablishment' => '- Food Establishment',
533
- 'GovernmentOffice' => '- Government Office',
534
- 'HealthAndBeautyBusiness' => '- Health and Beauty Business',
535
- 'HomeAndConstructionBusiness' => '- Home and Construction Business',
536
- 'InternetCafe' => '- Internet Cafe',
537
- 'Library' => '- Library',
538
- 'LodgingBusiness' => '- Lodging Business',
539
- 'MedicalOrganization' => '- Medical Organization',
540
- 'RadioStation' => '- Radio Station',
541
- 'RealEstateAgent' => '- Real Estate Agent',
542
- 'RecyclingCenter' => '- Recycling Center',
543
- 'SelfStorage' => '- Self Storage',
544
- 'SportsActivityLocation' => '- Sports Activity Location',
545
- 'Store' => '- Store',
546
- 'TouristInformationCenter' => '- Tourist Information Center',
547
- 'TravelAgency' => '- Travel Agency',
548
- 'NGO' => 'NGO',
549
- 'PerformingGroup' => 'PerformingGroup',
550
- 'SportsTeam' => 'SportsTeam',
551
- )
552
- );
553
- }
554
- }
555
- endif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Define settings used throughout the plugin.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2016, Theme of the Crop
7
+ * @license GPL-2.0+
8
+ * @since 0.0.1
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSettings' ) ) :
14
+
15
+ /**
16
+ * Class to handle configurable settings for Business Profile
17
+ *
18
+ * @since 0.0.1
19
+ */
20
+ class bpfwpSettings {
21
+
22
+ /**
23
+ * Default values for settings
24
+ *
25
+ * @since 0.0.1
26
+ * @access public
27
+ * @var array
28
+ */
29
+ public $defaults = array();
30
+
31
+ /**
32
+ * Default values for display settings
33
+ *
34
+ * @since 0.0.1
35
+ * @access public
36
+ * @var array
37
+ */
38
+ public $default_display_settings = array();
39
+
40
+ /**
41
+ * Stored values for settings
42
+ *
43
+ * @since 0.0.1
44
+ * @access public
45
+ * @var array
46
+ */
47
+ public $settings = array();
48
+
49
+ /**
50
+ * Initialize the class and register hooks.
51
+ *
52
+ * @since 0.0.1
53
+ * @access public
54
+ * @return void
55
+ */
56
+ public function __construct() {
57
+
58
+ add_action( 'init', array( $this, 'set_defaults' ) );
59
+
60
+ add_action( 'init', array( $this, 'load_settings_panel' ) );
61
+ }
62
+
63
+ /**
64
+ * Load the plugin's default settings
65
+ *
66
+ * @since 0.0.1
67
+ * @access public
68
+ * @return void
69
+ */
70
+ public function set_defaults() {
71
+
72
+ $this->defaults = array(
73
+ 'schema_type' => 'Organization',
74
+ 'name' => get_bloginfo( 'name' ),
75
+ );
76
+
77
+ $this->defaults = apply_filters( 'bpfwp_defaults', $this->defaults );
78
+ }
79
+
80
+ /**
81
+ * Get default display settings
82
+ *
83
+ * Controls default visibility of elements in the contact card as well
84
+ * as when template functions, like bpfwp_print_name, are called
85
+ * directly.
86
+ *
87
+ * @since 1.1
88
+ * @access public
89
+ * @return array $default_display_settings The display settings defaults.
90
+ */
91
+ public function get_default_display_settings() {
92
+
93
+ if ( ! empty( $this->default_display_settings ) ) {
94
+ return $this->default_display_settings;
95
+ }
96
+
97
+ $this->default_display_settings = apply_filters(
98
+ 'bpfwp_default_display_settings',
99
+ array(
100
+ 'location' => false,
101
+ 'show_name' => true,
102
+ 'show_address' => true,
103
+ 'show_get_directions' => true,
104
+ 'show_phone' => true,
105
+ 'show_contact' => true,
106
+ 'show_opening_hours' => true,
107
+ 'show_opening_hours_brief' => false,
108
+ 'show_map' => true,
109
+ 'show_image' => false,
110
+ )
111
+ );
112
+
113
+ return $this->default_display_settings;
114
+ }
115
+
116
+ /**
117
+ * Get a setting's value or fallback to a default if one exists
118
+ *
119
+ * @since 0.0.1
120
+ * @access public
121
+ * @param string $setting The setting to retrieve.
122
+ * @param string $location The location where the setting is used.
123
+ * @return mixed A setting based on the key provided.
124
+ */
125
+ public function get_setting( $setting, $location = false ) {
126
+
127
+ // Most settings are named with hyphens, but the schema_type uses
128
+ // an underscore. This just provides a small convenience by allowing
129
+ // users to look up the setting by `schema-type`.
130
+ if ( 'schema-type' === $setting ) {
131
+ $setting = 'schema_type';
132
+ }
133
+
134
+ if ( empty( $location ) ) {
135
+ if ( empty( $this->settings ) ) {
136
+ $this->settings = get_option( 'bpfwp-settings' );
137
+ }
138
+
139
+ if ( ! empty( $this->settings[ $setting ] ) ) {
140
+ return $this->settings[ $setting ];
141
+ }
142
+
143
+ if ( ! empty( $this->defaults[ $setting ] ) ) {
144
+ return $this->defaults[ $setting ];
145
+ }
146
+ } else {
147
+
148
+ // Map setting slugs to post data.
149
+ switch ( $setting ) {
150
+
151
+ case 'schema_type' :
152
+ return get_post_meta( $location, 'schema_type', true );
153
+
154
+ case 'image' :
155
+ return has_post_thumbnail( $location ) ? get_post_thumbnail_id( $location ) : $this->get_setting( $setting );
156
+
157
+ case 'name' :
158
+ return get_the_title( $location );
159
+
160
+ case 'description' :
161
+ return get_the_content( $location );
162
+
163
+ case 'address' :
164
+ return array(
165
+ 'text' => get_post_meta( $location, 'geo_address', true ),
166
+ 'lat' => get_post_meta( $location, 'geo_latitude', true ),
167
+ 'lon' => get_post_meta( $location, 'geo_longitude', true ),
168
+ );
169
+
170
+ case 'phone' :
171
+ return get_post_meta( $location, 'phone', true );
172
+
173
+ case 'contact-page' :
174
+ return get_post_meta( $location, 'contact_post', true );
175
+
176
+ case 'contact-email' :
177
+ return get_post_meta( $location, 'contact_email', true );
178
+
179
+ case 'opening-hours' :
180
+ return get_post_meta( $location, 'opening_hours', true );
181
+ }
182
+ }
183
+
184
+ return null;
185
+ }
186
+
187
+ /**
188
+ * Load the admin settings page.
189
+ *
190
+ * @since 0.0.1
191
+ * @access public
192
+ * @link https://github.com/NateWr/simple-admin-pages
193
+ */
194
+ public function load_settings_panel() {
195
+
196
+ global $bpfwp_controller;
197
+
198
+ require_once BPFWP_PLUGIN_DIR . '/lib/simple-admin-pages/simple-admin-pages.php';
199
+ $sap = sap_initialize_library(
200
+ $args = array(
201
+ 'version' => '2.1.2',
202
+ 'lib_url' => BPFWP_PLUGIN_URL . '/lib/simple-admin-pages/',
203
+ )
204
+ );
205
+
206
+ $sap->add_page(
207
+ 'submenu',
208
+ array(
209
+ 'id' => 'bpfwp-settings',
210
+ 'parent_menu' => 'bpfwp-business-profile',
211
+ 'title' => __( 'Settings', 'business-profile' ),
212
+ 'menu_title' => __( 'Settings', 'business-profile' ),
213
+ 'capability' => 'manage_options',
214
+ 'default_tab' => 'bpfwp-basic',
215
+ )
216
+ );
217
+
218
+ $sap->add_section(
219
+ 'bpfwp-settings',
220
+ array(
221
+ 'id' => 'bpfwp-basic',
222
+ 'title' => __( 'Basic', 'business-profile' ),
223
+ 'is_tab' => true,
224
+ )
225
+ );
226
+
227
+ $sap->add_section(
228
+ 'bpfwp-settings',
229
+ array(
230
+ 'id' => 'bpfwp-seo',
231
+ 'title' => __( 'Search Engine Optimization', 'business-profile' ),
232
+ 'tab' => 'bpfwp-basic'
233
+ )
234
+ );
235
+
236
+ $sap->add_setting(
237
+ 'bpfwp-settings',
238
+ 'bpfwp-seo',
239
+ 'select',
240
+ array(
241
+ 'id' => 'schema_type',
242
+ 'title' => __( 'Schema Type', 'business-profile' ),
243
+ 'description' => __( 'Select the option that best describes your business to improve how search engines understand your website.', 'business-profile' ) . ' <a href="http://schema.org/" target="_blank">Schema.org</a>',
244
+ 'blank_option' => false,
245
+ 'options' => $this->get_schema_types(),
246
+ 'args' => array(
247
+ 'label_for' => 'schema_type',
248
+ 'class' => 'bpfwp-schema_type'
249
+ )
250
+ )
251
+ );
252
+
253
+ $sap->add_setting(
254
+ 'bpfwp-settings',
255
+ 'bpfwp-seo',
256
+ 'image',
257
+ array(
258
+ 'id' => 'image',
259
+ 'title' => __( 'Image', 'business-profile' ),
260
+ 'description' => __( 'Google requires you provide an image to display with your local business search profile.', 'business-profile' ),
261
+ 'strings' => array(
262
+ 'add_image' => __( 'Add Image', 'business-profile' ),
263
+ 'change_image' => __( 'Change Image', 'business-profile' ),
264
+ 'remove_image' => __( 'Remove Image', 'business-profile' ),
265
+ ),
266
+ 'args' => array(
267
+ 'label_for' => 'image',
268
+ 'class' => 'bpfwp-image'
269
+ ),
270
+ )
271
+ );
272
+
273
+ $sap->add_section(
274
+ 'bpfwp-settings',
275
+ array(
276
+ 'id' => 'bpfwp-contact',
277
+ 'title' => __( 'Contact Information', 'business-profile' ),
278
+ 'tab' => 'bpfwp-basic'
279
+ )
280
+ );
281
+
282
+ $sap->add_setting(
283
+ 'bpfwp-settings',
284
+ 'bpfwp-contact',
285
+ 'text',
286
+ array(
287
+ 'id' => 'name',
288
+ 'title' => __( 'Name', 'business-profile' ),
289
+ 'description' => __( 'Enter the name of your business if it is different than the website name.', 'business-profile' ),
290
+ 'placeholder' => $this->defaults['name'],
291
+ 'args' => array(
292
+ 'label_for' => 'bpfwp-settings[name]',
293
+ 'class' => 'bpfwp-name'
294
+ )
295
+
296
+ )
297
+ );
298
+
299
+ $sap->add_setting(
300
+ 'bpfwp-settings',
301
+ 'bpfwp-contact',
302
+ 'address',
303
+ array(
304
+ 'id' => 'address',
305
+ 'title' => __( 'Address', 'business-profile' ),
306
+ 'api_key_selector' => '.bpfwp-google-maps-api-key input',
307
+ 'strings' => array(
308
+ 'sep-action-links' => _x( ' | ', 'separator between admin action links in address component', 'business-profile' ),
309
+ 'sep-lat-lon' => _x( ', ', 'separates latitude and longitude', 'business-profile' ),
310
+ 'no-setting' => __( 'No map coordinates set.', 'business-profile' ),
311
+ 'retrieving' => __( 'Requesting new coordinates', 'business-profile' ),
312
+ 'select' => __( 'Select a match below', 'business-profile' ),
313
+ 'view' => __( 'View', 'business-profile' ),
314
+ 'retrieve' => __( 'Retrieve map coordinates', 'business-profile' ),
315
+ 'remove' => __( 'Remove map coordinates', 'business-profile' ),
316
+ 'try_again' => __( 'Try again?', 'business-profile' ),
317
+ 'result_error' => __( 'Error', 'business-profile' ),
318
+ 'result_invalid' => __( 'Invalid request. Be sure to fill out the address field before retrieving coordinates.', 'business-profile' ),
319
+ 'result_denied' => __( 'Request denied.', 'business-profile' ),
320
+ 'result_limit' => __( 'Request denied because you are over your request quota.', 'business-profile' ),
321
+ 'result_empty' => __( 'Nothing was found at that address', 'business-profile' ),
322
+ ),
323
+ 'args' => array(
324
+ 'label_for' => 'bpfwp-settings[address]',
325
+ 'class' => 'bpfwp-address'
326
+ )
327
+ )
328
+ );
329
+
330
+ $sap->add_setting(
331
+ 'bpfwp-settings',
332
+ 'bpfwp-contact',
333
+ 'text',
334
+ array(
335
+ 'id' => 'google-maps-api-key',
336
+ 'title' => __( 'Google Maps API Key', 'business-profile' ),
337
+ 'description' => sprintf(
338
+ __( 'Google requires an API key to use their maps. %sGet an API key%s. A full walk-through is available in the %sdocumentiaton%s.', 'business-profile' ),
339
+ '<a href="https://developers.google.com/maps/documentation/javascript/get-api-key">',
340
+ '</a>',
341
+ '<a href="http://doc.themeofthecrop.com/plugins/business-profile/user/faq#google-maps-api-key">',
342
+ '</a>'
343
+ ),
344
+ 'args' => array(
345
+ 'label_for' => 'bpfwp-settings[google-maps-api-key]',
346
+ 'class' => 'bpfwp-google-maps-api-key'
347
+ )
348
+ )
349
+ );
350
+
351
+ $sap->add_setting(
352
+ 'bpfwp-settings',
353
+ 'bpfwp-contact',
354
+ 'text',
355
+ array(
356
+ 'id' => 'phone',
357
+ 'title' => __( 'Phone', 'business-profile' ),
358
+ 'args' => array(
359
+ 'label_for' => 'bpfwp-settings[phone]',
360
+ 'class' => 'bpfwp-phone'
361
+ )
362
+ )
363
+ );
364
+
365
+ $sap->add_setting(
366
+ 'bpfwp-settings',
367
+ 'bpfwp-contact',
368
+ 'post',
369
+ array(
370
+ 'id' => 'contact-page',
371
+ 'title' => __( 'Contact Page', 'business-profile' ),
372
+ 'description' => __( 'Select a page on your site where users can reach you, such as a contact form.', 'business-profile' ),
373
+ 'blank_option' => true,
374
+ 'args' => array(
375
+ 'post_type' => 'page',
376
+ 'posts_per_page' => -1,
377
+ 'post_status' => 'publish',
378
+ 'label_for' => 'bpfwp-settings[contact-page]',
379
+ 'class' => 'bpfwp-contact-page'
380
+ ),
381
+ )
382
+ );
383
+
384
+ $sap->add_setting(
385
+ 'bpfwp-settings',
386
+ 'bpfwp-contact',
387
+ 'text',
388
+ array(
389
+ 'id' => 'contact-email',
390
+ 'title' => __( 'Email Address (optional)', 'business-profile' ),
391
+ 'description' => __( 'Enter an email address only if you want to display this publicly. Showing your email address on your site may cause you to receive excessive spam.', 'business-profile' ),
392
+ 'args' => array(
393
+ 'label_for' => 'bpfwp-settings[contact-email]',
394
+ 'class' => 'bpfwp-contact-email'
395
+ )
396
+ )
397
+ );
398
+
399
+ $sap->add_section(
400
+ 'bpfwp-settings',
401
+ array(
402
+ 'id' => 'bpfwp-schedule',
403
+ 'title' => __( 'Schedule', 'business-profile' ),
404
+ 'tab' => 'bpfwp-basic'
405
+ )
406
+ );
407
+
408
+ $sap->add_setting(
409
+ 'bpfwp-settings',
410
+ 'bpfwp-schedule',
411
+ 'scheduler',
412
+ array(
413
+ 'id' => 'opening-hours',
414
+ 'title' => __( 'Opening Hours', 'business-profile' ),
415
+ 'description' => __( 'Define your weekly opening hours by adding scheduling rules.', 'business-profile' ),
416
+ 'weekdays' => array(
417
+ 'monday' => _x( 'Mo', 'Monday abbreviation', 'business-profile' ),
418
+ 'tuesday' => _x( 'Tu', 'Tuesday abbreviation', 'business-profile' ),
419
+ 'wednesday' => _x( 'We', 'Wednesday abbreviation', 'business-profile' ),
420
+ 'thursday' => _x( 'Th', 'Thursday abbreviation', 'business-profile' ),
421
+ 'friday' => _x( 'Fr', 'Friday abbreviation', 'business-profile' ),
422
+ 'saturday' => _x( 'Sa', 'Saturday abbreviation', 'business-profile' ),
423
+ 'sunday' => _x( 'Su', 'Sunday abbreviation', 'business-profile' ),
424
+ ),
425
+ 'time_format' => _x( 'h:i A', 'Time format displayed in the opening hours setting panel in your admin area. Must match formatting rules at http://amsul.ca/pickadate.js/time.htm#formats', 'business-profile' ),
426
+ 'date_format' => _x( 'mmmm d, yyyy', 'Date format displayed in the opening hours setting panel in your admin area. Must match formatting rules at http://amsul.ca/pickadate.js/date.htm#formatting-rules', 'business-profile' ),
427
+ 'disable_weeks' => true,
428
+ 'disable_date' => true,
429
+ 'strings' => array(
430
+ 'add_rule' => __( 'Add another opening time', 'business-profile' ),
431
+ 'weekly' => _x( 'Weekly', 'Format of a scheduling rule', 'business-profile' ),
432
+ 'monthly' => _x( 'Monthly', 'Format of a scheduling rule', 'business-profile' ),
433
+ 'date' => _x( 'Date', 'Format of a scheduling rule', 'business-profile' ),
434
+ 'weekdays' => _x( 'Days of the week', 'Label for selecting days of the week in a scheduling rule', 'business-profile' ),
435
+ 'month_weeks' => _x( 'Weeks of the month', 'Label for selecting weeks of the month in a scheduling rule', 'business-profile' ),
436
+ 'date_label' => _x( 'Date', 'Label to select a date for a scheduling rule', 'business-profile' ),
437
+ 'time_label' => _x( 'Time', 'Label to select a time slot for a scheduling rule', 'business-profile' ),
438
+ 'allday' => _x( 'All day', 'Label to set a scheduling rule to last all day', 'business-profile' ),
439
+ 'start' => _x( 'Start', 'Label for the starting time of a scheduling rule', 'business-profile' ),
440
+ 'end' => _x( 'End', 'Label for the ending time of a scheduling rule', 'business-profile' ),
441
+ 'set_time_prompt' => _x( 'All day long. Want to %sset a time slot%s?', 'Prompt displayed when a scheduling rule is set without any time restrictions', 'business-profile' ),
442
+ 'toggle' => _x( 'Open and close this rule', 'Toggle a scheduling rule open and closed', 'business-profile' ),
443
+ 'delete' => _x( 'Delete rule', 'Delete a scheduling rule', 'business-profile' ),
444
+ 'delete_schedule' => __( 'Delete scheduling rule', 'business-profile' ),
445
+ 'never' => _x( 'Never', 'Brief default description of a scheduling rule when no weekdays or weeks are included in the rule', 'business-profile' ),
446
+ 'weekly_always' => _x( 'Every day', 'Brief default description of a scheduling rule when all the weekdays/weeks are included in the rule', 'business-profile' ),
447
+ 'monthly_weekdays' => _x( '%s on the %s week of the month', 'Brief default description of a scheduling rule when some weekdays are included on only some weeks of the month. %s should be left alone and will be replaced by a comma-separated list of days and weeks in the following format: M, T, W on the first, second week of the month', 'business-profile' ),
448
+ 'monthly_weeks' => _x( '%s week of the month', 'Brief default description of a scheduling rule when some weeks of the month are included but all or no weekdays are selected. %s should be left alone and will be replaced by a comma-separated list of weeks in the following format: First, second week of the month', 'business-profile' ),
449
+ 'all_day' => _x( 'All day', 'Brief default description of a scheduling rule when no times are set', 'business-profile' ),
450
+ 'before' => _x( 'Ends at', 'Brief default description of a scheduling rule when an end time is set but no start time. If the end time is 6pm, it will read: Ends at 6pm', 'business-profile' ),
451
+ 'after' => _x( 'Starts at', 'Brief default description of a scheduling rule when a start time is set but no end time. If the start time is 6pm, it will read: Starts at 6pm', 'business-profile' ),
452
+ 'separator' => _x( '&mdash;', 'Separator between times of a scheduling rule', 'business-profile' ),
453
+ ),
454
+ 'args' => array(
455
+ 'class' => 'bpfwp-opening-hours'
456
+ )
457
+ )
458
+ );
459
+
460
+ // $sap->add_section(
461
+ // 'bpfwp-settings',
462
+ // array(
463
+ // 'id' => 'bpfwp-about-page',
464
+ // 'title' => __( 'About Us Page', 'business-profile' ),
465
+ // 'tab' => 'bpfwp-basic'
466
+ // )
467
+ // );
468
+
469
+ // $sap->add_setting(
470
+ // 'bpfwp-settings',
471
+ // 'bpfwp-about-page',
472
+ // 'post',
473
+ // array(
474
+ // 'id' => 'about-page',
475
+ // 'title' => __( 'About Us Page', 'business-profile' ),
476
+ // 'description' => __( 'Select your about page to have the appropriate schema automatically added to it.', 'business-profile' ),
477
+ // 'blank_option' => true,
478
+ // 'args' => array(
479
+ // 'post_type' => 'page',
480
+ // 'posts_per_page' => -1,
481
+ // 'post_status' => 'publish',
482
+ // 'label_for' => 'bpfwp-settings[about-page]',
483
+ // 'class' => 'bpfwp-about-page'
484
+ // ),
485
+ // )
486
+ // );
487
+
488
+ // $sap->add_section(
489
+ // 'bpfwp-settings',
490
+ // array(
491
+ // 'id' => 'bpfwp-site-navigation',
492
+ // 'title' => __( 'Site Navigation', 'business-profile' ),
493
+ // 'tab' => 'bpfwp-basic'
494
+ // )
495
+ // );
496
+
497
+ // $sap->add_setting(
498
+ // 'bpfwp-settings',
499
+ // 'bpfwp-site-navigation',
500
+ // 'menu',
501
+ // array(
502
+ // 'id' => 'main-menu',
503
+ // 'title' => __( 'Main Menu', 'business-profile' ),
504
+ // 'description' => __( 'Select your main menu to have the appropriate schema automatically added to it.', 'business-profile' ),
505
+ // 'blank_option' => true,
506
+ // 'args' => array(
507
+ // 'label_for' => 'bpfwp-settings[main-menu]',
508
+ // 'class' => 'bpfwp-main-menu'
509
+ // ),
510
+ // )
511
+ // );
512
+
513
+ if ( ! $bpfwp_controller->permissions->check_permission('premium') ) {
514
+ $premium_permissions = array(
515
+ 'disabled' => true,
516
+ 'disabled_image'=> 'https://www.etoilewebdesign.com/wp-content/uploads/2018/06/Logo-White-Filled40-px.png',
517
+ 'purchase_link' => 'https://www.fivestarplugins.com/plugins/business-profile/'
518
+ );
519
+ }
520
+ else { $premium_permissions = array(); }
521
+
522
+ if ( ! $bpfwp_controller->permissions->check_permission('integrations') ) {
523
+ $integrations_permissions = array(
524
+ 'disabled' => true,
525
+ 'disabled_image'=> 'https://www.etoilewebdesign.com/wp-content/uploads/2018/06/Logo-White-Filled40-px.png',
526
+ 'purchase_link' => 'https://www.fivestarplugins.com/plugins/business-profile/'
527
+ );
528
+ }
529
+ else { $integrations_permissions = array(); }
530
+
531
+ if ( ! $bpfwp_controller->permissions->check_permission('locations') ) {
532
+ $locations_permissions = array(
533
+ 'disabled' => true,
534
+ 'disabled_image'=> 'https://www.etoilewebdesign.com/wp-content/uploads/2018/06/Logo-White-Filled40-px.png',
535
+ 'purchase_link' => 'https://www.fivestarplugins.com/plugins/business-profile/'
536
+ );
537
+ }
538
+ else { $locations_permissions = array(); }
539
+
540
+ $sap->add_section(
541
+ 'bpfwp-settings',
542
+ array(
543
+ 'id' => 'bpfwp-premium',
544
+ 'title' => __( 'Premium', 'business-profile' ),
545
+ 'is_tab' => true,
546
+ )
547
+ );
548
+
549
+ $sap->add_section(
550
+ 'bpfwp-settings',
551
+ array_merge(
552
+ array(
553
+ 'id' => 'bpfwp-premium-general',
554
+ 'title' => __( 'General', 'business-profile' ),
555
+ 'tab' => 'bpfwp-premium'
556
+ ),
557
+ $premium_permissions
558
+ )
559
+ );
560
+
561
+ $sap->add_setting(
562
+ 'bpfwp-settings',
563
+ 'bpfwp-premium-general',
564
+ 'toggle',
565
+ array(
566
+ 'id' => 'article-rich-snippets',
567
+ 'title' => __( 'Post Rich Snippets', 'business-profile' ),
568
+ 'label' => __( 'Automatically enable article \'Rich Snippets\' for Google for all regular posts on the site.', 'business-profile' ),
569
+ 'args' => array(
570
+ 'label_for' => 'bpfwp-settings[article-rich-snippets]',
571
+ 'class' => 'bpfwp-article-rich-snippets'
572
+ )
573
+
574
+ )
575
+ );
576
+
577
+ $sap->add_setting(
578
+ 'bpfwp-settings',
579
+ 'bpfwp-premium-general',
580
+ 'toggle',
581
+ array(
582
+ 'id' => 'schema-default-helpers',
583
+ 'title' => __( 'Schema Default Helpers', 'business-profile' ),
584
+ 'label' => __( 'Adds a helper pop-up that can be accessed on click on the Schema edit screen that list the available default options, functions and metas', 'business-profile' ),
585
+ 'args' => array(
586
+ 'label_for' => 'bpfwp-settings[schema-default-helpers]',
587
+ 'class' => 'bpfwp-schema-default-helpers'
588
+ )
589
+
590
+ )
591
+ );
592
+
593
+ $sap->add_section(
594
+ 'bpfwp-settings',
595
+ array_merge(
596
+ array(
597
+ 'id' => 'bpfwp-integrations',
598
+ 'title' => __( 'Plugin Integrations', 'business-profile' ),
599
+ 'tab' => 'bpfwp-premium'
600
+ ),
601
+ $integrations_permissions
602
+ )
603
+ );
604
+
605
+ $sap->add_setting(
606
+ 'bpfwp-settings',
607
+ 'bpfwp-integrations',
608
+ 'toggle',
609
+ array(
610
+ 'id' => 'woocommerce-integration',
611
+ 'title' => __( 'WooCommerce Integration', 'business-profile' ),
612
+ 'label' => __( 'Automatically enable product \'Rich Snippets\' for Google.', 'business-profile' ),
613
+ 'args' => array(
614
+ 'label_for' => 'bpfwp-settings[woocommerce-integration]',
615
+ 'class' => 'bpfwp-woocommerce-integration'
616
+ )
617
+
618
+ )
619
+ );
620
+
621
+ $sap->add_section(
622
+ 'bpfwp-settings',
623
+ array_merge(
624
+ array(
625
+ 'id' => 'bpfwp-locations',
626
+ 'title' => __( 'Multiple Locations', 'business-profile' ),
627
+ 'tab' => 'bpfwp-premium'
628
+ ),
629
+ $locations_permissions
630
+ )
631
+ );
632
+
633
+ $sap->add_setting(
634
+ 'bpfwp-settings',
635
+ 'bpfwp-locations',
636
+ 'toggle',
637
+ array(
638
+ 'id' => 'multiple-locations',
639
+ 'title' => __( 'Multiple Locations', 'business-profile' ),
640
+ 'label' => __( 'Enable support for multiple business locations.', 'business-profile' ),
641
+ 'args' => array(
642
+ 'label_for' => 'bpfwp-settings[multiple-locations]',
643
+ 'class' => 'bpfwp-multiple-locations'
644
+ )
645
+
646
+ )
647
+ );
648
+
649
+ $sap = apply_filters( 'bpfwp_settings_page', $sap );
650
+
651
+ $sap->add_admin_menus();
652
+
653
+ }
654
+
655
+ /**
656
+ * Array of schema type options
657
+ *
658
+ * @since 1.1
659
+ * @access public
660
+ * @return array A filtered list of schema types.
661
+ */
662
+ public function get_schema_types() {
663
+ return apply_filters(
664
+ 'bp_schema_types',
665
+ array(
666
+ 'Organization' => 'Organization',
667
+ 'Corporation' => 'Corporation',
668
+ 'EducationalOrganization' => 'Educational Organization',
669
+ 'GovernmentOrganization' => 'Government Organization',
670
+ 'LocalBusiness' => 'Local Business',
671
+ 'AnimalShelter' => '- Animal Shelter',
672
+ 'AutomotiveBusiness' => '- Automotive Business',
673
+ 'ChildCare' => '- Child Care',
674
+ 'DryCleaningOrLaundry' => '- Dry Cleaning or Laundry',
675
+ 'EmergencyService' => '- Emergency Service',
676
+ 'EmploymentAgency' => '- Employment Agency',
677
+ 'EntertainmentBusiness' => '- Entertainment Business',
678
+ 'FinancialService' => '- Financial Service',
679
+ 'FoodEstablishment' => '- Food Establishment',
680
+ 'GovernmentOffice' => '- Government Office',
681
+ 'HealthAndBeautyBusiness' => '- Health and Beauty Business',
682
+ 'HomeAndConstructionBusiness' => '- Home and Construction Business',
683
+ 'InternetCafe' => '- Internet Cafe',
684
+ 'Library' => '- Library',
685
+ 'LodgingBusiness' => '- Lodging Business',
686
+ 'MedicalOrganization' => '- Medical Organization',
687
+ 'RadioStation' => '- Radio Station',
688
+ 'RealEstateAgent' => '- Real Estate Agent',
689
+ 'RecyclingCenter' => '- Recycling Center',
690
+ 'SelfStorage' => '- Self Storage',
691
+ 'SportsActivityLocation' => '- Sports Activity Location',
692
+ 'Store' => '- Store',
693
+ 'TouristInformationCenter' => '- Tourist Information Center',
694
+ 'TravelAgency' => '- Travel Agency',
695
+ 'NGO' => 'NGO',
696
+ 'PerformingGroup' => 'PerformingGroup',
697
+ 'SportsTeam' => 'SportsTeam',
698
+ )
699
+ );
700
+ }
701
+
702
+ }
703
+ endif;
includes/class-template-loader.php CHANGED
@@ -1,70 +1,70 @@
1
- <?php
2
- /**
3
- * Template Loader for Plugins based on the Gamajo Template Loader from Gary
4
- * Jones. See https://github.com/GaryJones/Gamajo-Template-Loader
5
- *
6
- * @package BusinessProfile
7
- * @copyright Copyright (c) 2016, Theme of the Crop
8
- * @license GPL-2.0+
9
- * @since 1.1
10
- */
11
-
12
- include_once( BPFWP_PLUGIN_DIR . '/lib/class-gamajo-template-loader.php' );
13
-
14
- /**
15
- * Template loader.
16
- *
17
- * Originally based on functions in Easy Digital Downloads (thanks Pippin!).
18
- *
19
- * When using in a plugin, create a new class that extends this one and just overrides the properties.
20
- *
21
- * @package Gamajo_Template_Loader
22
- * @author Gary Jones
23
- */
24
- class bpfwpTemplateLoader extends Bpfwp_Gamajo_Template_Loader {
25
- /**
26
- * Prefix for filter names.
27
- *
28
- * @since 1.0.0
29
- * @access protected
30
- * @var string
31
- */
32
- protected $filter_prefix = 'bpfwp';
33
-
34
- /**
35
- * Directory name where custom templates for this plugin should be found in the theme.
36
- *
37
- * For example: 'your-plugin-templates'.
38
- *
39
- * @since 1.0.0
40
- * @access protected
41
- * @var string
42
- */
43
- protected $theme_template_directory = 'business-profile-templates';
44
-
45
- /**
46
- * Reference to the root directory path of this plugin.
47
- *
48
- * Can either be a defined constant, or a relative reference from where the subclass lives.
49
- *
50
- * e.g. YOUR_PLUGIN_TEMPLATE or plugin_dir_path( dirname( __FILE__ ) ); etc.
51
- *
52
- * @since 1.0.0
53
- * @access protected
54
- * @var string
55
- */
56
- protected $plugin_directory = BPFWP_PLUGIN_DIR;
57
-
58
- /**
59
- * Directory name where templates are found in this plugin.
60
- *
61
- * Can either be a defined constant, or a relative reference from where the subclass lives.
62
- *
63
- * e.g. 'templates' or 'includes/templates', etc.
64
- *
65
- * @since 1.1.0
66
- * @access protected
67
- * @var string
68
- */
69
- protected $plugin_template_directory = 'templates';
70
- }
1
+ <?php
2
+ /**
3
+ * Template Loader for Plugins based on the Gamajo Template Loader from Gary
4
+ * Jones. See https://github.com/GaryJones/Gamajo-Template-Loader
5
+ *
6
+ * @package BusinessProfile
7
+ * @copyright Copyright (c) 2016, Theme of the Crop
8
+ * @license GPL-2.0+
9
+ * @since 1.1
10
+ */
11
+
12
+ include_once( BPFWP_PLUGIN_DIR . '/lib/class-gamajo-template-loader.php' );
13
+
14
+ /**
15
+ * Template loader.
16
+ *
17
+ * Originally based on functions in Easy Digital Downloads (thanks Pippin!).
18
+ *
19
+ * When using in a plugin, create a new class that extends this one and just overrides the properties.
20
+ *
21
+ * @package Gamajo_Template_Loader
22
+ * @author Gary Jones
23
+ */
24
+ class bpfwpTemplateLoader extends Bpfwp_Gamajo_Template_Loader {
25
+ /**
26
+ * Prefix for filter names.
27
+ *
28
+ * @since 1.0.0
29
+ * @access protected
30
+ * @var string
31
+ */
32
+ protected $filter_prefix = 'bpfwp';
33
+
34
+ /**
35
+ * Directory name where custom templates for this plugin should be found in the theme.
36
+ *
37
+ * For example: 'your-plugin-templates'.
38
+ *
39
+ * @since 1.0.0
40
+ * @access protected
41
+ * @var string
42
+ */
43
+ protected $theme_template_directory = 'business-profile-templates';
44
+
45
+ /**
46
+ * Reference to the root directory path of this plugin.
47
+ *
48
+ * Can either be a defined constant, or a relative reference from where the subclass lives.
49
+ *
50
+ * e.g. YOUR_PLUGIN_TEMPLATE or plugin_dir_path( dirname( __FILE__ ) ); etc.
51
+ *
52
+ * @since 1.0.0
53
+ * @access protected
54
+ * @var string
55
+ */
56
+ protected $plugin_directory = BPFWP_PLUGIN_DIR;
57
+
58
+ /**
59
+ * Directory name where templates are found in this plugin.
60
+ *
61
+ * Can either be a defined constant, or a relative reference from where the subclass lives.
62
+ *
63
+ * e.g. 'templates' or 'includes/templates', etc.
64
+ *
65
+ * @since 1.1.0
66
+ * @access protected
67
+ * @var string
68
+ */
69
+ protected $plugin_template_directory = 'templates';
70
+ }
includes/deprecated/class-integrations.php DELETED
@@ -1,179 +0,0 @@
1
- <?php
2
- /**
3
- * Initialize third-party integrations
4
- *
5
- * DEPRECATED in version 1.1
6
- *
7
- * This file loads and runs code to help the theme that can be found in
8
- * wp-content/themes/plate-up/includes. This code is separated from the normal
9
- * functions.php file to make that file easier to read. Ideally, all code that
10
- * is typically customized by users will be accessible through functions.php.
11
- * The code that is loaded here should only pertain to more advanced features
12
- * and functions that few users will ever touch if they are using this theme.
13
- *
14
- * @package BusinessProfile
15
- * @copyright Copyright (c) 2016, Theme of the Crop
16
- * @license GPL-2.0+
17
- * @since 0.0.1
18
- */
19
-
20
- defined( 'ABSPATH' ) || exit;
21
-
22
- if ( ! class_exists( 'bpfwpIntegrations', false ) ) :
23
-
24
- /**
25
- * Deprecated 3rd party integrations class.
26
- *
27
- * @since 0.0.1
28
- * @deprecated 1.1
29
- */
30
- class bpfwpIntegrations {
31
-
32
- /**
33
- * Initialize the class and register hooks.
34
- *
35
- * @since 0.0.1
36
- * @access public
37
- * @return void
38
- */
39
- public function __construct() {
40
- add_action( 'plugins_loaded', array( $this, 'plugins_loaded' ) );
41
- }
42
-
43
- /**
44
- * Integrations run after the plugins are loaded
45
- *
46
- * @since 0.0.1
47
- * @access public
48
- */
49
- public function plugins_loaded() {
50
-
51
- // Restaurant Reservations handles the integration from v1.6+.
52
- // This code is deprecated but will load if Restaurant
53
- // Reservations is active but below v1.6. The RTB_VERSION constant
54
- // was introduced in v1.6.
55
- if ( defined( 'RTB_PLUGIN_DIR' ) && ! defined( 'RTB_VERSION' ) ) {
56
-
57
- // Add default setting for booking link to template function/shortcode.
58
- add_filter( 'bpfwp_default_display_settings', array( $this, 'bpwfp_booking_link_default' ) );
59
-
60
- // Add the callback to print the booking link.
61
- add_filter( 'bpwfwp_component_callbacks', array( $this, 'bpfwp_booking_link_callback' ) );
62
-
63
- // Add display toggle for the booking link to the widget options.
64
- add_filter( 'bpfwp_widget_display_toggles', array( $this, 'bpfwp_booking_link_widget_option' ) );
65
-
66
- }
67
- }
68
-
69
- /**
70
- * Add default setting for booking link to template function/shortcode
71
- * Restaurant Reservations plugin
72
- *
73
- * @since 0.0.1
74
- * @access public
75
- * @param array $defaults The booking link defaults.
76
- * @return array $defaults The modified booking link defaults.
77
- */
78
- public function bpwfp_booking_link_default( $defaults ) {
79
-
80
- $defaults['show_booking_link'] = true;
81
-
82
- return $defaults;
83
- }
84
-
85
- /**
86
- * Add the callback to print the booking link
87
- * Restaurant Reservations plugin
88
- *
89
- * @since 0.0.1
90
- * @access public
91
- * @param array $data The booking link data.
92
- * @return array $data The modified booking link data.
93
- */
94
- public function bpfwp_booking_link_callback( $data ) {
95
-
96
- global $rtb_controller;
97
- $booking_page = $rtb_controller->settings->get_setting( 'booking-page' );
98
-
99
- if ( ! empty( $booking_page ) ) {
100
-
101
- // Place the link at the end of other short links if they're
102
- // displayed.
103
- if ( isset( $data['contact'] ) ) {
104
- $pos = array_search( 'contact', array_keys( $data ) );
105
- } elseif ( isset( $data['phone'] ) ) {
106
- $pos = array_search( 'phone', array_keys( $data ) );
107
- } elseif ( isset( $data['address'] ) ) {
108
- $pos = array_search( 'address', array_keys( $data ) );
109
- }
110
-
111
- if ( ! empty( $pos ) ) {
112
- $a = array_slice( $data, 0, $pos );
113
- $b = array_slice( $data, $pos );
114
- $data = array_merge( $a, array( 'booking_page' => array( $this, 'bpfwp_print_booking_link' ) ), $b );
115
- } else {
116
- // If no short links are being displayed, just add it to the bottom.
117
- $data['booking_page'] = array( $this, 'bpfwp_print_booking_link' );
118
- }
119
- }
120
-
121
- return $data;
122
- }
123
-
124
- /**
125
- * Print the booking link from the Restaurant Reservations plugin.
126
- *
127
- * @since 0.0.1
128
- * @access public
129
- * @param string $location The location associated with the booking link.
130
- * @return void
131
- */
132
- public function bpfwp_print_booking_link( $location = false ) {
133
-
134
- global $bpfwp_controller;
135
- global $rtb_controller;
136
-
137
- $booking_page = $rtb_controller->settings->get_setting( 'booking-page' );
138
-
139
- if ( $location && get_post_meta( $location, 'rtb_append_booking_form', true ) ) {
140
- $booking_page = $location;
141
- }
142
-
143
- if ( bpfwp_get_display( 'show_booking_link' ) ) :
144
- global $rtb_controller;
145
- ?>
146
- <div class="bp-booking">
147
- <a href="<?php echo get_permalink( $booking_page ); ?>"><?php _e( 'Book a table', 'business-profile' ); ?></a>
148
- </div>
149
- <?php
150
- endif;
151
- }
152
-
153
- /**
154
- * Add the booking page display option to the widget options
155
- * Restaurant Reservations plugin
156
- *
157
- * @since 0.0.1
158
- * @access public
159
- * @param array $toggles The toggle options for the widget.
160
- * @return array $toggles The modified toggle options for the widget.
161
- */
162
- public function bpfwp_booking_link_widget_option( $toggles ) {
163
-
164
- // Place the option below the contact option.
165
- $pos = array_search( 'show_contact', array_keys( $toggles ) );
166
-
167
- if ( ! empty( $pos ) ) {
168
- $a = array_slice( $toggles, 0, $pos );
169
- $b = array_slice( $toggles, $pos );
170
- $toggles = array_merge( $a, array( 'show_booking_link' => __( 'Show book a table link', 'business-profile' ) ) , $b );
171
- } else {
172
- // If no short links are being displayed, just add it to the bottom.
173
- $toggles['show_booking_link'] = __( 'Show book a table link', 'business-profile' );
174
- }
175
-
176
- return $toggles;
177
- }
178
- }
179
- endif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/helper-functions.php ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! function_exists( 'bpfwp_get_post_image_url' ) ) {
4
+ function bpfwp_get_post_image_url() {
5
+ global $post;
6
+
7
+ if ( has_post_thumbnail( $post->ID ) ) {
8
+ $image_array = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' );
9
+
10
+ return $image_array[0];
11
+ }
12
+
13
+ return false;
14
+ }
15
+ }
16
+
17
+ if ( ! function_exists( 'bpfwp_get_site_logo_url' ) ) {
18
+ function bpfwp_get_site_logo_url() {
19
+ $custom_logo_id = get_theme_mod( 'custom_logo' );
20
+
21
+ if ( $custom_logo_id ) {
22
+ $image_array = wp_get_attachment_image_src( $custom_logo_id );
23
+
24
+ return $image_array[0];
25
+ }
26
+
27
+ return false;
28
+ }
29
+ }
30
+
31
+ if ( ! function_exists( 'bpfwp_get_site_logo_width' ) ) {
32
+ function bpfwp_get_site_logo_width() {
33
+ $custom_logo_id = get_theme_mod( 'custom_logo' );
34
+
35
+ if ( $custom_logo_id ) {
36
+ $image_array = wp_get_attachment_image_src( $custom_logo_id );
37
+
38
+ return $image_array[1];
39
+ }
40
+
41
+ return false;
42
+ }
43
+ }
44
+
45
+ if ( ! function_exists( 'bpfwp_get_site_logo_height' ) ) {
46
+ function bpfwp_get_site_logo_height() {
47
+ $custom_logo_id = get_theme_mod( 'custom_logo' );
48
+
49
+ if ( $custom_logo_id ) {
50
+ $image_array = wp_get_attachment_image_src( $custom_logo_id );
51
+
52
+ return $image_array[2];
53
+ }
54
+
55
+ return false;
56
+ }
57
+ }
58
+
59
+ if ( ! function_exists( 'bpfwp_wc_get_most_recent_review_rating' ) ) {
60
+ function bpfwp_wc_get_most_recent_review_rating() {
61
+ global $post;
62
+
63
+ $reviews = get_comments( array( 'post_id' => $post->ID ) );
64
+
65
+ if ( $reviews ) {
66
+ $most_recent_comment = reset($reviews);
67
+
68
+ return get_comment_meta( $most_recent_comment->comment_ID, 'rating', true );
69
+ }
70
+ }
71
+ }
72
+
73
+ if ( ! function_exists( 'bpfwp_wc_get_most_recent_review_body' ) ) {
74
+ function bpfwp_wc_get_most_recent_review_body() {
75
+ global $post;
76
+
77
+ $reviews = get_comments( array( 'post_id' => $post->ID ) );
78
+
79
+ if ( $reviews ) {
80
+ $most_recent_comment = reset($reviews);
81
+
82
+ return $most_recent_comment->comment_content;
83
+ }
84
+ }
85
+ }
86
+
87
+ if ( ! function_exists( 'bpfwp_wc_get_most_recent_review_author' ) ) {
88
+ function bpfwp_wc_get_most_recent_review_author() {
89
+ global $post;
90
+
91
+ $reviews = get_comments( array( 'post_id' => $post->ID ) );
92
+
93
+ if ( $reviews ) {
94
+ $most_recent_comment = reset($reviews);
95
+
96
+ return $most_recent_comment->comment_author;
97
+ }
98
+ }
99
+ }
100
+
101
+ ?>
includes/schemas/class-schema-accountingservice.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for an Accounting Service as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaAccountingService' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-financialservice.php';
15
+
16
+ /**
17
+ * Accounting Service schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaAccountingService extends bpfwpSchemaFinancialService {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'AccountingService';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Accounting Service';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-adultentertainment.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for Adult Entertainment as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaAdultEntertainment' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-entertainmentbusiness.php';
15
+
16
+ /**
17
+ * Adult Entertainment schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaAdultEntertainment extends bpfwpSchemaEntertainmentBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'AdultEntertainment';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Adult Entertainment';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-airline.php ADDED
@@ -0,0 +1,108 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for an Airline as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaAirline' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-organization.php';
15
+
16
+ /**
17
+ * Airline schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaAirline extends bpfwpSchemaOrganization {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Airline';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Airline';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+
52
+ $additional_fields = array(
53
+ new bpfwpSchemaField( array(
54
+ 'slug' => 'boardingPolicy',
55
+ 'name' => 'Boarding Policy',
56
+ 'type' => 'BoardingPolicyType',
57
+ 'input' => 'SchemaField',
58
+ 'children' => array (
59
+ new bpfwpSchemaField( array(
60
+ 'slug' => 'contactType',
61
+ 'name' => 'Contact Type',
62
+ 'input' => 'text',
63
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'contactType', $this->slug, 'contactPoint' )
64
+ ) ),
65
+ new bpfwpSchemaField( array(
66
+ 'slug' => 'contactOption',
67
+ 'name' => 'Contact Option',
68
+ 'input' => 'text',
69
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'contactOption', $this->slug, 'contactPoint' )
70
+ ) ),
71
+ )
72
+ ) ),
73
+ new bpfwpSchemaField( array(
74
+ 'slug' => 'iataCode',
75
+ 'name' => 'IATA Code',
76
+ 'input' => 'text',
77
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'iataCode', $this->slug )
78
+ ) ),
79
+ );
80
+
81
+ $fields = apply_filters( 'bpfwp_schema_additional_fields', $additional_fields, $this->slug );
82
+
83
+ array_splice($this->fields, 1, 0, $fields);
84
+ }
85
+
86
+
87
+ /**
88
+ * Load the schema's child classes
89
+ *
90
+ * @since 2.0.0
91
+ * @access public
92
+ * @return void
93
+ */
94
+ public function initialize_children( $depth ) {
95
+ $depth--;
96
+
97
+ $child_classes = array();
98
+
99
+ foreach ( $child_classes as $slug => $name ) {
100
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
101
+
102
+ $class_name = 'bpfwpSchema' . $name;
103
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
104
+ }
105
+ }
106
+
107
+ }
108
+ endif;
includes/schemas/class-schema-amusementpark.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for an Amusement Park as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaAmusementPark' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-entertainmentbusiness.php';
15
+
16
+ /**
17
+ * Amusement Park schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaAmusementPark extends bpfwpSchemaEntertainmentBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'AmusementPark';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Amusement Park';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-animalshelter.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for an Animal Shelter as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaAnimalShelter' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-localbusiness.php';
15
+
16
+ /**
17
+ * Animal Shelter schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaAnimalShelter extends bpfwpSchemaLocalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'AnimalShelter';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Animal Shelter';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-archiveorganization.php ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Archive Organization as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaArchiveOrganization' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-localbusiness.php';
15
+
16
+ /**
17
+ * Archive Organization schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaArchiveOrganization extends bpfwpSchemaLocalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'ArchiveOrganization';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Archive Organization';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+
52
+ $additional_fields = array(
53
+ new bpfwpSchemaField( array(
54
+ 'slug' => 'archiveHeld',
55
+ 'name' => 'Archive Held',
56
+ 'type' => 'ArchiveComponent',
57
+ 'input' => 'SchemaField',
58
+ 'children' => array (
59
+ new bpfwpSchemaField( array(
60
+ 'slug' => 'itemLocation',
61
+ 'name' => 'Item Location',
62
+ 'type' => 'PostalAddress',
63
+ 'input' => 'SchemaField',
64
+ 'children' => array (
65
+ new bpfwpSchemaField( array(
66
+ 'slug' => 'addressLocality',
67
+ 'name' => 'Location (City, Province)',
68
+ 'input' => 'text',
69
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'telephone', $this->slug, 'address' )
70
+ ) ),
71
+ new bpfwpSchemaField( array(
72
+ 'slug' => 'postalCode',
73
+ 'name' => 'Postal/Zip Code',
74
+ 'input' => 'text',
75
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'contactType', $this->slug, 'address' )
76
+ ) ),
77
+ new bpfwpSchemaField( array(
78
+ 'slug' => 'streetAddress',
79
+ 'name' => 'Street Address',
80
+ 'input' => 'text',
81
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'contactOption', $this->slug, 'address' )
82
+ ) )
83
+ )
84
+ ) )
85
+ )
86
+ ) ),
87
+ );
88
+
89
+ $fields = apply_filters( 'bpfwp_schema_additional_fields', $additional_fields, $this->slug );
90
+
91
+ array_splice($this->fields, 1, 0, $fields);
92
+ }
93
+
94
+
95
+ /**
96
+ * Load the schema's child classes
97
+ *
98
+ * @since 2.0.0
99
+ * @access public
100
+ * @return void
101
+ */
102
+ public function initialize_children( $depth ) {
103
+ $depth--;
104
+
105
+ $child_classes = array();
106
+
107
+ foreach ( $child_classes as $slug => $name ) {
108
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
109
+
110
+ $class_name = 'bpfwpSchema' . $name;
111
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
112
+ }
113
+ }
114
+
115
+ }
116
+ endif;
includes/schemas/class-schema-artgallery.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for an Art Gallery as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaArtGallery' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-entertainmentbusiness.php';
15
+
16
+ /**
17
+ * Art Gallery schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaArtGallery extends bpfwpSchemaEntertainmentBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'ArtGallery';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Art Gallery';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-article.php ADDED
@@ -0,0 +1,167 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for an Article as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaArticle' ) ) :
14
+
15
+ /**
16
+ * Article schema for Business Profile
17
+ *
18
+ * @since 2.0.0
19
+ */
20
+ class bpfwpSchemaArticle extends bpfwpSchema {
21
+
22
+ /**
23
+ * The name used by Schema.org
24
+ *
25
+ * @since 2.0.0
26
+ * @access public
27
+ * @var string
28
+ */
29
+ public $slug = 'Article';
30
+
31
+ /**
32
+ * The display name for this schema
33
+ *
34
+ * @since 2.0.0
35
+ * @access public
36
+ * @var string
37
+ */
38
+ public $name = 'Article';
39
+
40
+
41
+ /**
42
+ * Load the schema's default fields
43
+ *
44
+ * @since 2.0.0
45
+ * @access public
46
+ * @return void
47
+ */
48
+ public function set_fields() {
49
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-field.php';
50
+
51
+ $fields = array(
52
+ new bpfwpSchemaField( array(
53
+ 'slug' => 'author',
54
+ 'name' => 'Author',
55
+ 'type' => 'Person',
56
+ 'input' => 'SchemaField',
57
+ 'children' => array (
58
+ new bpfwpSchemaField( array(
59
+ 'slug' => 'name',
60
+ 'name' => 'Name',
61
+ 'input' => 'text',
62
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function display_name get_the_author_meta', 'name', $this->slug, 'author' )
63
+ ) )
64
+ )
65
+ ) ),
66
+ new bpfwpSchemaField( array(
67
+ 'slug' => 'datePublished',
68
+ 'name' => 'Date Published',
69
+ 'input' => 'text',
70
+ 'recommended' => true,
71
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_date', 'datePublished', $this->slug )
72
+ ) ),
73
+ new bpfwpSchemaField( array(
74
+ 'slug' => 'dateModified',
75
+ 'name' => 'Date Modified',
76
+ 'input' => 'text',
77
+ 'recommended' => true,
78
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_modified_date', 'datePublished', $this->slug )
79
+ ) ),
80
+ new bpfwpSchemaField( array(
81
+ 'slug' => 'headline',
82
+ 'name' => 'Headline',
83
+ 'input' => 'text',
84
+ 'recommended' => true,
85
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_title', 'headline', $this->slug )
86
+ ) ),
87
+ new bpfwpSchemaField( array(
88
+ 'slug' => 'image',
89
+ 'name' => 'Image',
90
+ 'input' => 'text',
91
+ 'recommended' => true,
92
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function bpfwp_get_post_image_url', 'image', $this->slug )
93
+ ) ),
94
+ new bpfwpSchemaField( array(
95
+ 'slug' => 'description',
96
+ 'name' => 'Description',
97
+ 'input' => 'text',
98
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_excerpt', 'description', $this->slug )
99
+ ) ),
100
+ new bpfwpSchemaField( array(
101
+ 'slug' => 'publisher',
102
+ 'name' => 'Publisher',
103
+ 'type' => 'Publisher',
104
+ 'input' => 'SchemaField',
105
+ 'children' => array (
106
+ new bpfwpSchemaField( array(
107
+ 'slug' => 'name',
108
+ 'name' => 'Name',
109
+ 'input' => 'text',
110
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'name', $this->slug, 'publisher' )
111
+ ) ),
112
+ new bpfwpSchemaField( array(
113
+ 'slug' => 'logo',
114
+ 'name' => 'Logo',
115
+ 'type' => 'Logo',
116
+ 'input' => 'SchemaField',
117
+ 'children' => array (
118
+ new bpfwpSchemaField( array(
119
+ 'slug' => 'url',
120
+ 'name' => 'URL',
121
+ 'input' => 'text',
122
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'url', $this->slug, 'publisher logo' )
123
+ ) ),
124
+ new bpfwpSchemaField( array(
125
+ 'slug' => 'width',
126
+ 'name' => 'Width',
127
+ 'input' => 'text',
128
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'width', $this->slug, 'publisher logo' )
129
+ ) ),
130
+ new bpfwpSchemaField( array(
131
+ 'slug' => 'height',
132
+ 'name' => 'Height',
133
+ 'input' => 'text',
134
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'height', $this->slug, 'publisher logo' )
135
+ ) )
136
+ )
137
+ ) )
138
+ )
139
+ ) ),
140
+ );
141
+
142
+ $this->fields = apply_filters( 'bpfwp_schema_fields', $fields, $this->slug );
143
+ }
144
+
145
+
146
+ /**
147
+ * Load the schema's child classes
148
+ *
149
+ * @since 2.0.0
150
+ * @access public
151
+ * @return void
152
+ */
153
+ public function initialize_children( $depth ) {
154
+ $depth--;
155
+
156
+ $child_classes = array ();
157
+
158
+ foreach ( $child_classes as $slug => $name ) {
159
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
160
+
161
+ $class_name = 'bpfwpSchema' . $name;
162
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
163
+ }
164
+ }
165
+
166
+ }
167
+ endif;
includes/schemas/class-schema-attorney.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for an Attorney as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaAttorney' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-legalservice.php';
15
+
16
+ /**
17
+ * Attorney schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaAttorney extends bpfwpSchemaLegalService {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Attorney';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Attorney';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-autobodyshop.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for an Auto Body Shop as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaAutoBodyShop' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-automotivebusiness.php';
15
+
16
+ /**
17
+ * Auto Body Shop schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaAutoBodyShop extends bpfwpSchemaAutomotiveBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'AutoBodyShop';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Auto Body Shop';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-autodealer.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for an Auto Dealer as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaAutoDealer' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-automotivebusiness.php';
15
+
16
+ /**
17
+ * Auto Dealer schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaAutoDealer extends bpfwpSchemaAutomotiveBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'AutoDealer';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Auto Dealer';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-automatedteller.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for an Automated Teller as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaAutomatedTeller' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-financialservice.php';
15
+
16
+ /**
17
+ * Automated Teller schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaAutomatedTeller extends bpfwpSchemaFinancialService {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'AutomatedTeller';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Automated Teller';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-automotivebusiness.php ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Automotive Business as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaAutomotiveBusiness' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-localbusiness.php';
15
+
16
+ /**
17
+ * Automotive Business schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaAutomotiveBusiness extends bpfwpSchemaLocalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'AutomotiveBusiness';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Automotive Business';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array(
65
+ 'autobodyshop' => 'AutoBodyShop',
66
+ 'autodealer' => 'AutoDealer',
67
+ 'autopartsstore' => 'AutoPartsStore',
68
+ 'autorental' => 'AutoRental',
69
+ 'autorepair' => 'AutoRepair',
70
+ 'autowash' => 'AutoWash',
71
+ 'gasstation' => 'GasStation',
72
+ 'motorcycledealer' => 'MotorcycleDealer',
73
+ 'motorcyclerepair' => 'MotorcycleRepair',
74
+ );
75
+
76
+ foreach ( $child_classes as $slug => $name ) {
77
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
78
+
79
+ $class_name = 'bpfwpSchema' . $name;
80
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
81
+ }
82
+ }
83
+
84
+ }
85
+ endif;
includes/schemas/class-schema-autopartsstore.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for an Auto Parts Store as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaAutoPartsStore' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-automotivebusiness.php';
15
+
16
+ /**
17
+ * Auto Parts Store schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaAutoPartsStore extends bpfwpSchemaAutomotiveBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'AutoPartsStore';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Auto Parts Store';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-autorental.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for Auto Rental as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaAutoRental' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-automotivebusiness.php';
15
+
16
+ /**
17
+ * Auto Rental schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaAutoRental extends bpfwpSchemaAutomotiveBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'AutoRental';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Auto Rental';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-autorepair.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for Auto Repair as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaAutoRepair' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-automotivebusiness.php';
15
+
16
+ /**
17
+ * Auto Repair schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaAutoRepair extends bpfwpSchemaAutomotiveBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'AutoRepair';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Auto Repair';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-autowash.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for an Auto Wash as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaAutoWash' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-automotivebusiness.php';
15
+
16
+ /**
17
+ * Auto Wash schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaAutoWash extends bpfwpSchemaAutomotiveBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'AutoWash';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Auto Wash';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-bakery.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Bakery as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaBakery' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-foodestablishment.php';
15
+
16
+ /**
17
+ * Bakery schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaBakery extends bpfwpSchemaFoodEstablishment {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Bakery';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Bakery';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-bankorcreditunion.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Bank or Credit Union as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaBankOrCreditUnion' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-financialservice.php';
15
+
16
+ /**
17
+ * Bank or Credit Union schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaBankOrCreditUnion extends bpfwpSchemaFinancialService {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'BankOrCreditUnion';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Bank or Credit Union';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-barorpub.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Bar Or Pub as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaBarOrPub' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-foodestablishment.php';
15
+
16
+ /**
17
+ * Bar Or Pub schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaBarOrPub extends bpfwpSchemaFoodEstablishment {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'BarOrPub';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Bar or Pub';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-beautysalon.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Beauty Salon as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaBeautySalon' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-healthandbeautybusiness.php';
15
+
16
+ /**
17
+ * Beauty Salon schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaBeautySalon extends bpfwpSchemaHealthAndBeautyBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'BeautySalon';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Beauty Salon';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-bedandbreakfast.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Bed and Breakfast as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaBedAndBreakfast' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-lodgingbusiness.php';
15
+
16
+ /**
17
+ * Bed and Breakfast schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaBedAndBreakfast extends bpfwpSchemaLodgingBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'BedAndBreakfast';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Bed and Breakfast';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-bikestore.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Bike Store as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaBikeStore' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-store.php';
15
+
16
+ /**
17
+ * Bike Store schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaBikeStore extends bpfwpSchemaStore {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'BikeStore';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Bike Store';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-book.php ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Book as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaBook' ) ) :
14
+
15
+ /**
16
+ * Book schema for Business Profile
17
+ *
18
+ * @since 2.0.0
19
+ */
20
+ class bpfwpSchemaBook extends bpfwpSchema {
21
+
22
+ /**
23
+ * The name used by Schema.org
24
+ *
25
+ * @since 2.0.0
26
+ * @access public
27
+ * @var string
28
+ */
29
+ public $slug = 'Book';
30
+
31
+ /**
32
+ * The display name for this schema
33
+ *
34
+ * @since 2.0.0
35
+ * @access public
36
+ * @var string
37
+ */
38
+ public $name = 'Book';
39
+
40
+
41
+ /**
42
+ * Load the schema's default fields
43
+ *
44
+ * @since 2.0.0
45
+ * @access public
46
+ * @return void
47
+ */
48
+ public function set_fields() {
49
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-field.php';
50
+
51
+ $fields = array(
52
+ new bpfwpSchemaField( array(
53
+ 'slug' => 'author',
54
+ 'name' => 'Author',
55
+ 'type' => 'Person',
56
+ 'input' => 'SchemaField',
57
+ 'children' => array (
58
+ new bpfwpSchemaField( array(
59
+ 'slug' => 'name',
60
+ 'name' => 'Name',
61
+ 'input' => 'text',
62
+ 'recommended' => true,
63
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'name', $this->slug, 'author' )
64
+ ) )
65
+ )
66
+ ) ),
67
+ new bpfwpSchemaField( array(
68
+ 'slug' => 'name',
69
+ 'name' => 'Name',
70
+ 'input' => 'text',
71
+ 'recommended' => true,
72
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_title', 'name', $this->slug )
73
+ ) ),
74
+ new bpfwpSchemaField( array(
75
+ 'slug' => 'workExample',
76
+ 'name' => 'Work Example',
77
+ 'type' => 'Book',
78
+ 'input' => 'SchemaField',
79
+ 'children' => array (
80
+ new bpfwpSchemaField( array(
81
+ 'slug' => 'isbn',
82
+ 'name' => 'ISBN',
83
+ 'input' => 'text',
84
+ 'recommended' => true,
85
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'isbn', $this->slug, 'author' )
86
+ ) ),
87
+ new bpfwpSchemaField( array(
88
+ 'slug' => 'bookEdition',
89
+ 'name' => 'Book Edition',
90
+ 'input' => 'text',
91
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'bookEdition', $this->slug, 'author' )
92
+ ) ),
93
+ new bpfwpSchemaField( array(
94
+ 'slug' => 'bookFormat',
95
+ 'name' => 'Book Format',
96
+ 'input' => 'text',
97
+ 'recommended' => true,
98
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'bookFormat', $this->slug, 'author' )
99
+ ) ),
100
+ new bpfwpSchemaField( array(
101
+ 'slug' => 'author',
102
+ 'name' => 'Author',
103
+ 'type' => 'Person',
104
+ 'input' => 'SchemaField',
105
+ 'children' => array (
106
+ new bpfwpSchemaField( array(
107
+ 'slug' => 'name',
108
+ 'name' => 'Name',
109
+ 'input' => 'text',
110
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'name', $this->slug, 'author' )
111
+ ) )
112
+ )
113
+ ) )
114
+ )
115
+ ) )
116
+ );
117
+
118
+ $this->fields = apply_filters( 'bpfwp_schema_fields', $fields, $this->slug );
119
+ }
120
+
121
+
122
+ /**
123
+ * Load the schema's child classes
124
+ *
125
+ * @since 2.0.0
126
+ * @access public
127
+ * @return void
128
+ */
129
+ public function initialize_children( $depth ) {
130
+ $depth--;
131
+
132
+ $child_classes = array ();
133
+
134
+ foreach ( $child_classes as $slug => $name ) {
135
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
136
+
137
+ $class_name = 'bpfwpSchema' . $name;
138
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
139
+ }
140
+ }
141
+
142
+ }
143
+ endif;
includes/schemas/class-schema-bookstore.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Book Store as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaBookStore' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-store.php';
15
+
16
+ /**
17
+ * Book Store schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaBookStore extends bpfwpSchemaStore {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'BookStore';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Book Store';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-bowlingalley.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Bowling Alley as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaBowlingAlley' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-sportsactivitylocation.php';
15
+
16
+ /**
17
+ * Bowling Alley schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaBowlingAlley extends bpfwpSchemaSportsActivityLocation {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'BowlingAlley';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Bowling Alley';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-breadcrumb.php ADDED
@@ -0,0 +1,147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Breadcrumb as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaBreadcrumb' ) ) :
14
+
15
+ /**
16
+ * Breadcrumb schema for Business Profile
17
+ *
18
+ * @since 2.0.0
19
+ */
20
+ class bpfwpSchemaBreadcrumb extends bpfwpSchema {
21
+
22
+ /**
23
+ * The name used by Schema.org
24
+ *
25
+ * @since 2.0.0
26
+ * @access public
27
+ * @var string
28
+ */
29
+ public $slug = 'Breadcrumb';
30
+
31
+ /**
32
+ * The display name for this schema
33
+ *
34
+ * @since 2.0.0
35
+ * @access public
36
+ * @var string
37
+ */
38
+ public $name = 'Breadcrumb';
39
+
40
+
41
+ /**
42
+ * Load the schema's default fields
43
+ *
44
+ * @since 2.0.0
45
+ * @access public
46
+ * @return void
47
+ */
48
+ public function set_fields() {
49
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-field.php';
50
+
51
+ $fields = array(
52
+ new bpfwpSchemaField( array(
53
+ 'slug' => 'itemListElement',
54
+ 'name' => 'Item List Element',
55
+ 'type' => 'BreadcrumbList',
56
+ 'input' => 'SchemaField',
57
+ 'children' => array (
58
+ new bpfwpSchemaField( array(
59
+ 'slug' => 'listItem',
60
+ 'name' => 'List Item',
61
+ 'type' => 'ListItem',
62
+ 'input' => 'SchemaField',
63
+ 'children' => array (
64
+ new bpfwpSchemaField( array(
65
+ 'slug' => 'position',
66
+ 'name' => 'Position',
67
+ 'input' => 'text',
68
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'position', $this->slug, 'ListItem' )
69
+ ) ),
70
+ new bpfwpSchemaField( array(
71
+ 'slug' => 'name',
72
+ 'name' => 'Name',
73
+ 'input' => 'text',
74
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'name', $this->slug, 'ListItem' )
75
+ ) ),
76
+ )
77
+ ) ),
78
+ new bpfwpSchemaField( array(
79
+ 'slug' => 'listItem',
80
+ 'name' => 'List Item',
81
+ 'type' => 'ListItem',
82
+ 'input' => 'SchemaField',
83
+ 'children' => array (
84
+ new bpfwpSchemaField( array(
85
+ 'slug' => 'position',
86
+ 'name' => 'Position',
87
+ 'input' => 'text',
88
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'position', $this->slug, 'ListItem' )
89
+ ) ),
90
+ new bpfwpSchemaField( array(
91
+ 'slug' => 'name',
92
+ 'name' => 'Name',
93
+ 'input' => 'text',
94
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'name', $this->slug, 'ListItem' )
95
+ ) ),
96
+ )
97
+ ) ),
98
+ new bpfwpSchemaField( array(
99
+ 'slug' => 'listItem',
100
+ 'name' => 'List Item',
101
+ 'type' => 'ListItem',
102
+ 'input' => 'SchemaField',
103
+ 'children' => array (
104
+ new bpfwpSchemaField( array(
105
+ 'slug' => 'position',
106
+ 'name' => 'Position',
107
+ 'input' => 'text',
108
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'position', $this->slug, 'ListItem' )
109
+ ) ),
110
+ new bpfwpSchemaField( array(
111
+ 'slug' => 'name',
112
+ 'name' => 'Name',
113
+ 'input' => 'text',
114
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'name', $this->slug, 'ListItem' )
115
+ ) ),
116
+ )
117
+ ) ),
118
+ )
119
+ ) ),
120
+ );
121
+
122
+ $this->fields = apply_filters( 'bpfwp_schema_fields', $fields, $this->slug );
123
+ }
124
+
125
+
126
+ /**
127
+ * Load the schema's child classes
128
+ *
129
+ * @since 2.0.0
130
+ * @access public
131
+ * @return void
132
+ */
133
+ public function initialize_children( $depth ) {
134
+ $depth--;
135
+
136
+ $child_classes = array ();
137
+
138
+ foreach ( $child_classes as $slug => $name ) {
139
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
140
+
141
+ $class_name = 'bpfwpSchema' . $name;
142
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
143
+ }
144
+ }
145
+
146
+ }
147
+ endif;
includes/schemas/class-schema-brewery.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Brewery as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaBrewery' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-foodestablishment.php';
15
+
16
+ /**
17
+ * Brewery schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaBrewery extends bpfwpSchemaFoodEstablishment {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Brewery';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Brewery';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-cafeorcoffeeshop.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Cafe Or Coffee Shop as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaCafeOrCoffeeShop' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-foodestablishment.php';
15
+
16
+ /**
17
+ * Cafe Or Coffee Shop schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaCafeOrCoffeeShop extends bpfwpSchemaFoodEstablishment {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'CafeOrCoffeeShop';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Cafe or Coffee Shop';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-campground.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Campground as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaCampground' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-lodgingbusiness.php';
15
+
16
+ /**
17
+ * Campground schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaCampground extends bpfwpSchemaLodgingBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Campground';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Campground';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-carousel.php ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Carousel as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaCarousel' ) ) :
14
+
15
+ /**
16
+ * Carousel schema for Business Profile
17
+ *
18
+ * @since 2.0.0
19
+ */
20
+ class bpfwpSchemaCarousel extends bpfwpSchema {
21
+
22
+ /**
23
+ * The name used by Schema.org
24
+ *
25
+ * @since 2.0.0
26
+ * @access public
27
+ * @var string
28
+ */
29
+ public $slug = 'Carousel';
30
+
31
+ /**
32
+ * The display name for this schema
33
+ *
34
+ * @since 2.0.0
35
+ * @access public
36
+ * @var string
37
+ */
38
+ public $name = 'Carousel';
39
+
40
+
41
+ /**
42
+ * Load the schema's default fields
43
+ *
44
+ * @since 2.0.0
45
+ * @access public
46
+ * @return void
47
+ */
48
+ public function set_fields() {
49
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-field.php';
50
+
51
+ $fields = array(
52
+ new bpfwpSchemaField( array(
53
+ 'slug' => 'itemListElement',
54
+ 'name' => 'Item List Element',
55
+ 'type' => 'ItemList',
56
+ 'input' => 'SchemaField',
57
+ 'children' => array (
58
+ new bpfwpSchemaField( array(
59
+ 'slug' => 'listItem',
60
+ 'name' => 'List Item',
61
+ 'type' => 'ListItem',
62
+ 'repeatable' => true,
63
+ 'input' => 'SchemaField',
64
+ 'children' => array (
65
+ new bpfwpSchemaField( array(
66
+ 'slug' => 'position',
67
+ 'name' => 'Position',
68
+ 'input' => 'text',
69
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'position', $this->slug, 'ListItem' )
70
+ ) ),
71
+ new bpfwpSchemaField( array(
72
+ 'slug' => 'name',
73
+ 'name' => 'Name',
74
+ 'input' => 'text',
75
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'name', $this->slug, 'ListItem' )
76
+ ) ),
77
+ new bpfwpSchemaField( array(
78
+ 'slug' => 'author',
79
+ 'name' => 'Author',
80
+ 'type' => 'Person',
81
+ 'input' => 'SchemaField',
82
+ 'children' => array (
83
+ new bpfwpSchemaField( array(
84
+ 'slug' => 'name',
85
+ 'name' => 'Name',
86
+ 'input' => 'text',
87
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function display_name get_the_author_meta', 'name', $this->slug, 'ListItem author' )
88
+ ) )
89
+ )
90
+ ) ),
91
+ new bpfwpSchemaField( array(
92
+ 'slug' => 'url',
93
+ 'name' => 'URL',
94
+ 'input' => 'url',
95
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'url', $this->slug, 'ListItem' )
96
+ ) ),
97
+ new bpfwpSchemaField( array(
98
+ 'slug' => 'image',
99
+ 'name' => 'Image',
100
+ 'input' => 'text',
101
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function bpfwp_get_post_image_url', 'image', $this->slug, 'ListItem' )
102
+ ) ),
103
+ new bpfwpSchemaField( array(
104
+ 'slug' => 'description',
105
+ 'name' => 'Description',
106
+ 'input' => 'text',
107
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_excerpt', 'description', $this->slug, 'ListItem' )
108
+ ) ),
109
+ )
110
+ ) ),
111
+ )
112
+ ) ),
113
+ );
114
+
115
+ $this->fields = apply_filters( 'bpfwp_schema_fields', $fields, $this->slug );
116
+ }
117
+
118
+
119
+ /**
120
+ * Load the schema's child classes
121
+ *
122
+ * @since 2.0.0
123
+ * @access public
124
+ * @return void
125
+ */
126
+ public function initialize_children( $depth ) {
127
+ $depth--;
128
+
129
+ $child_classes = array ();
130
+
131
+ foreach ( $child_classes as $slug => $name ) {
132
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
133
+
134
+ $class_name = 'bpfwpSchema' . $name;
135
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
136
+ }
137
+ }
138
+
139
+ }
140
+ endif;
includes/schemas/class-schema-casino.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Casino as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaCasino' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-entertainmentbusiness.php';
15
+
16
+ /**
17
+ * Casino schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaCasino extends bpfwpSchemaEntertainmentBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Casino';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Casino';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-childcare.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for Child Care as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaChildCare' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-localbusiness.php';
15
+
16
+ /**
17
+ * Child Care schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaChildCare extends bpfwpSchemaLocalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'ChildCare';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Child Care';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-clothingstore.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Clothing Store as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaClothingStore' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-store.php';
15
+
16
+ /**
17
+ * Clothing Store schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaClothingStore extends bpfwpSchemaStore {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'ClothingStore';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Clothing Store';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-collegeoruniversity.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a College or University as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaCollegeOrUniversity' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-educationalorganization.php';
15
+
16
+ /**
17
+ * College or University schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaCollegeOrUniversity extends bpfwpSchemaEducationalOrganization {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'CollegeOrUniversity';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'College or University';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-comedyclub.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Comedy Club as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaComedyClub' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-entertainmentbusiness.php';
15
+
16
+ /**
17
+ * Comedy Club schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaComedyClub extends bpfwpSchemaEntertainmentBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'ComedyClub';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Comedy Club';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-communityhealth.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for Community Health as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaCommunityHealth' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-medicalbusiness.php';
15
+
16
+ /**
17
+ * Community Health schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaCommunityHealth extends bpfwpSchemaMedicalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'CommunityHealth';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Community Health';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-computerstore.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Computer Store as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaComputerStore' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-store.php';
15
+
16
+ /**
17
+ * Computer Store schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaComputerStore extends bpfwpSchemaStore {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'ComputerStore';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Computer Store';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-consortium.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for an Consortium as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaConsortium' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-organization.php';
15
+
16
+ /**
17
+ * Consortium schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaConsortium extends bpfwpSchemaOrganization {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Consortium';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Consortium';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-conveniencestore.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Convenience Store as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaConvenienceStore' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-store.php';
15
+
16
+ /**
17
+ * Convenience Store schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaConvenienceStore extends bpfwpSchemaStore {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'ConvenienceStore';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Convenience Store';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-corporation.php ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for an Corporation as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaCorporation' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-organization.php';
15
+
16
+ /**
17
+ * Corporation schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaCorporation extends bpfwpSchemaOrganization {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Corporation';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Corporation';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+
52
+ $additional_fields = array(
53
+ new bpfwpSchemaField( array(
54
+ 'slug' => 'tickerSymbol',
55
+ 'name' => 'Ticker Symbol',
56
+ 'input' => 'text',
57
+ 'recommended' => true,
58
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'tickerSymbol', $this->slug )
59
+ ) ),
60
+ );
61
+
62
+ $fields = apply_filters( 'bpfwp_schema_additional_fields', $additional_fields, $this->slug );
63
+
64
+ array_splice($this->fields, 1, 0, $fields);
65
+ }
66
+
67
+
68
+ /**
69
+ * Load the schema's child classes
70
+ *
71
+ * @since 2.0.0
72
+ * @access public
73
+ * @return void
74
+ */
75
+ public function initialize_children( $depth ) {
76
+ $depth--;
77
+
78
+ $child_classes = array();
79
+
80
+ foreach ( $child_classes as $slug => $name ) {
81
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
82
+
83
+ $class_name = 'bpfwpSchema' . $name;
84
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
85
+ }
86
+ }
87
+
88
+ }
89
+ endif;
includes/schemas/class-schema-course.php ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for an Course as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaCourse' ) ) :
14
+
15
+ /**
16
+ * Course schema for Business Profile
17
+ *
18
+ * @since 2.0.0
19
+ */
20
+ class bpfwpSchemaCourse extends bpfwpSchema {
21
+
22
+ /**
23
+ * The name used by Schema.org
24
+ *
25
+ * @since 2.0.0
26
+ * @access public
27
+ * @var string
28
+ */
29
+ public $slug = 'Course';
30
+
31
+ /**
32
+ * The display name for this schema
33
+ *
34
+ * @since 2.0.0
35
+ * @access public
36
+ * @var string
37
+ */
38
+ public $name = 'Course';
39
+
40
+
41
+ /**
42
+ * Load the schema's default fields
43
+ *
44
+ * @since 2.0.0
45
+ * @access public
46
+ * @return void
47
+ */
48
+ public function set_fields() {
49
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-field.php';
50
+
51
+ $fields = array(
52
+ new bpfwpSchemaField( array(
53
+ 'slug' => 'provider',
54
+ 'name' => 'Provider',
55
+ 'type' => 'Organization',
56
+ 'input' => 'SchemaField',
57
+ 'children' => array (
58
+ new bpfwpSchemaField( array(
59
+ 'slug' => 'name',
60
+ 'name' => 'Name',
61
+ 'input' => 'text',
62
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'name', $this->slug, 'provider' )
63
+ ) ),
64
+ new bpfwpSchemaField( array(
65
+ 'slug' => 'sameAs',
66
+ 'name' => 'Corresponding URL (sameAs)',
67
+ 'input' => 'text',
68
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'sameAs', $this->slug, 'provider' )
69
+ ) )
70
+ )
71
+ ) ),
72
+ new bpfwpSchemaField( array(
73
+ 'slug' => 'name',
74
+ 'name' => 'Name',
75
+ 'input' => 'text',
76
+ 'recommended' => true,
77
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_title', 'name', $this->slug )
78
+ ) ),
79
+ new bpfwpSchemaField( array(
80
+ 'slug' => 'description',
81
+ 'name' => 'Description',
82
+ 'input' => 'text',
83
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_excerpt', 'description', $this->slug )
84
+ ) )
85
+ );
86
+
87
+ $this->fields = apply_filters( 'bpfwp_schema_fields', $fields, $this->slug );
88
+ }
89
+
90
+
91
+ /**
92
+ * Load the schema's child classes
93
+ *
94
+ * @since 2.0.0
95
+ * @access public
96
+ * @return void
97
+ */
98
+ public function initialize_children( $depth ) {
99
+ $depth--;
100
+
101
+ $child_classes = array ();
102
+
103
+ foreach ( $child_classes as $slug => $name ) {
104
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
105
+
106
+ $class_name = 'bpfwpSchema' . $name;
107
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
108
+ }
109
+ }
110
+
111
+ }
112
+ endif;
includes/schemas/class-schema-criticreview.php ADDED
@@ -0,0 +1,236 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Critic Review as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaCriticReview' ) ) :
14
+
15
+ /**
16
+ * Critic Review schema for Business Profile
17
+ *
18
+ * @since 2.0.0
19
+ */
20
+ class bpfwpSchemaCriticReview extends bpfwpSchema {
21
+
22
+ /**
23
+ * The name used by Schema.org
24
+ *
25
+ * @since 2.0.0
26
+ * @access public
27
+ * @var string
28
+ */
29
+ public $slug = 'CriticReview';
30
+
31
+ /**
32
+ * The display name for this schema
33
+ *
34
+ * @since 2.0.0
35
+ * @access public
36
+ * @var string
37
+ */
38
+ public $name = 'Critic Review';
39
+
40
+
41
+ /**
42
+ * Load the schema's default fields
43
+ *
44
+ * @since 2.0.0
45
+ * @access public
46
+ * @return void
47
+ */
48
+ public function set_fields() {
49
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-field.php';
50
+
51
+ $fields = array(
52
+ new bpfwpSchemaField( array(
53
+ 'slug' => 'author',
54
+ 'name' => 'Author',
55
+ 'type' => 'Person',
56
+ 'input' => 'SchemaField',
57
+ 'children' => array (
58
+ new bpfwpSchemaField( array(
59
+ 'slug' => 'name',
60
+ 'name' => 'Name',
61
+ 'input' => 'text',
62
+ 'recommended' => true,
63
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_author', 'name', $this->slug, 'author' )
64
+ ) ),
65
+ new bpfwpSchemaField( array(
66
+ 'slug' => 'sameAs',
67
+ 'name' => 'Corresponding URL (sameAs)',
68
+ 'input' => 'text',
69
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'sameAs', $this->slug, 'author' )
70
+ ) ),
71
+ )
72
+ ) ),
73
+ new bpfwpSchemaField( array(
74
+ 'slug' => 'url',
75
+ 'name' => 'URL',
76
+ 'input' => 'url',
77
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_permalink', 'url', $this->slug )
78
+ ) ),
79
+ new bpfwpSchemaField( array(
80
+ 'slug' => 'description',
81
+ 'name' => 'Description',
82
+ 'input' => 'text',
83
+ 'recommended' => true,
84
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_excerpt', 'description', $this->slug )
85
+ ) ),
86
+ new bpfwpSchemaField( array(
87
+ 'slug' => 'datePublished',
88
+ 'name' => 'Publish Date',
89
+ 'input' => 'text',
90
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_date', 'datePublished', $this->slug )
91
+ ) ),
92
+ new bpfwpSchemaField( array(
93
+ 'slug' => 'itemReviewed',
94
+ 'name' => 'Item Reviewed',
95
+ 'type' => 'Thing',
96
+ 'input' => 'SchemaField',
97
+ 'children' => array (
98
+ new bpfwpSchemaField( array(
99
+ 'slug' => 'name',
100
+ 'name' => 'Name',
101
+ 'input' => 'text',
102
+ 'recommended' => true,
103
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'name', $this->slug, 'itemReviewed' )
104
+ ) ),
105
+ new bpfwpSchemaField( array(
106
+ 'slug' => 'sameAs',
107
+ 'name' => 'Corresponding URL (sameAs)',
108
+ 'input' => 'text',
109
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'sameAs', $this->slug, 'itemReviewed' )
110
+ ) ),
111
+ new bpfwpSchemaField( array(
112
+ 'slug' => 'image',
113
+ 'name' => 'Image',
114
+ 'input' => 'url',
115
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function bpfwp_get_post_image_url', 'image', $this->slug, 'itemReviewed' )
116
+ ) ),
117
+ new bpfwpSchemaField( array(
118
+ 'slug' => 'priceRange',
119
+ 'name' => 'Price Range',
120
+ 'input' => 'text',
121
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'priceRange', $this->slug, 'itemReviewed' )
122
+ ) ),
123
+ new bpfwpSchemaField( array(
124
+ 'slug' => 'address',
125
+ 'name' => 'Address',
126
+ 'type' => 'PostalAddress',
127
+ 'input' => 'SchemaField',
128
+ 'children' => array (
129
+ new bpfwpSchemaField( array(
130
+ 'slug' => 'addressLocality',
131
+ 'name' => 'Location (City, Province)',
132
+ 'input' => 'text',
133
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'telephone', $this->slug, 'itemReviewed', 'address' )
134
+ ) ),
135
+ new bpfwpSchemaField( array(
136
+ 'slug' => 'postalCode',
137
+ 'name' => 'Postal/Zip Code',
138
+ 'input' => 'text',
139
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'contactType', $this->slug, 'itemReviewed', 'address' )
140
+ ) ),
141
+ new bpfwpSchemaField( array(
142
+ 'slug' => 'streetAddress',
143
+ 'name' => 'Street Address',
144
+ 'input' => 'text',
145
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'contactOption', $this->slug, 'itemReviewed', 'address' )
146
+ ) )
147
+ )
148
+ ) ),
149
+ new bpfwpSchemaField( array(
150
+ 'slug' => 'telephone',
151
+ 'name' => 'Telephone',
152
+ 'input' => 'text',
153
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'telephone', $this->slug, 'itemReviewed' )
154
+ ) ),
155
+ new bpfwpSchemaField( array(
156
+ 'slug' => 'aggregateRating',
157
+ 'name' => 'Aggregate Rating',
158
+ 'type' => 'AggregateRating',
159
+ 'input' => 'SchemaField',
160
+ 'children' => array (
161
+ new bpfwpSchemaField( array(
162
+ 'slug' => 'ratingValue',
163
+ 'name' => 'Rating',
164
+ 'input' => 'text',
165
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'ratingValue', $this->slug, 'itemReviewed', 'aggregateRating' )
166
+ ) ),
167
+ new bpfwpSchemaField( array(
168
+ 'slug' => 'ratingCount',
169
+ 'name' => 'Rating Count',
170
+ 'input' => 'text',
171
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'ratingCount', $this->slug, 'itemReviewed', 'aggregateRating' )
172
+ ) ),
173
+ new bpfwpSchemaField( array(
174
+ 'slug' => 'bestRating',
175
+ 'name' => 'Best Rating',
176
+ 'input' => 'text',
177
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'bestRating', $this->slug, 'itemReviewed', 'aggregateRating' )
178
+ ) )
179
+ )
180
+ ) ),
181
+ )
182
+ ) ),
183
+ new bpfwpSchemaField( array(
184
+ 'slug' => 'reviewRating',
185
+ 'name' => 'Rating',
186
+ 'type' => 'Rating',
187
+ 'input' => 'SchemaField',
188
+ 'children' => array (
189
+ new bpfwpSchemaField( array(
190
+ 'slug' => 'ratingValue',
191
+ 'name' => 'User Rating',
192
+ 'input' => 'text',
193
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'ratingValue', $this->slug, 'reviewRating' )
194
+ ) ),
195
+ new bpfwpSchemaField( array(
196
+ 'slug' => 'bestRating',
197
+ 'name' => 'Best Rating',
198
+ 'input' => 'text',
199
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'bestRating', $this->slug, 'reviewRating' )
200
+ ) ),
201
+ new bpfwpSchemaField( array(
202
+ 'slug' => 'worstRating',
203
+ 'name' => 'Worst Rating',
204
+ 'input' => 'text',
205
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'worstRating', $this->slug, 'reviewRating' )
206
+ ) )
207
+ )
208
+ ) ),
209
+ );
210
+
211
+ $this->fields = apply_filters( 'bpfwp_schema_fields', $fields, $this->slug );
212
+ }
213
+
214
+
215
+ /**
216
+ * Load the schema's child classes
217
+ *
218
+ * @since 2.0.0
219
+ * @access public
220
+ * @return void
221
+ */
222
+ public function initialize_children( $depth ) {
223
+ $depth--;
224
+
225
+ $child_classes = array ();
226
+
227
+ foreach ( $child_classes as $slug => $name ) {
228
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
229
+
230
+ $class_name = 'bpfwpSchema' . $name;
231
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
232
+ }
233
+ }
234
+
235
+ }
236
+ endif;
includes/schemas/class-schema-dancegroup.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Dance Group as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaDanceGroup' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-performinggroup.php';
15
+
16
+ /**
17
+ * Dance Group schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaDanceGroup extends bpfwpSchemaPerformingGroup {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'DanceGroup';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Dance Group';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-dataset.php ADDED
@@ -0,0 +1,182 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Critic Review as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaCriticReview' ) ) :
14
+
15
+ /**
16
+ * Critic Review schema for Business Profile
17
+ *
18
+ * @since 2.0.0
19
+ */
20
+ class bpfwpSchemaCriticReview extends bpfwpSchema {
21
+
22
+ /**
23
+ * The name used by Schema.org
24
+ *
25
+ * @since 2.0.0
26
+ * @access public
27
+ * @var string
28
+ */
29
+ public $slug = 'CriticReview';
30
+
31
+ /**
32
+ * The display name for this schema
33
+ *
34
+ * @since 2.0.0
35
+ * @access public
36
+ * @var string
37
+ */
38
+ public $name = 'Critic Review';
39
+
40
+
41
+ /**
42
+ * Load the schema's default fields
43
+ *
44
+ * @since 2.0.0
45
+ * @access public
46
+ * @return void
47
+ */
48
+ public function set_fields() {
49
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-field.php';
50
+
51
+ $fields = array(
52
+ new bpfwpSchemaField( array(
53
+ 'slug' => 'name',
54
+ 'name' => 'Name',
55
+ 'input' => 'text',
56
+ 'recommended' => true,
57
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_title', 'name', $this->slug )
58
+ ) ),
59
+ new bpfwpSchemaField( array(
60
+ 'slug' => 'url',
61
+ 'name' => 'URL',
62
+ 'input' => 'url',
63
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_permalink', 'url', $this->slug )
64
+ ) ),
65
+ new bpfwpSchemaField( array(
66
+ 'slug' => 'description',
67
+ 'name' => 'Description',
68
+ 'input' => 'text',
69
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_excerpt', 'description', $this->slug )
70
+ ) ),
71
+ new bpfwpSchemaField( array(
72
+ 'slug' => 'license',
73
+ 'name' => 'License',
74
+ 'input' => 'text',
75
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'license', $this->slug )
76
+ ) ),
77
+ new bpfwpSchemaField( array(
78
+ 'slug' => 'keywords',
79
+ 'name' => 'Keywords',
80
+ 'input' => 'text',
81
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'license', $this->slug )
82
+ ) ),
83
+ new bpfwpSchemaField( array(
84
+ 'slug' => 'creator',
85
+ 'name' => 'Creator',
86
+ 'type' => 'Organization',
87
+ 'input' => 'SchemaField',
88
+ 'children' => array (
89
+ new bpfwpSchemaField( array(
90
+ 'slug' => 'name',
91
+ 'name' => 'Name',
92
+ 'input' => 'text',
93
+ 'recommended' => true,
94
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_author', 'name', $this->slug, 'creator' )
95
+ ) ),
96
+ new bpfwpSchemaField( array(
97
+ 'slug' => 'url',
98
+ 'name' => 'URL',
99
+ 'input' => 'url',
100
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'url', $this->slug, 'creator' )
101
+ ) ),
102
+ )
103
+ ) ),
104
+ new bpfwpSchemaField( array(
105
+ 'slug' => 'includedInDataCatalog',
106
+ 'name' => 'Included in Data Catalog',
107
+ 'type' => 'DataCatalog',
108
+ 'input' => 'SchemaField',
109
+ 'children' => array (
110
+ new bpfwpSchemaField( array(
111
+ 'slug' => 'name',
112
+ 'name' => 'Name',
113
+ 'input' => 'text',
114
+ 'recommended' => true,
115
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'name', $this->slug, 'includedInDataCatalog' )
116
+ ) ),
117
+ )
118
+ ) ),
119
+ new bpfwpSchemaField( array(
120
+ 'slug' => 'hasPart',
121
+ 'name' => 'Has Part',
122
+ 'type' => 'Dataset',
123
+ 'input' => 'SchemaField',
124
+ 'children' => array (
125
+ new bpfwpSchemaField( array(
126
+ 'slug' => 'subDataset',
127
+ 'name' => 'Sub Dataset',
128
+ 'type' => 'Dataset',
129
+ 'repeatable' => true,
130
+ 'input' => 'SchemaField',
131
+ 'children' => array (
132
+ new bpfwpSchemaField( array(
133
+ 'slug' => 'name',
134
+ 'name' => 'Name',
135
+ 'input' => 'text',
136
+ 'recommended' => true,
137
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'name', $this->slug, 'hasPart', 'subDataset' )
138
+ ) ),
139
+ new bpfwpSchemaField( array(
140
+ 'slug' => 'description',
141
+ 'name' => 'Description',
142
+ 'input' => 'text',
143
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'description', $this->slug, 'hasPart', 'subDataset' )
144
+ ) ),
145
+ new bpfwpSchemaField( array(
146
+ 'slug' => 'license',
147
+ 'name' => 'License',
148
+ 'input' => 'text',
149
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'license', $this->slug, 'hasPart', 'subDataset' )
150
+ ) ),
151
+ )
152
+ ) ),
153
+ )
154
+ ) ),
155
+ );
156
+
157
+ $this->fields = apply_filters( 'bpfwp_schema_fields', $fields, $this->slug );
158
+ }
159
+
160
+
161
+ /**
162
+ * Load the schema's child classes
163
+ *
164
+ * @since 2.0.0
165
+ * @access public
166
+ * @return void
167
+ */
168
+ public function initialize_children( $depth ) {
169
+ $depth--;
170
+
171
+ $child_classes = array ();
172
+
173
+ foreach ( $child_classes as $slug => $name ) {
174
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
175
+
176
+ $class_name = 'bpfwpSchema' . $name;
177
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
178
+ }
179
+ }
180
+
181
+ }
182
+ endif;
includes/schemas/class-schema-dayspa.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Day Spa as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaDaySpa' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-healthandbeautybusiness.php';
15
+
16
+ /**
17
+ * Day Spa schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaDaySpa extends bpfwpSchemaHealthAndBeautyBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'DaySpa';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Day Spa';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-dentist.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for Dentist as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaDentist' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-localbusiness.php';
15
+
16
+ /**
17
+ * Dentist schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaDentist extends bpfwpSchemaLocalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Dentist';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Dentist';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-departmentstore.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Department Store as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaDepartmentStore' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-store.php';
15
+
16
+ /**
17
+ * Department Store schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaDepartmentStore extends bpfwpSchemaStore {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'DepartmentStore';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Department Store';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-dermatology.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for Dermatology as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaDermatology' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-medicalbusiness.php';
15
+
16
+ /**
17
+ * Dermatology schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaDermatology extends bpfwpSchemaMedicalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Dermatology';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Dermatology';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-diagnosticlab.php ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Diagnostic Lab as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaDiagnosticLab' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-medicalorganization.php';
15
+
16
+ /**
17
+ * Diagnostic Lab schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaDiagnosticLab extends bpfwpSchemaMedicalOrganization {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'DiagnosticLab';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Diagnostic Lab';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+
52
+ $additional_fields = array(
53
+ new bpfwpSchemaField( array(
54
+ 'slug' => 'availableTest',
55
+ 'name' => 'Available Test',
56
+ 'input' => 'text',
57
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'availableTest', $this->slug )
58
+ ) ),
59
+ );
60
+
61
+ $fields = apply_filters( 'bpfwp_schema_additional_fields', $additional_fields, $this->slug );
62
+
63
+ array_splice($this->fields, 1, 0, $fields);
64
+ }
65
+
66
+
67
+ /**
68
+ * Load the schema's child classes
69
+ *
70
+ * @since 2.0.0
71
+ * @access public
72
+ * @return void
73
+ */
74
+ public function initialize_children( $depth ) {
75
+ $depth--;
76
+
77
+ $child_classes = array();
78
+
79
+ foreach ( $child_classes as $slug => $name ) {
80
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
81
+
82
+ $class_name = 'bpfwpSchema' . $name;
83
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
84
+ }
85
+ }
86
+
87
+ }
88
+ endif;
includes/schemas/class-schema-dietnutrition.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for Diet and Nutrition as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaDietNutrition' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-medicalbusiness.php';
15
+
16
+ /**
17
+ * Diet and Nutrition schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaDietNutrition extends bpfwpSchemaMedicalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'DietNutrition';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Diet and Nutrition';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-distillery.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Distillery as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaDistillery' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-foodestablishment.php';
15
+
16
+ /**
17
+ * Distillery schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaDistillery extends bpfwpSchemaFoodEstablishment {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Distillery';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Distillery';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-drycleaningorlaundry.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for Dry Cleaning or Laundry as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'DryCleaningOrLaundry' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-localbusiness.php';
15
+
16
+ /**
17
+ * Dry Cleaning or Laundry schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class DryCleaningOrLaundry extends bpfwpSchemaLocalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'DryCleaningOrLaundry';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Dry Cleaning or Laundry';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-educationalorganization.php ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for an Educational Organization as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaEducationalOrganization' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-organization.php';
15
+
16
+ /**
17
+ * Educational Organization schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaEducationalOrganization extends bpfwpSchemaOrganization {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'EducationalOrganization';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Educational Organization';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+
52
+ $additional_fields = array(
53
+ new bpfwpSchemaField( array(
54
+ 'slug' => 'alumni',
55
+ 'name' => 'alumni',
56
+ 'type' => 'Person',
57
+ 'input' => 'SchemaField',
58
+ 'children' => array (
59
+ new bpfwpSchemaField( array(
60
+ 'slug' => 'name',
61
+ 'name' => 'Name',
62
+ 'input' => 'text',
63
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'name', $this->slug, 'alumni' )
64
+ ) )
65
+ )
66
+ ) ),
67
+ );
68
+
69
+ $fields = apply_filters( 'bpfwp_schema_additional_fields', $additional_fields, $this->slug );
70
+
71
+ array_splice($this->fields, 1, 0, $fields);
72
+ }
73
+
74
+
75
+ /**
76
+ * Load the schema's child classes
77
+ *
78
+ * @since 2.0.0
79
+ * @access public
80
+ * @return void
81
+ */
82
+ public function initialize_children( $depth ) {
83
+ $depth--;
84
+
85
+ $child_classes = array(
86
+ 'collegeoruniversity' => 'CollegeOrUniversity',
87
+ 'elementaryschool' => 'ElementarySchool',
88
+ 'highschool' => 'HighSchool',
89
+ 'middleschool' => 'MiddleSchool',
90
+ 'preschool' => 'Preschool',
91
+ 'school' => 'School',
92
+ );
93
+
94
+ foreach ( $child_classes as $slug => $name ) {
95
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
96
+
97
+ $class_name = 'bpfwpSchema' . $name;
98
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
99
+ }
100
+ }
101
+
102
+ }
103
+ endif;
includes/schemas/class-schema-electrician.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for an Electrician as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaElectrician' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-homeandconstructionbusiness.php';
15
+
16
+ /**
17
+ * Electrician schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaElectrician extends bpfwpSchemaHomeAndConstructionBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Electrician';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Electrician';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-electronicsstore.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for an Electronics Store as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaElectronicsStore' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-store.php';
15
+
16
+ /**
17
+ * Electronics Store schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaElectronicsStore extends bpfwpSchemaStore {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'ElectronicsStore';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Electronics Store';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-elementaryschool.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Elementary School as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaElementarySchool' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-educationalorganization.php';
15
+
16
+ /**
17
+ * School schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaElementarySchool extends bpfwpSchemaEducationalOrganization {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'ElementarySchool';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Elementary School';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-emergency.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for Emergency as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaEmergency' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-medicalbusiness.php';
15
+
16
+ /**
17
+ * Emergency schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaEmergency extends bpfwpSchemaMedicalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Emergency';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Emergency';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-emergencyservice.php ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for an Emergency Service as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaEmergencyService' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-localbusiness.php';
15
+
16
+ /**
17
+ * Emergency Service schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaEmergencyService extends bpfwpSchemaLocalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'EmergencyService';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Emergency Service';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array(
65
+ 'firestation' => 'FireStation',
66
+ 'hospital' => 'Hospital',
67
+ 'policestation' => 'PoliceStation',
68
+ );
69
+
70
+ foreach ( $child_classes as $slug => $name ) {
71
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
72
+
73
+ $class_name = 'bpfwpSchema' . $name;
74
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
75
+ }
76
+ }
77
+
78
+ }
79
+ endif;
includes/schemas/class-schema-employeraggregaterating.php ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Employer Aggregate Rating as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaEmployerAggregateRating' ) ) :
14
+
15
+ /**
16
+ * Employer Aggregate Rating schema for Business Profile
17
+ *
18
+ * @since 2.0.0
19
+ */
20
+ class bpfwpSchemaEmployerAggregateRating extends bpfwpSchema {
21
+
22
+ /**
23
+ * The name used by Schema.org
24
+ *
25
+ * @since 2.0.0
26
+ * @access public
27
+ * @var string
28
+ */
29
+ public $slug = 'EmployerAggregateRating';
30
+
31
+ /**
32
+ * The display name for this schema
33
+ *
34
+ * @since 2.0.0
35
+ * @access public
36
+ * @var string
37
+ */
38
+ public $name = 'Employer Aggregate Rating';
39
+
40
+
41
+ /**
42
+ * Load the schema's default fields
43
+ *
44
+ * @since 2.0.0
45
+ * @access public
46
+ * @return void
47
+ */
48
+ public function set_fields() {
49
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-field.php';
50
+
51
+ $fields = array(
52
+ new bpfwpSchemaField( array(
53
+ 'slug' => 'itemReviewed',
54
+ 'name' => 'Item Reviewed',
55
+ 'type' => 'Organization',
56
+ 'input' => 'SchemaField',
57
+ 'children' => array (
58
+ new bpfwpSchemaField( array(
59
+ 'slug' => 'name',
60
+ 'name' => 'Name',
61
+ 'input' => 'text',
62
+ 'recommended' => true,
63
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'name', $this->slug, 'itemReviewed' )
64
+ ) ),
65
+ new bpfwpSchemaField( array(
66
+ 'slug' => 'sameAs',
67
+ 'name' => 'Corresponding URL (sameAs)',
68
+ 'input' => 'text',
69
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'sameAs', $this->slug, 'itemReviewed' )
70
+ ) ),
71
+ )
72
+ ) ),
73
+ new bpfwpSchemaField( array(
74
+ 'slug' => 'ratingValue',
75
+ 'name' => 'Rating',
76
+ 'input' => 'text',
77
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'ratingValue', $this->slug )
78
+ ) ),
79
+ new bpfwpSchemaField( array(
80
+ 'slug' => 'ratingCount',
81
+ 'name' => 'Rating Count',
82
+ 'input' => 'text',
83
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'ratingCount', $this->slug )
84
+ ) ),
85
+ new bpfwpSchemaField( array(
86
+ 'slug' => 'bestRating',
87
+ 'name' => 'Best Rating',
88
+ 'input' => 'text',
89
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'bestRating', $this->slug )
90
+ ) ),
91
+ new bpfwpSchemaField( array(
92
+ 'slug' => 'worstRating',
93
+ 'name' => 'Worst Rating',
94
+ 'input' => 'text',
95
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'worstRating', $this->slug )
96
+ ) )
97
+ );
98
+
99
+ $this->fields = apply_filters( 'bpfwp_schema_fields', $fields, $this->slug );
100
+ }
101
+
102
+
103
+ /**
104
+ * Load the schema's child classes
105
+ *
106
+ * @since 2.0.0
107
+ * @access public
108
+ * @return void
109
+ */
110
+ public function initialize_children( $depth ) {
111
+ $depth--;
112
+
113
+ $child_classes = array ();
114
+
115
+ foreach ( $child_classes as $slug => $name ) {
116
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
117
+
118
+ $class_name = 'bpfwpSchema' . $name;
119
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
120
+ }
121
+ }
122
+
123
+ }
124
+ endif;
includes/schemas/class-schema-employmentagency.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Employment Agency as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaEmploymentAgency' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-localbusiness.php';
15
+
16
+ /**
17
+ * Employment Agency schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaEmploymentAgency extends bpfwpSchemaLocalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'EmploymentAgency';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Employment Agency';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-entertainmentbusiness.php ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for an Entertainment Business as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaEntertainmentBusiness' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-localbusiness.php';
15
+
16
+ /**
17
+ * Entertainment Business schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaEntertainmentBusiness extends bpfwpSchemaLocalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'EntertainmentBusiness';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Entertainment Business';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array(
65
+ 'adultentertainment' => 'AdultEntertainment',
66
+ 'amusementpark' => 'AmusementPark',
67
+ 'artgallery' => 'ArtGallery',
68
+ 'casino' => 'Casino',
69
+ 'comedyclub' => 'ComedyClub',
70
+ 'movietheater' => 'MovieTheater',
71
+ 'nightclub' => 'NightClub',
72
+ );
73
+
74
+ foreach ( $child_classes as $slug => $name ) {
75
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
76
+
77
+ $class_name = 'bpfwpSchema' . $name;
78
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
79
+ }
80
+ }
81
+
82
+ }
83
+ endif;
includes/schemas/class-schema-event.php ADDED
@@ -0,0 +1,164 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for an Event as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaEvent' ) ) :
14
+
15
+ /**
16
+ * Event schema for Business Profile
17
+ *
18
+ * @since 2.0.0
19
+ */
20
+ class bpfwpSchemaEvent extends bpfwpSchema {
21
+
22
+ /**
23
+ * The name used by Schema.org
24
+ *
25
+ * @since 2.0.0
26
+ * @access public
27
+ * @var string
28
+ */
29
+ public $slug = 'Event';
30
+
31
+ /**
32
+ * The display name for this schema
33
+ *
34
+ * @since 2.0.0
35
+ * @access public
36
+ * @var string
37
+ */
38
+ public $name = 'Event';
39
+
40
+
41
+ /**
42
+ * Load the schema's default fields
43
+ *
44
+ * @since 2.0.0
45
+ * @access public
46
+ * @return void
47
+ */
48
+ public function set_fields() {
49
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-field.php';
50
+
51
+ $fields = array(
52
+ new bpfwpSchemaField( array(
53
+ 'slug' => 'name',
54
+ 'name' => 'Name',
55
+ 'input' => 'text',
56
+ 'recommended' => true,
57
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_title', 'name', $this->slug )
58
+ ) ),
59
+ new bpfwpSchemaField( array(
60
+ 'slug' => 'location',
61
+ 'name' => 'Location',
62
+ 'type' => 'Place',
63
+ 'input' => 'SchemaField',
64
+ 'children' => array (
65
+ new bpfwpSchemaField( array(
66
+ 'slug' => 'name',
67
+ 'name' => 'Name',
68
+ 'input' => 'text',
69
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'name', $this->slug, 'location' )
70
+ ) ),
71
+ new bpfwpSchemaField( array(
72
+ 'slug' => 'address',
73
+ 'name' => 'Address',
74
+ 'type' => 'PostalAddress',
75
+ 'input' => 'SchemaField',
76
+ 'children' => array (
77
+ new bpfwpSchemaField( array(
78
+ 'slug' => 'streetAddress',
79
+ 'name' => 'Street Address',
80
+ 'input' => 'text',
81
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'streetAddress', $this->slug, 'location', 'address' )
82
+ ) ),
83
+ new bpfwpSchemaField( array(
84
+ 'slug' => 'addressLocality',
85
+ 'name' => 'Location (City, Province)',
86
+ 'input' => 'text',
87
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'addressLocality', $this->slug, 'location', 'address' )
88
+ ) ),
89
+ new bpfwpSchemaField( array(
90
+ 'slug' => 'postalCode',
91
+ 'name' => 'Postal/Zip Code',
92
+ 'input' => 'text',
93
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'postalCode', $this->slug, 'location', 'address' )
94
+ ) ),
95
+ new bpfwpSchemaField( array(
96
+ 'slug' => 'addressRegion',
97
+ 'name' => 'Address Region',
98
+ 'input' => 'text',
99
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'addressRegion', $this->slug, 'location', 'address' )
100
+ ) ),
101
+ new bpfwpSchemaField( array(
102
+ 'slug' => 'addressCountry',
103
+ 'name' => 'Address Country',
104
+ 'input' => 'text',
105
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'addressCountry', $this->slug, 'location', 'address' )
106
+ ) ),
107
+ )
108
+ ) ),
109
+ )
110
+ ) ),
111
+ new bpfwpSchemaField( array(
112
+ 'slug' => 'performer',
113
+ 'name' => 'Performer',
114
+ 'type' => 'PerformingGroup',
115
+ 'input' => 'SchemaField',
116
+ 'children' => array (
117
+ new bpfwpSchemaField( array(
118
+ 'slug' => 'name',
119
+ 'name' => 'Name',
120
+ 'input' => 'text',
121
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'name', $this->slug, 'performer' )
122
+ ) ),
123
+ )
124
+ ) ),
125
+ new bpfwpSchemaField( array(
126
+ 'slug' => 'description',
127
+ 'name' => 'Description',
128
+ 'input' => 'text',
129
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_excerpt', 'description', $this->slug )
130
+ ) ),
131
+ new bpfwpSchemaField( array(
132
+ 'slug' => 'image',
133
+ 'name' => 'Image',
134
+ 'input' => 'url',
135
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'image', $this->slug )
136
+ ) ),
137
+ );
138
+
139
+ $this->fields = apply_filters( 'bpfwp_schema_fields', $fields, $this->slug );
140
+ }
141
+
142
+
143
+ /**
144
+ * Load the schema's child classes
145
+ *
146
+ * @since 2.0.0
147
+ * @access public
148
+ * @return void
149
+ */
150
+ public function initialize_children( $depth ) {
151
+ $depth--;
152
+
153
+ $child_classes = array ();
154
+
155
+ foreach ( $child_classes as $slug => $name ) {
156
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
157
+
158
+ $class_name = 'bpfwpSchema' . $name;
159
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
160
+ }
161
+ }
162
+
163
+ }
164
+ endif;
includes/schemas/class-schema-exercisegym.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Exercise Gym as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaExerciseGym' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-sportsactivitylocation.php';
15
+
16
+ /**
17
+ * Exercise Gym schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaExerciseGym extends bpfwpSchemaSportsActivityLocation {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'ExerciseGym';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Exercise Gym';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-factcheck.php ADDED
@@ -0,0 +1,213 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Fact Check as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaFactCheck' ) ) :
14
+
15
+ /**
16
+ * Fact Check schema for Business Profile
17
+ *
18
+ * @since 2.0.0
19
+ */
20
+ class bpfwpSchemaFactCheck extends bpfwpSchema {
21
+
22
+ /**
23
+ * The name used by Schema.org
24
+ *
25
+ * @since 2.0.0
26
+ * @access public
27
+ * @var string
28
+ */
29
+ public $slug = 'FactCheck';
30
+
31
+ /**
32
+ * The display name for this schema
33
+ *
34
+ * @since 2.0.0
35
+ * @access public
36
+ * @var string
37
+ */
38
+ public $name = 'Fact Check';
39
+
40
+
41
+ /**
42
+ * Load the schema's default fields
43
+ *
44
+ * @since 2.0.0
45
+ * @access public
46
+ * @return void
47
+ */
48
+ public function set_fields() {
49
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-field.php';
50
+
51
+ $fields = array(
52
+ new bpfwpSchemaField( array(
53
+ 'slug' => 'datePublished',
54
+ 'name' => 'Publish Date',
55
+ 'input' => 'text',
56
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_date', 'datePublished', $this->slug )
57
+ ) ),
58
+ new bpfwpSchemaField( array(
59
+ 'slug' => 'claimReviewed',
60
+ 'name' => 'Claim Reviewed',
61
+ 'input' => 'text',
62
+ 'recommended' => true,
63
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'claimReviewed', $this->slug )
64
+ ) ),
65
+ new bpfwpSchemaField( array(
66
+ 'slug' => 'url',
67
+ 'name' => 'URL',
68
+ 'input' => 'url',
69
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_permalink', 'url', $this->slug )
70
+ ) ),
71
+ new bpfwpSchemaField( array(
72
+ 'slug' => 'itemReviewed',
73
+ 'name' => 'Item Reviewed',
74
+ 'type' => 'Claim',
75
+ 'input' => 'SchemaField',
76
+ 'children' => array (
77
+ new bpfwpSchemaField( array(
78
+ 'slug' => 'author',
79
+ 'name' => 'Author',
80
+ 'type' => 'Organization',
81
+ 'input' => 'SchemaField',
82
+ 'children' => array (
83
+ new bpfwpSchemaField( array(
84
+ 'slug' => 'name',
85
+ 'name' => 'Name',
86
+ 'input' => 'text',
87
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'name', $this->slug, 'itemReviewed', 'author' )
88
+ ) ),
89
+ new bpfwpSchemaField( array(
90
+ 'slug' => 'sameAs',
91
+ 'name' => 'Corresponding URL (sameAs)',
92
+ 'input' => 'text',
93
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'sameAs', $this->slug, 'itemReviewed', 'author' )
94
+ ) ),
95
+ )
96
+ ) ),
97
+ new bpfwpSchemaField( array(
98
+ 'slug' => 'datePublished',
99
+ 'name' => 'Publish Date',
100
+ 'input' => 'text',
101
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'datePublished', $this->slug, 'itemReviewed' )
102
+ ) ),
103
+ new bpfwpSchemaField( array(
104
+ 'slug' => 'appearance',
105
+ 'name' => 'Appearance',
106
+ 'type' => 'Thing',
107
+ 'input' => 'SchemaField',
108
+ 'children' => array (
109
+ new bpfwpSchemaField( array(
110
+ 'slug' => 'name',
111
+ 'name' => 'Name',
112
+ 'input' => 'text',
113
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'telephone', $this->slug, 'itemReviewed', 'appearance' )
114
+ ) ),
115
+ new bpfwpSchemaField( array(
116
+ 'slug' => 'url',
117
+ 'name' => 'URL',
118
+ 'input' => 'url',
119
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'contactType', $this->slug, 'itemReviewed', 'appearance' )
120
+ ) ),
121
+ new bpfwpSchemaField( array(
122
+ 'slug' => 'datePublished',
123
+ 'name' => 'Publish Date',
124
+ 'input' => 'text',
125
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'datePublished', $this->slug, 'itemReviewed', 'appearance' )
126
+ ) ),
127
+ new bpfwpSchemaField( array(
128
+ 'slug' => 'author',
129
+ 'name' => 'Author',
130
+ 'type' => 'Person',
131
+ 'input' => 'SchemaField',
132
+ 'children' => array (
133
+ new bpfwpSchemaField( array(
134
+ 'slug' => 'name',
135
+ 'name' => 'Name',
136
+ 'input' => 'text',
137
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'name', $this->slug, 'itemReviewed', 'appearance', 'author' )
138
+ ) ),
139
+ )
140
+ ) ),
141
+ )
142
+ ) ),
143
+ )
144
+ ) ),
145
+ new bpfwpSchemaField( array(
146
+ 'slug' => 'author',
147
+ 'name' => 'Author',
148
+ 'type' => 'Organization',
149
+ 'input' => 'SchemaField',
150
+ 'children' => array (
151
+ new bpfwpSchemaField( array(
152
+ 'slug' => 'name',
153
+ 'name' => 'Name',
154
+ 'input' => 'text',
155
+ 'recommended' => true,
156
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_author', 'name', $this->slug, 'author' )
157
+ ) ),
158
+ )
159
+ ) ),
160
+ new bpfwpSchemaField( array(
161
+ 'slug' => 'reviewRating',
162
+ 'name' => 'Rating',
163
+ 'type' => 'Rating',
164
+ 'input' => 'SchemaField',
165
+ 'children' => array (
166
+ new bpfwpSchemaField( array(
167
+ 'slug' => 'ratingValue',
168
+ 'name' => 'User Rating',
169
+ 'input' => 'text',
170
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'ratingValue', $this->slug, 'reviewRating' )
171
+ ) ),
172
+ new bpfwpSchemaField( array(
173
+ 'slug' => 'bestRating',
174
+ 'name' => 'Best Rating',
175
+ 'input' => 'text',
176
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'bestRating', $this->slug, 'reviewRating' )
177
+ ) ),
178
+ new bpfwpSchemaField( array(
179
+ 'slug' => 'worstRating',
180
+ 'name' => 'Worst Rating',
181
+ 'input' => 'text',
182
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'worstRating', $this->slug, 'reviewRating' )
183
+ ) )
184
+ )
185
+ ) ),
186
+ );
187
+
188
+ $this->fields = apply_filters( 'bpfwp_schema_fields', $fields, $this->slug );
189
+ }
190
+
191
+
192
+ /**
193
+ * Load the schema's child classes
194
+ *
195
+ * @since 2.0.0
196
+ * @access public
197
+ * @return void
198
+ */
199
+ public function initialize_children( $depth ) {
200
+ $depth--;
201
+
202
+ $child_classes = array ();
203
+
204
+ foreach ( $child_classes as $slug => $name ) {
205
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
206
+
207
+ $class_name = 'bpfwpSchema' . $name;
208
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
209
+ }
210
+ }
211
+
212
+ }
213
+ endif;
includes/schemas/class-schema-faqpage.php ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a FAQ Page as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaFAQPage' ) ) :
14
+
15
+ /**
16
+ * FAQ Page schema for Business Profile
17
+ *
18
+ * @since 2.0.0
19
+ */
20
+ class bpfwpSchemaFAQPage extends bpfwpSchema {
21
+
22
+ /**
23
+ * The name used by Schema.org
24
+ *
25
+ * @since 2.0.0
26
+ * @access public
27
+ * @var string
28
+ */
29
+ public $slug = 'FAQPage';
30
+
31
+ /**
32
+ * The display name for this schema
33
+ *
34
+ * @since 2.0.0
35
+ * @access public
36
+ * @var string
37
+ */
38
+ public $name = 'FAQ Page';
39
+
40
+
41
+ /**
42
+ * Load the schema's default fields
43
+ *
44
+ * @since 2.0.0
45
+ * @access public
46
+ * @return void
47
+ */
48
+ public function set_fields() {
49
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-field.php';
50
+
51
+ $fields = array(
52
+ new bpfwpSchemaField( array(
53
+ 'slug' => 'FAQPage',
54
+ 'name' => 'FAQ Page',
55
+ 'type' => 'FAQPage',
56
+ 'input' => 'SchemaField',
57
+ 'children' => array (
58
+ new bpfwpSchemaField( array(
59
+ 'slug' => 'question',
60
+ 'name' => 'Question',
61
+ 'type' => 'Question',
62
+ 'repeatable' => true,
63
+ 'input' => 'SchemaField',
64
+ 'children' => array (
65
+ new bpfwpSchemaField( array(
66
+ 'slug' => 'name',
67
+ 'name' => 'Name',
68
+ 'input' => 'text',
69
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_title', 'name', $this->slug, 'FAQPage', 'question' )
70
+ ) ),
71
+ new bpfwpSchemaField( array(
72
+ 'slug' => 'acceptedAnswer',
73
+ 'name' => 'Answer',
74
+ 'type' => 'Answer',
75
+ 'input' => 'SchemaField',
76
+ 'children' => array (
77
+ new bpfwpSchemaField( array(
78
+ 'slug' => 'text',
79
+ 'name' => 'Text',
80
+ 'input' => 'text',
81
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'name', $this->slug, 'FAQPage', 'question', 'acceptedAnswer' )
82
+ ) ),
83
+ )
84
+ ) ),
85
+ )
86
+ ) ),
87
+ )
88
+ ) ),
89
+ );
90
+
91
+ $this->fields = apply_filters( 'bpfwp_schema_fields', $fields, $this->slug );
92
+ }
93
+
94
+
95
+ /**
96
+ * Load the schema's child classes
97
+ *
98
+ * @since 2.0.0
99
+ * @access public
100
+ * @return void
101
+ */
102
+ public function initialize_children( $depth ) {
103
+ $depth--;
104
+
105
+ $child_classes = array ();
106
+
107
+ foreach ( $child_classes as $slug => $name ) {
108
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
109
+
110
+ $class_name = 'bpfwpSchema' . $name;
111
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
112
+ }
113
+ }
114
+
115
+ }
116
+ endif;
includes/schemas/class-schema-fastfoodrestaurant.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Fast Food Restaurant as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaFastFoodRestaurant' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-foodestablishment.php';
15
+
16
+ /**
17
+ * Fast Food Restaurant schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaFastFoodRestaurant extends bpfwpSchemaFoodEstablishment {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'FastFoodRestaurant';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Fast Food Restaurant';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-field.php ADDED
@@ -0,0 +1,176 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema field to be used for schema classes.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaField' ) ) :
14
+
15
+ /**
16
+ * Schema field for Business Profile
17
+ *
18
+ * @since 2.0.0
19
+ */
20
+ class bpfwpSchemaField {
21
+
22
+ /**
23
+ * The type used by Schema.org
24
+ *
25
+ * @since 2.0.0
26
+ * @access public
27
+ * @var string
28
+ */
29
+ public $type = '';
30
+
31
+ /**
32
+ * The name used by Schema.org
33
+ *
34
+ * @since 2.0.0
35
+ * @access public
36
+ * @var string
37
+ */
38
+ public $slug = '';
39
+
40
+ /**
41
+ * The display name for this field
42
+ *
43
+ * @since 2.0.0
44
+ * @access public
45
+ * @var string
46
+ */
47
+ public $name = '';
48
+
49
+ /**
50
+ * The input type for this field
51
+ *
52
+ * @since 2.0.0
53
+ * @access public
54
+ * @var string
55
+ */
56
+ public $input = '';
57
+
58
+ /**
59
+ * Whether this field is should be recommended to be filled in (bolded)
60
+ *
61
+ * @since 2.0.0
62
+ * @access public
63
+ * @var boolean
64
+ */
65
+ public $recommended = false;
66
+
67
+ /**
68
+ * Whether there can be multiple instances of this field
69
+ *
70
+ * @since 2.0.0
71
+ * @access public
72
+ * @var boolean
73
+ */
74
+ public $repeatable = false;
75
+
76
+ /**
77
+ * What default value, if any, should exist for this field.
78
+ * Can include 'function', 'option' or 'meta' to return, respectively,
79
+ * the value of a function, get_option or appropriate get_meta call
80
+ *
81
+ * @since 2.0.0
82
+ * @access public
83
+ * @var string
84
+ */
85
+ public $callback = '';
86
+
87
+ /**
88
+ * Child fields for this class
89
+ *
90
+ * @since 2.0.0
91
+ * @access public
92
+ * @var array
93
+ */
94
+ public $children = array();
95
+
96
+ /**
97
+ * Initialize the class and recursively initialize child classes.
98
+ *
99
+ * @since 2.0.0
100
+ * @access public
101
+ * @return void
102
+ */
103
+ public function __construct( $args ) {
104
+
105
+ $this->set_properties( $args );
106
+ }
107
+
108
+ /**
109
+ * Load the schema's default fields
110
+ *
111
+ * @since 2.0.0
112
+ * @access public
113
+ * @return void
114
+ */
115
+ public function set_properties( $args ) {
116
+
117
+ if ( isset($args['type']) ) { $this->type = $args['type']; }
118
+ if ( isset($args['slug']) ) { $this->slug = $args['slug']; }
119
+ if ( isset($args['name']) ) { $this->name = $args['name']; }
120
+ if ( isset($args['recommended']) ) { $this->recommended = $args['recommended']; }
121
+ if ( isset($args['repeatable']) ) { $this->repeatable = $args['repeatable']; }
122
+ if ( isset($args['input']) ) { $this->input = $args['input']; }
123
+ if ( isset($args['callback']) ) { $this->callback = $args['callback']; }
124
+ if ( isset($args['children']) ) { $this->children = $args['children']; }
125
+ }
126
+
127
+
128
+ /**
129
+ * Get the default value for this field based on the object this field is called for
130
+ *
131
+ * @since 2.0.0
132
+ * @access public
133
+ * @param int $object_id ID of the object we're fetching a default value for.
134
+ * @param string $object_type description of the type of object (post, taxnomy, etc.)
135
+ * @return mixed $value
136
+ */
137
+ public function get_default_value( $object_id, $object_type = 'post' ) {
138
+
139
+ if ( ! isset($this->callback) ) { return; }
140
+
141
+ if ( strpos($this->callback, ' ') === false ) { return $this->callback; }
142
+
143
+ $operation = substr($this->callback, 0, strpos($this->callback, ' '));
144
+ $command = substr($this->callback, strpos($this->callback, ' ') + 1);
145
+
146
+ if ( $operation == 'function' ) {
147
+
148
+ $args = array();
149
+ while ( strpos($command, ' ') !== false ) {
150
+ $args[] = substr($command, 0, strpos($command, ' '));
151
+ $command = substr($command, strpos($command, ' ') + 1);
152
+ }
153
+
154
+ if ( function_exists($command) ) { $value = $command( ...$args ); }
155
+ else { $value = false; }
156
+ }
157
+
158
+ elseif ( $operation == 'option' ) {
159
+ $value = get_option($command);
160
+ }
161
+
162
+ elseif ( $operation == 'meta' ) {
163
+ if ( $object_type == 'post' ) { $value = get_post_meta( $object_id, $command, true ); }
164
+ if ( $object_type == 'taxonomy' ) { $value = get_term_meta( $object_id, $command, true ); }
165
+ }
166
+
167
+ // Not a valid operation, so return the entire string as the value
168
+ else {
169
+ $value = $operation . ' ' . $command;
170
+ }
171
+
172
+
173
+ return $value;
174
+ }
175
+ }
176
+ endif;
includes/schemas/class-schema-financialservice.php ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Financial Service as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaFinancialService' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-localbusiness.php';
15
+
16
+ /**
17
+ * Financial Service schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaFinancialService extends bpfwpSchemaLocalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'FinancialService';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Financial Service';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+
52
+ $additional_fields = array(
53
+ new bpfwpSchemaField( array(
54
+ 'slug' => 'feesAndCommissionsSpecification',
55
+ 'name' => 'Fees and Commissions Specification',
56
+ 'input' => 'text',
57
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'feesAndCommissionsSpecification', $this->slug )
58
+ ) ),
59
+ );
60
+
61
+ $fields = apply_filters( 'bpfwp_schema_additional_fields', $additional_fields, $this->slug );
62
+
63
+ array_splice($this->fields, 1, 0, $fields);
64
+ }
65
+
66
+
67
+ /**
68
+ * Load the schema's child classes
69
+ *
70
+ * @since 2.0.0
71
+ * @access public
72
+ * @return void
73
+ */
74
+ public function initialize_children( $depth ) {
75
+ $depth--;
76
+
77
+ $child_classes = array(
78
+ 'accountingservice' => 'AccountingService',
79
+ 'automatedteller' => 'AutomatedTeller',
80
+ 'bankorcreditunion' => 'BankOrCreditUnion',
81
+ 'insuranceagency' => 'InsuranceAgency',
82
+ );
83
+
84
+ foreach ( $child_classes as $slug => $name ) {
85
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
86
+
87
+ $class_name = 'bpfwpSchema' . $name;
88
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
89
+ }
90
+ }
91
+
92
+ }
93
+ endif;
includes/schemas/class-schema-firestation.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Fire Station as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaFireStation' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-emergencyservice.php';
15
+
16
+ /**
17
+ * Fire Station schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaFireStation extends bpfwpSchemaEmergencyService {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'FireStation';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Fire Station';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-florist.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Florist as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaFlorist' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-store.php';
15
+
16
+ /**
17
+ * Florist schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaFlorist extends bpfwpSchemaStore {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Florist';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Florist';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-foodestablishment.php ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Food Establishment as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaFoodEstablishment' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-localbusiness.php';
15
+
16
+ /**
17
+ * Food Establishment schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaFoodEstablishment extends bpfwpSchemaLocalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'FoodEstablishment';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Food Establishment';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+
52
+ $additional_fields = array(
53
+ new bpfwpSchemaField( array(
54
+ 'slug' => 'acceptsReservations',
55
+ 'name' => 'Reservations URL (or false in none)',
56
+ 'input' => 'text',
57
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'acceptsReservations', $this->slug )
58
+ ) ),
59
+ new bpfwpSchemaField( array(
60
+ 'slug' => 'hasMenu',
61
+ 'name' => 'Menu URL (or false in none)',
62
+ 'input' => 'text',
63
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'hasMenu', $this->slug )
64
+ ) ),
65
+ new bpfwpSchemaField( array(
66
+ 'slug' => 'servesCuisine',
67
+ 'name' => 'Cuisine',
68
+ 'input' => 'text',
69
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'servesCuisine', $this->slug )
70
+ ) )
71
+ );
72
+
73
+ $fields = apply_filters( 'bpfwp_schema_additional_fields', $additional_fields, $this->slug );
74
+
75
+ array_splice($this->fields, 1, 0, $fields);
76
+ }
77
+
78
+
79
+ /**
80
+ * Load the schema's child classes
81
+ *
82
+ * @since 2.0.0
83
+ * @access public
84
+ * @return void
85
+ */
86
+ public function initialize_children( $depth ) {
87
+ $depth--;
88
+
89
+ $child_classes = array(
90
+ 'bakery' => 'Bakery',
91
+ 'barorpub' => 'BarOrPub',
92
+ 'brewery' => 'Brewery',
93
+ 'cafeorcoffeeshop' => 'CafeOrCoffeeShop',
94
+ 'distillery' => 'Distillery',
95
+ 'fastfoodrestaurant' => 'FastFoodRestaurant',
96
+ 'icecreamshop' => 'IceCreamShop',
97
+ 'restaurant' => 'Restaurant',
98
+ 'winery' => 'Winery',
99
+ );
100
+
101
+ foreach ( $child_classes as $slug => $name ) {
102
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
103
+
104
+ $class_name = 'bpfwpSchema' . $name;
105
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
106
+ }
107
+ }
108
+
109
+ }
110
+ endif;
includes/schemas/class-schema-fundingagency.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Funding Agency as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaFundingAgency' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-project.php';
15
+
16
+ /**
17
+ * Funding Agency schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaFundingAgency extends bpfwpSchemaProject {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'FundingAgency';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Funding Agency';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-fundingscheme.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for an Funding Scheme as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaFundingScheme' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-organization.php';
15
+
16
+ /**
17
+ * Funding Scheme schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaFundingScheme extends bpfwpSchemaOrganization {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'FundingScheme';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Funding Scheme';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-furniturestore.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Furniture Store as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaFurnitureStore' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-store.php';
15
+
16
+ /**
17
+ * Furniture Store schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaFurnitureStore extends bpfwpSchemaStore {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'FurnitureStore';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Furniture Store';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-gardenstore.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Garden Store as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaGardenStore' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-store.php';
15
+
16
+ /**
17
+ * Garden Store schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaGardenStore extends bpfwpSchemaStore {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'GardenStore';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Garden Store';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-gasstation.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Gas Station as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaGasStation' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-automotivebusiness.php';
15
+
16
+ /**
17
+ * Gas Station schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaGasStation extends bpfwpSchemaAutomotiveBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'GasStation';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Gas Station';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-generalcontractor.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a General Contractor as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaGeneralContractor' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-homeandconstructionbusiness.php';
15
+
16
+ /**
17
+ * General Contractor schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaGeneralContractor extends bpfwpSchemaHomeAndConstructionBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'GeneralContractor';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'General Contractor';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-geriatric.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for Geriatric as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaGeriatric' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-medicalbusiness.php';
15
+
16
+ /**
17
+ * Geriatric schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaGeriatric extends bpfwpSchemaMedicalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Geriatric';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Geriatric';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-golfcourse.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Golf Course as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaGolfCourse' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-sportsactivitylocation.php';
15
+
16
+ /**
17
+ * Golf Course schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaGolfCourse extends bpfwpSchemaSportsActivityLocation {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'GolfCourse';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Golf Course';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-governmentoffice.php ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Government Office as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaGovernmentOffice' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-localbusiness.php';
15
+
16
+ /**
17
+ * Government Office schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaGovernmentOffice extends bpfwpSchemaLocalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'GovernmentOffice';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Government Office';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array(
65
+ 'postoffice' => 'PostOffice',
66
+ );
67
+
68
+ foreach ( $child_classes as $slug => $name ) {
69
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
70
+
71
+ $class_name = 'bpfwpSchema' . $name;
72
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
73
+ }
74
+ }
75
+
76
+ }
77
+ endif;
includes/schemas/class-schema-governmentorganization.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for an Government Organization as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaGovernmentOrganization' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-organization.php';
15
+
16
+ /**
17
+ * Government Organization schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaGovernmentOrganization extends bpfwpSchemaOrganization {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'GovernmentOrganization';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Government Organization';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-grocerystore.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Grocery Store as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaGroceryStore' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-store.php';
15
+
16
+ /**
17
+ * Grocery Store schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaGroceryStore extends bpfwpSchemaStore {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'GroceryStore';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Grocery Store';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-gynecologic.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for Gynecologic as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaGynecologic' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-medicalbusiness.php';
15
+
16
+ /**
17
+ * Gynecologic schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaGynecologic extends bpfwpSchemaMedicalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Gynecologic';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Gynecologic';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-hairsalon.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Hair Salon as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaHairSalon' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-healthandbeautybusiness.php';
15
+
16
+ /**
17
+ * Hair Salon schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaHairSalon extends bpfwpSchemaHealthAndBeautyBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'HairSalon';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Hair Salon';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-hardwarestore.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Hardware Store as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaHardwareStore' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-store.php';
15
+
16
+ /**
17
+ * Hardware Store schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaHardwareStore extends bpfwpSchemaStore {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'HardwareStore';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Hardware Store';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-healthandbeautybusiness.php ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Health and Beauty Business as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaHealthAndBeautyBusiness' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-localbusiness.php';
15
+
16
+ /**
17
+ * Health and Beauty Business schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaHealthAndBeautyBusiness extends bpfwpSchemaLocalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'HealthAndBeautyBusiness';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Health and Beauty Business';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array(
65
+ 'beautysalon' => 'BeautySalon',
66
+ 'dayspa' => 'DaySpa',
67
+ 'hairsalon' => 'HairSalon',
68
+ 'healthclub' => 'HealthClub',
69
+ 'nailsalon' => 'NailSalon',
70
+ 'tattooparlor' => 'TattooParlor',
71
+ );
72
+
73
+ foreach ( $child_classes as $slug => $name ) {
74
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
75
+
76
+ $class_name = 'bpfwpSchema' . $name;
77
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
78
+ }
79
+ }
80
+
81
+ }
82
+ endif;
includes/schemas/class-schema-healthclub.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Health Club as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaHealthClub' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-healthandbeautybusiness.php';
15
+
16
+ /**
17
+ * Health Club schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaHealthClub extends bpfwpSchemaHealthAndBeautyBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'HealthClub';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Health Club';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-highschool.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a High School as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaHighSchool' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-educationalorganization.php';
15
+
16
+ /**
17
+ * High School schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaHighSchool extends bpfwpSchemaEducationalOrganization {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'HighSchool';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'High School';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-hobbyshop.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Hobby Shop as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaHobbyShop' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-store.php';
15
+
16
+ /**
17
+ * Hobby Shop schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaHobbyShop extends bpfwpSchemaStore {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'HobbyShop';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Hobby Shop';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-homeandconstructionbusiness.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Home and Construction Business as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaHomeAndConstructionBusiness' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-localbusiness.php';
15
+
16
+ /**
17
+ * Home and Construction Business schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaHomeAndConstructionBusiness extends bpfwpSchemaLocalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'HomeAndConstructionBusiness';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Home and Construction Business';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array(
65
+ 'electrician' => 'Electrician',
66
+ 'generalcontractor' => 'GeneralContractor',
67
+ 'hvacbusiness' => 'HVACBusiness',
68
+ 'housepainter' => 'HousePainter',
69
+ 'locksmith' => 'Locksmith',
70
+ 'movingcompany' => 'MovingCompany',
71
+ 'plumber' => 'Plumber',
72
+ 'roofingcontractor' => 'RoofingContractor',
73
+ );
74
+
75
+ foreach ( $child_classes as $slug => $name ) {
76
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
77
+
78
+ $class_name = 'bpfwpSchema' . $name;
79
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
80
+ }
81
+ }
82
+
83
+ }
84
+ endif;
includes/schemas/class-schema-homegoodsstore.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Home Goods Store as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaHomeGoodsStore' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-store.php';
15
+
16
+ /**
17
+ * Home Goods Store schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaHomeGoodsStore extends bpfwpSchemaStore {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'HomeGoodsStore';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Home Goods Store';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-hospital.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Hospital as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaHospital' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-emergencyservice.php';
15
+
16
+ /**
17
+ * Hospital schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaHospital extends bpfwpSchemaEmergencyService {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Hospital';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Hospital';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-hostel.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Hostel as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaHostel' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-lodgingbusiness.php';
15
+
16
+ /**
17
+ * Hostel schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaHostel extends bpfwpSchemaLodgingBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Hostel';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Hostel';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-hotel.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Hotel as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaHotel' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-lodgingbusiness.php';
15
+
16
+ /**
17
+ * Hotel schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaHotel extends bpfwpSchemaLodgingBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Hotel';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Hotel';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-housepainter.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a House Painter as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaHousePainter' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-homeandconstructionbusiness.php';
15
+
16
+ /**
17
+ * House Painter schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaHousePainter extends bpfwpSchemaHomeAndConstructionBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'HousePainter';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'House Painter';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-howto.php ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a How-To as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaHowTo' ) ) :
14
+
15
+ /**
16
+ * How-To schema for Business Profile
17
+ *
18
+ * @since 2.0.0
19
+ */
20
+ class bpfwpSchemaHowTo extends bpfwpSchema {
21
+
22
+ /**
23
+ * The name used by Schema.org
24
+ *
25
+ * @since 2.0.0
26
+ * @access public
27
+ * @var string
28
+ */
29
+ public $slug = 'HowTo';
30
+
31
+ /**
32
+ * The display name for this schema
33
+ *
34
+ * @since 2.0.0
35
+ * @access public
36
+ * @var string
37
+ */
38
+ public $name = 'How-To';
39
+
40
+
41
+ /**
42
+ * Load the schema's default fields
43
+ *
44
+ * @since 2.0.0
45
+ * @access public
46
+ * @return void
47
+ */
48
+ public function set_fields() {
49
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-field.php';
50
+
51
+ $fields = array(
52
+ new bpfwpSchemaField( array(
53
+ 'slug' => 'name',
54
+ 'name' => 'Name',
55
+ 'input' => 'text',
56
+ 'recommended' => true,
57
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_title', 'name', $this->slug )
58
+ ) ),
59
+ new bpfwpSchemaField( array(
60
+ 'slug' => 'image',
61
+ 'name' => 'Image',
62
+ 'input' => 'url',
63
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function bpfwp_get_post_image_url', 'image', $this->slug )
64
+ ) ),
65
+ new bpfwpSchemaField( array(
66
+ 'slug' => 'description',
67
+ 'name' => 'Description',
68
+ 'input' => 'text',
69
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_excerpt', 'description', $this->slug )
70
+ ) ),
71
+ new bpfwpSchemaField( array(
72
+ 'slug' => 'video',
73
+ 'name' => 'Video',
74
+ 'input' => 'url',
75
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'video', $this->slug )
76
+ ) ),
77
+ new bpfwpSchemaField( array(
78
+ 'slug' => 'hasPart',
79
+ 'name' => 'Has Part',
80
+ 'type' => 'ItemList',
81
+ 'input' => 'SchemaField',
82
+ 'children' => array (
83
+ new bpfwpSchemaField( array(
84
+ 'slug' => 'clip',
85
+ 'name' => 'Clip',
86
+ 'type' => 'Clip',
87
+ 'repeatable' => true,
88
+ 'input' => 'SchemaField',
89
+ 'children' => array (
90
+ new bpfwpSchemaField( array(
91
+ 'slug' => 'name',
92
+ 'name' => 'Name',
93
+ 'input' => 'text',
94
+ 'recommended' => true,
95
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'name', $this->slug, 'hasPart', 'clip' )
96
+ ) ),
97
+ new bpfwpSchemaField( array(
98
+ 'slug' => 'startOffset',
99
+ 'name' => 'Start Offset',
100
+ 'input' => 'text',
101
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'startOffset', $this->slug, 'hasPart', 'clip' )
102
+ ) ),
103
+ new bpfwpSchemaField( array(
104
+ 'slug' => 'endOffset',
105
+ 'name' => 'End Offset',
106
+ 'input' => 'text',
107
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'endOffset', $this->slug, 'hasPart', 'clip' )
108
+ ) ),
109
+ new bpfwpSchemaField( array(
110
+ 'slug' => 'url',
111
+ 'name' => 'URL',
112
+ 'input' => 'url',
113
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'url', $this->slug, 'hasPart', 'clip' )
114
+ ) ),
115
+ )
116
+ ) ),
117
+ )
118
+ ) ),
119
+ );
120
+
121
+ $this->fields = apply_filters( 'bpfwp_schema_fields', $fields, $this->slug );
122
+ }
123
+
124
+
125
+ /**
126
+ * Load the schema's child classes
127
+ *
128
+ * @since 2.0.0
129
+ * @access public
130
+ * @return void
131
+ */
132
+ public function initialize_children( $depth ) {
133
+ $depth--;
134
+
135
+ $child_classes = array ();
136
+
137
+ foreach ( $child_classes as $slug => $name ) {
138
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
139
+
140
+ $class_name = 'bpfwpSchema' . $name;
141
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
142
+ }
143
+ }
144
+
145
+ }
146
+ endif;
includes/schemas/class-schema-hvacbusiness.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for an HVAC Business as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaHVACBusiness' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-homeandconstructionbusiness.php';
15
+
16
+ /**
17
+ * HVAC Business schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaHVACBusiness extends bpfwpSchemaHomeAndConstructionBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'HVACBusiness';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'HVAC Business';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-icecreamshop.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Ice Cream Shop as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaIceCreamShop' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-foodestablishment.php';
15
+
16
+ /**
17
+ * Bakery schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaIceCreamShop extends bpfwpSchemaFoodEstablishment {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'IceCreamShop';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Ice Cream Shop';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-insuranceagency.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for an Insurance Agency as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaInsuranceAgency' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-financialservice.php';
15
+
16
+ /**
17
+ * Insurance Agency schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaInsuranceAgency extends bpfwpSchemaFinancialService {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'InsuranceAgency';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Insurance Agency';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-internetcafe.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for an Internet Cafe as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaInternetCafe' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-localbusiness.php';
15
+
16
+ /**
17
+ * Internet Cafe schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaInternetCafe extends bpfwpSchemaLocalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'InternetCafe';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Internet Cafe';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-jewelrystore.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Jewelry Store as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaJewelryStore' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-store.php';
15
+
16
+ /**
17
+ * Jewelry Store schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaJewelryStore extends bpfwpSchemaStore {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'JewelryStore';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Jewelry Store';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-jobposting.php ADDED
@@ -0,0 +1,216 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Job Posting as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaJobPosting' ) ) :
14
+
15
+ /**
16
+ * Job Posting schema for Business Profile
17
+ *
18
+ * @since 2.0.0
19
+ */
20
+ class bpfwpSchemaJobPosting extends bpfwpSchema {
21
+
22
+ /**
23
+ * The name used by Schema.org
24
+ *
25
+ * @since 2.0.0
26
+ * @access public
27
+ * @var string
28
+ */
29
+ public $slug = 'JobPosting';
30
+
31
+ /**
32
+ * The display name for this schema
33
+ *
34
+ * @since 2.0.0
35
+ * @access public
36
+ * @var string
37
+ */
38
+ public $name = 'Job Posting';
39
+
40
+
41
+ /**
42
+ * Load the schema's default fields
43
+ *
44
+ * @since 2.0.0
45
+ * @access public
46
+ * @return void
47
+ */
48
+ public function set_fields() {
49
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-field.php';
50
+
51
+ $fields = array(
52
+ new bpfwpSchemaField( array(
53
+ 'slug' => 'name',
54
+ 'name' => 'Name',
55
+ 'input' => 'text',
56
+ 'recommended' => true,
57
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_title', 'name', $this->slug )
58
+ ) ),
59
+ new bpfwpSchemaField( array(
60
+ 'slug' => 'description',
61
+ 'name' => 'Description',
62
+ 'input' => 'text',
63
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_excerpt', 'description', $this->slug )
64
+ ) ),
65
+ new bpfwpSchemaField( array(
66
+ 'slug' => 'datePosted',
67
+ 'name' => 'Date Posted',
68
+ 'input' => 'text',
69
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_date', 'datePosted', $this->slug )
70
+ ) ),
71
+ new bpfwpSchemaField( array(
72
+ 'slug' => 'validThrough',
73
+ 'name' => 'Valid Until',
74
+ 'input' => 'text',
75
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'validThrough', $this->slug )
76
+ ) ),
77
+ new bpfwpSchemaField( array(
78
+ 'slug' => 'employmentType',
79
+ 'name' => 'Employment Type',
80
+ 'input' => 'text',
81
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'employmentType', $this->slug )
82
+ ) ),
83
+ new bpfwpSchemaField( array(
84
+ 'slug' => 'hiringOrganization',
85
+ 'name' => 'Hiring Organization',
86
+ 'type' => 'Organization',
87
+ 'input' => 'SchemaField',
88
+ 'children' => array (
89
+ new bpfwpSchemaField( array(
90
+ 'slug' => 'name',
91
+ 'name' => 'Name',
92
+ 'input' => 'text',
93
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'name', $this->slug, 'hiringOrganization' )
94
+ ) ),
95
+ new bpfwpSchemaField( array(
96
+ 'slug' => 'sameAs',
97
+ 'name' => 'Corresponding URL (sameAs)',
98
+ 'input' => 'text',
99
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'sameAs', $this->slug, 'hiringOrganization' )
100
+ ) ),
101
+ new bpfwpSchemaField( array(
102
+ 'slug' => 'logo',
103
+ 'name' => 'Logo',
104
+ 'input' => 'url',
105
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function bpfwp_get_post_image_url', 'logo', $this->slug, 'hiringOrganization' )
106
+ ) ),
107
+ )
108
+ ) ),
109
+ new bpfwpSchemaField( array(
110
+ 'slug' => 'jobLocation',
111
+ 'name' => 'Job Location',
112
+ 'type' => 'Place',
113
+ 'input' => 'SchemaField',
114
+ 'children' => array (
115
+ new bpfwpSchemaField( array(
116
+ 'slug' => 'address',
117
+ 'name' => 'Address',
118
+ 'type' => 'PostalAddress',
119
+ 'input' => 'SchemaField',
120
+ 'children' => array (
121
+ new bpfwpSchemaField( array(
122
+ 'slug' => 'streetAddress',
123
+ 'name' => 'Street Address',
124
+ 'input' => 'text',
125
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'streetAddress', $this->slug, 'jobLocation', 'address' )
126
+ ) ),
127
+ new bpfwpSchemaField( array(
128
+ 'slug' => 'addressLocality',
129
+ 'name' => 'Location (City, Province)',
130
+ 'input' => 'text',
131
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'addressLocality', $this->slug, 'jobLocation', 'address' )
132
+ ) ),
133
+ new bpfwpSchemaField( array(
134
+ 'slug' => 'postalCode',
135
+ 'name' => 'Postal/Zip Code',
136
+ 'input' => 'text',
137
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'postalCode', $this->slug, 'jobLocation', 'address' )
138
+ ) ),
139
+ new bpfwpSchemaField( array(
140
+ 'slug' => 'addressRegion',
141
+ 'name' => 'Address Region',
142
+ 'input' => 'text',
143
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'addressRegion', $this->slug, 'jobLocation', 'address' )
144
+ ) ),
145
+ new bpfwpSchemaField( array(
146
+ 'slug' => 'addressCountry',
147
+ 'name' => 'Address Country',
148
+ 'input' => 'text',
149
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'addressCountry', $this->slug, 'jobLocation', 'address' )
150
+ ) ),
151
+ )
152
+ ) ),
153
+ )
154
+ ) ),
155
+ new bpfwpSchemaField( array(
156
+ 'slug' => 'baseSalary',
157
+ 'name' => 'Salary',
158
+ 'type' => 'MonetaryAmount',
159
+ 'input' => 'SchemaField',
160
+ 'children' => array (
161
+ new bpfwpSchemaField( array(
162
+ 'slug' => 'currency',
163
+ 'name' => 'Currency',
164
+ 'input' => 'text',
165
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'currency', $this->slug, 'baseSalary' )
166
+ ) ),
167
+ new bpfwpSchemaField( array(
168
+ 'slug' => 'value',
169
+ 'name' => 'Value',
170
+ 'type' => 'QuantitativeValue',
171
+ 'input' => 'SchemaField',
172
+ 'children' => array (
173
+ new bpfwpSchemaField( array(
174
+ 'slug' => 'value',
175
+ 'name' => 'Value',
176
+ 'input' => 'text',
177
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'value', $this->slug, 'baseSalary', 'value' )
178
+ ) ),
179
+ new bpfwpSchemaField( array(
180
+ 'slug' => 'unitText',
181
+ 'name' => 'Unit Text',
182
+ 'input' => 'text',
183
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'unitText', $this->slug, 'baseSalary', 'value' )
184
+ ) ),
185
+ )
186
+ ) ),
187
+ )
188
+ ) ),
189
+ );
190
+
191
+ $this->fields = apply_filters( 'bpfwp_schema_fields', $fields, $this->slug );
192
+ }
193
+
194
+
195
+ /**
196
+ * Load the schema's child classes
197
+ *
198
+ * @since 2.0.0
199
+ * @access public
200
+ * @return void
201
+ */
202
+ public function initialize_children( $depth ) {
203
+ $depth--;
204
+
205
+ $child_classes = array ();
206
+
207
+ foreach ( $child_classes as $slug => $name ) {
208
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
209
+
210
+ $class_name = 'bpfwpSchema' . $name;
211
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
212
+ }
213
+ }
214
+
215
+ }
216
+ endif;
includes/schemas/class-schema-legalservice.php ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Legal Service as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaLegalService' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-localbusiness.php';
15
+
16
+ /**
17
+ * Legal Service schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaLegalService extends bpfwpSchemaLocalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'LegalService';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Legal Service';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array(
65
+ 'attorney' => 'Attorney',
66
+ 'notary' => 'Notary',
67
+ );
68
+
69
+ foreach ( $child_classes as $slug => $name ) {
70
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
71
+
72
+ $class_name = 'bpfwpSchema' . $name;
73
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
74
+ }
75
+ }
76
+
77
+ }
78
+ endif;
includes/schemas/class-schema-library.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Library as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaLibrary' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-localbusiness.php';
15
+
16
+ /**
17
+ * Library schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaLibrary extends bpfwpSchemaLocalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Library';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Library';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-librarysystem.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for an Library System as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaLibrarySystem' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-organization.php';
15
+
16
+ /**
17
+ * Library System schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaLibrarySystem extends bpfwpSchemaOrganization {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'LibrarySystem';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Library System';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-liquorstore.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Liquor Store as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaLiquorStore' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-store.php';
15
+
16
+ /**
17
+ * Liquor Store schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaLiquorStore extends bpfwpSchemaStore {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'LiquorStore';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Liquor Store';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-localbusiness.php ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Local Business as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaLocalBusiness' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-organization.php';
15
+
16
+ /**
17
+ * Local Business schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaLocalBusiness extends bpfwpSchemaOrganization {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'LocalBusiness';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Local Business';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+
52
+ $additional_fields = array(
53
+ new bpfwpSchemaField( array(
54
+ 'slug' => 'openingHours',
55
+ 'name' => 'Opening Hours',
56
+ 'input' => 'scheduler',
57
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'openingHours', $this->slug )
58
+ ) ),
59
+ new bpfwpSchemaField( array(
60
+ 'slug' => 'paymentAccepted',
61
+ 'name' => 'Accepted Payment Types',
62
+ 'input' => 'text',
63
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'paymentAccepted', $this->slug )
64
+ ) ),
65
+ new bpfwpSchemaField( array(
66
+ 'slug' => 'priceRange',
67
+ 'name' => 'Price Range (ex. $, $$, $$$)',
68
+ 'input' => 'text',
69
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'priceRange', $this->slug )
70
+ ) )
71
+ );
72
+
73
+ $fields = apply_filters( 'bpfwp_schema_additional_fields', $additional_fields, $this->slug );
74
+
75
+ array_splice($this->fields, 1, 0, $fields);
76
+ }
77
+
78
+
79
+ /**
80
+ * Load the schema's child classes
81
+ *
82
+ * @since 2.0.0
83
+ * @access public
84
+ * @return void
85
+ */
86
+ public function initialize_children( $depth ) {
87
+ $depth--;
88
+
89
+ $child_classes = array(
90
+ 'foodestablishment' => 'FoodEstablishment',
91
+ 'animalshelter' => 'AnimalShelter',
92
+ 'archiveorganization' => 'ArchiveOrganization',
93
+ 'automotivebusiness' => 'AutomotiveBusiness',
94
+ 'childcare' => 'ChildCare',
95
+ 'dentist' => 'Dentist',
96
+ 'drycleaningorlaundry' => 'DryCleaningOrLaundry',
97
+ 'emergencyservice' => 'EmergencyService',
98
+ 'employmentagency' => 'EmploymentAgency',
99
+ 'entertainmentbusiness' => 'EntertainmentBusiness',
100
+ 'financialservice' => 'FinancialService',
101
+ 'governmentoffice' => 'GovernmentOffice',
102
+ 'healthandbeautybusiness' => 'HealthAndBeautyBusiness',
103
+ 'homeandconstructionbusiness' => 'HomeAndConstructionBusiness',
104
+ 'internetcafe' => 'InternetCafe',
105
+ 'legalservice' => 'LegalService',
106
+ 'library' => 'Library',
107
+ 'lodgingbusiness' => 'LodgingBusiness',
108
+ 'medicalbusiness' => 'MedicalBusiness',
109
+ 'professionalservice' => 'ProfessionalService',
110
+ 'radiostation' => 'RadioStation',
111
+ 'realestateagent' => 'RealEstateAgent',
112
+ 'recyclingcenter' => 'RecyclingCenter',
113
+ 'selfstorage' => 'SelfStorage',
114
+ 'shoppingcenter' => 'ShoppingCenter',
115
+ 'sportsactivitylocation' => 'SportsActivityLocation',
116
+ 'store' => 'Store',
117
+ 'televisionstation' => 'TelevisionStation',
118
+ 'touristinformationcenter' => 'TouristInformationCenter',
119
+ 'travelagency' => 'TravelAgency',
120
+ );
121
+
122
+ foreach ( $child_classes as $slug => $name ) {
123
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
124
+
125
+ $class_name = 'bpfwpSchema' . $name;
126
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
127
+ }
128
+ }
129
+
130
+ }
131
+ endif;
includes/schemas/class-schema-localbusinesslisting.php ADDED
@@ -0,0 +1,249 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for an Local Business Listing as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaLocalBusinessListing' ) ) :
14
+
15
+ /**
16
+ * Local Business Listing schema for Business Profile
17
+ *
18
+ * @since 2.0.0
19
+ */
20
+ class bpfwpSchemaLocalBusinessListing extends bpfwpSchema {
21
+
22
+ /**
23
+ * The name used by Schema.org
24
+ *
25
+ * @since 2.0.0
26
+ * @access public
27
+ * @var string
28
+ */
29
+ public $slug = 'LocalBusinessListing';
30
+
31
+ /**
32
+ * The display name for this schema
33
+ *
34
+ * @since 2.0.0
35
+ * @access public
36
+ * @var string
37
+ */
38
+ public $name = 'Local Business Listing';
39
+
40
+
41
+ /**
42
+ * Load the schema's default fields
43
+ *
44
+ * @since 2.0.0
45
+ * @access public
46
+ * @return void
47
+ */
48
+ public function set_fields() {
49
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-field.php';
50
+
51
+ $fields = array(
52
+ new bpfwpSchemaField( array(
53
+ 'slug' => 'name',
54
+ 'name' => 'Name',
55
+ 'input' => 'text',
56
+ 'recommended' => true,
57
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_title', 'name', $this->slug )
58
+ ) ),
59
+ new bpfwpSchemaField( array(
60
+ 'slug' => 'image',
61
+ 'name' => 'Image',
62
+ 'input' => 'url',
63
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function bpfwp_get_post_image_url', 'image', $this->slug )
64
+ ) ),
65
+ new bpfwpSchemaField( array(
66
+ 'slug' => 'address',
67
+ 'name' => 'Address',
68
+ 'type' => 'PostalAddress',
69
+ 'input' => 'SchemaField',
70
+ 'children' => array (
71
+ new bpfwpSchemaField( array(
72
+ 'slug' => 'streetAddress',
73
+ 'name' => 'Street Address',
74
+ 'input' => 'text',
75
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'streetAddress', $this->slug, 'address' )
76
+ ) ),
77
+ new bpfwpSchemaField( array(
78
+ 'slug' => 'addressLocality',
79
+ 'name' => 'Location (City, Province)',
80
+ 'input' => 'text',
81
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'addressLocality', $this->slug, 'address' )
82
+ ) ),
83
+ new bpfwpSchemaField( array(
84
+ 'slug' => 'postalCode',
85
+ 'name' => 'Postal/Zip Code',
86
+ 'input' => 'text',
87
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'postalCode', $this->slug, 'address' )
88
+ ) ),
89
+ new bpfwpSchemaField( array(
90
+ 'slug' => 'addressRegion',
91
+ 'name' => 'Address Region',
92
+ 'input' => 'text',
93
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'addressRegion', $this->slug, 'address' )
94
+ ) ),
95
+ new bpfwpSchemaField( array(
96
+ 'slug' => 'addressCountry',
97
+ 'name' => 'Address Country',
98
+ 'input' => 'text',
99
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'addressCountry', $this->slug, 'address' )
100
+ ) ),
101
+ )
102
+ ) ),
103
+ new bpfwpSchemaField( array(
104
+ 'slug' => 'geo',
105
+ 'name' => 'Geo Coordinates',
106
+ 'type' => 'GeoCoordinates',
107
+ 'input' => 'SchemaField',
108
+ 'children' => array (
109
+ new bpfwpSchemaField( array(
110
+ 'slug' => 'latitude',
111
+ 'name' => 'Latitude',
112
+ 'input' => 'text',
113
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'latitude', $this->slug, 'geo' )
114
+ ) ),
115
+ new bpfwpSchemaField( array(
116
+ 'slug' => 'longitude',
117
+ 'name' => 'Longitude',
118
+ 'input' => 'text',
119
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'longitude', $this->slug, 'geo' )
120
+ ) ),
121
+ )
122
+ ) ),
123
+ new bpfwpSchemaField( array(
124
+ 'slug' => 'url',
125
+ 'name' => 'URL',
126
+ 'input' => 'url',
127
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_permalink', 'url', $this->slug )
128
+ ) ),
129
+ new bpfwpSchemaField( array(
130
+ 'slug' => 'priceRange',
131
+ 'name' => 'Price Range',
132
+ 'input' => 'text',
133
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'priceRange', $this->slug )
134
+ ) ),
135
+ new bpfwpSchemaField( array(
136
+ 'slug' => 'telephone',
137
+ 'name' => 'Telephone',
138
+ 'input' => 'text',
139
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'telephone', $this->slug )
140
+ ) ),
141
+ new bpfwpSchemaField( array(
142
+ 'slug' => 'openingHoursSpecification',
143
+ 'name' => 'Opening Hours Specification',
144
+ 'type' => 'OpeningHoursSpecification',
145
+ 'repeatable' => true,
146
+ 'input' => 'SchemaField',
147
+ 'children' => array (
148
+ new bpfwpSchemaField( array(
149
+ 'slug' => 'dayOfWeek',
150
+ 'name' => 'Day of Week',
151
+ 'input' => 'text',
152
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'dayOfWeek', $this->slug, 'openingHoursSpecification' )
153
+ ) ),
154
+ new bpfwpSchemaField( array(
155
+ 'slug' => 'opens',
156
+ 'name' => 'Open Time',
157
+ 'input' => 'text',
158
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'opens', $this->slug, 'openingHoursSpecification' )
159
+ ) ),
160
+ new bpfwpSchemaField( array(
161
+ 'slug' => 'closes',
162
+ 'name' => 'Close Time',
163
+ 'input' => 'text',
164
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'closes', $this->slug, 'openingHoursSpecification' )
165
+ ) ),
166
+ )
167
+ ) ),
168
+ new bpfwpSchemaField( array(
169
+ 'slug' => 'department',
170
+ 'name' => 'Department',
171
+ 'type' => 'LocalBusiness',
172
+ 'repeatable' => true,
173
+ 'input' => 'SchemaField',
174
+ 'children' => array (
175
+ new bpfwpSchemaField( array(
176
+ 'slug' => 'name',
177
+ 'name' => 'Name',
178
+ 'input' => 'text',
179
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'name', $this->slug, 'department' )
180
+ ) ),
181
+ new bpfwpSchemaField( array(
182
+ 'slug' => 'image',
183
+ 'name' => 'Image',
184
+ 'input' => 'url',
185
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'image', $this->slug, 'department' )
186
+ ) ),
187
+ new bpfwpSchemaField( array(
188
+ 'slug' => 'telephone',
189
+ 'name' => 'Telephone',
190
+ 'input' => 'text',
191
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'telephone', $this->slug, 'department' )
192
+ ) ),
193
+ new bpfwpSchemaField( array(
194
+ 'slug' => 'openingHoursSpecification',
195
+ 'name' => 'Opening Hours Specification',
196
+ 'type' => 'OpeningHoursSpecification',
197
+ 'repeatable' => true,
198
+ 'input' => 'SchemaField',
199
+ 'children' => array (
200
+ new bpfwpSchemaField( array(
201
+ 'slug' => 'dayOfWeek',
202
+ 'name' => 'Day of Week',
203
+ 'input' => 'text',
204
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'dayOfWeek', $this->slug, 'openingHoursSpecification' )
205
+ ) ),
206
+ new bpfwpSchemaField( array(
207
+ 'slug' => 'opens',
208
+ 'name' => 'Open Time',
209
+ 'input' => 'text',
210
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'opens', $this->slug, 'openingHoursSpecification' )
211
+ ) ),
212
+ new bpfwpSchemaField( array(
213
+ 'slug' => 'closes',
214
+ 'name' => 'Close Time',
215
+ 'input' => 'text',
216
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'closes', $this->slug, 'openingHoursSpecification' )
217
+ ) ),
218
+ )
219
+ ) ),
220
+ )
221
+ ) ),
222
+ );
223
+
224
+ $this->fields = apply_filters( 'bpfwp_schema_fields', $fields, $this->slug );
225
+ }
226
+
227
+
228
+ /**
229
+ * Load the schema's child classes
230
+ *
231
+ * @since 2.0.0
232
+ * @access public
233
+ * @return void
234
+ */
235
+ public function initialize_children( $depth ) {
236
+ $depth--;
237
+
238
+ $child_classes = array ();
239
+
240
+ foreach ( $child_classes as $slug => $name ) {
241
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
242
+
243
+ $class_name = 'bpfwpSchema' . $name;
244
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
245
+ }
246
+ }
247
+
248
+ }
249
+ endif;
includes/schemas/class-schema-locksmith.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Locksmith as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaLocksmith' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-homeandconstructionbusiness.php';
15
+
16
+ /**
17
+ * Locksmith schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaLocksmith extends bpfwpSchemaHomeAndConstructionBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Locksmith';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Locksmith';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-lodgingbusiness.php ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Lodging Business as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaLodgingBusiness' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-localbusiness.php';
15
+
16
+ /**
17
+ * Lodging Business schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaLodgingBusiness extends bpfwpSchemaLocalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'LodgingBusiness';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Lodging Business';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+
52
+ $additional_fields = array(
53
+ new bpfwpSchemaField( array(
54
+ 'slug' => 'checkinTime',
55
+ 'name' => 'Check-in Time',
56
+ 'input' => 'text',
57
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'checkinTime', $this->slug )
58
+ ) ),
59
+ new bpfwpSchemaField( array(
60
+ 'slug' => 'checkoutTime',
61
+ 'name' => 'Check-out Time',
62
+ 'input' => 'text',
63
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'checkoutTime', $this->slug )
64
+ ) ),
65
+ new bpfwpSchemaField( array(
66
+ 'slug' => 'petsAllowed',
67
+ 'name' => 'Are Pets Allowed',
68
+ 'input' => 'text',
69
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'No', $this->slug )
70
+ ) ),
71
+ new bpfwpSchemaField( array(
72
+ 'slug' => 'starRating',
73
+ 'name' => 'Rating',
74
+ 'type' => 'Rating',
75
+ 'input' => 'SchemaField',
76
+ 'children' => array (
77
+ new bpfwpSchemaField( array(
78
+ 'slug' => 'ratingValue',
79
+ 'name' => 'User Rating',
80
+ 'input' => 'text',
81
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'ratingValue', $this->slug, 'review', 'reviewRating' )
82
+ ) ),
83
+ new bpfwpSchemaField( array(
84
+ 'slug' => 'bestRating',
85
+ 'name' => 'Maximum Rating',
86
+ 'input' => 'text',
87
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'bestRating', $this->slug, 'review', 'reviewRating' )
88
+ ) )
89
+ )
90
+ ) ),
91
+ );
92
+
93
+ $fields = apply_filters( 'bpfwp_schema_additional_fields', $additional_fields, $this->slug );
94
+
95
+ array_splice($this->fields, 1, 0, $fields);
96
+ }
97
+
98
+
99
+ /**
100
+ * Load the schema's child classes
101
+ *
102
+ * @since 2.0.0
103
+ * @access public
104
+ * @return void
105
+ */
106
+ public function initialize_children( $depth ) {
107
+ $depth--;
108
+
109
+ $child_classes = array(
110
+ 'bedandbreakfast' => 'BedAndBreakfast',
111
+ 'campground' => 'Campground',
112
+ 'hostel' => 'Hostel',
113
+ 'hotel' => 'Hotel',
114
+ 'motel' => 'Motel',
115
+ 'resort' => 'Resort',
116
+ );
117
+
118
+ foreach ( $child_classes as $slug => $name ) {
119
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
120
+
121
+ $class_name = 'bpfwpSchema' . $name;
122
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
123
+ }
124
+ }
125
+
126
+ }
127
+ endif;
includes/schemas/class-schema-logo.php ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Logo as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaLogo' ) ) :
14
+
15
+ /**
16
+ * Logo schema for Business Profile
17
+ *
18
+ * @since 2.0.0
19
+ */
20
+ class bpfwpSchemaLogo extends bpfwpSchema {
21
+
22
+ /**
23
+ * The name used by Schema.org
24
+ *
25
+ * @since 2.0.0
26
+ * @access public
27
+ * @var string
28
+ */
29
+ public $slug = 'Logo';
30
+
31
+ /**
32
+ * The display name for this schema
33
+ *
34
+ * @since 2.0.0
35
+ * @access public
36
+ * @var string
37
+ */
38
+ public $name = 'Logo';
39
+
40
+
41
+ /**
42
+ * Load the schema's default fields
43
+ *
44
+ * @since 2.0.0
45
+ * @access public
46
+ * @return void
47
+ */
48
+ public function set_fields() {
49
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-field.php';
50
+
51
+ $fields = array(
52
+ new bpfwpSchemaField( array(
53
+ 'slug' => 'url',
54
+ 'name' => 'URL',
55
+ 'input' => 'url',
56
+ 'recommended' => true,
57
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_title', 'url', $this->slug )
58
+ ) ),
59
+ new bpfwpSchemaField( array(
60
+ 'slug' => 'logo',
61
+ 'name' => 'Logo',
62
+ 'input' => 'url',
63
+ 'recommended' => true,
64
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function bpfwp_get_post_image_url', 'logo', $this->slug )
65
+ ) ),
66
+ );
67
+
68
+ $this->fields = apply_filters( 'bpfwp_schema_fields', $fields, $this->slug );
69
+ }
70
+
71
+
72
+ /**
73
+ * Load the schema's child classes
74
+ *
75
+ * @since 2.0.0
76
+ * @access public
77
+ * @return void
78
+ */
79
+ public function initialize_children( $depth ) {
80
+ $depth--;
81
+
82
+ $child_classes = array ();
83
+
84
+ foreach ( $child_classes as $slug => $name ) {
85
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
86
+
87
+ $class_name = 'bpfwpSchema' . $name;
88
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
89
+ }
90
+ }
91
+
92
+ }
93
+ endif;
includes/schemas/class-schema-medicalbusiness.php ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Medical Business as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaMedicalBusiness' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-localbusiness.php';
15
+
16
+ /**
17
+ * Medical Business schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaMedicalBusiness extends bpfwpSchemaLocalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'MedicalBusiness';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Medical Business';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array(
65
+ 'communityhealth' => 'CommunityHealth',
66
+ 'dentist' => 'Dentist',
67
+ 'dermatology' => 'Dermatology',
68
+ 'dietnutrition' => 'DietNutrition',
69
+ 'emergency' => 'Emergency',
70
+ 'geriatric' => 'Geriatric',
71
+ 'gynecologic' => 'Gynecologic',
72
+ 'medicalclinic' => 'MedicalClinic',
73
+ 'midwifery' => 'Midwifery',
74
+ 'nursing' => 'Nursing',
75
+ 'obstetric' => 'Obstetric',
76
+ 'oncologic' => 'Oncologic',
77
+ 'optician' => 'Optician',
78
+ 'optometric' => 'Optometric',
79
+ 'otolaryngologic' => 'Otolaryngologic',
80
+ 'pediatric' => 'Pediatric',
81
+ 'pharmacy' => 'Pharmacy',
82
+ 'physician' => 'Physician',
83
+ 'physiotherapy' => 'Physiotherapy',
84
+ 'plasticsurgery' => 'PlasticSurgery',
85
+ 'podiatric' => 'Podiatric',
86
+ 'primarycare' => 'PrimaryCare',
87
+ 'psychiatric' => 'Psychiatric',
88
+ 'publichealth' => 'PublicHealth',
89
+ );
90
+
91
+ foreach ( $child_classes as $slug => $name ) {
92
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
93
+
94
+ $class_name = 'bpfwpSchema' . $name;
95
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
96
+ }
97
+ }
98
+
99
+ }
100
+ endif;
includes/schemas/class-schema-medicalclinic.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for Medical Clinic as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaMedicalClinic' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-medicalbusiness.php';
15
+
16
+ /**
17
+ * Medical Clinic schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaMedicalClinic extends bpfwpSchemaMedicalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'MedicalClinic';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Medical Clinic';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-medicalorganization.php ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Medical Organization as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaMedicalOrganization' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-organization.php';
15
+
16
+ /**
17
+ * Medical Organization schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaMedicalOrganization extends bpfwpSchemaOrganization {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'MedicalOrganization';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Medical Organization';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+
52
+ $additional_fields = array(
53
+ new bpfwpSchemaField( array(
54
+ 'slug' => 'medicalSpecialty',
55
+ 'name' => 'Medical Specialty',
56
+ 'input' => 'text',
57
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'medicalSpecialty', $this->slug )
58
+ ) ),
59
+ );
60
+
61
+ $fields = apply_filters( 'bpfwp_schema_additional_fields', $additional_fields, $this->slug );
62
+
63
+ array_splice($this->fields, 1, 0, $fields);
64
+ }
65
+
66
+
67
+ /**
68
+ * Load the schema's child classes
69
+ *
70
+ * @since 2.0.0
71
+ * @access public
72
+ * @return void
73
+ */
74
+ public function initialize_children( $depth ) {
75
+ $depth--;
76
+
77
+ $child_classes = array(
78
+ 'dentist' => 'Dentist',
79
+ 'diagnosticlab' => 'DiagnosticLab',
80
+ 'hospital' => 'Hospital',
81
+ 'medicalclinic' => 'MedicalClinic',
82
+ 'pharmacy' => 'Pharmacy',
83
+ 'physician' => 'TravelAgency',
84
+ 'veterinarycare' => 'VeterinaryCare',
85
+ );
86
+
87
+ foreach ( $child_classes as $slug => $name ) {
88
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
89
+
90
+ $class_name = 'bpfwpSchema' . $name;
91
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
92
+ }
93
+ }
94
+
95
+ }
96
+ endif;
includes/schemas/class-schema-mensclothingstore.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Mens Clothing Store as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaMensClothingStore' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-store.php';
15
+
16
+ /**
17
+ * Mens Clothing Store schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaMensClothingStore extends bpfwpSchemaStore {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'MensClothingStore';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Mens Clothing Store';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-middleschool.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Middle School as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaMiddleSchool' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-educationalorganization.php';
15
+
16
+ /**
17
+ * Middle School schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaMiddleSchool extends bpfwpSchemaEducationalOrganization {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'MiddleSchool';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Middle School';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-midwifery.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for Midwifery as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaMidwifery' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-medicalbusiness.php';
15
+
16
+ /**
17
+ * Midwifery schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaMidwifery extends bpfwpSchemaMedicalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Midwifery';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Midwifery';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-mobilephonestore.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Mobile Phone Store as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaMobilePhoneStore' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-store.php';
15
+
16
+ /**
17
+ * Mobile Phone Store schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaMobilePhoneStore extends bpfwpSchemaStore {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'MobilePhoneStore';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Mobile Phone Store';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-motel.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Motel as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaMotel' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-lodgingbusiness.php';
15
+
16
+ /**
17
+ * Motel schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaMotel extends bpfwpSchemaLodgingBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Motel';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Motel';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-motorcycledealer.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Motorcycle Dealer as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaMotorcycleDealer' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-automotivebusiness.php';
15
+
16
+ /**
17
+ * Motorcycle Dealer schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaMotorcycleDealer extends bpfwpSchemaAutomotiveBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'MotorcycleDealer';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Motorcycle Dealer';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-motorcyclerepair.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for Motorcycle Repair as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaMotorcycleRepair' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-automotivebusiness.php';
15
+
16
+ /**
17
+ * Motorcycle Repair schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaMotorcycleRepair extends bpfwpSchemaAutomotiveBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'MotorcycleRepair';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Motorcycle Repair';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-movie.php ADDED
@@ -0,0 +1,216 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Movie as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaMovie' ) ) :
14
+
15
+ /**
16
+ * Movie schema for Business Profile
17
+ *
18
+ * @since 2.0.0
19
+ */
20
+ class bpfwpSchemaMovie extends bpfwpSchema {
21
+
22
+ /**
23
+ * The name used by Schema.org
24
+ *
25
+ * @since 2.0.0
26
+ * @access public
27
+ * @var string
28
+ */
29
+ public $slug = 'Movie';
30
+
31
+ /**
32
+ * The display name for this schema
33
+ *
34
+ * @since 2.0.0
35
+ * @access public
36
+ * @var string
37
+ */
38
+ public $name = 'Movie';
39
+
40
+
41
+ /**
42
+ * Load the schema's default fields
43
+ *
44
+ * @since 2.0.0
45
+ * @access public
46
+ * @return void
47
+ */
48
+ public function set_fields() {
49
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-field.php';
50
+
51
+ $fields = array(
52
+ new bpfwpSchemaField( array(
53
+ 'slug' => 'itemListElement',
54
+ 'name' => 'Item List Element',
55
+ 'type' => 'ItemList',
56
+ 'input' => 'SchemaField',
57
+ 'children' => array (
58
+ new bpfwpSchemaField( array(
59
+ 'slug' => 'listItem',
60
+ 'name' => 'List Item',
61
+ 'type' => 'ListItem',
62
+ 'repeatable' => true,
63
+ 'input' => 'SchemaField',
64
+ 'children' => array (
65
+ new bpfwpSchemaField( array(
66
+ 'slug' => 'position',
67
+ 'name' => 'Position',
68
+ 'input' => 'text',
69
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'position', $this->slug, 'itemListElement', 'ListItem' )
70
+ ) ),
71
+ new bpfwpSchemaField( array(
72
+ 'slug' => 'item',
73
+ 'name' => 'Item',
74
+ 'type' => 'Movie',
75
+ 'input' => 'SchemaField',
76
+ 'children' => array (
77
+ new bpfwpSchemaField( array(
78
+ 'slug' => 'name',
79
+ 'name' => 'Name',
80
+ 'input' => 'text',
81
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'name', $this->slug, 'itemListElement', 'ListItem', 'item' )
82
+ ) ),
83
+ new bpfwpSchemaField( array(
84
+ 'slug' => 'url',
85
+ 'name' => 'URL',
86
+ 'input' => 'url',
87
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'url', $this->slug, 'itemListElement', 'ListItem', 'item' )
88
+ ) ),
89
+ new bpfwpSchemaField( array(
90
+ 'slug' => 'image',
91
+ 'name' => 'Image',
92
+ 'input' => 'text',
93
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'image', $this->slug, 'itemListElement', 'ListItem', 'item' )
94
+ ) ),
95
+ new bpfwpSchemaField( array(
96
+ 'slug' => 'dateCreated',
97
+ 'name' => 'Date Created',
98
+ 'input' => 'text',
99
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'dateCreated', $this->slug, 'itemListElement', 'ListItem', 'item' )
100
+ ) ),
101
+ new bpfwpSchemaField( array(
102
+ 'slug' => 'director',
103
+ 'name' => 'Director',
104
+ 'type' => 'Person',
105
+ 'input' => 'SchemaField',
106
+ 'children' => array (
107
+ new bpfwpSchemaField( array(
108
+ 'slug' => 'name',
109
+ 'name' => 'Name',
110
+ 'input' => 'text',
111
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'name', $this->slug, 'itemListElement', 'ListItem', 'item', 'director' )
112
+ ) )
113
+ )
114
+ ) ),
115
+ new bpfwpSchemaField( array(
116
+ 'slug' => 'review',
117
+ 'name' => 'Review',
118
+ 'type' => 'Review',
119
+ 'input' => 'SchemaField',
120
+ 'children' => array (
121
+ new bpfwpSchemaField( array(
122
+ 'slug' => 'reviewRating',
123
+ 'name' => 'Rating',
124
+ 'type' => 'Rating',
125
+ 'input' => 'SchemaField',
126
+ 'children' => array (
127
+ new bpfwpSchemaField( array(
128
+ 'slug' => 'ratingValue',
129
+ 'name' => 'User Rating',
130
+ 'input' => 'text',
131
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'ratingValue', $this->slug, 'itemListElement', 'ListItem', 'item', 'review', 'reviewRating' )
132
+ ) ),
133
+ )
134
+ ) ),
135
+ new bpfwpSchemaField( array(
136
+ 'slug' => 'author',
137
+ 'name' => 'Author',
138
+ 'type' => 'Person',
139
+ 'input' => 'SchemaField',
140
+ 'children' => array (
141
+ new bpfwpSchemaField( array(
142
+ 'slug' => 'name',
143
+ 'name' => 'Name',
144
+ 'input' => 'text',
145
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'name', $this->slug, 'itemListElement', 'ListItem', 'item', 'review', 'author' )
146
+ ) )
147
+ )
148
+ ) ),
149
+ new bpfwpSchemaField( array(
150
+ 'slug' => 'reviewBody',
151
+ 'name' => 'Review Body',
152
+ 'input' => 'text',
153
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'reviewBody', $this->slug, 'itemListElement', 'ListItem', 'item', 'review' )
154
+ ) ),
155
+ new bpfwpSchemaField( array(
156
+ 'slug' => 'aggregateRating',
157
+ 'name' => 'Aggregate Rating',
158
+ 'type' => 'AggregateRating',
159
+ 'input' => 'SchemaField',
160
+ 'children' => array (
161
+ new bpfwpSchemaField( array(
162
+ 'slug' => 'ratingValue',
163
+ 'name' => 'Rating',
164
+ 'input' => 'text',
165
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'ratingValue', $this->slug, 'itemListElement', 'ListItem', 'item', 'review', 'aggregateRating' )
166
+ ) ),
167
+ new bpfwpSchemaField( array(
168
+ 'slug' => 'ratingCount',
169
+ 'name' => 'Rating Count',
170
+ 'input' => 'text',
171
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'ratingCount', $this->slug, 'itemListElement', 'ListItem', 'item', 'review', 'aggregateRating' )
172
+ ) ),
173
+ new bpfwpSchemaField( array(
174
+ 'slug' => 'bestRating',
175
+ 'name' => 'Best Rating',
176
+ 'input' => 'text',
177
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'bestRating', $this->slug, 'itemListElement', 'ListItem', 'item', 'review', 'aggregateRating' )
178
+ ) )
179
+ )
180
+ ) ),
181
+ )
182
+ ) ),
183
+ )
184
+ ) ),
185
+ )
186
+ ) ),
187
+ )
188
+ ) ),
189
+ );
190
+
191
+ $this->fields = apply_filters( 'bpfwp_schema_fields', $fields, $this->slug );
192
+ }
193
+
194
+
195
+ /**
196
+ * Load the schema's child classes
197
+ *
198
+ * @since 2.0.0
199
+ * @access public
200
+ * @return void
201
+ */
202
+ public function initialize_children( $depth ) {
203
+ $depth--;
204
+
205
+ $child_classes = array ();
206
+
207
+ foreach ( $child_classes as $slug => $name ) {
208
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
209
+
210
+ $class_name = 'bpfwpSchema' . $name;
211
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
212
+ }
213
+ }
214
+
215
+ }
216
+ endif;
includes/schemas/class-schema-movierentalstore.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Movie Rental Store as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaMovieRentalStore' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-store.php';
15
+
16
+ /**
17
+ * Movie Rental Store schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaMovieRentalStore extends bpfwpSchemaStore {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'MovieRentalStore';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Movie Rental Store';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-movietheater.php ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Movie Theater as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaMovieTheater' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-entertainmentbusiness.php';
15
+
16
+ /**
17
+ * Movie Theater schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaMovieTheater extends bpfwpSchemaEntertainmentBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'MovieTheater';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Movie Theater';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+
52
+ $additional_fields = array(
53
+ new bpfwpSchemaField( array(
54
+ 'slug' => 'screenCount',
55
+ 'name' => 'Screen Count',
56
+ 'input' => 'number',
57
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'screenCount', $this->slug )
58
+ ) ),
59
+ );
60
+
61
+ $fields = apply_filters( 'bpfwp_schema_additional_fields', $additional_fields, $this->slug );
62
+
63
+ array_splice($this->fields, 1, 0, $fields);
64
+ }
65
+
66
+
67
+ /**
68
+ * Load the schema's child classes
69
+ *
70
+ * @since 2.0.0
71
+ * @access public
72
+ * @return void
73
+ */
74
+ public function initialize_children( $depth ) {
75
+ $depth--;
76
+
77
+ $child_classes = array();
78
+
79
+ foreach ( $child_classes as $slug => $name ) {
80
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
81
+
82
+ $class_name = 'bpfwpSchema' . $name;
83
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
84
+ }
85
+ }
86
+
87
+ }
88
+ endif;
includes/schemas/class-schema-movingcompany.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Moving Company as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaMovingCompany' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-homeandconstructionbusiness.php';
15
+
16
+ /**
17
+ * Moving Company schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaMovingCompany extends bpfwpSchemaHomeAndConstructionBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'MovingCompany';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Moving Company';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-musicgroup.php ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Music Group as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaMusicGroup' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-performinggroup.php';
15
+
16
+ /**
17
+ * Music Group schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaMusicGroup extends bpfwpSchemaPerformingGroup {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'MusicGroup';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Music Group';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+
52
+ $additional_fields = array(
53
+ new bpfwpSchemaField( array(
54
+ 'slug' => 'genre',
55
+ 'name' => 'Genre',
56
+ 'input' => 'text',
57
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'genre', $this->slug )
58
+ ) ),
59
+ );
60
+
61
+ $fields = apply_filters( 'bpfwp_schema_additional_fields', $additional_fields, $this->slug );
62
+
63
+ array_splice($this->fields, 1, 0, $fields);
64
+ }
65
+
66
+
67
+ /**
68
+ * Load the schema's child classes
69
+ *
70
+ * @since 2.0.0
71
+ * @access public
72
+ * @return void
73
+ */
74
+ public function initialize_children( $depth ) {
75
+ $depth--;
76
+
77
+ $child_classes = array();
78
+
79
+ foreach ( $child_classes as $slug => $name ) {
80
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
81
+
82
+ $class_name = 'bpfwpSchema' . $name;
83
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
84
+ }
85
+ }
86
+
87
+ }
88
+ endif;
includes/schemas/class-schema-musicstore.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Music Store as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaMusicStore' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-store.php';
15
+
16
+ /**
17
+ * Music Store schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaMusicStore extends bpfwpSchemaStore {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'MusicStore';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Music Store';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-nailsalon.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Nail Salon as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaNailSalon' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-healthandbeautybusiness.php';
15
+
16
+ /**
17
+ * Nail Salon schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaNailSalon extends bpfwpSchemaHealthAndBeautyBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'NailSalon';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Nail Salon';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-newsmediaorganization.php ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a News Media Organization as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaNewsMediaOrganization' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-organization.php';
15
+
16
+ /**
17
+ * News Media Organization schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaNewsMediaOrganization extends bpfwpSchemaOrganization {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'NewsMediaOrganization';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'News Media Organization';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+
52
+ $additional_fields = array(
53
+ new bpfwpSchemaField( array(
54
+ 'slug' => 'masthead',
55
+ 'name' => 'Masthead',
56
+ 'input' => 'url',
57
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'masthead', $this->slug )
58
+ ) ),
59
+ );
60
+
61
+ $fields = apply_filters( 'bpfwp_schema_additional_fields', $additional_fields, $this->slug );
62
+
63
+ array_splice($this->fields, 1, 0, $fields);
64
+ }
65
+
66
+
67
+ /**
68
+ * Load the schema's child classes
69
+ *
70
+ * @since 2.0.0
71
+ * @access public
72
+ * @return void
73
+ */
74
+ public function initialize_children( $depth ) {
75
+ $depth--;
76
+
77
+ $child_classes = array();
78
+
79
+ foreach ( $child_classes as $slug => $name ) {
80
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
81
+
82
+ $class_name = 'bpfwpSchema' . $name;
83
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
84
+ }
85
+ }
86
+
87
+ }
88
+ endif;
includes/schemas/class-schema-ngo.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for an NGO as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaNGO' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-organization.php';
15
+
16
+ /**
17
+ * NGO schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaNGO extends bpfwpSchemaOrganization {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'NGO';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'NGO';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-nightclub.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Night Club as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaNightClub' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-entertainmentbusiness.php';
15
+
16
+ /**
17
+ * Night Club schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaNightClub extends bpfwpSchemaEntertainmentBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'NightClub';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Night Club';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-notary.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Notary as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaNotary' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-legalservice.php';
15
+
16
+ /**
17
+ * Notary schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaNotary extends bpfwpSchemaLegalService {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Notary';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Notary';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-nursing.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for Nursing as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaNursing' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-medicalbusiness.php';
15
+
16
+ /**
17
+ * Nursing schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaNursing extends bpfwpSchemaMedicalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Nursing';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Nursing';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-obstetric.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for Obstetric as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaObstetric' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-medicalbusiness.php';
15
+
16
+ /**
17
+ * Obstetric schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaObstetric extends bpfwpSchemaMedicalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Obstetric';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Obstetric';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-occupation.php ADDED
@@ -0,0 +1,172 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for an Occupation as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaOccupation' ) ) :
14
+
15
+ /**
16
+ * Occupation schema for Business Profile
17
+ *
18
+ * @since 2.0.0
19
+ */
20
+ class bpfwpSchemaOccupation extends bpfwpSchema {
21
+
22
+ /**
23
+ * The name used by Schema.org
24
+ *
25
+ * @since 2.0.0
26
+ * @access public
27
+ * @var string
28
+ */
29
+ public $slug = 'Occupation';
30
+
31
+ /**
32
+ * The display name for this schema
33
+ *
34
+ * @since 2.0.0
35
+ * @access public
36
+ * @var string
37
+ */
38
+ public $name = 'Occupation';
39
+
40
+
41
+ /**
42
+ * Load the schema's default fields
43
+ *
44
+ * @since 2.0.0
45
+ * @access public
46
+ * @return void
47
+ */
48
+ public function set_fields() {
49
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-field.php';
50
+
51
+ $fields = array(
52
+ new bpfwpSchemaField( array(
53
+ 'slug' => 'name',
54
+ 'name' => 'Name',
55
+ 'input' => 'text',
56
+ 'recommended' => true,
57
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_title', 'name', $this->slug )
58
+ ) ),
59
+ new bpfwpSchemaField( array(
60
+ 'slug' => 'description',
61
+ 'name' => 'Description',
62
+ 'input' => 'text',
63
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_excerpt', 'description', $this->slug )
64
+ ) ),
65
+ new bpfwpSchemaField( array(
66
+ 'slug' => 'occupationLocation',
67
+ 'name' => 'Occupation Location',
68
+ 'type' => 'Place',
69
+ 'input' => 'SchemaField',
70
+ 'children' => array (
71
+ new bpfwpSchemaField( array(
72
+ 'slug' => 'address',
73
+ 'name' => 'Address',
74
+ 'type' => 'PostalAddress',
75
+ 'input' => 'SchemaField',
76
+ 'children' => array (
77
+ new bpfwpSchemaField( array(
78
+ 'slug' => 'streetAddress',
79
+ 'name' => 'Street Address',
80
+ 'input' => 'text',
81
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'streetAddress', $this->slug, 'occupationLocation', 'address' )
82
+ ) ),
83
+ new bpfwpSchemaField( array(
84
+ 'slug' => 'addressLocality',
85
+ 'name' => 'Location (City, Province)',
86
+ 'input' => 'text',
87
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'addressLocality', $this->slug, 'occupationLocation', 'address' )
88
+ ) ),
89
+ new bpfwpSchemaField( array(
90
+ 'slug' => 'postalCode',
91
+ 'name' => 'Postal/Zip Code',
92
+ 'input' => 'text',
93
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'postalCode', $this->slug, 'occupationLocation', 'address' )
94
+ ) ),
95
+ new bpfwpSchemaField( array(
96
+ 'slug' => 'addressRegion',
97
+ 'name' => 'Address Region',
98
+ 'input' => 'text',
99
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'addressRegion', $this->slug, 'occupationLocation', 'address' )
100
+ ) ),
101
+ new bpfwpSchemaField( array(
102
+ 'slug' => 'addressCountry',
103
+ 'name' => 'Address Country',
104
+ 'input' => 'text',
105
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'addressCountry', $this->slug, 'occupationLocation', 'address' )
106
+ ) ),
107
+ )
108
+ ) ),
109
+ )
110
+ ) ),
111
+ new bpfwpSchemaField( array(
112
+ 'slug' => 'estimatedSalary',
113
+ 'name' => 'Salary',
114
+ 'type' => 'MonetaryAmount',
115
+ 'input' => 'SchemaField',
116
+ 'children' => array (
117
+ new bpfwpSchemaField( array(
118
+ 'slug' => 'currency',
119
+ 'name' => 'Currency',
120
+ 'input' => 'text',
121
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'currency', $this->slug, 'estimatedSalary' )
122
+ ) ),
123
+ new bpfwpSchemaField( array(
124
+ 'slug' => 'value',
125
+ 'name' => 'Value',
126
+ 'type' => 'QuantitativeValue',
127
+ 'input' => 'SchemaField',
128
+ 'children' => array (
129
+ new bpfwpSchemaField( array(
130
+ 'slug' => 'value',
131
+ 'name' => 'Value',
132
+ 'input' => 'text',
133
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'value', $this->slug, 'estimatedSalary', 'value' )
134
+ ) ),
135
+ new bpfwpSchemaField( array(
136
+ 'slug' => 'unitText',
137
+ 'name' => 'Unit Text',
138
+ 'input' => 'text',
139
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'unitText', $this->slug, 'estimatedSalary', 'value' )
140
+ ) ),
141
+ )
142
+ ) ),
143
+ )
144
+ ) ),
145
+ );
146
+
147
+ $this->fields = apply_filters( 'bpfwp_schema_fields', $fields, $this->slug );
148
+ }
149
+
150
+
151
+ /**
152
+ * Load the schema's child classes
153
+ *
154
+ * @since 2.0.0
155
+ * @access public
156
+ * @return void
157
+ */
158
+ public function initialize_children( $depth ) {
159
+ $depth--;
160
+
161
+ $child_classes = array ();
162
+
163
+ foreach ( $child_classes as $slug => $name ) {
164
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
165
+
166
+ $class_name = 'bpfwpSchema' . $name;
167
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
168
+ }
169
+ }
170
+
171
+ }
172
+ endif;
includes/schemas/class-schema-officeequipmentstore.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Office Equipment Store as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaOfficeEquipmentStore' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-store.php';
15
+
16
+ /**
17
+ * Office Equipment Store schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaOfficeEquipmentStore extends bpfwpSchemaStore {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'OfficeEquipmentStore';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Office Equipment Store';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-oncologic.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for Oncologic as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaOncologic' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-medicalbusiness.php';
15
+
16
+ /**
17
+ * Oncologic schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaOncologic extends bpfwpSchemaMedicalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Oncologic';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Oncologic';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-optician.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for Optician as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaOptician' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-medicalbusiness.php';
15
+
16
+ /**
17
+ * Optician schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaOptician extends bpfwpSchemaMedicalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Optician';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Optician';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-optometric.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for Optometric as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaOptometric' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-medicalbusiness.php';
15
+
16
+ /**
17
+ * Optometric schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaOptometric extends bpfwpSchemaMedicalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Optometric';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Optometric';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-organization.php ADDED
@@ -0,0 +1,179 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for an Organization as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaOrganization' ) ) :
14
+
15
+ /**
16
+ * Organization schema for Business Profile
17
+ *
18
+ * @since 2.0.0
19
+ */
20
+ class bpfwpSchemaOrganization extends bpfwpSchema {
21
+
22
+ /**
23
+ * The name used by Schema.org
24
+ *
25
+ * @since 2.0.0
26
+ * @access public
27
+ * @var string
28
+ */
29
+ public $slug = 'Organization';
30
+
31
+ /**
32
+ * The display name for this schema
33
+ *
34
+ * @since 2.0.0
35
+ * @access public
36
+ * @var string
37
+ */
38
+ public $name = 'Organization';
39
+
40
+
41
+ /**
42
+ * Load the schema's default fields
43
+ *
44
+ * @since 2.0.0
45
+ * @access public
46
+ * @return void
47
+ */
48
+ public function set_fields() {
49
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-field.php';
50
+
51
+ $fields = array(
52
+ new bpfwpSchemaField( array(
53
+ 'slug' => 'name',
54
+ 'name' => 'Name',
55
+ 'input' => 'text',
56
+ 'recommended' => true,
57
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'option blogname', 'name', $this->slug )
58
+ ) ),
59
+ new bpfwpSchemaField( array(
60
+ 'slug' => 'email',
61
+ 'name' => 'Email',
62
+ 'input' => 'email',
63
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'option admin_email', 'email', $this->slug )
64
+ ) ),
65
+ new bpfwpSchemaField( array(
66
+ 'slug' => 'telephone',
67
+ 'name' => 'Telephone',
68
+ 'input' => 'tel',
69
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'telephone', $this->slug )
70
+ ) ),
71
+ new bpfwpSchemaField( array(
72
+ 'slug' => 'url',
73
+ 'name' => 'URL',
74
+ 'input' => 'text',
75
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_permalink', 'url', $this->slug )
76
+ ) ),
77
+ new bpfwpSchemaField( array(
78
+ 'slug' => 'address',
79
+ 'name' => 'Address',
80
+ 'type' => 'PostalAddress',
81
+ 'input' => 'SchemaField',
82
+ 'children' => array (
83
+ new bpfwpSchemaField( array(
84
+ 'slug' => 'addressLocality',
85
+ 'name' => 'Location (City, Province)',
86
+ 'input' => 'text',
87
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'telephone', $this->slug, 'address' )
88
+ ) ),
89
+ new bpfwpSchemaField( array(
90
+ 'slug' => 'postalCode',
91
+ 'name' => 'Postal/Zip Code',
92
+ 'input' => 'text',
93
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'contactType', $this->slug, 'address' )
94
+ ) ),
95
+ new bpfwpSchemaField( array(
96
+ 'slug' => 'streetAddress',
97
+ 'name' => 'Street Address',
98
+ 'input' => 'text',
99
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'contactOption', $this->slug, 'address' )
100
+ ) )
101
+ )
102
+ ) ),
103
+ new bpfwpSchemaField( array(
104
+ 'slug' => 'contactPoint',
105
+ 'name' => 'Contact',
106
+ 'type' => 'ContactPoint',
107
+ 'input' => 'SchemaField',
108
+ 'repeatable' => true,
109
+ 'children' => array (
110
+ new bpfwpSchemaField( array(
111
+ 'slug' => 'telephone',
112
+ 'name' => 'Telephone',
113
+ 'input' => 'tel',
114
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'telephone', $this->slug, 'contactPoint' )
115
+ ) ),
116
+ new bpfwpSchemaField( array(
117
+ 'slug' => 'contactType',
118
+ 'name' => 'Contact Type',
119
+ 'input' => 'text',
120
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'contactType', $this->slug, 'contactPoint' )
121
+ ) ),
122
+ new bpfwpSchemaField( array(
123
+ 'slug' => 'contactOption',
124
+ 'name' => 'Contact Option',
125
+ 'input' => 'text',
126
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'contactOption', $this->slug, 'contactPoint' )
127
+ ) ),
128
+ new bpfwpSchemaField( array(
129
+ 'slug' => 'areaServed',
130
+ 'name' => 'Area Served',
131
+ 'input' => 'text',
132
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'areaServed', $this->slug, 'contactPoint' )
133
+ ) )
134
+ )
135
+ ) )
136
+ );
137
+
138
+ $this->fields = apply_filters( 'bpfwp_schema_fields', $fields, $this->slug );
139
+ }
140
+
141
+
142
+ /**
143
+ * Load the schema's child classes
144
+ *
145
+ * @since 2.0.0
146
+ * @access public
147
+ * @return void
148
+ */
149
+ public function initialize_children( $depth ) {
150
+ $depth--;
151
+
152
+ $child_classes = array (
153
+ 'airline' => 'Airline',
154
+ 'consortium' => 'Consortium',
155
+ 'corporation' => 'Corporation',
156
+ 'educationalorganization' => 'EducationalOrganization',
157
+ 'fundingscheme' => 'FundingScheme',
158
+ 'governmentorganization' => 'GovernmentOrganization',
159
+ 'libarysystem' => 'LibrarySystem',
160
+ 'localbusiness' => 'LocalBusiness',
161
+ 'medicalorganization' => 'MedicalOrganization',
162
+ 'ngo' => 'NGO',
163
+ 'newsmediaorganization' => 'NewsMediaOrganization',
164
+ 'performinggroup' => 'PerformingGroup',
165
+ 'project' => 'Project',
166
+ 'sportsorganization' => 'SportsOrganization',
167
+ 'workersunion' => 'WorkersUnion',
168
+ );
169
+
170
+ foreach ( $child_classes as $slug => $name ) {
171
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
172
+
173
+ $class_name = 'bpfwpSchema' . $name;
174
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
175
+ }
176
+ }
177
+
178
+ }
179
+ endif;
includes/schemas/class-schema-otolaryngologic.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for Otolaryngologic as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaOtolaryngologic' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-medicalbusiness.php';
15
+
16
+ /**
17
+ * Otolaryngologic schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaOtolaryngologic extends bpfwpSchemaMedicalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Otolaryngologic';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Otolaryngologic';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-outletstore.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Outlet Store as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaOutletStore' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-store.php';
15
+
16
+ /**
17
+ * Outlet Store schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaOutletStore extends bpfwpSchemaStore {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'OutletStore';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Outlet Store';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-pawnshop.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Pawn Shop as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaPawnShop' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-store.php';
15
+
16
+ /**
17
+ * Pawn Shop schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaPawnShop extends bpfwpSchemaStore {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'PawnShop';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Pawn Shop';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-pediatric.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for Pediatric as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaPediatric' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-medicalbusiness.php';
15
+
16
+ /**
17
+ * Pediatric schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaPediatric extends bpfwpSchemaMedicalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Pediatric';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Pediatric';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-performinggroup.php ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Performing Group as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaPerformingGroup' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-organization.php';
15
+
16
+ /**
17
+ * Performing Group schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaPerformingGroup extends bpfwpSchemaOrganization {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'PerformingGroup';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Performing Group';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+
52
+ $additional_fields = array(
53
+ new bpfwpSchemaField( array(
54
+ 'slug' => 'sport',
55
+ 'name' => 'Sport',
56
+ 'input' => 'text',
57
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'sport', $this->slug )
58
+ ) ),
59
+ );
60
+
61
+ $fields = apply_filters( 'bpfwp_schema_additional_fields', $additional_fields, $this->slug );
62
+
63
+ array_splice($this->fields, 1, 0, $fields);
64
+ }
65
+
66
+
67
+ /**
68
+ * Load the schema's child classes
69
+ *
70
+ * @since 2.0.0
71
+ * @access public
72
+ * @return void
73
+ */
74
+ public function initialize_children( $depth ) {
75
+ $depth--;
76
+
77
+ $child_classes = array(
78
+ 'dancegroup' => 'DanceGroup',
79
+ 'theatergroup' => 'TheaterGroup',
80
+ 'musicgroup' => 'MusicGroup',
81
+ );
82
+
83
+ foreach ( $child_classes as $slug => $name ) {
84
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
85
+
86
+ $class_name = 'bpfwpSchema' . $name;
87
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
88
+ }
89
+ }
90
+
91
+ }
92
+ endif;
includes/schemas/class-schema-petstore.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Pet Store as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaPetStore' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-store.php';
15
+
16
+ /**
17
+ * Pet Store schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaPetStore extends bpfwpSchemaStore {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'PetStore';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Pet Store';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-pharmacy.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for Pharmacy as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaPharmacy' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-medicalbusiness.php';
15
+
16
+ /**
17
+ * Pharmacy schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaPharmacy extends bpfwpSchemaMedicalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Pharmacy';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Pharmacy';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-physician.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for Physician as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaPhysician' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-medicalbusiness.php';
15
+
16
+ /**
17
+ * Physician schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaPhysician extends bpfwpSchemaMedicalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Physician';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Physician';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-physiotherapy.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for Physiotherapy as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaPhysiotherapy' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-medicalbusiness.php';
15
+
16
+ /**
17
+ * Physiotherapy schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaPhysiotherapy extends bpfwpSchemaMedicalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Physiotherapy';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Physiotherapy';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-plasticsurgery.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for Plastic Surgery as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaPlasticSurgery' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-medicalbusiness.php';
15
+
16
+ /**
17
+ * Plastic Surgery schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaPlasticSurgery extends bpfwpSchemaMedicalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'PlasticSurgery';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Plastic Surgery';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-plumber.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Plumber as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaPlumber' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-homeandconstructionbusiness.php';
15
+
16
+ /**
17
+ * Plumber schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaPlumber extends bpfwpSchemaHomeAndConstructionBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Plumber';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Plumber';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-podiatric.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for Podiatric as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaPodiatric' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-medicalbusiness.php';
15
+
16
+ /**
17
+ * Podiatric schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaPodiatric extends bpfwpSchemaMedicalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Podiatric';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Podiatric';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-policestation.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Police Station as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaPoliceStation' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-emergencyservice.php';
15
+
16
+ /**
17
+ * Police Station schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaPoliceStation extends bpfwpSchemaEmergencyService {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'PoliceStation';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Police Station';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-postoffice.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Post Office as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaPostOffice' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-governmentoffice.php';
15
+
16
+ /**
17
+ * Post Office schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaPostOffice extends bpfwpSchemaGovernmentOffice {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'PostOffice';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Post Office';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-preschool.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Preschool as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaPreschool' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-educationalorganization.php';
15
+
16
+ /**
17
+ * Preschool schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaPreschool extends bpfwpSchemaEducationalOrganization {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Preschool';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Preschool';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-primarycare.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for Primary Care as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaPrimaryCare' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-medicalbusiness.php';
15
+
16
+ /**
17
+ * Primary Care schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaPrimaryCare extends bpfwpSchemaMedicalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'PrimaryCare';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Primary Care';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-product.php ADDED
@@ -0,0 +1,220 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Product as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaProduct' ) ) :
14
+
15
+ /**
16
+ * Product schema for Business Profile
17
+ *
18
+ * @since 2.0.0
19
+ */
20
+ class bpfwpSchemaProduct extends bpfwpSchema {
21
+
22
+ /**
23
+ * The name used by Schema.org
24
+ *
25
+ * @since 2.0.0
26
+ * @access public
27
+ * @var string
28
+ */
29
+ public $slug = 'Product';
30
+
31
+ /**
32
+ * The display name for this schema
33
+ *
34
+ * @since 2.0.0
35
+ * @access public
36
+ * @var string
37
+ */
38
+ public $name = 'Product';
39
+
40
+
41
+ /**
42
+ * Load the schema's default fields
43
+ *
44
+ * @since 2.0.0
45
+ * @access public
46
+ * @return void
47
+ */
48
+ public function set_fields() {
49
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-field.php';
50
+
51
+ $fields = array(
52
+ new bpfwpSchemaField( array(
53
+ 'slug' => 'name',
54
+ 'name' => 'Name',
55
+ 'input' => 'text',
56
+ 'recommended' => true,
57
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_title', 'name', $this->slug )
58
+ ) ),
59
+ new bpfwpSchemaField( array(
60
+ 'slug' => 'image',
61
+ 'name' => 'Image',
62
+ 'input' => 'text',
63
+ 'recommended' => true,
64
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'image', $this->slug )
65
+ ) ),
66
+ new bpfwpSchemaField( array(
67
+ 'slug' => 'description',
68
+ 'name' => 'Description',
69
+ 'input' => 'text',
70
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_excerpt', 'description', $this->slug )
71
+ ) ),
72
+ new bpfwpSchemaField( array(
73
+ 'slug' => 'brand',
74
+ 'name' => 'Brand',
75
+ 'input' => 'text',
76
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'brand', $this->slug )
77
+ ) ),
78
+ new bpfwpSchemaField( array(
79
+ 'slug' => 'sku',
80
+ 'name' => 'SKU',
81
+ 'input' => 'text',
82
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'sku', $this->slug )
83
+ ) ),
84
+ new bpfwpSchemaField( array(
85
+ 'slug' => 'review',
86
+ 'name' => 'Review',
87
+ 'type' => 'Review',
88
+ 'input' => 'SchemaField',
89
+ 'children' => array (
90
+ new bpfwpSchemaField( array(
91
+ 'slug' => 'reviewRating',
92
+ 'name' => 'Rating',
93
+ 'type' => 'Rating',
94
+ 'input' => 'SchemaField',
95
+ 'children' => array (
96
+ new bpfwpSchemaField( array(
97
+ 'slug' => 'ratingValue',
98
+ 'name' => 'User Rating',
99
+ 'input' => 'text',
100
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'ratingValue', $this->slug, 'review', 'reviewRating' )
101
+ ) )
102
+
103
+ )
104
+ ) ),
105
+ new bpfwpSchemaField( array(
106
+ 'slug' => 'reviewBody',
107
+ 'name' => 'Review Body',
108
+ 'input' => 'text',
109
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'reviewBody', $this->slug, 'review' )
110
+ ) ),
111
+ new bpfwpSchemaField( array(
112
+ 'slug' => 'author',
113
+ 'name' => 'Author',
114
+ 'type' => 'Person',
115
+ 'input' => 'SchemaField',
116
+ 'children' => array (
117
+ new bpfwpSchemaField( array(
118
+ 'slug' => 'name',
119
+ 'name' => 'Name',
120
+ 'input' => 'text',
121
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'name', $this->slug, 'review', 'author' )
122
+ ) )
123
+ )
124
+ ) )
125
+ )
126
+ ) ),
127
+ new bpfwpSchemaField( array(
128
+ 'slug' => 'aggregateRating',
129
+ 'name' => 'Aggregate Rating',
130
+ 'type' => 'AggregateRating',
131
+ 'input' => 'SchemaField',
132
+ 'children' => array (
133
+ new bpfwpSchemaField( array(
134
+ 'slug' => 'ratingValue',
135
+ 'name' => 'Rating',
136
+ 'input' => 'text',
137
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'ratingValue', $this->slug, 'aggregateRating' )
138
+ ) ),
139
+ new bpfwpSchemaField( array(
140
+ 'slug' => 'reviewCount',
141
+ 'name' => 'Review Count',
142
+ 'input' => 'text',
143
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'reviewCount', $this->slug, 'aggregateRating' )
144
+ ) )
145
+ )
146
+ ) ),
147
+ new bpfwpSchemaField( array(
148
+ 'slug' => 'offers',
149
+ 'name' => 'Offer',
150
+ 'type' => 'Offer',
151
+ 'input' => 'SchemaField',
152
+ 'children' => array (
153
+ new bpfwpSchemaField( array(
154
+ 'slug' => 'url',
155
+ 'name' => 'URL',
156
+ 'input' => 'text',
157
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_permalink', 'url', $this->slug, 'offers' )
158
+ ) ),
159
+ new bpfwpSchemaField( array(
160
+ 'slug' => 'priceCurrency',
161
+ 'name' => 'Currency',
162
+ 'input' => 'text',
163
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'priceCurrency', $this->slug, 'offers' )
164
+ ) ),
165
+ new bpfwpSchemaField( array(
166
+ 'slug' => 'price',
167
+ 'name' => 'Price',
168
+ 'input' => 'text',
169
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'priceCurrency', $this->slug, 'offers' )
170
+ ) ),
171
+ new bpfwpSchemaField( array(
172
+ 'slug' => 'availability',
173
+ 'name' => 'Availability',
174
+ 'input' => 'text',
175
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'https://schema.org/InStock', 'priceCurrency', $this->slug, 'offers' )
176
+ ) ),
177
+ new bpfwpSchemaField( array(
178
+ 'slug' => 'seller',
179
+ 'name' => 'Seller',
180
+ 'type' => 'Organization',
181
+ 'input' => 'SchemaField',
182
+ 'children' => array (
183
+ new bpfwpSchemaField( array(
184
+ 'slug' => 'name',
185
+ 'name' => 'Name',
186
+ 'input' => 'text',
187
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'name', $this->slug, 'offers', 'seller' )
188
+ ) )
189
+ )
190
+ ) )
191
+ )
192
+ ) )
193
+ );
194
+
195
+ $this->fields = apply_filters( 'bpfwp_schema_fields', $fields, $this->slug );
196
+ }
197
+
198
+
199
+ /**
200
+ * Load the schema's child classes
201
+ *
202
+ * @since 2.0.0
203
+ * @access public
204
+ * @return void
205
+ */
206
+ public function initialize_children( $depth ) {
207
+ $depth--;
208
+
209
+ $child_classes = array ();
210
+
211
+ foreach ( $child_classes as $slug => $name ) {
212
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
213
+
214
+ $class_name = 'bpfwpSchema' . $name;
215
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
216
+ }
217
+ }
218
+
219
+ }
220
+ endif;
includes/schemas/class-schema-professionalservice.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Professional Service as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaProfessionalService' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-localbusiness.php';
15
+
16
+ /**
17
+ * Professional Service schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaProfessionalService extends bpfwpSchemaLocalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'ProfessionalService';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Professional Service';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-project.php ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Project as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaProject' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-organization.php';
15
+
16
+ /**
17
+ * Project schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaProject extends bpfwpSchemaOrganization {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Project';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Project';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array(
65
+ 'fundingagency' => 'FundingAgency',
66
+ 'researchproject' => 'ResearchProject',
67
+ );
68
+
69
+ foreach ( $child_classes as $slug => $name ) {
70
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
71
+
72
+ $class_name = 'bpfwpSchema' . $name;
73
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
74
+ }
75
+ }
76
+
77
+ }
78
+ endif;
includes/schemas/class-schema-psychiatric.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for Psychiatric as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaPsychiatric' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-medicalbusiness.php';
15
+
16
+ /**
17
+ * Psychiatric schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaPsychiatric extends bpfwpSchemaMedicalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Psychiatric';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Psychiatric';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-publichealth.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for Public Health as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaPublicHealth' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-medicalbusiness.php';
15
+
16
+ /**
17
+ * Public Health schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaPublicHealth extends bpfwpSchemaMedicalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'PublicHealth';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Public Health';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-publicswimmingpool.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Public Swimming Pool as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaPublicSwimmingPool' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-sportsactivitylocation.php';
15
+
16
+ /**
17
+ * Public Swimming Pool schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaPublicSwimmingPool extends bpfwpSchemaSportsActivityLocation {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'PublicSwimmingPool';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Public Swimming Pool';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-qapage.php ADDED
@@ -0,0 +1,225 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a QA Page as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaQAPage' ) ) :
14
+
15
+ /**
16
+ * QA Page schema for Business Profile
17
+ *
18
+ * @since 2.0.0
19
+ */
20
+ class bpfwpSchemaQAPage extends bpfwpSchema {
21
+
22
+ /**
23
+ * The name used by Schema.org
24
+ *
25
+ * @since 2.0.0
26
+ * @access public
27
+ * @var string
28
+ */
29
+ public $slug = 'QAPage';
30
+
31
+ /**
32
+ * The display name for this schema
33
+ *
34
+ * @since 2.0.0
35
+ * @access public
36
+ * @var string
37
+ */
38
+ public $name = 'QA Page';
39
+
40
+
41
+ /**
42
+ * Load the schema's default fields
43
+ *
44
+ * @since 2.0.0
45
+ * @access public
46
+ * @return void
47
+ */
48
+ public function set_fields() {
49
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-field.php';
50
+
51
+ $fields = array(
52
+ new bpfwpSchemaField( array(
53
+ 'slug' => 'QAPage',
54
+ 'name' => 'QA Page',
55
+ 'type' => 'QAPage',
56
+ 'input' => 'SchemaField',
57
+ 'children' => array (
58
+ new bpfwpSchemaField( array(
59
+ 'slug' => 'question',
60
+ 'name' => 'Question',
61
+ 'type' => 'Question',
62
+ 'repeatable' => true,
63
+ 'input' => 'SchemaField',
64
+ 'children' => array (
65
+ new bpfwpSchemaField( array(
66
+ 'slug' => 'name',
67
+ 'name' => 'Name',
68
+ 'recommended' => true,
69
+ 'input' => 'text',
70
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_title', 'name', $this->slug, 'QAPage', 'question' )
71
+ ) ),
72
+ new bpfwpSchemaField( array(
73
+ 'slug' => 'text',
74
+ 'name' => 'Text',
75
+ 'recommended' => true,
76
+ 'input' => 'text',
77
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'text', $this->slug, 'QAPage', 'question' )
78
+ ) ),
79
+ new bpfwpSchemaField( array(
80
+ 'slug' => 'answerCount',
81
+ 'name' => 'Answer Count',
82
+ 'input' => 'text',
83
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'answerCount', $this->slug, 'QAPage', 'question' )
84
+ ) ),
85
+ new bpfwpSchemaField( array(
86
+ 'slug' => 'upvoteCount',
87
+ 'name' => 'Upvote Count',
88
+ 'input' => 'text',
89
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'upvoteCount', $this->slug, 'QAPage', 'question' )
90
+ ) ),
91
+ new bpfwpSchemaField( array(
92
+ 'slug' => 'dateCreated',
93
+ 'name' => 'Date Created',
94
+ 'input' => 'text',
95
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_date', 'dateCreated', $this->slug, 'QAPage', 'question' )
96
+ ) ),
97
+ new bpfwpSchemaField( array(
98
+ 'slug' => 'author',
99
+ 'name' => 'Author',
100
+ 'type' => 'Person',
101
+ 'input' => 'SchemaField',
102
+ 'children' => array (
103
+ new bpfwpSchemaField( array(
104
+ 'slug' => 'name',
105
+ 'name' => 'Name',
106
+ 'input' => 'text',
107
+ 'recommended' => true,
108
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_author', 'name', $this->slug, 'QAPage', 'question', 'author' )
109
+ ) ),
110
+ )
111
+ ) ),
112
+ new bpfwpSchemaField( array(
113
+ 'slug' => 'acceptedAnswer',
114
+ 'name' => 'Answer',
115
+ 'type' => 'Answer',
116
+ 'input' => 'SchemaField',
117
+ 'children' => array (
118
+ new bpfwpSchemaField( array(
119
+ 'slug' => 'text',
120
+ 'name' => 'Text',
121
+ 'input' => 'text',
122
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'name', $this->slug, 'QAPage', 'question', 'acceptedAnswer' )
123
+ ) ),
124
+ new bpfwpSchemaField( array(
125
+ 'slug' => 'upvoteCount',
126
+ 'name' => 'Upvote Count',
127
+ 'input' => 'text',
128
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'upvoteCount', $this->slug, 'QAPage', 'question', 'acceptedAnswer' )
129
+ ) ),
130
+ new bpfwpSchemaField( array(
131
+ 'slug' => 'dateCreated',
132
+ 'name' => 'Date Created',
133
+ 'input' => 'text',
134
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'dateCreated', $this->slug, 'QAPage', 'question', 'acceptedAnswer' )
135
+ ) ),
136
+ new bpfwpSchemaField( array(
137
+ 'slug' => 'author',
138
+ 'name' => 'Author',
139
+ 'type' => 'Person',
140
+ 'input' => 'SchemaField',
141
+ 'children' => array (
142
+ new bpfwpSchemaField( array(
143
+ 'slug' => 'name',
144
+ 'name' => 'Name',
145
+ 'input' => 'text',
146
+ 'recommended' => true,
147
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'name', $this->slug, 'QAPage', 'question', 'acceptedAnswer', 'author' )
148
+ ) ),
149
+ )
150
+ ) ),
151
+ )
152
+ ) ),
153
+ new bpfwpSchemaField( array(
154
+ 'slug' => 'suggestedAnswer',
155
+ 'name' => 'Suggested Answer',
156
+ 'type' => 'Answer',
157
+ 'input' => 'SchemaField',
158
+ 'children' => array (
159
+ new bpfwpSchemaField( array(
160
+ 'slug' => 'text',
161
+ 'name' => 'Text',
162
+ 'input' => 'text',
163
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'name', $this->slug, 'QAPage', 'question', 'suggestedAnswer' )
164
+ ) ),
165
+ new bpfwpSchemaField( array(
166
+ 'slug' => 'upvoteCount',
167
+ 'name' => 'Upvote Count',
168
+ 'input' => 'text',
169
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'upvoteCount', $this->slug, 'QAPage', 'question', 'suggestedAnswer' )
170
+ ) ),
171
+ new bpfwpSchemaField( array(
172
+ 'slug' => 'dateCreated',
173
+ 'name' => 'Date Created',
174
+ 'input' => 'text',
175
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'dateCreated', $this->slug, 'QAPage', 'question', 'suggestedAnswer' )
176
+ ) ),
177
+ new bpfwpSchemaField( array(
178
+ 'slug' => 'author',
179
+ 'name' => 'Author',
180
+ 'type' => 'Person',
181
+ 'input' => 'SchemaField',
182
+ 'children' => array (
183
+ new bpfwpSchemaField( array(
184
+ 'slug' => 'name',
185
+ 'name' => 'Name',
186
+ 'input' => 'text',
187
+ 'recommended' => true,
188
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'name', $this->slug, 'QAPage', 'question', 'suggestedAnswer', 'author' )
189
+ ) ),
190
+ )
191
+ ) ),
192
+ )
193
+ ) ),
194
+ )
195
+ ) ),
196
+ )
197
+ ) ),
198
+ );
199
+
200
+ $this->fields = apply_filters( 'bpfwp_schema_fields', $fields, $this->slug );
201
+ }
202
+
203
+
204
+ /**
205
+ * Load the schema's child classes
206
+ *
207
+ * @since 2.0.0
208
+ * @access public
209
+ * @return void
210
+ */
211
+ public function initialize_children( $depth ) {
212
+ $depth--;
213
+
214
+ $child_classes = array ();
215
+
216
+ foreach ( $child_classes as $slug => $name ) {
217
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
218
+
219
+ $class_name = 'bpfwpSchema' . $name;
220
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
221
+ }
222
+ }
223
+
224
+ }
225
+ endif;
includes/schemas/class-schema-radiostation.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Radio Station as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaRadioStation' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-localbusiness.php';
15
+
16
+ /**
17
+ * Radio Station schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaRadioStation extends bpfwpSchemaLocalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'RadioStation';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Radio Station';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-realestateagent.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Real Estate Agent as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaRealEstateAgent' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-localbusiness.php';
15
+
16
+ /**
17
+ * Real Estate Agent schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaRealEstateAgent extends bpfwpSchemaLocalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'RealEstateAgent';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Real Estate Agent';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-recipe.php ADDED
@@ -0,0 +1,232 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Recipe as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaRecipe' ) ) :
14
+
15
+ /**
16
+ * Recipe schema for Business Profile
17
+ *
18
+ * @since 2.0.0
19
+ */
20
+ class bpfwpSchemaRecipe extends bpfwpSchema {
21
+
22
+ /**
23
+ * The name used by Schema.org
24
+ *
25
+ * @since 2.0.0
26
+ * @access public
27
+ * @var string
28
+ */
29
+ public $slug = 'Recipe';
30
+
31
+ /**
32
+ * The display name for this schema
33
+ *
34
+ * @since 2.0.0
35
+ * @access public
36
+ * @var string
37
+ */
38
+ public $name = 'Recipe';
39
+
40
+
41
+ /**
42
+ * Load the schema's default fields
43
+ *
44
+ * @since 2.0.0
45
+ * @access public
46
+ * @return void
47
+ */
48
+ public function set_fields() {
49
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-field.php';
50
+
51
+ $fields = array(
52
+ new bpfwpSchemaField( array(
53
+ 'slug' => 'name',
54
+ 'name' => 'Name',
55
+ 'input' => 'text',
56
+ 'recommended' => true,
57
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_title', 'name', $this->slug )
58
+ ) ),
59
+ new bpfwpSchemaField( array(
60
+ 'slug' => 'image',
61
+ 'name' => 'Image',
62
+ 'input' => 'url',
63
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function bpfwp_get_post_image_url', 'image', $this->slug )
64
+ ) ),
65
+ new bpfwpSchemaField( array(
66
+ 'slug' => 'author',
67
+ 'name' => 'Author',
68
+ 'type' => 'Person',
69
+ 'input' => 'SchemaField',
70
+ 'children' => array (
71
+ new bpfwpSchemaField( array(
72
+ 'slug' => 'name',
73
+ 'name' => 'Name',
74
+ 'input' => 'text',
75
+ 'recommended' => true,
76
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_author', 'name', $this->slug, 'author' )
77
+ ) ),
78
+ )
79
+ ) ),
80
+ new bpfwpSchemaField( array(
81
+ 'slug' => 'description',
82
+ 'name' => 'Description',
83
+ 'input' => 'text',
84
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_excerpt', 'description', $this->slug )
85
+ ) ),
86
+ new bpfwpSchemaField( array(
87
+ 'slug' => 'datePublished',
88
+ 'name' => 'Date Published',
89
+ 'input' => 'text',
90
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_date', 'datePublished', $this->slug )
91
+ ) ),
92
+ new bpfwpSchemaField( array(
93
+ 'slug' => 'video',
94
+ 'name' => 'Video',
95
+ 'input' => 'url',
96
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'video', $this->slug )
97
+ ) ),
98
+ new bpfwpSchemaField( array(
99
+ 'slug' => 'prepTime',
100
+ 'name' => 'Prep Time',
101
+ 'input' => 'text',
102
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'prepTime', $this->slug )
103
+ ) ),
104
+ new bpfwpSchemaField( array(
105
+ 'slug' => 'cookTime',
106
+ 'name' => 'Cook Time',
107
+ 'input' => 'text',
108
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'cookTime', $this->slug )
109
+ ) ),
110
+ new bpfwpSchemaField( array(
111
+ 'slug' => 'totalTime',
112
+ 'name' => 'Total Time',
113
+ 'input' => 'text',
114
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'totalTime', $this->slug )
115
+ ) ),
116
+ new bpfwpSchemaField( array(
117
+ 'slug' => 'keywords',
118
+ 'name' => 'Keywords',
119
+ 'input' => 'text',
120
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'keywords', $this->slug )
121
+ ) ),
122
+ new bpfwpSchemaField( array(
123
+ 'slug' => 'recipeYield',
124
+ 'name' => 'Recipe Yield',
125
+ 'input' => 'text',
126
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'recipeYield', $this->slug )
127
+ ) ),
128
+ new bpfwpSchemaField( array(
129
+ 'slug' => 'recipeCategory',
130
+ 'name' => 'Recipe Category',
131
+ 'input' => 'text',
132
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'recipeCategory', $this->slug )
133
+ ) ),
134
+ new bpfwpSchemaField( array(
135
+ 'slug' => 'recipeCuisine',
136
+ 'name' => 'Recipe Cuisine',
137
+ 'input' => 'text',
138
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'recipeCuisine', $this->slug )
139
+ ) ),
140
+ new bpfwpSchemaField( array(
141
+ 'slug' => 'nutrition',
142
+ 'name' => 'Nutrition',
143
+ 'type' => 'NutritionInformation',
144
+ 'input' => 'SchemaField',
145
+ 'children' => array (
146
+ new bpfwpSchemaField( array(
147
+ 'slug' => 'calories',
148
+ 'name' => 'Calories',
149
+ 'input' => 'text',
150
+ 'recommended' => true,
151
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'calories', $this->slug, 'nutrition' )
152
+ ) ),
153
+ )
154
+ ) ),
155
+ new bpfwpSchemaField( array(
156
+ 'slug' => 'recipeIngredient',
157
+ 'name' => 'Recipe Ingredients',
158
+ 'input' => 'textarea',
159
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'recipeIngredient', $this->slug )
160
+ ) ),
161
+ new bpfwpSchemaField( array(
162
+ 'slug' => 'recipeInstructions',
163
+ 'name' => 'Recipe Instructions',
164
+ 'type' => 'ItemList',
165
+ 'input' => 'SchemaField',
166
+ 'children' => array (
167
+ new bpfwpSchemaField( array(
168
+ 'slug' => 'howToStep',
169
+ 'name' => 'How-To Step',
170
+ 'type' => 'HowToStep',
171
+ 'repeatable' => true,
172
+ 'input' => 'SchemaField',
173
+ 'children' => array (
174
+ new bpfwpSchemaField( array(
175
+ 'slug' => 'text',
176
+ 'name' => 'Text',
177
+ 'input' => 'text',
178
+ 'recommended' => true,
179
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'text', $this->slug, 'recipeInstructions', 'howToStep' )
180
+ ) ),
181
+ )
182
+ ) ),
183
+ )
184
+ ) ),
185
+ new bpfwpSchemaField( array(
186
+ 'slug' => 'aggregateRating',
187
+ 'name' => 'Aggregate Rating',
188
+ 'type' => 'AggregateRating',
189
+ 'input' => 'SchemaField',
190
+ 'children' => array (
191
+ new bpfwpSchemaField( array(
192
+ 'slug' => 'ratingValue',
193
+ 'name' => 'Rating',
194
+ 'input' => 'text',
195
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'ratingValue', $this->slug, 'aggregateRating' )
196
+ ) ),
197
+ new bpfwpSchemaField( array(
198
+ 'slug' => 'ratingCount',
199
+ 'name' => 'Rating Count',
200
+ 'input' => 'text',
201
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'ratingCount', $this->slug, 'aggregateRating' )
202
+ ) ),
203
+ )
204
+ ) ),
205
+ );
206
+
207
+ $this->fields = apply_filters( 'bpfwp_schema_fields', $fields, $this->slug );
208
+ }
209
+
210
+
211
+ /**
212
+ * Load the schema's child classes
213
+ *
214
+ * @since 2.0.0
215
+ * @access public
216
+ * @return void
217
+ */
218
+ public function initialize_children( $depth ) {
219
+ $depth--;
220
+
221
+ $child_classes = array ();
222
+
223
+ foreach ( $child_classes as $slug => $name ) {
224
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
225
+
226
+ $class_name = 'bpfwpSchema' . $name;
227
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
228
+ }
229
+ }
230
+
231
+ }
232
+ endif;
includes/schemas/class-schema-recyclingcenter.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Recycling Center as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaRecyclingCenter' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-localbusiness.php';
15
+
16
+ /**
17
+ * Recycling Center schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaRecyclingCenter extends bpfwpSchemaLocalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'RecyclingCenter';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Recycling Center';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-researchproject.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Research Project as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaResearchProject' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-project.php';
15
+
16
+ /**
17
+ * Research Project schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaResearchProject extends bpfwpSchemaProject {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'ResearchProject';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Research Project';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-resort.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Resort as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaResort' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-lodgingbusiness.php';
15
+
16
+ /**
17
+ * Resort schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaResort extends bpfwpSchemaLodgingBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Resort';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Resort';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-restaurant.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Restaurant as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaRestaurant' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-foodestablishment.php';
15
+
16
+ /**
17
+ * Restaurant schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaRestaurant extends bpfwpSchemaFoodEstablishment {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Restaurant';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Restaurant';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-reviewsnippet.php ADDED
@@ -0,0 +1,191 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Review Snippet as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaReviewSnippet' ) ) :
14
+
15
+ /**
16
+ * Review Snippet schema for Business Profile
17
+ *
18
+ * @since 2.0.0
19
+ */
20
+ class bpfwpSchemaReviewSnippet extends bpfwpSchema {
21
+
22
+ /**
23
+ * The name used by Schema.org
24
+ *
25
+ * @since 2.0.0
26
+ * @access public
27
+ * @var string
28
+ */
29
+ public $slug = 'ReviewSnippet';
30
+
31
+ /**
32
+ * The display name for this schema
33
+ *
34
+ * @since 2.0.0
35
+ * @access public
36
+ * @var string
37
+ */
38
+ public $name = 'Review Snippet';
39
+
40
+
41
+ /**
42
+ * Load the schema's default fields
43
+ *
44
+ * @since 2.0.0
45
+ * @access public
46
+ * @return void
47
+ */
48
+ public function set_fields() {
49
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-field.php';
50
+
51
+ $fields = array(
52
+ new bpfwpSchemaField( array(
53
+ 'slug' => 'itemReviewed',
54
+ 'name' => 'Item Reviewed',
55
+ 'type' => 'Thing',
56
+ 'input' => 'SchemaField',
57
+ 'children' => array (
58
+ new bpfwpSchemaField( array(
59
+ 'slug' => 'name',
60
+ 'name' => 'Name',
61
+ 'input' => 'text',
62
+ 'recommended' => true,
63
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'name', $this->slug, 'itemReviewed' )
64
+ ) ),
65
+ new bpfwpSchemaField( array(
66
+ 'slug' => 'sameAs',
67
+ 'name' => 'Corresponding URL (sameAs)',
68
+ 'input' => 'text',
69
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'sameAs', $this->slug, 'itemReviewed' )
70
+ ) ),
71
+ new bpfwpSchemaField( array(
72
+ 'slug' => 'image',
73
+ 'name' => 'Image',
74
+ 'input' => 'url',
75
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function bpfwp_get_post_image_url', 'image', $this->slug, 'itemReviewed' )
76
+ ) ),
77
+ new bpfwpSchemaField( array(
78
+ 'slug' => 'priceRange',
79
+ 'name' => 'Price Range',
80
+ 'input' => 'text',
81
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'priceRange', $this->slug, 'itemReviewed' )
82
+ ) ),
83
+ new bpfwpSchemaField( array(
84
+ 'slug' => 'telephone',
85
+ 'name' => 'Telephone',
86
+ 'input' => 'text',
87
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'telephone', $this->slug, 'itemReviewed' )
88
+ ) ),
89
+ new bpfwpSchemaField( array(
90
+ 'slug' => 'address',
91
+ 'name' => 'Address',
92
+ 'type' => 'PostalAddress',
93
+ 'input' => 'SchemaField',
94
+ 'children' => array (
95
+ new bpfwpSchemaField( array(
96
+ 'slug' => 'streetAddress',
97
+ 'name' => 'Street Address',
98
+ 'input' => 'text',
99
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'streetAddress', $this->slug, 'itemReviewed', 'address' )
100
+ ) ),
101
+ new bpfwpSchemaField( array(
102
+ 'slug' => 'addressLocality',
103
+ 'name' => 'Location (City, Province)',
104
+ 'input' => 'text',
105
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'addressLocality', $this->slug, 'itemReviewed', 'address' )
106
+ ) ),
107
+ new bpfwpSchemaField( array(
108
+ 'slug' => 'postalCode',
109
+ 'name' => 'Postal/Zip Code',
110
+ 'input' => 'text',
111
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'postalCode', $this->slug, 'itemReviewed', 'address' )
112
+ ) ),
113
+ new bpfwpSchemaField( array(
114
+ 'slug' => 'addressRegion',
115
+ 'name' => 'Address Region',
116
+ 'input' => 'text',
117
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'addressRegion', $this->slug, 'itemReviewed', 'address' )
118
+ ) ),
119
+ new bpfwpSchemaField( array(
120
+ 'slug' => 'addressCountry',
121
+ 'name' => 'Address Country',
122
+ 'input' => 'text',
123
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'addressCountry', $this->slug, 'itemReviewed', 'address' )
124
+ ) ),
125
+ )
126
+ ) ),
127
+ )
128
+ ) ),
129
+ new bpfwpSchemaField( array(
130
+ 'slug' => 'reviewRating',
131
+ 'name' => 'Rating',
132
+ 'type' => 'Rating',
133
+ 'input' => 'SchemaField',
134
+ 'children' => array (
135
+ new bpfwpSchemaField( array(
136
+ 'slug' => 'ratingValue',
137
+ 'name' => 'User Rating',
138
+ 'input' => 'text',
139
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'ratingValue', $this->slug, 'reviewRating' )
140
+ ) ),
141
+ )
142
+ ) ),
143
+ new bpfwpSchemaField( array(
144
+ 'slug' => 'author',
145
+ 'name' => 'Author',
146
+ 'type' => 'Person',
147
+ 'input' => 'SchemaField',
148
+ 'children' => array (
149
+ new bpfwpSchemaField( array(
150
+ 'slug' => 'name',
151
+ 'name' => 'Name',
152
+ 'input' => 'text',
153
+ 'recommended' => true,
154
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_author', 'name', $this->slug, 'author' )
155
+ ) ),
156
+ )
157
+ ) ),
158
+ new bpfwpSchemaField( array(
159
+ 'slug' => 'name',
160
+ 'name' => 'Name',
161
+ 'input' => 'text',
162
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_title', 'name', $this->slug )
163
+ ) ),
164
+ );
165
+
166
+ $this->fields = apply_filters( 'bpfwp_schema_fields', $fields, $this->slug );
167
+ }
168
+
169
+
170
+ /**
171
+ * Load the schema's child classes
172
+ *
173
+ * @since 2.0.0
174
+ * @access public
175
+ * @return void
176
+ */
177
+ public function initialize_children( $depth ) {
178
+ $depth--;
179
+
180
+ $child_classes = array ();
181
+
182
+ foreach ( $child_classes as $slug => $name ) {
183
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
184
+
185
+ $class_name = 'bpfwpSchema' . $name;
186
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
187
+ }
188
+ }
189
+
190
+ }
191
+ endif;
includes/schemas/class-schema-roofingcontractor.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Roofing Contractor as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaRoofingContractor' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-homeandconstructionbusiness.php';
15
+
16
+ /**
17
+ * Roofing Contractor schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaRoofingContractor extends bpfwpSchemaHomeAndConstructionBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'RoofingContractor';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Roofing Contractor';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-school.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a School as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaSchool' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-educationalorganization.php';
15
+
16
+ /**
17
+ * School schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaSchool extends bpfwpSchemaEducationalOrganization {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'School';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'School';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-selfstorage.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for Self Storage as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaSelfStorage' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-localbusiness.php';
15
+
16
+ /**
17
+ * Self Storage schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaSelfStorage extends bpfwpSchemaLocalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'SelfStorage';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Self Storage';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-shoestore.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Shoe Store as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaShoeStore' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-store.php';
15
+
16
+ /**
17
+ * Shoe Store schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaShoeStore extends bpfwpSchemaStore {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'ShoeStore';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Shoe Store';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-shoppingcenter.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Shopping Center as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaShoppingCenter' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-localbusiness.php';
15
+
16
+ /**
17
+ * Shopping Center schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaShoppingCenter extends bpfwpSchemaLocalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'ShoppingCenter';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Shopping Center';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-sitelinkssearchbox.php ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Sitelinks Searchbox as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaSitelinksSearchbox' ) ) :
14
+
15
+ /**
16
+ * Sitelinks Searchbox schema for Business Profile
17
+ *
18
+ * @since 2.0.0
19
+ */
20
+ class bpfwpSchemaSitelinksSearchbox extends bpfwpSchema {
21
+
22
+ /**
23
+ * The name used by Schema.org
24
+ *
25
+ * @since 2.0.0
26
+ * @access public
27
+ * @var string
28
+ */
29
+ public $slug = 'SitelinksSearchbox';
30
+
31
+ /**
32
+ * The display name for this schema
33
+ *
34
+ * @since 2.0.0
35
+ * @access public
36
+ * @var string
37
+ */
38
+ public $name = 'Sitelinks Searchbox';
39
+
40
+
41
+ /**
42
+ * Load the schema's default fields
43
+ *
44
+ * @since 2.0.0
45
+ * @access public
46
+ * @return void
47
+ */
48
+ public function set_fields() {
49
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-field.php';
50
+
51
+ $fields = array(
52
+ new bpfwpSchemaField( array(
53
+ 'slug' => 'url',
54
+ 'name' => 'URL',
55
+ 'input' => 'url',
56
+ 'recommended' => true,
57
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'url', $this->slug )
58
+ ) ),
59
+ new bpfwpSchemaField( array(
60
+ 'slug' => 'potentialAction',
61
+ 'name' => 'Potential Action',
62
+ 'type' => 'SearchAction',
63
+ 'input' => 'SchemaField',
64
+ 'children' => array (
65
+ new bpfwpSchemaField( array(
66
+ 'slug' => 'target',
67
+ 'name' => 'Target',
68
+ 'input' => 'text',
69
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'target', $this->slug, 'potentialAction' )
70
+ ) ),
71
+ new bpfwpSchemaField( array(
72
+ 'slug' => 'query-input',
73
+ 'name' => 'Query Input',
74
+ 'input' => 'text',
75
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'query-input', $this->slug, 'potentialAction' )
76
+ ) )
77
+ )
78
+ ) ),
79
+ );
80
+
81
+ $this->fields = apply_filters( 'bpfwp_schema_fields', $fields, $this->slug );
82
+ }
83
+
84
+
85
+ /**
86
+ * Load the schema's child classes
87
+ *
88
+ * @since 2.0.0
89
+ * @access public
90
+ * @return void
91
+ */
92
+ public function initialize_children( $depth ) {
93
+ $depth--;
94
+
95
+ $child_classes = array ();
96
+
97
+ foreach ( $child_classes as $slug => $name ) {
98
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
99
+
100
+ $class_name = 'bpfwpSchema' . $name;
101
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
102
+ }
103
+ }
104
+
105
+ }
106
+ endif;
includes/schemas/class-schema-skiresort.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Ski Resort as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaSkiResort' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-sportsactivitylocation.php';
15
+
16
+ /**
17
+ * Ski Resort schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaSkiResort extends bpfwpSchemaSportsActivityLocation {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'SkiResort';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Ski Resort';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-softwareapp.php ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Software App as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaSoftwareApp' ) ) :
14
+
15
+ /**
16
+ * Software App schema for Business Profile
17
+ *
18
+ * @since 2.0.0
19
+ */
20
+ class bpfwpSchemaSoftwareApp extends bpfwpSchema {
21
+
22
+ /**
23
+ * The name used by Schema.org
24
+ *
25
+ * @since 2.0.0
26
+ * @access public
27
+ * @var string
28
+ */
29
+ public $slug = 'SoftwareApp';
30
+
31
+ /**
32
+ * The display name for this schema
33
+ *
34
+ * @since 2.0.0
35
+ * @access public
36
+ * @var string
37
+ */
38
+ public $name = 'Software App';
39
+
40
+
41
+ /**
42
+ * Load the schema's default fields
43
+ *
44
+ * @since 2.0.0
45
+ * @access public
46
+ * @return void
47
+ */
48
+ public function set_fields() {
49
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-field.php';
50
+
51
+ $fields = array(
52
+ new bpfwpSchemaField( array(
53
+ 'slug' => 'name',
54
+ 'name' => 'Name',
55
+ 'input' => 'text',
56
+ 'recommended' => true,
57
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_title', 'name', $this->slug )
58
+ ) ),
59
+ new bpfwpSchemaField( array(
60
+ 'slug' => 'operatingSystem',
61
+ 'name' => 'Operating System',
62
+ 'input' => 'text',
63
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'operatingSystem', $this->slug )
64
+ ) ),
65
+ new bpfwpSchemaField( array(
66
+ 'slug' => 'applicationCategory',
67
+ 'name' => 'Application Category',
68
+ 'input' => 'text',
69
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'applicationCategory', $this->slug )
70
+ ) ),
71
+ new bpfwpSchemaField( array(
72
+ 'slug' => 'aggregateRating',
73
+ 'name' => 'Aggregate Rating',
74
+ 'type' => 'AggregateRating',
75
+ 'input' => 'SchemaField',
76
+ 'children' => array (
77
+ new bpfwpSchemaField( array(
78
+ 'slug' => 'ratingValue',
79
+ 'name' => 'Rating',
80
+ 'input' => 'text',
81
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'ratingValue', $this->slug, 'aggregateRating' )
82
+ ) ),
83
+ new bpfwpSchemaField( array(
84
+ 'slug' => 'ratingCount',
85
+ 'name' => 'Rating Count',
86
+ 'input' => 'text',
87
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'ratingCount', $this->slug, 'aggregateRating' )
88
+ ) ),
89
+ )
90
+ ) ),
91
+ new bpfwpSchemaField( array(
92
+ 'slug' => 'offers',
93
+ 'name' => 'Offers',
94
+ 'type' => 'Offer',
95
+ 'input' => 'SchemaField',
96
+ 'children' => array (
97
+ new bpfwpSchemaField( array(
98
+ 'slug' => 'price',
99
+ 'name' => 'price',
100
+ 'input' => 'text',
101
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'price', $this->slug, 'offers' )
102
+ ) ),
103
+ new bpfwpSchemaField( array(
104
+ 'slug' => 'priceCurrency',
105
+ 'name' => 'Price Currency',
106
+ 'input' => 'text',
107
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'priceCurrency', $this->slug, 'offers' )
108
+ ) ),
109
+ )
110
+ ) ),
111
+ );
112
+
113
+ $this->fields = apply_filters( 'bpfwp_schema_fields', $fields, $this->slug );
114
+ }
115
+
116
+
117
+ /**
118
+ * Load the schema's child classes
119
+ *
120
+ * @since 2.0.0
121
+ * @access public
122
+ * @return void
123
+ */
124
+ public function initialize_children( $depth ) {
125
+ $depth--;
126
+
127
+ $child_classes = array ();
128
+
129
+ foreach ( $child_classes as $slug => $name ) {
130
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
131
+
132
+ $class_name = 'bpfwpSchema' . $name;
133
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
134
+ }
135
+ }
136
+
137
+ }
138
+ endif;
includes/schemas/class-schema-sportinggoodsstore.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Sporting Goods Store as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaSportingGoodsStore' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-store.php';
15
+
16
+ /**
17
+ * Sporting Goods Store schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaSportingGoodsStore extends bpfwpSchemaStore {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'SportingGoodsStore';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Sporting Goods Store';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-sportsactivitylocation.php ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Sports Activity Location as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaSportsActivityLocation' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-localbusiness.php';
15
+
16
+ /**
17
+ * Sports Activity Location schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaSportsActivityLocation extends bpfwpSchemaLocalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'SportsActivityLocation';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Sports Activity Location';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array(
65
+ 'bowlingalley' => 'BowlingAlley',
66
+ 'exercisegym' => 'ExerciseGym',
67
+ 'golfcourse' => 'GolfCourse',
68
+ 'healthclub' => 'HealthClub',
69
+ 'publicswimmingpool' => 'PublicSwimmingPool',
70
+ 'skiresort' => 'SkiResort',
71
+ 'sportsclub' => 'SportsClub',
72
+ 'stadiumorarena' => 'StadiumOrArena',
73
+ 'tenniscomplex' => 'TennisComplex',
74
+ );
75
+
76
+ foreach ( $child_classes as $slug => $name ) {
77
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
78
+
79
+ $class_name = 'bpfwpSchema' . $name;
80
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
81
+ }
82
+ }
83
+
84
+ }
85
+ endif;
includes/schemas/class-schema-sportsclub.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Sports Club as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaSportsClub' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-sportsactivitylocation.php';
15
+
16
+ /**
17
+ * Sports Club schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaSportsClub extends bpfwpSchemaSportsActivityLocation {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'SportsClub';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Sports Club';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-sportsorganization.php ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Sports Organization as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaSportsOrganization' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-organization.php';
15
+
16
+ /**
17
+ * Sports Organization schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaSportsOrganization extends bpfwpSchemaOrganization {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'SportsOrganization';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Sports Organization';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+
52
+ $additional_fields = array(
53
+ new bpfwpSchemaField( array(
54
+ 'slug' => 'sport',
55
+ 'name' => 'Sport',
56
+ 'input' => 'text',
57
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'sport', $this->slug )
58
+ ) ),
59
+ );
60
+
61
+ $fields = apply_filters( 'bpfwp_schema_additional_fields', $additional_fields, $this->slug );
62
+
63
+ array_splice($this->fields, 1, 0, $fields);
64
+ }
65
+
66
+
67
+ /**
68
+ * Load the schema's child classes
69
+ *
70
+ * @since 2.0.0
71
+ * @access public
72
+ * @return void
73
+ */
74
+ public function initialize_children( $depth ) {
75
+ $depth--;
76
+
77
+ $child_classes = array(
78
+ 'sportsteam' => 'SportsTeam',
79
+ );
80
+
81
+ foreach ( $child_classes as $slug => $name ) {
82
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
83
+
84
+ $class_name = 'bpfwpSchema' . $name;
85
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
86
+ }
87
+ }
88
+
89
+ }
90
+ endif;
includes/schemas/class-schema-sportsteam.php ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Sports Team as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaSportsTeam' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-sportsorganization.php';
15
+
16
+ /**
17
+ * Sports Team schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaSportsTeam extends bpfwpSchemaSportsOrganization {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'SportsTeam';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Sports Team';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+
52
+ $additional_fields = array(
53
+ new bpfwpSchemaField( array(
54
+ 'slug' => 'athlete',
55
+ 'name' => 'Athele',
56
+ 'type' => 'Person',
57
+ 'input' => 'SchemaField',
58
+ 'children' => array (
59
+ new bpfwpSchemaField( array(
60
+ 'slug' => 'name',
61
+ 'name' => 'Name',
62
+ 'input' => 'text',
63
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'name', $this->slug, 'ahtlete' )
64
+ ) )
65
+ )
66
+ ) ),
67
+ new bpfwpSchemaField( array(
68
+ 'slug' => 'coach',
69
+ 'name' => 'Coach',
70
+ 'type' => 'Person',
71
+ 'input' => 'SchemaField',
72
+ 'children' => array (
73
+ new bpfwpSchemaField( array(
74
+ 'slug' => 'name',
75
+ 'name' => 'Name',
76
+ 'input' => 'text',
77
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'name', $this->slug, 'coach' )
78
+ ) )
79
+ )
80
+ ) ),
81
+ );
82
+
83
+ $fields = apply_filters( 'bpfwp_schema_additional_fields', $additional_fields, $this->slug );
84
+
85
+ array_splice($this->fields, 1, 0, $fields);
86
+ }
87
+
88
+
89
+ /**
90
+ * Load the schema's child classes
91
+ *
92
+ * @since 2.0.0
93
+ * @access public
94
+ * @return void
95
+ */
96
+ public function initialize_children( $depth ) {
97
+ $depth--;
98
+
99
+ $child_classes = array();
100
+
101
+ foreach ( $child_classes as $slug => $name ) {
102
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
103
+
104
+ $class_name = 'bpfwpSchema' . $name;
105
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
106
+ }
107
+ }
108
+
109
+ }
110
+ endif;
includes/schemas/class-schema-stadiumorarena.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Stadium or Arena as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaStadiumOrArena' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-sportsactivitylocation.php';
15
+
16
+ /**
17
+ * Stadium or Arena schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaStadiumOrArena extends bpfwpSchemaSportsActivityLocation {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'StadiumOrArena';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Stadium or Arena';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-store.php ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Store as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaStore' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-localbusiness.php';
15
+
16
+ /**
17
+ * Store schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaStore extends bpfwpSchemaLocalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Store';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Store';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array(
65
+ 'autopartsstore' => 'AutoPartsStore',
66
+ 'bikestore' => 'BikeStore',
67
+ 'bookstore' => 'BookStore',
68
+ 'clothingstore' => 'ClothingStore',
69
+ 'computerstore' => 'ComputerStore',
70
+ 'conveniencestore' => 'ConvenienceStore',
71
+ 'departmentstore' => 'DepartmentStore',
72
+ 'electronicsstore' => 'ElectronicsStore',
73
+ 'florist' => 'Florist',
74
+ 'furniturestore' => 'FurnitureStore',
75
+ 'gardenstore' => 'GardenStore',
76
+ 'grocerystore' => 'GroceryStore',
77
+ 'hardwarestore' => 'HardwareStore',
78
+ 'hobbyshop' => 'HobbyShop',
79
+ 'homegoodsstore' => 'HomeGoodsStore',
80
+ 'jewelrystore' => 'JewelryStore',
81
+ 'liquorstore' => 'LiquorStore',
82
+ 'mensclothingstore' => 'MensClothingStore',
83
+ 'mobilephonestore' => 'MobilePhoneStore',
84
+ 'movierentalstore' => 'MovieRentalStore',
85
+ 'musicstore' => 'MusicStore',
86
+ 'officeequipmentstore' => 'OfficeEquipmentStore',
87
+ 'outletstore' => 'OutletStore',
88
+ 'pawnshop' => 'PawnShop',
89
+ 'petstore' => 'PetStore',
90
+ 'shoestore' => 'ShoeStore',
91
+ 'sportinggoodsstore' => 'SportingGoodsStore',
92
+ 'tireshop' => 'TireShop',
93
+ 'toystore' => 'ToyStore',
94
+ 'wholesalestore' => 'WholesaleStore',
95
+ );
96
+
97
+ foreach ( $child_classes as $slug => $name ) {
98
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
99
+
100
+ $class_name = 'bpfwpSchema' . $name;
101
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
102
+ }
103
+ }
104
+
105
+ }
106
+ endif;
includes/schemas/class-schema-subscriptionandpaywalledcontent.php ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for Subscription and Paywalled Content as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaSubscriptionAndPaywalledContent' ) ) :
14
+
15
+ /**
16
+ * Subscription and Paywalled Content schema for Business Profile
17
+ *
18
+ * @since 2.0.0
19
+ */
20
+ class bpfwpSchemaSubscriptionAndPaywalledContent extends bpfwpSchema {
21
+
22
+ /**
23
+ * The name used by Schema.org
24
+ *
25
+ * @since 2.0.0
26
+ * @access public
27
+ * @var string
28
+ */
29
+ public $slug = 'SubscriptionAndPaywalledContent';
30
+
31
+ /**
32
+ * The display name for this schema
33
+ *
34
+ * @since 2.0.0
35
+ * @access public
36
+ * @var string
37
+ */
38
+ public $name = 'Subscription and Paywalled Content';
39
+
40
+
41
+ /**
42
+ * Load the schema's default fields
43
+ *
44
+ * @since 2.0.0
45
+ * @access public
46
+ * @return void
47
+ */
48
+ public function set_fields() {
49
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-field.php';
50
+
51
+ $fields = array(
52
+ new bpfwpSchemaField( array(
53
+ 'slug' => 'headline',
54
+ 'name' => 'Headline',
55
+ 'input' => 'text',
56
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_title', 'headline', $this->slug )
57
+ ) ),
58
+ new bpfwpSchemaField( array(
59
+ 'slug' => 'image',
60
+ 'name' => 'Image',
61
+ 'input' => 'url',
62
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function bpfwp_get_post_image_url', 'image', $this->slug )
63
+ ) ),
64
+ new bpfwpSchemaField( array(
65
+ 'slug' => 'datePublished',
66
+ 'name' => 'Date Published',
67
+ 'input' => 'text',
68
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'datePublished', $this->slug )
69
+ ) ),
70
+ new bpfwpSchemaField( array(
71
+ 'slug' => 'dateModified',
72
+ 'name' => 'Date Modified',
73
+ 'input' => 'text',
74
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'dateModified', $this->slug )
75
+ ) ),
76
+ new bpfwpSchemaField( array(
77
+ 'slug' => 'description',
78
+ 'name' => 'Description',
79
+ 'input' => 'text',
80
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_excerpt', 'description', $this->slug )
81
+ ) ),
82
+ new bpfwpSchemaField( array(
83
+ 'slug' => 'isAccessibleForFree',
84
+ 'name' => 'Accessible for Free?',
85
+ 'input' => 'text',
86
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'isAccessibleForFree', $this->slug )
87
+ ) ),
88
+ new bpfwpSchemaField( array(
89
+ 'slug' => 'author',
90
+ 'name' => 'Author',
91
+ 'type' => 'Person',
92
+ 'input' => 'SchemaField',
93
+ 'children' => array (
94
+ new bpfwpSchemaField( array(
95
+ 'slug' => 'name',
96
+ 'name' => 'Name',
97
+ 'input' => 'text',
98
+ 'recommended' => true,
99
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_author', 'name', $this->slug, 'author' )
100
+ ) ),
101
+ )
102
+ ) ),
103
+ new bpfwpSchemaField( array(
104
+ 'slug' => 'publisher',
105
+ 'name' => 'Publisher',
106
+ 'type' => 'Organization',
107
+ 'input' => 'SchemaField',
108
+ 'children' => array (
109
+ new bpfwpSchemaField( array(
110
+ 'slug' => 'name',
111
+ 'name' => 'Name',
112
+ 'input' => 'text',
113
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'name', $this->slug, 'publisher' )
114
+ ) ),
115
+ new bpfwpSchemaField( array(
116
+ 'slug' => 'logo',
117
+ 'name' => 'Logo',
118
+ 'input' => 'url',
119
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'logo', $this->slug, 'publisher' )
120
+ ) ),
121
+ )
122
+ ) ),
123
+ );
124
+
125
+ $this->fields = apply_filters( 'bpfwp_schema_fields', $fields, $this->slug );
126
+ }
127
+
128
+
129
+ /**
130
+ * Load the schema's child classes
131
+ *
132
+ * @since 2.0.0
133
+ * @access public
134
+ * @return void
135
+ */
136
+ public function initialize_children( $depth ) {
137
+ $depth--;
138
+
139
+ $child_classes = array ();
140
+
141
+ foreach ( $child_classes as $slug => $name ) {
142
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
143
+
144
+ $class_name = 'bpfwpSchema' . $name;
145
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
146
+ }
147
+ }
148
+
149
+ }
150
+ endif;
includes/schemas/class-schema-tattooparlor.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Tattoo Parlor as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaTattooParlor' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-healthandbeautybusiness.php';
15
+
16
+ /**
17
+ * Tattoo Parlor schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaTattooParlor extends bpfwpSchemaHealthAndBeautyBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'TattooParlor';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Tattoo Parlor';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-televisionstation.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Television Station as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaTelevisionStation' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-localbusiness.php';
15
+
16
+ /**
17
+ * Television Station schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaTelevisionStation extends bpfwpSchemaLocalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'TelevisionStation';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Television Station';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-tenniscomplex.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Tennis Complex as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaTennisComplex' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-sportsactivitylocation.php';
15
+
16
+ /**
17
+ * Tennis Complex schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaTennisComplex extends bpfwpSchemaSportsActivityLocation {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'TennisComplex';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Tennis Complex';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-theatergroup.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Theater Group as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaTheaterGroup' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-performinggroup.php';
15
+
16
+ /**
17
+ * Theater Group schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaTheaterGroup extends bpfwpSchemaPerformingGroup {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'TheaterGroup';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Theater Group';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-tireshop.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Tire Shop as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaTireShop' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-store.php';
15
+
16
+ /**
17
+ * Tire Shop schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaTireShop extends bpfwpSchemaStore {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'TireShop';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Tire Shop';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-touristinformationcenter.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Tourist Information Center as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaTouristInformationCenter' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-localbusiness.php';
15
+
16
+ /**
17
+ * Tourist Information Center schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaTouristInformationCenter extends bpfwpSchemaLocalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'TouristInformationCenter';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Tourist Information Center';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-toystore.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Toy Store as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaToyStore' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-store.php';
15
+
16
+ /**
17
+ * Toy Store schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaToyStore extends bpfwpSchemaStore {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'ToyStore';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Toy Store';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-travelagency.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Travel Agency as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaTravelAgency' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-localbusiness.php';
15
+
16
+ /**
17
+ * Travel Agency schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaTravelAgency extends bpfwpSchemaLocalBusiness {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'TravelAgency';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Travel Agency';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-veterinarycare.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Veterinary Care as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaVeterinaryCare' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-medicalorganization.php';
15
+
16
+ /**
17
+ * Veterinary Care schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaVeterinaryCare extends bpfwpSchemaMedicalOrganization {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'VeterinaryCare';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Veterinary Care';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-video.php ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Video as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaVideo' ) ) :
14
+
15
+ /**
16
+ * Video schema for Business Profile
17
+ *
18
+ * @since 2.0.0
19
+ */
20
+ class bpfwpSchemaVideo extends bpfwpSchema {
21
+
22
+ /**
23
+ * The name used by Schema.org
24
+ *
25
+ * @since 2.0.0
26
+ * @access public
27
+ * @var string
28
+ */
29
+ public $slug = 'Video';
30
+
31
+ /**
32
+ * The display name for this schema
33
+ *
34
+ * @since 2.0.0
35
+ * @access public
36
+ * @var string
37
+ */
38
+ public $name = 'Video';
39
+
40
+
41
+ /**
42
+ * Load the schema's default fields
43
+ *
44
+ * @since 2.0.0
45
+ * @access public
46
+ * @return void
47
+ */
48
+ public function set_fields() {
49
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-field.php';
50
+
51
+ $fields = array(
52
+ new bpfwpSchemaField( array(
53
+ 'slug' => 'name',
54
+ 'name' => 'Name',
55
+ 'input' => 'text',
56
+ 'recommended' => true,
57
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_title', 'name', $this->slug )
58
+ ) ),
59
+ new bpfwpSchemaField( array(
60
+ 'slug' => 'thumbnailUrl',
61
+ 'name' => 'Thumbnail URL',
62
+ 'input' => 'url',
63
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'thumbnailUrl', $this->slug )
64
+ ) ),
65
+ new bpfwpSchemaField( array(
66
+ 'slug' => 'description',
67
+ 'name' => 'Description',
68
+ 'input' => 'text',
69
+ 'recommended' => true,
70
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', 'function get_the_excerpt', 'description', $this->slug )
71
+ ) ),
72
+ new bpfwpSchemaField( array(
73
+ 'slug' => 'uploadDate',
74
+ 'name' => 'Upload Date',
75
+ 'input' => 'text',
76
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'uploadDate', $this->slug )
77
+ ) ),
78
+ new bpfwpSchemaField( array(
79
+ 'slug' => 'duration',
80
+ 'name' => 'Duration',
81
+ 'input' => 'text',
82
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'duration', $this->slug )
83
+ ) ),
84
+ new bpfwpSchemaField( array(
85
+ 'slug' => 'contentUrl',
86
+ 'name' => 'Content URL',
87
+ 'input' => 'url',
88
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'contentUrl', $this->slug )
89
+ ) ),
90
+ new bpfwpSchemaField( array(
91
+ 'slug' => 'embedUrl',
92
+ 'name' => 'Embed URL',
93
+ 'input' => 'url',
94
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'embedUrl', $this->slug )
95
+ ) ),
96
+ new bpfwpSchemaField( array(
97
+ 'slug' => 'interactionStatistic',
98
+ 'name' => 'Interaction Statistic',
99
+ 'type' => 'InteractionCounter',
100
+ 'input' => 'SchemaField',
101
+ 'children' => array (
102
+ new bpfwpSchemaField( array(
103
+ 'slug' => 'interactionType',
104
+ 'name' => 'Interaction Type',
105
+ 'input' => 'text',
106
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'interactionType', $this->slug, 'interactionStatistic' )
107
+ ) ),
108
+ new bpfwpSchemaField( array(
109
+ 'slug' => 'userInteractionCount',
110
+ 'name' => 'User Interaction Count',
111
+ 'input' => 'text',
112
+ 'callback' => apply_filters( 'bpfwp_schema_field_callback', null, 'userInteractionCount', $this->slug, 'interactionStatistic' )
113
+ ) ),
114
+ )
115
+ ) ),
116
+ );
117
+
118
+ $this->fields = apply_filters( 'bpfwp_schema_fields', $fields, $this->slug );
119
+ }
120
+
121
+
122
+ /**
123
+ * Load the schema's child classes
124
+ *
125
+ * @since 2.0.0
126
+ * @access public
127
+ * @return void
128
+ */
129
+ public function initialize_children( $depth ) {
130
+ $depth--;
131
+
132
+ $child_classes = array ();
133
+
134
+ foreach ( $child_classes as $slug => $name ) {
135
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
136
+
137
+ $class_name = 'bpfwpSchema' . $name;
138
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
139
+ }
140
+ }
141
+
142
+ }
143
+ endif;
includes/schemas/class-schema-wholesalestore.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Wholesale Store as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaWholesaleStore' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-store.php';
15
+
16
+ /**
17
+ * Wholesale Store schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaWholesaleStore extends bpfwpSchemaStore {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'WholesaleStore';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Wholesale Store';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-winery.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Winery as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaWinery' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-foodestablishment.php';
15
+
16
+ /**
17
+ * Winery schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaWinery extends bpfwpSchemaFoodEstablishment {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'Winery';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Winery';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema-workersunion.php ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema for a Workers Union as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchemaWorkersUnion' ) ) :
14
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-organization.php';
15
+
16
+ /**
17
+ * Workers Union schema for Business Profile
18
+ *
19
+ * @since 2.0.0
20
+ */
21
+ class bpfwpSchemaWorkersUnion extends bpfwpSchemaOrganization {
22
+
23
+ /**
24
+ * The name used by Schema.org
25
+ *
26
+ * @since 2.0.0
27
+ * @access public
28
+ * @var string
29
+ */
30
+ public $slug = 'WorkersUnion';
31
+
32
+ /**
33
+ * The display name for this schema
34
+ *
35
+ * @since 2.0.0
36
+ * @access public
37
+ * @var string
38
+ */
39
+ public $name = 'Workers Union';
40
+
41
+
42
+ /**
43
+ * Load the schema's default fields
44
+ *
45
+ * @since 2.0.0
46
+ * @access public
47
+ * @return void
48
+ */
49
+ public function set_fields() {
50
+ parent::set_fields();
51
+ }
52
+
53
+
54
+ /**
55
+ * Load the schema's child classes
56
+ *
57
+ * @since 2.0.0
58
+ * @access public
59
+ * @return void
60
+ */
61
+ public function initialize_children( $depth ) {
62
+ $depth--;
63
+
64
+ $child_classes = array();
65
+
66
+ foreach ( $child_classes as $slug => $name ) {
67
+ require_once BPFWP_PLUGIN_DIR . '/includes/schemas/class-schema-' . $slug . '.php';
68
+
69
+ $class_name = 'bpfwpSchema' . $name;
70
+ $this->children[$slug] = new $class_name( array( 'depth' => $depth ) );
71
+ }
72
+ }
73
+
74
+ }
75
+ endif;
includes/schemas/class-schema.php ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Create a schema as listed on schema.org.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2019, Five Star Plugins
7
+ * @license GPL-2.0+
8
+ * @since 2.0.0
9
+ */
10
+
11
+ defined( 'ABSPATH' ) || exit;
12
+
13
+ if ( ! class_exists( 'bpfwpSchema' ) ) :
14
+
15
+ /**
16
+ * Base class for creating schemas for Business Profile
17
+ *
18
+ * @since 2.0.0
19
+ */
20
+ abstract class bpfwpSchema {
21
+
22
+ /**
23
+ * The name used by Schema.org
24
+ *
25
+ * @since 2.0.0
26
+ * @access public
27
+ * @var string
28
+ */
29
+ public $slug = '';
30
+
31
+ /**
32
+ * The display name for this schema
33
+ *
34
+ * @since 2.0.0
35
+ * @access public
36
+ * @var string
37
+ */
38
+ public $name = '';
39
+
40
+ /**
41
+ * The @type property for this schema, if different from slug
42
+ *
43
+ * @since 2.0.0
44
+ * @access public
45
+ * @var string
46
+ */
47
+ public $type = '';
48
+
49
+ /**
50
+ * Fields that can be filled in for this class
51
+ *
52
+ * @since 2.0.0
53
+ * @access public
54
+ * @var array
55
+ */
56
+ public $fields = array();
57
+
58
+ /**
59
+ * Children of this class
60
+ *
61
+ * @since 2.0.0
62
+ * @access public
63
+ * @var array
64
+ */
65
+ public $children = array();
66
+
67
+ /**
68
+ * Initialize the class and recursively initialize child classes.
69
+ *
70
+ * @since 2.0.0
71
+ * @access public
72
+ * @return void
73
+ */
74
+ public function __construct( $args = array( 'depth' => 10 ) ) {
75
+
76
+ $this->set_fields();
77
+ if ( $args['depth'] > 0 ) { $this->initialize_children( $args['depth'] ); }
78
+ }
79
+
80
+ /**
81
+ * Load the schema's default fields, must be set in the child class
82
+ *
83
+ * @since 2.0.0
84
+ * @access public
85
+ * @return void
86
+ */
87
+ abstract public function set_fields();
88
+
89
+
90
+ /**
91
+ * Load the schema's child classes, must be set in the child class
92
+ *
93
+ * @since 2.0.0
94
+ * @access public
95
+ * @return void
96
+ */
97
+ abstract public function initialize_children( $depth );
98
+
99
+ }
100
+ endif;
includes/template-functions.php CHANGED
@@ -1,620 +1,620 @@
1
- <?php
2
- /**
3
- * Template functions for rendering contact cards.
4
- *
5
- * @package BusinessProfile
6
- * @copyright Copyright (c) 2016, Theme of the Crop
7
- * @license GPL-2.0+
8
- * @since 0.0.1
9
- */
10
-
11
- if ( ! function_exists( 'bpfwp_setting' ) ) {
12
- /**
13
- * Retrieve the value of any stored setting
14
- *
15
- * A wrapper for $bpfw_controller->settings->get_setting() that should be
16
- * used to access any data for the global location or one of the location
17
- * custom posts.
18
- *
19
- * @since 1.1
20
- * @access public
21
- * @param string $setting The setting to retrieve.
22
- * @param string $location The location associated with the setting.
23
- * @return mixed A setting based on the key provided.
24
- */
25
- function bpfwp_setting( $setting, $location = false ) {
26
- global $bpfwp_controller;
27
- return $bpfwp_controller->settings->get_setting( $setting, $location );
28
- }
29
- }
30
-
31
- if ( ! function_exists( 'bpfwp_get_display' ) ) {
32
- /**
33
- * A helper function to check if a setting should be displayed visually or
34
- * added as metadata
35
- *
36
- * @since 1.1
37
- * @access public
38
- * @param string $setting The setting to retrieve.
39
- * @return mixed A setting based on the key provided.
40
- */
41
- function bpfwp_get_display( $setting ) {
42
-
43
- global $bpfwp_controller;
44
-
45
- if ( empty( $bpfwp_controller->display_settings ) ) {
46
- $bpfwp_controller->display_settings = $bpfwp_controller->settings->get_default_display_settings();
47
- }
48
-
49
- return isset( $bpfwp_controller->display_settings[ $setting ] ) ? $bpfwp_controller->display_settings[ $setting ] : false;
50
- }
51
- }
52
-
53
- if ( ! function_exists( 'bpfwp_set_display' ) ) {
54
- /**
55
- * A helper function to set a setting's visibility on the fly
56
- *
57
- * These visibility flags are usually set when the shortcode or widget is
58
- * loaded, or bpwfwp_print_contact_card() is called. This helper function
59
- * makes it easy to set a flag if you're building your own template.
60
- *
61
- * @since 1.1
62
- * @access public
63
- * @param string $setting The setting to be changed.
64
- * @param string $value The setting value to be used.
65
- * @return void
66
- */
67
- function bpfwp_set_display( $setting, $value ) {
68
-
69
- global $bpfwp_controller;
70
-
71
- if ( empty( $bpfwp_controller->display_settings ) ) {
72
- $bpfwp_controller->display_settings = $bpfwp_controller->settings->get_default_display_settings();
73
- }
74
-
75
- $bpfwp_controller->display_settings[ $setting ] = $value;
76
- }
77
- }
78
-
79
- if ( ! function_exists( 'bpwfwp_print_contact_card' ) ) {
80
- /**
81
- * Print a contact card and add a shortcode.
82
- *
83
- * @since 0.0.1
84
- * @access public
85
- * @param array $args Options for outputting the contact card.
86
- * @return string Markup for displaying a contact card.
87
- */
88
- function bpwfwp_print_contact_card( $args = array() ) {
89
-
90
- global $bpfwp_controller;
91
-
92
- // Define shortcode attributes.
93
- $bpfwp_controller->display_settings = shortcode_atts(
94
- $bpfwp_controller->settings->get_default_display_settings(),
95
- $args,
96
- 'contact-card'
97
- );
98
-
99
- // Check if location is allowed to be viewed
100
- $location_id = bpfwp_get_display( 'location' );
101
- if ( $location_id && !current_user_can( 'edit_location', $location_id ) && get_post_status( $location_id ) !== 'publish' ) {
102
- return apply_filters( 'bpwfwp_protected_contact_card_output', '' );
103
- }
104
-
105
- // Setup components and callback functions to render them.
106
- $data = apply_filters(
107
- 'bpwfwp_component_callbacks',
108
- array(
109
- 'name' => 'bpwfwp_print_name',
110
- 'address' => 'bpwfwp_print_address',
111
- 'phone' => 'bpwfwp_print_phone',
112
- 'contact' => 'bpwfwp_print_contact',
113
- 'opening_hours' => 'bpwfwp_print_opening_hours',
114
- 'map' => 'bpwfwp_print_map',
115
- 'parent_organization' => 'bpfwp_print_parent_organization',
116
- )
117
- );
118
-
119
- if ( ! $bpfwp_controller->get_theme_support( 'disable_styles' ) ) {
120
- /**
121
- * Filter to override whether the frontend stylesheets are loaded.
122
- *
123
- * This is deprecated in favor of add_theme_support(). To prevent
124
- * styles from being loaded, add the following to your theme:
125
- *
126
- * add_theme_support( 'business-profile', array( 'disable_styles' => true ) );
127
- */
128
- if ( apply_filters( 'bpfwp-load-frontend-assets', true ) ) {
129
- wp_enqueue_style( 'dashicons' );
130
- wp_enqueue_style( 'bpfwp-default' );
131
- }
132
- }
133
-
134
- ob_start();
135
- $template = new bpfwpTemplateLoader;
136
- $template->set_template_data( $data );
137
-
138
- if ( bpfwp_get_display( 'location' ) ) {
139
- $template->get_template_part( 'contact-card', bpfwp_get_display( 'location' ) );
140
- } else {
141
- $template->get_template_part( 'contact-card' );
142
- }
143
-
144
- $output = ob_get_clean();
145
-
146
- // Reset display settings.
147
- $bpfwp_controller->display_settings = $bpfwp_controller->settings->get_default_display_settings();
148
-
149
- return apply_filters( 'bpwfwp_contact_card_output', $output );
150
- }
151
-
152
- if ( ! shortcode_exists( 'contact-card' ) ) {
153
- add_shortcode( 'contact-card', 'bpwfwp_print_contact_card' );
154
- }
155
- }
156
-
157
- if ( ! function_exists( 'bpwfwp_print_name' ) ) {
158
- /**
159
- * Print the name.
160
- *
161
- * @since 0.0.1
162
- * @access public
163
- * @param string $location The location associated with the name.
164
- * @return void
165
- */
166
- function bpwfwp_print_name( $location = false ) {
167
-
168
- if ( bpfwp_get_display( 'show_name' ) ) :
169
- ?>
170
- <div class="bp-name" itemprop="name">
171
- <?php echo esc_attr( bpfwp_setting( 'name', $location ) ); ?>
172
- </div>
173
-
174
- <?php else : ?>
175
- <meta itemprop="name" content="<?php echo esc_attr( bpfwp_setting( 'name', $location ) ); ?>">
176
-
177
- <?php endif; ?>
178
-
179
- <?php if ( empty( $location ) ) : ?>
180
- <meta itemprop="description" content="<?php echo esc_attr( get_bloginfo( 'description' ) ) ?>">
181
- <meta itemprop="url" content="<?php echo esc_url( get_bloginfo( 'url' ) ); ?>">
182
-
183
- <?php else : ?>
184
- <meta itemprop="url" content="<?php echo esc_url( get_permalink( $location ) ); ?>">
185
-
186
- <?php endif;
187
- }
188
- }
189
-
190
- if ( ! function_exists( 'bpwfwp_print_address' ) ) {
191
- /**
192
- * Print the address with a get directions link to Google Maps.
193
- *
194
- * @since 0.0.1
195
- * @access public
196
- * @param string $location The location associated with the address.
197
- * @return string|void Returns an empty string if no address exists.
198
- */
199
- function bpwfwp_print_address( $location = false ) {
200
-
201
- $address = bpfwp_setting( 'address', $location );
202
-
203
- if ( empty( $address['text'] ) ) {
204
- return '';
205
- }
206
- ?>
207
-
208
- <meta itemprop="address" content="<?php echo esc_attr( $address['text'] ); ?>">
209
-
210
- <?php if ( bpfwp_get_display( 'show_address' ) ) : ?>
211
- <div class="bp-address">
212
- <?php echo nl2br( $address['text'] ); ?>
213
- </div>
214
- <?php endif; ?>
215
-
216
- <?php if ( bpfwp_get_display( 'show_get_directions' ) ) : ?>
217
- <div class="bp-directions">
218
- <a href="//maps.google.com/maps?saddr=current+location&daddr=<?php echo urlencode( esc_attr( $address['text'] ) ); ?>" target="_blank"><?php _e( 'Get directions', 'business-profile' ); ?></a>
219
- </div>
220
- <?php endif;
221
-
222
- }
223
- }
224
-
225
- if ( ! function_exists( 'bpwfwp_print_phone' ) ) {
226
- /**
227
- * Print the phone number.
228
- *
229
- * @since 0.0.1
230
- * @access public
231
- * @param string $location The location associated with the phone.
232
- * @return string|void Returns an empty string if no phone exists.
233
- */
234
- function bpwfwp_print_phone( $location = false ) {
235
-
236
- $phone = bpfwp_setting( 'phone', $location );
237
-
238
- if ( empty( $phone ) ) {
239
- return '';
240
- }
241
-
242
- if ( bpfwp_get_display( 'show_phone' ) ) :
243
- ?>
244
-
245
- <div class="bp-phone" itemprop="telephone">
246
- <?php echo bpfwp_setting( 'phone', $location ); ?>
247
- </div>
248
-
249
- <?php else : ?>
250
- <meta itemprop="telephone" content="<?php echo esc_attr( bpfwp_setting( 'phone', $location ) ); ?>">
251
-
252
- <?php endif;
253
- }
254
- }
255
-
256
- if ( ! function_exists( 'bpwfwp_print_contact' ) ) {
257
- /**
258
- * Print the contact link.
259
- *
260
- * @since 0.0.1
261
- * @access public
262
- * @param string $location The location associated with the contact.
263
- * @return string|void Returns an empty string if no contact exists.
264
- */
265
- function bpwfwp_print_contact( $location = false ) {
266
-
267
- $email = bpfwp_setting( 'contact-email', $location );
268
- if ( ! empty( $email ) ) :
269
- $antispam_email = antispambot( $email );
270
-
271
- if ( ! bpfwp_get_display( 'show_contact' ) ) :
272
- ?>
273
- <meta itemprop="email" content="<?php echo esc_attr( $antispam_email ); ?>">
274
-
275
- <?php else : ?>
276
-
277
- <div class="bp-contact bp-contact-email" itemprop="email" content="<?php echo esc_attr( $antispam_email ); ?>">
278
- <a href="mailto:<?php echo esc_attr( $antispam_email ); ?>"><?php echo $antispam_email; ?></a>
279
- </div>
280
-
281
- <?php endif; ?>
282
-
283
- <?php
284
- return;
285
- endif;
286
-
287
- $contact = bpfwp_setting( 'contact-page', $location );
288
- if ( ! empty( $contact ) && bpfwp_get_display( 'show_contact' ) ) :
289
- ?>
290
-
291
- <div class="bp-contact bp-contact-page" itemprop="ContactPoint" itemscope itemtype="http://schema.org/ContactPoint">
292
- <meta itemprop="contactType" content="customer support">
293
- <a href="<?php echo get_permalink( $contact ); ?>" itemprop="url" content="<?php echo esc_attr( get_permalink( $contact ) ); ?>"><?php _e( 'Contact', 'business-profile' ); ?></a>
294
- </div>
295
-
296
- <?php endif;
297
- }
298
- }
299
-
300
- if ( ! function_exists( 'bpwfwp_print_opening_hours' ) ) {
301
- /**
302
- * Print the opening hours.
303
- *
304
- * @since 0.0.1
305
- * @access public
306
- * @param string $location The location associated with the hours.
307
- * @return string|void Returns an empty string if no hours exist.
308
- */
309
- function bpwfwp_print_opening_hours( $location = false ) {
310
-
311
- $hours = bpfwp_setting( 'opening-hours', $location );
312
-
313
- if ( empty( $hours ) ) {
314
- return '';
315
- }
316
-
317
- // Print the metatags with proper schema formatting.
318
- bpfwp_print_opening_hours_metatag( $hours );
319
-
320
- if ( ! bpfwp_get_display( 'show_opening_hours' ) ) {
321
- return;
322
- }
323
-
324
- // Output display format.
325
- if ( bpfwp_get_display( 'show_opening_hours_brief' ) ) :
326
- ?>
327
-
328
- <div class="bp-opening-hours-brief">
329
-
330
- <?php
331
- $slots = array();
332
- foreach ( $hours as $slot ) {
333
-
334
- // Skip this entry if no weekdays are set.
335
- if ( empty( $slot['weekdays'] ) ) {
336
- continue;
337
- }
338
-
339
- $days = array();
340
- $weekdays_i18n = array(
341
- 'monday' => esc_html__( 'Mo', 'business-profile' ),
342
- 'tuesday' => esc_html__( 'Tu', 'business-profile' ),
343
- 'wednesday' => esc_html__( 'We', 'business-profile' ),
344
- 'thursday' => esc_html__( 'Th', 'business-profile' ),
345
- 'friday' => esc_html__( 'Fr', 'business-profile' ),
346
- 'saturday' => esc_html__( 'Sa', 'business-profile' ),
347
- 'sunday' => esc_html__( 'Su', 'business-profile' ),
348
- );
349
- foreach ( $slot['weekdays'] as $day => $val ) {
350
- $days[] = $weekdays_i18n[ $day ];
351
- }
352
- $days_string = ! empty( $days ) ? join( _x( ',', 'Separator between days of the week when displaying opening hours in brief. Example: Mo,Tu,We', 'business-profile' ), $days ) : '';
353
-
354
- if ( empty( $slot['time'] ) ) {
355
- $string = sprintf( _x( '%s all day', 'Brief opening hours description which lists days_strings when open all day. Example: Mo,Tu,We all day', 'business-profile' ), $days_string );
356
- } else {
357
- unset( $start );
358
- unset( $end );
359
- if ( ! empty( $slot['time']['start'] ) ) {
360
- $start = new DateTime( $slot['time']['start'] );
361
- }
362
- if ( ! empty( $slot['time']['end'] ) ) {
363
- $end = new DateTime( $slot['time']['end'] );
364
- }
365
-
366
- if ( empty( $start ) ) {
367
- $string = sprintf( _x( '%s open until %s', 'Brief opening hours description which lists the days followed by the closing time. Example: Mo,Tu,We open until 9:00pm', 'business-profile' ), $days_string, $end->format( get_option( 'time_format' ) ) );
368
- } elseif ( empty( $end ) ) {
369
- $string = sprintf( _x( '%s open from %s', 'Brief opening hours description which lists the days followed by the opening time. Example: Mo,Tu,We open from 9:00am', 'business-profile' ), $days_string, $start->format( get_option( 'time_format' ) ) );
370
- } else {
371
- $string = sprintf( _x( '%s %s&thinsp;&ndash;&thinsp;%s', 'Brief opening hours description which lists the days followed by the opening and closing times. Example: Mo,Tu,We 9:00am&thinsp;&ndash;&thinsp;5:00pm', 'business-profile' ), $days_string, $start->format( get_option( 'time_format' ) ), $end->format( get_option( 'time_format' ) ) );
372
- }
373
- }
374
-
375
- $slots[] = $string;
376
- }
377
-
378
- echo join( _x( '; ', 'Separator between multiple opening times in the brief opening hours. Example: Mo,We 9:00 AM&thinsp;&ndash;&thinsp;5:00 PM; Tu,Th 10:00 AM&thinsp;&ndash;&thinsp;5:00 PM', 'business-profile' ), $slots );
379
- ?>
380
-
381
- </div>
382
-
383
- <?php
384
- return;
385
- endif; // Brief opening hours.
386
-
387
- $weekdays_display = array(
388
- 'monday' => __( 'Monday' ),
389
- 'tuesday' => __( 'Tuesday' ),
390
- 'wednesday' => __( 'Wednesday' ),
391
- 'thursday' => __( 'Thursday' ),
392
- 'friday' => __( 'Friday' ),
393
- 'saturday' => __( 'Saturday' ),
394
- 'sunday' => __( 'Sunday' ),
395
- );
396
-
397
- $weekdays = array();
398
- foreach ( $hours as $rule ) {
399
-
400
- // Skip this entry if no weekdays are set.
401
- if ( empty( $rule['weekdays'] ) ) {
402
- continue;
403
- }
404
-
405
- if ( empty( $rule['time'] ) ) {
406
- $time = __( 'Open', 'business-profile' );
407
-
408
- } else {
409
-
410
- if ( ! empty( $rule['time']['start'] ) ) {
411
- $start = new DateTime( $rule['time']['start'] );
412
- }
413
- if ( ! empty( $rule['time']['end'] ) ) {
414
- $end = new DateTime( $rule['time']['end'] );
415
- }
416
-
417
- if ( empty( $start ) ) {
418
- $time = __( 'Open until ', 'business-profile' ) . $end->format( get_option( 'time_format' ) );
419
- } elseif ( empty( $end ) ) {
420
- $time = __( 'Open from ', 'business-profile' ) . $start->format( get_option( 'time_format' ) );
421
- } else {
422
- $time = $start->format( get_option( 'time_format' ) ) . _x( '&thinsp;&ndash;&thinsp;', 'Separator between opening and closing times. Example: 9:00am&thinsp;&ndash;&thinsp;5:00pm', 'business-profile' ) . $end->format( get_option( 'time_format' ) );
423
- }
424
- }
425
-
426
- foreach ( $rule['weekdays'] as $day => $val ) {
427
-
428
- if ( ! array_key_exists( $day, $weekdays ) ) {
429
- $weekdays[ $day ] = array();
430
- }
431
-
432
- $weekdays[ $day ][] = $time;
433
- }
434
- }
435
-
436
- if ( count( $weekdays ) ) {
437
-
438
- // Order the weekdays and add any missing days as "closed".
439
- $weekdays_ordered = array();
440
- foreach ( $weekdays_display as $slug => $name ) {
441
- if ( ! array_key_exists( $slug, $weekdays ) ) {
442
- $weekdays_ordered[ $slug ] = array( __( 'Closed', 'business-profile' ) );
443
- } else {
444
- $weekdays_ordered[ $slug ] = $weekdays[ $slug ];
445
- }
446
- }
447
-
448
- $data = array(
449
- 'weekday_hours' => $weekdays_ordered,
450
- 'weekday_names' => $weekdays_display,
451
- );
452
-
453
- $template = new bpfwpTemplateLoader;
454
- $template->set_template_data( $data );
455
-
456
- if ( bpfwp_get_display( 'location' ) ) {
457
- $template->get_template_part( 'opening-hours', bpfwp_get_display( 'location' ) );
458
- } else {
459
- $template->get_template_part( 'opening-hours' );
460
- }
461
- }
462
- }
463
- }
464
-
465
- if ( ! function_exists( 'bpfwp_print_opening_hours_metatag' ) ) {
466
- /**
467
- * Print a schema metatags with the opening hours
468
- *
469
- * @access public
470
- * @param array $hours A list of opening hours.
471
- * @return void
472
- */
473
- function bpfwp_print_opening_hours_metatag( $hours ) {
474
-
475
- $weekdays_schema = array(
476
- 'monday' => 'Mo',
477
- 'tuesday' => 'Tu',
478
- 'wednesday' => 'We',
479
- 'thursday' => 'Th',
480
- 'friday' => 'Fr',
481
- 'saturday' => 'Sa',
482
- 'sunday' => 'Su',
483
- );
484
-
485
- // Output proper schema.org format.
486
- foreach ( $hours as $slot ) {
487
-
488
- // Skip this entry if no weekdays are set.
489
- if ( empty( $slot['weekdays'] ) ) {
490
- continue;
491
- }
492
-
493
- $days = array();
494
- foreach ( $slot['weekdays'] as $day => $val ) {
495
- $days[] = $weekdays_schema[ $day ];
496
- }
497
- $string = ! empty( $days ) ? join( ',', $days ) : '';
498
-
499
- if ( ! empty( $string ) && ! empty( $slot['time'] ) ) {
500
-
501
- if ( empty( $slot['time']['start'] ) ) {
502
- $start = '00:00';
503
- } else {
504
- $start = trim( substr( $slot['time']['start'], 0, -2 ) );
505
- if ( 'PM' === substr( $slot['time']['start'], -2 ) && '12:00' !== $start ) {
506
- $split = explode( ':', $start );
507
- $split[0] += 12;
508
- $start = join( ':', $split );
509
- }
510
- if ( 'AM' === substr( $slot['time']['start'], -2 ) && '12:00' === $start ) {
511
- $start = '00:00';
512
- }
513
- }
514
-
515
- if ( empty( $slot['time']['end'] ) ) {
516
- $end = '24:00';
517
- } else {
518
- $end = trim( substr( $slot['time']['end'], 0, -2 ) );
519
- if ( 'PM' === substr( $slot['time']['end'], -2 ) ) {
520
- $split = explode( ':', $end );
521
- $split[0] += 12;
522
- $end = join( ':', $split );
523
- }
524
- if ( ! empty( $slot['time']['start'] ) && 'AM' === substr( $slot['time']['start'], -2 ) && '12:00' === $start ) {
525
- $end = '24:00';
526
- }
527
- }
528
-
529
- $string .= ' ' . $start . '-' . $end;
530
- }
531
- echo '<meta itemprop="openingHours" content="' . esc_attr( $string ) . '">';
532
- }
533
- }
534
- }
535
-
536
- if ( ! function_exists( 'bpwfwp_print_map' ) ) {
537
- /**
538
- * Print a map to the address
539
- *
540
- * @since 0.0.1
541
- * @access public
542
- * @param string $location The location associated with the map.
543
- * @return string|void Returns an empty string if no map exists.
544
- */
545
- function bpwfwp_print_map( $location = false ) {
546
-
547
- $address = bpfwp_setting( 'address', $location );
548
-
549
- if ( empty( $address['text'] ) || ! bpfwp_get_display( 'show_map' ) ) {
550
- return '';
551
- }
552
-
553
- global $bpfwp_controller;
554
-
555
- if ( ! $bpfwp_controller->get_theme_support( 'disable_scripts' ) ) {
556
- wp_enqueue_script( 'bpfwp-map' );
557
- wp_localize_script(
558
- 'bpfwp-map',
559
- 'bpfwp_map',
560
- array(
561
- // Override loading and intialization of Google Maps api.
562
- 'google_maps_api_key' => bpfwp_setting( 'google-maps-api-key' ),
563
- 'autoload_google_maps' => apply_filters( 'bpfwp_autoload_google_maps', true ),
564
- 'map_options' => apply_filters( 'bpfwp_google_map_options', array() ),
565
- 'strings' => array(
566
- 'getDirections' => __( 'Get Directions', 'business-profile' ),
567
- ),
568
- )
569
- );
570
- }
571
-
572
- global $bpfwp_map_ids;
573
- if ( empty( $bpfwp_map_ids ) ) {
574
- $bpfwp_map_ids = array();
575
- }
576
-
577
- $id = count( $bpfwp_map_ids );
578
- $bpfwp_map_ids[] = $id;
579
-
580
- $attr = '';
581
-
582
- $phone = bpfwp_setting( 'phone', $location );
583
- if ( ! empty( $phone ) ) {
584
- $attr .= ' data-phone="' . esc_attr( $phone ) . '"';
585
- }
586
-
587
- if ( ! empty( $address['lat'] ) && ! empty( $address['lon'] ) ) {
588
- $attr .= ' data-lat="' . esc_attr( $address['lat'] ) . '" data-lon="' . esc_attr( $address['lon'] ) . '"';
589
- }
590
- ?>
591
-
592
- <div id="bp-map-<?php echo $id; ?>" class="bp-map" itemprop="map" data-name="<?php echo esc_attr( bpfwp_setting( 'name', $location ) ); ?>" data-address="<?php echo esc_attr( $address['text'] ); ?>"<?php echo $attr; ?>></div>
593
-
594
- <?php
595
- }
596
- }
597
-
598
- if ( ! function_exists( 'bpfwp_print_parent_organization' ) ) {
599
- /**
600
- * Print a meta tag which connects a location to a `parentOrganization`
601
- *
602
- * @since 1.1
603
- * @access public
604
- * @return string|void Returns an empty string if no parent location exists.
605
- */
606
- function bpfwp_print_parent_organization() {
607
-
608
- $location = bpfwp_get_display( 'location' );
609
-
610
- if ( empty( $location ) ) {
611
- return '';
612
- }
613
-
614
- ?>
615
-
616
- <meta itemprop="parentOrganization" itemtype="http://schema.org/<?php echo esc_attr( bpfwp_setting( 'schema-type' ) ); ?>" content="<?php echo esc_attr( bpfwp_setting( 'name' ) ); ?>">
617
-
618
- <?php
619
- }
620
- }
1
+ <?php
2
+ /**
3
+ * Template functions for rendering contact cards.
4
+ *
5
+ * @package BusinessProfile
6
+ * @copyright Copyright (c) 2016, Theme of the Crop
7
+ * @license GPL-2.0+
8
+ * @since 0.0.1
9
+ */
10
+
11
+ if ( ! function_exists( 'bpfwp_setting' ) ) {
12
+ /**
13
+ * Retrieve the value of any stored setting
14
+ *
15
+ * A wrapper for $bpfw_controller->settings->get_setting() that should be
16
+ * used to access any data for the global location or one of the location
17
+ * custom posts.
18
+ *
19
+ * @since 1.1
20
+ * @access public
21
+ * @param string $setting The setting to retrieve.
22
+ * @param string $location The location associated with the setting.
23
+ * @return mixed A setting based on the key provided.
24
+ */
25
+ function bpfwp_setting( $setting, $location = false ) {
26
+ global $bpfwp_controller;
27
+ return $bpfwp_controller->settings->get_setting( $setting, $location );
28
+ }
29
+ }
30
+
31
+ if ( ! function_exists( 'bpfwp_get_display' ) ) {
32
+ /**
33
+ * A helper function to check if a setting should be displayed visually or
34
+ * added as metadata
35
+ *
36
+ * @since 1.1
37
+ * @access public
38
+ * @param string $setting The setting to retrieve.
39
+ * @return mixed A setting based on the key provided.
40
+ */
41
+ function bpfwp_get_display( $setting ) {
42
+
43
+ global $bpfwp_controller;
44
+
45
+ if ( empty( $bpfwp_controller->display_settings ) ) {
46
+ $bpfwp_controller->display_settings = $bpfwp_controller->settings->get_default_display_settings();
47
+ }
48
+
49
+ return isset( $bpfwp_controller->display_settings[ $setting ] ) ? $bpfwp_controller->display_settings[ $setting ] : false;
50
+ }
51
+ }
52
+
53
+ if ( ! function_exists( 'bpfwp_set_display' ) ) {
54
+ /**
55
+ * A helper function to set a setting's visibility on the fly
56
+ *
57
+ * These visibility flags are usually set when the shortcode or widget is
58
+ * loaded, or bpwfwp_print_contact_card() is called. This helper function
59
+ * makes it easy to set a flag if you're building your own template.
60
+ *
61
+ * @since 1.1
62
+ * @access public
63
+ * @param string $setting The setting to be changed.
64
+ * @param string $value The setting value to be used.
65
+ * @return void
66
+ */
67
+ function bpfwp_set_display( $setting, $value ) {
68
+
69
+ global $bpfwp_controller;
70
+
71
+ if ( empty( $bpfwp_controller->display_settings ) ) {
72
+ $bpfwp_controller->display_settings = $bpfwp_controller->settings->get_default_display_settings();
73
+ }
74
+
75
+ $bpfwp_controller->display_settings[ $setting ] = $value;
76
+ }
77
+ }
78
+
79
+ if ( ! function_exists( 'bpwfwp_print_contact_card' ) ) {
80
+ /**
81
+ * Print a contact card and add a shortcode.
82
+ *
83
+ * @since 0.0.1
84
+ * @access public
85
+ * @param array $args Options for outputting the contact card.
86
+ * @return string Markup for displaying a contact card.
87
+ */
88
+ function bpwfwp_print_contact_card( $args = array() ) {
89
+
90
+ global $bpfwp_controller;
91
+
92
+ // Define shortcode attributes.
93
+ $bpfwp_controller->display_settings = shortcode_atts(
94
+ $bpfwp_controller->settings->get_default_display_settings(),
95
+ $args,
96
+ 'contact-card'
97
+ );
98
+
99
+ // Check if location is allowed to be viewed
100
+ $location_id = bpfwp_get_display( 'location' );
101
+ if ( $location_id && !current_user_can( 'edit_location', $location_id ) && get_post_status( $location_id ) !== 'publish' ) {
102
+ return apply_filters( 'bpwfwp_protected_contact_card_output', '' );
103
+ }
104
+
105
+ // Setup components and callback functions to render them.
106
+ $data = apply_filters(
107
+ 'bpwfwp_component_callbacks',
108
+ array(
109
+ 'name' => 'bpwfwp_print_name',
110
+ 'address' => 'bpwfwp_print_address',
111
+ 'phone' => 'bpwfwp_print_phone',
112
+ 'contact' => 'bpwfwp_print_contact',
113
+ 'opening_hours' => 'bpwfwp_print_opening_hours',
114
+ 'map' => 'bpwfwp_print_map',
115
+ 'parent_organization' => 'bpfwp_print_parent_organization',
116
+ )
117
+ );
118
+
119
+ if ( ! $bpfwp_controller->get_theme_support( 'disable_styles' ) ) {
120
+ /**
121
+ * Filter to override whether the frontend stylesheets are loaded.
122
+ *
123
+ * This is deprecated in favor of add_theme_support(). To prevent
124
+ * styles from being loaded, add the following to your theme:
125
+ *
126
+ * add_theme_support( 'business-profile', array( 'disable_styles' => true ) );
127
+ */
128
+ if ( apply_filters( 'bpfwp-load-frontend-assets', true ) ) {
129
+ wp_enqueue_style( 'dashicons' );
130
+ wp_enqueue_style( 'bpfwp-default' );
131
+ }
132
+ }
133
+
134
+ ob_start();
135
+ $template = new bpfwpTemplateLoader;
136
+ $template->set_template_data( $data );
137
+
138
+ if ( bpfwp_get_display( 'location' ) ) {
139
+ $template->get_template_part( 'contact-card', bpfwp_get_display( 'location' ) );
140
+ } else {
141
+ $template->get_template_part( 'contact-card' );
142
+ }
143
+
144
+ $output = ob_get_clean();
145
+
146
+ // Reset display settings.
147
+ $bpfwp_controller->display_settings = $bpfwp_controller->settings->get_default_display_settings();
148
+
149
+ return apply_filters( 'bpwfwp_contact_card_output', $output );
150
+ }
151
+
152
+ if ( ! shortcode_exists( 'contact-card' ) ) {
153
+ add_shortcode( 'contact-card', 'bpwfwp_print_contact_card' );
154
+ }
155
+ }
156
+
157
+ if ( ! function_exists( 'bpwfwp_print_name' ) ) {
158
+ /**
159
+ * Print the name.
160
+ *
161
+ * @since 0.0.1
162
+ * @access public
163
+ * @param string $location The location associated with the name.
164
+ * @return void
165
+ */
166
+ function bpwfwp_print_name( $location = false ) {
167
+
168
+ if ( bpfwp_get_display( 'show_name' ) ) :
169
+ ?>
170
+ <div class="bp-name" itemprop="name">
171
+ <?php echo esc_attr( bpfwp_setting( 'name', $location ) ); ?>
172
+ </div>
173
+
174
+ <?php else : ?>
175
+ <meta itemprop="name" content="<?php echo esc_attr( bpfwp_setting( 'name', $location ) ); ?>">
176
+
177
+ <?php endif; ?>
178
+
179
+ <?php if ( empty( $location ) ) : ?>
180
+ <meta itemprop="description" content="<?php echo esc_attr( get_bloginfo( 'description' ) ) ?>">
181
+ <meta itemprop="url" content="<?php echo esc_url( get_bloginfo( 'url' ) ); ?>">
182
+
183
+ <?php else : ?>
184
+ <meta itemprop="url" content="<?php echo esc_url( get_permalink( $location ) ); ?>">
185
+
186
+ <?php endif;
187
+ }
188
+ }
189
+
190
+ if ( ! function_exists( 'bpwfwp_print_address' ) ) {
191
+ /**
192
+ * Print the address with a get directions link to Google Maps.
193
+ *
194
+ * @since 0.0.1
195
+ * @access public
196
+ * @param string $location The location associated with the address.
197
+ * @return string|void Returns an empty string if no address exists.
198
+ */
199
+ function bpwfwp_print_address( $location = false ) {
200
+
201
+ $address = bpfwp_setting( 'address', $location );
202
+
203
+ if ( empty( $address['text'] ) ) {
204
+ return '';
205
+ }
206
+ ?>
207
+
208
+ <meta itemprop="address" content="<?php echo esc_attr( $address['text'] ); ?>">
209
+
210
+ <?php if ( bpfwp_get_display( 'show_address' ) ) : ?>
211
+ <div class="bp-address">
212
+ <?php echo nl2br( $address['text'] ); ?>
213
+ </div>
214
+ <?php endif; ?>
215
+
216
+ <?php if ( bpfwp_get_display( 'show_get_directions' ) ) : ?>
217
+ <div class="bp-directions">
218
+ <a href="//maps.google.com/maps?saddr=current+location&daddr=<?php echo urlencode( esc_attr( $address['text'] ) ); ?>" target="_blank"><?php _e( 'Get directions', 'business-profile' ); ?></a>
219
+ </div>
220
+ <?php endif;
221
+
222
+ }
223
+ }
224
+
225
+ if ( ! function_exists( 'bpwfwp_print_phone' ) ) {
226
+ /**
227
+ * Print the phone number.
228
+ *
229
+ * @since 0.0.1
230
+ * @access public
231
+ * @param string $location The location associated with the phone.
232
+ * @return string|void Returns an empty string if no phone exists.
233
+ */
234
+ function bpwfwp_print_phone( $location = false ) {
235
+
236
+ $phone = bpfwp_setting( 'phone', $location );
237
+
238
+ if ( empty( $phone ) ) {
239
+ return '';
240
+ }
241
+
242
+ if ( bpfwp_get_display( 'show_phone' ) ) :
243
+ ?>
244
+
245
+ <div class="bp-phone" itemprop="telephone">
246
+ <?php echo bpfwp_setting( 'phone', $location ); ?>
247
+ </div>
248
+
249
+ <?php else : ?>
250
+ <meta itemprop="telephone" content="<?php echo esc_attr( bpfwp_setting( 'phone', $location ) ); ?>">
251
+
252
+ <?php endif;
253
+ }
254
+ }
255
+
256
+ if ( ! function_exists( 'bpwfwp_print_contact' ) ) {
257
+ /**
258
+ * Print the contact link.
259
+ *
260
+ * @since 0.0.1
261
+ * @access public
262
+ * @param string $location The location associated with the contact.
263
+ * @return string|void Returns an empty string if no contact exists.
264
+ */
265
+ function bpwfwp_print_contact( $location = false ) {
266
+
267
+ $email = bpfwp_setting( 'contact-email', $location );
268
+ if ( ! empty( $email ) ) :
269
+ $antispam_email = antispambot( $email );
270
+
271
+ if ( ! bpfwp_get_display( 'show_contact' ) ) :
272
+ ?>
273
+ <meta itemprop="email" content="<?php echo esc_attr( $antispam_email ); ?>">
274
+
275
+ <?php else : ?>
276
+
277
+ <div class="bp-contact bp-contact-email" itemprop="email" content="<?php echo esc_attr( $antispam_email ); ?>">
278
+ <a href="mailto:<?php echo esc_attr( $antispam_email ); ?>"><?php echo $antispam_email; ?></a>
279
+ </div>
280
+
281
+ <?php endif; ?>
282
+
283
+ <?php
284
+ return;
285
+ endif;
286
+
287
+ $contact = bpfwp_setting( 'contact-page', $location );
288
+ if ( ! empty( $contact ) && bpfwp_get_display( 'show_contact' ) ) :
289
+ ?>
290
+
291
+ <div class="bp-contact bp-contact-page" itemprop="ContactPoint" itemscope itemtype="http://schema.org/ContactPoint">
292
+ <meta itemprop="contactType" content="customer support">
293
+ <a href="<?php echo get_permalink( $contact ); ?>" itemprop="url" content="<?php echo esc_attr( get_permalink( $contact ) ); ?>"><?php _e( 'Contact', 'business-profile' ); ?></a>
294
+ </div>
295
+
296
+ <?php endif;
297
+ }
298
+ }
299
+
300
+ if ( ! function_exists( 'bpwfwp_print_opening_hours' ) ) {
301
+ /**
302
+ * Print the opening hours.
303
+ *
304
+ * @since 0.0.1
305
+ * @access public
306
+ * @param string $location The location associated with the hours.
307
+ * @return string|void Returns an empty string if no hours exist.
308
+ */
309
+ function bpwfwp_print_opening_hours( $location = false ) {
310
+
311
+ $hours = bpfwp_setting( 'opening-hours', $location );
312
+
313
+ if ( empty( $hours ) ) {
314
+ return '';
315
+ }
316
+
317
+ // Print the metatags with proper schema formatting.
318
+ bpfwp_print_opening_hours_metatag( $hours );
319
+
320
+ if ( ! bpfwp_get_display( 'show_opening_hours' ) ) {
321
+ return;
322
+ }
323
+
324
+ // Output display format.
325
+ if ( bpfwp_get_display( 'show_opening_hours_brief' ) ) :
326
+ ?>
327
+
328
+ <div class="bp-opening-hours-brief">
329
+
330
+ <?php
331
+ $slots = array();
332
+ foreach ( $hours as $slot ) {
333
+
334
+ // Skip this entry if no weekdays are set.
335
+ if ( empty( $slot['weekdays'] ) ) {
336
+ continue;
337
+ }
338
+
339
+ $days = array();
340
+ $weekdays_i18n = array(
341
+ 'monday' => esc_html__( 'Mo', 'business-profile' ),
342
+ 'tuesday' => esc_html__( 'Tu', 'business-profile' ),
343
+ 'wednesday' => esc_html__( 'We', 'business-profile' ),
344
+ 'thursday' => esc_html__( 'Th', 'business-profile' ),
345
+ 'friday' => esc_html__( 'Fr', 'business-profile' ),
346
+ 'saturday' => esc_html__( 'Sa', 'business-profile' ),
347
+ 'sunday' => esc_html__( 'Su', 'business-profile' ),
348
+ );
349
+ foreach ( $slot['weekdays'] as $day => $val ) {
350
+ $days[] = $weekdays_i18n[ $day ];
351
+ }
352
+ $days_string = ! empty( $days ) ? join( _x( ',', 'Separator between days of the week when displaying opening hours in brief. Example: Mo,Tu,We', 'business-profile' ), $days ) : '';
353
+
354
+ if ( empty( $slot['time'] ) ) {
355
+ $string = sprintf( _x( '%s all day', 'Brief opening hours description which lists days_strings when open all day. Example: Mo,Tu,We all day', 'business-profile' ), $days_string );
356
+ } else {
357
+ unset( $start );
358
+ unset( $end );
359
+ if ( ! empty( $slot['time']['start'] ) ) {
360
+ $start = new DateTime( $slot['time']['start'] );
361
+ }
362
+ if ( ! empty( $slot['time']['end'] ) ) {
363
+ $end = new DateTime( $slot['time']['end'] );
364
+ }
365
+
366
+ if ( empty( $start ) ) {
367
+ $string = sprintf( _x( '%s open until %s', 'Brief opening hours description which lists the days followed by the closing time. Example: Mo,Tu,We open until 9:00pm', 'business-profile' ), $days_string, $end->format( get_option( 'time_format' ) ) );
368
+ } elseif ( empty( $end ) ) {
369
+ $string = sprintf( _x( '%s open from %s', 'Brief opening hours description which lists the days followed by the opening time. Example: Mo,Tu,We open from 9:00am', 'business-profile' ), $days_string, $start->format( get_option( 'time_format' ) ) );
370
+ } else {
371
+ $string = sprintf( _x( '%s %s&thinsp;&ndash;&thinsp;%s', 'Brief opening hours description which lists the days followed by the opening and closing times. Example: Mo,Tu,We 9:00am&thinsp;&ndash;&thinsp;5:00pm', 'business-profile' ), $days_string, $start->format( get_option( 'time_format' ) ), $end->format( get_option( 'time_format' ) ) );
372
+ }
373
+ }
374
+
375
+ $slots[] = $string;
376
+ }
377
+
378
+ echo join( _x( '; ', 'Separator between multiple opening times in the brief opening hours. Example: Mo,We 9:00 AM&thinsp;&ndash;&thinsp;5:00 PM; Tu,Th 10:00 AM&thinsp;&ndash;&thinsp;5:00 PM', 'business-profile' ), $slots );
379
+ ?>
380
+
381
+ </div>
382
+
383
+ <?php
384
+ return;
385
+ endif; // Brief opening hours.
386
+
387
+ $weekdays_display = array(
388
+ 'monday' => __( 'Monday' ),
389
+ 'tuesday' => __( 'Tuesday' ),
390
+ 'wednesday' => __( 'Wednesday' ),
391
+ 'thursday' => __( 'Thursday' ),
392
+ 'friday' => __( 'Friday' ),
393
+ 'saturday' => __( 'Saturday' ),
394
+ 'sunday' => __( 'Sunday' ),
395
+ );
396
+
397
+ $weekdays = array();
398
+ foreach ( $hours as $rule ) {
399
+
400
+ // Skip this entry if no weekdays are set.
401
+ if ( empty( $rule['weekdays'] ) ) {
402
+ continue;
403
+ }
404
+
405
+ if ( empty( $rule['time'] ) ) {
406
+ $time = __( 'Open', 'business-profile' );
407
+
408
+ } else {
409
+
410
+ if ( ! empty( $rule['time']['start'] ) ) {
411
+ $start = new DateTime( $rule['time']['start'] );
412
+ }
413
+ if ( ! empty( $rule['time']['end'] ) ) {
414
+ $end = new DateTime( $rule['time']['end'] );
415
+ }
416
+
417
+ if ( empty( $start ) ) {
418
+ $time = __( 'Open until ', 'business-profile' ) . $end->format( get_option( 'time_format' ) );
419
+ } elseif ( empty( $end ) ) {
420
+ $time = __( 'Open from ', 'business-profile' ) . $start->format( get_option( 'time_format' ) );
421
+ } else {
422
+ $time = $start->format( get_option( 'time_format' ) ) . _x( '&thinsp;&ndash;&thinsp;', 'Separator between opening and closing times. Example: 9:00am&thinsp;&ndash;&thinsp;5:00pm', 'business-profile' ) . $end->format( get_option( 'time_format' ) );
423
+ }
424
+ }
425
+
426
+ foreach ( $rule['weekdays'] as $day => $val ) {
427
+
428
+ if ( ! array_key_exists( $day, $weekdays ) ) {
429
+ $weekdays[ $day ] = array();
430
+ }
431
+
432
+ $weekdays[ $day ][] = $time;
433
+ }
434
+ }
435
+
436
+ if ( count( $weekdays ) ) {
437
+
438
+ // Order the weekdays and add any missing days as "closed".
439
+ $weekdays_ordered = array();
440
+ foreach ( $weekdays_display as $slug => $name ) {
441
+ if ( ! array_key_exists( $slug, $weekdays ) ) {
442
+ $weekdays_ordered[ $slug ] = array( __( 'Closed', 'business-profile' ) );
443
+ } else {
444
+ $weekdays_ordered[ $slug ] = $weekdays[ $slug ];
445
+ }
446
+ }
447
+
448
+ $data = array(
449
+ 'weekday_hours' => $weekdays_ordered,
450
+ 'weekday_names' => $weekdays_display,
451
+ );
452
+
453
+ $template = new bpfwpTemplateLoader;
454
+ $template->set_template_data( $data );
455
+
456
+ if ( bpfwp_get_display( 'location' ) ) {
457
+ $template->get_template_part( 'opening-hours', bpfwp_get_display( 'location' ) );
458
+ } else {
459
+ $template->get_template_part( 'opening-hours' );
460
+ }
461
+ }
462
+ }
463
+ }
464
+
465
+ if ( ! function_exists( 'bpfwp_print_opening_hours_metatag' ) ) {
466
+ /**
467
+ * Print a schema metatags with the opening hours
468
+ *
469
+ * @access public
470
+ * @param array $hours A list of opening hours.
471
+ * @return void
472
+ */
473
+ function bpfwp_print_opening_hours_metatag( $hours ) {
474
+
475
+ $weekdays_schema = array(
476
+ 'monday' => 'Mo',
477
+ 'tuesday' => 'Tu',
478
+ 'wednesday' => 'We',
479
+ 'thursday' => 'Th',
480
+ 'friday' => 'Fr',
481
+ 'saturday' => 'Sa',
482
+ 'sunday' => 'Su',
483
+ );
484
+
485
+ // Output proper schema.org format.
486
+ foreach ( $hours as $slot ) {
487
+
488
+ // Skip this entry if no weekdays are set.
489
+ if ( empty( $slot['weekdays'] ) ) {
490
+ continue;
491
+ }
492
+
493
+ $days = array();
494
+ foreach ( $slot['weekdays'] as $day => $val ) {
495
+ $days[] = $weekdays_schema[ $day ];
496
+ }
497
+ $string = ! empty( $days ) ? join( ',', $days ) : '';
498
+
499
+ if ( ! empty( $string ) && ! empty( $slot['time'] ) ) {
500
+
501
+ if ( empty( $slot['time']['start'] ) ) {
502
+ $start = '00:00';
503
+ } else {
504
+ $start = trim( substr( $slot['time']['start'], 0, -2 ) );
505
+ if ( 'PM' === substr( $slot['time']['start'], -2 ) && '12:00' !== $start ) {
506
+ $split = explode( ':', $start );
507
+ $split[0] += 12;
508
+ $start = join( ':', $split );
509
+ }
510
+ if ( 'AM' === substr( $slot['time']['start'], -2 ) && '12:00' === $start ) {
511
+ $start = '00:00';
512
+ }
513
+ }
514
+
515
+ if ( empty( $slot['time']['end'] ) ) {
516
+ $end = '24:00';
517
+ } else {
518
+ $end = trim( substr( $slot['time']['end'], 0, -2 ) );
519
+ if ( 'PM' === substr( $slot['time']['end'], -2 ) ) {
520
+ $split = explode( ':', $end );
521
+ $split[0] += 12;
522
+ $end = join( ':', $split );
523
+ }
524
+ if ( ! empty( $slot['time']['start'] ) && 'AM' === substr( $slot['time']['start'], -2 ) && '12:00' === $start ) {
525
+ $end = '24:00';
526
+ }
527
+ }
528
+
529
+ $string .= ' ' . $start . '-' . $end;
530
+ }
531
+ echo '<meta itemprop="openingHours" content="' . esc_attr( $string ) . '">';
532
+ }
533
+ }
534
+ }
535
+
536
+ if ( ! function_exists( 'bpwfwp_print_map' ) ) {
537
+ /**
538
+ * Print a map to the address
539
+ *
540
+ * @since 0.0.1
541
+ * @access public
542
+ * @param string $location The location associated with the map.
543
+ * @return string|void Returns an empty string if no map exists.
544
+ */
545
+ function bpwfwp_print_map( $location = false ) {
546
+
547
+ $address = bpfwp_setting( 'address', $location );
548
+
549
+ if ( empty( $address['text'] ) || ! bpfwp_get_display( 'show_map' ) ) {
550
+ return '';
551
+ }
552
+
553
+ global $bpfwp_controller;
554
+
555
+ if ( ! $bpfwp_controller->get_theme_support( 'disable_scripts' ) ) {
556
+ wp_enqueue_script( 'bpfwp-map' );
557
+ wp_localize_script(
558
+ 'bpfwp-map',
559
+ 'bpfwp_map',
560
+ array(
561
+ // Override loading and intialization of Google Maps api.
562
+ 'google_maps_api_key' => bpfwp_setting( 'google-maps-api-key' ),
563
+ 'autoload_google_maps' => apply_filters( 'bpfwp_autoload_google_maps', true ),
564
+ 'map_options' => apply_filters( 'bpfwp_google_map_options', array() ),
565
+ 'strings' => array(
566
+ 'getDirections' => __( 'Get Directions', 'business-profile' ),
567
+ ),
568
+ )
569
+ );
570
+ }
571
+
572
+ global $bpfwp_map_ids;
573
+ if ( empty( $bpfwp_map_ids ) ) {
574
+ $bpfwp_map_ids = array();
575
+ }
576
+
577
+ $id = count( $bpfwp_map_ids );
578
+ $bpfwp_map_ids[] = $id;
579
+
580
+ $attr = '';
581
+
582
+ $phone = bpfwp_setting( 'phone', $location );
583
+ if ( ! empty( $phone ) ) {
584
+ $attr .= ' data-phone="' . esc_attr( $phone ) . '"';
585
+ }
586
+
587
+ if ( ! empty( $address['lat'] ) && ! empty( $address['lon'] ) ) {
588
+ $attr .= ' data-lat="' . esc_attr( $address['lat'] ) . '" data-lon="' . esc_attr( $address['lon'] ) . '"';
589
+ }
590
+ ?>
591
+
592
+ <div id="bp-map-<?php echo $id; ?>" class="bp-map" itemprop="map" data-name="<?php echo esc_attr( bpfwp_setting( 'name', $location ) ); ?>" data-address="<?php echo esc_attr( $address['text'] ); ?>"<?php echo $attr; ?>></div>
593
+
594
+ <?php
595
+ }
596
+ }
597
+
598
+ if ( ! function_exists( 'bpfwp_print_parent_organization' ) ) {
599
+ /**
600
+ * Print a meta tag which connects a location to a `parentOrganization`
601
+ *
602
+ * @since 1.1
603
+ * @access public
604
+ * @return string|void Returns an empty string if no parent location exists.
605
+ */
606
+ function bpfwp_print_parent_organization() {
607
+
608
+ $location = bpfwp_get_display( 'location' );
609
+
610
+ if ( empty( $location ) ) {
611
+ return '';
612
+ }
613
+
614
+ ?>
615
+
616
+ <meta itemprop="parentOrganization" itemtype="http://schema.org/<?php echo esc_attr( bpfwp_setting( 'schema-type' ) ); ?>" content="<?php echo esc_attr( bpfwp_setting( 'name' ) ); ?>">
617
+
618
+ <?php
619
+ }
620
+ }
languages/business-profile-cs_CZ.po CHANGED
@@ -1,1253 +1,1253 @@
1
- # Copyright (C) 2015 Business Profile
2
- # This file is distributed under the same license as the Business Profile package.
3
- msgid ""
4
- msgstr ""
5
- "Project-Id-Version: Business Profile 1.0.5\n"
6
- "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/business-profile\n"
7
- "POT-Creation-Date: 2015-02-07 19:55:06+00:00\n"
8
- "MIME-Version: 1.0\n"
9
- "Content-Type: text/plain; charset=UTF-8\n"
10
- "Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2015-02-07 22:35+0100\n"
12
- "X-Generator: Poedit 1.7.4\n"
13
- "X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;"
14
- "_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;"
15
- "esc_html_x:1,2c\n"
16
- "Language: cs_CZ\n"
17
- "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
18
- "X-Poedit-SourceCharset: UTF-8\n"
19
- "X-Poedit-Basepath: ../\n"
20
- "X-Textdomain-Support: yes\n"
21
- "Last-Translator: \n"
22
- "Language-Team: \n"
23
- "X-Poedit-SearchPath-0: .\n"
24
-
25
- #: Integrations.class.php:107
26
- msgid "Book a table"
27
- msgstr "Zarezervovat stůl"
28
-
29
- #: Integrations.class.php:127 Integrations.class.php:131
30
- msgid "Show book a table link"
31
- msgstr "Ukázat odkaz na rezervaci stolu"
32
-
33
- #: Settings.class.php:86 Settings.class.php:87
34
- msgid "Business Profile"
35
- msgstr "Business profil"
36
-
37
- #: Settings.class.php:98
38
- msgid "Search Engine Optimization"
39
- msgstr "Optimalizace internetových vyhledávačů"
40
-
41
- #: Settings.class.php:108
42
- msgid "Schema Type"
43
- msgstr "Typ schématu"
44
-
45
- #: Settings.class.php:109
46
- msgid ""
47
- "Select the option that best describes your business to improve how search "
48
- "engines understand your website"
49
- msgstr ""
50
- "Vyberte možnost, která nejlépe popisuje Váš podnik, pro zlepšení pochopení "
51
- "internetovými vyhledávači"
52
-
53
- #: Settings.class.php:152
54
- msgid "Contact Information"
55
- msgstr "Kontaktní informace"
56
-
57
- #: Settings.class.php:162
58
- msgid "Name"
59
- msgstr "Jméno"
60
-
61
- #: Settings.class.php:163
62
- msgid "Enter the name of your business if it is different than the website name."
63
- msgstr "Vložte jméno vašeho podniku, pokud je jiné než název stránky."
64
-
65
- #: Settings.class.php:174
66
- msgid "Address"
67
- msgstr "Adresa"
68
-
69
- #: Settings.class.php:184
70
- msgid "Phone"
71
- msgstr "Telefon"
72
-
73
- #: Settings.class.php:194
74
- msgid "Contact Page"
75
- msgstr "Kontaktní stránka"
76
-
77
- #: Settings.class.php:195
78
- msgid ""
79
- "Select a page on your site where users can reach you, such as a contact form."
80
- msgstr ""
81
- "Vyberte stránku na Vašem webu, kde Vás mohou uživatelé kontaktovat, například "
82
- "kontaktní formulář."
83
-
84
- #: Settings.class.php:211
85
- msgid "Email Address (optional)"
86
- msgstr "Email (nepovinný údaj)"
87
-
88
- #: Settings.class.php:212
89
- msgid ""
90
- "Enter an email address only if you want to display this publicly. Showing your "
91
- "email address on your site may cause you to receive excessive spam."
92
- msgstr ""
93
- "Zadejte svou emailovou adresu pouze v případě, že ji chcete zobrazovat veřejně. "
94
- "Zveřejnění emailové adresy na Vašem webu může způsobit nevyžádaný spam."
95
-
96
- #: Settings.class.php:220
97
- msgid "Schedule"
98
- msgstr "Rozvrh"
99
-
100
- #: Settings.class.php:230 template-functions.php:389
101
- msgid "Opening Hours"
102
- msgstr "Otevírací doba"
103
-
104
- #: Settings.class.php:231
105
- msgid "Define your weekly opening hours by adding scheduling rules."
106
- msgstr "Zadejte svou týdenní otevírací dobu přidáním pravidel rozvrhu."
107
-
108
- #: Settings.class.php:233
109
- msgctxt "Monday abbreviation"
110
- msgid "Mo"
111
- msgstr "Po"
112
-
113
- #: Settings.class.php:234
114
- msgctxt "Tuesday abbreviation"
115
- msgid "Tu"
116
- msgstr "Út"
117
-
118
- #: Settings.class.php:235
119
- msgctxt "Wednesday abbreviation"
120
- msgid "We"
121
- msgstr "St"
122
-
123
- #: Settings.class.php:236
124
- msgctxt "Thursday abbreviation"
125
- msgid "Th"
126
- msgstr "Čt"
127
-
128
- #: Settings.class.php:237
129
- msgctxt "Friday abbreviation"
130
- msgid "Fr"
131
- msgstr "Pá"
132
-
133
- #: Settings.class.php:238
134
- msgctxt "Saturday abbreviation"
135
- msgid "Sa"
136
- msgstr "So"
137
-
138
- #: Settings.class.php:239
139
- msgctxt "Sunday abbreviation"
140
- msgid "Su"
141
- msgstr "Ne"
142
-
143
- #: Settings.class.php:241
144
- msgctxt ""
145
- "Time format displayed in the opening hours setting panel in your admin area. "
146
- "Must match formatting rules at http://amsul.ca/pickadate.js/time.htm#formats"
147
- msgid "h:i A"
148
- msgstr "H:i"
149
-
150
- #: Settings.class.php:242
151
- msgctxt ""
152
- "Date format displayed in the opening hours setting panel in your admin area. "
153
- "Must match formatting rules at http://amsul.ca/pickadate.js/date.htm#formatting-"
154
- "rules"
155
- msgid "d mmmm, yyyy"
156
- msgstr "d mmmm, yyyy"
157
-
158
- #: WP_Widget.ContactCardWidget.class.php:25
159
- msgid "Show Name"
160
- msgstr "Zobrazit jméno"
161
-
162
- #: WP_Widget.ContactCardWidget.class.php:26
163
- msgid "Show Address"
164
- msgstr "Zobrazit adresu"
165
-
166
- #: WP_Widget.ContactCardWidget.class.php:27
167
- msgid "Show link to get directions on Google Maps"
168
- msgstr "Zobrazit odkaz na Google maps"
169
-
170
- #: WP_Widget.ContactCardWidget.class.php:28
171
- msgid "Show Phone number"
172
- msgstr "Zobrazit telefonní číslo"
173
-
174
- #: WP_Widget.ContactCardWidget.class.php:29
175
- msgid "Show contact details"
176
- msgstr "Zobrazit kontaktní detaily"
177
-
178
- #: WP_Widget.ContactCardWidget.class.php:30
179
- msgid "Show Opening Hours"
180
- msgstr "Zobrazit otevírací dobu"
181
-
182
- #: WP_Widget.ContactCardWidget.class.php:31
183
- msgid "Show brief opening hours on one line"
184
- msgstr "Zobrazit stručnou otevírací dobu na jednom řádku"
185
-
186
- #: WP_Widget.ContactCardWidget.class.php:32
187
- msgid "Show Google Map"
188
- msgstr "Zobrazit Google Map"
189
-
190
- #: WP_Widget.ContactCardWidget.class.php:38
191
- msgid "Contact Card"
192
- msgstr "Kontaktní karta"
193
-
194
- #: WP_Widget.ContactCardWidget.class.php:39
195
- msgid ""
196
- "Display a contact card with your name, address, phone number, opening hours and "
197
- "map."
198
- msgstr ""
199
- "Zobrazit kontaktní kartu s Vaším jménem, adresou, telefonním číslem, otevírací "
200
- "dobou a mapou."
201
-
202
- #: WP_Widget.ContactCardWidget.class.php:71
203
- msgid "Title"
204
- msgstr "Název"
205
-
206
- #: template-functions.php:135 template-functions.php:424
207
- msgid "Get directions"
208
- msgstr "Získat souřadnice"
209
-
210
- #: template-functions.php:191
211
- msgid "Contact"
212
- msgstr "Kontakt"
213
-
214
- #: template-functions.php:296
215
- msgid " all day"
216
- msgstr " celý den"
217
-
218
- #: template-functions.php:306
219
- msgid " open until "
220
- msgstr " otevřeno do "
221
-
222
- #: template-functions.php:308
223
- msgid " open from "
224
- msgstr " otevřeno od "
225
-
226
- #: template-functions.php:310 template-functions.php:361
227
- msgctxt "Separator between opening and closing times. Example: 9:00am-5:00pm"
228
- msgid "-"
229
- msgstr " - "
230
-
231
- #: template-functions.php:317
232
- msgctxt ""
233
- "Separator between multiple opening times in the brief opening hours. Example: "
234
- "Mo,We 9:00 AM - 5:00 PM; Tu,Th 10:00 AM - 5:00 PM"
235
- msgid "; "
236
- msgstr "; "
237
-
238
- #: template-functions.php:327
239
- msgid "Monday"
240
- msgstr "Pondělí"
241
-
242
- #: template-functions.php:328
243
- msgid "Tuesday"
244
- msgstr "Úterý"
245
-
246
- #: template-functions.php:329
247
- msgid "Wednesday"
248
- msgstr "Středa"
249
-
250
- #: template-functions.php:330
251
- msgid "Thursday"
252
- msgstr "Čtvrtek"
253
-
254
- #: template-functions.php:331
255
- msgid "Friday"
256
- msgstr "Pátek"
257
-
258
- #: template-functions.php:332
259
- msgid "Saturday"
260
- msgstr "Sobota"
261
-
262
- #: template-functions.php:333
263
- msgid "Sunday"
264
- msgstr "Neděle"
265
-
266
- #: template-functions.php:345
267
- msgid "Open"
268
- msgstr "Otevřeno"
269
-
270
- #: template-functions.php:357
271
- msgid "Open until "
272
- msgstr "Otevřeno do "
273
-
274
- #: template-functions.php:359
275
- msgid "Open from "
276
- msgstr "Otevřeno do "
277
-
278
- #: template-functions.php:381
279
- msgid "Closed"
280
- msgstr "Zavřeno"
281
-
282
- #, fuzzy
283
- #~ msgid "No map coordinates set."
284
- #~ msgstr "Nebyly nastaveny žádné souřadnice."
285
-
286
- #, fuzzy
287
- #~ msgid "Requesting new coordinates"
288
- #~ msgstr "Požádat o nové souřadnice"
289
-
290
- #, fuzzy
291
- #~ msgid "Select a match below"
292
- #~ msgstr "Vybrat shodu"
293
-
294
- #, fuzzy
295
- #~ msgid "View"
296
- #~ msgstr "Zobrazit"
297
-
298
- #, fuzzy
299
- #~ msgid "Retrieve map coordinates"
300
- #~ msgstr "Vyzvednout souřadnice"
301
-
302
- #, fuzzy
303
- #~ msgid "Remove map coordinates"
304
- #~ msgstr "Odstranit souřadnice"
305
-
306
- #, fuzzy
307
- #~ msgid "Try again?"
308
- #~ msgstr "Zkusit znovu?"
309
-
310
- #, fuzzy
311
- #~ msgid "Error"
312
- #~ msgstr "Chyba"
313
-
314
- #, fuzzy
315
- #~ msgid ""
316
- #~ "Invalid request. Be sure to fill out the address field before retrieving "
317
- #~ "coordinates."
318
- #~ msgstr ""
319
- #~ "Neplatný požadavek. Ujistěte se, že máte vyplněné pole s adresou, než "
320
- #~ "obdržíte souřadnice."
321
-
322
- #, fuzzy
323
- #~ msgid "Request denied."
324
- #~ msgstr "Požadavek byl zamítnut."
325
-
326
- #, fuzzy
327
- #~ msgid "Request denied because you are over your request quota."
328
- #~ msgstr "Požadavek byl zamítnut, protože jste překročili limit pro požadavky."
329
-
330
- #, fuzzy
331
- #~ msgid "Nothing was found at that address"
332
- #~ msgstr "Na této adrese nebylo nic nalezeno"
333
-
334
- #, fuzzy
335
- #~ msgid "Add new scheduling rule"
336
- #~ msgstr "Přidat nové plánované pravidlo"
337
-
338
- #, fuzzy
339
- #~ msgctxt "Format of a scheduling rule"
340
- #~ msgid "Weekly"
341
- #~ msgstr "Týdně"
342
-
343
- #, fuzzy
344
- #~ msgctxt "Format of a scheduling rule"
345
- #~ msgid "Monthly"
346
- #~ msgstr "Měsíčně"
347
-
348
- #, fuzzy
349
- #~ msgctxt "Format of a scheduling rule"
350
- #~ msgid "Date"
351
- #~ msgstr "Datum"
352
-
353
- #, fuzzy
354
- #~ msgctxt "Label for selecting days of the week in a scheduling rule"
355
- #~ msgid "Days of the week"
356
- #~ msgstr "Dny v týdnu"
357
-
358
- #, fuzzy
359
- #~ msgctxt "Label for selecting weeks of the month in a scheduling rule"
360
- #~ msgid "Weeks of the month"
361
- #~ msgstr "Týdny v měsíci"
362
-
363
- #, fuzzy
364
- #~ msgid "Date"
365
- #~ msgstr "Datum"
366
-
367
- #, fuzzy
368
- #~ msgctxt "Label to select time slot for a scheduling rule"
369
- #~ msgid "Time"
370
- #~ msgstr "Čas"
371
-
372
- #, fuzzy
373
- #~ msgctxt "Label to set a scheduling rule to last all day"
374
- #~ msgid "All day"
375
- #~ msgstr "Celý den"
376
-
377
- #, fuzzy
378
- #~ msgctxt "Label for the starting time of a scheduling rule"
379
- #~ msgid "Start"
380
- #~ msgstr "Začátek"
381
-
382
- #, fuzzy
383
- #~ msgctxt "Label for the ending time of a scheduling rule"
384
- #~ msgid "End"
385
- #~ msgstr "Konec"
386
-
387
- #, fuzzy
388
- #~ msgctxt ""
389
- #~ "Prompt displayed when a scheduling rule is set without any time restrictions."
390
- #~ msgid ""
391
- #~ "All day long. Want to <a href=\"#\" data-format=\"time-slot\">set a time "
392
- #~ "slot</a>?"
393
- #~ msgstr ""
394
- #~ "Celý den. Chcete <a href=\"#\" data-format=\"time-slot\">nastavit čas</a>?"
395
-
396
- #, fuzzy
397
- #~ msgid "Open and close this rule"
398
- #~ msgstr "Otevřít a zavřít toto pravidlo"
399
-
400
- #, fuzzy
401
- #~ msgid "Delete rule"
402
- #~ msgstr "Smazat pravidlo"
403
-
404
- #, fuzzy
405
- #~ msgid "Delete scheduling rule"
406
- #~ msgstr "Smazat plánované pravidlo"
407
-
408
- #, fuzzy
409
- #~ msgctxt ""
410
- #~ "Brief default description of a scheduling rule when no weekdays or weeks are "
411
- #~ "included in the rule."
412
- #~ msgid "Never"
413
- #~ msgstr "Nikdy"
414
-
415
- #, fuzzy
416
- #~ msgctxt ""
417
- #~ "Brief default description of a scheduling rule when all the weekdays/weeks "
418
- #~ "are included in the rule."
419
- #~ msgid "Every day"
420
- #~ msgstr "Každý den"
421
-
422
- #, fuzzy
423
- #~ msgctxt ""
424
- #~ "Brief default description of a scheduling rule when some weekdays are "
425
- #~ "included on only some weeks of the month. The {days} and {weeks} bits should "
426
- #~ "be left alone and will be replaced by a comma-separated list of days (the "
427
- #~ "first one) and weeks (the second one) in the following format: M, T, W on "
428
- #~ "the first, second week of the month"
429
- #~ msgid "{days} on the {weeks} week of the month"
430
- #~ msgstr "{days} v {weeks} týden v měsíci"
431
-
432
- #, fuzzy
433
- #~ msgctxt ""
434
- #~ "Brief description of a scheduling rule when some weeks of the month are "
435
- #~ "included but all or no weekdays are selected. {weeks} should be left alone "
436
- #~ "and will be replaced by a comma-separated list of weeks (the second one) in "
437
- #~ "the following format: First, second week of the month"
438
- #~ msgid "{weeks} week of the month"
439
- #~ msgstr "{weeks} týdnů v měsíci"
440
-
441
- #, fuzzy
442
- #~ msgctxt "Brief default description of a scheduling rule when no times are set"
443
- #~ msgid "All day"
444
- #~ msgstr "Celý den"
445
-
446
- #, fuzzy
447
- #~ msgctxt ""
448
- #~ "Brief default description of a scheduling rule when an end time is set but "
449
- #~ "no start time. If the end time is 6pm, it will read: Ends at 6pm."
450
- #~ msgid "Ends at"
451
- #~ msgstr "Konec v"
452
-
453
- #, fuzzy
454
- #~ msgctxt ""
455
- #~ "Brief default description of a scheduling rule when a start time is set but "
456
- #~ "no end time. If the start time is 6pm, it will read: Starts at 6pm."
457
- #~ msgid "Starts at"
458
- #~ msgstr "Začátek v"
459
-
460
- #, fuzzy
461
- #~ msgctxt "Default separator between times of a scheduling rule."
462
- #~ msgid "&mdash;"
463
- #~ msgstr "&mdash;"
464
-
465
- #~ msgid "Author: %s"
466
- #~ msgstr "Autor: %s"
467
-
468
- #~ msgid "Day: %s"
469
- #~ msgstr "Den: %s"
470
-
471
- #~ msgid "Month: %s"
472
- #~ msgstr "Měsíc: %s"
473
-
474
- #~ msgid "Year: %s"
475
- #~ msgstr "Rok: %s"
476
-
477
- #~ msgid "Reviews: "
478
- #~ msgstr "Recenze: "
479
-
480
- #~ msgid "Archives: "
481
- #~ msgstr "Archivy:"
482
-
483
- #~ msgid "Archives"
484
- #~ msgstr "Archivy"
485
-
486
- #~ msgid "%1$s comment"
487
- #~ msgid_plural "%1$s comments"
488
- #~ msgstr[0] "%1$s komentář"
489
- #~ msgstr[1] "%1$s komentáře"
490
- #~ msgstr[2] "%1$s komentářů"
491
-
492
- #~ msgid "Comment navigation"
493
- #~ msgstr "Navigace v komentářích"
494
-
495
- #~ msgid ""
496
- #~ "<span class=\"dashicons dashicons-arrow-left-alt2\"></span> Older Comments"
497
- #~ msgstr ""
498
- #~ "<span class=\"dashicons dashicons-arrow-left-alt2\"></span> Starší komentáře"
499
-
500
- #~ msgid ""
501
- #~ "Newer Comments <span class=\"dashicons dashicons-arrow-right-alt2\"></span>"
502
- #~ msgstr ""
503
- #~ "Novější komentáře <span class=\"dashicons dashicons-arrow-right-alt2\"></"
504
- #~ "span>"
505
-
506
- #~ msgid "Comments are closed."
507
- #~ msgstr "Nelze přidávat komentáře."
508
-
509
- #~ msgid "Leave a Comment"
510
- #~ msgstr "Přidat komentář"
511
-
512
- #~ msgid "Reply to %s"
513
- #~ msgstr "Odpovědět na %s"
514
-
515
- #~ msgid "404 Page Not Found"
516
- #~ msgstr "Chyba 404"
517
-
518
- #~ msgid ""
519
- #~ "Nothing was found at this location. Try searching below or browse the site "
520
- #~ "using the menu above."
521
- #~ msgstr ""
522
- #~ "Nic nebylo nalezeno. zkuste vyhledávání nebo použijte k navigaci na stránce "
523
- #~ "menu."
524
-
525
- #~ msgid "Read more"
526
- #~ msgstr "Číst dále"
527
-
528
- #~ msgid "Review by "
529
- #~ msgstr "Recenze od"
530
-
531
- #~ msgid "Edit Post"
532
- #~ msgstr "Upravit příspěvek"
533
-
534
- #~ msgid "Nothing Found"
535
- #~ msgstr "Nic nebylo nalezeno"
536
-
537
- #~ msgid ""
538
- #~ "Sorry, but nothing matched your search terms. Please try to search using "
539
- #~ "different keywords or browse the site using the navigation menu."
540
- #~ msgstr ""
541
- #~ "Je nám líto, ale na Váš dotaz nebyly nalezeny žádné výsledky. Zkuste použít "
542
- #~ "jiná klíčová slova nebo zkuste najít výsledek na stránce za pomoci menu."
543
-
544
- #~ msgid ""
545
- #~ "Ready to publish your first post? <a href=\"%1$s\">Get started here</a>."
546
- #~ msgstr ""
547
- #~ "Připraveni zveřejnit svůj první příspěvek? <a href=\"%1$s\">Zde můžete "
548
- #~ "začít</a>."
549
-
550
- #~ msgid ""
551
- #~ "Sorry, we were unable to find anything at this page. Please try to browse "
552
- #~ "the site using the navigation menu or search for what you want."
553
- #~ msgstr ""
554
- #~ "Je nám líto, na této stránce jsme nic nenalezli. Zkuste použít menu nebo "
555
- #~ "vyhledat požadovaný výsledek."
556
-
557
- #~ msgid "Sticky"
558
- #~ msgstr "Sticky"
559
-
560
- #~ msgid "Last updated on %1$s"
561
- #~ msgstr "Naposledy aktualizováno %1$s"
562
-
563
- #~ msgid ", "
564
- #~ msgstr ", "
565
-
566
- #~ msgid "Categories:"
567
- #~ msgstr "Kategorie:"
568
-
569
- #~ msgid "Tags:"
570
- #~ msgstr "Štítky:"
571
-
572
- #~ msgid "Primary Sidebar"
573
- #~ msgstr "Hlavní postranní panel"
574
-
575
- #~ msgid "This sidebar will appear beside most pages and posts"
576
- #~ msgstr ""
577
- #~ "Ten postranní panel se bude zobrazovat vedle vetšiny stránek a příspěvků"
578
-
579
- #~ msgid "Page %s"
580
- #~ msgstr "Stránka %s"
581
-
582
- #~ msgid ""
583
- #~ "This content is password protected. To view it please enter your password "
584
- #~ "below:"
585
- #~ msgstr "Tento obsah je chráněn heslem. Zadejte heslo pro jeho zobrazení."
586
-
587
- #~ msgid "Password:"
588
- #~ msgstr "Heslo:"
589
-
590
- #~ msgid "Submit"
591
- #~ msgstr "Přidat"
592
-
593
- #~ msgid "This sidebar will appear under the %s Footer Panel."
594
- #~ msgstr "Tento postranní panel se zobrazí pod %s panelem zápatí."
595
-
596
- #~ msgid "Skip to content"
597
- #~ msgstr "Přejít na obsah"
598
-
599
- #~ msgid "Browse"
600
- #~ msgstr "Prohlížet"
601
-
602
- #~ msgid "Sorry, no post could be found matching your request."
603
- #~ msgstr "Je nám líto, na Váš dotaz nebyl nalezen žádný výsledek."
604
-
605
- #~ msgid "This request was invalid. Please try again."
606
- #~ msgstr "Neplatný požadavek. Zkuste to prosím znovu."
607
-
608
- #~ msgid "You have been logged out. Please login again to customize your site."
609
- #~ msgstr "Byl jste odhlášen. Pro úpravu stránky se prosím znovu přihlašte."
610
-
611
- #~ msgid ""
612
- #~ "You do not have permission to modify the theme settings. Please login to an "
613
- #~ "administrator account if you have one."
614
- #~ msgstr ""
615
- #~ "Nemáte povolení upravovat nastavení tohoto tématu. Prosíme, přihlašte se "
616
- #~ "administrátorským účtem."
617
-
618
- #~ msgid ""
619
- #~ "There was an unexpected error with the request. Please try another option."
620
- #~ msgstr "Nastala neočekávaná chyba ve vašem požadavku. Zkuste jinou možnost."
621
-
622
- #~ msgid "Site Title"
623
- #~ msgstr "Název stránky"
624
-
625
- #~ msgid "Logo"
626
- #~ msgstr "Logo"
627
-
628
- #~ msgid "Upload a logo"
629
- #~ msgstr "Nahrát logo"
630
-
631
- #~ msgid "Call to Action"
632
- #~ msgstr "Povolat do akce"
633
-
634
- #~ msgid "Customize the call to action text on the front page."
635
- #~ msgstr "Přizpůsobit text \"povolat do akce\" na hlavní stránce."
636
-
637
- #~ msgid "Text"
638
- #~ msgstr "Text"
639
-
640
- #~ msgid "Button Text"
641
- #~ msgstr "Text na tlačítku"
642
-
643
- #~ msgid "Button Target"
644
- #~ msgstr "Cíl tlačítka"
645
-
646
- #~ msgid "Display Options"
647
- #~ msgstr "Zobrazit možnosti"
648
-
649
- #~ msgid "Customize the layout of your site."
650
- #~ msgstr "Přizpůsobit šablonu vaší stránky."
651
-
652
- #~ msgid "Sidebar"
653
- #~ msgstr "Postranní panel"
654
-
655
- #~ msgid "Show sidebar"
656
- #~ msgstr "Zobrazit postranní panel"
657
-
658
- #~ msgid "Hide sidebar"
659
- #~ msgstr "Skrýt postranní panel"
660
-
661
- #~ msgid "Nothing"
662
- #~ msgstr "Nic"
663
-
664
- #~ msgid "Map"
665
- #~ msgstr "Mapa"
666
-
667
- #~ msgid "Booking Form"
668
- #~ msgstr "Rezervační formulář"
669
-
670
- #~ msgid "Random Review"
671
- #~ msgstr "Náhodná recenze"
672
-
673
- #~ msgid "Custom Widget Area"
674
- #~ msgstr "Přizpůsobit oblast widgetů"
675
-
676
- #~ msgid "Colors"
677
- #~ msgstr "Barvy"
678
-
679
- #~ msgid "Link color"
680
- #~ msgstr "Barva odkazu"
681
-
682
- #~ msgid "Background color"
683
- #~ msgstr "Barva pozadí"
684
-
685
- #~ msgid "Demo content for %s successfully installed."
686
- #~ msgstr "Demoverze obsahu pro %s byla úspěšně nainstalována."
687
-
688
- #~ msgid ""
689
- #~ "There was an error and some of the demo content for %s may not have "
690
- #~ "installed correctly."
691
- #~ msgstr ""
692
- #~ "Došlo k chybě a část demoverze pro %s nemusela být nainstalována správně."
693
-
694
- #~ msgid ""
695
- #~ "You must install the plugin %s before you can install and view the demo "
696
- #~ "content."
697
- #~ msgstr ""
698
- #~ "Před instalováním a prohlížením demoverze obsahu musíte mít nainstalovaný "
699
- #~ "plugin %s."
700
-
701
- #~ msgid "Install demo content for the %s plugin."
702
- #~ msgstr "Nainstalovat demoverzi pro plugin %s."
703
-
704
- #~ msgid "View demo page"
705
- #~ msgstr "Ukázat demoverzi stránky."
706
-
707
- #~ msgid "Install demo content for the %s plugins."
708
- #~ msgstr "Nainstalovat demoverzi obsahu pro pluginy %s."
709
-
710
- #~ msgid "Install Required Plugins"
711
- #~ msgstr "Nainstalovat požadované pluginy"
712
-
713
- #~ msgid "Install Plugins"
714
- #~ msgstr "Instalovat pluginy"
715
-
716
- #~ msgid "Installing Plugin: %s"
717
- #~ msgstr "Instalovat plugin: %s"
718
-
719
- #~ msgid "Something went wrong with the plugin API."
720
- #~ msgstr "Nastala chyba s pluginem API."
721
-
722
- #~ msgid "This theme requires the following plugin: %1$s."
723
- #~ msgid_plural "This theme requires the following plugins: %1$s."
724
- #~ msgstr[0] "Toto téma vyžaduje následující plugin: %1$s."
725
- #~ msgstr[1] "Toto téma vyžaduje následující pluginy: %1$s."
726
- #~ msgstr[2] "Toto téma vyžaduje následující pluginy: %1$s."
727
-
728
- #~ msgid "This theme recommends the following plugin: %1$s."
729
- #~ msgid_plural "This theme recommends the following plugins: %1$s."
730
- #~ msgstr[0] ""
731
- #~ "Pro toto téma je doporučen následující plugin: %1$s.Toto téma doporučuje "
732
- #~ "následující plugin: %1$s."
733
- #~ msgstr[1] "Pro toto téma jsou doporučeny následující pluginy: %1$s."
734
- #~ msgstr[2] "Pro toto téma jsou doporučeny následující pluginy: %1$s."
735
-
736
- #~ msgid ""
737
- #~ "Sorry, but you do not have the correct permissions to install the %s plugin. "
738
- #~ "Contact the administrator of this site for help on getting the plugin "
739
- #~ "installed."
740
- #~ msgid_plural ""
741
- #~ "Sorry, but you do not have the correct permissions to install the %s "
742
- #~ "plugins. Contact the administrator of this site for help on getting the "
743
- #~ "plugins installed."
744
- #~ msgstr[0] ""
745
- #~ "Je nám líto, ale nemáte povolení k instalaci pluginu %s. Pro instalaci "
746
- #~ "pluginu kontaktujte administrátora stránky."
747
- #~ msgstr[1] ""
748
- #~ "Je nám líto, ale nemáte povolení k instalaci pluginů %s. Pro instalaci "
749
- #~ "pluginu kontaktujte administrátora stránky."
750
- #~ msgstr[2] ""
751
- #~ "Je nám líto, ale nemáte povolení k instalaci pluginů %s. Pro instalaci "
752
- #~ "pluginu kontaktujte administrátora stránky."
753
-
754
- #~ msgid "The following required plugin is currently inactive: %1$s."
755
- #~ msgid_plural "The following required plugins are currently inactive: %1$s."
756
- #~ msgstr[0] "Následující plugin je dočasně neaktivní: %1$s."
757
- #~ msgstr[1] "Následující pluginy jsou dočasně neaktivní: %1$s."
758
- #~ msgstr[2] "Následující pluginy jsou dočasně neaktivní: %1$s."
759
-
760
- #~ msgid "The following recommended plugin is currently inactive: %1$s."
761
- #~ msgid_plural "The following recommended plugins are currently inactive: %1$s."
762
- #~ msgstr[0] "Následující doporučený plugin je dočasně neaktivní: %1$s."
763
- #~ msgstr[1] "Následující doporučené pluginy jsou dočasně neaktivní: %1$s."
764
- #~ msgstr[2] "Následující doporučené pluginy jsou dočasně neaktivní: %1$s."
765
-
766
- #~ msgid ""
767
- #~ "Sorry, but you do not have the correct permissions to activate the %s "
768
- #~ "plugin. Contact the administrator of this site for help on getting the "
769
- #~ "plugin activated."
770
- #~ msgid_plural ""
771
- #~ "Sorry, but you do not have the correct permissions to activate the %s "
772
- #~ "plugins. Contact the administrator of this site for help on getting the "
773
- #~ "plugins activated."
774
- #~ msgstr[0] ""
775
- #~ "Je nám líto, ale nemáte povolení k aktivaci pluginu %s. K aktivaci tohoto "
776
- #~ "pluginu kontaktujte administrátora stránky. "
777
- #~ msgstr[1] ""
778
- #~ "Je nám líto, ale nemáte povolení k aktivaci pluginů %s. K aktivaci těchto "
779
- #~ "pluginů kontaktujte administrátora stránky. "
780
- #~ msgstr[2] ""
781
- #~ "Je nám líto, ale nemáte povolení k aktivaci pluginů %s. K aktivaci těchto "
782
- #~ "pluginů kontaktujte administrátora stránky. "
783
-
784
- #~ msgid ""
785
- #~ "The following plugin needs to be updated to its latest version to ensure "
786
- #~ "maximum compatibility with this theme: %1$s."
787
- #~ msgid_plural ""
788
- #~ "The following plugins need to be updated to their latest version to ensure "
789
- #~ "maximum compatibility with this theme: %1$s."
790
- #~ msgstr[0] ""
791
- #~ "K dosažení maximální kompatibility s tímto tématem musí být následující "
792
- #~ "plugin aktualizován na nejnovější verzi: %1$s."
793
- #~ msgstr[1] ""
794
- #~ "K dosažení maximální kompatibility s tímto tématem musí být následující "
795
- #~ "pluginy aktualizovány na nejnovější verzi: %1$s."
796
- #~ msgstr[2] ""
797
- #~ "K dosažení maximální kompatibility s tímto tématem musí být následující "
798
- #~ "pluginy aktualizovány na nejnovější verzi: %1$s."
799
-
800
- #~ msgid ""
801
- #~ "Sorry, but you do not have the correct permissions to update the %s plugin. "
802
- #~ "Contact the administrator of this site for help on getting the plugin "
803
- #~ "updated."
804
- #~ msgid_plural ""
805
- #~ "Sorry, but you do not have the correct permissions to update the %s plugins. "
806
- #~ "Contact the administrator of this site for help on getting the plugins "
807
- #~ "updated."
808
- #~ msgstr[0] ""
809
- #~ "Je nám líto, ale nemáte povolení k aktivaci pluginu %s. K aktivaci tohoto "
810
- #~ "pluginu kontaktujte administrátora stránky. "
811
- #~ msgstr[1] ""
812
- #~ "Je nám líto, ale nemáte povolení k aktualizaci pluginů %s. K aktualizaci "
813
- #~ "těchto pluginů kontaktujte administrátora stránky."
814
- #~ msgstr[2] ""
815
- #~ "Je nám líto, ale nemáte povolení k aktualizaci pluginů %s. K aktualizaci "
816
- #~ "těchto pluginů kontaktujte administrátora stránky."
817
-
818
- #~ msgid "Begin installing plugin"
819
- #~ msgid_plural "Begin installing plugins"
820
- #~ msgstr[0] "Instalovat plugin"
821
- #~ msgstr[1] "Instalovat pluginy"
822
- #~ msgstr[2] "Instalovat pluginy"
823
-
824
- #~ msgid "Begin activating plugin"
825
- #~ msgid_plural "Begin activating plugins"
826
- #~ msgstr[0] "Aktivovat plugin"
827
- #~ msgstr[1] "Aktivovat pluginy"
828
- #~ msgstr[2] "Aktivovat pluginy"
829
-
830
- #~ msgid "Return to Required Plugins Installer"
831
- #~ msgstr "Vrátit se k instalátoru potřebných pluginů"
832
-
833
- #~ msgid "Plugin activated successfully."
834
- #~ msgstr "Plugin byl úspěšně aktualizován."
835
-
836
- #~ msgid "All plugins installed and activated successfully. %s"
837
- #~ msgstr "Všechny pluginy byly úspěšně nainstalovány a aktivovány. %s"
838
-
839
- #~ msgid "Getting Started"
840
- #~ msgstr "Začít"
841
-
842
- #~ msgid ""
843
- #~ "This section will help you get up and running quickly. It will only cover "
844
- #~ "things specific to this theme and its bundled plugins. If you're new to "
845
- #~ "WordPress, check out the <a href=\"http://easywpguide.com/\">Easy WP Guide</"
846
- #~ "a> for basic tips on how to use WordPress."
847
- #~ msgstr ""
848
- #~ "Tato sekce vám pomůže s rychlým nastavením. Pokrývá pouze věci specifické "
849
- #~ "pro toto téma a související pluginy. Pokud pracujete s WordPressem poprvé, "
850
- #~ "podívejte se na <a href=\"http://easywpguide.com/\">Krátkou příručku</a> pro "
851
- #~ "základní tipy, jak používat WordPress."
852
-
853
- #~ msgid "Activate Plugins"
854
- #~ msgstr "Aktivovat pluginy"
855
-
856
- #~ msgid "Learn how to install and activate the plugins bundled with this theme."
857
- #~ msgstr ""
858
- #~ "Naučte se, jak nainstalovat a aktivovat pluginy spojené s tímto tématem."
859
-
860
- #~ msgid "First Steps"
861
- #~ msgstr "První kroky"
862
-
863
- #~ msgid "Tips and advice on what to set up first."
864
- #~ msgstr "Tipy a rady, co nastavit jako první."
865
-
866
- #~ msgid "Building Your Site"
867
- #~ msgstr "Výstavba vaší stránky"
868
-
869
- #~ msgid "Theme Customizer"
870
- #~ msgstr "Přizpůsobení tématu"
871
-
872
- #~ msgid "How to use the Theme Customizer to change the colors, layout and more."
873
- #~ msgstr "Jak měnit barvy, šablonu a ostatní za pomocí Přizpůsobení tématu."
874
-
875
- #~ msgid "Plugins"
876
- #~ msgstr "Pluginy"
877
-
878
- #~ msgid ""
879
- #~ "An introduction to the plugins which power this theme and how to use them."
880
- #~ msgstr "Úvod do pluginů, které jsou spojeny s tímto tématem, a jejich použití"
881
-
882
- #~ msgid "Social Media Menu"
883
- #~ msgstr "Menu sociálních médií"
884
-
885
- #~ msgid ""
886
- #~ "Use the built-in social media menu to display links to your social profiles."
887
- #~ msgstr ""
888
- #~ "Použijte vestavěné menu sociálních médií k uobrazení odkazů na vaše sociální "
889
- #~ "profily."
890
-
891
- #~ msgid "Advanced Topics"
892
- #~ msgstr "Pokročilá témata."
893
-
894
- #~ msgid ""
895
- #~ "Get the most out of your theme by learning about some of the ideas powering "
896
- #~ "it."
897
- #~ msgstr ""
898
- #~ "Dostaňte ze svého tématu maximum a zjistěte něco o myšlenkách, které za ním "
899
- #~ "stojí."
900
-
901
- #~ msgid "Responsive Design"
902
- #~ msgstr "Responsivní design "
903
-
904
- #~ msgid "Make sure your site looks its best across all devices."
905
- #~ msgstr "Ujistěte se, že vaše stránky vypadá perfektně na všech zařízeních."
906
-
907
- #~ msgid "Child Themes"
908
- #~ msgstr "Dětská témata."
909
-
910
- #~ msgid "Ensure your site updates safely with child themes."
911
- #~ msgstr ""
912
- #~ "Ujistěte se, že se vaše stránky bezpečně aktualizuje s dětskými tématy."
913
-
914
- #~ msgid "Theme Help"
915
- #~ msgstr "Pomoc s tématy"
916
-
917
- #~ msgid "Support"
918
- #~ msgstr "Podpora"
919
-
920
- #~ msgid ""
921
- #~ "<a href=\"http://themeofthecrop.com/about/support\">Get one-on-one support</"
922
- #~ "a> if you're having any trouble or need customizations done."
923
- #~ msgstr ""
924
- #~ "<a href=\"http://themeofthecrop.com/about/support\">Kontaktujte podporu "
925
- #~ "jeden-na-jednoho,</a> pokud máte nějaké potíže nebo potřebujete pomoct s "
926
- #~ "přizpůsobením."
927
-
928
- #~ msgid "Return to the main page"
929
- #~ msgstr "Vrátit se na hlavní stránku"
930
-
931
- #~ msgid "Theme License"
932
- #~ msgstr "Licence tématu"
933
-
934
- #~ msgid "License Key"
935
- #~ msgstr "Klíč licence"
936
-
937
- #~ msgid ""
938
- #~ "Enter the license key provided when purchasing this theme to receive updates."
939
- #~ msgstr ""
940
- #~ "Pro aktualizace vložte klíč tématu, který jste získali při nákupu šablony."
941
-
942
- #~ msgid "Activate License"
943
- #~ msgstr "aktivovat licenci"
944
-
945
- #~ msgid "No license key provided"
946
- #~ msgstr "Nebylo vložen klíč licence"
947
-
948
- #~ msgid ""
949
- #~ "License key not found. Please check to make sure it was entered correctly."
950
- #~ msgstr ""
951
- #~ "Klíč licence nebyl nalezen. Ujistěte se prosím, jestli byl zadán správně."
952
-
953
- #~ msgid ""
954
- #~ "The license you have entered is not for this this theme. Please check the "
955
- #~ "license again to make sure you have entered the correct key."
956
- #~ msgstr ""
957
- #~ "Licence, kterou jste zadali, není platná pro toto téma. Zkontrolujte prosím "
958
- #~ "znovu svou licenci, abyste se ujistili, že zadáváte správný klíč."
959
-
960
- #~ msgid "Active"
961
- #~ msgstr "Aktivní"
962
-
963
- #~ msgid "Expiry: "
964
- #~ msgstr "Aktivní do:"
965
-
966
- #~ msgid "Deactivate License"
967
- #~ msgstr "Zrušit licenci"
968
-
969
- #~ msgid "Inactive"
970
- #~ msgstr "Neaktivní"
971
-
972
- #~ msgid "Theme Setup"
973
- #~ msgstr "Nastavení tématu"
974
-
975
- #~ msgid "Demo Content"
976
- #~ msgstr "Demo obsah"
977
-
978
- #~ msgid "Food and Drink Menu"
979
- #~ msgstr "Jídlo a pití"
980
-
981
- #~ msgid ""
982
- #~ "You must <a href=\"?page=tgmpa-install-plugins\">install and activate</a> "
983
- #~ "the plugins <em>Food and Drink Menu</em> and <em>Food and Drink Menu Pro</"
984
- #~ "em> before you can install and view the demo content."
985
- #~ msgstr ""
986
- #~ "Musíte <a href=\"?page=tgmpa-install-plugins\">instalovat a aktivovat</a> "
987
- #~ "pluginy <em>Jídlo a pití</em> and <em>Jídlo a pití Pro</em> než budete moct "
988
- #~ "nainstalovat a prohlížet demo obsah."
989
-
990
- #~ msgid "Restaurant Reservations"
991
- #~ msgstr "Rezervace"
992
-
993
- #~ msgid ""
994
- #~ "You must <a href=\"?page=tgmpa-install-plugins\">install and activate</a> "
995
- #~ "the plugin <em>Restaurant Reservations</em> before you can install and view "
996
- #~ "the demo content."
997
- #~ msgstr ""
998
- #~ "Musíte <a href=\"?page=tgmpa-install-plugins\">instalovat a aktivovat</a> "
999
- #~ "plugin <em>Rezervace</em> než budete moct nainstalovat a prohlížet demo "
1000
- #~ "obsah."
1001
-
1002
- #~ msgid "Good Reviews for WordPress"
1003
- #~ msgstr "Dobré rezervace pro Wordpress"
1004
-
1005
- #~ msgid ""
1006
- #~ "You must <a href=\"?page=tgmpa-install-plugins\">install and activate</a> "
1007
- #~ "the plugin <em>Good Reviews for WordPress</em> before you can install and "
1008
- #~ "view the demo content."
1009
- #~ msgstr ""
1010
- #~ "Musíte <a href=\"?page=tgmpa-install-plugins\">instalovat a aktivovat</a> "
1011
- #~ "plugin <em>dobré rezervace pro Wordpress</em> než budete moct nainstalovat a "
1012
- #~ "prohlížet demo obsah."
1013
-
1014
- #~ msgid ""
1015
- #~ "You must <a href=\"?page=tgmpa-install-plugins\">install and activate</a> "
1016
- #~ "the plugin <em>Business Profile</em> before you can install and view the "
1017
- #~ "demo content."
1018
- #~ msgstr ""
1019
- #~ "Musíte <a href=\"?page=tgmpa-install-plugins\">instalovat a aktivovat</a> "
1020
- #~ "plugin <em>Business profil</em> než budete moct nainstalovat a prohlížet "
1021
- #~ "demo obsah."
1022
-
1023
- #~ msgid "Documentation & Support"
1024
- #~ msgstr "Dokumentace a podpora"
1025
-
1026
- #~ msgid "Documentation"
1027
- #~ msgstr "Dokumentace"
1028
-
1029
- #~ msgid "View the documentation for this theme"
1030
- #~ msgstr "Prohlížet dokumentaci pro toto téma"
1031
-
1032
- #~ msgid "Get one-on-one support"
1033
- #~ msgstr "Kontaktovat podporu jeden-na-jednoho"
1034
-
1035
- #~ msgid "if you're having any trouble or need customizations done."
1036
- #~ msgstr "pokud máte potíže nebo potřebujete pomoct s přizpůsobením."
1037
-
1038
- #~ msgid "Demo"
1039
- #~ msgstr "Demo"
1040
-
1041
- #~ msgid "View an online demo of this theme"
1042
- #~ msgstr "Prohlédnout online demo tohoto tématu"
1043
-
1044
- #~ msgid "List navigation"
1045
- #~ msgstr "Procházet navigaci"
1046
-
1047
- #~ msgid "<span class=\"dashicons dashicons-arrow-left-alt2\"></span> Previous"
1048
- #~ msgstr "<span class=\"dashicons dashicons-arrow-left-alt2\"></span> Předchozí"
1049
-
1050
- #~ msgid "Next <span class=\"dashicons dashicons-arrow-right-alt2\"></span>"
1051
- #~ msgstr "Další <span class=\"dashicons dashicons-arrow-right-alt2\"></span>"
1052
-
1053
- #~ msgid ""
1054
- #~ "Updating this theme will lose any customizations you have made. 'Cancel' to "
1055
- #~ "stop, 'OK' to update."
1056
- #~ msgstr ""
1057
- #~ "Aktualizací tohoto tématu ztratíte veškeré změny. \"Cancel\" pro zrušení, "
1058
- #~ "\"OK\" pro aktualizaci. "
1059
-
1060
- #~ msgid "Something went wrong."
1061
- #~ msgstr "Došlo k chybě."
1062
-
1063
- #~ msgid "Return to the dashboard"
1064
- #~ msgstr "Vrátit se na nástěnku"
1065
-
1066
- #~ msgid "The following plugin was activated successfully:"
1067
- #~ msgstr "Následující plugin byl úspěšně aktivován: "
1068
-
1069
- #~ msgid "All plugins installed and activated successfully. %1$s"
1070
- #~ msgstr "Všechny pluginy byly úspěšně nainstalovány a aktivovány. %1$s"
1071
-
1072
- #~ msgid "Dismiss this notice"
1073
- #~ msgstr "Zneviditelnit poznámku"
1074
-
1075
- #~ msgid "Return to the Dashboard"
1076
- #~ msgstr "Vrátit se na nástěnku"
1077
-
1078
- #~ msgid "Private Repository"
1079
- #~ msgstr "Soukromý repozitář"
1080
-
1081
- #~ msgid "Pre-Packaged"
1082
- #~ msgstr "Předbalený"
1083
-
1084
- #~ msgid "WordPress Repository"
1085
- #~ msgstr "Repozitář WordPressu"
1086
-
1087
- #~ msgid "Required"
1088
- #~ msgstr "Požadovaný"
1089
-
1090
- #~ msgid "Recommended"
1091
- #~ msgstr "Doporučený"
1092
-
1093
- #~ msgid "Not Installed"
1094
- #~ msgstr "Neinstalovaný"
1095
-
1096
- #~ msgid "Installed But Not Activated"
1097
- #~ msgstr "Instalovaný, ale ne aktivovaný"
1098
-
1099
- #~ msgid "Install"
1100
- #~ msgstr "Instalovat"
1101
-
1102
- #~ msgid "Activate"
1103
- #~ msgstr "Aktivovat"
1104
-
1105
- #~ msgid ""
1106
- #~ "No plugins to install or activate. <a href=\"%1$s\" title=\"Return to the "
1107
- #~ "Dashboard\">Return to the Dashboard</a>"
1108
- #~ msgstr ""
1109
- #~ "Žádné pluginy k instalaci nebo aktivaci. <a href=\"%1$s\" title=\"Vrátit se "
1110
- #~ "na nástěnku\">Vrátit se na nástěnku</a>"
1111
-
1112
- #~ msgid "Plugin"
1113
- #~ msgstr "Plugin"
1114
-
1115
- #~ msgid "Source"
1116
- #~ msgstr "Zdroj"
1117
-
1118
- #~ msgid "Type"
1119
- #~ msgstr "Typ"
1120
-
1121
- #~ msgid "Status"
1122
- #~ msgstr "Status"
1123
-
1124
- #~ msgid "No plugins are available to be installed at this time."
1125
- #~ msgstr "V současné chvíli nejsou k dispozici žádné pluginy k instalaci."
1126
-
1127
- #~ msgid "No plugins are available to be activated at this time."
1128
- #~ msgstr "V současné chvíli nejsou k dispozici žádné pluginy k aktivaci."
1129
-
1130
- #~ msgid "Install package not available."
1131
- #~ msgstr "Instalační balíček není k dispozici."
1132
-
1133
- #~ msgid "Downloading install package from <span class=\"code\">%s</span>&#8230;"
1134
- #~ msgstr "Stáhnout instalační balíček z <span class=\"code\">%s</span>&#8230;"
1135
-
1136
- #~ msgid "Unpacking the package&#8230;"
1137
- #~ msgstr "Rozbalování balíčku&#8230;"
1138
-
1139
- #~ msgid "Installing the plugin&#8230;"
1140
- #~ msgstr "Instalace pluginu&#8230;"
1141
-
1142
- #~ msgid "Plugin install failed."
1143
- #~ msgstr "Instalace pluginu nebyla úspěšná."
1144
-
1145
- #~ msgid "Plugin installed successfully."
1146
- #~ msgstr "Plugin byl úspěšně nainstalován."
1147
-
1148
- #~ msgid "Plugin activation failed."
1149
- #~ msgstr "Aktivace pluginu nebyla úspěšná."
1150
-
1151
- #~ msgid ""
1152
- #~ "The installation and activation process is starting. This process may take a "
1153
- #~ "while on some hosts, so please be patient."
1154
- #~ msgstr ""
1155
- #~ "Instalace a aktivaci začíná. Tento proces může trvat delší dobu, buďte "
1156
- #~ "prosím trpěliví."
1157
-
1158
- #~ msgid "%1$s installed and activated successfully."
1159
- #~ msgstr "%1$s byl úspěšně nainstalován a aktivován."
1160
-
1161
- #~ msgid "Show Details"
1162
- #~ msgstr "Ukázat detaily"
1163
-
1164
- #~ msgid "Hide Details"
1165
- #~ msgstr "Skrýt detaily"
1166
-
1167
- #~ msgid "All installations and activations have been completed."
1168
- #~ msgstr "Všechny instalace a aktivace byly úspěšně dokončeny."
1169
-
1170
- #~ msgid "Installing and Activating Plugin %1$s (%2$d/%3$d)"
1171
- #~ msgstr "Instalace a aktivaci pluginu %1$s (%2$d/%3$d)"
1172
-
1173
- #~ msgid ""
1174
- #~ "The installation process is starting. This process may take a while on some "
1175
- #~ "hosts, so please be patient."
1176
- #~ msgstr ""
1177
- #~ "Instalační proces začíná. Tento proces může trvat delší dobu, buďte prosím "
1178
- #~ "trpěliví."
1179
-
1180
- #~ msgid "An error occurred while installing %1$s: <strong>%2$s</strong>."
1181
- #~ msgstr "Při instalaci došlo k chybě %1$s: <strong>%2$s</strong>."
1182
-
1183
- #~ msgid "The installation of %1$s failed."
1184
- #~ msgstr "Instalace %1$s nebyla úspěšná."
1185
-
1186
- #~ msgid "%1$s installed successfully."
1187
- #~ msgstr "%1$s byl nainstalován úspěšně."
1188
-
1189
- #~ msgid "All installations have been completed."
1190
- #~ msgstr "Všechny instalace byly úspěšně dokončeny."
1191
-
1192
- #~ msgid "Installing Plugin %1$s (%2$d/%3$d)"
1193
- #~ msgstr "Instalace pluginu %1$s (%2$d/%3$d)"
1194
-
1195
- #~ msgid "Search results for: %s"
1196
- #~ msgstr "Hledat výsledky pro: %s"
1197
-
1198
- #~ msgid "The Spot"
1199
- #~ msgstr "The Spot"
1200
-
1201
- #~ msgid "http://themeofthecrop.com"
1202
- #~ msgstr "http://themeofthecrop.com"
1203
-
1204
- #~ msgid ""
1205
- #~ "A confident, vibrant theme for bars, gastropubs, destination restaurants and "
1206
- #~ "any venue with an active vibe."
1207
- #~ msgstr ""
1208
- #~ "A confident, vibrant theme for bars, gastropubs, destination restaurants and "
1209
- #~ "any venue with an active vibe."
1210
-
1211
- #~ msgid "Theme of the Crop"
1212
- #~ msgstr "Theme of the Crop"
1213
-
1214
- #~ msgid "Full Width"
1215
- #~ msgstr "Full Width"
1216
-
1217
- #~ msgctxt "monthly archives date format"
1218
- #~ msgid "F Y"
1219
- #~ msgstr "F Y"
1220
-
1221
- #~ msgctxt "yearly archives date format"
1222
- #~ msgid "Y"
1223
- #~ msgstr "Y"
1224
-
1225
- #~ msgctxt ""
1226
- #~ "Preserve the space at the front to separate this sentence from a pervious "
1227
- #~ "sentence. a previous sentence"
1228
- #~ msgid ""
1229
- #~ " This extra sidebar slot allows you to add another column to Footer Panel %d"
1230
- #~ msgstr ""
1231
- #~ "Tento postranní panel navíc vám umožní přidat další sloupeček do panelu "
1232
- #~ "zápatí %d"
1233
-
1234
- #~ msgctxt ""
1235
- #~ "Name of a sidebar in the footer panel. Leave the %d elements in the string "
1236
- #~ "to preserve the number of the footer panel and sidebar, eg - Footer Panel 1 "
1237
- #~ "- Sidebar 2"
1238
- #~ msgid "Footer Panel %d - Sidebar %d"
1239
- #~ msgstr "Panel zápatí %d - postranní panel %d"
1240
-
1241
- #~ msgctxt ""
1242
- #~ "Name of one of the panel settings in this theme's footer. The %d represents "
1243
- #~ "the number of the panel, from 1-4 and should be kept in any translation, eg: "
1244
- #~ "Footer Panel 1"
1245
- #~ msgid "Footer Panel %d"
1246
- #~ msgstr "Panel zápatí %d"
1247
-
1248
- #~ msgctxt ""
1249
- #~ "Name of one of the panel settings in this theme's footer. The %d represents "
1250
- #~ "the number of the panel, from 1-4 and should be kept in any translation, eg: "
1251
- #~ "Footer Panel 1 Label"
1252
- #~ msgid "Footer Panel %d Label"
1253
- #~ msgstr "Panel zápatí %d značka"
1
+ # Copyright (C) 2015 Business Profile
2
+ # This file is distributed under the same license as the Business Profile package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Business Profile 1.0.5\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/business-profile\n"
7
+ "POT-Creation-Date: 2015-02-07 19:55:06+00:00\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2015-02-07 22:35+0100\n"
12
+ "X-Generator: Poedit 1.7.4\n"
13
+ "X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;"
14
+ "_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;"
15
+ "esc_html_x:1,2c\n"
16
+ "Language: cs_CZ\n"
17
+ "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
18
+ "X-Poedit-SourceCharset: UTF-8\n"
19
+ "X-Poedit-Basepath: ../\n"
20
+ "X-Textdomain-Support: yes\n"
21
+ "Last-Translator: \n"
22
+ "Language-Team: \n"
23
+ "X-Poedit-SearchPath-0: .\n"
24
+
25
+ #: Integrations.class.php:107
26
+ msgid "Book a table"
27
+ msgstr "Zarezervovat stůl"
28
+
29
+ #: Integrations.class.php:127 Integrations.class.php:131
30
+ msgid "Show book a table link"
31
+ msgstr "Ukázat odkaz na rezervaci stolu"
32
+
33
+ #: Settings.class.php:86 Settings.class.php:87
34
+ msgid "Business Profile"
35
+ msgstr "Business profil"
36
+
37
+ #: Settings.class.php:98
38
+ msgid "Search Engine Optimization"
39
+ msgstr "Optimalizace internetových vyhledávačů"
40
+
41
+ #: Settings.class.php:108
42
+ msgid "Schema Type"
43
+ msgstr "Typ schématu"
44
+
45
+ #: Settings.class.php:109
46
+ msgid ""
47
+ "Select the option that best describes your business to improve how search "
48
+ "engines understand your website"
49
+ msgstr ""
50
+ "Vyberte možnost, která nejlépe popisuje Váš podnik, pro zlepšení pochopení "
51
+ "internetovými vyhledávači"
52
+
53
+ #: Settings.class.php:152
54
+ msgid "Contact Information"
55
+ msgstr "Kontaktní informace"
56
+
57
+ #: Settings.class.php:162
58
+ msgid "Name"
59
+ msgstr "Jméno"
60
+
61
+ #: Settings.class.php:163
62
+ msgid "Enter the name of your business if it is different than the website name."
63
+ msgstr "Vložte jméno vašeho podniku, pokud je jiné než název stránky."
64
+
65
+ #: Settings.class.php:174
66
+ msgid "Address"
67
+ msgstr "Adresa"
68
+
69
+ #: Settings.class.php:184
70
+ msgid "Phone"
71
+ msgstr "Telefon"
72
+
73
+ #: Settings.class.php:194
74
+ msgid "Contact Page"
75
+ msgstr "Kontaktní stránka"
76
+
77
+ #: Settings.class.php:195
78
+ msgid ""
79
+ "Select a page on your site where users can reach you, such as a contact form."
80
+ msgstr ""
81
+ "Vyberte stránku na Vašem webu, kde Vás mohou uživatelé kontaktovat, například "
82
+ "kontaktní formulář."
83
+
84
+ #: Settings.class.php:211
85
+ msgid "Email Address (optional)"
86
+ msgstr "Email (nepovinný údaj)"
87
+
88
+ #: Settings.class.php:212
89
+ msgid ""
90
+ "Enter an email address only if you want to display this publicly. Showing your "
91
+ "email address on your site may cause you to receive excessive spam."
92
+ msgstr ""
93
+ "Zadejte svou emailovou adresu pouze v případě, že ji chcete zobrazovat veřejně. "
94
+ "Zveřejnění emailové adresy na Vašem webu může způsobit nevyžádaný spam."
95
+
96
+ #: Settings.class.php:220
97
+ msgid "Schedule"
98
+ msgstr "Rozvrh"
99
+
100
+ #: Settings.class.php:230 template-functions.php:389
101
+ msgid "Opening Hours"
102
+ msgstr "Otevírací doba"
103
+
104
+ #: Settings.class.php:231
105
+ msgid "Define your weekly opening hours by adding scheduling rules."
106
+ msgstr "Zadejte svou týdenní otevírací dobu přidáním pravidel rozvrhu."
107
+
108
+ #: Settings.class.php:233
109
+ msgctxt "Monday abbreviation"
110
+ msgid "Mo"
111
+ msgstr "Po"
112
+
113
+ #: Settings.class.php:234
114
+ msgctxt "Tuesday abbreviation"
115
+ msgid "Tu"
116
+ msgstr "Út"
117
+
118
+ #: Settings.class.php:235
119
+ msgctxt "Wednesday abbreviation"
120
+ msgid "We"
121
+ msgstr "St"
122
+
123
+ #: Settings.class.php:236
124
+ msgctxt "Thursday abbreviation"
125
+ msgid "Th"
126
+ msgstr "Čt"
127
+
128
+ #: Settings.class.php:237
129
+ msgctxt "Friday abbreviation"
130
+ msgid "Fr"
131
+ msgstr "Pá"
132
+
133
+ #: Settings.class.php:238
134
+ msgctxt "Saturday abbreviation"
135
+ msgid "Sa"
136
+ msgstr "So"
137
+
138
+ #: Settings.class.php:239
139
+ msgctxt "Sunday abbreviation"
140
+ msgid "Su"
141
+ msgstr "Ne"
142
+
143
+ #: Settings.class.php:241
144
+ msgctxt ""
145
+ "Time format displayed in the opening hours setting panel in your admin area. "
146
+ "Must match formatting rules at http://amsul.ca/pickadate.js/time.htm#formats"
147
+ msgid "h:i A"
148
+ msgstr "H:i"
149
+
150
+ #: Settings.class.php:242
151
+ msgctxt ""
152
+ "Date format displayed in the opening hours setting panel in your admin area. "
153
+ "Must match formatting rules at http://amsul.ca/pickadate.js/date.htm#formatting-"
154
+ "rules"
155
+ msgid "d mmmm, yyyy"
156
+ msgstr "d mmmm, yyyy"
157
+
158
+ #: WP_Widget.ContactCardWidget.class.php:25
159
+ msgid "Show Name"
160
+ msgstr "Zobrazit jméno"
161
+
162
+ #: WP_Widget.ContactCardWidget.class.php:26
163
+ msgid "Show Address"
164
+ msgstr "Zobrazit adresu"
165
+
166
+ #: WP_Widget.ContactCardWidget.class.php:27
167
+ msgid "Show link to get directions on Google Maps"
168
+ msgstr "Zobrazit odkaz na Google maps"
169
+
170
+ #: WP_Widget.ContactCardWidget.class.php:28
171
+ msgid "Show Phone number"
172
+ msgstr "Zobrazit telefonní číslo"
173
+
174
+ #: WP_Widget.ContactCardWidget.class.php:29
175
+ msgid "Show contact details"
176
+ msgstr "Zobrazit kontaktní detaily"
177
+
178
+ #: WP_Widget.ContactCardWidget.class.php:30
179
+ msgid "Show Opening Hours"
180
+ msgstr "Zobrazit otevírací dobu"
181
+
182
+ #: WP_Widget.ContactCardWidget.class.php:31
183
+ msgid "Show brief opening hours on one line"
184
+ msgstr "Zobrazit stručnou otevírací dobu na jednom řádku"
185
+
186
+ #: WP_Widget.ContactCardWidget.class.php:32
187
+ msgid "Show Google Map"
188
+ msgstr "Zobrazit Google Map"
189
+
190
+ #: WP_Widget.ContactCardWidget.class.php:38
191
+ msgid "Contact Card"
192
+ msgstr "Kontaktní karta"
193
+
194
+ #: WP_Widget.ContactCardWidget.class.php:39
195
+ msgid ""
196
+ "Display a contact card with your name, address, phone number, opening hours and "
197
+ "map."
198
+ msgstr ""
199
+ "Zobrazit kontaktní kartu s Vaším jménem, adresou, telefonním číslem, otevírací "
200
+ "dobou a mapou."
201
+
202
+ #: WP_Widget.ContactCardWidget.class.php:71
203
+ msgid "Title"
204
+ msgstr "Název"
205
+
206
+ #: template-functions.php:135 template-functions.php:424
207
+ msgid "Get directions"
208
+ msgstr "Získat souřadnice"
209
+
210
+ #: template-functions.php:191
211
+ msgid "Contact"
212
+ msgstr "Kontakt"
213
+
214
+ #: template-functions.php:296
215
+ msgid " all day"
216
+ msgstr " celý den"
217
+
218
+ #: template-functions.php:306
219
+ msgid " open until "
220
+ msgstr " otevřeno do "
221
+
222
+ #: template-functions.php:308
223
+ msgid " open from "
224
+ msgstr " otevřeno od "
225
+
226
+ #: template-functions.php:310 template-functions.php:361
227
+ msgctxt "Separator between opening and closing times. Example: 9:00am-5:00pm"
228
+ msgid "-"
229
+ msgstr " - "
230
+
231
+ #: template-functions.php:317
232
+ msgctxt ""
233
+ "Separator between multiple opening times in the brief opening hours. Example: "
234
+ "Mo,We 9:00 AM - 5:00 PM; Tu,Th 10:00 AM - 5:00 PM"
235
+ msgid "; "
236
+ msgstr "; "
237
+
238
+ #: template-functions.php:327
239
+ msgid "Monday"
240
+ msgstr "Pondělí"
241
+
242
+ #: template-functions.php:328
243
+ msgid "Tuesday"
244
+ msgstr "Úterý"
245
+
246
+ #: template-functions.php:329
247
+ msgid "Wednesday"
248
+ msgstr "Středa"
249
+
250
+ #: template-functions.php:330
251
+ msgid "Thursday"
252
+ msgstr "Čtvrtek"
253
+
254
+ #: template-functions.php:331
255
+ msgid "Friday"
256
+ msgstr "Pátek"
257
+
258
+ #: template-functions.php:332
259
+ msgid "Saturday"
260
+ msgstr "Sobota"
261
+
262
+ #: template-functions.php:333
263
+ msgid "Sunday"
264
+ msgstr "Neděle"
265
+
266
+ #: template-functions.php:345
267
+ msgid "Open"
268
+ msgstr "Otevřeno"
269
+
270
+ #: template-functions.php:357
271
+ msgid "Open until "
272
+ msgstr "Otevřeno do "
273
+
274
+ #: template-functions.php:359
275
+ msgid "Open from "
276
+ msgstr "Otevřeno do "
277
+
278
+ #: template-functions.php:381
279
+ msgid "Closed"
280
+ msgstr "Zavřeno"
281
+
282
+ #, fuzzy
283
+ #~ msgid "No map coordinates set."
284
+ #~ msgstr "Nebyly nastaveny žádné souřadnice."
285
+
286
+ #, fuzzy
287
+ #~ msgid "Requesting new coordinates"
288
+ #~ msgstr "Požádat o nové souřadnice"
289
+
290
+ #, fuzzy
291
+ #~ msgid "Select a match below"
292
+ #~ msgstr "Vybrat shodu"
293
+
294
+ #, fuzzy
295
+ #~ msgid "View"
296
+ #~ msgstr "Zobrazit"
297
+
298
+ #, fuzzy
299
+ #~ msgid "Retrieve map coordinates"
300
+ #~ msgstr "Vyzvednout souřadnice"
301
+
302
+ #, fuzzy
303
+ #~ msgid "Remove map coordinates"
304
+ #~ msgstr "Odstranit souřadnice"
305
+
306
+ #, fuzzy
307
+ #~ msgid "Try again?"
308
+ #~ msgstr "Zkusit znovu?"
309
+
310
+ #, fuzzy
311
+ #~ msgid "Error"
312
+ #~ msgstr "Chyba"
313
+
314
+ #, fuzzy
315
+ #~ msgid ""
316
+ #~ "Invalid request. Be sure to fill out the address field before retrieving "
317
+ #~ "coordinates."
318
+ #~ msgstr ""
319
+ #~ "Neplatný požadavek. Ujistěte se, že máte vyplněné pole s adresou, než "
320
+ #~ "obdržíte souřadnice."
321
+
322
+ #, fuzzy
323
+ #~ msgid "Request denied."
324
+ #~ msgstr "Požadavek byl zamítnut."
325
+
326
+ #, fuzzy
327
+ #~ msgid "Request denied because you are over your request quota."
328
+ #~ msgstr "Požadavek byl zamítnut, protože jste překročili limit pro požadavky."
329
+
330
+ #, fuzzy
331
+ #~ msgid "Nothing was found at that address"
332
+ #~ msgstr "Na této adrese nebylo nic nalezeno"
333
+
334
+ #, fuzzy
335
+ #~ msgid "Add new scheduling rule"
336
+ #~ msgstr "Přidat nové plánované pravidlo"
337
+
338
+ #, fuzzy
339
+ #~ msgctxt "Format of a scheduling rule"
340
+ #~ msgid "Weekly"
341
+ #~ msgstr "Týdně"
342
+
343
+ #, fuzzy
344
+ #~ msgctxt "Format of a scheduling rule"
345
+ #~ msgid "Monthly"
346
+ #~ msgstr "Měsíčně"
347
+
348
+ #, fuzzy
349
+ #~ msgctxt "Format of a scheduling rule"
350
+ #~ msgid "Date"
351
+ #~ msgstr "Datum"
352
+
353
+ #, fuzzy
354
+ #~ msgctxt "Label for selecting days of the week in a scheduling rule"
355
+ #~ msgid "Days of the week"
356
+ #~ msgstr "Dny v týdnu"
357
+
358
+ #, fuzzy
359
+ #~ msgctxt "Label for selecting weeks of the month in a scheduling rule"
360
+ #~ msgid "Weeks of the month"
361
+ #~ msgstr "Týdny v měsíci"
362
+
363
+ #, fuzzy
364
+ #~ msgid "Date"
365
+ #~ msgstr "Datum"
366
+
367
+ #, fuzzy
368
+ #~ msgctxt "Label to select time slot for a scheduling rule"
369
+ #~ msgid "Time"
370
+ #~ msgstr "Čas"
371
+
372
+ #, fuzzy
373
+ #~ msgctxt "Label to set a scheduling rule to last all day"
374
+ #~ msgid "All day"
375
+ #~ msgstr "Celý den"
376
+
377
+ #, fuzzy
378
+ #~ msgctxt "Label for the starting time of a scheduling rule"
379
+ #~ msgid "Start"
380
+ #~ msgstr "Začátek"
381
+
382
+ #, fuzzy
383
+ #~ msgctxt "Label for the ending time of a scheduling rule"
384
+ #~ msgid "End"
385
+ #~ msgstr "Konec"
386
+
387
+ #, fuzzy
388
+ #~ msgctxt ""
389
+ #~ "Prompt displayed when a scheduling rule is set without any time restrictions."
390
+ #~ msgid ""
391
+ #~ "All day long. Want to <a href=\"#\" data-format=\"time-slot\">set a time "
392
+ #~ "slot</a>?"
393
+ #~ msgstr ""
394
+ #~ "Celý den. Chcete <a href=\"#\" data-format=\"time-slot\">nastavit čas</a>?"
395
+
396
+ #, fuzzy
397
+ #~ msgid "Open and close this rule"
398
+ #~ msgstr "Otevřít a zavřít toto pravidlo"
399
+
400
+ #, fuzzy
401
+ #~ msgid "Delete rule"
402
+ #~ msgstr "Smazat pravidlo"
403
+
404
+ #, fuzzy
405
+ #~ msgid "Delete scheduling rule"
406
+ #~ msgstr "Smazat plánované pravidlo"
407
+
408
+ #, fuzzy
409
+ #~ msgctxt ""
410
+ #~ "Brief default description of a scheduling rule when no weekdays or weeks are "
411
+ #~ "included in the rule."
412
+ #~ msgid "Never"
413
+ #~ msgstr "Nikdy"
414
+
415
+ #, fuzzy
416
+ #~ msgctxt ""
417
+ #~ "Brief default description of a scheduling rule when all the weekdays/weeks "
418
+ #~ "are included in the rule."
419
+ #~ msgid "Every day"
420
+ #~ msgstr "Každý den"
421
+
422
+ #, fuzzy
423
+ #~ msgctxt ""
424
+ #~ "Brief default description of a scheduling rule when some weekdays are "
425
+ #~ "included on only some weeks of the month. The {days} and {weeks} bits should "
426
+ #~ "be left alone and will be replaced by a comma-separated list of days (the "
427
+ #~ "first one) and weeks (the second one) in the following format: M, T, W on "
428
+ #~ "the first, second week of the month"
429
+ #~ msgid "{days} on the {weeks} week of the month"
430
+ #~ msgstr "{days} v {weeks} týden v měsíci"
431
+
432
+ #, fuzzy
433
+ #~ msgctxt ""
434
+ #~ "Brief description of a scheduling rule when some weeks of the month are "
435
+ #~ "included but all or no weekdays are selected. {weeks} should be left alone "
436
+ #~ "and will be replaced by a comma-separated list of weeks (the second one) in "
437
+ #~ "the following format: First, second week of the month"
438
+ #~ msgid "{weeks} week of the month"
439
+ #~ msgstr "{weeks} týdnů v měsíci"
440
+
441
+ #, fuzzy
442
+ #~ msgctxt "Brief default description of a scheduling rule when no times are set"
443
+ #~ msgid "All day"
444
+ #~ msgstr "Celý den"
445
+
446
+ #, fuzzy
447
+ #~ msgctxt ""
448
+ #~ "Brief default description of a scheduling rule when an end time is set but "
449
+ #~ "no start time. If the end time is 6pm, it will read: Ends at 6pm."
450
+ #~ msgid "Ends at"
451
+ #~ msgstr "Konec v"
452
+
453
+ #, fuzzy
454
+ #~ msgctxt ""
455
+ #~ "Brief default description of a scheduling rule when a start time is set but "
456
+ #~ "no end time. If the start time is 6pm, it will read: Starts at 6pm."
457
+ #~ msgid "Starts at"
458
+ #~ msgstr "Začátek v"
459
+
460
+ #, fuzzy
461
+ #~ msgctxt "Default separator between times of a scheduling rule."
462
+ #~ msgid "&mdash;"
463
+ #~ msgstr "&mdash;"
464
+
465
+ #~ msgid "Author: %s"
466
+ #~ msgstr "Autor: %s"
467
+
468
+ #~ msgid "Day: %s"
469
+ #~ msgstr "Den: %s"
470
+
471
+ #~ msgid "Month: %s"
472
+ #~ msgstr "Měsíc: %s"
473
+
474
+ #~ msgid "Year: %s"
475
+ #~ msgstr "Rok: %s"
476
+
477
+ #~ msgid "Reviews: "
478
+ #~ msgstr "Recenze: "
479
+
480
+ #~ msgid "Archives: "
481
+ #~ msgstr "Archivy:"
482
+
483
+ #~ msgid "Archives"
484
+ #~ msgstr "Archivy"
485
+
486
+ #~ msgid "%1$s comment"
487
+ #~ msgid_plural "%1$s comments"
488
+ #~ msgstr[0] "%1$s komentář"
489
+ #~ msgstr[1] "%1$s komentáře"
490
+ #~ msgstr[2] "%1$s komentářů"
491
+
492
+ #~ msgid "Comment navigation"
493
+ #~ msgstr "Navigace v komentářích"
494
+
495
+ #~ msgid ""
496
+ #~ "<span class=\"dashicons dashicons-arrow-left-alt2\"></span> Older Comments"
497
+ #~ msgstr ""
498
+ #~ "<span class=\"dashicons dashicons-arrow-left-alt2\"></span> Starší komentáře"
499
+
500
+ #~ msgid ""
501
+ #~ "Newer Comments <span class=\"dashicons dashicons-arrow-right-alt2\"></span>"
502
+ #~ msgstr ""
503
+ #~ "Novější komentáře <span class=\"dashicons dashicons-arrow-right-alt2\"></"
504
+ #~ "span>"
505
+
506
+ #~ msgid "Comments are closed."
507
+ #~ msgstr "Nelze přidávat komentáře."
508
+
509
+ #~ msgid "Leave a Comment"
510
+ #~ msgstr "Přidat komentář"
511
+
512
+ #~ msgid "Reply to %s"
513
+ #~ msgstr "Odpovědět na %s"
514
+
515
+ #~ msgid "404 Page Not Found"
516
+ #~ msgstr "Chyba 404"
517
+
518
+ #~ msgid ""
519
+ #~ "Nothing was found at this location. Try searching below or browse the site "
520
+ #~ "using the menu above."
521
+ #~ msgstr ""
522
+ #~ "Nic nebylo nalezeno. zkuste vyhledávání nebo použijte k navigaci na stránce "
523
+ #~ "menu."
524
+
525
+ #~ msgid "Read more"
526
+ #~ msgstr "Číst dále"
527
+
528
+ #~ msgid "Review by "
529
+ #~ msgstr "Recenze od"
530
+
531
+ #~ msgid "Edit Post"
532
+ #~ msgstr "Upravit příspěvek"
533
+
534
+ #~ msgid "Nothing Found"
535
+ #~ msgstr "Nic nebylo nalezeno"
536
+
537
+ #~ msgid ""
538
+ #~ "Sorry, but nothing matched your search terms. Please try to search using "
539
+ #~ "different keywords or browse the site using the navigation menu."
540
+ #~ msgstr ""
541
+ #~ "Je nám líto, ale na Váš dotaz nebyly nalezeny žádné výsledky. Zkuste použít "
542
+ #~ "jiná klíčová slova nebo zkuste najít výsledek na stránce za pomoci menu."
543
+
544
+ #~ msgid ""
545
+ #~ "Ready to publish your first post? <a href=\"%1$s\">Get started here</a>."
546
+ #~ msgstr ""
547
+ #~ "Připraveni zveřejnit svůj první příspěvek? <a href=\"%1$s\">Zde můžete "
548
+ #~ "začít</a>."
549
+
550
+ #~ msgid ""
551
+ #~ "Sorry, we were unable to find anything at this page. Please try to browse "
552
+ #~ "the site using the navigation menu or search for what you want."
553
+ #~ msgstr ""
554
+ #~ "Je nám líto, na této stránce jsme nic nenalezli. Zkuste použít menu nebo "
555
+ #~ "vyhledat požadovaný výsledek."
556
+
557
+ #~ msgid "Sticky"
558
+ #~ msgstr "Sticky"
559
+
560
+ #~ msgid "Last updated on %1$s"
561
+ #~ msgstr "Naposledy aktualizováno %1$s"
562
+
563
+ #~ msgid ", "
564
+ #~ msgstr ", "
565
+
566
+ #~ msgid "Categories:"
567
+ #~ msgstr "Kategorie:"
568
+
569
+ #~ msgid "Tags:"
570
+ #~ msgstr "Štítky:"
571
+
572
+ #~ msgid "Primary Sidebar"
573
+ #~ msgstr "Hlavní postranní panel"
574
+
575
+ #~ msgid "This sidebar will appear beside most pages and posts"
576
+ #~ msgstr ""
577
+ #~ "Ten postranní panel se bude zobrazovat vedle vetšiny stránek a příspěvků"
578
+
579
+ #~ msgid "Page %s"
580
+ #~ msgstr "Stránka %s"
581
+
582
+ #~ msgid ""
583
+ #~ "This content is password protected. To view it please enter your password "
584
+ #~ "below:"
585
+ #~ msgstr "Tento obsah je chráněn heslem. Zadejte heslo pro jeho zobrazení."
586
+
587
+ #~ msgid "Password:"
588
+ #~ msgstr "Heslo:"
589
+
590
+ #~ msgid "Submit"
591
+ #~ msgstr "Přidat"
592
+
593
+ #~ msgid "This sidebar will appear under the %s Footer Panel."
594
+ #~ msgstr "Tento postranní panel se zobrazí pod %s panelem zápatí."
595
+
596
+ #~ msgid "Skip to content"
597
+ #~ msgstr "Přejít na obsah"
598
+
599
+ #~ msgid "Browse"
600
+ #~ msgstr "Prohlížet"
601
+
602
+ #~ msgid "Sorry, no post could be found matching your request."
603
+ #~ msgstr "Je nám líto, na Váš dotaz nebyl nalezen žádný výsledek."
604
+
605
+ #~ msgid "This request was invalid. Please try again."
606
+ #~ msgstr "Neplatný požadavek. Zkuste to prosím znovu."
607
+
608
+ #~ msgid "You have been logged out. Please login again to customize your site."
609
+ #~ msgstr "Byl jste odhlášen. Pro úpravu stránky se prosím znovu přihlašte."
610
+
611
+ #~ msgid ""
612
+ #~ "You do not have permission to modify the theme settings. Please login to an "
613
+ #~ "administrator account if you have one."
614
+ #~ msgstr ""
615
+ #~ "Nemáte povolení upravovat nastavení tohoto tématu. Prosíme, přihlašte se "
616
+ #~ "administrátorským účtem."
617
+
618
+ #~ msgid ""
619
+ #~ "There was an unexpected error with the request. Please try another option."
620
+ #~ msgstr "Nastala neočekávaná chyba ve vašem požadavku. Zkuste jinou možnost."
621
+
622
+ #~ msgid "Site Title"
623
+ #~ msgstr "Název stránky"
624
+
625
+ #~ msgid "Logo"
626
+ #~ msgstr "Logo"
627
+
628
+ #~ msgid "Upload a logo"
629
+ #~ msgstr "Nahrát logo"
630
+
631
+ #~ msgid "Call to Action"
632
+ #~ msgstr "Povolat do akce"
633
+
634
+ #~ msgid "Customize the call to action text on the front page."
635
+ #~ msgstr "Přizpůsobit text \"povolat do akce\" na hlavní stránce."
636
+
637
+ #~ msgid "Text"
638
+ #~ msgstr "Text"
639
+
640
+ #~ msgid "Button Text"
641
+ #~ msgstr "Text na tlačítku"
642
+
643
+ #~ msgid "Button Target"
644
+ #~ msgstr "Cíl tlačítka"
645
+
646
+ #~ msgid "Display Options"
647
+ #~ msgstr "Zobrazit možnosti"
648
+
649
+ #~ msgid "Customize the layout of your site."
650
+ #~ msgstr "Přizpůsobit šablonu vaší stránky."
651
+
652
+ #~ msgid "Sidebar"
653
+ #~ msgstr "Postranní panel"
654
+
655
+ #~ msgid "Show sidebar"
656
+ #~ msgstr "Zobrazit postranní panel"
657
+
658
+ #~ msgid "Hide sidebar"
659
+ #~ msgstr "Skrýt postranní panel"
660
+
661
+ #~ msgid "Nothing"
662
+ #~ msgstr "Nic"
663
+
664
+ #~ msgid "Map"
665
+ #~ msgstr "Mapa"
666
+
667
+ #~ msgid "Booking Form"
668
+ #~ msgstr "Rezervační formulář"
669
+
670
+ #~ msgid "Random Review"
671
+ #~ msgstr "Náhodná recenze"
672
+
673
+ #~ msgid "Custom Widget Area"
674
+ #~ msgstr "Přizpůsobit oblast widgetů"
675
+
676
+ #~ msgid "Colors"
677
+ #~ msgstr "Barvy"
678
+
679
+ #~ msgid "Link color"
680
+ #~ msgstr "Barva odkazu"
681
+
682
+ #~ msgid "Background color"
683
+ #~ msgstr "Barva pozadí"
684
+
685
+ #~ msgid "Demo content for %s successfully installed."
686
+ #~ msgstr "Demoverze obsahu pro %s byla úspěšně nainstalována."
687
+
688
+ #~ msgid ""
689
+ #~ "There was an error and some of the demo content for %s may not have "
690
+ #~ "installed correctly."
691
+ #~ msgstr ""
692
+ #~ "Došlo k chybě a část demoverze pro %s nemusela být nainstalována správně."
693
+
694
+ #~ msgid ""
695
+ #~ "You must install the plugin %s before you can install and view the demo "
696
+ #~ "content."
697
+ #~ msgstr ""
698
+ #~ "Před instalováním a prohlížením demoverze obsahu musíte mít nainstalovaný "
699
+ #~ "plugin %s."
700
+
701
+ #~ msgid "Install demo content for the %s plugin."
702
+ #~ msgstr "Nainstalovat demoverzi pro plugin %s."
703
+
704
+ #~ msgid "View demo page"
705
+ #~ msgstr "Ukázat demoverzi stránky."
706
+
707
+ #~ msgid "Install demo content for the %s plugins."
708
+ #~ msgstr "Nainstalovat demoverzi obsahu pro pluginy %s."
709
+
710
+ #~ msgid "Install Required Plugins"
711
+ #~ msgstr "Nainstalovat požadované pluginy"
712
+
713
+ #~ msgid "Install Plugins"
714
+ #~ msgstr "Instalovat pluginy"
715
+
716
+ #~ msgid "Installing Plugin: %s"
717
+ #~ msgstr "Instalovat plugin: %s"
718
+
719
+ #~ msgid "Something went wrong with the plugin API."
720
+ #~ msgstr "Nastala chyba s pluginem API."
721
+
722
+ #~ msgid "This theme requires the following plugin: %1$s."
723
+ #~ msgid_plural "This theme requires the following plugins: %1$s."
724
+ #~ msgstr[0] "Toto téma vyžaduje následující plugin: %1$s."
725
+ #~ msgstr[1] "Toto téma vyžaduje následující pluginy: %1$s."
726
+ #~ msgstr[2] "Toto téma vyžaduje následující pluginy: %1$s."
727
+
728
+ #~ msgid "This theme recommends the following plugin: %1$s."
729
+ #~ msgid_plural "This theme recommends the following plugins: %1$s."
730
+ #~ msgstr[0] ""
731
+ #~ "Pro toto téma je doporučen následující plugin: %1$s.Toto téma doporučuje "
732
+ #~ "následující plugin: %1$s."
733
+ #~ msgstr[1] "Pro toto téma jsou doporučeny následující pluginy: %1$s."
734
+ #~ msgstr[2] "Pro toto téma jsou doporučeny následující pluginy: %1$s."
735
+
736
+ #~ msgid ""
737
+ #~ "Sorry, but you do not have the correct permissions to install the %s plugin. "
738
+ #~ "Contact the administrator of this site for help on getting the plugin "
739
+ #~ "installed."
740
+ #~ msgid_plural ""
741
+ #~ "Sorry, but you do not have the correct permissions to install the %s "
742
+ #~ "plugins. Contact the administrator of this site for help on getting the "
743
+ #~ "plugins installed."
744
+ #~ msgstr[0] ""
745
+ #~ "Je nám líto, ale nemáte povolení k instalaci pluginu %s. Pro instalaci "
746
+ #~ "pluginu kontaktujte administrátora stránky."
747
+ #~ msgstr[1] ""
748
+ #~ "Je nám líto, ale nemáte povolení k instalaci pluginů %s. Pro instalaci "
749
+ #~ "pluginu kontaktujte administrátora stránky."
750
+ #~ msgstr[2] ""
751
+ #~ "Je nám líto, ale nemáte povolení k instalaci pluginů %s. Pro instalaci "
752
+ #~ "pluginu kontaktujte administrátora stránky."
753
+
754
+ #~ msgid "The following required plugin is currently inactive: %1$s."
755
+ #~ msgid_plural "The following required plugins are currently inactive: %1$s."
756
+ #~ msgstr[0] "Následující plugin je dočasně neaktivní: %1$s."
757
+ #~ msgstr[1] "Následující pluginy jsou dočasně neaktivní: %1$s."
758
+ #~ msgstr[2] "Následující pluginy jsou dočasně neaktivní: %1$s."
759
+
760
+ #~ msgid "The following recommended plugin is currently inactive: %1$s."
761
+ #~ msgid_plural "The following recommended plugins are currently inactive: %1$s."
762
+ #~ msgstr[0] "Následující doporučený plugin je dočasně neaktivní: %1$s."
763
+ #~ msgstr[1] "Následující doporučené pluginy jsou dočasně neaktivní: %1$s."
764
+ #~ msgstr[2] "Následující doporučené pluginy jsou dočasně neaktivní: %1$s."
765
+
766
+ #~ msgid ""
767
+ #~ "Sorry, but you do not have the correct permissions to activate the %s "
768
+ #~ "plugin. Contact the administrator of this site for help on getting the "
769
+ #~ "plugin activated."
770
+ #~ msgid_plural ""
771
+ #~ "Sorry, but you do not have the correct permissions to activate the %s "
772
+ #~ "plugins. Contact the administrator of this site for help on getting the "
773
+ #~ "plugins activated."
774
+ #~ msgstr[0] ""
775
+ #~ "Je nám líto, ale nemáte povolení k aktivaci pluginu %s. K aktivaci tohoto "
776
+ #~ "pluginu kontaktujte administrátora stránky. "
777
+ #~ msgstr[1] ""
778
+ #~ "Je nám líto, ale nemáte povolení k aktivaci pluginů %s. K aktivaci těchto "
779
+ #~ "pluginů kontaktujte administrátora stránky. "
780
+ #~ msgstr[2] ""
781
+ #~ "Je nám líto, ale nemáte povolení k aktivaci pluginů %s. K aktivaci těchto "
782
+ #~ "pluginů kontaktujte administrátora stránky. "
783
+
784
+ #~ msgid ""
785
+ #~ "The following plugin needs to be updated to its latest version to ensure "
786
+ #~ "maximum compatibility with this theme: %1$s."
787
+ #~ msgid_plural ""
788
+ #~ "The following plugins need to be updated to their latest version to ensure "
789
+ #~ "maximum compatibility with this theme: %1$s."
790
+ #~ msgstr[0] ""
791
+ #~ "K dosažení maximální kompatibility s tímto tématem musí být následující "
792
+ #~ "plugin aktualizován na nejnovější verzi: %1$s."
793
+ #~ msgstr[1] ""
794
+ #~ "K dosažení maximální kompatibility s tímto tématem musí být následující "
795
+ #~ "pluginy aktualizovány na nejnovější verzi: %1$s."
796
+ #~ msgstr[2] ""
797
+ #~ "K dosažení maximální kompatibility s tímto tématem musí být následující "
798
+ #~ "pluginy aktualizovány na nejnovější verzi: %1$s."
799
+
800
+ #~ msgid ""
801
+ #~ "Sorry, but you do not have the correct permissions to update the %s plugin. "
802
+ #~ "Contact the administrator of this site for help on getting the plugin "
803
+ #~ "updated."
804
+ #~ msgid_plural ""
805
+ #~ "Sorry, but you do not have the correct permissions to update the %s plugins. "
806
+ #~ "Contact the administrator of this site for help on getting the plugins "
807
+ #~ "updated."
808
+ #~ msgstr[0] ""
809
+ #~ "Je nám líto, ale nemáte povolení k aktivaci pluginu %s. K aktivaci tohoto "
810
+ #~ "pluginu kontaktujte administrátora stránky. "
811
+ #~ msgstr[1] ""
812
+ #~ "Je nám líto, ale nemáte povolení k aktualizaci pluginů %s. K aktualizaci "
813
+ #~ "těchto pluginů kontaktujte administrátora stránky."
814
+ #~ msgstr[2] ""
815
+ #~ "Je nám líto, ale nemáte povolení k aktualizaci pluginů %s. K aktualizaci "
816
+ #~ "těchto pluginů kontaktujte administrátora stránky."
817
+
818
+ #~ msgid "Begin installing plugin"
819
+ #~ msgid_plural "Begin installing plugins"
820
+ #~ msgstr[0] "Instalovat plugin"
821
+ #~ msgstr[1] "Instalovat pluginy"
822
+ #~ msgstr[2] "Instalovat pluginy"
823
+
824
+ #~ msgid "Begin activating plugin"
825
+ #~ msgid_plural "Begin activating plugins"
826
+ #~ msgstr[0] "Aktivovat plugin"
827
+ #~ msgstr[1] "Aktivovat pluginy"
828
+ #~ msgstr[2] "Aktivovat pluginy"
829
+
830
+ #~ msgid "Return to Required Plugins Installer"
831
+ #~ msgstr "Vrátit se k instalátoru potřebných pluginů"
832
+
833
+ #~ msgid "Plugin activated successfully."
834
+ #~ msgstr "Plugin byl úspěšně aktualizován."
835
+
836
+ #~ msgid "All plugins installed and activated successfully. %s"
837
+ #~ msgstr "Všechny pluginy byly úspěšně nainstalovány a aktivovány. %s"
838
+
839
+ #~ msgid "Getting Started"
840
+ #~ msgstr "Začít"
841
+
842
+ #~ msgid ""
843
+ #~ "This section will help you get up and running quickly. It will only cover "
844
+ #~ "things specific to this theme and its bundled plugins. If you're new to "
845
+ #~ "WordPress, check out the <a href=\"http://easywpguide.com/\">Easy WP Guide</"
846
+ #~ "a> for basic tips on how to use WordPress."
847
+ #~ msgstr ""
848
+ #~ "Tato sekce vám pomůže s rychlým nastavením. Pokrývá pouze věci specifické "
849
+ #~ "pro toto téma a související pluginy. Pokud pracujete s WordPressem poprvé, "
850
+ #~ "podívejte se na <a href=\"http://easywpguide.com/\">Krátkou příručku</a> pro "
851
+ #~ "základní tipy, jak používat WordPress."
852
+
853
+ #~ msgid "Activate Plugins"
854
+ #~ msgstr "Aktivovat pluginy"
855
+
856
+ #~ msgid "Learn how to install and activate the plugins bundled with this theme."
857
+ #~ msgstr ""
858
+ #~ "Naučte se, jak nainstalovat a aktivovat pluginy spojené s tímto tématem."
859
+
860
+ #~ msgid "First Steps"
861
+ #~ msgstr "První kroky"
862
+
863
+ #~ msgid "Tips and advice on what to set up first."
864
+ #~ msgstr "Tipy a rady, co nastavit jako první."
865
+
866
+ #~ msgid "Building Your Site"
867
+ #~ msgstr "Výstavba vaší stránky"
868
+
869
+ #~ msgid "Theme Customizer"
870
+ #~ msgstr "Přizpůsobení tématu"
871
+
872
+ #~ msgid "How to use the Theme Customizer to change the colors, layout and more."
873
+ #~ msgstr "Jak měnit barvy, šablonu a ostatní za pomocí Přizpůsobení tématu."
874
+
875
+ #~ msgid "Plugins"
876
+ #~ msgstr "Pluginy"
877
+
878
+ #~ msgid ""
879
+ #~ "An introduction to the plugins which power this theme and how to use them."
880
+ #~ msgstr "Úvod do pluginů, které jsou spojeny s tímto tématem, a jejich použití"
881
+
882
+ #~ msgid "Social Media Menu"
883
+ #~ msgstr "Menu sociálních médií"
884
+
885
+ #~ msgid ""
886
+ #~ "Use the built-in social media menu to display links to your social profiles."
887
+ #~ msgstr ""
888
+ #~ "Použijte vestavěné menu sociálních médií k uobrazení odkazů na vaše sociální "
889
+ #~ "profily."
890
+
891
+ #~ msgid "Advanced Topics"
892
+ #~ msgstr "Pokročilá témata."
893
+
894
+ #~ msgid ""
895
+ #~ "Get the most out of your theme by learning about some of the ideas powering "
896
+ #~ "it."
897
+ #~ msgstr ""
898
+ #~ "Dostaňte ze svého tématu maximum a zjistěte něco o myšlenkách, které za ním "
899
+ #~ "stojí."
900
+
901
+ #~ msgid "Responsive Design"
902
+ #~ msgstr "Responsivní design "
903
+
904
+ #~ msgid "Make sure your site looks its best across all devices."
905
+ #~ msgstr "Ujistěte se, že vaše stránky vypadá perfektně na všech zařízeních."
906
+
907
+ #~ msgid "Child Themes"
908
+ #~ msgstr "Dětská témata."
909
+
910
+ #~ msgid "Ensure your site updates safely with child themes."
911
+ #~ msgstr ""
912
+ #~ "Ujistěte se, že se vaše stránky bezpečně aktualizuje s dětskými tématy."
913
+
914
+ #~ msgid "Theme Help"
915
+ #~ msgstr "Pomoc s tématy"
916
+
917
+ #~ msgid "Support"
918
+ #~ msgstr "Podpora"
919
+
920
+ #~ msgid ""
921
+ #~ "<a href=\"http://themeofthecrop.com/about/support\">Get one-on-one support</"
922
+ #~ "a> if you're having any trouble or need customizations done."
923
+ #~ msgstr ""
924
+ #~ "<a href=\"http://themeofthecrop.com/about/support\">Kontaktujte podporu "
925
+ #~ "jeden-na-jednoho,</a> pokud máte nějaké potíže nebo potřebujete pomoct s "
926
+ #~ "přizpůsobením."
927
+
928
+ #~ msgid "Return to the main page"
929
+ #~ msgstr "Vrátit se na hlavní stránku"
930
+
931
+ #~ msgid "Theme License"
932
+ #~ msgstr "Licence tématu"
933
+
934
+ #~ msgid "License Key"
935
+ #~ msgstr "Klíč licence"
936
+
937
+ #~ msgid ""
938
+ #~ "Enter the license key provided when purchasing this theme to receive updates."
939
+ #~ msgstr ""
940
+ #~ "Pro aktualizace vložte klíč tématu, který jste získali při nákupu šablony."
941
+
942
+ #~ msgid "Activate License"
943
+ #~ msgstr "aktivovat licenci"
944
+
945
+ #~ msgid "No license key provided"
946
+ #~ msgstr "Nebylo vložen klíč licence"
947
+
948
+ #~ msgid ""
949
+ #~ "License key not found. Please check to make sure it was entered correctly."
950
+ #~ msgstr ""
951
+ #~ "Klíč licence nebyl nalezen. Ujistěte se prosím, jestli byl zadán správně."
952
+
953
+ #~ msgid ""
954
+ #~ "The license you have entered is not for this this theme. Please check the "
955
+ #~ "license again to make sure you have entered the correct key."
956
+ #~ msgstr ""
957
+ #~ "Licence, kterou jste zadali, není platná pro toto téma. Zkontrolujte prosím "
958
+ #~ "znovu svou licenci, abyste se ujistili, že zadáváte správný klíč."
959
+
960
+ #~ msgid "Active"
961
+ #~ msgstr "Aktivní"
962
+
963
+ #~ msgid "Expiry: "
964
+ #~ msgstr "Aktivní do:"
965
+
966
+ #~ msgid "Deactivate License"
967
+ #~ msgstr "Zrušit licenci"
968
+
969
+ #~ msgid "Inactive"
970
+ #~ msgstr "Neaktivní"
971
+
972
+ #~ msgid "Theme Setup"
973
+ #~ msgstr "Nastavení tématu"
974
+
975
+ #~ msgid "Demo Content"
976
+ #~ msgstr "Demo obsah"
977
+
978
+ #~ msgid "Food and Drink Menu"
979
+ #~ msgstr "Jídlo a pití"
980
+
981
+ #~ msgid ""
982
+ #~ "You must <a href=\"?page=tgmpa-install-plugins\">install and activate</a> "
983
+ #~ "the plugins <em>Food and Drink Menu</em> and <em>Food and Drink Menu Pro</"
984
+ #~ "em> before you can install and view the demo content."
985
+ #~ msgstr ""
986
+ #~ "Musíte <a href=\"?page=tgmpa-install-plugins\">instalovat a aktivovat</a> "
987
+ #~ "pluginy <em>Jídlo a pití</em> and <em>Jídlo a pití Pro</em> než budete moct "
988
+ #~ "nainstalovat a prohlížet demo obsah."
989
+
990
+ #~ msgid "Restaurant Reservations"
991
+ #~ msgstr "Rezervace"
992
+
993
+ #~ msgid ""
994
+ #~ "You must <a href=\"?page=tgmpa-install-plugins\">install and activate</a> "
995
+ #~ "the plugin <em>Restaurant Reservations</em> before you can install and view "
996
+ #~ "the demo content."
997
+ #~ msgstr ""
998
+ #~ "Musíte <a href=\"?page=tgmpa-install-plugins\">instalovat a aktivovat</a> "
999
+ #~ "plugin <em>Rezervace</em> než budete moct nainstalovat a prohlížet demo "
1000
+ #~ "obsah."
1001
+
1002
+ #~ msgid "Good Reviews for WordPress"
1003
+ #~ msgstr "Dobré rezervace pro Wordpress"
1004
+
1005
+ #~ msgid ""
1006
+ #~ "You must <a href=\"?page=tgmpa-install-plugins\">install and activate</a> "
1007
+ #~ "the plugin <em>Good Reviews for WordPress</em> before you can install and "
1008
+ #~ "view the demo content."
1009
+ #~ msgstr ""
1010
+ #~ "Musíte <a href=\"?page=tgmpa-install-plugins\">instalovat a aktivovat</a> "
1011
+ #~ "plugin <em>dobré rezervace pro Wordpress</em> než budete moct nainstalovat a "
1012
+ #~ "prohlížet demo obsah."
1013
+
1014
+ #~ msgid ""
1015
+ #~ "You must <a href=\"?page=tgmpa-install-plugins\">install and activate</a> "
1016
+ #~ "the plugin <em>Business Profile</em> before you can install and view the "
1017
+ #~ "demo content."
1018
+ #~ msgstr ""
1019
+ #~ "Musíte <a href=\"?page=tgmpa-install-plugins\">instalovat a aktivovat</a> "
1020
+ #~ "plugin <em>Business profil</em> než budete moct nainstalovat a prohlížet "
1021
+ #~ "demo obsah."
1022
+
1023
+ #~ msgid "Documentation & Support"
1024
+ #~ msgstr "Dokumentace a podpora"
1025
+
1026
+ #~ msgid "Documentation"
1027
+ #~ msgstr "Dokumentace"
1028
+
1029
+ #~ msgid "View the documentation for this theme"
1030
+ #~ msgstr "Prohlížet dokumentaci pro toto téma"
1031
+
1032
+ #~ msgid "Get one-on-one support"
1033
+ #~ msgstr "Kontaktovat podporu jeden-na-jednoho"
1034
+
1035
+ #~ msgid "if you're having any trouble or need customizations done."
1036
+ #~ msgstr "pokud máte potíže nebo potřebujete pomoct s přizpůsobením."
1037
+
1038
+ #~ msgid "Demo"
1039
+ #~ msgstr "Demo"
1040
+
1041
+ #~ msgid "View an online demo of this theme"
1042
+ #~ msgstr "Prohlédnout online demo tohoto tématu"
1043
+
1044
+ #~ msgid "List navigation"
1045
+ #~ msgstr "Procházet navigaci"
1046
+
1047
+ #~ msgid "<span class=\"dashicons dashicons-arrow-left-alt2\"></span> Previous"
1048
+ #~ msgstr "<span class=\"dashicons dashicons-arrow-left-alt2\"></span> Předchozí"
1049
+
1050
+ #~ msgid "Next <span class=\"dashicons dashicons-arrow-right-alt2\"></span>"
1051
+ #~ msgstr "Další <span class=\"dashicons dashicons-arrow-right-alt2\"></span>"
1052
+
1053
+ #~ msgid ""
1054
+ #~ "Updating this theme will lose any customizations you have made. 'Cancel' to "
1055
+ #~ "stop, 'OK' to update."
1056
+ #~ msgstr ""
1057
+ #~ "Aktualizací tohoto tématu ztratíte veškeré změny. \"Cancel\" pro zrušení, "
1058
+ #~ "\"OK\" pro aktualizaci. "
1059
+
1060
+ #~ msgid "Something went wrong."
1061
+ #~ msgstr "Došlo k chybě."
1062
+
1063
+ #~ msgid "Return to the dashboard"
1064
+ #~ msgstr "Vrátit se na nástěnku"
1065
+
1066
+ #~ msgid "The following plugin was activated successfully:"
1067
+ #~ msgstr "Následující plugin byl úspěšně aktivován: "
1068
+
1069
+ #~ msgid "All plugins installed and activated successfully. %1$s"
1070
+ #~ msgstr "Všechny pluginy byly úspěšně nainstalovány a aktivovány. %1$s"
1071
+
1072
+ #~ msgid "Dismiss this notice"
1073
+ #~ msgstr "Zneviditelnit poznámku"
1074
+
1075
+ #~ msgid "Return to the Dashboard"
1076
+ #~ msgstr "Vrátit se na nástěnku"
1077
+
1078
+ #~ msgid "Private Repository"
1079
+ #~ msgstr "Soukromý repozitář"
1080
+
1081
+ #~ msgid "Pre-Packaged"
1082
+ #~ msgstr "Předbalený"
1083
+
1084
+ #~ msgid "WordPress Repository"
1085
+ #~ msgstr "Repozitář WordPressu"
1086
+
1087
+ #~ msgid "Required"
1088
+ #~ msgstr "Požadovaný"
1089
+
1090
+ #~ msgid "Recommended"
1091
+ #~ msgstr "Doporučený"
1092
+
1093
+ #~ msgid "Not Installed"
1094
+ #~ msgstr "Neinstalovaný"
1095
+
1096
+ #~ msgid "Installed But Not Activated"
1097
+ #~ msgstr "Instalovaný, ale ne aktivovaný"
1098
+
1099
+ #~ msgid "Install"
1100
+ #~ msgstr "Instalovat"
1101
+
1102
+ #~ msgid "Activate"
1103
+ #~ msgstr "Aktivovat"
1104
+
1105
+ #~ msgid ""
1106
+ #~ "No plugins to install or activate. <a href=\"%1$s\" title=\"Return to the "
1107
+ #~ "Dashboard\">Return to the Dashboard</a>"
1108
+ #~ msgstr ""
1109
+ #~ "Žádné pluginy k instalaci nebo aktivaci. <a href=\"%1$s\" title=\"Vrátit se "
1110
+ #~ "na nástěnku\">Vrátit se na nástěnku</a>"
1111
+
1112
+ #~ msgid "Plugin"
1113
+ #~ msgstr "Plugin"
1114
+
1115
+ #~ msgid "Source"
1116
+ #~ msgstr "Zdroj"
1117
+
1118
+ #~ msgid "Type"
1119
+ #~ msgstr "Typ"
1120
+
1121
+ #~ msgid "Status"
1122
+ #~ msgstr "Status"
1123
+
1124
+ #~ msgid "No plugins are available to be installed at this time."
1125
+ #~ msgstr "V současné chvíli nejsou k dispozici žádné pluginy k instalaci."
1126
+
1127
+ #~ msgid "No plugins are available to be activated at this time."
1128
+ #~ msgstr "V současné chvíli nejsou k dispozici žádné pluginy k aktivaci."
1129
+
1130
+ #~ msgid "Install package not available."
1131
+ #~ msgstr "Instalační balíček není k dispozici."
1132
+
1133
+ #~ msgid "Downloading install package from <span class=\"code\">%s</span>&#8230;"
1134
+ #~ msgstr "Stáhnout instalační balíček z <span class=\"code\">%s</span>&#8230;"
1135
+
1136
+ #~ msgid "Unpacking the package&#8230;"
1137
+ #~ msgstr "Rozbalování balíčku&#8230;"
1138
+
1139
+ #~ msgid "Installing the plugin&#8230;"
1140
+ #~ msgstr "Instalace pluginu&#8230;"
1141
+
1142
+ #~ msgid "Plugin install failed."
1143
+ #~ msgstr "Instalace pluginu nebyla úspěšná."
1144
+
1145
+ #~ msgid "Plugin installed successfully."
1146
+ #~ msgstr "Plugin byl úspěšně nainstalován."
1147
+
1148
+ #~ msgid "Plugin activation failed."
1149
+ #~ msgstr "Aktivace pluginu nebyla úspěšná."
1150
+
1151
+ #~ msgid ""
1152
+ #~ "The installation and activation process is starting. This process may take a "
1153
+ #~ "while on some hosts, so please be patient."
1154
+ #~ msgstr ""
1155
+ #~ "Instalace a aktivaci začíná. Tento proces může trvat delší dobu, buďte "
1156
+ #~ "prosím trpěliví."
1157
+
1158
+ #~ msgid "%1$s installed and activated successfully."
1159
+ #~ msgstr "%1$s byl úspěšně nainstalován a aktivován."
1160
+
1161
+ #~ msgid "Show Details"
1162
+ #~ msgstr "Ukázat detaily"
1163
+
1164
+ #~ msgid "Hide Details"
1165
+ #~ msgstr "Skrýt detaily"
1166
+
1167
+ #~ msgid "All installations and activations have been completed."
1168
+ #~ msgstr "Všechny instalace a aktivace byly úspěšně dokončeny."
1169
+
1170
+ #~ msgid "Installing and Activating Plugin %1$s (%2$d/%3$d)"
1171
+ #~ msgstr "Instalace a aktivaci pluginu %1$s (%2$d/%3$d)"
1172
+
1173
+ #~ msgid ""
1174
+ #~ "The installation process is starting. This process may take a while on some "
1175
+ #~ "hosts, so please be patient."
1176
+ #~ msgstr ""
1177
+ #~ "Instalační proces začíná. Tento proces může trvat delší dobu, buďte prosím "
1178
+ #~ "trpěliví."
1179
+
1180
+ #~ msgid "An error occurred while installing %1$s: <strong>%2$s</strong>."
1181
+ #~ msgstr "Při instalaci došlo k chybě %1$s: <strong>%2$s</strong>."
1182
+
1183
+ #~ msgid "The installation of %1$s failed."
1184
+ #~ msgstr "Instalace %1$s nebyla úspěšná."
1185
+
1186
+ #~ msgid "%1$s installed successfully."
1187
+ #~ msgstr "%1$s byl nainstalován úspěšně."
1188
+
1189
+ #~ msgid "All installations have been completed."
1190
+ #~ msgstr "Všechny instalace byly úspěšně dokončeny."
1191
+
1192
+ #~ msgid "Installing Plugin %1$s (%2$d/%3$d)"
1193
+ #~ msgstr "Instalace pluginu %1$s (%2$d/%3$d)"
1194
+
1195
+ #~ msgid "Search results for: %s"
1196
+ #~ msgstr "Hledat výsledky pro: %s"
1197
+
1198
+ #~ msgid "The Spot"
1199
+ #~ msgstr "The Spot"
1200
+
1201
+ #~ msgid "http://themeofthecrop.com"
1202
+ #~ msgstr "http://themeofthecrop.com"
1203
+
1204
+ #~ msgid ""
1205
+ #~ "A confident, vibrant theme for bars, gastropubs, destination restaurants and "
1206
+ #~ "any venue with an active vibe."
1207
+ #~ msgstr ""
1208
+ #~ "A confident, vibrant theme for bars, gastropubs, destination restaurants and "
1209
+ #~ "any venue with an active vibe."
1210
+
1211
+ #~ msgid "Theme of the Crop"
1212
+ #~ msgstr "Theme of the Crop"
1213
+
1214
+ #~ msgid "Full Width"
1215
+ #~ msgstr "Full Width"
1216
+
1217
+ #~ msgctxt "monthly archives date format"
1218
+ #~ msgid "F Y"
1219
+ #~ msgstr "F Y"
1220
+
1221
+ #~ msgctxt "yearly archives date format"
1222
+ #~ msgid "Y"
1223
+ #~ msgstr "Y"
1224
+
1225
+ #~ msgctxt ""
1226
+ #~ "Preserve the space at the front to separate this sentence from a pervious "
1227
+ #~ "sentence. a previous sentence"
1228
+ #~ msgid ""
1229
+ #~ " This extra sidebar slot allows you to add another column to Footer Panel %d"
1230
+ #~ msgstr ""
1231
+ #~ "Tento postranní panel navíc vám umožní přidat další sloupeček do panelu "
1232
+ #~ "zápatí %d"
1233
+
1234
+ #~ msgctxt ""
1235
+ #~ "Name of a sidebar in the footer panel. Leave the %d elements in the string "
1236
+ #~ "to preserve the number of the footer panel and sidebar, eg - Footer Panel 1 "
1237
+ #~ "- Sidebar 2"
1238
+ #~ msgid "Footer Panel %d - Sidebar %d"
1239
+ #~ msgstr "Panel zápatí %d - postranní panel %d"
1240
+
1241
+ #~ msgctxt ""
1242
+ #~ "Name of one of the panel settings in this theme's footer. The %d represents "
1243
+ #~ "the number of the panel, from 1-4 and should be kept in any translation, eg: "
1244
+ #~ "Footer Panel 1"
1245
+ #~ msgid "Footer Panel %d"
1246
+ #~ msgstr "Panel zápatí %d"
1247
+
1248
+ #~ msgctxt ""
1249
+ #~ "Name of one of the panel settings in this theme's footer. The %d represents "
1250
+ #~ "the number of the panel, from 1-4 and should be kept in any translation, eg: "
1251
+ #~ "Footer Panel 1 Label"
1252
+ #~ msgid "Footer Panel %d Label"
1253
+ #~ msgstr "Panel zápatí %d značka"
languages/business-profile-es_CO.po CHANGED
@@ -1,504 +1,504 @@
1
- # Copyright (C) 2015 Business Profile
2
- # This file is distributed under the same license as the Business Profile package.
3
- msgid ""
4
- msgstr ""
5
- "Project-Id-Version: Business Profile 1.0.6\n"
6
- "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/business-profile\n"
7
- "POT-Creation-Date: 2015-04-03 10:46:49+00:00\n"
8
- "MIME-Version: 1.0\n"
9
- "Content-Type: text/plain; charset=UTF-8\n"
10
- "Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2015-04-30 09:15-0500\n"
12
- "X-Generator: Poedit 1.7.4\n"
13
- "X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;"
14
- "_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;"
15
- "esc_html_x:1,2c\n"
16
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
- "X-Poedit-SourceCharset: UTF-8\n"
18
- "X-Poedit-Basepath: ../\n"
19
- "X-Textdomain-Support: yes\n"
20
- "Last-Translator: \n"
21
- "Language-Team: \n"
22
- "Language: es_CO\n"
23
- "X-Poedit-SearchPath-0: .\n"
24
-
25
- #: business-profile.php:110
26
- msgid "View the help documentation for Business Profile"
27
- msgstr "Ver documentación de ayuda para \"Business Profile\""
28
-
29
- #: business-profile.php:110
30
- msgid "Help"
31
- msgstr "Ayuda"
32
-
33
- #: includes/Integrations.class.php:107
34
- msgid "Book a table"
35
- msgstr "Reservar una mesa"
36
-
37
- #: includes/Integrations.class.php:127 includes/Integrations.class.php:131
38
- msgid "Show book a table link"
39
- msgstr "Mostrar enlace de reservar una mesa"
40
-
41
- #. Plugin Name of the plugin/theme
42
- #: includes/Settings.class.php:86 includes/Settings.class.php:87
43
- msgid "Business Profile"
44
- msgstr "Business Profile"
45
-
46
- #: includes/Settings.class.php:98
47
- msgid "Search Engine Optimization"
48
- msgstr "Optimización para Motores de Búsqueda (SEO)"
49
-
50
- #: includes/Settings.class.php:108
51
- msgid "Schema Type"
52
- msgstr "Tipo de \"Schema\""
53
-
54
- #: includes/Settings.class.php:109
55
- msgid ""
56
- "Select the option that best describes your business to improve how search "
57
- "engines understand your website"
58
- msgstr ""
59
- "Seleccione la opción que mejor describe su negocio para mejorar como los "
60
- "motores de búsqueda entienden su sitio web"
61
-
62
- #: includes/Settings.class.php:152
63
- msgid "Contact Information"
64
- msgstr "Información de contacto "
65
-
66
- #: includes/Settings.class.php:162
67
- msgid "Name"
68
- msgstr "Nombre"
69
-
70
- #: includes/Settings.class.php:163
71
- msgid "Enter the name of your business if it is different than the website name."
72
- msgstr ""
73
- "Ingrese el nombre de su negocio si es diferente al nombre de su sitio web."
74
-
75
- #: includes/Settings.class.php:174
76
- msgid "Address"
77
- msgstr "Dirección"
78
-
79
- #: includes/Settings.class.php:178
80
- msgid "No map coordinates set."
81
- msgstr "Coordenadas del mapa no establecidas"
82
-
83
- #: includes/Settings.class.php:179
84
- msgid "Requesting new coordinates"
85
- msgstr "Solicitando nuevas coordenadas"
86
-
87
- #: includes/Settings.class.php:180
88
- msgid "Select a match below"
89
- msgstr "Seleccione una opción a continuación"
90
-
91
- #: includes/Settings.class.php:181
92
- msgid "View"
93
- msgstr "Ver"
94
-
95
- #: includes/Settings.class.php:182
96
- msgid "Retrieve map coordinates"
97
- msgstr "Descargar coordenadas del mapa"
98
-
99
- #: includes/Settings.class.php:183
100
- msgid "Remove map coordinates"
101
- msgstr "Remover coordenadas del mapa"
102
-
103
- #: includes/Settings.class.php:184
104
- msgid "Try again?"
105
- msgstr "Intentar nuevamente?"
106
-
107
- #: includes/Settings.class.php:185
108
- msgid "Error"
109
- msgstr "Error"
110
-
111
- #: includes/Settings.class.php:186
112
- msgid ""
113
- "Invalid request. Be sure to fill out the address field before retrieving "
114
- "coordinates."
115
- msgstr ""
116
- "Solicitud inválida. Asegures de llenar el campo de dirección antes de descargar "
117
- "las coordenadas"
118
-
119
- #: includes/Settings.class.php:187
120
- msgid "Request denied."
121
- msgstr "Solicitud negada"
122
-
123
- #: includes/Settings.class.php:188
124
- msgid "Request denied because you are over your request quota."
125
- msgstr "Solicitud negada debido a que se ha excedido en su cuota de solicitudes"
126
-
127
- #: includes/Settings.class.php:189
128
- msgid "Nothing was found at that address"
129
- msgstr "No se encontró en esta dirección"
130
-
131
- #: includes/Settings.class.php:200
132
- msgid "Phone"
133
- msgstr "Teléfono"
134
-
135
- #: includes/Settings.class.php:210
136
- msgid "Contact Page"
137
- msgstr "Página de contacto"
138
-
139
- #: includes/Settings.class.php:211
140
- msgid ""
141
- "Select a page on your site where users can reach you, such as a contact form."
142
- msgstr ""
143
- "Seleccione la página de su sitio en la que sus usuarios pueden contactarlo, "
144
- "como un formulario de contacto."
145
-
146
- #: includes/Settings.class.php:227
147
- msgid "Email Address (optional)"
148
- msgstr "Dirección de correo (opcional)"
149
-
150
- #: includes/Settings.class.php:228
151
- msgid ""
152
- "Enter an email address only if you want to display this publicly. Showing your "
153
- "email address on your site may cause you to receive excessive spam."
154
- msgstr ""
155
- "Ingrese una dirección de correo solo si desea que esta sea mostrada "
156
- "públicamente. Mostrar su dirección de correo en su sitio web puede ocasionar "
157
- "una recepción masiva de spam."
158
-
159
- #: includes/Settings.class.php:236
160
- msgid "Schedule"
161
- msgstr "Horario"
162
-
163
- #: includes/Settings.class.php:246 includes/template-functions.php:387
164
- msgid "Opening Hours"
165
- msgstr "Horas en que está abierto"
166
-
167
- #: includes/Settings.class.php:247
168
- msgid "Define your weekly opening hours by adding scheduling rules."
169
- msgstr ""
170
- "Defina en que horas de la semana está abierto especificando reglas de horario"
171
-
172
- #: includes/Settings.class.php:262
173
- msgid "Add another opening time"
174
- msgstr "Agregue otra hora de apertura"
175
-
176
- #: includes/Settings.class.php:276
177
- msgid "Delete scheduling rule"
178
- msgstr "Elimine regla de horario"
179
-
180
- #: includes/WP_Widget.ContactCardWidget.class.php:25
181
- msgid "Show Name"
182
- msgstr "Mostrar nombre"
183
-
184
- #: includes/WP_Widget.ContactCardWidget.class.php:26
185
- msgid "Show Address"
186
- msgstr "Mostrar Dirección"
187
-
188
- #: includes/WP_Widget.ContactCardWidget.class.php:27
189
- msgid "Show link to get directions on Google Maps"
190
- msgstr "Mostrar enlace para obtener instrucciones de Google Maps"
191
-
192
- #: includes/WP_Widget.ContactCardWidget.class.php:28
193
- msgid "Show Phone number"
194
- msgstr "Mostrar Teléfono"
195
-
196
- #: includes/WP_Widget.ContactCardWidget.class.php:29
197
- msgid "Show contact details"
198
- msgstr "Mostrar detalles de contacto"
199
-
200
- #: includes/WP_Widget.ContactCardWidget.class.php:30
201
- msgid "Show Opening Hours"
202
- msgstr "Mostar Horas en que está Abierto"
203
-
204
- #: includes/WP_Widget.ContactCardWidget.class.php:31
205
- msgid "Show brief opening hours on one line"
206
- msgstr "Mostrar horas en que está abierto resumidas en una sola línea"
207
-
208
- #: includes/WP_Widget.ContactCardWidget.class.php:32
209
- msgid "Show Google Map"
210
- msgstr "Mostrar Mapa de Google"
211
-
212
- #: includes/WP_Widget.ContactCardWidget.class.php:38
213
- msgid "Contact Card"
214
- msgstr "Tarjeta de Contacto"
215
-
216
- #: includes/WP_Widget.ContactCardWidget.class.php:39
217
- msgid ""
218
- "Display a contact card with your name, address, phone number, opening hours and "
219
- "map."
220
- msgstr ""
221
- "Muestre una tarjeta de contacto con su nombre, dirección, teléfono, horas de "
222
- "apertura y mapa"
223
-
224
- #: includes/WP_Widget.ContactCardWidget.class.php:71
225
- msgid "Title"
226
- msgstr "Título"
227
-
228
- #: includes/template-functions.php:132 includes/template-functions.php:422
229
- msgid "Get directions"
230
- msgstr "Obtener direcciones"
231
-
232
- #: includes/template-functions.php:189
233
- msgid "Contact"
234
- msgstr "Contacto"
235
-
236
- #: includes/template-functions.php:294
237
- msgid " all day"
238
- msgstr " todo el día"
239
-
240
- #: includes/template-functions.php:304
241
- msgid " open until "
242
- msgstr " abierto hasta "
243
-
244
- #: includes/template-functions.php:306
245
- msgid " open from "
246
- msgstr " abierto desde "
247
-
248
- #: includes/template-functions.php:325
249
- msgid "Monday"
250
- msgstr "Lunes"
251
-
252
- #: includes/template-functions.php:326
253
- msgid "Tuesday"
254
- msgstr "Martes"
255
-
256
- #: includes/template-functions.php:327
257
- msgid "Wednesday"
258
- msgstr "Miércoles"
259
-
260
- #: includes/template-functions.php:328
261
- msgid "Thursday"
262
- msgstr "Jueves"
263
-
264
- #: includes/template-functions.php:329
265
- msgid "Friday"
266
- msgstr "Viernes"
267
-
268
- #: includes/template-functions.php:330
269
- msgid "Saturday"
270
- msgstr "Sábado"
271
-
272
- #: includes/template-functions.php:331
273
- msgid "Sunday"
274
- msgstr "Domingo"
275
-
276
- #: includes/template-functions.php:343
277
- msgid "Open"
278
- msgstr "Abierto"
279
-
280
- #: includes/template-functions.php:355
281
- msgid "Open until "
282
- msgstr "Abierto hasta"
283
-
284
- #: includes/template-functions.php:357
285
- msgid "Open from "
286
- msgstr "Abierto desde"
287
-
288
- #: includes/template-functions.php:379
289
- msgid "Closed"
290
- msgstr "Cerrado"
291
-
292
- #: lib/simple-admin-pages/classes/AdminPage.class.php:173
293
- msgid "You do not have sufficient permissions to access this page."
294
- msgstr "No tienen los permisos suficientes para acceder a esta página"
295
-
296
- #. Plugin URI of the plugin/theme
297
- #. Author URI of the plugin/theme
298
- msgid "http://themeofthecrop.com"
299
- msgstr "http://themeofthecrop.com"
300
-
301
- #. Description of the plugin/theme
302
- msgid ""
303
- "Contact information, Google Maps and opening hours made easy for businesses."
304
- msgstr ""
305
- "Información de contacto, Google Maps y horas en las que se presta servicio de "
306
- "forma fácil para los negocios"
307
-
308
- #. Author of the plugin/theme
309
- msgid "Theme of the Crop"
310
- msgstr ""
311
-
312
- #: includes/Settings.class.php:176
313
- msgctxt "separator between admin action links in address component"
314
- msgid " | "
315
- msgstr " | "
316
-
317
- #: includes/Settings.class.php:177
318
- msgctxt "separates latitude and longitude"
319
- msgid ", "
320
- msgstr ", "
321
-
322
- #: includes/Settings.class.php:249
323
- msgctxt "Monday abbreviation"
324
- msgid "Mo"
325
- msgstr "Lu"
326
-
327
- #: includes/Settings.class.php:250
328
- msgctxt "Tuesday abbreviation"
329
- msgid "Tu"
330
- msgstr "Ma"
331
-
332
- #: includes/Settings.class.php:251
333
- msgctxt "Wednesday abbreviation"
334
- msgid "We"
335
- msgstr "Mi"
336
-
337
- #: includes/Settings.class.php:252
338
- msgctxt "Thursday abbreviation"
339
- msgid "Th"
340
- msgstr "Ju"
341
-
342
- #: includes/Settings.class.php:253
343
- msgctxt "Friday abbreviation"
344
- msgid "Fr"
345
- msgstr "Vi"
346
-
347
- #: includes/Settings.class.php:254
348
- msgctxt "Saturday abbreviation"
349
- msgid "Sa"
350
- msgstr "Sa"
351
-
352
- #: includes/Settings.class.php:255
353
- msgctxt "Sunday abbreviation"
354
- msgid "Su"
355
- msgstr "Do"
356
-
357
- #: includes/Settings.class.php:257
358
- msgctxt ""
359
- "Time format displayed in the opening hours setting panel in your admin area. "
360
- "Must match formatting rules at http://amsul.ca/pickadate.js/time.htm#formats"
361
- msgid "h:i A"
362
- msgstr "h:i Y"
363
-
364
- #: includes/Settings.class.php:258
365
- msgctxt ""
366
- "Date format displayed in the opening hours setting panel in your admin area. "
367
- "Must match formatting rules at http://amsul.ca/pickadate.js/date.htm#formatting-"
368
- "rules"
369
- msgid "mmmm d, yyyy"
370
- msgstr "mmmm d, yyyy"
371
-
372
- #: includes/Settings.class.php:263
373
- msgctxt "Format of a scheduling rule"
374
- msgid "Weekly"
375
- msgstr "Semanal"
376
-
377
- #: includes/Settings.class.php:264
378
- msgctxt "Format of a scheduling rule"
379
- msgid "Monthly"
380
- msgstr "Mensual"
381
-
382
- #: includes/Settings.class.php:265
383
- msgctxt "Format of a scheduling rule"
384
- msgid "Date"
385
- msgstr "Fecha"
386
-
387
- #: includes/Settings.class.php:266
388
- msgctxt "Label for selecting days of the week in a scheduling rule"
389
- msgid "Days of the week"
390
- msgstr "Días de la semana"
391
-
392
- #: includes/Settings.class.php:267
393
- msgctxt "Label for selecting weeks of the month in a scheduling rule"
394
- msgid "Weeks of the month"
395
- msgstr "Semanas del mes"
396
-
397
- #: includes/Settings.class.php:268
398
- msgctxt "Label to select a date for a scheduling rule"
399
- msgid "Date"
400
- msgstr "Fecha"
401
-
402
- #: includes/Settings.class.php:269
403
- msgctxt "Label to select a time slot for a scheduling rule"
404
- msgid "Time"
405
- msgstr "Hora"
406
-
407
- #: includes/Settings.class.php:270
408
- msgctxt "Label to set a scheduling rule to last all day"
409
- msgid "All day"
410
- msgstr "Todo el día"
411
-
412
- #: includes/Settings.class.php:271
413
- msgctxt "Label for the starting time of a scheduling rule"
414
- msgid "Start"
415
- msgstr "Inicio"
416
-
417
- #: includes/Settings.class.php:272
418
- msgctxt "Label for the ending time of a scheduling rule"
419
- msgid "End"
420
- msgstr "Fin"
421
-
422
- #: includes/Settings.class.php:273
423
- msgctxt ""
424
- "Prompt displayed when a scheduling rule is set without any time restrictions"
425
- msgid "All day long. Want to %sset a time slot%s?"
426
- msgstr "Todo el día. Desea establecer intervalos de tiempo?"
427
-
428
- #: includes/Settings.class.php:274
429
- msgctxt "Toggle a scheduling rule open and closed"
430
- msgid "Open and close this rule"
431
- msgstr "Abrir y cerrar esta regla"
432
-
433
- #: includes/Settings.class.php:275
434
- msgctxt "Delete a scheduling rule"
435
- msgid "Delete rule"
436
- msgstr "Borrar regla"
437
-
438
- #: includes/Settings.class.php:277
439
- msgctxt ""
440
- "Brief default description of a scheduling rule when no weekdays or weeks are "
441
- "included in the rule"
442
- msgid "Never"
443
- msgstr "Nunca"
444
-
445
- #: includes/Settings.class.php:278
446
- msgctxt ""
447
- "Brief default description of a scheduling rule when all the weekdays/weeks are "
448
- "included in the rule"
449
- msgid "Every day"
450
- msgstr "Cada día"
451
-
452
- #: includes/Settings.class.php:279
453
- msgctxt ""
454
- "Brief default description of a scheduling rule when some weekdays are included "
455
- "on only some weeks of the month. %s should be left alone and will be replaced "
456
- "by a comma-separated list of days and weeks in the following format: M, T, W on "
457
- "the first, second week of the month"
458
- msgid "%s on the %s week of the month"
459
- msgstr "%s de la %s semana del mes"
460
-
461
- #: includes/Settings.class.php:280
462
- msgctxt ""
463
- "Brief default description of a scheduling rule when some weeks of the month are "
464
- "included but all or no weekdays are selected. %s should be left alone and will "
465
- "be replaced by a comma-separated list of weeks in the following format: First, "
466
- "second week of the month"
467
- msgid "%s week of the month"
468
- msgstr "%s semana del mes"
469
-
470
- #: includes/Settings.class.php:281
471
- msgctxt "Brief default description of a scheduling rule when no times are set"
472
- msgid "All day"
473
- msgstr "Todo el día"
474
-
475
- #: includes/Settings.class.php:282
476
- msgctxt ""
477
- "Brief default description of a scheduling rule when an end time is set but no "
478
- "start time. If the end time is 6pm, it will read: Ends at 6pm"
479
- msgid "Ends at"
480
- msgstr "Termina el"
481
-
482
- #: includes/Settings.class.php:283
483
- msgctxt ""
484
- "Brief default description of a scheduling rule when a start time is set but no "
485
- "end time. If the start time is 6pm, it will read: Starts at 6pm"
486
- msgid "Starts at"
487
- msgstr "Inicia el"
488
-
489
- #: includes/Settings.class.php:284
490
- msgctxt "Separator between times of a scheduling rule"
491
- msgid "&mdash;"
492
- msgstr "&mdash;"
493
-
494
- #: includes/template-functions.php:308 includes/template-functions.php:359
495
- msgctxt "Separator between opening and closing times. Example: 9:00am-5:00pm"
496
- msgid "-"
497
- msgstr "-"
498
-
499
- #: includes/template-functions.php:315
500
- msgctxt ""
501
- "Separator between multiple opening times in the brief opening hours. Example: "
502
- "Mo,We 9:00 AM - 5:00 PM; Tu,Th 10:00 AM - 5:00 PM"
503
- msgid "; "
504
- msgstr "; "
1
+ # Copyright (C) 2015 Business Profile
2
+ # This file is distributed under the same license as the Business Profile package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Business Profile 1.0.6\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/business-profile\n"
7
+ "POT-Creation-Date: 2015-04-03 10:46:49+00:00\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2015-04-30 09:15-0500\n"
12
+ "X-Generator: Poedit 1.7.4\n"
13
+ "X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;"
14
+ "_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;"
15
+ "esc_html_x:1,2c\n"
16
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
+ "X-Poedit-SourceCharset: UTF-8\n"
18
+ "X-Poedit-Basepath: ../\n"
19
+ "X-Textdomain-Support: yes\n"
20
+ "Last-Translator: \n"
21
+ "Language-Team: \n"
22
+ "Language: es_CO\n"
23
+ "X-Poedit-SearchPath-0: .\n"
24
+
25
+ #: business-profile.php:110
26
+ msgid "View the help documentation for Business Profile"
27
+ msgstr "Ver documentación de ayuda para \"Business Profile\""
28
+
29
+ #: business-profile.php:110
30
+ msgid "Help"
31
+ msgstr "Ayuda"
32
+
33
+ #: includes/Integrations.class.php:107
34
+ msgid "Book a table"
35
+ msgstr "Reservar una mesa"
36
+
37
+ #: includes/Integrations.class.php:127 includes/Integrations.class.php:131
38
+ msgid "Show book a table link"
39
+ msgstr "Mostrar enlace de reservar una mesa"
40
+
41
+ #. Plugin Name of the plugin/theme
42
+ #: includes/Settings.class.php:86 includes/Settings.class.php:87
43
+ msgid "Business Profile"
44
+ msgstr "Business Profile"
45
+
46
+ #: includes/Settings.class.php:98
47
+ msgid "Search Engine Optimization"
48
+ msgstr "Optimización para Motores de Búsqueda (SEO)"
49
+
50
+ #: includes/Settings.class.php:108
51
+ msgid "Schema Type"
52
+ msgstr "Tipo de \"Schema\""
53
+
54
+ #: includes/Settings.class.php:109
55
+ msgid ""
56
+ "Select the option that best describes your business to improve how search "
57
+ "engines understand your website"
58
+ msgstr ""
59
+ "Seleccione la opción que mejor describe su negocio para mejorar como los "
60
+ "motores de búsqueda entienden su sitio web"
61
+
62
+ #: includes/Settings.class.php:152
63
+ msgid "Contact Information"
64
+ msgstr "Información de contacto "
65
+
66
+ #: includes/Settings.class.php:162
67
+ msgid "Name"
68
+ msgstr "Nombre"
69
+
70
+ #: includes/Settings.class.php:163
71
+ msgid "Enter the name of your business if it is different than the website name."
72
+ msgstr ""
73
+ "Ingrese el nombre de su negocio si es diferente al nombre de su sitio web."
74
+
75
+ #: includes/Settings.class.php:174
76
+ msgid "Address"
77
+ msgstr "Dirección"
78
+
79
+ #: includes/Settings.class.php:178
80
+ msgid "No map coordinates set."
81
+ msgstr "Coordenadas del mapa no establecidas"
82
+
83
+ #: includes/Settings.class.php:179
84
+ msgid "Requesting new coordinates"
85
+ msgstr "Solicitando nuevas coordenadas"
86
+
87
+ #: includes/Settings.class.php:180
88
+ msgid "Select a match below"
89
+ msgstr "Seleccione una opción a continuación"
90
+
91
+ #: includes/Settings.class.php:181
92
+ msgid "View"
93
+ msgstr "Ver"
94
+
95
+ #: includes/Settings.class.php:182
96
+ msgid "Retrieve map coordinates"
97
+ msgstr "Descargar coordenadas del mapa"
98
+
99
+ #: includes/Settings.class.php:183
100
+ msgid "Remove map coordinates"
101
+ msgstr "Remover coordenadas del mapa"
102
+
103
+ #: includes/Settings.class.php:184
104
+ msgid "Try again?"
105
+ msgstr "Intentar nuevamente?"
106
+
107
+ #: includes/Settings.class.php:185
108
+ msgid "Error"
109
+ msgstr "Error"
110
+
111
+ #: includes/Settings.class.php:186
112
+ msgid ""
113
+ "Invalid request. Be sure to fill out the address field before retrieving "
114
+ "coordinates."
115
+ msgstr ""
116
+ "Solicitud inválida. Asegures de llenar el campo de dirección antes de descargar "
117
+ "las coordenadas"
118
+
119
+ #: includes/Settings.class.php:187
120
+ msgid "Request denied."
121
+ msgstr "Solicitud negada"
122
+
123
+ #: includes/Settings.class.php:188
124
+ msgid "Request denied because you are over your request quota."
125
+ msgstr "Solicitud negada debido a que se ha excedido en su cuota de solicitudes"
126
+
127
+ #: includes/Settings.class.php:189
128
+ msgid "Nothing was found at that address"
129
+ msgstr "No se encontró en esta dirección"
130
+
131
+ #: includes/Settings.class.php:200
132
+ msgid "Phone"
133
+ msgstr "Teléfono"
134
+
135
+ #: includes/Settings.class.php:210
136
+ msgid "Contact Page"
137
+ msgstr "Página de contacto"
138
+
139
+ #: includes/Settings.class.php:211
140
+ msgid ""
141
+ "Select a page on your site where users can reach you, such as a contact form."
142
+ msgstr ""
143
+ "Seleccione la página de su sitio en la que sus usuarios pueden contactarlo, "
144
+ "como un formulario de contacto."
145
+
146
+ #: includes/Settings.class.php:227
147
+ msgid "Email Address (optional)"
148
+ msgstr "Dirección de correo (opcional)"
149
+
150
+ #: includes/Settings.class.php:228
151
+ msgid ""
152
+ "Enter an email address only if you want to display this publicly. Showing your "
153
+ "email address on your site may cause you to receive excessive spam."
154
+ msgstr ""
155
+ "Ingrese una dirección de correo solo si desea que esta sea mostrada "
156
+ "públicamente. Mostrar su dirección de correo en su sitio web puede ocasionar "
157
+ "una recepción masiva de spam."
158
+
159
+ #: includes/Settings.class.php:236
160
+ msgid "Schedule"
161
+ msgstr "Horario"
162
+
163
+ #: includes/Settings.class.php:246 includes/template-functions.php:387
164
+ msgid "Opening Hours"
165
+ msgstr "Horas en que está abierto"
166
+
167
+ #: includes/Settings.class.php:247
168
+ msgid "Define your weekly opening hours by adding scheduling rules."
169
+ msgstr ""
170
+ "Defina en que horas de la semana está abierto especificando reglas de horario"
171
+
172
+ #: includes/Settings.class.php:262
173
+ msgid "Add another opening time"
174
+ msgstr "Agregue otra hora de apertura"
175
+
176
+ #: includes/Settings.class.php:276
177
+ msgid "Delete scheduling rule"
178
+ msgstr "Elimine regla de horario"
179
+
180
+ #: includes/WP_Widget.ContactCardWidget.class.php:25
181
+ msgid "Show Name"
182
+ msgstr "Mostrar nombre"
183
+
184
+ #: includes/WP_Widget.ContactCardWidget.class.php:26
185
+ msgid "Show Address"
186
+ msgstr "Mostrar Dirección"
187
+
188
+ #: includes/WP_Widget.ContactCardWidget.class.php:27
189
+ msgid "Show link to get directions on Google Maps"
190
+ msgstr "Mostrar enlace para obtener instrucciones de Google Maps"
191
+
192
+ #: includes/WP_Widget.ContactCardWidget.class.php:28
193
+ msgid "Show Phone number"
194
+ msgstr "Mostrar Teléfono"
195
+
196
+ #: includes/WP_Widget.ContactCardWidget.class.php:29
197
+ msgid "Show contact details"
198
+ msgstr "Mostrar detalles de contacto"
199
+
200
+ #: includes/WP_Widget.ContactCardWidget.class.php:30
201
+ msgid "Show Opening Hours"
202
+ msgstr "Mostar Horas en que está Abierto"
203
+
204
+ #: includes/WP_Widget.ContactCardWidget.class.php:31
205
+ msgid "Show brief opening hours on one line"
206
+ msgstr "Mostrar horas en que está abierto resumidas en una sola línea"
207
+
208
+ #: includes/WP_Widget.ContactCardWidget.class.php:32
209
+ msgid "Show Google Map"
210
+ msgstr "Mostrar Mapa de Google"
211
+
212
+ #: includes/WP_Widget.ContactCardWidget.class.php:38
213
+ msgid "Contact Card"
214
+ msgstr "Tarjeta de Contacto"
215
+
216
+ #: includes/WP_Widget.ContactCardWidget.class.php:39
217
+ msgid ""
218
+ "Display a contact card with your name, address, phone number, opening hours and "
219
+ "map."
220
+ msgstr ""
221
+ "Muestre una tarjeta de contacto con su nombre, dirección, teléfono, horas de "
222
+ "apertura y mapa"
223
+
224
+ #: includes/WP_Widget.ContactCardWidget.class.php:71
225
+ msgid "Title"
226
+ msgstr "Título"
227
+
228
+ #: includes/template-functions.php:132 includes/template-functions.php:422
229
+ msgid "Get directions"
230
+ msgstr "Obtener direcciones"
231
+
232
+ #: includes/template-functions.php:189
233
+ msgid "Contact"
234
+ msgstr "Contacto"
235
+
236
+ #: includes/template-functions.php:294
237
+ msgid " all day"
238
+ msgstr " todo el día"
239
+
240
+ #: includes/template-functions.php:304
241
+ msgid " open until "
242
+ msgstr " abierto hasta "
243
+
244
+ #: includes/template-functions.php:306
245
+ msgid " open from "
246
+ msgstr " abierto desde "
247
+
248
+ #: includes/template-functions.php:325
249
+ msgid "Monday"
250
+ msgstr "Lunes"
251
+
252
+ #: includes/template-functions.php:326
253
+ msgid "Tuesday"
254
+ msgstr "Martes"
255
+
256
+ #: includes/template-functions.php:327
257
+ msgid "Wednesday"
258
+ msgstr "Miércoles"
259
+
260
+ #: includes/template-functions.php:328
261
+ msgid "Thursday"
262
+ msgstr "Jueves"
263
+
264
+ #: includes/template-functions.php:329
265
+ msgid "Friday"
266
+ msgstr "Viernes"
267
+
268
+ #: includes/template-functions.php:330
269
+ msgid "Saturday"
270
+ msgstr "Sábado"
271
+
272
+ #: includes/template-functions.php:331
273
+ msgid "Sunday"
274
+ msgstr "Domingo"
275
+
276
+ #: includes/template-functions.php:343
277
+ msgid "Open"
278
+ msgstr "Abierto"
279
+
280
+ #: includes/template-functions.php:355
281
+ msgid "Open until "
282
+ msgstr "Abierto hasta"
283
+
284
+ #: includes/template-functions.php:357
285
+ msgid "Open from "
286
+ msgstr "Abierto desde"
287
+
288
+ #: includes/template-functions.php:379
289
+ msgid "Closed"
290
+ msgstr "Cerrado"
291
+
292
+ #: lib/simple-admin-pages/classes/AdminPage.class.php:173
293
+ msgid "You do not have sufficient permissions to access this page."
294
+ msgstr "No tienen los permisos suficientes para acceder a esta página"
295
+
296
+ #. Plugin URI of the plugin/theme
297
+ #. Author URI of the plugin/theme
298
+ msgid "http://themeofthecrop.com"
299
+ msgstr "http://themeofthecrop.com"
300
+
301
+ #. Description of the plugin/theme
302
+ msgid ""
303
+ "Contact information, Google Maps and opening hours made easy for businesses."
304
+ msgstr ""
305
+ "Información de contacto, Google Maps y horas en las que se presta servicio de "
306
+ "forma fácil para los negocios"
307
+
308
+ #. Author of the plugin/theme
309
+ msgid "Theme of the Crop"
310
+ msgstr ""
311
+
312
+ #: includes/Settings.class.php:176
313
+ msgctxt "separator between admin action links in address component"
314
+ msgid " | "
315
+ msgstr " | "
316
+
317
+ #: includes/Settings.class.php:177
318
+ msgctxt "separates latitude and longitude"
319
+ msgid ", "
320
+ msgstr ", "
321
+
322
+ #: includes/Settings.class.php:249
323
+ msgctxt "Monday abbreviation"
324
+ msgid "Mo"
325
+ msgstr "Lu"
326
+
327
+ #: includes/Settings.class.php:250
328
+ msgctxt "Tuesday abbreviation"
329
+ msgid "Tu"
330
+ msgstr "Ma"
331
+
332
+ #: includes/Settings.class.php:251
333
+ msgctxt "Wednesday abbreviation"
334
+ msgid "We"
335
+ msgstr "Mi"
336
+
337
+ #: includes/Settings.class.php:252
338
+ msgctxt "Thursday abbreviation"
339
+ msgid "Th"
340
+ msgstr "Ju"
341
+
342
+ #: includes/Settings.class.php:253
343
+ msgctxt "Friday abbreviation"
344
+ msgid "Fr"
345
+ msgstr "Vi"
346
+
347
+ #: includes/Settings.class.php:254
348
+ msgctxt "Saturday abbreviation"
349
+ msgid "Sa"
350
+ msgstr "Sa"
351
+
352
+ #: includes/Settings.class.php:255
353
+ msgctxt "Sunday abbreviation"
354
+ msgid "Su"
355
+ msgstr "Do"
356
+
357
+ #: includes/Settings.class.php:257
358
+ msgctxt ""
359
+ "Time format displayed in the opening hours setting panel in your admin area. "
360
+ "Must match formatting rules at http://amsul.ca/pickadate.js/time.htm#formats"
361
+ msgid "h:i A"
362
+ msgstr "h:i Y"
363
+
364
+ #: includes/Settings.class.php:258
365
+ msgctxt ""
366
+ "Date format displayed in the opening hours setting panel in your admin area. "
367
+ "Must match formatting rules at http://amsul.ca/pickadate.js/date.htm#formatting-"
368
+ "rules"
369
+ msgid "mmmm d, yyyy"
370
+ msgstr "mmmm d, yyyy"
371
+
372
+ #: includes/Settings.class.php:263
373
+ msgctxt "Format of a scheduling rule"
374
+ msgid "Weekly"
375
+ msgstr "Semanal"
376
+
377
+ #: includes/Settings.class.php:264
378
+ msgctxt "Format of a scheduling rule"
379
+ msgid "Monthly"
380
+ msgstr "Mensual"
381
+
382
+ #: includes/Settings.class.php:265
383
+ msgctxt "Format of a scheduling rule"
384
+ msgid "Date"
385
+ msgstr "Fecha"
386
+
387
+ #: includes/Settings.class.php:266
388
+ msgctxt "Label for selecting days of the week in a scheduling rule"
389
+ msgid "Days of the week"
390
+ msgstr "Días de la semana"
391
+
392
+ #: includes/Settings.class.php:267
393
+ msgctxt "Label for selecting weeks of the month in a scheduling rule"
394
+ msgid "Weeks of the month"
395
+ msgstr "Semanas del mes"
396
+
397
+ #: includes/Settings.class.php:268
398
+ msgctxt "Label to select a date for a scheduling rule"
399
+ msgid "Date"
400
+ msgstr "Fecha"
401
+
402
+ #: includes/Settings.class.php:269
403
+ msgctxt "Label to select a time slot for a scheduling rule"
404
+ msgid "Time"
405
+ msgstr "Hora"
406
+
407
+ #: includes/Settings.class.php:270
408
+ msgctxt "Label to set a scheduling rule to last all day"
409
+ msgid "All day"
410
+ msgstr "Todo el día"
411
+
412
+ #: includes/Settings.class.php:271
413
+ msgctxt "Label for the starting time of a scheduling rule"
414
+ msgid "Start"
415
+ msgstr "Inicio"
416
+
417
+ #: includes/Settings.class.php:272
418
+ msgctxt "Label for the ending time of a scheduling rule"
419
+ msgid "End"
420
+ msgstr "Fin"
421
+
422
+ #: includes/Settings.class.php:273
423
+ msgctxt ""
424
+ "Prompt displayed when a scheduling rule is set without any time restrictions"
425
+ msgid "All day long. Want to %sset a time slot%s?"
426
+ msgstr "Todo el día. Desea establecer intervalos de tiempo?"
427
+
428
+ #: includes/Settings.class.php:274
429
+ msgctxt "Toggle a scheduling rule open and closed"
430
+ msgid "Open and close this rule"
431
+ msgstr "Abrir y cerrar esta regla"
432
+
433
+ #: includes/Settings.class.php:275
434
+ msgctxt "Delete a scheduling rule"
435
+ msgid "Delete rule"
436
+ msgstr "Borrar regla"
437
+
438
+ #: includes/Settings.class.php:277
439
+ msgctxt ""
440
+ "Brief default description of a scheduling rule when no weekdays or weeks are "
441
+ "included in the rule"
442
+ msgid "Never"
443
+ msgstr "Nunca"
444
+
445
+ #: includes/Settings.class.php:278
446
+ msgctxt ""
447
+ "Brief default description of a scheduling rule when all the weekdays/weeks are "
448
+ "included in the rule"
449
+ msgid "Every day"
450
+ msgstr "Cada día"
451
+
452
+ #: includes/Settings.class.php:279
453
+ msgctxt ""
454
+ "Brief default description of a scheduling rule when some weekdays are included "
455
+ "on only some weeks of the month. %s should be left alone and will be replaced "
456
+ "by a comma-separated list of days and weeks in the following format: M, T, W on "
457
+ "the first, second week of the month"
458
+ msgid "%s on the %s week of the month"
459
+ msgstr "%s de la %s semana del mes"
460
+
461
+ #: includes/Settings.class.php:280
462
+ msgctxt ""
463
+ "Brief default description of a scheduling rule when some weeks of the month are "
464
+ "included but all or no weekdays are selected. %s should be left alone and will "
465
+ "be replaced by a comma-separated list of weeks in the following format: First, "
466
+ "second week of the month"
467
+ msgid "%s week of the month"
468
+ msgstr "%s semana del mes"
469
+
470
+ #: includes/Settings.class.php:281
471
+ msgctxt "Brief default description of a scheduling rule when no times are set"
472
+ msgid "All day"
473
+ msgstr "Todo el día"
474
+
475
+ #: includes/Settings.class.php:282
476
+ msgctxt ""
477
+ "Brief default description of a scheduling rule when an end time is set but no "
478
+ "start time. If the end time is 6pm, it will read: Ends at 6pm"
479
+ msgid "Ends at"
480
+ msgstr "Termina el"
481
+
482
+ #: includes/Settings.class.php:283
483
+ msgctxt ""
484
+ "Brief default description of a scheduling rule when a start time is set but no "
485
+ "end time. If the start time is 6pm, it will read: Starts at 6pm"
486
+ msgid "Starts at"
487
+ msgstr "Inicia el"
488
+
489
+ #: includes/Settings.class.php:284
490
+ msgctxt "Separator between times of a scheduling rule"
491
+ msgid "&mdash;"
492
+ msgstr "&mdash;"
493
+
494
+ #: includes/template-functions.php:308 includes/template-functions.php:359
495
+ msgctxt "Separator between opening and closing times. Example: 9:00am-5:00pm"
496
+ msgid "-"
497
+ msgstr "-"
498
+
499
+ #: includes/template-functions.php:315
500
+ msgctxt ""
501
+ "Separator between multiple opening times in the brief opening hours. Example: "
502
+ "Mo,We 9:00 AM - 5:00 PM; Tu,Th 10:00 AM - 5:00 PM"
503
+ msgid "; "
504
+ msgstr "; "
languages/business-profile-es_ES.po CHANGED
@@ -1,545 +1,545 @@
1
- # Copyright (C) 2015 Business Profile
2
- # This file is distributed under the same license as the Business Profile package.
3
- msgid ""
4
- msgstr ""
5
- "Project-Id-Version: Business Profile 1.0.6\n"
6
- "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/business-profile\n"
7
- "POT-Creation-Date: 2015-09-13 17:50+0200\n"
8
- "MIME-Version: 1.0\n"
9
- "Content-Type: text/plain; charset=UTF-8\n"
10
- "Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2015-09-13 18:12+0200\n"
12
- "Language-Team: \n"
13
- "X-Generator: Poedit 1.8.4\n"
14
- "X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;"
15
- "_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;"
16
- "esc_html_x:1,2c\n"
17
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
- "X-Poedit-SourceCharset: UTF-8\n"
19
- "X-Poedit-Basepath: ..\n"
20
- "X-Textdomain-Support: yes\n"
21
- "Last-Translator: \n"
22
- "Language: es_ES\n"
23
- "X-Poedit-SearchPath-0: .\n"
24
-
25
- #: business-profile.php:110
26
- msgid "View the help documentation for Business Profile"
27
- msgstr "Ver la documentación de ayuda para su Perfil Empresarial"
28
-
29
- #: business-profile.php:110
30
- msgid "Help"
31
- msgstr "Ayuda"
32
-
33
- #: includes/Integrations.class.php:107
34
- msgid "Book a table"
35
- msgstr "Reservar mesa"
36
-
37
- #: includes/Integrations.class.php:127 includes/Integrations.class.php:131
38
- msgid "Show book a table link"
39
- msgstr "Mostrar enlace a libro de Reservas"
40
-
41
- #. Plugin Name of the plugin/theme
42
- #: includes/Settings.class.php:86 includes/Settings.class.php:87
43
- msgid "Business Profile"
44
- msgstr "Perfil Empresarial"
45
-
46
- #: includes/Settings.class.php:98
47
- msgid "Search Engine Optimization"
48
- msgstr "Optimización para motores de búsqueda"
49
-
50
- #: includes/Settings.class.php:108
51
- msgid "Schema Type"
52
- msgstr "Tipo de esquema"
53
-
54
- #: includes/Settings.class.php:109
55
- msgid ""
56
- "Select the option that best describes your business to improve how search "
57
- "engines understand your website"
58
- msgstr ""
59
- "Seleccione la opción que mejor describe su negocio para mejorar cómo los "
60
- "motores de búsqueda a comprender su sitio web"
61
-
62
- #: includes/Settings.class.php:152
63
- msgid "Contact Information"
64
- msgstr "Información de Contacto"
65
-
66
- #: includes/Settings.class.php:162
67
- msgid "Name"
68
- msgstr "Nombre"
69
-
70
- #: includes/Settings.class.php:163
71
- msgid ""
72
- "Enter the name of your business if it is different than the website name."
73
- msgstr ""
74
- "Introduzca el nombre de su negocio si es diferente que el nombre del sitio "
75
- "web."
76
-
77
- #: includes/Settings.class.php:174
78
- msgid "Address"
79
- msgstr "Dirección"
80
-
81
- #: includes/Settings.class.php:178
82
- msgid "No map coordinates set."
83
- msgstr "No hay ningunas coordenadas establecidas para mapa."
84
-
85
- #: includes/Settings.class.php:179
86
- msgid "Requesting new coordinates"
87
- msgstr "Solicitar nuevas coordenadas"
88
-
89
- #: includes/Settings.class.php:180
90
- msgid "Select a match below"
91
- msgstr "Seleccionar de debajo"
92
-
93
- #: includes/Settings.class.php:181
94
- msgid "View"
95
- msgstr "Mostrar"
96
-
97
- #: includes/Settings.class.php:182
98
- msgid "Retrieve map coordinates"
99
- msgstr "Recuperar las coordenadas del mapa"
100
-
101
- #: includes/Settings.class.php:183
102
- msgid "Remove map coordinates"
103
- msgstr "Eliminar las coordenadas del mapa"
104
-
105
- #: includes/Settings.class.php:184
106
- msgid "Try again?"
107
- msgstr "¿Reintentar?"
108
-
109
- #: includes/Settings.class.php:185
110
- msgid "Error"
111
- msgstr "Error:"
112
-
113
- #: includes/Settings.class.php:186
114
- msgid ""
115
- "Invalid request. Be sure to fill out the address field before retrieving "
116
- "coordinates."
117
- msgstr ""
118
- "Solicitud no válida. Asegúrese de llenar el campo de la dirección antes de "
119
- "recuperar las coordenadas."
120
-
121
- #: includes/Settings.class.php:187
122
- msgid "Request denied."
123
- msgstr "La solicitud ha sido denegada"
124
-
125
- #: includes/Settings.class.php:188
126
- msgid "Request denied because you are over your request quota."
127
- msgstr "Solicitud denegada porque estás por encima de su cuota de solicitud."
128
-
129
- #: includes/Settings.class.php:189
130
- msgid "Nothing was found at that address"
131
- msgstr "No se encontró nada en esa dirección"
132
-
133
- #: includes/Settings.class.php:200
134
- msgid "Phone"
135
- msgstr "Teléfono"
136
-
137
- #: includes/Settings.class.php:210
138
- msgid "Contact Page"
139
- msgstr "Página de Contacto"
140
-
141
- #: includes/Settings.class.php:211
142
- msgid ""
143
- "Select a page on your site where users can reach you, such as a contact form."
144
- msgstr ""
145
- "Seleccione una página en su sitio donde los usuarios pueden llegar a usted, "
146
- "como un formulario de contacto."
147
-
148
- #: includes/Settings.class.php:227
149
- msgid "Email Address (optional)"
150
- msgstr "Correo electrónico (opcional)"
151
-
152
- #: includes/Settings.class.php:228
153
- msgid ""
154
- "Enter an email address only if you want to display this publicly. Showing "
155
- "your email address on your site may cause you to receive excessive spam."
156
- msgstr ""
157
- "Introduzca una dirección de correo electrónico sólo si desea mostrarla "
158
- "públicamente. Mostrar su dirección de correo electrónico puede hacer que "
159
- "usted reciba un exceso de spam."
160
-
161
- #: includes/Settings.class.php:236
162
- msgid "Schedule"
163
- msgstr "Agenda"
164
-
165
- #: includes/Settings.class.php:246 includes/template-functions.php:389
166
- msgid "Opening Hours"
167
- msgstr "Horario de apertura"
168
-
169
- #: includes/Settings.class.php:247
170
- msgid "Define your weekly opening hours by adding scheduling rules."
171
- msgstr ""
172
- "Defina sus horas semanales de apertura al añadir reglas de planificación."
173
-
174
- #: includes/Settings.class.php:262
175
- msgid "Add another opening time"
176
- msgstr "Añadir otra hora de apertura"
177
-
178
- #: includes/Settings.class.php:276
179
- msgid "Delete scheduling rule"
180
- msgstr "Eliminar regla de programación"
181
-
182
- #: includes/Settings.class.php:293
183
- msgid "Display"
184
- msgstr "Mostrar"
185
-
186
- #: includes/Settings.class.php:303
187
- msgid "Shortcode"
188
- msgstr "Código"
189
-
190
- #: includes/Settings.class.php:305
191
- msgid ""
192
- "Paste this shortcode into any page or post to display your contact details. "
193
- "Learn about %sall of the attributes%s in the documentation."
194
- msgstr ""
195
- "Pegar este código en cualquier página o post para mostrar sus datos de "
196
- "contacto. Aprenda sobre %stodos los atributos%s en la documentación."
197
-
198
- #: includes/WP_Widget.ContactCardWidget.class.php:25
199
- msgid "Show Name"
200
- msgstr "Mostrar Nombre"
201
-
202
- #: includes/WP_Widget.ContactCardWidget.class.php:26
203
- msgid "Show Address"
204
- msgstr "Mostrar Dirección"
205
-
206
- #: includes/WP_Widget.ContactCardWidget.class.php:27
207
- msgid "Show link to get directions on Google Maps"
208
- msgstr "Mostrar enlace para obtener direcciones en Google Maps"
209
-
210
- #: includes/WP_Widget.ContactCardWidget.class.php:28
211
- msgid "Show Phone number"
212
- msgstr "Mostrar numero de Teléfono"
213
-
214
- #: includes/WP_Widget.ContactCardWidget.class.php:29
215
- msgid "Show contact details"
216
- msgstr "Mostrar detalles de contacto"
217
-
218
- #: includes/WP_Widget.ContactCardWidget.class.php:30
219
- msgid "Show Opening Hours"
220
- msgstr "Mostrar horario de Apertura"
221
-
222
- #: includes/WP_Widget.ContactCardWidget.class.php:31
223
- msgid "Show brief opening hours on one line"
224
- msgstr "Mostrar horas de apertura en una sola línea"
225
-
226
- #: includes/WP_Widget.ContactCardWidget.class.php:32
227
- msgid "Show Google Map"
228
- msgstr "Mostrar mapa de Google"
229
-
230
- #: includes/WP_Widget.ContactCardWidget.class.php:38
231
- msgid "Contact Card"
232
- msgstr "Tarjeta de Contacto"
233
-
234
- #: includes/WP_Widget.ContactCardWidget.class.php:39
235
- msgid ""
236
- "Display a contact card with your name, address, phone number, opening hours "
237
- "and map."
238
- msgstr ""
239
- "Mostrar una tarjeta de contacto con su nombre, dirección, número de "
240
- "teléfono, horario de apertura y el mapa."
241
-
242
- #: includes/WP_Widget.ContactCardWidget.class.php:71
243
- msgid "Title"
244
- msgstr "Título"
245
-
246
- #: includes/template-functions.php:132 includes/template-functions.php:426
247
- msgid "Get directions"
248
- msgstr "Como llegar"
249
-
250
- #: includes/template-functions.php:190
251
- msgid "Contact"
252
- msgstr "Contacto"
253
-
254
- #: includes/template-functions.php:327
255
- msgid "Monday"
256
- msgstr "Lunes"
257
-
258
- #: includes/template-functions.php:328
259
- msgid "Tuesday"
260
- msgstr "Martes"
261
-
262
- #: includes/template-functions.php:329
263
- msgid "Wednesday"
264
- msgstr "Miércoles"
265
-
266
- #: includes/template-functions.php:330
267
- msgid "Thursday"
268
- msgstr "Jueves"
269
-
270
- #: includes/template-functions.php:331
271
- msgid "Friday"
272
- msgstr "Viernes"
273
-
274
- #: includes/template-functions.php:332
275
- msgid "Saturday"
276
- msgstr "Sábado"
277
-
278
- #: includes/template-functions.php:333
279
- msgid "Sunday"
280
- msgstr "Domingo"
281
-
282
- #: includes/template-functions.php:345
283
- msgid "Open"
284
- msgstr "Abrierto"
285
-
286
- #: includes/template-functions.php:357
287
- msgid "Open until "
288
- msgstr "Abierto hasta "
289
-
290
- #: includes/template-functions.php:359
291
- msgid "Open from "
292
- msgstr "Abierto de "
293
-
294
- #: includes/template-functions.php:381
295
- msgid "Closed"
296
- msgstr "Cerrado"
297
-
298
- #: lib/simple-admin-pages/classes/AdminPage.class.php:173
299
- msgid "You do not have sufficient permissions to access this page."
300
- msgstr "No tienes suficientes permisos para acceder a esta página."
301
-
302
- #. Plugin URI of the plugin/theme
303
- #. Author URI of the plugin/theme
304
- msgid "http://themeofthecrop.com"
305
- msgstr "http://themeofthecrop.com"
306
-
307
- #. Description of the plugin/theme
308
- msgid ""
309
- "Contact information, Google Maps and opening hours made easy for businesses."
310
- msgstr ""
311
- "Información de contacto, Google Maps y hora de apertura fácil para las "
312
- "empresas."
313
-
314
- #. Author of the plugin/theme
315
- msgid "Theme of the Crop"
316
- msgstr "Theme of the Crop"
317
-
318
- #: includes/Settings.class.php:176
319
- msgctxt "separator between admin action links in address component"
320
- msgid " | "
321
- msgstr " | "
322
-
323
- #: includes/Settings.class.php:177
324
- msgctxt "separates latitude and longitude"
325
- msgid ", "
326
- msgstr ", "
327
-
328
- #: includes/Settings.class.php:249
329
- msgctxt "Monday abbreviation"
330
- msgid "Mo"
331
- msgstr "Lu"
332
-
333
- #: includes/Settings.class.php:250
334
- msgctxt "Tuesday abbreviation"
335
- msgid "Tu"
336
- msgstr "Ma"
337
-
338
- #: includes/Settings.class.php:251
339
- msgctxt "Wednesday abbreviation"
340
- msgid "We"
341
- msgstr "Mi"
342
-
343
- #: includes/Settings.class.php:252
344
- msgctxt "Thursday abbreviation"
345
- msgid "Th"
346
- msgstr "Ju"
347
-
348
- #: includes/Settings.class.php:253
349
- msgctxt "Friday abbreviation"
350
- msgid "Fr"
351
- msgstr "Vi"
352
-
353
- #: includes/Settings.class.php:254
354
- msgctxt "Saturday abbreviation"
355
- msgid "Sa"
356
- msgstr "Sá"
357
-
358
- #: includes/Settings.class.php:255
359
- msgctxt "Sunday abbreviation"
360
- msgid "Su"
361
- msgstr "Do"
362
-
363
- #: includes/Settings.class.php:257
364
- msgctxt ""
365
- "Time format displayed in the opening hours setting panel in your admin area. "
366
- "Must match formatting rules at http://amsul.ca/pickadate.js/time.htm#formats"
367
- msgid "h:i A"
368
- msgstr "h:i A"
369
-
370
- #: includes/Settings.class.php:258
371
- msgctxt ""
372
- "Date format displayed in the opening hours setting panel in your admin area. "
373
- "Must match formatting rules at http://amsul.ca/pickadate.js/date."
374
- "htm#formatting-rules"
375
- msgid "mmmm d, yyyy"
376
- msgstr "mmmm d, yyyy"
377
-
378
- #: includes/Settings.class.php:263
379
- msgctxt "Format of a scheduling rule"
380
- msgid "Weekly"
381
- msgstr "Semanal"
382
-
383
- #: includes/Settings.class.php:264
384
- msgctxt "Format of a scheduling rule"
385
- msgid "Monthly"
386
- msgstr "Mensual"
387
-
388
- #: includes/Settings.class.php:265
389
- msgctxt "Format of a scheduling rule"
390
- msgid "Date"
391
- msgstr "Fecha"
392
-
393
- #: includes/Settings.class.php:266
394
- msgctxt "Label for selecting days of the week in a scheduling rule"
395
- msgid "Days of the week"
396
- msgstr "Días de la semana"
397
-
398
- #: includes/Settings.class.php:267
399
- msgctxt "Label for selecting weeks of the month in a scheduling rule"
400
- msgid "Weeks of the month"
401
- msgstr "Semanas del mes"
402
-
403
- #: includes/Settings.class.php:268
404
- msgctxt "Label to select a date for a scheduling rule"
405
- msgid "Date"
406
- msgstr "Fecha"
407
-
408
- #: includes/Settings.class.php:269
409
- msgctxt "Label to select a time slot for a scheduling rule"
410
- msgid "Time"
411
- msgstr "Hora"
412
-
413
- #: includes/Settings.class.php:270
414
- msgctxt "Label to set a scheduling rule to last all day"
415
- msgid "All day"
416
- msgstr "Todo el día"
417
-
418
- #: includes/Settings.class.php:271
419
- msgctxt "Label for the starting time of a scheduling rule"
420
- msgid "Start"
421
- msgstr "Comienza"
422
-
423
- #: includes/Settings.class.php:272
424
- msgctxt "Label for the ending time of a scheduling rule"
425
- msgid "End"
426
- msgstr "Finaliza"
427
-
428
- #: includes/Settings.class.php:273
429
- msgctxt ""
430
- "Prompt displayed when a scheduling rule is set without any time restrictions"
431
- msgid "All day long. Want to %sset a time slot%s?"
432
- msgstr "Todo el día. ¿Quieres %sestablecer un intervalo de tiempo%s?"
433
-
434
- #: includes/Settings.class.php:274
435
- msgctxt "Toggle a scheduling rule open and closed"
436
- msgid "Open and close this rule"
437
- msgstr "Abrir y cerrar esta regla"
438
-
439
- #: includes/Settings.class.php:275
440
- msgctxt "Delete a scheduling rule"
441
- msgid "Delete rule"
442
- msgstr "Eliminar esta regla"
443
-
444
- #: includes/Settings.class.php:277
445
- msgctxt ""
446
- "Brief default description of a scheduling rule when no weekdays or weeks are "
447
- "included in the rule"
448
- msgid "Never"
449
- msgstr "Nunca"
450
-
451
- #: includes/Settings.class.php:278
452
- msgctxt ""
453
- "Brief default description of a scheduling rule when all the weekdays/weeks "
454
- "are included in the rule"
455
- msgid "Every day"
456
- msgstr "Cada día"
457
-
458
- #: includes/Settings.class.php:279
459
- msgctxt ""
460
- "Brief default description of a scheduling rule when some weekdays are "
461
- "included on only some weeks of the month. %s should be left alone and will "
462
- "be replaced by a comma-separated list of days and weeks in the following "
463
- "format: M, T, W on the first, second week of the month"
464
- msgid "%s on the %s week of the month"
465
- msgstr "%s en la %s semana del mes"
466
-
467
- #: includes/Settings.class.php:280
468
- msgctxt ""
469
- "Brief default description of a scheduling rule when some weeks of the month "
470
- "are included but all or no weekdays are selected. %s should be left alone "
471
- "and will be replaced by a comma-separated list of weeks in the following "
472
- "format: First, second week of the month"
473
- msgid "%s week of the month"
474
- msgstr "%s semanas del mes"
475
-
476
- #: includes/Settings.class.php:281
477
- msgctxt "Brief default description of a scheduling rule when no times are set"
478
- msgid "All day"
479
- msgstr "Todo el día"
480
-
481
- #: includes/Settings.class.php:282
482
- msgctxt ""
483
- "Brief default description of a scheduling rule when an end time is set but "
484
- "no start time. If the end time is 6pm, it will read: Ends at 6pm"
485
- msgid "Ends at"
486
- msgstr "Finaliza a"
487
-
488
- #: includes/Settings.class.php:283
489
- msgctxt ""
490
- "Brief default description of a scheduling rule when a start time is set but "
491
- "no end time. If the start time is 6pm, it will read: Starts at 6pm"
492
- msgid "Starts at"
493
- msgstr "Empieza a"
494
-
495
- #: includes/Settings.class.php:284
496
- msgctxt "Separator between times of a scheduling rule"
497
- msgid "&mdash;"
498
- msgstr "&mdash;"
499
-
500
- #: includes/template-functions.php:291
501
- msgctxt ""
502
- "Separator between days of the week when displaying opening hours in brief. "
503
- "Example: Mo,Tu,We"
504
- msgid ","
505
- msgstr ","
506
-
507
- #: includes/template-functions.php:294
508
- msgctxt ""
509
- "Brief opening hours description which lists days_strings when open all day. "
510
- "Example: Mo,Tu,We all day"
511
- msgid "%s all day"
512
- msgstr "%s durante todo el día"
513
-
514
- #: includes/template-functions.php:306
515
- msgctxt ""
516
- "Brief opening hours description which lists the days followed by the closing "
517
- "time. Example: Mo,Tu,We open until 9:00pm"
518
- msgid "%s open until %s"
519
- msgstr "abierto hasta las %s %s"
520
-
521
- #: includes/template-functions.php:308
522
- msgctxt ""
523
- "Brief opening hours description which lists the days followed by the opening "
524
- "time. Example: Mo,Tu,We open from 9:00am"
525
- msgid "%s open from %s"
526
- msgstr "%s abierto desde %s"
527
-
528
- #: includes/template-functions.php:310
529
- msgctxt ""
530
- "Brief opening hours description which lists the days followed by the opening "
531
- "and closing times. Example: Mo,Tu,We 9:00am-5:00pm"
532
- msgid "%s %s-%s"
533
- msgstr "%s %s-%s"
534
-
535
- #: includes/template-functions.php:317
536
- msgctxt ""
537
- "Separator between multiple opening times in the brief opening hours. "
538
- "Example: Mo,We 9:00 AM - 5:00 PM; Tu,Th 10:00 AM - 5:00 PM"
539
- msgid "; "
540
- msgstr "; "
541
-
542
- #: includes/template-functions.php:361
543
- msgctxt "Separator between opening and closing times. Example: 9:00am-5:00pm"
544
- msgid "-"
545
- msgstr "-"
1
+ # Copyright (C) 2015 Business Profile
2
+ # This file is distributed under the same license as the Business Profile package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: Business Profile 1.0.6\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/support/plugin/business-profile\n"
7
+ "POT-Creation-Date: 2015-09-13 17:50+0200\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2015-09-13 18:12+0200\n"
12
+ "Language-Team: \n"
13
+ "X-Generator: Poedit 1.8.4\n"
14
+ "X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;"
15
+ "_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;"
16
+ "esc_html_x:1,2c\n"
17
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
+ "X-Poedit-SourceCharset: UTF-8\n"
19
+ "X-Poedit-Basepath: ..\n"
20
+ "X-Textdomain-Support: yes\n"
21
+ "Last-Translator: \n"
22
+ "Language: es_ES\n"
23
+ "X-Poedit-SearchPath-0: .\n"
24
+
25
+ #: business-profile.php:110
26
+ msgid "View the help documentation for Business Profile"
27
+ msgstr "Ver la documentación de ayuda para su Perfil Empresarial"
28
+
29
+ #: business-profile.php:110
30
+ msgid "Help"
31
+ msgstr "Ayuda"
32
+
33
+ #: includes/Integrations.class.php:107
34
+ msgid "Book a table"
35
+ msgstr "Reservar mesa"
36
+
37
+ #: includes/Integrations.class.php:127 includes/Integrations.class.php:131
38
+ msgid "Show book a table link"
39
+ msgstr "Mostrar enlace a libro de Reservas"
40
+
41
+ #. Plugin Name of the plugin/theme
42
+ #: includes/Settings.class.php:86 includes/Settings.class.php:87
43
+ msgid "Business Profile"
44
+ msgstr "Perfil Empresarial"
45
+
46
+ #: includes/Settings.class.php:98
47
+ msgid "Search Engine Optimization"
48
+ msgstr "Optimización para motores de búsqueda"
49
+
50
+ #: includes/Settings.class.php:108
51
+ msgid "Schema Type"
52
+ msgstr "Tipo de esquema"
53
+
54
+ #: includes/Settings.class.php:109
55
+ msgid ""
56
+ "Select the option that best describes your business to improve how search "
57
+ "engines understand your website"
58
+ msgstr ""
59
+ "Seleccione la opción que mejor describe su negocio para mejorar cómo los "
60
+ "motores de búsqueda a comprender su sitio web"
61
+
62
+ #: includes/Settings.class.php:152
63
+ msgid "Contact Information"
64
+ msgstr "Información de Contacto"
65
+
66
+ #: includes/Settings.class.php:162
67
+ msgid "Name"
68
+ msgstr "Nombre"
69
+
70
+ #: includes/Settings.class.php:163
71
+ msgid ""
72
+ "Enter the name of your business if it is different than the website name."
73
+ msgstr ""
74
+ "Introduzca el nombre de su negocio si es diferente que el nombre del sitio "
75
+ "web."
76
+
77
+ #: includes/Settings.class.php:174
78
+ msgid "Address"
79
+ msgstr "Dirección"
80
+
81
+ #: includes/Settings.class.php:178
82
+ msgid "No map coordinates set."
83
+ msgstr "No hay ningunas coordenadas establecidas para mapa."
84
+
85
+ #: includes/Settings.class.php:179
86
+ msgid "Requesting new coordinates"
87
+ msgstr "Solicitar nuevas coordenadas"
88
+
89
+ #: includes/Settings.class.php:180
90
+ msgid "Select a match below"
91
+ msgstr "Seleccionar de debajo"
92
+
93
+ #: includes/Settings.class.php:181
94
+ msgid "View"
95
+ msgstr "Mostrar"
96
+
97
+ #: includes/Settings.class.php:182
98
+ msgid "Retrieve map coordinates"
99
+ msgstr "Recuperar las coordenadas del mapa"
100
+
101
+ #: includes/Settings.class.php:183
102
+ msgid "Remove map coordinates"
103
+ msgstr "Eliminar las coordenadas del mapa"
104
+
105
+ #: includes/Settings.class.php:184
106
+ msgid "Try again?"
107
+ msgstr "¿Reintentar?"
108
+
109
+ #: includes/Settings.class.php:185
110
+ msgid "Error"
111
+ msgstr "Error:"
112
+
113
+ #: includes/Settings.class.php:186
114
+ msgid ""
115
+ "Invalid request. Be sure to fill out the address field before retrieving "
116
+ "coordinates."
117
+ msgstr ""
118
+ "Solicitud no válida. Asegúrese de llenar el campo de la dirección antes de "
119
+ "recuperar las coordenadas."
120
+
121
+ #: includes/Settings.class.php:187
122
+ msgid "Request denied."
123
+ msgstr "La solicitud ha sido denegada"
124
+
125
+ #: includes/Settings.class.php:188
126
+ msgid "Request denied because you are over your request quota."
127
+ msgstr "Solicitud denegada porque estás por encima de su cuota de solicitud."
128
+
129
+ #: includes/Settings.class.php:189
130
+ msgid "Nothing was found at that address"
131
+ msgstr "No se encontró nada en esa dirección"
132
+
133
+ #: includes/Settings.class.php:200
134
+ msgid "Phone"
135
+ msgstr "Teléfono"
136
+
137
+ #: includes/Settings.class.php:210
138
+ msgid "Contact Page"
139
+ msgstr "Página de Contacto"
140
+
141
+ #: includes/Settings.class.php:211
142
+ msgid ""
143
+ "Select a page on your site where users can reach you, such as a contact form."
144
+ msgstr ""
145
+ "Seleccione una página en su sitio donde los usuarios pueden llegar a usted, "
146
+ "como un formulario de contacto."
147
+
148
+ #: includes/Settings.class.php:227
149
+ msgid "Email Address (optional)"
150
+ msgstr "Correo electrónico (opcional)"
151
+
152
+ #: includes/Settings.class.php:228
153
+ msgid ""
154
+ "Enter an email address only if you want to display this publicly. Showing "
155
+ "your email address on your site may cause you to receive excessive spam."
156
+ msgstr ""
157
+ "Introduzca una dirección de correo electrónico sólo si desea mostrarla "
158
+ "públicamente. Mostrar su dirección de correo electrónico puede hacer que "
159
+ "usted reciba un exceso de spam."
160
+
161
+ #: includes/Settings.class.php:236
162
+ msgid "Schedule"
163
+ msgstr "Agenda"
164
+
165
+ #: includes/Settings.class.php:246 includes/template-functions.php:389
166
+ msgid "Opening Hours"
167
+ msgstr "Horario de apertura"
168
+
169
+ #: includes/Settings.class.php:247
170
+ msgid "Define your weekly opening hours by adding scheduling rules."
171
+ msgstr ""
172
+ "Defina sus horas semanales de apertura al añadir reglas de planificación."
173
+
174
+ #: includes/Settings.class.php:262
175
+ msgid "Add another opening time"
176
+ msgstr "Añadir otra hora de apertura"
177
+
178
+ #: includes/Settings.class.php:276
179
+ msgid "Delete scheduling rule"
180
+ msgstr "Eliminar regla de programación"
181
+
182
+ #: includes/Settings.class.php:293
183
+ msgid "Display"
184
+ msgstr "Mostrar"
185
+
186
+ #: includes/Settings.class.php:303
187
+ msgid "Shortcode"
188
+ msgstr "Código"
189
+
190
+ #: includes/Settings.class.php:305
191
+ msgid ""
192
+ "Paste this shortcode into any page or post to display your contact details. "
193
+ "Learn about %sall of the attributes%s in the documentation."
194
+ msgstr ""
195
+ "Pegar este código en cualquier página o post para mostrar sus datos de "
196
+ "contacto. Aprenda sobre %stodos los atributos%s en la documentación."
197
+
198
+ #: includes/WP_Widget.ContactCardWidget.class.php:25
199
+ msgid "Show Name"
200
+ msgstr "Mostrar Nombre"
201
+
202
+ #: includes/WP_Widget.ContactCardWidget.class.php:26
203
+ msgid "Show Address"
204
+ msgstr "Mostrar Dirección"
205
+
206
+ #: includes/WP_Widget.ContactCardWidget.class.php:27
207
+ msgid "Show link to get directions on Google Maps"
208
+ msgstr "Mostrar enlace para obtener direcciones en Google Maps"
209
+
210
+ #: includes/WP_Widget.ContactCardWidget.class.php:28
211
+ msgid "Show Phone number"
212
+ msgstr "Mostrar numero de Teléfono"
213
+
214
+ #: includes/WP_Widget.ContactCardWidget.class.php:29
215
+ msgid "Show contact details"
216
+ msgstr "Mostrar detalles de contacto"
217
+
218
+ #: includes/WP_Widget.ContactCardWidget.class.php:30
219
+ msgid "Show Opening Hours"
220
+ msgstr "Mostrar horario de Apertura"
221
+
222
+ #: includes/WP_Widget.ContactCardWidget.class.php:31
223
+ msgid "Show brief opening hours on one line"
224
+ msgstr "Mostrar horas de apertura en una sola línea"
225
+
226
+ #: includes/WP_Widget.ContactCardWidget.class.php:32
227
+ msgid "Show Google Map"
228
+ msgstr "Mostrar mapa de Google"
229
+
230
+ #: includes/WP_Widget.ContactCardWidget.class.php:38
231
+ msgid "Contact Card"
232
+ msgstr "Tarjeta de Contacto"
233
+
234
+ #: includes/WP_Widget.ContactCardWidget.class.php:39
235
+ msgid ""
236
+ "Display a contact card with your name, address, phone number, opening hours "
237
+ "and map."
238
+ msgstr ""
239
+ "Mostrar una tarjeta de contacto con su nombre, dirección, número de "
240
+ "teléfono, horario de apertura y el mapa."
241
+
242
+ #: includes/WP_Widget.ContactCardWidget.class.php:71
243
+ msgid "Title"
244
+ msgstr "Título"
245
+
246
+ #: includes/template-functions.php:132 includes/template-functions.php:426
247
+ msgid "Get directions"
248
+ msgstr "Como llegar"
249
+
250
+ #: includes/template-functions.php:190
251
+ msgid "Contact"
252
+ msgstr "Contacto"
253
+
254
+ #: includes/template-functions.php:327
255
+ msgid "Monday"
256
+ msgstr "Lunes"
257
+
258
+ #: includes/template-functions.php:328
259
+ msgid "Tuesday"
260
+ msgstr "Martes"
261
+
262
+ #: includes/template-functions.php:329
263
+ msgid "Wednesday"
264
+ msgstr "Miércoles"
265
+
266
+ #: includes/template-functions.php:330
267
+ msgid "Thursday"
268
+ msgstr "Jueves"
269
+
270
+ #: includes/template-functions.php:331
271
+ msgid "Friday"
272
+ msgstr "Viernes"
273
+
274
+ #: includes/template-functions.php:332
275
+ msgid "Saturday"
276
+ msgstr "Sábado"
277
+
278
+ #: includes/template-functions.php:333
279
+ msgid "Sunday"
280
+ msgstr "Domingo"
281
+
282
+ #: includes/template-functions.php:345
283
+ msgid "Open"
284
+ msgstr "Abrierto"
285
+
286
+ #: includes/template-functions.php:357
287
+ msgid "Open until "
288
+ msgstr "Abierto hasta "
289
+
290
+ #: includes/template-functions.php:359
291
+ msgid "Open from "
292
+ msgstr "Abierto de "
293
+
294
+ #: includes/template-functions.php:381
295
+ msgid "Closed"
296
+ msgstr "Cerrado"
297
+
298
+ #: lib/simple-admin-pages/classes/AdminPage.class.php:173
299
+ msgid "You do not have sufficient permissions to access this page."
300
+ msgstr "No tienes suficientes permisos para acceder a esta página."
301
+
302
+ #. Plugin URI of the plugin/theme
303
+ #. Author URI of the plugin/theme
304
+ msgid "http://themeofthecrop.com"
305
+ msgstr "http://themeofthecrop.com"
306
+
307
+ #. Description of the plugin/theme
308
+ msgid ""
309
+ "Contact information, Google Maps and opening hours made easy for businesses."
310
+ msgstr ""
311
+ "Información de contacto, Google Maps y hora de apertura fácil para las "
312
+ "empresas."
313
+
314
+ #. Author of the plugin/theme
315
+ msgid "Theme of the Crop"
316
+ msgstr "Theme of the Crop"
317
+
318
+ #: includes/Settings.class.php:176
319
+ msgctxt "separator between admin action links in address component"
320
+ msgid " | "
321
+ msgstr " | "
322
+
323
+ #: includes/Settings.class.php:177
324
+ msgctxt "separates latitude and longitude"
325
+ msgid ", "
326
+ msgstr ", "
327
+
328
+ #: includes/Settings.class.php:249
329
+ msgctxt "Monday abbreviation"
330
+ msgid "Mo"
331
+ msgstr "Lu"
332
+
333
+ #: includes/Settings.class.php:250
334
+ msgctxt "Tuesday abbreviation"
335
+ msgid "Tu"
336
+ msgstr "Ma"
337
+
338
+ #: includes/Settings.class.php:251
339
+ msgctxt "Wednesday abbreviation"
340
+ msgid "We"
341
+ msgstr "Mi"
342
+
343
+ #: includes/Settings.class.php:252
344
+ msgctxt "Thursday abbreviation"
345
+ msgid "Th"
346
+ msgstr "Ju"
347
+
348
+ #: includes/Settings.class.php:253
349
+ msgctxt "Friday abbreviation"
350
+ msgid "Fr"
351
+ msgstr "Vi"
352
+
353
+ #: includes/Settings.class.php:254
354
+ msgctxt "Saturday abbreviation"
355
+ msgid "Sa"
356
+ msgstr "Sá"
357
+
358
+ #: includes/Settings.class.php:255
359
+ msgctxt "Sunday abbreviation"
360
+ msgid "Su"
361
+ msgstr "Do"
362
+
363
+ #: includes/Settings.class.php:257
364
+ msgctxt ""
365
+ "Time format displayed in the opening hours setting panel in your admin area. "
366
+ "Must match formatting rules at http://amsul.ca/pickadate.js/time.htm#formats"
367
+ msgid "h:i A"
368
+ msgstr "h:i A"
369
+
370
+ #: includes/Settings.class.php:258
371
+ msgctxt ""
372
+ "Date format displayed in the opening hours setting panel in your admin area. "
373
+ "Must match formatting rules at http://amsul.ca/pickadate.js/date."
374
+ "htm#formatting-rules"
375
+ msgid "mmmm d, yyyy"
376
+ msgstr "mmmm d, yyyy"
377
+
378
+ #: includes/Settings.class.php:263
379
+ msgctxt "Format of a scheduling rule"
380
+ msgid "Weekly"
381
+ msgstr "Semanal"
382
+
383
+ #: includes/Settings.class.php:264
384
+ msgctxt "Format of a scheduling rule"
385
+ msgid "Monthly"
386
+ msgstr "Mensual"
387
+
388
+ #: includes/Settings.class.php:265
389
+ msgctxt "Format of a scheduling rule"
390
+ msgid "Date"
391
+ msgstr "Fecha"
392
+
393
+ #: includes/Settings.class.php:266
394
+ msgctxt "Label for selecting days of the week in a scheduling rule"
395
+ msgid "Days of the week"
396
+ msgstr "Días de la semana"
397
+
398
+ #: includes/Settings.class.php:267
399
+ msgctxt "Label for selecting weeks of the month in a scheduling rule"
400
+ msgid "Weeks of the month"
401
+ msgstr "Semanas del mes"
402
+
403
+ #: includes/Settings.class.php:268
404
+ msgctxt "Label to select a date for a scheduling rule"
405
+ msgid "Date"
406
+ msgstr "Fecha"
407
+
408
+ #: includes/Settings.class.php:269
409
+ msgctxt "Label to select a time slot for a scheduling rule"
410
+ msgid "Time"
411
+ msgstr "Hora"
412
+
413
+ #: includes/Settings.class.php:270
414
+ msgctxt "Label to set a scheduling rule to last all day"
415
+ msgid "All day"
416
+ msgstr "Todo el día"
417
+
418
+ #: includes/Settings.class.php:271
419
+ msgctxt "Label for the starting time of a scheduling rule"
420
+ msgid "Start"
421
+ msgstr "Comienza"
422
+
423
+ #: includes/Settings.class.php:272
424
+ msgctxt "Label for the ending time of a scheduling rule"
425
+ msgid "End"
426
+ msgstr "Finaliza"
427
+
428
+ #: includes/Settings.class.php:273
429
+ msgctxt ""
430
+ "Prompt displayed when a scheduling rule is set without any time restrictions"
431
+ msgid "All day long. Want to %sset a time slot%s?"
432
+ msgstr "Todo el día. ¿Quieres %sestablecer un intervalo de tiempo%s?"
433
+
434
+ #: includes/Settings.class.php:274
435
+ msgctxt "Toggle a scheduling rule open and closed"
436
+ msgid "Open and close this rule"
437
+ msgstr "Abrir y cerrar esta regla"
438
+
439
+ #: includes/Settings.class.php:275
440
+ msgctxt "Delete a scheduling rule"
441
+ msgid "Delete rule"
442
+ msgstr "Eliminar esta regla"
443
+
444
+ #: includes/Settings.class.php:277
445
+ msgctxt ""
446
+ "Brief default description of a scheduling rule when no weekdays or weeks are "
447
+ "included in the rule"
448
+ msgid "Never"
449
+ msgstr "Nunca"
450
+
451
+ #: includes/Settings.class.php:278
452
+ msgctxt ""
453
+ "Brief default description of a scheduling rule when all the weekdays/weeks "
454
+ "are included in the rule"
455
+ msgid "Every day"
456
+ msgstr "Cada día"
457
+
458
+ #: includes/Settings.class.php:279
459
+ msgctxt ""
460
+ "Brief default description of a scheduling rule when some weekdays are "
461
+ "included on only some weeks of the month. %s should be left alone and will "
462
+ "be replaced by a comma-separated list of days and weeks in the following "
463
+ "format: M, T, W on the first, second week of the month"
464
+ msgid "%s on the %s week of the month"
465
+ msgstr "%s en la %s semana del mes"
466
+
467
+ #: includes/Settings.class.php:280
468
+ msgctxt ""
469
+ "Brief default description of a scheduling rule when some weeks of the month "
470
+ "are included but all or no weekdays are selected. %s should be left alone "
471
+ "and will be replaced by a comma-separated list of weeks in the following "
472
+ "format: First, second week of the month"
473
+ msgid "%s week of the month"
474
+ msgstr "%s semanas del mes"
475
+
476
+ #: includes/Settings.class.php:281
477
+ msgctxt "Brief default description of a scheduling rule when no times are set"
478
+ msgid "All day"
479
+ msgstr "Todo el día"
480
+
481
+ #: includes/Settings.class.php:282
482
+ msgctxt ""
483
+ "Brief default description of a scheduling rule when an end time is set but "
484
+ "no start time. If the end time is 6pm, it will read: Ends at 6pm"
485
+ msgid "Ends at"
486
+ msgstr "Finaliza a"
487
+
488
+ #: includes/Settings.class.php:283
489
+ msgctxt ""
490
+ "Brief default description of a scheduling rule when a start time is set but "
491
+ "no end time. If the start time is 6pm, it will read: Starts at 6pm"
492
+ msgid "Starts at"
493
+ msgstr "Empieza a"
494
+
495
+ #: includes/Settings.class.php:284
496
+ msgctxt "Separator between times of a scheduling rule"
497
+ msgid "&mdash;"
498
+ msgstr "&mdash;"
499
+
500
+ #: includes/template-functions.php:291
501
+ msgctxt ""
502
+ "Separator between days of the week when displaying opening hours in brief. "
503
+ "Example: Mo,Tu,We"
504
+ msgid ","
505
+ msgstr ","
506
+
507
+ #: includes/template-functions.php:294
508
+ msgctxt ""
509
+ "Brief opening hours description which lists days_strings when open all day. "
510
+ "Example: Mo,Tu,We all day"
511
+ msgid "%s all day"
512
+ msgstr "%s durante todo el día"
513
+
514
+ #: includes/template-functions.php:306
515
+ msgctxt ""
516
+ "Brief opening hours description which lists the days followed by the closing "
517
+ "time. Example: Mo,Tu,We open until 9:00pm"
518
+ msgid "%s open until %s"
519
+ msgstr "abierto hasta las %s %s"
520
+
521
+ #: includes/template-functions.php:308
522
+ msgctxt ""
523
+ "Brief opening hours description which lists the days followed by the opening "
524
+ "time. Example: Mo,Tu,We open from 9:00am"
525
+ msgid "%s open from %s"
526
+ msgstr "%s abierto desde %s"
527
+
528
+ #: includes/template-functions.php:310
529
+ msgctxt ""
530
+ "Brief opening hours description which lists the days followed by the opening "
531
+ "and closing times. Example: Mo,Tu,We 9:00am-5:00pm"
532
+ msgid "%s %s-%s"
533
+ msgstr "%s %s-%s"
534
+
535
+ #: includes/template-functions.php:317
536
+ msgctxt ""
537
+ "Separator between multiple opening times in the brief opening hours. "
538
+ "Example: Mo,We 9:00 AM - 5:00 PM; Tu,Th 10:00 AM - 5:00 PM"
539
+ msgid "; "
540
+ msgstr "; "
541
+
542
+ #: includes/template-functions.php:361
543
+ msgctxt "Separator between opening and closing times. Example: 9:00am-5:00pm"
544
+ msgid "-"
545
+ msgstr "-"
languages/business-profile-he_IL.po CHANGED
@@ -1,612 +1,612 @@
1
- # This file was generated by WPML
2
- # WPML is a WordPress plugin that can turn any WordPress or WordPressMU site into a full featured multilingual content management system.
3
- # http://wpml.org
4
- msgid ""
5
- msgstr ""
6
- "Content-Type: text/plain; charset=UTF-8\n"
7
- "Content-Transfer-Encoding: 8bit\n"
8
- "Project-Id-Version: business-profile\n"
9
- "POT-Creation-Date: \n"
10
- "PO-Revision-Date: \n"
11
- "Last-Translator: Ahrale <contact@atar4u.com>\n"
12
- "Language-Team: Ahrale, Atar4U.com <contact@atar4u.com>\n"
13
- "MIME-Version: 1.0\n"
14
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
- "Language: he\n"
16
- "X-Generator: Poedit 1.7.4\n"
17
- "X-Poedit-SourceCharset: UTF-8\n"
18
-
19
- #
20
- # $links['help'] = '<a href="' . BPFWP_PLUGIN_URL . '/docs" title="' . __( 'View the help documentation for Business Profile', BPFWP_TEXTDOMAIN ) . '">' . __( 'Help', BPFWP_TEXTDOMAIN ) . '</a>';
21
- # }
22
- # wpml-name: 6a26f548831e6a8c26bfbbd9f6ec61e0
23
- msgid "Help"
24
- msgstr "עזרה"
25
-
26
- #
27
- # $links['help'] = '<a href="' . BPFWP_PLUGIN_URL . '/docs" title="' . __( 'View the help documentation for Business Profile', BPFWP_TEXTDOMAIN ) . '">' . __( 'Help', BPFWP_TEXTDOMAIN ) . '</a>';
28
- # }
29
- # wpml-name: df86f6989ce973abc386fef512ef93cc
30
- msgid "View the help documentation for Business Profile"
31
- msgstr "הצג את תיעוד העזרה עבור תוסף הפרופיל העסקי Business Profile"
32
-
33
- # </a>
34
- # <?php _ex( ' | ', 'separator between admin action links in address component', SAP_TEXTDOMAIN ); ?>
35
- # <a href="#" class="sap-remove-coords">
36
- # wpml-name: separator between admin action links in address component: |
37
- msgid " | "
38
- msgstr " | "
39
-
40
- # $strings = array(
41
- # 'sep-lat-lon' => _x( ', ', 'separates latitude and longitude', SAP_TEXTDOMAIN ),
42
- # 'no-setting' => __( 'No map coordinates set.', SAP_TEXTDOMAIN ),
43
- # wpml-name: separates latitude and longitude: ,
44
- msgid ", "
45
- msgstr ", "
46
-
47
- # 'result_limit' => __( 'Request denied because you are over your request quota.', SAP_TEXTDOMAIN ),
48
- # 'result_empty' => __( 'Nothing was found at that address', SAP_TEXTDOMAIN ),
49
- # );
50
- # wpml-name: 176bc93bdbeabaeabfc924b98ab69c76
51
- msgid "Nothing was found at that address"
52
- msgstr "לא נמצא דבר בכתובת הזו"
53
-
54
- # 'result_denied' => __( 'Request denied.', SAP_TEXTDOMAIN ),
55
- # 'result_limit' => __( 'Request denied because you are over your request quota.', SAP_TEXTDOMAIN ),
56
- # 'result_empty' => __( 'Nothing was found at that address', SAP_TEXTDOMAIN ),
57
- # wpml-name: a77b4d976e3c8b6c82970661e209fded
58
- msgid "Request denied because you are over your request quota."
59
- msgstr "הבקשה נדחתה בגלל שחרגת מכמות הבקשות שלך."
60
-
61
- # 'result_invalid' => __( 'Invalid request. Be sure to fill out the address field before retrieving coordinates.', SAP_TEXTDOMAIN ),
62
- # 'result_denied' => __( 'Request denied.', SAP_TEXTDOMAIN ),
63
- # 'result_limit' => __( 'Request denied because you are over your request quota.', SAP_TEXTDOMAIN ),
64
- # wpml-name: 5082596d9437c96f0ca4f2d90a7308dc
65
- msgid "Request denied."
66
- msgstr "הבקשה נדחתה."
67
-
68
- # 'result_error' => __( 'Error', SAP_TEXTDOMAIN ),
69
- # 'result_invalid' => __( 'Invalid request. Be sure to fill out the address field before retrieving coordinates.', SAP_TEXTDOMAIN ),
70
- # 'result_denied' => __( 'Request denied.', SAP_TEXTDOMAIN ),
71
- # wpml-name: b898f526e66910a06378017461465cd9
72
- msgid "Invalid request. Be sure to fill out the address field before retrieving coordinates."
73
- msgstr "בקשה לא חוקית. נא לוודא שמילאת את שדה הכתובת לפני אחזור הקואורדינטות."
74
-
75
- # 'try_again' => __( 'Try again?', SAP_TEXTDOMAIN ),
76
- # 'result_error' => __( 'Error', SAP_TEXTDOMAIN ),
77
- # 'result_invalid' => __( 'Invalid request. Be sure to fill out the address field before retrieving coordinates.', SAP_TEXTDOMAIN ),
78
- # wpml-name: 902b0d55fddef6f8d651fe1035b7d4bd
79
- msgid "Error"
80
- msgstr "שגיאה"
81
-
82
- # 'remove' => __( 'Remove map coordinates', SAP_TEXTDOMAIN ),
83
- # 'try_again' => __( 'Try again?', SAP_TEXTDOMAIN ),
84
- # 'result_error' => __( 'Error', SAP_TEXTDOMAIN ),
85
- # wpml-name: d27efffc3e59a31d42ba281115d91068
86
- msgid "Try again?"
87
- msgstr "לנסות שוב?"
88
-
89
- # 'retrieve' => __( 'Retrieve map coordinates', SAP_TEXTDOMAIN ),
90
- # 'remove' => __( 'Remove map coordinates', SAP_TEXTDOMAIN ),
91
- # 'try_again' => __( 'Try again?', SAP_TEXTDOMAIN ),
92
- # wpml-name: da50ce98982514bd987cb9fb7dae647a
93
- msgid "Remove map coordinates"
94
- msgstr "הסרת קואורדינטות המפות"
95
-
96
- # 'view' => __( 'View', SAP_TEXTDOMAIN ),
97
- # 'retrieve' => __( 'Retrieve map coordinates', SAP_TEXTDOMAIN ),
98
- # 'remove' => __( 'Remove map coordinates', SAP_TEXTDOMAIN ),
99
- # wpml-name: 905f0fb47ce9341713793f7965529bb8
100
- msgid "Retrieve map coordinates"
101
- msgstr "אחזור קואורדינטות המפה"
102
-
103
- # 'select' => __( 'Select a match below', SAP_TEXTDOMAIN ),
104
- # 'view' => __( 'View', SAP_TEXTDOMAIN ),
105
- # 'retrieve' => __( 'Retrieve map coordinates', SAP_TEXTDOMAIN ),
106
- # wpml-name: 4351cfebe4b61d8aa5efa1d020710005
107
- msgid "View"
108
- msgstr "הצג"
109
-
110
- # 'retrieving' => __( 'Requesting new coordinates', SAP_TEXTDOMAIN ),
111
- # 'select' => __( 'Select a match below', SAP_TEXTDOMAIN ),
112
- # 'view' => __( 'View', SAP_TEXTDOMAIN ),
113
- # wpml-name: 229283ee4b6ebf7691c3743619d273e1
114
- msgid "Select a match below"
115
- msgstr "בחר התאמה להלן"
116
-
117
- # 'no-setting' => __( 'No map coordinates set.', SAP_TEXTDOMAIN ),
118
- # 'retrieving' => __( 'Requesting new coordinates', SAP_TEXTDOMAIN ),
119
- # 'select' => __( 'Select a match below', SAP_TEXTDOMAIN ),
120
- # wpml-name: 84d0ee4b5a58d5217fb0e99867f559a9
121
- msgid "Requesting new coordinates"
122
- msgstr "מבקש קואורדינטות חדשות"
123
-
124
- # 'sep-lat-lon' => _x( ', ', 'separates latitude and longitude', SAP_TEXTDOMAIN ),
125
- # 'no-setting' => __( 'No map coordinates set.', SAP_TEXTDOMAIN ),
126
- # 'retrieving' => __( 'Requesting new coordinates', SAP_TEXTDOMAIN ),
127
- # wpml-name: 1c0064a008872687e03b2c079948c974
128
- msgid "No map coordinates set."
129
- msgstr "לא הוגדרו קואורדינטות מפה"
130
-
131
- # <div class="sap-scheduler-all-day">
132
- # <?php _ex( 'All day long. Want to <a href="#" data-format="time-slot">set a time slot</a>?', 'Prompt displayed when a scheduling rule is set without any time restrictions.', SAP_TEXTDOMAIN ); ?>
133
- # </div>
134
- # wpml-name: Prompt displayed when a scheduling rule is set without any time restrictions.: All day long. Want to <a href="#" data-format="time-slot">set a time slot</a>?
135
- msgid "All day long. Want to <a href=\"#\" data-format=\"time-slot\">set a time slot</a>?"
136
- msgstr "כל היום רוצה <a href=\"#\" data-format=\"time-slot\">להגדיר פרק זמן</a>?"
137
-
138
- # <label for="<?php echo $this->get_input_name(); ?>[<?php echo $id; ?>][time][end]">
139
- # <?php _ex( 'End', 'Label for the ending time of a scheduling rule', SAP_TEXTDOMAIN ); ?>
140
- # </label>
141
- # wpml-name: Label for the ending time of a scheduling rule: End
142
- msgid "End"
143
- msgstr "סיום"
144
-
145
- # <label for="<?php echo $this->get_input_name(); ?>[<?php echo $id; ?>][time][start]">
146
- # <?php _ex( 'Start', 'Label for the starting time of a scheduling rule', SAP_TEXTDOMAIN ); ?>
147
- # </label>
148
- # wpml-name: Label for the starting time of a scheduling rule: Start
149
- msgid "Start"
150
- msgstr "התחלה"
151
-
152
- # <a href="#" data-format="time-slot"<?php echo $time_format == 'time-slot' ? ' class="selected"' : ''; ?>>
153
- # <?php _ex( 'Time', 'Label to select time slot for a scheduling rule', SAP_TEXTDOMAIN ); ?>
154
- # </a>
155
- # wpml-name: Label to select time slot for a scheduling rule: Time
156
- msgid "Time"
157
- msgstr "זמן"
158
-
159
- # <li class="label">
160
- # <?php _ex( 'Weeks of the month', 'Label for selecting weeks of the month in a scheduling rule', SAP_TEXTDOMAIN ); ?>
161
- # </li>
162
- # wpml-name: Label for selecting weeks of the month in a scheduling rule: Weeks of the month
163
- msgid "Weeks of the month"
164
- msgstr "שבועות של החודש"
165
-
166
- # <li class="label">
167
- # <?php _ex( 'Days of the week', 'Label for selecting days of the week in a scheduling rule', SAP_TEXTDOMAIN ); ?>
168
- # </li>
169
- # wpml-name: Label for selecting days of the week in a scheduling rule: Days of the week
170
- msgid "Days of the week"
171
- msgstr "ימים בשבוע"
172
-
173
- # <a href="#" data-format="monthly"<?php echo $date_format == 'monthly' ? ' class="selected"' : ''; ?>>
174
- # <?php _ex( 'Monthly', 'Format of a scheduling rule', SAP_TEXTDOMAIN ); ?>
175
- # </a>
176
- # wpml-name: Format of a scheduling rule: Monthly
177
- msgid "Monthly"
178
- msgstr "חודשי"
179
-
180
- # <a href="#" data-format="weekly"<?php echo $date_format == 'weekly' ? ' class="selected"' : ''; ?>>
181
- # <?php _ex( 'Weekly', 'Format of a scheduling rule', SAP_TEXTDOMAIN ); ?>
182
- # </a>
183
- # wpml-name: Format of a scheduling rule: Weekly
184
- msgid "Weekly"
185
- msgstr "שבועי"
186
-
187
- # 'after' => _x( 'Starts at', 'Brief default description of a scheduling rule when a start time is set but no end time. If the start time is 6pm, it will read: Starts at 6pm.', SAP_TEXTDOMAIN ),
188
- # 'separator' => _x( '&mdash;', 'Default separator between times of a scheduling rule.', SAP_TEXTDOMAIN ),
189
- # );
190
- # wpml-name: Default separator between times of a scheduling rule.: &mdash;
191
- msgid "&mdash;"
192
- msgstr "—"
193
-
194
- # 'before' => _x( 'Ends at', 'Brief default description of a scheduling rule when an end time is set but no start time. If the end time is 6pm, it will read: Ends at 6pm.', SAP_TEXTDOMAIN ),
195
- # 'after' => _x( 'Starts at', 'Brief default description of a scheduling rule when a start time is set but no end time. If the start time is 6pm, it will read: Starts at 6pm.', SAP_TEXTDOMAIN ),
196
- # 'separator' => _x( '&mdash;', 'Default separator between times of a scheduling rule.', SAP_TEXTDOMAIN ),
197
- # wpml-name: Brief default description of a scheduling rule when a start time is set but no end time. If the start time is 6pm, it will read: Starts at 6pm.: Starts at
198
- msgid "Starts at"
199
- msgstr "מתחיל ב"
200
-
201
- # 'all_day' => _x( 'All day', 'Brief default description of a scheduling rule when no times are set', SAP_TEXTDOMAIN ),
202
- # 'before' => _x( 'Ends at', 'Brief default description of a scheduling rule when an end time is set but no start time. If the end time is 6pm, it will read: Ends at 6pm.', SAP_TEXTDOMAIN ),
203
- # 'after' => _x( 'Starts at', 'Brief default description of a scheduling rule when a start time is set but no end time. If the start time is 6pm, it will read: Starts at 6pm.', SAP_TEXTDOMAIN ),
204
- # wpml-name: Brief default description of a scheduling rule when an end time is set but no start time. If the end time is 6pm, it will read: Ends at 6pm.: Ends at
205
- msgid "Ends at"
206
- msgstr "מסתיים ב"
207
-
208
- # <a href="#" data-format="all-day"<?php echo $time_format == 'all-day' ? ' class="selected"' : ''; ?>>
209
- # <?php _ex( 'All day', 'Label to set a scheduling rule to last all day', SAP_TEXTDOMAIN ); ?>
210
- # </a>
211
- # wpml-name: Brief default description of a scheduling rule when no times are set: All day
212
- msgid "All day"
213
- msgstr "כל היום"
214
-
215
- # 'monthly_weekdays' => _x( '{days} on the {weeks} week of the month', 'Brief default description of a scheduling rule when some weekdays are included on only some weeks of the month. The {days} and {weeks} bits should be left alone and will be replaced by a comma-separated list of days (the first one) and weeks (the second one) in the following format: M, T, W on the first, second week of the month', SAP_TEXTDOMAIN ),
216
- # 'monthly_weeks' => _x( '{weeks} week of the month', 'Brief description of a scheduling rule when some weeks of the month are included but all or no weekdays are selected. {weeks} should be left alone and will be replaced by a comma-separated list of weeks (the second one) in the following format: First, second week of the month', SAP_TEXTDOMAIN ),
217
- # 'all_day' => _x( 'All day', 'Brief default description of a scheduling rule when no times are set', SAP_TEXTDOMAIN ),
218
- # wpml-name: Brief description of a scheduling rule when some weeks of the month are included but all or no weekdays are selected. {weeks} should be left alone and will be
219
- msgid "{weeks} week of the month"
220
- msgstr "{שבועות} שבועות בחודש"
221
-
222
- # 'weekly_always' => _x( 'Every day', 'Brief default description of a scheduling rule when all the weekdays/weeks are included in the rule.', SAP_TEXTDOMAIN ),
223
- # 'monthly_weekdays' => _x( '{days} on the {weeks} week of the month', 'Brief default description of a scheduling rule when some weekdays are included on only some weeks of the month. The {days} and {weeks} bits should be left alone and will be replaced by a comma-separated list of days (the first one) and weeks (the second one) in the following format: M, T, W on the first, second week of the month', SAP_TEXTDOMAIN ),
224
- # 'monthly_weeks' => _x( '{weeks} week of the month', 'Brief description of a scheduling rule when some weeks of the month are included but all or no weekdays are selected. {weeks} should be left alone and will be replaced by a comma-separated list of weeks (the second one) in the following format: First, second week of the month', SAP_TEXTDOMAIN ),
225
- # wpml-name: Brief default description of a scheduling rule when some weekdays are included on only some weeks of the month. The {days} and {weeks} bits should be left alone
226
- msgid "{days} on the {weeks} week of the month"
227
- msgstr "{מים} ב {שבועות} שבוע בחודש"
228
-
229
- # 'never' => _x( 'Never', 'Brief default description of a scheduling rule when no weekdays or weeks are included in the rule.', SAP_TEXTDOMAIN ),
230
- # 'weekly_always' => _x( 'Every day', 'Brief default description of a scheduling rule when all the weekdays/weeks are included in the rule.', SAP_TEXTDOMAIN ),
231
- # 'monthly_weekdays' => _x( '{days} on the {weeks} week of the month', 'Brief default description of a scheduling rule when some weekdays are included on only some weeks of the month. The {days} and {weeks} bits should be left alone and will be replaced by a comma-separated list of days (the first one) and weeks (the second one) in the following format: M, T, W on the first, second week of the month', SAP_TEXTDOMAIN ),
232
- # wpml-name: Brief default description of a scheduling rule when all the weekdays/weeks are included in the rule.: Every day
233
- msgid "Every day"
234
- msgstr "כל יום"
235
-
236
- # $this->schedule_summaries = array(
237
- # 'never' => _x( 'Never', 'Brief default description of a scheduling rule when no weekdays or weeks are included in the rule.', SAP_TEXTDOMAIN ),
238
- # 'weekly_always' => _x( 'Every day', 'Brief default description of a scheduling rule when all the weekdays/weeks are included in the rule.', SAP_TEXTDOMAIN ),
239
- # wpml-name: Brief default description of a scheduling rule when no weekdays or weeks are included in the rule.: Never
240
- msgid "Never"
241
- msgstr "אף פעם"
242
-
243
- # <span class="screen-reader-text">
244
- # <?php _e( 'Delete scheduling rule', SAP_TEXTDOMAIN ); ?>
245
- # </span>
246
- # wpml-name: 74fd33ed3a10074174cf75ad3ec08426
247
- msgid "Delete scheduling rule"
248
- msgstr "מחיקת כלל תזמון"
249
-
250
- # </a>
251
- # <a href="#" class="delete" title="<?php _e( 'Delete rule', SAP_TEXTDOMAIN ); ?>">
252
- # <div class="dashicons dashicons-dismiss"></div>
253
- # wpml-name: 1046a01602e3fa0dbd964056b495efe8
254
- msgid "Delete rule"
255
- msgstr "מחיקת כלל"
256
-
257
- # <span class="screen-reader-text">
258
- # <?php _e( 'Open and close this rule', SAP_TEXTDOMAIN ); ?>
259
- # </span>
260
- # wpml-name: 935a57daa4e1303913ea9a4b071edb5c
261
- msgid "Open and close this rule"
262
- msgstr "פתח וסגור כלל זה"
263
-
264
- # <a href="#" data-format="date"<?php echo $date_format == 'date' ? ' class="selected"' : ''; ?>>
265
- # <?php _ex( 'Date', 'Format of a scheduling rule', SAP_TEXTDOMAIN ); ?>
266
- # </a>
267
- # wpml-name: 44749712dbec183e983dcd78a7736c41
268
- msgid "Date"
269
- msgstr "תאריך"
270
-
271
- # <a href="#" class="button">
272
- # <?php _e( 'Add new scheduling rule', SAP_TEXTDOMAIN ); ?>
273
- # </a>
274
- # wpml-name: ba6fdfc90cb8e3c292f2dd61887e6b1b
275
- msgid "Add new scheduling rule"
276
- msgstr "הוספת כלל תזמון חדש"
277
-
278
- #
279
- # echo join( _x( '; ', 'Separator between multiple opening times in the brief opening hours. Example: Mo,We 9:00 AM - 5:00 PM; Tu,Th 10:00 AM - 5:00 PM', BPFWP_TEXTDOMAIN ), $slots );
280
- # ?>
281
- # wpml-name: Separator between multiple opening times in the brief opening hours. Example: Mo,We 9:00 AM - 5:00 PM; Tu,Th 10:00 AM - 5:00 PM: ;
282
- msgid "; "
283
- msgstr "; "
284
-
285
- # } else {
286
- # $time = $start->format( get_option( 'time_format' ) ) . _x