-
Notifications
You must be signed in to change notification settings - Fork 15
Initial Gutenberg compatability #21
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
base: main
Are you sure you want to change the base?
Conversation
This updates the meta box to refresh the meta table when a Gutenberg post is saved. It does this very simply by just re-requesting the table HTML, rather than getting fancy with something like a JSON object and parsing it into DOM bits. Not elegant, but simple. Might fix #17. Thoughts @danielbachhuber?
|
Honestly, I don't have a preference. This does seem like a hack but probably sufficient aside from entirely rewriting it like you mention. |
Updates from feedback: * Broke out AJAX table rendering to separate function * Added user capability check Other Updates: * Changed the way we checked for the block editor. We now user core enqueue_block_editor_assets to only load the necessary block editor JS
js/block-editor.js
Outdated
|
|
||
| wp.data.subscribe( | ||
| function() { | ||
| var isSaving = editPost.isSavingMetaBoxes(); |
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.
Indentation mistake?
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.
Thanks! I think this got fixed in 5cc768a ... does it look correct to you now?
This updates the meta box to refresh the meta table when a Gutenberg post is saved. It does this very simply by just re-requesting the table HTML, rather than getting fancy with something like a JSON object and parsing it into DOM bits. Not elegant, but simple.
Might fix #17. Thoughts @danielbachhuber?