• Skip to primary navigation
  • Skip to main content
Sal Ferrarello
  • About Sal Ferrarello
  • Speaking
  • Connect
    Mastodon GitHub Twitter (inactive)
You are here: Home / Archives for Gutenberg

Gutenberg

WordPress Gutenberg Trigger Autosave

Last updated on April 25, 2022 by Sal Ferrarello

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.

Filed Under: Dev Tips, Solution Tagged With: Gutenberg, JavaScript, WordPress

WordPress Gutenberg Notice in JavaScript

Last updated on February 20, 2022 by Sal Ferrarello

You can display four types of notices in the WordPress Block Editor (a.k.a. Gutenberg) using JavaScript: error, warning, info, and success. This blog post contains an example of each.

Filed Under: Dev Tips, Programming Tagged With: Gutenberg, JavaScript, WordPress

Display Keyboard Shortcut in WordPress Gutenberg

Last updated on October 15, 2021 by Sal Ferrarello

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.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft, Programming Tagged With: Gutenberg, JavaScript, WordPress

Enable, Read, and Write Post Meta in WordPress Gutenberg

Last updated on January 13, 2021 by Sal Ferrarello

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.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft, Programming Tagged With: Gutenberg, WordPress, WordPress Post Meta

Add Gutenberg JavaScript Filter

Last updated on May 18, 2020 by Sal Ferrarello

WordPress PHP filters allow you make a value modifiable from outside of your code. With the WordPress Block Editor (a.k.a. Gutenberg), you can now do the same thing in JavaScript.

Filed Under: Dev Tips, Programming, Solution Tagged With: Gutenberg, JavaScript, WordPress, WordPress Filter

WordPress Gutenberg import versus Destructuring Global wp

Last updated on April 24, 2020 by Sal Ferrarello

When creating a block for the WordPress block editor (a.k.a. Gutenberg), you are often using existing components. WordPress makes these components available under the global JavaScript variable ‘wp’ as well as available as npm packages. Which is the better way to make a component available in your code?

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Draft, Programming Tagged With: Gutenberg, JavaScript, WordPress

WordPress Gutenberg Functional Component useState

Last updated on March 30, 2020 by Sal Ferrarello

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.

Filed Under: Dev Tips, Programming, Solution Tagged With: Gutenberg, WordPress

Gutenberg JS

Last updated on July 28, 2021 by Sal Ferrarello

My notes on JavaScript available methods in Gutenberg.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft Tagged With: Gutenberg, JavaScript

How the WordPress Block Based Editor Stores Blocks

Last updated on June 18, 2018 by Sal Ferrarello

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.

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Dev Tips, Draft, Programming Tagged With: Gutenberg, WordPress

The inner workings of a machine with gears.

Define Gutenberg Attributes in PHP

Last updated on August 10, 2018 by Sal Ferrarello

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 […]

Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Draft, Programming Tagged With: Gutenberg, WordPress

  • Go to page 1
  • Go to page 2
  • Next Page»

Copyright © 2023 · Bootstrap4 Genesis on Genesis Framework · WordPress · Log in