@@ -64,27 +64,27 @@ |
||
| 64 | 64 | */ |
| 65 | 65 | class Person extends BaseType |
| 66 | 66 | { |
| 67 | - /** |
|
| 68 | - * @var array |
|
| 69 | - * @see http://schema.org/{property_name} |
|
| 70 | - */ |
|
| 71 | - public $allowed = [ |
|
| 72 | - 'additionalName', 'address', 'affiliation', 'alumniOf', 'award', 'awards', 'birthDate', |
|
| 73 | - 'birthPlace', 'brand', 'children', 'colleague', 'colleagues', 'contactPoint', |
|
| 74 | - 'contactPoints', 'deathDate', 'deathPlace', 'duns', 'email', 'familyName', 'faxNumber', |
|
| 75 | - 'follows', 'funder', 'gender', 'givenName', 'globalLocationNumber', 'hasOfferCatalog', |
|
| 76 | - 'hasPOS', 'height', 'homeLocation', 'honorificPrefix', 'honorificSuffix', 'isicV4', |
|
| 77 | - 'jobTitle', 'knows', 'makesOffer', 'memberOf', 'naics', 'nationality', 'netWorth', 'owns', |
|
| 78 | - 'parent', 'parents', 'performerIn', 'publishingPrinciples', 'relatedTo', 'seeks', 'sibling', |
|
| 79 | - 'siblings', 'sponsor', 'spouse', 'taxID', 'telephone', 'vatID', 'weight', 'workLocation', |
|
| 80 | - 'worksFor', |
|
| 81 | - ]; |
|
| 67 | + /** |
|
| 68 | + * @var array |
|
| 69 | + * @see http://schema.org/{property_name} |
|
| 70 | + */ |
|
| 71 | + public $allowed = [ |
|
| 72 | + 'additionalName', 'address', 'affiliation', 'alumniOf', 'award', 'awards', 'birthDate', |
|
| 73 | + 'birthPlace', 'brand', 'children', 'colleague', 'colleagues', 'contactPoint', |
|
| 74 | + 'contactPoints', 'deathDate', 'deathPlace', 'duns', 'email', 'familyName', 'faxNumber', |
|
| 75 | + 'follows', 'funder', 'gender', 'givenName', 'globalLocationNumber', 'hasOfferCatalog', |
|
| 76 | + 'hasPOS', 'height', 'homeLocation', 'honorificPrefix', 'honorificSuffix', 'isicV4', |
|
| 77 | + 'jobTitle', 'knows', 'makesOffer', 'memberOf', 'naics', 'nationality', 'netWorth', 'owns', |
|
| 78 | + 'parent', 'parents', 'performerIn', 'publishingPrinciples', 'relatedTo', 'seeks', 'sibling', |
|
| 79 | + 'siblings', 'sponsor', 'spouse', 'taxID', 'telephone', 'vatID', 'weight', 'workLocation', |
|
| 80 | + 'worksFor', |
|
| 81 | + ]; |
|
| 82 | 82 | |
| 83 | - /** |
|
| 84 | - * @var array |
|
| 85 | - * @see http://schema.org/{property_name} |
|
| 86 | - */ |
|
| 87 | - public $parents = [ |
|
| 88 | - 'Thing', |
|
| 89 | - ]; |
|
| 83 | + /** |
|
| 84 | + * @var array |
|
| 85 | + * @see http://schema.org/{property_name} |
|
| 86 | + */ |
|
| 87 | + public $parents = [ |
|
| 88 | + 'Thing', |
|
| 89 | + ]; |
|
| 90 | 90 | } |
@@ -54,26 +54,26 @@ |
||
| 54 | 54 | */ |
| 55 | 55 | class Offer extends BaseType |
| 56 | 56 | { |
| 57 | - /** |
|
| 58 | - * @var array |
|
| 59 | - * @see http://schema.org/{property_name} |
|
| 60 | - */ |
|
| 61 | - public $allowed = [ |
|
| 62 | - 'acceptedPaymentMethod', 'addOn', 'advanceBookingRequirement', 'aggregateRating', |
|
| 63 | - 'areaServed', 'availability', 'availabilityEnds', 'availabilityStarts', 'availableAtOrFrom', |
|
| 64 | - 'availableDeliveryMethod', 'businessFunction', 'category', 'deliveryLeadTime', |
|
| 65 | - 'eligibleCustomerType', 'eligibleDuration', 'eligibleQuantity', 'eligibleRegion', |
|
| 66 | - 'eligibleTransactionVolume', 'gtin12', 'gtin13', 'gtin14', 'gtin8', 'includesObject', |
|
| 67 | - 'ineligibleRegion', 'inventoryLevel', 'itemCondition', 'itemOffered', 'mpn', 'price', |
|
| 68 | - 'priceCurrency', 'priceSpecification', 'priceValidUntil', 'review', 'reviews', 'seller', |
|
| 69 | - 'serialNumber', 'sku', 'validFrom', 'validThrough', 'warranty', |
|
| 70 | - ]; |
|
| 57 | + /** |
|
| 58 | + * @var array |
|
| 59 | + * @see http://schema.org/{property_name} |
|
| 60 | + */ |
|
| 61 | + public $allowed = [ |
|
| 62 | + 'acceptedPaymentMethod', 'addOn', 'advanceBookingRequirement', 'aggregateRating', |
|
| 63 | + 'areaServed', 'availability', 'availabilityEnds', 'availabilityStarts', 'availableAtOrFrom', |
|
| 64 | + 'availableDeliveryMethod', 'businessFunction', 'category', 'deliveryLeadTime', |
|
| 65 | + 'eligibleCustomerType', 'eligibleDuration', 'eligibleQuantity', 'eligibleRegion', |
|
| 66 | + 'eligibleTransactionVolume', 'gtin12', 'gtin13', 'gtin14', 'gtin8', 'includesObject', |
|
| 67 | + 'ineligibleRegion', 'inventoryLevel', 'itemCondition', 'itemOffered', 'mpn', 'price', |
|
| 68 | + 'priceCurrency', 'priceSpecification', 'priceValidUntil', 'review', 'reviews', 'seller', |
|
| 69 | + 'serialNumber', 'sku', 'validFrom', 'validThrough', 'warranty', |
|
| 70 | + ]; |
|
| 71 | 71 | |
| 72 | - /** |
|
| 73 | - * @var array |
|
| 74 | - * @see http://schema.org/{property_name} |
|
| 75 | - */ |
|
| 76 | - public $parents = [ |
|
| 77 | - 'Intangible', |
|
| 78 | - ]; |
|
| 72 | + /** |
|
| 73 | + * @var array |
|
| 74 | + * @see http://schema.org/{property_name} |
|
| 75 | + */ |
|
| 76 | + public $parents = [ |
|
| 77 | + 'Intangible', |
|
| 78 | + ]; |
|
| 79 | 79 | } |
@@ -92,34 +92,34 @@ |
||
| 92 | 92 | */ |
| 93 | 93 | class CreativeWork extends BaseType |
| 94 | 94 | { |
| 95 | - /** |
|
| 96 | - * @var array |
|
| 97 | - * @see http://schema.org/{property_name} |
|
| 98 | - */ |
|
| 99 | - public $allowed = [ |
|
| 100 | - 'about', 'accessMode', 'accessModeSufficient', 'accessibilityAPI', 'accessibilityControl', |
|
| 101 | - 'accessibilityFeature', 'accessibilityHazard', 'accessibilitySummary', 'accountablePerson', |
|
| 102 | - 'aggregateRating', 'alternativeHeadline', 'associatedMedia', 'audience', 'audio', 'author', |
|
| 103 | - 'award', 'awards', 'character', 'citation', 'comment', 'commentCount', 'contentLocation', |
|
| 104 | - 'contentRating', 'contributor', 'copyrightHolder', 'copyrightYear', 'creator', |
|
| 105 | - 'dateCreated', 'dateModified', 'datePublished', 'discussionUrl', 'editor', |
|
| 106 | - 'educationalAlignment', 'educationalUse', 'encoding', 'encodingFormat', 'encodings', |
|
| 107 | - 'exampleOfWork', 'expires', 'fileFormat', 'funder', 'genre', 'hasPart', 'headline', |
|
| 108 | - 'inLanguage', 'interactionStatistic', 'interactivityType', 'isAccessibleForFree', |
|
| 109 | - 'isBasedOn', 'isBasedOnUrl', 'isFamilyFriendly', 'isPartOf', 'keywords', |
|
| 110 | - 'learningResourceType', 'license', 'locationCreated', 'mainEntity', 'material', 'mentions', |
|
| 111 | - 'offers', 'position', 'producer', 'provider', 'publication', 'publisher', |
|
| 112 | - 'publishingPrinciples', 'recordedAt', 'releasedEvent', 'review', 'reviews', 'schemaVersion', |
|
| 113 | - 'sourceOrganization', 'spatialCoverage', 'sponsor', 'temporalCoverage', 'text', |
|
| 114 | - 'thumbnailUrl', 'timeRequired', 'translator', 'typicalAgeRange', 'version', 'video', |
|
| 115 | - 'workExample', |
|
| 116 | - ]; |
|
| 95 | + /** |
|
| 96 | + * @var array |
|
| 97 | + * @see http://schema.org/{property_name} |
|
| 98 | + */ |
|
| 99 | + public $allowed = [ |
|
| 100 | + 'about', 'accessMode', 'accessModeSufficient', 'accessibilityAPI', 'accessibilityControl', |
|
| 101 | + 'accessibilityFeature', 'accessibilityHazard', 'accessibilitySummary', 'accountablePerson', |
|
| 102 | + 'aggregateRating', 'alternativeHeadline', 'associatedMedia', 'audience', 'audio', 'author', |
|
| 103 | + 'award', 'awards', 'character', 'citation', 'comment', 'commentCount', 'contentLocation', |
|
| 104 | + 'contentRating', 'contributor', 'copyrightHolder', 'copyrightYear', 'creator', |
|
| 105 | + 'dateCreated', 'dateModified', 'datePublished', 'discussionUrl', 'editor', |
|
| 106 | + 'educationalAlignment', 'educationalUse', 'encoding', 'encodingFormat', 'encodings', |
|
| 107 | + 'exampleOfWork', 'expires', 'fileFormat', 'funder', 'genre', 'hasPart', 'headline', |
|
| 108 | + 'inLanguage', 'interactionStatistic', 'interactivityType', 'isAccessibleForFree', |
|
| 109 | + 'isBasedOn', 'isBasedOnUrl', 'isFamilyFriendly', 'isPartOf', 'keywords', |
|
| 110 | + 'learningResourceType', 'license', 'locationCreated', 'mainEntity', 'material', 'mentions', |
|
| 111 | + 'offers', 'position', 'producer', 'provider', 'publication', 'publisher', |
|
| 112 | + 'publishingPrinciples', 'recordedAt', 'releasedEvent', 'review', 'reviews', 'schemaVersion', |
|
| 113 | + 'sourceOrganization', 'spatialCoverage', 'sponsor', 'temporalCoverage', 'text', |
|
| 114 | + 'thumbnailUrl', 'timeRequired', 'translator', 'typicalAgeRange', 'version', 'video', |
|
| 115 | + 'workExample', |
|
| 116 | + ]; |
|
| 117 | 117 | |
| 118 | - /** |
|
| 119 | - * @var array |
|
| 120 | - * @see http://schema.org/{property_name} |
|
| 121 | - */ |
|
| 122 | - public $parents = [ |
|
| 123 | - 'Thing', |
|
| 124 | - ]; |
|
| 118 | + /** |
|
| 119 | + * @var array |
|
| 120 | + * @see http://schema.org/{property_name} |
|
| 121 | + */ |
|
| 122 | + public $parents = [ |
|
| 123 | + 'Thing', |
|
| 124 | + ]; |
|
| 125 | 125 | } |
@@ -13,19 +13,19 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | class AggregateOffer extends BaseType |
| 15 | 15 | { |
| 16 | - /** |
|
| 17 | - * @var array |
|
| 18 | - * @see http://schema.org/{property_name} |
|
| 19 | - */ |
|
| 20 | - public $allowed = [ |
|
| 21 | - 'highPrice', 'lowPrice', 'offerCount', 'offers', |
|
| 22 | - ]; |
|
| 16 | + /** |
|
| 17 | + * @var array |
|
| 18 | + * @see http://schema.org/{property_name} |
|
| 19 | + */ |
|
| 20 | + public $allowed = [ |
|
| 21 | + 'highPrice', 'lowPrice', 'offerCount', 'offers', |
|
| 22 | + ]; |
|
| 23 | 23 | |
| 24 | - /** |
|
| 25 | - * @var array |
|
| 26 | - * @see http://schema.org/{property_name} |
|
| 27 | - */ |
|
| 28 | - public $parents = [ |
|
| 29 | - 'Offer', |
|
| 30 | - ]; |
|
| 24 | + /** |
|
| 25 | + * @var array |
|
| 26 | + * @see http://schema.org/{property_name} |
|
| 27 | + */ |
|
| 28 | + public $parents = [ |
|
| 29 | + 'Offer', |
|
| 30 | + ]; |
|
| 31 | 31 | } |
@@ -12,19 +12,19 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | class Rating extends BaseType |
| 14 | 14 | { |
| 15 | - /** |
|
| 16 | - * @var array |
|
| 17 | - * @see http://schema.org/{property_name} |
|
| 18 | - */ |
|
| 19 | - public $allowed = [ |
|
| 20 | - 'author', 'bestRating', 'ratingValue', 'worstRating', |
|
| 21 | - ]; |
|
| 15 | + /** |
|
| 16 | + * @var array |
|
| 17 | + * @see http://schema.org/{property_name} |
|
| 18 | + */ |
|
| 19 | + public $allowed = [ |
|
| 20 | + 'author', 'bestRating', 'ratingValue', 'worstRating', |
|
| 21 | + ]; |
|
| 22 | 22 | |
| 23 | - /** |
|
| 24 | - * @var array |
|
| 25 | - * @see http://schema.org/{property_name} |
|
| 26 | - */ |
|
| 27 | - public $parents = [ |
|
| 28 | - 'Intangible', |
|
| 29 | - ]; |
|
| 23 | + /** |
|
| 24 | + * @var array |
|
| 25 | + * @see http://schema.org/{property_name} |
|
| 26 | + */ |
|
| 27 | + public $parents = [ |
|
| 28 | + 'Intangible', |
|
| 29 | + ]; |
|
| 30 | 30 | } |
@@ -4,9 +4,9 @@ |
||
| 4 | 4 | |
| 5 | 5 | interface ShortcodeContract |
| 6 | 6 | { |
| 7 | - /** |
|
| 8 | - * @params string|array $atts |
|
| 9 | - * @return string |
|
| 10 | - */ |
|
| 11 | - public function buildShortcode($atts = []); |
|
| 7 | + /** |
|
| 8 | + * @params string|array $atts |
|
| 9 | + * @return string |
|
| 10 | + */ |
|
| 11 | + public function buildShortcode($atts = []); |
|
| 12 | 12 | } |
@@ -4,8 +4,8 @@ |
||
| 4 | 4 | |
| 5 | 5 | interface HooksContract |
| 6 | 6 | { |
| 7 | - /** |
|
| 8 | - * @return void |
|
| 9 | - */ |
|
| 10 | - public function run(); |
|
| 7 | + /** |
|
| 8 | + * @return void |
|
| 9 | + */ |
|
| 10 | + public function run(); |
|
| 11 | 11 | } |
@@ -6,8 +6,8 @@ |
||
| 6 | 6 | |
| 7 | 7 | interface ProviderContract |
| 8 | 8 | { |
| 9 | - /** |
|
| 10 | - * @return void |
|
| 11 | - */ |
|
| 12 | - public function register(Application $app); |
|
| 9 | + /** |
|
| 10 | + * @return void |
|
| 11 | + */ |
|
| 12 | + public function register(Application $app); |
|
| 13 | 13 | } |
@@ -6,83 +6,83 @@ |
||
| 6 | 6 | |
| 7 | 7 | class SiteReviewsSummaryBlock extends BlockGenerator |
| 8 | 8 | { |
| 9 | - /** |
|
| 10 | - * @return array |
|
| 11 | - */ |
|
| 12 | - public function attributes() |
|
| 13 | - { |
|
| 14 | - return [ |
|
| 15 | - 'assigned_to' => [ |
|
| 16 | - 'default' => '', |
|
| 17 | - 'type' => 'string', |
|
| 18 | - ], |
|
| 19 | - 'category' => [ |
|
| 20 | - 'default' => '', |
|
| 21 | - 'type' => 'string', |
|
| 22 | - ], |
|
| 23 | - 'className' => [ |
|
| 24 | - 'default' => '', |
|
| 25 | - 'type' => 'string', |
|
| 26 | - ], |
|
| 27 | - 'hide' => [ |
|
| 28 | - 'default' => '', |
|
| 29 | - 'type' => 'string', |
|
| 30 | - ], |
|
| 31 | - 'post_id' => [ |
|
| 32 | - 'default' => '', |
|
| 33 | - 'type' => 'string', |
|
| 34 | - ], |
|
| 35 | - 'rating' => [ |
|
| 36 | - 'default' => '1', |
|
| 37 | - 'type' => 'number', |
|
| 38 | - ], |
|
| 39 | - 'schema' => [ |
|
| 40 | - 'default' => false, |
|
| 41 | - 'type' => 'boolean', |
|
| 42 | - ], |
|
| 43 | - 'type' => [ |
|
| 44 | - 'default' => 'local', |
|
| 45 | - 'type' => 'string', |
|
| 46 | - ], |
|
| 47 | - ]; |
|
| 48 | - } |
|
| 9 | + /** |
|
| 10 | + * @return array |
|
| 11 | + */ |
|
| 12 | + public function attributes() |
|
| 13 | + { |
|
| 14 | + return [ |
|
| 15 | + 'assigned_to' => [ |
|
| 16 | + 'default' => '', |
|
| 17 | + 'type' => 'string', |
|
| 18 | + ], |
|
| 19 | + 'category' => [ |
|
| 20 | + 'default' => '', |
|
| 21 | + 'type' => 'string', |
|
| 22 | + ], |
|
| 23 | + 'className' => [ |
|
| 24 | + 'default' => '', |
|
| 25 | + 'type' => 'string', |
|
| 26 | + ], |
|
| 27 | + 'hide' => [ |
|
| 28 | + 'default' => '', |
|
| 29 | + 'type' => 'string', |
|
| 30 | + ], |
|
| 31 | + 'post_id' => [ |
|
| 32 | + 'default' => '', |
|
| 33 | + 'type' => 'string', |
|
| 34 | + ], |
|
| 35 | + 'rating' => [ |
|
| 36 | + 'default' => '1', |
|
| 37 | + 'type' => 'number', |
|
| 38 | + ], |
|
| 39 | + 'schema' => [ |
|
| 40 | + 'default' => false, |
|
| 41 | + 'type' => 'boolean', |
|
| 42 | + ], |
|
| 43 | + 'type' => [ |
|
| 44 | + 'default' => 'local', |
|
| 45 | + 'type' => 'string', |
|
| 46 | + ], |
|
| 47 | + ]; |
|
| 48 | + } |
|
| 49 | 49 | |
| 50 | - /** |
|
| 51 | - * @return string |
|
| 52 | - */ |
|
| 53 | - public function render(array $attributes) |
|
| 54 | - { |
|
| 55 | - $attributes['class'] = $attributes['className']; |
|
| 56 | - $shortcode = glsr(Shortcode::class); |
|
| 57 | - if ('edit' == filter_input(INPUT_GET, 'context')) { |
|
| 58 | - $attributes = $this->normalize($attributes); |
|
| 59 | - $this->filterShortcodeClass(); |
|
| 60 | - if (!$this->hasVisibleFields($shortcode, $attributes)) { |
|
| 61 | - $this->filterInterpolation(); |
|
| 62 | - } |
|
| 63 | - } |
|
| 64 | - return $shortcode->buildShortcode($attributes); |
|
| 65 | - } |
|
| 50 | + /** |
|
| 51 | + * @return string |
|
| 52 | + */ |
|
| 53 | + public function render(array $attributes) |
|
| 54 | + { |
|
| 55 | + $attributes['class'] = $attributes['className']; |
|
| 56 | + $shortcode = glsr(Shortcode::class); |
|
| 57 | + if ('edit' == filter_input(INPUT_GET, 'context')) { |
|
| 58 | + $attributes = $this->normalize($attributes); |
|
| 59 | + $this->filterShortcodeClass(); |
|
| 60 | + if (!$this->hasVisibleFields($shortcode, $attributes)) { |
|
| 61 | + $this->filterInterpolation(); |
|
| 62 | + } |
|
| 63 | + } |
|
| 64 | + return $shortcode->buildShortcode($attributes); |
|
| 65 | + } |
|
| 66 | 66 | |
| 67 | - /** |
|
| 68 | - * @return void |
|
| 69 | - */ |
|
| 70 | - protected function filterInterpolation() |
|
| 71 | - { |
|
| 72 | - add_filter('site-reviews/interpolate/reviews-summary', function ($context) { |
|
| 73 | - $context['class'] = 'glsr-default glsr-block-disabled'; |
|
| 74 | - $context['text'] = __('You have hidden all of the fields for this block.', 'site-reviews'); |
|
| 75 | - return $context; |
|
| 76 | - }); |
|
| 77 | - } |
|
| 67 | + /** |
|
| 68 | + * @return void |
|
| 69 | + */ |
|
| 70 | + protected function filterInterpolation() |
|
| 71 | + { |
|
| 72 | + add_filter('site-reviews/interpolate/reviews-summary', function ($context) { |
|
| 73 | + $context['class'] = 'glsr-default glsr-block-disabled'; |
|
| 74 | + $context['text'] = __('You have hidden all of the fields for this block.', 'site-reviews'); |
|
| 75 | + return $context; |
|
| 76 | + }); |
|
| 77 | + } |
|
| 78 | 78 | |
| 79 | - /** |
|
| 80 | - * @return void |
|
| 81 | - */ |
|
| 82 | - protected function filterShortcodeClass() |
|
| 83 | - { |
|
| 84 | - add_filter('site-reviews/style', function () { |
|
| 85 | - return 'default'; |
|
| 86 | - }); |
|
| 87 | - } |
|
| 79 | + /** |
|
| 80 | + * @return void |
|
| 81 | + */ |
|
| 82 | + protected function filterShortcodeClass() |
|
| 83 | + { |
|
| 84 | + add_filter('site-reviews/style', function () { |
|
| 85 | + return 'default'; |
|
| 86 | + }); |
|
| 87 | + } |
|
| 88 | 88 | } |