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:
parent
d93bad3cd3
commit
8422a51b98
|
@ -124,7 +124,7 @@
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#destroy-sessions').on('click',function(e){
|
$( '#destroy-sessions' ).on( 'click', function( e ) {
|
||||||
|
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
var data = {
|
var data = {
|
||||||
|
@ -146,7 +146,6 @@
|
||||||
}, 'json' );
|
}, 'json' );
|
||||||
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
|
|
@ -488,22 +488,25 @@ if ( $show_password_fields ) :
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if ( IS_PROFILE_PAGE && ( count( $sessions->get_all() ) > 1 ) ) { ?>
|
<?php if ( IS_PROFILE_PAGE && ( count( $sessions->get_all() ) > 1 ) ) { ?>
|
||||||
<tr>
|
<tr class="user-sessions-wrap hide-if-no-js">
|
||||||
<th> </th>
|
<th> </th>
|
||||||
<td>
|
<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><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 hide-if-no-js">
|
<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.' ); ?>
|
<?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>
|
</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } else if ( ! IS_PROFILE_PAGE && ( count( $sessions->get_all() ) > 0 ) ) { ?>
|
<?php } else if ( ! IS_PROFILE_PAGE && ( count( $sessions->get_all() ) > 0 ) ) { ?>
|
||||||
<tr>
|
<tr class="user-sessions-wrap hide-if-no-js">
|
||||||
<th> </th>
|
<th> </th>
|
||||||
<td>
|
<td>
|
||||||
<p><button class="button button-secondary hide-if-no-js" id="destroy-sessions"><?php _e( 'Log Out of All Sessions' ); ?></button></p>
|
<p><button class="button button-secondary" id="destroy-sessions"><?php _e( 'Log Out of All Sessions' ); ?></button></p>
|
||||||
<p class="description hide-if-no-js">
|
<p class="description">
|
||||||
<?php printf( __( 'Log %s out of all sessions' ), $profileuser->display_name ); ?>
|
<?php
|
||||||
|
/* translators: 1: User's display name. */
|
||||||
|
printf( __( 'Log %s out of all sessions' ), $profileuser->display_name );
|
||||||
|
?>
|
||||||
</p>
|
</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
Loading…
Reference in New Issue