Changeset 13906
- Timestamp:
- 06/06/2024 01:57:37 AM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/admin/bp-core-admin-components.php
r13881 r13906 55 55 * @since 1.5.0 56 56 * 57 * @param mixed $ valueActive components.57 * @param mixed $active_components Active components. 58 58 */ 59 59 $active_components = apply_filters( 'bp_active_components', bp_get_option( 'bp-active-components' ) ); … … 184 184 ), 185 185 ); 186 187 $component_anchor_url = function ( $component_action, $component_view ) use ( $page, $action ) { 188 $component_url = add_query_arg( 189 array( 190 'page' => 'bp-components', 191 'action' => $component_action, 192 ), 193 bp_get_admin_url( $page ) 194 ); 195 196 $css = $component_action === $action ? 'class="current"' : ''; 197 198 return sprintf( 199 '<a href="%s" %s>%s</a>', 200 esc_url( $component_url ), 201 $css, 202 wp_kses( $component_view, array( 'span' => array( 'class' => true ) ) ) 203 ); 204 } 186 205 ?> 187 206 188 207 <h3 class="screen-reader-text"> 189 <?php 190 /* translators: accessibility text */ 191 esc_html_e( 'Filter components list', 'buddypress' ); 192 ?> 208 <?php esc_html_e( 'Filter components list', 'buddypress' ); ?> 193 209 </h3> 194 210 … … 196 212 <?php foreach ( $component_views as $component_view ) : ?> 197 213 <li> 198 <a href=" 199 <?php 200 echo esc_url( 201 add_query_arg( 202 array( 203 'page' => 'bp-components', 204 'action' => $component_view['action'], 205 ), 206 bp_get_admin_url( $page ) 207 ) 208 ); 209 ?> 210 " 211 <?php 212 if ( $action === $component_view['action'] ) : 213 ?> 214 class="current"<?php endif; ?>> 215 <?php echo wp_kses( $component_view['view'], array( 'span' => array( 'class' => true ) ) ); ?> 216 </a><?php echo 'retired' !== $component_view['action'] ? ' |' : ''; ?> 214 <?php echo $component_anchor_url( $component_view['action'], $component_view['view'] ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> 215 <?php echo 'retired' !== $component_view['action'] ? ' |' : ''; ?> 217 216 </li> 218 217 <?php endforeach; ?> … … 220 219 221 220 <h3 class="screen-reader-text"> 222 <?php 223 /* translators: accessibility text */ 224 esc_html_e( 'Components list', 'buddypress' ); 225 ?> 221 <?php esc_html_e( 'Components list', 'buddypress' ); ?> 226 222 </h3> 227 223 … … 263 259 <input 264 260 type="checkbox" 265 id="<?php echo esc_attr( "bp_components[ $name]" ); ?>"266 name="<?php echo esc_attr( "bp_components[ $name]" ); ?>"261 id="<?php echo esc_attr( "bp_components[$name]" ); ?>" 262 name="<?php echo esc_attr( "bp_components[$name]" ); ?>" 267 263 value="1"<?php checked( isset( $active_components[ esc_attr( $name ) ] ) ); ?> 268 264 /> 269 <label for="<?php echo esc_attr( "bp_components[ $name]" ); ?>" class="screen-reader-text">265 <label for="<?php echo esc_attr( "bp_components[$name]" ); ?>" class="screen-reader-text"> 270 266 <?php 271 267 /* translators: accessibility text */ … … 278 274 </th> 279 275 <td class="plugin-title column-primary"> 280 <label for="<?php echo esc_attr( "bp_components[ $name]" ); ?>">276 <label for="<?php echo esc_attr( "bp_components[$name]" ); ?>"> 281 277 <span aria-hidden="true"></span> 282 278 <strong><?php echo esc_html( $labels['title'] ); ?></strong>
Note: See TracChangeset
for help on using the changeset viewer.