[wp-trac] [WordPress Trac] #40575: Typo in wp_kses_allowed_html()

WordPress Trac noreply at wordpress.org
Wed Apr 26 14:48:55 UTC 2017


#40575: Typo in wp_kses_allowed_html()
--------------------------+--------------------
 Reporter:  henry.wright  |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.8
Component:  Formatting    |     Version:  4.7.4
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+--------------------

Comment (by henry.wright):

 @SergeyBiryukov agreed. If the argument passed to
 {{{wp_kses_allowed_html()}}} is an array, the filter in question will run
 and {{{$context}}} will be that passed array. It's worth making it clear
 in the inline docs for the filter that the array won't actually be
 "context" data, instead it'll be "allowed tags" data.

 Of course, in the wild, what is passed to {{{wp_kses_allowed_html()}}} can
 be anything, but I'm basing the above on what the function is intended to
 accept (described in the function signature and inline docs):

 {{{
  * @param string $context The context for which to retrieve tags.
  *                        Allowed values are post, strip, data,entities,
 or
  *                        the name of a field filter such as
 pre_user_description.
  * @return array List of allowed tags and their allowed attributes.
  */
 function wp_kses_allowed_html( $context = '' ) {
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40575#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list