sensei
sensei copied to clipboard
Add hook to conditionally show the lesson actions block in the frontend
Resolves https://github.com/Automattic/sensei-pro/issues/1956 (partial)
Proposed Changes
We've added a hook here which will allow us to conditionally render the lesson actions block in the frontend from elsewhere (i.e. Sensei-pro)
Testing Instructions
- Follow the instructions in - https://github.com/Automattic/sensei-pro/pull/2607
New/Updated Hooks
- sensei_lesson_show_actions - Flag to show or hide the lesson actions block in the frontend.
Pre-Merge Checklist
- [x] PR title and description contain sufficient detail and accurately describe the changes
- [ ] Acceptance criteria is met
- [x] Decisions are publicly documented
- [x] Adheres to coding standards (PHP, JavaScript, CSS, HTML)
- [ ] All strings are translatable (without concatenation, handles plurals)
- [x] Follows our naming conventions (P6rkRX-4oA-p2)
- [x] Hooks (p6rkRX-1uS-p2) and functions are documented
- [ ] New UIs are responsive and use a mobile-first approach
- [ ] New UIs match the designs
- [x] Different user privileges (admin, teacher, subscriber) are tested as appropriate
- [ ] Legacy courses (course without blocks) are tested
- [x] Code is tested on the minimum supported PHP and WordPress versions
- [x] User interface changes have been tested on the latest versions of Chrome, Firefox and Safari
- [ ] "Needs Documentation" label is added if this change requires updates to documentation
- [ ] Known issues are created as new GitHub issues
Test the previous changes of this PR with WordPress Playground.
Test the previous changes of this PR with WordPress Playground.
Test the previous changes of this PR with WordPress Playground.
Test the previous changes of this PR with WordPress Playground.
Test the previous changes of this PR with WordPress Playground.
Test the previous changes of this PR with WordPress Playground.
Test the previous changes of this PR with WordPress Playground.
Looks good. I added a small comment about the tests though.
Thanks @donnapep ! I've updated it here https://github.com/Automattic/sensei/pull/7677/commits/438d8cabf4f5f2db521703dcccc7c4e6a010517b . Can you kindly take a look again? Thanks!