Release v3.0.0: extract built-in integrations to add-on, add register_providers global filter - #21
Merged
Merged
Conversation
…er_providers global filter (v3.0.0) BREAKING. Removes BuddyBossProfileTypeProvider (bb_profile_type, since v1.4.0) and MemberPressMembershipProvider (mepr_membership, since v1.5.0) along with their v1.6.0 opt-in filters and the tests/bootstrap.php stubs that supported them. Both providers — plus eight new integrations (LearnDash, LifterLMS, Paid Memberships Pro, Restrict Content Pro, WooCommerce Memberships, s2Member, Wishlist Member, Memberium) — now ship in the AcrossAI User Access Pro add-on plugin at github.com/acrossai-co/user-access-pro, using fresh uap_* IDs. Adds a new global filter in AccessControlManager::load_providers(): apply_filters( 'wpb_access_control_register_providers', \$providers, \$table_slug ) It fires before the existing per-consumer filter with the running providers array and the consumer's table slug. Add-on plugins hook this once and their providers appear in every consumer of the library — no per-consumer bootstrap code needed. Consumers retain final say via their own per-instance filter. README documents the extension point in a new "Writing a third-party provider add-on" section, and CHANGELOG covers the removals, additions, and migration steps for any consumer that had enabled the old providers via the v1.6.0 gates. Test suite drops from 295 to 147 (10 provider suites removed, 1 new global- filter test added). All green. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
BuddyBossProfileTypeProvider(bb_profile_type, since v1.4.0) andMemberPressMembershipProvider(mepr_membership, since v1.5.0) — along with their v1.6.0_enabledopt-in filters andtests/bootstrap.phpstubs. Both now ship in the new AcrossAI User Access Pro add-on plugin (with newuap_*IDs), which also adds eight additional integrations (LearnDash, LifterLMS, PMPro, RCP, Woo Memberships, s2Member, Wishlist Member, Memberium).wpb_access_control_register_providersinAccessControlManager::load_providers(). Fires before the per-consumer filter with( array $providers, string $table_slug ). Add-on plugins hook this once and their providers appear in every consumer of the library — no per-consumer bootstrap code required. Consumers retain final say via their existing per-instance filter.Test plan
test_load_providers_applies_global_filter_before_consumer_filteradded)UPDATE ... SET access_control_key = 'uap_bb_profile_type' WHERE ... = 'bb_profile_type') matches the actual per-consumer table naming ({prefix}{slug}_access_control)v3.0.0to trigger packagist🤖 Generated with Claude Code