Skip to content

Commit

Permalink
Fixed fatal error with bb platform
Browse files Browse the repository at this point in the history
  • Loading branch information
vapvarun committed Oct 25, 2021
1 parent 7035b26 commit 94cd8dd
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 21 deletions.
52 changes: 34 additions & 18 deletions buddypress/members/single/home.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,51 @@
*/
?>

<?php bp_nouveau_member_hook( 'before', 'home_content' ); ?>
<?php bp_nouveau_member_hook( 'before', 'home_content' ); ?>

<div id="item-header" role="complementary" data-bp-item-id="<?php echo esc_attr( bp_displayed_user_id() ); ?>" data-bp-item-component="members" class="users-header single-headers">
<div id="item-header" role="complementary" data-bp-item-id="<?php echo esc_attr( bp_displayed_user_id() ); ?>" data-bp-item-component="members" class="users-header single-headers">

<?php bp_nouveau_member_header_template_part(); ?>
<?php bp_nouveau_member_header_template_part(); ?>

</div><!-- #item-header -->

<div class="site-wrapper member-home">
<div class="bp-wrap">
<?php if ( ! bp_nouveau_is_object_nav_in_sidebar() ) : ?>
</div><!-- #item-header -->

<?php bp_get_template_part( 'members/single/parts/item-nav' ); ?>
<div class="site-wrapper member-home">
<div class="bp-wrap">
<?php if ( ! bp_nouveau_is_object_nav_in_sidebar() ) : ?>

<?php endif; ?>
<?php bp_get_template_part( 'members/single/parts/item-nav' ); ?>

<div id="item-body" class="item-body">
<?php endif; ?>

<div id="item-body" class="item-body">

<?php bp_nouveau_member_template_part(); ?>
<?php bp_nouveau_member_template_part(); ?>

</div><!-- #item-body -->
</div><!-- // .bp-wrap -->
<?php if ( is_active_sidebar( 'single_member' ) && bp_is_user() && ! bp_is_user_settings() && ! bp_is_user_messages() && ! bp_is_user_notifications() && ! bp_is_user_profile_edit() && ! bp_is_user_change_avatar() && ! bp_is_user_change_cover_image() && ! bp_is_user_front() && !bp_has_members_invitations() ) : ?>
</div><!-- #item-body -->
</div><!-- // .bp-wrap -->
<?php
if ( function_exists( 'buddypress' ) && buddypress()->buddyboss ) {
if ( is_active_sidebar( 'single_member' ) && bp_is_user() && ! bp_is_user_settings() && ! bp_is_user_messages() && ! bp_is_user_notifications() && ! bp_is_user_profile_edit() && ! bp_is_user_change_avatar() && ! bp_is_user_change_cover_image() && ! bp_is_user_front() ) {
?>
<aside id="secondary" class="primary-sidebar widget-area">
<div class="sticky-sidebar">
<?php dynamic_sidebar( 'single_member' ); ?>
</div>
</aside>
<?php endif; ?>
</div><!-- .site-wrapper -->
<?php
}
} elseif ( class_exists( 'BuddyPress' ) ) {
if ( is_active_sidebar( 'single_member' ) && bp_is_user() && ! bp_is_user_settings() && ! bp_is_user_messages() && ! bp_is_user_notifications() && ! bp_is_user_profile_edit() && ! bp_is_user_change_avatar() && ! bp_is_user_change_cover_image() && ! bp_is_user_front() && function_exists( 'bp_is_members_invitations_screen' ) && ! bp_is_members_invitations_screen() ) {
?>
<aside id="secondary" class="primary-sidebar widget-area">
<div class="sticky-sidebar">
<?php dynamic_sidebar( 'single_member' ); ?>
</div>
</aside>
<?php
}
}
?>
</div><!-- .site-wrapper -->

<?php bp_nouveau_member_hook( 'after', 'home_content' ); ?>
<?php bp_nouveau_member_hook( 'after', 'home_content' ); ?>
10 changes: 8 additions & 2 deletions inc/Sidebars/Component.php
Original file line number Diff line number Diff line change
Expand Up @@ -532,11 +532,17 @@ public function filter_body_classes( array $classes ) : array {
}

// Single Member Sidebar
if ( class_exists( 'BuddyPress' ) ) {
if ( is_active_sidebar('single_member') && bp_is_user() && !bp_is_user_settings() && !bp_is_user_messages() && !bp_is_user_notifications() && !bp_is_user_profile_edit() && !bp_is_user_change_avatar() && !bp_is_user_change_cover_image() && !bp_is_user_front() && !bp_has_members_invitations() ) {
if ( function_exists( 'buddypress' ) && buddypress()->buddyboss ) {
if ( is_active_sidebar( 'single_member' ) && bp_is_user() && ! bp_is_user_settings() && ! bp_is_user_messages() && ! bp_is_user_notifications() && ! bp_is_user_profile_edit() && ! bp_is_user_change_avatar() && ! bp_is_user_change_cover_image() && ! bp_is_user_front() ) {
$classes[] = 'has-single-member-sidebar';
}
} elseif ( class_exists( 'BuddyPress' ) ) {
if ( is_active_sidebar( 'single_member' ) && bp_is_user() && ! bp_is_user_settings() && ! bp_is_user_messages() && ! bp_is_user_notifications() && ! bp_is_user_profile_edit() && ! bp_is_user_change_avatar() && ! bp_is_user_change_cover_image() && ! bp_is_user_front() && function_exists( 'bp_is_members_invitations_screen' ) && ! bp_is_members_invitations_screen() ) {
$classes[] = 'has-single-member-sidebar';
}
}

if ( class_exists( 'BuddyPress' ) ) {
// Single Group Sidebar
if ( is_active_sidebar( 'single_group' ) && bp_is_group() ) {
$classes[] = 'has-single-group-sidebar';
Expand Down
3 changes: 3 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ Copyright 2013 Klaus Hartl
Released under the MIT license

== Changelog ==
= 4.2.5 =
* Fix: Fixed fatal error with bb platform

= 4.2.4 =
* Fix: (#347, #348) Managed members invitation pending Invites UI and fixes
* Fix: Fixed undefined variable error
Expand Down
2 changes: 1 addition & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Theme URI: https://wbcomdesigns.com/downloads/buddyx-theme/
Author: wbcomdesigns,vapvarun
Author URI: https://github.com/vapvarun/buddyx
Description: BuddyX is an ideal theme for community and membership websites. Providing a solution to all kinds of communities. Thanks to it's BuddyPress support, your website can now have member profiles, send a private message, create groups and so much more. It is a lightweight, fully responsive, seo optimised, RTL & translation ready theme. BuddyX provides support for WooCommerce, WC Vendors, LearnDash, LearnPress and Gamipress plugins. It is highly customizable and works perfectly with page builders such as Elementor and Gutenberg. BuddyX is perfect for creating social learning, marketplace and blogging websites using BuddyPress integration. BuddyX is built using the latest best practices for progressive web content and optimization. It is well tested with the latest BuddyPress version and popular BuddyPress addons. It is developed, maintained, and supported by Wbcom Designs.
Version: 4.2.4
Version: 4.2.5
Requires at least: 4.8
Tested up to: 5.8.1
Requires PHP: 7.0
Expand Down

0 comments on commit 94cd8dd

Please sign in to comment.