diff --git a/functions.php b/functions.php index dfb9add..260267e 100644 --- a/functions.php +++ b/functions.php @@ -153,3 +153,33 @@ function underscoresme_get_contributors() { return (array) $contributors; } + +/* +* +* Here is a PHP code snippet that can be used to add an option to the WordPress general settings page, which allows you to disable the Gutenberg block editor and enable the classic editor: +*/ + +// Register the setting + add_action( 'admin_init', 'register_classic_editor_settings' ); + function register_classic_editor_settings() { + register_setting( 'general', 'classic_editor_enabled' ); + add_settings_field( 'classic_editor_enabled', 'Classic Editor', 'classic_editor_enabled_callback', 'general' ); + } + // Display the checkbox + function classic_editor_enabled_callback() { + $classic_editor_enabled = get_option( 'classic_editor_enabled', 'enabled' ); + ?> + +