| 开发者 | jgorres |
|---|---|
| 更新时间 | 2026年9月28日 22:23 |
| PHP版本: | 8.0 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPL v2 or later |
| 版权网址: | 版权信息 |
manage_options), nonce validation, whitelist sanitization on save, consistent output escaping.
wp-content/plugins/ or install the ZIP via Plugins → Add New → Upload Plugin.No. Content remains intact and renders normally on the front-end. Only inserting new instances from the block inserter is blocked.
These blocks are hard-protected as a safety net — without them the editor would be practically unusable. If you really need to remove them, use the allowed_block_types_all filter in your theme or in a custom plugin.
Tested up to (declared in readme.txt only) and Author URI, as requested by the WordPress.org plugin review. No code changes..po, .mo, .l10n.php), as requested by the WordPress.org plugin review. All languages, including German and British English, are provided through translate.wordpress.org language packs. Only the .pot template remains in languages/.updated=1 is present. The plugin's own notice is removed.de_DE) and British English (en_GB) ship with the plugin; further languages (es_ES, fr_FR, it_IT, ja, nl_NL, pl_PL, pt_BR, ru_RU) are maintained in the development repository and submitted through translate.wordpress.org, where language packs are generated.aria-expanded / aria-controls, so it works with keyboard and screen readers. Checkboxes in collapsed groups are still submitted with the form.block-inserter-filter). The previous name "Block Filter for GenerateBlocks" was misleading — the plugin filters any Gutenberg block, GenerateBlocks is only an optional integration. WordPress deactivates the plugin during the folder change; reactivate it under Plugins.jg_gbbf_ / JG_GBBF_ / .jg-gbbf-* to jgor_bif_ / JGOR_BIF_ / .jgor-bif-*. A one-shot migration on admin_init copies the settings from the previous option keys (jg_gbbf_*, or gbba_* from versions before 1.5.0) to jgor_bif_hidden_blocks and jgor_bif_hidden_embed_variations and removes the old keys; Multisite networks get a network-wide sweep. No data loss.jgor-bif-hide-blocks (options-general.php?page=jgor-bif-hide-blocks).de_DE) translation is provided in languages/ (.pot, .po, .mo, .l10n.php). WordPress 6.7 and newer load the bundled files automatically via the Domain Path header; WordPress.org language packs take precedence once they exist.jgorBifEditorData, console output removed from admin.js, unused localisation removed, tabs instead of spaces in the class files, .distignore added for SVN exports.allowed_block_types_all to false (no blocks allowed at all), that restriction is now passed through unchanged instead of being replaced by the full block registry minus the hidden blocks.all_plugins display-name override on wp-admin/plugins.php. The plugin is now listed under its real name everywhere.LIKE 'gbba_%' cleanup was removed; the two known legacy option keys are still deleted by name. The generic four-letter prefix could have matched options of other plugins.get_sites() calls now pass number => 0, so networks with more than 100 sites are fully migrated and cleaned up.Tested up to).Tested up to). No code changes.jg_gbbf_ / JG_GBBF_ / .jg-gbbf-*. The previous code prefix was gbba_ / GBBA_ (from the original plugin slug generateblocks-bloecke-ausblenden), which no longer matched the current slug gb-block-filter. All globals — constants, classes, top-level functions, options, asset handles, CSS classes, body classes — are renamed accordingly.includes/ renamed from class-gbba-*.php to class-jg-gbbf-*.php.admin_init copies the two existing options gbba_hidden_blocks and gbba_hidden_embed_variations to jg_gbbf_hidden_blocks and jg_gbbf_hidden_embed_variations (only when the new key is still empty, to preserve any value written between the update and the first admin page load). Legacy keys are deleted afterwards. Multisite installations get an additional network sweep from the main site so subsites are migrated even if no admin visits them.uninstall.php now removes both prefix families (gbba_* and jg_gbbf_*) plus the network-wide sweep sentinel, so no leftover rows remain even if the plugin is deleted right after the update.upgrade_notice_limit of 300 characters. No code or behavioural changes.gb-block-filter; the displayed Plugin Name is now "Block-Filter für GenerateBlocks". Existing settings (hidden blocks, hidden embed variations) are preserved because the option names (gbba_* prefix) remain unchanged. WordPress may auto-deactivate the plugin during the slug change — reactivate it manually under Plugins.wp-admin/plugins.php) showed the plugin as "GenerateBlocks – Block-Filter (Zusatz)" via a scoped all_plugins filter, so it sorted directly under "GenerateBlocks". (Removed again in 1.6.0.)uninstall.php: now also removes the second option gbba_hidden_embed_variations (added in v1.1.0 but previously not cleaned up); adds a defensive LIKE 'gbba_%' cleanup that covers any future plugin options and _transient_gbba_* / _transient_timeout_gbba_* entries. Multisite loop preserved.readme.txt: Installation, FAQ and the older Changelog entries (v1.0.0 – v1.3.6) translated to English. Non-standard header fields (Author, Author URI, Plugin URI) removed from the readme header block — they belong in the PHP plugin header only. Contributors slug switched to the WordPress.org user name jgorres. New == Upgrade Notice == section added.Plugin URI removed from the main PHP file header (no dedicated plugin landing page).languages/index.php, assets/index.php, includes/index.php and the root index.php now use a proper defined( 'ABSPATH' ) || exit; guard instead of the bare "Silence is golden" stub.core/heading and core/image): they are now automatically hidden from the block inserter as soon as GenerateBlocks Pro is active. The earlier 1.3.9 behavior (Pro active = user may opt in to hiding) was reversed because the Pro variants are meant to fully replace the Core blocks while Pro is loaded. The block-inserter filter (GBBA_Block_Filter::filter_blocks) now merges the user-configured hide list with the auto-hidden list returned by GBBA_Plugin::get_pro_replaced_blocks() and applies both in one pass. The settings page shows the affected entries as checked + disabled, with the new "Pro-Variante aktiv" badge and a tooltip explaining the auto-hide. As soon as GenerateBlocks Pro is deactivated, the blocks fall back to the regular "geschützt" badge and reappear in the inserter — no manual cleanup needed.get_protected_blocks() reverted to a thin wrapper around the PROTECTED_BLOCKS constant (always full list). The Pro-aware logic now lives exclusively in get_pro_replaced_blocks(), which is consumed both by the inserter filter and by the admin renderer.core/heading and core/image are no longer in the protection list and can be hidden from the inserter. They are shown with a new "GB Pro Variante" badge (instead of "geschützt"), with a hover tooltip explaining that GenerateBlocks Pro provides an extended variant of the block. If GenerateBlocks Pro is not active, both blocks remain protected and keep the "geschützt" badge as before, so the editor stays safe to use on installations without the Pro plugin.GBBA_Plugin::PROTECTED_BLOCKS with the new helper GBBA_Plugin::get_protected_blocks(), which dynamically removes the Pro-replaced entries from the protection list. GBBA_Plugin::is_generateblocks_pro_active() exposes the detection (uses the GENERATEBLOCKS_PRO_VERSION constant defined by GB Pro itself, no extra plugin-list lookup).name="hidden[]" (respectively name="hidden_embed[]"), and the HTML5 hidden attribute hides the inactive view visually but does not exclude its inputs from form submission. Toggling checkboxes in only one view therefore caused the other view to silently re-send the old state, which made the "Hide all" / "Show all" toggle look broken: after saving, all checkboxes appeared checked again, even though they had just been unchecked. The admin script now mirrors every checkbox change (manual click or "Toggle all" button) onto the twin checkbox with the same name/value in the opposite view, so both views stay in sync and only one state is submitted. Existing data is safe; users who experienced wrongly-hidden blocks should open the settings page once after the update, click "Toggle all" until the affected groups are emptied, save, and reload the editor.generateblocks/container) keep an old block registered as a pure server-side renderer so that existing posts continue to render after a refactor. Such blocks never appear in the inserter and therefore cannot be hidden in any meaningful way; previously they were listed anyway, leading to duplicate entries (for example two "Container" rows side by side — one being the new Element block, the other the legacy Container renderer). Detection heuristic: empty attributes schema combined with no declared block category. Pro blocks are unaffected, because they are consistently registered via block.json and therefore always carry both attributes and a category.array_map( 'sanitize_text_field', wp_unslash( $_POST[...] ) ) is now placed directly in the same expression as the $_POST access — WPCS evaluates the InputNotSanitized sniff line-by-line, so a sanitization step on the following line was not picked up.load_plugin_textdomain() call in class-gbba-plugin.php — WordPress loads translations automatically via the Domain Path header since 4.6.$_POST['hidden'] and $_POST['hidden_embed'] are now additionally filtered through array_map( 'sanitize_text_field', … ) before the whitelist validation (fixes the InputNotSanitized warning).do_action( 'enqueue_block_editor_assets' ) call with a clear phpcs:ignore plus explanation — the Core hook is fired deliberately so that other plugins/themes register their block assets.uninstall.php: renamed the local multisite loop variables $sites / $site to $gbba_sites / $gbba_site (fixes the NonPrefixedVariableFound warning).readme.txt: translated the Short Description and the == Description == block to English; switched the Contributors entry to a valid WordPress.org format.core/paragraph) is no longer shown as a slug tag. It still appears in the namespace view and on embed variations.wp.blockLibrary.registerCoreBlocks(); previously they were loosely loaded but not present in the block-type registry.wp.blockEditor.BlockIcon. The block-editor assets are loaded on the settings page for this purpose.loop-item, query-page-numbers, query-no-results) no longer end up under "Uncategorized" but in the group of their own namespace.wp.blocks.unregisterBlockVariation().gbba_embed_variations for extending the variation list.