-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add Support for Gutenberg #6
Comments
The current iteration for the Classic Editor is a hack job anyway as I'm using JS to reposition the input fields and our Unlisted visibility option. I'm guessing adding Gutenberg support would require similar workarounds. I'll see what can be done. Thanks for the link, that might come in handy down the road. |
An update: Gutenberg currently doesn't allow anyone to add options to the Post Visibility options list. I opened a ticket at the Gutenberg repo here - WordPress/gutenberg#13794 And it was closed 😢 So as a workaround, I've added a checkbox to the "Status & Visibility" section. This is what it currently looks like: If the post is currently Public and you check the For example, if the I'll keep plugging away at this when I have some spare time, but thought I'd put something up for testing. If you want to test, you should download a ZIP from the
|
Hello,
Maybe that will help you. |
@jakub-klapka - Thanks for your comment. I've already tried a variation of your code before and the It runs so often especially when attempting to change the post visibility that I get a "lodash.js Uncaught RangeError: Maximum call stack size exceeded" error. Update: - Actually, I think it's due to the way I'm trying to use |
…ted', remove our unlisted marker. Requires using wp.data.subscribe to listen to post visibility changes and to our unlisted postmeta marker. See #6.
So I figured out the problem. In the I still don't like the one-size fits-all approach to @mrjarbenne - This is live on HWDSB for testing. |
Yes, I agree, that hooking into every action is not ideal. You just have to bail early within your callback. But at least, is official way, so they hopefully won't break it in future versions. (For inspiration: https://github.com/jakub-klapka/wp-secure-post-with-link/blob/gutenberg/assets/admin-ui-gutenberg.js) |
@jakub-klapka - Thanks for your reference. You might want to switch from using |
No longer needed. Add hack for last three WP versions prior to v5.8. See #6.
Currently the Unlisted option is not present in the Visibility options within the new editor.
This ReadMe page covers how to extend that panel, and add additional features, but I can't find any specific info on adding to the Visibility setting to extend it to include our Unlisted option.
https://github.com/ryanwelcher/gutenberg/blob/8efddae270b3cb451b39568fefac87e50f5097e7/edit-post/README.md#pluginpoststatusinfo
The text was updated successfully, but these errors were encountered: