Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Wordpress Knowledge Patch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nevaberry-wordpress-knowledge-patch-nevaberry-plugins)
---
name: wordpress-knowledge-patch
description: WordPress
version: null
license: MIT
metadata:
author: Nevaberry
---
# WordPress Knowledge Patch
Load this skill when maintaining WordPress plugins, themes, editor extensions,
integrations, or installations affected by changed core behavior.
Use the topic references for complete conditions, examples, and release attribution.
## Reference index
| Reference | Topics |
| --- | --- |
| [Blocks, patterns, and styles](references/blocks-patterns-styles.md) | Block registration, bindings, pattern editing, responsive styles, navigation, templates |
| [Collaboration and editorial behavior](references/collaboration-editorial.md) | Editor iframe, extension compatibility, Notes, revisions, autosave, notifications |
| [Data and integration APIs](references/data-integration-apis.md) | Abilities, AI client, connectors, DataViews, REST, caching, Interactivity, HTML processing |
| [Media and administration](references/media-administration.md) | Browser media processing, media blocks, fonts, icons, dashboard extensions, accounts, privacy |
| [Runtime, upgrades, and security](references/runtime-upgrades-security.md) | Runtime requirements, deprecations, dependencies, assets, regressions, security fixes, certificates |
## Upgrade and API compatibility
WordPress 7.0 requires PHP 7.4 or newer. Upgrade servers running PHP 7.2 or 7.3
before updating WordPress. WordPress 6.8 requires the PHP `hash` extension and
checks for it during installation and upgrades.
Update callbacks subscribed to `setted_transient` to use `set_transient`:
```diff
-add_action( 'setted_transient', 'my_transient_handler' );
+add_action( 'set_transient', 'my_transient_handler' );
```
`WP_Http_Curl`, `WP_Http_Streams`, and their transport-specific filters are
deprecated. Use the public HTTP API for requests that called those classes directly.
Remove the `script` entry from a theme's HTML5 support declaration because core
has removed support for that entry. Core also removes IE-specific conditionals
on enqueued scripts and styles; remove or replace conditional enqueue metadata.
When `wp_trigger_error()` emits `E_USER_ERROR`, it throws `WP_Exception`.
Code intercepting fatal errors from this function must handle an exception on
the path where WordPress emits the error. Callbacks hooked into
`wp_trigger_error()` can also run when `WP_DEBUG` is disabled.
The `Requires Plugins` header takes comma-separated plugin slugs. A dependency
must be active before its dependent can be activated, can be deactivated once
its dependents are inactive, and can be deleted once its dependents are uninstalled.
Use `wp_plugin_dependencies_slug` to remap the dependency slug WordPress resolves.
WordPress 7.1.5 tightens JSON media type matching. Integrations sending JSON
should use a valid media type such as `application/json`.
## Security and regression checks
Update the 7.1 branch to 7.1.5 or later for security fixes including potential
remote code execution in the Template Part block, Multisite privilege escalation,
and SQL injection. WordPress 7.2 RC2 includes the applicable fixes; backports to
eligible branches as far back as 4.7 were still rolling out at release.
Update the 7.0 branch to 7.0.4 or later for the fix affecting installations using
Imagick with Ghostscript. Update the 6.9 branch to 6.9.4 or later to complete
the PclZip, Notes authorization, and getID3 fixes still incomplete after 6.9.3.
WordPress 6.9.2 could cause a blank front end when a theme supplied a stringable
object as a template path. WordPress 6.9.3 fixes the regression;
`template_include` callbacks should return a string path.
If theme styles changed after upgrading to 6.6, retest on 6.6.2 or later before
adding CSS overrides. Review adjacent-post query customizations in Storefront
and themes derived from it when upgrading to 6.9: `get_adjacent_post()` generates
different SQL.
The removal of 1024-bit root certificates from the WordPress CA bundle in 7.0
was backported to 6.9.12 and earlier branches as part of the 7.1.5 release.
Check HTTPS integrations that rely on the bundled roots.
## Editor extension compatibility
In WordPress 7.0, the post editor uses an iframe when every block inserted in
the current post uses Block API version 3 or later. An earlier-version block
makes the editor run outside the iframe for that post.
In WordPress 7.1, the post editor runs its canvas in an iframe for all themes,
including when plugins register legacy meta boxes. Viewport units and media
queries in content styles resolve against the editor canvas. Use the canvas
document for content DOM access and load content styles inside the iframe.
Registering a block with `apiVersion` 1 or 2 emits a browser console warning.
Use `apiVersion: 3` in `block.json` for new and updated blocks to satisfy the
metadata schema.
Editor components default to margin-free styles. Set spacing explicitly where
a custom editor interface relied on component bottom margins. Custom admin-bar
items can encounter client-side editor navigation; refresh screen-specific
item state when the screen changes.
The core React 19 upgrade was deferred beyond 7.1. The Gutenberg plugin carries
the React 19 experiment.
## Patterns, bindings, and server-registered blocks
Unsynced patterns default to `contentOnly` editing. Declare `"role": "content"`
on editable attributes in a nested custom block's `block.json` to keep them
available. To restore unrestricted editing for unsynced patterns:
```php
add_filter( 'block_editor_settings_all', static function ( $settings ) {
$settings['disableContentOnlyForUnsyncedPatterns'] = true;
return $settings;
} );
```
Use `block_bindings_supported_attributes` to opt custom block attributes into
bindings and Pattern Overrides. For static blocks with complex bound attributes
the HTML API cannot apply, use a render callback to write bound values into markup.
Use `block_bindings_supported_attributes_{$block_type}` to change eligible
attributes for one block type.
Set `supports.autoRegister` together with a PHP render callback to expose a
server-registered block in the editor. The editor can generate DataForm inspector
controls from its attributes:
```php
add_action( 'init', static function () {
register_block_type( 'example/message', array(
'supports' => array( 'autoRegister' => true ),
'render_callback' => static function () {
return '<p>Hello from PHP.</p>';
},
) );
} );
```
## Styles and block assets
Classic themes load block styles on demand, so a block stylesheet may be absent
from pages that do not use that block. Use `should_load_block_assets_on_demand`
to enqueue block assets only when their blocks are used on the front end:
```php
add_filter( 'should_load_block_assets_on_demand', '__return_true' );
```
Classic themes declaring `editor-styles` support or providing `theme.json` can
use the Style Book under Appearance > Design to preview CSS and Customizer changes.
Set responsive styles in Global Styles or individual block settings, and preview
different viewport sizes. Block themes can set mobile and tablet breakpoints
in `theme.json`, overriding responsive styling and block visibility defaults.
The Query Loop block can exclude sticky posts so a separate featured-posts section
can display them without duplicating them in the main list. It can also exclude the post being viewed, for example
when showing related posts on a single-post template.
## Abilities, AI clients, and connectors
The Abilities API registers site actions in a shared, machine-readable registry
and supports validating and executing them from PHP and through REST endpoints.
Enqueue `@wordpress/core-abilities` to fetch and register server-side abilities
through REST, or `@wordpress/abilities` alone for client-only registration.
React components can query the `core/abilities` store reactively with `useSelect`.
Use the single `public` flag to control exposure to external clients.
`wp_get_abilities()` can return a filtered set of registered abilities.
Integrations can filter the execution lifecycle and supply custom validation.
Use `WP_AI_Client_Prompt_Builder::using_model_preference()` to specify model
preference order. Pair ordered preferences with feature detection when the task
requires a particular model capability.
Authenticate AI providers and manage external connections on the Connectors
screen. Connector metadata supports `api_key` and `none` authentication;
WordPress discovers connectors from the AI client's default provider registry.
Use `wp_connectors_init` to override connector metadata.
## REST, interactivity, and data
Use `rest_menu_read_access` to allow unauthenticated REST reads of navigation
menus, menu items, and menu locations. The template REST endpoint allows view
access to users with `edit_post`; extensions only reading templates can use
the view context. Block Hooks run through the REST controller for content-like
custom post types, so their REST responses can include hooked blocks.
`watch()` from `@wordpress/interactivity` reruns its callback when any signal
read by that callback changes. The server populates `state.url` during directive
processing, making it available before the first client-side navigation.
Repeated directives need unique IDs to attach multiple instances of the same
directive to one element without collisions.
Use `@wordpress/views` to persist DataViews settings and `children` to supply a
custom layout using DataViews state and data handling. Field definitions support
`readOnly` to disable editing and `filterBy` for operators and user-input filters.
`WP_User_Query` caches results by default in `user-queries`; queries requesting
more than three fields and results supplied through `users_pre_query` bypass
the cache. WordPress can skip autoloading large options when the caller lets it
select the autoload behavior.
## Media and editorial workflows
Browser media processing handles image compression, resizing, and thumbnail
generation. The workflow supports AVIF, HEIC, and HDR gain maps, with opt-in
GIF-to-video conversion. The REST sideload endpoint can validate dimensions and
register a single sideloaded file under multiple image sizes. Attachment responses
expose encoding quality by size so clients can generate variants before upload.
Attach Notes to selected text or start multiple conversations on a block.
Notes support rich text, links, and `@` mentions that notify collaborators.
Use the post or page editor's revision slider to compare two saved revisions;
select a change in the document inspector to jump to its location.
The default-role selector in Settings > General excludes Administrator and
Editor, and Site Health flags existing sites using those defaults. Customize
exclusions with `default_role_dropdown_excluded_roles`. On Multisite, flag spam
accounts and their sites separately; flagging an account no longer marks its site as spam.