Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/28/2024 10:08:00 PM (2 years ago)
Author:
imath
Message:

BP Nouveau: improve PHP code standards using WPCS

See #7228 (trunk)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/includes/messages/template-tags.php

    r13200 r13820  
    109109 */
    110110function bp_nouveau_message_search_form() {
    111         $search_form_html = bp_buffer_template_part( 'common/js-templates/messages/search-form', null, false );
    112 
    113111        /**
    114112         * Filters the private message component search form.
    … …  
    118116         * @param string $search_form_html HTML markup for the message search form.
    119117         */
    120         echo apply_filters( 'bp_message_search_form', $search_form_html );
     118        $search_form_html = apply_filters(
     119                'bp_message_search_form',
     120                bp_buffer_template_part( 'common/js-templates/messages/search-form', null, false )
     121        );
     122
     123        echo wp_kses(
     124                $search_form_html,
     125                array(
     126                        'form'   => array(
     127                                'action'         => true,
     128                                'method'         => true,
     129                                'id'             => true,
     130                                'class'          => true,
     131                                'data-bp-search' => true,
     132                        ),
     133                        'label'  => array(
     134                                'for'   => true,
     135                                'class' => true,
     136                        ),
     137                        'input'  => array(
     138                                'type'        => true,
     139                                'id'          => true,
     140                                'name'        => true,
     141                                'placeholder' => true,
     142                                'class'       => true,
     143                        ),
     144                        'button' => array(
     145                                'type'  => true,
     146                                'name'  => true,
     147                                'id'    => true,
     148                                'class' => true,
     149                        ),
     150                        'span'   => array(
     151                                'class'       => true,
     152                                'aria-hidden' => true,
     153                        ),
     154                )
     155        );
    121156}
Note: See TracChangeset for help on using the changeset viewer.