Skip to content
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

Open
wants to merge 39 commits into
base: release
Choose a base branch
from
Open

PROD-8099 #4530

wants to merge 39 commits into from

Conversation

jitendrabanjara1991
Copy link
Collaborator

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

  • Ensure the IDs (i.e. PROD-1) of all associated Jira issues are reference in this PR’s title
  • Ensure that you have achieved the Definition of Done before submitting for review
  • When this PR is ready for review, move the associate Jira issue(s) to “Needs Review” (or “Code Review” for Dev Tasks)

Notes to Reviewer

  • Ensure that the Definition of Done have been achieved before approving a PR
  • When this PR is approved, move the associated Jira issue(s) to “Needs QA” (or “Approved” for Dev Tasks)

jitendrabanjara1991 and others added 30 commits October 10, 2024 14:11
- 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
Copy link
Collaborator Author

@jitendrabanjara1991 jitendrabanjara1991 left a 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();
Copy link
Collaborator Author

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

Comment on lines 132 to 133
$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 ) );
Copy link
Collaborator Author

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() {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
function bp_media_get_total_album_count() {
function bb_media_get_total_album_count() {

Comment on lines +860 to +867
/**
* 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 );
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/**
* 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() {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
function() {
function () {

Comment on lines +206 to +207
'singular' => esc_html( 'Album', 'buddyboss' ),
'plural' => esc_html( 'Albums', 'buddyboss' ),
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'singular' => esc_html( 'Album', 'buddyboss' ),
'plural' => esc_html( 'Albums', 'buddyboss' ),
'singular' => esc_html__( 'Album', 'buddyboss' ),
'plural' => esc_html__( 'Albums', 'buddyboss' ),

Comment on lines +210 to +211
'singular' => esc_html( 'Photo', 'buddyboss' ),
'plural' => esc_html( 'Photos', 'buddyboss' ),
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'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();
Copy link
Collaborator Author

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 ) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
} 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 ) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
} else if( 'groups' === dir_scope ) {
} else if ( 'groups' === dir_scope ) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants