Skip to:
Content

bbPress.org


Ignore:
Timestamp:
01/17/2011 06:57:34 PM (15 years ago)
Author:
johnjamesjacoby
Message:

Normalize bbp-includes directory. Mostly documentation fixes. Introduce bbp-shortcodes placeholder.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-includes/bbp-widgets.php

    r2773 r2812  
    9898        $instance['title']        = strip_tags( $new_instance['title']        );
    9999        $instance['parent_forum'] = absint    ( $new_instance['parent_forum'] );
     100
    100101        return $instance;
    101102    }
     
    112113    function form( $instance ) {
    113114        $title        = !empty( $instance['title']        ) ? esc_attr( $instance['title']        ) : '';
    114         $parent_forum = !empty( $instance['parent_forum'] ) ? esc_attr( $instance['parent_forum'] ) : '';
    115 
    116         ?>
     115        $parent_forum = !empty( $instance['parent_forum'] ) ? esc_attr( $instance['parent_forum'] ) : ''; ?>
    117116
    118117        <p><label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'bbpress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>" /></label></p>
     
    129128        <?php
    130129    }
    131 
    132130}
    133131
     
    200198
    201199            <ul>
     200
    202201                <?php while ( bbp_topics() ) : bbp_the_topic(); ?>
    203202
     
    231230            <ul>
    232231
     232                <?php foreach ( $topics as $topic_id => $topic_reply_count ) : ?>
     233
     234                    <li><a class="bbp-topic-title" href="<?php bbp_topic_permalink( $topic_id ); ?>" title="<?php bbp_topic_title( $topic_id ); ?>"><?php bbp_topic_title( $topic_id ); ?></a><?php if ( $show_date == 'on' ) _e( ', ' . bbp_get_topic_last_active( $topic_id ) . ' ago' ); ?></li>
     235
    233236                <?php
    234 
    235                 foreach ( $topics as $topic_id => $topic_reply_count ) :
    236 
    237                     ?>
    238 
    239                     <li><a class="bbp-topic-title" href="<?php bbp_topic_permalink( $topic_id ); ?>" title="<?php bbp_topic_title( $topic_id ); ?>"><?php bbp_topic_title( $topic_id ); ?></a><?php if ( $show_date == 'on' ) _e( ', ' . bbp_get_topic_last_active( $topic_id ) . ' ago' ); ?></li>
    240 
    241                     <?php
    242237
    243238                    $topic_count++;
     
    246241                        break;
    247242
    248                 endforeach;
    249 
    250                 ?>
     243                endforeach; ?>
    251244
    252245            </ul>
     
    272265        $instance['show_date'] = strip_tags( $new_instance['show_date'] );
    273266        $instance['pop_check'] = strip_tags( $new_instance['pop_check'] );
     267
    274268        return $instance;
    275269    }
     
    288282        $max_shown = !empty( $instance['max_shown'] ) ? esc_attr( $instance['max_shown'] ) : '';
    289283        $show_date = !empty( $instance['show_date'] ) ? esc_attr( $instance['show_date'] ) : '';
    290         $pop_check = !empty( $instance['pop_check'] ) ? esc_attr( $instance['pop_check'] ) : '';
    291 
    292         ?>
     284        $pop_check = !empty( $instance['pop_check'] ) ? esc_attr( $instance['pop_check'] ) : ''; ?>
    293285
    294286        <p><label for="<?php echo $this->get_field_id( 'title'     ); ?>"><?php _e( 'Title:',                  'bbpress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'title'     ); ?>" name="<?php echo $this->get_field_name( 'title'     ); ?>" type="text" value="<?php echo $title; ?>" /></label></p>
     
    405397        $instance['max_shown'] = strip_tags( $new_instance['max_shown'] );
    406398        $instance['show_date'] = strip_tags( $new_instance['show_date'] );
     399
    407400        return $instance;
    408401    }
     
    420413        $title     = !empty( $instance['title']     ) ? esc_attr( $instance['title']     ) : '';
    421414        $max_shown = !empty( $instance['max_shown'] ) ? esc_attr( $instance['max_shown'] ) : '';
    422         $show_date = !empty( $instance['show_date'] ) ? esc_attr( $instance['show_date'] ) : '';
    423 
    424         ?>
     415        $show_date = !empty( $instance['show_date'] ) ? esc_attr( $instance['show_date'] ) : ''; ?>
    425416
    426417        <p><label for="<?php echo $this->get_field_id( 'title'     ); ?>"><?php _e( 'Title:',                   'bbpress' ); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'title'     ); ?>" name="<?php echo $this->get_field_name( 'title'     ); ?>" type="text" value="<?php echo $title; ?>" /></label></p>
     
    430421        <?php
    431422    }
    432 
    433423}
    434424
Note: See TracChangeset for help on using the changeset viewer.