Ticket #4065: 4065.01.diff
File 4065.01.diff, 6.9 KB (added by , 13 years ago) |
---|
-
bp-core/bp-core-widgets.php
14 14 15 15 class BP_Core_Members_Widget extends WP_Widget { 16 16 17 function bp_core_members_widget() {18 $this->__construct();19 }20 21 17 function __construct() { 22 18 $widget_ops = array( 'description' => __( 'A dynamic list of recently active, popular, and newest members', 'buddypress' ) ); 23 19 parent::__construct( false, $name = __( 'Members', 'buddypress' ), $widget_ops ); … … 39 35 $instance['member_default'] = 'active'; 40 36 41 37 echo $before_widget; 42 38 43 39 $title = $instance['link_title'] ? '<a href="' . trailingslashit( bp_get_root_domain() . '/' . bp_get_members_root_slug() ) . '">' . $instance['title'] . '</a>' : $instance['title']; 44 40 45 41 echo $before_title 46 42 . $title 47 43 . $after_title; ?> … … 101 97 102 98 function update( $new_instance, $old_instance ) { 103 99 $instance = $old_instance; 104 100 105 101 $instance['title'] = strip_tags( $new_instance['title'] ); 106 102 $instance['max_members'] = strip_tags( $new_instance['max_members'] ); 107 103 $instance['member_default'] = strip_tags( $new_instance['member_default'] ); … … 126 122 ?> 127 123 128 124 <p><label for="bp-core-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> 129 125 130 126 <p><label for="<?php echo $this->get_field_name('link_title') ?>"><input type="checkbox" name="<?php echo $this->get_field_name('link_title') ?>" value="1" <?php checked( $link_title ) ?> /> <?php _e( 'Link widget title to Members directory', 'buddypress' ) ?></label></p> 131 127 132 128 <p><label for="bp-core-widget-members-max"><?php _e('Max members to show:', 'buddypress'); ?> <input class="widefat" id="<?php echo $this->get_field_id( 'max_members' ); ?>" name="<?php echo $this->get_field_name( 'max_members' ); ?>" type="text" value="<?php echo esc_attr( $max_members ); ?>" style="width: 30%" /></label></p> … … 149 145 150 146 class BP_Core_Whos_Online_Widget extends WP_Widget { 151 147 152 function bp_core_whos_online_widget() {153 $this->__construct();154 }155 156 148 function __construct() { 157 149 $widget_ops = array( 'description' => __( 'Avatars of users who are currently online', 'buddypress' ) ); 158 150 parent::__construct( false, $name = __( "Who's Online Avatars", 'buddypress' ), $widget_ops ); … … 217 209 218 210 class BP_Core_Recently_Active_Widget extends WP_Widget { 219 211 220 function bp_core_recently_active_widget() {221 $this->__construct();222 }223 224 212 function __construct() { 225 213 $widget_ops = array( 'description' => __( 'Avatars of recently active members', 'buddypress' ) ); 226 214 parent::__construct( false, $name = __( 'Recently Active Member Avatars', 'buddypress' ), $widget_ops ); -
bp-blogs/bp-blogs-widgets.php
21 21 22 22 class BP_Blogs_Recent_Posts_Widget extends WP_Widget { 23 23 24 function bp_blogs_recent_posts_widget() {25 $this->__construct();26 }27 28 24 function __construct() { 29 25 parent::__construct( false, $name = __( 'Recent Networkwide Posts', 'buddypress' ) ); 30 26 } -
bp-blogs/bp-blogs-classes.php
22 22 var $user_id; 23 23 var $blog_id; 24 24 25 function bp_blogs_blog( $id = null ) {26 $this->__construct( $id );27 }28 29 25 function __construct( $id = null ) { 30 26 if ( !empty( $id ) ) { 31 27 $this->id = $id; -
bp-forums/bp-forums-bbpress-sa.php
144 144 class BPDB extends WPDB { 145 145 var $db_servers = array(); 146 146 147 function BPDB( $dbuser, $dbpassword, $dbname, $dbhost ) {148 $this->__construct( $dbuser, $dbpassword, $dbname, $dbhost );149 }150 151 147 function __construct( $dbuser, $dbpassword, $dbname, $dbhost ) { 152 148 parent::__construct( $dbuser, $dbpassword, $dbname, $dbhost ); 153 149 -
bp-forums/bp-forums-template.php
414 414 // When skipping the sticky logic, just pull up the forum topics like usual 415 415 $forum_template = new BP_Forums_Template_Forum( $type, $forum_id, $user_id, $page, $per_page, $max, 'all', $search_terms ); 416 416 } 417 417 418 418 return apply_filters( 'bp_has_topics', $forum_template->has_topics(), $forum_template ); 419 419 } 420 420 … … 479 479 } 480 480 function bp_get_the_topic_poster_avatar( $args = '' ) { 481 481 global $forum_template; 482 482 483 483 $defaults = array( 484 484 'type' => 'thumb', 485 485 'width' => false, … … 574 574 } 575 575 function bp_get_the_topic_object_avatar( $args = '' ) { 576 576 global $forum_template; 577 577 578 578 if ( !isset( $forum_template->topic->object_id ) ) 579 579 return false; 580 580 … … 992 992 var $sort_by; 993 993 var $order; 994 994 995 function BP_Forums_Template_Topic( $topic_id, $per_page, $max, $order ) {996 $this->__construct( $topic_id, $per_page, $max, $order );997 }998 999 995 function __construct( $topic_id, $per_page, $max, $order ) { 1000 996 global $bp, $current_user, $forum_template; 1001 997 -
bp-groups/bp-groups-template.php
1684 1684 var $pag_links; 1685 1685 var $total_group_count; 1686 1686 1687 function bp_groups_group_members_template( $group_id, $per_page, $max, $exclude_admins_mods, $exclude_banned, $exclude ) {1688 $this->__construct( $group_id, $per_page, $max, $exclude_admins_mods, $exclude_banned, $exclude );1689 }1690 1691 1687 function __construct( $group_id, $per_page, $max, $exclude_admins_mods, $exclude_banned, $exclude ) { 1692 1688 1693 1689 $this->pag_page = isset( $_REQUEST['mlpage'] ) ? intval( $_REQUEST['mlpage'] ) : 1; … … 2407 2403 var $pag_links; 2408 2404 var $total_request_count; 2409 2405 2410 function bp_groups_membership_requests_template( $group_id, $per_page, $max ) {2411 $this->__construct( $group_id, $per_page, $max );2412 }2413 2414 2415 2406 function __construct( $group_id, $per_page, $max ) { 2416 2407 2417 2408 $this->pag_page = isset( $_REQUEST['mrpage'] ) ? intval( $_REQUEST['mrpage'] ) : 1; … … 2578 2569 var $pag_links; 2579 2570 var $total_invite_count; 2580 2571 2581 function bp_groups_invite_template( $user_id, $group_id ) {2582 $this->__construct( $user_id, $group_id );2583 }2584 2585 2572 function __construct( $user_id, $group_id ) { 2586 2573 $this->invites = groups_get_invites_for_group( $user_id, $group_id ); 2587 2574 $this->invite_count = count( $this->invites );