Skip to content

Repository files navigation

Block Context for WordPress

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.

About

Block Context plugin for WordPress Editor Blocks (Gutenberg)

Topics

Resources

Stars

12 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages