Changeset 3592 for trunk/bp-groups/bp-groups-widgets.php
- Timestamp:
- 12/27/2010 10:57:31 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-widgets.php
r3521 r3592 24 24 function widget( $args, $instance ) { 25 25 global $bp; 26 26 27 27 $user_id = apply_filters( 'bp_group_widget_user_id', '0' ); 28 28 … … 100 100 'max_members' => 5, 101 101 'group_default' => 'active' 102 ); 102 ); 103 103 $instance = wp_parse_args( (array) $instance, $defaults ); 104 104 105 105 $title = strip_tags( $instance['title'] ); 106 106 $max_groups = strip_tags( $instance['max_groups'] ); 107 107 $group_default = strip_tags( $instance['group_default'] ); 108 108 ?> 109 109 110 110 <p><label for="bp-groups-widget-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 esc_attr( $title ); ?>" style="width: 100%" /></label></p> 111 111 112 112 <p><label for="bp-groups-widget-groups-max"><?php _e('Max groups to show:', 'buddypress'); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'max_groups' ); ?>" name="<?php echo $this->get_field_name( 'max_groups' ); ?>" type="text" value="<?php echo esc_attr( $max_groups ); ?>" style="width: 30%" /></label></p> 113 113 114 114 <p> 115 <label for="bp-groups-widget-groups-default"><?php _e('Default groups to show:', 'buddypress'); ?> 115 <label for="bp-groups-widget-groups-default"><?php _e('Default groups to show:', 'buddypress'); ?> 116 116 <select name="<?php echo $this->get_field_name( 'group_default' ); ?>"> 117 117 <option value="newest" <?php if ( $group_default == 'newest' ) : ?>selected="selected"<?php endif; ?>><?php _e( 'Newest', 'buddypress' ) ?></option> 118 118 <option value="active" <?php if ( $group_default == 'active' ) : ?>selected="selected"<?php endif; ?>><?php _e( 'Active', 'buddypress' ) ?></option> 119 119 <option value="popular" <?php if ( $group_default == 'popular' ) : ?>selected="selected"<?php endif; ?>><?php _e( 'Popular', 'buddypress' ) ?></option> 120 </select> 120 </select> 121 121 </label> 122 122 </p>
Note: See TracChangeset
for help on using the changeset viewer.