| 1 |
<?php |
| 2 |
/* |
| 3 |
* License: GPLv3 |
| 4 |
* License URI: https://www.gnu.org/licenses/gpl.txt |
| 5 |
* Copyright 2016-2026 Jean-Sebastien Morisset (https://wpsso.com/) |
| 6 |
*/ |
| 7 |
|
| 8 |
if ( ! defined( 'ABSPATH' ) ) { |
| 9 |
|
| 10 |
die( 'These aren\'t the droids you\'re looking for.' ); |
| 11 |
} |
| 12 |
|
| 13 |
if ( ! class_exists( 'WpssoJsonTypeFoodEstablishment' ) ) { |
| 14 |
|
| 15 |
class WpssoJsonTypeFoodEstablishment { |
| 16 |
|
| 17 |
private $p; // Wpsso class object. |
| 18 |
|
| 19 |
/* |
| 20 |
* Instantiated by Wpsso->init_json_filters(). |
| 21 |
*/ |
| 22 |
public function __construct( &$plugin ) { |
| 23 |
|
| 24 |
$this->p =& $plugin; |
| 25 |
|
| 26 |
if ( $this->p->debug->enabled ) { |
| 27 |
|
| 28 |
$this->p->debug->mark(); |
| 29 |
} |
| 30 |
|
| 31 |
$this->p->util->add_plugin_filters( $this, array( |
| 32 |
'json_data_https_schema_org_foodestablishment' => 5, |
| 33 |
) ); |
| 34 |
} |
| 35 |
|
| 36 |
public function filter_json_data_https_schema_org_foodestablishment( $json_data, $mod, $mt_og, $page_type_id, $is_main ) { |
| 37 |
|
| 38 |
if ( $this->p->debug->enabled ) { |
| 39 |
|
| 40 |
$this->p->debug->log( 'exiting early: markup added by WpssoSchemaSingle->add_place_data()' ); |
| 41 |
} |
| 42 |
|
| 43 |
return $json_data; |
| 44 |
} |
| 45 |
} |
| 46 |
} |
| 47 |
|