예제 #1
0
<p>
<input type="hidden" name="from" value="profile" />
<input type="hidden" name="checkuser_id" value="<?php 
        echo $user_ID;
        ?>
" />
</p>

<h3><?php 
        _e('Personal Options');
        ?>
</h3>

<table class="form-table">
<?php 
        if (rich_edit_exists() && !(IS_PROFILE_PAGE && !$user_can_edit)) {
            // don't bother showing the option if the editor has been removed
            ?>
	<tr>
		<th scope="row"><?php 
            _e('Visual Editor');
            ?>
</th>
		<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>
예제 #2
0
		<p>
			<input type="hidden" name="from" value="profile" />
			<input type="hidden" name="checkuser_id" value="<?php 
echo $current_user->ID;
?>
" />
		</p>

		<h3><?php 
_e('Personal Options', 'theme-my-login');
?>
</h3>

		<table class="form-table">
		<?php 
if (rich_edit_exists() && $user_can_edit) {
    // don't bother showing the option if the editor has been removed
    ?>
		<tr>
			<th scope="row"><?php 
    _e('Visual Editor', 'theme-my-login');
    ?>
</th>
			<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', 'theme-my-login');
    ?>
</label></td>
		</tr>
예제 #3
0
파일: user-edit.php 프로젝트: alx/blogsfera
<p>
<input type="hidden" name="from" value="profile" />
<input type="hidden" name="checkuser_id" value="<?php 
            echo $user_ID;
            ?>
" />
</p>

<h3><?php 
            _e('Personal Options');
            ?>
</h3>

<table class="form-table">
<?php 
            if (rich_edit_exists()) {
                // don't bother showing the option if the editor has been removed
                ?>
	<tr>
		<th scope="row"><?php 
                _e('Visual Editor');
                ?>
</th>
		<td><label for="rich_editing"><input name="rich_editing" type="checkbox" id="rich_editing" value="true" <?php 
                checked('true', $profileuser->rich_editing);
                ?>
 /> <?php 
                _e('Use the visual editor when writing');
                ?>
</label></td>
	</tr>
</h2>

<form id="your-profile" action="<?php echo esc_url( self_admin_url( IS_PROFILE_PAGE ? 'profile.php' : 'user-edit.php' ) ); ?>" method="post"<?php do_action('user_edit_form_tag'); ?>>
<?php wp_nonce_field('update-user_' . $user_id) ?>
<?php if ( $wp_http_referer ) : ?>
	<input type="hidden" name="wp_http_referer" value="<?php echo esc_url($wp_http_referer); ?>" />
<?php endif; ?>
<p>
<input type="hidden" name="from" value="profile" />
<input type="hidden" name="checkuser_id" value="<?php echo $user_ID ?>" />
</p>

<h3><?php _e('Personal Options'); ?></h3>

<table class="form-table">
<?php if ( rich_edit_exists() && !( IS_PROFILE_PAGE && !$user_can_edit ) ) : // don't bother showing the option if the editor has been removed ?>
	<tr>
		<th scope="row"><?php _e('Visual Editor')?></th>
		<td><label for="rich_editing"><input name="rich_editing" type="checkbox" id="rich_editing" value="false" <?php if ( ! empty( $profileuser->rich_editing ) ) 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 && has_action('admin_color_scheme_picker') ) : ?>
<tr>
<th scope="row"><?php _e('Admin Color Scheme')?></th>
<td><?php do_action( 'admin_color_scheme_picker' ); ?></td>
</tr>
<?php
endif; // $_wp_admin_css_colors
if ( !( IS_PROFILE_PAGE && !$user_can_edit ) ) : ?>
<tr>
<th scope="row"><?php _e( 'Keyboard Shortcuts' ); ?></th>
예제 #5
0
<p>
<input type="hidden" name="from" value="profile" />
<input type="hidden" name="checkuser_id" value="<?php 
        echo $user_ID;
        ?>
" />
</p>

<h3><?php 
        _e('Personal Options');
        ?>
</h3>

<table class="form-table">
<?php 
        if (rich_edit_exists() && !(IS_PROFILE_PAGE && !$user_can_edit) && current_user_can('activate_plugins')) {
            // don't bother showing the option if the editor has been removed
            // LHG: show this option only for admins for testing reasons
            ?>
	<tr>
		<th scope="row"><?php 
            _e('Visual Editor');
            ?>
</th>
		<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>
<h2><?php $is_profile_page? _e('Your Profile and Personal Options') : _e('Edit User'); ?></h2>

<form name="profile" id="your-profile" action="" method="post">
<?php wp_nonce_field('update-user_' . $user_id) ?>
<?php if ( $wp_http_referer ) : ?>
	<input type="hidden" name="wp_http_referer" value="<?php echo clean_url($wp_http_referer); ?>" />
<?php endif; ?>
<p>
<input type="hidden" name="from" value="profile" />
<input type="hidden" name="checkuser_id" value="<?php echo $user_ID ?>" />
</p>

<h3><?php _e('Personal Options'); ?></h3>

<table class="form-table">
<?php if ( rich_edit_exists() ) : // don't bother showing the option if the editor has been removed ?>
	<tr>
		<th scope="row"><?php _e('Visual Editor')?></th>
		<td><label for="rich_editing"><input name="rich_editing" type="checkbox" id="rich_editing" value="true" <?php checked('true', $profileuser->rich_editing); ?> /> <?php _e('Use the visual editor when writing'); ?></label></td>
	</tr>
<?php endif; ?>
<tr>
<th scope="row"><?php _e('Admin Color Scheme')?></th>
<td>
<?php
$current_color = get_user_option('admin_color');
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 $color ?>" class="tog" <?php checked($color, $current_color); ?> />
	<table class="color-palette">
function user_can_richedit() {
	global $wp_rich_edit, $pagenow;

	if ( !isset($wp_rich_edit) )
		$wp_rich_edit = ( 'true' == get_user_option('rich_editing') && !preg_match('!opera[ /][2-8]|konqueror|safari!i', $_SERVER['HTTP_USER_AGENT']) && 'comment.php' != $pagenow && rich_edit_exists() ) ? true : false;

	return apply_filters('user_can_richedit', $wp_rich_edit);
}