Database Schema
BuddyPress Status stores all data in two standard WordPress mechanisms: the wp_options table (for site-wide configuration) and wp_usermeta (for per-user status data). No custom database tables are created.
WordPress Options
Section titled “WordPress Options”bpsts_gnrl_settings
Section titled “bpsts_gnrl_settings”The main settings array. Written by the admin General tab and set to defaults on plugin activation.
array( 'prof_pg_dis_icon' => 'yes', // Show status form on profile pages ('yes'|'no') 'directory_dis_status' => 'yes', // Show status in members directory ('yes'|'no') 'feeling_activity' => 'yes', // Enable feeling/activity feature ('yes'|'no') 'user_role' => array( // Roles allowed to post statuses 'editor', 'author', 'contributor', 'subscriber', // All non-administrator roles by default ),)Administrators are always allowed to post; the user_role array controls all other roles.
bpsts_global_statuses
Section titled “bpsts_global_statuses”An indexed array of status suggestion strings shown to members as quick-select options. Managed from the Global Status admin tab.
array( 'Working from home 🏠', 'Feeling grateful 🙏', 'On a coffee break ☕', // ...)When empty, the plugin falls back to a built-in set of 20 default suggestions. See buddypress_status_get_default_global_statuses().
bpsts_feeling_activities
Section titled “bpsts_feeling_activities”An associative array of custom activity categories. Each key is a slug; each value is an array with title, question, and optionally icon and disabled.
array( 'celebrating' => array( 'title' => 'Celebrating', 'question' => 'What are you celebrating?', 'icon' => 'fa-star', // Font Awesome class // 'disabled' => true // Omit or false to show; true to hide ), // ...)When empty, the plugin falls back to the built-in list returned by buddypress_status_mood_categories(). See the Hooks and Filters reference for the bpsts_feeling_activities filter.
User Meta Fields
Section titled “User Meta Fields”All fields are stored in wp_usermeta keyed by user ID.
bpsts_saved_status
Section titled “bpsts_saved_status”An associative array of all statuses the user has saved. Keys are generated as status-{timestamp} (e.g., status-1717780800). Values are the sanitized status text strings.
array( 'status-1717780800' => 'Working from home today', 'status-1717694400' => 'Catching up on emails', // ...)The array is capped at 10 entries. When a user saves an 11th status, the oldest entry (array_shift) is removed to make room.
bpsts_current_status
Section titled “bpsts_current_status”Stores the key (e.g., status-1717780800) of whichever saved status the user has set as active. When this value matches a key in bpsts_saved_status, that status row is marked with the bpsts-active-status CSS class on the profile page.
When a status is deleted and it was the current status, this meta is cleared.
bpsts_user_icon
Section titled “bpsts_user_icon”Stores the emoji the user has selected as their profile icon. The value is an associative array:
array( 'type' => 'emoji', // Always 'emoji' in current version 'unicode' => 'slightly-smiling-face', // Emoji slug key 'name' => 'Happy', // Display name 'category' => 'smileys_emotion', // One of the nine emoji categories)Allowed category values (validated server-side):
smileys_emotionpeople_bodyanimals_naturefood_drinkactivitiestravel_placesobjectssymbolsflags
Rate Limiting
Section titled “Rate Limiting”Rate limits are enforced via WordPress transients, not a custom table. The transient key pattern is:
bpsts_rate_{action}_{user_id}Two limits apply:
| Action | Transient suffix | Limit | Window |
|---|---|---|---|
| Adding a status | add_status |
10 saves | 60 seconds |
| Deleting a status | status_actions |
20 actions | 60 seconds |
The helper buddypress_status_is_rate_limited( $user_id, $action, $limit, $window ) checks and increments the transient count. buddypress_status_get_rate_limit_remaining( $user_id, $action ) returns the number of seconds until the window resets.
Object Cache
Section titled “Object Cache”The plugin writes to the WordPress object cache for two entries, both in the buddypress_status cache group:
| Cache key | Invalidated when |
|---|---|
bpsts_member_status_{user_id} |
Status is added or set as current |
bpsts_user_icon_{user_id} |
Icon is updated |
If your site uses a persistent object cache (Redis, Memcached), these entries are invalidated correctly via wp_cache_delete() on every write.
Reading Options and Meta in Code
Section titled “Reading Options and Meta in Code”// Get general settings (with empty-array default)$settings = get_option( 'bpsts_gnrl_settings' );
// Get a user's saved statuses$saved = get_user_meta( $user_id, 'bpsts_saved_status', true );
// Get active status key$current_key = get_user_meta( $user_id, 'bpsts_current_status', true );// Resolve to text:$current_text = isset( $saved[ $current_key ] ) ? $saved[ $current_key ] : '';
// Get icon$icon = get_user_meta( $user_id, 'bpsts_user_icon', true );The plugin also ships two utility functions:
// Returns the full saved-status array for a userbuddypress_status_get_global_statuses(); // site-wide suggestions
// Returns the feeling activities array (custom or default)buddypress_status_get_feeling_activities();
