Skip to content

cbuntingde/classic-editor

 
 

Repository files navigation

Classic Editor Plugin

PHP Version Support WordPress Plugin License

Enables the WordPress classic editor and the old-style Edit Post screen with TinyMCE, Meta Boxes, etc. Supports the older plugins that extend this screen.

Description

This plugin restores the previous WordPress editor and editing screen. It enables plugins that extend the classic editor, add meta boxes, or customize the edit screens to function properly again.

Features

  • Restores the classic TinyMCE editor
  • Maintains compatibility with older plugins
  • Allows users to switch between classic and block editors (optional)
  • Network-wide settings for multisite installations
  • Removes the "Try Gutenberg" dashboard widget

Requirements

  • WordPress: 7.0 or higher
  • PHP: 8.3 or higher
  • MySQL: 5.0 or higher

Installation

  1. Upload the plugin files to /wp-content/plugins/classic-editor directory
  2. Activate the plugin through the 'Plugins' screen in WordPress
  3. Go to Settings → Writing to configure editor preferences

Alternative Installation via Composer

composer require wordpress/classic-editor

Configuration

Site Administrator Settings

Navigate to Settings → Writing to configure:

  1. Default editor for all users: Choose between Classic or Block editor
  2. Allow users to switch editors: Enable to let individual users choose their preferred editor

Multisite Network Settings

For WordPress Multisite installations:

  1. Go to Network Admin → Settings
  2. Configure network-wide editor preferences
  3. Optionally allow individual sites to override network settings

User Preferences

If enabled by the administrator, individual users can set their editor preference in their profile page under Users → Profile → Editor Settings.

Usage

Switching Between Editors

When user switching is enabled:

  • From Block Editor: Click the three-dot menu (⋮) → "Switch to classic editor"
  • From Classic Editor: Use the "Switch to Block Editor" link near the Publish button

Programmatic Control

Developers can override plugin settings using filters:

// Force classic editor for all users
add_filter( 'classic_editor_plugin_settings', function() {
    return array(
        'editor' => 'classic',
        'allow-users' => false,
    );
});

Development

Setting Up Development Environment

  1. Clone the repository:

    git clone https://github.com/WordPress/classic-editor.git
    cd classic-editor
  2. Install development dependencies:

    composer install
  3. Run code quality checks:

    composer lint        # Check coding standards
    composer lint-fix    # Auto-fix coding standards
    composer test        # Run unit tests

Testing

Run the test suite:

# Run all tests
composer test

# Run with coverage report
composer test:coverage

Coding Standards

This project follows WordPress Coding Standards.

Before submitting contributions, ensure your code passes:

composer lint

Building JavaScript Assets

JavaScript files should be minified before deployment:

# Install Node.js dependencies
npm install

# Build production assets
npm run build

Contributing

We welcome contributions from the community! Please read our Contributing Guidelines before submitting pull requests.

How to Contribute

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes following our coding standards
  4. Write/update tests as needed
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

Reporting Issues

Please report bugs and feature requests on our GitHub Issues page. Include:

  • WordPress version
  • PHP version
  • Steps to reproduce
  • Expected vs actual behavior
  • Screenshots if applicable

Support

License

This plugin is licensed under the GNU General Public License v2.0 or later.

Copyright (C) WordPress Contributors

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

Changelog

See the changelog on WordPress.org for detailed version history.

Version 1.7.0

  • Fixed compatibility with WordPress 6.7.1
  • Added hotfix for WordPress 7.0 publishing actions
  • Safari 18 negative margin fix
  • Various bug fixes and improvements

Classic Editor is maintained by the WordPress Contributors community.

About

A plugin to restore the Classic Editor in WordPress.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • PHP 51.7%
  • JavaScript 48.3%