Changeset 13819 for branches/12.0/src/bp-core/bp-core-template.php
- Timestamp:
- 04/28/2024 12:35:08 PM (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/12.0/src/bp-core/bp-core-template.php
r13693 r13819 92 92 $list_type = bp_is_group() ? 'groups' : 'personal'; 93 93 94 /** 95 * Filters the "options nav", the secondary-level single item navigation menu. 96 * 97 * This is a dynamic filter that is dependent on the provided css_id value. 98 * 99 * @since 1.1.0 100 * 101 * @param string $value HTML list item for the submenu item. 102 * @param array $subnav_item Submenu array item being displayed. 103 * @param string $selected_item Current action. 104 */ 105 echo apply_filters( 'bp_get_options_nav_' . $subnav_item->css_id, '<li id="' . esc_attr( $subnav_item->css_id . '-' . $list_type . '-li' ) . '" ' . $selected . '><a id="' . esc_attr( $subnav_item->css_id ) . '" href="' . esc_url( $subnav_item->link ) . '">' . $subnav_item->name . '</a></li>', $subnav_item, $selected_item ); 94 // phpcs:ignore WordPress.Security.EscapeOutput 95 echo apply_filters( 96 /** 97 * Filters the "options nav", the secondary-level single item navigation menu. 98 * 99 * This is a dynamic filter that is dependent on the provided css_id value. 100 * 101 * @since 1.1.0 102 * 103 * @param string $value HTML list item for the submenu item. 104 * @param array $subnav_item Submenu array item being displayed. 105 * @param string $selected_item Current action. 106 */ 107 'bp_get_options_nav_' . $subnav_item->css_id, 108 '<li id="' . esc_attr( $subnav_item->css_id . '-' . $list_type . '-li' ) . '" ' . $selected . '><a id="' . esc_attr( $subnav_item->css_id ) . '" href="' . esc_url( $subnav_item->link ) . '">' . wp_kses( $subnav_item->name, array( 'span' => array( 'class' => true ) ) ) . '</a></li>', 109 $subnav_item, 110 $selected_item 111 ); 106 112 } 107 113 } … … 150 156 */ 151 157 function bp_avatar_admin_step() { 152 echo bp_get_avatar_admin_step();158 echo esc_html( bp_get_avatar_admin_step() ); 153 159 } 154 160 /** … … 182 188 */ 183 189 function bp_avatar_to_crop() { 184 echo bp_get_avatar_to_crop();190 echo esc_url( bp_get_avatar_to_crop() ); 185 191 } 186 192 /** … … 213 219 */ 214 220 function bp_avatar_to_crop_src() { 215 echo bp_get_avatar_to_crop_src();221 echo esc_attr( bp_get_avatar_to_crop_src() ); 216 222 } 217 223 /** … … 244 250 */ 245 251 function bp_site_name() { 246 echo bp_get_site_name();252 echo esc_html( bp_get_site_name() ); 247 253 } 248 254 /** … … 381 387 * @param string $youtext Context-determined string to display. 382 388 */ 383 echo apply_filters( 'bp_word_or_name', $youtext);389 echo esc_html( apply_filters( 'bp_word_or_name', $youtext ) ); 384 390 } else { 385 391 … … 394 400 395 401 /** This filter is documented in bp-core/bp-core-template.php */ 396 echo apply_filters( 'bp_word_or_name', $nametext);402 echo esc_html( apply_filters( 'bp_word_or_name', $nametext ) ); 397 403 } else { 398 404 … … 558 564 */ 559 565 function bp_search_default_text( $component = '' ) { 560 echo bp_get_search_default_text( $component);566 echo esc_attr( bp_get_search_default_text( $component ) ); 561 567 } 562 568 /** … … 614 620 */ 615 621 function bp_form_field_attributes( $name = '', $attributes = array() ) { 622 // phpcs:ignore WordPress.Security.EscapeOutput 616 623 echo bp_get_form_field_attributes( $name, $attributes ); 617 624 } … … 696 703 */ 697 704 function bp_button( $args = '' ) { 705 // Escaping is done in `BP_Core_HTML_Element()`. 706 // phpcs:ignore WordPress.Security.EscapeOutput 698 707 echo bp_get_button( $args ); 699 708 } … … 970 979 */ 971 980 function bp_total_member_count() { 972 echo bp_get_total_member_count();981 echo esc_html( bp_get_total_member_count() ); 973 982 } 974 983 /** … … 1325 1334 */ 1326 1335 function bp_root_slug( $component = '' ) { 1327 echo bp_get_root_slug( $component);1336 echo esc_url( bp_get_root_slug( $component ) ); 1328 1337 } 1329 1338 /** … … 1455 1464 */ 1456 1465 function bp_search_slug() { 1457 echo bp_get_search_slug();1466 echo esc_url( bp_get_search_slug() ); 1458 1467 } 1459 1468 /** … … 3141 3150 */ 3142 3151 function bp_the_body_class() { 3143 echo bp_get_the_body_class();3152 echo implode( ' ', array_map( 'sanitize_html_class', bp_get_the_body_class() ) ); 3144 3153 } 3145 3154 /** … … 3703 3712 3704 3713 if ( ! empty( $args->echo ) ) { 3714 // phpcs:ignore WordPress.Security.EscapeOutput 3705 3715 echo $nav_menu; 3706 3716 } else { … … 3717 3727 */ 3718 3728 function bp_email_the_salutation( $settings = array() ) { 3719 echo bp_email_get_salutation( $settings);3729 echo esc_html( bp_email_get_salutation( $settings ) ); 3720 3730 } 3721 3731
Note: See TracChangeset
for help on using the changeset viewer.