WP Manifestindependent plugin directory
manifest / editor / block-supports-extended

Block Supports Extended WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA

Simple extension for built in block support features

★ 13stars
7.4kcomposer installs
0.2.0latest · 2 years ago

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/humanmade/block-supports-extended/archive/refs/heads/main.zip

On Packagist as humanmade/block-supports-extended:

composer require humanmade/block-supports-extended
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Helpers for extending built in block support features such as color options.

Description

To use the plugin you will need to activate it and then register your new block supports properties like so:

Block_Supports_Extended\register( 'color', 'quoteMarks', [
    'label' => __( 'Quote Marks' ),
    // Properties are translated to what the setting value is applied to,
    // for example, text will give ".selector { color: value }". This is
    // the same as the options available for the "color" block.json.
    'property' => 'text',
    // %s is replaced with a generated class name applied to the block.
    'selector' => '.%1$s blockquote::before, .%1$s blockquote::after',
    // Optional list of default blocks to add support for. This can
    // also be done via a block's block.json "supports" property, or
    // later using the Block_Supports_Extended\add_support() function.
    'blocks' => [
        'core/pullquote',
    ],
] );

This will have the effect of extending the core quote block's block.json like so:

{
    "supports": {
        "color": {
            "quoteMarks": true
        }
    }
}

A "Quote Marks" option will be added to the default block colour settings. Everything else included CSS generation is then handled for you.

Extended color UI

Future Roadmap

Currently only the color feature is supported, but we will likely extend this to typography, border etc…

Depending on the future direction of WordPress core which promises to make the styles engine more pluggable we may continue extending this or keep it limited.

Installation

This section describes how to install the plugin and get it working.

e.g.

  1. Upload the plugin files to the /wp-content/plugins/block-supports-extended directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the 'Plugins' screen in WordPress

Changelog

0.1.0

  • Release

Releases

2 releases.

Tag
Published
0.2.0 latest
Jan 16, 2024 2 years ago
Jan 16, 2024 2 years ago

These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.

A grade

Security

Block Supports Extended 0.2.0 · audited by WP Registry

No security issues found.

Audited release
0.2.0
Findings
none
Worst severity
—
Content hash
affe9ce309e4e9b5f41911e0…

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.