generoi / wp-gutenberg-button-popup
A boilerplate WordPress Gutenberg block
Installs: 70
Dependents: 0
Suggesters: 0
Security: 0
Stars: 17
Watchers: 7
Forks: 0
Open Issues: 0
Language:JavaScript
Type:wordpress-plugin
Requires
- php: >=7.0.0
- illuminate/support: ^7.0||^8.0
Requires (Dev)
- squizlabs/php_codesniffer: ^3.4.2
README
A Gutenberg block for creating buttons that open popups
Installation
composer require generoi/wp-gutenberg-button-popup
Requirements
- WordPress 5.6 or newer
Usage
You can customize the default template for popups with a filter.
import { addFilter } from '@wordpress/hooks' addFilter('wp-gutenberg-button-popup.popupTemplate', 'theme/popup-template', () => { return [ ['core/columns', {align: 'full'}, [ ['core/column', {}, [ ['core/image'], ['core/group'] ]], ['core/column', {}, [ ['core/heading'], ['core/paragraph'], ['core/list'], ['core/buttons'], ]], ]], ]; })
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