WordPress.org

Make WordPress Core


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

    r11190 r11204  
    212212    <label class="invisible" for="media-search-input"><?php _e( 'Search Media' ); ?>:</label>
    213213    <input type="text" id="media-search-input" name="s" value="<?php the_search_query(); ?>" />
    214     <input type="submit" value="<?php _ea( 'Search Media' ); ?>" class="button" />
     214    <input type="submit" value="<?php esc_attr_e( 'Search Media' ); ?>" class="button" />
    215215</p>
    216216</form>
     
    248248<?php } ?>
    249249</select>
    250 <input type="submit" value="<?php _ea('Apply'); ?>" name="doaction" id="doaction" class="button-secondary action" />
     250<input type="submit" value="<?php esc_attr_e('Apply'); ?>" name="doaction" id="doaction" class="button-secondary action" />
    251251<?php wp_nonce_field('bulk-media'); ?>
    252252
     
    273273        $default = '';
    274274
    275     echo "<option$default value='" . attr("$arc_row->yyear$arc_row->mmonth") . "'>";
     275    echo "<option$default value='" . esc_attr("$arc_row->yyear$arc_row->mmonth") . "'>";
    276276    echo $wp_locale->get_month($arc_row->mmonth) . " $arc_row->yyear";
    277277    echo "</option>\n";
     
    281281<?php endif; // month_count ?>
    282282
    283 <input type="submit" id="post-query-submit" value="<?php _ea('Filter'); ?>" class="button-secondary" />
     283<input type="submit" id="post-query-submit" value="<?php esc_attr_e('Filter'); ?>" class="button-secondary" />
    284284
    285285<?php } // ! is_singular ?>
    286286
    287287<?php if ( isset($_GET['detached']) ) { ?>
    288     <input type="submit" id="find_detached" name="find_detached" value="<?php _ea('Scan for lost attachments'); ?>" class="button-secondary" />
     288    <input type="submit" id="find_detached" name="find_detached" value="<?php esc_attr_e('Scan for lost attachments'); ?>" class="button-secondary" />
    289289<?php } ?>
    290290
     
    326326?>
    327327    <tr id='post-<?php echo $post->ID; ?>' class='<?php echo $class; ?>' valign="top">
    328         <th scope="row" class="check-column"><input type="checkbox" name="media[]" value="<?php echo attr($post->ID); ?>" /></th>
     328        <th scope="row" class="check-column"><input type="checkbox" name="media[]" value="<?php echo esc_attr($post->ID); ?>" /></th>
    329329
    330330        <td class="media-icon"><?php
    331331        if ( $thumb = wp_get_attachment_image( $post->ID, array(80, 60), true ) ) { ?>
    332             <a href="media.php?action=edit&amp;attachment_id=<?php echo $post->ID; ?>" title="<?php echo attr(sprintf(__('Edit &#8220;%s&#8221;'), $att_title)); ?>"><?php echo $thumb; ?></a>
     332            <a href="media.php?action=edit&amp;attachment_id=<?php echo $post->ID; ?>" title="<?php echo esc_attr(sprintf(__('Edit &#8220;%s&#8221;'), $att_title)); ?>"><?php echo $thumb; ?></a>
    333333<?php   } ?></td>
    334334
    335         <td class="media column-media"><strong><a href="<?php echo get_edit_post_link( $post->ID ); ?>" title="<?php echo attr(sprintf(__('Edit &#8220;%s&#8221;'), $att_title)); ?>"><?php echo $att_title; ?></a></strong><br />
     335        <td class="media column-media"><strong><a href="<?php echo get_edit_post_link( $post->ID ); ?>" title="<?php echo esc_attr(sprintf(__('Edit &#8220;%s&#8221;'), $att_title)); ?>"><?php echo $att_title; ?></a></strong><br />
    336336        <?php echo strtoupper(preg_replace('/^.*?\.(\w+)$/', '$1', get_attached_file($post->ID))); ?>
    337337
     
    343343        if ( current_user_can('delete_post', $post->ID) )
    344344            $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("post.php?action=delete&amp;post=$post->ID", 'delete-post_' . $post->ID) . "' onclick=\"if ( confirm('" . js_escape(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this attachment '%s'\n  'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this attachment '%s'\n  'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . "</a>";
    345         $actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . attr(sprintf(__('View &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('View') . '</a>';
     345        $actions['view'] = '<a href="' . get_permalink($post->ID) . '" title="' . esc_attr(sprintf(__('View &#8220;%s&#8221;'), $title)) . '" rel="permalink">' . __('View') . '</a>';
    346346        if ( current_user_can('edit_post', $post->ID) )
    347347            $actions['attach'] = '<a href="#the-list" onclick="findPosts.open(\'media[]\',\''.$post->ID.'\');return false;">'.__('Attach').'</a>';
     
    404404<?php } ?>
    405405</select>
    406 <input type="submit" value="<?php _ea('Apply'); ?>" name="doaction2" id="doaction2" class="button-secondary action" />
     406<input type="submit" value="<?php esc_attr_e('Apply'); ?>" name="doaction2" id="doaction2" class="button-secondary action" />
    407407</div>
    408408
Note: See TracChangeset for help on using the changeset viewer.