---
title: Filtrer le schéma automatique livre
url: "https://www.seopress.org/fr/support/hooks/filtrer-le-schema-automatique-livre/"
lang: fr-FR
updated: 2026-10-21
hook_name: seopress_schemas_auto_book_json, seopress_schemas_auto_book_html
required_version: 10.3
---

# Filtrer le schéma automatique livre

- **Hook name:** `seopress_schemas_auto_book_json, seopress_schemas_auto_book_html`
- **Required version:** 10.3

```php
<?php
// Filter the automatic Book schema (array, before encoding).
function sp_book_schema_json( $json ) {
	// $json is the Book schema as an array.
	$json['inLanguage'] = 'en-US';

	return $json;
}
add_filter( 'seopress_schemas_auto_book_json', 'sp_book_schema_json' );

// Filter the full <script type="application/ld+json"> markup.
function sp_book_schema_html( $html ) {
	// Return an empty string to print nothing.
	return $html;
}
add_filter( 'seopress_schemas_auto_book_html', 'sp_book_schema_html' );
```

Source: [https://gist.github.com/wp-seopress/5168a2c096bd4a8b94455fbd6e6bb79e](https://gist.github.com/wp-seopress/5168a2c096bd4a8b94455fbd6e6bb79e)


Le filtre JSON reçoit le schéma sous forme de tableau. Le filtre HTML reçoit l’élément script complet sous forme de chaîne.
