Cleanup additional capabilities display in user-edit.php. Mark a string for translation.

Props johnjamesjacoby, SergeyBiryukov
fixes #14267


git-svn-id: http://core.svn.wordpress.org/trunk@23737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Ryan Boren 2013-03-18 13:27:57 +00:00
parent 36813b5b24
commit d967428a04

View File

@ -393,25 +393,27 @@ if ( $show_password_fields ) :
do_action( 'edit_user_profile', $profileuser ); do_action( 'edit_user_profile', $profileuser );
?> ?>
<?php if ( count($profileuser->caps) > count($profileuser->roles) && apply_filters('additional_capabilities_display', true, $profileuser) ) { ?> <?php if ( count( $profileuser->caps ) > count( $profileuser->roles ) && apply_filters( 'additional_capabilities_display', true, $profileuser ) ) : ?>
<br class="clear" /> <h3><?php _e( 'Additional Capabilities' ); ?></h3>
<table width="99%" style="border: none;" cellspacing="2" cellpadding="3" class="editform"> <table class="form-table">
<tr> <tr>
<th scope="row"><?php _e('Additional Capabilities') ?></th> <th scope="row"><?php _e( 'Capabilities' ); ?></th>
<td><?php <td>
<?php
$output = ''; $output = '';
foreach ( $profileuser->caps as $cap => $value ) { foreach ( $profileuser->caps as $cap => $value ) {
if ( ! $wp_roles->is_role( $cap ) ) { if ( ! $wp_roles->is_role( $cap ) ) {
if ( $output != '' ) if ( '' != $output )
$output .= ', '; $output .= ', ';
$output .= $value ? $cap : "Denied: {$cap}"; $output .= $value ? $cap : sprintf( __( 'Denied: %s' ), $cap );
} }
} }
echo $output; echo $output;
?></td> ?>
</td>
</tr> </tr>
</table> </table>
<?php } ?> <?php endif; ?>
<input type="hidden" name="action" value="update" /> <input type="hidden" name="action" value="update" />
<input type="hidden" name="user_id" id="user_id" value="<?php echo esc_attr($user_id); ?>" /> <input type="hidden" name="user_id" id="user_id" value="<?php echo esc_attr($user_id); ?>" />