Changeset 30888 for trunk/src/wp-admin/user-edit.php
- Timestamp:
- 12/16/2014 09:15:01 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/user-edit.php
r30855 r30888 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 );36 27 37 28 $title = IS_PROFILE_PAGE ? __('Profile') : __('Edit User'); … … 494 485 <?php endif; ?> 495 486 496 <?php if ( IS_PROFILE_PAGE && ( count( $sessions->get_all() ) > 1 ) ) { ?> 487 <?php 488 if ( IS_PROFILE_PAGE && count( $sessions->get_all() ) === 1 ) : ?> 497 489 <tr class="user-sessions-wrap hide-if-no-js"> 498 490 <th> </th> 499 491 <td aria-live="assertive"> 500 <div class="destroy-sessions"><button class="button button-secondary" id="destroy-sessions" data-token="<?php echo esc_attr( wp_get_session_token() ); ?>"><?php _e( 'Log Out of All Other Sessions' ); ?></button></div> 492 <div class="destroy-sessions"><button disabled class="button button-secondary"><?php _e( 'Log Out of All Other Sessions' ); ?></button></div> 493 <p class="description"> 494 <?php _e( 'You are only logged in at this location.' ); ?> 495 </p> 496 </td> 497 </tr> 498 <?php elseif ( IS_PROFILE_PAGE && count( $sessions->get_all() ) > 1 ) : ?> 499 <tr class="user-sessions-wrap hide-if-no-js"> 500 <th> </th> 501 <td aria-live="assertive"> 502 <div class="destroy-sessions"><button class="button button-secondary" id="destroy-sessions"><?php _e( 'Log Out of All Other Sessions' ); ?></button></div> 501 503 <p class="description"> 502 504 <?php _e( 'Left your account logged in at a public computer? Lost your phone? This will log you out everywhere except your current browser.' ); ?> … … 504 506 </td> 505 507 </tr> 506 <?php } else if ( ! IS_PROFILE_PAGE && ( count( $sessions->get_all() ) > 0 ) ) {?>508 <?php elseif ( ! IS_PROFILE_PAGE && $sessions->get_all() ) : ?> 507 509 <tr class="user-sessions-wrap hide-if-no-js"> 508 510 <th> </th> … … 517 519 </td> 518 520 </tr> 519 <?php }?>521 <?php endif; ?> 520 522 521 523 </table>
Note: See TracChangeset
for help on using the changeset viewer.