Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/16/2011 04:47:36 PM (15 years ago)
Author:
djpaul
Message:

Add PHP5-style constructors to classes. Fixes #3148, props Backie

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-widgets.php

    r4088 r4211  
    1212
    1313class BP_Core_Members_Widget extends WP_Widget {
     14
    1415        function bp_core_members_widget() {
     16                $this->__construct();
     17        }
     18
     19        function __construct() {
    1520                $widget_ops = array( 'description' => __( 'A dynamic list of recently active, popular, and newest members', 'buddypress' ) );
    16                 parent::WP_Widget( false, $name = __( 'Members', 'buddypress' ), $widget_ops );
     21                parent::__construct( false, $name = __( 'Members', 'buddypress' ), $widget_ops );
    1722
    1823                if ( is_active_widget( false, false, $this->id_base ) ) {
     
    135140
    136141class BP_Core_Whos_Online_Widget extends WP_Widget {
     142
    137143        function bp_core_whos_online_widget() {
     144                $this->__construct();
     145        }
     146
     147        function __construct() {
    138148                $widget_ops = array( 'description' => __( 'Avatars of users who are currently online', 'buddypress' ) );
    139                 parent::WP_Widget( false, $name = __( "Who's Online Avatars", 'buddypress' ), $widget_ops );
     149                parent::__construct( false, $name = __( "Who's Online Avatars", 'buddypress' ), $widget_ops );
    140150        }
    141151
     
    199209
    200210class BP_Core_Recently_Active_Widget extends WP_Widget {
     211
    201212        function bp_core_recently_active_widget() {
     213                $this->__construct();
     214        }
     215
     216        function __construct() {
    202217                $widget_ops = array( 'description' => __( 'Avatars of recently active members', 'buddypress' ) );
    203                 parent::WP_Widget( false, $name = __( 'Recently Active Member Avatars', 'buddypress' ), $widget_ops );
     218                parent::__construct( false, $name = __( 'Recently Active Member Avatars', 'buddypress' ), $widget_ops );
    204219        }
    205220
Note: See TracChangeset for help on using the changeset viewer.