Advance full admin takeover from v1.1 to v1.12
Batches everything built since the 1.0 WP.org submission reset: Login Redirect, the Tools/Export/Import screen takeovers, Modules rebuilt as an addon marketplace, Menu Creator's reorder fix, Activity Log redesigned into a filterable table with Admin/User tabs, dark-theme fixes for Site Health/Personal Data/Updates, and an opt-in Disable Gutenberg toggle. Continues the "nothing stays native" takeover goal and closes gaps found via live testing and the WordPress Plugin Check tool. See CHANGELOG.md for the full per-version breakdown (1.1-1.12). Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
faf9f35992
commit
24be114f9a
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
namespace AuroraAdmin\Editor;
|
||||
|
||||
use AuroraAdmin\Options\Settings;
|
||||
|
||||
defined("ABSPATH") || exit();
|
||||
|
||||
/**
|
||||
* Settings > Screens > Editor: "Disable Gutenberg" — opt-in, off by default.
|
||||
* Falls back to WordPress core's own classic (meta-box/TinyMCE) post editor
|
||||
* via the same core-supported filter the official Classic Editor plugin
|
||||
* uses, rather than framing or rebuilding the block editor itself — the
|
||||
* block editor stays one of the two deliberate "still native" screens in
|
||||
* the admin takeover (alongside the Theme/Plugin File Editor), so this is
|
||||
* an escape hatch around it, not a takeover of it.
|
||||
*/
|
||||
class DisableGutenberg
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
add_filter("use_block_editor_for_post_type", [self::class, "maybe_disable"], 100);
|
||||
}
|
||||
|
||||
public static function maybe_disable($use_block_editor)
|
||||
{
|
||||
if ((bool) Settings::get("disable_gutenberg", false)) {
|
||||
return false;
|
||||
}
|
||||
return $use_block_editor;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user