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/theme-editor.php

    r11173 r11204  
    9595
    9696            $docs_select = '<select name="docs-list" id="docs-list">';
    97             $docs_select .= '<option value="">' . _a( 'Function Name...' ) . '</option>';
     97            $docs_select .= '<option value="">' . esc_attr__( 'Function Name...' ) . '</option>';
    9898            foreach ( $functions as $function ) {
    99                 $docs_select .= '<option value="' . attr( urlencode( $function ) ) . '">' . htmlspecialchars( $function ) . '()</option>';
     99                $docs_select .= '<option value="' . esc_attr( urlencode( $function ) ) . '">' . htmlspecialchars( $function ) . '()</option>';
    100100            }
    101101            $docs_select .= '</select>';
     
    126126    if ($theme_name == $theme) $selected = " selected='selected'";
    127127    else $selected = '';
    128     $theme_name = attr($theme_name);
     128    $theme_name = esc_attr($theme_name);
    129129    echo "\n\t<option value=\"$theme_name\" $selected>$theme_name</option>";
    130130}
    131131?>
    132132        </select>
    133         <input type="submit" name="Submit" value="<?php _ea('Select') ?>" class="button" />
     133        <input type="submit" name="Submit" value="<?php esc_attr_e('Select') ?>" class="button" />
    134134    </form>
    135135</div>
     
    200200         <div><textarea cols="70" rows="25" name="newcontent" id="newcontent" tabindex="1" class="codepress <?php echo $codepress_lang ?>"><?php echo $content ?></textarea>
    201201         <input type="hidden" name="action" value="update" />
    202          <input type="hidden" name="file" value="<?php echo attr($file) ?>" />
    203          <input type="hidden" name="theme" value="<?php echo attr($theme) ?>" />
     202         <input type="hidden" name="file" value="<?php echo esc_attr($file) ?>" />
     203         <input type="hidden" name="theme" value="<?php echo esc_attr($theme) ?>" />
    204204         </div>
    205205    <?php if ( isset($functions ) && count($functions) ) { ?>
     
    207207        <label for="docs-list"><?php _e('Documentation:') ?></label>
    208208        <?php echo $docs_select; ?>
    209         <input type="button" class="button" value=" <?php _ea( 'Lookup' ); ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'http://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&locale=<?php echo urlencode( get_locale() ) ?>&version=<?php echo urlencode( $wp_version ) ?>&redirect=true'); }" />
     209        <input type="button" class="button" value=" <?php esc_attr_e( 'Lookup' ); ?> " onclick="if ( '' != jQuery('#docs-list').val() ) { window.open( 'http://api.wordpress.org/core/handbook/1.0/?function=' + escape( jQuery( '#docs-list' ).val() ) + '&locale=<?php echo urlencode( get_locale() ) ?>&version=<?php echo urlencode( $wp_version ) ?>&redirect=true'); }" />
    210210        </div>
    211211    <?php } ?>
     
    215215            <p class="submit">
    216216<?php
    217     echo "<input type='submit' name='submit' class='button-primary' value='" . _a('Update File') . "' tabindex='2' />";
     217    echo "<input type='submit' name='submit' class='button-primary' value='" . esc_attr__('Update File') . "' tabindex='2' />";
    218218?>
    219219</p>
Note: See TracChangeset for help on using the changeset viewer.