MemberPress: Classic Editor Fix for Courses

add_filter( ‘classic_editor_enabled_editors_for_post_type’, function ( $editors, $post_type ) { if ( $post_type == ‘mpcs-course’ || $post_type == ‘mpcs-lesson’ || $post_type = ‘mpcs-quiz’ ) { $editors[‘classic_editor’] = false; } return $editors; }, 10, 2 );Continue reading

Disable Inspector Tabs

add_filter( ‘block_editor_settings_all’, function ( $settings ) { if ( ! isset( $settings[‘blockInspectorTabs’] ) ) { $settings[‘blockInspectorTabs’] = array(); } $settings[‘blockInspectorTabs’] = array_merge( $settings[ ‘blockInspectorTabs’ ], array( ‘default’ => false, // Disables for all blocks. ), ); return $settings; } );Continue reading

Disable Template Editor

add_action( ‘current_screen’, function () { $screen = get_current_screen(); // Add other custom post types here as needed. if ( in_array( $screen->id, array( ‘post’, ‘page’ ) ) ) { remove_theme_support( ‘block-templates’ ); } } );Continue reading