Make WordPress Core


Ignore:
Timestamp:
09/15/2022 01:27:38 PM (2 years ago)
Author:
SergeyBiryukov
Message:

Docs: Clarify the $allowed_protocols default value in various KSES functions.

Add a note that the parameter is optional and defaults to the result of wp_allowed_protocols().

This affects:

  • wp_kses()
  • filter_block_content()
  • filter_block_kses()
  • filter_block_kses_value()

Includes synchronizing the $allowed_html parameter description for consistency.

Follow-up to [649], [6630], [18826], [32603], [43016], [46896], [48478].

Props armondal, SergeyBiryukov.
Fixes #56580.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/kses.php

    r54117 r54181  
    707707 *                                          or a context name such as 'post'. See wp_kses_allowed_html()
    708708 *                                          for the list of accepted context names.
    709  * @param string[]       $allowed_protocols Array of allowed URL protocols.
     709 * @param string[]       $allowed_protocols Optional. Array of allowed URL protocols.
     710 *                                          Defaults to the result of wp_allowed_protocols().
    710711 * @return string Filtered content containing only the allowed HTML.
    711712 */
Note: See TracChangeset for help on using the changeset viewer.