Make WordPress Core

Changeset 15761


Ignore:
Timestamp:
10/09/2010 08:59:57 AM (14 years ago)
Author:
nacin
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/themes.php

    r15656 r15761  
    137137    <label class="screen-reader-text" for="theme-search-input"><?php _e('Search Themes'); ?>:</label>
    138138    <input type="text" id="tag-search-input" name="s" value="<?php _admin_search_query(); ?>" />
    139     <input type="submit" value="<?php esc_attr_e('Search Themes');  ?>" class="button" />
     139    <input type="submit" value="<?php esc_attr_e('Search Themes'); ?>" class="button" />
    140140    <a id="filter-click" href="?filter=1"><?php _e( 'Feature Filter' ); ?></a>
    141141</p>
     
    143143<br class="clear"/>
    144144
    145 <div id="filters" <?php if ( $tpage != 'filter' ) echo ' style="display: none"' ?>>
     145<div id="filters" <?php if ( ! isset( $tpage ) || $tpage != 'filter' ) echo ' style="display: none"' ?>>
    146146<?php $feature_list = get_theme_feature_list(); ?>
    147147    <div class="feature-filter">
    148148        <p class="install-help"><?php _e('Theme filters') ?></p>
    149149
    150     <?php foreach ( $feature_list as $feature_name => $features ) : ?>
    151         <?php   $feature_name = esc_html( $feature_name ); ?>
     150    <?php foreach ( $feature_list as $feature_name => $features ) :
     151            $feature_name = esc_html( $feature_name ); ?>
    152152       
    153153        <div class="feature-container">
    154154            <div class="feature-name"><?php echo $feature_name ?></div>
    155        
     155
    156156            <ol style="float: left; width: 725px;" class="feature-group">
    157                 <?php foreach ( $features as $key => $feature ) : ?>
    158                     <?php
     157                <?php foreach ( $features as $key => $feature ) :
    159158                        $feature_name = $feature;
    160159                        $feature_name = esc_html( $feature_name );
     
    162161                        ?>
    163162                <li>
    164                     <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"' ?>/>
     163                    <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 ) ); ?>/>
    165164                    <label for="feature-id-<?php echo $key; ?>"><?php echo $feature_name; ?></label>
    166165                </li>
    167                 <?php   endforeach; ?>
     166                <?php endforeach; ?>
    168167            </ol>
    169168        </div>
    170     <?php   endforeach; ?>
     169    <?php endforeach; ?>
    171170
    172171    <div class="feature-container">
    173         <input style="margin-left: 120px" type="submit" class="button-secondary submitter" value="<?php _e( 'Apply Filters' ); ?>" />
     172        <input style="margin-left: 120px" type="submit" class="button-secondary submitter" value="<?php esc_attr_e( 'Apply Filters' ); ?>" />
    174173        &nbsp;
    175174        <small><a id="mini-filter-click" href="<?php echo admin_url( 'themes.php' ); ?>"><?php _e( 'Close filters' )?></a></small>
Note: See TracChangeset for help on using the changeset viewer.