https://github.com/generoi/wp-gutenberg-button-popup
https://github.com/generoi/wp-gutenberg-button-popup
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/generoi/wp-gutenberg-button-popup
- Owner: generoi
- Created: 2021-03-18T19:54:45.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-07-24T15:31:24.000Z (11 months ago)
- Last Synced: 2025-11-16T07:07:20.281Z (7 months ago)
- Language: JavaScript
- Size: 442 KB
- Stars: 18
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# wp-gutenberg-button-popup
> 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.
```js
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