mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
Move Admin Colour Scheme picker to a hook. Props Jick. s/register_admin_color_themes()/register_admin_color_schemes/g. See #11625, Fixes #6837
git-svn-id: https://develop.svn.wordpress.org/trunk@13487 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -184,31 +184,13 @@ include ('admin-header.php');
|
||||
<td><label for="rich_editing"><input name="rich_editing" type="checkbox" id="rich_editing" value="false" <?php checked('false', $profileuser->rich_editing); ?> /> <?php _e('Disable the visual editor when writing'); ?></label></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php if ( count($_wp_admin_css_colors) > 1 ) : ?>
|
||||
<?php if ( count($_wp_admin_css_colors) > 1 && has_action('admin_color_scheme_picker') ) : ?>
|
||||
<tr>
|
||||
<th scope="row"><?php _e('Admin Color Scheme')?></th>
|
||||
<td><fieldset><legend class="screen-reader-text"><span><?php _e('Admin Color Scheme')?></span></legend>
|
||||
<?php
|
||||
$current_color = get_user_option('admin_color', $user_id);
|
||||
if ( empty($current_color) )
|
||||
$current_color = 'fresh';
|
||||
foreach ( $_wp_admin_css_colors as $color => $color_info ): ?>
|
||||
<div class="color-option"><input name="admin_color" id="admin_color_<?php echo $color; ?>" type="radio" value="<?php echo esc_attr($color) ?>" class="tog" <?php checked($color, $current_color); ?> />
|
||||
<table class="color-palette">
|
||||
<tr>
|
||||
<?php foreach ( $color_info->colors as $html_color ): ?>
|
||||
<td style="background-color: <?php echo $html_color ?>" title="<?php echo $color ?>"> </td>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<label for="admin_color_<?php echo $color; ?>"><?php echo $color_info->name ?></label>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</fieldset></td>
|
||||
<td><?php do_action( 'admin_color_scheme_picker' ); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
endif;
|
||||
endif; // $_wp_admin_css_colors
|
||||
if ( !( IS_PROFILE_PAGE && !$user_can_edit ) ) : ?>
|
||||
<tr>
|
||||
<th scope="row"><?php _e( 'Keyboard Shortcuts' ); ?></th>
|
||||
|
||||
Reference in New Issue
Block a user