The Block Directory, and a new type of plugin

The pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the Plugin Directory or can be cost-based plugin from a third-party directory already has a block section, and there has been some fragmented discussion about expanding or improving it. I’d like to share some thoughts on this and propose a more expansive solution. First I’ll outline some of the main problems that need solving.


  • Many plugins already register blocks, but often the plugin name and description doesn’t give a good indication of what those blocks are.
  • There is no way to search by blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. name.
  • Installation of plugins is far removed from the business of using blocks.
  • Developing blocks is a steep learning curve for new and experienced plugin developers alike.

A proposed solution:

Put briefly, I’d like to propose a new type of WordPress plugin that provides blocks and nothing else: Single Block Plugins. These will be hosted in a separate Block Directory section of the Plugin Directory. They will be JavaScriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user’s browser., and each plugin will register a single Block. And they will be searchable and installable from within the GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. editor itself.

Let me break that down with some more detail.

A Single Block Plugin is intended to be a relatively small, simple plugin that provides a single Gutenberg block. The plugin is the block, essentially.

Single Block Plugins are WordPress plugins that conform to a few rules, including:

  • They register a Gutenberg block.
  • They’re written in JavaScript, and are front-end only.
  • They have no UIUI UI is an acronym for User Interface - the layout of the page the user interacts with. Think ‘how are they doing that’ and less about what they are doing. outside of the editor.
  • They use a block.json file with metadata as per the Block Registration RFC
  • They include readme.txt and headerHeader The header of your site is typically the first thing people will experience. The masthead or header art located across the top of your page is part of the look and feel of your website. It can influence a visitor’s opinion about your content and you/ your organization’s brand. It may also look different on different screen sizes. metadata as required.

This is not set in stone; we’ll work out the exact rules in collaboration with plugin developers and the community on Make WordPress Plugins.

The Block Directory will be a section within the Plugin Directory, that contains only Single Block Plugins.

  • It will be separate from the main plugin directory: you’re either browsing regular WordPress Plugins, or Single Block Plugins.
  • Single Block Plugins will be searchable by block name and description, as per the Block Registration RFC.
  • The Block Directory will probably use a simplified version of the plugin page layout for Single Block Plugins.
  • There will be an APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. endpoint for searching blocks by name and description.
  • Inclusion in the Block Directory requires following the rules for Single Block Plugins.

Regular WordPress plugins in the main Plugin Directory can continue to register Gutenberg Blocks.

  • Regular plugins will also be searchable by block name and description.
  • Regular plugins can register as many blocks as they like, and are not required to follow the same rules as for Single Block Plugins.
  • Regular plugins can continue to do all the amazing things they can now, including back-end code, wp-admin UI, and so on.

In other words, Single Block Plugins are for blocks; Regular WordPress Plugins are for anything at all.

Single Block Plugins will be JavaScript-based.

  • The block code will be entirely written in JavaScript.
  • The plugin can contain other assets like images and css.
  • To begin with, Single Block Plugins will contain a single PHPPHP PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. file containing plugin headers and initialization code only. Eventually, this should become unnecessary.
  • They won’t have any back-end code.
  • Any UI will be contained within the editor.
  • We’ll help onboard new (and new-to JS) developers with templates, samples, and other tools.

Single Block Plugins will be searchable and installable from within the Gutenberg editor.

  • The Block Inserter will use the above-mentioned search API to discover and display relevant Single Block Plugins from the Block Directory.
  • Installation will (eventually) be seamless, without leaving the editor.
  • We’ll make use of and improve the block management features that are already on their way into coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress..
  • Obviously this will entail plenty of design, UXUX UX is an acronym for User Experience - the way the user uses the UI. Think ‘what they are doing’ and less about how they do it., and accessibilityAccessibility Accessibility (commonly shortened to a11y) refers to the design of products, devices, services, or environments for people with disabilities. The concept of accessible design ensures both “direct access” (i.e. unassisted) and “indirect access” meaning compatibility with a person’s assistive technology (for example, computer screen readers). ( work, which will start over on Make Design.
An artist’s impression of what inline installation might look like (thanks Mark!)

This post is intended as a starting point for discussion and new ideas. We’ll post more details on the Plugins, MetaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress., and Design Make sites in the coming days to focus on those particular areas.