Skip to:
Content

bbPress.org

Changeset 4493


Ignore:
Timestamp:
11/24/2012 05:37:53 PM (13 years ago)
Author:
johnjamesjacoby
Message:

Extract:

  • Remove extract() from widgets.
  • See #2056.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/common/widgets.php

    r4491 r4493  
    6565     */
    6666    public function widget( $args, $instance ) {
    67         extract( $args );
    6867
    6968        // Typical WordPress filter
     
    7574        $lostpass = apply_filters( 'bbp_login_widget_lostpass', $instance['lostpass'], $instance, $this->id_base );
    7675
    77         echo $before_widget;
     76        echo $args['before_widget'];
    7877
    7978        if ( !empty( $title ) )
    80             echo $before_title . $title . $after_title;
     79            echo $args['before_title'] . $title . $args['after_title'];
    8180
    8281        if ( !is_user_logged_in() ) : ?>
     
    145144        <?php endif;
    146145
    147         echo $after_widget;
     146        echo $args['after_widget'];
    148147    }
    149148
     
    260259        if ( bbp_get_views() ) :
    261260
    262             extract( $args );
    263 
    264261            // Typical WordPress filter
    265262            $title = apply_filters( 'widget_title',          $instance['title'], $instance, $this->id_base );
     
    268265            $title = apply_filters( 'bbp_view_widget_title', $instance['title'], $instance, $this->id_base );
    269266
    270             echo $before_widget;
    271             echo $before_title . $title . $after_title; ?>
     267            echo $args['before_widget'];
     268            echo $args['before_title'] . $title . $args['after_title']; ?>
    272269
    273270            <ul>
     
    281278            </ul>
    282279
    283             <?php echo $after_widget;
     280            <?php echo $args['after_widget'];
    284281
    285282        endif;
     
    383380     */
    384381    public function widget( $args, $instance ) {
    385         extract( $args );
    386382
    387383        // Typical WordPress filter
     
    404400        if ( $widget_query->have_posts() ) :
    405401
    406             echo $before_widget;
    407             echo $before_title . $title . $after_title; ?>
     402            echo $args['before_widget'];
     403            echo $args['before_title'] . $title . $args['after_title']; ?>
    408404
    409405            <ul>
     
    417413            </ul>
    418414
    419             <?php echo $after_widget;
     415            <?php echo $args['after_widget'];
    420416
    421417            // Reset the $post global
     
    535531     */
    536532    public function widget( $args, $instance ) {
    537 
    538         extract( $args );
    539533
    540534        // Typical WordPress filter
     
    607601        if ( $widget_query->have_posts() ) :
    608602           
    609             echo $before_widget;
    610             echo $before_title . $title . $after_title; ?>
     603            echo $args['before_widget'];
     604            echo $args['before_title'] . $title . $args['after_title']; ?>
    611605
    612606            <ul>
     
    639633            </ul>
    640634
    641             <?php echo $after_widget;
     635            <?php echo $$args['after_widget'];
    642636
    643637            // Reset the $post global
     
    760754    public function widget( $args, $instance ) {
    761755
    762         extract( $args );
    763 
    764756        // Typical WordPress filter
    765757        $title      = apply_filters( 'widget_title',             $instance['title'], $instance, $this->id_base );
     
    784776        if ( $widget_query->have_posts() ) :
    785777
    786             echo $before_widget;
    787             echo $before_title . $title . $after_title; ?>
     778            echo $args['before_widget'];
     779            echo $args['before_title'] . $title . $args['after_title']; ?>
    788780
    789781            <ul>
     
    833825            </ul>
    834826
    835             <?php echo $after_widget;
     827            <?php echo $args['after_widget'];
    836828
    837829            // Reset the $post global
Note: See TracChangeset for help on using the changeset viewer.