- Timestamp:
- 04/23/2024 09:39:11 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-members/classes/class-bp-members-list-table.php
r13499 r13799 216 216 } 217 217 218 /* translators: %s: url to site settings */ 219 printf( __( 'Registration is disabled. %s', 'buddypress' ), $link ); 218 printf( 219 /* translators: %s: url to site settings */ 220 esc_html__( 'Registration is disabled. %s', 'buddypress' ), 221 // The link has been escaped at line 213 & 215. 222 // phpcs:ignore WordPress.Security.EscapeOutput 223 $link 224 ); 220 225 } 221 226 … … 249 254 } 250 255 251 $style = ( ' class="alternate"' == $style ) ? '' : ' class="alternate"'; 256 $style = 'alt' === $style ? '' : 'alt'; 257 258 // Escapes are made into `self::single_row()`. 259 // phpcs:ignore WordPress.Security.EscapeOutput 252 260 echo "\n\t" . $this->single_row( $signup_object, $style ); 253 261 } … … 268 276 */ 269 277 public function single_row( $signup_object = null, $style = '', $role = '', $numposts = 0 ) { 270 echo '<tr' . $style . ' id="signup-' . esc_attr( $signup_object->id ) . '">'; 278 if ( '' === $style ) { 279 echo '<tr id="signup-' . esc_attr( $signup_object->id ) . '">'; 280 } else { 281 echo '<tr class="alternate" id="signup-' . esc_attr( $signup_object->id ) . '">'; 282 } 283 284 // BuddyPress relies on WordPress's `WP_Users_List_Table::single_row_columns()`. 285 // phpcs:ignore WordPress.Security.EscapeOutput 271 286 echo $this->single_row_columns( $signup_object ); 272 287 echo '</tr>'; … … 282 297 public function column_cb( $signup_object = null ) { 283 298 ?> 284 <label class="screen-reader-text" for="signup_<?php echo intval( $signup_object->id ); ?>"><?php 285 /* translators: accessibility text */ 286 printf( esc_html__( 'Select user: %s', 'buddypress' ), $signup_object->user_login ); 287 ?></label> 299 <label class="screen-reader-text" for="signup_<?php echo intval( $signup_object->id ); ?>"> 300 <?php 301 printf( 302 /* translators: accessibility text */ 303 esc_html__( 'Select user: %s', 'buddypress' ), 304 esc_html( $signup_object->user_login ) 305 ); 306 ?> 307 </label> 288 308 <input type="checkbox" id="signup_<?php echo intval( $signup_object->id ) ?>" name="allsignups[]" value="<?php echo esc_attr( $signup_object->id ) ?>" /> 289 309 <?php … … 330 350 ); 331 351 332 echo $avatar . sprintf( '<strong><a href="%1$s" class="edit">%2$s</a></strong><br/>', esc_url( $activate_link ), $signup_object->user_login ); 352 echo wp_kses( 353 $avatar, 354 array( 355 'img' => array( 356 'alt' => true, 357 'src' => true, 358 'srcset' => true, 359 'class' => true, 360 'height' => true, 361 'width' => true, 362 ) 363 ) 364 ); 365 printf( '<strong><a href="%1$s" class="edit">%2$s</a></strong><br/>', esc_url( $activate_link ), esc_html( $signup_object->user_login ) ); 333 366 334 367 $actions = array(); 335 368 336 $actions['activate'] = sprintf( '<a href="%1$s">%2$s</a>', esc_url( $activate_link ), __( 'Activate', 'buddypress' ) );337 $actions['resend'] = sprintf( '<a href="%1$s">%2$s</a>', esc_url( $email_link ), __( 'Email', 'buddypress' ) );369 $actions['activate'] = sprintf( '<a href="%1$s">%2$s</a>', esc_url( $activate_link ), esc_html__( 'Activate', 'buddypress' ) ); 370 $actions['resend'] = sprintf( '<a href="%1$s">%2$s</a>', esc_url( $email_link ), esc_html__( 'Email', 'buddypress' ) ); 338 371 339 372 if ( current_user_can( 'delete_users' ) ) { 340 $actions['delete'] = sprintf( '<a href="%1$s" class="delete">%2$s</a>', esc_url( $delete_link ), __( 'Delete', 'buddypress' ) );373 $actions['delete'] = sprintf( '<a href="%1$s" class="delete">%2$s</a>', esc_url( $delete_link ), esc_html__( 'Delete', 'buddypress' ) ); 341 374 } 342 375 … … 351 384 $actions = apply_filters( 'bp_members_ms_signup_row_actions', $actions, $signup_object ); 352 385 386 // BuddyPress relies on WordPress's `WP_Users_List_Table::row_actions()`. 387 // phpcs:ignore WordPress.Security.EscapeOutput 353 388 echo $this->row_actions( $actions ); 354 389 } … … 407 442 */ 408 443 public function column_registered( $signup_object = null ) { 409 echo mysql2date( 'Y/m/d g:i:s a', $signup_object->registered);444 echo esc_html( mysql2date( 'Y/m/d g:i:s a', $signup_object->registered ) ); 410 445 } 411 446 … … 419 454 public function column_date_sent( $signup_object = null ) { 420 455 if ( $signup_object->count_sent > 0 ) { 421 echo mysql2date( 'Y/m/d g:i:s a', $signup_object->date_sent);456 echo esc_html( mysql2date( 'Y/m/d g:i:s a', $signup_object->date_sent ) ); 422 457 } else { 423 $message = __( 'Not yet notified', 'buddypress' );458 $message = esc_html__( 'Not yet notified', 'buddypress' ); 424 459 425 460 /**
Note: See TracChangeset
for help on using the changeset viewer.