Homepage
Link to WPGraphQL on Github
Link to WPGraphQL on WordPress.org

graphql_html_entity_decoding_enabled

Given a string, and optional context, this decodes html entities if html_entity_decode is enabled

Params

  • $enabled (string): Whether html_entity_decode should be applied to the string passed through the \WPGraphQL\Utils::html_entity_decode method.
  • $string (string): The string being passed through for possible decoding
  • $field_name (string): The field name being passed through for posible decoding
  • $model (\WPGraphQL\Model\Model): The Model that is being affected

Examples

Below are some examples showing how to use the graphql_html_entity_decoding_enabled filter.

Disable html_entity_decoding for all fields

This disables decoding for all fields it’s applied to:

Enable html_entity_decoding for all fields

This enables decoding for all fields it’s applied to:

Enable html_entity_decoding for a specific field