wppaste
WordPress

apply_filters( 'wp_json_schema_allowed_keywords', string[] $allowed_keywords, string $schema_profile )

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

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.

Compatibility

WordPress
since 7.1.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in 1 of the 5 tracked releases, added in 7.1.0.

Parameters

$allowed_keywordsstring[]
Allowed JSON Schema keywords.
$schema_profilestring
The schema profile the keywords are for.

Where this hook fires · 1

  • wp-includes/json-schema.php:68wp_get_json_schema_allowed_keywords()

Source code

	 *	 * @since 7.1.0	 *	 * @param string[] $allowed_keywords Allowed JSON Schema keywords.	 * @param string   $schema_profile   The schema profile the keywords are for.	 */	return apply_filters( 'wp_json_schema_allowed_keywords', $allowed_keywords, $schema_profile );} /** * Prepares a JSON Schema for clients. * * Use this before exposing a schema outside of WordPress's server-side

Changelog

Introduced in 7.1.0.

Signature, return type and hooks compared across 1 parsed release.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.