Fix some notices. props mrmist, fixes #15079. Also some standards fixes.

git-svn-id: http://svn.automattic.com/wordpress/trunk@15761 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-10-09 08:59:57 +00:00
parent 089b75c67d
commit b5e9c9c703
1 changed files with 10 additions and 11 deletions

View File

@ -142,26 +142,25 @@ if ( ! current_user_can( 'switch_themes' ) ) {
<br class="clear"/>
<div id="filters" <?php if ( $tpage != 'filter' ) echo ' style="display: none"' ?>>
<div id="filters" <?php if ( ! isset( $tpage ) || $tpage != 'filter' ) echo ' style="display: none"' ?>>
<?php $feature_list = get_theme_feature_list(); ?>
<div class="feature-filter">
<p class="install-help"><?php _e('Theme filters') ?></p>
<?php foreach ( $feature_list as $feature_name => $features ) : ?>
<?php $feature_name = esc_html( $feature_name ); ?>
<?php foreach ( $feature_list as $feature_name => $features ) :
$feature_name = esc_html( $feature_name ); ?>
<div class="feature-container">
<div class="feature-name"><?php echo $feature_name ?></div>
<ol style="float: left; width: 725px;" class="feature-group">
<?php foreach ( $features as $key => $feature ) : ?>
<?php
<?php foreach ( $features as $key => $feature ) :
$feature_name = $feature;
$feature_name = esc_html( $feature_name );
$feature = esc_attr($feature);
?>
<li>
<input type="checkbox" name="features[<?php echo $key; ?>]" id="feature-id-<?php echo $key; ?>" value="<?php echo $key; ?>" <?php if ( in_array( $key, $checked_features ) ) echo ' checked="checked"' ?>/>
<input type="checkbox" name="features[<?php echo $key; ?>]" id="feature-id-<?php echo $key; ?>" value="<?php echo $key; ?>" <?php checked( isset( $checked_features ) && in_array( $key, $checked_features ) ); ?>/>
<label for="feature-id-<?php echo $key; ?>"><?php echo $feature_name; ?></label>
</li>
<?php endforeach; ?>
@ -170,7 +169,7 @@ if ( ! current_user_can( 'switch_themes' ) ) {
<?php endforeach; ?>
<div class="feature-container">
<input style="margin-left: 120px" type="submit" class="button-secondary submitter" value="<?php _e( 'Apply Filters' ); ?>" />
<input style="margin-left: 120px" type="submit" class="button-secondary submitter" value="<?php esc_attr_e( 'Apply Filters' ); ?>" />
&nbsp;
<small><a id="mini-filter-click" href="<?php echo admin_url( 'themes.php' ); ?>"><?php _e( 'Close filters' )?></a></small>
</div>