-
Notifications
You must be signed in to change notification settings - Fork 846
Update is_fse_active to account for a8c_disable_full_site_editing filter #13392
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
Conversation
This is an automated check which relies on |
|
Related on the wpcom side is D32356-code |
sal/class.json-api-site-jetpack.php
Outdated
| if ( ! Jetpack::is_plugin_active( 'full-site-editing/full-site-editing-plugin.php' ) ) { | ||
| return false; | ||
| } | ||
| if ( apply_filters( 'a8c_disable_full_site_editing', false ) ) { |
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'd be happy with a docblock here to keep our Codex parser happy. It would also help explain what the filter is going to be used for, as I think it may be a bit confusing for non-a12s right now.
Here is an example:
jetpack/sal/class.json-api-site-base.php
Lines 115 to 124 in b999369
| /** | |
| * Filter if a site is an automated-transfer site. | |
| * | |
| * @module json-api | |
| * | |
| * @since 6.4.0 | |
| * | |
| * @param bool is_automated_transfer( $this->blog_id ) | |
| * @param int $blog_id Blog identifier. | |
| */ |
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.
Will do, thanks!
|
Note that /me/sites |
|
Thanks for the fixes @glendaviesnz, I've verified the testing flow, and updated the summary to help other reviewers. |
jeherve
left a comment
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.
Works well for me. Merging.
|
Cherry-picked to |
…ite_editing filter (#13392) * Update is_fse_active to account for a8c_disable_full_site_editing filter * Fix method check and add dockblock comment * Fix typo * Update docblock to allow parser to create Codex page for filter Co-authored-by: Glen Davies <[email protected]> Co-authored-by: Jeremy Herve <[email protected]>
|
Thanks @jeherve ! |
Sometimes we may want to disable full site editing flows in the page editor, but still have access to other features like the post list or start page templates. This is done with the following filter:
Changes here update the /sites/mysite endpoint to return
site.is_fse_activefalse when thea8c_disable_full_site_editingreturns true.Testing Instructions
Add the following filter to the site, can be done easily in the plugin editor:
Notice no header/footer, just the plain block editor:

We still have access to Starter Page Templates

With the filter added we see is_fse_active is false:

Part of fixing Automattic/wp-calypso#35854