Skip to content

feat(academy): show the front-end toolbar to content staff - #1073

Merged
Genyus merged 1 commit into
developfrom
feature/staff-frontend-toolbar
Oct 27, 2026
Merged

Genyus merged 1 commit into
developfrom
feature/staff-frontend-toolbar

Conversation

@Genyus

@Genyus Genyus commented Oct 26, 2026

Copy link
Copy Markdown
Member

Content Editors and Reviewers can't see the toolbar on the front end, so they can't jump from a lesson to its editor.

Cause

BuddyBoss decides front-end toolbar visibility with two site-wide settings: one for administrators and one for every other logged-in member. On production, Show the Toolbar for logged-in members (non-admins) is off, which keeps it from learners but also hides it from every non-administrator member of staff.

PublishPress Capabilities can only hide the toolbar per role, and PublishPress Permissions doesn't control it, so neither can switch it on for some roles only.

Change

A new mu-plugin, cbf-staff-toolbar.php, filters show_admin_bar at priority 50:

  • It shows the toolbar to users who can edit_courses or edit_others_posts. On production, that's Administrator, Content Editor, Reviewer, Editor and Revisor.
  • No learner role has either capability: Subscriber, Group Leader and forum Participant, about 1,000 users.
  • It still respects each user's own "Show Toolbar when viewing site" preference.
  • It runs after BuddyBoss's filter (priority 10) and before the BuddyBoss theme's, which hides the toolbar inside the mobile app (priority 99).

The BuddyBoss setting stays off.

Testing

Tested locally with BuddyBoss's non-admin setting forced off, as on production:

User Roles Without With
Content Editor content_editor, bbp_participant Hidden Shown
Reviewer reviewer Hidden Shown
Learner subscriber, bbp_participant Hidden Hidden
Group Leader group_leader Hidden Hidden
Administrator administrator, bbp_keymaster Shown Shown

A Content Editor who has turned the toolbar off in their profile still doesn't see it. phpcs passes.

BuddyBoss's toolbar setting for non-admins is off so learners don't see the
toolbar, but it also hides it from Content Editors, Reviewers and internal
staff, who use it to reach the editor from a lesson. Show it to anyone who can
edit LearnDash courses or other people's posts, respecting each user's own
toolbar preference.
@Genyus
Genyus merged commit 3dbd1b1 into develop Oct 27, 2026
4 checks passed
@Genyus
Genyus deleted the feature/staff-frontend-toolbar branch October 27, 2026 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant