Skip to:
Content

BuddyPress.org

Ticket #6096: 6096.patch

File 6096.patch, 2.4 KB (added by imath, 5 years ago)
  • src/bp-friends/bp-friends-widgets.php

    diff --git src/bp-friends/bp-friends-widgets.php src/bp-friends/bp-friends-widgets.php
    index 450bb23..6625983 100644
    class BP_Core_Friends_Widget extends WP_Widget { 
    5959         * @param array $instance The widget settings, as saved by the user.
    6060         */
    6161        function widget( $args, $instance ) {
     62                global $members_template;
     63                $reset_members_template = $members_template;
     64
    6265                extract( $args );
    6366
    6467                if ( ! bp_displayed_user_id() ) {
    class BP_Core_Friends_Widget extends WP_Widget { 
    146149
    147150                <?php echo $after_widget; ?>
    148151        <?php
     152                // Reset the members template global
     153                $members_template = $reset_members_template;
    149154        }
    150155
    151156        /**
  • src/bp-members/bp-members-widgets.php

    diff --git src/bp-members/bp-members-widgets.php src/bp-members/bp-members-widgets.php
    index c36e710..2e9eab9 100644
    class BP_Core_Members_Widget extends WP_Widget { 
    5353         * @param array $instance Widget settings, as saved by the user.
    5454         */
    5555        function widget( $args, $instance ) {
     56                global $members_template;
     57                $reset_members_template = $members_template;
    5658
    5759                extract( $args );
    5860
    class BP_Core_Members_Widget extends WP_Widget { 
    131133
    132134                <?php echo $after_widget; ?>
    133135        <?php
     136                // Reset the members template global
     137                $members_template = $reset_members_template;
    134138        }
    135139
    136140        /**
    class BP_Core_Whos_Online_Widget extends WP_Widget { 
    218222         * @param array $instance Widget settings, as saved by the user.
    219223         */
    220224        function widget($args, $instance) {
     225                global $members_template;
     226                $reset_members_template = $members_template;
    221227
    222228                extract( $args );
    223229
    class BP_Core_Whos_Online_Widget extends WP_Widget { 
    257263
    258264                <?php echo $after_widget; ?>
    259265        <?php
     266                // Reset the members template global
     267                $members_template = $reset_members_template;
    260268        }
    261269
    262270        /**
    class BP_Core_Recently_Active_Widget extends WP_Widget { 
    324332         * @param array $instance Widget settings, as saved by the user.
    325333         */
    326334        function widget( $args, $instance ) {
     335                global $members_template;
     336                $reset_members_template = $members_template;
    327337
    328338                extract( $args );
    329339
    class BP_Core_Recently_Active_Widget extends WP_Widget { 
    363373
    364374                <?php echo $after_widget; ?>
    365375        <?php
     376                // Reset the members template global
     377                $members_template = $reset_members_template;
    366378        }
    367379
    368380        /**