-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace adminbar customize link with site-editor in FSE themes #27135
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw that the other day, I'm sure there is more to tweak 👍
Size Change: +3.02 kB (0%) Total Size: 1.2 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The behavior proposed doesn't differ much from how the item in the sidebar is exposed:
Lines 105 to 118 in 1862c62
if ( gutenberg_is_fse_theme() ) { | |
add_menu_page( | |
__( 'Site Editor (beta)', 'gutenberg' ), | |
sprintf( | |
/* translators: %s: "beta" label. */ | |
__( 'Site Editor %s', 'gutenberg' ), | |
'<span class="awaiting-mod">' . __( 'beta', 'gutenberg' ) . '</span>' | |
), | |
'edit_theme_options', | |
'gutenberg-edit-site', | |
'gutenberg_edit_site_page', | |
'dashicons-layout' | |
); | |
} |
As a follow-up, we should limit this option based on user permissions.
Edit: Actually, there is an existing check for edit_theme_options
capability, should we guard this link the same way?
Good point. Added in e1cdbee 👍 |
Description
Replaces the "Customize" link with "Edit site".
This is only for FSE themes on the frontend.
Checklist: