Improvements to [30333]:

* Move `.hide-if-no-js` class to table row
* Add a wrapper class
* Add missing translators comment

see #30264.

git-svn-id: https://develop.svn.wordpress.org/trunk@30334 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2014-11-13 15:53:52 +00:00
parent d93bad3cd3
commit 8422a51b98
2 changed files with 11 additions and 9 deletions

View File

@ -124,7 +124,7 @@
});
});
$('#destroy-sessions').on('click',function(e){
$( '#destroy-sessions' ).on( 'click', function( e ) {
var $this = $(this);
var data = {
@ -146,7 +146,6 @@
}, 'json' );
e.preventDefault();
});
})(jQuery);

View File

@ -488,22 +488,25 @@ if ( $show_password_fields ) :
<?php endif; ?>
<?php if ( IS_PROFILE_PAGE && ( count( $sessions->get_all() ) > 1 ) ) { ?>
<tr>
<tr class="user-sessions-wrap hide-if-no-js">
<th>&nbsp;</th>
<td>
<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>
<p class="description hide-if-no-js">
<p><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></p>
<p class="description">
<?php _e( 'Left your account logged in at a public computer? Lost your phone? This will log you out everywhere except your current browser.' ); ?>
</p>
</td>
</tr>
<?php } else if ( ! IS_PROFILE_PAGE && ( count( $sessions->get_all() ) > 0 ) ) { ?>
<tr>
<tr class="user-sessions-wrap hide-if-no-js">
<th>&nbsp;</th>
<td>
<p><button class="button button-secondary hide-if-no-js" id="destroy-sessions"><?php _e( 'Log Out of All Sessions' ); ?></button></p>
<p class="description hide-if-no-js">
<?php printf( __( 'Log %s out of all sessions' ), $profileuser->display_name ); ?>
<p><button class="button button-secondary" id="destroy-sessions"><?php _e( 'Log Out of All Sessions' ); ?></button></p>
<p class="description">
<?php
/* translators: 1: User's display name. */
printf( __( 'Log %s out of all sessions' ), $profileuser->display_name );
?>
</p>
</td>
</tr>