WP Manifestindependent plugin directory
manifest / users / bp-nearby-members

BP Nearby Members

A premium WordPress plugin that adds geolocation-based member discovery to BuddyPress. Find and connect with members nearby using an interactive map.

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/divangrastogi/bp-nearby-members/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

A premium WordPress plugin that adds geolocation-based member discovery to BuddyPress. Find and connect with members nearby using an interactive map.

Features

  • Interactive Map: Display nearby members on a responsive map
  • Geolocation Support: Automatic location detection and manual address search
  • Advanced Filtering: Filter by distance, online status, gender, interests
  • Multiple Map Providers: Support for Leaflet (free) and Google Maps
  • REST API: Full REST API for integration with other systems
  • Privacy Controls: Granular privacy settings for location sharing
  • Performance Optimized: Caching, lazy loading, and database optimization
  • Translation Ready: Full internationalization support
  • Accessibility: WCAG 2.1 AA compliant

Installation

  1. Upload the bp-nearby-members folder to /wp-content/plugins/
  2. Activate the plugin through the WordPress admin
  3. Configure settings under Settings > BP Nearby Members
  4. Add the shortcode [bp_nearby_members] to any page

Requirements

  • WordPress 6.0+
  • BuddyPress 12.0+
  • PHP 7.4+
  • MySQL 5.6+

Configuration

Basic Setup

  1. Go to Settings > BP Nearby Members
  2. Configure general settings (default location, radius, etc.)
  3. Set up geocoding provider (OpenStreetMap recommended for free usage)
  4. Configure privacy settings

Advanced Configuration

  • Geocoding: Choose between OpenStreetMap, Google Maps, or Mapbox
  • Map Provider: Select Leaflet for free usage or Google Maps for premium features
  • Caching: Adjust cache duration for performance optimization
  • API Keys: Add API keys for premium geocoding/map services

Usage

Shortcodes

[bp_nearby_members radius="10" height="500px"]

PHP Code

<?php
$query = BPNM_Query::get_instance();
$members = $query->get_nearby_members(array(
    'latitude' => 28.6139,
    'longitude' => 77.2090,
    'radius' => 10
));
?>

REST API

GET /wp-json/bp-nearby/v1/members?lat=28.6139&lng=77.2090&radius=10

Hooks & Filters

Actions

  • bpnm_before_location_update - Before updating user location
  • bpnm_after_location_update - After updating user location
  • bpnm_geocode_failed - When geocoding fails
  • bpnm_map_loaded - When map is loaded

Filters

  • bpnm_nearby_members_query_args - Modify query arguments
  • bpnm_marker_icon_url - Customize marker icons
  • bpnm_member_distance_display - Format distance display
  • bpnm_geocoding_provider - Change geocoding provider
  • bpnm_max_search_radius - Set maximum search radius

Templates

Override templates by creating files in your theme:

your-theme/
├── bp-nearby-members/
│   ├── nearby-members-map.php
│   ├── nearby-members-list.php
│   └── member-location-settings.php

Security

  • All inputs are sanitized and validated
  • Nonces used for all AJAX requests and forms
  • Prepared statements for all database queries
  • Capability checks for all operations
  • Output escaping for security

Performance

  • Database queries optimized with bounding box pre-filtering
  • Object caching for frequently accessed data
  • Lazy loading for map assets
  • Minified CSS/JS in production

Privacy & GDPR

  • Location sharing is opt-in by default
  • Users can control location visibility
  • Data export functionality available
  • Automatic data cleanup on uninstall

Troubleshooting

Common Issues

  1. Map not loading: Check console for JavaScript errors
  2. Geocoding failing: Verify API keys and provider settings
  3. No members showing: Check location sharing settings
  4. Performance issues: Adjust caching settings

Debug Mode

Enable debugging by adding to wp-config.php:

define('BPNM_DEBUG', true);

Changelog

1.0.0

  • Initial release
  • Basic geolocation functionality
  • Map integration
  • REST API
  • Admin settings

Support

For support, please visit the support forum or contact WBCom Designs.

License

GPL-2.0+

Credits

Developed by WBCom Designs