|
25 | 25 | * across the post types exposed to abilities via `show_in_abilities` and returns a |
26 | 26 | * bounded list of matching posts as titles and excerpts. |
27 | 27 | * |
28 | | - * This is a sibling of {@see Content}, not a change to it: `core/read-content` is kept |
| 28 | + * This is a sibling of {@see Content}, not a change to it: `core/content-query` is kept |
29 | 29 | * byte-similar to WordPress core's copy, and its registered description states that its |
30 | 30 | * lookups and filters are exact-match only. Rather than widen that ability, this class |
31 | 31 | * adds search as its own ability so every ability consumer — the AI Workspace, the MCP |
|
36 | 36 | * - The result set is capped at {@see self::MAX_PER_PAGE} items. That is a context |
37 | 37 | * limit for the model, not an access control. |
38 | 38 | * - Every returned row is filtered at execute time by the requesting user's own |
39 | | - * capabilities, using the same read permission walk `core/read-content` performs, |
| 39 | + * capabilities, using the same read permission walk `core/content-query` performs, |
40 | 40 | * so a result set never contains an item the user could not otherwise read. The |
41 | 41 | * permission callback can only gate the request coarsely, because the matching |
42 | 42 | * rows are unknown until the query runs. |
@@ -139,7 +139,7 @@ public function register(): void { |
139 | 139 | } |
140 | 140 |
|
141 | 141 | /* |
142 | | - * Internal statuses (e.g. `inherit`) are excluded, matching `core/read-content`. |
| 142 | + * Internal statuses (e.g. `inherit`) are excluded, matching `core/content-query`. |
143 | 143 | */ |
144 | 144 | $statuses = array_values( get_post_stati( array( 'internal' => false ) ) ); |
145 | 145 |
|
@@ -200,10 +200,10 @@ public function check_permission( $input = array() ): bool { |
200 | 200 | * {@see \WP_Ability::execute()} always runs {@see self::check_permission()} first, so |
201 | 201 | * this only needs to enforce what the gate could not: every matched row is checked |
202 | 202 | * against the current user's read permission before it is included, mirroring the |
203 | | - * row filtering `core/read-content` performs in query mode. |
| 203 | + * row filtering `core/content-query` performs in query mode. |
204 | 204 | * |
205 | 205 | * Totals come from the underlying query and may therefore exceed the number of |
206 | | - * returned rows, matching `core/read-content` and the REST posts controller. |
| 206 | + * returned rows, matching `core/content-query` and the REST posts controller. |
207 | 207 | * |
208 | 208 | * `total` exceeds the returned rows for two unrelated reasons — the rest of the |
209 | 209 | * matches are on later pages, and the permission walk dropped some of this page — |
|
0 commit comments