Skip to:
Content

BuddyPress.org

Ticket #4065: 4065.01.diff

File 4065.01.diff, 6.9 KB (added by cnorris23, 13 years ago)
  • bp-core/bp-core-widgets.php

     
    1414
    1515class BP_Core_Members_Widget extends WP_Widget {
    1616
    17         function bp_core_members_widget() {
    18                 $this->__construct();
    19         }
    20 
    2117        function __construct() {
    2218                $widget_ops = array( 'description' => __( 'A dynamic list of recently active, popular, and newest members', 'buddypress' ) );
    2319                parent::__construct( false, $name = __( 'Members', 'buddypress' ), $widget_ops );
     
    3935                        $instance['member_default'] = 'active';
    4036
    4137                echo $before_widget;
    42 
     38
    4339                $title = $instance['link_title'] ? '<a href="' . trailingslashit( bp_get_root_domain() . '/' . bp_get_members_root_slug() ) . '">' . $instance['title'] . '</a>' : $instance['title'];
    44 
     40
    4541                echo $before_title
    4642                   . $title
    4743                   . $after_title; ?>
     
    10197
    10298        function update( $new_instance, $old_instance ) {
    10399                $instance = $old_instance;
    104 
     100
    105101                $instance['title']          = strip_tags( $new_instance['title'] );
    106102                $instance['max_members']    = strip_tags( $new_instance['max_members'] );
    107103                $instance['member_default'] = strip_tags( $new_instance['member_default'] );
     
    126122                ?>
    127123
    128124                <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
    130126                <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>
    131127
    132128                <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>
     
    149145
    150146class BP_Core_Whos_Online_Widget extends WP_Widget {
    151147
    152         function bp_core_whos_online_widget() {
    153                 $this->__construct();
    154         }
    155 
    156148        function __construct() {
    157149                $widget_ops = array( 'description' => __( 'Avatars of users who are currently online', 'buddypress' ) );
    158150                parent::__construct( false, $name = __( "Who's Online Avatars", 'buddypress' ), $widget_ops );
     
    217209
    218210class BP_Core_Recently_Active_Widget extends WP_Widget {
    219211
    220         function bp_core_recently_active_widget() {
    221                 $this->__construct();
    222         }
    223 
    224212        function __construct() {
    225213                $widget_ops = array( 'description' => __( 'Avatars of recently active members', 'buddypress' ) );
    226214                parent::__construct( false, $name = __( 'Recently Active Member Avatars', 'buddypress' ), $widget_ops );
  • bp-blogs/bp-blogs-widgets.php

     
    2121
    2222class BP_Blogs_Recent_Posts_Widget extends WP_Widget {
    2323
    24         function bp_blogs_recent_posts_widget() {
    25                 $this->__construct();
    26         }
    27 
    2824        function __construct() {
    2925                parent::__construct( false, $name = __( 'Recent Networkwide Posts', 'buddypress' ) );
    3026        }
  • bp-blogs/bp-blogs-classes.php

     
    2222        var $user_id;
    2323        var $blog_id;
    2424
    25         function bp_blogs_blog( $id = null ) {
    26                 $this->__construct( $id );
    27         }
    28 
    2925        function __construct( $id = null ) {
    3026                if ( !empty( $id ) ) {
    3127                        $this->id = $id;
  • bp-forums/bp-forums-bbpress-sa.php

     
    144144        class BPDB extends WPDB {
    145145                var $db_servers = array();
    146146
    147                 function BPDB( $dbuser, $dbpassword, $dbname, $dbhost ) {
    148                         $this->__construct( $dbuser, $dbpassword, $dbname, $dbhost );
    149                 }
    150 
    151147                function __construct( $dbuser, $dbpassword, $dbname, $dbhost ) {
    152148                        parent::__construct( $dbuser, $dbpassword, $dbname, $dbhost );
    153149
  • bp-forums/bp-forums-template.php

     
    414414                // When skipping the sticky logic, just pull up the forum topics like usual
    415415                $forum_template = new BP_Forums_Template_Forum( $type, $forum_id, $user_id, $page, $per_page, $max, 'all', $search_terms );
    416416        }
    417 
     417
    418418        return apply_filters( 'bp_has_topics', $forum_template->has_topics(), $forum_template );
    419419}
    420420
     
    479479}
    480480        function bp_get_the_topic_poster_avatar( $args = '' ) {
    481481                global $forum_template;
    482 
     482
    483483                $defaults = array(
    484484                        'type'   => 'thumb',
    485485                        'width'  => false,
     
    574574}
    575575        function bp_get_the_topic_object_avatar( $args = '' ) {
    576576                global $forum_template;
    577 
     577
    578578                if ( !isset( $forum_template->topic->object_id ) )
    579579                        return false;
    580580
     
    992992        var $sort_by;
    993993        var $order;
    994994
    995         function BP_Forums_Template_Topic( $topic_id, $per_page, $max, $order ) {
    996                 $this->__construct( $topic_id, $per_page, $max, $order );
    997         }
    998 
    999995        function __construct( $topic_id, $per_page, $max, $order ) {
    1000996                global $bp, $current_user, $forum_template;
    1001997
  • bp-groups/bp-groups-template.php

     
    16841684        var $pag_links;
    16851685        var $total_group_count;
    16861686
    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 
    16911687        function __construct( $group_id, $per_page, $max, $exclude_admins_mods, $exclude_banned, $exclude ) {
    16921688
    16931689                $this->pag_page = isset( $_REQUEST['mlpage'] ) ? intval( $_REQUEST['mlpage'] ) : 1;
     
    24072403        var $pag_links;
    24082404        var $total_request_count;
    24092405
    2410         function bp_groups_membership_requests_template( $group_id, $per_page, $max ) {
    2411                 $this->__construct( $group_id, $per_page, $max );
    2412         }
    2413 
    2414 
    24152406        function __construct( $group_id, $per_page, $max ) {
    24162407
    24172408                $this->pag_page = isset( $_REQUEST['mrpage'] ) ? intval( $_REQUEST['mrpage'] ) : 1;
     
    25782569        var $pag_links;
    25792570        var $total_invite_count;
    25802571
    2581         function bp_groups_invite_template( $user_id, $group_id ) {
    2582                 $this->__construct( $user_id, $group_id );
    2583         }
    2584 
    25852572        function __construct( $user_id, $group_id ) {
    25862573                $this->invites      = groups_get_invites_for_group( $user_id, $group_id );
    25872574                $this->invite_count = count( $this->invites );