跳到内容

OnceBlock – Build Once, Insert Anywhere

v1.0.7

David Tavares · 2026年11月18日 上架

A powerful native WordPress plugin for creating and managing reusable Gutenberg block presets. No dependencies required!

正在使用
10 以下
评分
暂无
累计下载
111
最近更新
2026年11月18日
需要 WordPress 5.9+已测试到 7.1.5PHP 7.4+

截图

Manage your block presets: categories, tags, shortcodes and usage count in one list.
Manage your block presets: categories, tags, shortcodes and usage count in one list.
Insert a preset in the block editor: search and filter your library, then pick a preset from the sidebar.
Insert a preset in the block editor: search and filter your library, then pick a preset from the sidebar.
Usage statistics show your most used and unused presets.
Usage statistics show your most used and unused presets.
Simple settings, with optional ACF block registration from theme folders.
Simple settings, with optional ACF block registration from theme folders.

OnceBlock is a comprehensive solution for managing reusable block content in WordPress. This plugin allows you to create, organize, and deploy block presets across your website with ease.

Key Features

  • Native WordPress: Works with pure WordPress – no external dependencies required
  • Custom Post Type: Dedicated “Block Presets” post type for managing reusable content
  • Gutenberg Ready: Full integration with the native WordPress block editor
  • Usage Tracking: Monitor which presets are used where and how often
  • REST API: Full REST API support for headless implementations
  • Shortcode Support: Easy insertion via shortcodes [bpmgr_block id="123"]
  • Statistics Dashboard: Comprehensive usage analytics and reporting
  • Taxonomies: Organize presets with categories and tags
  • ACF Integration (Optional): Automatic registration of ACF blocks from theme folders if ACF Pro is installed
  • Developer Friendly: Extensive hooks and filters for customization

Perfect For

  • Agencies managing multiple client sites
  • Developers building custom themes with reusable components
  • Content managers who need consistent design elements
  • Sites with complex layouts that need to be replicated
  • Teams collaborating on content creation

Usage Examples

In PHP templates: bpmgr_render_block_preset(123);

In content: [bpmgr_block id="123"]

REST API: GET /wp-json/bpmgr/v1/block-presets, GET /wp-json/bpmgr/v1/block-presets/123, GET /wp-json/bpmgr/v1/block-presets/123/render

ACF Integration

The plugin automatically scans specified theme folders for ACF blocks and registers them in the Gutenberg editor. Default folders include:

  • general/acf-blocks/
  • public/acf-blocks/
  • login-register/acf-blocks/
  • members/acf-blocks/

You can customize these folders in the plugin settings.

Developer Information

Hooks and Filters

The plugin provides numerous hooks for customization:

Filters:
– bpmgr_block_preset_content – Filter block preset output

REST API Endpoints

  • GET /wp-json/bpmgr/v1/block-presets – List all presets
  • GET /wp-json/bpmgr/v1/block-presets/{id} – Get specific preset
  • GET /wp-json/bpmgr/v1/block-presets/{id}/render – Get rendered preset

File Structure

onceblock/
├── onceblock.php
├── uninstall.php
├── readme.txt
├── LICENSE
├── languages/
│   └── index.php
├── assets/
│   └── js/
│       └── block-preset.js
├── includes/
│   ├── class-bpmgr-post-types.php
│   ├── class-bpmgr-acf-blocks.php
│   ├── class-bpmgr-gutenberg-blocks.php
│   ├── class-bpmgr-helper-functions.php
│   └── class-bpmgr-admin.php
└── admin/
    ├── settings-page.php
    ├── tools-page.php
    ├── statistics-page.php
    ├── css/
    │   └── admin.css
    └── js/
        ├── admin.js
        └── statistics-chart.js

For more information and documentation, visit: https://neodavet.github.io/davetportfolio/

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums