Make WordPress Core


Ignore:
Timestamp:
05/05/2009 07:43:53 PM (16 years ago)
Author:
markjaquith
Message:

_a(), _ea(), _xa(), attr() are now esc_attr(), esc_attr_e(), esc_attr_x(), esc_attr() -- still short, but less cryptic. see #9650

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/options-discussion.php

    r11190 r11204  
    5555<label for="close_comments_for_old_posts">
    5656<input name="close_comments_for_old_posts" type="checkbox" id="close_comments_for_old_posts" value="1" <?php checked('1', get_option('close_comments_for_old_posts')); ?> />
    57 <?php printf( __('Automatically close comments on articles older than %s days'), '</label><input name="close_comments_days_old" type="text" id="close_comments_days_old" value="' . attr(get_option('close_comments_days_old')) . '" class="small-text" />') ?>
     57<?php printf( __('Automatically close comments on articles older than %s days'), '</label><input name="close_comments_days_old" type="text" id="close_comments_days_old" value="' . esc_attr(get_option('close_comments_days_old')) . '" class="small-text" />') ?>
    5858<br />
    5959<label for="thread_comments">
     
    6565$thread_comments_depth = '</label><select name="thread_comments_depth" id="thread_comments_depth">';
    6666for ( $i = 1; $i <= $maxdeep; $i++ ) {
    67     $thread_comments_depth .= "<option value='" . attr($i) . "'";
     67    $thread_comments_depth .= "<option value='" . esc_attr($i) . "'";
    6868    if ( get_option('thread_comments_depth') == $i ) $thread_comments_depth .= " selected='selected'";
    6969    $thread_comments_depth .= ">$i</option>";
     
    8484$default_comments_page .= '>' . __('first') . '</option></select>';
    8585
    86 printf( __('Break comments into pages with %1$s comments per page and the %2$s page displayed by default'), '</label><label for="comments_per_page"><input name="comments_per_page" type="text" id="comments_per_page" value="' . attr(get_option('comments_per_page')) . '" class="small-text" />', $default_comments_page );
     86printf( __('Break comments into pages with %1$s comments per page and the %2$s page displayed by default'), '</label><label for="comments_per_page"><input name="comments_per_page" type="text" id="comments_per_page" value="' . esc_attr(get_option('comments_per_page')) . '" class="small-text" />', $default_comments_page );
    8787
    8888?></label>
     
    126126<th scope="row"><?php _e('Comment Moderation') ?></th>
    127127<td><fieldset><legend class="invisible"><?php _e('Comment Moderation') ?></legend>
    128 <p><label for="comment_max_links"><?php printf(__('Hold a comment in the queue if it contains %s or more links. (A common characteristic of comment spam is a large number of hyperlinks.)'), '<input name="comment_max_links" type="text" id="comment_max_links" value="' . attr(get_option('comment_max_links')) . '" class="small-text" />' ) ?></label></p>
     128<p><label for="comment_max_links"><?php printf(__('Hold a comment in the queue if it contains %s or more links. (A common characteristic of comment spam is a large number of hyperlinks.)'), '<input name="comment_max_links" type="text" id="comment_max_links" value="' . esc_attr(get_option('comment_max_links')) . '" class="small-text" />' ) ?></label></p>
    129129
    130130<p><label for="moderation_keys"><?php _e('When a comment contains any of these words in its content, name, URL, e-mail, or IP, it will be held in the <a href="edit-comments.php?comment_status=moderated">moderation queue</a>. One word or IP per line. It will match inside words, so &#8220;press&#8221; will match &#8220;WordPress&#8221;.') ?></label></p>
     
    160160    foreach ( $yesorno as $key => $value) {
    161161        $selected = (get_option('show_avatars') == $key) ? 'checked="checked"' : '';
    162         echo "\n\t<label><input type='radio' name='show_avatars' value='" . attr($key) . "' $selected/> $value</label><br />";
     162        echo "\n\t<label><input type='radio' name='show_avatars' value='" . esc_attr($key) . "' $selected/> $value</label><br />";
    163163    }
    164164?>
     
    173173foreach ($ratings as $key => $rating) :
    174174    $selected = (get_option('avatar_rating') == $key) ? 'checked="checked"' : '';
    175     echo "\n\t<label><input type='radio' name='avatar_rating' value='" . attr($key) . "' $selected/> $rating</label><br />";
     175    echo "\n\t<label><input type='radio' name='avatar_rating' value='" . esc_attr($key) . "' $selected/> $rating</label><br />";
    176176endforeach;
    177177?>
     
    202202foreach ( $avatar_defaults as $default_key => $default_name ) {
    203203    $selected = ($default == $default_key) ? 'checked="checked" ' : '';
    204     $avatar_list .= "\n\t<label><input type='radio' name='avatar_default' id='avatar_{$default_key}' value='" . attr($default_key)  . "' {$selected}/> ";
     204    $avatar_list .= "\n\t<label><input type='radio' name='avatar_default' id='avatar_{$default_key}' value='" . esc_attr($default_key)  . "' {$selected}/> ";
    205205
    206206    $avatar = get_avatar( $user_email, $size, $default_key );
     
    221221
    222222<p class="submit">
    223 <input type="submit" name="Submit" class="button-primary" value="<?php _ea('Save Changes') ?>" />
     223<input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>" />
    224224</p>
    225225</form>
Note: See TracChangeset for help on using the changeset viewer.