Title: Modal Guten Block
Author: merbmerb
Published: <strong>2019 年 9 月 2 日</strong>
Last modified: 2023 年 10 月 3 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://ps.w.org/modal-block/assets/icon-256x256.png?rev=2149842)

# Modal Guten Block

 作者：[merbmerb](https://profiles.wordpress.org/merbmerb/)

[下载](https://downloads.wordpress.org/plugin/modal-block.zip)

 * [详情](https://cn.wordpress.org/plugins/modal-block/#description)
 * [评价](https://cn.wordpress.org/plugins/modal-block/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/modal-block/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/modal-block/#developers)

 [支持](https://wordpress.org/support/plugin/modal-block/)

## 描述

This project provides a modal / popup block for the WordPress Gutenberg editor.

 * Multiple methods for triggering modal including button, text link, image link,
   external class, and page load.
 * User definable modal content using Gutenberg blocks, for example, image, paragraph
   etc.
 * Support for multiple modal window sizes.
 * Modal window transitions for fade, left, right, up down.
 * Manual trigger modal initialization by calling bodModal.initModal()
 * Custom events for before open, after open, before close, after close so custom
   code can be used.
 * Lots of customizable options including Trigger Button Label, Button Color, Trigger
   Text, Trigger Text Size, Trigger Image, Trigger Class, Modal Delay, Trigger Element
   Alignment, Overlay Background Color, Title Text Size, Title Font Color, Title
   Background Color, Title Padding, Border Radius.
 * Supports multiple modals on the same page.
 * ADA compliant.
 * Modal to modal links.
 * Multiple ways to close the modal.
    - Escape key
    - Close button ‘X’ in the top right of the screen.
    - Close button ‘X’ in the modal title.
    - Close button at the bottom on the modal content.
 * Uses create-guton-block for easy config.

### Donations

If you like the plugin, consider a donation to support further development. [Click here](https://paypal.me/SupportBodDev)

## 屏幕截图

 * [[
 * Sample modal window.
 * [[
 * Modal Guten Block in editor.

## 区块

该插件提供了 1 个区块.

 *   Modal Guten Block

## 安装

From your WordPress dashboard

 1. **Visit** Plugins > Add New
 2. **Search** for “Modal Block”
 3. **Install** the “Modal Block” plugin
 4. **Activate** “Modal Block” from your Plugins page
 5. **Insert Block** on your Gutenberg Editor and select “Modal Block” which is located
    in Widgets.

## 评价

![](https://secure.gravatar.com/avatar/1df0b02fd745fe9452f0bc01de36d540e17a9d5ca39602e43f3b1ee17cb43a57?
s=60&d=retro&r=g)

### 󠀁[Bump to WP 6.8 for Wordfence](https://wordpress.org/support/topic/bump-to-wp-6-8-for-wordfence/)󠁿

 [kelter](https://profiles.wordpress.org/kelter/) 2025 年 10 月 3 日

I like this plugin. I’ve had zero problems. It does it’s job and so far has just
stayed out of the way. Thank you. I wish Wordfence wasn’t so harsh to plugins like
this… I got this alert: Medium Severity Problems:* The Plugin “Modal Guten Block”
appears to be abandoned (updated October 3, 2023, tested to WP 6.3.7). Maybe this
could have a version bump just so it’s “compatible” with WP 6.7 or 6.8? Then Wordfence
would yell less often.

![](https://secure.gravatar.com/avatar/d44e565f854c9a6db3c7648896d2f1e2ee454c9c74c34ad343e9ed711aed891b?
s=60&d=retro&r=g)

### 󠀁[“Simple” and efficient plugin](https://wordpress.org/support/topic/simple-and-efficient-plugin-9/)󠁿

 [kldro](https://profiles.wordpress.org/kldro/) 2025 年 1 月 30 日

Thank you for this “simple” and efficient plugin. It does exactly what it promises
without adding tons of unnecessary features.

![](https://secure.gravatar.com/avatar/0815855a652c9655dd7250e04aa7d9a22a3fdd8b34a6dd7db39ecfff3cc432cb?
s=60&d=retro&r=g)

### 󠀁[Great Work, solid Standalone Popup Plugin](https://wordpress.org/support/topic/great-work-solid-standalone-popup-plugin/)󠁿

 [SPiNNdevs](https://profiles.wordpress.org/spinndevs/) 2024 年 10 月 10 日

Hello, thanks for the work. It’s not easy, to find good standalone Plugins these
days. Two Things we would love to see are: Better design in the Backend editor, 
like providing a wrapper for all elements which are responsible for one Popup Block.
Adding padding to the title input. Consider a custom background, because titles 
are not readable, when the Popup Block is based on a group with a dark background.
Changing the preview background color, to the one, selected in the options. And 
using native Gutenberg wordpress/elements for options/inputs would really smoothen
the experience of an editor and would make this plugin feel much more native

![](https://secure.gravatar.com/avatar/f64475aa99a0acd71a9298fce7d20522bc390c52b1773b1846bae337c511277f?
s=60&d=retro&r=g)

### 󠀁[Thanks a lot](https://wordpress.org/support/topic/thanks-a-lot-155/)󠁿

 [chrioll](https://profiles.wordpress.org/chrioll/) 2023 年 11 月 29 日

Simple to use and works perfect for me 😉

![](https://secure.gravatar.com/avatar/26a0a08bb8dc4bbfedcd80e472b7785465ba698e16f6641255d382d53f5dc9a9?
s=60&d=retro&r=g)

### 󠀁[Love that this is a separate plugin and not part of a collection of blocks](https://wordpress.org/support/topic/love-that-this-is-a-separate-plugin-and-not-part-of-a-collection-of-blocks/)󠁿

 [Johan van der Wijk](https://profiles.wordpress.org/vanderwijk/) 2023 年 11 月 
21 日

It does what it is supposed to do, easily configurable and I love that this is a
separate plugin and not part of a collection of blocks. It keeps WordPress nice 
and lean. It would be perfect if the color picker would use the regular Gutenberg
color palette chooser 🙂

![](https://secure.gravatar.com/avatar/e3594b52d994a88bc8c776e162931d414e61d4c5fca017e30c7cda4f796a699f?
s=60&d=retro&r=g)

### 󠀁[Simply Wonderful](https://wordpress.org/support/topic/simply-wonderful-31/)󠁿

 [polina92](https://profiles.wordpress.org/polina92/) 2023 年 11 月 10 日

Extremely versatile, works perfect, no issue in several months of use. And honestly,
for me, nothing is missing. I even use it for click something / reveal result. For
fun or educational purposes. Congratulations to the author, it’s much better than
very good.

 [ 阅读所有24条评价 ](https://wordpress.org/support/plugin/modal-block/reviews/)

## 贡献者及开发者

「Modal Guten Block」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ merbmerb ](https://profiles.wordpress.org/merbmerb/)

[帮助将「Modal Guten Block」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/modal-block)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/modal-block/)，查看[SVN仓库](https://plugins.svn.wordpress.org/modal-block/)，
或通过[RSS](https://plugins.trac.wordpress.org/log/modal-block/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/modal-block/)。

## 更新日志

#### 2.1

 * Transition effects (fade, left, right, up, down) and ‘Custom Events’ for before
   modal open, after open, before close, after close
 * Manual trigger modal initialization by calling bodModal.initModal()

#### 2.0

 * Modal background images. Separate options into Trigger, Modal, Title and Content
   panels. Title close X ability to define size. Trigger based on URL text.

#### 1.5

 * modal to modal links, text align title, title close button

#### 1.4.3

 * Option to disable close modal on Escape key press.

#### 1.4.2

 * Fixed issue where clicking on nested content in edit mode resulted in modal edit
   content box closing.
 * When modal opened focus on first element but do not scroll to it. Stops modal
   opening at bottom.

#### 1.4.1

 * Fix for when we trigger on image and image is smaller than medium size. In this
   case we default in the full size image.

#### 1.4

 * Make ADA compliant including using button instead of span, setting / returning
   focus and focus trapping.
 * Add custom class to dialog when modal opens.
 * Add toggle option to disable close on overlay click.

#### 1.3

 * Optional display only once for timer based modals. Modal Id links timer modals
   on different pages to say they are the same. Also ability to say how long before
   modal is shown again.

#### 1.2

 * Change icon to use SVG – use alt tag from trigger image – optional close btn 
   in modal

#### 1.1

 * Update for deprecated wp.editor (changed to wp.blockEditor) and core/editor (
   changed to core/block-editor).

#### 1.0.0 (8/19/2019)

 * First release

## 额外信息

 *  版本 **2.1**
 *  最后更新：**3 年前**
 *  活跃安装数量 **2,000+**
 *  WordPress 版本 ** 5.0 或更高版本 **
 *  已测试的最高版本为 **6.3.8**
 *  PHP 版本 ** 5.6 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/modal-block/)
 * 标签
 * [block](https://cn.wordpress.org/plugins/tags/block/)[gutenberg](https://cn.wordpress.org/plugins/tags/gutenberg/)
   [modal](https://cn.wordpress.org/plugins/tags/modal/)[popup](https://cn.wordpress.org/plugins/tags/popup/)
   [window](https://cn.wordpress.org/plugins/tags/window/)
 *  [高级视图](https://cn.wordpress.org/plugins/modal-block/advanced/)

## 评级

 4.9 星（最高 5 星）。

 *  [  22 条 5 星评价     ](https://wordpress.org/support/plugin/modal-block/reviews/?filter=5)
 *  [  1 条 4 星评价     ](https://wordpress.org/support/plugin/modal-block/reviews/?filter=4)
 *  [  1 条 3 星评价     ](https://wordpress.org/support/plugin/modal-block/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/modal-block/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/modal-block/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/modal-block/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/modal-block/reviews/)

## 贡献者

 *   [ merbmerb ](https://profiles.wordpress.org/merbmerb/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/modal-block/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](https://paypal.me/SupportBodDev)