Title: wp_json_schema_allowed_keywords
Published: August 20, 2026

---

# apply_filters( ‘wp_json_schema_allowed_keywords’, string[] $allowed_keywords, string $schema_profile )

## In this article

 * [Description](https://developer.wordpress.org/reference/hooks/wp_json_schema_allowed_keywords/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/hooks/wp_json_schema_allowed_keywords/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/wp_json_schema_allowed_keywords/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/wp_json_schema_allowed_keywords/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/wp_json_schema_allowed_keywords/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/wp_json_schema_allowed_keywords/?output_format=md#wp--skip-link--target)

Filters the JSON Schema keywords allowed for a given schema profile.

## 󠀁[Description](https://developer.wordpress.org/reference/hooks/wp_json_schema_allowed_keywords/?output_format=md#description)󠁿

Use this to decide which keywords may be exposed to clients for a profile.
It does
not make WordPress validate or sanitize values against the keyword.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/wp_json_schema_allowed_keywords/?output_format=md#parameters)󠁿

 `$allowed_keywords`string[]

Allowed JSON Schema keywords.

`$schema_profile`string

The schema profile the keywords are for.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/wp_json_schema_allowed_keywords/?output_format=md#source)󠁿

    ```php
    return apply_filters( 'wp_json_schema_allowed_keywords', $allowed_keywords, $schema_profile );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/json-schema.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/json-schema.php#L68)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/json-schema.php#L68-L68)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/wp_json_schema_allowed_keywords/?output_format=md#related)󠁿

| Used by | Description | 
| [wp_get_json_schema_allowed_keywords()](https://developer.wordpress.org/reference/functions/wp_get_json_schema_allowed_keywords/)`wp-includes/json-schema.php` |

Gets the JSON Schema keywords allowed for a given schema profile.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/wp_json_schema_allowed_keywords/?output_format=md#changelog)󠁿

| Version | Description | 
| [7.1.0](https://developer.wordpress.org/reference/since/7.1.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fwp_json_schema_allowed_keywords%2F)
before being able to contribute a note or feedback.