The Publishing Project

Plugin Topics: Meta boxes in the Block Editor

Meta boxes work in Gutenberg but they may not do so for a while or be the best solution for your needs. During the full migration to the Block Editor, WordPress Provides two compatibility flags. Most of the time the compatibility setup works out of the box. However, you must test the meta boxes on Gutenberg to make sure the code will still work and that you won’t need to write new blocks to handle the meta box data. You also need to modify the add_meta_box() function to look like the example that follows: <?php function rivendellweb_custom_meta() { add_meta_box( ‘rivendellweb_meta’,

Color.js A CSS Color Tool in Javascript

CSS Color Module Level 4 and level 5 introduce a lot of new color features but unless you’re really into the guts of working with colors on computers you probably wouldn’t know how to use them. There is also an issue of browser uneven support for colors on the web, which is a large problem for developers. When the graphical web first came online it was in low-resolution monitors, 640 x 480 was the norm and RGB was the only color space that we had to worry about. As technology improved, displays got bigger and grew beyond RGB and what

Plugin Topics: Thinking about privacy

Privacy in the context of a web application like WordPress goes beyond legal requirements. It’s also answering the following questions: What information we collect Why we collect it How we use it How we protect it Taken from ISO 29100/Privacy Framework standard, the following checklist provides a good starting point for thinking about privacy in general but more applicable in the context of a WordPress plugin that collects data from users and uses that data to create a service or site: Consent and choice: giving users (and site visitors) choices and options over the uses of their data, and requiring

Plugin Topics: Adding Plugin Admin Pages

If we want to allow users to configure our plugin, we can add menus to the admin pages either as a top-level menu or a submenu of an existing menu. When used with the settings and options APIs we get control of how users configure the plugin from the admin area, assuming that they have permission to do so. Top Level Menus Top-Level Menus are what people see when they first view the admin area. This means that our admin page has more visibility but, depending on the plugin, it may be better to use a submenu The first step

Plugin Topics: Meta Boxes and Cron

The next few items (Meta Boxes, and Cron) are nice to have, require a lot more work, and are not necessary for the majority of plugin projects. I include them here because I’m interested in what they do and can think of a few projects that would benefit from one or more of them. Custom Meta Boxes Custom Meta Boxes allows you to create custom sections of the editor screen where users can enter custom data and you can then sanitize it and save it to the database. Because they allow custom data we need to follow all the security