Changeset 30333 for trunk/src/wp-admin/user-edit.php
- Timestamp:
- 11/13/2014 03:20:42 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/user-edit.php
r30033 r30333 25 25 26 26 wp_enqueue_script('user-profile'); 27 28 wp_localize_script( 29 'user-profile', 30 '_wpSessionMangager', 31 array( 32 'user_id' => $user_id, 33 'nonce' => wp_create_nonce( sprintf( 'destroy_sessions_%d', $user_id ) ), 34 ) 35 ); 27 36 28 37 $title = IS_PROFILE_PAGE ? __('Profile') : __('Edit User'); … … 187 196 if ( !current_user_can('edit_user', $user_id) ) 188 197 wp_die(__('You do not have permission to edit this user.')); 198 199 $sessions = WP_Session_Tokens::get_instance( $profileuser->ID ); 189 200 190 201 include(ABSPATH . 'wp-admin/admin-header.php'); … … 290 301 do_action( 'personal_options', $profileuser ); 291 302 ?> 303 292 304 </table> 293 305 <?php … … 475 487 </tr> 476 488 <?php endif; ?> 489 490 <?php if ( IS_PROFILE_PAGE && ( count( $sessions->get_all() ) > 1 ) ) { ?> 491 <tr> 492 <th> </th> 493 <td> 494 <p><button class="button button-secondary hide-if-no-js" id="destroy-sessions" data-token="<?php echo esc_attr( wp_get_session_token() ); ?>"><?php _e( 'Log Out of All Other Sessions' ); ?></button></p> 495 <p class="description hide-if-no-js"> 496 <?php _e( 'Left your account logged in at a public computer? Lost your phone? This will log you out everywhere except your current browser.' ); ?> 497 </p> 498 </td> 499 </tr> 500 <?php } else if ( ! IS_PROFILE_PAGE && ( count( $sessions->get_all() ) > 0 ) ) { ?> 501 <tr> 502 <th> </th> 503 <td> 504 <p><button class="button button-secondary hide-if-no-js" id="destroy-sessions"><?php _e( 'Log Out of All Sessions' ); ?></button></p> 505 <p class="description hide-if-no-js"> 506 <?php printf( __( 'Log %s out of all sessions' ), $profileuser->display_name ); ?> 507 </p> 508 </td> 509 </tr> 510 <?php } ?> 511 477 512 </table> 478 513
Note: See TracChangeset
for help on using the changeset viewer.