Hi, I'm Matt Watson

I build plugins for the WordPress publishing platform, and I write about Health, Wealth and Code. Why? Because personal, professional and web development are my passion.

In this article I take the Select2 component that I previously added to my Gutenberg plugin, and make it dynamic by taking advantage of the WordPress REST API. This code borrows heavily from the Secure Blocks for Gutenberg plugin. Updated for WordPress 5I’ve updated this example to take into consideration the changes to the registerStore API that came with WordPress 5. In this example we will be making the ‘Select Roles’ Inspector use dynamic data from…