Repository navigation
Description
WordPress 7.0 Enhancement Plan
WP 7.0 introduces Responsive Editing Mode (device-specific block visibility), expanded contentOnly mode, a new plugin list filter, and DataForms improvements — all relevant to a role-based block access plugin. All WP7 features gated for WP6 backwards compatibility.
Version detection
function ace_block_roles_is_wp7(): bool {
return version_compare( get_bloginfo( 'version' ), '7.0', '>=' );
}1. Responsive Editing Mode + Block Roles — complementary visibility
WP 7.0 introduces per-block device visibility (hide/show blocks on mobile/desktop/tablet) as a new block support. Block Roles controls who can see a block in the editor by role; Responsive Editing Mode controls where it appears by device. These are complementary but should not conflict.
Action:
- Test that Block Roles' filtering logic does not accidentally strip the new device-visibility block support attributes when restricting blocks.
- Consider a UI enhancement: display device-visibility status alongside role-availability status in the Block Roles admin grid so administrators have a unified view of "who can use this block and on what devices".
2. contentOnly mode awareness — pattern block restrictions
WP 7.0 expands contentOnly mode to apply more broadly to patterns containing inner blocks. Block Roles' restriction logic must handle this correctly: if a block is nested inside a contentOnly pattern and a user's role should have access to it, the block should still be accessible. If a role should NOT have access, the contentOnly lock should be preserved.
Action:
- Audit the
allowed_block_types_allfilter logic to verify it correctly handles blocks nested incontentOnlypatterns. - Test on WP7: create a synced pattern with inner blocks, apply a Block Roles restriction, and confirm restricted roles cannot access the block while permitted roles can edit it via the pattern.
- Respect the new
disableContentOnlyForUnsyncedPatternssetting: when this is set totrue, our restriction logic should be re-evaluated for unsynced patterns.
3. New plugin list filter — show configuration status
WP 7.0 adds a plugins_list_status_text filter in get_views() for customising the plugin list status labels. Block Roles can use this to display a summary status in the plugins list (e.g. "Block Roles: 4 roles configured").
Action (WP7+):
if ( ace_block_roles_is_wp7() ) {
add_filter( 'plugins_list_status_text', function( $text, $status ) {
if ( 'active' === $status ) {
$role_count = count( ace_block_roles_get_configured_roles() );
return sprintf( __( 'Active — %d roles configured', 'ace-block-roles' ), $role_count );
}
return $text;
}, 10, 2 );
}4. Abilities API — register block role management abilities
Action (WP7+): Register with wp_register_ability():
ace-block-roles/get-role-blocks— return the list of blocks allowed for a given roleace-block-roles/set-role-block-access— configure block access for a role (withmanage_optionscapability check)ace-block-roles/export-config— export current block roles configuration as JSON
These make Block Roles configuration accessible via AI tooling and the Command Palette.
5. DataForms for the block/role assignment UI
WP 7.0's @wordpress/dataviews DataForms and new list/details layouts provide a native way to manage tabular data — well-suited to the block × role assignment grid. Migrating to DataForms would:
- Reduce custom React maintenance.
- Provide built-in search, filtering, and sorting (especially useful for large block inventories).
- Align the UI visually with the modernised WP7 admin.
Action: Evaluate migrating the settings grid to @wordpress/dataviews on WP7+. Keep existing AJAX-based grid on WP6.
6. JSON import/export — @wordpress/scripts build tooling
WP 7.0's refactored @wordpress/scripts builds from directories and reduces Webpack dependence. Consider migrating the build config to use the new directory-based build if upgrading @wordpress/scripts as part of a WP7 compatibility pass.
Backwards compatibility note
All items are additive or defensive audits. WP6 behaviour is unchanged. WP7-only registrations are wrapped in ace_block_roles_is_wp7() and function_exists() guards.
Activity
AceMedia commentedon May 15, 2026
🤖 WordPress AI Plugin + MCP Adapter Integration
Block access and role management are high-value targets for the MCP Adapter and the coming WordPress AI plugin Site Agent. Exposing block role configuration as queryable MCP resources and executable tools means an AI agent can audit, apply, and explain block restrictions via natural language — something that would otherwise require manual admin work across dozens of role/block combinations.
Built-in AI plugin features that apply here
ace-block-roles/*abilities surface in the Abilities Explorer for admins to test and understand without writing any codeRegister block role abilities
Review Notes: warn authors about restricted blocks in their content
MCP Adapter — block permissions as agent resources
Abilities with
mcp.public = trueare auto-exposed on the default MCP server at/wp-json/mcp/mcp-adapter-default-server, so the custom server below is optional and only needed when you want a dedicated plugin-specific MCP endpoint.Site Agent scenarios