Skip to content

Commit

Permalink
Don't use extract. Explicitly reference array members.
Browse files Browse the repository at this point in the history
  • Loading branch information
jblz committed Jul 23, 2014
1 parent e1dc96f commit 15076f1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions widget.zone-posts.php
Expand Up @@ -35,7 +35,6 @@ function widget( $args, $instance ) {

ob_start();

extract( $args );
$zone_id = $instance['zone_id'] ? $instance['zone_id'] : 0;
$show_description = $instance['show_description'] ? 1 : 0;
if ( ! $zone_id )
Expand All @@ -50,9 +49,9 @@ function widget( $args, $instance ) {
return;

?>
<?php echo wp_kses_post( $before_widget ); ?>
<?php echo wp_kses_post( $args['before_widget'] ); ?>

<?php echo wp_kses_post( $before_title ) . esc_html( $zone->name ) . wp_kses_post( $after_title ); ?>
<?php echo wp_kses_post( $args['before_title'] ) . esc_html( $zone->name ) . wp_kses_post( $args['after_title'] ); ?>

<?php if ( ! empty( $zone->description ) && $show_description ) : ?>
<p class="description"><?php echo esc_html( $zone->description ); ?></p>
Expand All @@ -68,7 +67,7 @@ function widget( $args, $instance ) {
<?php endforeach; ?>
</ul>

<?php echo wp_kses_post( $after_widget ); ?>
<?php echo wp_kses_post( $args['after_widget'] ); ?>
<?php
$cache[ $args['widget_id'] ] = ob_get_flush();
wp_cache_set( 'widget-zone-posts', $cache, 'widget' );
Expand Down

0 comments on commit 15076f1

Please sign in to comment.