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)
---
name: wordpress-knowledge-patch
description: WordPress
version: null
license: MIT
metadata:
author: Nevaberry
---
# WordPress Knowledge Patch
Load this skill when updating WordPress sites or maintaining plugins, themes,
blocks, editor extensions, admin interfaces, and integrations. Use the topic
references for detailed behavior, examples, and version-specific guidance.
## Reference index
| Reference | Topics |
| --- | --- |
| [Compatibility and upgrades](references/compatibility-and-upgrades.md) | Security fixes, backports, runtime requirements, deprecations, dependencies, editor compatibility, assets, certificates, and updates |
| [Blocks, editor, and styles](references/blocks-editor-and-styles.md) | PHP blocks, patterns, bindings, templates, queries, responsive styles, typography, media blocks, revisions, and Notes |
| [Data, abilities, and extension APIs](references/data-abilities-and-extension-apis.md) | Abilities, AI models, connectors, credentials, DataViews, DataForm, REST, caching, cron, HTML processing, and Interactivity |
| [Media, administration, and communications](references/media-admin-and-communications.md) | Media processing, dashboard navigation, speculative loading, settings, roles, personal data, email, and notifications |
## Compatibility changes and upgrades
### Security updates
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.
The compatibility reference preserves the branch-specific fixes and backport status.
### Runtime and library 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.
WordPress deferred the core React 19 upgrade beyond 7.1. The Gutenberg plugin
carries the React 19 experiment.
### Renamed hooks and deprecated transports
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 previously called those
transport classes directly.
### Plugin dependencies
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 slug WordPress resolves.
### Editor iframe and block metadata
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 API version 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 interface relied on component bottom margins.
### Script loading, errors, and templates
Classic scripts can declare dependencies on script modules. Remove the `script`
entry from a theme's HTML5 support declaration because core removed support for
that entry. Core also removes support for IE-specific conditionals on enqueued
scripts and styles; remove or replace conditional enqueue metadata in older code.
When the error level is `E_USER_ERROR`, `wp_trigger_error()` throws `WP_Exception`.
Code that intercepts fatal errors from this function must handle an exception on
the path where WordPress emits the error. Callbacks hooked into
`wp_trigger_error()` can run when `WP_DEBUG` is disabled.
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.
## Blocks, patterns, and theme styles
### On-demand block assets
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 load block styles on demand, so a block stylesheet may be absent
from pages that do not use that block.
### PHP block registration
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>';
},
) );
} );
```
### Pattern editing and bindings
Unsynced patterns default to `contentOnly` editing. Declare `"role": "content"`
on editable attributes in a nested custom block's `block.json` to keep them
available. Set `disableContentOnlyForUnsyncedPatterns` to restore unrestricted
editing for unsynced patterns.
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.
### Responsive styling and typography
Set styles for different screen sizes in Global Styles or an individual block's
settings, and preview changes at different viewport sizes. Block themes can set
mobile and tablet breakpoints in `theme.json`; these override the defaults used
by responsive styling and block visibility.
Block supports include width and height. `theme.json` can define reusable width,
height, and minimum-height presets. Styles for `core/button` can target `:hover`,
`:focus`, `:focus-visible`, and `:active` in `theme.json`.
## Abilities, data, and interactive extensions
### Registering and exposing abilities
Plugins can register site actions in a shared, machine-readable registry and
validate and execute them from PHP or through REST endpoints. The JavaScript
Abilities package supports client-side and hybrid abilities and can surface
client-side abilities through the built-in UI and Command Palette.
Enqueue `@wordpress/core-abilities` to fetch and register server-side abilities
through REST, or `@wordpress/abilities` alone for client-only registration.
React components can use `useSelect` with `core/abilities` for reactive queries.
Use the single `public` flag to control exposure to external clients;
`wp_get_abilities()` can return a filtered set of registered abilities.
### AI model selection and connectors
Use `WP_AI_Client_Prompt_Builder::using_model_preference()` to specify model
consideration order. Pair ordered preferences with feature detection when a task
requires a particular model capability.
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.
### Interactivity subscriptions and navigation
`watch()` from `@wordpress/interactivity` reruns its callback when any signal read
by the callback changes. The server populates `state.url` during directive
processing, making it available before the first client-side navigation.
Attach an element-scoped reactive callback with `data-wp-watch="callbacks.sync"`,
where `sync` is a callback in the element's store. It tracks state changes for that
element's lifecycle. The router accepts an `attachTo` CSS selector for the parent
element where a region is rendered. Give repeated directives unique IDs to attach
multiple instances of the same directive to one element without collisions.
### REST access, fields, and caching
Use `rest_menu_read_access` to allow unauthenticated REST reads of navigation
menus, menu items, and menu locations. Template REST view access is available to
users with `edit_post`. Paths passed to `rest_preload_api_request()` can include
a trailing slash.
Field definitions support `readOnly` to disable editing and `filterBy` for
operators and user-input filters. Use `@wordpress/views` to persist DataViews
settings and `children` to supply a custom layout using DataViews state and data.
`WP_User_Query` caches results by default in `user-queries`. Queries requesting
more than three fields and results supplied through `users_pre_query` bypass it.
## Media and administration
Image compression, resizing, and thumbnail generation run in the browser. The
media 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 file under multiple image sizes; attachment responses expose encoding
quality by size so clients can generate variants before upload.
Open the Command Palette from any dashboard screen, including Plugins. Logged-in
dashboard users can use the `⌘K` or `Ctrl+K` button in the top admin bar.
Custom admin-bar items can encounter client-side navigation in editors; refresh
screen-specific item state when the screen changes.
On Multisite, flag spam accounts and their sites separately: WordPress no longer
marks a site as spam when its account is flagged. The `notify_post_author` filter
has the final say on whether WordPress sends a post-author notification.
## Prerelease integration checks
In 7.2 Beta 1, the editor introduces a DataForm-powered block settings inspector.
Test custom block controls and inspector extensions against it. The admin bar
and sidebar switch from Dashicons to the WordPress icon library, affecting plugin
CSS and JavaScript that target core Dashicon elements in those areas.
WordPress 7.2 Beta 5 resolves all known PHP 8.6 compatibility issues in core;
verify plugin and theme compatibility before upgrading PHP. It also fixes
automatic update handling for installations in Git worktrees. If deploying from
a worktree, check that background updates follow your update policy.
In 7.2 RC1, the Interactivity API prevents an older navigation response from
replacing newer content when responses arrive out of order. The block editor
preserves filenames during media transformations in 7.2 RC3.