Skip to content

feat: remove Full Site Editor from menu bar#59

Open
brunodeangelis wants to merge 1 commit intomasterfrom
feat/disable-fse
Open

feat: remove Full Site Editor from menu bar#59
brunodeangelis wants to merge 1 commit intomasterfrom
feat/disable-fse

Conversation

@brunodeangelis
Copy link
Contributor

@brunodeangelis brunodeangelis commented Dec 2, 2022

This PR adds an option to disable the menu item Appearance -> Editor (beta)

image

There is a plugin that does this better, but the code is not as straightforward as I would've liked to port it here, so this is only what I managed to do.

This code has no redirection from wp-admin/site-editor.php to admin_url() because I couldn't get the usual snippet to work:

add_action( 'template_redirect', function () {
	global $pagenow;

	if ( $pagenow === 'site-editor.php' ) {
		wp_redirect( admin_url() );
		exit;
	}
} );

Any ideas are welcomed :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant