mirror of
https://github.com/WordPress/WordPress.git
synced 2026-06-19 07:37:07 +00:00
68332d64fa
Extends `wp_get_abilities()` with an optional `$args` array, giving callers a shared primitive for filtering registered abilities by `category`, `namespace`, or `meta`. Two callback slots — `item_include_callback` (per ability) and `result_callback` (on the full matched array) — round out the caller-scoped pipeline. Two new filters, `wp_get_abilities_item_include` and `wp_get_abilities_result`, expose ecosystem-scoped extension points so plugins can participate in ability resolution without monkey-patching call sites. This replaces the ad-hoc `array_filter` passes that consumers (the REST list controller, the MCP adapter, WooCommerce) had each implemented independently. The REST list controller now delegates to the new primitive instead of running its own post-retrieval filtering, and gains a `namespace` query parameter alongside the existing `category` filter. Called without arguments, `wp_get_abilities()` behaves exactly as before — no backward compatibility break. Props sheldorofazeroth, gziolo. Fixes #64990. Built from https://develop.svn.wordpress.org/trunk@62420 git-svn-id: http://core.svn.wordpress.org/trunk@61701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
58 lines
1.1 KiB
PHP
58 lines
1.1 KiB
PHP
<?php
|
|
/**
|
|
* WordPress Version
|
|
*
|
|
* Contains version information for the current WordPress release.
|
|
*
|
|
* @package WordPress
|
|
* @since 1.2.0
|
|
*/
|
|
|
|
/**
|
|
* The WordPress version string.
|
|
*
|
|
* Holds the current version number for WordPress core. Used to bust caches
|
|
* and to enable development mode for scripts when running from the /src directory.
|
|
*
|
|
* @global string $wp_version
|
|
*/
|
|
$wp_version = '7.1-alpha-62420';
|
|
|
|
/**
|
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
|
*
|
|
* @global int $wp_db_version
|
|
*/
|
|
$wp_db_version = 61833;
|
|
|
|
/**
|
|
* Holds the TinyMCE version.
|
|
*
|
|
* @global string $tinymce_version
|
|
*/
|
|
$tinymce_version = '49110-20250317';
|
|
|
|
/**
|
|
* Holds the minimum required PHP version.
|
|
*
|
|
* @global string $required_php_version
|
|
*/
|
|
$required_php_version = '7.4';
|
|
|
|
/**
|
|
* Holds the names of required PHP extensions.
|
|
*
|
|
* @global string[] $required_php_extensions
|
|
*/
|
|
$required_php_extensions = array(
|
|
'json',
|
|
'hash',
|
|
);
|
|
|
|
/**
|
|
* Holds the minimum required MySQL version.
|
|
*
|
|
* @global string $required_mysql_version
|
|
*/
|
|
$required_mysql_version = '5.5.5';
|