A Gutenberg block for creating buttons that open popups
composer require generoi/wp-gutenberg-button-popup
- WordPress 5.6 or newer
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'],
]],
]],
];
})
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