init_json_filters(). */ public function __construct( &$plugin ) { $this->p =& $plugin; if ( $this->p->debug->enabled ) { $this->p->debug->mark(); } $this->p->util->add_plugin_filters( $this, array( 'json_data_https_schema_org_book' => 5, ) ); } public function filter_json_data_https_schema_org_book( $json_data, $mod, $mt_og, $page_type_id, $is_main ) { if ( $this->p->debug->enabled ) { $this->p->debug->mark(); $this->p->debug->log( 'calling WpssoSchemaSingle::add_book_data() with empty json_ret array' ); } $json_ret = array(); WpssoSchemaSingle::add_book_data( $json_ret, $mod, $book_id = null, $page_type_id, $list_el = false ); if ( $this->p->debug->enabled ) { $this->p->debug->log( 'merging json_data and json_ret arrays' ); } return WpssoSchema::return_data_from_filter( $json_data, $json_ret, $is_main ); } } }