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/plugin-install.php

    r11180 r11204  
    163163            <option value="tag"<?php selected('tag', $type) ?>><?php _x('Tag', 'Plugin Installer') ?></option>
    164164        </select>
    165         <input type="text" name="s" value="<?php echo attr($term) ?>" />
     165        <input type="text" name="s" value="<?php echo esc_attr($term) ?>" />
    166166        <label class="invisible" for="plugin-search-input"><?php _e('Search Plugins'); ?></label>
    167         <input type="submit" id="plugin-search-input" name="search" value="<?php _ea('Search Plugins') ?>" class="button" />
     167        <input type="submit" id="plugin-search-input" name="search" value="<?php esc_attr_e('Search Plugins') ?>" class="button" />
    168168    </form><?php
    169169}
     
    214214        <label class="invisible" for="pluginzip"><?php _e('Plugin zip file'); ?></label>
    215215        <input type="file" id="pluginzip" name="pluginzip" />
    216         <input type="submit" class="button" value="<?php _ea('Install Now') ?>" />
     216        <input type="submit" class="button" value="<?php esc_attr_e('Install Now') ?>" />
    217217    </form>
    218218<?php
     
    337337
    338338                if( isset($plugin['homepage']) )
    339                     $title = '<a target="_blank" href="' . attr($plugin['homepage']) . '">' . $title . '</a>';
     339                    $title = '<a target="_blank" href="' . esc_attr($plugin['homepage']) . '">' . $title . '</a>';
    340340
    341341                $action_links = array();
    342342                $action_links[] = '<a href="' . admin_url('plugin-install.php?tab=plugin-information&amp;plugin=' . $plugin['slug'] .
    343343                                    '&amp;TB_iframe=true&amp;width=600&amp;height=800') . '" class="thickbox onclick" title="' .
    344                                     attr($name) . '">' . __('Install') . '</a>';
     344                                    esc_attr($name) . '">' . __('Install') . '</a>';
    345345
    346346                $action_links = apply_filters('plugin_install_action_links', $action_links, $plugin);
     
    351351                <td class="vers">
    352352                    <div class="star-holder" title="<?php printf(_n('(based on %s rating)', '(based on %s ratings)', $plugin['num_ratings']), number_format_i18n($plugin['num_ratings'])) ?>">
    353                         <div class="star star-rating" style="width: <?php echo attr($plugin['rating']) ?>px"></div>
     353                        <div class="star star-rating" style="width: <?php echo esc_attr($plugin['rating']) ?>px"></div>
    354354                        <div class="star star5"><img src="<?php echo admin_url('images/star.gif'); ?>" alt="<?php _e('5 stars') ?>" /></div>
    355355                        <div class="star star4"><img src="<?php echo admin_url('images/star.gif'); ?>" alt="<?php _e('4 stars') ?>" /></div>
     
    419419        $href = add_query_arg( array('tab' => $tab, 'section' => $section_name) );
    420420        $href = clean_url($href);
    421         $san_title = attr(sanitize_title_with_dashes($title));
     421        $san_title = esc_attr(sanitize_title_with_dashes($title));
    422422        echo "\t<li><a name='$san_title' target='' href='$href'$class>$title</a></li>\n";
    423423    }
     
    508508        <h2><?php _e('Average Rating') ?></h2>
    509509        <div class="star-holder" title="<?php printf(_n('(based on %s rating)', '(based on %s ratings)', $api->num_ratings), number_format_i18n($api->num_ratings)); ?>">
    510             <div class="star star-rating" style="width: <?php echo attr($api->rating) ?>px"></div>
     510            <div class="star star-rating" style="width: <?php echo esc_attr($api->rating) ?>px"></div>
    511511            <div class="star star5"><img src="<?php echo admin_url('images/star.gif'); ?>" alt="<?php _e('5 stars') ?>" /></div>
    512512            <div class="star star4"><img src="<?php echo admin_url('images/star.gif'); ?>" alt="<?php _e('4 stars') ?>" /></div>
     
    533533            $content = links_add_target($content, '_blank');
    534534
    535             $san_title = attr(sanitize_title_with_dashes($title));
     535            $san_title = esc_attr(sanitize_title_with_dashes($title));
    536536
    537537            $display = ( $section_name == $section ) ? 'block' : 'none';
Note: See TracChangeset for help on using the changeset viewer.