Skip to content

Instantly share code, notes, and snippets.

View vapvarun's full-sized avatar
👋
AI Developer & WordPress Expert. Building MCP servers & Plugins

Varun Kumar Dubey vapvarun

👋
AI Developer & WordPress Expert. Building MCP servers & Plugins
View GitHub Profile
@vapvarun
vapvarun / buddyboss-active-inactive-filter.php
Last active October 30, 2025 07:31
BuddyBoss Members Directory Filter - Add Active/Inactive Members dropdown options to filter members
<?php
/**
* BuddyBoss - Active/Inactive Members Filter for Members Directory
* Add "Active Members" and "Inactive Members" dropdown filter options
*/
/**
* Custom: Add "Active Members" and "Inactive Members" to member directory filter dropdown
*/
add_filter( 'bp_nouveau_get_members_filters', 'buddyboss_child_add_activity_filter_options', 10, 2 );
@vapvarun
vapvarun / README.md
Created October 30, 2025 07:37
BuddyBoss Active/Inactive Members Filter - Complete implementation with dropdown filters and optional visual badges for Members Directory

BuddyBoss Active/Inactive Members Filter

Complete implementation for adding Active/Inactive member filters to BuddyBoss Members Directory.

Features

  1. Dropdown Filter - Adds "Active Members" and "Inactive Members" options to the members directory filter dropdown
  2. Smart Filtering - Filters members based on whether they have activity in the bp_activity table
  3. Visual Badges (Optional) - Displays Active/Inactive status badges on member cards
@vapvarun
vapvarun / INSTALLATION.md
Created October 30, 2025 07:38
BuddyBoss Active/Inactive Members Directory Filter - Complete working implementation with dropdown filters and optional status badges

BuddyBoss Active/Inactive Members Filter - Installation Guide

This implementation adds "Active Members" and "Inactive Members" filter options to the BuddyBoss Members Directory.

What It Does

  • Active Members: Shows members who have activity records in the bp_activity table (posts, comments, updates, etc.)
  • Inactive Members: Shows members who have NO activity records
  • Visual Badges: (Optional) Displays Active/Inactive status badges on member cards
@vapvarun
vapvarun / INSTALLATION.md
Created October 30, 2025 07:44
BuddyBoss Active/Inactive Members Filter - Based on LOGIN STATUS (never logged in vs logged in before)

BuddyBoss Active/Inactive Members Filter - Installation Guide

This implementation adds "Active Members" and "Inactive Members" filter options to the BuddyBoss Members Directory based on LOGIN STATUS.

What It Does

  • Active Members: Shows members who have logged in at least once (have last_activity meta)
  • Inactive Members: Shows members who have NEVER logged in (no last_activity meta)
  • Visual Badges: (Optional) Displays Active/Inactive status badges on member cards
@vapvarun
vapvarun / INSTALLATION.md
Created October 30, 2025 07:49
BuddyBoss Active/Inactive Members Filter - OPTIMIZED for large sites (100k+ users) - Efficient SQL with JOINs

BuddyBoss Active/Inactive Members Filter - Installation Guide

This implementation adds "Active Members" and "Inactive Members" filter options to the BuddyBoss Members Directory based on LOGIN STATUS.

What It Does

  • Active Members: Shows members who have logged in at least once (have last_activity meta)
  • Inactive Members: Shows members who have NEVER logged in (no last_activity meta)
  • Visual Badges: (Optional) Displays Active/Inactive status badges on member cards
@vapvarun
vapvarun / INSTALLATION.md
Created October 30, 2025 07:55
BuddyBoss Active/Inactive Members Filter - FIXED & OPTIMIZED - Uses bp_activity table, includes All Members filter

BuddyBoss Active/Inactive Members Filter - Installation Guide

This implementation adds "Active Members" and "Inactive Members" filter options to the BuddyBoss Members Directory based on LOGIN STATUS.

What It Does

  • Active Members: Shows members who have logged in at least once (have last_activity meta)
  • Inactive Members: Shows members who have NEVER logged in (no last_activity meta)
  • Visual Badges: (Optional) Displays Active/Inactive status badges on member cards
@vapvarun
vapvarun / fix-sensei-inner-blocks.php
Last active February 10, 2026 09:56
Fix Sensei Interactive Blocks breakpoints not displaying on frontend (wpautop corrupts inner-blocks comments)
<?php
/**
* Plugin Name: Fix Sensei Interactive Blocks - wpautop Conflict
* Description: Fixes Sensei Pro Interactive Video breakpoints not rendering on the frontend when used with LearnDash.
* Version: 1.0.0
* Author: vapvarun
*
* == Problem ==
* WordPress's `wpautop` filter (priority 10 on `the_content`) wraps
* `<!--sensei:inner-blocks-->` HTML comments in <p> tags, producing:
@vapvarun
vapvarun / 01-xprofile-tables.php
Created February 23, 2026 16:33
Custom BuddyPress Profile Fields - xprofile API Developer Guide (bpcustomdev.com)
<?php
// Core xprofile tables in the database
global $wpdb;
$bp = buddypress();
$groups_table = $bp->profile->table_name_groups; // bp_xprofile_groups
$fields_table = $bp->profile->table_name_fields; // bp_xprofile_fields
$data_table = $bp->profile->table_name_data; // bp_xprofile_data
@vapvarun
vapvarun / 01-settings-blocks-structure.json
Created February 23, 2026 16:39
theme.json Per-Block Settings Guide - Control Editor Experience (brndle.com)
{
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 3,
"settings": {
"color": {
"palette": [...]
},
"blocks": {
"core/paragraph": {
"color": {
@vapvarun
vapvarun / 01-register-notification-component.php
Created February 23, 2026 17:23
Building Custom BuddyPress Notifications - Developer Tutorial (bpcustomdev.com)
<?php
/**
* Register a custom notification component with BuddyPress.
* Add this to your plugin's main file or functions.php.
*/
function myplugin_register_notification_component() {
// Register your plugin as a notification source
buddypress()->myplugin_notifications = new stdClass();
buddypress()->myplugin_notifications->id = 'myplugin_notifications';
buddypress()->myplugin_notifications->notification_callback = 'myplugin_format_notifications';