generoi/wp-gutenberg-button-popup

A boilerplate WordPress Gutenberg block

Installs: 42

Dependents: 0

Suggesters: 0

Security: 0

Stars: 17

Watchers: 7

Forks: 0

Open Issues: 0

Language:JavaScript

Type:wordpress-plugin

v0.3.2 2022-04-21 11:07 UTC

This package is auto-updated.

Last update: 2024-04-29 16:06:46 UTC


README

A Gutenberg block for creating buttons that open popups

gutenberg-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