Make WordPress Core


Ignore:
Timestamp:
05/05/2009 07:43:53 PM (15 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/includes/dashboard.php

    r11190 r11204  
    133133    echo '<form action="" method="post" class="dashboard-widget-control-form">';
    134134    wp_dashboard_trigger_widget_control( $meta_box['id'] );
    135     echo "<p class='submit'><input type='hidden' name='widget_id' value='" . attr($meta_box['id']) . "' /><input type='submit' value='" . _a( 'Submit' ) . "' /></p>";
     135    echo "<p class='submit'><input type='hidden' name='widget_id' value='" . esc_attr($meta_box['id']) . "' /><input type='submit' value='" . esc_attr__( 'Submit' ) . "' /></p>";
    136136
    137137    echo '</form>';
     
    389389        <h4 id="quick-post-title"><label for="title"><?php _e('Title') ?></label></h4>
    390390        <div class="input-text-wrap">
    391             <input type="text" name="post_title" id="title" tabindex="1" autocomplete="off" value="<?php echo attr( $post->post_title ); ?>" />
     391            <input type="text" name="post_title" id="title" tabindex="1" autocomplete="off" value="<?php echo esc_attr( $post->post_title ); ?>" />
    392392        </div>
    393393
     
    414414            <input type="hidden" name="quickpress_post_ID" value="<?php echo (int) $post->ID; ?>" />
    415415            <?php wp_nonce_field('add-post'); ?>
    416             <input type="submit" name="save" id="save-post" class="button" tabindex="4" value="<?php _ea('Save Draft'); ?>" />
    417             <input type="reset" value="<?php _ea( 'Reset' ); ?>" class="button" />
     416            <input type="submit" name="save" id="save-post" class="button" tabindex="4" value="<?php esc_attr_e('Save Draft'); ?>" />
     417            <input type="reset" value="<?php esc_attr_e( 'Reset' ); ?>" class="button" />
    418418            <?php if ( current_user_can('publish_posts') ) { ?>
    419             <input type="submit" name="publish" id="publish" accesskey="p" tabindex="5" class="button-primary" value="<?php _ea('Publish'); ?>" />
     419            <input type="submit" name="publish" id="publish" accesskey="p" tabindex="5" class="button-primary" value="<?php esc_attr_e('Publish'); ?>" />
    420420            <?php } else { ?>
    421             <input type="submit" name="publish" id="publish" accesskey="p" tabindex="5" class="button-primary" value="<?php _ea('Submit for Review'); ?>" />
     421            <input type="submit" name="publish" id="publish" accesskey="p" tabindex="5" class="button-primary" value="<?php esc_attr_e('Submit for Review'); ?>" />
    422422            <?php } ?>
    423423            <br class="clear" />
     
    450450            $url = get_edit_post_link( $draft->ID );
    451451            $title = _draft_or_post_title( $draft->ID );
    452             $item = "<h4><a href='$url' title='" . sprintf( __( 'Edit &#8220;%s&#8221;' ), attr( $title ) ) . "'>$title</a> <abbr title='" . get_the_time(__('Y/m/d g:i:s A'), $draft) . "'>" . get_the_time( get_option( 'date_format' ), $draft ) . '</abbr></h4>';
     452            $item = "<h4><a href='$url' title='" . sprintf( __( 'Edit &#8220;%s&#8221;' ), esc_attr( $title ) ) . "'>$title</a> <abbr title='" . get_the_time(__('Y/m/d g:i:s A'), $draft) . "'>" . get_the_time( get_option( 'date_format' ), $draft ) . '</abbr></h4>';
    453453            if ( $the_content = preg_split( '#\s#', strip_tags( $draft->post_content ), 11, PREG_SPLIT_NO_EMPTY ) )
    454454                $item .= '<p>' . join( ' ', array_slice( $the_content, 0, 10 ) ) . ( 10 < count( $the_content ) ? '&hellip;' : '' ) . '</p>';
     
    597597            <div id="inline-<?php echo $comment->comment_ID; ?>" class="hidden">
    598598                <textarea class="comment" rows="3" cols="10"><?php echo $comment->comment_content; ?></textarea>
    599                 <div class="author-email"><?php echo attr( $comment->comment_author_email ); ?></div>
    600                 <div class="author"><?php echo attr( $comment->comment_author ); ?></div>
    601                 <div class="author-url"><?php echo attr( $comment->comment_author_url ); ?></div>
     599                <div class="author-email"><?php echo esc_attr( $comment->comment_author_email ); ?></div>
     600                <div class="author"><?php echo esc_attr( $comment->comment_author ); ?></div>
     601                <div class="author-url"><?php echo esc_attr( $comment->comment_author_url ); ?></div>
    602602                <div class="comment_status"><?php echo $comment->comment_approved; ?></div>
    603603            </div>
Note: See TracChangeset for help on using the changeset viewer.