可重用区块扩展

描述

扩展Gutenberg可宠用区块功能带有一个完整的管理员面板,widgets,短代码以及PHP函数

这个插件扩展了 Reusable Blocks 管理界面并提供了一些奇特的功能:

  • 添加可重用块仪表板信息
  • 激活可重用块管理员屏幕
  • 提供使用每个可重用块的帖子列表以及上次修改日期
  • 从可重用块管理屏幕提供可重用块的实时预览,以及您的主题样式表
  • 提供一个可重用的区块Widget 用于使用你的区块在任何位置,甚至是你的主题的widgets区域
  • 提供一个可重用区块短代码来使用你的区块,特别是那些你想要在的文章类型(甚至是如果他们使用的是Classic Editor 而不是Gutenberg)
  • 提供一些可重用的块 PHP 函数,以便在主题中的任何位置使用块,甚至

  • 新:一键将可重复使用的块转换为块模式的简单工具!

有关可重用块扩展的完整演示,请参阅此 WordCamp Talk 合成可用在我的博客上

屏幕截图

  • 通过预览扩展可重用区块面板
  • 重新使用区块widget

安装

  1. 安装插件,并且激活
  2. 去到可重用区块管理员菜单

常见问题

怎么使用Widgets实现可重用区块

  • 去到 WP-Admin > Appearance > Widgets.
  • 添加 “Reusable Block” Widget 到你的widget区域
  • 选择你想要重复使用的区块并且保存widget

怎么通过短代码实现可重用区块

  • 去到WP-Admin > 复用区块
  • 选择要使用的可重用块;复制提供的短代码。
  • 然后,粘贴到你想要的地方

Syntax: [reblex id="NUMERIC_ID_OF_THE_REUSABLE_BLOCK"]

怎么通过PHP函数实现重用区块

  • 去到WP-Admin > 复用区块
  • 选择你想要重复使用的区块,复制提供的PHP 函数
  • 然后,粘贴到你想要的地方

语法:
reblex_display_block( NUMERIC_ID_OF_THE_REUSABLE_BLOCK );

开发人员注意:您可能还需要获取短代码数据在显示之前。在这种情况下,您应该使用以下函数:↵ reblex_get_block(NUMERIC_ID_OF_THE_REUSABLE_BLOCK);

评价

2025 年 9 月 3 日
Thanks for making writing so much easier with a great plugin to manage my blocks and patterns. Forgot how good it was until I did a new site without it!
2025 年 8 月 19 日
This plugin adds practical functions to template management that should actually be available directly in WordPress. The overview of where each template has been used is worth its weight in gold.
2024 年 6 月 14 日
Hey everybody that wrote to this forum and complained about something not working with this free plugin: You can get the Gutenberg Block as a Shortcode function by using WP Code Pro. It works great and is highly supported. But the price is USD$100/yr for a single website, or $250/yr for 25 sites (prices upon yearly renewal).The whole reason I found this plugin is that WP Code Pro is expensive, and there is no LTD. After a fairly thorough search, I have found zero other options besides these two plugins: one home-made and one commercial. So if you don’t want to pay the premium price for the commercial plugin, then there’s no point complaining about the homemade one.
2024 年 6 月 4 日
Previously a 5 star review, the last year problems creeping in and it’s obvious to me that the developer refuses to participate in this support forum. Kick them out of the respository until they are responsive. Note to developer, previously would have happily purchased a pro version of this plugin (which you don’t seem to offer) in order to support you and get access to support.
阅读所有40条评价

贡献者及开发者

「可重用区块扩展」是开源软件。 以下人员对此插件做出了贡献。

贡献者

「可重用区块扩展」插件已被翻译至 14 种本地化语言。 感谢所有译者为本插件所做的贡献。

帮助将「可重用区块扩展」翻译成简体中文。

对开发感兴趣吗?

您可以浏览代码,查看SVN仓库,或通过RSS订阅开发日志

更新日志

0.9.1

0.9

  • Props @chaton666 (Marie Comet) for a small fix.
  • WP 6.0 compatibility.

0.8

  • Performance enhancement on the wp_block list table. Props @grapplerulrich for spotting this.

0.7

  • WP 5.8 compatibility.
  • Replace “Reusable blocks” menu name with “Blocks”.
  • Small variable name and docs change.
  • Various minor interface improvements.

0.6.2

  • 移除一个PHP 注意

0.6.1

  • 修复一个带有多语言插件的问题(props @eddystile).

0.6

  • 引入区块模式会话工具用于WP5.5+

0.5.1

  • 修复一个带有ACF Pro 区块的bug。属性@mbcreation用于提出这个问题

0.5

  • 改进了预览功能,现在可以在模式窗口中显示您的可重用块。

0.4

  • 即使激活了经典编辑器插件,也可以强制 wp_block 帖子类型的块编辑器。
  • 可折叠项目改进

0.3

  • 使块实例可折叠以获得更好的预览。道具@alfredg。

0.2

  • 在预览 iframe 中使用 @import 而不是链接标记或入队。

0.1

  • 插件初始化提交,工作完成 🙂