1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace GeminiLabs\SiteReviews\Integrations\SEOPress; |
4
|
|
|
|
5
|
|
|
use GeminiLabs\SiteReviews\Integrations\IntegrationHooks; |
6
|
|
|
|
7
|
|
|
class Hooks extends IntegrationHooks |
8
|
|
|
{ |
9
|
|
|
public function run(): void |
10
|
|
|
{ |
11
|
|
|
if (!$this->isEnabled()) { |
12
|
|
|
return; |
13
|
|
|
} |
14
|
|
|
$this->hook(Controller::class, [ |
15
|
|
|
['filterSchema', 'seopress_schemas_auto_course_json'], |
16
|
|
|
['filterSchema', 'seopress_schemas_auto_event_json'], |
17
|
|
|
['filterSchema', 'seopress_schemas_auto_faq_json'], |
18
|
|
|
['filterSchema', 'seopress_schemas_auto_job_json'], |
19
|
|
|
['filterSchema', 'seopress_schemas_auto_lb_json'], |
20
|
|
|
['filterSchema', 'seopress_schemas_auto_product_json'], |
21
|
|
|
['filterSchema', 'seopress_schemas_auto_recipe_json'], |
22
|
|
|
['filterSchema', 'seopress_schemas_auto_service_json'], |
23
|
|
|
['filterSchema', 'seopress_schemas_auto_softwareapp_json'], |
24
|
|
|
['filterSchema', 'seopress_schemas_auto_video_json'], |
25
|
|
|
['filterSchemas', 'seopress_json_schema_generator_get_jsons'], |
26
|
|
|
]); |
27
|
|
|
} |
28
|
|
|
|
29
|
|
|
protected function isEnabled(): bool |
30
|
|
|
{ |
31
|
|
|
return 'seopress' === $this->option('schema.integration.plugin'); |
32
|
|
|
} |
33
|
|
|
} |
34
|
|
|
|