Make WordPress Core


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

    r11110 r11204  
    117117            $docs_select .= '<option value="">' . __( 'Function Name...' ) . '</option>';
    118118            foreach ( $functions as $function) {
    119                 $docs_select .= '<option value="' . attr( $function ) . '">' . htmlspecialchars( $function ) . '()</option>';
     119                $docs_select .= '<option value="' . esc_attr( $function ) . '">' . htmlspecialchars( $function ) . '()</option>';
    120120            }
    121121            $docs_select .= '</select>';
     
    133133    <?php
    134134        if ( wp_verify_nonce($_GET['_error_nonce'], 'plugin-activation-error_' . $file) ) { ?>
    135     <iframe style="border:0" width="100%" height="70px" src="<?php bloginfo('wpurl'); ?>/wp-admin/plugins.php?action=error_scrape&amp;plugin=<?php echo attr($file); ?>&amp;_wpnonce=<?php echo attr($_GET['_error_nonce']); ?>"></iframe>
     135    <iframe style="border:0" width="100%" height="70px" src="<?php bloginfo('wpurl'); ?>/wp-admin/plugins.php?action=error_scrape&amp;plugin=<?php echo esc_attr($file); ?>&amp;_wpnonce=<?php echo esc_attr($_GET['_error_nonce']); ?>"></iframe>
    136136    <?php } ?>
    137137</div>
     
    151151        else
    152152            $selected = '';
    153         $plugin_name = attr($plugin_name);
    154         $plugin_key = attr($plugin_key);
     153        $plugin_name = esc_attr($plugin_name);
     154        $plugin_key = esc_attr($plugin_key);
    155155        echo "\n\t<option value=\"$plugin_key\" $selected>$plugin_name</option>";
    156156    }
    157157?>
    158158        </select>
    159         <input type="submit" name="Submit" value="<?php _ea('Select') ?>" class="button" />
     159        <input type="submit" name="Submit" value="<?php esc_attr_e('Select') ?>" class="button" />
    160160    </form>
    161161</div>
     
    205205        <div><textarea cols="70" rows="25" name="newcontent" id="newcontent" tabindex="1" class="codepress <?php echo $codepress_lang ?>"><?php echo $content ?></textarea>
    206206        <input type="hidden" name="action" value="update" />
    207         <input type="hidden" name="file" value="<?php echo attr($file) ?>" />
    208         <input type="hidden" name="plugin" value="<?php echo attr($plugin) ?>" />
     207        <input type="hidden" name="file" value="<?php echo esc_attr($file) ?>" />
     208        <input type="hidden" name="plugin" value="<?php echo esc_attr($plugin) ?>" />
    209209        </div>
    210210        <?php if ( count( $functions ) ) : ?>
    211         <div id="documentation"><label for="docs-list"><?php _e('Documentation:') ?></label> <?php echo $docs_select ?> <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'); }" /></div>
     211        <div id="documentation"><label for="docs-list"><?php _e('Documentation:') ?></label> <?php echo $docs_select ?> <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'); }" /></div>
    212212        <?php endif; ?>
    213213<?php if ( is_writeable($real_file) ) : ?>
     
    218218    <?php
    219219        if ( isset($_GET['phperror']) )
    220             echo "<input type='hidden' name='phperror' value='1' /><input type='submit' name='submit' class='button-primary' value='" . _a('Update File and Attempt to Reactivate') . "' tabindex='2' />";
    221         else
    222             echo "<input type='submit' name='submit' class='button-primary' value='" . _a('Update File') . "' tabindex='2' />";
     220            echo "<input type='hidden' name='phperror' value='1' /><input type='submit' name='submit' class='button-primary' value='" . esc_attr__('Update File and Attempt to Reactivate') . "' tabindex='2' />";
     221        else
     222            echo "<input type='submit' name='submit' class='button-primary' value='" . esc_attr__('Update File') . "' tabindex='2' />";
    223223    ?>
    224224    </p>
Note: See TracChangeset for help on using the changeset viewer.