Filters the post's schema. The dynamic portion of the filter, `$this->post_type`, refers to the post type slug for the controller. Possible hook names include: - `rest_post_item_schema` - `rest_page_item_schema` - `rest_attachment_item_schema`
$schema
Sortie :
@param array $schema Item schema data.
// Modifier la valeur avec le filtre 'rest_{$this->post_type}_item_schema'
add_filter('rest_{$this->post_type}_item_schema', 'ma_fonction_filtre', 10, 1);
function ma_fonction_filtre($schema) {
// Modifier la valeur
return $schema;
}
Chargement des actualités...