sensei
                                
                                 sensei copied to clipboard
                                
                                    sensei copied to clipboard
                            
                            
                            
                        Add Hook To Completely Disable Learning Mode
Is your feature request related to a problem? Please describe
Learning Mode was added in version 4.0.0 and essentially ignores the site theme and makes use of Gutenberg FSE features. This is not useful if a site is already using a custom theme developed specifically for use with Sensei. In my particular use case I have developed a custom theme for an organisation and great care was taken to match custom designs and brand guidelines.
Whilst I don't doubt Learning Mode has merits (I've tested it out on a test install locally, and it seems pretty cool), it obviously is not going to work in all cases, like those outlined above, and should therefore be opt-in, or at the very least allow developers to opt-out with a filter.
Describe the solution you'd like
A filter to completely disable Learning Mode, including the Learning Mode sidebar option that's added to the edit screen of courses, and the modal that's displayed to users encouraging them to use Learning Mode.
Note that we do have a few filters, including sensei_course_learning_mode_enabled, which let you disable the mode even if it would enabled for the course or globally in settings. (But yes, it does not hide settings and prompts in the admin screens)
The sidebar option can be removed using unregisterPlugin. Something like this:
import { unregisterPlugin } from '@wordpress/plugins';
 
unregisterPlugin( 'sensei-course-theme-plugin' );
The filter sensei_course_learning_mode_enabled is sufficient for disabling everything-else.