{"id":405672,"date":"2026-11-18T02:23:51","date_gmt":"2026-11-18T02:23:51","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/block-presets-manager\/"},"modified":"2026-11-18T03:03:53","modified_gmt":"2026-11-18T03:03:53","slug":"onceblock","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/onceblock\/","author":15208180,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.7","stable_tag":"1.0.7","tested":"7.1.4","requires":"5.9","requires_php":"7.4","requires_plugins":null,"header_name":"OnceBlock \u2013 Build Once, Insert Anywhere","header_author":"David Tavares Cuevas","header_description":"A powerful plugin for creating and managing reusable Gutenberg block presets. Allows you to create custom block templates and ACF blocks that can be reused across your website.","last_updated":"2026-11-18 03:03:53","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/neodavet\/onceblock","header_author_uri":"https:\/\/neodavet.github.io\/davetportfolio\/","rating":0,"author_block_rating":0,"active_installs":0,"downloads":44,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.7":{"tag":"1.0.7","author":"davet86","date":"2026-11-18 03:03:53","revision":3808488}},"upgrade_notice":{"1.0.7":"<p>Updates the Plugin URI to the renamed GitHub repository. No functional changes.<\/p>","1.0.6":"<p>The plugin is renamed to OnceBlock. The legacy <code>block<\/code> post type, <code>[block_preset]<\/code> shortcode and <code>do_cpt_block()<\/code> function are removed; use <code>bpmgr_block_preset<\/code>, <code>[bpmgr_block]<\/code> and <code>bpmgr_render_block_preset()<\/code>.<\/p>","1.0.5":"<p>Removes the &quot;Tested up to&quot; line from the plugin header. No functional changes.<\/p>","1.0.4":"<p>Updates the plugin author name and Plugin URI. No functional changes.<\/p>","1.0.3":"<p>Preset URLs change to \/block-preset\/ and several admin and activation fixes. Rewrite rules are flushed automatically on activation.<\/p>","1.0.2":"<p>Fixes a fatal error on the Tools page and renames the plugin to Block Presets Manager.<\/p>","1.0.1":"<p>Security and stability update: fixes two fatal-error bugs and closes a settings-validation gap. Upgrade is recommended for all users.<\/p>","1.0.0":"<p>Initial release.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3808488,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3808488,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3808488,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3808488,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":{"bpmgr\/block-preset":{"name":"bpmgr\/block-preset","title":"Block Preset"}},"tagged_versions":["1.0.7"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3808488,"resolution":"1","location":"assets","locale":"","width":1402,"height":940},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3808488,"resolution":"2","location":"assets","locale":"","width":1402,"height":940},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3808488,"resolution":"3","location":"assets","locale":"","width":1402,"height":940},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3808488,"resolution":"4","location":"assets","locale":"","width":1402,"height":940}},"screenshots":{"1":"Manage your block presets: categories, tags, shortcodes and usage count in one list.","2":"Insert a preset in the block editor: search and filter your library, then pick a preset from the sidebar.","3":"Usage statistics show your most used and unused presets.","4":"Simple settings, with optional ACF block registration from theme folders."}},"plugin_section":[],"plugin_tags":[4121,148076,7283,97087,148691],"plugin_category":[],"plugin_contributors":[133258,292288],"plugin_business_model":[],"class_list":["post-405672","plugin","type-plugin","status-publish","hentry","plugin_tags-blocks","plugin_tags-gutenberg","plugin_tags-native","plugin_tags-presets","plugin_tags-reusable","plugin_contributors-alkesh7","plugin_contributors-davet86","plugin_committers-davet86"],"banners":{"banner":"https:\/\/ps.w.org\/onceblock\/assets\/banner-772x250.png?rev=3808488","banner_2x":"https:\/\/ps.w.org\/onceblock\/assets\/banner-1544x500.png?rev=3808488","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/onceblock\/assets\/icon-128x128.png?rev=3808488","icon_2x":"https:\/\/ps.w.org\/onceblock\/assets\/icon-256x256.png?rev=3808488","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/onceblock\/assets\/screenshot-1.png?rev=3808488","caption":"Manage your block presets: categories, tags, shortcodes and usage count in one list."},{"src":"https:\/\/ps.w.org\/onceblock\/assets\/screenshot-2.png?rev=3808488","caption":"Insert a preset in the block editor: search and filter your library, then pick a preset from the sidebar."},{"src":"https:\/\/ps.w.org\/onceblock\/assets\/screenshot-3.png?rev=3808488","caption":"Usage statistics show your most used and unused presets."},{"src":"https:\/\/ps.w.org\/onceblock\/assets\/screenshot-4.png?rev=3808488","caption":"Simple settings, with optional ACF block registration from theme folders."}],"raw_content":"<!--section=description-->\n<p>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.<\/p>\n\n<h4>Key Features<\/h4>\n\n<ul>\n<li><strong>Native WordPress<\/strong>: Works with pure WordPress - no external dependencies required<\/li>\n<li><strong>Custom Post Type<\/strong>: Dedicated \"Block Presets\" post type for managing reusable content<\/li>\n<li><strong>Gutenberg Ready<\/strong>: Full integration with the native WordPress block editor<\/li>\n<li><strong>Usage Tracking<\/strong>: Monitor which presets are used where and how often<\/li>\n<li><strong>REST API<\/strong>: Full REST API support for headless implementations<\/li>\n<li><strong>Shortcode Support<\/strong>: Easy insertion via shortcodes <code>[bpmgr_block id=\"123\"]<\/code><\/li>\n<li><strong>Statistics Dashboard<\/strong>: Comprehensive usage analytics and reporting<\/li>\n<li><strong>Taxonomies<\/strong>: Organize presets with categories and tags<\/li>\n<li><strong>ACF Integration (Optional)<\/strong>: Automatic registration of ACF blocks from theme folders if ACF Pro is installed<\/li>\n<li><strong>Developer Friendly<\/strong>: Extensive hooks and filters for customization<\/li>\n<\/ul>\n\n<h4>Perfect For<\/h4>\n\n<ul>\n<li>Agencies managing multiple client sites<\/li>\n<li>Developers building custom themes with reusable components<\/li>\n<li>Content managers who need consistent design elements<\/li>\n<li>Sites with complex layouts that need to be replicated<\/li>\n<li>Teams collaborating on content creation<\/li>\n<\/ul>\n\n<h4>Usage Examples<\/h4>\n\n<p>In PHP templates: <code>bpmgr_render_block_preset(123);<\/code><\/p>\n\n<p>In content: <code>[bpmgr_block id=\"123\"]<\/code><\/p>\n\n<p>REST API: <code>GET \/wp-json\/bpmgr\/v1\/block-presets<\/code>, <code>GET \/wp-json\/bpmgr\/v1\/block-presets\/123<\/code>, <code>GET \/wp-json\/bpmgr\/v1\/block-presets\/123\/render<\/code><\/p>\n\n<h4>ACF Integration<\/h4>\n\n<p>The plugin automatically scans specified theme folders for ACF blocks and registers them in the Gutenberg editor. Default folders include:<\/p>\n\n<ul>\n<li><code>general\/acf-blocks\/<\/code><\/li>\n<li><code>public\/acf-blocks\/<\/code><\/li>\n<li><code>login-register\/acf-blocks\/<\/code><\/li>\n<li><code>members\/acf-blocks\/<\/code><\/li>\n<\/ul>\n\n<p>You can customize these folders in the plugin settings.<\/p>\n\n<h3>Developer Information<\/h3>\n\n<h4>Hooks and Filters<\/h4>\n\n<p>The plugin provides numerous hooks for customization:<\/p>\n\n<p>Filters:\n- <code>bpmgr_block_preset_content<\/code> - Filter block preset output<\/p>\n\n<h4>REST API Endpoints<\/h4>\n\n<ul>\n<li><code>GET \/wp-json\/bpmgr\/v1\/block-presets<\/code> - List all presets<\/li>\n<li><code>GET \/wp-json\/bpmgr\/v1\/block-presets\/{id}<\/code> - Get specific preset<\/li>\n<li><code>GET \/wp-json\/bpmgr\/v1\/block-presets\/{id}\/render<\/code> - Get rendered preset<\/li>\n<\/ul>\n\n<h4>File Structure<\/h4>\n\n<pre><code>onceblock\/\n\u251c\u2500\u2500 onceblock.php\n\u251c\u2500\u2500 uninstall.php\n\u251c\u2500\u2500 readme.txt\n\u251c\u2500\u2500 LICENSE\n\u251c\u2500\u2500 languages\/\n\u2502   \u2514\u2500\u2500 index.php\n\u251c\u2500\u2500 assets\/\n\u2502   \u2514\u2500\u2500 js\/\n\u2502       \u2514\u2500\u2500 block-preset.js\n\u251c\u2500\u2500 includes\/\n\u2502   \u251c\u2500\u2500 class-bpmgr-post-types.php\n\u2502   \u251c\u2500\u2500 class-bpmgr-acf-blocks.php\n\u2502   \u251c\u2500\u2500 class-bpmgr-gutenberg-blocks.php\n\u2502   \u251c\u2500\u2500 class-bpmgr-helper-functions.php\n\u2502   \u2514\u2500\u2500 class-bpmgr-admin.php\n\u2514\u2500\u2500 admin\/\n    \u251c\u2500\u2500 settings-page.php\n    \u251c\u2500\u2500 tools-page.php\n    \u251c\u2500\u2500 statistics-page.php\n    \u251c\u2500\u2500 css\/\n    \u2502   \u2514\u2500\u2500 admin.css\n    \u2514\u2500\u2500 js\/\n        \u251c\u2500\u2500 admin.js\n        \u2514\u2500\u2500 statistics-chart.js\n<\/code><\/pre>\n\n<p>For more information and documentation, visit: https:\/\/neodavet.github.io\/davetportfolio\/<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin files to <code>\/wp-content\/plugins\/onceblock\/<\/code><\/li>\n<li>Activate the plugin through the 'Plugins' screen in WordPress<\/li>\n<li>Navigate to Settings &gt; Blocks Presets to configure the plugin<\/li>\n<li>Start creating block presets under the new \"Block Presets\" menu<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20this%20plugin%20require%20acf%3F\"><h3>Does this plugin require ACF?<\/h3><\/dt>\n<dd><p>No! This plugin works with pure WordPress and has no external dependencies. ACF integration is completely optional and can be enabled in settings if you have Advanced Custom Fields Pro installed.<\/p><\/dd>\n<dt id=\"is%20this%20compatible%20with%20my%20theme%3F\"><h3>Is this compatible with my theme?<\/h3><\/dt>\n<dd><p>The plugin is designed to work with any WordPress theme. It doesn't modify your theme files but provides hooks and filters for integration.<\/p><\/dd>\n<dt id=\"can%20i%20use%20this%20with%20page%20builders%3F\"><h3>Can I use this with page builders?<\/h3><\/dt>\n<dd><p>Yes, block presets work within the Gutenberg editor and are compatible with most page builders that support WordPress blocks.<\/p><\/dd>\n<dt id=\"how%20do%20i%20customize%20the%20block%20folders%3F\"><h3>How do I customize the block folders?<\/h3><\/dt>\n<dd><p>Go to Settings &gt; Blocks Presets and modify the \"ACF Block Folders\" setting to specify which theme folders should be scanned for ACF blocks.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.7<\/h4>\n\n<ul>\n<li>Changed: the Plugin URI now points to the renamed GitHub repository (neodavet\/onceblock)<\/li>\n<li>Added: automatic deployment from GitHub to WordPress.org<\/li>\n<\/ul>\n\n<h4>1.0.6<\/h4>\n\n<ul>\n<li>Changed: the plugin is now named OnceBlock \u2013 Build Once, Insert Anywhere (slug <code>onceblock<\/code>)<\/li>\n<li>Removed: the unprefixed legacy <code>block<\/code> post type, the <code>[block_preset]<\/code> shortcode, <code>do_cpt_block()<\/code>, the \"Enable Legacy Post Type\" setting and the migration tool<\/li>\n<li>Fix: the REST API routes and PHP helpers only ever return published block presets<\/li>\n<li>Fix: the Statistics chart script is now enqueued instead of printed inline<\/li>\n<li>Security: rendered preset content is passed through <code>wp_kses_post()<\/code> in the block render callback<\/li>\n<\/ul>\n\n<h4>1.0.5<\/h4>\n\n<ul>\n<li>Removed \"Tested up to\" from the plugin header; it is now declared only in readme.txt, as WordPress.org requires<\/li>\n<\/ul>\n\n<h4>1.0.4<\/h4>\n\n<ul>\n<li>Changed: the plugin author is now listed as David Tavares Cuevas<\/li>\n<li>Changed: the Plugin URI now points to the GitHub repository<\/li>\n<\/ul>\n\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>Changed: block preset pages now use the URL base <code>\/block-preset\/<\/code> (previously <code>\/bpmgr_block_preset\/<\/code>); the old URL redirects to the new one<\/li>\n<li>Fix: single preset pages returned a 404 after activation because rewrite rules were flushed before the post types were registered<\/li>\n<li>Fix: the admin script failed to initialize (<code>$ is not defined<\/code>), which broke the new Duplicate action and other admin script features<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>Renamed the plugin to Block Presets Manager (slug <code>block-presets-manager<\/code>) and changed the internal code prefix to <code>bpmgr<\/code><\/li>\n<li>Fix: resolved a fatal error on the Tools page caused by a duplicated function and form handler<\/li>\n<li>Removed the manual <code>load_plugin_textdomain()<\/code> call (translations are loaded automatically by WordPress.org)<\/li>\n<li>Updated \"Tested up to\" to WordPress 7.1<\/li>\n<li>New: \"Duplicate\" row action in the Block Presets list (creates a draft copy including categories, tags and custom fields)<\/li>\n<li>New: secure AJAX handlers for duplicating and previewing presets (nonce and capability checks)<\/li>\n<li>Code quality: cleared all remaining Plugin Check warnings (documented direct queries on the plugin's own table, unused callback parameters, JSON output encoding)<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Security: REST API endpoint for a single block preset no longer exposes draft\/private\/trashed presets to unauthenticated requests<\/li>\n<li>Security: removed a duplicate, conflicting registration of the plugin settings that had silently dropped path-safety validation on the ACF block folders setting<\/li>\n<li>Fix: resolved a fatal error that occurred whenever <code>bpmgr_render_block_preset()<\/code>, <code>do_cpt_block()<\/code>, or related helper functions were called from a theme<\/li>\n<li>Fix: resolved a fatal error on <code>plugins_loaded<\/code> caused by a missing text domain loader<\/li>\n<li>Fix: resolved a fatal error on activation caused by <code>register_activation_hook()<\/code>\/<code>register_deactivation_hook()<\/code> being registered too late; plugin settings and the usage-tracking table are now correctly created on activation<\/li>\n<li>Fix: the <code>[bpmgr_block]<\/code> and <code>[block_preset]<\/code> shortcodes now actually register and render (they previously never worked)<\/li>\n<li>Fix: the Tools page \"Export Block Presets\" action now produces a valid downloadable JSON file instead of a broken response<\/li>\n<li>i18n: the block editor script's translatable strings are now loaded via <code>wp_set_script_translations()<\/code>, so they can actually be translated<\/li>\n<li>i18n: added missing localized strings for the admin JS, and switched a count-based message to use proper singular\/plural forms<\/li>\n<li>Hardened nonce verification, redirects, and JSON output across the admin screens<\/li>\n<li>Updated \"Tested up to\" to WordPress 7.0<\/li>\n<li>Full WordPress Coding Standards (WPCS) compliance pass<\/li>\n<li>Removed unused legacy admin code superseded by the current settings screen<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release<\/li>\n<li>Custom post type for block presets<\/li>\n<li>ACF blocks auto-registration<\/li>\n<li>Usage tracking and statistics<\/li>\n<li>REST API endpoints<\/li>\n<li>Migration tools<\/li>\n<li>Shortcode support<\/li>\n<li>Legacy function compatibility<\/li>\n<li>Admin interface with tools and statistics<\/li>\n<li>Comprehensive uninstall cleanup<\/li>\n<\/ul>","raw_excerpt":"A powerful native WordPress plugin for creating and managing reusable Gutenberg block presets. No dependencies required!","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/405672","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=405672"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/davet86"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=405672"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=405672"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=405672"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=405672"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=405672"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=405672"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}