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

git-svn-id: https://develop.svn.wordpress.org/trunk@15761 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2010-10-09 08:59:57 +00:00
parent f8be3f9fd1
commit 71dec45612

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>