generoi / wp-gutenberg-hidden-blocks
Adds a block setting for specifying screen specific visibillity
Installs: 30
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 6
Forks: 0
Open Issues: 0
Language:JavaScript
Type:wordpress-plugin
Requires
- php: >=7.0.0
Requires (Dev)
- squizlabs/php_codesniffer: ^3.4.2
This package is auto-updated.
Last update: 2024-11-11 16:36:42 UTC
README
Adds a block setting for specifying screen specific visibillity
Installation
composer require generoi/wp-gutenberg-hidden-blocks
Usage
import { addFilter } from '@wordpress/hooks' import { mobile, tablet, desktop } from '@wordpress/icons'; addFilter('wp-gutenberg-hidden-blocks.screenSizes', 'theme/screen-sizes', () => { return [ { name: 'mobile', label: 'Mobile', icon: mobile }, { name: 'tablet', label: 'Tablet', icon: tablet }, { name: 'desktop', label: 'Desktop', icon: desktop }, ]; });
Development
Install dependencies
composer install
npm install
Run the tests
npm run test
Build assets
# Minified assets which are to be committed to git
npm run build:production
# Watch for changes and re-compile while developing the plugin
npm run start