Skip to:
Content

BuddyPress.org

Changeset 1612


Ignore:
Timestamp:
07/15/2009 07:54:50 PM (15 years ago)
Author:
apeatling
Message:

Updated widget options in branch.

Location:
branches/1.0
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/1.0/bp-activity/bp-activity-widgets.php

    r1602 r1612  
    2222           . $widget_name
    2323           . $after_title; ?>
    24    
    25         <?php
    26         if ( empty( $instance['max_items'] ) || !$instance['max_items'] )
    27             $instance['max_items'] = 30; ?>
    2824       
    2925        <?php
  • branches/1.0/bp-blogs/bp-blogs-widgets.php

    r1602 r1612  
    2323           . $after_title; ?>
    2424   
    25         <?php
    26         if ( empty( $instance['max_posts'] ) || !$instance['max_posts'] )
    27             $instance['max_posts'] = 10; ?>
    28        
    2925        <?php $posts = bp_blogs_get_latest_posts( null, $instance['max_posts'] ) ?>
    3026        <?php $counter = 0; ?>
  • branches/1.0/bp-core/bp-core-widgets.php

    r1602 r1612  
    2525            . $after_title; ?>
    2626
    27         <?php if ( $instance['title'] ) : ?><h3><?php echo attribute_escape( $instance['title'] ) ?></h3><?php endif; ?>
    28         <?php if ( $instance['text'] ) : ?><p><?php echo attribute_escape( $instance['text'] ) ?></p><?php endif; ?>
     27        <?php if ( $instance['title'] ) : ?><h3><?php echo attribute_escape( stripslashes( $instance['title'] ) ) ?></h3><?php endif; ?>
     28        <?php if ( $instance['text'] ) : ?><p><?php echo apply_filters( 'bp_core_welcome_widget_text', $instance['text'] ) ?></p><?php endif; ?>
    2929
    3030        <?php if ( !is_user_logged_in() ) { ?>
     
    4949        $text = strip_tags( $instance['text'] );
    5050        ?>
    51             <p><label for="bp-widget-welcome-title"><?php _e('Title:', 'buddypress'); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo attribute_escape( $title ); ?>" /></label></p>
     51            <p><label for="bp-widget-welcome-title"><?php _e('Title:', 'buddypress'); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo attribute_escape( stripslashes( $title ) ); ?>" /></label></p>
    5252            <p>
    5353                <label for="bp-widget-welcome-text"><?php _e( 'Welcome Text:' , 'buddypress'); ?>
    54                     <textarea id="<?php echo $this->get_field_id( 'text' ); ?>" name="<?php echo $this->get_field_name( 'text' ); ?>" class="widefat" style="height: 100px"><?php echo attribute_escape( $text ); ?></textarea>
     54                    <textarea id="<?php echo $this->get_field_id( 'text' ); ?>" name="<?php echo $this->get_field_name( 'text' ); ?>" class="widefat" style="height: 100px"><?php echo attribute_escape( stripslashes( $text ) ); ?></textarea>
    5555                </label>
    5656            </p>
     
    5858    }
    5959}
     60add_filter( 'bp_core_welcome_widget_text', 'attribute_escape' );
     61add_filter( 'bp_core_welcome_widget_text', 'wptexturize' );
     62add_filter( 'bp_core_welcome_widget_text', 'convert_smilies' );
     63add_filter( 'bp_core_welcome_widget_text', 'convert_chars' );
     64add_filter( 'bp_core_welcome_widget_text', 'stripslashes' );
     65add_filter( 'bp_core_welcome_widget_text', 'wpautop' );
     66add_filter( 'bp_core_welcome_widget_text', 'force_balance_tags' );
     67
    6068
    6169/*** MEMBERS WIDGET *****************/
     
    7785           . $widget_name
    7886           . $after_title; ?>
    79    
    80         <?php
    81         if ( empty( $instance['max_members'] ) || !$instance['max_members'] )
    82             $instance['max_members'] = 5; ?>
    83        
     87
    8488        <?php if ( bp_has_site_members( 'type=newest&max=' . $instance['max_members'] ) ) : ?>
    8589            <div class="item-options" id="members-list-options">
     
    153157           . $widget_name
    154158           . $after_title; ?>
    155    
    156         <?php
    157         if ( empty( $instance['max_members'] ) || !$instance['max_members'] )
    158             $instance['max_members'] = 5; ?>
    159        
    160         <?php if ( bp_has_site_members( 'type=online&max=' . $instance['max_members'] ) ) : ?>         
     159       
     160        <?php if ( bp_has_site_members( 'type=online&per_page=' . $instance['max_members'] . '&max=' . $instance['max_members'] ) ) : ?>           
    161161            <div class="avatar-block">
    162162                <?php while ( bp_site_members() ) : bp_the_site_member(); ?>
     
    186186
    187187    function form( $instance ) {
    188         $instance = wp_parse_args( (array) $instance, array( 'max_members' => 5 ) );
     188        $instance = wp_parse_args( (array) $instance, array( 'max_members' => 15 ) );
    189189        $max_members = strip_tags( $instance['max_members'] );
    190190        ?>
     
    211211           . $widget_name
    212212           . $after_title; ?>
    213    
    214         <?php
    215         if ( empty( $instance['max_members'] ) || !$instance['max_members'] )
    216             $instance['max_members'] = 5; ?>
    217        
    218         <?php if ( bp_has_site_members( 'type=active&max=' . $instance['max_members'] ) ) : ?>         
     213           
     214        <?php if ( bp_has_site_members( 'type=active&per_page=' . $instance['max_members'] . '&max=' . $instance['max_members'] ) ) : ?>           
    219215            <div class="avatar-block">
    220216                <?php while ( bp_site_members() ) : bp_the_site_member(); ?>
     
    244240
    245241    function form( $instance ) {
    246         $instance = wp_parse_args( (array) $instance, array( 'max_members' => 5 ) );
     242        $instance = wp_parse_args( (array) $instance, array( 'max_members' => 15 ) );
    247243        $max_members = strip_tags( $instance['max_members'] );
    248244        ?>
  • branches/1.0/bp-groups/bp-groups-widgets.php

    r1602 r1612  
    2626           . $widget_name
    2727           . $after_title; ?>
    28    
    29         <?php
    30         if ( empty( $instance['max_groups'] ) || !$instance['max_groups'] )
    31             $instance['max_groups'] = 5; ?>
    3228       
    3329        <?php if ( bp_has_site_groups( 'type=popular&max=' . $instance['max_groups'] ) ) : ?>
Note: See TracChangeset for help on using the changeset viewer.