Title: Flexible Modals
Author: Bage
Published: <strong>2014 年 7 月 22 日</strong>
Last modified: 2014 年 7 月 24 日

---

搜索插件

![](https://ps.w.org/flexible-modals/assets/banner-772x250.png?rev=952606)

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

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

# Flexible Modals

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

[下载](https://downloads.wordpress.org/plugin/flexible-modals.0.2.zip)

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

 [支持](https://wordpress.org/support/plugin/flexible-modals/)

## 描述

Modal windows are interesting way to include extran information on a page. [adaptive-modal.js](http://www.onextrapixel.com/2014/06/25/create-modal-windows-that-can-be-morphed-from-anything-with-jquery-adaptive-modal-js/)
makes it beautiful. You can use this little plugin which uses the same jQuery plugin
to creae modal windows easily in any page or post or even on a widget uisng shortcode.

I have also added another functionality into this plugin, which will let you to 
embed your modal content into your post a page directly.

### Usage

Upon activation, the plugin will create a custom post type called ‘Modals’. Where
you can add your content, which later you can use it on a modal or embed directly
into your page or post.

 1. [modal]
 2. [block]

### modal

the ‘modal’ shortcode is to create modal windows.

For now the [modal] shortcode comes with four attributes.

**id**
 Your modal id. eg: _[modal id=2]Click here[/modal]_

**data**
 If your modal only going to have just text, you can directly add the content
in the shortcode. eg: _[modal data=”This is my modal content”]Click here[/modal]_.
This shortcode is much useful when you want to add a modal window to a word in a
paragrap without braking the paragrap.

    ```
    note: you cannot use both id and data in the same shortcode
    ```

**background**
 This is to style the link and the modal window background. Have 
to specify a valid color. eg: _[modal id=2 background=”#DDDDDD”]Click here[/modal]_

**color**
 This attribute is to change the color of the link. eg: _[modal id=2 background
=”#DDDDDD” color=”#000000″]Click here[/modal]_

### block

The ‘block’ shortcode is to embed your modal content into any page or post. It only
has one attribute.

**id**
 id of the modal post type post.

    ```
    note: both block and modal shortcodes uses the same Modals custom post type.
    ```

## 安装

This section describes how to install the plugin and get it working.

 1. Upload `flexible-modal` folder to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress

## 评价

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

### 󠀁[It doesn't work](https://wordpress.org/support/topic/it-doesnt-work-103/)󠁿

 [christoff](https://profiles.wordpress.org/christoff/) 2016 年 9 月 3 日

The plugin doesn’t work properly.

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

## 贡献者及开发者

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

贡献者

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

[帮助将「Flexible Modals」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/flexible-modals)

### 对开发感兴趣吗?

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

## 更新日志

#### 0.1

 * Initial release.

#### 0.2

 * Updated shortcode. – I have removed the label attribute from the [modal] shortcode
   and instead made it to wrap a text. eg: in **[modal id=2]Click here[/modal]**
   the “Click here” will become the anchor tag to activate the modal. So basically
   if you have a shortcode like **[modal id=”2″ label=”Click here”]**, you will 
   have to change it to **[modal id=”2″]Click here[/modal]**

## 额外信息

 *  版本 **0.2**
 *  最后更新：**12 年前**
 *  活跃安装数量 **30+**
 *  WordPress 版本 ** 3.5 或更高版本 **
 *  已测试的最高版本为 **3.9.40**
 *  语言
 * [English (US)](https://wordpress.org/plugins/flexible-modals/)
 * 标签
 * [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/flexible-modals/advanced/)

## 评级

 3.5 星（最高 5 星）。

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

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

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

## 贡献者

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

## 支持

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

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

## 捐助

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

 [ 捐助此插件 ](http://www.wpsnippet.com/flexible-modals)