k1sul1/reusable-blocks-extended

安装: 0

依赖项: 0

建议者: 0

安全性: 0

星标: 4

关注者: 1

分支: 0

开放问题: 0

类型:wordpress-plugin

dev-master 2022-01-17 13:53 UTC

This package is auto-updated.

Last update: 2024-09-17 19:37:37 UTC


README

这是一个小型的WordPress插件,它将可复用的块添加到菜单中,并通过简单的API公开它们。如果需要,还包括短代码。

安装

将插件复制到插件文件夹中。或者;

composer require k1sul1/reusable-blocks-extended

使用方法

应该足够简单明了吗?

[reusableblock id="123" slug="hello-world"]
$rbe = \k1\rbe();
$rbe->renderBlock("footer");
$rbe->renderBlock(123, "id");

过滤器

很多。如果你需要翻译,不喜欢我的选择词汇,或者某些其他的事情;你可以更改它们。

$ ag -Q apply_filters
init.php
9:    require_once apply_filters('k1rbe_plugin_class', 'class/class.reusable-blocks-extended.php');

class/class.reusable-blocks-extended.php
18:    $this->icon = apply_filters("k1rbe_menu_icon", "dashicons-block-default");
19:    $this->capability = apply_filters("k1rbe_menu_capability", "edit_posts");
20:    $this->menuTitle = apply_filters("k1rbe_menu_title", "Reusable blocks");
21:    $this->shortcode = apply_filters("k1rbe_shortcode", "reusableblock");
22:    $this->strings = apply_filters("k1rbe_strings", $this->strings);
63:    $output = apply_filters("k1rbe_before_output", "");
69:    echo apply_filters("k1rbe_after_output", $output);

贡献

如果有东西坏了,你知道如何修复它,请修复并作为PR发送修复。

干杯。

许可证

我不在乎,你想做什么就做什么。