Title: Magic Block
Author: willdelphia
Published: <strong>2018 年 12 月 13 日</strong>
Last modified: 2021 年 4 月 18 日

---

搜索插件

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

![](https://ps.w.org/magic-block/assets/icon.svg?rev=1993285)

# Magic Block

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

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

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

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

## 描述

Magic Block registers a container block with the block editor. This block has settings
for element (div, section, etc), ID, classname, inline style, and any other attribute(
including data-*, and aria-*) via a custom attributes section.

Magic Block is designed for people who want full control over post HTML structure,
or wish to use the editor to create complex layouts such as Flexbox, CSS Grid, Bootstrap,
etc…

This block does not add any CSS styles that you, as a developer, do not provide.
Rather, it allows you to easily contain other blocks in parent elements with an 
arbitrary ID or Class. You may then easily target these container elements by ID
or Class in your theme’s stylesheets or through CSS plugins. For smaller customizations
there is an inline style field which maps to the “style” HTML attribute for the 
container element.

In the editor view, each Magic Block has a thin grey outline so you can easily see
which child elements belong to it. It also provides a display of element type, ID,
and classes so you can keep track of how to target them with your CSS.

As of WordPress 5.3 you might not need this plugin since the core now ships with
a “Group Block” which is similar in purpose, although it has fewer options.

## 屏幕截图

[⌊You can nest magic blocks inside each other to build complex layouts.⌉⌊You can
nest magic blocks inside each other to build complex layouts.⌉[

You can nest magic blocks inside each other to build complex layouts.

[⌊Custom attributes supported⌉⌊Custom attributes supported⌉[

Custom attributes supported

## 区块

该插件提供了 1 个区块.

 *   Magic Block

## 评价

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

### 󠀁[please, don’t abandon this excellent plugin](https://wordpress.org/support/topic/please-dont-abandon-this-excellent-plugin/)󠁿

 [wrumwrum](https://profiles.wordpress.org/wrumwrum/) 2022 年 5 月 11 日

you said, that as we have a group block now, we might don’t need to use this plugin.
Unfortunately group block stinks, it ads some inner divs which makes it unusable
for a lot of stuff, for example grid or flex container. Your plugin is just perfect.
It should be THE FIRST Gutenberg block to be released, it’s such a timesaver and
pleasure to work with. I can pay for this, but please, don’t abandon it.

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

### 󠀁[Excellent plugin](https://wordpress.org/support/topic/excelent-plugin-447/)󠁿

 [](https://profiles.wordpress.org/cristobal-barrientos/) 2021 年 10 月 24 日

Wonderful plugin, just hope this project keeps updated! thank you so much!

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

### 󠀁[Magia blanca](https://wordpress.org/support/topic/magia-blanca-2/)󠁿

 [Francisco](https://profiles.wordpress.org/fmarconi/) 2021 年 9 月 13 日

White Magic, This should be in the very core of Gutenberg. I used it to implement
Keen Slider Because there’s no way to get rid of the additional annoying nested 
wrappers in default columns or groups blocks.

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

### 󠀁[How did I ever create websites without this!](https://wordpress.org/support/topic/how-did-i-create-website-without-this/)󠁿

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

I am so very happy you created this wonderful tool! It is so needed for anyone who
is tired of creating custom templates for pages. Thank you!

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

### 󠀁[Good !!!](https://wordpress.org/support/topic/good-6539/)󠁿

 [jcasalsd](https://profiles.wordpress.org/jcasalsd/) 2021 年 6 月 18 日

Keep going !!! Congratulations

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

### 󠀁[Absolutely Perfect!](https://wordpress.org/support/topic/absolutely-perfect-95/)󠁿

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

This plugin is just perfect for a full control of gutenberg’s based layouts. It 
just fills a very important functionality that gutenberg lacks and it should come
built in with WordPress. Great job.

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

## 贡献者及开发者

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

贡献者

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

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

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

### 对开发感兴趣吗?

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

## 额外信息

 *  版本 **1.3.0**
 *  最后更新：**5 年前**
 *  活跃安装数量 **300+**
 *  WordPress 版本 ** 5.0 或更高版本 **
 *  已测试的最高版本为 **5.7.15**
 *  PHP 版本 ** 5.2.4 或更高版本 **
 *  语言
 * [Dutch (Belgium)](https://nl-be.wordpress.org/plugins/magic-block/) 、 [English (US)](https://wordpress.org/plugins/magic-block/)
   和 [Russian](https://ru.wordpress.org/plugins/magic-block/).
 *  [翻译成简体中文](https://translate.wordpress.org/projects/wp-plugins/magic-block)
 * 标签
 * [block](https://cn.wordpress.org/plugins/tags/block/)[div](https://cn.wordpress.org/plugins/tags/div/)
 *  [高级视图](https://cn.wordpress.org/plugins/magic-block/advanced/)

## 评级

 4.9 星（最高 5 星）。

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

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

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

## 贡献者

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

## 支持

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

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