WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/05/2009 07:43:53 PM (11 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/edit-page-form.php

    r11183 r11204  
    6767<?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?>
    6868<div style="display:none;">
    69 <input type="submit" name="save" value="<?php _ea('Save'); ?>" />
     69<input type="submit" name="save" value="<?php esc_attr_e('Save'); ?>" />
    7070</div>
    7171
     
    7373<div id="save-action">
    7474<?php if ( 'publish' != $post->post_status && 'future' != $post->post_status && 'pending' != $post->post_status )  { ?>
    75 <input <?php if ( 'private' == $post->post_status ) { ?>style="display:none"<?php } ?> type="submit" name="save" id="save-post" value="<?php _ea('Save Draft'); ?>" tabindex="4" class="button button-highlighted" />
     75<input <?php if ( 'private' == $post->post_status ) { ?>style="display:none"<?php } ?> type="submit" name="save" id="save-post" value="<?php esc_attr_e('Save Draft'); ?>" tabindex="4" class="button button-highlighted" />
    7676<?php } elseif ( 'pending' == $post->post_status && $can_publish ) { ?>
    77 <input type="submit" name="save" id="save-post" value="<?php _ea('Save as Pending'); ?>" tabindex="4" class="button button-highlighted" />
     77<input type="submit" name="save" id="save-post" value="<?php esc_attr_e('Save as Pending'); ?>" tabindex="4" class="button button-highlighted" />
    7878<?php } ?>
    7979</div>
     
    124124
    125125<div id="post-status-select" class="hide-if-js">
    126 <input type="hidden" name="hidden_post_status" id="hidden_post_status" value="<?php echo attr($post->post_status); ?>" />
     126<input type="hidden" name="hidden_post_status" id="hidden_post_status" value="<?php echo esc_attr($post->post_status); ?>" />
    127127<select name='post_status' id='post_status' tabindex='4'>
    128128<?php if ( 'publish' == $post->post_status ) : ?>
     
    164164
    165165<div id="post-visibility-select" class="hide-if-js">
    166 <input type="hidden" name="hidden_post_password" id="hidden-post-password" value="<?php echo attr($post->post_password); ?>" />
    167 <input type="hidden" name="hidden_post_visibility" id="hidden-post-visibility" value="<?php echo attr( $visibility ); ?>" />
     166<input type="hidden" name="hidden_post_password" id="hidden-post-password" value="<?php echo esc_attr($post->post_password); ?>" />
     167<input type="hidden" name="hidden_post_visibility" id="hidden-post-visibility" value="<?php echo esc_attr( $visibility ); ?>" />
    168168
    169169<input type="radio" name="visibility" id="visibility-radio-public" value="public" <?php checked( $visibility, 'public' ); ?> /> <label for="visibility-radio-public" class="selectit"><?php _e('Public'); ?></label><br />
    170170<input type="radio" name="visibility" id="visibility-radio-password" value="password" <?php checked( $visibility, 'password' ); ?> /> <label for="visibility-radio-password" class="selectit"><?php _e('Password protected'); ?></label><br />
    171 <span id="password-span"><label for="post_password"><?php _e('Password:'); ?></label> <input type="text" name="post_password" id="post_password" value="<?php echo attr($post->post_password); ?>" /><br /></span>
     171<span id="password-span"><label for="post_password"><?php _e('Password:'); ?></label> <input type="text" name="post_password" id="post_password" value="<?php echo esc_attr($post->post_password); ?>" /><br /></span>
    172172<input type="radio" name="visibility" id="visibility-radio-private" value="private" <?php checked( $visibility, 'private' ); ?> /> <label for="visibility-radio-private" class="selectit"><?php _e('Private'); ?></label><br />
    173173
     
    227227    if ( $can_publish ) :
    228228        if ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?>
    229         <input name="original_publish" type="hidden" id="original_publish" value="<?php _ea('Schedule') ?>" />
    230         <input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _ea('Schedule') ?>" />
     229        <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Schedule') ?>" />
     230        <input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php esc_attr_e('Schedule') ?>" />
    231231<?php   else : ?>
    232         <input name="original_publish" type="hidden" id="original_publish" value="<?php _ea('Publish') ?>" />
    233         <input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _ea('Publish') ?>" />
     232        <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Publish') ?>" />
     233        <input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php esc_attr_e('Publish') ?>" />
    234234<?php   endif;
    235235    else : ?>
    236     <input name="original_publish" type="hidden" id="original_publish" value="<?php _ea('Submit for Review') ?>" />
    237     <input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _ea('Submit for Review') ?>" />
     236    <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Submit for Review') ?>" />
     237    <input name="publish" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php esc_attr_e('Submit for Review') ?>" />
    238238<?php
    239239    endif;
    240240} else { ?>
    241     <input name="original_publish" type="hidden" id="original_publish" value="<?php _ea('Update Page') ?>" />
    242     <input name="save" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php _ea('Update Page') ?>" />
     241    <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Update Page') ?>" />
     242    <input name="save" type="submit" class="button-primary" id="publish" tabindex="5" accesskey="p" value="<?php esc_attr_e('Update Page') ?>" />
    243243<?php
    244244} ?>
     
    292292    } ?>
    293293<h5><?php _e('Order') ?></h5>
    294 <p><label class="invisible" for="menu_order"><?php _e('Page Order') ?></label><input name="menu_order" type="text" size="4" id="menu_order" value="<?php echo attr($post->menu_order) ?>" /></p>
     294<p><label class="invisible" for="menu_order"><?php _e('Page Order') ?></label><input name="menu_order" type="text" size="4" id="menu_order" value="<?php echo esc_attr($post->menu_order) ?>" /></p>
    295295<p><?php _e('Pages are usually ordered alphabetically, but you can put a number above to change the order pages appear in. (We know this is a little janky, it&#8217;ll be better in future releases.)'); ?></p>
    296296<?php
     
    347347function page_slug_meta_box($post){
    348348?>
    349 <label class="invisible" for="post_name"><?php _e('Page Slug') ?></label><input name="post_name" type="text" size="13" id="post_name" value="<?php echo attr( $post->post_name ); ?>" />
     349<label class="invisible" for="post_name"><?php _e('Page Slug') ?></label><input name="post_name" type="text" size="13" id="post_name" value="<?php echo esc_attr( $post->post_name ); ?>" />
    350350<?php
    351351}
     
    415415?>
    416416<input type="hidden" id="user-id" name="user_ID" value="<?php echo $user_ID ?>" />
    417 <input type="hidden" id="hiddenaction" name="action" value='<?php echo attr($form_action) ?>' />
    418 <input type="hidden" id="originalaction" name="originalaction" value="<?php echo attr($form_action) ?>" />
    419 <input type="hidden" id="post_author" name="post_author" value="<?php echo attr( $post->post_author ); ?>" />
     417<input type="hidden" id="hiddenaction" name="action" value='<?php echo esc_attr($form_action) ?>' />
     418<input type="hidden" id="originalaction" name="originalaction" value="<?php echo esc_attr($form_action) ?>" />
     419<input type="hidden" id="post_author" name="post_author" value="<?php echo esc_attr( $post->post_author ); ?>" />
    420420<?php echo $form_extra ?>
    421 <input type="hidden" id="post_type" name="post_type" value="<?php echo attr($post->post_type) ?>" />
    422 <input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo attr($post->post_status) ?>" />
     421<input type="hidden" id="post_type" name="post_type" value="<?php echo esc_attr($post->post_type) ?>" />
     422<input type="hidden" id="original_post_status" name="original_post_status" value="<?php echo esc_attr($post->post_status) ?>" />
    423423<input name="referredby" type="hidden" id="referredby" value="<?php echo clean_url(stripslashes(wp_get_referer())); ?>" />
    424424<?php if ( 'draft' != $post->post_status ) wp_original_referer_field(true, 'previous'); ?>
     
    437437<div id="titlewrap">
    438438    <label class="invisible" for="title"><?php _e('Title') ?></label>
    439     <input type="text" name="post_title" size="30" tabindex="1" value="<?php echo attr( htmlspecialchars( $post->post_title ) ); ?>" id="title" autocomplete="off" />
     439    <input type="text" name="post_title" size="30" tabindex="1" value="<?php echo esc_attr( htmlspecialchars( $post->post_title ) ); ?>" id="title" autocomplete="off" />
    440440</div>
    441441<div class="inside">
Note: See TracChangeset for help on using the changeset viewer.