Recently, I was documenting the steps to reproduce a certain bug and the bug required the presence of an autosave (along with the “There is an autosave of this post that is more recent than the version below.” message). Rather than wait for an autosave to occur naturally, I wanted to speed things up and manually trigger one. This is the command I use to do that.
In Gutenberg (a.k.a. the WordPress Block Editor), keyboard shortcuts are displayed differently on Apple devices and other devices, e.g. ^H on an Apple device and Ctrl+H on other devices. This is accomplished with wp.keycodes.displayShortcut.
The WordPress block editor (a.k.a. Gutenberg) communicates with the database via the WordPress REST API. We can read and write post meta from within the Gutenberg editor after we enable the specific post meta field in the WordPress REST API.
When creating a block for the WordPress block editor (a.k.a. Gutenberg), I find that most of the documentation is for class components. However, with React hooks we can use functional components. When you need to import ‘useState’ from React, you can do it as follows in a WordPress block.
Traditionally, when working with values in WordPress they would be stored in post meta. Now with the new upcoming WordPress editing experience (Gutenberg), these values are often stored right in the content. These are some of my notes on how they are stored.
In WordPress 5.0, the editing experience will be changing dramatically. I’ve written information for my clients about this change in Prepare for WordPress 5.0 (Gutenberg). With the editor moving from one general purpose editor field to a series of special purpose blocks, there will be a need for creating custom blocks. In another post, I’ve […]