Replies
- Brajesh Singh on March 17, 2023 at 9:27 am in reply to: [Resolved] Question about visibility of profile fields (in the wp database) #48807
Hi Mike,
Thank you for the question.The data is stored in user meta as serialized array(field id=> viability level). I am unable to suggest a nice way to query it.
Please take a look at the meta key ‘bp_xprofile_visibility_levels’ in user meta.Regards
Brajesh - Brajesh Singh on March 17, 2023 at 7:16 am in reply to: [Resolved] Reasons Not to Migrate to NING #48806This reply has been marked as private.
- Brajesh Singh on March 16, 2023 at 8:47 pm in reply to: [Resolved] Reasons Not to Migrate to NING #48803This reply has been marked as private.
- Brajesh Singh on March 16, 2023 at 8:46 pm in reply to: [Resolved] udyPress Auto Activate Auto Login Redirect conflict with Recaptcha #48802
Hi Quentin,
Thank you for using our plugin.Please link me to the captcha plugin you are using and we will do our best to have compatibility.
Thank you
Brajesh - Brajesh Singh on March 16, 2023 at 5:50 pm in reply to: [Resolved] Display GROUPS Alphabetically in List #48801
Hi Dianne,
Thank you for your patience.Please remove the old code and use the following.
/** * Returns a list of user links sorted alphabetically. * * @param array $group_users user ids. * * @return string */ function bp_custom_get_alpha_sorted_user_links( $group_users ) { if ( empty( $group_users ) ) { return ''; } $group_user_ids = wp_list_pluck( $group_users, 'user_id' ); $users = get_users( array( 'include' => $group_user_ids, 'orderby' => 'display_name', 'order' => 'ASC', ) ); $markup = ''; foreach ( $users as $user ) { $markup .= sprintf( '<a href="%1$s" class="custom-user-group-user-link">%2$s</a>', esc_url( bp_core_get_user_domain( $user->ID ) ), bp_core_get_user_displayname( $user->ID ) ); } return $markup; } function user_world_memberships( $atts, $content = '' ) { $atts = shortcode_atts( array( 'user_id' => bp_displayed_user_id(), 'type' => 'alphabetical', 'order' => 'ASC', 'page' => 1, 'per_page' => - 1, 'group_type' => '', 'group_type__in' => '', 'group_type__not_in' => '', 'group_role' => '', // 'admin' , 'mod', 'member'. 'list_admins' => 0, ), $atts, 'member_worlds' ); $list_admins = (bool) $atts['list_admins']; $user_groups = array(); if ( 'admin' === $atts['group_role'] ) { $user_groups = bp_get_user_groups( $atts['user_id'], array( 'is_admin' => true, 'per_page' => $atts['per_page'], 'page' => $atts['page'], ) ); } elseif ( 'mod' === $atts['group_role'] ) { $user_groups = bp_get_user_groups( $atts['user_id'], array( 'is_mod' => true, 'per_page' => $atts['per_page'], 'page' => $atts['page'], ) ); } if ( in_array( $atts['group_role'], array( 'admin', 'mod' ), true ) ) { if ( empty( $user_groups ) ) { return ''; } $group_ids = array_keys( $user_groups ); $atts['include'] = $group_ids; unset( $atts['user_id'] ); } $groups = groups_get_groups( $atts ); $groups = $groups['groups']; if ( empty( $groups ) ) { return ''; } $list = ''; foreach ( $groups as $group ) { $admin_markup = ''; if ( $list_admins ) { $admin_markup = bp_custom_get_alpha_sorted_user_links( groups_get_group_admins( $group->id ) ); } $list .= sprintf( '<li><a title="View %1$s" href="%2$s" class="custom-user-group-group-link">%3$s</a>%4$s</li>', esc_attr( $group->name ), esc_url( bp_get_group_permalink( $group ) ), esc_html( $group->name ), $admin_markup ); } if ( ! empty( $list ) ) { $list = "<ul class='custom-user-group-list'>{$list}</ul>"; } return $list; } add_shortcode('member_worlds', 'user_world_memberships');
You can pass group_role and list_admins options to list specific groups as in your initial requirement. It should handle most of the earlier use case.
Regards
Brajesh - Brajesh Singh on March 15, 2023 at 5:28 pm in reply to: [Resolved] How desactivate the link in icone galery on galeries tab ? #48799
Hi,
Thank you for using MediaPress.Please visit Dashboard->MediaPress->Settings->Theming tab and look for “Lightbox Settings”.
You can disable lightbox from various section there.Regards
Brajesh Hi Russel,
Thank you.
The filter is correct though we made a typo in the plugin while adding this filter.I will suggest going bp-custom.php route to avoid any surprise change in future.
Regards
Brajesh- Brajesh Singh on March 15, 2023 at 11:15 am in reply to: [Resolved] Display GROUPS Alphabetically in List #48793This reply has been marked as private.
Hi Nik,
Thank you for the detailed reporting of the issue.Please allow me to check this today and get back to you in next 24 hours.
Regards
BrajeshHi Russel,
Thank you for the question.
yes, the bp-custom.php is in wp-content/plugins directory.Please link me to the post/topic in context to allow check the issue with filter.
Thank you
Brajesh