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

Blocktree

描述

Manage Back office with Blocktree

This plugin requires:

Example

Basic markup:

echo \Blocktree\Plugin::$instance->get_markup($widget_name, $settings);

Set a shortcode used blocktree markup:

do_shortcode('[blocktree component-name="my_widget_name" value="123" /]');

Add simple page & sub page used blocktree markup:

add_action('admin_menu', function() {

  add_menu_page(
    $page_title,
    $menu_title,
    $capability,
    $menu_slug, 
    function() use ( $widget_name, $settings ) {
      echo \Blocktree\Plugin::$instance->get_markup($component_name, $settings = [], $handler_key);
    },
    $icon_url,
    $position
  );

  add_submenu_page(
    $parent_slug,
    $page_title,
    $menu_title,
    $capability,
    $menu_slug,
    function() use ( $widget_name, $settings ) {
      echo \Blocktree\Plugin::$instance->get_markup($component_name, $settings = [], $handler_key);
    },
    $position
  );

});

Elementor widget-render example:

class MyElementorWidget extends Widget_Base {

  protected function render() {

    $widget_name = $this->get_name();
    $settings = $this->get_data();

    if ($settings) {
        $settings = $settings['settings'];
    }

    echo \Blocktree\Plugin::$instance->get_markup($component_name, $settings = [], $handler_key);

  }

}

安装

  1. Upload the blocktree plugin to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Add widgets files at /wp-admin/options-general.php?page=blocktree

评价

此插件暂无评价。

贡献者及开发者

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

贡献者

帮助将「Blocktree」翻译成简体中文。

对开发感兴趣吗?

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