Skip to content

Commit f1a3189

Browse files
committed
Cleanup additional capabilities display in user-edit.php. Mark a string for translation.
Props johnjamesjacoby, SergeyBiryukov fixes #14267 git-svn-id: https://develop.svn.wordpress.org/trunk@23737 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 9e7cac8 commit f1a3189

1 file changed

Lines changed: 21 additions & 19 deletions

File tree

wp-admin/user-edit.php

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -393,25 +393,27 @@ function use_ssl_preference($user) {
393393
do_action( 'edit_user_profile', $profileuser );
394394
?>
395395

396-
<?php if ( count($profileuser->caps) > count($profileuser->roles) && apply_filters('additional_capabilities_display', true, $profileuser) ) { ?>
397-
<br class="clear" />
398-
<table width="99%" style="border: none;" cellspacing="2" cellpadding="3" class="editform">
399-
<tr>
400-
<th scope="row"><?php _e('Additional Capabilities') ?></th>
401-
<td><?php
402-
$output = '';
403-
foreach ( $profileuser->caps as $cap => $value ) {
404-
if ( !$wp_roles->is_role($cap) ) {
405-
if ( $output != '' )
406-
$output .= ', ';
407-
$output .= $value ? $cap : "Denied: {$cap}";
408-
}
409-
}
410-
echo $output;
411-
?></td>
412-
</tr>
413-
</table>
414-
<?php } ?>
396+
<?php if ( count( $profileuser->caps ) > count( $profileuser->roles ) && apply_filters( 'additional_capabilities_display', true, $profileuser ) ) : ?>
397+
<h3><?php _e( 'Additional Capabilities' ); ?></h3>
398+
<table class="form-table">
399+
<tr>
400+
<th scope="row"><?php _e( 'Capabilities' ); ?></th>
401+
<td>
402+
<?php
403+
$output = '';
404+
foreach ( $profileuser->caps as $cap => $value ) {
405+
if ( ! $wp_roles->is_role( $cap ) ) {
406+
if ( '' != $output )
407+
$output .= ', ';
408+
$output .= $value ? $cap : sprintf( __( 'Denied: %s' ), $cap );
409+
}
410+
}
411+
echo $output;
412+
?>
413+
</td>
414+
</tr>
415+
</table>
416+
<?php endif; ?>
415417

416418
<input type="hidden" name="action" value="update" />
417419
<input type="hidden" name="user_id" id="user_id" value="<?php echo esc_attr($user_id); ?>" />

0 commit comments

Comments
 (0)