Live Stream Recap: Adding e2e tests to custom a Gutenberg block
On today's live stream, we worked through adding some e2e tests to a block we created in a previous stream. This was a lot of fun and I learned a…
On today's live stream, we worked through adding some e2e tests to a block we created in a previous stream. This was a lot of fun and I learned a…
WordPress provides a number of ways to retrieve data in Gutenbergs, one way I really like is the getEntityRecords selector. I have started using it more and more recently and find it great to use in my custom blocks.
Unfortunately, the documentation is a little sparse and there are some things to consider when working with it. However, once you start using it and its relatives, I think you’ll agree that it’s a great choice!
(more…)In 2019, I was lucky enough to speak at the fantastic JavaScript for WordPress conference. It was my first virtual conference and I had a really great time. It's a…
InnerBlocks have no built-in way to limit the number of blocks allowed inside them. Let's use the renderAppender prop to achieve this.
A couple of years ago, I created a Twitter bot that tweets out WordPress core trac tickets marked as GoodFirstBugs to help new contributors find a good starting place. It…
Now that the PluginDocumentSettingPanel
is in WordPress core, we can add our own panels to the Document Settings panel using the registerPlugin
function.
const { registerPlugin } = wp.plugins;
const { PluginDocumentSettingPanel } = wp.editPost;
const MyCustomSideBarPanel = () => (
<PluginDocumentSettingPanel
name="my-custom-panel"
title="My Custom Panel"
>
Hello, World!
</PluginDocumentSettingPanel>
);
registerPlugin( 'my-custom-panel', {render: MyCustomSideBarPanel } );
The above code will insert a new Panel in the Document Sidebar with the title of “My Custom Panel ” and will display “Hello, World!” as it’s content. If we want this panel to appear on every post type registered, then we’re done but what if we want to restrict this panel to just a single post type?
(more…)
I think the hardest thing about getting into contributing to WordPress Core is knowing where to start. Once you have your development environment setup ready to go – then what? You need something to work on, you need a ticket.
(more…)A little while ago, I created a plugin called Suspend Transients. It is a helpful tool that allows developers to bypass get_transient() calls on any page by clicking a button…
Wordpress 4.7 was just released and it marks the sixth release in a row that I have been lucky enough to contribute to. Contributing to WordPress core has always been a…
When unit testing your code, there are times when you need to test the same method or function with a variety of different parameters. For example, we have a function to check to see if a passed email is both valid and not already in the list of known emails:
(more…)