Title: Popup Block
Author: Andrei Baicus
Published: <strong>2020 年 8 月 31 日</strong>
Last modified: 2021 年 11 月 10 日

---

搜索插件

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

![](https://s.w.org/plugins/geopattern-icon/popup-block.svg)

# Popup Block

 作者：[Andrei Baicus](https://profiles.wordpress.org/baicusandrei/)

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

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

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

## 描述

This plugin adds a customizable Popup Block to the WordPress block editor.

## 屏幕截图

[⌊Block preview⌉⌊Block preview⌉[

Block preview

[⌊Block Appearance Options⌉⌊Block Appearance Options⌉[

Block Appearance Options

[⌊Block Open/Close Advanced Options⌉⌊Block Open/Close Advanced Options⌉[

Block Open/Close Advanced Options

## 区块

该插件提供了 1 个区块.

 *     Popup A popup/modal block for the WordPress block editor.

## 安装

 1. Install the plugin via the plugin installer, either by searching for it or uploading
    a .ZIP file.
 2. Activate the plugin.
 3. Use the Popup Block for WordPress!

## 评价

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

### 󠀁[Flexible popup block!](https://wordpress.org/support/topic/flexible-popup-block/)󠁿

 [Pat K](https://profiles.wordpress.org/blackcapdesign/) 2022 年 11 月 1 日

I needed a simple popup plugin for emergency notifications and was looking for something
that integrates nicely with the new block editor. I found a bunch that were clunky
and / or bloated. This is perfect (well almost perfect). It has all the settings
I need (sets an optional cookie with adjustable lifespan, it has intuitive appearance
controls, and it’s SO easy to create and modify popups on a per-page / post basis.
The only reason I didn’t give it 5 stars is that the min-width setting doesn’t allow
sufficient control to make this play nicely on mobile devices. Easy to fix with 
a bit of CSS – but adding width & max-width settings would IMO make this much better.
Example, in child theme I added: .abs-popup .modal-content { width: 90% !important;
max-width: 400px !important; } Thanks for sharing your plugin! pk

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

### 󠀁[Exit intent not working in Firefox](https://wordpress.org/support/topic/exit-intent-not-working-in-firefox/)󠁿

 [Knut Sparhell](https://profiles.wordpress.org/knutsp/) 2021 年 5 月 5 日 1 回复

Works fine in Chrome and Edge, but can’t get Exit Intent to reveal the box using
Firefox.

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

### 󠀁[Good and useful plugin](https://wordpress.org/support/topic/good-and-useful-plugin-17/)󠁿

 [foraker](https://profiles.wordpress.org/foraker/) 2021 年 2 月 26 日

Does exactly what I wanted it and what it says to do. Two things that maybe are 
useful for others: 1. I wanted to call a JS function on close. So I added my stopVideos
call (if it is there) to the frontend.js file of the plugin: {key:”closeModal”,value:
function(){ if(typeof stopVideos==’function’){stopVideos();} If there is any better
way, let me now (same for 2). 2. The pink logo svg in the editor was way too huge
for me. I don’t know the reason, but to dodge it I wrote the following rule into
the corresponding editor CSS file of my theme: .popup-preview svg {display: none;}

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

### 󠀁[Great Plugin](https://wordpress.org/support/topic/great-plugin-29695/)󠁿

 [hambell](https://profiles.wordpress.org/hambell/) 2021 年 2 月 10 日

Lightweight block does exactly as advertised. Can activate by anchor link and a 
few other ways such as: page exit, timer, scroll location. Make sure to put it at
the top of editor blocks, otherwise it does a few funky things when displaying.

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

## 贡献者及开发者

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

贡献者

 *   [ Andrei Baicus ](https://profiles.wordpress.org/baicusandrei/)

「Popup Block」插件已被翻译至 2 种本地化语言。 感谢[所有译者](https://translate.wordpress.org/projects/wp-plugins/popup-block/contributors)
为本插件所做的贡献。

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

### 对开发感兴趣吗?

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

## 更新日志

#### 0.0.4

 * Bump version to proper one

#### 0.0.3

 * Allow opening using links href attribute

#### 0.0.2

 * Fix exit intent not working in firefox
 * Fix close button hiding not working
 * Fix unique identifier for modal having wrong type, causing block to get invalidated
 * Overflow when content has large height
 * Open after scroll offset was not properly calculated

#### 0.0.1

 * Initial release.

## 额外信息

 *  版本 **0.0.4**
 *  最后更新：**5 年前**
 *  活跃安装数量 **700+**
 *  WordPress 版本 ** 5.2 或更高版本 **
 *  已测试的最高版本为 **5.8.13**
 *  PHP 版本 ** 5.6 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/popup-block/) 、 [French (France)](https://fr.wordpress.org/plugins/popup-block/)
   和 [Norwegian (Bokmål)](https://nb.wordpress.org/plugins/popup-block/).
 *  [翻译成简体中文](https://translate.wordpress.org/projects/wp-plugins/popup-block)
 * 标签
 * [block](https://cn.wordpress.org/plugins/tags/block/)[modal](https://cn.wordpress.org/plugins/tags/modal/)
   [popup](https://cn.wordpress.org/plugins/tags/popup/)
 *  [高级视图](https://cn.wordpress.org/plugins/popup-block/advanced/)

## 评级

 4 星（最高 5 星）。

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

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

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

## 贡献者

 *   [ Andrei Baicus ](https://profiles.wordpress.org/baicusandrei/)

## 支持

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

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