Make WordPress Core


Ignore:
Timestamp:
01/22/2015 12:41:36 AM (10 years ago)
Author:
lancewillett
Message:

Twenty Eleven: fix escaping and minor code style issues. See #29127.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyeleven/showcase.php

    r25746 r31265  
    106106                    ?>
    107107
    108                     <section class="featured-post <?php echo $feature_class; ?>" id="featured-post-<?php echo $counter_slider; ?>">
     108                    <section class="featured-post <?php echo esc_attr( $feature_class ); ?>" id="featured-post-<?php echo esc_attr( $counter_slider ); ?>">
    109109
    110110                        <?php
     
    136136
    137137                        // Reset the counter so that we end up with matching elements
    138                         $counter_slider = 0;
     138                        $counter_slider = 0;
    139139
    140140                        // Begin from zero
    141                         rewind_posts();
     141                        rewind_posts();
    142142
    143143                        // Let's roll again.
    144                         while ( $featured->have_posts() ) : $featured->the_post();
    145                             $counter_slider++;
     144                        while ( $featured->have_posts() ) : $featured->the_post();
     145                            $counter_slider++;
    146146                            if ( 1 == $counter_slider )
    147                                 $class = 'class="active"';
     147                                $class = ' class="active"';
    148148                            else
    149149                                $class = '';
    150                         ?>
    151                         <li><a href="#featured-post-<?php echo $counter_slider; ?>" title="<?php echo esc_attr( sprintf( __( 'Featuring: %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" <?php echo $class; ?>></a></li>
     150                        ?>
     151                        <li><a href="#featured-post-<?php echo esc_attr( $counter_slider ); ?>" title="<?php echo esc_attr( sprintf( __( 'Featuring: %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>"<?php echo $class; ?>></a></li>
    152152                    <?php endwhile; ?>
    153153                    </ul>
Note: See TracChangeset for help on using the changeset viewer.