Search by

preseto / block-context

WordPress plugin for showing or hiding Gutenberg blocks depending on context.

Maintainers

Package info

github.com/preseto/block-context

Homepage

Type:wordpress-plugin

pkg:composer/preseto/block-context

Transparency log

Statistics

Installs: 9

Dependents: 0

Suggesters: 0

Stars: 12

Open Issues: 8

0.2.0 2026-08-19 15:05 UTC

This package is auto-updated.

Last update: 2026-08-19 15:05:51 UTC


README

A WordPress plugin to show or hide WordPress editor (Gutenberg) blocks in context.

Source of the Gutenberg Block Context plugin for WordPress.

Requirements

Install

  • Search for "Block Context" under "Plugins → Add New" in your WordPress dashboard.

  • Install as a Composer dependency:

     composer require preseto/block-context
    

Development

  1. Clone the plugin repository.

  2. Setup the development environment and tools using Node.js and Composer:

    npm install
    composer install
    
  3. Start the local development environment (powered by wp-env):

    npm run start
    

    which will be available at http://localhost:8888 (username: admin, password: password). WordPress core files are installed as the roots/wordpress Composer dependency under wordpress/.

  4. Build the plugin assets during development:

    npm run dev
    

    or produce a production build:

    npm run build
    
  5. Lint and test the changes:

    npm run lint
    npm run test
    

Screenshots

Block Context settings

Credits

Created by Kaspars Dambis.