Skip to content

Custom Code Overview — MU-Plugins, Snippets & Theme Overrides

Created 2026-03-27
Updated 2026-04-05
Tags infrastructuremu-pluginscode-snippetstechnicalbaseworkspractice-site

Inventory of all custom PHP across the Baseworks website ecosystem. Source files are in the changelog repo under sites/. This note covers what exists and why — for implementation details see the changelog files directly.

Code snippet plugin note: baseworks.com uses no code snippet plugin — snippets run as mu-plugins. practice.baseworks.com uses codesnippets.pro for snippets.


Custom post types (legacy — original site build)

Section titled “Custom post types (legacy — original site build)”
FilePurpose
baseworks-site-post-types.phpRegisters article custom post type
baseworks-site-events.phpRegisters event custom post type
baseworks-site-instructors.phpRegisters instructor custom post type

These predate Elementor and were built by the original developers. They register the post types the site still relies on.

FilePurpose
2025-01-04-open-day-checkout.phpStrips all billing fields except Name + Email for Open Day products; also adds product category body classes on checkout
baseworks-block-unpaid-thankyou.phpBlocks CartFlows thank-you page from showing for unpaid/abandoned orders (Affirm, Afterpay); cancels the order and redirects back to checkout
baseworks-limit-variations.phpLimits variable products to one variation per cart — adding a new variation replaces the existing one
baseworks-practice-sessions.phpSliding-scale pricing widget for Practice Sessions (product #47188), gated to WP Fusion tag 97. Shortcode: [practice_session_booking]
baseworks-session-booking.phpCredit-based booking dashboard for programs. Shortcode: [bw_booking_dashboard program="ps_spring_2026"]
FilePurpose
bw-four-layer-cache-purge.phpAdmin bar button that clears all cache layers at once: Nginx FastCGI, Redis, Perfmatters, Cloudflare
cloudflare-auto-purge.phpAuto-purges Cloudflare when nginx-helper clears local cache; also purges listing pages when posts are saved
elementor-css-cache-handler.phpAuto-purges all cache layers and regenerates CSS when Elementor flushes its stylesheet
auto-purge-elementor-single-templates.phpPurges cache when Elementor templates targeting a single specific post are saved
fix-nginx-helper-cache-key.phpFixes cache key mismatch between xCloud nginx config and nginx-helper; hooks into Cloudflare purge
disable-rucss-events.phpDisables Perfmatters RUCSS (Remove Unused CSS) on event pages — RUCSS was stripping Formidable Forms styles
FilePurpose
2026-03-05-fb-capi-timeout-fix.phpReduces Facebook Conversions API timeout from 60s → 5s to prevent blocking page loads when Facebook returns 503
wpf-delete-user-on-tag.phpDeletes WordPress user account when the FluentCRM tag remove-user is applied via webhook
xcloud-auto-login.phpVendor — xCloud magic login URLs (not custom code, installed by xCloud)

Code Snippets (run as mu-plugins on baseworks.com)

Section titled “Code Snippets (run as mu-plugins on baseworks.com)”
FileShortcode / HookPurpose
2026-01-07-cartflows-order-summary-open-by-default.phpCSS/JSShows CartFlows order summary expanded by default on mobile instead of collapsed
2026-01-18-fix-automator-formidable-helper.phpFilterFixes Uncanny Automator 7.0.0 regression — Formidable Helpers class autoloaded before plugin init
2026-03-05-practice-sessions-quiz-v2.php[bw_practice_quiz]Multi-step scored eligibility screener for Practice Sessions Montreal 2026 (English)
2026-03-05-practice-sessions-quiz-v2-fr.php[bw_practice_quiz_fr]Same quiz, French version
2026-03-09-redirect-practice-sessions-event.phpFilterRedirects Practice Sessions Spring 2026 event permalink to the booking page — keeps the event post live for widgets/archives without exposing it directly

Archived (kept for reference, not active):

  • 2026-02-27-practice-sessions-quiz-v1-archived.php — v1 of the eligibility quiz, superseded by v2
FilePurpose
template-programs-hub.phpCustom page template for the Programs Hub — registers as a selectable template in Elementor

FilePurpose
2025-01-20-auto-subscribe-organizers-to-topics.phpAuto-subscribes group organizers (admins) to new forum topics created in their groups
2025-01-23-wpf-buddyboss-all-members-fix.phpTemp patch — WP Fusion BuddyBoss Access Control doesn’t handle the 'all' value for “All Members” messaging permissions. Fixed in WP Fusion’s class-buddyboss-access-control.php. Remove when WP Fusion ships a fix.
bw-suppress-wprus-on-view-as.phpPrevents WPRUS from propagating BuddyBoss “View As” session switches to baseworks.com. See Cross-Site User Sync for details.
primer-assignments-widget.phpDisplays group assignment progress visualization with session markers
FilePurpose
wpf-delete-user-on-tag.phpSame as baseworks.com — deletes WP user when remove-user tag applied (installed on both sites)
FilePurpose
xcloud-auto-login.phpxCloud magic login URLs
buddyboss-performance-api.phpBuddyBoss Platform performance plugin (installed by BuddyBoss)
_cdn-cache-management.phpCDN cache management (installed by xCloud)
_patchstack.phpPatchstack security firewall
Snippet IDFileShortcode / HookPurpose
272025-12-27-presto-custom-token-hub-id.phpAutomator tokenAdds PRESTOVIDEO_HUB_ID and PRESTOVIDEO_POST_SLUG tokens to Uncanny Automator’s Presto Player trigger — required for Recipe 22021 to read ACF fields on Media Hub posts
392026-01-19-restrict-buddyboss-members-directory.phpFilterRestricts the BuddyBoss Members Directory to admins only
402026-01-20-permission-filtered-topic-index.php[bbp-topic-index-filtered]Permission-filtered forum topic index — only shows forums the current user can access, removes “Private: ” prefix from private forum titles
412026-01-20-hide-dark-mode-elementor-pages.phpCSS/FilterHides the dark mode toggle on Elementor template pages
3730-custom-lesson-tab.php (Fluent backup)Filter (learndash_content_tabs)Adds Discussion and Transcript tabs to LearnDash lesson pages. Each tab is conditional — it only appears when the corresponding ACF field (discussion_tab_content / transcript_tab_content) on the lesson post is non-empty
3831-add-complete-lesson-class.php (Fluent backup)Filter (body_class)Adds the CSS class ld-lesson-complete to the <body> tag on LearnDash lesson pages when the current user has completed that lesson — allows CSS/JS targeting of completed lesson state
452026-03-20-sync-buddyboss-timezone-to-acf.phpActionSyncs the BuddyBoss “Timezone” profile field to the ACF timezone user meta field when a user saves their profile — the ACF field is what the BW Activity Plugin reads for date display
462026-03-20-buddyboss-message-time-user-timezone.phpFilterOverrides BuddyBoss message thread timestamps to display in the viewer’s timezone rather than server time
4747-bw-lesson-topic-form.php[bw_topic_form]Wrapper around [bbp-topic-form] that auto-tags new discussions with the current lesson title. Usage: [bw_topic_form forum_id=XXXXX title_tag=1]. Appends the lesson title as a bbPress tag on topic save; compatible with manually added tags.

Deactivated (legacy Formidable-based activity tracking — superseded by BW Activity Plugin, 2026-03-20)

Section titled “Deactivated (legacy Formidable-based activity tracking — superseded by BW Activity Plugin, 2026-03-20)”
Snippet IDFileWas
302025-05-27-add-frm-date-shortcode.php[frm-date] shortcode for Formidable views
312025-05-27-add-custom-dailymax-type-frm-stats-shortcode.phpCustom aggregate type for [frm-stats]
322025-06-03-add-formidable-activity-bars-form-69.phpActivity bar visualizations from Form 69
332025-06-02-add-formidable-activity-streak.phpStreak calculation from Form 69
342025-06-03-add-formidable-activity-dots-shortcode.phpDot-grid visualization from Form 69

Theme Overrides (wp-content/themes/buddyboss-theme-child/)

Section titled “Theme Overrides (wp-content/themes/buddyboss-theme-child/)”
FilePurpose
functions.phpChild theme functions — enqueues child styles, custom hooks
header.phpCustom header template
bbpress/feedback-no-replies.phpCustom “no replies yet” message for bbPress threads
learndash/ld30/lesson.phpCustom LearnDash lesson template
woocommerce/myaccount/dashboard.phpCustom WooCommerce My Account dashboard

BW Activity Plugin — practice.baseworks.com

Section titled “BW Activity Plugin — practice.baseworks.com”

A full WordPress plugin (not a mu-plugin) developed specifically for Baseworks. Lives in wp-content/plugins/bw-activity/. Maintains the wp_bw_activity custom database table — the central activity log replacing Formidable Form 69. Provides all dashboard shortcodes ([bw_activity_bars], [bw_activity_calendar], [bw_activity_list], etc.) and the Uncanny Automator integration for recording video completions.

See BW Activity Plugin — Design & Implementation Plan for full details.