Markup (JSON-LD) structured in schema.org - Version 4.6.0

Version Description

(2018-09-19) = * Updated : Schema type Breadcrumbs: Added switching between home_url () and site_url (). * Updated : Organization schema.org type subdivision.

Download this release

Release Info

Developer miiitaka
Plugin Icon 128x128 Markup (JSON-LD) structured in schema.org
Version 4.6.0
Comparing to
See all releases

Code changes from version 4.5.3 to 4.6.0

includes/admin/wp-structuring-admin-type-breadcrumb.php CHANGED
@@ -3,7 +3,7 @@
3
  * Schema.org Type Breadcrumb
4
  *
5
  * @author Kazuya Takami
6
- * @version 4.5.3
7
  * @since 2.0.0
8
  * @see wp-structuring-admin-db.php
9
  * @link https://schema.org/BreadcrumbList
@@ -32,7 +32,7 @@ class Structuring_Markup_Type_Breadcrumb {
32
  /**
33
  * Form Layout Render
34
  *
35
- * @version 4.5.3
36
  * @since 2.3.3
37
  * @param array $option
38
  */
@@ -51,6 +51,27 @@ class Structuring_Markup_Type_Breadcrumb {
51
  $html .= '<input type="text" name="option[' . "home_name" . ']" id="home_name" class="regular-text" value="' . esc_attr( $option['home_name'] ) . '">';
52
  $html .= '<small>Default : bloginfo("name")<br>* In the case of the pattern set for the static page on the front page its title is the default value.</small>';
53
  $html .= '</td></tr>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  $html .= '<tr><th><label for="current_on">Display Current Page :</label></th><td>';
55
  $html .= '<input type="checkbox" name="option[' . "current_on" . ']" id="current_on" value="on"';
56
  if ( isset( $option['current_on'] ) && $option['current_on'] === 'on' ) {
@@ -94,13 +115,14 @@ class Structuring_Markup_Type_Breadcrumb {
94
  /**
95
  * Return the default options array
96
  *
97
- * @version 4.3.0
98
  * @since 2.0.0
99
  * @return array $args
100
  */
101
  private function get_default_options () {
102
  $args['home_on'] = '';
103
  $args['home_name'] = '';
 
104
  $args['current_on'] = '';
105
  $args['current_link'] = '';
106
 
3
  * Schema.org Type Breadcrumb
4
  *
5
  * @author Kazuya Takami
6
+ * @version 4.6.0
7
  * @since 2.0.0
8
  * @see wp-structuring-admin-db.php
9
  * @link https://schema.org/BreadcrumbList
32
  /**
33
  * Form Layout Render
34
  *
35
+ * @version 4.6.0
36
  * @since 2.3.3
37
  * @param array $option
38
  */
51
  $html .= '<input type="text" name="option[' . "home_name" . ']" id="home_name" class="regular-text" value="' . esc_attr( $option['home_name'] ) . '">';
52
  $html .= '<small>Default : bloginfo("name")<br>* In the case of the pattern set for the static page on the front page its title is the default value.</small>';
53
  $html .= '</td></tr>';
54
+ $html .= '<tr><th><label for="speakable_type_css">cssSelector OR xpath :</label></th><td>';
55
+
56
+ switch ( $option['home_url'] ) {
57
+ case 'home_url':
58
+ $checked['home_url'] = ' checked';
59
+ $checked['site_url'] = '';
60
+ break;
61
+ case 'site_url':
62
+ $checked['home_url'] = '';
63
+ $checked['site_url'] = ' checked';
64
+ break;
65
+ default:
66
+ $checked['home_url'] = ' checked';
67
+ $checked['site_url'] = '';
68
+ break;
69
+ }
70
+
71
+ $html .= '<label><input type="radio" name="option[' . "home_url" . ']" id="home_url" value="home_url"' . $checked['home_url'] . '>home_url()&nbsp;&nbsp;</label>';
72
+ $html .= '<label><input type="radio" name="option[' . "home_url" . ']" id="site_url" value="site_url"' . $checked['site_url'] . '>site_url()</label>';
73
+ $html .= '<small>Choose which function to set the home URL.</small>';
74
+ $html .= '</td></tr>';
75
  $html .= '<tr><th><label for="current_on">Display Current Page :</label></th><td>';
76
  $html .= '<input type="checkbox" name="option[' . "current_on" . ']" id="current_on" value="on"';
77
  if ( isset( $option['current_on'] ) && $option['current_on'] === 'on' ) {
115
  /**
116
  * Return the default options array
117
  *
118
+ * @version 4.6.0
119
  * @since 2.0.0
120
  * @return array $args
121
  */
122
  private function get_default_options () {
123
  $args['home_on'] = '';
124
  $args['home_name'] = '';
125
+ $args['home_url'] = '';
126
  $args['current_on'] = '';
127
  $args['current_link'] = '';
128
 
includes/admin/wp-structuring-admin-type-local-business.php CHANGED
@@ -3,7 +3,7 @@
3
  * Schema.org Type LocalBusiness
4
  *
5
  * @author Kazuya Takami
6
- * @version 4.5.3
7
  * @since 2.3.3
8
  * @see wp-structuring-admin-db.php
9
  * @link http://schema.org/LocalBusiness
@@ -15,178 +15,178 @@ class Structuring_Markup_Type_LocalBusiness {
15
  /**
16
  * Variable definition.
17
  *
18
- * @version 2.3.0
19
  * @since 2.3.0
20
  */
21
  /** LocalBusiness Type defined. */
22
  private $business_type_array = array(
23
- array( "type" => "LocalBusiness", "display" => "LocalBusiness" ),
24
-
25
- array( "type" => "AnimalShelter", "display" => "- AnimalShelter" ),
26
-
27
- array( "type" => "AutomotiveBusiness", "display" => "- AutomotiveBusiness" ),
28
- array( "type" => "AutoBodyShop", "display" => "-- AutoBodyShop" ),
29
- array( "type" => "AutoDealer", "display" => "-- AutoDealer" ),
30
- array( "type" => "AutoPartsStore", "display" => "-- AutoPartsStore" ),
31
- array( "type" => "AutoRental", "display" => "-- AutoRental" ),
32
- array( "type" => "AutoRepair", "display" => "-- AutoRepair" ),
33
- array( "type" => "AutoWash", "display" => "-- AutoWash" ),
34
- array( "type" => "GasStation", "display" => "-- GasStation" ),
35
- array( "type" => "MotorcycleDealer", "display" => "-- MotorcycleDealer" ),
36
- array( "type" => "MotorcycleRepair", "display" => "-- MotorcycleRepair" ),
37
-
38
- array( "type" => "ChildCare", "display" => "- ChildCare" ),
39
-
40
- array( "type" => "DryCleaningOrLaundry", "display" => "- DryCleaningOrLaundry" ),
41
-
42
- array( "type" => "EmergencyService", "display" => "- EmergencyService" ),
43
- array( "type" => "FireStation", "display" => "-- FireStation" ),
44
- array( "type" => "Hospital", "display" => "-- Hospital" ),
45
- array( "type" => "PoliceStation", "display" => "-- PoliceStation" ),
46
-
47
- array( "type" => "EmploymentAgency", "display" => "- EmploymentAgency" ),
48
-
49
- array( "type" => "EntertainmentBusiness", "display" => "- EntertainmentBusiness" ),
50
- array( "type" => "AdultEntertainment", "display" => "-- AdultEntertainment" ),
51
- array( "type" => "AmusementPark", "display" => "-- AmusementPark" ),
52
- array( "type" => "ArtGallery", "display" => "-- ArtGallery" ),
53
- array( "type" => "Casino", "display" => "-- Casino" ),
54
- array( "type" => "ComedyClub", "display" => "-- ComedyClub" ),
55
- array( "type" => "MovieTheater", "display" => "-- MovieTheater" ),
56
- array( "type" => "NightClub", "display" => "-- NightClub" ),
57
-
58
- array( "type" => "FinancialService", "display" => "- FinancialService" ),
59
- array( "type" => "AccountingService", "display" => "-- AccountingService" ),
60
- array( "type" => "AutomatedTeller", "display" => "-- AutomatedTeller" ),
61
- array( "type" => "BankOrCreditUnion", "display" => "-- BankOrCreditUnion" ),
62
- array( "type" => "InsuranceAgency", "display" => "-- InsuranceAgency" ),
63
-
64
- array( "type" => "FoodEstablishment", "display" => "- FoodEstablishment" ),
65
- array( "type" => "Bakery", "display" => "-- Bakery" ),
66
- array( "type" => "BarOrPub", "display" => "-- BarOrPub" ),
67
- array( "type" => "Brewery", "display" => "-- Brewery" ),
68
- array( "type" => "CafeOrCoffeeShop", "display" => "-- CafeOrCoffeeShop" ),
69
- array( "type" => "FastFoodRestaurant", "display" => "-- FastFoodRestaurant" ),
70
- array( "type" => "IceCreamShop", "display" => "-- IceCreamShop" ),
71
- array( "type" => "Restaurant", "display" => "-- Restaurant" ),
72
- array( "type" => "Winery", "display" => "-- Winery" ),
73
-
74
- array( "type" => "GovernmentOffice", "display" => "- GovernmentOffice" ),
75
- array( "type" => "PostOffice", "display" => "-- PostOffice" ),
76
-
77
- array( "type" => "HealthAndBeautyBusiness", "display" => "- HealthAndBeautyBusiness" ),
78
- array( "type" => "BeautySalon", "display" => "-- BeautySalon" ),
79
- array( "type" => "DaySpa", "display" => "-- DaySpa" ),
80
- array( "type" => "HairSalon", "display" => "-- HairSalon" ),
81
- array( "type" => "HealthClub", "display" => "-- HealthClub" ),
82
- array( "type" => "NailSalon", "display" => "-- NailSalon" ),
83
- array( "type" => "TattooParlor", "display" => "-- TattooParlor" ),
84
-
85
- array( "type" => "HomeAndConstructionBusiness", "display" => "- HomeAndConstructionBusiness" ),
86
- array( "type" => "Electrician", "display" => "-- Electrician" ),
87
- array( "type" => "GeneralContractor", "display" => "-- GeneralContractor" ),
88
- array( "type" => "HVACBusiness", "display" => "-- HVACBusiness" ),
89
- array( "type" => "HousePainter", "display" => "-- HousePainter" ),
90
- array( "type" => "Locksmith", "display" => "-- Locksmith" ),
91
- array( "type" => "MovingCompany", "display" => "-- MovingCompany" ),
92
- array( "type" => "Plumber", "display" => "-- Plumber" ),
93
- array( "type" => "RoofingContractor", "display" => "-- RoofingContractor" ),
94
-
95
- array( "type" => "InternetCafe", "display" => "- InternetCafe" ),
96
-
97
- array( "type" => "LegalService", "display" => "- LegalService" ),
98
- array( "type" => "Attorney", "display" => "-- Attorney" ),
99
- array( "type" => "Notary", "display" => "-- Notary" ),
100
-
101
- array( "type" => "Library", "display" => "- Library" ),
102
-
103
- array( "type" => "LodgingBusiness", "display" => "- LodgingBusiness" ),
104
- array( "type" => "BedAndBreakfast", "display" => "-- BedAndBreakfast" ),
105
- array( "type" => "Hostel", "display" => "-- Hostel" ),
106
- array( "type" => "Hotel", "display" => "-- Hotel" ),
107
- array( "type" => "Motel", "display" => "-- Motel" ),
108
-
109
- array( "type" => "MedicalOrganization", "display" => "- MedicalOrganization" ),
110
- array( "type" => "Dentist", "display" => "-- Dentist" ),
111
- array( "type" => "DiagnosticLab", "display" => "-- DiagnosticLab" ),
112
- array( "type" => "Hospital", "display" => "-- Hospital" ),
113
- array( "type" => "MedicalClinic", "display" => "-- MedicalClinic" ),
114
- array( "type" => "Optician", "display" => "-- Optician" ),
115
- array( "type" => "Pharmacy", "display" => "-- Pharmacy" ),
116
- array( "type" => "Physician", "display" => "-- Physician" ),
117
- array( "type" => "VeterinaryCare", "display" => "-- VeterinaryCare" ),
118
-
119
- array( "type" => "ProfessionalService", "display" => "- ProfessionalService" ),
120
-
121
- array( "type" => "RadioStation", "display" => "- RadioStation" ),
122
-
123
- array( "type" => "RealEstateAgent", "display" => "- RealEstateAgent" ),
124
-
125
- array( "type" => "RecyclingCenter", "display" => "- RecyclingCenter" ),
126
-
127
- array( "type" => "SelfStorage", "display" => "- SelfStorage" ),
128
-
129
- array( "type" => "ShoppingCenter", "display" => "- ShoppingCenter" ),
130
-
131
- array( "type" => "SportsActivityLocation", "display" => "- SportsActivityLocation" ),
132
- array( "type" => "BowlingAlley", "display" => "-- BowlingAlley" ),
133
- array( "type" => "ExerciseGym", "display" => "-- ExerciseGym" ),
134
- array( "type" => "GolfCourse", "display" => "-- GolfCourse" ),
135
- array( "type" => "HealthClub", "display" => "-- HealthClub" ),
136
- array( "type" => "PublicSwimmingPool", "display" => "-- PublicSwimmingPool" ),
137
- array( "type" => "SkiResort", "display" => "-- SkiResort" ),
138
- array( "type" => "SportsClub", "display" => "-- SportsClub" ),
139
- array( "type" => "StadiumOrArena", "display" => "-- StadiumOrArena" ),
140
- array( "type" => "TennisComplex", "display" => "-- TennisComplex" ),
141
-
142
- array( "type" => "Store", "display" => "- Store" ),
143
- array( "type" => "AutoPartsStore", "display" => "-- AutoPartsStore" ),
144
- array( "type" => "BikeStore", "display" => "-- BikeStore" ),
145
- array( "type" => "BookStore", "display" => "-- BookStore" ),
146
- array( "type" => "ClothingStore", "display" => "-- ClothingStore" ),
147
- array( "type" => "ComputerStore", "display" => "-- ComputerStore" ),
148
- array( "type" => "ConvenienceStore", "display" => "-- ConvenienceStore" ),
149
- array( "type" => "DepartmentStore", "display" => "-- DepartmentStore" ),
150
- array( "type" => "ElectronicsStore", "display" => "-- ElectronicsStore" ),
151
- array( "type" => "Florist", "display" => "-- Florist" ),
152
- array( "type" => "FurnitureStore", "display" => "-- FurnitureStore" ),
153
- array( "type" => "GardenStore", "display" => "-- GardenStore" ),
154
- array( "type" => "GroceryStore", "display" => "-- GroceryStore" ),
155
- array( "type" => "HardwareStore", "display" => "-- HardwareStore" ),
156
- array( "type" => "HobbyShop", "display" => "-- HobbyShop" ),
157
- array( "type" => "HomeGoodsStore", "display" => "-- HomeGoodsStore" ),
158
- array( "type" => "JewelryStore", "display" => "-- JewelryStore" ),
159
- array( "type" => "LiquorStore", "display" => "-- LiquorStore" ),
160
- array( "type" => "MensClothingStore", "display" => "-- MensClothingStore" ),
161
- array( "type" => "MobilePhoneStore", "display" => "-- MobilePhoneStore" ),
162
- array( "type" => "MovieRentalStore", "display" => "-- MovieRentalStore" ),
163
- array( "type" => "MusicStore", "display" => "-- MusicStore" ),
164
- array( "type" => "OfficeEquipmentStore", "display" => "-- OfficeEquipmentStore" ),
165
- array( "type" => "OutletStore", "display" => "-- OutletStore" ),
166
- array( "type" => "PawnShop", "display" => "-- PawnShop" ),
167
- array( "type" => "PetStore", "display" => "-- PetStore" ),
168
- array( "type" => "ShoeStore", "display" => "-- ShoeStore" ),
169
- array( "type" => "SportingGoodsStore", "display" => "-- SportingGoodsStore" ),
170
- array( "type" => "TireShop", "display" => "-- TireShop" ),
171
- array( "type" => "ToyStore", "display" => "-- ToyStore" ),
172
- array( "type" => "WholesaleStore", "display" => "-- WholesaleStore" ),
173
-
174
- array( "type" => "TelevisionStation", "display" => "- TelevisionStation" ),
175
-
176
- array( "type" => "TouristInformationCenter", "display" => "- TouristInformationCenter" ),
177
-
178
- array( "type" => "TravelAgency", "display" => "- TravelAgency" )
179
  );
180
 
181
  /** weekType defined. */
182
  private $week_array = array(
183
- array("type" => "Mo", "display" => "Monday"),
184
- array("type" => "Tu", "display" => "Tuesday"),
185
- array("type" => "We", "display" => "Wednesday"),
186
- array("type" => "Th", "display" => "Thursday"),
187
- array("type" => "Fr", "display" => "Friday"),
188
- array("type" => "Sa", "display" => "Saturday"),
189
- array("type" => "Su", "display" => "Sunday")
190
  );
191
 
192
  /**
@@ -332,12 +332,12 @@ class Structuring_Markup_Type_LocalBusiness {
332
  /**
333
  * Return the default options array
334
  *
335
- * @since 4.1.3
336
  * @version 2.5.0
337
  * @return array $args
338
  */
339
  private function get_default_options () {
340
- $args['business_type'] = 'local_business';
341
  $args['name'] = '';
342
  $args['image'] = '';
343
  $args['url'] = '';
3
  * Schema.org Type LocalBusiness
4
  *
5
  * @author Kazuya Takami
6
+ * @version 4.6.0
7
  * @since 2.3.3
8
  * @see wp-structuring-admin-db.php
9
  * @link http://schema.org/LocalBusiness
15
  /**
16
  * Variable definition.
17
  *
18
+ * @version 4.6.0
19
  * @since 2.3.0
20
  */
21
  /** LocalBusiness Type defined. */
22
  private $business_type_array = array(
23
+ array( 'type' => 'LocalBusiness', 'display' => 'LocalBusiness' ),
24
+
25
+ array( 'type' => 'AnimalShelter', 'display' => '- AnimalShelter' ),
26
+
27
+ array( 'type' => 'AutomotiveBusiness', 'display' => '- AutomotiveBusiness' ),
28
+ array( 'type' => 'AutoBodyShop', 'display' => '-- AutoBodyShop' ),
29
+ array( 'type' => 'AutoDealer', 'display' => '-- AutoDealer' ),
30
+ array( 'type' => 'AutoPartsStore', 'display' => '-- AutoPartsStore' ),
31
+ array( 'type' => 'AutoRental', 'display' => '-- AutoRental' ),
32
+ array( 'type' => 'AutoRepair', 'display' => '-- AutoRepair' ),
33
+ array( 'type' => 'AutoWash', 'display' => '-- AutoWash' ),
34
+ array( 'type' => 'GasStation', 'display' => '-- GasStation' ),
35
+ array( 'type' => 'MotorcycleDealer', 'display' => '-- MotorcycleDealer' ),
36
+ array( 'type' => 'MotorcycleRepair', 'display' => '-- MotorcycleRepair' ),
37
+
38
+ array( 'type' => 'ChildCare', 'display' => '- ChildCare' ),
39
+
40
+ array( 'type' => 'DryCleaningOrLaundry', 'display' => '- DryCleaningOrLaundry' ),
41
+
42
+ array( 'type' => 'EmergencyService', 'display' => '- EmergencyService' ),
43
+ array( 'type' => 'FireStation', 'display' => '-- FireStation' ),
44
+ array( 'type' => 'Hospital', 'display' => '-- Hospital' ),
45
+ array( 'type' => 'PoliceStation', 'display' => '-- PoliceStation' ),
46
+
47
+ array( 'type' => 'EmploymentAgency', 'display' => '- EmploymentAgency' ),
48
+
49
+ array( 'type' => 'EntertainmentBusiness', 'display' => '- EntertainmentBusiness' ),
50
+ array( 'type' => 'AdultEntertainment', 'display' => '-- AdultEntertainment' ),
51
+ array( 'type' => 'AmusementPark', 'display' => '-- AmusementPark' ),
52
+ array( 'type' => 'ArtGallery', 'display' => '-- ArtGallery' ),
53
+ array( 'type' => 'Casino', 'display' => '-- Casino' ),
54
+ array( 'type' => 'ComedyClub', 'display' => '-- ComedyClub' ),
55
+ array( 'type' => 'MovieTheater', 'display' => '-- MovieTheater' ),
56
+ array( 'type' => 'NightClub', 'display' => '-- NightClub' ),
57
+
58
+ array( 'type' => 'FinancialService', 'display' => '- FinancialService' ),
59
+ array( 'type' => 'AccountingService', 'display' => '-- AccountingService' ),
60
+ array( 'type' => 'AutomatedTeller', 'display' => '-- AutomatedTeller' ),
61
+ array( 'type' => 'BankOrCreditUnion', 'display' => '-- BankOrCreditUnion' ),
62
+ array( 'type' => 'InsuranceAgency', 'display' => '-- InsuranceAgency' ),
63
+
64
+ array( 'type' => 'FoodEstablishment', 'display' => '- FoodEstablishment' ),
65
+ array( 'type' => 'Bakery', 'display' => '-- Bakery' ),
66
+ array( 'type' => 'BarOrPub', 'display' => '-- BarOrPub' ),
67
+ array( 'type' => 'Brewery', 'display' => '-- Brewery' ),
68
+ array( 'type' => 'CafeOrCoffeeShop', 'display' => '-- CafeOrCoffeeShop' ),
69
+ array( 'type' => 'FastFoodRestaurant', 'display' => '-- FastFoodRestaurant' ),
70
+ array( 'type' => 'IceCreamShop', 'display' => '-- IceCreamShop' ),
71
+ array( 'type' => 'Restaurant', 'display' => '-- Restaurant' ),
72
+ array( 'type' => 'Winery', 'display' => '-- Winery' ),
73
+
74
+ array( 'type' => 'GovernmentOffice', 'display' => '- GovernmentOffice' ),
75
+ array( 'type' => 'PostOffice', 'display' => '-- PostOffice' ),
76
+
77
+ array( 'type' => 'HealthAndBeautyBusiness', 'display' => '- HealthAndBeautyBusiness' ),
78
+ array( 'type' => 'BeautySalon', 'display' => '-- BeautySalon' ),
79
+ array( 'type' => 'DaySpa', 'display' => '-- DaySpa' ),
80
+ array( 'type' => 'HairSalon', 'display' => '-- HairSalon' ),
81
+ array( 'type' => 'HealthClub', 'display' => '-- HealthClub' ),
82
+ array( 'type' => 'NailSalon', 'display' => '-- NailSalon' ),
83
+ array( 'type' => 'TattooParlor', 'display' => '-- TattooParlor' ),
84
+
85
+ array( 'type' => 'HomeAndConstructionBusiness', 'display' => '- HomeAndConstructionBusiness' ),
86
+ array( 'type' => 'Electrician', 'display' => '-- Electrician' ),
87
+ array( 'type' => 'GeneralContractor', 'display' => '-- GeneralContractor' ),
88
+ array( 'type' => 'HVACBusiness', 'display' => '-- HVACBusiness' ),
89
+ array( 'type' => 'HousePainter', 'display' => '-- HousePainter' ),
90
+ array( 'type' => 'Locksmith', 'display' => '-- Locksmith' ),
91
+ array( 'type' => 'MovingCompany', 'display' => '-- MovingCompany' ),
92
+ array( 'type' => 'Plumber', 'display' => '-- Plumber' ),
93
+ array( 'type' => 'RoofingContractor', 'display' => '-- RoofingContractor' ),
94
+
95
+ array( 'type' => 'InternetCafe', 'display' => '- InternetCafe' ),
96
+
97
+ array( 'type' => 'LegalService', 'display' => '- LegalService' ),
98
+ array( 'type' => 'Attorney', 'display' => '-- Attorney' ),
99
+ array( 'type' => 'Notary', 'display' => '-- Notary' ),
100
+
101
+ array( 'type' => 'Library', 'display' => '- Library' ),
102
+
103
+ array( 'type' => 'LodgingBusiness', 'display' => '- LodgingBusiness' ),
104
+ array( 'type' => 'BedAndBreakfast', 'display' => '-- BedAndBreakfast' ),
105
+ array( 'type' => 'Hostel', 'display' => '-- Hostel' ),
106
+ array( 'type' => 'Hotel', 'display' => '-- Hotel' ),
107
+ array( 'type' => 'Motel', 'display' => '-- Motel' ),
108
+
109
+ array( 'type' => 'MedicalOrganization', 'display' => '- MedicalOrganization' ),
110
+ array( 'type' => 'Dentist', 'display' => '-- Dentist' ),
111
+ array( 'type' => 'DiagnosticLab', 'display' => '-- DiagnosticLab' ),
112
+ array( 'type' => 'Hospital', 'display' => '-- Hospital' ),
113
+ array( 'type' => 'MedicalClinic', 'display' => '-- MedicalClinic' ),
114
+ array( 'type' => 'Optician', 'display' => '-- Optician' ),
115
+ array( 'type' => 'Pharmacy', 'display' => '-- Pharmacy' ),
116
+ array( 'type' => 'Physician', 'display' => '-- Physician' ),
117
+ array( 'type' => 'VeterinaryCare', 'display' => '-- VeterinaryCare' ),
118
+
119
+ array( 'type' => 'ProfessionalService', 'display' => '- ProfessionalService' ),
120
+
121
+ array( 'type' => 'RadioStation', 'display' => '- RadioStation' ),
122
+
123
+ array( 'type' => 'RealEstateAgent', 'display' => '- RealEstateAgent' ),
124
+
125
+ array( 'type' => 'RecyclingCenter', 'display' => '- RecyclingCenter' ),
126
+
127
+ array( 'type' => 'SelfStorage', 'display' => '- SelfStorage' ),
128
+
129
+ array( 'type' => 'ShoppingCenter', 'display' => '- ShoppingCenter' ),
130
+
131
+ array( 'type' => 'SportsActivityLocation', 'display' => '- SportsActivityLocation' ),
132
+ array( 'type' => 'BowlingAlley', 'display' => '-- BowlingAlley' ),
133
+ array( 'type' => 'ExerciseGym', 'display' => '-- ExerciseGym' ),
134
+ array( 'type' => 'GolfCourse', 'display' => '-- GolfCourse' ),
135
+ array( 'type' => 'HealthClub', 'display' => '-- HealthClub' ),
136
+ array( 'type' => 'PublicSwimmingPool', 'display' => '-- PublicSwimmingPool' ),
137
+ array( 'type' => 'SkiResort', 'display' => '-- SkiResort' ),
138
+ array( 'type' => 'SportsClub', 'display' => '-- SportsClub' ),
139
+ array( 'type' => 'StadiumOrArena', 'display' => '-- StadiumOrArena' ),
140
+ array( 'type' => 'TennisComplex', 'display' => '-- TennisComplex' ),
141
+
142
+ array( 'type' => 'Store', 'display' => '- Store' ),
143
+ array( 'type' => 'AutoPartsStore', 'display' => '-- AutoPartsStore' ),
144
+ array( 'type' => 'BikeStore', 'display' => '-- BikeStore' ),
145
+ array( 'type' => 'BookStore', 'display' => '-- BookStore' ),
146
+ array( 'type' => 'ClothingStore', 'display' => '-- ClothingStore' ),
147
+ array( 'type' => 'ComputerStore', 'display' => '-- ComputerStore' ),
148
+ array( 'type' => 'ConvenienceStore', 'display' => '-- ConvenienceStore' ),
149
+ array( 'type' => 'DepartmentStore', 'display' => '-- DepartmentStore' ),
150
+ array( 'type' => 'ElectronicsStore', 'display' => '-- ElectronicsStore' ),
151
+ array( 'type' => 'Florist', 'display' => '-- Florist' ),
152
+ array( 'type' => 'FurnitureStore', 'display' => '-- FurnitureStore' ),
153
+ array( 'type' => 'GardenStore', 'display' => '-- GardenStore' ),
154
+ array( 'type' => 'GroceryStore', 'display' => '-- GroceryStore' ),
155
+ array( 'type' => 'HardwareStore', 'display' => '-- HardwareStore' ),
156
+ array( 'type' => 'HobbyShop', 'display' => '-- HobbyShop' ),
157
+ array( 'type' => 'HomeGoodsStore', 'display' => '-- HomeGoodsStore' ),
158
+ array( 'type' => 'JewelryStore', 'display' => '-- JewelryStore' ),
159
+ array( 'type' => 'LiquorStore', 'display' => '-- LiquorStore' ),
160
+ array( 'type' => 'MensClothingStore', 'display' => '-- MensClothingStore' ),
161
+ array( 'type' => 'MobilePhoneStore', 'display' => '-- MobilePhoneStore' ),
162
+ array( 'type' => 'MovieRentalStore', 'display' => '-- MovieRentalStore' ),
163
+ array( 'type' => 'MusicStore', 'display' => '-- MusicStore' ),
164
+ array( 'type' => 'OfficeEquipmentStore', 'display' => '-- OfficeEquipmentStore' ),
165
+ array( 'type' => 'OutletStore', 'display' => '-- OutletStore' ),
166
+ array( 'type' => 'PawnShop', 'display' => '-- PawnShop' ),
167
+ array( 'type' => 'PetStore', 'display' => '-- PetStore' ),
168
+ array( 'type' => 'ShoeStore', 'display' => '-- ShoeStore' ),
169
+ array( 'type' => 'SportingGoodsStore', 'display' => '-- SportingGoodsStore' ),
170
+ array( 'type' => 'TireShop', 'display' => '-- TireShop' ),
171
+ array( 'type' => 'ToyStore', 'display' => '-- ToyStore' ),
172
+ array( 'type' => 'WholesaleStore', 'display' => '-- WholesaleStore' ),
173
+
174
+ array( 'type' => 'TelevisionStation', 'display' => '- TelevisionStation' ),
175
+
176
+ array( 'type' => 'TouristInformationCenter', 'display' => '- TouristInformationCenter' ),
177
+
178
+ array( 'type' => 'TravelAgency', 'display' => '- TravelAgency' )
179
  );
180
 
181
  /** weekType defined. */
182
  private $week_array = array(
183
+ array('type' => 'Mo', 'display' => 'Monday'),
184
+ array('type' => 'Tu', 'display' => 'Tuesday'),
185
+ array('type' => 'We', 'display' => 'Wednesday'),
186
+ array('type' => 'Th', 'display' => 'Thursday'),
187
+ array('type' => 'Fr', 'display' => 'Friday'),
188
+ array('type' => 'Sa', 'display' => 'Saturday'),
189
+ array('type' => 'Su', 'display' => 'Sunday')
190
  );
191
 
192
  /**
332
  /**
333
  * Return the default options array
334
  *
335
+ * @since 4.6.0
336
  * @version 2.5.0
337
  * @return array $args
338
  */
339
  private function get_default_options () {
340
+ $args['business_type'] = 'LocalBusiness';
341
  $args['name'] = '';
342
  $args['image'] = '';
343
  $args['url'] = '';
includes/admin/wp-structuring-admin-type-organization.php CHANGED
@@ -3,7 +3,7 @@
3
  * Schema.org Type Organization
4
  *
5
  * @author Kazuya Takami
6
- * @version 4.5.3
7
  * @since 1.0.0
8
  * @see wp-structuring-admin-db.php
9
  * @link https://schema.org/Organization
@@ -16,35 +16,52 @@ class Structuring_Markup_Type_Organization {
16
  /**
17
  * Variable definition.
18
  *
19
- * @version 2.3.2
20
  * @since 1.0.0
21
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  /** contactType defined. */
23
  private $contact_type_array = array(
24
- array("type" => "customer service", "display" => "customer service"),
25
- array("type" => "technical support", "display" => "technical support"),
26
- array("type" => "billing support", "display" => "billing support"),
27
- array("type" => "bill payment", "display" => "bill payment"),
28
- array("type" => "sales", "display" => "sales"),
29
- array("type" => "reservations", "display" => "reservations"),
30
- array("type" => "credit card_support", "display" => "credit card support"),
31
- array("type" => "emergency", "display" => "emergency"),
32
- array("type" => "baggage tracking", "display" => "baggage tracking"),
33
- array("type" => "roadside assistance", "display" => "roadside assistance"),
34
- array("type" => "package tracking", "display" => "package tracking")
35
  );
36
  /** Social Profile */
37
  private $social_array = array(
38
- array("type" => "facebook", "display" => "Facebook"),
39
- array("type" => "twitter", "display" => "Twitter"),
40
- array("type" => "google", "display" => "Google+"),
41
- array("type" => "instagram", "display" => "Instagram"),
42
- array("type" => "youtube", "display" => "Youtube"),
43
- array("type" => "linkedin", "display" => "LinkedIn"),
44
- array("type" => "myspace", "display" => "Myspace"),
45
- array("type" => "pinterest", "display" => "Pinterest"),
46
- array("type" => "soundcloud", "display" => "SoundCloud"),
47
- array("type" => "tumblr", "display" => "Tumblr")
48
  );
49
 
50
  /**
@@ -67,11 +84,18 @@ class Structuring_Markup_Type_Organization {
67
  /**
68
  * Form Layout Render
69
  *
70
- * @version 4.5.3
71
  * @since 1.0.0
72
  * @param array $option
73
  */
74
  private function page_render ( array $option ) {
 
 
 
 
 
 
 
75
  /** Logos */
76
  $html = '<table class="schema-admin-table">';
77
  $html .= '<caption>Logos</caption>';
@@ -165,20 +189,50 @@ class Structuring_Markup_Type_Organization {
165
  submit_button();
166
  }
167
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
168
  /**
169
  * Return the default options array
170
  *
171
- * @version 4.1.3
172
  * @since 1.0.0
173
  * @return array $args
174
  */
175
  private function get_default_options () {
 
176
  $args['name'] = '';
177
  $args['url'] = '';
178
  $args['logo'] = '';
179
  $args['contact_point'] = '';
180
  $args['telephone'] = '';
181
- $args['contact_type'] = 'customer_service';
182
  $args['email'] = '';
183
  $args['area_served'] = 'US';
184
  $args['contact_option_1'] = '';
3
  * Schema.org Type Organization
4
  *
5
  * @author Kazuya Takami
6
+ * @version 4.6.0
7
  * @since 1.0.0
8
  * @see wp-structuring-admin-db.php
9
  * @link https://schema.org/Organization
16
  /**
17
  * Variable definition.
18
  *
19
+ * @version 4.6.0
20
  * @since 1.0.0
21
  */
22
+ /** Organization Type defined */
23
+ private $organization_type_array = array(
24
+ array('type' => 'Organization', 'display' => 'Organization'),
25
+ array('type' => 'Airline', 'display' => '- Airline'),
26
+ array('type' => 'Consortium', 'display' => '- Consortium'),
27
+ array('type' => 'Corporation', 'display' => '- Corporation'),
28
+ array('type' => 'EducationalOrganization', 'display' => '- EducationalOrganization'),
29
+ array('type' => 'GovernmentOrganization', 'display' => '- GovernmentOrganization'),
30
+ array('type' => 'LibrarySystem', 'display' => '- LibrarySystem'),
31
+ array('type' => 'LocalBusiness', 'display' => '- LocalBusiness'),
32
+ array('type' => 'MedicalOrganization', 'display' => '- MedicalOrganization'),
33
+ array('type' => 'NewsMediaOrganization', 'display' => '- NewsMediaOrganization'),
34
+ array('type' => 'NGO', 'display' => '- NGO'),
35
+ array('type' => 'PerformingGroup', 'display' => '- PerformingGroup'),
36
+ array('type' => 'SportsOrganization', 'display' => '- SportsOrganization'),
37
+ array('type' => 'WorkersUnion', 'display' => '- WorkersUnion')
38
+ );
39
  /** contactType defined. */
40
  private $contact_type_array = array(
41
+ array('type' => 'customer service', 'display' => 'customer service'),
42
+ array('type' => 'technical support', 'display' => 'technical support'),
43
+ array('type' => 'billing support', 'display' => 'billing support'),
44
+ array('type' => 'bill payment', 'display' => 'bill payment'),
45
+ array('type' => 'sales', 'display' => 'sales'),
46
+ array('type' => 'reservations', 'display' => 'reservations'),
47
+ array('type' => 'credit card_support', 'display' => 'credit card support'),
48
+ array('type' => 'emergency', 'display' => 'emergency'),
49
+ array('type' => 'baggage tracking', 'display' => 'baggage tracking'),
50
+ array('type' => 'roadside assistance', 'display' => 'roadside assistance'),
51
+ array('type' => 'package tracking', 'display' => 'package tracking')
52
  );
53
  /** Social Profile */
54
  private $social_array = array(
55
+ array('type' => 'facebook', 'display' => 'Facebook'),
56
+ array('type' => 'twitter', 'display' => 'Twitter'),
57
+ array('type' => 'google', 'display' => 'Google+'),
58
+ array('type' => 'instagram', 'display' => 'Instagram'),
59
+ array('type' => 'youtube', 'display' => 'Youtube'),
60
+ array('type' => 'linkedin', 'display' => 'LinkedIn'),
61
+ array('type' => 'myspace', 'display' => 'Myspace'),
62
+ array('type' => 'pinterest', 'display' => 'Pinterest'),
63
+ array('type' => 'soundcloud', 'display' => 'SoundCloud'),
64
+ array('type' => 'tumblr', 'display' => 'Tumblr')
65
  );
66
 
67
  /**
84
  /**
85
  * Form Layout Render
86
  *
87
+ * @version 4.6.0
88
  * @since 1.0.0
89
  * @param array $option
90
  */
91
  private function page_render ( array $option ) {
92
+ /** Organization Type */
93
+ $html = '<table class="schema-admin-table">';
94
+ $html .= '<caption>Organization</caption>';
95
+ $html .= $this->set_form_select( 'organization_type', 'Organization Type', $option['organization_type'] );
96
+ $html .= '</table>';
97
+ echo $html;
98
+
99
  /** Logos */
100
  $html = '<table class="schema-admin-table">';
101
  $html .= '<caption>Logos</caption>';
189
  submit_button();
190
  }
191
 
192
+ /**
193
+ * Return the form select
194
+ *
195
+ * @version 4.6.0
196
+ * @since 4.6.0
197
+ * @param string $id
198
+ * @param string $display
199
+ * @param string $value
200
+ * @param string $note
201
+ * @return string $html
202
+ */
203
+ private function set_form_select ( $id, $display, $value = "", $note = "" ) {
204
+ $value = esc_attr( $value );
205
+
206
+ $format = '<tr><th class="require"><label for=%s>%s :</label></th><td>';
207
+ $format .= '<select id="%s" name="option[%s]">';
208
+ foreach ( $this->organization_type_array as $args ) {
209
+ $format .= '<option value="' . $args['type'] . '"';
210
+ if ( $args['type'] === $value ) {
211
+ $format .= ' selected';
212
+ }
213
+ $format .= '>' . $args['display'] . '</option>';
214
+ }
215
+ $format .= '</select>';
216
+ $format .= '<small>%s</small></td></tr>';
217
+
218
+ return (string) sprintf( $format, $id, $display, $id, $id, $note );
219
+ }
220
+
221
  /**
222
  * Return the default options array
223
  *
224
+ * @version 4.6.0
225
  * @since 1.0.0
226
  * @return array $args
227
  */
228
  private function get_default_options () {
229
+ $args['organization_type'] = 'Organization';
230
  $args['name'] = '';
231
  $args['url'] = '';
232
  $args['logo'] = '';
233
  $args['contact_point'] = '';
234
  $args['telephone'] = '';
235
+ $args['contact_type'] = 'customer service';
236
  $args['email'] = '';
237
  $args['area_served'] = 'US';
238
  $args['contact_option_1'] = '';
includes/meta/wp-structuring-meta-local-business.php CHANGED
@@ -3,7 +3,7 @@
3
  * Schema.org Type LocalBusiness
4
  *
5
  * @author Kazuya Takami
6
- * @version 4.1.6
7
  * @since 4.0.0
8
  * @see wp-structuring-opening-hours.php
9
  * @link http://schema.org/LocalBusiness
@@ -15,7 +15,7 @@ class Structuring_Markup_Meta_LocalBusiness {
15
  /**
16
  * Setting schema.org LocalBusiness
17
  *
18
- * @version 4.1.6
19
  * @since 4.0.0
20
  * @param array $options
21
  * @return array $args
@@ -24,21 +24,21 @@ class Structuring_Markup_Meta_LocalBusiness {
24
 
25
  /** weekType defined. */
26
  $week_array = array(
27
- array( "type" => "Mo", "display" => "Monday" ),
28
- array( "type" => "Tu", "display" => "Tuesday" ),
29
- array( "type" => "We", "display" => "Wednesday" ),
30
- array( "type" => "Th", "display" => "Thursday" ),
31
- array( "type" => "Fr", "display" => "Friday" ),
32
- array( "type" => "Sa", "display" => "Saturday" ),
33
- array( "type" => "Su", "display" => "Sunday" )
34
  );
35
 
36
  $args = array(
37
- "@context" => "http://schema.org",
38
- "@type" => isset( $options['business_type'] ) ? esc_html( $options['business_type'] ) : "",
39
- "name" => isset( $options['name'] ) ? esc_html( $options['name'] ) : "",
40
- "image" => isset( $options['image'] ) ? esc_html( $options['image'] ) : "",
41
- "url" => isset( $options['url'] ) ? esc_url( $options['url'] ) : ""
42
  );
43
 
44
  if ( isset( $options['telephone'] ) && !empty( $options['telephone'] ) ) {
@@ -50,9 +50,9 @@ class Structuring_Markup_Meta_LocalBusiness {
50
  $args['menu'] = esc_url( $options['menu'] );
51
  }
52
  if ( isset( $options['accepts_reservations'] ) && $options['accepts_reservations'] === 'on' ) {
53
- $args['acceptsReservations'] = "True";
54
  } else {
55
- $args['acceptsReservations'] = "False";
56
  }
57
  if ( isset( $options['serves_cuisine'] ) && $options['serves_cuisine'] !== '' ) {
58
  $args['servesCuisine'] = esc_html( $options['serves_cuisine'] );
@@ -60,11 +60,11 @@ class Structuring_Markup_Meta_LocalBusiness {
60
  }
61
 
62
  $address_array['address'] = array(
63
- "@type" => "PostalAddress",
64
- "streetAddress" => isset( $options['street_address'] ) ? esc_html( $options['street_address'] ) : "",
65
- "addressLocality" => isset( $options['address_locality'] ) ? esc_html( $options['address_locality'] ) : "",
66
- "postalCode" => isset( $options['postal_code'] ) ? esc_html( $options['postal_code'] ) : "",
67
- "addressCountry" => isset( $options['address_country'] ) ? esc_html( $options['address_country'] ) : ""
68
  );
69
 
70
  if ( isset( $options['address_region'] ) && !empty( $options['address_region'] ) ) {
@@ -75,21 +75,21 @@ class Structuring_Markup_Meta_LocalBusiness {
75
  $geo_array = array();
76
 
77
  if ( isset( $options['geo_active'] ) && $options['geo_active'] === 'on' ) {
78
- $geo_array["geo"] = array(
79
- "@type" => "GeoCoordinates",
80
- "latitude" => isset( $options['latitude'] ) ? esc_html(floatval($options['latitude'])) : "",
81
- "longitude" => isset( $options['longitude'] ) ? esc_html(floatval($options['longitude'])) : ""
82
  );
83
  }
84
 
85
  if ( isset( $options['geo_circle_active'] ) && $options['geo_circle_active'] === 'on' ) {
86
- $place_array["location"] = array( "@type" => "Place" );
87
- $place_array["location"]["geo"] = array(
88
- "@type" => "GeoCircle",
89
- "geoRadius" => isset( $options['geo_circle_radius'] ) ? esc_html( floatval( $options['geo_circle_radius'] ) ) : ""
90
  );
91
  if ( isset( $options['geo_active'] ) && $options['geo_active'] === 'on' ) {
92
- $place_array["location"]["geo"]["geoMidpoint"] = $geo_array["geo"];
93
  }
94
  $args = array_merge( $args, $place_array );
95
  } else {
@@ -111,10 +111,10 @@ class Structuring_Markup_Meta_LocalBusiness {
111
  $obj = new Structuring_Markup_Opening_Hours( $active_days );
112
  $opening_hours = $obj->display();
113
 
114
- $opening_array["openingHours"] = array();
115
 
116
  foreach( $opening_hours as $value ) {
117
- $opening_array["openingHours"][] = $value;
118
  }
119
 
120
  $args = array_merge( $args, $opening_array );
@@ -122,18 +122,18 @@ class Structuring_Markup_Meta_LocalBusiness {
122
  }
123
 
124
  if ( isset( $options['holiday_active'] ) && $options['holiday_active'] === 'on' ) {
125
- $holiday_array["openingHoursSpecification"] = array(
126
- "@type" => "OpeningHoursSpecification",
127
- "opens" => isset( $options['holiday_open'] ) ? esc_html( $options['holiday_open'] ) : "",
128
- "closes" => isset( $options['holiday_close'] ) ? esc_html( $options['holiday_close'] ) : "",
129
- "validFrom" => isset( $options['holiday_valid_from'] ) ? esc_html( $options['holiday_valid_from'] ) : "",
130
- "validThrough" => isset( $options['holiday_valid_through'] ) ? esc_html( $options['holiday_valid_through'] ) : ""
131
  );
132
  $args = array_merge( $args, $holiday_array );
133
  }
134
 
135
  if ( isset( $options['price_range'] ) && !empty( $options['price_range'] ) ) {
136
- $price_array["priceRange"] = $options['price_range'];
137
  $args = array_merge( $args, $price_array );
138
  }
139
 
3
  * Schema.org Type LocalBusiness
4
  *
5
  * @author Kazuya Takami
6
+ * @version 4.6.0
7
  * @since 4.0.0
8
  * @see wp-structuring-opening-hours.php
9
  * @link http://schema.org/LocalBusiness
15
  /**
16
  * Setting schema.org LocalBusiness
17
  *
18
+ * @version 4.6.0
19
  * @since 4.0.0
20
  * @param array $options
21
  * @return array $args
24
 
25
  /** weekType defined. */
26
  $week_array = array(
27
+ array( 'type' => 'Mo', 'display' => 'Monday' ),
28
+ array( 'type' => 'Tu', 'display' => 'Tuesday' ),
29
+ array( 'type' => 'We', 'display' => 'Wednesday' ),
30
+ array( 'type' => 'Th', 'display' => 'Thursday' ),
31
+ array( 'type' => 'Fr', 'display' => 'Friday' ),
32
+ array( 'type' => 'Sa', 'display' => 'Saturday' ),
33
+ array( 'type' => 'Su', 'display' => 'Sunday' )
34
  );
35
 
36
  $args = array(
37
+ '@context' => 'http://schema.org',
38
+ '@type' => isset( $options['business_type'] ) ? esc_html( $options['business_type'] ) : 'LocalBusiness',
39
+ 'name' => isset( $options['name'] ) ? esc_html( $options['name'] ) : '',
40
+ 'image' => isset( $options['image'] ) ? esc_html( $options['image'] ) : '',
41
+ 'url' => isset( $options['url'] ) ? esc_url( $options['url'] ) : ''
42
  );
43
 
44
  if ( isset( $options['telephone'] ) && !empty( $options['telephone'] ) ) {
50
  $args['menu'] = esc_url( $options['menu'] );
51
  }
52
  if ( isset( $options['accepts_reservations'] ) && $options['accepts_reservations'] === 'on' ) {
53
+ $args['acceptsReservations'] = 'True';
54
  } else {
55
+ $args['acceptsReservations'] = 'False';
56
  }
57
  if ( isset( $options['serves_cuisine'] ) && $options['serves_cuisine'] !== '' ) {
58
  $args['servesCuisine'] = esc_html( $options['serves_cuisine'] );
60
  }
61
 
62
  $address_array['address'] = array(
63
+ '@type' => 'PostalAddress',
64
+ 'streetAddress' => isset( $options['street_address'] ) ? esc_html( $options['street_address'] ) : '',
65
+ 'addressLocality' => isset( $options['address_locality'] ) ? esc_html( $options['address_locality'] ) : '',
66
+ 'postalCode' => isset( $options['postal_code'] ) ? esc_html( $options['postal_code'] ) : '',
67
+ 'addressCountry' => isset( $options['address_country'] ) ? esc_html( $options['address_country'] ) : ''
68
  );
69
 
70
  if ( isset( $options['address_region'] ) && !empty( $options['address_region'] ) ) {
75
  $geo_array = array();
76
 
77
  if ( isset( $options['geo_active'] ) && $options['geo_active'] === 'on' ) {
78
+ $geo_array['geo'] = array(
79
+ '@type' => 'GeoCoordinates',
80
+ 'latitude' => isset( $options['latitude'] ) ? esc_html(floatval($options['latitude'])) : '',
81
+ 'longitude' => isset( $options['longitude'] ) ? esc_html(floatval($options['longitude'])) : ''
82
  );
83
  }
84
 
85
  if ( isset( $options['geo_circle_active'] ) && $options['geo_circle_active'] === 'on' ) {
86
+ $place_array['location'] = array( '@type' => 'Place' );
87
+ $place_array['location']['geo'] = array(
88
+ '@type' => 'GeoCircle',
89
+ 'geoRadius' => isset( $options['geo_circle_radius'] ) ? esc_html( floatval( $options['geo_circle_radius'] ) ) : ''
90
  );
91
  if ( isset( $options['geo_active'] ) && $options['geo_active'] === 'on' ) {
92
+ $place_array['location']['geo']['geoMidpoint'] = $geo_array['geo'];
93
  }
94
  $args = array_merge( $args, $place_array );
95
  } else {
111
  $obj = new Structuring_Markup_Opening_Hours( $active_days );
112
  $opening_hours = $obj->display();
113
 
114
+ $opening_array['openingHours'] = array();
115
 
116
  foreach( $opening_hours as $value ) {
117
+ $opening_array['openingHours'][] = $value;
118
  }
119
 
120
  $args = array_merge( $args, $opening_array );
122
  }
123
 
124
  if ( isset( $options['holiday_active'] ) && $options['holiday_active'] === 'on' ) {
125
+ $holiday_array['openingHoursSpecification'] = array(
126
+ '@type' => 'OpeningHoursSpecification',
127
+ 'opens' => isset( $options['holiday_open'] ) ? esc_html( $options['holiday_open'] ) : '',
128
+ 'closes' => isset( $options['holiday_close'] ) ? esc_html( $options['holiday_close'] ) : '',
129
+ 'validFrom' => isset( $options['holiday_valid_from'] ) ? esc_html( $options['holiday_valid_from'] ) : '',
130
+ 'validThrough' => isset( $options['holiday_valid_through'] ) ? esc_html( $options['holiday_valid_through'] ) : ''
131
  );
132
  $args = array_merge( $args, $holiday_array );
133
  }
134
 
135
  if ( isset( $options['price_range'] ) && !empty( $options['price_range'] ) ) {
136
+ $price_array['priceRange'] = $options['price_range'];
137
  $args = array_merge( $args, $price_array );
138
  }
139
 
includes/meta/wp-structuring-meta-organization.php CHANGED
@@ -3,7 +3,7 @@
3
  * Schema.org Type Organization
4
  *
5
  * @author Kazuya Takami
6
- * @version 4.1.3
7
  * @since 4.0.0
8
  * @link https://schema.org/Organization
9
  * @link https://developers.google.com/search/docs/guides/enhance-site
@@ -13,7 +13,7 @@ class Structuring_Markup_Meta_Organization {
13
  /**
14
  * Setting schema.org Organization
15
  *
16
- * @version 4.1.3
17
  * @since 4.0.0
18
  * @param array $options
19
  * @return array $args
@@ -21,28 +21,28 @@ class Structuring_Markup_Meta_Organization {
21
  public function set_meta ( array $options ) {
22
  /** Logos */
23
  $args = array(
24
- "@context" => "http://schema.org",
25
- "@type" => "Organization",
26
- "name" => isset( $options['name'] ) ? esc_html( $options['name'] ) : "",
27
- "url" => isset( $options['url'] ) ? esc_url( $options['url'] ) : "",
28
- "logo" => isset( $options['logo'] ) ? esc_url( $options['logo'] ) : ""
29
  );
30
 
31
  /** Corporate Contact */
32
  if ( isset( $options['contact_point'] ) && $options['contact_point'] === 'on' ) {
33
  $contact_point_data = array(
34
- "@type" => "ContactPoint",
35
- "telephone" => isset( $options['telephone'] ) ? esc_html( $options['telephone'] ) : "",
36
- "contactType" => isset( $options['contact_type'] ) ? esc_html( $options['contact_type'] ) : ""
37
  );
38
 
39
  if ( !empty( $options['email'] ) ) {
40
- $contact_point_data['email'] = isset( $options['email'] ) ? esc_html( $options['email'] ) : "";
41
  }
42
  if ( !empty( $options['area_served'] ) ) {
43
  $array = explode( ',', esc_html( $options['area_served'] ) );
44
  for ( $i = 0; $i < count( $array ); $i++ ) {
45
- $contact_point_data['areaServed'][] = isset( $options['area_served'] ) ? $array[$i] : "";
46
  }
47
  }
48
  if ( isset( $options['contact_point_1'] ) && $options['contact_point_1'] === 'on' ) {
@@ -54,24 +54,24 @@ class Structuring_Markup_Meta_Organization {
54
  if ( !empty( $options['available_language'] ) ) {
55
  $array = explode( ',', esc_html( $options['available_language'] ) );
56
  for ( $i = 0; $i < count( $array ); $i++ ) {
57
- $contact_point_data['availableLanguage'][] = isset( $options['available_language'] ) ? $array[$i] : "";
58
  }
59
  }
60
 
61
- $contact_point["contactPoint"] = array( $contact_point_data );
62
  $args = array_merge( $args, $contact_point );
63
  }
64
 
65
  /** Social Profiles */
66
  if ( isset( $options['social'] ) ) {
67
- $socials["sameAs"] = array();
68
 
69
  foreach ( $options['social'] as $value ) {
70
  if ( $value ) {
71
- $socials["sameAs"][] = esc_url( $value );
72
  }
73
  }
74
- if ( count( $socials["sameAs"] ) > 0 ) {
75
  $args = array_merge( $args, $socials );
76
  }
77
  }
3
  * Schema.org Type Organization
4
  *
5
  * @author Kazuya Takami
6
+ * @version 4.6.0
7
  * @since 4.0.0
8
  * @link https://schema.org/Organization
9
  * @link https://developers.google.com/search/docs/guides/enhance-site
13
  /**
14
  * Setting schema.org Organization
15
  *
16
+ * @version 4.6.0
17
  * @since 4.0.0
18
  * @param array $options
19
  * @return array $args
21
  public function set_meta ( array $options ) {
22
  /** Logos */
23
  $args = array(
24
+ '@context' => 'http://schema.org',
25
+ '@type' => isset( $options['organization_type'] ) ? esc_html( $options['organization_type'] ) : 'Organization',
26
+ 'name' => isset( $options['name'] ) ? esc_html( $options['name'] ) : '',
27
+ 'url' => isset( $options['url'] ) ? esc_url( $options['url'] ) : '',
28
+ 'logo' => isset( $options['logo'] ) ? esc_url( $options['logo'] ) : ''
29
  );
30
 
31
  /** Corporate Contact */
32
  if ( isset( $options['contact_point'] ) && $options['contact_point'] === 'on' ) {
33
  $contact_point_data = array(
34
+ '@type' => 'ContactPoint',
35
+ 'telephone' => isset( $options['telephone'] ) ? esc_html( $options['telephone'] ) : '',
36
+ 'contactType' => isset( $options['contact_type'] ) ? esc_html( $options['contact_type'] ) : ''
37
  );
38
 
39
  if ( !empty( $options['email'] ) ) {
40
+ $contact_point_data['email'] = isset( $options['email'] ) ? esc_html( $options['email'] ) : '';
41
  }
42
  if ( !empty( $options['area_served'] ) ) {
43
  $array = explode( ',', esc_html( $options['area_served'] ) );
44
  for ( $i = 0; $i < count( $array ); $i++ ) {
45
+ $contact_point_data['areaServed'][] = isset( $options['area_served'] ) ? $array[$i] : '';
46
  }
47
  }
48
  if ( isset( $options['contact_point_1'] ) && $options['contact_point_1'] === 'on' ) {
54
  if ( !empty( $options['available_language'] ) ) {
55
  $array = explode( ',', esc_html( $options['available_language'] ) );
56
  for ( $i = 0; $i < count( $array ); $i++ ) {
57
+ $contact_point_data['availableLanguage'][] = isset( $options['available_language'] ) ? $array[$i] : '';
58
  }
59
  }
60
 
61
+ $contact_point['contactPoint'] = array( $contact_point_data );
62
  $args = array_merge( $args, $contact_point );
63
  }
64
 
65
  /** Social Profiles */
66
  if ( isset( $options['social'] ) ) {
67
+ $socials['sameAs'] = array();
68
 
69
  foreach ( $options['social'] as $value ) {
70
  if ( $value ) {
71
+ $socials['sameAs'][] = esc_url( $value );
72
  }
73
  }
74
+ if ( count( $socials['sameAs'] ) > 0 ) {
75
  $args = array_merge( $args, $socials );
76
  }
77
  }
includes/wp-structuring-short-code-breadcrumb.php CHANGED
@@ -3,7 +3,7 @@
3
  * Breadcrumb ShortCode Settings
4
  *
5
  * @author Kazuya Takami
6
- * @version 4.5.1
7
  * @since 2.0.0
8
  */
9
  class Structuring_Markup_ShortCode_Breadcrumb {
@@ -70,7 +70,7 @@ class Structuring_Markup_ShortCode_Breadcrumb {
70
  /**
71
  * Breadcrumb array setting.
72
  *
73
- * @version 4.2.2
74
  * @since 2.0.0
75
  * @access public
76
  * @param array $options
@@ -81,7 +81,22 @@ class Structuring_Markup_ShortCode_Breadcrumb {
81
 
82
  /** item build */
83
  $item_array = array();
84
- $current_url = esc_url( home_url() . $_SERVER['REQUEST_URI'] );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
 
86
  if ( get_option( 'show_on_front' ) === 'page' ) {
87
  $front_page_id = get_option( 'page_on_front' );
3
  * Breadcrumb ShortCode Settings
4
  *
5
  * @author Kazuya Takami
6
+ * @version 4.6.0
7
  * @since 2.0.0
8
  */
9
  class Structuring_Markup_ShortCode_Breadcrumb {
70
  /**
71
  * Breadcrumb array setting.
72
  *
73
+ * @version 4.6.0
74
  * @since 2.0.0
75
  * @access public
76
  * @param array $options
81
 
82
  /** item build */
83
  $item_array = array();
84
+
85
+ if ( isset( $options['home_url'] ) ) {
86
+ switch ( $options['home_url'] ) {
87
+ case 'home_url':
88
+ $current_url = esc_url( home_url() . $_SERVER['REQUEST_URI'] );
89
+ break;
90
+ case 'site_url':
91
+ $current_url = esc_url( site_url() . $_SERVER['REQUEST_URI'] );
92
+ break;
93
+ default:
94
+ $current_url = esc_url( home_url() . $_SERVER['REQUEST_URI'] );
95
+ break;
96
+ }
97
+ } else {
98
+ $current_url = esc_url( home_url() . $_SERVER['REQUEST_URI'] );
99
+ }
100
 
101
  if ( get_option( 'show_on_front' ) === 'page' ) {
102
  $front_page_id = get_option( 'page_on_front' );
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: miiitaka
3
  Tags: schema, schema.org, json, json-ld, seo, post, posts, google, shortcode, breadcrumb
4
  Requires at least: 4.3.1
5
  Tested up to: 4.9.8
6
- Stable tag: 4.5.3
7
 
8
  Allows you to include schema.org JSON-LD syntax markup on your website
9
 
@@ -55,6 +55,10 @@ if ( shortcode_exists( 'wp-structuring-markup-breadcrumb' ) ) {
55
 
56
  == Changelog ==
57
 
 
 
 
 
58
  = 4.5.3 (2018-09-07) =
59
  * Fixed : Fixed broken links.
60
  * Fixed : Fixed bug when displaying Config menu.
3
  Tags: schema, schema.org, json, json-ld, seo, post, posts, google, shortcode, breadcrumb
4
  Requires at least: 4.3.1
5
  Tested up to: 4.9.8
6
+ Stable tag: 4.6.0
7
 
8
  Allows you to include schema.org JSON-LD syntax markup on your website
9
 
55
 
56
  == Changelog ==
57
 
58
+ = 4.6.0 (2018-09-19) =
59
+ * Updated : Schema type Breadcrumbs: Added switching between home_url () and site_url ().
60
+ * Updated : Organization schema.org type subdivision.
61
+
62
  = 4.5.3 (2018-09-07) =
63
  * Fixed : Fixed broken links.
64
  * Fixed : Fixed bug when displaying Config menu.
wp-structuring-markup.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Markup (JSON-LD) structured in schema.org
4
  Plugin URI: https://github.com/miiitaka/wp-structuring-markup
5
  Description: Allows you to include schema.org JSON-LD syntax markup on your website
6
- Version: 4.5.3
7
  Author: Kazuya Takami
8
  Author URI: https://www.terakoya.work/
9
  License: GPLv2 or later
@@ -18,7 +18,7 @@ new Structuring_Markup();
18
  * Schema.org Basic Class
19
  *
20
  * @author Kazuya Takami
21
- * @version 4.5.3
22
  * @since 1.0.0
23
  */
24
  class Structuring_Markup {
@@ -26,10 +26,10 @@ class Structuring_Markup {
26
  /**
27
  * Variable definition version.
28
  *
29
- * @version 4.5.3
30
  * @since 1.3.0
31
  */
32
- private $version = '4.5.3';
33
 
34
  /**
35
  * Variable definition Text Domain.
3
  Plugin Name: Markup (JSON-LD) structured in schema.org
4
  Plugin URI: https://github.com/miiitaka/wp-structuring-markup
5
  Description: Allows you to include schema.org JSON-LD syntax markup on your website
6
+ Version: 4.6.0
7
  Author: Kazuya Takami
8
  Author URI: https://www.terakoya.work/
9
  License: GPLv2 or later
18
  * Schema.org Basic Class
19
  *
20
  * @author Kazuya Takami
21
+ * @version 4.6.0
22
  * @since 1.0.0
23
  */
24
  class Structuring_Markup {
26
  /**
27
  * Variable definition version.
28
  *
29
+ * @version 4.6.0
30
  * @since 1.3.0
31
  */
32
+ private $version = '4.6.0';
33
 
34
  /**
35
  * Variable definition Text Domain.