-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PROD-8099 #4530
base: release
Are you sure you want to change the base?
PROD-8099 #4530
Conversation
- Updated admin settings to conditionally display member counts based on the user's preference. - Prevented passing count data in AJAX requests when the count setting is disabled.
…ack args as not required - remove callback args as not required for User Count
…tory count option for existing installations.
…is is also consider as directory. - Also, "groups_total_groups_for_user( bp_displayed_user_id() )" remove this one because count is getting using this function "bb_group_directory_count_enable"
- Hide count for subgroups when 'Group Count' is disable
…. Its reflect in the API for group details
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yudhisthirnahar
Please check all changes
// Add 'Connections' to the main navigation. | ||
$count = friends_get_total_friend_count(); | ||
$class = ( 0 === $count ) ? 'no-count' : 'count'; | ||
$enable_count = bb_member_directory_count_enable(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yudhisthirnahar
Remove this, as it is not used anywhere in this function
$atts = apply_filters( 'bp_learndash_user_courses_atts', array() ); | ||
$user_courses = apply_filters( 'bp_learndash_user_courses', ld_get_mycourses( $this->bp_displayed_user_id, $atts ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yudhisthirnahar
After making the new changes, it is no longer used in this function, so please remove it.
* | ||
* @return int album count of the user. | ||
*/ | ||
function bp_media_get_total_album_count() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function bp_media_get_total_album_count() { | |
function bb_media_get_total_album_count() { |
/** | ||
* Filters the total media count for a given user. | ||
* | ||
* @param int $count Total media count for a given user. | ||
* | ||
* @since BuddyBoss 1.0.0 | ||
*/ | ||
return apply_filters( 'bp_media_get_total_album_count', (int) $count ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** | |
* Filters the total media count for a given user. | |
* | |
* @param int $count Total media count for a given user. | |
* | |
* @since BuddyBoss 1.0.0 | |
*/ | |
return apply_filters( 'bp_media_get_total_album_count', (int) $count ); | |
/** | |
* Filters the total media count for a given user. | |
* | |
* @since BuddyBoss [BBVERSION] | |
* | |
* @param int $count Total media count for a given user. | |
*/ | |
return apply_filters( 'bb_media_get_total_album_count', (int) $count ); |
}, 0 ); | ||
add_action( | ||
'admin_init', | ||
function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function() { | |
function () { |
'singular' => esc_html( 'Album', 'buddyboss' ), | ||
'plural' => esc_html( 'Albums', 'buddyboss' ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'singular' => esc_html( 'Album', 'buddyboss' ), | |
'plural' => esc_html( 'Albums', 'buddyboss' ), | |
'singular' => esc_html__( 'Album', 'buddyboss' ), | |
'plural' => esc_html__( 'Albums', 'buddyboss' ), |
'singular' => esc_html( 'Photo', 'buddyboss' ), | ||
'plural' => esc_html( 'Photos', 'buddyboss' ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'singular' => esc_html( 'Photo', 'buddyboss' ), | |
'plural' => esc_html( 'Photos', 'buddyboss' ), | |
'singular' => esc_html__( 'Photo', 'buddyboss' ), | |
'plural' => esc_html__( 'Photos', 'buddyboss' ), |
@@ -17,16 +17,17 @@ | |||
* @return array An associative array of nav items. | |||
*/ | |||
function bp_nouveau_get_members_directory_nav_items() { | |||
$nav_items = array(); | |||
$enable_count = bb_member_directory_count_enable(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yudhisthirnahar
Remove this, as it is not used anywhere in this function.
dir_count = response.data.media_all_count; | ||
} else if ( 'personal' === dir_scope ) { | ||
dir_count = response.data.media_personal_count; | ||
} else if( 'groups' === dir_scope ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} else if( 'groups' === dir_scope ) { | |
} else if ( 'groups' === dir_scope ) { |
dir_count = response.data.video_all_count; | ||
} else if ( 'personal' === dir_scope ) { | ||
dir_count = response.data.video_personal_count; | ||
} else if( 'groups' === dir_scope ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} else if( 'groups' === dir_scope ) { | |
} else if ( 'groups' === dir_scope ) { |
Jira Issue:
https://buddyboss.atlassian.net/browse/PROD-8052
https://buddyboss.atlassian.net/browse/PROD-8099
General Note
Keep all conversations related to this PR in the associated Jira issue(s). Do NOT add comment on this PR or edit this PR’s description.
Notes to Developer
Notes to Reviewer